Package org.craftercms.studio.api.v2.dal
Interface PublishRequestDAO
-
public interface PublishRequestDAO
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
cancelPackages(String siteId, List<String> packageIds, String cancelledState)
Cancel publishing packagesvoid
cancelScheduledQueueItems(String siteId, List<String> paths, ZonedDateTime now, String cancelledState, String readyState)
Cancel scheduled items from publishing queueList<PublishRequest>
getDeploymentHistory(String siteId, List<String> environments, String completedState, String contentTypeClass, ZonedDateTime fromDate, ZonedDateTime toDate, int offset, int limit)
Get deployment historyint
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 stateint
getNumberOfPublishes(String siteId, int days)
Get number of publishes for site in given number of daysList<PublishRequest>
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 filtersList<DashboardPublishingPackage>
getPublishingPackagesHistory(String siteId, String publishingTarget, String approver, String completedState, ZonedDateTime fromDate, ZonedDateTime toDate, int offset, int limit)
Get deployment historyOptional<Integer>
getPublishingPackagesHistoryTotal(String siteId, String publishingTarget, String approver, String completedState, ZonedDateTime fromDate, ZonedDateTime toDate)
Get number of publishing packages history results for given filtersList<DashboardPublishingPackage>
getPublishingPackagesScheduled(String siteId, String publishingTarget, String scheduledState, ZonedDateTime fromDate, ZonedDateTime toDate, int offset, int limit)
Get scheduled publishing packagesOptional<Integer>
getPublishingPackagesScheduledTotal(String siteId, String publishingTarget, String scheduledState, ZonedDateTime fromDate, ZonedDateTime toDate)
Get number of scheduled publishing packages results for given filtersint
getPublishingPackagesTotal(String siteId, String environment, String path, List<String> states)
Get total number of publishing package for given search filtersZonedDateTime
getScheduledDateForEnvironment(String siteId, String path, String environment, String state, ZonedDateTime now)
Get scheduled date for environment itemList<PublishRequest>
getScheduledItems(String siteId, String state, String contentTypeClass, ZonedDateTime now)
Get scheduled items for given site
-
-
-
Method Detail
-
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 environmentstates
- publishing package statepath
- regular expression for paths- 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
- environmentstates
- publishing states packagepath
- regular expression for pathsoffset
- 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
-
cancelPackages
void cancelPackages(@Param("siteId") String siteId, @Param("packageIds") List<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:
-
getScheduledItems
List<PublishRequest> getScheduledItems(@Param("siteId") String siteId, @Param("state") String state, @Param("contentTypeClass") String contentTypeClass, @Param("now") ZonedDateTime now)
Get scheduled items for given site- Parameters:
siteId
- site identifierstate
- ready for live statecontentTypeClass
- filter by content type classnow
- current date time- 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
-
getPublishingPackagesScheduledTotal
Optional<Integer> getPublishingPackagesScheduledTotal(@Param("siteId") String siteId, @Param("publishingTarget") String publishingTarget, @Param("scheduledState") String scheduledState, @Param("fromDate") ZonedDateTime fromDate, @Param("toDate") ZonedDateTime toDate)
Get number of scheduled publishing packages results for given filters- Parameters:
siteId
- site identifierpublishingTarget
- publishing targetscheduledState
- scheduled statefromDate
- get history from datetoDate
- get history to date- Returns:
- total number of results
-
getPublishingPackagesScheduled
List<DashboardPublishingPackage> getPublishingPackagesScheduled(@Param("siteId") String siteId, @Param("publishingTarget") String publishingTarget, @Param("scheduledState") String scheduledState, @Param("fromDate") ZonedDateTime fromDate, @Param("toDate") ZonedDateTime toDate, @Param("offset") int offset, @Param("limit") int limit)
Get scheduled publishing packages- Parameters:
siteId
- site identifierpublishingTarget
- publishing targetscheduledState
- scheduled statefromDate
- get history from datetoDate
- get history to dateoffset
- 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
int getNumberOfPublishes(@Param("siteId") String siteId, @Param("days") int days)
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
-
-