]> git.argeo.org Git - gpl/argeo-slc.git/blob - runtime/org.argeo.slc.specs/src/main/java/org/argeo/slc/execution/ExecutionSpecAttribute.java
Start / stop modules
[gpl/argeo-slc.git] / runtime / org.argeo.slc.specs / src / main / java / org / argeo / slc / execution / ExecutionSpecAttribute.java
1 /*
2 * Copyright (C) 2010 Mathieu Baudier <mbaudier@argeo.org>
3 *
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
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
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.
15 */
16
17 package org.argeo.slc.execution;
18
19 /**
20 * Possible attribute of an execution flow.
21 *
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>
28 *
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.
33 */
34 public interface ExecutionSpecAttribute {
35 /**
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.
39 */
40 public Boolean getIsImmutable();
41
42 /**
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
46 * constant.
47 */
48 public Boolean getIsConstant();
49
50 /** Whether this attribute will be hidden to end users. */
51 public Boolean getIsHidden();
52
53 /**
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.
57 */
58 public Object getValue();
59
60 /** @deprecated use {@link #getIsImmutable()} instead */
61 public Boolean getIsParameter();
62
63 /** @deprecated use {@link #getIsConstant()} instead */
64 public Boolean getIsFrozen();
65
66 }