Class PublishServiceInternalImpl
- java.lang.Object
-
- org.craftercms.studio.impl.v2.service.publish.internal.PublishServiceInternalImpl
-
- All Implemented Interfaces:
PublishServiceInternal
public class PublishServiceInternalImpl extends Object implements PublishServiceInternal
-
-
Constructor Summary
Constructors Constructor Description PublishServiceInternalImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
cancelPublishingPackages(String siteId, List<String> packageIds)
Cancel publishing packagesvoid
cancelScheduledQueueItems(String siteId, List<String> paths)
Cancel scheduled items from publishing queueContentRepository
getContentRepository()
List<DeploymentHistoryItem>
getDeploymentHistory(String siteId, List<String> environments, ZonedDateTime fromDate, ZonedDateTime toDate, String filterType, int numberOfItems)
Get deployment history from databaseDmFilterWrapper
getDmFilterWrapper()
List<PublishingHistoryItem>
getPublishingHistory(String siteId, String environment, String path, String publisher, ZonedDateTime dateFrom, ZonedDateTime dateTo, String contentType, long state, String sortBy, String order, int offset, int limit)
Get deployment history items for given search parametersint
getPublishingHistoryTotal(String siteId, String environment, String path, String publisher, ZonedDateTime dateFrom, ZonedDateTime dateTo, String contentType, long state)
Get total number of publishing history items for given search parametersPublishingPackageDetails
getPublishingPackageDetails(String siteId, String packageId)
Get publishing package detailsList<PublishingPackage>
getPublishingPackages(String siteId, String environment, String path, List<String> states, int offset, int limit)
Get publishing packages for given search parametersint
getPublishingPackagesTotal(String siteId, String environment, String path, List<String> states)
Get total number of publishing packages for given search parametersPublishRequestDAO
getPublishRequestDao()
RetryingDatabaseOperationFacade
getRetryingDatabaseOperationFacade()
void
initialPublish(String siteId)
Execute initial publish for given site.boolean
isSitePublished(String siteId)
Check if site has ever been published.void
setContentRepository(ContentRepository contentRepository)
void
setDmFilterWrapper(DmFilterWrapper dmFilterWrapper)
void
setPublishRequestDao(PublishRequestDAO publishRequestDao)
void
setRetryingDatabaseOperationFacade(RetryingDatabaseOperationFacade retryingDatabaseOperationFacade)
-
-
-
Method Detail
-
getPublishingPackagesTotal
public int getPublishingPackagesTotal(String siteId, String environment, String path, List<String> states)
Description copied from interface:PublishServiceInternal
Get total number of publishing packages for given search parameters- Specified by:
getPublishingPackagesTotal
in interfacePublishServiceInternal
- Parameters:
siteId
- site identifierenvironment
- publishing environmentpath
- regular expression for pathsstates
- publishing package states- Returns:
- total number of publishing packages
-
getPublishingPackages
public List<PublishingPackage> getPublishingPackages(String siteId, String environment, String path, List<String> states, int offset, int limit)
Description copied from interface:PublishServiceInternal
Get publishing packages for given search parameters- Specified by:
getPublishingPackages
in interfacePublishServiceInternal
- Parameters:
siteId
- site identifierenvironment
- publishing environmentpath
- regular expression for pathsstates
- publishing package stateoffset
- offset for paginationlimit
- limit for pagination- Returns:
- list of publishing packages
-
getPublishingPackageDetails
public PublishingPackageDetails getPublishingPackageDetails(String siteId, String packageId)
Description copied from interface:PublishServiceInternal
Get publishing package details- Specified by:
getPublishingPackageDetails
in interfacePublishServiceInternal
- Parameters:
siteId
- site identifierpackageId
- package identifier- Returns:
- publishing package details
-
cancelPublishingPackages
public void cancelPublishingPackages(String siteId, List<String> packageIds)
Description copied from interface:PublishServiceInternal
Cancel publishing packages- Specified by:
cancelPublishingPackages
in interfacePublishServiceInternal
- Parameters:
siteId
- site identifierpackageIds
- list of package identifiers
-
getPublishingHistoryTotal
public int getPublishingHistoryTotal(String siteId, String environment, String path, String publisher, ZonedDateTime dateFrom, ZonedDateTime dateTo, String contentType, long state)
Description copied from interface:PublishServiceInternal
Get total number of publishing history items for given search parameters- Specified by:
getPublishingHistoryTotal
in interfacePublishServiceInternal
- Parameters:
siteId
- site identifierenvironment
- environment to get publishing historypath
- regular expression to filter pathspublisher
- filter publishing history for specified userdateFrom
- lower boundary for date rangedateTo
- upper boundary for date rangecontentType
- publishing history for specified content typestate
- filter items by their state- Returns:
- total number of deployment history items
-
getPublishingHistory
public List<PublishingHistoryItem> getPublishingHistory(String siteId, String environment, String path, String publisher, ZonedDateTime dateFrom, ZonedDateTime dateTo, String contentType, long state, String sortBy, String order, int offset, int limit)
Description copied from interface:PublishServiceInternal
Get deployment history items for given search parameters- Specified by:
getPublishingHistory
in interfacePublishServiceInternal
- Parameters:
siteId
- site identifierenvironment
- environment to get publishing historypath
- regular expression to filter pathspublisher
- filter publishing history for specified userdateFrom
- lower boundary for date rangedateTo
- upper boundary for date rangecontentType
- publishing history for specified content typestate
- filter items by their statesortBy
- sort publishing historyorder
- apply order to publishing historyoffset
- offset of the first item in the result setlimit
- number of items to return- Returns:
- total number of publishing packages
-
getDeploymentHistory
public List<DeploymentHistoryItem> getDeploymentHistory(String siteId, List<String> environments, ZonedDateTime fromDate, ZonedDateTime toDate, String filterType, int numberOfItems)
Description copied from interface:PublishServiceInternal
Get deployment history from database- Specified by:
getDeploymentHistory
in interfacePublishServiceInternal
- Parameters:
siteId
- site identifierenvironments
- list of environmentsfromDate
- starting date for filtering resultstoDate
- end date for filtering resultsfilterType
- filter typenumberOfItems
- number of items to get- Returns:
-
cancelScheduledQueueItems
public void cancelScheduledQueueItems(String siteId, List<String> paths)
Description copied from interface:PublishServiceInternal
Cancel scheduled items from publishing queue- Specified by:
cancelScheduledQueueItems
in interfacePublishServiceInternal
- Parameters:
siteId
- site identifierpaths
- list of paths of content items to be cancelled
-
isSitePublished
public boolean isSitePublished(String siteId)
Description copied from interface:PublishServiceInternal
Check if site has ever been published.- Specified by:
isSitePublished
in interfacePublishServiceInternal
- Parameters:
siteId
- site identifier- Returns:
- true if site has been published at least once, otherwise false
-
initialPublish
public void initialPublish(String siteId) throws SiteNotFoundException
Description copied from interface:PublishServiceInternal
Execute initial publish for given site.- Specified by:
initialPublish
in interfacePublishServiceInternal
- Parameters:
siteId
- site identifier- Throws:
SiteNotFoundException
-
getPublishRequestDao
public PublishRequestDAO getPublishRequestDao()
-
setPublishRequestDao
public void setPublishRequestDao(PublishRequestDAO publishRequestDao)
-
getContentRepository
public ContentRepository getContentRepository()
-
setContentRepository
public void setContentRepository(ContentRepository contentRepository)
-
getDmFilterWrapper
public DmFilterWrapper getDmFilterWrapper()
-
setDmFilterWrapper
public void setDmFilterWrapper(DmFilterWrapper dmFilterWrapper)
-
getRetryingDatabaseOperationFacade
public RetryingDatabaseOperationFacade getRetryingDatabaseOperationFacade()
-
setRetryingDatabaseOperationFacade
public void setRetryingDatabaseOperationFacade(RetryingDatabaseOperationFacade retryingDatabaseOperationFacade)
-
-