Interface PublishRequestDAO


  • public interface PublishRequestDAO
    • 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 identifier
        environment - publishing environment
        states - publishing package state
        path - 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 identifier
        environment - environment
        states - publishing states package
        path - regular expression for paths
        offset - offset for pagination
        limit - 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 identifier
        packageId - 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 identifier
        packageIds - list of package identifiers
        cancelledState - 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 identifier
        path - path of the item
        environment - environment
        state - publishing queue ready state
        now - 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 identifier
        environments - environments
        completedState - completed state
        fromDate - get history from date
        toDate - get history to date
        offset - offset for pagination
        limit - 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 identifier
        state - ready for live state
        contentTypeClass - filter by content type class
        now - 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 identifier
        paths - list of paths of content items to be cancelled
        now - timestamp now
        cancelledState - cancelled state value
        readyState - 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 identifier
        publishingTarget - publishing target
        scheduledState - scheduled state
        fromDate - get history from date
        toDate - 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 identifier
        publishingTarget - publishing target
        scheduledState - scheduled state
        fromDate - get history from date
        toDate - get history to date
        offset - offset for pagination
        limit - 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 identifier
        publishingTarget - publishing target
        approver - approver
        completedState - completed state
        fromDate - get history from date
        toDate - 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 identifier
        publishingTarget - publishing target
        approver - approver
        completedState - completed state
        fromDate - get history from date
        toDate - get history to date
        offset - offset for pagination
        limit - 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 identifiers
        days - 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 identifier
        days - number of days
        activityAction - the activity action to filter
        publishState - the publishing state to filter
        publishAction - the publishing action to filter
        Returns:
        number of newly created