当前位置: 首页>>代码示例>>Java>>正文


Java AgreementHelper.getAgreementStatus方法代码示例

本文整理汇总了Java中eu.atos.sla.service.rest.helpers.AgreementHelper.getAgreementStatus方法的典型用法代码示例。如果您正苦于以下问题:Java AgreementHelper.getAgreementStatus方法的具体用法?Java AgreementHelper.getAgreementStatus怎么用?Java AgreementHelper.getAgreementStatus使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在eu.atos.sla.service.rest.helpers.AgreementHelper的用法示例。


在下文中一共展示了AgreementHelper.getAgreementStatus方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: getStatusAgreementXML

import eu.atos.sla.service.rest.helpers.AgreementHelper; //导入方法依赖的package包/类
/**
 * Gets the information of the status of the different Guarantee Terms of an
 * agreement. *
 * 
 * <pre>
 * GET /agreements/{agreementId}/guaranteestatus
 *   
 * Request:
 *   GET /agreements HTTP/1.1
 *    
 * Response:
 *   HTTP/1.1 200 Ok
 *   Content-type: application/xml
 *  
 * {@code
 *   <GuaranteeStatus agreementId="$agreementId" value="FULFILLED|VIOLATED|NON_DETERMINED">
 *     <GuaranteeTermStatus name="$gt_name1" value="FULFILLED|VIOLATED|NON_DETERMINED"/>
 *    ...
 *     <GuaranteeTermStatus name="$gt_nameN" value="FULFILLED|VIOLATED|NON_DETERMINED"/>
 *   </GuaranteeStatus>
 * }
 *  
 * 
 * </pre>
 * 
 * Example: <li>curl -H "Content-type: application/xml" http://localhost:8080/sla-service/agreements/{agreementId}/guaranteestatus</li>
 * 
 * 
 * @param id
 *            of the agreement
 * @return XML information with Guarantee Status
 */
@GET
@Path("{id}/guaranteestatus")
@Consumes(MediaType.APPLICATION_XML)
@Produces(MediaType.APPLICATION_XML)
public Response getStatusAgreementXML(@PathParam("id") String agreement_id) {
	logger.debug("StartOf getStatusAgreementXML - REQUEST for /agreements/" + agreement_id
			+ "/guaranteestatus");
	Response result;
	try{
		AgreementHelper agreementRestService = getAgreementHelper();
		String serializedAgreement =  agreementRestService.getAgreementStatus(agreement_id,
				MediaType.APPLICATION_XML);
		if (serializedAgreement!=null){
			result = buildResponse(200, serializedAgreement);
		}else{
			result = buildResponse(404, printError(404, "No agreement with "+agreement_id));
		}			
	} catch (HelperException e) {
		logger.info("getStatusAgreementXML exception:"+e.getMessage());
		return buildResponse(e);
	}
	logger.debug("EndOf getStatusAgreementXML");
	return result;
}
 
开发者ID:Atos-FiwareOps,项目名称:sla-framework,代码行数:57,代码来源:AgreementRest.java

示例2: getStatusAgreementJson

import eu.atos.sla.service.rest.helpers.AgreementHelper; //导入方法依赖的package包/类
/**
 * Gets the information of the status of the different Guarantee Terms of an
 * agreement. *
 * 
 * <pre>
 * GET /agreements/{agreementId}/guaranteestatus
 *   
 * Request:
 *   GET /agreements HTTP/1.1
 *    
 * Response:
 *   HTTP/1.1 200 Ok
 *   Content-type: application/xml
 *  
 * {@code
 * {"agreementId":"{agreementId}","value":"FULFILLED|VIOLATED|NON_DETERMINED",
 * "GuaranteeTermStatus":
 * [{"name":"{gt_name1}","value":"FULFILLED|VIOLATED|NON_DETERMINED"},
 * {"name":"{gt_name2}","value":"FULFILLED|VIOLATED|NON_DETERMINED"}]}
 * }
 *  
 * </pre>
 * 
 * Example: 
 * <li>curl -H "Content-type: application/xml" http://localhost:8080/sla-service/agreements/{agreementId}/guaranteestatus</li>
 * 
 * @return Json information with Guarantee Status
 */
@GET
@Path("{id}/guaranteestatus")
@Consumes(MediaType.APPLICATION_JSON)
@Produces(MediaType.APPLICATION_JSON)
public Response getStatusAgreementJson(@PathParam("id") String agreement_id) {
	logger.debug("StartOf getStatusAgreementJson - REQUEST for /agreements/" + agreement_id
			+ "/guaranteestatus");
	
	Response result;
	try{
		AgreementHelper agreementRestService = getAgreementHelper();
		String serializedAgreement =  agreementRestService.getAgreementStatus(agreement_id,
				MediaType.APPLICATION_JSON);
		if (serializedAgreement!=null){
			result = buildResponse(200, serializedAgreement);
		}else{
			result = buildResponse(404, printError(404, "No agreement with "+agreement_id));
		}			
	} catch (HelperException e) {
		logger.info("getStatusAgreementJson exception:"+e.getMessage());
		return buildResponse(e);
	}
	logger.debug("EndOf getStatusAgreementJson");
	return result;
}
 
