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: Autolink.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 an auto link for the element.
017: *
018: * @author Geert Bevin (gbevin[remove] at uwyn dot com)
019: * @version $Revision: 3701 $
020: * @since 1.5.1
021: */
022: @Retention(RetentionPolicy.RUNTIME)
023: @Target({})
024: @Documented
025: public @interface Autolink {
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.1
031: */
032: String srcExit() default "";
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.1
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.1
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.1
064: */
065: String destClassIdPrefix() default "";
066:
067: /**
068: * Indicates whether this flow link will redirect to a dedicated URL
069: * instead of executing the destination element directly.
070: * @since 1.5.1
071: */
072: boolean redirect() default false;
073:
074: /**
075: * Indicates whether the behavioral inheritance (3D flow) should be
076: * preserved or cancelled when this flow link is followed.
077: * @since 1.5.1
078: */
079: Inheritance inheritance() default Inheritance.PRESERVE;
080:
081: /**
082: * Indicates whether element embedded should be preserved or cancelled
083: * when this flow link is followed.
084: * @since 1.5.1
085: */
086: Embedding embedding() default Embedding.PRESERVE;
087:
088: /**
089: * Indicates whether the continuations should be
090: * preserved or cancelled when this submission is sent.
091: * @since 1.6
092: */
093: Continuations continuations() default Continuations.PRESERVE;
094:
095: public enum Inheritance {
096: PRESERVE, CANCEL
097: }
098:
099: public enum Embedding {
100: PRESERVE, CANCEL
101: }
102:
103: public enum Continuations {
104: PRESERVE, CANCEL
105: }
106: }
|