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


Java HttpStatus.NOT_IMPLEMENTED属性代码示例

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


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

示例1: validateMzTabFile

@ApiOperation(value = "", nickname = "validateMzTabFile", notes = "Validates an mzTab file in XML or JSON representation and reports syntactic, structural, and semantic errors. ", response = ValidationMessage.class, responseContainer = "List", tags={ "validate", })
@ApiResponses(value = { 
    @ApiResponse(code = 200, message = "Validation Okay", response = ValidationMessage.class, responseContainer = "List"),
    @ApiResponse(code = 405, message = "Invalid input", response = ValidationMessage.class, responseContainer = "List"),
    @ApiResponse(code = 415, message = "Unsupported content type"),
    @ApiResponse(code = 200, message = "Unexpected error", response = Error.class) })
@RequestMapping(value = "/validate",
    produces = { "application/json" }, 
    consumes = { "application/json", "application/xml" },
    method = RequestMethod.POST)
default ResponseEntity<List<ValidationMessage>> validateMzTabFile(@ApiParam(value = "mzTab file that should be validated." ,required=true )  @Valid @RequestBody MzTab mztabfile) {
    if(getObjectMapper().isPresent() && getAcceptHeader().isPresent()) {
        if (getAcceptHeader().get().contains("application/json")) {
            try {
                return new ResponseEntity<>(getObjectMapper().get().readValue("[ {  \"code\" : \"code\",  \"line_number\" : 0,  \"message_type\" : \"information\",  \"message\" : \"message\"}, {  \"code\" : \"code\",  \"line_number\" : 0,  \"message_type\" : \"information\",  \"message\" : \"message\"} ]", List.class), HttpStatus.NOT_IMPLEMENTED);
            } catch (IOException e) {
                log.error("Couldn't serialize response for content type application/json", e);
                return new ResponseEntity<>(HttpStatus.INTERNAL_SERVER_ERROR);
            }
        }
    } else {
        log.warn("ObjectMapper or HttpServletRequest not configured in default ValidateApi interface so no example is generated");
    }
    return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
}
 
开发者ID:nilshoffmann,项目名称:jmzTab-m,代码行数:25,代码来源:ValidateApi.java

示例2: validatePlainMzTabFile

@ApiOperation(value = "", nickname = "validatePlainMzTabFile", notes = "Validates an mzTab file in plain text representation and reports syntactic, structural, and semantic errors. ", response = ValidationMessage.class, responseContainer = "List", tags={ "validatePlain", })
@ApiResponses(value = { 
    @ApiResponse(code = 200, message = "Validation Okay", response = ValidationMessage.class, responseContainer = "List"),
    @ApiResponse(code = 405, message = "Invalid input", response = ValidationMessage.class, responseContainer = "List"),
    @ApiResponse(code = 415, message = "Unsupported content type"),
    @ApiResponse(code = 200, message = "Unexpected error", response = Error.class) })
@RequestMapping(value = "/validatePlain",
    produces = { "application/json" }, 
    consumes = { "text/tab-separated-values", "text/plain" },
    method = RequestMethod.POST)
default ResponseEntity<List<ValidationMessage>> validatePlainMzTabFile(@ApiParam(value = "mzTab file that should be validated." ,required=true )  @Valid @RequestBody String mztabfile) {
    if(getObjectMapper().isPresent() && getAcceptHeader().isPresent()) {
        if (getAcceptHeader().get().contains("application/json")) {
            UserSessionFile file = getStorageService().get().store(mztabfile, getRequest().get().getSession().getId());
            return new ResponseEntity<>(getValidationService().get().validate(ValidationService.MzTabVersion.MZTAB_1_1, file, 100), HttpStatus.OK);
        }
    } else {
        log.warn("ObjectMapper or HttpServletRequest not configured in default ValidatePlainApi interface so no example is generated");
    }
    return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
}
 
开发者ID:nilshoffmann,项目名称:jmzTab-m,代码行数:21,代码来源:ValidatePlainApi.java

示例3: showErreur

@ResponseStatus(HttpStatus.NOT_IMPLEMENTED)
@RequestMapping(value="/api/*", produces = "application/json")
public String showErreur(HttpServletRequest request)
{
    LOGGER.error("RestAPIController - Requête vers l'api incorrecte. \n"+request.toString());
    return "Demande incorrecte";
}
 
开发者ID:scrumtracker,项目名称:scrumtracker2017,代码行数:7,代码来源:ApiController.java

示例4: failIfParentsSpecified

private void failIfParentsSpecified(final List<BaseSubject> subjects) {
    if (this.getTitanProfileActive()) {
        return;
    }

    for (BaseSubject subject : subjects) {
        if (!CollectionUtils.isEmpty(subject.getParents())) {
            throw new RestApiException(HttpStatus.NOT_IMPLEMENTED, PARENTS_ATTR_NOT_SUPPORTED_MSG);
        }
    }
}
 
开发者ID:eclipse,项目名称:keti,代码行数:11,代码来源:SubjectPrivilegeManagementController.java

示例5: failIfParentsSpecified

private void failIfParentsSpecified(final List<BaseResource> resources) {
    if (this.getTitanProfileActive()) {
        return;
    }

    for (BaseResource resource : resources) {
        if (!CollectionUtils.isEmpty(resource.getParents())) {
            throw new RestApiException(HttpStatus.NOT_IMPLEMENTED, PARENTS_ATTR_NOT_SUPPORTED_MSG);
        }
    }
}
 
开发者ID:eclipse,项目名称:keti,代码行数:11,代码来源:ResourcePrivilegeManagementController.java

示例6: handleNotImplementedException

@ExceptionHandler(NotImplementedException.class)
@ResponseStatus(value = HttpStatus.NOT_IMPLEMENTED)
@ResponseBody
public XAPIErrorInfo handleNotImplementedException(final HttpServletRequest request, final NotImplementedException e) {
    final XAPIErrorInfo result = new XAPIErrorInfo(HttpStatus.NOT_IMPLEMENTED, request, e.getLocalizedMessage());
    this.logException(e);
    this.logError(result);
    return result;
}
 
开发者ID:Apereo-Learning-Analytics-Initiative,项目名称:OpenLRW,代码行数:9,代码来源:XAPIExceptionHandlerAdvice.java

示例7: methodNotSupported

@ExceptionHandler(value = HttpRequestMethodNotSupportedException.class)
public ResponseEntity<Object> methodNotSupported(HttpRequestMethodNotSupportedException exception) {
    logger.trace(exception.getMessage(), exception);
    return new ResponseEntity<>(exception.getMessage(), new HttpHeaders(), HttpStatus.NOT_IMPLEMENTED);
}
 
开发者ID:hmcts,项目名称:cmc-claim-store,代码行数:5,代码来源:ResourceExceptionHandler.java

示例8: handleXInfoNotSupportedException

@ResponseStatus(value = HttpStatus.NOT_IMPLEMENTED, reason = "XInfo Not Implemented")
@ExceptionHandler(XInfoNotSupportedException.class)
public void handleXInfoNotSupportedException(XInfoNotSupportedException ex) {
    log.warn("This external info is not supported",ex);
}
 
开发者ID:graphium-project,项目名称:graphium,代码行数:5,代码来源:GlobalExceptionController.java


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