Class ReleaseResource


  • @Path("/releases")
    @Consumes("application/json")
    @Produces("application/json")
    @Controller
    public class ReleaseResource
    extends java.lang.Object
    Releases are the core business object manipulated in Digital.ai Release.

    A release represents a number of activities in a certain time period, with people working on it.

    • Method Detail

      • getTemplates

        @POST
        @Timed
        @Path("templates/search")
        public ReleaseSearchView getTemplates​(@QueryParam("page")
                                              java.lang.Long page,
                                              @QueryParam("numberbypage")
                                              java.lang.Long numberByPage,
                                              @QueryParam("depth")
                                              java.lang.Integer depth,
                                              TemplateFilters templateFilters)
        Returns the list of templates visible to the current user.
        Parameters:
        page - next page to query
        numberByPage - templates per page
        depth - the number of level of nested objects to be rendered, default is to render the entire tree.
        templateFilters - the search criteria
        Returns:
        the list of templates
      • getAllTemplateIds

        @GET
        @Timed
        @Path("templates/search")
        public PlanItemSearchView getAllTemplateIds​(@QueryParam("page")
                                                    java.lang.Long page,
                                                    @QueryParam("folderId")
                                                    java.lang.String folderId,
                                                    @QueryParam("numberbypage")
                                                    java.lang.Long numberByPage,
                                                    @QueryParam("permission")
                                                    java.lang.String permissionName,
                                                    @QueryParam("matchTemplate")
                                                    java.lang.String matchTemplate)
        Returns the list of pairs (templateId, templateTitle) where the current user has given permission.
        Returns:
        the list of pairs (templateId, templateTitle)
      • getTemplateTitleById

        @GET
        @Timed
        @Path("template/search")
        public PlanItemSearchView getTemplateTitleById​(@QueryParam("matchTemplate")
                                                       java.lang.String templateId)
        Returns the list of pairs (templateId, templateTitle) where the current user has given permission.
        Returns:
        the list of pairs (templateId, templateTitle) based on templateId
      • createTemplate

        @POST
        @Timed
        @Path("templates")
        public ReleaseFullView createTemplate​(ReleaseForm releaseForm)
        Creates a template.
        Parameters:
        releaseForm - the information required to create the template
        Returns:
        the created template
      • deleteTemplate

        @DELETE
        @Timed
        @Path("templates/{templateId:.*Release[^/-]*}")
        public javax.ws.rs.core.Response deleteTemplate​(@PathParam("templateId")
                                                        java.lang.String templateId)
        Deletes a template.
        Parameters:
        templateId - the identifier of the template
        Returns:
        a status code 200 if the template was successfully removed
      • updateTemplate

        @PUT
        @Timed
        @Path("templates/{templateId:.*Release[^/-]*}")
        public ReleaseFullView updateTemplate​(@PathParam("templateId")
                                              java.lang.String templateId,
                                              ReleaseForm releaseForm)
        Updates a template.
        Parameters:
        templateId - the identifier of the template
        releaseForm - the changes to apply
        Returns:
        the modified template
      • searchReleases

        @POST
        @Timed
        @Path("search")
        public ReleaseOverviewSearchView searchReleases​(@QueryParam("page")
                                                        java.lang.Long page,
                                                        @QueryParam("numberbypage")
                                                        java.lang.Long numberByPage,
                                                        @QueryParam("depth")
                                                        java.lang.Integer depth,
                                                        @QueryParam("properties")
                                                        java.util.List<java.lang.String> properties,
                                                        @QueryParam("extensions")
                                                        java.util.List<java.lang.String> extensions,
                                                        com.xebialabs.xlrelease.api.v1.forms.ReleasesFilters releasesFilters)
        Searches releases.
        Parameters:
        page - next page to query
        numberByPage - releases per page
        releasesFilters - the search criteria
        Returns:
        the list of matching releases
      • countReleases

        @POST
        @Timed
        @Path("count")
        public com.xebialabs.xlrelease.search.ReleaseCountResults countReleases​(com.xebialabs.xlrelease.api.v1.forms.ReleasesFilters releasesFilters)
        Count releases matching filter criteria.
        Parameters:
        releasesFilters - the search friteria
        Returns:
        a map containing the number of releases (total) and the number by status
      • getReleaseDateRange

        @POST
        @Timed
        @Path("daterange")
        public com.xebialabs.xlrelease.search.ReleaseDateRangeResults getReleaseDateRange​(com.xebialabs.xlrelease.api.v1.forms.ReleasesFilters releasesFilters)
        Count releases matching filter criteria.
        Parameters:
        releasesFilters - the search friteria
        Returns:
        a map containing the number of releases (total) and the number by status
      • createRelease

        @POST
        public ReleaseFullView createRelease​(ReleaseForm releaseForm)
        Creates a release.
        Parameters:
        releaseForm - the information required to create the release
        Returns:
        the created release
      • updateRelease

        @PUT
        @Timed
        @Path("{releaseId:((?!templates).)*Release[^/-]*}")
        public ReleaseFullView updateRelease​(@PathParam("releaseId")
                                             java.lang.String releaseId,
                                             ReleaseForm releaseForm)
        Updates a template.
        Parameters:
        releaseId - the release identifier
        releaseForm - the changes to apply
        Returns:
        the updated release
      • getTemplateDuration

        @GET
        @Timed
        @Path("templates/{templateId:.*Release[^/-]*}/duration")
        public java.lang.Integer getTemplateDuration​(@PathParam("templateId")
                                                     java.lang.String templateId)
        Returns the duration of a template
        Parameters:
        templateId - the template identifier
        Returns:
        the template duration, in seconds.
      • startRelease

        @POST
        @Timed
        @Path("{releaseId:.*Release[^/-]*}/start")
        public ReleaseFullView startRelease​(@PathParam("releaseId")
                                            java.lang.String releaseId)
        Starts a release.
        Parameters:
        releaseId - the release identifier
        Returns:
        the release, which state will reflect the start
      • startReleases

        @POST
        @Path("start")
        public com.xebialabs.xlrelease.views.BulkActionResultView startReleases​(java.util.List<java.lang.String> releaseIds)
        Start releases with given identifiers.
        Parameters:
        releaseIds - list of release identifiers
        Returns:
        list of successfully started release identifiers
      • abortRelease

        @POST
        @Timed
        @Path("{releaseId:.*Release[^/-]*}/abort")
        public ReleaseFullView abortRelease​(@PathParam("releaseId")
                                            java.lang.String releaseId,
                                            AbortReleaseForm abortReleaseForm)
        Aborts a running release.
        Parameters:
        releaseId - the release identifier
        Returns:
        the release, which state will reflect the operation
      • abortReleases

        @POST
        @Path("abort")
        public com.xebialabs.xlrelease.views.BulkActionResultView abortReleases​(AbortReleaseForm abortReleaseForm)
        Aborts releases with given identifiers.
        Parameters:
        abortReleaseForm - parameters for aborting a release
        Returns:
        list of successfully aborted release identifiers
      • getRelease

        @GET
        @Timed
        @Path("{releaseId:.*Release[^/-]*}")
        public ReleaseFullView getRelease​(@PathParam("releaseId")
                                          java.lang.String releaseId)
        Returns a release.
        Parameters:
        releaseId - the release identifier
        Returns:
        the release
      • movePhase

        @POST
        @Timed
        @Path("{releaseId:.*Release[^/-]*}/phases/move")
        public PhaseFullView movePhase​(@PathParam("releaseId")
                                       java.lang.String releaseId,
                                       MovementIndexes movementIndexes)
        Moves a phase within a release.
        Parameters:
        releaseId - the identifier of the release
        movementIndexes - the origin and target of the movement (described in terms of the parent container and the child index)
        Returns:
        the moved phase
      • moveTask

        @POST
        @Timed
        @Path("{releaseId:.*Release[^/-]*}/tasks/move")
        public TaskFullView moveTask​(@PathParam("releaseId")
                                     java.lang.String releaseId,
                                     MovementIndexes movementIndexes)
        Moves a task within a release.
        Parameters:
        releaseId - the identifier of the release
        movementIndexes - the origin and target of the movement (described in terms of the parent container and the child index)
        Returns:
        the moved task
      • addPhase

        @POST
        @Timed
        @Path("{releaseId:.*Release[^/-]*}/phases/add")
        public PhaseFullView addPhase​(@PathParam("releaseId")
                                      java.lang.String releaseId)
        Adds a new, empty phase to a release.
        Parameters:
        releaseId - the identifier of the release
        Returns:
        the new task
      • duplicateTask

        @PUT
        @Timed
        @Path("{releaseId:.*Release[^/-]*}/tasks/duplicate/{taskId:.*Task[^/-]*}")
        public TaskFullView duplicateTask​(@PathParam("releaseId")
                                          java.lang.String releaseId,
                                          @PathParam("taskId")
                                          java.lang.String originTaskId)
        Duplicates a task in a release.
        Parameters:
        releaseId - the identifier of the release
        originTaskId - the identifier of the task to duplicate
        Returns:
        the duplicated task
      • duplicatePhase

        @PUT
        @Timed
        @Path("{releaseId:.*Release[^/-]*}/phases/duplicate/{phaseId:.*Phase[^/-]*}")
        public PhaseFullView duplicatePhase​(@PathParam("releaseId")
                                            java.lang.String releaseId,
                                            @PathParam("phaseId")
                                            java.lang.String originPhaseId)
        Duplicates a phase in a release.
        Parameters:
        releaseId - the identifier of the release
        originPhaseId - the identifier of the phase to duplicate
        Returns:
        the new phase
      • getPermissions

        @GET
        @Timed
        @Path("{releaseId:.*Release[^/-]*}/permissions")
        public ReleasePermissionsView getPermissions​(@PathParam("releaseId")
                                                     java.lang.String releaseId)
        Returns the permissions configured for a release.
        Parameters:
        releaseId - the identifier of the release
        Returns:
        the permissions
      • restartPhases

        @POST
        @Timed
        @Path("{releaseId:.*Release[^/-]*}/restartPhases")
        public ReleaseFullView restartPhases​(@PathParam("releaseId")
                                             java.lang.String releaseId,
                                             @QueryParam("fromPhaseId")
                                             java.lang.String phaseId,
                                             @QueryParam("fromTaskId")
                                             java.lang.String taskId,
                                             @QueryParam("phaseVersion")
                                             com.xebialabs.xlrelease.repository.PhaseVersion phaseVersion)
        Restarts the release from a given phase. Which in effect copies phases between phaseId (from) and the current phase. Depending on the phaseVersion it will have a different copy strategy.
        Parameters:
        releaseId - the identifier of the release
        phaseId - the identifier of the phase to restart from
        taskId - the identifier of the task to restart from
        phaseVersion - the given phase version
        Returns:
        the release
      • resume

        @POST
        @Timed
        @Path("{releaseId:.*Release[^/-]*}/resume")
        public ReleaseFullView resume​(@PathParam("releaseId")
                                      java.lang.String releaseId)
        Resume a release that had been paused as part of the restart operation.
        Parameters:
        releaseId - the identifier of the release
        Returns:
        the release
      • deleteAttachment

        @DELETE
        @Timed
        @Path("{releaseId:.*Release[^/-]*}/attachments/{attachmentId:.*Attachment[^/-]*}")
        public void deleteAttachment​(@PathParam("releaseId")
                                     java.lang.String releaseId,
                                     @PathParam("attachmentId")
                                     java.lang.String attachmentId)
      • deleteAttachmentFromTask

        @DELETE
        @Timed
        @Path("{releaseId:.*Release[^/-]*}/{taskId:.*Task[^/-]*}/attachments/{attachmentId:.*Attachment[^/-]*}")
        public void deleteAttachmentFromTask​(@PathParam("releaseId")
                                             java.lang.String releaseId,
                                             @PathParam("taskId")
                                             java.lang.String taskId,
                                             @PathParam("attachmentId")
                                             java.lang.String attachmentId)
      • getAssignableTeams

        @GET
        @Timed
        @Path("{releaseId:.*Release[^/-]*}/teams/assignable")
        public java.util.Collection<com.xebialabs.xlrelease.domain.Team> getAssignableTeams​(@PathParam("releaseId")
                                                                                            java.lang.String releaseId)
        Return the list of assignable teams for the specified release.
        Parameters:
        releaseId - the identifier of the release
        Returns:
        the list of assignable teams
      • getAllTags

        @GET
        @Path("tags")
        public java.util.Set<java.lang.String> getAllTags()
      • getAllArchivedTags

        @GET
        @Path("tags/archived")
        public java.util.Set<java.lang.String> getAllArchivedTags()