001 // 002 // Licensed under the Apache License, Version 2.0 (the "License"); 003 // you may not use this file except in compliance with the License. 004 // You may obtain a copy of the License at 005 // 006 // http://www.apache.org/licenses/LICENSE-2.0 007 // 008 // Unless required by applicable law or agreed to in writing, software 009 // distributed under the License is distributed on an "AS IS" BASIS, 010 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 011 // See the License for the specific language governing permissions and 012 // limitations under the License. 013 014 package net.sf.tacos.annotations; 015 016 import java.lang.annotation.ElementType; 017 import java.lang.annotation.Retention; 018 import java.lang.annotation.RetentionPolicy; 019 import java.lang.annotation.Target; 020 021 /** 022 * Annotation for injecting an ILink to a specific page, 023 * using the page service.<p/> 024 * Use it on an abstract, parameterless 025 * page or component method that returns ILink. 026 * 027 * @author Ming Jiang 028 * @author Andreas Andreou 029 */ 030 @Target( { ElementType.METHOD }) 031 @Retention(RetentionPolicy.RUNTIME) 032 public @interface InjectPageLink { 033 /** 034 * The name of the page for which to inject the ILink. 035 * @return 036 */ 037 String value(); 038 039 /** 040 * Set to true if the page is to be found on the current namespace. Otherwise (the 041 * default), it is assumed to exist in the application (global) namespace. 042 * @return 043 */ 044 boolean currentNamespace() default false; 045 }