@ApiParam("Id of the definition to retrieve") @PathParam("id") int definitionId,
@ApiParam("Id of a resource that supports this operation") @QueryParam("resourceId") Integer resourceId,
@Context UriInfo uriInfo,
@Context Request request) {
OperationDefinition def;
def = getFromCache(definitionId, OperationDefinition.class);
if (def==null) {
try {
def = opsManager.getOperationDefinition(caller,definitionId);
putToCache(definitionId,OperationDefinition.class,def);
}
catch (OperationDefinitionNotFoundException ode) {
throw new StuffNotFoundException("Operation definition with id " + definitionId);
}
}
EntityTag eTag = new EntityTag(Integer.toHexString(def.hashCode()));
Response.ResponseBuilder builder = request.evaluatePreconditions(eTag);
if (builder==null) {
OperationDefinitionRest odr = new OperationDefinitionRest();
odr.setId(def.getId());
odr.setName(def.getName());
copyParamsForDefinition(def, odr);
builder=Response.ok(odr);