com.stratelia.webactiv.util.node.control
Interface NodeBm

All Known Implementing Classes:
NodeBmEJB

public interface NodeBm

This is the Node BM interface.

Author:
Nicolas Eysseric

Method Summary
 void createIndex(NodeDetail nodeDetail)
          Method declaration
 NodePK createNode(NodeDetail nodeDetail)
          Create a new Node object
 NodePK createNode(NodeDetail nodeDetail, NodeDetail fatherDetail)
          Create a new Node object
 void deleteIndex(NodePK pk)
          Method declaration
 Collection<NodeDetail> getAllNodes(NodePK nodePK)
          Method declaration
 Collection<NodeDetail> getAnotherPath(NodePK nodePK)
          Get the path from root to a node
 Collection<NodeDetail> getChildrenDetails(NodePK pk)
          Get the header of each child of the node.
 int getChildrenNumber(NodePK pk)
          Get the children number of this node
 Collection<NodePK> getChildrenPKs(NodePK nodePK)
          Get children node PKs of a node
 List<NodeDetail> getDescendantDetails(NodeDetail node)
          Get descendant nodeDetails of a node
 List<NodeDetail> getDescendantDetails(NodePK nodePK)
          Get descendant nodeDetails of a node
 Collection<NodePK> getDescendantPKs(NodePK nodePK)
          Get descendant node PKs of a node
 NodeDetail getDetail(NodePK pk)
          Get the attributes of a node and of its children
 NodeDetail getDetailByNameAndFatherId(NodePK pk, String name, int nodeFatherId)
           
 NodeDetail getDetailTransactionally(NodePK pk)
           
 Collection<NodeDetail> getFrequentlyAskedChildrenDetails(NodePK pk)
          Get the header of each child of the node this function is to be used with frequently used nodes because for each child, an ejb will be instanciated (nodes next to the root will be frequently used) For less used nodes, choose the getChildrenDetails() method
 NodeDetail getFrequentlyAskedDetail(NodePK pk)
          Method declaration
 NodeDetail getHeader(NodePK pk)
          Get the attributes of THIS node
 NodeDetail getHeader(NodePK pk, boolean getTranslations)
           
 List<NodeDetail> getHeadersByLevel(NodePK pk, int level)
          Method declaration
 Collection<NodeDetail> getPath(NodePK pk)
          Get the path of this node from this node to root
 ArrayList<NodeDetail> getSubTree(NodePK pk)
           
 ArrayList<NodeDetail> getSubTree(NodePK pk, String sorting)
           
 ArrayList<NodeDetail> getSubTree(NodePK pk, String status, int level, String sorting)
           
 ArrayList<NodeDetail> getSubTreeByLevel(NodePK pk, int level)
           
 ArrayList<NodeDetail> getSubTreeByLevel(NodePK pk, int level, String sorting)
           
 ArrayList<NodeDetail> getSubTreeByStatus(NodePK pk, String status)
           
 ArrayList<NodeDetail> getSubTreeByStatus(NodePK pk, String status, String sorting)
           
 ArrayList<NodeDetail> getTree(NodePK pk)
           
 NodeDetail getTwoLevelDetails(NodePK pk)
          Method declaration
 boolean isSameNameSameLevelOnCreation(NodeDetail nd)
          On node creation, check if another node have got the same name with same father
 boolean isSameNameSameLevelOnUpdate(NodeDetail nd)
          On node update, check if another node have got the same name with same father
 void moveNode(NodePK nodePK, NodePK toNode)
           
 void processWysiwyg(NodePK nodePK)
          A wysiwyg's content has been added or modified to a node.
 void removeNode(NodePK pk)
          Remove a node and its descendants
 void setDetail(NodeDetail nodeDetail)
          Update the attributes of the node
 void sortNodes(List<NodePK> nodePKs)
           
 void updateRightsDependency(NodeDetail nodeDetail)
           
 

Method Detail

getHeader

NodeDetail getHeader(NodePK pk)
Get the attributes of THIS node

Parameters:
pk - the node primary key.
Returns:
a NodeDetail

getHeader

NodeDetail getHeader(NodePK pk,
                     boolean getTranslations)

getDetail

NodeDetail getDetail(NodePK pk)
Get the attributes of a node and of its children

Parameters:
pk - the node primary key.
Returns:
a NodeDetail

getDetailTransactionally

NodeDetail getDetailTransactionally(NodePK pk)

getDetailByNameAndFatherId

NodeDetail getDetailByNameAndFatherId(NodePK pk,
                                      String name,
                                      int nodeFatherId)

getTree

ArrayList<NodeDetail> getTree(NodePK pk)

getSubTree

ArrayList<NodeDetail> getSubTree(NodePK pk)

getSubTree

ArrayList<NodeDetail> getSubTree(NodePK pk,
                                 String sorting)

getSubTreeByStatus

ArrayList<NodeDetail> getSubTreeByStatus(NodePK pk,
                                         String status)

getSubTreeByStatus

ArrayList<NodeDetail> getSubTreeByStatus(NodePK pk,
                                         String status,
                                         String sorting)

getSubTreeByLevel

ArrayList<NodeDetail> getSubTreeByLevel(NodePK pk,
                                        int level)

