Alfresco from a developers point of view
RSS icon Email icon Home icon
  • Alfresco temporary aspect

    Posted on February 10th, 2010 jan No comments

    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(“cm:temporary”);
    mynode.remove();

    Have Fun!