X-Git-Url: http://git.argeo.org/?a=blobdiff_plain;f=runtime%2Forg.argeo.slc.specs%2Fsrc%2Fmain%2Fjava%2Forg%2Fargeo%2Fslc%2Fexecution%2FExecutionSpecAttribute.java;h=a430e5bb09b4f31cbea5a6c84ea410467c61d012;hb=d4bd245768d2e2b3f94928b3db5a01380857e8b8;hp=235171b1de1bbaa14258233fb83fcf5e75c52c57;hpb=1fdb1b4e7b1d2b0cabb6483238301b857a6392fa;p=gpl%2Fargeo-slc.git diff --git a/runtime/org.argeo.slc.specs/src/main/java/org/argeo/slc/execution/ExecutionSpecAttribute.java b/runtime/org.argeo.slc.specs/src/main/java/org/argeo/slc/execution/ExecutionSpecAttribute.java index 235171b1d..a430e5bb0 100644 --- a/runtime/org.argeo.slc.specs/src/main/java/org/argeo/slc/execution/ExecutionSpecAttribute.java +++ b/runtime/org.argeo.slc.specs/src/main/java/org/argeo/slc/execution/ExecutionSpecAttribute.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2010 Mathieu Baudier + * Copyright (C) 2007-2012 Argeo GmbH * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -13,16 +13,56 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - package org.argeo.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(); - public Boolean getIsHidden(); - }