本文整理匯總了Java中eu.atos.sla.service.rest.helpers.AgreementHelperE.getAgreements方法的典型用法代碼示例。如果您正苦於以下問題:Java AgreementHelperE.getAgreements方法的具體用法?Java AgreementHelperE.getAgreements怎麽用?Java AgreementHelperE.getAgreements使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類eu.atos.sla.service.rest.helpers.AgreementHelperE
的用法示例。
在下文中一共展示了AgreementHelperE.getAgreements方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: getAgreements
import eu.atos.sla.service.rest.helpers.AgreementHelperE; //導入方法依賴的package包/類
/**
* Gets a the list of available agreements from where we can get metrics,
* host information, etc.
*
* <pre>
* GET /agreements{?providerId,consumerId,active}
*
* Request:
* GET /agreements HTTP/1.1
*
* Response:
* HTTP/1.1 200 OK
* Content-type: application/xml
* {@code
* <?xml version="1.0" encoding="UTF-8"?>
* <collection href="/agreements">
* <items offset="0" total="1">
* <wsag:Agreement xmlns:wsag="http://www.ggf.org/namespaces/ws-agreement"
* AgreementId="d25eea60-7cfe-11e3-baa7-0800200c9a66">
* ...
* </wsag:Agreement>
* </items>
* </collection>
* }
*
* </pre>
*
* Example:
* <li>curl http://localhost:8080/sla-service/agreements</li>
* <li>curl http://localhost:8080/sla-service/agreements?consumerId=user-10343</li>
* @throws NotFoundException
*
* @throws JAXBException
*/
@GET
public List<IAgreement> getAgreements(
@QueryParam("consumerId") String consumerId,
@QueryParam("providerId") String providerId,
@QueryParam("templateId") String templateId,
@QueryParam("active") BooleanParam active) {
logger.debug("StartOf getAgreements - REQUEST for /agreements");
AgreementHelperE agreementRestHelper = getAgreementHelper();
List<IAgreement> agreements = agreementRestHelper.getAgreements(
consumerId, providerId, templateId, BooleanParam.getValue(active));
return agreements;
}
示例2: getAgreements
import eu.atos.sla.service.rest.helpers.AgreementHelperE; //導入方法依賴的package包/類
/**
* Gets a the list of available agreements from where we can get metrics,
* host information, etc.
*
* <pre>
* GET /agreements{?providerId,consumerId,active}
*
* Request:
* GET /agreements HTTP/1.1
*
* Response:
* HTTP/1.1 200 OK
* Content-type: application/xml
* {@code
* <?xml version="1.0" encoding="UTF-8"?>
* <collection href="/agreements">
* <items offset="0" total="1">
* <wsag:Agreement xmlns:wsag="http://www.ggf.org/namespaces/ws-agreement"
* AgreementId="d25eea60-7cfe-11e3-baa7-0800200c9a66">
* ...
* </wsag:Agreement>
* </items>
* </collection>
* }
*
* </pre>
*
* Example:
* <li>curl http://localhost:8080/sla-service/agreements</li>
* <li>curl http://localhost:8080/sla-service/agreements?consumerId=user-10343</li>
* @throws NotFoundException
*
* @throws JAXBException
*/
@GET
public List<IAgreement> getAgreements(
@QueryParam("consumerId") String consumerId,
@QueryParam("providerId") String providerId,
@QueryParam("templateId") String templateId,
@QueryParam("active") BooleanParam active) {
logger.debug("StartOf getAgreements - REQUEST for /agreements");
AgreementHelperE agreementRestHelper = getAgreementHelper();
List<IAgreement> agreements = agreementRestHelper.getAgreements(
consumerId, providerId, templateId, BooleanParam.getValue(active));
return agreements;
}