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

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


    } finally {// NOPMD (suppress DoNotThrowExceptionInFinally)
      scanner.close();
      try {
        in.close();
      } catch (IOException e) {
        throw new ODataRuntimeException(e);
      }
    }
    return requestList;
  }
View Full Code Here


  protected static byte[] getBytes(final String body) {
    try {
      return body.getBytes(DEFAULT_ENCODING);
    } catch (UnsupportedEncodingException e) {
      throw new ODataRuntimeException(e);
    }
  }
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

        List<Map<String, Object>> emptyData = new ArrayList<Map<String, Object>>();
        result.setFeedData(emptyData);
        result.setInlineProperties(inlineProperties);
      }
    } catch (EdmException e) {
      throw new ODataRuntimeException("EdmException", e);
    }
    return result;
  }
View Full Code Here

        } else if ("ne_Team".equals(context.getNavigationProperty().getName())) {
          result.setEntryData(null);
        }
      }
    } catch (EdmException e) {
      throw new ODataRuntimeException("EdmException:", e);
    }
    return result;
  }
View Full Code Here

          .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

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

          .header("Content-Disposition", isDownload ?
              "attachment; filename=OData-Response." + new Date().toString().replace(' ', '_').replace(':', '.')
                  + ".html" : null)
          .build();
    } catch (final ODataException e) {
      throw new ODataRuntimeException("Should not happen", e);
    } catch (final IOException e) {
      throw new ODataRuntimeException("Should not happen", e);
    }
  }
View Full Code Here

      entry = context.getResult();
    }

    @Override
    public void handleReadFeed(final ReadFeedResult context) {
      throw new ODataRuntimeException("No feed expected");
    }
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.