01: /*
02: * Copyright 2001-2007 Geert Bevin <gbevin[remove] at uwyn dot com>
03: * Distributed under the terms of either:
04: * - the common development and distribution license (CDDL), v1.0; or
05: * - the GNU Lesser General Public License, v2.1 or later
06: * $Id: OutputProperty.java 3687 2007-03-09 23:13:07Z gbevin $
07: */
08: package com.uwyn.rife.engine.annotations;
09:
10: import java.lang.annotation.Documented;
11: import java.lang.annotation.ElementType;
12: import java.lang.annotation.Retention;
13: import java.lang.annotation.RetentionPolicy;
14: import java.lang.annotation.Target;
15:
16: /**
17: * Declares that the bean property that corresponds to the annotated getter
18: * will be used as an output. The name of the output will be the name of
19: * the property.
20: * <p>When an element is processed, the output will be
21: * outjected from element through the getter. An {@link com.uwyn.rife.engine.exceptions.OutputOutjectionException}
22: * exception will be thrown if the outjection failed.
23: *
24: * @author Geert Bevin (gbevin[remove] at uwyn dot com)
25: * @version $Revision: 3687 $
26: * @since 1.5
27: * @see Output
28: */
29: @Retention(RetentionPolicy.RUNTIME)
30: @Target({ElementType.METHOD})
31: @Documented
32: public @interface OutputProperty {
33: /**
34: * The expected name of the property.
35: * <p>
36: * This hasn't got any influence on the actual name that is being used
37: * for the property, but is used instead to ensure that the property name
38: * is the same as the one specified here. This is typically used to create
39: * a single point of declaration for the property name that can be
40: * referenced elsewhere and that is ensured to be correct.
41: *
42: * @since 1.6
43: */
44: String name() default "";
45:
46: /**
47: * The default values of the output.
48: * @since 1.5
49: */
50: String[] defaultValues() default {};
51: }
|