|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.flexive.shared.content.FxData
com.flexive.shared.content.FxGroupData
public class FxGroupData
FxData extension for groups
| Field Summary |
|---|
| Fields inherited from class com.flexive.shared.content.FxData |
|---|
indices, POSITION_BOTTOM, POSITION_TOP, xp, XPathFull, xpPrefix |
| Constructor Summary | |
|---|---|
FxGroupData(java.lang.String xpPrefix,
java.lang.String alias,
int index,
java.lang.String xPath,
java.lang.String xPathFull,
int[] indices,
long assignmentId,
FxMultiplicity assignmentMultiplicity,
int pos,
FxGroupData parent,
java.util.List<FxData> data,
boolean systemInternal)
|
|
| Method Summary | |
|---|---|
FxData |
addChild(FxData child)
Add a child FxData at the correct position |
FxData |
addEmptyChild(java.lang.String xPath,
int pos)
Add an and FxData entry with the given XPath to this group (must be a direct child of this group, no nesting allowed!). |
void |
addGroup(java.lang.String xPath,
FxGroupAssignment fxGroupAssignment,
int pos)
Add a group entry at the given XPath. |
void |
addProperty(java.lang.String xPath,
FxPropertyAssignment assignment,
FxValue value,
int pos)
Add a property at the given XPath location, removing eventually existing properties. |
protected void |
applyIndices()
Apply the multiplicity to XPath and children if its a group |
void |
compactPositions(boolean includeSubGroups)
Synchronize positions closing gaps optionally including sub groups |
FxData |
containsChild(XPathElement check)
Check if a child with the same alias and multiplicity that is not empty exists. |
protected FxGroupData |
copy(FxGroupData parent)
Create an independent copy of this group or property FxData |
static FxGroupData |
createVirtualRootGroup(java.lang.String xpPrefix)
Helper to create a virtual root group |
void |
explode(boolean explodeChildGroups)
"Explode" this group by adding all createable assignments at the bottom |
void |
fixChildIndices()
'Fix' the indices of children after they have been added to reflect the parent groups index in their XPath |
java.util.List<FxData> |
getChildren()
Get all child entries for this group |
java.util.List<java.lang.String> |
getCreateableChildren(boolean includeExisting)
Get a list of child FxData instances (as XPath with full indices) that can be created as children for this group. |
FxGroupData |
getGroup(java.lang.String xPath)
Get the group denoted by the given XPath |
java.util.List<FxPropertyData> |
getPropertyData(long propertyId,
boolean includeEmpty)
Get a list of all FxPropertyData entries that are assigned to propertyId |
protected java.util.List<FxReference> |
getReferences(boolean includeSubGroups)
Get a list of all FxReference values in this group and optionally all sub groups |
boolean |
isEmpty()
Is this data empty? |
boolean |
isGroup()
Is this FxData a property or group? |
boolean |
isProperty()
Is this FxData a property or group? |
boolean |
isRootGroup()
Is this group the root group? |
void |
moveChild(XPathElement xp,
int delta)
Move a child element identified by its alias and multiplicity by delta positions within this group If delta is Integer.MAX_VALUE the data will always be placed at the bottom, Integer.MIN_VALUE will always place it at the top. |
void |
removeChild(FxData data)
Remove the requested child data and compact indices and positions |
void |
removeEmptyEntries()
Remove all empty entries of this group that are not required |
void |
removeEmptyEntries(boolean includeRequired)
Remove all empty entries of this group |
void |
replaceChild(XPathElement xpath,
FxData data)
|
| Methods inherited from class com.flexive.shared.content.FxData |
|---|
compact, createNew, equals, getAlias, getAssignment, getAssignmentId, getAssignmentMultiplicity, getCreateableElements, getElements, getIndex, getIndices, getOccurances, getParent, getPos, getRemoveableElements, getXPath, getXPathElement, getXPathFull, getXPathPrefix, hashCode, isRemoveable, isSystemInternal, mayCreateMore, setPos, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public FxGroupData(java.lang.String xpPrefix,
java.lang.String alias,
int index,
java.lang.String xPath,
java.lang.String xPathFull,
int[] indices,
long assignmentId,
FxMultiplicity assignmentMultiplicity,
int pos,
FxGroupData parent,
java.util.List<FxData> data,
boolean systemInternal)
throws FxInvalidParameterException
FxInvalidParameterException| Method Detail |
|---|
public boolean isProperty()
isProperty in class FxDatapublic boolean isGroup()
isGroup in class FxDatapublic java.util.List<FxData> getChildren()
public boolean isEmpty()
isEmpty in class FxData
public static FxGroupData createVirtualRootGroup(java.lang.String xpPrefix)
throws FxInvalidParameterException
xpPrefix - XPath prefix like "FxType name[@pk=..]"
FxInvalidParameterException - on errors
public void moveChild(XPathElement xp,
int delta)
xp - element to movedelta - delta positions to movepublic FxData addChild(FxData child)
child - FxData to add
public FxData addEmptyChild(java.lang.String xPath,
int pos)
throws FxInvalidParameterException,
FxNoAccessException,
FxNotFoundException,
FxCreateException
xPath - XPath to add to this group (must be a direct child of this group, no nesting allowed!)pos - position in same hierarchy level
FxInvalidParameterException - on errors
FxNoAccessException - on errors
FxNotFoundException - on errors
FxCreateException - on errorsprotected void applyIndices()
applyIndices in class FxDatapublic void fixChildIndices()
public void removeEmptyEntries()
removeEmptyEntries(boolean)public void removeEmptyEntries(boolean includeRequired)
includeRequired - include entries that are required?public void compactPositions(boolean includeSubGroups)
includeSubGroups - close gaps for subgroups as well?public boolean isRootGroup()
public FxGroupData getGroup(java.lang.String xPath)
throws FxNotFoundException,
FxInvalidParameterException
xPath - requested XPath for the group
FxNotFoundException - if no group with this XPath is found
FxInvalidParameterException - if the XPath is invalid
public void addProperty(java.lang.String xPath,
FxPropertyAssignment assignment,
FxValue value,
int pos)
throws FxInvalidParameterException,
FxNotFoundException
xPath - requested XPathassignment - assignment of the propertyvalue - valuepos - position
FxInvalidParameterException - if the XPath is invalid
FxNotFoundException - if the parent group does not existpublic FxData containsChild(XPathElement check)
check - XPathElement to check
null
public void replaceChild(XPathElement xpath,
FxData data)
public void addGroup(java.lang.String xPath,
FxGroupAssignment fxGroupAssignment,
int pos)
throws FxInvalidParameterException,
FxNotFoundException,
FxCreateException
xPath - requested XPathfxGroupAssignment - the assignment of the grouppos - position
FxInvalidParameterException - on errors
FxNotFoundException - on errors
FxCreateException - on errors
public void removeChild(FxData data)
throws FxInvalidParameterException,
FxNoAccessException
data - FxData to remove
FxInvalidParameterException - on errors
FxNoAccessException - on errorspublic void explode(boolean explodeChildGroups)
explodeChildGroups - recursively explode all existing child groups?public java.util.List<java.lang.String> getCreateableChildren(boolean includeExisting)
includeExisting - include entries for children that already exist but with a new (higher) multiplicity?
protected FxGroupData copy(FxGroupData parent)
copy in class FxDataparent - parent group
protected java.util.List<FxReference> getReferences(boolean includeSubGroups)
includeSubGroups - collect FxReferences from sub groups as well?
public java.util.List<FxPropertyData> getPropertyData(long propertyId,
boolean includeEmpty)
propertyId - the property id requestedincludeEmpty - include empty data instances?
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||