12-27-2010 09:48 AM
ChildAssociationRef primaryAssoc = this.nodeService.getPrimaryParent(node);
if (null == primaryAssoc) {
/**
* Is this an orphaned node ???
*/
if (logger.isWarnEnabled()) {
logger.warn("Can not notify node without a parent: " + node.toString());
}
return;
}
NodeRef parent = primaryAssoc.getParentRef();
if (this.nodeService.getNodeStatus(parent).isDeleted()) {
if (logger.isDebugEnabled()) {
logger.debug("Node's parent is deleted, ommitting deletion notification for this node: " + node.toString());
}
return;
}12-29-2010 12:38 PM
/**
* Search and disable behaviour for all the children nodes.
*/
String query = ".//*[hasAspect('"
+ Model.ASPECT_NOTIFY_IN_DISCUSSION.toString() + "')]";
List<NodeRef> childrenNodes = this.searchService.selectNodes(node,
query, null, this.namespaceService, false);
for (NodeRef childNode : childrenNodes) {
if (logger.isDebugEnabled()) {
logger
.debug("Disabling behaviour for child node: "
+ childNode);
}
this.behaviourFilter.disableBehaviour(childNode,
Model.ASPECT_NOTIFY_IN_DISCUSSION);
}Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.