@Test public void testCreateTemplate() { assert (true); }
@POST @Consumes(MediaType.APPLICATION_XML) @Produces(MediaType.APPLICATION_XML) public Response createTemplate(@Context HttpHeaders hh,@Context UriInfo uriInfo, String payload) { logger.debug("StartOf createTemplate - Insert /templates"); TemplateHelper templateRestHelper = getTemplateHelper(); try { String location = templateRestHelper.createTemplate(hh, uriInfo.getAbsolutePath().toString(), payload); logger.debug("EndOf createTemplate"); return buildResponsePOST( HttpStatus.CREATED, printMessage( HttpStatus.CREATED, "The template has been stored successfully in the SLA Repository Database"), location); } catch (HelperException e) { logger.info("createTemplate exception:"+e.getMessage()); return buildResponse(e); } }
TemplateRest extends AbstractSLARest { @POST @Consumes(MediaType.APPLICATION_XML) @Produces(MediaType.APPLICATION_XML) public Response createTemplate(@Context HttpHeaders hh,@Context UriInfo uriInfo, String payload) { logger.debug("StartOf createTemplate - Insert /templates"); TemplateHelper templateRestHelper = getTemplateHelper(); try { String location = templateRestHelper.createTemplate(hh, uriInfo.getAbsolutePath().toString(), payload); logger.debug("EndOf createTemplate"); return buildResponsePOST( HttpStatus.CREATED, printMessage( HttpStatus.CREATED, "The template has been stored successfully in the SLA Repository Database"), location); } catch (HelperException e) { logger.info("createTemplate exception:"+e.getMessage()); return buildResponse(e); } } }
TemplateRest extends AbstractSLARest { @POST @Consumes(MediaType.APPLICATION_XML) @Produces(MediaType.APPLICATION_XML) public Response createTemplate(@Context HttpHeaders hh,@Context UriInfo uriInfo, String payload) { logger.debug("StartOf createTemplate - Insert /templates"); TemplateHelper templateRestHelper = getTemplateHelper(); try { String location = templateRestHelper.createTemplate(hh, uriInfo.getAbsolutePath().toString(), payload); logger.debug("EndOf createTemplate"); return buildResponsePOST( HttpStatus.CREATED, printMessage( HttpStatus.CREATED, "The template has been stored successfully in the SLA Repository Database"), location); } catch (HelperException e) { logger.info("createTemplate exception:"+e.getMessage()); return buildResponse(e); } } TemplateRest(); }
TemplateRest extends AbstractSLARest { @POST @Consumes(MediaType.APPLICATION_XML) @Produces(MediaType.APPLICATION_XML) public Response createTemplate(@Context HttpHeaders hh,@Context UriInfo uriInfo, String payload) { logger.debug("StartOf createTemplate - Insert /templates"); TemplateHelper templateRestHelper = getTemplateHelper(); try { String location = templateRestHelper.createTemplate(hh, uriInfo.getAbsolutePath().toString(), payload); logger.debug("EndOf createTemplate"); return buildResponsePOST( HttpStatus.CREATED, printMessage( HttpStatus.CREATED, "The template has been stored successfully in the SLA Repository Database"), location); } catch (HelperException e) { logger.info("createTemplate 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 { @POST @Consumes(MediaType.APPLICATION_XML) @Produces(MediaType.APPLICATION_XML) public Response createTemplate(@Context HttpHeaders hh,@Context UriInfo uriInfo, String payload) { logger.debug("StartOf createTemplate - Insert /templates"); TemplateHelper templateRestHelper = getTemplateHelper(); try { String location = templateRestHelper.createTemplate(hh, uriInfo.getAbsolutePath().toString(), payload); logger.debug("EndOf createTemplate"); return buildResponsePOST( HttpStatus.CREATED, printMessage( HttpStatus.CREATED, "The template has been stored successfully in the SLA Repository Database"), location); } catch (HelperException e) { logger.info("createTemplate 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);  }