@Test public void testGetTemplateByUuid() { assert (true); }
@GET @Path("{id}") @Produces(MediaType.APPLICATION_XML) public Response getTemplateByUuid(@PathParam("id") String templateId){ logger.debug("StartOf getTemplateByUuid - REQUEST for /templates/{uuid}" + templateId); try{ TemplateHelper templateRestService = getTemplateHelper(); String serializedTemplate = templateRestService.getTemplateByUUID(templateId); if (serializedTemplate!=null){ logger.debug("EndOf getTemplateByUuid"); return buildResponse(200, serializedTemplate); }else{ logger.debug("EndOf getTemplateByUuid"); return buildResponse(404, printError(404, "There is no template with uuid " + templateId + " in the SLA Repository Database")); } } catch (HelperException e) { logger.info("getTemplateByUuid exception:"+e.getMessage()); return buildResponse(e); } }
TemplateRest extends AbstractSLARest { @GET @Path("{id}") @Produces(MediaType.APPLICATION_XML) public Response getTemplateByUuid(@PathParam("id") String templateId){ logger.debug("StartOf getTemplateByUuid - REQUEST for /templates/{uuid}" + templateId); try{ TemplateHelper templateRestService = getTemplateHelper(); String serializedTemplate = templateRestService.getTemplateByUUID(templateId); if (serializedTemplate!=null){ logger.debug("EndOf getTemplateByUuid"); return buildResponse(200, serializedTemplate); }else{ logger.debug("EndOf getTemplateByUuid"); return buildResponse(404, printError(404, "There is no template with uuid " + templateId + " in the SLA Repository Database")); } } catch (HelperException e) { logger.info("getTemplateByUuid exception:"+e.getMessage()); return buildResponse(e); } } }
TemplateRest extends AbstractSLARest { @GET @Path("{id}") @Produces(MediaType.APPLICATION_XML) public Response getTemplateByUuid(@PathParam("id") String templateId){ logger.debug("StartOf getTemplateByUuid - REQUEST for /templates/{uuid}" + templateId); try{ TemplateHelper templateRestService = getTemplateHelper(); String serializedTemplate = templateRestService.getTemplateByUUID(templateId); if (serializedTemplate!=null){ logger.debug("EndOf getTemplateByUuid"); return buildResponse(200, serializedTemplate); }else{ logger.debug("EndOf getTemplateByUuid"); return buildResponse(404, printError(404, "There is no template with uuid " + templateId + " in the SLA Repository Database")); } } catch (HelperException e) { logger.info("getTemplateByUuid exception:"+e.getMessage()); return buildResponse(e); } } TemplateRest(); }
TemplateRest extends AbstractSLARest { @GET @Path("{id}") @Produces(MediaType.APPLICATION_XML) public Response getTemplateByUuid(@PathParam("id") String templateId){ logger.debug("StartOf getTemplateByUuid - REQUEST for /templates/{uuid}" + templateId); try{ TemplateHelper templateRestService = getTemplateHelper(); String serializedTemplate = templateRestService.getTemplateByUUID(templateId); if (serializedTemplate!=null){ logger.debug("EndOf getTemplateByUuid"); return buildResponse(200, serializedTemplate); }else{ logger.debug("EndOf getTemplateByUuid"); return buildResponse(404, printError(404, "There is no template with uuid " + templateId + " in the SLA Repository Database")); } } catch (HelperException e) { logger.info("getTemplateByUuid exception:"+e.getMessage()); return buildResponse(e); } } TemplateRest(); @GET @Produces(MediaType.APPLICATION_XML) Response getTemplates(); @GET @Path("{id}") @Produces(MediaType.APPLICATION_XML) Response getTemplateByUuid(@PathParam("id") String templateId); @DELETE @Path("{uuid}") @Produces(MediaType.APPLICATION_XML) Response deleteTemplate(@PathParam("uuid") String uuid); @POST @Consumes(MediaType.APPLICATION_XML) @Produces(MediaType.APPLICATION_XML) Response createTemplate(@Context HttpHeaders hh,@Context UriInfo uriInfo, String payload); @PUT @Consumes(MediaType.APPLICATION_XML) @Produces(MediaType.APPLICATION_XML) Response updateTemplate(@Context HttpHeaders hh, String payload); }
TemplateRest extends AbstractSLARest { @GET @Path("{id}") @Produces(MediaType.APPLICATION_XML) public Response getTemplateByUuid(@PathParam("id") String templateId){ logger.debug("StartOf getTemplateByUuid - REQUEST for /templates/{uuid}" + templateId); try{ TemplateHelper templateRestService = getTemplateHelper(); String serializedTemplate = templateRestService.getTemplateByUUID(templateId); if (serializedTemplate!=null){ logger.debug("EndOf getTemplateByUuid"); return buildResponse(200, serializedTemplate); }else{ logger.debug("EndOf getTemplateByUuid"); return buildResponse(404, printError(404, "There is no template with uuid " + templateId + " in the SLA Repository Database")); } } catch (HelperException e) { logger.info("getTemplateByUuid exception:"+e.getMessage()); return buildResponse(e); } } TemplateRest(); @GET @Produces(MediaType.APPLICATION_XML) Response getTemplates(); @GET @Path("{id}") @Produces(MediaType.APPLICATION_XML) Response getTemplateByUuid(@PathParam("id") String templateId); @DELETE @Path("{uuid}") @Produces(MediaType.APPLICATION_XML) Response deleteTemplate(@PathParam("uuid") String uuid); @POST @Consumes(MediaType.APPLICATION_XML) @Produces(MediaType.APPLICATION_XML) Response createTemplate(@Context HttpHeaders hh,@Context UriInfo uriInfo, String payload); @PUT @Consumes(MediaType.APPLICATION_XML) @Produces(MediaType.APPLICATION_XML) Response updateTemplate(@Context HttpHeaders hh, String payload);  }