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: Submission.java 3701 2007-03-18 12:24:23Z gbevin $
07: */
08: package com.uwyn.rife.engine.annotations;
09:
10: import java.lang.annotation.Documented;
11: import java.lang.annotation.Retention;
12: import java.lang.annotation.RetentionPolicy;
13: import java.lang.annotation.Target;
14:
15: /**
16: * Declares a submission.
17: *
18: * @author Geert Bevin (gbevin[remove] at uwyn dot com)
19: * @version $Revision: 3701 $
20: * @since 1.5
21: * @see SubmissionHandler
22: */
23: @Retention(RetentionPolicy.RUNTIME)
24: @Target({})
25: @Documented
26: public @interface Submission {
27: /**
28: * A <code>LOCAL</code> submission scope means that only the submission
29: * with the same name in the same element will be able to receive the
30: * data that was submitted.
31: * <p>A <code>GLOBAL</code> submission scope means that any submission
32: * with the same name (even if it belongs to another element) will be
33: * able to receive the data that was submitted.
34: * @since 1.5
35: */
36: public enum Scope {
37: LOCAL, GLOBAL
38: }
39:
40: /**
41: * The submission's name.
42: * @since 1.5
43: */
44: String name();
45:
46: /**
47: * The submission's scope.
48: * @since 1.5
49: */
50: Scope scope() default Scope.LOCAL;
51:
52: /**
53: * The submission's parameters.
54: * @since 1.5
55: */
56: Param[] params() default {};
57:
58: /**
59: * The submission's regular expression parameters.
60: * @since 1.5
61: */
62: ParamRegexp[] paramRegexps() default {};
63:
64: /**
65: * The submission's beans.
66: * @since 1.5
67: */
68: SubmissionBean[] beans() default {};
69:
70: /**
71: * The submission's uploaded files.
72: * @since 1.5
73: */
74: File[] files() default {};
75:
76: /**
77: * The submission's regular expression file uploads.
78: * @since 1.5
79: */
80: FileRegexp[] fileRegexps() default {};
81:
82: /**
83: * Indicates whether the continuations should be
84: * preserved or cancelled when this submission is sent.
85: * @since 1.6
86: */
87: Continuations continuations() default Continuations.PRESERVE;
88:
89: public enum Continuations {
90: PRESERVE, CANCEL
91: }
92: }
|