Class ImporterActionExecuter
- java.lang.Object
-
- org.alfresco.repo.action.CommonResourceAbstractBase
-
- org.alfresco.repo.action.ParameterizedItemAbstractBase
-
- org.alfresco.repo.action.executer.ActionExecuterAbstractBase
-
- org.alfresco.repo.action.executer.ImporterActionExecuter
-
- All Implemented Interfaces:
ActionExecuter,LoggingAwareExecuter,org.springframework.beans.factory.Aware,org.springframework.beans.factory.BeanNameAware
public class ImporterActionExecuter extends ActionExecuterAbstractBase
Importer action executor- Author:
- gavinc
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringARCHIVE_CONTAINS_SUSPICIOUS_PATHS_ERRORstatic java.lang.StringNAMEstatic java.lang.StringPARAM_DESTINATION_FOLDERstatic java.lang.StringPARAM_ENCODING-
Fields inherited from class org.alfresco.repo.action.executer.ActionExecuterAbstractBase
actionDefinition, applicableTypes, publicAction
-
Fields inherited from class org.alfresco.repo.action.ParameterizedItemAbstractBase
adhocPropertiesAllowed, DISPLAY_LABEL, runtimeActionService
-
Fields inherited from class org.alfresco.repo.action.CommonResourceAbstractBase
name
-
Fields inherited from interface org.alfresco.repo.action.executer.ActionExecuter
PARAM_RESULT
-
-
Constructor Summary
Constructors Constructor Description ImporterActionExecuter()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidaddParameterDefinitions(java.util.List<ParameterDefinition> paramList)Adds the parameter definitions to the liststatic voiddeleteDir(java.io.File dir)Recursively delete a dir of files and directoriesvoidexecuteImpl(Action ruleAction, org.alfresco.service.cmr.repository.NodeRef actionedUponNodeRef)Execute the action implementationstatic voidextractFile(org.apache.commons.compress.archivers.zip.ZipFile archive, java.lang.String extractDir)Extract the file and folder structure of a ZIP file into the specified directorybooleanisHighByteZip()voidsetContentService(ContentService contentService)Sets the ContentService to usevoidsetFileFolderService(FileFolderService fileFolderService)Sets the FileFolderService to usevoidsetHighByteZip(boolean highByteZip)voidsetImporterService(ImporterService importerService)Sets the ImporterService to usevoidsetNodeService(org.alfresco.service.cmr.repository.NodeService nodeService)Sets the NodeService to use-
Methods inherited from class org.alfresco.repo.action.executer.ActionExecuterAbstractBase
createActionDefinition, execute, getActionDefinition, getIgnoreLock, getQueueName, getTrackStatus, init, isApplicableType, onLogException, setApplicableTypes, setBaseNodeService, setDictionaryService, setIgnoreLock, setLockService, setMlAwareNodeService, setPublicAction, setQueueName, setTrackStatus
-
Methods inherited from class org.alfresco.repo.action.ParameterizedItemAbstractBase
checkMandatoryProperties, getAdhocPropertiesAllowed, getDescriptionKey, getLocalizedParameterDefinitions, getParamDisplayLabel, getParamDisplayLabel, getParameterDefintions, getTitleKey, setAdhocPropertiesAllowed, setLocales, setRuntimeActionService, toString
-
Methods inherited from class org.alfresco.repo.action.CommonResourceAbstractBase
setBeanName
-
-
-
-
Field Detail
-
NAME
public static final java.lang.String NAME
- See Also:
- Constant Field Values
-
PARAM_ENCODING
public static final java.lang.String PARAM_ENCODING
- See Also:
- Constant Field Values
-
PARAM_DESTINATION_FOLDER
public static final java.lang.String PARAM_DESTINATION_FOLDER
- See Also:
- Constant Field Values
-
ARCHIVE_CONTAINS_SUSPICIOUS_PATHS_ERROR
public static final java.lang.String ARCHIVE_CONTAINS_SUSPICIOUS_PATHS_ERROR
- See Also:
- Constant Field Values
-
-
Method Detail
-
setImporterService
public void setImporterService(ImporterService importerService)
Sets the ImporterService to use- Parameters:
importerService- The ImporterService
-
setNodeService
public void setNodeService(org.alfresco.service.cmr.repository.NodeService nodeService)
Sets the NodeService to use- Parameters:
nodeService- The NodeService
-
setContentService
public void setContentService(ContentService contentService)
Sets the ContentService to use- Parameters:
contentService- The ContentService
-
setFileFolderService
public void setFileFolderService(FileFolderService fileFolderService)
Sets the FileFolderService to use- Parameters:
fileFolderService- The FileFolderService
-
isHighByteZip
public boolean isHighByteZip()
- Returns:
- the highByteZip encoding switch
-
setHighByteZip
public void setHighByteZip(boolean highByteZip)
- Parameters:
highByteZip- the encoding switch for high-byte ZIP filenames to set
-
executeImpl
public void executeImpl(Action ruleAction, org.alfresco.service.cmr.repository.NodeRef actionedUponNodeRef)
Description copied from class:ActionExecuterAbstractBaseExecute the action implementation- Specified by:
executeImplin classActionExecuterAbstractBase- Parameters:
ruleAction- the actionactionedUponNodeRef- the actioned upon node- See Also:
ActionExecuter.execute(Action, NodeRef)
-
addParameterDefinitions
protected void addParameterDefinitions(java.util.List<ParameterDefinition> paramList)
Description copied from class:ParameterizedItemAbstractBaseAdds the parameter definitions to the list- Specified by:
addParameterDefinitionsin classParameterizedItemAbstractBase- Parameters:
paramList- the parameter definitions list- See Also:
ParameterizedItemAbstractBase.addParameterDefinitions(java.util.List)
-
extractFile
public static void extractFile(org.apache.commons.compress.archivers.zip.ZipFile archive, java.lang.String extractDir)Extract the file and folder structure of a ZIP file into the specified directory- Parameters:
archive- The ZIP archive to extractextractDir- The directory to extract into
-
deleteDir
public static void deleteDir(java.io.File dir)
Recursively delete a dir of files and directories- Parameters:
dir- directory to delete
-
-