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.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
public class BeCPGCreateDownloadArchiveAction
extends org.alfresco.repo.action.executer.ActionExecuterAbstractBase
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 org.alfresco.repo.download.ContentServiceHelperprivate static final Stringprivate org.alfresco.service.cmr.dictionary.DictionaryServiceprivate org.alfresco.repo.download.DownloadStorageprivate EntityServiceprivate org.alfresco.service.cmr.view.ExporterServiceprivate static final org.slf4j.Loggerprivate longprivate org.alfresco.service.cmr.repository.NodeServiceprivate org.alfresco.service.cmr.security.PermissionServiceprivate static final Stringprivate static final Stringprivate org.alfresco.repo.transaction.RetryingTransactionHelperprivate org.alfresco.repo.download.DownloadStatusUpdateServiceFields 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 voidarchiveCreationComplete(org.alfresco.service.cmr.repository.NodeRef actionedUponNodeRef, File tempFile, BeCPGZipDownloadExporter handler) private voidcreateDownload(org.alfresco.service.cmr.repository.NodeRef actionedUponNodeRef, org.alfresco.service.cmr.view.ExporterCrawlerParameters crawlerParameters, BeCPGCreateDownloadArchiveAction.SizeEstimator estimator) private voiddownloadCancelled(org.alfresco.service.cmr.repository.NodeRef actionedUponNodeRef, BeCPGZipDownloadExporter handler) 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.private voidmaximumContentSizeExceeded(org.alfresco.service.cmr.repository.NodeRef actionedUponNodeRef, long size, long fileCount) voidsetCheckOutCheckInSerivce(org.alfresco.service.cmr.coci.CheckOutCheckInService checkOutCheckInService) setCheckOutCheckInSerivce.voidsetContentServiceHelper(org.alfresco.repo.download.ContentServiceHelper contentServiceHelper) Setter for the fieldcontentServiceHelper.voidsetDictionaryService(org.alfresco.service.cmr.dictionary.DictionaryService dictionaryService) voidsetDownloadStorage(org.alfresco.repo.download.DownloadStorage downloadStorage) Setter for the fielddownloadStorage.voidsetEntityService(EntityService entityService) Setter for the fieldentityService.voidsetExporterService(org.alfresco.service.cmr.view.ExporterService exporterService) Setter for the fieldexporterService.voidsetMaximumContentSize(long maximumContentSize) Set the maximum total size of content that can be added to a single download. -1 indicates no limit.voidsetNodeService(org.alfresco.service.cmr.repository.NodeService nodeService) Setter for the fieldnodeService.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 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 log -
CREATION_ERROR
- See Also:
-
TEMP_FILE_PREFIX
- See Also:
-
TEMP_FILE_SUFFIX
- See Also:
-
checkOutCheckInService
private org.alfresco.service.cmr.coci.CheckOutCheckInService checkOutCheckInService -
contentServiceHelper
private org.alfresco.repo.download.ContentServiceHelper contentServiceHelper -
downloadStorage
private org.alfresco.repo.download.DownloadStorage downloadStorage -
exporterService
private org.alfresco.service.cmr.view.ExporterService exporterService -
nodeService
private org.alfresco.service.cmr.repository.NodeService nodeService -
transactionHelper
private org.alfresco.repo.transaction.RetryingTransactionHelper transactionHelper -
updateService
private org.alfresco.repo.download.DownloadStatusUpdateService updateService -
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
-
setContentServiceHelper
public void setContentServiceHelper(org.alfresco.repo.download.ContentServiceHelper contentServiceHelper) Setter for the field
contentServiceHelper.- Parameters:
contentServiceHelper- aContentServiceHelperobject
-
setDownloadStorage
public void setDownloadStorage(org.alfresco.repo.download.DownloadStorage downloadStorage) Setter for the field
downloadStorage.- Parameters:
downloadStorage- aDownloadStorageobject
-
setExporterService
public void setExporterService(org.alfresco.service.cmr.view.ExporterService exporterService) Setter for the field
exporterService.- Parameters:
exporterService- aExporterServiceobject
-
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
-
setNodeService
public void setNodeService(org.alfresco.service.cmr.repository.NodeService nodeService) Setter for the field
nodeService.- Parameters:
nodeService- aNodeServiceobject
-
setTransactionHelper
public void setTransactionHelper(org.alfresco.repo.transaction.RetryingTransactionHelper transactionHelper) Setter for the field
transactionHelper.- Parameters:
transactionHelper- aRetryingTransactionHelperobject
-
setUpdateService
public void setUpdateService(org.alfresco.repo.download.DownloadStatusUpdateService updateService) Setter for the field
updateService.- 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
-
addParameterDefinitions
protected void addParameterDefinitions(List<org.alfresco.service.cmr.action.ParameterDefinition> paramList) - Specified by:
addParameterDefinitionsin classorg.alfresco.repo.action.ParameterizedItemAbstractBase
-
maximumContentSizeExceeded
private void maximumContentSizeExceeded(org.alfresco.service.cmr.repository.NodeRef actionedUponNodeRef, long size, long fileCount) -
createDownload
private void createDownload(org.alfresco.service.cmr.repository.NodeRef actionedUponNodeRef, org.alfresco.service.cmr.view.ExporterCrawlerParameters crawlerParameters, BeCPGCreateDownloadArchiveAction.SizeEstimator estimator) -
archiveCreationComplete
private void archiveCreationComplete(org.alfresco.service.cmr.repository.NodeRef actionedUponNodeRef, File tempFile, BeCPGZipDownloadExporter handler) -
downloadCancelled
private void downloadCancelled(org.alfresco.service.cmr.repository.NodeRef actionedUponNodeRef, BeCPGZipDownloadExporter handler)
-