本文整理汇总了Java中org.alfresco.service.cmr.action.Action.setParameterValues方法的典型用法代码示例。如果您正苦于以下问题:Java Action.setParameterValues方法的具体用法?Java Action.setParameterValues怎么用?Java Action.setParameterValues使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.alfresco.service.cmr.action.Action
的用法示例。
在下文中一共展示了Action.setParameterValues方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: createScriptAction
import org.alfresco.service.cmr.action.Action; //导入方法依赖的package包/类
private Action createScriptAction()
{
// get script nodeRef
NodeRef storeRootNodeRef = nodeService.getRootNode(new StoreRef("workspace://SpacesStore"));
NodeRef scriptRef = searchService.selectNodes(storeRootNodeRef, "/app:company_home/app:dictionary/app:scripts/cm:nothingToDo.js", null, namespaceService, false).get(0);
assertNotNull("NodeRef script is null", scriptRef);
// create action
CompositeAction compositeAction = actionService.createCompositeAction();
// add the action to the rule
Action action = actionService.createAction("script");
Map<String, Serializable> repoActionParams = new HashMap<String, Serializable>();
repoActionParams.put("script-ref", scriptRef);
action.setParameterValues(repoActionParams);
compositeAction.addAction(action);
return compositeAction;
}
示例2: createAction
import org.alfresco.service.cmr.action.Action; //导入方法依赖的package包/类
/**
* @see org.alfresco.service.cmr.action.ActionService#createAction(java.lang.String,
* java.util.Map)
*/
public Action createAction(String name, Map<String, Serializable> params)
{
Action action = createAction(name);
action.setParameterValues(params);
return action;
}
示例3: createTestRule
import org.alfresco.service.cmr.action.Action; //导入方法依赖的package包/类
protected Rule createTestRule(boolean isAppliedToChildren, String title)
{
// Rule properties
Map<String, Serializable> conditionProps = new HashMap<String, Serializable>();
conditionProps.put(COND_PROP_NAME_1, COND_PROP_VALUE_1);
Map<String, Serializable> actionProps = new HashMap<String, Serializable>();
actionProps.put(ACTION_PROP_NAME_1, ACTION_PROP_VALUE_1);
List<String> ruleTypes = new ArrayList<String>(1);
ruleTypes.add(this.ruleType.getName());
// Create the action
Action action = this.actionService.createAction(CONDITION_DEF_NAME);
action.setParameterValues(conditionProps);
ActionCondition actionCondition = this.actionService.createActionCondition(CONDITION_DEF_NAME);
actionCondition.setParameterValues(conditionProps);
action.addActionCondition(actionCondition);
// Create the rule
Rule rule = new Rule();
rule.setRuleTypes(ruleTypes);
rule.setTitle(title);
rule.setDescription(DESCRIPTION);
rule.applyToChildren(isAppliedToChildren);
rule.setAction(action);
return rule;
}
示例4: createTestRule
import org.alfresco.service.cmr.action.Action; //导入方法依赖的package包/类
protected Rule createTestRule(boolean isAppliedToChildren, String title)
{
// Rule properties
Map<String, Serializable> conditionProps = new HashMap<String, Serializable>();
conditionProps.put(COND_PROP_NAME_1, COND_PROP_VALUE_1);
Map<String, Serializable> actionProps = new HashMap<String, Serializable>();
actionProps.put(ACTION_PROP_NAME_1, ACTION_PROP_VALUE_1);
List<String> ruleTypes = new ArrayList<String>(1);
ruleTypes.add(RULE_TYPE_NAME);
// Create the action
Action action = this.actionService.createAction(CONDITION_DEF_NAME);
action.setParameterValues(conditionProps);
ActionCondition actionCondition = this.actionService.createActionCondition(CONDITION_DEF_NAME);
actionCondition.setParameterValues(conditionProps);
action.addActionCondition(actionCondition);
// Create the rule
Rule rule = new Rule();
rule.setRuleTypes(ruleTypes);
rule.setTitle(title);
rule.setDescription("bob");
rule.applyToChildren(isAppliedToChildren);
rule.setAction(action);
return rule;
}