View Javadoc

1   //
2   // Licensed under the Apache License, Version 2.0 (the "License");
3   // you may not use this file except in compliance with the License.
4   // You may obtain a copy of the License at
5   //
6   //     http://www.apache.org/licenses/LICENSE-2.0
7   //
8   // Unless required by applicable law or agreed to in writing, software
9   // distributed under the License is distributed on an "AS IS" BASIS,
10  // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11  // See the License for the specific language governing permissions and
12  // limitations under the License.
13  
14  package net.sf.tacos.annotations;
15  
16  import java.lang.annotation.ElementType;
17  import java.lang.annotation.Retention;
18  import java.lang.annotation.RetentionPolicy;
19  import java.lang.annotation.Target;
20  
21  /**
22   * Annotation for injecting an ILink to a specific page,
23   * using the page service.<p/>
24   * Use it on an abstract, parameterless
25   * page or component method that returns ILink. 
26   *
27   * @author Ming Jiang
28   * @author Andreas Andreou
29   */
30  @Target( { ElementType.METHOD })
31  @Retention(RetentionPolicy.RUNTIME)
32  public @interface InjectPageLink {
33      /**
34       * The name of the page for which to inject the ILink.
35       * @return
36       */
37      String value();
38  
39      /**
40       * Set to true if the page is to be found on the current namespace. Otherwise (the
41       * default), it is assumed to exist in the application (global) namespace.
42       * @return
43       */
44      boolean currentNamespace() default false;
45  }