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


Java Action.setTrackStatus方法代码示例

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


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

示例1: populateActionProperties

import org.alfresco.service.cmr.action.Action; //导入方法依赖的package包/类
/**
 * Populates the action properties from the node reference
 * 
 * @param actionNodeRef the action node reference
 * @param action the action
 */
private void populateActionProperties(NodeRef actionNodeRef, Action action)
{
    Map<QName, Serializable> props = this.nodeService.getProperties(actionNodeRef);

    action.setTitle((String) props.get(ActionModel.PROP_ACTION_TITLE));
    action.setDescription((String) props.get(ActionModel.PROP_ACTION_DESCRIPTION));

    Boolean trackStatusObj = (Boolean) props.get(ActionModel.PROP_TRACK_STATUS);
    action.setTrackStatus(trackStatusObj);              // Allowed to be null

    Boolean executeAsynchObj = (Boolean) props.get(ActionModel.PROP_EXECUTE_ASYNCHRONOUSLY);
    boolean executeAsynch = executeAsynchObj == null ? false : executeAsynchObj.booleanValue();
    action.setExecuteAsynchronously(executeAsynch);

    ((ActionImpl) action).setCreator((String) props.get(ContentModel.PROP_CREATOR));
    ((ActionImpl) action).setCreatedDate((Date) props.get(ContentModel.PROP_CREATED));
    ((ActionImpl) action).setModifier((String) props.get(ContentModel.PROP_MODIFIER));
    ((ActionImpl) action).setModifiedDate((Date) props.get(ContentModel.PROP_MODIFIED));
    
    ((ActionImpl) action).setExecutionStartDate((Date) props.get(ActionModel.PROP_EXECUTION_START_DATE));
    ((ActionImpl) action).setExecutionEndDate((Date) props.get(ActionModel.PROP_EXECUTION_END_DATE));
    ((ActionImpl) action).setExecutionStatus(ActionStatus.valueOf(props.get(ActionModel.PROP_EXECUTION_ACTION_STATUS)));
    ((ActionImpl) action).setExecutionFailureMessage((String) props.get(ActionModel.PROP_EXECUTION_FAILURE_MESSAGE));

    // Get the compensating action
    List<ChildAssociationRef> assocs = this.nodeService.getChildAssocs(actionNodeRef, RegexQNamePattern.MATCH_ALL,
                ActionModel.ASSOC_COMPENSATING_ACTION);
    if (assocs.size() != 0)
    {
        Action compensatingAction = createAction(assocs.get(0).getChildRef());
        action.setCompensatingAction(compensatingAction);
    }
}
 
开发者ID:Alfresco,项目名称:alfresco-repository,代码行数:40,代码来源:ActionServiceImpl.java

示例2: createFailingMoveAction

import org.alfresco.service.cmr.action.Action; //导入方法依赖的package包/类
private Action createFailingMoveAction()
{
    Action failingAction = this.actionService.createAction(MoveActionExecuter.NAME);
    failingAction.setTrackStatus(Boolean.TRUE);

    // Create a bad node ref
    NodeRef badNodeRef = new NodeRef(this.storeRef, "123123");
    failingAction.setParameterValue(MoveActionExecuter.PARAM_DESTINATION_FOLDER, badNodeRef);

    return failingAction;
}
 
开发者ID:Alfresco,项目名称:alfresco-repository,代码行数:12,代码来源:ActionTrackingServiceImplTest.java

示例3: createWorkingSleepAction

import org.alfresco.service.cmr.action.Action; //导入方法依赖的package包/类
protected static Action createWorkingSleepAction(String id, ActionService actionService) throws Exception
{
   Action workingAction = new CancellableSleepAction(actionService.createAction(SleepActionExecuter.NAME));
   workingAction.setTrackStatus(Boolean.TRUE);
   if(id != null)
   {
      Field idF = ParameterizedItemImpl.class.getDeclaredField("id");
      idF.setAccessible(true);
      idF.set(workingAction, id);
   }
   return workingAction;
}
 
开发者ID:Alfresco,项目名称:alfresco-repository,代码行数:13,代码来源:ActionServiceImplTest.java


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