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


Java Action.getId方法代码示例

本文整理汇总了Java中org.alfresco.service.cmr.action.Action.getId方法的典型用法代码示例。如果您正苦于以下问题:Java Action.getId方法的具体用法?Java Action.getId怎么用?Java Action.getId使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.alfresco.service.cmr.action.Action的用法示例。


在下文中一共展示了Action.getId方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: testOwningNodeRef

import org.alfresco.service.cmr.action.Action; //导入方法依赖的package包/类
public void testOwningNodeRef()
{
    // Create the action
    Action action = this.actionService.createAction(AddFeaturesActionExecuter.NAME);
    String actionId = action.getId();
    
    // Set the parameters of the action
    action.setParameterValue(AddFeaturesActionExecuter.PARAM_ASPECT_NAME, ContentModel.ASPECT_VERSIONABLE);
    
    // Set the title and description of the action
    action.setTitle("title");
    action.setDescription("description");
    action.setExecuteAsynchronously(true);
    
    // Check the owning node ref
    //assertNull(action.getOwningNodeRef());
            
    // Save the action
    this.actionService.saveAction(this.nodeRef, action);
    
    // Get the action
    this.actionService.getAction(this.nodeRef, actionId);        
}
 
开发者ID:Alfresco,项目名称:alfresco-repository,代码行数:24,代码来源:ActionServiceImplTest.java

示例2: getExecutingActions

import org.alfresco.service.cmr.action.Action; //导入方法依赖的package包/类
public List<ExecutionSummary> getExecutingActions(Action action)
{
    Collection<String> actions = executingActionsCache.getKeys();
    List<ExecutionSummary> details = new ArrayList<ExecutionSummary>();
    String match = action.getActionDefinitionName() + cacheKeyPartSeparator + action.getId()
            + cacheKeyPartSeparator;
    for (String key : actions)
    {
        if (key.startsWith(match))
        {
            details.add(buildExecutionSummary(key));
        }
    }
    return details;
}
 
开发者ID:Alfresco,项目名称:alfresco-repository,代码行数:16,代码来源:ActionTrackingServiceImpl.java

示例3: ActionImpl

import org.alfresco.service.cmr.action.Action; //导入方法依赖的package包/类
public ActionImpl(Action action, String actionDefinitionName)
{
    super(action.getId(), action.getParameterValues());
    this.actionDefinitionName = actionDefinitionName;
    this.actionConditions = action.getActionConditions();
    this.compensatingAction = action.getCompensatingAction();
    this.createdDate = action.getCreatedDate();
    this.creator = action.getCreator();
    this.description = action.getDescription();
    this.trackStatus = action.getTrackStatus();
    this.executeAsynchronously = action.getExecuteAsychronously();
    this.modifiedDate = action.getModifiedDate();
    this.modifier = action.getModifier();
    this.nodeRef = action.getNodeRef();
    this.title = action.getTitle();
    this.executionStartDate = action.getExecutionStartDate();
    this.executionEndDate = action.getExecutionEndDate();
    this.executionStatus = action.getExecutionStatus();
    this.executionFailureMessage = action.getExecutionFailureMessage();
    if (action instanceof ActionImpl)
    {
        ActionImpl actionImpl = (ActionImpl) action;
        this.executionInstance = actionImpl.getExecutionInstance();
        this.runAsUserName = actionImpl.getRunAsUser();
        this.tenantId = actionImpl.getTenantId();
        this.actionChain = actionImpl.actionChain;
    }
}
 
开发者ID:Alfresco,项目名称:alfresco-repository,代码行数:29,代码来源:ActionImpl.java

示例4: testConditionOrder

import org.alfresco.service.cmr.action.Action; //导入方法依赖的package包/类
public void testConditionOrder()
{
    Action action = this.actionService.createAction(AddFeaturesActionExecuter.NAME);
    String actionId = action.getId();
    
    ActionCondition condition1 = this.actionService.createActionCondition(NoConditionEvaluator.NAME);
    ActionCondition condition2 = this.actionService.createActionCondition(NoConditionEvaluator.NAME);
    
    action.addActionCondition(condition1);
    action.addActionCondition(condition2);
    
    this.actionService.saveAction(this.nodeRef, action);
    Action savedAction = this.actionService.getAction(this.nodeRef, actionId);
    
    // Check that the conditions have been retrieved in the correct order
    assertNotNull(savedAction);
    assertEquals(condition1, savedAction.getActionCondition(0));
    assertEquals(condition2, savedAction.getActionCondition(1));
    
    ActionCondition condition3 = this.actionService.createActionCondition(NoConditionEvaluator.NAME);
    ActionCondition condition4 = this.actionService.createActionCondition(NoConditionEvaluator.NAME);
    
    // Update the conditions on the action
    savedAction.removeActionCondition(condition1);
    savedAction.addActionCondition(condition3);
    savedAction.addActionCondition(condition4);
    
    this.actionService.saveAction(this.nodeRef, savedAction);
    Action savedAction2 = this.actionService.getAction(this.nodeRef, actionId);
    
    // Check that the conditions are still in the correct order
    assertNotNull(savedAction2);
    assertEquals(condition2, savedAction2.getActionCondition(0));
    assertEquals(condition3, savedAction2.getActionCondition(1));
    assertEquals(condition4, savedAction2.getActionCondition(2));
}
 
开发者ID:Alfresco,项目名称:alfresco-repository,代码行数:37,代码来源:ActionServiceImplTest.java

示例5: generateCacheKey

import org.alfresco.service.cmr.action.Action; //导入方法依赖的package包/类
/**
 * Generates the cache key for the specified action.
 */
protected static String generateCacheKey(Action action)
{
    return action.getActionDefinitionName() + cacheKeyPartSeparator + action.getId()
            + cacheKeyPartSeparator + ((ActionImpl) action).getExecutionInstance();
}
 
开发者ID:Alfresco,项目名称:alfresco-repository,代码行数:9,代码来源:ActionTrackingServiceImpl.java

示例6: buildExecutionSummary

import org.alfresco.service.cmr.action.Action; //导入方法依赖的package包/类
protected static ExecutionSummary buildExecutionSummary(Action action)
{
    return new ExecutionSummary(action.getActionDefinitionName(), action.getId(),
            ((ActionImpl) action).getExecutionInstance());
}
 
开发者ID:Alfresco,项目名称:alfresco-repository,代码行数:6,代码来源:ActionTrackingServiceImpl.java


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