Interface PublishServiceInternal
- All Known Implementing Classes:
PublishServiceInternalImpl
public interface PublishServiceInternal
-
Method Summary
Modifier and TypeMethodDescriptionvoidcancelPublishingPackages(String siteId, List<String> packageIds) Cancel publishing packagesvoidcancelScheduledQueueItems(String siteId, List<String> paths) Cancel scheduled items from publishing queuegetDeploymentHistory(String siteId, List<String> environments, ZonedDateTime fromDate, ZonedDateTime toDate, String filterType, int numberOfItems) Get deployment history from databaseintgetNumberOfPublishedItemsByState(String siteId, int days, String activityAction, String publishState, String publishAction) Get number of published items for site in given number of days filtered by their previous stateintgetNumberOfPublishes(String siteId, int days) Get number of publishes for site in given number of daysgetPublishingHistory(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 parametersgetPublishingHistoryDetail(String siteId, String packageId, int offset, int limit) Get publishing history package detail itemsintgetPublishingHistoryDetailTotalItems(String siteId, String packageId) Get publishing history package detail total itemsintgetPublishingHistoryTotal(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 parametersgetPublishingItemsScheduled(String siteId, String publishingTarget, String approver, ZonedDateTime dateFrom, ZonedDateTime dateTo, List<String> systemTypes, List<org.craftercms.commons.rest.parameters.SortField> sortFields, int offset, int limit) Get scheduled publishing itemsintgetPublishingItemsScheduledTotal(String siteId, String publishingTarget, String approver, ZonedDateTime dateFrom, ZonedDateTime dateTo, List<String> systemTypes) Get total number of scheduled publishing items for given filtersgetPublishingPackageDetails(String siteId, String packageId) Get publishing package detailsgetPublishingPackages(String siteId, String environment, String path, List<String> states, int offset, int limit) Get publishing packages for given search parametersgetPublishingPackagesHistory(String siteId, String publishingTarget, String approver, ZonedDateTime dateFrom, ZonedDateTime dateTo, int offset, int limit) Get publishing packages historyintgetPublishingPackagesHistoryTotal(String siteId, String publishingTarget, String approver, ZonedDateTime dateFrom, ZonedDateTime dateTo) Get total number of publishing packages for given filtersintGet total number of publishing packages for given search parametersvoidinitialPublish(String siteId) Execute initial publish for given site.booleanisSitePublished(String siteId) Check if site has ever been published.publishAll(String siteId, String publishingTarget, String comment) Publishes all changes for the given site & target
-
Method Details
-
getPublishingPackagesTotal
Get total number of publishing packages for given search parameters- Parameters:
siteId- site identifierenvironment- publishing environmentpath- regular expression for pathsstates- publishing package states- Returns:
- total number of publishing packages
-
getPublishingPackages
List<PublishingPackage> getPublishingPackages(String siteId, String environment, String path, List<String> states, int offset, int limit) Get publishing packages for given search parameters- 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
Get publishing package details- Parameters:
siteId- site identifierpackageId- package identifier- Returns:
- publishing package details
-
cancelPublishingPackages
Cancel publishing packages- Parameters:
siteId- site identifierpackageIds- list of package identifiers
-
getPublishingHistoryTotal
int 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 parameters- 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
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 parameters- 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
-
getPublishingHistoryDetailTotalItems
Get publishing history package detail total items- Parameters:
siteId- site identifierpackageId- package identifier- Returns:
- number of package items
-
getPublishingHistoryDetail
List<PublishRequest> getPublishingHistoryDetail(String siteId, String packageId, int offset, int limit) Get publishing history package detail items- Parameters:
siteId- site identifierpackageId- package identifieroffset- offset of the first resultlimit- limit number of results- Returns:
- publishing history package's items
-
getDeploymentHistory
List<DeploymentHistoryItem> getDeploymentHistory(String siteId, List<String> environments, ZonedDateTime fromDate, ZonedDateTime toDate, String filterType, int numberOfItems) Get deployment history from database- 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
Cancel scheduled items from publishing queue- Parameters:
siteId- site identifierpaths- list of paths of content items to be cancelled
-
isSitePublished
Check if site has ever been published.- Parameters:
siteId- site identifier- Returns:
- true if site has been published at least once, otherwise false
-
initialPublish
Execute initial publish for given site.- Parameters:
siteId- site identifier- Throws:
SiteNotFoundException
-
getPublishingItemsScheduledTotal
int getPublishingItemsScheduledTotal(String siteId, String publishingTarget, String approver, ZonedDateTime dateFrom, ZonedDateTime dateTo, List<String> systemTypes) Get total number of scheduled publishing items for given filters- Parameters:
siteId- site identifierpublishingTarget- publishing targetapprover- approverdateFrom- lower boundary for scheduledateTo- upper boundary for schedulesystemTypes- system types- Returns:
- total number of results
-
getPublishingItemsScheduled
List<PublishRequest> getPublishingItemsScheduled(String siteId, String publishingTarget, String approver, ZonedDateTime dateFrom, ZonedDateTime dateTo, List<String> systemTypes, List<org.craftercms.commons.rest.parameters.SortField> sortFields, int offset, int limit) Get scheduled publishing items- Parameters:
siteId- site identifierpublishingTarget- publishing targetapprover- approverdateFrom- lower boundary for scheduledateTo- upper boundary for schedulesystemTypes- system typessortFields- sort fieldsoffset- offset of the first resultlimit- limit number of results- Returns:
- list of publishing request items
-
getPublishingPackagesHistoryTotal
int getPublishingPackagesHistoryTotal(String siteId, String publishingTarget, String approver, ZonedDateTime dateFrom, ZonedDateTime dateTo) Get total number of publishing packages for given filters- Parameters:
siteId- site identifierpublishingTarget- publishing targetapprover- approverdateFrom- lower boundary for historydateTo- upper boundary for history- Returns:
- total number of results
-
getPublishingPackagesHistory
List<DashboardPublishingPackage> getPublishingPackagesHistory(String siteId, String publishingTarget, String approver, ZonedDateTime dateFrom, ZonedDateTime dateTo, int offset, int limit) Get publishing packages history- Parameters:
siteId- site identifierpublishingTarget- publishing targetapprover- approverdateFrom- lower boundary for historydateTo- upper boundary for historyoffset- offset of the first resultlimit- limit number of results- Returns:
- list of dashboard publishing packages
-
getNumberOfPublishes
Get number of publishes for site in given number of days- Parameters:
siteId- site identifiersdays- number of days- Returns:
- number of publishes
-
getNumberOfPublishedItemsByState
int getNumberOfPublishedItemsByState(String siteId, int days, String activityAction, String publishState, String publishAction) Get number of published items for site in given number of days filtered by their previous state- Parameters:
siteId- site identifierdays- number of daysactivityAction- the activity action to filterpublishState- the publishing state to filterpublishAction- the publishing action to filter- Returns:
- number of newly created and published items
-
publishAll
RepositoryChanges publishAll(String siteId, String publishingTarget, String comment) throws ServiceLayerException Publishes all changes for the given site & target- Parameters:
siteId- the id of the sitepublishingTarget- the publishing target- Throws:
ServiceLayerException- if there is any error during publishing
-