getSubTreeByLevel

ArrayList<NodeDetail> getSubTreeByLevel(NodePK pk,
                                        int level,
                                        String sorting)

getSubTree

ArrayList<NodeDetail> getSubTree(NodePK pk,
                                 String status,
                                 int level,
                                 String sorting)

getTwoLevelDetails

NodeDetail getTwoLevelDetails(NodePK pk)
Method declaration

Parameters:
pk - the node primary key.
Returns:

getFrequentlyAskedDetail

NodeDetail getFrequentlyAskedDetail(NodePK pk)
Method declaration

Parameters:
pk - the node primary key.
Returns:

getHeadersByLevel

List<NodeDetail> getHeadersByLevel(NodePK pk,
                                   int level)
Method declaration

Parameters:
pk - the node primary key.
level -
Returns:

getAllNodes

Collection<NodeDetail> getAllNodes(NodePK nodePK)
Method declaration

Parameters:
nodePK -
Returns:

getPath

Collection<NodeDetail> getPath(NodePK pk)
Get the path of this node from this node to root

Parameters:
pk - the node primary key.
Returns:
a NodeDetail Collection (only header).

getChildrenDetails

Collection<NodeDetail> getChildrenDetails(NodePK pk)
Get the header of each child of the node.

Parameters:
pk - the node primary key.
Returns:
a NodeDetail collection

getFrequentlyAskedChildrenDetails

Collection<NodeDetail> getFrequentlyAskedChildrenDetails(NodePK pk)
Get the header of each child of the node this function is to be used with frequently used nodes because for each child, an ejb will be instanciated (nodes next to the root will be frequently used) For less used nodes, choose the getChildrenDetails() method

Parameters:
pk - the node primary key.
Returns:
a NodeDetail collection

getChildrenNumber

int getChildrenNumber(NodePK pk)
Get the children number of this node

Parameters:
pk - the node primary key.
Returns:
a int

setDetail

void setDetail(NodeDetail nodeDetail)
Update the attributes of the node

Parameters:
nodeDetail - the NodeDetail which contains updated data
Since:
1.0

createNode

NodePK createNode(NodeDetail nodeDetail,
                  NodeDetail fatherDetail)
Create a new Node object

Parameters:
nodeDetail - the NodeDetail which contains data
fatherDetail - the parent of node to be added
Returns:
the NodePK of the new Node

createNode

NodePK createNode(NodeDetail nodeDetail)
Create a new Node object

Parameters:
nodeDetail - the NodeDetail which contains data
Returns:
the NodePK of the new Node

removeNode

void removeNode(NodePK pk)
Remove a node and its descendants

Parameters:
pk - the node PK to delete
See Also:
NodePK

moveNode

void moveNode(NodePK nodePK,
              NodePK toNode)

isSameNameSameLevelOnCreation

boolean isSameNameSameLevelOnCreation(NodeDetail nd)
On node creation, check if another node have got the same name with same father

Parameters:
nd - A NodeDetail contains new node data to compare
Returns:
true if there is already a node with same name with same father false else

isSameNameSameLevelOnUpdate

boolean isSameNameSameLevelOnUpdate(NodeDetail nd)
On node update, check if another node have got the same name with same father

Parameters:
nd - A NodeDetail contains new node data to compare
Returns:
true if there is already a node with same name with same father false else

getChildrenPKs

Collection<NodePK> getChildrenPKs(NodePK nodePK)
Get children node PKs of a node

Parameters:
nodePK - A NodePK
Returns:
A collection of NodePK
See Also:
NodePK

getDescendantPKs

Collection<NodePK> getDescendantPKs(NodePK nodePK)
Get descendant node PKs of a node

Parameters:
nodePK - A NodePK
Returns:
A collection of NodePK
Since:
1.0
See Also:
NodePK

getDescendantDetails

List<NodeDetail> getDescendantDetails(NodePK nodePK)
Get descendant nodeDetails of a node

Parameters:
nodePK - A NodePK
Returns:
A List of NodeDetail
Since:
1.0
See Also:
NodePK

getDescendantDetails

List<NodeDetail> getDescendantDetails(NodeDetail node)
Get descendant nodeDetails of a node

Parameters:
node - A NodeDetail
Returns:
A List of NodeDetail

getAnotherPath

Collection<NodeDetail> getAnotherPath(NodePK nodePK)
Get the path from root to a node

Parameters:
nodePK - A NodePK
Returns:
A collection of NodeDetail
See Also:
NodePK

processWysiwyg

void processWysiwyg(NodePK nodePK)
A wysiwyg's content has been added or modified to a node. Its content must be added to the indexed content of the node

Parameters:
nodePK - the identifier of the node associated to the wysiwyg

updateRightsDependency

void updateRightsDependency(NodeDetail nodeDetail)

createIndex

void createIndex(NodeDetail nodeDetail)
Method declaration

Parameters:
nodeDetail -

deleteIndex

void deleteIndex(NodePK pk)
Method declaration

Parameters:
pk -

sortNodes

void sortNodes(List<NodePK> nodePKs)


Copyright © 2016 Silverpeas. All Rights Reserved.