]>
git.argeo.org Git - gpl/argeo-slc.git/blob - runtime/org.argeo.slc.specs/src/main/java/org/argeo/slc/execution/ExecutionSpecAttribute.java
e7259b8f7754221789f0490c0ade714817b080ee
2 * Copyright (C) 2010 Mathieu Baudier <mbaudier@argeo.org>
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
17 package org
.argeo
.slc
.execution
;
20 * Possible attribute of an execution flow.
22 * There are mainly two implementations :<br>
23 * + Primitive attributes (no predefined choice, the end user must compute a
24 * String, a Float, an Integer...)<br>
25 * + RefSpecAttribute which enable two things<br>
26 * ++ a reference to another object of the application context<br>
27 * ++ the display of some choices among which the end user can choose.<br>
29 * @see org.argeo.slc.core.execution.PrimitiveSpecAttribute
30 * @see org.argeo.slc.core.execution.RefSpecAttribute
31 * @see org.argeo.slc.core.execution.PrimitiveUtils : this class offers some
32 * helper, among others to cast the various type of primitive attribute.
34 public interface ExecutionSpecAttribute
{
36 * Whether this attribute has to be set at instantiation of the flow and
37 * cannot be modified afterwards. If the attribute is not immutable (that
38 * is, this method returns false), it can be set at execution time.
40 public Boolean
getIsImmutable();
43 * Whether this attribute must be explicitly set and cannot be modified.
44 * This attribute is then basically a constant within a given application
45 * context. {@link #getValue()} cannot return null if the attribute is a
48 public Boolean
getIsConstant();
50 /** Whether this attribute will be hidden to end users. */
51 public Boolean
getIsHidden();
54 * The default value for this attribute. Can be null, except if
55 * {@link #getIsFrozen()} is <code>true</code>, in which case it represents
56 * the constant value of this attribute.
58 public Object
getValue();
60 /** @deprecated use {@link #getIsImmutable()} instead */
61 public Boolean
getIsParameter();
63 /** @deprecated use {@link #getIsConstant()} instead */
64 public Boolean
getIsFrozen();