开发者ID:Atos-FiwareOps,项目名称:sla-framework,代码行数:54,代码来源:AgreementRest.java

示例3: getStatusAgreementXML

import eu.atos.sla.service.rest.helpers.AgreementHelper; //导入方法依赖的package包/类
/**
 * Gets the information of the status of the different Guarantee Terms of an
 * agreement. *
 * 
 * <pre>
 * GET /agreements/{agreementId}/guaranteestatus
 *   
 * Request:
 *   GET /agreements HTTP/1.1
 *    
 * Response:
 *   HTTP/1.1 200 Ok
 *   Content-type: application/xml
 *  
 * {@code
 *   <GuaranteeStatus agreementId="$agreementId" value="FULFILLED|VIOLATED|NON_DETERMINED">
 *     <GuaranteeTermStatus name="$gt_name1" value="FULFILLED|VIOLATED|NON_DETERMINED"/>
 *    ...
 *     <GuaranteeTermStatus name="$gt_nameN" value="FULFILLED|VIOLATED|NON_DETERMINED"/>
 *   </GuaranteeStatus>
 * }
 *  
 * 
 * </pre>
 * 
 * Example: <li>curl -H "Content-type: application/xml" http://localhost:8080/sla-service/agreements/{agreementId}/guaranteestatus</li>
 * 
 * 
 * @param id
 *            of the agreement
 * @return XML information with Guarantee Status
 */
@GET
@Path("{id}/guaranteestatus")
@Consumes(MediaType.APPLICATION_XML)
@Produces(MediaType.APPLICATION_XML)
public Response getStatusAgreementXML(@PathParam("id") String agreement_id) {
    logger.debug("StartOf getStatusAgreementXML - REQUEST for /agreements/" + agreement_id
            + "/guaranteestatus");
    Response result;
    try{
        AgreementHelper agreementRestService = getAgreementHelper();
        String serializedAgreement =  agreementRestService.getAgreementStatus(agreement_id,
                MediaType.APPLICATION_XML);
        if (serializedAgreement!=null){
            result = buildResponse(200, serializedAgreement);
        }else{
            result = buildResponse(404, printError(404, "No agreement with "+agreement_id));
        }            
    } catch (HelperException e) {
        logger.info("getStatusAgreementXML exception:"+e.getMessage());
        return buildResponse(e);
    }
    logger.debug("EndOf getStatusAgreementXML");
    return result;
}
 
开发者ID:SeaCloudsEU,项目名称:SeaCloudsPlatform,代码行数:57,代码来源:AgreementRest.java

示例4: getStatusAgreementJson

import eu.atos.sla.service.rest.helpers.AgreementHelper; //导入方法依赖的package包/类
/**
 * Gets the information of the status of the different Guarantee Terms of an
 * agreement. *
 * 
 * <pre>
 * GET /agreements/{agreementId}/guaranteestatus
 *   
 * Request:
 *   GET /agreements HTTP/1.1
 *    
 * Response:
 *   HTTP/1.1 200 Ok
 *   Content-type: application/xml
 *  
 * {@code
 * {"agreementId":"{agreementId}","value":"FULFILLED|VIOLATED|NON_DETERMINED",
 * "GuaranteeTermStatus":
 * [{"name":"{gt_name1}","value":"FULFILLED|VIOLATED|NON_DETERMINED"},
 * {"name":"{gt_name2}","value":"FULFILLED|VIOLATED|NON_DETERMINED"}]}
 * }
 *  
 * </pre>
 * 
 * Example: 
 * <li>curl -H "Content-type: application/xml" http://localhost:8080/sla-service/agreements/{agreementId}/guaranteestatus</li>
 * 
 * @return Json information with Guarantee Status
 */
@GET
@Path("{id}/guaranteestatus")
@Consumes(MediaType.APPLICATION_JSON)
@Produces(MediaType.APPLICATION_JSON)
public Response getStatusAgreementJson(@PathParam("id") String agreement_id) {
    logger.debug("StartOf getStatusAgreementJson - REQUEST for /agreements/" + agreement_id
            + "/guaranteestatus");
    
    Response result;
    try{
        AgreementHelper agreementRestService = getAgreementHelper();
        String serializedAgreement =  agreementRestService.getAgreementStatus(agreement_id,
                MediaType.APPLICATION_JSON);
        if (serializedAgreement!=null){
            result = buildResponse(200, serializedAgreement);
        }else{
            result = buildResponse(404, printError(404, "No agreement with "+agreement_id));
        }            
    } catch (HelperException e) {
        logger.info("getStatusAgreementJson exception:"+e.getMessage());
        return buildResponse(e);
    }
    logger.debug("EndOf getStatusAgreementJson");
    return result;
}
 
开发者ID:SeaCloudsEU,项目名称:SeaCloudsPlatform,代码行数:54,代码来源:AgreementRest.java


注:本文中的eu.atos.sla.service.rest.helpers.AgreementHelper.getAgreementStatus方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。