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.ApplicationContext
protected AuditServiceInternal
protected ContentRepository
protected ContentRepository
protected ContentService
protected DependencyService
protected DmFilterWrapper
protected DmPublishService
protected ItemServiceInternal
protected NotificationService
protected PublishingManager
protected PublishRequestDAO
protected PublishRequestMapper
protected RetryingDatabaseOperationFacade
protected SecurityService
protected ServicesConfig
protected SiteService
protected StudioConfiguration
protected UserServiceInternal
protected WorkflowServiceInternal
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
bulkGoLive
(String site, String environment, String path, String comment) Start executing bulk publish for given site, path on given environmentvoid
cancelWorkflow
(String site, String path) void
cancelWorkflowBulk
(String site, Set<String> paths) void
delete
(String site, List<String> paths, String approver, ZonedDateTime scheduledDate, String submissionComment) Delete contentvoid
void
deploy
(String site, String environment, List<String> paths, ZonedDateTime scheduledDate, String approver, String submissionComment, boolean scheduleDateNow) @jakarta.validation.Valid boolean
enablePublishing
(String site, boolean enabled) Enable/Disable publishing for given sitevoid
Publish given commit IDs on given environment for given sitevoid
resetStagingEnvironment
(String siteId) Reset staging environment to live for given siteprotected void
sendContentApprovalEmail
(List<PublishRequest> itemList, boolean scheduleDateNow) void
setApplicationContext
(org.springframework.context.ApplicationContext applicationContext) void
setAuditServiceInternal
(AuditServiceInternal auditServiceInternal) void
setContentRepository
(ContentRepository contentRepository) void
setContentRepositoryV2
(ContentRepository contentRepositoryV2) void
setContentService
(ContentService contentService) void
setDependencyService
(DependencyService dependencyService) void
setDmFilterWrapper
(DmFilterWrapper dmFilterWrapper) void
setDmPublishService
(DmPublishService dmPublishService) void
setItemServiceInternal
(ItemServiceInternal itemServiceInternal) void
setNotificationService
(NotificationService notificationService) void
setPublishingManager
(PublishingManager publishingManager) void
setPublishRequestDAO
(PublishRequestDAO publishRequestDAO) void
setPublishRequestMapper
(PublishRequestMapper publishRequestMapper) void
setRetryingDatabaseOperationFacade
(RetryingDatabaseOperationFacade retryingDatabaseOperationFacade) void
setSecurityService
(SecurityService securityService) void
setServicesConfig
(ServicesConfig servicesConfig) void
setSiteService
(SiteService siteService) void
setStudioConfiguration
(StudioConfiguration studioConfiguration) void
setUserServiceInternal
(UserServiceInternal userServiceInternal) void
setWorkflowServiceInternal
(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:
deploy
in interfaceDeploymentService
- Throws:
DeploymentException
ServiceLayerException
UserNotFoundException
-
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:DeploymentService
Delete content- Specified by:
delete
in 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 errorServiceLayerException
UserNotFoundException
-
deleteDeploymentDataForSite
- Specified by:
deleteDeploymentDataForSite
in interfaceDeploymentService
-
cancelWorkflow
- Specified by:
cancelWorkflow
in interfaceDeploymentService
- Throws:
DeploymentException
-
cancelWorkflowBulk
- Specified by:
cancelWorkflowBulk
in interfaceDeploymentService
-
getAllPublishedEnvironments
-
bulkGoLive
@Valid public void bulkGoLive(String site, String environment, String path, String comment) throws ServiceLayerException Description copied from interface:DeploymentService
Start executing bulk publish for given site, path on given environment- Specified by:
bulkGoLive
in 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 @jakarta.validation.Valid boolean enablePublishing(String site, boolean enabled) throws SiteNotFoundException, AuthenticationException Description copied from interface:DeploymentService
Enable/Disable publishing for given site- Specified by:
enablePublishing
in interfaceDeploymentService
- Parameters:
site
- site idenabled
- true to enable publishing, false to disable publishing- Throws:
SiteNotFoundException
- if the site cannot be foundAuthenticationException
-
publishCommits
@Valid public void publishCommits(String site, String environment, List<String> commitIds, String comment) throws SiteNotFoundException, EnvironmentNotFoundException, CommitNotFoundException Description copied from interface:DeploymentService
Publish given commit IDs on given environment for given site- Specified by:
publishCommits
in interfaceDeploymentService
- Parameters:
site
- site id to use for publishingenvironment
- environment to use for publishingcommitIds
- commit IDs to publish- Throws:
SiteNotFoundException
EnvironmentNotFoundException
CommitNotFoundException
-
resetStagingEnvironment
public void resetStagingEnvironment(String siteId) throws ServiceLayerException, org.craftercms.commons.crypto.CryptoException Description copied from interface:DeploymentService
Reset staging environment to live for given site- Specified by:
resetStagingEnvironment
in interfaceDeploymentService
- Parameters:
siteId
- site id to use for resetting- Throws:
ServiceLayerException
org.craftercms.commons.crypto.CryptoException
-
setApplicationContext
public void setApplicationContext(@NonNull org.springframework.context.ApplicationContext applicationContext) - Specified by:
setApplicationContext
in 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)
-