]> git.argeo.org Git - gpl/argeo-slc.git/blob - org.argeo.slc.api/src/org/argeo/slc/execution/ExecutionSpecAttribute.java
Disable trace logging
[gpl/argeo-slc.git] / org.argeo.slc.api / src / org / argeo / slc / execution / ExecutionSpecAttribute.java
1 /*
2 * Copyright (C) 2007-2012 Argeo GmbH
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 package org.argeo.slc.execution;
17
18 /**
19 * Possible attribute of an execution flow.
20 *
21 * There are mainly two implementations :<br>
22 * + Primitive attributes (no predefined choice, the end user must compute a
23 * String, a Float, an Integer...)<br>
24 * + RefSpecAttribute which enable two things<br>
25 * ++ a reference to another object of the application context<br>
26 * ++ the display of some choices among which the end user can choose.<br>
27 *
28 * @see org.argeo.slc.core.execution.PrimitiveSpecAttribute
29 * @see org.argeo.slc.core.execution.RefSpecAttribute
30 * @see org.argeo.slc.core.execution.PrimitiveUtils : this class offers some
31 * helper, among others to cast the various type of primitive attribute.
32 */
33 public interface ExecutionSpecAttribute {
34 /**
35 * Whether this attribute has to be set at instantiation of the flow and
36 * cannot be modified afterwards. If the attribute is not immutable (that
37 * is, this method returns false), it can be set at execution time.
38 */
39 public Boolean getIsImmutable();
40
41 /**
42 * Whether this attribute must be explicitly set and cannot be modified.
43 * This attribute is then basically a constant within a given application
44 * context. {@link #getValue()} cannot return null if the attribute is a
45 * constant.
46 */
47 public Boolean getIsConstant();
48
49 /** Whether this attribute will be hidden to end users. */
50 public Boolean getIsHidden();
51
52 /**
53 * The default value for this attribute. Can be null, except if
54 * {@link #getIsFrozen()} is <code>true</code>, in which case it represents
55 * the constant value of this attribute.
56 */
57 public Object getValue();
58
59 /** Description of this attribute, can be null */
60 public String getDescription();
61
62 /** @deprecated use {@link #getIsImmutable()} instead */
63 public Boolean getIsParameter();
64
65 /** @deprecated use {@link #getIsConstant()} instead */
66 public Boolean getIsFrozen();
67
68 }