Class TreeView

java.lang.Object
org.openxava.web.editors.TreeView

public class TreeView extends Object
Author:
Federico Alcántara
  • 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

      public String getNodeName(Object object)
      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

      public String getNodePath(Object object) throws Exception
      Returns the parent path of the node.
      Parameters:
      object - Object to be inspected.
      Returns:
      The path excluding the node name.
      Throws:
      Exception
    • setNodePath

      public void setNodePath(Object object, String value) throws Exception
      Sets the node path.
      Parameters:
      object - Object to be updated.
      value - New path to be used.
      Throws:
      Exception
    • getNodeFullPath

      public String getNodeFullPath(Object object) throws Exception
      Returns the complete path of the node including the node name.
      Parameters:
      object - Object to be inspected.
      Returns:
      Complete path.
      Throws:
      Exception
    • getNodeOrder

      public int getNodeOrder(Object object)
      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

      public void setNodeOrder(Object object, int value)
      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

      public String getPathProperty()
      Returns:
      the pathProperty
    • setPathProperty

      protected void setPathProperty(String pathProperty)
      Parameters:
      pathProperty - the pathProperty to set
    • setIdProperties

      protected void setIdProperties(String idProperties)
      Parameters:
      idProperties - the idProperties to set
    • getIdProperties

      public String getIdProperties()
      Returns:
      the idProperties
    • getOrderProperty

      public String getOrderProperty()
      Returns:
      the orderProperty
    • setOrderProperty

      protected void setOrderProperty(String orderProperty)
      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

      protected void setPathSeparator(String pathSeparator)
      Parameters:
      pathSeparator - the pathSeparator to set
    • getPathSeparator

      public String 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

      protected void setIdSeparator(String idSeparator)
      Parameters:
      idSeparator - the idSeparator to set
    • getIdSeparator

      public String getIdSeparator()
      Returns:
      the idSeparator
    • getTreeViewReaderImpl

      public ITreeViewReader getTreeViewReaderImpl()
      Creates the implementation of TreeView reader
      Returns:
      Object implementing the ITreeViewReader
      Throws:
      Exception