本文整理匯總了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);
}