Package org.openxava.web.editors
Class TreeView
java.lang.Object
org.openxava.web.editors.TreeView
- Author:
- Federico Alcántara
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintgetNodeFullPath(Object object) Returns the complete path of the node including the node name.getNodeName(Object object) Returns the node name as it is used in the pathintgetNodeOrder(Object object) If the property orderProperty of @TreeView annotation is defined, returns the order of the object within its parent; otherwise returns 0.getNodePath(Object object) Returns the parent path of the node.Creates the implementation of TreeView readerbooleanbooleanprotected voidparseTreeView(Tree path, Class nodeClass, Class parentClass, String collectionName) Parse the @TreeView annotation.protected voidsetEntityObject(boolean entityObject) protected voidsetIdProperties(String idProperties) protected voidsetIdSeparator(String idSeparator) protected voidsetKeyIncrement(int keyIncrement) voidsetNodeOrder(Object object, int value) Changes the order of the node within its parent.voidsetNodePath(Object object, String value) Sets the node path.protected voidsetOrderProperty(String orderProperty) protected voidsetPathProperty(String pathProperty) protected voidsetPathSeparator(String pathSeparator)
-
Constructor Details
-
Method Details
-
parseTreeView
protected void parseTreeView(Tree path, Class nodeClass, Class parentClass, String collectionName) throws Exception Parse the @TreeView annotation.- Parameters:
nodeClass- Object to be parsed.- Throws:
Exception
-
getNodeName
Returns the node name as it is used in the path- Parameters:
object- Object to be inspected.- Returns:
- The node name. It can be compound with multiple values (when you have multiple id, for example).
-
getNodePath
Returns the parent path of the node.- Parameters:
object- Object to be inspected.- Returns:
- The path excluding the node name.
- Throws:
Exception
-
setNodePath
Sets the node path.- Parameters:
object- Object to be updated.value- New path to be used.- Throws:
Exception
-
getNodeFullPath
Returns the complete path of the node including the node name.- Parameters:
object- Object to be inspected.- Returns:
- Complete path.
- Throws:
Exception
-
getNodeOrder
If the property orderProperty of @TreeView annotation is defined, returns the order of the object within its parent; otherwise returns 0.- Parameters:
object- Object to be inspected.- Returns:
- Current order or zero.
-
setNodeOrder
Changes the order of the node within its parent. Ignored if orderProperty is not defined.- Parameters:
object- Object to be updated.value- New order to be applied.
-
getPathProperty
- Returns:
- the pathProperty
-
setPathProperty
- Parameters:
pathProperty- the pathProperty to set
-
setIdProperties
- Parameters:
idProperties- the idProperties to set
-
getIdProperties
- Returns:
- the idProperties
-
getOrderProperty
- Returns:
- the orderProperty
-
setOrderProperty
- Parameters:
orderProperty- the orderProperty to set
-
getKeyIncrement
public int getKeyIncrement()- Returns:
- the keyIncrement
-
setKeyIncrement
protected void setKeyIncrement(int keyIncrement) - Parameters:
keyIncrement- the keyIncrement to set
-
setPathSeparator
- Parameters:
pathSeparator- the pathSeparator to set
-
getPathSeparator
- Returns:
- the pathSeparator
-
setEntityObject
protected void setEntityObject(boolean entityObject) - Parameters:
entityObject- the entityObject to set
-
isEntityObject
public boolean isEntityObject()- Returns:
- the entityObject
-
isOrderDefined
public boolean isOrderDefined() -
setIdSeparator
- Parameters:
idSeparator- the idSeparator to set
-
getIdSeparator
- Returns:
- the idSeparator
-
getTreeViewReaderImpl
Creates the implementation of TreeView reader- Returns:
- Object implementing the ITreeViewReader
- Throws:
Exception
-