Esempio n. 1
0
 /**
  * Method to add a script-based rule on a space to apply on children space
  *
  * @param script the javascript script file containing the code of the rule to apply on the
  *     targeted space
  * @param targetSpace the targeted space
  * @param ruleType the rule type: either "inbound", "outbound" or "update"
  * @param contentType
  * @param uri
  */
 public void addScriptRuleWithTypeCondition(
     ScriptNode script, ScriptNode targetSpace, String ruleType, String contentType, String uri) {
   rulesService.addRuleWithTypeCondition(
       script.getNodeRef(),
       targetSpace.getNodeRef(),
       ruleType,
       QName.createQName(uri, contentType));
 }
Esempio n. 2
0
 /**
  * Method to add a script-based rule with full setting
  *
  * @param script
  * @param targetSpace
  * @param ruleType
  * @param contentType
  * @param uri
  * @param applyToChildren
  * @param setExecuteAsynchronously
  * @param setRuleDisabled
  * @param title
  * @param description
  */
 public void addScriptRuleWithTypeCondition(
     ScriptNode script,
     ScriptNode targetSpace,
     String ruleType,
     String contentType,
     String uri,
     boolean applyToChildren,
     boolean setExecuteAsynchronously,
     boolean setRuleDisabled,
     String title,
     String description) {
   rulesService.addRuleWithTypeCondition(
       script.getNodeRef(),
       targetSpace.getNodeRef(),
       ruleType,
       QName.createQName(uri, contentType),
       applyToChildren,
       setExecuteAsynchronously,
       setRuleDisabled,
       title,
       description);
 }
Esempio n. 3
0
 /**
  * Method to add a script-based rule on a space to apply on children space
  *
  * @param script the javascript script file containing the code of the rule to apply on the
  *     targeted space
  * @param targetSpace the targeted space
  * @param ruleType the rule type: either "inbound", "outbound" or "update"
  */
 public void addScriptRule(ScriptNode script, ScriptNode targetSpace, String ruleType) {
   rulesService.addRule(script.getNodeRef(), targetSpace.getNodeRef(), ruleType);
 }
Esempio n. 4
0
 /** Enable all rule in the current thread */
 public void enableAllRules() {
   rulesService.enableAllRules();
 }
Esempio n. 5
0
 /** Disable all rule in the current thread */
 public void disableAllRules() {
   rulesService.disableAllRules();
 }
Esempio n. 6
0
 /**
  * @param script
  * @param title (optional return all if null)
  * @param ruleTypeName (optional return all if null)
  * @param includeInhertiedRuleType
  */
 public void enableRules(
     ScriptNode script, String title, String ruleTypeName, boolean includeInhertiedRuleType) {
   rulesService.enableRules(script.getNodeRef(), title, ruleTypeName, includeInhertiedRuleType);
 }