Package org.craftercms.studio.api.v2.dal
Interface PublishRequestDAO
public interface PublishRequestDAO
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionvoidcancelPackages(String siteId, Collection<String> packageIds, String cancelledState) Cancel publishing packagesvoidcancelScheduledQueueItems(String siteId, List<String> paths, ZonedDateTime now, String cancelledState, String readyState) Cancel scheduled items from publishing queuegetDeploymentHistory(String siteId, List<String> environments, String completedState, String contentTypeClass, ZonedDateTime fromDate, ZonedDateTime toDate, int offset, int limit) Get deployment historyintgetNumberOfPublishedItemsByState(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 daysgetPackagePaths(String site, Collection<String> packages) Get a list of the paths contained in the given packagesdefault Collection<String> getPackagesForPath(String siteId, String path) Get the READY_FOR_LIVE packages containing the given pathgetPackagesForPath(String siteId, String path, String state) Get the paths packages containing the given path and matching the stategetPublishingHistoryDetail(String siteId, String packageId, int offset, int limit) Get publishing package detailsintgetPublishingHistoryDetailTotalItems(String siteId, String packageId) Get total number of items for a publishing packagegetPublishingItemsScheduled(String siteId, String publishingTarget, String approver, String scheduledState, ZonedDateTime fromDate, ZonedDateTime toDate, List<String> systemTypes, List<org.craftercms.commons.rest.parameters.SortField> sortFields, int offset, int limit) Get scheduled publishing itemsgetPublishingItemsScheduledTotal(String siteId, String publishingTarget, String approver, String scheduledState, ZonedDateTime fromDate, ZonedDateTime toDate, List<String> systemTypes) Get number of scheduled publishing items results 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 filtersgetPublishingPackagesHistory(String siteId, String publishingTarget, String approver, String completedState, ZonedDateTime fromDate, ZonedDateTime toDate, int offset, int limit) Get deployment historygetPublishingPackagesHistoryTotal(String siteId, String publishingTarget, String approver, String completedState, ZonedDateTime fromDate, ZonedDateTime toDate) Get number of publishing packages history results for given filtersintGet total number of publishing package for given search filtersgetScheduledDateForEnvironment(String siteId, String path, String environment, String state, ZonedDateTime now) Get scheduled date for environment item
-
Field Details
-
SORT_FIELD_MAP
-
-
Method Details
-
getPublishingPackagesTotal
int getPublishingPackagesTotal(@Param("siteId") String siteId, @Param("environment") String environment, @Param("path") String path, @Param("states") List<String> states) Get total number of publishing package for given search filters- Parameters:
siteId- site identifierenvironment- publishing environmentpath- regular expression for pathsstates- publishing package state- Returns:
- number of publishing packages
-
getPublishingPackages
List<PublishingPackage> getPublishingPackages(@Param("siteId") String siteId, @Param("environment") String environment, @Param("path") String path, @Param("states") List<String> states, @Param("offset") int offset, @Param("limit") int limit) Get publishing packages for given search filters- Parameters:
siteId- site identifierenvironment- environmentpath- regular expression for pathsstates- publishing states packageoffset- offset for paginationlimit- limit for pagination- Returns:
- list of publishing packages
-
getPublishingPackageDetails
List<PublishRequest> getPublishingPackageDetails(@Param("siteId") String siteId, @Param("packageId") String packageId) Get publishing package details- Parameters:
siteId- site identifierpackageId- package id- Returns:
- list of publishing requests belonging to the package
-
getPublishingHistoryDetailTotalItems
int getPublishingHistoryDetailTotalItems(@Param("siteId") String siteId, @Param("packageId") String packageId) Get total number of items for a publishing package- Parameters:
siteId- site identifierpackageId- package id- Returns:
- number of package items
-
getPublishingHistoryDetail
List<PublishRequest> getPublishingHistoryDetail(@Param("siteId") String siteId, @Param("packageId") String packageId, @Param("offset") int offset, @Param("limit") int limit) Get publishing package details- Parameters:
siteId- site identifierpackageId- package idoffset- offset for paginationlimit- limit for pagination- Returns:
- list of publishing requests belonging to the package
-
cancelPackages
void cancelPackages(@Param("siteId") String siteId, @Param("packageIds") Collection<String> packageIds, @Param("cancelledState") String cancelledState) Cancel publishing packages- Parameters:
siteId- site identifierpackageIds- list of package identifierscancelledState- cancelled state
-
getScheduledDateForEnvironment
ZonedDateTime getScheduledDateForEnvironment(@Param("siteId") String siteId, @Param("path") String path, @Param("environment") String environment, @Param("state") String state, @Param("now") ZonedDateTime now) Get scheduled date for environment item- Parameters:
siteId- site identifierpath- path of the itemenvironment- environmentstate- publishing queue ready statenow- now- Returns:
- Scheduled date
-
getDeploymentHistory
List<PublishRequest> getDeploymentHistory(@Param("siteId") String siteId, @Param("environments") List<String> environments, @Param("completedState") String completedState, @Param("contentTypeClass") String contentTypeClass, @Param("fromDate") ZonedDateTime fromDate, @Param("toDate") ZonedDateTime toDate, @Param("offset") int offset, @Param("limit") int limit) Get deployment history- Parameters:
siteId- site identifierenvironments- environmentscompletedState- completed statefromDate- get history from datetoDate- get history to dateoffset- offset for paginationlimit- number of records to return- Returns:
-
cancelScheduledQueueItems
void cancelScheduledQueueItems(@Param("siteId") String siteId, @Param("paths") List<String> paths, @Param("now") ZonedDateTime now, @Param("cancelledState") String cancelledState, @Param("readyState") String readyState) Cancel scheduled items from publishing queue- Parameters:
siteId- site identifierpaths- list of paths of content items to be cancellednow- timestamp nowcancelledState- cancelled state valuereadyState- ready for live state value
-
getPublishingItemsScheduledTotal
Optional<Integer> getPublishingItemsScheduledTotal(@Param("siteId") String siteId, @Param("publishingTarget") String publishingTarget, @Param("approver") String approver, @Param("scheduledState") String scheduledState, @Param("fromDate") ZonedDateTime fromDate, @Param("toDate") ZonedDateTime toDate, @Param("systemTypes") List<String> systemTypes) Get number of scheduled publishing items results for given filters- Parameters:
siteId- site identifierpublishingTarget- publishing targetapprover- approverscheduledState- scheduled statefromDate- get history from datetoDate- get history to datesystemTypes- system types to filter- Returns:
- total number of results
-
getPublishingItemsScheduled
List<PublishRequest> getPublishingItemsScheduled(@Param("siteId") String siteId, @Param("publishingTarget") String publishingTarget, @Param("approver") String approver, @Param("scheduledState") String scheduledState, @Param("fromDate") ZonedDateTime fromDate, @Param("toDate") ZonedDateTime toDate, @Param("systemTypes") List<String> systemTypes, @Param("sortFields") List<org.craftercms.commons.rest.parameters.SortField> sortFields, @Param("offset") int offset, @Param("limit") int limit) Get scheduled publishing items- Parameters:
siteId- site identifierpublishingTarget- publishing targetapprover- approverscheduledState- scheduled statefromDate- get history from datetoDate- get history to datesystemTypes- system types to filtersortFields- sort fieldsoffset- offset for paginationlimit- number of records to return- Returns:
-
getPublishingPackagesHistoryTotal
Optional<Integer> getPublishingPackagesHistoryTotal(@Param("siteId") String siteId, @Param("publishingTarget") String publishingTarget, @Param("approver") String approver, @Param("completedState") String completedState, @Param("fromDate") ZonedDateTime fromDate, @Param("toDate") ZonedDateTime toDate) Get number of publishing packages history results for given filters- Parameters:
siteId- site identifierpublishingTarget- publishing targetapprover- approvercompletedState- completed statefromDate- get history from datetoDate- get history to date- Returns:
- total number of results
-
getPublishingPackagesHistory
List<DashboardPublishingPackage> getPublishingPackagesHistory(@Param("siteId") String siteId, @Param("publishingTarget") String publishingTarget, @Param("approver") String approver, @Param("completedState") String completedState, @Param("fromDate") ZonedDateTime fromDate, @Param("toDate") ZonedDateTime toDate, @Param("offset") int offset, @Param("limit") int limit) Get deployment history- Parameters:
siteId- site identifierpublishingTarget- publishing targetapprover- approvercompletedState- completed statefromDate- get history from datetoDate- get history to dateoffset- offset for paginationlimit- number of records to return- Returns:
-
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(@Param("siteId") String siteId, @Param("days") int days, @Param("activityAction") String activityAction, @Param("publishState") String publishState, @Param("publishAction") 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
-
getPackagesForPath
default Collection<String> getPackagesForPath(@Param("siteId") String siteId, @Param("path") String path) Get the READY_FOR_LIVE packages containing the given path- Parameters:
siteId- the site idpath- the path to test- Returns:
- a list of packages containing the path
-
getPackagesForPath
Collection<String> getPackagesForPath(@Param("siteId") String siteId, @Param("path") String path, @Param("state") String state) Get the paths packages containing the given path and matching the state- Parameters:
siteId- the site idpath- the path to teststate- the state to match- Returns:
- a list of packages containing the path
-
getPackagePaths
Collection<String> getPackagePaths(@Param("siteId") String site, @Param("packageIds") Collection<String> packages) Get a list of the paths contained in the given packages- Parameters:
site- the site idpackages- the packages to retrieve items for- Returns:
- a list of the paths contained in the packages
-