当前位置: 首页>>代码示例>>Java>>正文


Java Action.setParameterValues方法代码示例

本文整理汇总了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;
}
 
开发者ID:Alfresco,项目名称:alfresco-repository,代码行数:20,代码来源:RuleServiceImplTest.java

示例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;
}
 
开发者ID:Alfresco,项目名称:alfresco-repository,代码行数:11,代码来源:ActionServiceImpl.java

示例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;
}
 
开发者ID:Alfresco,项目名称:alfresco-repository,代码行数:31,代码来源:BaseRuleTest.java

示例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;
}
 
开发者ID:Alfresco,项目名称:alfresco-repository,代码行数:31,代码来源:RuleLinkTest.java


注:本文中的org.alfresco.service.cmr.action.Action.setParameterValues方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。