Alfresco temporary aspect

my “Alfresco-hack-of-the-day”:

Aspect cm:temporary is sometimes very useful. If you want to delete a node immediately without moving the node to paper bin (archive store) adding cm:temporary aspect before deletion solves your prob. Nodes with cm:temporary attached will deleted without detour via paper bin:

Java:

nodeService.addAspect(nodeRef, ContentModel.ASPECT_TEMPORARY, null);
nodeService.deleteNode(nodeRef);

JS:

mynode.addAspect(“sys:temporary”);
mynode.remove();

Have Fun!