/** * 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)); }
/** * 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); }
/** * 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); }
/** Enable all rule in the current thread */ public void enableAllRules() { rulesService.enableAllRules(); }
/** Disable all rule in the current thread */ public void disableAllRules() { rulesService.disableAllRules(); }
/** * @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); }