@Test public void testCreateAgreement() { assert (true); }
@POST @Consumes(MediaType.APPLICATION_XML) @Produces(MediaType.APPLICATION_XML) public Response createAgreement(@Context HttpHeaders hh,@Context UriInfo uriInfo, String payload){ logger.debug("StartOf createAgreement - Insert /agreements"); String location = null; try{ AgreementHelper agreementRestService = getAgreementHelper(); location = agreementRestService.createAgreement(hh,uriInfo.getAbsolutePath().toString(), payload); } catch (HelperException e) { logger.info("createAgreement exception", e); return buildResponse(e); } Response result = buildResponsePOST(HttpStatus.CREATED, printMessage( HttpStatus.CREATED, "The agreement has been stored successfully in the SLA Repository Database with location:"+location), location); logger.debug("EndOf createAgreement"); return result; }
AgreementRest extends AbstractSLARest { @POST @Consumes(MediaType.APPLICATION_XML) @Produces(MediaType.APPLICATION_XML) public Response createAgreement(@Context HttpHeaders hh,@Context UriInfo uriInfo, String payload){ logger.debug("StartOf createAgreement - Insert /agreements"); String location = null; try{ AgreementHelper agreementRestService = getAgreementHelper(); location = agreementRestService.createAgreement(hh,uriInfo.getAbsolutePath().toString(), payload); } catch (HelperException e) { logger.info("createAgreement exception", e); return buildResponse(e); } Response result = buildResponsePOST(HttpStatus.CREATED, printMessage( HttpStatus.CREATED, "The agreement has been stored successfully in the SLA Repository Database with location:"+location), location); logger.debug("EndOf createAgreement"); return result; } }
AgreementRest extends AbstractSLARest { @POST @Consumes(MediaType.APPLICATION_XML) @Produces(MediaType.APPLICATION_XML) public Response createAgreement(@Context HttpHeaders hh,@Context UriInfo uriInfo, String payload){ logger.debug("StartOf createAgreement - Insert /agreements"); String location = null; try{ AgreementHelper agreementRestService = getAgreementHelper(); location = agreementRestService.createAgreement(hh,uriInfo.getAbsolutePath().toString(), payload); } catch (HelperException e) { logger.info("createAgreement exception", e); return buildResponse(e); } Response result = buildResponsePOST(HttpStatus.CREATED, printMessage( HttpStatus.CREATED, "The agreement has been stored successfully in the SLA Repository Database with location:"+location), location); logger.debug("EndOf createAgreement"); return result; } AgreementRest(); }
AgreementRest extends AbstractSLARest { @POST @Consumes(MediaType.APPLICATION_XML) @Produces(MediaType.APPLICATION_XML) public Response createAgreement(@Context HttpHeaders hh,@Context UriInfo uriInfo, String payload){ logger.debug("StartOf createAgreement - Insert /agreements"); String location = null; try{ AgreementHelper agreementRestService = getAgreementHelper(); location = agreementRestService.createAgreement(hh,uriInfo.getAbsolutePath().toString(), payload); } catch (HelperException e) { logger.info("createAgreement exception", e); return buildResponse(e); } Response result = buildResponsePOST(HttpStatus.CREATED, printMessage( HttpStatus.CREATED, "The agreement has been stored successfully in the SLA Repository Database with location:"+location), location); logger.debug("EndOf createAgreement"); return result; } AgreementRest(); @GET @Produces(MediaType.APPLICATION_XML) Response getAgreements(
            @QueryParam("consumerId") String consumerId,
            @QueryParam("providerId") String providerId,
            @QueryParam("active") BooleanParam active); @GET @Path("{id}") @Produces(MediaType.APPLICATION_XML) Response getAgreementById(@PathParam("id") String agreement_id); @POST @Consumes(MediaType.APPLICATION_XML) @Produces(MediaType.APPLICATION_XML) Response createAgreement(@Context HttpHeaders hh,@Context UriInfo uriInfo,  String payload); @GET @Path("active") @Produces(MediaType.APPLICATION_XML) Response getActiveAgreements(); @DELETE @Path("{agreementId}") @Produces(MediaType.APPLICATION_XML) Response deleteAgreement(@PathParam("agreementId") String agreementId); @GET @Path("{id}/guaranteestatus") @Consumes(MediaType.APPLICATION_XML) @Produces(MediaType.APPLICATION_XML) Response getStatusAgreementXML(@PathParam("id") String agreement_id); @GET @Path("{id}/guaranteestatus") @Consumes(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON) Response getStatusAgreementJson(@PathParam("id") String agreement_id); }
AgreementRest extends AbstractSLARest { @POST @Consumes(MediaType.APPLICATION_XML) @Produces(MediaType.APPLICATION_XML) public Response createAgreement(@Context HttpHeaders hh,@Context UriInfo uriInfo, String payload){ logger.debug("StartOf createAgreement - Insert /agreements"); String location = null; try{ AgreementHelper agreementRestService = getAgreementHelper(); location = agreementRestService.createAgreement(hh,uriInfo.getAbsolutePath().toString(), payload); } catch (HelperException e) { logger.info("createAgreement exception", e); return buildResponse(e); } Response result = buildResponsePOST(HttpStatus.CREATED, printMessage( HttpStatus.CREATED, "The agreement has been stored successfully in the SLA Repository Database with location:"+location), location); logger.debug("EndOf createAgreement"); return result; } AgreementRest(); @GET @Produces(MediaType.APPLICATION_XML) Response getAgreements(
            @QueryParam("consumerId") String consumerId,
            @QueryParam("providerId") String providerId,
            @QueryParam("active") BooleanParam active); @GET @Path("{id}") @Produces(MediaType.APPLICATION_XML) Response getAgreementById(@PathParam("id") String agreement_id); @POST @Consumes(MediaType.APPLICATION_XML) @Produces(MediaType.APPLICATION_XML) Response createAgreement(@Context HttpHeaders hh,@Context UriInfo uriInfo,  String payload); @GET @Path("active") @Produces(MediaType.APPLICATION_XML) Response getActiveAgreements(); @DELETE @Path("{agreementId}") @Produces(MediaType.APPLICATION_XML) Response deleteAgreement(@PathParam("agreementId") String agreementId); @GET @Path("{id}/guaranteestatus") @Consumes(MediaType.APPLICATION_XML) @Produces(MediaType.APPLICATION_XML) Response getStatusAgreementXML(@PathParam("id") String agreement_id); @GET @Path("{id}/guaranteestatus") @Consumes(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON) Response getStatusAgreementJson(@PathParam("id") String agreement_id);  }