|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.stratelia.webactiv.util.node.control.NodeBmEJB
public class NodeBmEJB
This is the NodeBM EJB-tier controller. A node is composed by some another nodes (children) and have got one and only one father. It describes a tree. It is implemented as a session EJB.
Constructor Summary | |
---|---|
NodeBmEJB()
|
Method Summary | |
---|---|
void |
createIndex(NodeDetail nodeDetail)
Method declaration |
NodePK |
createNode(NodeDetail node)
Create a new Node object |
NodePK |
createNode(NodeDetail nd,
NodeDetail fatherDetail)
Create a new Node object |
void |
deleteIndex(NodePK pk)
Called on : - removeNode() |
Collection<NodeDetail> |
getAllNodes(NodePK nodePK)
Method declaration |
Collection<NodeDetail> |
getAnotherPath(NodePK nodePK)
Deprecated. |
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 node details of a node |
List<NodeDetail> |
getDescendantDetails(NodePK nodePK)
Get descendant node details 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)
Get the attributes of a node and of its children with transaction support |
Collection<NodeDetail> |
getFrequentlyAskedChildrenDetails(NodePK pk)
Get the header of each child of the node this method is to be used on frequently asked nodes (next to the root), because all ejb will be instanciated |
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 nd)
Update the attributes of the node |
void |
sortNodes(List<NodePK> nodePKs)
|
void |
updateRightsDependency(NodeDetail nodeDetail)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public NodeBmEJB()
Method Detail |
---|
public NodeDetail getDetailByNameAndFatherId(NodePK pk, String name, int nodeFatherId)
getDetailByNameAndFatherId
in interface NodeBm
public NodeDetail getDetail(NodePK pk)
getDetail
in interface NodeBm
pk
- the node primary key.
NodeDetail
public NodeDetail getDetailTransactionally(NodePK pk)
getDetailTransactionally
in interface NodeBm
public ArrayList<NodeDetail> getTree(NodePK pk)
getTree
in interface NodeBm
public ArrayList<NodeDetail> getSubTree(NodePK pk)
getSubTree
in interface NodeBm
public ArrayList<NodeDetail> getSubTree(NodePK pk, String sorting)
getSubTree
in interface NodeBm
public ArrayList<NodeDetail> getSubTreeByStatus(NodePK pk, String status)
getSubTreeByStatus
in interface NodeBm
public ArrayList<NodeDetail> getSubTreeByStatus(NodePK pk, String status, String sorting)
getSubTreeByStatus
in interface NodeBm
public ArrayList<NodeDetail> getSubTreeByLevel(NodePK pk, int level)
getSubTreeByLevel
in interface NodeBm
public ArrayList<NodeDetail> getSubTreeByLevel(NodePK pk, int level, String sorting)
getSubTreeByLevel
in interface NodeBm
public ArrayList<NodeDetail> getSubTree(NodePK pk, String status, int level, String sorting)
getSubTree
in interface NodeBm
public void moveNode(NodePK nodePK, NodePK toNode)
moveNode
in interface NodeBm
public NodeDetail getFrequentlyAskedDetail(NodePK pk)
getFrequentlyAskedDetail
in interface NodeBm
pk
-
public NodeDetail getTwoLevelDetails(NodePK pk)
getTwoLevelDetails
in interface NodeBm
pk
-
public NodeDetail getHeader(NodePK pk, boolean getTranslations)
getHeader
in interface NodeBm
public NodeDetail getHeader(NodePK pk)
getHeader
in interface NodeBm
pk
- the node primary key.
NodeDetail
public void setDetail(NodeDetail nd)
setDetail
in interface NodeBm
nd
- the NodeDetail which contains updated dataNodeDetail
public void removeNode(NodePK pk)
removeNode
in interface NodeBm
pk
- the node PK to deleteNodePK
public Collection<NodeDetail> getPath(NodePK pk)
getPath
in interface NodeBm
pk
- The PK of the node
NodeDetail
,
Collection
public Collection<NodeDetail> getChildrenDetails(NodePK pk)
getChildrenDetails
in interface NodeBm
pk
- the node primary key.
NodeDetail
public Collection<NodeDetail> getFrequentlyAskedChildrenDetails(NodePK pk)
getFrequentlyAskedChildrenDetails
in interface NodeBm
pk
- the node primary key.
NodeDetail
public List<NodeDetail> getHeadersByLevel(NodePK pk, int level)
getHeadersByLevel
in interface NodeBm
pk
- level
-
public Collection<NodeDetail> getAllNodes(NodePK nodePK)
getAllNodes
in interface NodeBm
nodePK
-
public int getChildrenNumber(NodePK pk)
getChildrenNumber
in interface NodeBm
pk
- the node primary key.
public NodePK createNode(NodeDetail node)
NodeBm
createNode
in interface NodeBm
node
- the NodeDetail which contains data
public NodePK createNode(NodeDetail nd, NodeDetail fatherDetail)
createNode
in interface NodeBm
nd
- the NodeDetail which contains datafatherDetail
- the PK of the user who have create this node
NodeDetail
public boolean isSameNameSameLevelOnCreation(NodeDetail nd)
isSameNameSameLevelOnCreation
in interface NodeBm
nd
- A NodeDetail contains new node data to compare
NodeDetail
public boolean isSameNameSameLevelOnUpdate(NodeDetail nd)
isSameNameSameLevelOnUpdate
in interface NodeBm
nd
- A NodeDetail contains new node data to compare
NodeDetail
public Collection<NodePK> getChildrenPKs(NodePK nodePK)
getChildrenPKs
in interface NodeBm
nodePK
- A NodePK
NodePK
public Collection<NodePK> getDescendantPKs(NodePK nodePK)
getDescendantPKs
in interface NodeBm
nodePK
- A NodePK
NodePK
public List<NodeDetail> getDescendantDetails(NodePK nodePK)
getDescendantDetails
in interface NodeBm
nodePK
- A NodePK
NodePK
public List<NodeDetail> getDescendantDetails(NodeDetail node)
getDescendantDetails
in interface NodeBm
node
- A NodeDetail
public Collection<NodeDetail> getAnotherPath(NodePK nodePK)
getAnotherPath
in interface NodeBm
nodePK
- A NodePK
NodePK
,
NodeDetail
public void processWysiwyg(NodePK nodePK)
NodeBm
processWysiwyg
in interface NodeBm
nodePK
- the identifier of the node associated to the wysiwygpublic void updateRightsDependency(NodeDetail nodeDetail)
updateRightsDependency
in interface NodeBm
public void sortNodes(List<NodePK> nodePKs)
sortNodes
in interface NodeBm
public void createIndex(NodeDetail nodeDetail)
NodeBm
createIndex
in interface NodeBm
public void deleteIndex(NodePK pk)
deleteIndex
in interface NodeBm
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |