001: /*
002: * Copyright 2001-2007 Geert Bevin <gbevin[remove] at uwyn dot com>
003: * Distributed under the terms of either:
004: * - the common development and distribution license (CDDL), v1.0; or
005: * - the GNU Lesser General Public License, v2.1 or later
006: * $Id: Flowlink.java 3701 2007-03-18 12:24:23Z gbevin $
007: */
008: package com.uwyn.rife.engine.annotations;
009:
010: import java.lang.annotation.Documented;
011: import java.lang.annotation.Retention;
012: import java.lang.annotation.RetentionPolicy;
013: import java.lang.annotation.Target;
014:
015: /**
016: * Declares a flow link for the element.
017: *
018: * @author Geert Bevin (gbevin[remove] at uwyn dot com)
019: * @version $Revision: 3701 $
020: * @since 1.5
021: */
022: @Retention(RetentionPolicy.RUNTIME)
023: @Target({})
024: @Documented
025: public @interface Flowlink {
026: /**
027: * The name of the exit in the source element that this flow link will
028: * be connected to.
029: * <p>If no such exit exists, it will be created automatically.
030: * @since 1.5
031: */
032: String srcExit();
033:
034: /**
035: * The ID of the destination element for this flow link.
036: * <p>If <code>destClass</code> is provided, it will override the
037: * <code>destId</code> value.
038: * @see #destClass
039: * @since 1.5
040: */
041: String destId() default "";
042:
043: /**
044: * The Java class of the destination element for this data link. This
045: * class should at least have an {@link Elem} annotation.
046: * <p>If <code>destClass</code> is provided, it will override the
047: * <code>destId</code> value.
048: * <p>The ID will be evaluated locally to the current subsite. If you
049: * have to refer to an ID in another subsite, you have to use the
050: * {@link #destClassIdPrefix}.
051: * @see #destId
052: * @see #destClassIdPrefix
053: * @since 1.5
054: */
055: Class destClass() default void.class;
056:
057: /**
058: * The prefix that will be added to the <code>destClass</code> ID.
059: * <p>This makes it possible to refer to an ID in another subsite.
060: * Note that this prefix is not validated individually, it is merely added
061: * as a string to build the final ID that will be used.
062: * @see #destClass
063: * @since 1.5
064: */
065: String destClassIdPrefix() default "";
066:
067: /**
068: * Indicates whether this flow link is a snapback.
069: * @since 1.5
070: */
071: boolean snapback() default false;
072:
073: /**
074: * Indicates whether this flow link will redirect to a dedicated URL
075: * instead of executing the destination element directly.
076: * @since 1.5
077: */
078: boolean redirect() default false;
079:
080: /**
081: * Indicates whether the behavioral inheritance (3D flow) should be
082: * preserved or cancelled when this flow link is followed.
083: * @since 1.5
084: */
085: Inheritance inheritance() default Inheritance.PRESERVE;
086:
087: /**
088: * Indicates whether element embedded should be preserved or cancelled
089: * when this flow link is followed.
090: * @since 1.5
091: */
092: Embedding embedding() default Embedding.PRESERVE;
093:
094: /**
095: * Indicates whether the continuations should be
096: * preserved or cancelled when this submission is sent.
097: * @since 1.6
098: */
099: Continuations continuations() default Continuations.PRESERVE;
100:
101: /**
102: * This flow link's data links.
103: * @since 1.5
104: */
105: Datalink[] datalinks() default {};
106:
107: public enum Inheritance {
108: PRESERVE, CANCEL
109: }
110:
111: public enum Embedding {
112: PRESERVE, CANCEL
113: }
114:
115: public enum Continuations {
116: PRESERVE, CANCEL
117: }
118: }
|