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!

3 thoughts on “Alfresco temporary aspect

  1. But u have mistake 🙁
    not aspect like cm:temporary in alfresco community instead there have sys:temporary aspect please correct this 🙂

  2. wow, it’s older than a year. You’re the first who noticed that 😉 I’ll fix it.

Leave a Reply

Your email address will not be published. Required fields are marked *