Class MCCAmetysObjectTree
- java.lang.Object
-
- org.ametys.plugins.odfpilotage.report.impl.mcc.MCCAmetysObjectTree
-
public class MCCAmetysObjectTree extends Object
Structure representing a tree ofAmetysObject
to be used during the processing of the MCC reports.
-
-
Field Summary
Fields Modifier and Type Field Description private ContentComparatorResult
_change
private List<MCCAmetysObjectTree>
_children
private AmetysObject
_current
private MCCAmetysObjectTree
_parent
private String
_path
-
Constructor Summary
Constructors Modifier Constructor Description private
MCCAmetysObjectTree(MCCAmetysObjectTree parent, AmetysObject current)
private
MCCAmetysObjectTree(MCCAmetysObjectTree parent, AmetysObject current, ContentComparatorResult change)
MCCAmetysObjectTree(AmetysObject current)
The constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
_addChild(MCCAmetysObjectTree childTree)
Add a new child treeprivate MCCAmetysObjectTree
_createChild(AmetysObject child, ContentComparatorResult change)
Create a child for this node, without adding it to the tree (usefull for tests before adding, addChild to add)MCCAmetysObjectTree
addChild(AmetysObject child)
Declare a child for the current object.MCCAmetysObjectTree
addChild(AmetysObject child, ContentComparatorResult change)
Declare a child for the current object.ContentComparatorResult
getChange()
Get the change informations for this nodeList<MCCAmetysObjectTree>
getChildren()
Get the current ametys object (root level of the tree).AmetysObject
getCurrent()
Get the current ametys object (root level of the tree).MCCAmetysObjectTree
getParent()
Get the parent ametys objectString
getPath()
Get the path in the tree.
-
-
-
Field Detail
-
_parent
private MCCAmetysObjectTree _parent
-
_current
private AmetysObject _current
-
_children
private List<MCCAmetysObjectTree> _children
-
_change
private ContentComparatorResult _change
-
-
Constructor Detail
-
MCCAmetysObjectTree
private MCCAmetysObjectTree(MCCAmetysObjectTree parent, AmetysObject current, ContentComparatorResult change)
-
MCCAmetysObjectTree
private MCCAmetysObjectTree(MCCAmetysObjectTree parent, AmetysObject current)
-
MCCAmetysObjectTree
public MCCAmetysObjectTree(AmetysObject current)
The constructor- Parameters:
current
- TheAmetysObject
the tree is build on
-
-
Method Detail
-
addChild
public MCCAmetysObjectTree addChild(AmetysObject child)
Declare a child for the current object.- Parameters:
child
- child for this node- Returns:
- The corresponding
MCCAmetysObjectTree
for the child
-
addChild
public MCCAmetysObjectTree addChild(AmetysObject child, ContentComparatorResult change)
Declare a child for the current object.- Parameters:
child
- child for this nodechange
- changes for this child (if applicable)- Returns:
- The corresponding
MCCAmetysObjectTree
for the child
-
_addChild
protected void _addChild(MCCAmetysObjectTree childTree)
Add a new child tree- Parameters:
childTree
- The child tree to add
-
_createChild
private MCCAmetysObjectTree _createChild(AmetysObject child, ContentComparatorResult change)
Create a child for this node, without adding it to the tree (usefull for tests before adding, addChild to add)- Parameters:
child
- The childAmetysObject
change
- Changes for this child (if applicable)- Returns:
- A child tree
-
getParent
public MCCAmetysObjectTree getParent()
Get the parent ametys object- Returns:
MCCAmetysObjectTree
or null
-
getCurrent
public AmetysObject getCurrent()
Get the current ametys object (root level of the tree).- Returns:
AmetysObject
-
getChildren
public List<MCCAmetysObjectTree> getChildren()
Get the current ametys object (root level of the tree).- Returns:
List
ofMCCAmetysObjectTree
-
getChange
public ContentComparatorResult getChange()
Get the change informations for this node- Returns:
ContentComparatorResult
or null if not applicable
-
-