Class DeploymentServiceImpl
java.lang.Object
org.craftercms.studio.impl.v1.service.deployment.DeploymentServiceImpl
- All Implemented Interfaces:
DeploymentService,org.springframework.beans.factory.Aware,org.springframework.context.ApplicationContextAware
public class DeploymentServiceImpl
extends Object
implements DeploymentService, org.springframework.context.ApplicationContextAware
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected org.springframework.context.ApplicationContextprotected AuditServiceInternalprotected ContentRepositoryprotected ContentRepositoryprotected ContentServiceprotected DependencyServiceprotected DmFilterWrapperprotected DmPublishServiceprotected ItemServiceInternalprotected NotificationServiceprotected PublishingManagerprotected PublishRequestDAOprotected PublishRequestMapperprotected RetryingDatabaseOperationFacadeprotected SecurityServiceprotected ServicesConfigprotected SiteServiceprotected StudioConfigurationprotected UserServiceInternalprotected WorkflowServiceInternal -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddScheduledItem(String site, String environment, ZonedDateTime launchDate, String path, String packageId, List<ContentItemTO> scheduledItems, DmContentItemComparator comparator, DmContentItemComparator subComparator, List<String> displayPatterns) add a scheduled item created from the given node to the scheduled items list if the item is not a component or a static assetprotected voidaddToScheduledDateList(String site, String environment, ZonedDateTime launchDate, String path, String packageId, List<ContentItemTO> scheduledItems, DmContentItemComparator comparator, DmContentItemComparator subComparator, List<String> displayPatterns) add the given node to the scheduled items listvoidbulkGoLive(String site, String environment, String path, String comment) Start executing bulk publish for given site, path on given environmentvoidcancelWorkflow(String site, String path) voidcancelWorkflowBulk(String site, Set<String> paths) protected ContentItemTOcreateDateItem(String name, ContentItemTO itemToAdd, DmContentItemComparator comparator, String timeZone) voiddelete(String site, List<String> paths, String approver, ZonedDateTime scheduledDate, String submissionComment) Delete contentvoidvoiddeploy(String site, String environment, List<String> paths, ZonedDateTime scheduledDate, String approver, String submissionComment, boolean scheduleDateNow) @javax.validation.Valid booleanenablePublishing(String site, boolean enabled) Enable/Disable publishing for given site@Valid List<ContentItemTO> getScheduledItems(String site, String sort, boolean ascending, String subSort, boolean subAscending, String filterType) @Valid List<PublishRequest> getScheduledItems(String site, String filterType) protected List<ContentItemTO> getScheduledItems(String site, DmContentItemComparator comparator, DmContentItemComparator subComparator, String filterType) voidPublish given commit IDs on given environment for given sitevoidpublishItems(String site, String environment, ZonedDateTime schedule, List<String> paths, String submissionComment) Publish items in given environment for given sitevoidresetStagingEnvironment(String siteId) Reset staging environment to live for given siteprotected voidsendContentApprovalEmail(List<PublishRequest> itemList, boolean scheduleDateNow) voidsetApplicationContext(org.springframework.context.ApplicationContext applicationContext) voidsetAuditServiceInternal(AuditServiceInternal auditServiceInternal) voidsetContentRepository(ContentRepository contentRepository) voidsetContentRepositoryV2(ContentRepository contentRepositoryV2) voidsetContentService(ContentService contentService) voidsetDependencyService(DependencyService dependencyService) voidsetDmFilterWrapper(DmFilterWrapper dmFilterWrapper) voidsetDmPublishService(DmPublishService dmPublishService) voidsetItemServiceInternal(ItemServiceInternal itemServiceInternal) voidsetNotificationService(NotificationService notificationService) voidsetPublishingManager(PublishingManager publishingManager) voidsetPublishRequestDAO(PublishRequestDAO publishRequestDAO) voidsetPublishRequestMapper(PublishRequestMapper publishRequestMapper) voidsetRetryingDatabaseOperationFacade(RetryingDatabaseOperationFacade retryingDatabaseOperationFacade) voidsetSecurityService(SecurityService securityService) voidsetServicesConfig(ServicesConfig servicesConfig) voidsetSiteService(SiteService siteService) voidsetStudioConfiguration(StudioConfiguration studioConfiguration) voidsetUserServiceInternal(UserServiceInternal userServiceInternal) voidsetWorkflowServiceInternal(WorkflowServiceInternal workflowServiceInternal)
-
Field Details
-
servicesConfig
-
contentService
-
dependencyService
-
dmFilterWrapper
-
siteService
-
contentRepository
-
dmPublishService
-
securityService
-
notificationService
-
studioConfiguration
-
publishRequestMapper
-
auditServiceInternal
-
contentRepositoryV2
-
itemServiceInternal
-
workflowServiceInternal
-
userServiceInternal
-
publishingManager
-
publishRequestDAO
-
retryingDatabaseOperationFacade
-
applicationContext
protected org.springframework.context.ApplicationContext applicationContext
-
-
Constructor Details
-
DeploymentServiceImpl
public DeploymentServiceImpl()
-
-
Method Details
-
deploy
@Valid public void deploy(String site, String environment, List<String> paths, ZonedDateTime scheduledDate, String approver, String submissionComment, boolean scheduleDateNow) throws DeploymentException, ServiceLayerException, UserNotFoundException - Specified by:
deployin interfaceDeploymentService- Throws:
DeploymentExceptionServiceLayerExceptionUserNotFoundException
-
sendContentApprovalEmail
protected void sendContentApprovalEmail(List<PublishRequest> itemList, boolean scheduleDateNow) throws ServiceLayerException, UserNotFoundException -
delete
@Valid public void delete(String site, List<String> paths, String approver, ZonedDateTime scheduledDate, String submissionComment) throws DeploymentException, ServiceLayerException, UserNotFoundException Description copied from interface:DeploymentServiceDelete content- Specified by:
deletein interfaceDeploymentService- Parameters:
site- site identifierpaths- list of paths to deleteapprover- user that approved deletionscheduledDate- scheduled date to execute deletionsubmissionComment- submission comment- Throws:
DeploymentException- general deployment errorServiceLayerExceptionUserNotFoundException
-
deleteDeploymentDataForSite
- Specified by:
deleteDeploymentDataForSitein interfaceDeploymentService
-
getScheduledItems
- Specified by:
getScheduledItemsin interfaceDeploymentService
-
cancelWorkflow
- Specified by:
cancelWorkflowin interfaceDeploymentService- Throws:
DeploymentException
-
cancelWorkflowBulk
- Specified by:
cancelWorkflowBulkin interfaceDeploymentService
-
getScheduledItems
@Valid public @Valid List<ContentItemTO> getScheduledItems(String site, String sort, boolean ascending, String subSort, boolean subAscending, String filterType) throws ServiceLayerException - Specified by:
getScheduledItemsin interfaceDeploymentService- Throws:
ServiceLayerException
-
getScheduledItems
protected List<ContentItemTO> getScheduledItems(String site, DmContentItemComparator comparator, DmContentItemComparator subComparator, String filterType) -
addScheduledItem
protected void addScheduledItem(String site, String environment, ZonedDateTime launchDate, String path, String packageId, List<ContentItemTO> scheduledItems, DmContentItemComparator comparator, DmContentItemComparator subComparator, List<String> displayPatterns) add a scheduled item created from the given node to the scheduled items list if the item is not a component or a static asset- Parameters:
site-launchDate-scheduledItems-comparator-displayPatterns-
-
addToScheduledDateList
protected void addToScheduledDateList(String site, String environment, ZonedDateTime launchDate, String path, String packageId, List<ContentItemTO> scheduledItems, DmContentItemComparator comparator, DmContentItemComparator subComparator, List<String> displayPatterns) throws ServiceLayerException add the given node to the scheduled items list- Parameters:
site-launchDate-scheduledItems-comparator-subComparator-displayPatterns-- Throws:
ServiceLayerException
-
createDateItem
protected ContentItemTO createDateItem(String name, ContentItemTO itemToAdd, DmContentItemComparator comparator, String timeZone) -
getAllPublishedEnvironments
-
bulkGoLive
@Valid public void bulkGoLive(String site, String environment, String path, String comment) throws ServiceLayerException Description copied from interface:DeploymentServiceStart executing bulk publish for given site, path on given environment- Specified by:
bulkGoLivein interfaceDeploymentService- Parameters:
site- site identifierenvironment- environment to publish topath- base path for bulk publishcomment- submission comment- Throws:
ServiceLayerException- exception is case of en error
-
enablePublishing
@Valid public @javax.validation.Valid boolean enablePublishing(String site, boolean enabled) throws SiteNotFoundException, AuthenticationException Description copied from interface:DeploymentServiceEnable/Disable publishing for given site- Specified by:
enablePublishingin interfaceDeploymentService- Parameters:
site- site idenabled- true to enable publishing, false to disable publishing- Throws:
SiteNotFoundExceptionAuthenticationException
-
publishCommits
@Valid public void publishCommits(String site, String environment, List<String> commitIds, String comment) throws ServiceLayerException, UserNotFoundException Description copied from interface:DeploymentServicePublish given commit IDs on given environment for given site- Specified by:
publishCommitsin interfaceDeploymentService- Parameters:
site- site id to use for publishingenvironment- environment to use for publishingcommitIds- commit IDs to publish- Throws:
ServiceLayerExceptionUserNotFoundException
-
publishItems
public void publishItems(String site, String environment, ZonedDateTime schedule, List<String> paths, String submissionComment) throws ServiceLayerException, DeploymentException, UserNotFoundException Description copied from interface:DeploymentServicePublish items in given environment for given site- Specified by:
publishItemsin interfaceDeploymentService- Parameters:
site- site id to use for publishingenvironment- environment to use for publishingpaths- item paths to publish- Throws:
ServiceLayerExceptionDeploymentExceptionUserNotFoundException
-
resetStagingEnvironment
public void resetStagingEnvironment(String siteId) throws ServiceLayerException, org.craftercms.commons.crypto.CryptoException Description copied from interface:DeploymentServiceReset staging environment to live for given site- Specified by:
resetStagingEnvironmentin interfaceDeploymentService- Parameters:
siteId- site id to use for resetting- Throws:
ServiceLayerExceptionorg.craftercms.commons.crypto.CryptoException
-
setApplicationContext
public void setApplicationContext(@NonNull org.springframework.context.ApplicationContext applicationContext) - Specified by:
setApplicationContextin interfaceorg.springframework.context.ApplicationContextAware
-
setServicesConfig
-
setContentService
-
setDependencyService
-
setDmFilterWrapper
-
setSiteService
-
setContentRepository
-
setDmPublishService
-
getSecurityService
-
setSecurityService
-
setNotificationService
-
setStudioConfiguration
-
setPublishRequestMapper
-
setAuditServiceInternal
-
setContentRepositoryV2
-
setItemServiceInternal
-
setWorkflowServiceInternal
-
setUserServiceInternal
-
setPublishingManager
-
setPublishRequestDAO
-
setRetryingDatabaseOperationFacade
public void setRetryingDatabaseOperationFacade(RetryingDatabaseOperationFacade retryingDatabaseOperationFacade)
-