/** * 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); }