You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@olingo.apache.org by ch...@apache.org on 2015/02/18 17:29:24 UTC
[13/17] olingo-odata4 git commit: [OLINGO-575] Move v4 package
content one package up
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/fit/src/test/java/org/apache/olingo/fit/v4/EntityUpdateTestITCase.java
----------------------------------------------------------------------
diff --git a/fit/src/test/java/org/apache/olingo/fit/v4/EntityUpdateTestITCase.java b/fit/src/test/java/org/apache/olingo/fit/v4/EntityUpdateTestITCase.java
index 3f6ab92..d5a5de1 100644
--- a/fit/src/test/java/org/apache/olingo/fit/v4/EntityUpdateTestITCase.java
+++ b/fit/src/test/java/org/apache/olingo/fit/v4/EntityUpdateTestITCase.java
@@ -28,10 +28,10 @@ import java.util.TimeZone;
import java.util.UUID;
import org.apache.olingo.client.api.communication.request.cud.ODataEntityUpdateRequest;
-import org.apache.olingo.client.api.communication.request.cud.v4.ODataReferenceAddingRequest;
-import org.apache.olingo.client.api.communication.request.cud.v4.UpdateType;
+import org.apache.olingo.client.api.communication.request.cud.ODataReferenceAddingRequest;
+import org.apache.olingo.client.api.communication.request.cud.UpdateType;
import org.apache.olingo.client.api.communication.response.ODataEntityUpdateResponse;
-import org.apache.olingo.client.api.communication.response.v4.ODataReferenceAddingResponse;
+import org.apache.olingo.client.api.communication.response.ODataReferenceAddingResponse;
import org.apache.olingo.commons.api.domain.ODataLink;
import org.apache.olingo.commons.api.domain.v4.ODataEntity;
import org.apache.olingo.commons.api.edm.EdmPrimitiveTypeException;
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/fit/src/test/java/org/apache/olingo/fit/v4/FilterFactoryTestITCase.java
----------------------------------------------------------------------
diff --git a/fit/src/test/java/org/apache/olingo/fit/v4/FilterFactoryTestITCase.java b/fit/src/test/java/org/apache/olingo/fit/v4/FilterFactoryTestITCase.java
index a1e5c3c..ea1f464 100644
--- a/fit/src/test/java/org/apache/olingo/fit/v4/FilterFactoryTestITCase.java
+++ b/fit/src/test/java/org/apache/olingo/fit/v4/FilterFactoryTestITCase.java
@@ -19,10 +19,10 @@
package org.apache.olingo.fit.v4;
import org.apache.olingo.client.api.communication.request.retrieve.ODataEntitySetRequest;
+import org.apache.olingo.client.api.uri.FilterArgFactory;
+import org.apache.olingo.client.api.uri.FilterFactory;
+import org.apache.olingo.client.api.uri.URIBuilder;
import org.apache.olingo.client.api.uri.URIFilter;
-import org.apache.olingo.client.api.uri.v4.FilterArgFactory;
-import org.apache.olingo.client.api.uri.v4.FilterFactory;
-import org.apache.olingo.client.api.uri.v4.URIBuilder;
import org.apache.olingo.commons.api.domain.v4.ODataEntity;
import org.apache.olingo.commons.api.domain.v4.ODataEntitySet;
import org.apache.olingo.commons.api.format.ODataFormat;
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/fit/src/test/java/org/apache/olingo/fit/v4/KeyAsSegmentTestITCase.java
----------------------------------------------------------------------
diff --git a/fit/src/test/java/org/apache/olingo/fit/v4/KeyAsSegmentTestITCase.java b/fit/src/test/java/org/apache/olingo/fit/v4/KeyAsSegmentTestITCase.java
index 7e543ec..8addcc6 100644
--- a/fit/src/test/java/org/apache/olingo/fit/v4/KeyAsSegmentTestITCase.java
+++ b/fit/src/test/java/org/apache/olingo/fit/v4/KeyAsSegmentTestITCase.java
@@ -19,11 +19,11 @@
package org.apache.olingo.fit.v4;
import org.apache.olingo.client.api.communication.request.cud.ODataEntityUpdateRequest;
-import org.apache.olingo.client.api.communication.request.cud.v4.UpdateType;
+import org.apache.olingo.client.api.communication.request.cud.UpdateType;
import org.apache.olingo.client.api.communication.request.retrieve.ODataEntityRequest;
import org.apache.olingo.client.api.communication.response.ODataEntityUpdateResponse;
import org.apache.olingo.client.api.communication.response.ODataRetrieveResponse;
-import org.apache.olingo.client.api.uri.v4.URIBuilder;
+import org.apache.olingo.client.api.uri.URIBuilder;
import org.apache.olingo.commons.api.domain.v4.ODataEntity;
import org.apache.olingo.commons.api.domain.v4.ODataProperty;
import org.apache.olingo.commons.api.edm.FullQualifiedName;
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/fit/src/test/java/org/apache/olingo/fit/v4/MediaEntityTestITCase.java
----------------------------------------------------------------------
diff --git a/fit/src/test/java/org/apache/olingo/fit/v4/MediaEntityTestITCase.java b/fit/src/test/java/org/apache/olingo/fit/v4/MediaEntityTestITCase.java
index e8d5449..f3dec24 100644
--- a/fit/src/test/java/org/apache/olingo/fit/v4/MediaEntityTestITCase.java
+++ b/fit/src/test/java/org/apache/olingo/fit/v4/MediaEntityTestITCase.java
@@ -20,9 +20,10 @@ package org.apache.olingo.fit.v4;
import org.apache.commons.io.IOUtils;
import org.apache.commons.lang3.RandomStringUtils;
+import org.apache.olingo.client.api.ODataClient;
import org.apache.olingo.client.api.communication.header.HeaderName;
import org.apache.olingo.client.api.communication.request.cud.ODataEntityUpdateRequest;
-import org.apache.olingo.client.api.communication.request.cud.v4.UpdateType;
+import org.apache.olingo.client.api.communication.request.cud.UpdateType;
import org.apache.olingo.client.api.communication.request.retrieve.ODataEntityRequest;
import org.apache.olingo.client.api.communication.request.retrieve.ODataMediaRequest;
import org.apache.olingo.client.api.communication.request.streamed.MediaEntityCreateStreamManager;
@@ -33,8 +34,7 @@ import org.apache.olingo.client.api.communication.response.ODataEntityUpdateResp
import org.apache.olingo.client.api.communication.response.ODataMediaEntityCreateResponse;
import org.apache.olingo.client.api.communication.response.ODataMediaEntityUpdateResponse;
import org.apache.olingo.client.api.communication.response.ODataRetrieveResponse;
-import org.apache.olingo.client.api.uri.v4.URIBuilder;
-import org.apache.olingo.client.api.v4.ODataClient;
+import org.apache.olingo.client.api.uri.URIBuilder;
import org.apache.olingo.client.core.ODataClientFactory;
import org.apache.olingo.commons.api.domain.v4.ODataEntity;
import org.apache.olingo.commons.api.domain.v4.ODataValuable;
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/fit/src/test/java/org/apache/olingo/fit/v4/OAuth2TestITCase.java
----------------------------------------------------------------------
diff --git a/fit/src/test/java/org/apache/olingo/fit/v4/OAuth2TestITCase.java b/fit/src/test/java/org/apache/olingo/fit/v4/OAuth2TestITCase.java
index c3ca7c8..089ca92 100644
--- a/fit/src/test/java/org/apache/olingo/fit/v4/OAuth2TestITCase.java
+++ b/fit/src/test/java/org/apache/olingo/fit/v4/OAuth2TestITCase.java
@@ -22,18 +22,20 @@ import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
import org.apache.commons.lang3.StringUtils;
+import org.apache.olingo.client.api.EdmEnabledODataClient;
+import org.apache.olingo.client.api.ODataClient;
import org.apache.olingo.client.api.communication.request.retrieve.ODataEntityRequest;
import org.apache.olingo.client.api.communication.response.ODataRetrieveResponse;
-import org.apache.olingo.client.api.uri.v4.URIBuilder;
-import org.apache.olingo.client.api.v4.EdmEnabledODataClient;
-import org.apache.olingo.client.api.v4.ODataClient;
+import org.apache.olingo.client.api.uri.URIBuilder;
import org.apache.olingo.client.core.ODataClientFactory;
import org.apache.olingo.commons.api.domain.v4.ODataEntity;
import org.apache.olingo.commons.api.format.ODataFormat;
import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.Test;
+
import java.net.URI;
+
import org.apache.olingo.client.core.http.DefaultHttpClientFactory;
import org.apache.olingo.fit.CXFOAuth2HttpClientFactory;
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/fit/src/test/java/org/apache/olingo/fit/v4/OpenTypeTestITCase.java
----------------------------------------------------------------------
diff --git a/fit/src/test/java/org/apache/olingo/fit/v4/OpenTypeTestITCase.java b/fit/src/test/java/org/apache/olingo/fit/v4/OpenTypeTestITCase.java
index 19da20f..08a5ada 100644
--- a/fit/src/test/java/org/apache/olingo/fit/v4/OpenTypeTestITCase.java
+++ b/fit/src/test/java/org/apache/olingo/fit/v4/OpenTypeTestITCase.java
@@ -21,7 +21,7 @@ package org.apache.olingo.fit.v4;
import org.apache.olingo.client.api.communication.request.cud.ODataEntityCreateRequest;
import org.apache.olingo.client.api.communication.response.ODataDeleteResponse;
import org.apache.olingo.client.api.communication.response.ODataEntityCreateResponse;
-import org.apache.olingo.client.api.uri.v4.URIBuilder;
+import org.apache.olingo.client.api.uri.URIBuilder;
import org.apache.olingo.commons.api.domain.ODataComplexValue;
import org.apache.olingo.commons.api.domain.v4.ODataEntity;
import org.apache.olingo.commons.api.domain.v4.ODataProperty;
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/fit/src/test/java/org/apache/olingo/fit/v4/PropertyTestITCase.java
----------------------------------------------------------------------
diff --git a/fit/src/test/java/org/apache/olingo/fit/v4/PropertyTestITCase.java b/fit/src/test/java/org/apache/olingo/fit/v4/PropertyTestITCase.java
index bf7662c..e388c99 100644
--- a/fit/src/test/java/org/apache/olingo/fit/v4/PropertyTestITCase.java
+++ b/fit/src/test/java/org/apache/olingo/fit/v4/PropertyTestITCase.java
@@ -23,17 +23,17 @@ import static org.junit.Assert.assertNotNull;
import java.io.IOException;
+import org.apache.olingo.client.api.ODataClient;
import org.apache.olingo.client.api.communication.request.cud.ODataDeleteRequest;
import org.apache.olingo.client.api.communication.request.cud.ODataEntityCreateRequest;
import org.apache.olingo.client.api.communication.request.cud.ODataPropertyUpdateRequest;
-import org.apache.olingo.client.api.communication.request.cud.v4.UpdateType;
+import org.apache.olingo.client.api.communication.request.cud.UpdateType;
import org.apache.olingo.client.api.communication.request.retrieve.ODataPropertyRequest;
import org.apache.olingo.client.api.communication.response.ODataDeleteResponse;
import org.apache.olingo.client.api.communication.response.ODataEntityCreateResponse;
import org.apache.olingo.client.api.communication.response.ODataPropertyUpdateResponse;
import org.apache.olingo.client.api.communication.response.ODataRetrieveResponse;
-import org.apache.olingo.client.api.uri.v4.URIBuilder;
-import org.apache.olingo.client.api.v4.ODataClient;
+import org.apache.olingo.client.api.uri.URIBuilder;
import org.apache.olingo.commons.api.domain.v4.ODataEntity;
import org.apache.olingo.commons.api.domain.v4.ODataProperty;
import org.apache.olingo.commons.api.domain.v4.ODataValuable;
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/fit/src/test/java/org/apache/olingo/fit/v4/PropertyValueTestITCase.java
----------------------------------------------------------------------
diff --git a/fit/src/test/java/org/apache/olingo/fit/v4/PropertyValueTestITCase.java b/fit/src/test/java/org/apache/olingo/fit/v4/PropertyValueTestITCase.java
index e4f9131..c8d5157 100644
--- a/fit/src/test/java/org/apache/olingo/fit/v4/PropertyValueTestITCase.java
+++ b/fit/src/test/java/org/apache/olingo/fit/v4/PropertyValueTestITCase.java
@@ -22,7 +22,7 @@ import org.apache.commons.lang3.StringUtils;
import org.apache.olingo.client.api.communication.ODataClientErrorException;
import org.apache.olingo.client.api.communication.request.retrieve.ODataPropertyRequest;
import org.apache.olingo.client.api.communication.request.retrieve.ODataValueRequest;
-import org.apache.olingo.client.api.uri.v4.URIBuilder;
+import org.apache.olingo.client.api.uri.URIBuilder;
import org.apache.olingo.commons.api.domain.ODataPrimitiveValue;
import org.apache.olingo.commons.api.domain.v4.ODataProperty;
import org.apache.olingo.commons.api.domain.v4.ODataValuable;
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/fit/src/test/java/org/apache/olingo/fit/v4/QueryOptionsTestITCase.java
----------------------------------------------------------------------
diff --git a/fit/src/test/java/org/apache/olingo/fit/v4/QueryOptionsTestITCase.java b/fit/src/test/java/org/apache/olingo/fit/v4/QueryOptionsTestITCase.java
index f86f1c2..ca6df11 100644
--- a/fit/src/test/java/org/apache/olingo/fit/v4/QueryOptionsTestITCase.java
+++ b/fit/src/test/java/org/apache/olingo/fit/v4/QueryOptionsTestITCase.java
@@ -22,7 +22,7 @@ import org.apache.olingo.client.api.communication.request.retrieve.ODataEntityRe
import org.apache.olingo.client.api.communication.request.retrieve.ODataEntitySetRequest;
import org.apache.olingo.client.api.communication.response.ODataRetrieveResponse;
import org.apache.olingo.client.api.uri.QueryOption;
-import org.apache.olingo.client.api.uri.v4.URIBuilder;
+import org.apache.olingo.client.api.uri.URIBuilder;
import org.apache.olingo.commons.api.domain.ODataInlineEntitySet;
import org.apache.olingo.commons.api.domain.v4.ODataEntity;
import org.apache.olingo.commons.api.domain.v4.ODataEntitySet;
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/fit/src/test/java/org/apache/olingo/fit/v4/SingletonTestITCase.java
----------------------------------------------------------------------
diff --git a/fit/src/test/java/org/apache/olingo/fit/v4/SingletonTestITCase.java b/fit/src/test/java/org/apache/olingo/fit/v4/SingletonTestITCase.java
index 9e0ef83..693ab11 100644
--- a/fit/src/test/java/org/apache/olingo/fit/v4/SingletonTestITCase.java
+++ b/fit/src/test/java/org/apache/olingo/fit/v4/SingletonTestITCase.java
@@ -18,12 +18,12 @@
*/
package org.apache.olingo.fit.v4;
+import org.apache.olingo.client.api.ODataClient;
import org.apache.olingo.client.api.communication.request.cud.ODataEntityUpdateRequest;
-import org.apache.olingo.client.api.communication.request.cud.v4.UpdateType;
+import org.apache.olingo.client.api.communication.request.cud.UpdateType;
import org.apache.olingo.client.api.communication.request.retrieve.ODataEntityRequest;
import org.apache.olingo.client.api.communication.response.ODataEntityUpdateResponse;
-import org.apache.olingo.client.api.uri.v4.URIBuilder;
-import org.apache.olingo.client.api.v4.ODataClient;
+import org.apache.olingo.client.api.uri.URIBuilder;
import org.apache.olingo.commons.api.domain.v4.ODataAnnotation;
import org.apache.olingo.commons.api.domain.v4.ODataSingleton;
import org.apache.olingo.commons.api.domain.v4.ODataValuable;
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-api/src/main/java/org/apache/olingo/client/api/EdmEnabledODataClient.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/EdmEnabledODataClient.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/EdmEnabledODataClient.java
new file mode 100644
index 0000000..0a5b1fb
--- /dev/null
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/EdmEnabledODataClient.java
@@ -0,0 +1,32 @@
+/*
+ * 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.client.api;
+
+import org.apache.olingo.client.api.communication.request.cud.UpdateType;
+import org.apache.olingo.client.api.communication.request.invoke.EdmEnabledInvokeRequestFactory;
+import org.apache.olingo.client.api.uri.URIBuilder;
+
+public interface EdmEnabledODataClient extends CommonEdmEnabledODataClient<UpdateType>, ODataClient {
+
+ @Override
+ URIBuilder newURIBuilder();
+
+ @Override
+ EdmEnabledInvokeRequestFactory getInvokeRequestFactory();
+}
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-api/src/main/java/org/apache/olingo/client/api/ODataClient.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/ODataClient.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/ODataClient.java
new file mode 100644
index 0000000..cabc722
--- /dev/null
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/ODataClient.java
@@ -0,0 +1,67 @@
+/*
+ * 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.client.api;
+
+import org.apache.olingo.client.api.communication.request.AsyncRequestFactory;
+import org.apache.olingo.client.api.communication.request.batch.BatchRequestFactory;
+import org.apache.olingo.client.api.communication.request.cud.CUDRequestFactory;
+import org.apache.olingo.client.api.communication.request.cud.UpdateType;
+import org.apache.olingo.client.api.communication.request.retrieve.RetrieveRequestFactory;
+import org.apache.olingo.client.api.serialization.ODataBinder;
+import org.apache.olingo.client.api.serialization.ODataDeserializer;
+import org.apache.olingo.client.api.serialization.ODataReader;
+import org.apache.olingo.client.api.uri.FilterFactory;
+import org.apache.olingo.client.api.uri.SearchFactory;
+import org.apache.olingo.client.api.uri.URIBuilder;
+import org.apache.olingo.commons.api.domain.v4.ODataObjectFactory;
+import org.apache.olingo.commons.api.format.ODataFormat;
+
+public interface ODataClient extends CommonODataClient<UpdateType> {
+
+ @Override
+ ODataDeserializer getDeserializer(ODataFormat format);
+
+ @Override
+ ODataReader getReader();
+
+ @Override
+ ODataBinder getBinder();
+
+ @Override
+ URIBuilder newURIBuilder(String serviceRoot);
+
+ @Override
+ FilterFactory getFilterFactory();
+
+ SearchFactory getSearchFactory();
+
+ @Override
+ ODataObjectFactory getObjectFactory();
+
+ AsyncRequestFactory getAsyncRequestFactory();
+
+ @Override
+ RetrieveRequestFactory getRetrieveRequestFactory();
+
+ @Override
+ CUDRequestFactory getCUDRequestFactory();
+
+ @Override
+ BatchRequestFactory getBatchRequestFactory();
+}
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/AsyncBatchRequestWrapper.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/AsyncBatchRequestWrapper.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/AsyncBatchRequestWrapper.java
new file mode 100644
index 0000000..06ea19d
--- /dev/null
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/AsyncBatchRequestWrapper.java
@@ -0,0 +1,46 @@
+/*
+ * 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.client.api.communication.request;
+
+import org.apache.olingo.client.api.communication.request.batch.ODataChangeset;
+import org.apache.olingo.client.api.communication.response.ODataBatchResponse;
+
+public interface AsyncBatchRequestWrapper extends AsyncRequestWrapper<ODataBatchResponse> {
+
+ /**
+ * Gets a changeset batch item instance. A changeset can be submitted embedded into a batch request only.
+ *
+ * @return ODataChangeset instance.
+ */
+ ODataChangeset addChangeset();
+
+ /**
+ * Adds a retrieve batch item instance. A retrieve item can be submitted embedded into a batch request only.
+ *
+ * @param request retrieve request to batch.
+ */
+ void addRetrieve(final ODataBatchableRequest request);
+
+ /**
+ * Adds an outside change batch item instance. An outside item can be submitted embedded into a batch request only.
+ *
+ * @param request update request to batch outside a changeset.
+ */
+ void addOutsideUpdate(final ODataBatchableRequest request);
+}
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/AsyncRequestFactory.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/AsyncRequestFactory.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/AsyncRequestFactory.java
new file mode 100644
index 0000000..764898b
--- /dev/null
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/AsyncRequestFactory.java
@@ -0,0 +1,29 @@
+/*
+ * 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.client.api.communication.request;
+
+import org.apache.olingo.client.api.communication.request.batch.ODataBatchRequest;
+import org.apache.olingo.client.api.communication.response.ODataResponse;
+
+public interface AsyncRequestFactory {
+
+ <R extends ODataResponse> AsyncRequestWrapper<R> getAsyncRequestWrapper(final ODataRequest odataRequest);
+
+ AsyncBatchRequestWrapper getAsyncBatchRequestWrapper(final ODataBatchRequest odataRequest);
+}
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/AsyncRequestWrapper.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/AsyncRequestWrapper.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/AsyncRequestWrapper.java
new file mode 100644
index 0000000..db06083
--- /dev/null
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/AsyncRequestWrapper.java
@@ -0,0 +1,56 @@
+/*
+ * 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.client.api.communication.request;
+
+import java.net.URI;
+
+import org.apache.olingo.client.api.communication.response.AsyncResponseWrapper;
+import org.apache.olingo.client.api.communication.response.ODataResponse;
+
+public interface AsyncRequestWrapper<R extends ODataResponse> {
+
+ /**
+ * Add wait http header.
+ *
+ * @param waitInSeconds wait time in seconds.
+ * @return the current AsyncRequestWrapper instance.
+ */
+ AsyncRequestWrapper<R> wait(int waitInSeconds);
+
+ /**
+ * The odata.callback preference MUST include the parameter url whose value is the URL of a callback endpoint to be
+ * invoked by the OData service when data is available. The syntax of the odata.callback preference is specified in
+ * [OData-ABNF].
+ * <br />
+ * For HTTP based callbacks, the OData service executes an HTTP GET request against the specified URL.
+ * <br/>
+ * Services that support odata.callback SHOULD support notifying the client through HTTP.
+ *
+ * @param url callback URL
+ * @return the current AsyncRequestWrapper instance.
+ */
+ AsyncRequestWrapper<R> callback(final URI url);
+
+ /**
+ * execute the request for the first time.
+ *
+ * @return the current AsyncRequestWrapper instance.
+ */
+ AsyncResponseWrapper<R> execute();
+}
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/ODataRequest.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/ODataRequest.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/ODataRequest.java
index 7a15320..02566f5 100644
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/ODataRequest.java
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/ODataRequest.java
@@ -29,9 +29,9 @@ import org.apache.olingo.commons.api.http.HttpMethod;
* Abstract representation of an OData request. Get instance by using factories.
*
* @see org.apache.olingo.client.api.communication.request.cud.v3.CUDRequestFactory
- * @see org.apache.olingo.client.api.communication.request.cud.v4.CUDRequestFactory
+ * @see org.apache.olingo.client.api.communication.request.cud.CUDRequestFactory
* @see org.apache.olingo.client.api.communication.request.batch.v3.BatchRequestFactory
- * @see org.apache.olingo.client.api.communication.request.batch.v4.BatchRequestFactory
+ * @see org.apache.olingo.client.api.communication.request.batch.BatchRequestFactory
* @see org.apache.olingo.client.api.communication.request.invoke.InvokeRequestFactory
*/
public interface ODataRequest {
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/batch/BatchRequestFactory.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/batch/BatchRequestFactory.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/batch/BatchRequestFactory.java
new file mode 100644
index 0000000..48a08fc
--- /dev/null
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/batch/BatchRequestFactory.java
@@ -0,0 +1,29 @@
+/*
+ * 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.client.api.communication.request.batch;
+
+
+public interface BatchRequestFactory extends CommonBatchRequestFactory {
+
+ /**
+ * {@inheritDoc }
+ */
+ @Override
+ ODataBatchRequest getBatchRequest(String serviceRoot);
+}
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/batch/ODataBatchRequest.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/batch/ODataBatchRequest.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/batch/ODataBatchRequest.java
new file mode 100644
index 0000000..3a07e25
--- /dev/null
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/batch/ODataBatchRequest.java
@@ -0,0 +1,27 @@
+/*
+ * 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.client.api.communication.request.batch;
+
+import org.apache.olingo.client.api.communication.request.ODataStreamedRequest;
+import org.apache.olingo.client.api.communication.response.ODataBatchResponse;
+
+public interface ODataBatchRequest
+ extends CommonODataBatchRequest, ODataStreamedRequest<ODataBatchResponse, BatchManager> {
+
+}
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/batch/ODataOutsideUpdate.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/batch/ODataOutsideUpdate.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/batch/ODataOutsideUpdate.java
new file mode 100644
index 0000000..e92961f
--- /dev/null
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/batch/ODataOutsideUpdate.java
@@ -0,0 +1,37 @@
+/*
+ * 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.client.api.communication.request.batch;
+
+import org.apache.olingo.client.api.communication.request.ODataBatchableRequest;
+
+/**
+ * Retrieve request wrapper for the corresponding batch item.
+ */
+public interface ODataOutsideUpdate extends ODataBatchRequestItem {
+
+ /**
+ * Serialize and send the given request.
+ * <p>
+ * An IllegalArgumentException is thrown in case of no GET request.
+ *
+ * @param request request to be serialized.
+ * @return current item instance.
+ */
+ ODataOutsideUpdate setRequest(final ODataBatchableRequest request);
+}
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/batch/v4/BatchRequestFactory.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/batch/v4/BatchRequestFactory.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/batch/v4/BatchRequestFactory.java
deleted file mode 100644
index 240e978..0000000
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/batch/v4/BatchRequestFactory.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.client.api.communication.request.batch.v4;
-
-import org.apache.olingo.client.api.communication.request.batch.CommonBatchRequestFactory;
-
-public interface BatchRequestFactory extends CommonBatchRequestFactory {
-
- /**
- * {@inheritDoc }
- */
- @Override
- ODataBatchRequest getBatchRequest(String serviceRoot);
-}
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/batch/v4/ODataBatchRequest.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/batch/v4/ODataBatchRequest.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/batch/v4/ODataBatchRequest.java
deleted file mode 100644
index 0c948d5..0000000
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/batch/v4/ODataBatchRequest.java
+++ /dev/null
@@ -1,29 +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.client.api.communication.request.batch.v4;
-
-import org.apache.olingo.client.api.communication.request.ODataStreamedRequest;
-import org.apache.olingo.client.api.communication.request.batch.BatchManager;
-import org.apache.olingo.client.api.communication.request.batch.CommonODataBatchRequest;
-import org.apache.olingo.client.api.communication.response.ODataBatchResponse;
-
-public interface ODataBatchRequest
- extends CommonODataBatchRequest, ODataStreamedRequest<ODataBatchResponse, BatchManager> {
-
-}
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/batch/v4/ODataOutsideUpdate.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/batch/v4/ODataOutsideUpdate.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/batch/v4/ODataOutsideUpdate.java
deleted file mode 100644
index 203ee95..0000000
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/batch/v4/ODataOutsideUpdate.java
+++ /dev/null
@@ -1,38 +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.client.api.communication.request.batch.v4;
-
-import org.apache.olingo.client.api.communication.request.ODataBatchableRequest;
-import org.apache.olingo.client.api.communication.request.batch.ODataBatchRequestItem;
-
-/**
- * Retrieve request wrapper for the corresponding batch item.
- */
-public interface ODataOutsideUpdate extends ODataBatchRequestItem {
-
- /**
- * Serialize and send the given request.
- * <p>
- * An IllegalArgumentException is thrown in case of no GET request.
- *
- * @param request request to be serialized.
- * @return current item instance.
- */
- ODataOutsideUpdate setRequest(final ODataBatchableRequest request);
-}
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/cud/CUDRequestFactory.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/cud/CUDRequestFactory.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/cud/CUDRequestFactory.java
new file mode 100644
index 0000000..32efe16
--- /dev/null
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/cud/CUDRequestFactory.java
@@ -0,0 +1,56 @@
+/*
+ * 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.client.api.communication.request.cud;
+
+import java.net.URI;
+
+import org.apache.olingo.commons.api.domain.v4.ODataSingleton;
+
+public interface CUDRequestFactory extends CommonCUDRequestFactory<UpdateType> {
+
+ ODataEntityUpdateRequest<ODataSingleton> getSingletonUpdateRequest(
+ URI targetURI, UpdateType type, ODataSingleton changes);
+
+ ODataEntityUpdateRequest<ODataSingleton> getSingletonUpdateRequest(
+ UpdateType type, ODataSingleton entity);
+
+ /**
+ * A successful POST request to a navigation property's references collection adds a relationship to an existing
+ * entity. The request body MUST contain a single entity reference that identifies the entity to be added.
+ * [OData-Protocol 4.0 - 11.4.6.1]
+ *
+ * @param serviceRoot serviceRoot URI
+ * @param targetURI navigation property reference collection URI
+ * @param reference entity reference
+ * @return new ODataReferenceAddingRequest instance.
+ */
+ ODataReferenceAddingRequest getReferenceAddingRequest(URI serviceRoot, URI targetURI, URI reference);
+
+ /**
+ * A successful PUT request to a single-valued navigation property�s reference resource changes the related entity.
+ * The request body MUST contain a single entity reference that identifies the existing entity to be related.
+ * [OData-Protocol 4.0 - 11.4.6.3]
+ *
+ * @param serviceRoot serviceRoot URI
+ * @param targetURI single-valued navigation property URI
+ * @param reference reference
+ * @return new ODataReferenceAddingRequest instance
+ */
+ ODataReferenceAddingRequest getReferenceSingleChangeRequest(URI serviceRoot, URI targetURI, URI reference);
+}
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/cud/ODataReferenceAddingRequest.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/cud/ODataReferenceAddingRequest.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/cud/ODataReferenceAddingRequest.java
new file mode 100644
index 0000000..df729d5
--- /dev/null
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/cud/ODataReferenceAddingRequest.java
@@ -0,0 +1,38 @@
+/*
+ * 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.client.api.communication.request.cud;
+
+import org.apache.olingo.client.api.communication.request.ODataBasicRequest;
+import org.apache.olingo.client.api.communication.request.ODataBatchableRequest;
+import org.apache.olingo.client.api.communication.response.ODataReferenceAddingResponse;
+
+/**
+ * This class implements an OData reference adding request.
+ *
+ * ODataReferenceAdding requests eighter add or change the reference of navigation properties.
+ *
+ * If the navigation property is a collection of navigation references, the request adds a new reference to the
+ * collection. [OData Protocol 4.0 - 11.4.6.1]
+ *
+ * If the request addresses an navigation property, which references a single entity, the reference will
+ * be changed to the value provided by the request. [OData-Protocol 4.0 - 11.4.6.3]
+ */
+public interface ODataReferenceAddingRequest
+ extends ODataBasicRequest<ODataReferenceAddingResponse>, ODataBatchableRequest {
+}
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/cud/UpdateType.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/cud/UpdateType.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/cud/UpdateType.java
new file mode 100644
index 0000000..07a1b62
--- /dev/null
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/cud/UpdateType.java
@@ -0,0 +1,52 @@
+/*
+ * 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.client.api.communication.request.cud;
+
+import org.apache.olingo.commons.api.http.HttpMethod;
+
+/**
+ * Update type.
+ */
+public enum UpdateType implements CommonUpdateType {
+
+ /**
+ * Replace all and remove missing attributes.
+ */
+ REPLACE(HttpMethod.PUT),
+ /**
+ * Differential update with only specified input property values to be replaced.
+ */
+ PATCH(HttpMethod.PATCH);
+
+ private final HttpMethod method;
+
+ private UpdateType(final HttpMethod method) {
+ this.method = method;
+ }
+
+ /**
+ * Gets HTTP request method.
+ *
+ * @return HTTP request method.
+ */
+ @Override
+ public HttpMethod getMethod() {
+ return method;
+ }
+}
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/cud/v4/CUDRequestFactory.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/cud/v4/CUDRequestFactory.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/cud/v4/CUDRequestFactory.java
deleted file mode 100644
index 0e4900d..0000000
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/cud/v4/CUDRequestFactory.java
+++ /dev/null
@@ -1,58 +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.client.api.communication.request.cud.v4;
-
-import java.net.URI;
-
-import org.apache.olingo.client.api.communication.request.cud.CommonCUDRequestFactory;
-import org.apache.olingo.client.api.communication.request.cud.ODataEntityUpdateRequest;
-import org.apache.olingo.commons.api.domain.v4.ODataSingleton;
-
-public interface CUDRequestFactory extends CommonCUDRequestFactory<UpdateType> {
-
- ODataEntityUpdateRequest<ODataSingleton> getSingletonUpdateRequest(
- URI targetURI, UpdateType type, ODataSingleton changes);
-
- ODataEntityUpdateRequest<ODataSingleton> getSingletonUpdateRequest(
- UpdateType type, ODataSingleton entity);
-
- /**
- * A successful POST request to a navigation property's references collection adds a relationship to an existing
- * entity. The request body MUST contain a single entity reference that identifies the entity to be added.
- * [OData-Protocol 4.0 - 11.4.6.1]
- *
- * @param serviceRoot serviceRoot URI
- * @param targetURI navigation property reference collection URI
- * @param reference entity reference
- * @return new ODataReferenceAddingRequest instance.
- */
- ODataReferenceAddingRequest getReferenceAddingRequest(URI serviceRoot, URI targetURI, URI reference);
-
- /**
- * A successful PUT request to a single-valued navigation property�s reference resource changes the related entity.
- * The request body MUST contain a single entity reference that identifies the existing entity to be related.
- * [OData-Protocol 4.0 - 11.4.6.3]
- *
- * @param serviceRoot serviceRoot URI
- * @param targetURI single-valued navigation property URI
- * @param reference reference
- * @return new ODataReferenceAddingRequest instance
- */
- ODataReferenceAddingRequest getReferenceSingleChangeRequest(URI serviceRoot, URI targetURI, URI reference);
-}
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/cud/v4/ODataReferenceAddingRequest.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/cud/v4/ODataReferenceAddingRequest.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/cud/v4/ODataReferenceAddingRequest.java
deleted file mode 100644
index 73a6ef4..0000000
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/cud/v4/ODataReferenceAddingRequest.java
+++ /dev/null
@@ -1,38 +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.client.api.communication.request.cud.v4;
-
-import org.apache.olingo.client.api.communication.request.ODataBasicRequest;
-import org.apache.olingo.client.api.communication.request.ODataBatchableRequest;
-import org.apache.olingo.client.api.communication.response.v4.ODataReferenceAddingResponse;
-
-/**
- * This class implements an OData reference adding request.
- *
- * ODataReferenceAdding requests eighter add or change the reference of navigation properties.
- *
- * If the navigation property is a collection of navigation references, the request adds a new reference to the
- * collection. [OData Protocol 4.0 - 11.4.6.1]
- *
- * If the request addresses an navigation property, which references a single entity, the reference will
- * be changed to the value provided by the request. [OData-Protocol 4.0 - 11.4.6.3]
- */
-public interface ODataReferenceAddingRequest
- extends ODataBasicRequest<ODataReferenceAddingResponse>, ODataBatchableRequest {
-}
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/cud/v4/UpdateType.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/cud/v4/UpdateType.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/cud/v4/UpdateType.java
deleted file mode 100644
index 389a36d..0000000
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/cud/v4/UpdateType.java
+++ /dev/null
@@ -1,53 +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.client.api.communication.request.cud.v4;
-
-import org.apache.olingo.client.api.communication.request.cud.CommonUpdateType;
-import org.apache.olingo.commons.api.http.HttpMethod;
-
-/**
- * Update type.
- */
-public enum UpdateType implements CommonUpdateType {
-
- /**
- * Replace all and remove missing attributes.
- */
- REPLACE(HttpMethod.PUT),
- /**
- * Differential update with only specified input property values to be replaced.
- */
- PATCH(HttpMethod.PATCH);
-
- private final HttpMethod method;
-
- private UpdateType(final HttpMethod method) {
- this.method = method;
- }
-
- /**
- * Gets HTTP request method.
- *
- * @return HTTP request method.
- */
- @Override
- public HttpMethod getMethod() {
- return method;
- }
-}
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/retrieve/ODataDeltaRequest.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/retrieve/ODataDeltaRequest.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/retrieve/ODataDeltaRequest.java
new file mode 100644
index 0000000..43a706b
--- /dev/null
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/retrieve/ODataDeltaRequest.java
@@ -0,0 +1,27 @@
+/*
+ * 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.client.api.communication.request.retrieve;
+
+import org.apache.olingo.commons.api.domain.v4.ODataDelta;
+
+/**
+ * Describes an OData retrieve request returning a delta object.
+ */
+public interface ODataDeltaRequest extends ODataRetrieveRequest<ODataDelta> {
+}
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/retrieve/RetrieveRequestFactory.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/retrieve/RetrieveRequestFactory.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/retrieve/RetrieveRequestFactory.java
new file mode 100644
index 0000000..089c5f5
--- /dev/null
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/retrieve/RetrieveRequestFactory.java
@@ -0,0 +1,46 @@
+/*
+ * 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.client.api.communication.request.retrieve;
+
+import java.net.URI;
+
+import org.apache.olingo.commons.api.domain.v4.ODataEntity;
+import org.apache.olingo.commons.api.domain.v4.ODataEntitySet;
+import org.apache.olingo.commons.api.domain.v4.ODataProperty;
+import org.apache.olingo.commons.api.domain.v4.ODataSingleton;
+
+@SuppressWarnings("unchecked")
+public interface RetrieveRequestFactory extends CommonRetrieveRequestFactory {
+
+ @Override
+ ODataEntitySetRequest<ODataEntitySet> getEntitySetRequest(URI uri);
+
+ @Override
+ ODataEntitySetIteratorRequest<ODataEntitySet, ODataEntity> getEntitySetIteratorRequest(URI uri);
+
+ ODataEntityRequest<ODataSingleton> getSingletonRequest(URI uri);
+
+ @Override
+ ODataEntityRequest<ODataEntity> getEntityRequest(URI uri);
+
+ @Override
+ ODataPropertyRequest<ODataProperty> getPropertyRequest(URI uri);
+
+ ODataDeltaRequest getDeltaRequest(URI uri);
+}
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/retrieve/v4/ODataDeltaRequest.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/retrieve/v4/ODataDeltaRequest.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/retrieve/v4/ODataDeltaRequest.java
deleted file mode 100644
index d10713a..0000000
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/retrieve/v4/ODataDeltaRequest.java
+++ /dev/null
@@ -1,28 +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.client.api.communication.request.retrieve.v4;
-
-import org.apache.olingo.client.api.communication.request.retrieve.ODataRetrieveRequest;
-import org.apache.olingo.commons.api.domain.v4.ODataDelta;
-
-/**
- * Describes an OData retrieve request returning a delta object.
- */
-public interface ODataDeltaRequest extends ODataRetrieveRequest<ODataDelta> {
-}
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/retrieve/v4/RetrieveRequestFactory.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/retrieve/v4/RetrieveRequestFactory.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/retrieve/v4/RetrieveRequestFactory.java
deleted file mode 100644
index 667bd4f..0000000
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/retrieve/v4/RetrieveRequestFactory.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.client.api.communication.request.retrieve.v4;
-
-import java.net.URI;
-
-import org.apache.olingo.client.api.communication.request.retrieve.CommonRetrieveRequestFactory;
-import org.apache.olingo.client.api.communication.request.retrieve.ODataEntityRequest;
-import org.apache.olingo.client.api.communication.request.retrieve.ODataEntitySetIteratorRequest;
-import org.apache.olingo.client.api.communication.request.retrieve.ODataEntitySetRequest;
-import org.apache.olingo.client.api.communication.request.retrieve.ODataPropertyRequest;
-import org.apache.olingo.commons.api.domain.v4.ODataEntity;
-import org.apache.olingo.commons.api.domain.v4.ODataEntitySet;
-import org.apache.olingo.commons.api.domain.v4.ODataProperty;
-import org.apache.olingo.commons.api.domain.v4.ODataSingleton;
-
-@SuppressWarnings("unchecked")
-public interface RetrieveRequestFactory extends CommonRetrieveRequestFactory {
-
- @Override
- ODataEntitySetRequest<ODataEntitySet> getEntitySetRequest(URI uri);
-
- @Override
- ODataEntitySetIteratorRequest<ODataEntitySet, ODataEntity> getEntitySetIteratorRequest(URI uri);
-
- ODataEntityRequest<ODataSingleton> getSingletonRequest(URI uri);
-
- @Override
- ODataEntityRequest<ODataEntity> getEntityRequest(URI uri);
-
- @Override
- ODataPropertyRequest<ODataProperty> getPropertyRequest(URI uri);
-
- ODataDeltaRequest getDeltaRequest(URI uri);
-}
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/v4/AsyncBatchRequestWrapper.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/v4/AsyncBatchRequestWrapper.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/v4/AsyncBatchRequestWrapper.java
deleted file mode 100644
index 65f98ec..0000000
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/v4/AsyncBatchRequestWrapper.java
+++ /dev/null
@@ -1,47 +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.client.api.communication.request.v4;
-
-import org.apache.olingo.client.api.communication.request.ODataBatchableRequest;
-import org.apache.olingo.client.api.communication.request.batch.ODataChangeset;
-import org.apache.olingo.client.api.communication.response.ODataBatchResponse;
-
-public interface AsyncBatchRequestWrapper extends AsyncRequestWrapper<ODataBatchResponse> {
-
- /**
- * Gets a changeset batch item instance. A changeset can be submitted embedded into a batch request only.
- *
- * @return ODataChangeset instance.
- */
- ODataChangeset addChangeset();
-
- /**
- * Adds a retrieve batch item instance. A retrieve item can be submitted embedded into a batch request only.
- *
- * @param request retrieve request to batch.
- */
- void addRetrieve(final ODataBatchableRequest request);
-
- /**
- * Adds an outside change batch item instance. An outside item can be submitted embedded into a batch request only.
- *
- * @param request update request to batch outside a changeset.
- */
- void addOutsideUpdate(final ODataBatchableRequest request);
-}
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/v4/AsyncRequestFactory.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/v4/AsyncRequestFactory.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/v4/AsyncRequestFactory.java
deleted file mode 100644
index 45dfc11..0000000
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/v4/AsyncRequestFactory.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.client.api.communication.request.v4;
-
-import org.apache.olingo.client.api.communication.request.ODataRequest;
-import org.apache.olingo.client.api.communication.request.batch.v4.ODataBatchRequest;
-import org.apache.olingo.client.api.communication.response.ODataResponse;
-
-public interface AsyncRequestFactory {
-
- <R extends ODataResponse> AsyncRequestWrapper<R> getAsyncRequestWrapper(final ODataRequest odataRequest);
-
- AsyncBatchRequestWrapper getAsyncBatchRequestWrapper(final ODataBatchRequest odataRequest);
-}
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/v4/AsyncRequestWrapper.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/v4/AsyncRequestWrapper.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/v4/AsyncRequestWrapper.java
deleted file mode 100644
index 220e063..0000000
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/v4/AsyncRequestWrapper.java
+++ /dev/null
@@ -1,56 +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.client.api.communication.request.v4;
-
-import java.net.URI;
-
-import org.apache.olingo.client.api.communication.response.ODataResponse;
-import org.apache.olingo.client.api.communication.response.v4.AsyncResponseWrapper;
-
-public interface AsyncRequestWrapper<R extends ODataResponse> {
-
- /**
- * Add wait http header.
- *
- * @param waitInSeconds wait time in seconds.
- * @return the current AsyncRequestWrapper instance.
- */
- AsyncRequestWrapper<R> wait(int waitInSeconds);
-
- /**
- * The odata.callback preference MUST include the parameter url whose value is the URL of a callback endpoint to be
- * invoked by the OData service when data is available. The syntax of the odata.callback preference is specified in
- * [OData-ABNF].
- * <br />
- * For HTTP based callbacks, the OData service executes an HTTP GET request against the specified URL.
- * <br/>
- * Services that support odata.callback SHOULD support notifying the client through HTTP.
- *
- * @param url callback URL
- * @return the current AsyncRequestWrapper instance.
- */
- AsyncRequestWrapper<R> callback(final URI url);
-
- /**
- * execute the request for the first time.
- *
- * @return the current AsyncRequestWrapper instance.
- */
- AsyncResponseWrapper<R> execute();
-}
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/response/AsyncResponse.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/response/AsyncResponse.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/response/AsyncResponse.java
new file mode 100644
index 0000000..2bf6d8d
--- /dev/null
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/response/AsyncResponse.java
@@ -0,0 +1,23 @@
+/*
+ * 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.client.api.communication.response;
+
+
+public interface AsyncResponse extends ODataResponse {
+}
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/response/AsyncResponseWrapper.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/response/AsyncResponseWrapper.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/response/AsyncResponseWrapper.java
new file mode 100644
index 0000000..702611e
--- /dev/null
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/response/AsyncResponseWrapper.java
@@ -0,0 +1,78 @@
+/*
+ * 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.client.api.communication.response;
+
+import java.net.URI;
+
+public interface AsyncResponseWrapper<R extends ODataResponse> {
+
+ /**
+ * Checks for preference applied.
+ *
+ * @return 'TRUE' if respond-async preference has been applied; 'FALSE' otherwise.
+ */
+ boolean isPreferenceApplied();
+
+ /**
+ * Checks if asynchronous processing has been terminated.
+ *
+ * @return 'TRUE' the process has been terminated; 'FALSE' otherwise.
+ */
+ boolean isDone();
+
+ /**
+ * Gets the real response.
+ * <br />
+ * If asynchronous processing has been terminated then the response will be returned immediately. This method retries
+ * after a delay, specified by the 'Retry-After' header indicating the time, in seconds, the client should wait before
+ * retry. If there isn't any 'Retry-After' response header available, a default of 5 seconds will be chosen. The query
+ * will be retried for a maximum of five times.
+ *
+ * @return real OData response.
+ */
+ R getODataResponse();
+
+ /**
+ * Specifies the location for the next monitor check.
+ * <br />
+ * Overrides the location value retrieved among headers and nullifies the previous valid response (if exists).
+ *
+ * @param uri monitor location.
+ * @return the current async response wrapper.
+ */
+ AsyncResponseWrapper<R> forceNextMonitorCheck(URI uri);
+
+ /**
+ * DeleteA DELETE request sent to the status monitor resource requests that the asynchronous processing be canceled. A
+ * 200 OK or to a 204 No Content response indicates that the asynchronous processing has been successfully canceled.
+ *
+ * @return OData delete response.
+ */
+ ODataDeleteResponse delete();
+
+ /**
+ * A client can request that the DELETE should be executed asynchronously. A 202 Accepted response indicates that the
+ * cancellation is being processed asynchronously; the client can use the returned Location header (which MUST be
+ * different from the status monitor resource of the initial request) to query for the status of the cancellation. If
+ * a delete request is not supported by the service, the service returns 405 Method Not Allowed.
+ *
+ * @return OData delete response.
+ */
+ AsyncResponseWrapper<ODataDeleteResponse> asyncDelete();
+}
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/response/ODataReferenceAddingResponse.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/response/ODataReferenceAddingResponse.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/response/ODataReferenceAddingResponse.java
new file mode 100644
index 0000000..05ad3f7
--- /dev/null
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/response/ODataReferenceAddingResponse.java
@@ -0,0 +1,31 @@
+/*
+ * 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.client.api.communication.response;
+
+
+/**
+ * This class implements the response to an OData Reference Adding request.
+ *
+ * If the request was successful, the service response has status code 204 and
+ * the body has to be empty.
+ *
+ * @see org.apache.olingo.client.api.communication.request.cud.api.request.cud.v4.ODataReferenceAddingRequest
+ */
+public interface ODataReferenceAddingResponse extends ODataResponse {
+}
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/response/v4/AsyncResponse.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/response/v4/AsyncResponse.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/response/v4/AsyncResponse.java
deleted file mode 100644
index f3fe972..0000000
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/response/v4/AsyncResponse.java
+++ /dev/null
@@ -1,24 +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.client.api.communication.response.v4;
-
-import org.apache.olingo.client.api.communication.response.ODataResponse;
-
-public interface AsyncResponse extends ODataResponse {
-}
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/response/v4/AsyncResponseWrapper.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/response/v4/AsyncResponseWrapper.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/response/v4/AsyncResponseWrapper.java
deleted file mode 100644
index c59f351..0000000
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/response/v4/AsyncResponseWrapper.java
+++ /dev/null
@@ -1,81 +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.client.api.communication.response.v4;
-
-import java.net.URI;
-
-import org.apache.olingo.client.api.communication.response.ODataDeleteResponse;
-import org.apache.olingo.client.api.communication.response.ODataResponse;
-
-public interface AsyncResponseWrapper<R extends ODataResponse> {
-
- /**
- * Checks for preference applied.
- *
- * @return 'TRUE' if respond-async preference has been applied; 'FALSE' otherwise.
- */
- boolean isPreferenceApplied();
-
- /**
- * Checks if asynchronous processing has been terminated.
- *
- * @return 'TRUE' the process has been terminated; 'FALSE' otherwise.
- */
- boolean isDone();
-
- /**
- * Gets the real response.
- * <br />
- * If asynchronous processing has been terminated then the response will be returned immediately. This method retries
- * after a delay, specified by the 'Retry-After' header indicating the time, in seconds, the client should wait before
- * retry. If there isn't any 'Retry-After' response header available, a default of 5 seconds will be chosen. The query
- * will be retried for a maximum of five times.
- *
- * @return real OData response.
- */
- R getODataResponse();
-
- /**
- * Specifies the location for the next monitor check.
- * <br />
- * Overrides the location value retrieved among headers and nullifies the previous valid response (if exists).
- *
- * @param uri monitor location.
- * @return the current async response wrapper.
- */
- AsyncResponseWrapper<R> forceNextMonitorCheck(URI uri);
-
- /**
- * DeleteA DELETE request sent to the status monitor resource requests that the asynchronous processing be canceled. A
- * 200 OK or to a 204 No Content response indicates that the asynchronous processing has been successfully canceled.
- *
- * @return OData delete response.
- */
- ODataDeleteResponse delete();
-
- /**
- * A client can request that the DELETE should be executed asynchronously. A 202 Accepted response indicates that the
- * cancellation is being processed asynchronously; the client can use the returned Location header (which MUST be
- * different from the status monitor resource of the initial request) to query for the status of the cancellation. If
- * a delete request is not supported by the service, the service returns 405 Method Not Allowed.
- *
- * @return OData delete response.
- */
- AsyncResponseWrapper<ODataDeleteResponse> asyncDelete();
-}
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/response/v4/ODataReferenceAddingResponse.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/response/v4/ODataReferenceAddingResponse.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/response/v4/ODataReferenceAddingResponse.java
deleted file mode 100644
index 9527d38..0000000
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/response/v4/ODataReferenceAddingResponse.java
+++ /dev/null
@@ -1,32 +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.client.api.communication.response.v4;
-
-import org.apache.olingo.client.api.communication.response.ODataResponse;
-
-/**
- * This class implements the response to an OData Reference Adding request.
- *
- * If the request was successful, the service response has status code 204 and
- * the body has to be empty.
- *
- * @see org.apache.olingo.api.request.cud.v4.ODataReferenceAddingRequest
- */
-public interface ODataReferenceAddingResponse extends ODataResponse {
-}
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/109c33ba/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/Action.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/Action.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/Action.java
new file mode 100644
index 0000000..920b0f3
--- /dev/null
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/Action.java
@@ -0,0 +1,35 @@
+/*
+ * 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.client.api.edm.xml;
+
+import java.util.List;
+
+public interface Action extends Named, Annotatable {
+
+ boolean isBound();
+
+ String getEntitySetPath();
+
+ List<Parameter> getParameters();
+
+ Parameter getParameter(String name);
+
+ ReturnType getReturnType();
+
+}