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


Java HttpStatus.GONE属性代码示例

本文整理汇总了Java中org.springframework.http.HttpStatus.GONE属性的典型用法代码示例。如果您正苦于以下问题:Java HttpStatus.GONE属性的具体用法?Java HttpStatus.GONE怎么用?Java HttpStatus.GONE使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在org.springframework.http.HttpStatus的用法示例。


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

示例1: deleteServiceInstanceBinding

@RequestMapping(value = "/{instanceId}/service_bindings/{bindingId}", method = RequestMethod.DELETE)
public ResponseEntity<String> deleteServiceInstanceBinding(@PathVariable("instanceId") String instanceId,
		@PathVariable("bindingId") String bindingId, @RequestParam("service_id") String serviceId,
		@RequestParam("plan_id") String planId) throws ServiceBrokerException {

	log.debug("DELETE: " + SERVICE_INSTANCE_BINDING_BASE_PATH + "/{bindingId}"
			+ ", deleteServiceInstanceBinding(),  serviceInstance.id = " + instanceId + ", bindingId = " + bindingId
			+ ", serviceId = " + serviceId + ", planId = " + planId);

	try {
		bindingService.deleteServiceInstanceBinding(bindingId);
	} catch (ServerviceInstanceBindingDoesNotExistsException e) {
		return new ResponseEntity<String>("{}", HttpStatus.GONE);
	}

	log.debug("ServiceInstanceBinding Deleted: " + bindingId);

	return new ResponseEntity<String>("{}", HttpStatus.OK);
}
 
开发者ID:evoila,项目名称:cfsummiteu2017,代码行数:19,代码来源:ServiceInstanceBindingController.java

示例2: delete

@RequestMapping(method = RequestMethod.DELETE)
public ResponseEntity<?> delete(@PathVariable("instance_id") String instanceId, @PathVariable("binding_id") String bindingId) {
    logger.info("Entered DELETE of binding instance");
    HttpStatus respCode;
    if (bindingInstanceService.isExists(instanceId, bindingId)) {
        bindingInstanceService.delete(bindingId);
        respCode = HttpStatus.OK;
        logger.trace("Deleted binding instance");
    } else {
        respCode = HttpStatus.GONE;
        logger.warn("Binding: " + bindingId + " does not exist");
    }
    logger.debug("Returning: " + respCode + " (" + respCode.name() + ")");
    return new ResponseEntity<>(Collections.emptyMap(), respCode);
}
 
开发者ID:blackducksoftware,项目名称:hub-cf,代码行数:15,代码来源:BindingInstancesRestServer.java

示例3: delete

@RequestMapping(value = "/users", method = RequestMethod.DELETE)
public ResponseEntity<?> delete(@PathVariable("id") int id) {
    userDao.delete(id);
    return new ResponseEntity<>(HttpStatus.GONE);
}
 
开发者ID:rodrigues882013,项目名称:springboot-rest-api-skeleton,代码行数:5,代码来源:UserController.java

示例4: delete

@RequestMapping(method = RequestMethod.DELETE)
public ResponseEntity<?> delete(@PathVariable("instance_id") String instanceId) {
    logger.info("Entered DELETE service instance");
    return new ResponseEntity<>(Collections.emptyMap(), (serviceInstanceService.delete(instanceId) ? HttpStatus.OK : HttpStatus.GONE));
}
 
开发者ID:blackducksoftware,项目名称:hub-cf,代码行数:5,代码来源:ServiceInstancesRestServer.java


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