Package fr.becpg.repo.download
Class BeCPGCreateDownloadArchiveAction
java.lang.Object
org.alfresco.repo.action.CommonResourceAbstractBase
org.alfresco.repo.action.ParameterizedItemAbstractBase
org.alfresco.repo.action.executer.ActionExecuterAbstractBase
fr.becpg.repo.download.AbstractDownloadArchiveAction
fr.becpg.repo.download.BeCPGCreateDownloadArchiveAction
- All Implemented Interfaces:
org.alfresco.repo.action.executer.ActionExecuter,org.alfresco.repo.action.executer.LoggingAwareExecuter,org.springframework.beans.factory.Aware,org.springframework.beans.factory.BeanNameAware
ActionExecuterAbstractBase for creating an archive (ie. zip) file containing
content from the repository.
The maximum total size of the content which can be downloaded is controlled
by the maximumContentSie property. -1 indicates no limit.- Version:
- $Id: $Id
- Author:
- Alex Miller
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static class -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate org.alfresco.service.cmr.coci.CheckOutCheckInServiceprivate static final StringConstantCREATION_ERROR="Unexpected error creating archive file "{trunked}private org.alfresco.service.cmr.dictionary.DictionaryServiceprivate EntityServiceprivate static final org.slf4j.LoggerConstantlogprivate longprivate org.alfresco.service.cmr.security.PermissionServiceprivate static final StringConstantTEMP_FILE_PREFIX="download"private static final StringConstantTEMP_FILE_SUFFIX=".zip"Fields inherited from class fr.becpg.repo.download.AbstractDownloadArchiveAction
beCPGAuditService, contentService, contentServiceHelper, downloadStorage, exporterService, mimetypeService, nodeService, transactionHelper, updateServiceFields inherited from class org.alfresco.repo.action.executer.ActionExecuterAbstractBase
actionAccessRestrictions, actionDefinition, applicableTypes, publicActionFields inherited from class org.alfresco.repo.action.ParameterizedItemAbstractBase
adhocPropertiesAllowed, DISPLAY_LABEL, runtimeActionServiceFields inherited from class org.alfresco.repo.action.CommonResourceAbstractBase
nameFields inherited from interface org.alfresco.repo.action.executer.ActionExecuter
PARAM_RESULT -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddParameterDefinitions(List<org.alfresco.service.cmr.action.ParameterDefinition> paramList) private org.alfresco.service.cmr.view.ExporterCrawlerParameterscreateArchiveCrawlerParameters(org.alfresco.service.cmr.repository.NodeRef[] nodeRefs) Build the crawler parameters of a repository archive: the nodes are crawled with their content but without their renditions, discussions, versioned associations nor entity lists.private voidcreateDownload(org.alfresco.service.cmr.repository.NodeRef actionedUponNodeRef, org.alfresco.service.cmr.view.ExporterCrawlerParameters crawlerParameters, BeCPGCreateDownloadArchiveAction.SizeEstimator estimator) protected voidexecuteImpl(org.alfresco.service.cmr.action.Action action, org.alfresco.service.cmr.repository.NodeRef actionedUponNodeRef) Create an archive file containing content from the repository.voidsetCheckOutCheckInSerivce(org.alfresco.service.cmr.coci.CheckOutCheckInService checkOutCheckInService) setCheckOutCheckInSerivce.voidsetDictionaryService(org.alfresco.service.cmr.dictionary.DictionaryService dictionaryService) voidsetEntityService(EntityService entityService) Setter for the fieldentityService.voidsetMaximumContentSize(long maximumContentSize) Set the maximum total size of content that can be added to a single download. -1 indicates no limit.voidsetPermissionService(org.alfresco.service.cmr.security.PermissionService permissionService) Setter for the fieldpermissionService.voidsetTransactionHelper(org.alfresco.repo.transaction.RetryingTransactionHelper transactionHelper) Setter for the fieldtransactionHelper.voidsetUpdateService(org.alfresco.repo.download.DownloadStatusUpdateService updateService) Setter for the fieldupdateService.Methods inherited from class fr.becpg.repo.download.AbstractDownloadArchiveAction
completeDownload, completeExportSearchAudit, completeIfEmpty, createCrawlerParameters, getNodeRefsToExport, maximumContentSizeExceeded, publishStatus, runExport, runExport, setBeCPGAuditService, setContentService, setContentServiceHelper, setDownloadStorage, setExporterService, setMimetypeService, setNodeServiceMethods inherited from class org.alfresco.repo.action.executer.ActionExecuterAbstractBase
createActionDefinition, execute, getActionAccessRestrictions, getActionDefinition, getIgnoreLock, getQueueName, getTrackStatus, init, isApplicableType, onLogException, setActionAccessRestrictions, setApplicableTypes, setBaseNodeService, setIgnoreLock, setLockService, setMlAwareNodeService, setPublicAction, setQueueName, setTrackStatus, verifyActionAccessRestrictionsMethods inherited from class org.alfresco.repo.action.ParameterizedItemAbstractBase
checkMandatoryProperties, getAdhocPropertiesAllowed, getDescriptionKey, getLocalizedParameterDefinitions, getParamDisplayLabel, getParamDisplayLabel, getParameterDefintions, getTitleKey, setAdhocPropertiesAllowed, setLocales, setRuntimeActionService, toStringMethods inherited from class org.alfresco.repo.action.CommonResourceAbstractBase
setBeanNameMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.alfresco.repo.action.executer.ActionExecuter
isExecuteAsynchronously
-
Field Details
-
log
private static final org.slf4j.Logger logConstantlog -
CREATION_ERROR
ConstantCREATION_ERROR="Unexpected error creating archive file "{trunked}- See Also:
-
TEMP_FILE_PREFIX
ConstantTEMP_FILE_PREFIX="download"- See Also:
-
TEMP_FILE_SUFFIX
ConstantTEMP_FILE_SUFFIX=".zip"- See Also:
-
checkOutCheckInService
private org.alfresco.service.cmr.coci.CheckOutCheckInService checkOutCheckInService -
dictionaryService
private org.alfresco.service.cmr.dictionary.DictionaryService dictionaryService -
entityService
-
permissionService
private org.alfresco.service.cmr.security.PermissionService permissionService -
maximumContentSize
private long maximumContentSize
-
-
Constructor Details
-
BeCPGCreateDownloadArchiveAction
public BeCPGCreateDownloadArchiveAction()
-
-
Method Details
-
setCheckOutCheckInSerivce
public void setCheckOutCheckInSerivce(org.alfresco.service.cmr.coci.CheckOutCheckInService checkOutCheckInService) setCheckOutCheckInSerivce.
- Parameters:
checkOutCheckInService- aCheckOutCheckInServiceobject
-
setPermissionService
public void setPermissionService(org.alfresco.service.cmr.security.PermissionService permissionService) Setter for the field
permissionService.- Parameters:
permissionService- aPermissionServiceobject
-
setEntityService
Setter for the field
entityService.- Parameters:
entityService- aEntityServiceobject
-
setMaximumContentSize
public void setMaximumContentSize(long maximumContentSize) Set the maximum total size of content that can be added to a single download. -1 indicates no limit.- Parameters:
maximumContentSize- a long
-
setTransactionHelper
public void setTransactionHelper(org.alfresco.repo.transaction.RetryingTransactionHelper transactionHelper) Setter for the field
transactionHelper.- Overrides:
setTransactionHelperin classAbstractDownloadArchiveAction- Parameters:
transactionHelper- aRetryingTransactionHelperobject
-
setUpdateService
public void setUpdateService(org.alfresco.repo.download.DownloadStatusUpdateService updateService) Setter for the field
updateService.- Overrides:
setUpdateServicein classAbstractDownloadArchiveAction- Parameters:
updateService- aDownloadStatusUpdateServiceobject
-
setDictionaryService
public void setDictionaryService(org.alfresco.service.cmr.dictionary.DictionaryService dictionaryService) - Overrides:
setDictionaryServicein classorg.alfresco.repo.action.executer.ActionExecuterAbstractBase
-
executeImpl
protected void executeImpl(org.alfresco.service.cmr.action.Action action, org.alfresco.service.cmr.repository.NodeRef actionedUponNodeRef) Create an archive file containing content from the repository. Uses theExporterServicewith custom exporters to create the archive files.- Specified by:
executeImplin classorg.alfresco.repo.action.executer.ActionExecuterAbstractBase
-
createArchiveCrawlerParameters
private org.alfresco.service.cmr.view.ExporterCrawlerParameters createArchiveCrawlerParameters(org.alfresco.service.cmr.repository.NodeRef[] nodeRefs) Build the crawler parameters of a repository archive: the nodes are crawled with their content but without their renditions, discussions, versioned associations nor entity lists.- Parameters:
nodeRefs- an array ofNodeRefobjects- Returns:
- a
ExporterCrawlerParametersobject
-
addParameterDefinitions
protected void addParameterDefinitions(List<org.alfresco.service.cmr.action.ParameterDefinition> paramList) - Specified by:
addParameterDefinitionsin classorg.alfresco.repo.action.ParameterizedItemAbstractBase
-
createDownload
private void createDownload(org.alfresco.service.cmr.repository.NodeRef actionedUponNodeRef, org.alfresco.service.cmr.view.ExporterCrawlerParameters crawlerParameters, BeCPGCreateDownloadArchiveAction.SizeEstimator estimator)
-