@Test public void testUpdateTemplate() { assert (true); }
@PUT @Consumes(MediaType.APPLICATION_XML) @Produces(MediaType.APPLICATION_XML) public Response updateTemplate(@Context HttpHeaders hh, String payload){ logger.debug("Insert /templates"); try{ TemplateHelper templateRestService = getTemplateHelper(); String serializedTemplate = templateRestService.updateTemplate(hh, payload); if (serializedTemplate !=null) return buildResponse(500, printError(500, "Error updating template the SLA Repository Database")); else return buildResponse(200, serializedTemplate); } catch (HelperException e) { logger.info("updateTemplate exception:"+e.getMessage()); return buildResponse(e); } }
TemplateRest extends AbstractSLARest { @PUT @Consumes(MediaType.APPLICATION_XML) @Produces(MediaType.APPLICATION_XML) public Response updateTemplate(@Context HttpHeaders hh, String payload){ logger.debug("Insert /templates"); try{ TemplateHelper templateRestService = getTemplateHelper(); String serializedTemplate = templateRestService.updateTemplate(hh, payload); if (serializedTemplate !=null) return buildResponse(500, printError(500, "Error updating template the SLA Repository Database")); else return buildResponse(200, serializedTemplate); } catch (HelperException e) { logger.info("updateTemplate exception:"+e.getMessage()); return buildResponse(e); } } }
TemplateRest extends AbstractSLARest { @PUT @Consumes(MediaType.APPLICATION_XML) @Produces(MediaType.APPLICATION_XML) public Response updateTemplate(@Context HttpHeaders hh, String payload){ logger.debug("Insert /templates"); try{ TemplateHelper templateRestService = getTemplateHelper(); String serializedTemplate = templateRestService.updateTemplate(hh, payload); if (serializedTemplate !=null) return buildResponse(500, printError(500, "Error updating template the SLA Repository Database")); else return buildResponse(200, serializedTemplate); } catch (HelperException e) { logger.info("updateTemplate exception:"+e.getMessage()); return buildResponse(e); } } TemplateRest(); }
TemplateRest extends AbstractSLARest { @PUT @Consumes(MediaType.APPLICATION_XML) @Produces(MediaType.APPLICATION_XML) public Response updateTemplate(@Context HttpHeaders hh, String payload){ logger.debug("Insert /templates"); try{ TemplateHelper templateRestService = getTemplateHelper(); String serializedTemplate = templateRestService.updateTemplate(hh, payload); if (serializedTemplate !=null) return buildResponse(500, printError(500, "Error updating template the SLA Repository Database")); else return buildResponse(200, serializedTemplate); } catch (HelperException e) { logger.info("updateTemplate 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 { @PUT @Consumes(MediaType.APPLICATION_XML) @Produces(MediaType.APPLICATION_XML) public Response updateTemplate(@Context HttpHeaders hh, String payload){ logger.debug("Insert /templates"); try{ TemplateHelper templateRestService = getTemplateHelper(); String serializedTemplate = templateRestService.updateTemplate(hh, payload); if (serializedTemplate !=null) return buildResponse(500, printError(500, "Error updating template the SLA Repository Database")); else return buildResponse(200, serializedTemplate); } catch (HelperException e) { logger.info("updateTemplate 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);  }