01: package org.vraptor.annotations;
02:
03: import java.lang.annotation.Documented;
04: import java.lang.annotation.ElementType;
05: import java.lang.annotation.Retention;
06: import java.lang.annotation.RetentionPolicy;
07: import java.lang.annotation.Target;
08:
09: /**
10: * Describes a method as a logic.
11: *
12: * This is not required, since all all public
13: * methods of a component are already considered
14: * bussiness logic by VRaptor.
15: *
16: * @author Guilherme Silveira
17: */
18: @Target(ElementType.METHOD)
19: @Documented
20: @Retention(value=RetentionPolicy.RUNTIME)
21: public @interface Logic {
22:
23: /**
24: * The name of the form parameters that will be parsed
25: * from the request to be injected as this logic arguments.
26: *
27: * If not present, VRaptor will use the argument class name decapitalized
28: * when searching in the request parameters.
29: *
30: * <code>
31: * void method(SomeClass argument, OtherClass argument2)
32: * </code>
33: *
34: * will look fo servlet request parameters "someClass"
35: * and "otherClass" repectively. Or you can name them
36: * using this annotation attribute.
37: *
38: * The array must have length equals to the number of arguments
39: * that this logic method receives.
40: *
41: */
42: public String[] parameters() default {};
43:
44: /**
45: * Logic names. A Logic can have more than one name, creating
46: * nicknames for the same logic.
47: *
48: * @return names
49: */
50: public String[] value() default {};
51: }
|