1 package org.exoplatform.services.cms.jcrext;
2
3 import javax.jcr.Node;
4 import org.apache.commons.chain.Context;
5 import org.exoplatform.services.command.action.Action;
6
7
8
9
10
11
12
13
14 public class AddFileDocumentAction implements Action{
15 public boolean execute(Context context) throws Exception {
16 Node node = (Node)context.get("currentItem");
17 if(node.isNodeType("nt:file") && node.canAddMixin("mix:referenceable")) {
18 node.addMixin("mix:referenceable");
19 }
20 return false;
21 }
22 }