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