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=8a7c1cb154de5e225399c66239d7980c8066af89;hb=58e0e18d64a2080680a9f8397b0dfa2894519910;hp=582cef99c76b07ccaf79118e6c83ce3965ef7eab;hpb=1b19cac6a92c31d9119fc2986e7aaf3df98b2393;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 582cef99c..8a7c1cb15 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,6 +1,65 @@ +/* + * 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * 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(); + + /** @deprecated use {@link #getIsImmutable()} instead */ public Boolean getIsParameter(); + + /** @deprecated use {@link #getIsConstant()} instead */ + public Boolean getIsFrozen(); + }