public class GroupPath extends Object
MutableGroup
s and the non-existent children represented by a
DefinitionGroup
Constructor and Description |
---|
GroupPath(List<MutableGroup> parents,
List<DefinitionGroup> children)
Create a group path
|
Modifier and Type | Method and Description |
---|---|
boolean |
allowAdd(QName propertyName,
boolean strict)
Determines if the adding a property value for the given property to the
last element in the path is allowed.
|
protected List<MutableGroup> |
createChildGroups()
Create groups for the children in the path (which are only represented as
definitions).
|
Stack<MutableGroup> |
getAllGroups(boolean strict)
Get all groups in the path.
Will create the child groups for which only definitions are present and update the path accordingly before returning all group objects. |
List<DefinitionGroup> |
getChildren() |
MutableGroup |
getLast(boolean strict)
Get the last group in the path.
Will create the child groups for which only definitions are present and update the path accordingly before getting the last group object. |
DefinitionGroup |
getLastDefinition()
Get the last definition group in the path
|
List<MutableGroup> |
getParents() |
boolean |
isValid()
Determines if the group path in this configuration is valid in respect to
the creation of new groups based on the contained definition groups.
|
public GroupPath(List<MutableGroup> parents, List<DefinitionGroup> children)
parents
- the list of parent groups, may neither be
null
nor emptychildren
- the list of child definition groups, may be
null
public List<MutableGroup> getParents()
public List<DefinitionGroup> getChildren()
null
protected List<MutableGroup> createChildGroups()
isValid()
public boolean isValid()
public boolean allowAdd(QName propertyName, boolean strict)
propertyName
- the property namestrict
- states if additional checks are applied apart from whether
the property existspublic DefinitionGroup getLastDefinition()
public MutableGroup getLast(boolean strict) throws IllegalStateException
strict
- if the path should be checked for validityIllegalStateException
- if the path is not validpublic Stack<MutableGroup> getAllGroups(boolean strict) throws IllegalStateException
strict
- if the path should be checked for validityIllegalStateException
- if the path is not validBuild 2013-10-07_11-27-38
Revision 99b27713a799a59a21b0b166eaaea8aaefbf125a