Package org.apache.olingo.odata2.core.exception

Examples of org.apache.olingo.odata2.core.exception.ODataRuntimeException


          .entity(buffer.getInputStream())
          .header(ODataHttpHeaders.DATASERVICEVERSION, ODataServiceVersion.V10)
          .build();
    } catch (Exception e) {
      buffer.close();
      throw new ODataRuntimeException(e);
    }
  }
View Full Code Here


      return ODataResponse.entity(buffer.getInputStream())
          .header(ODataHttpHeaders.DATASERVICEVERSION, ODataServiceVersion.V10)
          .build();
    } catch (Exception e) {
      buffer.close();
      throw new ODataRuntimeException(e);
    }
  }
View Full Code Here

      jsonStreamWriter.endArray()
          .endObject();
      writer.flush();
      return writer.toString();
    } catch (final IOException e) {
      throw new ODataRuntimeException("IOException: ", e);
    } catch (final EdmException e) {
      throw new ODataRuntimeException("EdmException: ", e);
    }
  }
View Full Code Here

            .getFullQualifiedName().toString());
      } else if (property instanceof ComplexProperty) {
        xmlStreamWriter
            .writeAttribute(XmlMetadataConstants.EDM_TYPE, ((ComplexProperty) property).getType().toString());
      } else {
        throw new ODataRuntimeException();
      }

      writeFacets(xmlStreamWriter, property.getFacets());

      if (property.getMimeType() != null) {
View Full Code Here

          .header(ODataHttpHeaders.DATASERVICEVERSION, ODataServiceVersion.V10)
          .status(status);
      return response.build();
    } catch (Exception e) {
      csb.close();
      throw new ODataRuntimeException(e);
    }
  }
View Full Code Here

        break;
      case $select:
        handleSystemQueryOptionSelect(systemQueryOptions.get(SystemQueryOption.$select));
        break;
      default:
        throw new ODataRuntimeException("Invalid System Query Option " + queryOption);
      }
    }
  }
View Full Code Here

  @Test
  public void testODataRuntimeException() throws Exception {
    // prepare
    String exceptionMessage = "Some odd runtime exception";
    Exception exception = new ODataRuntimeException(exceptionMessage);

    // execute
    Response response = exceptionMapper.toResponse(exception);

    // verify
View Full Code Here

        }
      }
      break;

    default:
      throw new ODataRuntimeException("Unknown or not implemented URI type: " + uriInfo.getUriType());
    }
  }
View Full Code Here

    try {
      requestUri = context.getPathInfo().getRequestUri();
      errorContext.setPathInfo(context.getPathInfo());
      callback = getErrorHandlerCallbackFromContext(context);
    } catch (Exception e) {
      throw new ODataRuntimeException("Exception occurred", e);
    }
  }
View Full Code Here

    httpRequestHeaders = httpHeaders.getRequestHeaders();
    requestUri = uriInfo.getRequestUri();
    try {
      callback = getErrorHandlerCallbackFromServletConfig(servletConfig, servletRequest);
    } catch (Exception e) {
      throw new ODataRuntimeException("Exception occurred", e);
    }
  }
View Full Code Here

TOP

Related Classes of org.apache.olingo.odata2.core.exception.ODataRuntimeException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.