Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
Disable alfresco policy in Javascript.js
var context = Packages.org.springframework.web.context.ContextLoader.getCurrentWebApplicationContext();
var model = Packages.br.com.dgcloud.model.CustomerXModel;
var policyBehaviourFilter = context.getBean('policyBehaviourFilter', Packages.org.alfresco.repo.policy.BehaviourFilter);
try {
policyBehaviourFilter.disableBehaviour(node.nodeRef, model.TYPE_DOCUMENT_EMPLOYEE_QNAME);
// your code here
} finally {
policyBehaviourFilter.enableBehaviour(node.nodeRef, model.TYPE_DOCUMENT_EMPPLOYEE_QNAME);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment