X-Git-Url: http://git.argeo.org/?a=blobdiff_plain;f=org.argeo.api.slc%2Fsrc%2Forg%2Fargeo%2Fapi%2Fslc%2Fexecution%2FExecutionSpecAttribute.java;fp=org.argeo.api.slc%2Fsrc%2Forg%2Fargeo%2Fapi%2Fslc%2Fexecution%2FExecutionSpecAttribute.java;h=0ca92bfc27919535de80a58746c74d45781dfe3d;hb=09c9e5093fe1353aaac344ac8a8caf2e1dcc0778;hp=0000000000000000000000000000000000000000;hpb=8ff996a3380166be2ae9cf0ef0fa22c58e11746a;p=gpl%2Fargeo-slc.git
diff --git a/org.argeo.api.slc/src/org/argeo/api/slc/execution/ExecutionSpecAttribute.java b/org.argeo.api.slc/src/org/argeo/api/slc/execution/ExecutionSpecAttribute.java
new file mode 100644
index 000000000..0ca92bfc2
--- /dev/null
+++ b/org.argeo.api.slc/src/org/argeo/api/slc/execution/ExecutionSpecAttribute.java
@@ -0,0 +1,53 @@
+package org.argeo.api.slc.execution;
+
+/**
+ * Possible attribute of an execution flow.
+ *
+ * There are mainly two implementations :
+ * + Primitive attributes (no predefined choice, the end user must compute a
+ * String, a Float, an Integer...)
+ * + RefSpecAttribute which enable two things
+ * ++ a reference to another object of the application context
+ * ++ the display of some choices among which the end user can choose.
+ *
+ * @see org.argeo.slc.core.execution.PrimitiveSpecAttribute
+ * @see org.argeo.slc.core.execution.RefSpecAttribute
+ * @see org.argeo.slc.core.execution.PrimitiveUtils : this class offers some
+ * helper, among others to cast the various type of primitive attribute.
+ */
+public interface ExecutionSpecAttribute {
+ /**
+ * Whether this attribute has to be set at instantiation of the flow and
+ * cannot be modified afterwards. If the attribute is not immutable (that
+ * is, this method returns false), it can be set at execution time.
+ */
+ public Boolean getIsImmutable();
+
+ /**
+ * Whether this attribute must be explicitly set and cannot be modified.
+ * This attribute is then basically a constant within a given application
+ * context. {@link #getValue()} cannot return null if the attribute is a
+ * constant.
+ */
+ public Boolean getIsConstant();
+
+ /** Whether this attribute will be hidden to end users. */
+ public Boolean getIsHidden();
+
+ /**
+ * The default value for this attribute. Can be null, except if
+ * {@link #getIsFrozen()} is true
, in which case it represents
+ * the constant value of this attribute.
+ */
+ public Object getValue();
+
+ /** Description of this attribute, can be null */
+ public String getDescription();
+
+ /** @deprecated use {@link #getIsImmutable()} instead */
+ public Boolean getIsParameter();
+
+ /** @deprecated use {@link #getIsConstant()} instead */
+ public Boolean getIsFrozen();
+
+}