Morning merge.

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/BRANCHES/WCM-DEV2/root@2812 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Britt Park
2006-05-10 14:46:54 +00:00
parent 7f6fabb0b6
commit 41976834d5
31 changed files with 799 additions and 195 deletions

View File

@@ -46,36 +46,13 @@ public class EditRuleWizard extends CreateRuleWizard
{
private static final Log logger = LogFactory.getLog(EditRuleWizard.class);
@Override
protected String finishImpl(FacesContext context, String outcome) throws Exception
{
// get hold of the space the rule will apply to and make sure
// it is actionable
Node currentSpace = browseBean.getActionSpace();
// get the existing rule
Rule rule = this.rulesBean.getCurrentRule();
// remove all the conditions and actions from the current rule
rule.removeAllActionConditions();
rule.removeAllActions();
// re-setup the rule
outcome = setupRule(context, rule, outcome);
// Save the rule
this.ruleService.saveRule(currentSpace.getNodeRef(), rule);
if (logger.isDebugEnabled())
logger.debug("Updated rule '" + this.title + "'");
return outcome;
}
// ------------------------------------------------------------------------------
// Wizard implementation
@Override
public void init()
public void init(Map<String, String> parameters)
{
super.init();
super.init(parameters);
// get hold of the current rule details
Rule rule = this.rulesBean.getCurrentRule();
@@ -133,6 +110,35 @@ public class EditRuleWizard extends CreateRuleWizard
this.action = null;
}
@Override
protected String finishImpl(FacesContext context, String outcome) throws Exception
{
// get hold of the space the rule will apply to and make sure
// it is actionable
Node currentSpace = browseBean.getActionSpace();
// get the existing rule
Rule rule = this.rulesBean.getCurrentRule();
// remove all the conditions and actions from the current rule
rule.removeAllActionConditions();
rule.removeAllActions();
// re-setup the rule
outcome = setupRule(context, rule, outcome);
// Save the rule
this.ruleService.saveRule(currentSpace.getNodeRef(), rule);
if (logger.isDebugEnabled())
logger.debug("Updated rule '" + this.title + "'");
return outcome;
}
// ------------------------------------------------------------------------------
// Helper methods
/**
* Populates a Map of properties the wizard is expecting for the given condition
*