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 Summary
ConstructorsConstructorDescriptionReleaseResource(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 Summary
Modifier and TypeMethodDescriptionabortRelease(String releaseId, AbortReleaseForm abortReleaseForm) Aborts a running release.com.xebialabs.xlrelease.views.BulkActionResultViewabortReleases(AbortReleaseForm abortReleaseForm) Aborts releases with given identifiers.Adds a new, empty phase to a release.com.xebialabs.xlrelease.search.ReleaseCountResultscountReleases(com.xebialabs.xlrelease.api.v1.forms.ReleasesFilters releasesFilters) Count releases matching filter criteria.createRelease(ReleaseForm releaseForm) Creates a release.createTemplate(ReleaseForm releaseForm) Creates a template.voiddeleteAttachment(String releaseId, String attachmentId) voiddeleteAttachmentFromTask(String releaseId, String taskId, String attachmentId) jakarta.ws.rs.core.ResponsedeleteTemplate(String templateId) Deletes a template.duplicatePhase(String releaseId, String originPhaseId) Duplicates a phase in a release.duplicateTask(String releaseId, String originTaskId) Duplicates a task in a release.voidfollowRelease(String releaseId) getAllTemplateIds(Long page, String folderId, Long numberByPage, String permissionName, String matchTemplate) Returns the list of pairs (templateId, templateTitle) where the current user has given permission.Collection<com.xebialabs.xlrelease.domain.Team>getAssignableTeams(String releaseId) Return the list of assignable teams for the specified release.getPermissions(String releaseId) Returns the permissions configured for a release.getRelease(String releaseId) Returns a release.com.xebialabs.xlrelease.search.ReleaseDateRangeResultsgetReleaseDateRange(com.xebialabs.xlrelease.api.v1.forms.ReleasesFilters releasesFilters) Count releases matching filter criteria.com.xebialabs.xlrelease.domain.status.ReleaseStatusgetReleaseStatus(String releaseId) Returns a status of release.getTemplateDuration(String templateId) Returns the duration of a templategetTemplates(Long page, Long numberByPage, Integer depth, TemplateFilters templateFilters) Returns the list of templates visible to the current user.getTemplateTitleById(String templateId) Returns the list of pairs (templateId, templateTitle) where the current user has given permission.movePhase(String releaseId, MovementIndexes movementIndexes) Moves a phase within a release.moveTask(String releaseId, MovementIndexes movementIndexes) Moves a task within a release.restartPhases(String releaseId, String phaseId, String taskId, com.xebialabs.xlrelease.repository.PhaseVersion phaseVersion) Restarts the release from a given phase.Resume a release that had been paused as part of the restart operation.searchReleases(Long page, Long numberByPage, Integer depth, List<String> properties, List<String> extensions, com.xebialabs.xlrelease.api.v1.forms.ReleasesFilters releasesFilters) Searches releases.startRelease(String releaseId) Starts a release.com.xebialabs.xlrelease.views.BulkActionResultViewstartReleases(List<String> releaseIds) Start releases with given identifiers.voidunfollowRelease(String releaseId) updateRelease(String releaseId, ReleaseForm releaseForm) Updates a template.updateTemplate(String templateId, ReleaseForm releaseForm) Updates a template.
-
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
-
getTemplates
@POST @Timed @Path("templates/search") public ReleaseSearchView getTemplates(@QueryParam("page") Long page, @QueryParam("numberbypage") Long numberByPage, @QueryParam("depth") Integer depth, TemplateFilters templateFilters) Returns the list of templates visible to the current user.- Parameters:
page- next page to querynumberByPage- templates per pagedepth- 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") 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
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 templatereleaseForm- 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 querynumberByPage- releases per pagereleasesFilters- 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
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 identifierreleaseForm- 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 releasemovementIndexes- 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 releasemovementIndexes- 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 releaseoriginTaskId- 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 releaseoriginPhaseId- 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 releasephaseId- the identifier of the phase to restart fromtaskId- the identifier of the task to restart fromphaseVersion- 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
-
deleteAttachmentFromTask
-
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
-
getAllArchivedTags
-