This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Import a script from the repository using a name-based path: | |
| <import resource="/Company Home/Data Dictionary/Scripts/library.js"> | |
| Import a script from the repository using a NodeRef reference: | |
| <import resource="workspace://SpacesStore/6f73de1b-d3b4-11db-80cb-112e6c2ea048"> | |
| Import a script from a Java classpath location: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var ctx = Packages.org.springframework.web.context.ContextLoader.getCurrentWebApplicationContext(); | |
| var behaviourFilter = ctx.getBean("policyBehaviourFilter"); | |
| // ----------------------------------------------------------------- | |
| function findAndReplaceAttribute(query, attribute, value) { | |
| nodes = search.luceneSearch(query); | |
| for each(var node in nodes) { |