Class ReleaseResource

java.lang.Object
com.xebialabs.xlrelease.api.internal.ReleaseResource

@Path("/releases") @Consumes("application/json") @Produces("application/json") @Controller public class ReleaseResource extends 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.

  • Constructor Details

    • ReleaseResource

      @Autowired public ReleaseResource(ReleaseService releaseService, com.xebialabs.xlrelease.security.PermissionChecker permissions, com.xebialabs.xlrelease.service.ReleaseSearchService releasesSearch, com.xebialabs.xlrelease.actors.ReleaseActorService releaseActorService, TaskAccessService taskAccessService, ReleaseViewConverter releaseViewConverter, PhaseViewConverter phaseViewConverter, TasksViewConverter tasksViewConverter, PlanItemViewConverter planItemViewConverter, TeamMemberViewConverter teamMemberViewConverter, TeamService teamService, com.xebialabs.xlrelease.views.converters.ReleaseFormConverter releaseFormConverter, com.xebialabs.xlrelease.events.EventBus eventBus, PhaseService phaseService, com.xebialabs.xlrelease.service.SseService sseService)
  • Method Details

    • searchTemplateOverview

      @POST @Timed @Path("templates/search") public TemplateOverviewResultsView searchTemplateOverview(@QueryParam("page") Long page, @QueryParam("numberbypage") Long numberByPage, TemplateFilters templateFilters)
      Returns the list of templates visible to the current user.
      Parameters:
      page - next page to query
      numberByPage - templates per page
      templateFilters - the search criteria
      Returns:
      the list of templates
    • getAllTemplateIds

      @GET @Timed @Path("templates/search") public PlanItemSearchView getAllTemplateIds(@QueryParam("page") Long page, @QueryParam("folderId") String folderId, @QueryParam("numberbypage") Long numberByPage, @QueryParam("permission") String permissionName, @QueryParam("matchTemplate") 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") 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 jakarta.ws.rs.core.Response deleteTemplate(@PathParam("templateId") 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") 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") Long page, @QueryParam("numberbypage") Long numberByPage, @QueryParam("depth") Integer depth, @QueryParam("properties") List<String> properties, @QueryParam("extensions") List<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
    • searchReleaseOverview

      @POST @Timed @Path("overview") public ReleaseOverviewResultsView searchReleaseOverview(@QueryParam("page") Long page, @QueryParam("numberbypage") Long numberByPage, 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") 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 Integer getTemplateDuration(@PathParam("templateId") 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") 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(List<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") 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") String releaseId)
      Returns a release.
      Parameters:
      releaseId - the release identifier
      Returns:
      the release
    • getReleaseStatus

      @GET @Timed @Path("{releaseId:.*Release[^/-]*}/status") public com.xebialabs.xlrelease.domain.status.ReleaseStatus getReleaseStatus(@PathParam("releaseId") String releaseId)
      Returns a status of release.
      Parameters:
      releaseId - the release identifier
      Returns:
      the release status
    • movePhase

      @POST @Timed @Path("{releaseId:.*Release[^/-]*}/phases/move") public PhaseFullView movePhase(@PathParam("releaseId") 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") 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") 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") String releaseId, @PathParam("taskId") 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") String releaseId, @PathParam("phaseId") 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") 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") String releaseId, @QueryParam("fromPhaseId") String phaseId, @QueryParam("fromTaskId") 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") 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") String releaseId, @PathParam("attachmentId") String attachmentId)
    • deleteAttachmentFromTask

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

      @GET @Timed @Path("{releaseId:.*Release[^/-]*}/teams/assignable") public Collection<com.xebialabs.xlrelease.domain.Team> getAssignableTeams(@PathParam("releaseId") 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
    • followRelease

      @POST @Path("{releaseId:.*Release[^/-]*}/follow") public void followRelease(@PathParam("releaseId") String releaseId)
    • unfollowRelease

      @DELETE @Path("{releaseId:.*Release[^/-]*}/follow") public void unfollowRelease(@PathParam("releaseId") String releaseId)
    • getAllTags

      @GET @Path("tags") public Set<String> getAllTags()
    • getAllArchivedTags

      @GET @Path("tags/archived") public Set<String> getAllArchivedTags()
    • getPhases

      @GET @Path("{releaseId:.*Release[^/-]*}/phases") public List<PhaseOverview> getPhases(@PathParam("releaseId") String releaseId)