You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@olingo.apache.org by mi...@apache.org on 2013/09/24 14:42:55 UTC
[28/51] [partial] Refactored project structure
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata2/blob/57599da6/odata-api/src/main/java/org/apache/olingo/odata2/api/exception/ODataNotFoundException.java
----------------------------------------------------------------------
diff --git a/odata-api/src/main/java/org/apache/olingo/odata2/api/exception/ODataNotFoundException.java b/odata-api/src/main/java/org/apache/olingo/odata2/api/exception/ODataNotFoundException.java
deleted file mode 100644
index b8fcdb3..0000000
--- a/odata-api/src/main/java/org/apache/olingo/odata2/api/exception/ODataNotFoundException.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*******************************************************************************
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- ******************************************************************************/
-package org.apache.olingo.odata2.api.exception;
-
-import org.apache.olingo.odata2.api.commons.HttpStatusCodes;
-
-/**
- * Exceptions of this class will result in a HTTP status 404 not found
- *
- */
-public class ODataNotFoundException extends ODataHttpException {
-
- private static final long serialVersionUID = 1L;
-
- public static final MessageReference ENTITY = createMessageReference(ODataNotFoundException.class, "ENTITY");
- public static final MessageReference MATRIX = createMessageReference(ODataNotFoundException.class, "MATRIX");
-
- public ODataNotFoundException(final MessageReference messageReference) {
- super(messageReference, HttpStatusCodes.NOT_FOUND);
- }
-
- public ODataNotFoundException(final MessageReference messageReference, final String errorCode) {
- super(messageReference, HttpStatusCodes.NOT_FOUND, errorCode);
- }
-
- public ODataNotFoundException(final MessageReference messageReference, final Throwable cause) {
- super(messageReference, cause, HttpStatusCodes.NOT_FOUND);
- }
-
- public ODataNotFoundException(final MessageReference messageReference, final Throwable cause,
- final String errorCode) {
- super(messageReference, cause, HttpStatusCodes.NOT_FOUND, errorCode);
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata2/blob/57599da6/odata-api/src/main/java/org/apache/olingo/odata2/api/exception/ODataNotImplementedException.java
----------------------------------------------------------------------
diff --git a/odata-api/src/main/java/org/apache/olingo/odata2/api/exception/ODataNotImplementedException.java b/odata-api/src/main/java/org/apache/olingo/odata2/api/exception/ODataNotImplementedException.java
deleted file mode 100644
index 3d802f4..0000000
--- a/odata-api/src/main/java/org/apache/olingo/odata2/api/exception/ODataNotImplementedException.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*******************************************************************************
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- ******************************************************************************/
-package org.apache.olingo.odata2.api.exception;
-
-import org.apache.olingo.odata2.api.commons.HttpStatusCodes;
-
-/**
- * Exceptions of this class will result in a HTTP status 501 (Not implemented).
- *
- */
-public class ODataNotImplementedException extends ODataHttpException {
-
- private static final long serialVersionUID = 1L;
-
- public static final MessageReference COMMON = createMessageReference(ODataNotImplementedException.class, "COMMON");
- public static final MessageReference TUNNELING = createMessageReference(ODataNotImplementedException.class,
- "TUNNELING");
-
- public ODataNotImplementedException(final MessageReference context) {
- super(context, HttpStatusCodes.NOT_IMPLEMENTED);
- }
-
- public ODataNotImplementedException(final MessageReference context, final String errorCode) {
- super(context, HttpStatusCodes.NOT_IMPLEMENTED, errorCode);
- }
-
- public ODataNotImplementedException() {
- this(COMMON);
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata2/blob/57599da6/odata-api/src/main/java/org/apache/olingo/odata2/api/exception/ODataPreconditionFailedException.java
----------------------------------------------------------------------
diff --git a/odata-api/src/main/java/org/apache/olingo/odata2/api/exception/ODataPreconditionFailedException.java b/odata-api/src/main/java/org/apache/olingo/odata2/api/exception/ODataPreconditionFailedException.java
deleted file mode 100644
index eed40d5..0000000
--- a/odata-api/src/main/java/org/apache/olingo/odata2/api/exception/ODataPreconditionFailedException.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*******************************************************************************
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- ******************************************************************************/
-package org.apache.olingo.odata2.api.exception;
-
-import org.apache.olingo.odata2.api.commons.HttpStatusCodes;
-
-/**
- * Exceptions of this class will result in a HTTP Status 412 Precondition Failed.
- *
- */
-public class ODataPreconditionFailedException extends ODataHttpException {
-
- private static final long serialVersionUID = 1L;
-
- public static final MessageReference COMMON =
- createMessageReference(ODataPreconditionFailedException.class, "COMMON");
-
- public ODataPreconditionFailedException(final MessageReference context) {
- super(context, HttpStatusCodes.PRECONDITION_FAILED);
- }
-
- public ODataPreconditionFailedException(final MessageReference context, final Throwable cause) {
- super(context, cause, HttpStatusCodes.PRECONDITION_FAILED);
- }
-
- public ODataPreconditionFailedException(final MessageReference context, final String errorCode) {
- super(context, HttpStatusCodes.PRECONDITION_FAILED, errorCode);
- }
-
- public ODataPreconditionFailedException(final MessageReference context, final Throwable cause,
- final String errorCode) {
- super(context, cause, HttpStatusCodes.PRECONDITION_FAILED, errorCode);
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata2/blob/57599da6/odata-api/src/main/java/org/apache/olingo/odata2/api/exception/ODataPreconditionRequiredException.java
----------------------------------------------------------------------
diff --git a/odata-api/src/main/java/org/apache/olingo/odata2/api/exception/ODataPreconditionRequiredException.java b/odata-api/src/main/java/org/apache/olingo/odata2/api/exception/ODataPreconditionRequiredException.java
deleted file mode 100644
index 5babcae..0000000
--- a/odata-api/src/main/java/org/apache/olingo/odata2/api/exception/ODataPreconditionRequiredException.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*******************************************************************************
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- ******************************************************************************/
-package org.apache.olingo.odata2.api.exception;
-
-import org.apache.olingo.odata2.api.commons.HttpStatusCodes;
-
-/**
- * Exceptions of this class will result in a HTTP status 428 precondition required
- *
- */
-public class ODataPreconditionRequiredException extends ODataHttpException {
-
- private static final long serialVersionUID = 1L;
-
- public static final MessageReference COMMON = createMessageReference(ODataPreconditionRequiredException.class,
- "COMMON");
-
- public ODataPreconditionRequiredException(final MessageReference context) {
- super(context, HttpStatusCodes.PRECONDITION_REQUIRED);
- }
-
- public ODataPreconditionRequiredException(final MessageReference context, final Throwable cause) {
- super(context, cause, HttpStatusCodes.PRECONDITION_REQUIRED);
- }
-
- public ODataPreconditionRequiredException(final MessageReference context, final String errorCode) {
- super(context, HttpStatusCodes.PRECONDITION_REQUIRED, errorCode);
- }
-
- public ODataPreconditionRequiredException(final MessageReference context, final Throwable cause,
- final String errorCode) {
- super(context, cause, HttpStatusCodes.PRECONDITION_REQUIRED, errorCode);
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata2/blob/57599da6/odata-api/src/main/java/org/apache/olingo/odata2/api/exception/ODataServiceUnavailableException.java
----------------------------------------------------------------------
diff --git a/odata-api/src/main/java/org/apache/olingo/odata2/api/exception/ODataServiceUnavailableException.java b/odata-api/src/main/java/org/apache/olingo/odata2/api/exception/ODataServiceUnavailableException.java
deleted file mode 100644
index 64cd0ff..0000000
--- a/odata-api/src/main/java/org/apache/olingo/odata2/api/exception/ODataServiceUnavailableException.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*******************************************************************************
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- ******************************************************************************/
-package org.apache.olingo.odata2.api.exception;
-
-import org.apache.olingo.odata2.api.commons.HttpStatusCodes;
-
-/**
- * Exceptions of this class will result in a HTTP status 503 service unavailable
- *
- */
-public class ODataServiceUnavailableException extends ODataHttpException {
-
- private static final long serialVersionUID = 1L;
-
- public static final MessageReference COMMON =
- createMessageReference(ODataServiceUnavailableException.class, "COMMON");
-
- public ODataServiceUnavailableException(final MessageReference context) {
- super(context, HttpStatusCodes.SERVICE_UNAVAILABLE);
- }
-
- public ODataServiceUnavailableException(final MessageReference context, final Throwable cause) {
- super(context, cause, HttpStatusCodes.SERVICE_UNAVAILABLE);
- }
-
- public ODataServiceUnavailableException(final MessageReference context, final String errorCode) {
- super(context, HttpStatusCodes.SERVICE_UNAVAILABLE, errorCode);
- }
-
- public ODataServiceUnavailableException(final MessageReference context, final Throwable cause,
- final String errorCode) {
- super(context, cause, HttpStatusCodes.SERVICE_UNAVAILABLE, errorCode);
- }
-
-}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata2/blob/57599da6/odata-api/src/main/java/org/apache/olingo/odata2/api/exception/ODataUnsupportedMediaTypeException.java
----------------------------------------------------------------------
diff --git a/odata-api/src/main/java/org/apache/olingo/odata2/api/exception/ODataUnsupportedMediaTypeException.java b/odata-api/src/main/java/org/apache/olingo/odata2/api/exception/ODataUnsupportedMediaTypeException.java
deleted file mode 100644
index db9e326..0000000
--- a/odata-api/src/main/java/org/apache/olingo/odata2/api/exception/ODataUnsupportedMediaTypeException.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*******************************************************************************
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- ******************************************************************************/
-package org.apache.olingo.odata2.api.exception;
-
-import org.apache.olingo.odata2.api.commons.HttpStatusCodes;
-
-/**
- * Exceptions of this class will result in a HTTP status 415 unsupported media type
- *
- */
-public class ODataUnsupportedMediaTypeException extends ODataHttpException {
-
- private static final long serialVersionUID = 1L;
-
- /** NOT_SUPPORTED requires 1 content value ('media type') */
- public static final MessageReference NOT_SUPPORTED = createMessageReference(ODataUnsupportedMediaTypeException.class,
- "NOT_SUPPORTED");
- /** NOT_SUPPORTED_CONTENT_TYPE requires 1 content value ('media type') */
- public static final MessageReference NOT_SUPPORTED_CONTENT_TYPE = createMessageReference(
- ODataUnsupportedMediaTypeException.class, "NOT_SUPPORTED_CONTENT_TYPE");
- /** NOT_SUPPORTED_ACCEPT_HEADER requires 1 content value ('media type') */
- public static final MessageReference NOT_SUPPORTED_ACCEPT_HEADER = createMessageReference(
- ODataUnsupportedMediaTypeException.class, "NOT_SUPPORTED_ACCEPT_HEADER");
-
- public ODataUnsupportedMediaTypeException(final MessageReference context) {
- super(context, HttpStatusCodes.UNSUPPORTED_MEDIA_TYPE);
- }
-
- public ODataUnsupportedMediaTypeException(final MessageReference context, final Throwable cause) {
- super(context, cause, HttpStatusCodes.UNSUPPORTED_MEDIA_TYPE);
- }
-
- public ODataUnsupportedMediaTypeException(final MessageReference context, final String errorCode) {
- super(context, HttpStatusCodes.UNSUPPORTED_MEDIA_TYPE, errorCode);
- }
-
- public ODataUnsupportedMediaTypeException(final MessageReference context, final Throwable cause,
- final String errorCode) {
- super(context, cause, HttpStatusCodes.UNSUPPORTED_MEDIA_TYPE, errorCode);
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata2/blob/57599da6/odata-api/src/main/java/org/apache/olingo/odata2/api/exception/package-info.java
----------------------------------------------------------------------
diff --git a/odata-api/src/main/java/org/apache/olingo/odata2/api/exception/package-info.java b/odata-api/src/main/java/org/apache/olingo/odata2/api/exception/package-info.java
deleted file mode 100644
index 542a703..0000000
--- a/odata-api/src/main/java/org/apache/olingo/odata2/api/exception/package-info.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/*******************************************************************************
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- ******************************************************************************/
-/**
- * Exception Classes used in the OData library as well as the implementing application
- * <p>APPLICATION DEVELOPERS: Please use {@link org.apache.olingo.odata2.api.exception.ODataApplicationException} for
- * custom exceptions.
- *
- * <p><b>Exception handling:</b>
- * <br>Inside the OData library an ExceptionMapper exists which can transform any exception into an OData error format.
- * The ExceptionMapper behaves after the following algorithm:
- * <br>1. The cause of the exception will be determined by looking into the stack trace.
- * <br>1.1. If the cause is an ODataApplicationException meaning that somewhere in the stack an
- * ODataApplicationException is found the
- * ExceptionMapper will take the following information from the ApplicationException and transform it into an OData
- * error:
- * message text, Locale, Inner Error and Error Code. There will be no altering of information for the
- * ODataApplicationException.
- * <br>1.2. If no ODataApplicationException is found in the stack the cause can be three different types of exceptions:
- * ODataHttpException, ODataMessageException or an uncaught RuntimeException.
- * <br>The ExceptionMapper will process them in the following order: 1. ODataHttpException, 2. ODataMessageException, 3
- * Other Exceptions.
- * <br>1.2.1. ODataHttpExceptions will be transformed as follows: If an error code is set it will be displayed. The HTTP
- * status code will be derived from the ODataHttpException. The message text and its language depend on the
- * AcceptLanguageHeaders.
- * The first supported language which is found in the Headers will result in the language of the message and the
- * response.
- * <br>1.2.1. ODataMessageException will be transformed as follows: If an error code is set it will be displayed. The
- * HTTP status code will be 500.
- * The message text and its language depend on the AcceptLanguageHeaders. The first supported language which is found in
- * the Headers will result in the language of the message and the response.
- * <br>1.2.1 Runtime Exceptions will be transformed as follows: No error code will be set. HTTP status will be 500.
- * Message text will be taken from the exception and the language for the response will be English as default.
- * <p><b>Exception Hierarchy</b>
- * <br> {@link org.apache.olingo.odata2.api.exception.ODataException} <br> *
- * {@link org.apache.olingo.odata2.api.exception.ODataApplicationException} <br> *
- * {@link org.apache.olingo.odata2.api.exception.ODataMessageException} <br> **
- * {@link org.apache.olingo.odata2.api.edm.EdmException} <br> **
- * {@link org.apache.olingo.odata2.api.ep.EntityProviderException} <br> **
- * {@link org.apache.olingo.odata2.api.uri.expression.ExceptionVisitExpression} <br> **
- * {@link org.apache.olingo.odata2.api.exception.ODataHttpException} <br> ***
- * {@link org.apache.olingo.odata2.api.exception.ODataConflictException} <br> ***
- * {@link org.apache.olingo.odata2.api.exception.ODataForbiddenException} <br> ***
- * {@link org.apache.olingo.odata2.api.exception.ODataMethodNotAllowedException} <br> ***
- * {@link org.apache.olingo.odata2.api.exception.ODataNotAcceptableException} <br> ***
- * {@link org.apache.olingo.odata2.api.exception.ODataNotImplementedException} <br> ***
- * {@link org.apache.olingo.odata2.api.exception.ODataPreconditionFailedException} <br> ***
- * {@link org.apache.olingo.odata2.api.exception.ODataPreconditionRequiredException} <br> ***
- * {@link org.apache.olingo.odata2.api.exception.ODataServiceUnavailableException} <br> ***
- * {@link org.apache.olingo.odata2.api.exception.ODataUnsupportedMediaTypeException} <br> ***
- * {@link org.apache.olingo.odata2.api.exception.ODataNotFoundException} <br> ****
- * {@link org.apache.olingo.odata2.api.uri.UriNotMatchingException} <br> ***
- * {@link org.apache.olingo.odata2.api.exception.ODataBadRequestException} <br> ****
- * {@link org.apache.olingo.odata2.api.uri.expression.ExpressionParserException} <br> ****
- * {@link org.apache.olingo.odata2.api.uri.UriSyntaxException}
- */
-package org.apache.olingo.odata2.api.exception;
-
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata2/blob/57599da6/odata-api/src/main/java/org/apache/olingo/odata2/api/package-info.java
----------------------------------------------------------------------
diff --git a/odata-api/src/main/java/org/apache/olingo/odata2/api/package-info.java b/odata-api/src/main/java/org/apache/olingo/odata2/api/package-info.java
deleted file mode 100644
index b5cb2bf..0000000
--- a/odata-api/src/main/java/org/apache/olingo/odata2/api/package-info.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*******************************************************************************
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- ******************************************************************************/
-/**
- * OData Library API
- * <p>
- * OData Library is a protocol implementation of the OData V2.0 standard. For details of this standard
- * see <a href="http://odata.org">odata.org</a>.
- * <p>
- * This API is intended to implement an OData service. An OData service consists of a metadata provider
- * implementation and an OData processor implementation.
- * <p>
- * An OData service can be exposed by a web application. For the runntime one JAX-RS
- * implementation is needed and the core implementation library of this API. Apache CXF for example is
- * one such JAX-RS implementation.
- * <p>
- * Entry point to the service is a JAX-RS servlet. At this servlet init parameters for a
- * <code>ODataServiceFactory</code>
- * is configured. The parameter <code>javax.ws.rs.Application</code> is a default by JAX-RS and has to be present
- * always.
- * <p>
- * <pre> {@code
- * <?xml version="1.0" encoding="UTF-8"?>
- * <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- * xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
- * xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
- * id="WebApp_ID" version="2.5">
- * <display-name>Example OData Service</display-name>
- * <servlet>
- * <servlet-name>MyODataServlet</servlet-name>
- * <servlet-class>org.apache.cxf.jaxrs.servlet.CXFNonSpringJaxrsServlet</servlet-class>
- * <init-param>
- * <param-name>javax.ws.rs.Application</param-name>
- * <param-value>org.apache.olingo.odata2.core.rest.app.ODataApplication</param-value>
- * </init-param>
- * <init-param>
- * <param-name>org.apache.olingo.odata2.service.factory</param-name>
- * <param-value>com.sample.service.MyServiceFactory</param-value>
- * </init-param>
- * <load-on-startup>1</load-on-startup>
- * </servlet>
- * <servlet-mapping>
- * <servlet-name>MyODataServlet</servlet-name>
- * <url-pattern>/MyService.svc/*</url-pattern>
- * </servlet-mapping>
- * </web-app>
- * } </pre>
- * <p>
- * This factory produces the service, a metadata provider and the data processor. The provider, typically
- * a derivative of the class <code>EdmProvider</code> provides the metadata of the service. The processor implements a
- * variety of service interfaces, and provides the data of the service. The processor is typically
- * a derivative of the class <code>ODataSingleProcessor</code> which can be used together with the class
- * <code>ODataSingleService</code>.
- */
-package org.apache.olingo.odata2.api;
-
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata2/blob/57599da6/odata-api/src/main/java/org/apache/olingo/odata2/api/processor/ODataContext.java
----------------------------------------------------------------------
diff --git a/odata-api/src/main/java/org/apache/olingo/odata2/api/processor/ODataContext.java b/odata-api/src/main/java/org/apache/olingo/odata2/api/processor/ODataContext.java
deleted file mode 100644
index f809cb6..0000000
--- a/odata-api/src/main/java/org/apache/olingo/odata2/api/processor/ODataContext.java
+++ /dev/null
@@ -1,235 +0,0 @@
-/*******************************************************************************
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- ******************************************************************************/
-package org.apache.olingo.odata2.api.processor;
-
-import java.util.List;
-import java.util.Locale;
-import java.util.Map;
-
-import org.apache.olingo.odata2.api.ODataService;
-import org.apache.olingo.odata2.api.ODataServiceFactory;
-import org.apache.olingo.odata2.api.exception.ODataException;
-import org.apache.olingo.odata2.api.uri.PathInfo;
-
-/**
- * Compilation of generic context objects.
- *
- * @org.apache.olingo.odata2.DoNotImplement
- */
-public interface ODataContext {
-
- /**
- * Gets the OData service.
- * @return ODataService related for this context
- * @throws ODataException
- */
- ODataService getService() throws ODataException;
-
- /**
- * @return the service factory instance
- */
- ODataServiceFactory getServiceFactory();
-
- /**
- * Gets information about the request path.
- * @return an OData path info object
- * @throws ODataException
- */
- PathInfo getPathInfo() throws ODataException;
-
- /**
- * If a request execution is part of batch processing then this method returns the context of the
- * outer batch request.
- * @return a batch parent context or null
- */
- ODataContext getBatchParentContext();
-
- /**
- * @return true in case of this request is part of a batch processing queue
- */
- boolean isInBatchMode();
-
- /**
- * Starts runtime measurement.
- * @param className class name where the runtime measurement starts
- * @param methodName method name where the runtime measurement starts
- * @return handle for the started runtime measurement which can be used for stopping
- */
- int startRuntimeMeasurement(String className, String methodName);
-
- /**
- * Stops runtime measurement.
- * @param handle of runtime measurement to be stopped
- */
- void stopRuntimeMeasurement(int handle);
-
- /**
- * Gets the list of all runtime measurements.
- * @return list of all runtime measurements of type {@link RuntimeMeasurement}
- */
- List<RuntimeMeasurement> getRuntimeMeasurements();
-
- /**
- * Gets the HTTP method of the request.
- * @return HTTP method as {@link String}
- */
- String getHttpMethod();
-
- /**
- * Sets a parameter.
- * @param name of parameter (name is used as key, existing values are overwritten)
- * @param value of parameter as object
- */
- void setParameter(String name, Object value);
-
- /**
- * Removes parameter.
- * @param name of parameter to be removed
- */
- void removeParameter(String name);
-
- /**
- * Gets a named parameter value.
- * @param name of parameter
- * @return parameter value as {@link Object} for the given name
- */
- Object getParameter(String name);
-
- /**
- * Returns the first found header value of the HTTP request.
- * @param name name of the first found request header element (e.g. "Content-Type")
- * @return null or a request header value if found
- */
- String getRequestHeader(String name);
-
- /**
- * Returns all header values of the HTTP request but never null.
- * @return immutable map of request header values
- */
- Map<String, List<String>> getRequestHeaders();
-
- /**
- * Gets information about enabled debug mode.
- * @return debugMode as boolean
- */
- boolean isInDebugMode();
-
- /**
- * Enables debug mode.
- * @param debugMode as boolean
- */
- void setDebugMode(boolean debugMode);
-
- /**
- * Gets a list of languages that are acceptable for the response.
- * If no acceptable languages are specified, a read-only list containing
- * a single wildcard java.util.Locale instance (with language field set to "*") is returned.
- * @return a read-only list of acceptable languages sorted according to their q-value,
- * with highest preference first.
- */
- List<Locale> getAcceptableLanguages();
-
- /**
- * <p>Runtime measurements.</p>
- * <p>All times are in nanoseconds since some fixed but arbitrary time
- * (perhaps in the future, so values may be negative).</p>
- * @see System#nanoTime()
- */
- public interface RuntimeMeasurement {
- /**
- * Sets the class name.
- * @param className the name of the class that is measured
- */
- void setClassName(String className);
-
- /**
- * Gets the class name.
- * @return the name of the class that is measured
- */
- String getClassName();
-
- /**
- * Sets the method name.
- * @param methodName the name of the method that is measured
- */
- void setMethodName(String methodName);
-
- /**
- * Gets the method name.
- * @return the name of the method that is measured
- */
- String getMethodName();
-
- /**
- * Sets the start time.
- * @param timeStarted the start time in nanoseconds
- * @see System#nanoTime()
- */
- void setTimeStarted(long timeStarted);
-
- /**
- * Gets the start time.
- * @return the start time in nanoseconds or 0 if not set yet
- * @see System#nanoTime()
- */
- long getTimeStarted();
-
- /**
- * Sets the stop time.
- * @param timeStopped the stop time in nanoseconds
- * @see System#nanoTime()
- */
- void setTimeStopped(long timeStopped);
-
- /**
- * Gets the stop time.
- * @return the stop time in nanoseconds or 0 if not set yet
- * @see System#nanoTime()
- */
- long getTimeStopped();
-
- /**
- * Sets the start heap memory used.
- * @param usedHeap the start heap memory used in bytes
- * @see java.lang.ManagementFactory#getMemoryMXBean()
- */
- void setMemoryStarted(long usedHeap);
-
- /**
- * Sets the stop heap memory used.
- * @param usedHeap the stop heap memory used in bytes
- * @see java.lang.ManagementFactory#getMemoryMXBean()
- */
- void setMemoryStopped(long usedHeap);
-
- /**
- * Gets the start heap memory used.
- * @return start heap memory used or 0 if not set
- * @see java.lang.ManagementFactory#getMemoryMXBean()
- */
- long getMemoryStarted();
-
- /**
- * Gets the stop heap memory used.
- * @return stop heap memory used or 0 if not set
- * @see java.lang.ManagementFactory#getMemoryMXBean()
- */
- long getMemoryStopped();
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata2/blob/57599da6/odata-api/src/main/java/org/apache/olingo/odata2/api/processor/ODataErrorCallback.java
----------------------------------------------------------------------
diff --git a/odata-api/src/main/java/org/apache/olingo/odata2/api/processor/ODataErrorCallback.java b/odata-api/src/main/java/org/apache/olingo/odata2/api/processor/ODataErrorCallback.java
deleted file mode 100644
index 3236de6..0000000
--- a/odata-api/src/main/java/org/apache/olingo/odata2/api/processor/ODataErrorCallback.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*******************************************************************************
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- ******************************************************************************/
-package org.apache.olingo.odata2.api.processor;
-
-import org.apache.olingo.odata2.api.ODataCallback;
-import org.apache.olingo.odata2.api.exception.ODataApplicationException;
-
-/**
- * This interface is called if an error occurred and is process inside the exception mapper.
- *
- *
- */
-public interface ODataErrorCallback extends ODataCallback {
- /**
- * This method can be used to handle an error differently than the exception mapper would.
- * <br>Any returned Response will be directly transported to the client.
- * <br>Any thrown {@link ODataApplicationException} will be transformed into the OData error format.
- * <br>Any thrown runtime exception will result in an 500 Internal Server error with the Text:
- * "Exception during error handling occurred!" No OData formatting will be applied.
- * <br>To serialize an error into the OData format the {@link org.apache.olingo.odata2.api.ep.EntityProvider}
- * writeErrorDocument can be used.
- * @param context of this error
- * @return the response which will be propagated to the client
- * @throws ODataApplicationException
- */
- ODataResponse handleError(ODataErrorContext context) throws ODataApplicationException;
-}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata2/blob/57599da6/odata-api/src/main/java/org/apache/olingo/odata2/api/processor/ODataErrorContext.java
----------------------------------------------------------------------
diff --git a/odata-api/src/main/java/org/apache/olingo/odata2/api/processor/ODataErrorContext.java b/odata-api/src/main/java/org/apache/olingo/odata2/api/processor/ODataErrorContext.java
deleted file mode 100644
index 6ae011b..0000000
--- a/odata-api/src/main/java/org/apache/olingo/odata2/api/processor/ODataErrorContext.java
+++ /dev/null
@@ -1,230 +0,0 @@
-/*******************************************************************************
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- ******************************************************************************/
-package org.apache.olingo.odata2.api.processor;
-
-import java.net.URI;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Locale;
-import java.util.Map;
-
-import org.apache.olingo.odata2.api.commons.HttpStatusCodes;
-import org.apache.olingo.odata2.api.uri.PathInfo;
-
-/**
- * Error context information bean. Usually created and in error situations.
- * @see org.apache.olingo.odata2.api.ep.EntityProvider EntityProvider
- * @see ODataErrorCallback
- *
- */
-public class ODataErrorContext {
-
- private String contentType;
- private HttpStatusCodes httpStatus;
- private String errorCode;
- private String message;
- private Locale locale;
- private Exception exception;
- private Map<String, List<String>> requestHeaders;
- private URI requestUri;
- private String innerError;
- private PathInfo pathInfo;
-
- /**
- * create a new context object
- */
- public ODataErrorContext() {
- requestHeaders = new HashMap<String, List<String>>();
- }
-
- /**
- * Returns the causing exception.
- * @return exception object
- */
- public Exception getException() {
- return exception;
- }
-
- /**
- * Set the causing exception.
- * @param exception exception object
- */
- public void setException(final Exception exception) {
- this.exception = exception;
- }
-
- /**
- * Get the content type which should be used to serialize an error response.
- * @return a content type
- */
- public String getContentType() {
- return contentType;
- }
-
- /**
- * Set content type which should be used to serialize an error response.
- * @param contentType a content type
- */
- public void setContentType(final String contentType) {
- this.contentType = contentType;
- }
-
- /**
- * Get the status code which will be returned in error response.
- * @return http status code
- */
- public HttpStatusCodes getHttpStatus() {
- return httpStatus;
- }
-
- /**
- * Set http status code that should be returned in error response.
- * @param status http status code
- */
- public void setHttpStatus(final HttpStatusCodes status) {
- httpStatus = status;
- }
-
- /**
- * Return OData error code that is returned in error response.
- * @return an application defined error code
- */
- public String getErrorCode() {
- return errorCode;
- }
-
- /**
- * Set OData error code that should be returned in error response.
- * @param errorCode an application defined error code
- */
- public void setErrorCode(final String errorCode) {
- this.errorCode = errorCode;
- }
-
- /**
- * Return a translated error message.
- * @return translated message
- */
- public String getMessage() {
- return message;
- }
-
- /**
- * Set a translated message.
- * @param message translated message
- */
- public void setMessage(final String message) {
- this.message = message;
- }
-
- /**
- * Return the locale of the translated message.
- * @return a locale
- */
- public Locale getLocale() {
- return locale;
- }
-
- /**
- * Set the locale for a translated message.
- * @param locale a locale
- */
- public void setLocale(final Locale locale) {
- this.locale = locale;
- }
-
- /**
- * Put http headers to be returned in error response.
- * @param key header name
- * @param value list of header values
- */
- public void putRequestHeader(final String key, final List<String> value) {
- requestHeaders.put(key, value);
- }
-
- /**
- * Return a map of http headers to be returned in error response.
- * @return a map of http headers
- */
- public Map<String, List<String>> getRequestHeaders() {
- return Collections.unmodifiableMap(requestHeaders);
- }
-
- /**
- * Get the list of values for a request header.
- * @param name header name
- * @return list of values
- */
- public List<String> getRequestHeader(final String name) {
- return requestHeaders.get(name);
- }
-
- /**
- * Set the request uri to be used in a error response.
- * @param requestUri a uri object
- */
- public void setRequestUri(final URI requestUri) {
- this.requestUri = requestUri;
- }
-
- /**
- * Get the request uri to be used in a error response.
- * @return a uri object
- */
- public URI getRequestUri() {
- return requestUri;
- }
-
- /**
- * Get a string for a OData inner error to be returned in error response.
- * @return a inner error message
- */
- public String getInnerError() {
- return innerError;
- }
-
- /**
- * Set a string for a OData inner error to be returned in error response.
- * @param innerError a inner error message
- */
- public void setInnerError(final String innerError) {
- this.innerError = innerError;
- }
-
- /**
- * Get {@link PathInfo} object.
- * May be <code>NULL</code> if no path info was created/set till error occurred (but may be over written by
- * application).
- *
- * @return {@link PathInfo} or <code>NULL</code>.
- */
- public PathInfo getPathInfo() {
- return pathInfo;
- }
-
- /**
- * Set {@link PathInfo} object.
- *
- * @param pathInfo path info
- */
- public void setPathInfo(final PathInfo pathInfo) {
- this.pathInfo = pathInfo;
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata2/blob/57599da6/odata-api/src/main/java/org/apache/olingo/odata2/api/processor/ODataProcessor.java
----------------------------------------------------------------------
diff --git a/odata-api/src/main/java/org/apache/olingo/odata2/api/processor/ODataProcessor.java b/odata-api/src/main/java/org/apache/olingo/odata2/api/processor/ODataProcessor.java
deleted file mode 100644
index 401891d..0000000
--- a/odata-api/src/main/java/org/apache/olingo/odata2/api/processor/ODataProcessor.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*******************************************************************************
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- ******************************************************************************/
-package org.apache.olingo.odata2.api.processor;
-
-import org.apache.olingo.odata2.api.exception.ODataException;
-
-/**
- * An <code>ODataProcessor</code> is the root interface for processor implementation.
- * A processor handles OData requests like reading or writing entities. All possible
- * actions are defined in the {@link org.apache.olingo.odata2.api.processor.feature} package.
- *
- * @org.apache.olingo.odata2.DoNotImplement
- */
-public interface ODataProcessor {
-
- /**
- * @param context A request context object which is usually injected by the OData library itself.
- * @throws ODataException
- */
- void setContext(ODataContext context) throws ODataException;
-
- /**
- * @return A request context object.
- * @throws ODataException
- */
- ODataContext getContext() throws ODataException;
-}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata2/blob/57599da6/odata-api/src/main/java/org/apache/olingo/odata2/api/processor/ODataRequest.java
----------------------------------------------------------------------
diff --git a/odata-api/src/main/java/org/apache/olingo/odata2/api/processor/ODataRequest.java b/odata-api/src/main/java/org/apache/olingo/odata2/api/processor/ODataRequest.java
deleted file mode 100644
index 7dfa43e..0000000
--- a/odata-api/src/main/java/org/apache/olingo/odata2/api/processor/ODataRequest.java
+++ /dev/null
@@ -1,127 +0,0 @@
-/*******************************************************************************
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- ******************************************************************************/
-package org.apache.olingo.odata2.api.processor;
-
-import java.io.InputStream;
-import java.util.List;
-import java.util.Locale;
-import java.util.Map;
-
-import org.apache.olingo.odata2.api.commons.ODataHttpMethod;
-import org.apache.olingo.odata2.api.rt.RuntimeDelegate;
-import org.apache.olingo.odata2.api.uri.PathInfo;
-
-/**
- *
- *
- */
-public abstract class ODataRequest {
-
- public abstract String getRequestHeaderValue(String name);
-
- public abstract Map<String, List<String>> getRequestHeaders();
-
- public abstract InputStream getBody();
-
- public abstract PathInfo getPathInfo();
-
- public abstract ODataHttpMethod getMethod();
-
- public abstract List<Locale> getAcceptableLanguages();
-
- public abstract String getContentType();
-
- public abstract List<String> getAcceptHeaders();
-
- public abstract Map<String, String> getQueryParameters();
-
- public static ODataRequestBuilder requestHeaders(final Map<String, List<String>> headers) {
- return newBuilder().requestHeaders(headers);
- }
-
- public static ODataRequestBuilder body(final InputStream body) {
- return newBuilder().body(body);
- }
-
- public static ODataRequestBuilder pathInfo(final PathInfo pathInfo) {
- return newBuilder().pathInfo(pathInfo);
- }
-
- public static ODataRequestBuilder method(final ODataHttpMethod method) {
- return newBuilder().method(method);
- }
-
- public static ODataRequestBuilder acceptableLanguages(final List<Locale> acceptableLanguages) {
- return newBuilder().acceptableLanguages(acceptableLanguages);
- }
-
- public static ODataRequestBuilder contentType(final String contentType) {
- return newBuilder().contentType(contentType);
- }
-
- public static ODataRequestBuilder acceptHeaders(final List<String> acceptHeaders) {
- return newBuilder().acceptHeaders(acceptHeaders);
- }
-
- public static ODataRequestBuilder queryParameters(final Map<String, String> queryParameters) {
- return newBuilder().queryParameters(queryParameters);
- }
-
- public static ODataRequestBuilder fromRequest(final ODataRequest request) {
- return newBuilder().fromRequest(request);
- }
-
- /**
- * @return returns a new builder object
- */
- public static ODataRequestBuilder newBuilder() {
- return ODataRequestBuilder.newInstance();
- }
-
- public static abstract class ODataRequestBuilder {
-
- protected ODataRequestBuilder() {}
-
- private static ODataRequestBuilder newInstance() {
- return RuntimeDelegate.createODataRequestBuilder();
- }
-
- public abstract ODataRequest build();
-
- public abstract ODataRequestBuilder requestHeaders(Map<String, List<String>> headers);
-
- public abstract ODataRequestBuilder body(InputStream body);
-
- public abstract ODataRequestBuilder pathInfo(PathInfo pathInfo);
-
- public abstract ODataRequestBuilder method(ODataHttpMethod method);
-
- public abstract ODataRequestBuilder acceptableLanguages(List<Locale> acceptableLanguages);
-
- public abstract ODataRequestBuilder contentType(String contentType);
-
- public abstract ODataRequestBuilder acceptHeaders(List<String> acceptHeaders);
-
- public abstract ODataRequestBuilder queryParameters(Map<String, String> queryParameters);
-
- public abstract ODataRequestBuilder fromRequest(ODataRequest request);
-
- }
-
-}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata2/blob/57599da6/odata-api/src/main/java/org/apache/olingo/odata2/api/processor/ODataResponse.java
----------------------------------------------------------------------
diff --git a/odata-api/src/main/java/org/apache/olingo/odata2/api/processor/ODataResponse.java b/odata-api/src/main/java/org/apache/olingo/odata2/api/processor/ODataResponse.java
deleted file mode 100644
index 345368e..0000000
--- a/odata-api/src/main/java/org/apache/olingo/odata2/api/processor/ODataResponse.java
+++ /dev/null
@@ -1,171 +0,0 @@
-/*******************************************************************************
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- ******************************************************************************/
-package org.apache.olingo.odata2.api.processor;
-
-import java.io.IOException;
-import java.util.Set;
-
-import org.apache.olingo.odata2.api.commons.HttpStatusCodes;
-import org.apache.olingo.odata2.api.rt.RuntimeDelegate;
-
-/**
- * <p>An <code>ODataResponse</code> is usually created by an {@link ODataProcessor} during request handling.</p>
- * <p>The handler can use a serializer to create an
- * OData body (== response entity) and can set various response headers.
- * A response can be created using the builder pattern:
- * <pre> {@code
- * ODataResponse response = ODataResponse.entity("hello world").setStatus(HttpStatusCodes.OK).build();
- * } </pre>
- *
- */
-public abstract class ODataResponse {
-
- /**
- * Do not subclass ODataResponse!
- */
- protected ODataResponse() {}
-
- /**
- * @return HTTP status code of this response
- */
- public abstract HttpStatusCodes getStatus();
-
- /**
- * @return a response entity which becomes the body part of a response message
- */
- public abstract Object getEntity();
-
- /**
- * Close the underlying entity input stream (if such a stream is available) and release all with this repsonse
- * associated resources.
- *
- * @throws IOException if something goes wrong during close of {@link ODataResponse}
- */
- public abstract void close() throws IOException;
-
- /**
- * @param name HTTP response header name
- * @return a header value or null if not set
- */
- public abstract String getHeader(String name);
-
- /**
- * @return Content-Type header value or null if not set
- */
- public abstract String getContentHeader();
-
- /**
- * @return Location header value or null if not set
- */
- public abstract String getIdLiteral();
-
- /**
- * @return ETag header value or null if not available
- */
- public abstract String getETag();
-
- /**
- * @return a set of all available header names
- */
- public abstract Set<String> getHeaderNames();
-
- /**
- * Case insensitive check if the header is available in this ODataResponse
- * @param header header name
- * @return true/false
- */
- public abstract boolean containsHeader(String header);
-
- /**
- * @param status HTTP status code
- * @return a builder object
- */
- public static ODataResponseBuilder status(final HttpStatusCodes status) {
- return newBuilder().status(status);
- }
-
- /**
- * @param response
- * @return a new builder object
- */
- public static ODataResponseBuilder fromResponse(final ODataResponse response) {
- return newBuilder().fromResponse(response);
- }
-
- /**
- * @param entity
- * @return a builder object
- */
- public static ODataResponseBuilder entity(final Object entity) {
- return newBuilder().entity(entity);
- }
-
- /**
- * @param name HTTP header name
- * @param value associated value
- * @return a builder object
- */
- public static ODataResponseBuilder header(final String name, final String value) {
- return newBuilder().header(name, value);
- }
-
- /**
- * @param value content header value
- * @return a builder object
- */
- public static ODataResponseBuilder contentHeader(final String value) {
- return newBuilder().contentHeader(value);
- }
-
- /**
- * @return returns a new builder object
- */
- public static ODataResponseBuilder newBuilder() {
- return ODataResponseBuilder.newInstance();
- }
-
- /**
- * Implementation of the builder pattern to create instances of this type of object.
- *
- */
- public static abstract class ODataResponseBuilder {
-
- protected ODataResponseBuilder() {}
-
- private static ODataResponseBuilder newInstance() {
- return RuntimeDelegate.createODataResponseBuilder();
- }
-
- public abstract ODataResponse build();
-
- public abstract ODataResponseBuilder status(HttpStatusCodes status);
-
- public abstract ODataResponseBuilder entity(Object entity);
-
- public abstract ODataResponseBuilder header(String name, String value);
-
- public abstract ODataResponseBuilder idLiteral(String idLiteral);
-
- public abstract ODataResponseBuilder eTag(String eTag);
-
- public abstract ODataResponseBuilder contentHeader(String contentHeader);
-
- protected abstract ODataResponseBuilder fromResponse(ODataResponse response);
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata2/blob/57599da6/odata-api/src/main/java/org/apache/olingo/odata2/api/processor/ODataSingleProcessor.java
----------------------------------------------------------------------
diff --git a/odata-api/src/main/java/org/apache/olingo/odata2/api/processor/ODataSingleProcessor.java b/odata-api/src/main/java/org/apache/olingo/odata2/api/processor/ODataSingleProcessor.java
deleted file mode 100644
index 3c0004c..0000000
--- a/odata-api/src/main/java/org/apache/olingo/odata2/api/processor/ODataSingleProcessor.java
+++ /dev/null
@@ -1,391 +0,0 @@
-/*******************************************************************************
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- ******************************************************************************/
-package org.apache.olingo.odata2.api.processor;
-
-import java.io.InputStream;
-import java.util.Collections;
-import java.util.List;
-
-import org.apache.olingo.odata2.api.ODataServiceVersion;
-import org.apache.olingo.odata2.api.batch.BatchHandler;
-import org.apache.olingo.odata2.api.batch.BatchResponsePart;
-import org.apache.olingo.odata2.api.commons.HttpStatusCodes;
-import org.apache.olingo.odata2.api.commons.ODataHttpHeaders;
-import org.apache.olingo.odata2.api.edm.Edm;
-import org.apache.olingo.odata2.api.edm.EdmServiceMetadata;
-import org.apache.olingo.odata2.api.ep.EntityProvider;
-import org.apache.olingo.odata2.api.exception.ODataException;
-import org.apache.olingo.odata2.api.exception.ODataNotImplementedException;
-import org.apache.olingo.odata2.api.processor.ODataResponse.ODataResponseBuilder;
-import org.apache.olingo.odata2.api.processor.feature.CustomContentType;
-import org.apache.olingo.odata2.api.processor.part.BatchProcessor;
-import org.apache.olingo.odata2.api.processor.part.EntityComplexPropertyProcessor;
-import org.apache.olingo.odata2.api.processor.part.EntityLinkProcessor;
-import org.apache.olingo.odata2.api.processor.part.EntityLinksProcessor;
-import org.apache.olingo.odata2.api.processor.part.EntityMediaProcessor;
-import org.apache.olingo.odata2.api.processor.part.EntityProcessor;
-import org.apache.olingo.odata2.api.processor.part.EntitySetProcessor;
-import org.apache.olingo.odata2.api.processor.part.EntitySimplePropertyProcessor;
-import org.apache.olingo.odata2.api.processor.part.EntitySimplePropertyValueProcessor;
-import org.apache.olingo.odata2.api.processor.part.FunctionImportProcessor;
-import org.apache.olingo.odata2.api.processor.part.FunctionImportValueProcessor;
-import org.apache.olingo.odata2.api.processor.part.MetadataProcessor;
-import org.apache.olingo.odata2.api.processor.part.ServiceDocumentProcessor;
-import org.apache.olingo.odata2.api.uri.info.DeleteUriInfo;
-import org.apache.olingo.odata2.api.uri.info.GetComplexPropertyUriInfo;
-import org.apache.olingo.odata2.api.uri.info.GetEntityCountUriInfo;
-import org.apache.olingo.odata2.api.uri.info.GetEntityLinkCountUriInfo;
-import org.apache.olingo.odata2.api.uri.info.GetEntityLinkUriInfo;
-import org.apache.olingo.odata2.api.uri.info.GetEntitySetCountUriInfo;
-import org.apache.olingo.odata2.api.uri.info.GetEntitySetLinksCountUriInfo;
-import org.apache.olingo.odata2.api.uri.info.GetEntitySetLinksUriInfo;
-import org.apache.olingo.odata2.api.uri.info.GetEntitySetUriInfo;
-import org.apache.olingo.odata2.api.uri.info.GetEntityUriInfo;
-import org.apache.olingo.odata2.api.uri.info.GetFunctionImportUriInfo;
-import org.apache.olingo.odata2.api.uri.info.GetMediaResourceUriInfo;
-import org.apache.olingo.odata2.api.uri.info.GetMetadataUriInfo;
-import org.apache.olingo.odata2.api.uri.info.GetServiceDocumentUriInfo;
-import org.apache.olingo.odata2.api.uri.info.GetSimplePropertyUriInfo;
-import org.apache.olingo.odata2.api.uri.info.PostUriInfo;
-import org.apache.olingo.odata2.api.uri.info.PutMergePatchUriInfo;
-
-/**
- * <p>A default {@link ODataProcessor} that implements all processor features in a single class.</p>
- * <p>It is recommended to derive from this class and it is required by the
- * {@link org.apache.olingo.odata2.api.ODataServiceFactory} to build an
- * {@link org.apache.olingo.odata2.api.ODataService}.</p>
- * <p>This abstract class provides a default behavior, returning the correct response
- * for requests for the service or the metadata document, respectively, and throwing an
- * {@link ODataNotImplementedException} for all other requests.
- * Sub classes have to override only methods they want to support.</p>
- *
- *
- */
-public abstract class ODataSingleProcessor implements MetadataProcessor, ServiceDocumentProcessor, EntityProcessor,
- EntitySetProcessor, EntityComplexPropertyProcessor, EntityLinkProcessor, EntityLinksProcessor,
- EntityMediaProcessor, EntitySimplePropertyProcessor, EntitySimplePropertyValueProcessor, FunctionImportProcessor,
- FunctionImportValueProcessor, BatchProcessor, CustomContentType {
-
- /**
- * A request context object usually injected by the OData library.
- */
- private ODataContext context;
-
- /**
- * @see ODataProcessor
- */
- @Override
- public void setContext(final ODataContext context) {
- this.context = context;
- }
-
- /**
- * @see ODataProcessor
- */
- @Override
- public ODataContext getContext() {
- return context;
- }
-
- /**
- * @see BatchProcessor
- */
- @Override
- public ODataResponse executeBatch(final BatchHandler handler, final String contentType, final InputStream content)
- throws ODataException {
- throw new ODataNotImplementedException();
- }
-
- /**
- * @throws ODataNotImplementedException
- * @see BatchProcessor
- */
- @Override
- public BatchResponsePart executeChangeSet(final BatchHandler handler, final List<ODataRequest> requests)
- throws ODataException {
- throw new ODataNotImplementedException();
- }
-
- /**
- * @see FunctionImportProcessor
- */
- @Override
- public ODataResponse executeFunctionImport(final GetFunctionImportUriInfo uriInfo, final String contentType)
- throws ODataException {
- throw new ODataNotImplementedException();
- }
-
- /**
- * @see FunctionImportValueProcessor
- */
- @Override
- public ODataResponse executeFunctionImportValue(final GetFunctionImportUriInfo uriInfo, final String contentType)
- throws ODataException {
- throw new ODataNotImplementedException();
- }
-
- /**
- * @see EntitySimplePropertyValueProcessor
- */
- @Override
- public ODataResponse readEntitySimplePropertyValue(final GetSimplePropertyUriInfo uriInfo, final String contentType)
- throws ODataException {
- throw new ODataNotImplementedException();
- }
-
- /**
- * @see EntitySimplePropertyValueProcessor
- */
- @Override
- public ODataResponse updateEntitySimplePropertyValue(final PutMergePatchUriInfo uriInfo, final InputStream content,
- final String requestContentType, final String contentType) throws ODataException {
- throw new ODataNotImplementedException();
- }
-
- /**
- * @see EntitySimplePropertyValueProcessor
- */
- @Override
- public ODataResponse deleteEntitySimplePropertyValue(final DeleteUriInfo uriInfo, final String contentType)
- throws ODataException {
- throw new ODataNotImplementedException();
- }
-
- /**
- * @see EntitySimplePropertyProcessor
- */
- @Override
- public ODataResponse readEntitySimpleProperty(final GetSimplePropertyUriInfo uriInfo, final String contentType)
- throws ODataException {
- throw new ODataNotImplementedException();
- }
-
- /**
- * @see EntitySimplePropertyProcessor
- */
- @Override
- public ODataResponse updateEntitySimpleProperty(final PutMergePatchUriInfo uriInfo, final InputStream content,
- final String requestContentType, final String contentType) throws ODataException {
- throw new ODataNotImplementedException();
- }
-
- /**
- * @see EntityMediaProcessor
- */
- @Override
- public ODataResponse readEntityMedia(final GetMediaResourceUriInfo uriInfo, final String contentType)
- throws ODataException {
- throw new ODataNotImplementedException();
- }
-
- /**
- * @see EntityMediaProcessor
- */
- @Override
- public ODataResponse updateEntityMedia(final PutMergePatchUriInfo uriInfo, final InputStream content,
- final String requestContentType, final String contentType) throws ODataException {
- throw new ODataNotImplementedException();
- }
-
- /**
- * @see EntityMediaProcessor
- */
- @Override
- public ODataResponse deleteEntityMedia(final DeleteUriInfo uriInfo, final String contentType) throws ODataException {
- throw new ODataNotImplementedException();
- }
-
- /**
- * @see EntityLinksProcessor
- */
- @Override
- public ODataResponse readEntityLinks(final GetEntitySetLinksUriInfo uriInfo, final String contentType)
- throws ODataException {
- throw new ODataNotImplementedException();
- }
-
- /**
- * @see EntityLinksProcessor
- */
- @Override
- public ODataResponse countEntityLinks(final GetEntitySetLinksCountUriInfo uriInfo, final String contentType)
- throws ODataException {
- throw new ODataNotImplementedException();
- }
-
- /**
- * @see EntityLinkProcessor
- */
- @Override
- public ODataResponse createEntityLink(final PostUriInfo uriInfo, final InputStream content,
- final String requestContentType, final String contentType) throws ODataException {
- throw new ODataNotImplementedException();
- }
-
- /**
- * @see EntityLinkProcessor
- */
- @Override
- public ODataResponse readEntityLink(final GetEntityLinkUriInfo uriInfo, final String contentType)
- throws ODataException {
- throw new ODataNotImplementedException();
- }
-
- /**
- * @see EntityLinkProcessor
- */
- @Override
- public ODataResponse existsEntityLink(final GetEntityLinkCountUriInfo uriInfo, final String contentType)
- throws ODataException {
- throw new ODataNotImplementedException();
- }
-
- /**
- * @see EntityLinkProcessor
- */
- @Override
- public ODataResponse updateEntityLink(final PutMergePatchUriInfo uriInfo, final InputStream content,
- final String requestContentType, final String contentType) throws ODataException {
- throw new ODataNotImplementedException();
- }
-
- /**
- * @see EntityLinkProcessor
- */
- @Override
- public ODataResponse deleteEntityLink(final DeleteUriInfo uriInfo, final String contentType) throws ODataException {
- throw new ODataNotImplementedException();
- }
-
- /**
- * @see EntityComplexPropertyProcessor
- */
- @Override
- public ODataResponse readEntityComplexProperty(final GetComplexPropertyUriInfo uriInfo, final String contentType)
- throws ODataException {
- throw new ODataNotImplementedException();
- }
-
- /**
- * @see EntityComplexPropertyProcessor
- */
- @Override
- public ODataResponse updateEntityComplexProperty(final PutMergePatchUriInfo uriInfo, final InputStream content,
- final String requestContentType, final boolean merge, final String contentType) throws ODataException {
- throw new ODataNotImplementedException();
- }
-
- /**
- * @see EntitySetProcessor
- */
- @Override
- public ODataResponse readEntitySet(final GetEntitySetUriInfo uriInfo, final String contentType)
- throws ODataException {
- throw new ODataNotImplementedException();
- }
-
- /**
- * @see EntitySetProcessor
- */
- @Override
- public ODataResponse countEntitySet(final GetEntitySetCountUriInfo uriInfo, final String contentType)
- throws ODataException {
- throw new ODataNotImplementedException();
- }
-
- /**
- * @see EntitySetProcessor
- */
- @Override
- public ODataResponse createEntity(final PostUriInfo uriInfo, final InputStream content,
- final String requestContentType, final String contentType) throws ODataException {
- throw new ODataNotImplementedException();
- }
-
- /**
- * @see EntityProcessor
- */
- @Override
- public ODataResponse readEntity(final GetEntityUriInfo uriInfo, final String contentType) throws ODataException {
- throw new ODataNotImplementedException();
- }
-
- /**
- * @see EntityProcessor
- */
- @Override
- public ODataResponse existsEntity(final GetEntityCountUriInfo uriInfo, final String contentType)
- throws ODataException {
- throw new ODataNotImplementedException();
- }
-
- /**
- * @see EntityProcessor
- */
- @Override
- public ODataResponse updateEntity(final PutMergePatchUriInfo uriInfo, final InputStream content,
- final String requestContentType, final boolean merge, final String contentType) throws ODataException {
- throw new ODataNotImplementedException();
- }
-
- /**
- * @see EntityProcessor
- */
- @Override
- public ODataResponse deleteEntity(final DeleteUriInfo uriInfo, final String contentType) throws ODataException {
- throw new ODataNotImplementedException();
- }
-
- /**
- * @see ServiceDocumentProcessor
- */
- @Override
- public ODataResponse readServiceDocument(final GetServiceDocumentUriInfo uriInfo, final String contentType)
- throws ODataException {
- final Edm entityDataModel = getContext().getService().getEntityDataModel();
- final String serviceRoot = getContext().getPathInfo().getServiceRoot().toASCIIString();
-
- final ODataResponse response = EntityProvider.writeServiceDocument(contentType, entityDataModel, serviceRoot);
- final ODataResponseBuilder odataResponseBuilder = ODataResponse.fromResponse(response).header(
- ODataHttpHeaders.DATASERVICEVERSION, ODataServiceVersion.V10);
-
- return odataResponseBuilder.build();
- }
-
- /**
- * @see MetadataProcessor
- */
- @Override
- public ODataResponse readMetadata(final GetMetadataUriInfo uriInfo, final String contentType) throws ODataException {
- final EdmServiceMetadata edmServiceMetadata = getContext().getService().getEntityDataModel().getServiceMetadata();
-
- return ODataResponse.status(HttpStatusCodes.OK)
- .header(ODataHttpHeaders.DATASERVICEVERSION, edmServiceMetadata.getDataServiceVersion())
- .entity(edmServiceMetadata.getMetadata()).build();
- }
-
- /**
- * @see CustomContentType
- */
- @Override
- public List<String> getCustomContentTypes(final Class<? extends ODataProcessor> processorFeature)
- throws ODataException {
- return Collections.emptyList();
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata2/blob/57599da6/odata-api/src/main/java/org/apache/olingo/odata2/api/processor/feature/CustomContentType.java
----------------------------------------------------------------------
diff --git a/odata-api/src/main/java/org/apache/olingo/odata2/api/processor/feature/CustomContentType.java b/odata-api/src/main/java/org/apache/olingo/odata2/api/processor/feature/CustomContentType.java
deleted file mode 100644
index 610f45c..0000000
--- a/odata-api/src/main/java/org/apache/olingo/odata2/api/processor/feature/CustomContentType.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*******************************************************************************
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- ******************************************************************************/
-package org.apache.olingo.odata2.api.processor.feature;
-
-import java.util.List;
-
-import org.apache.olingo.odata2.api.exception.ODataException;
-import org.apache.olingo.odata2.api.processor.ODataProcessor;
-
-/**
- * Data processor feature if processor supports custom content types. By default the OData library supports
- * various types like Json (application/json), Atom (application/xml+atom) and XML (application/xml). But
- * the OData specification allows also other types like e.g. CSV or plain text.
- *
- *
- */
-public interface CustomContentType extends ODataProcessorFeature {
-
- /**
- * The OData library will consider these additional content types during negotiation of http content type header.
- * @param processorFeature
- * @return a list of additional supported content types in the format "type/sub type"
- * @throws ODataException
- */
- public List<String> getCustomContentTypes(Class<? extends ODataProcessor> processorFeature) throws ODataException;
-}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata2/blob/57599da6/odata-api/src/main/java/org/apache/olingo/odata2/api/processor/feature/ODataProcessorFeature.java
----------------------------------------------------------------------
diff --git a/odata-api/src/main/java/org/apache/olingo/odata2/api/processor/feature/ODataProcessorFeature.java b/odata-api/src/main/java/org/apache/olingo/odata2/api/processor/feature/ODataProcessorFeature.java
deleted file mode 100644
index 32d6e3c..0000000
--- a/odata-api/src/main/java/org/apache/olingo/odata2/api/processor/feature/ODataProcessorFeature.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*******************************************************************************
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- ******************************************************************************/
-package org.apache.olingo.odata2.api.processor.feature;
-
-/**
- * Marker interface for data processor features. A feature is like a call back where
- * the OData library can request additional information from the processor to change
- * control over request handling.
- *
- *
- */
-public interface ODataProcessorFeature {
-
-}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata2/blob/57599da6/odata-api/src/main/java/org/apache/olingo/odata2/api/processor/feature/package-info.java
----------------------------------------------------------------------
diff --git a/odata-api/src/main/java/org/apache/olingo/odata2/api/processor/feature/package-info.java b/odata-api/src/main/java/org/apache/olingo/odata2/api/processor/feature/package-info.java
deleted file mode 100644
index ca1fd44..0000000
--- a/odata-api/src/main/java/org/apache/olingo/odata2/api/processor/feature/package-info.java
+++ /dev/null
@@ -1,25 +0,0 @@
-/*******************************************************************************
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- ******************************************************************************/
-/**
- * Processor Features<p>
- *
- * Optional feature interfaces. Can be implemented by custom data processors.
- */
-package org.apache.olingo.odata2.api.processor.feature;
-
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata2/blob/57599da6/odata-api/src/main/java/org/apache/olingo/odata2/api/processor/package-info.java
----------------------------------------------------------------------
diff --git a/odata-api/src/main/java/org/apache/olingo/odata2/api/processor/package-info.java b/odata-api/src/main/java/org/apache/olingo/odata2/api/processor/package-info.java
deleted file mode 100644
index e5afc1a..0000000
--- a/odata-api/src/main/java/org/apache/olingo/odata2/api/processor/package-info.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*******************************************************************************
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- ******************************************************************************/
-/**
- * Data Processor<p>
- *
- * A data processor implements all create, read, update and delete (CRUD) methods of an OData service. A processor as
- * part of a OData service implementation is created by the service factory and then called during request handling.
- * In dependency of the http context (http method, requestheaders ...) and the parsed uri semantic the OData Library
- * will call an appropriate processor method. Within this method a service can perform operations on data. In a final
- * step the data result can be transformed using a {@link org.apache.olingo.odata2.api.ep.EntityProvider} (for Json,
- * Atom and XML) and is returned as
- * a {@link org.apache.olingo.odata2.api.processor.ODataResponse}.
- * <p>
- * A processor gets access to context information either via method parameters or a
- * {@link org.apache.olingo.odata2.api.processor.ODataContext} which is attached
- * to the processor object.
- * <p>
- * A processor can support optional features {@link org.apache.olingo.odata2.api.processor.feature} and implement
- * parts {@link org.apache.olingo.odata2.api.processor.part} which is more or less a grouping for different OData CRUD
- * operations.
- * <p> {@link org.apache.olingo.odata2.api.processor.ODataSingleProcessor} is a convenience abstract class that
- * implements all interface parts and has default implementations
- * for handling OData service document and metadata. Usually the
- * {@link org.apache.olingo.odata2.api.processor.ODataSingleProcessor} is used together with a
- * <code>ODataSingleService</code> default implementation.
- *
- */
-package org.apache.olingo.odata2.api.processor;
-
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata2/blob/57599da6/odata-api/src/main/java/org/apache/olingo/odata2/api/processor/part/BatchProcessor.java
----------------------------------------------------------------------
diff --git a/odata-api/src/main/java/org/apache/olingo/odata2/api/processor/part/BatchProcessor.java b/odata-api/src/main/java/org/apache/olingo/odata2/api/processor/part/BatchProcessor.java
deleted file mode 100644
index 1683aa5..0000000
--- a/odata-api/src/main/java/org/apache/olingo/odata2/api/processor/part/BatchProcessor.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/*******************************************************************************
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- ******************************************************************************/
-package org.apache.olingo.odata2.api.processor.part;
-
-import java.io.InputStream;
-import java.util.List;
-
-import org.apache.olingo.odata2.api.batch.BatchHandler;
-import org.apache.olingo.odata2.api.batch.BatchResponsePart;
-import org.apache.olingo.odata2.api.exception.ODataException;
-import org.apache.olingo.odata2.api.processor.ODataProcessor;
-import org.apache.olingo.odata2.api.processor.ODataRequest;
-import org.apache.olingo.odata2.api.processor.ODataResponse;
-
-/**
- * Execute a OData batch request.
- *
- *
- *
- */
-public interface BatchProcessor extends ODataProcessor {
-
- /**
- * Executes a OData batch request and provide Batch Response as {@link ODataResponse}
- * @param handler batch handler
- * @param contentType the content type of the request
- * @param content Batch Request body
- * @return a {@link ODataResponse} object
- * @throws ODataException
- */
- ODataResponse executeBatch(BatchHandler handler, String contentType, InputStream content) throws ODataException;
-
- /**
- * Executes a Change Set and provide BatchResponsePart as {@link BatchResponsePart} that contains the responses to
- * change requests.
- * The method has to define a rollback semantic that may be applied when a request within a Change Set fails
- * (all-or-nothing requirement).
- * If a request within a Change Set fails, instead of Change Set Response should be returned the error response
- * @param handler batch handler
- * @param requests list of single change requests
- * @return a {@link BatchResponsePart} object
- * @throws ODataException
- */
- BatchResponsePart executeChangeSet(BatchHandler handler, List<ODataRequest> requests) throws ODataException;
-}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata2/blob/57599da6/odata-api/src/main/java/org/apache/olingo/odata2/api/processor/part/EntityComplexPropertyProcessor.java
----------------------------------------------------------------------
diff --git a/odata-api/src/main/java/org/apache/olingo/odata2/api/processor/part/EntityComplexPropertyProcessor.java b/odata-api/src/main/java/org/apache/olingo/odata2/api/processor/part/EntityComplexPropertyProcessor.java
deleted file mode 100644
index aae885c..0000000
--- a/odata-api/src/main/java/org/apache/olingo/odata2/api/processor/part/EntityComplexPropertyProcessor.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*******************************************************************************
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- ******************************************************************************/
-package org.apache.olingo.odata2.api.processor.part;
-
-import java.io.InputStream;
-
-import org.apache.olingo.odata2.api.exception.ODataException;
-import org.apache.olingo.odata2.api.processor.ODataProcessor;
-import org.apache.olingo.odata2.api.processor.ODataResponse;
-import org.apache.olingo.odata2.api.uri.info.GetComplexPropertyUriInfo;
-import org.apache.olingo.odata2.api.uri.info.PutMergePatchUriInfo;
-
-/**
- * Execute a OData complex property request.
- *
- *
- */
-public interface EntityComplexPropertyProcessor extends ODataProcessor {
- /**
- * Reads a complex property of an entity.
- * @param uriInfo information about the request URI
- * @param contentType the content type of the response
- * @return a {@link ODataResponse} object
- * @throws ODataException
- */
- ODataResponse readEntityComplexProperty(GetComplexPropertyUriInfo uriInfo, String contentType) throws ODataException;
-
- /**
- * Updates a complex property of an entity.
- * @param uriInfo information about the request URI
- * @param content the content of the request, containing the updated property data
- * @param requestContentType the content type of the request body
- * @param merge if <code>true</code>, properties not present in the data are left unchanged;
- * if <code>false</code>, they are reset
- * @param contentType the content type of the response
- * @return a {@link ODataResponse} object
- * @throws ODataException
- */
- ODataResponse updateEntityComplexProperty(PutMergePatchUriInfo uriInfo, InputStream content,
- String requestContentType, boolean merge, String contentType) throws ODataException;
-}