本文整理汇总了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;
}