|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface TreeEngine
Tree Interface
| Method Summary | |
|---|---|
void |
activate(FxTreeMode mode,
long nodeId,
boolean includeChildren)
Deprecated. use com.flexive.shared.interfaces.TreeEngine#activate(com.flexive.shared.tree.FxTreeMode, long, boolean, boolean) |
void |
activate(FxTreeMode mode,
long nodeId,
boolean includeChildren,
boolean activateContents)
Activates a node - copying it from the "Edit" to the "Live" tree |
void |
clear(FxTreeMode mode)
Clears the requested tree and creates a new root node |
long |
copy(FxTreeMode mode,
long source,
long destination,
int destinationPosition)
Deprecated. |
long |
copy(FxTreeMode mode,
long source,
long destination,
int destinationPosition,
boolean deepReferenceCopy)
Copies a node to the specified parent and the specified position. |
long[] |
createNodes(FxTreeMode mode,
long parentNodeId,
int position,
java.lang.String path)
Create tree folders of the given path relative to the parent node, creating all folders stored in path if they dont exist (similar to File.mkdirs()). |
boolean |
exist(FxTreeMode mode,
long id)
Returns true if a node with the specified id exists. |
FxTreeNode |
findChild(FxTreeMode mode,
long nodeId,
FxPK pk)
Find a (direct) child with the given PK under the node nodeId. |
FxTreeNode |
findChild(FxTreeMode mode,
long nodeId,
FxReference reference)
Find a (direct) child with the given reference under the node nodeId. |
FxTreeNode |
findChild(FxTreeMode mode,
long nodeId,
long referenceId)
Find a (direct) child with the given reference ID under the node nodeId. |
FxTreeNode |
findChild(FxTreeMode mode,
long nodeId,
java.lang.String name)
Find a (direct) child with the given name under the node nodeId. |
java.lang.String[] |
getDatas(FxTreeMode mode,
long id)
Returns all the data to use for this node ordered by relevance. |
long |
getIdByFQNPath(FxTreeMode mode,
long startNode,
java.lang.String path)
Returns the node id specified by a FQN path thats starts from the given node. |
long |
getIdByLabelPath(FxTreeMode mode,
long startNode,
java.lang.String path)
Returns the node id specified by a label path thats starts from the given node. |
long |
getIdByPath(FxTreeMode mode,
java.lang.String path)
Returns the node id specified by a path. |
long[] |
getIdChain(FxTreeMode mode,
long nodeId)
Returns all ids from the given node up to the root. |
java.util.List<java.lang.String> |
getLabels(FxTreeMode mode,
FxLanguage lang,
long... ids)
Returns a list of paths made up of Caption's for the given id's. |
java.util.List<java.lang.String> |
getLabels(FxTreeMode mode,
long... ids)
Returns a list of paths made up of Caption's for the given id's. |
FxTreeNode |
getNode(FxTreeMode mode,
long id)
Returns the informations for a single node |
java.util.List<FxTreeNode> |
getNodesWithReference(FxTreeMode mode,
long reference)
Returns all nodes that match the given reference. |
java.lang.String |
getPathById(FxTreeMode mode,
long nodeId)
Returns the path for a specified id. |
java.util.List<java.lang.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 down to the given node. |
FxTreeNode |
getTree(FxTreeMode mode,
long nodeId,
int depth)
Retrieves a (sub)tree, starting from the given node. |
void |
move(FxTreeMode mode,
long nodeId,
long destinationId,
int newPosition)
Moves a node to the specified parent and the specified position. |
void |
populate(FxTreeMode mode)
Populate the tree with test data with a default 3 child nodes (folder sub-levels) |
void |
populate(FxTreeMode mode,
int maxNodeChildren)
Populate the tree with test data with a given maximum number of node children (folder sub-levels) |
void |
remove(FxTreeMode mode,
long nodeId,
boolean removeReferencedContent,
boolean removeChildren)
Deprecated. use TreeEngine#remove(com.flexive.shared.tree.FxTreeMode, long, com.flexive.shared.tree.FxTreeRemoveOp, boolean) |
void |
remove(FxTreeMode mode,
long nodeId,
FxTreeRemoveOp removeOp,
boolean removeChildren)
Remove a node and optionally its children. |
void |
remove(FxTreeNode node,
boolean removeReferencedContent,
boolean removeChildren)
Deprecated. use TreeEngine#remove(com.flexive.shared.tree.FxTreeNode, com.flexive.shared.tree.FxTreeRemoveOp, boolean) |
void |
remove(FxTreeNode node,
FxTreeRemoveOp removeOp,
boolean removeChildren)
Remove a node and optionally its children. |
long |
save(FxTreeNodeEdit node)
Create a new or save an existing node |
void |
setData(FxTreeMode mode,
long nodeId,
java.lang.String data)
Sets the data of the node. |
| Method Detail |
|---|
long save(FxTreeNodeEdit node)
throws FxApplicationException
node - the node to save
FxApplicationException - on errors
@Deprecated
void remove(FxTreeNode node,
boolean removeReferencedContent,
boolean removeChildren)
throws FxApplicationException
node - the node to removedremoveReferencedContent - remove referenced contentremoveChildren - if true all nodes that are inside the subtree of the given node are
deleted as well, if false the subtree is moved one level up (to the parent of the specified
node)
FxApplicationException - on errors
@Deprecated
void remove(FxTreeMode mode,
long nodeId,
boolean removeReferencedContent,
boolean removeChildren)
throws FxApplicationException
mode - the tree mode (edit or live)nodeId - the node to removedremoveReferencedContent - remove referenced contentremoveChildren - if true all nodes that are inside the subtree of the given node are
deleted as well, if false the subtree is moved one level up (to the parent of the specified
node)
FxApplicationException - on errors
void remove(FxTreeNode node,
FxTreeRemoveOp removeOp,
boolean removeChildren)
throws FxApplicationException
removeOp.
If the referenced content is of type FOLDER, then the folder is removed if it is not referenced
from anywhere else.
node - the node to be removedremoveOp - remove operation to applyremoveChildren - if true all nodes that are inside the subtree of the given node are
deleted as well, if false the subtree is moved one level up (to the parent of the specified
node)
FxApplicationException - on errors
void remove(FxTreeMode mode,
long nodeId,
FxTreeRemoveOp removeOp,
boolean removeChildren)
throws FxApplicationException
removeOp.
If the referenced content is of type FOLDER, then the folder is removed if it is not referenced
from anywhere else.
mode - the tree mode (edit or live)nodeId - the node to removedremoveOp - remove operation to applyremoveChildren - if true all nodes that are inside the subtree of the given node are
deleted as well, if false the subtree is moved one level up (to the parent of the specified
node)
FxApplicationException - on errors
long[] createNodes(FxTreeMode mode,
long parentNodeId,
int position,
java.lang.String path)
throws FxApplicationException
path if they dont exist (similar to File.mkdirs()).
mode - operate on live or edit tree?parentNodeId - the parent node to create the path fromposition - desired position (will be applied to all "folders" hence in most cases only min or max values
make sense)path - the path to be created, e.g. "/my/virtual/folder"
FxApplicationException - on errors
void clear(FxTreeMode mode)
throws FxApplicationException
mode - the tree to clear
FxApplicationException - on errors
void move(FxTreeMode mode,
long nodeId,
long destinationId,
int newPosition)
throws FxApplicationException
mode - tree mode to use (Live or Edit tree)nodeId - the node to movedestinationId - the new parentnewPosition - the new position in the new parents children
FxApplicationException - on errors
@Deprecated
long copy(FxTreeMode mode,
long source,
long destination,
int destinationPosition)
throws FxApplicationException
mode - tree mode to use (Live or Edit tree)source - the parent id of the structure to copydestination - the destination nodedestinationPosition - the position in the destination node's children @return the (root-)id the copy
FxApplicationException - on errors
long copy(FxTreeMode mode,
long source,
long destination,
int destinationPosition,
boolean deepReferenceCopy)
throws FxApplicationException
mode - tree mode to use (Live or Edit tree)source - the parent id of the structure to copydestination - the destination nodedestinationPosition - the position in the destination node's children @return the (root-)id the copydeepReferenceCopy - create a copy of all referenced contents or reference the original contents?
FxApplicationException - on errors
void setData(FxTreeMode mode,
long nodeId,
java.lang.String data)
mode - tree mode to use (Live or Edit tree)nodeId - the node iddata - the data, or null for no data
@Deprecated
void activate(FxTreeMode mode,
long nodeId,
boolean includeChildren)
throws FxApplicationException
mode - tree mode (currently only Edit supported)nodeId - the node to activateincludeChildren - if true all children of the node are activated as well
FxApplicationException - on errorsactivate(com.flexive.shared.tree.FxTreeMode, long, boolean, boolean)
void activate(FxTreeMode mode,
long nodeId,
boolean includeChildren,
boolean activateContents)
throws FxApplicationException
mode - tree mode (currently only Edit supported)nodeId - the node to activateincludeChildren - if true all children of the node are activated as wellactivateContents - change the step of contents that have no live step to live in the max version?
FxApplicationException - on errors
boolean exist(FxTreeMode mode,
long id)
throws FxApplicationException
mode - tree mode to use (Live or Edit tree)id - the id to check for
FxApplicationException - on errors
FxTreeNode getNode(FxTreeMode mode,
long id)
throws FxApplicationException
mode - tree mode to use (Live or Edit tree)id - the id of the node to get
FxApplicationException - on errors
FxTreeNode getTree(FxTreeMode mode,
long nodeId,
int depth)
throws FxApplicationException
getNode()
mode - tree mode to use (Live or Edit tree)nodeId - the nod to start fromdepth - the maximum depth to read
FxApplicationException - on errors
java.lang.String[] getDatas(FxTreeMode mode,
long id)
mode - tree mode to use (Live or Edit tree)id - the id to get the datas for
FxTreeNode findChild(FxTreeMode mode,
long nodeId,
java.lang.String name)
throws FxApplicationException
nodeId.
mode - tree mode to use (Live or Edit tree)nodeId - the parent node IDname - name of the requested node @return the tree node
FxApplicationException - on errors
FxTreeNode findChild(FxTreeMode mode,
long nodeId,
long referenceId)
throws FxApplicationException
nodeId.
mode - tree mode to use (Live or Edit tree)nodeId - the parent node IDreferenceId - the reference ID
FxApplicationException - on errors
FxTreeNode findChild(FxTreeMode mode,
long nodeId,
FxPK pk)
throws FxApplicationException
nodeId.
mode - tree mode to use (Live or Edit tree)nodeId - the parent node IDpk - the reference
FxApplicationException - on errors
FxTreeNode findChild(FxTreeMode mode,
long nodeId,
FxReference reference)
throws FxApplicationException
nodeId.
mode - tree mode to use (Live or Edit tree)nodeId - the parent node IDreference - the reference
FxApplicationException - on errors
java.util.List<FxTreeNode> getNodesWithReference(FxTreeMode mode,
long reference)
throws FxApplicationException
mode - tree mode to use (Live or Edit tree)reference - the reference
FxApplicationException - on errors
long getIdByPath(FxTreeMode mode,
java.lang.String path)
throws FxApplicationException
mode - tree mode to use (Live or Edit tree)path - the path - eg '/nodeA/nodeB', the virtual root '/Root' node must not be included,
and the path has to start with a '/'.
FxApplicationException - on errors
long getIdByFQNPath(FxTreeMode mode,
long startNode,
java.lang.String path)
throws FxApplicationException
mode - tree mode to use (Live or Edit tree)startNode - the root node.path - the path - eg '/nodeA/nodeB', the virtual root '/Root' node must not be included,
and the path has to start with a '/'.
FxApplicationException - on errors
long getIdByLabelPath(FxTreeMode mode,
long startNode,
java.lang.String path)
throws FxApplicationException
mode - tree mode to use (Live or Edit tree)startNode - the root node.path - the path - eg '/nodeA/nodeB', the virtual root '/Root' node must not be included,
and the path has to start with a '/'.
FxApplicationException - on errors
java.lang.String getPathById(FxTreeMode mode,
long nodeId)
throws FxApplicationException
mode - tree mode to use (Live or Edit tree)nodeId - the node id to get the path for
FxApplicationException - on errors
long[] getIdChain(FxTreeMode mode,
long nodeId)
throws FxApplicationException
mode - tree mode to use (Live or Edit tree)nodeId - the id to start with
FxApplicationException - on errors
long[] getReverseIdChain(FxTreeMode mode,
long id)
throws FxApplicationException
mode - tree mode to use (Live or Edit tree)id - the id to start with
FxApplicationException - on errors
java.util.List<java.lang.String> getPaths(FxTreeMode mode,
long... ids)
throws FxApplicationException
mode - tree mode to use (Live or Edit tree)ids - the id's of the nodes to get the path to the root node for
FxApplicationException - on errors
java.util.List<java.lang.String> getLabels(FxTreeMode mode,
long... ids)
throws FxApplicationException
mode - tree mode to use (Live or Edit tree)ids - the id's of the nodes to get the path to the root node for
FxApplicationException - on errors
java.util.List<java.lang.String> getLabels(FxTreeMode mode,
FxLanguage lang,
long... ids)
throws FxApplicationException
mode - tree mode to use (Live or Edit tree)lang - desired result languageids - the id's of the nodes to get the path to the root node for
FxApplicationException - on errors
void populate(FxTreeMode mode)
throws FxApplicationException
mode - tree mode
FxApplicationException - on errors
void populate(FxTreeMode mode,
int maxNodeChildren)
throws FxApplicationException
mode - tree modemaxNodeChildren - the number of nodes to be created as children of the root node (0 will not create any data, no value will create 3).
FxApplicationException - on errors
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||