|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.flexive.shared.structure.FxAssignment
com.flexive.shared.structure.FxGroupAssignment
public class FxGroupAssignment
Assignment of a (structure) group to a type or another assignment of a (structure) group
| Field Summary | |
|---|---|
protected FxGroup |
group
The group assigned |
protected GroupMode |
mode
mode used for children |
| Fields inherited from class com.flexive.shared.structure.FxAssignment |
|---|
alias, baseAssignment, defaultMultCalc, defaultMultiplicity, enabled, hint, label, multiplicity, NO_BASE, NO_PARENT, options, parentGroupAssignment, position, POSITION_BOTTOM, ROOT_BASE, scriptMapping, TYPE_GROUP, TYPE_PROPERTY, XPath |
| Constructor Summary | |
|---|---|
FxGroupAssignment(long assignmentId,
boolean enabled,
FxType assignedType,
java.lang.String alias,
java.lang.String xpath,
int position,
FxMultiplicity multiplicity,
int defaultMultiplicity,
FxGroupAssignment parentGroupAssignment,
long baseAssignment,
FxString label,
FxString hint,
FxGroup group,
GroupMode mode,
java.util.List<FxStructureOption> options)
Constructor |
|
| Method Summary | |
|---|---|
protected void |
addAssignment(FxAssignment as)
Add and sort an assignment during initialization phase |
FxGroupAssignmentEdit |
asEditable()
Get this FxGroupAssignment as editable |
FxData |
createEmptyData(FxGroupData parent,
int index)
Create an empty FxData entry for this assignment |
FxData |
createEmptyData(FxGroupData parent,
int index,
int position,
boolean onlySystemInternal)
Create an empty FxData entry for this assignment |
FxData |
createRandomData(java.util.Random rnd,
FxEnvironment env,
FxGroupData parent,
int index,
int maxMultiplicity)
Create a random FxData entry for this assignment |
java.util.List<FxAssignment> |
getAllChildAssignments()
Get all assignments of this group and its subgroups |
java.util.List<FxPropertyAssignment> |
getAllProperties()
Return all property assignments that are assigned to this group or any subgroup. |
java.util.List<FxGroupAssignment> |
getAssignedGroups()
Get all group assignments that are assigned to this assignment |
java.util.List<FxPropertyAssignment> |
getAssignedProperties()
Get all property assignments that are assigned to this assignment |
FxAssignment |
getAssignment(java.util.List<XPathElement> XPath,
java.lang.String fullXPath)
Get an assignment for the given (relative to this group) XPath |
java.util.List<FxAssignment> |
getAssignments()
Get all assignments (groups and properties in correct order) that are assigned to this group |
java.util.List<FxGroupAssignment> |
getDerivedAssignments(FxEnvironment environment)
Return a list of all assignments that were derived from this one (i.e. |
FxGroup |
getGroup()
Get the group this assignment relates to |
GroupMode |
getMode()
Get the mode used for this group. |
FxMultiplicity |
getMultiplicity()
Get the multiplicity of this assignment. |
FxStructureOption |
getOption(java.lang.String key)
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, overridable set to false and value
set to an empty String. |
boolean |
hasMandatorySubAssignments()
Check if any (direct) sub assignments of this group are mandatory |
void |
resolveParentDependencies(java.util.List<FxAssignment> assignments)
Resolve parent dependecies after initial loading |
FxGroupAssignmentEdit |
save()
Save this assignment and return the saved instance. |
| Methods inherited from class com.flexive.shared.structure.FxAssignment |
|---|
_setSystemInternal, compareTo, createEmptyData, equals, getAlias, getAssignedType, getAssignedTypeId, getBaseAssignmentId, getDefaultMultiplicity, getDisplayLabel, getDisplayName, getDisplayName, getHint, getId, getLabel, getOptions, getParentGroupAssignment, getPosition, getScriptMapping, getXPath, hashCode, hasOption, hasParentGroupAssignment, hasScriptMapping, hasScriptMappings, isDerivedAssignment, isDerivedFrom, isEnabled, isSystemInternal, isValid, resolveDependencies, resolvePreloadDependencies, resolveReferences, sort, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected FxGroup group
protected GroupMode mode
| Constructor Detail |
|---|
public FxGroupAssignment(long assignmentId,
boolean enabled,
FxType assignedType,
java.lang.String alias,
java.lang.String xpath,
int position,
FxMultiplicity multiplicity,
int defaultMultiplicity,
FxGroupAssignment parentGroupAssignment,
long baseAssignment,
FxString label,
FxString hint,
FxGroup group,
GroupMode mode,
java.util.List<FxStructureOption> options)
assignmentId - internal id of this assignmentenabled - is this assignment enabled?assignedType - the FxType this assignment belongs toalias - an optional alias, if null the original name will be usedxpath - XPath relative to the assigned FxTypeposition - position within the same XPath hierarchymultiplicity - multiplicitydefaultMultiplicity - default multiplicityparentGroupAssignment - (optional) parent FxGroupAssignment this group assignment belongs tobaseAssignment - base assignment (if derived the parent, if not the root assignment, if its a root assignment FxAssignment.ROOT_BASE)label - (optional) labelhint - (optional) hintgroup - the assigned groupmode - used group mode (any-of or one-of)options - options| Method Detail |
|---|
public FxGroup getGroup()
public FxMultiplicity getMultiplicity()
getMultiplicity in class FxAssignmentpublic java.util.List<FxAssignment> getAssignments()
public java.util.List<FxGroupAssignment> getAssignedGroups()
public java.util.List<FxPropertyAssignment> getAssignedProperties()
public java.util.List<FxPropertyAssignment> getAllProperties()
public java.util.List<FxAssignment> getAllChildAssignments()
protected void addAssignment(FxAssignment as)
as - assignment to add at the correct position
public FxData createEmptyData(FxGroupData parent,
int index)
createEmptyData in class FxAssignmentparent - the parent groupindex - the index of the new entry
FxAssignment.createEmptyData(com.flexive.shared.content.FxGroupData, int, int)
public FxData createEmptyData(FxGroupData parent,
int index,
int position,
boolean onlySystemInternal)
createEmptyData in class FxAssignmentparent - the parent groupindex - the index of the new entryposition - the position to use (to avoid puting multiple elemtns of the same type on the same position)onlySystemInternal - when true, only system-internal groups or properties are added
public FxStructureOption getOption(java.lang.String key)
FxStructureOption object
will be returned with set set to false, overridable set to false and value
set to an empty String.
getOption in class FxAssignmentkey - option key
public FxData createRandomData(java.util.Random rnd,
FxEnvironment env,
FxGroupData parent,
int index,
int maxMultiplicity)
createRandomData in class FxAssignmentrnd - the Random to useenv - environmentparent - the parent groupindex - the index of the new entrymaxMultiplicity - the maximum multiplicity
public FxAssignment getAssignment(java.util.List<XPathElement> XPath,
java.lang.String fullXPath)
throws FxNotFoundException
XPath - XPathElement array starting at this groupfullXPath - the full XPath for exception reporting
FxNotFoundException - if no assignment was foundpublic GroupMode getMode()
public FxGroupAssignmentEdit asEditable()
public FxGroupAssignmentEdit save()
throws FxApplicationException
FxApplicationException - on errorspublic java.util.List<FxGroupAssignment> getDerivedAssignments(FxEnvironment environment)
environment - the environment
public boolean hasMandatorySubAssignments()
public void resolveParentDependencies(java.util.List<FxAssignment> assignments)
FxAssignment
resolveParentDependencies in class FxAssignmentassignments - all known assignments
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||