@ApiOperation(nickname = "credentialUpdate", value = "Update an Credential", notes = "Updates a new Credential based on the information provided in the Credential parameter.", response = Credential.class)
@PUT
@Path("{credentialId}")
@Consumes({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
@Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
public Credential update(
@ApiParam(value = "The ScopeId of the requested Credential.", required = true, defaultValue = DEFAULT_SCOPE_ID) @PathParam("scopeId") ScopeId scopeId,
@ApiParam(value = "The id of the requested Credential", required = true) @PathParam("credentialId") EntityId credentialId,
@ApiParam(value = "The modified Credential whose attributed need to be updated", required = true) Credential credential) throws Exception {
credential.setScopeId(scopeId);
credential.setId(credentialId);
return credentialService.update(credential);
}