/** * Update the specified issue link type. * * @request.representation.example * {@link ResourceExamples#ISSUE_LINK_TYPE_EXAMPLE_CREATE} * * @response.representation.404.doc * Returned if issue linking is disabled or no issue link type with the given id exists. * * @response.representation.400.doc * Returned if the supplied id is not a number. * * @response.representation.200.example * {@link ResourceExamples#ISSUE_LINK_TYPE_EXAMPLE} */ @PUT @Path ("/{issueLinkTypeId}") public Response updateIssueLinkType(@PathParam ("issueLinkTypeId") final String issueLinkTypeIdString, IssueLinkTypeJsonBean linkTypeJsonBean) { final IssueLinkType linkType = findLinkType(issueLinkTypeIdString); final ServiceOutcome<IssueLinkType> outcome = issueLinkTypeService.updateIssueLinkType(authenticationContext.getUser(), linkType, linkTypeJsonBean.name(), linkTypeJsonBean.outward(), linkTypeJsonBean.inward()); if (outcome.isValid()) { return status(Response.Status.OK).entity(getIssueLinkType(issueLinkTypeIdString).getEntity()).build(); } else { throw new RESTException(ErrorCollection.of(outcome.getErrorCollection())); } }