public class TransformActionExecuter extends ActionExecuterAbstractBase
Modifier and Type | Field and Description |
---|---|
static String |
ERR_OVERWRITE |
static String |
NAME |
protected TransformationOptions |
options
Deprecated.
|
static String |
PARAM_ASSOC_QNAME |
static String |
PARAM_ASSOC_TYPE_QNAME |
static String |
PARAM_DESTINATION_FOLDER |
static String |
PARAM_MIME_TYPE |
static String |
PARAM_OVERWRITE_COPY |
actionDefinition, applicableTypes, publicAction
adhocPropertiesAllowed, DISPLAY_LABEL, runtimeActionService
name
PARAM_RESULT
Constructor and Description |
---|
TransformActionExecuter() |
Modifier and Type | Method and Description |
---|---|
protected void |
addParameterDefinitions(List<ParameterDefinition> paramList)
Add parameter definitions
|
protected void |
doTransform(Action ruleAction,
org.alfresco.service.cmr.repository.NodeRef sourceNodeRef,
org.alfresco.service.cmr.repository.ContentReader contentReader,
org.alfresco.service.cmr.repository.NodeRef destinationNodeRef,
org.alfresco.service.cmr.repository.ContentWriter contentWriter)
Executed in a new transaction so that failures don't cause the entire transaction to rollback.
|
protected void |
executeImpl(Action ruleAction,
org.alfresco.service.cmr.repository.NodeRef actionedUponNodeRef)
Execute the action implementation
|
protected TransformationOptions |
newTransformationOptions(Action ruleAction,
org.alfresco.service.cmr.repository.NodeRef sourceNodeRef) |
boolean |
onLogException(org.apache.commons.logging.Log logger,
Throwable t,
String message)
Optional logging of errors callback for the action executer
for the cases when the error might be ignored
or shown in a different manner for the action
|
void |
setCheckOutCheckInService(CheckOutCheckInService checkOutCheckInService)
Set the service to determine check-in and check-out status
|
void |
setContentService(ContentService contentService)
Set the content service
|
void |
setCopyService(CopyService copyService)
Set the copy service
|
void |
setDictionaryService(org.alfresco.service.cmr.dictionary.DictionaryService dictionaryService)
Set the dictionary service
|
void |
setMimetypeService(org.alfresco.service.cmr.repository.MimetypeService mimetypeService)
Set the mime type service
|
void |
setNodeService(org.alfresco.service.cmr.repository.NodeService nodeService)
Set the node service
|
static String |
transformName(org.alfresco.service.cmr.repository.MimetypeService mimetypeService,
String original,
String newMimetype,
boolean alwaysAdd)
Transform a name from original extension to new extension, if appropriate.
|
createActionDefinition, execute, getActionDefinition, getIgnoreLock, getQueueName, getTrackStatus, init, isApplicableType, setApplicableTypes, setBaseNodeService, setIgnoreLock, setLockService, setMlAwareNodeService, setPublicAction, setQueueName, setTrackStatus
checkMandatoryProperties, getAdhocPropertiesAllowed, getDescriptionKey, getLocalizedParameterDefinitions, getParamDisplayLabel, getParamDisplayLabel, getParameterDefintions, getTitleKey, setAdhocPropertiesAllowed, setLocales, setRuntimeActionService, toString
setBeanName
public static final String ERR_OVERWRITE
public static final String NAME
public static final String PARAM_MIME_TYPE
public static final String PARAM_DESTINATION_FOLDER
public static final String PARAM_ASSOC_TYPE_QNAME
public static final String PARAM_ASSOC_QNAME
public static final String PARAM_OVERWRITE_COPY
@Deprecated protected TransformationOptions options
public void setMimetypeService(org.alfresco.service.cmr.repository.MimetypeService mimetypeService)
public void setNodeService(org.alfresco.service.cmr.repository.NodeService nodeService)
public void setCheckOutCheckInService(CheckOutCheckInService checkOutCheckInService)
public void setDictionaryService(org.alfresco.service.cmr.dictionary.DictionaryService dictionaryService)
setDictionaryService
in class ActionExecuterAbstractBase
dictionaryService
- the dictionary servicepublic void setContentService(ContentService contentService)
public void setCopyService(CopyService copyService)
protected void addParameterDefinitions(List<ParameterDefinition> paramList)
addParameterDefinitions
in class ParameterizedItemAbstractBase
paramList
- the parameter definitions listprotected void executeImpl(Action ruleAction, org.alfresco.service.cmr.repository.NodeRef actionedUponNodeRef)
ActionExecuterAbstractBase
executeImpl
in class ActionExecuterAbstractBase
ruleAction
- the actionactionedUponNodeRef
- the actioned upon nodeActionExecuterAbstractBase.executeImpl(Action, org.alfresco.service.cmr.repository.NodeRef)
protected TransformationOptions newTransformationOptions(Action ruleAction, org.alfresco.service.cmr.repository.NodeRef sourceNodeRef)
protected void doTransform(Action ruleAction, org.alfresco.service.cmr.repository.NodeRef sourceNodeRef, org.alfresco.service.cmr.repository.ContentReader contentReader, org.alfresco.service.cmr.repository.NodeRef destinationNodeRef, org.alfresco.service.cmr.repository.ContentWriter contentWriter)
public static String transformName(org.alfresco.service.cmr.repository.MimetypeService mimetypeService, String original, String newMimetype, boolean alwaysAdd)
mimetypeService
- the mimetype serviceoriginal
- the original namenewMimetype
- the new mime typealwaysAdd
- if the name has no extension, then add the new onepublic boolean onLogException(org.apache.commons.logging.Log logger, Throwable t, String message)
LoggingAwareExecuter
onLogException
in interface LoggingAwareExecuter
onLogException
in class ActionExecuterAbstractBase
logger
- the loggert
- the exception thrownmessage
- the proposed message that will be loggedCopyright © 2005–2017 Alfresco Software. All rights reserved.