Java Doc for TreeEngine.java in  » J2EE » fleXive » com » flexive » shared » interfaces » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » J2EE » fleXive » com.flexive.shared.interfaces 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


com.flexive.shared.interfaces.TreeEngine

All known Subclasses:   com.flexive.ejb.beans.TreeEngineBean,
TreeEngine
public interface TreeEngine (Code)
Tree Interface
author:
   Gregor Schober (gregor.schober@flexive.com), UCS - unique computing solutions gmbh (http://www.ucs.at)




Method Summary
 voidactivate(FxTreeMode mode, long nodeId, boolean includeChildren)
    
 voidclear(FxTreeMode mode)
    
 longcopy(FxTreeMode mode, long source, long destination, int destinationPosition)
     Copies a node to the specified parent and the specified position.
 long[]createNodes(FxTreeMode mode, long parentNodeId, int position, String path)
     Create a tree folders of the given path relative to the parent node, creating all folders stored in path if they dont exist (similar to java.io.File.mkdirs ).
Parameters:
  mode - operate on live or edit tree?
Parameters:
  parentNodeId - the parent node to create the path from
Parameters:
  position - desired position (will be applied to all "folders" hence in most cases only min or max valuesmake sense)
Parameters:
  path - the path to be created, e.g.
 booleanexist(FxTreeMode mode, long id)
     Returns true if a node with the specified id exists.
 FxTreeNodefindChild(FxTreeMode mode, long nodeId, String name)
     Find a (direct) child with the given name under the node nodeId.
Parameters:
  mode - tree mode to use (Live or Edit tree)
Parameters:
  nodeId - the parent node ID
Parameters:
  name - name of the requested node @return the tree node the selected node.
 FxTreeNodefindChild(FxTreeMode mode, long nodeId, long referenceId)
     Find a (direct) child with the given reference ID under the node nodeId.
Parameters:
  mode - tree mode to use (Live or Edit tree)
Parameters:
  nodeId - the parent node ID
Parameters:
  referenceId - the reference ID the selected node.
 FxTreeNodefindChild(FxTreeMode mode, long nodeId, FxPK pk)
     Find a (direct) child with the given PK under the node nodeId.
Parameters:
  mode - tree mode to use (Live or Edit tree)
Parameters:
  nodeId - the parent node ID
Parameters:
  pk - the reference the selected node.
 FxTreeNodefindChild(FxTreeMode mode, long nodeId, FxReference reference)
     Find a (direct) child with the given reference under the node nodeId.
Parameters:
  mode - tree mode to use (Live or Edit tree)
Parameters:
  nodeId - the parent node ID
Parameters:
  reference - the reference the selected node.
 longgetIdByFQNPath(FxTreeMode mode, long startNode, String path)
     Returns the node id specified by a FQN path thats starts from the given node.
Parameters:
  mode - tree mode to use (Live or Edit tree)
Parameters:
  startNode - the root node.
Parameters:
  path - the path - eg '/nodeA/nodeB', the virtual root '/Root' node must not be included,and the path has to start with a '/'.
 longgetIdByLabelPath(FxTreeMode mode, long startNode, String path)
     Returns the node id specified by a label path thats starts from the given node.
Parameters:
  mode - tree mode to use (Live or Edit tree)
Parameters:
  startNode - the root node.
Parameters:
  path - the path - eg '/nodeA/nodeB', the virtual root '/Root' node must not be included,and the path has to start with a '/'.
 longgetIdByPath(FxTreeMode mode, String path)
     Returns the node id specified by a path.
Parameters:
  mode - tree mode to use (Live or Edit tree)
Parameters:
  path - the path - eg '/nodeA/nodeB', the virtual root '/Root' node must not be included,and the path has to start with a '/'.
 long[]getIdChain(FxTreeMode mode, long nodeId)
     Returns all ids from the given node up to the root.
 List<String>getLabels(FxTreeMode mode, long... ids)
     Returns a list of paths made up of Caption's for the given id's. If there is no caption propery found in the instance, the FQN will be used. The root node will be excluded.
 List<String>getLabels(FxTreeMode mode, FxLanguage lang, long... ids)
     Returns a list of paths made up of Caption's for the given id's.
 FxTreeNodegetNode(FxTreeMode mode, long id)
    
 List<FxTreeNode>getNodesWithReference(FxTreeMode mode, long reference)
     Returns all nodes that match the given reference.
 StringgetPathById(FxTreeMode mode, long nodeId)
     Returns the path for a specified id.
 List<String>getPaths(FxTreeMode mode, long... ids)
     Returns a list of paths made up of FQN's for the given id's The root node will be excluded.
 long[]getReverseIdChain(FxTreeMode mode, long id)
     Returns all ids from the root up to the given node.
 String[]getTemplates(FxTreeMode mode, long id)
     Returns all the templates to use for this node ordered by relevance.
 FxTreeNodegetTree(FxTreeMode mode, long nodeId, int depth)
     Retrieves a (sub)tree, starting from the given node.
 voidmove(FxTreeMode mode, long nodeId, long destinationId, int newPosition)
     Moves a node to the specified parent and the specified position.
 voidpopulate(FxTreeMode mode)
    
 voidremove(FxTreeNode node, boolean removeReferencedContent, boolean removeChildren)
     Remove a node and optionally its children.
 longsave(FxTreeNodeEdit node)
    
 voidsetTemplate(FxTreeMode mode, long nodeId, String template)
     Sets the template of the node.



Method Detail
activate
void activate(FxTreeMode mode, long nodeId, boolean includeChildren) throws FxApplicationException(Code)
Activates a node - copying it from the "Edit" to the "Live" tree
Parameters:
  mode - tree mode (currently onld Edit supported)
Parameters:
  nodeId - the node to activate
Parameters:
  includeChildren - if true all children of the node are activated as well
throws:
  FxApplicationException - on errors



clear
void clear(FxTreeMode mode) throws FxApplicationException(Code)
Clears the requested tree and creates a new root node
Parameters:
  mode - the tree to clear
throws:
  FxApplicationException - on errors



copy
long copy(FxTreeMode mode, long source, long destination, int destinationPosition) throws FxApplicationException(Code)
Copies a node to the specified parent and the specified position.
Parameters:
  mode - tree mode to use (Live or Edit tree)
Parameters:
  source - the parent id of the structure to copy
Parameters:
  destination - the destination node
Parameters:
  destinationPosition - the position in the destination node's children @return the (root-)id the copy the id of the new node (the "copy")
throws:
  FxApplicationException - on errors



createNodes
long[] createNodes(FxTreeMode mode, long parentNodeId, int position, String path) throws FxApplicationException(Code)
Create a tree folders of the given path relative to the parent node, creating all folders stored in path if they dont exist (similar to java.io.File.mkdirs ).
Parameters:
  mode - operate on live or edit tree?
Parameters:
  parentNodeId - the parent node to create the path from
Parameters:
  position - desired position (will be applied to all "folders" hence in most cases only min or max valuesmake sense)
Parameters:
  path - the path to be created, e.g. "/my/virtual/folder" the node id's of the created path
throws:
  FxApplicationException - on errors



exist
boolean exist(FxTreeMode mode, long id) throws FxApplicationException(Code)
Returns true if a node with the specified id exists.
Parameters:
  mode - tree mode to use (Live or Edit tree)
Parameters:
  id - the id to check for true if the node exists
throws:
  FxApplicationException - on errors



findChild
FxTreeNode findChild(FxTreeMode mode, long nodeId, String name) throws FxApplicationException(Code)
Find a (direct) child with the given name under the node nodeId.
Parameters:
  mode - tree mode to use (Live or Edit tree)
Parameters:
  nodeId - the parent node ID
Parameters:
  name - name of the requested node @return the tree node the selected node. If no node was found, a runtime exception is thrown.
throws:
  FxApplicationException - on errors



findChild
FxTreeNode findChild(FxTreeMode mode, long nodeId, long referenceId) throws FxApplicationException(Code)
Find a (direct) child with the given reference ID under the node nodeId.
Parameters:
  mode - tree mode to use (Live or Edit tree)
Parameters:
  nodeId - the parent node ID
Parameters:
  referenceId - the reference ID the selected node. If no node was found, a runtime exception is thrown.
throws:
  FxApplicationException - on errors



findChild
FxTreeNode findChild(FxTreeMode mode, long nodeId, FxPK pk) throws FxApplicationException(Code)
Find a (direct) child with the given PK under the node nodeId.
Parameters:
  mode - tree mode to use (Live or Edit tree)
Parameters:
  nodeId - the parent node ID
Parameters:
  pk - the reference the selected node. If no node was found, a runtime exception is thrown.
throws:
  FxApplicationException - on errors



findChild
FxTreeNode findChild(FxTreeMode mode, long nodeId, FxReference reference) throws FxApplicationException(Code)
Find a (direct) child with the given reference under the node nodeId.
Parameters:
  mode - tree mode to use (Live or Edit tree)
Parameters:
  nodeId - the parent node ID
Parameters:
  reference - the reference the selected node. If no node was found, a runtime exception is thrown.
throws:
  FxApplicationException - on errors



getIdByFQNPath
long getIdByFQNPath(FxTreeMode mode, long startNode, String path) throws FxApplicationException(Code)
Returns the node id specified by a FQN path thats starts from the given node.
Parameters:
  mode - tree mode to use (Live or Edit tree)
Parameters:
  startNode - the root node.
Parameters:
  path - the path - eg '/nodeA/nodeB', the virtual root '/Root' node must not be included,and the path has to start with a '/'. the node id, or -1 if the path does not exist
throws:
  FxApplicationException - on errors



getIdByLabelPath
long getIdByLabelPath(FxTreeMode mode, long startNode, String path) throws FxApplicationException(Code)
Returns the node id specified by a label path thats starts from the given node.
Parameters:
  mode - tree mode to use (Live or Edit tree)
Parameters:
  startNode - the root node.
Parameters:
  path - the path - eg '/nodeA/nodeB', the virtual root '/Root' node must not be included,and the path has to start with a '/'. the node id, or -1 if the path does not exist
throws:
  FxApplicationException - on errors



getIdByPath
long getIdByPath(FxTreeMode mode, String path) throws FxApplicationException(Code)
Returns the node id specified by a path.
Parameters:
  mode - tree mode to use (Live or Edit tree)
Parameters:
  path - the path - eg '/nodeA/nodeB', the virtual root '/Root' node must not be included,and the path has to start with a '/'. the node id, or -1 if the path does not exist
throws:
  FxApplicationException - on errors



getIdChain
long[] getIdChain(FxTreeMode mode, long nodeId) throws FxApplicationException(Code)
Returns all ids from the given node up to the root.
Parameters:
  mode - tree mode to use (Live or Edit tree)
Parameters:
  nodeId - the id to start with the id chain, or null if the node does not exist
throws:
  FxApplicationException - on errors



getLabels
List<String> getLabels(FxTreeMode mode, long... ids) throws FxApplicationException(Code)
Returns a list of paths made up of Caption's for the given id's. If there is no caption propery found in the instance, the FQN will be used. The root node will be excluded. The language is the calling users preferred language.

Example: input ids = [12,4]
Result: ["/DescriptionForNode1/DescriptionForNode12","/DescriptionForNode1/DescriptionForNode4"]
Parameters:
  mode - tree mode to use (Live or Edit tree)
Parameters:
  ids - the id's of the nodes to get the path to the root node for a list with all paths made up of Caption's
throws:
  FxApplicationException - on errors




getLabels
List<String> getLabels(FxTreeMode mode, FxLanguage lang, long... ids) throws FxApplicationException(Code)
Returns a list of paths made up of Caption's for the given id's. If there is no caption propery found in the instance, the FQN will be used. The root node will be excluded.

Example: input ids = [12,4]
Result: ["/DescriptionForNode1/DescriptionForNode12","/DescriptionForNode1/DescriptionForNode4"]
Parameters:
  mode - tree mode to use (Live or Edit tree)
Parameters:
  lang - desired result language
Parameters:
  ids - the id's of the nodes to get the path to the root node for a list with all paths made up of Caption's
throws:
  FxApplicationException - on errors




getNode
FxTreeNode getNode(FxTreeMode mode, long id) throws FxApplicationException(Code)
Returns the informations for a single node
Parameters:
  mode - tree mode to use (Live or Edit tree)
Parameters:
  id - the id of the node to get the node information, or null if the node does not exist
throws:
  FxApplicationException - on errors



getNodesWithReference
List<FxTreeNode> getNodesWithReference(FxTreeMode mode, long reference) throws FxApplicationException(Code)
Returns all nodes that match the given reference.
Parameters:
  mode - tree mode to use (Live or Edit tree)
Parameters:
  reference - the reference the matching nodes
throws:
  FxApplicationException - on errors



getPathById
String getPathById(FxTreeMode mode, long nodeId) throws FxApplicationException(Code)
Returns the path for a specified id.
Parameters:
  mode - tree mode to use (Live or Edit tree)
Parameters:
  nodeId - the node id to get the path for the node id, or -1 if the path does not exist
throws:
  FxApplicationException - on errors



getPaths
List<String> getPaths(FxTreeMode mode, long... ids) throws FxApplicationException(Code)
Returns a list of paths made up of FQN's for the given id's The root node will be excluded.

Example: input id's = [12,4]
Result: ["/Node1/Node12","/Node1/Node4"]
Parameters:
  mode - tree mode to use (Live or Edit tree)
Parameters:
  ids - the id's of the nodes to get the path to the root node for a list with all paths made up of FQN's
throws:
  FxApplicationException - on errors




getReverseIdChain
long[] getReverseIdChain(FxTreeMode mode, long id)(Code)
Returns all ids from the root up to the given node.
Parameters:
  mode - tree mode to use (Live or Edit tree)
Parameters:
  id - the id to start with the id chain, or null if the node does not exist



getTemplates
String[] getTemplates(FxTreeMode mode, long id)(Code)
Returns all the templates to use for this node ordered by relevance.
Parameters:
  mode - tree mode to use (Live or Edit tree)
Parameters:
  id - the id to get the templates for the templates, or null if the node does not exist



getTree
FxTreeNode getTree(FxTreeMode mode, long nodeId, int depth) throws FxApplicationException(Code)
Retrieves a (sub)tree, starting from the given node. Loading a tree with all data takes a lot of time hence the position of the nodes is not initialized and the labels are only loaded in the language set as default for the calling user. Incase the position or (detailed) label is needed the node can be reloaded using getNode()
Parameters:
  mode - tree mode to use (Live or Edit tree)
Parameters:
  nodeId - the nod to start from
Parameters:
  depth - the maximum depth to read the (sub)tree
throws:
  FxApplicationException - on errors



move
void move(FxTreeMode mode, long nodeId, long destinationId, int newPosition) throws FxApplicationException(Code)
Moves a node to the specified parent and the specified position.
Parameters:
  mode - tree mode to use (Live or Edit tree)
Parameters:
  nodeId - the node to move
Parameters:
  destinationId - the new parent
Parameters:
  newPosition - the new position in the new parents children
throws:
  FxApplicationException - on errors



populate
void populate(FxTreeMode mode) throws FxApplicationException(Code)
Populate the tree with test data
Parameters:
  mode - tree mode
throws:
  FxApplicationException - on errors



remove
void remove(FxTreeNode node, boolean removeReferencedContent, boolean removeChildren) throws FxApplicationException(Code)
Remove a node and optionally its children. Referenced content content will only be removed if removedReferencedContent is set to true and the referenced content is not referenced elsewhere. The only exception is if the referenced content is of type FOLDER, then the folder is removed if it is not referenced from anywhere else.
Parameters:
  node - the node to removed
Parameters:
  removeReferencedContent - remove referenced content
Parameters:
  removeChildren - remove children as well?
throws:
  FxApplicationException - on errors



save
long save(FxTreeNodeEdit node) throws FxApplicationException(Code)
Create a new or save an existing node
Parameters:
  node - the node to save id of the saved node
throws:
  FxApplicationException - on errors



setTemplate
void setTemplate(FxTreeMode mode, long nodeId, String template)(Code)
Sets the template of the node.
Parameters:
  mode - tree mode to use (Live or Edit tree)
Parameters:
  nodeId - the node id
Parameters:
  template - the tamplate, or null for no template



www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.