mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-31 17:39:05 +00:00
Merge V1.2.0 BRANCH to HEAD
svn merge -r 2519:2565 svn://www.alfresco.org/alfresco/BRANCHES/V1.2.0/root HEAD/root git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@2566 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -755,6 +755,9 @@ home_space_name=Home Space Name
|
|||||||
title_admin_console=Administration Console
|
title_admin_console=Administration Console
|
||||||
admin_console=Administration Console
|
admin_console=Administration Console
|
||||||
admin_description=Use this view to perform system administration functions.
|
admin_description=Use this view to perform system administration functions.
|
||||||
|
admin_limited_license=Licensed: {0} license issued on {1,date,short} limited to {2} days expiring {3,date,short} ({4} days remaining).
|
||||||
|
admin_unlimited_license=Licensed: {0} license issued on {1,date,short} (does not expire).
|
||||||
|
admin_invalid_license=Licensed: LICENSE INVALID - Alfresco Repository restricted to read-only capability.
|
||||||
|
|
||||||
# UI Page Titles
|
# UI Page Titles
|
||||||
title_about=About Alfresco
|
title_about=About Alfresco
|
||||||
|
@@ -397,7 +397,7 @@ public abstract class InviteUsersWizard extends AbstractWizardBean
|
|||||||
int offset = PermissionService.GROUP_PREFIX.length();
|
int offset = PermissionService.GROUP_PREFIX.length();
|
||||||
for (String group : groups)
|
for (String group : groups)
|
||||||
{
|
{
|
||||||
if (group.toLowerCase().indexOf(containsLower) != -1)
|
if (group.toLowerCase().indexOf(containsLower, offset) != -1)
|
||||||
{
|
{
|
||||||
results.add(new SortableSelectItem(group, group.substring(offset), group));
|
results.add(new SortableSelectItem(group, group.substring(offset), group));
|
||||||
}
|
}
|
||||||
|
@@ -136,99 +136,108 @@ public class NewRuleWizard extends BaseActionWizard
|
|||||||
private DataModel allActionsDataModel;
|
private DataModel allActionsDataModel;
|
||||||
private DataModel allConditionsDataModel;
|
private DataModel allConditionsDataModel;
|
||||||
|
|
||||||
|
private boolean isFinished = false;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Deals with the finish button being pressed
|
* Deals with the finish button being pressed
|
||||||
*
|
*
|
||||||
* @return outcome
|
* @return outcome
|
||||||
*/
|
*/
|
||||||
public String finish()
|
public synchronized String finish()
|
||||||
{
|
{
|
||||||
String outcome = FINISH_OUTCOME;
|
String outcome = FINISH_OUTCOME;
|
||||||
|
|
||||||
UserTransaction tx = null;
|
if (isFinished == false)
|
||||||
|
|
||||||
try
|
|
||||||
{
|
{
|
||||||
tx = Repository.getUserTransaction(FacesContext.getCurrentInstance());
|
isFinished = true;
|
||||||
tx.begin();
|
|
||||||
|
UserTransaction tx = null;
|
||||||
// get hold of the space the rule will apply to and make sure
|
|
||||||
// it is actionable
|
try
|
||||||
Node currentSpace = browseBean.getActionSpace();
|
{
|
||||||
|
tx = Repository.getUserTransaction(FacesContext.getCurrentInstance());
|
||||||
Rule rule = null;
|
tx.begin();
|
||||||
|
|
||||||
if (this.editMode)
|
// get hold of the space the rule will apply to and make sure
|
||||||
{
|
// it is actionable
|
||||||
// update the existing rule in the repository
|
Node currentSpace = browseBean.getActionSpace();
|
||||||
rule = this.rulesBean.getCurrentRule();
|
|
||||||
|
Rule rule = null;
|
||||||
// remove all the conditions and actions from the current rule
|
|
||||||
rule.removeAllActionConditions();
|
if (this.editMode)
|
||||||
rule.removeAllActions();
|
{
|
||||||
}
|
// update the existing rule in the repository
|
||||||
else
|
rule = this.rulesBean.getCurrentRule();
|
||||||
{
|
|
||||||
rule = this.ruleService.createRule(this.getType());
|
// remove all the conditions and actions from the current rule
|
||||||
}
|
rule.removeAllActionConditions();
|
||||||
|
rule.removeAllActions();
|
||||||
// setup the rule and add it to the space
|
}
|
||||||
rule.setTitle(this.title);
|
else
|
||||||
rule.setDescription(this.description);
|
{
|
||||||
rule.applyToChildren(this.applyToSubSpaces);
|
rule = this.ruleService.createRule(this.getType());
|
||||||
rule.setExecuteAsynchronously(this.runInBackground);
|
}
|
||||||
|
|
||||||
// add all the conditions to the rule
|
// setup the rule and add it to the space
|
||||||
for (Map<String, Serializable> condParams : this.allConditionsProperties)
|
rule.setTitle(this.title);
|
||||||
{
|
rule.setDescription(this.description);
|
||||||
Map<String, Serializable> repoCondParams = buildConditionParams(condParams);
|
rule.applyToChildren(this.applyToSubSpaces);
|
||||||
|
rule.setExecuteAsynchronously(this.runInBackground);
|
||||||
// add the condition to the rule
|
|
||||||
ActionCondition condition = this.actionService.createActionCondition(
|
// add all the conditions to the rule
|
||||||
(String)condParams.get(PROP_CONDITION_NAME));
|
for (Map<String, Serializable> condParams : this.allConditionsProperties)
|
||||||
condition.setParameterValues(repoCondParams);
|
{
|
||||||
|
Map<String, Serializable> repoCondParams = buildConditionParams(condParams);
|
||||||
// specify whether the condition result should be inverted
|
|
||||||
Boolean not = (Boolean)condParams.get(PROP_CONDITION_NOT);
|
// add the condition to the rule
|
||||||
condition.setInvertCondition(((Boolean)not).booleanValue());
|
ActionCondition condition = this.actionService.createActionCondition(
|
||||||
|
(String)condParams.get(PROP_CONDITION_NAME));
|
||||||
rule.addActionCondition(condition);
|
condition.setParameterValues(repoCondParams);
|
||||||
}
|
|
||||||
|
// specify whether the condition result should be inverted
|
||||||
// add all the actions to the rule
|
Boolean not = (Boolean)condParams.get(PROP_CONDITION_NOT);
|
||||||
for (Map<String, Serializable> actionParams : this.allActionsProperties)
|
condition.setInvertCondition(((Boolean)not).booleanValue());
|
||||||
{
|
|
||||||
// use the base class version of buildActionParams(), but for this we need
|
rule.addActionCondition(condition);
|
||||||
// to setup the currentActionProperties and action variables
|
}
|
||||||
String actionName = (String)actionParams.get(PROP_ACTION_NAME);
|
|
||||||
this.action = actionName;
|
// add all the actions to the rule
|
||||||
this.currentActionProperties = actionParams;
|
for (Map<String, Serializable> actionParams : this.allActionsProperties)
|
||||||
Map<String, Serializable> repoActionParams = buildActionParams();
|
{
|
||||||
|
// use the base class version of buildActionParams(), but for this we need
|
||||||
// add the action to the rule
|
// to setup the currentActionProperties and action variables
|
||||||
Action action = this.actionService.createAction(actionName);
|
String actionName = (String)actionParams.get(PROP_ACTION_NAME);
|
||||||
action.setParameterValues(repoActionParams);
|
this.action = actionName;
|
||||||
rule.addAction(action);
|
this.currentActionProperties = actionParams;
|
||||||
}
|
Map<String, Serializable> repoActionParams = buildActionParams();
|
||||||
|
|
||||||
// Save the rule
|
// add the action to the rule
|
||||||
this.ruleService.saveRule(currentSpace.getNodeRef(), rule);
|
Action action = this.actionService.createAction(actionName);
|
||||||
|
action.setParameterValues(repoActionParams);
|
||||||
if (logger.isDebugEnabled())
|
rule.addAction(action);
|
||||||
{
|
}
|
||||||
logger.debug(this.editMode ? "Updated" : "Added" + " rule '" + this.title + "'");
|
|
||||||
}
|
// Save the rule
|
||||||
|
this.ruleService.saveRule(currentSpace.getNodeRef(), rule);
|
||||||
// commit the transaction
|
|
||||||
tx.commit();
|
if (logger.isDebugEnabled())
|
||||||
}
|
{
|
||||||
catch (Throwable e)
|
logger.debug(this.editMode ? "Updated" : "Added" + " rule '" + this.title + "'");
|
||||||
{
|
}
|
||||||
// rollback the transaction
|
|
||||||
try { if (tx != null) {tx.rollback();} } catch (Exception ex) {}
|
// commit the transaction
|
||||||
Utils.addErrorMessage(MessageFormat.format(Application.getMessage(
|
tx.commit();
|
||||||
FacesContext.getCurrentInstance(), ERROR), e.getMessage()), e);
|
}
|
||||||
outcome = null;
|
catch (Throwable e)
|
||||||
|
{
|
||||||
|
// rollback the transaction
|
||||||
|
try { if (tx != null) {tx.rollback();} } catch (Exception ex) {}
|
||||||
|
Utils.addErrorMessage(MessageFormat.format(Application.getMessage(
|
||||||
|
FacesContext.getCurrentInstance(), ERROR), e.getMessage()), e);
|
||||||
|
outcome = null;
|
||||||
|
|
||||||
|
isFinished = false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return outcome;
|
return outcome;
|
||||||
@@ -678,6 +687,8 @@ public class NewRuleWizard extends BaseActionWizard
|
|||||||
|
|
||||||
this.allConditionsProperties = new ArrayList<Map<String, Serializable>>();
|
this.allConditionsProperties = new ArrayList<Map<String, Serializable>>();
|
||||||
this.allActionsProperties = new ArrayList<Map<String, Serializable>>();
|
this.allActionsProperties = new ArrayList<Map<String, Serializable>>();
|
||||||
|
|
||||||
|
this.isFinished = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Reference in New Issue
Block a user