Package org.apache.olingo.odata2.api.exception

Examples of org.apache.olingo.odata2.api.exception.ODataApplicationException


                getCallbacks(relatedData, entityType)).expandSelectTree(context.getCurrentExpandSelectTreeNode())
                .selfLink(context.getSelfLink()).build();
        result.setInlineProperties(inlineProperties);
        return result;
      } catch (final ODataException e) {
        throw new ODataApplicationException(e.getLocalizedMessage(), Locale.ROOT, e);
      }
    }
View Full Code Here


                  .build();
          result.setInlineProperties(inlineProperties);
        }
        return result;
      } catch (final ODataException e) {
        throw new ODataApplicationException(e.getLocalizedMessage(), Locale.ROOT, e);
      }
    }
View Full Code Here

                content,
                EntityProviderReadProperties.init().build());
            break;

        default:
            throw new ODataApplicationException("Unsupported resource type " + uriInfo.getTargetType(),
                Locale.ENGLISH);
        }

        return response;
    }
View Full Code Here

                                } catch (Exception e) {
                                    // report any parsing errors as error response
                                    responses.add(new Olingo2BatchResponse(
                                        Integer.parseInt(response.getStatusCode()),
                                        response.getStatusInfo(), response.getContentId(), response.getHeaders(),
                                        new ODataApplicationException(
                                            "Error parsing response for " + request + ": " + e.getMessage(),
                                            Locale.ENGLISH, e)));
                                }
                            }
                            responseHandler.onResponse((T) responses);
View Full Code Here

            response = parseBatchRequest(edm, batchParts);
            break;

        default:
            // notify exception and return!!!
            throw new ODataApplicationException("Unsupported resource type " + uriInfo.getTargetType(),
                Locale.ENGLISH);
        }

        return response.getContentHeader() != null ? response
            : ODataResponse.fromResponse(response).contentHeader(responseContentType).build();
View Full Code Here

                    case XML:
                    case JSON:
                        final ODataErrorContext errorContext = EntityProvider.readErrorDocument(
                            response.getEntity().getContent(),
                            responseContentType.toString());
                        throw new ODataApplicationException(errorContext.getMessage(),
                            errorContext.getLocale(), httpStatusCode, errorContext.getErrorCode(),
                            errorContext.getException());
                    default:
                        // fall through to default exception with status line information
                    }
                } catch (EntityProviderException e) {
                    throw new ODataApplicationException(e.getMessage(), response.getLocale(), httpStatusCode, e);
                } catch (IOException e) {
                    throw new ODataApplicationException(e.getMessage(), response.getLocale(), httpStatusCode, e);
                }
            }

            throw new ODataApplicationException(statusLine.getReasonPhrase(), response.getLocale(), httpStatusCode);
        }

        return httpStatusCode;
    }
View Full Code Here

        edmPropertyValueMap.putAll(navigationMap);
        result.setEntryData(edmPropertyValueMap);
      }
      result.setInlineProperties(getInlineEntityProviderProperties(context));
    } catch (EdmException e) {
      throw new ODataApplicationException(e.getMessage(), Locale.getDefault(), e);
    } catch (ODataJPARuntimeException e) {
      throw new ODataApplicationException(e.getMessage(), Locale.getDefault(), e);
    }

    return result;
  }
View Full Code Here

        }
      }
      edmPropertyMap.put(name, edmProperties);
      return edmProperties;
    } catch (EdmException e) {
      throw new ODataApplicationException(e.getMessage(), Locale.getDefault(), e);
    }
  }
View Full Code Here

        }
        result.setFeedData(edmEntityList);
      }
      result.setInlineProperties(getInlineEntityProviderProperties(context));
    } catch (EdmException e) {
      throw new ODataApplicationException(e.getMessage(), Locale.getDefault(), e);
    } catch (ODataJPARuntimeException e) {
      throw new ODataApplicationException(e.getMessage(), Locale.getDefault(), e);
    }
    return result;
  }
View Full Code Here

                getCallbacks(relatedData, entityType)).expandSelectTree(context.getCurrentExpandSelectTreeNode())
                .selfLink(context.getSelfLink()).build();
        result.setInlineProperties(inlineProperties);
        return result;
      } catch (final ODataException e) {
        throw new ODataApplicationException(e.getLocalizedMessage(), Locale.ROOT, e);
      }
    }
View Full Code Here

TOP

Related Classes of org.apache.olingo.odata2.api.exception.ODataApplicationException

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.