本文整理汇总了Java中org.alfresco.repo.action.executer.ActionExecuterAbstractBase类的典型用法代码示例。如果您正苦于以下问题:Java ActionExecuterAbstractBase类的具体用法?Java ActionExecuterAbstractBase怎么用?Java ActionExecuterAbstractBase使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
ActionExecuterAbstractBase类属于org.alfresco.repo.action.executer包,在下文中一共展示了ActionExecuterAbstractBase类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: execute
import org.alfresco.repo.action.executer.ActionExecuterAbstractBase; //导入依赖的package包/类
/**
* @see org.alfresco.module.org_alfresco_module_rm.RecordsManagementAction#execute(org.alfresco.service.cmr.repository.NodeRef, java.util.Map)
*/
public RecordsManagementActionResult execute(NodeRef filePlanComponent, Map<String, Serializable> parameters)
{
// Create the action
Action action = this.actionService.createAction(name);
action.setParameterValues(parameters);
// disable model security whilst we execute the RM rule
modelSecurityService.disable();
try
{
// Execute the action
actionService.executeAction(action, filePlanComponent);
}
finally
{
modelSecurityService.enable();
}
// Get the result
Object value = action.getParameterValue(ActionExecuterAbstractBase.PARAM_RESULT);
return new RecordsManagementActionResult(value);
}
示例2: executeImpl
import org.alfresco.repo.action.executer.ActionExecuterAbstractBase; //导入依赖的package包/类
/**
* @see org.alfresco.repo.action.executer.ActionExecuterAbstractBase#executeImpl(org.alfresco.service.cmr.action.Action,
* org.alfresco.service.cmr.repository.NodeRef)
*/
@Override
protected void executeImpl(Action action, NodeRef actionedUponNodeRef)
{
// get the mimetype of the report
String mimetype = (String) action.getParameterValue(MIMETYPE);
if (mimetype == null || mimetype.isEmpty())
{
mimetype = MimetypeMap.MIMETYPE_HTML;
}
// get the report type
QName reportType = getReportType(action);
// get the destination
final NodeRef destination = getDestination(action);
// Check the filing permission only capability for the destination
checkFilingPermissionOnlyCapability(destination);
// generate the report
final Report report = getReportService().generateReport(reportType, actionedUponNodeRef, mimetype);
// file the report as system
NodeRef filedReport = AuthenticationUtil.runAsSystem(new RunAsWork<NodeRef>()
{
@Override
public NodeRef doWork()
{
return getReportService().fileReport(destination, report);
}
});
// return the report name
String filedReportName = (String) getNodeService().getProperty(filedReport, ContentModel.PROP_NAME);
action.setParameterValue(ActionExecuterAbstractBase.PARAM_RESULT, filedReportName);
}
示例3: executeImpl
import org.alfresco.repo.action.executer.ActionExecuterAbstractBase; //导入依赖的package包/类
/**
* @see org.alfresco.repo.action.executer.ActionExecuterAbstractBase#executeImpl(org.alfresco.service.cmr.action.Action, org.alfresco.service.cmr.repository.NodeRef)
*/
@Override
protected void executeImpl(final Action action, final NodeRef actionedUponNodeRef)
{
if (getNodeService().exists(actionedUponNodeRef) &&
getRecordService().isRecord(actionedUponNodeRef) &&
!getFreezeService().isFrozen(actionedUponNodeRef))
{
if (!getRecordService().isDeclared(actionedUponNodeRef))
{
List<String> missingProperties = new ArrayList<String>(5);
// Aspect not already defined - check mandatory properties then add
if (!checkMandatoryPropertiesEnabled ||
mandatoryPropertiesSet(actionedUponNodeRef, missingProperties))
{
getRecordService().disablePropertyEditableCheck();
try
{
// Add the declared aspect
Map<QName, Serializable> declaredProps = new HashMap<QName, Serializable>(2);
declaredProps.put(PROP_DECLARED_AT, new Date());
declaredProps.put(PROP_DECLARED_BY, AuthenticationUtil.getRunAsUser());
this.getNodeService().addAspect(actionedUponNodeRef, ASPECT_DECLARED_RECORD, declaredProps);
AuthenticationUtil.runAsSystem(new RunAsWork<Void>()
{
@Override
public Void doWork()
{
// remove all owner related rights
getOwnableService().setOwner(actionedUponNodeRef, OwnableService.NO_OWNER);
return null;
}
});
}
finally
{
getRecordService().enablePropertyEditableCheck();
}
}
else
{
logger.debug(buildMissingPropertiesErrorString(missingProperties));
action.setParameterValue(ActionExecuterAbstractBase.PARAM_RESULT, "missingProperties");
}
}
}
else
{
if (logger.isWarnEnabled())
{
logger.warn(I18NUtil.getMessage(MSG_UNDECLARED_ONLY_RECORDS, actionedUponNodeRef.toString()));
}
}
}