本文整理汇总了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);
}
}
示例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;
}
示例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;
}