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: OutCookieProperty.java 3687 2007-03-09 23:13:07Z gbevin $
07: */
08: package com.uwyn.rife.engine.annotations;
09:
10: import java.lang.annotation.*;
11:
12: import com.uwyn.rife.engine.exceptions.OutcookieOutjectionException;
13:
14: /**
15: * Declares that the bean property that corresponds to the annotated getter
16: * will be used as an outcookie. The name of the outcookie will be the name of
17: * the property.
18: * <p>When an element is processed, the outcookie will be
19: * outjected from element through the getter. An {@link OutcookieOutjectionException}
20: * exception will be thrown if the outjection failed.
21: *
22: * @author Geert Bevin (gbevin[remove] at uwyn dot com)
23: * @version $Revision: 3687 $
24: * @since 1.5
25: * @see InCookie
26: */
27: @Retention(RetentionPolicy.RUNTIME)
28: @Target({ElementType.METHOD})
29: @Documented
30: public @interface OutCookieProperty {
31: /**
32: * The expected name of the property.
33: * <p>
34: * This hasn't got any influence on the actual name that is being used
35: * for the property, but is used instead to ensure that the property name
36: * is the same as the one specified here. This is typically used to create
37: * a single point of declaration for the property name that can be
38: * referenced elsewhere and that is ensured to be correct.
39: *
40: * @since 1.6
41: */
42: String name() default "";
43:
44: /**
45: * The default value of the outcookie.
46: * @since 1.5
47: */
48: String defaultValue() default "";
49: }
|