@DELETE
@Path("/{id}/icon")
@GenerateLink(rel = LINK_REL_DELETE_ICON)
@ApiOperation(
value = "Delete icon for required stack",
notes = "This operation can be performed only by authorized stack owner")
@ApiResponses({
@ApiResponse(code = 204, message = "Icon was successfully removed"),
@ApiResponse(code = 400, message = "Missed required parameters, parameters are not valid"),
@ApiResponse(
code = 403,
message = "The user does not have access upload image for stack with required id"),
@ApiResponse(code = 404, message = "The stack or icon doesn't exist"),
@ApiResponse(
code = 409,
message =
"Conflict error occurred during stack update"
+ "(e.g. Stack with such name already exists)"),
@ApiResponse(code = 500, message = "Internal server error occurred")
})
public void removeIcon(@ApiParam("The stack Id") @PathParam("id") final String id)
throws NotFoundException, ServerException, ConflictException, ForbiddenException,
BadRequestException {
StackImpl stack = stackDao.getById(id);
stack.setStackIcon(null);
stackDao.update(stack);
}