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


Java Action.setTitle方法代码示例

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


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

示例1: testSimpleProperties

import org.alfresco.service.cmr.action.Action; //导入方法依赖的package包/类
public void testSimpleProperties()
{
    Action action = (Action)create();
    
    // Check the default values
    assertFalse(action.getExecuteAsychronously());
    assertNull(action.getCompensatingAction());
    
    // Set some values
    action.setTitle("title");
    action.setDescription("description");
    action.setExecuteAsynchronously(true);
    Action compensatingAction = new ActionImpl(null, GUID.generate(), "actionDefintionName", null);
    action.setCompensatingAction(compensatingAction);
    
    // Check the values have been set
    assertEquals("title", action.getTitle());
    assertEquals("description", action.getDescription());
    assertTrue(action.getExecuteAsychronously());
    assertEquals(compensatingAction, action.getCompensatingAction());
}
 
开发者ID:Alfresco,项目名称:alfresco-repository,代码行数:22,代码来源:ActionImplTest.java

示例2: 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

示例3: 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


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