| java.lang.Object com.flexive.shared.structure.FxAssignment
All known Subclasses: com.flexive.shared.structure.FxGroupAssignment, com.flexive.shared.structure.FxPropertyAssignment,
FxAssignment | abstract public class FxAssignment implements Serializable,Comparable<FxAssignment>(Code) | | Base class for assignments of a group or property to a type or another group/property
author: Markus Plesser (markus.plesser@flexive.com), UCS - unique computing solutions gmbh (http://www.ucs.at) |
Constructor Summary | |
protected | FxAssignment(long assignmentId, boolean enabled, FxType assignedType, String alias, String xpath, int position, FxMultiplicity multiplicity, int defaultMultiplicity, FxGroupAssignment parentGroupAssignment, long baseAssignment, FxString label, FxString hint, List<FxStructureOption> options) |
NO_PARENT | final public static long NO_PARENT(Code) | | parent id value if an assignment has no parent
|
ROOT_BASE | final public static long ROOT_BASE(Code) | | base id value if an assignment belongs to the virtual root type
|
TYPE_GROUP | final public static int TYPE_GROUP(Code) | | Constant to determine type of the assignment in database; group
|
TYPE_PROPERTY | final public static int TYPE_PROPERTY(Code) | | Constant to determine type of the assignment in database; property
|
XPath | protected String XPath(Code) | | Absolute XPath without indices from the base FxType
|
alias | protected String alias(Code) | | (optional) alias, if not defined the name of the assigned element
|
defaultMultiplicity | protected int defaultMultiplicity(Code) | | Default multiplicity, will be auto adjusted if < min or > max
|
enabled | protected boolean enabled(Code) | | Is this assignment enabled at all?
Disabled assignments will only show up in the admin area for
structure and will be hidden from all other areas
|
position | protected int position(Code) | | Position of this assignment within the same XPath hierarchy
|
scriptMapping | protected Map<FxScriptEvent, long[]> scriptMapping(Code) | | Script mapping, is resolved while loading the environment
|
FxAssignment | protected FxAssignment(long assignmentId, boolean enabled, FxType assignedType, String alias, String xpath, int position, FxMultiplicity multiplicity, int defaultMultiplicity, FxGroupAssignment parentGroupAssignment, long baseAssignment, FxString label, FxString hint, List<FxStructureOption> options)(Code) | | Constructor
Parameters: assignmentId - internal id of this assignment Parameters: enabled - is this assignment enabled? Parameters: assignedType - the FxType this assignment belongs to Parameters: alias - an optional alias, if null the original name will be used Parameters: xpath - absolute XPath without indices from the base FxType Parameters: position - position within the same XPath hierarchy Parameters: multiplicity - multiplicity Parameters: defaultMultiplicity - default multiplicity Parameters: parentGroupAssignment - (optional) parent FxGroupAssignment this assignment belongs to Parameters: baseAssignment - base assignment (if derived the parent, if not the root assignment, if its a root assignment FxAssignment.ROOT_BASE) Parameters: label - (optional) label Parameters: hint - (optional) hint Parameters: options - options |
_setSystemInternal | public FxAssignment _setSystemInternal()(Code) | | Mark this assignment as system internal - this is a one-way INTERNAL function!!!
this |
compareTo | public int compareTo(FxAssignment o)(Code) | | Compare function
Parameters: o - other assignment to compare to compare result |
createEmptyData | abstract public FxData createEmptyData(FxGroupData parent, int index) throws FxCreateException(Code) | | Create an empty FxData entry for this assignment
Parameters: parent - the parent group Parameters: index - the index of the new entry FxData throws: FxCreateException - on errors |
createRandomData | abstract public FxData createRandomData(Random rnd, FxEnvironment env, FxGroupData parent, int index, int maxMultiplicity) throws FxCreateException(Code) | | Create a random FxData entry for this assignment
Parameters: rnd - the Random to use Parameters: env - environment Parameters: parent - the parent group Parameters: index - the index of the new entry Parameters: maxMultiplicity - the maximum multiplicity FxData throws: FxCreateException - on errors |
getAlias | public String getAlias()(Code) | | Get the alias of this assignment.
Groups and properties may define an alias to allow multiple use of the same group or property but
using a different name.
An alias is always defined, if not explicitly it is the properties/groups name.
alias of this assignment |
getAssignedType | public FxType getAssignedType()(Code) | | The FxType this assignment is associated with
FxType this assignment is associated with |
getBaseAssignmentId | public long getBaseAssignmentId()(Code) | | base assignment (if derived the parent, if not the root assignment, if its a root assignment FxAssignment.ROOT_BASE)
base assignment See Also: FxAssignment.ROOT_BASE |
getDefaultMultiplicity | public int getDefaultMultiplicity()(Code) | | Get the default multiplicity (used i.e. in user interfaces editors and determines the amount of values that will
be initialized when creating an empty element).
If the set value is < min or > max multiplicity of this assignment it will
be auto adjusted to the next valid value without throwing an exception
default multiplicity |
getDisplayLabel | public FxString getDisplayLabel()(Code) | | Return a human-readable string to present this assignment to the user.
the assignment's name as it should be displayed to the user |
getDisplayName | public String getDisplayName()(Code) | | Return a human-readable string to present this assignment to the user.
the assignment's name as it should be displayed to the user |
getId | public long getId()(Code) | | The internal id of this assignment as stored in the database
internal id of this assignment |
getLabel | public FxString getLabel()(Code) | | Get the assignment label
the localized label of this assignment |
getMultiplicity | abstract public FxMultiplicity getMultiplicity()(Code) | | Get the multiplicity of this assignment.
Depending on if the assigned element allows overriding of its base multiplicity the base
elements multiplicity is returned or the multiplicity of the assignment
multiplicity of this assignment |
getOption | public FxStructureOption getOption(String key)(Code) | | Get an option entry for the given key, if the key is invalid or not found a FxStructureOption object
will be returned with set set to false , overrideable set to false and value
set to an empty String.
Parameters: key - option key the found option or an object that indicates that the option is not set |
getParentGroupAssignment | public FxGroupAssignment getParentGroupAssignment()(Code) | | If this assignment is assigned to a group, the assignment of the parent group (in the context of the current type)
parent group assignment of this assignment |
getPosition | public int getPosition()(Code) | | Get the position within the current XPath hierarchy
position within the current XPath hierarchy |
getScriptMapping | public long[] getScriptMapping(FxScriptEvent event)(Code) | | Get the mapped script ids for the requested script type
Parameters: event - requested script event mapped script ids or null if mappings do not exist for this assignment |
getXPath | public synchronized String getXPath()(Code) | | Get the XPath of this assignment without indices
XPath of this assignment without indices |
hasOption | public boolean hasOption(String key)(Code) | | Check if an option is set for the requested key
Parameters: key - option key if an option is set for the requested key |
hasParentGroupAssignment | public boolean hasParentGroupAssignment()(Code) | | Returns if this assignment is the child of another assignment or if it is directly attached to a FxType
parent assignment |
hasScriptMapping | public boolean hasScriptMapping(FxScriptEvent event)(Code) | | Does this assignment have mappings for the requested script event?
Parameters: event - requested script event if mappings exist |
hasScriptMappings | public boolean hasScriptMappings()(Code) | | Does this assignment have mappings for any script type?
if mappings exist |
hashCode | public int hashCode()(Code) | | |
isDerivedAssignment | public boolean isDerivedAssignment()(Code) | | Returns true if the assignment is derived from a supertype.
true if the assignment is derived from a supertype. |
isEnabled | public boolean isEnabled()(Code) | | Is this assignment enabled?
enabled |
isSystemInternal | public boolean isSystemInternal()(Code) | | Is this a system internal assignment?
system internal |
isValid | public boolean isValid(Object value)(Code) | | Validate the given value for this assignment.
Parameters: value - the value to be checked true if it is valid for this assignment, false otherwise |
resolveParentDependencies | public void resolveParentDependencies(List<FxAssignment> assignments)(Code) | | Resolve parent dependecies after initial loading
Parameters: assignments - all known assignments |
resolvePreloadDependencies | public void resolvePreloadDependencies(List<FxAssignment> assignments)(Code) | | Resolve preload dependecies after initial loading
Parameters: assignments - all known assignment |
sort | public static List<FxAssignment> sort(List<FxAssignment> assignments)(Code) | | Sort FxAssignments by their position
Parameters: assignments - FxAssignments to sort sorted List with the assignments |
|
|