Interface DeliveryPatternApi

  • All Superinterfaces:
    ApiService

    @Path("/api/v1/delivery-patterns")
    @Produces("application/json")
    @Consumes("application/json")
    public interface DeliveryPatternApi
    extends ApiService
    Operations on release deliveries.
    • Method Detail

      • serviceName

        default java.lang.String serviceName()
        Specified by:
        serviceName in interface ApiService
      • createPattern

        @POST
        Delivery createPattern​(Delivery pattern)
        Creates a new delivery pattern.
        Parameters:
        pattern - the delivery pattern to be created.
        Returns:
        the created delivery pattern.
      • getPattern

        @GET
        @Path("/{patternId:.*Delivery[^/]*}")
        Delivery getPattern​(@PathParam("patternId")
                            java.lang.String patternId)
        Returns a delivery pattern by ID.
        Parameters:
        patternId - the pattern identifier.
        Returns:
        the pattern which has the given identifier.
      • getPatternByIdOrTitle

        @GET
        @Path("/{patternIdOrTitle}")
        Delivery getPatternByIdOrTitle​(@PathParam("patternIdOrTitle")
                                       java.lang.String patternIdOrTitle)
        Returns a delivery pattern by ID or title.
        Parameters:
        patternIdOrTitle - the pattern ID or title.
        Returns:
        the pattern which has the given ID or the given title.
      • checkTitleUnique

        @POST
        @Path("/checkTitle")
        boolean checkTitleUnique​(ValidatePattern validation)
      • updatePattern

        @PUT
        @Path("/{patternId:.*Delivery[^/]*}")
        Delivery updatePattern​(@PathParam("patternId")
                               java.lang.String patternId,
                               Delivery pattern)
        Updates a delivery pattern.
        Parameters:
        patternId - the pattern identifier.
        pattern - new contents of the pattern.
        Returns:
        the updated pattern.
      • updatePattern

        Delivery updatePattern​(Delivery pattern)
        Updates a delivery pattern.
        Parameters:
        pattern - new contents of the pattern.
        Returns:
        the updated pattern.
      • deletePattern

        @DELETE
        @Path("/{patternId:.*Delivery[^/]*}")
        void deletePattern​(@PathParam("patternId")
                           java.lang.String patternId)
        Deletes a delivery pattern.
        Parameters:
        patternId - the pattern identifier.
      • duplicatePattern

        @POST
        @Path("/{patternId:.*Delivery[^/]*}/duplicate")
        Delivery duplicatePattern​(@PathParam("patternId")
                                  java.lang.String patternId,
                                  DuplicateDeliveryPattern duplicateDeliveryPattern)
      • createDeliveryFromPattern

        @POST
        @Path("/{patternId:.*Delivery[^/]*}/create")
        Delivery createDeliveryFromPattern​(@PathParam("patternId")
                                           java.lang.String patternId,
                                           CreateDelivery createDelivery)
        Creates a delivery from a delivery pattern.
        Parameters:
        patternId - the identifier of the delivery pattern the delivery is based on.
        createDelivery - the parameters for the new delivery.
        Returns:
        the newly created delivery.
      • searchPatterns

        @POST
        @Path("search")
        java.util.List<Delivery> searchPatterns​(DeliveryPatternFilters filters,
                                                @DefaultValue("0") @QueryParam("page")
                                                java.lang.Long page,
                                                @DefaultValue("100") @QueryParam("resultsPerPage")
                                                java.lang.Long resultsPerPage)
        Search delivery patterns by filters.
        Parameters:
        filters - the search criteria.
        page - the page of results to return. Default value is 0.
        resultsPerPage - the number of results per page. Default and maximum value is 100.
        Returns:
        the list of matching delivery patterns.
      • searchPatterns

        java.util.List<Delivery> searchPatterns​(DeliveryPatternFilters filters)
        Search delivery patterns by filters with default pagination.
        Parameters:
        filters - the search criteria.
        Returns:
        the list of matching delivery patterns.
      • createStage

        @POST
        @Path("/{patternId:.*Delivery[^/]*}/stages")
        Stage createStage​(@PathParam("patternId")
                          java.lang.String patternId,
                          Stage stage)
        Adds a stage to a pattern.
        Parameters:
        patternId - the pattern identifier.
        stage - the stage to be added to the delivery pattern.
        Returns:
        the created stage.
      • createStage

        @POST
        @Path("/{patternId:.*Delivery[^/]*}/stages/{position:\\d+}")
        Stage createStage​(@PathParam("patternId")
                          java.lang.String patternId,
                          Stage stage,
                          @PathParam("position")
                          java.lang.Integer position)
      • createStage

        @POST
        @Path("/{patternId:.*Delivery[^/]*}/createStage")
        Stage createStage​(@PathParam("patternId")
                          java.lang.String patternId,
                          CreateDeliveryStage form)
      • getStages

        @GET
        @Path("/{patternId:.*Delivery[^/]*}/stages")
        java.util.List<Stage> getStages​(@PathParam("patternId")
                                        java.lang.String patternId)
        Returns the stages in a given delivery pattern.
        Parameters:
        patternId - the pattern identifier.
        Returns:
        stages in the delivery pattern.
      • updateStage

        Stage updateStage​(Stage stage)
        Updates a stage in a delivery pattern.
        Parameters:
        stage - new contents of the stage.
        Returns:
        the updated stage.
      • updateStage

        @PUT
        @Path("/{stageId:.*Stage[^/]*}")
        Stage updateStage​(@PathParam("stageId")
                          java.lang.String stageId,
                          Stage stage)
        Updates a stage in a delivery pattern.
        Parameters:
        stageId - the full stage identifier.
        stage - new contents of the stage.
        Returns:
        the updated stage.
      • updateStageFromBatch

        @PUT
        @Path("/{stageId:.*Stage[^/]*}/batched")
        Stage updateStageFromBatch​(@PathParam("stageId")
                                   java.lang.String stageId,
                                   Stage stage)
        Updates a stage in a delivery pattern from as-code.
        Parameters:
        stageId - the full stage identifier.
        stage - new contents of the stage.
        Returns:
        the updated stage.
      • deleteStage

        @DELETE
        @Path("/{stageId:.*Stage[^/]*}")
        void deleteStage​(@PathParam("stageId")
                         java.lang.String stageId)
        Deletes a stage in a delivery pattern.
        Parameters:
        stageId - the full stage identifier.
      • createTransition

        @POST
        @Path("/{stageId:.*Stage[^/]*}/transitions")
        Transition createTransition​(@PathParam("stageId")
                                    java.lang.String stageId,
                                    Transition transition)
        Adds a transition to a stage in a delivery pattern.
        Parameters:
        stageId - the full stage identifier.
        transition - the transition to be added to a stage.
        Returns:
        the created transition.
      • updateTransition

        @PUT
        @Path("/{transitionId:.*Transition[^/]*}")
        Transition updateTransition​(@PathParam("transitionId")
                                    java.lang.String transitionId,
                                    Transition transition)
        Updates a transition in a delivery pattern.
        Parameters:
        transitionId - the full transition identifier.
        transition - new contents of the transition.
        Returns:
        the updated transition.
      • updateTransition

        Transition updateTransition​(Transition transition)
        Updates a transition in a delivery pattern.
        Parameters:
        transition - new contents of the transition.
        Returns:
        the updated transition.
      • deleteTransition

        @DELETE
        @Path("/{transitionId:.*Transition[^/]*}")
        void deleteTransition​(@PathParam("transitionId")
                              java.lang.String transitionId)
        Deletes a transition in a delivery pattern.
        Parameters:
        transitionId - the full transition identifier.
      • createTrackedItem

        @POST
        @Path("/{patternId:.*Delivery[^/]*}/tracked-items")
        TrackedItem createTrackedItem​(@PathParam("patternId")
                                      java.lang.String patternId,
                                      TrackedItem item)
        Adds a tracked item to a delivery pattern.
        Parameters:
        patternId - the pattern identifier.
        item - the item to be added to the delivery pattern.
        Returns:
        the created item.
      • getTrackedItems

        @GET
        @Path("/{patternId:.*Delivery[^/]*}/tracked-items")
        java.util.List<TrackedItem> getTrackedItems​(@PathParam("patternId")
                                                    java.lang.String patternId)
        Returns the tracked items associated with given delivery pattern.
        Parameters:
        patternId - the pattern identifier.
        Returns:
        tracked items associated with the delivery pattern.
      • updateTrackedItem

        @PUT
        @Path("/{itemId:.*TrackedItem[^/]*}")
        TrackedItem updateTrackedItem​(@PathParam("itemId")
                                      java.lang.String itemId,
                                      TrackedItem item)
        Updates a tracked item.
        Parameters:
        itemId - the full item identifier.
        item - new contents of the item.
        Returns:
        the updated item.
      • updateTrackedItem

        TrackedItem updateTrackedItem​(TrackedItem item)
        Updates a tracked item.
        Parameters:
        item - new contents of the item.
        Returns:
        the updated item.
      • deleteTrackedItem

        @DELETE
        @Path("/{itemId:.*TrackedItem[^/]*}")
        void deleteTrackedItem​(@PathParam("itemId")
                               java.lang.String itemId)
        Deletes a tracked item.
        Parameters:
        itemId - the full item identifier.