Package org.openbravo.erpCommon.modules
Class ModuleTree
- java.lang.Object
-
- org.openbravo.erpCommon.utility.GenericTree
-
- org.openbravo.erpCommon.modules.ModuleTree
-
- Direct Known Subclasses:
ModuleReferenceDataClientTree
,ModuleReferenceDataOrgTree
public class ModuleTree extends GenericTree
Manages the tree of installed modules. It implements GenericTree, detailed description is in that API doc.
-
-
Field Summary
-
Fields inherited from class org.openbravo.erpCommon.utility.GenericTree
conn, data, lang, xmlEngine
-
-
Constructor Summary
Constructors Constructor Description ModuleTree()
Default constructor, needed by GenericTreeServletModuleTree(HttpBaseServlet base)
Constructor to generate a root treeModuleTree(HttpBaseServlet base, boolean bSmall)
Constructor to generate a root tree
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getHTMLDescription(String node)
Returns a HTML with the description for the given nodeprotected String
getNodePosition(String nodeID)
Returns the position relative to the rest of nodes at the same levelprotected String
getParent(String node)
Returns the node id for the parent of the passed nodeprotected boolean
isLastLevelNode(String nodeID)
Returns true in case the node is the last one at its levelprotected void
setIcons()
Selects the correct icons for the current set of nodes depending on the module type (Module, Pack or Template), it also sets the secondary icon in case the node have available updates.void
setRootTree()
sets to data the root treevoid
setSubTree(String nodeId, String level)
Generates a subtree with nodeId as root node-
Methods inherited from class org.openbravo.erpCommon.utility.GenericTree
descriptionToHtml, getData, setIsSubTree, setLanguage, setLevel, setNotifications, setParameters, showNotifications, toHtml
-
-
-
-
Constructor Detail
-
ModuleTree
public ModuleTree(HttpBaseServlet base)
Constructor to generate a root tree- Parameters:
base
-
-
ModuleTree
public ModuleTree(HttpBaseServlet base, boolean bSmall)
Constructor to generate a root tree- Parameters:
base
-bSmall
- Normal size or small size (true)
-
ModuleTree
public ModuleTree()
Default constructor, needed by GenericTreeServlet
-
-
Method Detail
-
setRootTree
public void setRootTree()
sets to data the root tree- Specified by:
setRootTree
in classGenericTree
-
setSubTree
public void setSubTree(String nodeId, String level)
Generates a subtree with nodeId as root node- Specified by:
setSubTree
in classGenericTree
- Parameters:
nodeId
-
-
getHTMLDescription
public String getHTMLDescription(String node)
Returns a HTML with the description for the given node- Specified by:
getHTMLDescription
in classGenericTree
- Parameters:
node
-- Returns:
- a HTML String with the description for the given node
-
setIcons
protected void setIcons()
Selects the correct icons for the current set of nodes depending on the module type (Module, Pack or Template), it also sets the secondary icon in case the node have available updates.
-
getNodePosition
protected String getNodePosition(String nodeID)
Description copied from class:GenericTree
Returns the position relative to the rest of nodes at the same level- Specified by:
getNodePosition
in classGenericTree
- Returns:
- the position relative to the rest of nodes at the same level
-
getParent
protected String getParent(String node)
Returns the node id for the parent of the passed node- Specified by:
getParent
in classGenericTree
- Parameters:
node
-- Returns:
- the node id for the parent of the passed node
-
isLastLevelNode
protected boolean isLastLevelNode(String nodeID)
Description copied from class:GenericTree
Returns true in case the node is the last one at its level- Specified by:
isLastLevelNode
in classGenericTree
- Returns:
- true in case the node is the last one at its level
-
-