10-04-2012 09:53 PM
org.alfresco.service.cmr.repository.InvalidNodeRefException: Node does not exist:
String fileName = (String) nodeService.getProperty(actionedUponNodeRef, ContentModel.PROP_NAME);
10-05-2012 03:39 AM
10-05-2012 11:35 AM
10-10-2012 08:18 AM
10-16-2012 02:45 PM
System.out.println("AtionedUponNodeRef Node:"+actionedUponNodeRef.getId()+actionedUponNodeRef.getStoreRef().getIdentifier());
NodeRef origNodeRef = archiveService.getArchivedNode(actionedUponNodeRef);
System.out.println("Original Node:"+origNodeRef.getId()+origNodeRef.getStoreRef().getIdentifier());
AtionedUponNodeRef Node:7adb1a27-6fcf-4321-8807-448bb9edf928SpacesStore
Original Node:7adb1a27-6fcf-4321-8807-448bb9edf928SpacesStore
11-07-2012 08:41 PM
public class DeleteAsset implements NodeServicePolicies.BeforeDeleteNodePolicy {
private PolicyComponent policyComponent;
private Behaviour beforeDeleteNode;
public void init() {
this.beforeDeleteNode = new JavaBehaviour(this,"beforeDeleteNode",NotificationFrequency.EVERY_EVENT);
this.policyComponent.bindClassBehaviour(QName.createQName(NamespaceService.ALFRESCO_URI,"beforeDeleteNode"),
QName.createQName(MyModel.NAMESPACE,MyModel.ASSET_CONTENT_TYPE), this.beforeDeleteNode);
}
@Override
public void beforeDeleteNode(NodeRef node) {
System.out.println("beforeDeleteNode!");
try {
your code here
} catch(Exception e) {
e.printStackTrace();
}
}
}
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.