You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@olingo.apache.org by il...@apache.org on 2014/03/24 10:41:57 UTC
[08/50] [abbrv] Consistently using package name to differentiate V3
and V4
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-core/src/main/java/org/apache/olingo/client/core/ODataV4ClientImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/ODataV4ClientImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/ODataV4ClientImpl.java
deleted file mode 100644
index 2d5f6bf..0000000
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/ODataV4ClientImpl.java
+++ /dev/null
@@ -1,148 +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.core;
-
-import org.apache.olingo.client.api.ODataV4Client;
-import org.apache.olingo.client.api.V4Configuration;
-import org.apache.olingo.client.api.communication.header.HeaderName;
-import org.apache.olingo.client.api.communication.header.ODataHeaders;
-import org.apache.olingo.client.api.communication.request.batch.V4BatchRequestFactory;
-import org.apache.olingo.client.api.communication.request.cud.V4CUDRequestFactory;
-import org.apache.olingo.client.api.communication.request.invoke.V4InvokeRequestFactory;
-import org.apache.olingo.client.api.communication.request.retrieve.V4RetrieveRequestFactory;
-import org.apache.olingo.client.api.communication.request.streamed.V4StreamedRequestFactory;
-import org.apache.olingo.client.api.op.ODataBinder;
-import org.apache.olingo.client.api.op.ODataReader;
-import org.apache.olingo.client.api.op.ODataSerializer;
-import org.apache.olingo.client.api.op.ODataV4Deserializer;
-import org.apache.olingo.client.api.uri.V4URIBuilder;
-import org.apache.olingo.client.api.uri.filter.V4FilterFactory;
-import org.apache.olingo.client.core.communication.header.ODataHeadersImpl;
-import org.apache.olingo.client.core.communication.request.batch.V4BatchRequestFactoryImpl;
-import org.apache.olingo.client.core.communication.request.cud.V4CUDRequestFactoryImpl;
-import org.apache.olingo.client.core.communication.request.invoke.V4InvokeRequestFactoryImpl;
-import org.apache.olingo.client.core.communication.request.retrieve.V4RetrieveRequestFactoryImpl;
-import org.apache.olingo.client.core.communication.request.streamed.V4StreamedRequestFactoryImpl;
-import org.apache.olingo.client.core.op.impl.ODataV4BinderImpl;
-import org.apache.olingo.client.core.op.impl.ODataV4DeserializerImpl;
-import org.apache.olingo.client.core.op.impl.ODataV4ReaderImpl;
-import org.apache.olingo.client.core.op.impl.ODataV4SerializerImpl;
-import org.apache.olingo.client.core.uri.V4URIBuilderImpl;
-import org.apache.olingo.client.core.uri.filter.V4FilterFactoryImpl;
-import org.apache.olingo.commons.api.edm.constants.ODataServiceVersion;
-
-public class ODataV4ClientImpl extends AbstractODataClient implements ODataV4Client {
-
- private static final long serialVersionUID = -6653176125573631964L;
-
- private final V4Configuration configuration = new V4ConfigurationImpl();
-
- private final V4FilterFactory filterFactory = new V4FilterFactoryImpl();
-
- private final ODataV4Deserializer deserializer = new ODataV4DeserializerImpl(this);
-
- private final ODataSerializer serializer = new ODataV4SerializerImpl(this);
-
- private final ODataReader reader = new ODataV4ReaderImpl(this);
-
- private final ODataBinder binder = new ODataV4BinderImpl(this);
-
- private final V4RetrieveRequestFactory retrieveReqFact = new V4RetrieveRequestFactoryImpl(this);
-
- private final V4CUDRequestFactory cudReqFact = new V4CUDRequestFactoryImpl(this);
-
- private final V4StreamedRequestFactory streamedReqFact = new V4StreamedRequestFactoryImpl(this);
-
- private final V4InvokeRequestFactory invokeReqFact = new V4InvokeRequestFactoryImpl(this);
-
- private final V4BatchRequestFactory batchReqFact = new V4BatchRequestFactoryImpl(this);
-
- @Override
- public ODataServiceVersion getServiceVersion() {
- return ODataServiceVersion.V40;
- }
-
- @Override
- public ODataHeaders getVersionHeaders() {
- final ODataHeadersImpl odataHeaders = new ODataHeadersImpl();
- odataHeaders.setHeader(HeaderName.maxDataServiceVersion, ODataServiceVersion.V40.toString());
- odataHeaders.setHeader(HeaderName.dataServiceVersion, ODataServiceVersion.V40.toString());
- return odataHeaders;
- }
-
- @Override
- public V4Configuration getConfiguration() {
- return configuration;
- }
-
- @Override
- public V4URIBuilder getURIBuilder(final String serviceRoot) {
- return new V4URIBuilderImpl(serviceRoot);
- }
-
- @Override
- public V4FilterFactory getFilterFactory() {
- return filterFactory;
- }
-
- @Override
- public ODataV4Deserializer getDeserializer() {
- return deserializer;
- }
-
- @Override
- public ODataSerializer getSerializer() {
- return serializer;
- }
-
- @Override
- public ODataReader getReader() {
- return reader;
- }
-
- @Override
- public ODataBinder getBinder() {
- return binder;
- }
-
- @Override
- public V4RetrieveRequestFactory getRetrieveRequestFactory() {
- return retrieveReqFact;
- }
-
- @Override
- public V4CUDRequestFactory getCUDRequestFactory() {
- return cudReqFact;
- }
-
- @Override
- public V4StreamedRequestFactory getStreamedRequestFactory() {
- return streamedReqFact;
- }
-
- @Override
- public V4InvokeRequestFactory getInvokeRequestFactory() {
- return invokeReqFact;
- }
-
- @Override
- public V4BatchRequestFactory getBatchRequestFactory() {
- return batchReqFact;
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-core/src/main/java/org/apache/olingo/client/core/V3ConfigurationImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/V3ConfigurationImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/V3ConfigurationImpl.java
deleted file mode 100644
index 3844794..0000000
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/V3ConfigurationImpl.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.client.core;
-
-import org.apache.olingo.client.api.V3Configuration;
-
-public class V3ConfigurationImpl extends AbstractConfiguration implements V3Configuration {
-
- private static final long serialVersionUID = -8719958537946884777L;
-
- private static final String KEY_AS_SEGMENT = "keyAsSegment";
-
- protected V3ConfigurationImpl() {
- super();
- }
-
- /**
- * Checks whether URIs contain entity key between parentheses (standard) or instead as additional segment. Example:
- * http://services.odata.org/V4/OData/OData.svc/Products(0) or http://services.odata.org/V4/OData/OData.svc/Products/0
- *
- * @return whether URIs shall be built with entity key between parentheses (standard) or instead as additional
- * segment.
- */
- @Override
- public boolean isKeyAsSegment() {
- return (Boolean) getProperty(KEY_AS_SEGMENT, false);
- }
-
- /**
- * Sets whether URIs shall be built with entity key between parentheses (standard) or instead as additional segment.
- * Example: http://services.odata.org/V4/OData/OData.svc/Products(0) or
- * http://services.odata.org/V4/OData/OData.svc/Products/0
- *
- * @param value 'TRUE' to use this feature.
- */
- @Override
- public void setKeyAsSegment(final boolean value) {
- setProperty(KEY_AS_SEGMENT, value);
- }
-
-}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-core/src/main/java/org/apache/olingo/client/core/V4ConfigurationImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/V4ConfigurationImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/V4ConfigurationImpl.java
deleted file mode 100644
index 11c579e..0000000
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/V4ConfigurationImpl.java
+++ /dev/null
@@ -1,31 +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.core;
-
-import org.apache.olingo.client.api.V4Configuration;
-
-public class V4ConfigurationImpl extends AbstractConfiguration implements V4Configuration {
-
- private static final long serialVersionUID = -1134213707190176857L;
-
- protected V4ConfigurationImpl() {
- super();
- }
-
-}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-core/src/main/java/org/apache/olingo/client/core/Wrapper.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/Wrapper.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/Wrapper.java
deleted file mode 100644
index 1237a2f..0000000
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/Wrapper.java
+++ /dev/null
@@ -1,41 +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.core;
-
-/**
- * Generic wrapper class.
- *
- * @param <T>
- */
-public class Wrapper<T> {
-
- private T wrapped;
-
- public void setWrapped(final T wrapped) {
- this.wrapped = wrapped;
- }
-
- public T getWrapped() {
- if (wrapped == null) {
- throw new IllegalStateException("Wrapped object not set");
- }
-
- return wrapped;
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/AbstractODataBasicRequest.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/AbstractODataBasicRequest.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/AbstractODataBasicRequest.java
index 84135eb..307cdc9 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/AbstractODataBasicRequest.java
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/AbstractODataBasicRequest.java
@@ -26,7 +26,7 @@ import java.util.concurrent.Future;
import org.apache.commons.io.IOUtils;
import org.apache.commons.lang3.StringUtils;
import org.apache.olingo.client.api.ODataBatchConstants;
-import org.apache.olingo.client.api.ODataClient;
+import org.apache.olingo.client.api.CommonODataClient;
import org.apache.olingo.client.api.communication.request.ODataBasicRequest;
import org.apache.olingo.client.api.communication.request.ODataStreamer;
import org.apache.olingo.client.api.communication.request.batch.ODataBatchRequest;
@@ -51,7 +51,7 @@ public abstract class AbstractODataBasicRequest<V extends ODataResponse, T exten
* @param method request method.
* @param uri OData request URI.
*/
- public AbstractODataBasicRequest(final ODataClient odataClient,
+ public AbstractODataBasicRequest(final CommonODataClient odataClient,
final Class<T> formatRef, final HttpMethod method, final URI uri) {
super(odataClient, formatRef, method, uri);
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/AbstractODataStreamManager.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/AbstractODataStreamManager.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/AbstractODataStreamManager.java
index 2c59ff0..94f49d1 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/AbstractODataStreamManager.java
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/AbstractODataStreamManager.java
@@ -31,7 +31,6 @@ import org.apache.http.HttpResponse;
import org.apache.olingo.client.api.communication.request.ODataStreamManager;
import org.apache.olingo.client.api.communication.response.ODataResponse;
import org.apache.olingo.client.api.http.HttpClientException;
-import org.apache.olingo.client.core.Wrapper;
/**
* OData request payload management abstract class.
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/ODataRequestImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/ODataRequestImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/ODataRequestImpl.java
index e931cb1..d088e97 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/ODataRequestImpl.java
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/ODataRequestImpl.java
@@ -33,8 +33,8 @@ import org.apache.http.HttpResponse;
import org.apache.http.client.HttpClient;
import org.apache.http.client.methods.HttpUriRequest;
import org.apache.http.impl.client.DecompressingHttpClient;
-import org.apache.olingo.client.api.ODataClient;
-import org.apache.olingo.client.api.V3Configuration;
+import org.apache.olingo.client.api.CommonODataClient;
+import org.apache.olingo.client.api.v3.Configuration;
import org.apache.olingo.client.api.communication.ODataClientErrorException;
import org.apache.olingo.client.api.communication.ODataServerErrorException;
import org.apache.olingo.client.api.communication.header.HeaderName;
@@ -73,7 +73,7 @@ public class ODataRequestImpl<T extends Enum<T>> implements ODataRequest {
*/
protected static final Logger LOG = LoggerFactory.getLogger(ODataRequest.class);
- protected final ODataClient odataClient;
+ protected final CommonODataClient odataClient;
protected final Class<T> formatRef;
@@ -110,7 +110,7 @@ public class ODataRequestImpl<T extends Enum<T>> implements ODataRequest {
* @param method HTTP request method. If configured X-HTTP-METHOD header will be used.
* @param uri OData request URI.
*/
- protected ODataRequestImpl(final ODataClient odataClient,
+ protected ODataRequestImpl(final CommonODataClient odataClient,
final Class<T> formatRef, final HttpMethod method, final URI uri) {
this.odataClient = odataClient;
@@ -376,7 +376,7 @@ public class ODataRequestImpl<T extends Enum<T>> implements ODataRequest {
// Add header for KeyAsSegment management
if (odataClient.getServiceVersion() == ODataServiceVersion.V30
- && ((V3Configuration) odataClient.getConfiguration()).isKeyAsSegment()) {
+ && ((Configuration) odataClient.getConfiguration()).isKeyAsSegment()) {
addCustomHeader(
HeaderName.dataServiceUrlConventions.toString(), ODataHeaderValues.keyAsSegment);
}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/Wrapper.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/Wrapper.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/Wrapper.java
new file mode 100644
index 0000000..ca2baf1
--- /dev/null
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/Wrapper.java
@@ -0,0 +1,41 @@
+/*
+ * 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.core.communication.request;
+
+/**
+ * Generic wrapper class.
+ *
+ * @param <T>
+ */
+public class Wrapper<T> {
+
+ private T wrapped;
+
+ public void setWrapped(final T wrapped) {
+ this.wrapped = wrapped;
+ }
+
+ public T getWrapped() {
+ if (wrapped == null) {
+ throw new IllegalStateException("Wrapped object not set");
+ }
+
+ return wrapped;
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/batch/AbstractBatchRequestFactory.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/batch/AbstractBatchRequestFactory.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/batch/AbstractBatchRequestFactory.java
index c92a243..5efbca7 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/batch/AbstractBatchRequestFactory.java
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/batch/AbstractBatchRequestFactory.java
@@ -12,20 +12,20 @@
*/
package org.apache.olingo.client.core.communication.request.batch;
-import org.apache.olingo.client.api.ODataClient;
-import org.apache.olingo.client.api.communication.request.batch.BatchRequestFactory;
+import org.apache.olingo.client.api.CommonODataClient;
+import org.apache.olingo.client.api.communication.request.batch.CommonBatchRequestFactory;
import org.apache.olingo.client.api.communication.request.batch.ODataBatchRequest;
/**
* OData batch request factory class.
*/
-public abstract class AbstractBatchRequestFactory implements BatchRequestFactory {
+public abstract class AbstractBatchRequestFactory implements CommonBatchRequestFactory {
private static final long serialVersionUID = -3875283254713404483L;
- protected final ODataClient client;
+ protected final CommonODataClient client;
- protected AbstractBatchRequestFactory(final ODataClient client) {
+ protected AbstractBatchRequestFactory(final CommonODataClient client) {
this.client = client;
}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/batch/ODataBatchRequestImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/batch/ODataBatchRequestImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/batch/ODataBatchRequestImpl.java
index 114bf56..9ebf783 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/batch/ODataBatchRequestImpl.java
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/batch/ODataBatchRequestImpl.java
@@ -29,7 +29,7 @@ import java.util.concurrent.TimeUnit;
import org.apache.http.HttpResponse;
import org.apache.http.client.HttpClient;
import org.apache.olingo.client.api.ODataBatchConstants;
-import org.apache.olingo.client.api.ODataClient;
+import org.apache.olingo.client.api.CommonODataClient;
import org.apache.olingo.client.api.communication.request.batch.BatchStreamManager;
import org.apache.olingo.client.api.communication.request.batch.ODataBatchRequest;
import org.apache.olingo.client.api.communication.request.batch.ODataBatchRequestItem;
@@ -65,7 +65,7 @@ public class ODataBatchRequestImpl extends AbstractODataStreamedRequest<ODataBat
* @param odataClient client instance getting this request
* @param uri batch request URI (http://serviceRoot/$batch)
*/
- ODataBatchRequestImpl(final ODataClient odataClient, final URI uri) {
+ ODataBatchRequestImpl(final CommonODataClient odataClient, final URI uri) {
super(odataClient, HttpMethod.POST, uri);
// create a random UUID value for boundary
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/batch/V3BatchRequestFactoryImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/batch/V3BatchRequestFactoryImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/batch/V3BatchRequestFactoryImpl.java
deleted file mode 100644
index 865de64..0000000
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/batch/V3BatchRequestFactoryImpl.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.core.communication.request.batch;
-
-import org.apache.olingo.client.api.ODataV3Client;
-import org.apache.olingo.client.api.communication.request.batch.V3BatchRequestFactory;
-
-public class V3BatchRequestFactoryImpl extends AbstractBatchRequestFactory
- implements V3BatchRequestFactory {
-
- private static final long serialVersionUID = -6271567229804128570L;
-
- public V3BatchRequestFactoryImpl(final ODataV3Client client) {
- super(client);
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/batch/V4BatchRequestFactoryImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/batch/V4BatchRequestFactoryImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/batch/V4BatchRequestFactoryImpl.java
deleted file mode 100644
index 0e61d4c..0000000
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/batch/V4BatchRequestFactoryImpl.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.core.communication.request.batch;
-
-import org.apache.olingo.client.api.ODataV4Client;
-import org.apache.olingo.client.api.communication.request.batch.V4BatchRequestFactory;
-
-public class V4BatchRequestFactoryImpl extends AbstractBatchRequestFactory
- implements V4BatchRequestFactory {
-
- private static final long serialVersionUID = 788349446729208639L;
-
- public V4BatchRequestFactoryImpl(final ODataV4Client client) {
- super(client);
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/batch/v3/BatchRequestFactoryImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/batch/v3/BatchRequestFactoryImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/batch/v3/BatchRequestFactoryImpl.java
new file mode 100644
index 0000000..489124a
--- /dev/null
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/batch/v3/BatchRequestFactoryImpl.java
@@ -0,0 +1,33 @@
+/*
+ * 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.core.communication.request.batch.v3;
+
+import org.apache.olingo.client.api.v3.ODataClient;
+import org.apache.olingo.client.api.communication.request.batch.v3.BatchRequestFactory;
+import org.apache.olingo.client.core.communication.request.batch.AbstractBatchRequestFactory;
+
+public class BatchRequestFactoryImpl extends AbstractBatchRequestFactory
+ implements BatchRequestFactory {
+
+ private static final long serialVersionUID = -6271567229804128570L;
+
+ public BatchRequestFactoryImpl(final ODataClient client) {
+ super(client);
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/batch/v4/BatchRequestFactoryImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/batch/v4/BatchRequestFactoryImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/batch/v4/BatchRequestFactoryImpl.java
new file mode 100644
index 0000000..fc0a012
--- /dev/null
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/batch/v4/BatchRequestFactoryImpl.java
@@ -0,0 +1,33 @@
+/*
+ * 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.core.communication.request.batch.v4;
+
+import org.apache.olingo.client.api.v4.ODataClient;
+import org.apache.olingo.client.api.communication.request.batch.v4.BatchRequestFactory;
+import org.apache.olingo.client.core.communication.request.batch.AbstractBatchRequestFactory;
+
+public class BatchRequestFactoryImpl extends AbstractBatchRequestFactory
+ implements BatchRequestFactory {
+
+ private static final long serialVersionUID = 788349446729208639L;
+
+ public BatchRequestFactoryImpl(final ODataClient client) {
+ super(client);
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/cud/AbstractCUDRequestFactory.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/cud/AbstractCUDRequestFactory.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/cud/AbstractCUDRequestFactory.java
index b5128e6..4659d15 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/cud/AbstractCUDRequestFactory.java
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/cud/AbstractCUDRequestFactory.java
@@ -19,9 +19,9 @@
package org.apache.olingo.client.core.communication.request.cud;
import java.net.URI;
-import org.apache.olingo.client.api.ODataClient;
+import org.apache.olingo.client.api.CommonODataClient;
import org.apache.olingo.client.api.communication.request.UpdateType;
-import org.apache.olingo.client.api.communication.request.cud.CUDRequestFactory;
+import org.apache.olingo.client.api.communication.request.cud.CommonCUDRequestFactory;
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.ODataEntityUpdateRequest;
@@ -35,13 +35,13 @@ import org.apache.olingo.client.api.domain.ODataPrimitiveValue;
import org.apache.olingo.client.api.domain.ODataProperty;
import org.apache.olingo.client.api.http.HttpMethod;
-public abstract class AbstractCUDRequestFactory implements CUDRequestFactory {
+public abstract class AbstractCUDRequestFactory implements CommonCUDRequestFactory {
private static final long serialVersionUID = -2723641791198745990L;
- protected final ODataClient client;
+ protected final CommonODataClient client;
- protected AbstractCUDRequestFactory(final ODataClient client) {
+ protected AbstractCUDRequestFactory(final CommonODataClient client) {
this.client = client;
}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/cud/ODataDeleteRequestImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/cud/ODataDeleteRequestImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/cud/ODataDeleteRequestImpl.java
index f281d0f..720c5b6 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/cud/ODataDeleteRequestImpl.java
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/cud/ODataDeleteRequestImpl.java
@@ -22,7 +22,7 @@ import java.io.InputStream;
import java.net.URI;
import org.apache.http.HttpResponse;
import org.apache.http.client.HttpClient;
-import org.apache.olingo.client.api.ODataClient;
+import org.apache.olingo.client.api.CommonODataClient;
import org.apache.olingo.client.api.communication.request.ODataBatchableRequest;
import org.apache.olingo.client.api.communication.request.cud.ODataDeleteRequest;
import org.apache.olingo.client.api.communication.response.ODataDeleteResponse;
@@ -44,7 +44,7 @@ public class ODataDeleteRequestImpl extends AbstractODataBasicRequest<ODataDelet
* @param method HTTP method to be used
* @param uri URI of the entity to be deleted.
*/
- ODataDeleteRequestImpl(final ODataClient odataClient, final HttpMethod method, final URI uri) {
+ ODataDeleteRequestImpl(final CommonODataClient odataClient, final HttpMethod method, final URI uri) {
super(odataClient, ODataPubFormat.class, method, uri);
}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/cud/ODataEntityCreateRequestImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/cud/ODataEntityCreateRequestImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/cud/ODataEntityCreateRequestImpl.java
index 4fc989f..1cad2a9 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/cud/ODataEntityCreateRequestImpl.java
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/cud/ODataEntityCreateRequestImpl.java
@@ -24,7 +24,7 @@ import org.apache.commons.io.IOUtils;
import org.apache.http.HttpResponse;
import org.apache.http.client.HttpClient;
import org.apache.http.client.methods.HttpPost;
-import org.apache.olingo.client.api.ODataClient;
+import org.apache.olingo.client.api.CommonODataClient;
import org.apache.olingo.client.api.communication.request.ODataBatchableRequest;
import org.apache.olingo.client.api.communication.request.cud.ODataEntityCreateRequest;
import org.apache.olingo.client.api.communication.response.ODataEntityCreateResponse;
@@ -53,7 +53,7 @@ public class ODataEntityCreateRequestImpl extends AbstractODataBasicRequest<ODat
* @param targetURI entity set URI.
* @param entity entity to be created.
*/
- ODataEntityCreateRequestImpl(final ODataClient odataClient, final URI targetURI, final ODataEntity entity) {
+ ODataEntityCreateRequestImpl(final CommonODataClient odataClient, final URI targetURI, final ODataEntity entity) {
super(odataClient, ODataPubFormat.class, HttpMethod.POST, targetURI);
this.entity = entity;
}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/cud/ODataEntityUpdateRequestImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/cud/ODataEntityUpdateRequestImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/cud/ODataEntityUpdateRequestImpl.java
index 5214159..662a844 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/cud/ODataEntityUpdateRequestImpl.java
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/cud/ODataEntityUpdateRequestImpl.java
@@ -24,7 +24,7 @@ import org.apache.commons.io.IOUtils;
import org.apache.http.HttpResponse;
import org.apache.http.client.HttpClient;
import org.apache.http.client.methods.HttpEntityEnclosingRequestBase;
-import org.apache.olingo.client.api.ODataClient;
+import org.apache.olingo.client.api.CommonODataClient;
import org.apache.olingo.client.api.communication.request.ODataBatchableRequest;
import org.apache.olingo.client.api.communication.request.cud.ODataEntityUpdateRequest;
import org.apache.olingo.client.api.communication.response.ODataEntityUpdateResponse;
@@ -54,7 +54,7 @@ public class ODataEntityUpdateRequestImpl extends AbstractODataBasicRequest<ODat
* @param uri URI of the entity to be updated.
* @param changes changes to be applied.
*/
- ODataEntityUpdateRequestImpl(final ODataClient odataClient,
+ ODataEntityUpdateRequestImpl(final CommonODataClient odataClient,
final HttpMethod method, final URI uri, final ODataEntity changes) {
super(odataClient, ODataPubFormat.class, method, uri);
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/cud/ODataLinkCreateRequestImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/cud/ODataLinkCreateRequestImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/cud/ODataLinkCreateRequestImpl.java
index ba67959..f02dc34 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/cud/ODataLinkCreateRequestImpl.java
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/cud/ODataLinkCreateRequestImpl.java
@@ -24,7 +24,7 @@ import org.apache.commons.io.IOUtils;
import org.apache.http.HttpResponse;
import org.apache.http.client.HttpClient;
import org.apache.http.client.methods.HttpPost;
-import org.apache.olingo.client.api.ODataClient;
+import org.apache.olingo.client.api.CommonODataClient;
import org.apache.olingo.client.api.communication.request.ODataBatchableRequest;
import org.apache.olingo.client.api.communication.request.cud.ODataLinkCreateRequest;
import org.apache.olingo.client.api.communication.response.ODataLinkOperationResponse;
@@ -53,7 +53,7 @@ public class ODataLinkCreateRequestImpl extends AbstractODataBasicRequest<ODataL
* @param targetURI entity set URI.
* @param link entity to be linked.
*/
- ODataLinkCreateRequestImpl(final ODataClient odataClient, final URI targetURI, final ODataLink link) {
+ ODataLinkCreateRequestImpl(final CommonODataClient odataClient, final URI targetURI, final ODataLink link) {
super(odataClient, ODataFormat.class, HttpMethod.POST, targetURI);
// set request body
this.link = link;
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/cud/ODataLinkUpdateRequestImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/cud/ODataLinkUpdateRequestImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/cud/ODataLinkUpdateRequestImpl.java
index ed06ec0..419ee03 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/cud/ODataLinkUpdateRequestImpl.java
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/cud/ODataLinkUpdateRequestImpl.java
@@ -24,7 +24,7 @@ import org.apache.commons.io.IOUtils;
import org.apache.http.HttpResponse;
import org.apache.http.client.HttpClient;
import org.apache.http.client.methods.HttpEntityEnclosingRequestBase;
-import org.apache.olingo.client.api.ODataClient;
+import org.apache.olingo.client.api.CommonODataClient;
import org.apache.olingo.client.api.communication.request.ODataBatchableRequest;
import org.apache.olingo.client.api.communication.request.cud.ODataLinkUpdateRequest;
import org.apache.olingo.client.api.communication.response.ODataLinkOperationResponse;
@@ -54,7 +54,7 @@ public class ODataLinkUpdateRequestImpl extends AbstractODataBasicRequest<ODataL
* @param targetURI entity URI.
* @param link entity to be linked.
*/
- ODataLinkUpdateRequestImpl(final ODataClient odataClient,
+ ODataLinkUpdateRequestImpl(final CommonODataClient odataClient,
final HttpMethod method, final URI targetURI, final ODataLink link) {
super(odataClient, ODataFormat.class, method, targetURI);
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/cud/ODataPropertyUpdateRequestImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/cud/ODataPropertyUpdateRequestImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/cud/ODataPropertyUpdateRequestImpl.java
index 57fe26f..f782a6e 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/cud/ODataPropertyUpdateRequestImpl.java
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/cud/ODataPropertyUpdateRequestImpl.java
@@ -24,7 +24,7 @@ import org.apache.commons.io.IOUtils;
import org.apache.http.HttpResponse;
import org.apache.http.client.HttpClient;
import org.apache.http.client.methods.HttpEntityEnclosingRequestBase;
-import org.apache.olingo.client.api.ODataClient;
+import org.apache.olingo.client.api.CommonODataClient;
import org.apache.olingo.client.api.communication.request.ODataBatchableRequest;
import org.apache.olingo.client.api.communication.request.cud.ODataPropertyUpdateRequest;
import org.apache.olingo.client.api.communication.response.ODataPropertyUpdateResponse;
@@ -54,7 +54,7 @@ public class ODataPropertyUpdateRequestImpl extends AbstractODataBasicRequest<OD
* @param targetURI entity set or entity or entity property URI.
* @param property value to be created.
*/
- ODataPropertyUpdateRequestImpl(final ODataClient odataClient,
+ ODataPropertyUpdateRequestImpl(final CommonODataClient odataClient,
final HttpMethod method, final URI targetURI, final ODataProperty property) {
super(odataClient, ODataFormat.class, method, targetURI);
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/cud/ODataValueUpdateRequestImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/cud/ODataValueUpdateRequestImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/cud/ODataValueUpdateRequestImpl.java
index 8f340fc..53e0c05 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/cud/ODataValueUpdateRequestImpl.java
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/cud/ODataValueUpdateRequestImpl.java
@@ -25,7 +25,7 @@ import org.apache.commons.io.IOUtils;
import org.apache.http.HttpResponse;
import org.apache.http.client.HttpClient;
import org.apache.http.client.methods.HttpEntityEnclosingRequestBase;
-import org.apache.olingo.client.api.ODataClient;
+import org.apache.olingo.client.api.CommonODataClient;
import org.apache.olingo.client.api.communication.request.ODataBatchableRequest;
import org.apache.olingo.client.api.communication.request.cud.ODataValueUpdateRequest;
import org.apache.olingo.client.api.communication.response.ODataValueUpdateResponse;
@@ -58,7 +58,7 @@ public class ODataValueUpdateRequestImpl extends AbstractODataBasicRequest<OData
* @param targetURI entity set or entity or entity property URI.
* @param value value to be created.
*/
- ODataValueUpdateRequestImpl(final ODataClient odataClient,
+ ODataValueUpdateRequestImpl(final CommonODataClient odataClient,
final HttpMethod method, final URI targetURI, final ODataValue value) {
super(odataClient, ODataValueFormat.class, method, targetURI);
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/cud/V3CUDRequestFactoryImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/cud/V3CUDRequestFactoryImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/cud/V3CUDRequestFactoryImpl.java
deleted file mode 100644
index a4d06b5..0000000
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/cud/V3CUDRequestFactoryImpl.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.core.communication.request.cud;
-
-import org.apache.olingo.client.api.ODataV3Client;
-import org.apache.olingo.client.api.communication.request.cud.V3CUDRequestFactory;
-
-public class V3CUDRequestFactoryImpl extends AbstractCUDRequestFactory
- implements V3CUDRequestFactory {
-
- private static final long serialVersionUID = 109196636064983035L;
-
- public V3CUDRequestFactoryImpl(final ODataV3Client client) {
- super(client);
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/cud/V4CUDRequestFactoryImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/cud/V4CUDRequestFactoryImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/cud/V4CUDRequestFactoryImpl.java
deleted file mode 100644
index fbbde56..0000000
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/cud/V4CUDRequestFactoryImpl.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.core.communication.request.cud;
-
-import org.apache.olingo.client.api.ODataV4Client;
-import org.apache.olingo.client.api.communication.request.cud.V4CUDRequestFactory;
-
-public class V4CUDRequestFactoryImpl extends AbstractCUDRequestFactory
- implements V4CUDRequestFactory {
-
- private static final long serialVersionUID = 3080623853913380425L;
-
- public V4CUDRequestFactoryImpl(final ODataV4Client client) {
- super(client);
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/cud/v3/CUDRequestFactoryImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/cud/v3/CUDRequestFactoryImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/cud/v3/CUDRequestFactoryImpl.java
new file mode 100644
index 0000000..425bcd3
--- /dev/null
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/cud/v3/CUDRequestFactoryImpl.java
@@ -0,0 +1,33 @@
+/*
+ * 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.core.communication.request.cud.v3;
+
+import org.apache.olingo.client.api.v3.ODataClient;
+import org.apache.olingo.client.api.communication.request.cud.v3.CUDRequestFactory;
+import org.apache.olingo.client.core.communication.request.cud.AbstractCUDRequestFactory;
+
+public class CUDRequestFactoryImpl extends AbstractCUDRequestFactory
+ implements CUDRequestFactory {
+
+ private static final long serialVersionUID = 109196636064983035L;
+
+ public CUDRequestFactoryImpl(final ODataClient client) {
+ super(client);
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/cud/v4/CUDRequestFactoryImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/cud/v4/CUDRequestFactoryImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/cud/v4/CUDRequestFactoryImpl.java
new file mode 100644
index 0000000..426d903
--- /dev/null
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/cud/v4/CUDRequestFactoryImpl.java
@@ -0,0 +1,33 @@
+/*
+ * 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.core.communication.request.cud.v4;
+
+import org.apache.olingo.client.api.v4.ODataClient;
+import org.apache.olingo.client.api.communication.request.cud.v4.CUDRequestFactory;
+import org.apache.olingo.client.core.communication.request.cud.AbstractCUDRequestFactory;
+
+public class CUDRequestFactoryImpl extends AbstractCUDRequestFactory
+ implements CUDRequestFactory {
+
+ private static final long serialVersionUID = 3080623853913380425L;
+
+ public CUDRequestFactoryImpl(final ODataClient client) {
+ super(client);
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/invoke/AbstractInvokeRequestFactory.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/invoke/AbstractInvokeRequestFactory.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/invoke/AbstractInvokeRequestFactory.java
index c006ed1..64aa550 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/invoke/AbstractInvokeRequestFactory.java
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/invoke/AbstractInvokeRequestFactory.java
@@ -20,21 +20,22 @@ package org.apache.olingo.client.core.communication.request.invoke;
import java.net.URI;
import java.util.Map;
-import org.apache.olingo.client.api.ODataClient;
-import org.apache.olingo.client.api.communication.request.invoke.InvokeRequestFactory;
+import org.apache.olingo.client.api.CommonODataClient;
+import org.apache.olingo.client.api.communication.request.invoke.CommonInvokeRequestFactory;
import org.apache.olingo.client.api.communication.request.invoke.ODataInvokeRequest;
import org.apache.olingo.client.api.domain.ODataInvokeResult;
import org.apache.olingo.client.api.domain.ODataValue;
import org.apache.olingo.client.api.edm.xml.CommonFunctionImport;
import org.apache.olingo.client.api.edm.xml.XMLMetadata;
-abstract class AbstractInvokeRequestFactory<FI extends CommonFunctionImport> implements InvokeRequestFactory<FI> {
+public abstract class AbstractInvokeRequestFactory<FI extends CommonFunctionImport>
+ implements CommonInvokeRequestFactory<FI> {
private static final long serialVersionUID = -906760270085197249L;
- protected final ODataClient client;
+ protected final CommonODataClient client;
- protected AbstractInvokeRequestFactory(final ODataClient client) {
+ protected AbstractInvokeRequestFactory(final CommonODataClient client) {
this.client = client;
}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/invoke/ODataInvokeRequestImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/invoke/ODataInvokeRequestImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/invoke/ODataInvokeRequestImpl.java
index 3c53275..3dc9485 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/invoke/ODataInvokeRequestImpl.java
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/invoke/ODataInvokeRequestImpl.java
@@ -30,7 +30,7 @@ import org.apache.http.client.HttpClient;
import org.apache.http.client.methods.HttpPost;
import org.apache.http.client.methods.HttpRequestBase;
import org.apache.http.client.utils.URIBuilder;
-import org.apache.olingo.client.api.ODataClient;
+import org.apache.olingo.client.api.CommonODataClient;
import org.apache.olingo.client.api.communication.request.ODataBatchableRequest;
import org.apache.olingo.client.api.communication.request.invoke.ODataInvokeRequest;
import org.apache.olingo.client.api.communication.request.invoke.ODataNoContent;
@@ -70,8 +70,8 @@ public class ODataInvokeRequestImpl<T extends ODataInvokeResult>
* @param method HTTP method of the request.
* @param uri URI that identifies the operation.
*/
- ODataInvokeRequestImpl(
- final ODataClient odataClient,
+ public ODataInvokeRequestImpl(
+ final CommonODataClient odataClient,
final Class<T> reference,
final HttpMethod method,
final URI uri) {
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/invoke/V3InvokeRequestFactoryImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/invoke/V3InvokeRequestFactoryImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/invoke/V3InvokeRequestFactoryImpl.java
deleted file mode 100644
index 34203de..0000000
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/invoke/V3InvokeRequestFactoryImpl.java
+++ /dev/null
@@ -1,89 +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.core.communication.request.invoke;
-
-import java.net.URI;
-import org.apache.commons.lang3.StringUtils;
-import org.apache.olingo.client.api.ODataV3Client;
-import org.apache.olingo.client.api.communication.request.invoke.ODataInvokeRequest;
-import org.apache.olingo.client.api.communication.request.invoke.ODataNoContent;
-import org.apache.olingo.client.api.communication.request.invoke.V3InvokeRequestFactory;
-import org.apache.olingo.client.api.domain.ODataEntity;
-import org.apache.olingo.client.api.domain.ODataEntitySet;
-import org.apache.olingo.client.api.domain.ODataInvokeResult;
-import org.apache.olingo.client.api.domain.ODataJClientEdmType;
-import org.apache.olingo.client.api.domain.ODataProperty;
-import org.apache.olingo.client.api.edm.xml.XMLMetadata;
-import org.apache.olingo.client.api.edm.xml.v3.FunctionImport;
-import org.apache.olingo.client.api.http.HttpMethod;
-
-public class V3InvokeRequestFactoryImpl extends AbstractInvokeRequestFactory<FunctionImport>
- implements V3InvokeRequestFactory {
-
- private static final long serialVersionUID = -659256862901915496L;
-
- public V3InvokeRequestFactoryImpl(final ODataV3Client client) {
- super(client);
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- @SuppressWarnings("unchecked")
- public <RES extends ODataInvokeResult> ODataInvokeRequest<RES> getInvokeRequest(
- final URI uri,
- final XMLMetadata metadata,
- final FunctionImport functionImport) {
-
- HttpMethod method = null;
- if (HttpMethod.GET.name().equals(functionImport.getHttpMethod())) {
- method = HttpMethod.GET;
- } else if (HttpMethod.POST.name().equals(functionImport.getHttpMethod())) {
- method = HttpMethod.POST;
- } else if (functionImport.getHttpMethod() == null) {
- if (functionImport.isSideEffecting()) {
- method = HttpMethod.POST;
- } else {
- method = HttpMethod.GET;
- }
- }
-
- ODataInvokeRequest<RES> result;
- if (StringUtils.isBlank(functionImport.getReturnType())) {
- result = (ODataInvokeRequest<RES>) new ODataInvokeRequestImpl<ODataNoContent>(
- client, ODataNoContent.class, method, uri);
- } else {
- final ODataJClientEdmType returnType = new ODataJClientEdmType(metadata, functionImport.getReturnType());
-
- if (returnType.isCollection() && returnType.isEntityType()) {
- result = (ODataInvokeRequest<RES>) new ODataInvokeRequestImpl<ODataEntitySet>(
- client, ODataEntitySet.class, method, uri);
- } else if (!returnType.isCollection() && returnType.isEntityType()) {
- result = (ODataInvokeRequest<RES>) new ODataInvokeRequestImpl<ODataEntity>(
- client, ODataEntity.class, method, uri);
- } else {
- result = (ODataInvokeRequest<RES>) new ODataInvokeRequestImpl<ODataProperty>(
- client, ODataProperty.class, method, uri);
- }
- }
-
- return result;
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/invoke/V4InvokeRequestFactoryImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/invoke/V4InvokeRequestFactoryImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/invoke/V4InvokeRequestFactoryImpl.java
deleted file mode 100644
index 4bbfb56..0000000
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/invoke/V4InvokeRequestFactoryImpl.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.client.core.communication.request.invoke;
-
-import java.net.URI;
-import org.apache.olingo.client.api.ODataV4Client;
-import org.apache.olingo.client.api.communication.request.invoke.ODataInvokeRequest;
-import org.apache.olingo.client.api.communication.request.invoke.V4InvokeRequestFactory;
-import org.apache.olingo.client.api.domain.ODataInvokeResult;
-import org.apache.olingo.client.api.edm.xml.XMLMetadata;
-import org.apache.olingo.client.api.edm.xml.v4.FunctionImport;
-
-public class V4InvokeRequestFactoryImpl extends AbstractInvokeRequestFactory<FunctionImport>
- implements V4InvokeRequestFactory {
-
- private static final long serialVersionUID = 8452737360003104372L;
-
- public V4InvokeRequestFactoryImpl(final ODataV4Client client) {
- super(client);
- }
-
- @Override
- public <RES extends ODataInvokeResult> ODataInvokeRequest<RES> getInvokeRequest(
- final URI uri, final XMLMetadata metadata, final FunctionImport functionImport) {
- throw new UnsupportedOperationException("Not supported yet.");
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/invoke/v3/InvokeRequestFactoryImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/invoke/v3/InvokeRequestFactoryImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/invoke/v3/InvokeRequestFactoryImpl.java
new file mode 100644
index 0000000..e387b2e
--- /dev/null
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/invoke/v3/InvokeRequestFactoryImpl.java
@@ -0,0 +1,91 @@
+/*
+ * 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.core.communication.request.invoke.v3;
+
+import java.net.URI;
+import org.apache.commons.lang3.StringUtils;
+import org.apache.olingo.client.api.v3.ODataClient;
+import org.apache.olingo.client.api.communication.request.invoke.ODataInvokeRequest;
+import org.apache.olingo.client.api.communication.request.invoke.ODataNoContent;
+import org.apache.olingo.client.api.communication.request.invoke.v3.InvokeRequestFactory;
+import org.apache.olingo.client.api.domain.ODataEntity;
+import org.apache.olingo.client.api.domain.ODataEntitySet;
+import org.apache.olingo.client.api.domain.ODataInvokeResult;
+import org.apache.olingo.client.api.domain.ODataJClientEdmType;
+import org.apache.olingo.client.api.domain.ODataProperty;
+import org.apache.olingo.client.api.edm.xml.XMLMetadata;
+import org.apache.olingo.client.api.edm.xml.v3.FunctionImport;
+import org.apache.olingo.client.api.http.HttpMethod;
+import org.apache.olingo.client.core.communication.request.invoke.AbstractInvokeRequestFactory;
+import org.apache.olingo.client.core.communication.request.invoke.ODataInvokeRequestImpl;
+
+public class InvokeRequestFactoryImpl extends AbstractInvokeRequestFactory<FunctionImport>
+ implements InvokeRequestFactory {
+
+ private static final long serialVersionUID = -659256862901915496L;
+
+ public InvokeRequestFactoryImpl(final ODataClient client) {
+ super(client);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ @SuppressWarnings("unchecked")
+ public <RES extends ODataInvokeResult> ODataInvokeRequest<RES> getInvokeRequest(
+ final URI uri,
+ final XMLMetadata metadata,
+ final FunctionImport functionImport) {
+
+ HttpMethod method = null;
+ if (HttpMethod.GET.name().equals(functionImport.getHttpMethod())) {
+ method = HttpMethod.GET;
+ } else if (HttpMethod.POST.name().equals(functionImport.getHttpMethod())) {
+ method = HttpMethod.POST;
+ } else if (functionImport.getHttpMethod() == null) {
+ if (functionImport.isSideEffecting()) {
+ method = HttpMethod.POST;
+ } else {
+ method = HttpMethod.GET;
+ }
+ }
+
+ ODataInvokeRequest<RES> result;
+ if (StringUtils.isBlank(functionImport.getReturnType())) {
+ result = (ODataInvokeRequest<RES>) new ODataInvokeRequestImpl<ODataNoContent>(
+ client, ODataNoContent.class, method, uri);
+ } else {
+ final ODataJClientEdmType returnType = new ODataJClientEdmType(metadata, functionImport.getReturnType());
+
+ if (returnType.isCollection() && returnType.isEntityType()) {
+ result = (ODataInvokeRequest<RES>) new ODataInvokeRequestImpl<ODataEntitySet>(
+ client, ODataEntitySet.class, method, uri);
+ } else if (!returnType.isCollection() && returnType.isEntityType()) {
+ result = (ODataInvokeRequest<RES>) new ODataInvokeRequestImpl<ODataEntity>(
+ client, ODataEntity.class, method, uri);
+ } else {
+ result = (ODataInvokeRequest<RES>) new ODataInvokeRequestImpl<ODataProperty>(
+ client, ODataProperty.class, method, uri);
+ }
+ }
+
+ return result;
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/invoke/v4/InvokeRequestFactoryImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/invoke/v4/InvokeRequestFactoryImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/invoke/v4/InvokeRequestFactoryImpl.java
new file mode 100644
index 0000000..ab35401
--- /dev/null
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/invoke/v4/InvokeRequestFactoryImpl.java
@@ -0,0 +1,44 @@
+/*
+ * 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.core.communication.request.invoke.v4;
+
+import java.net.URI;
+import org.apache.olingo.client.api.v4.ODataClient;
+import org.apache.olingo.client.api.communication.request.invoke.ODataInvokeRequest;
+import org.apache.olingo.client.api.communication.request.invoke.v4.InvokeRequestFactory;
+import org.apache.olingo.client.api.domain.ODataInvokeResult;
+import org.apache.olingo.client.api.edm.xml.XMLMetadata;
+import org.apache.olingo.client.api.edm.xml.v4.FunctionImport;
+import org.apache.olingo.client.core.communication.request.invoke.AbstractInvokeRequestFactory;
+
+public class InvokeRequestFactoryImpl extends AbstractInvokeRequestFactory<FunctionImport>
+ implements InvokeRequestFactory {
+
+ private static final long serialVersionUID = 8452737360003104372L;
+
+ public InvokeRequestFactoryImpl(final ODataClient client) {
+ super(client);
+ }
+
+ @Override
+ public <RES extends ODataInvokeResult> ODataInvokeRequest<RES> getInvokeRequest(
+ final URI uri, final XMLMetadata metadata, final FunctionImport functionImport) {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/retrieve/AbstractODataRetrieveRequest.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/retrieve/AbstractODataRetrieveRequest.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/retrieve/AbstractODataRetrieveRequest.java
index 944317d..fe51722 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/retrieve/AbstractODataRetrieveRequest.java
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/retrieve/AbstractODataRetrieveRequest.java
@@ -22,7 +22,7 @@ import java.io.InputStream;
import java.net.URI;
import org.apache.http.HttpResponse;
import org.apache.http.client.HttpClient;
-import org.apache.olingo.client.api.ODataClient;
+import org.apache.olingo.client.api.CommonODataClient;
import org.apache.olingo.client.api.communication.request.ODataBatchableRequest;
import org.apache.olingo.client.api.communication.request.retrieve.ODataRetrieveRequest;
import org.apache.olingo.client.api.communication.response.ODataRetrieveResponse;
@@ -31,10 +31,9 @@ import org.apache.olingo.client.core.communication.request.AbstractODataBasicReq
import org.apache.olingo.client.core.communication.response.AbstractODataResponse;
/**
- * This is an abstract representation of an OData retrieve query request returning one or more result item. Get instance
- * by using ODataRetrieveRequestFactory.
+ * This is an abstract representation of an OData retrieve query request returning one or more result item.
*/
-abstract class AbstractODataRetrieveRequest<V, T extends Enum<T>>
+public abstract class AbstractODataRetrieveRequest<V, T extends Enum<T>>
extends AbstractODataBasicRequest<ODataRetrieveResponse<V>, T>
implements ODataRetrieveRequest<V, T>, ODataBatchableRequest {
@@ -45,7 +44,7 @@ abstract class AbstractODataRetrieveRequest<V, T extends Enum<T>>
* @param formatRef reference class for the format being used
* @param query query to be executed.
*/
- AbstractODataRetrieveRequest(final ODataClient odataClient, final Class<T> formatRef, final URI query) {
+ public AbstractODataRetrieveRequest(final CommonODataClient odataClient, final Class<T> formatRef, final URI query) {
super(odataClient, formatRef, HttpMethod.GET, query);
}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/retrieve/AbstractRetrieveRequestFactory.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/retrieve/AbstractRetrieveRequestFactory.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/retrieve/AbstractRetrieveRequestFactory.java
index 722814c..ddbfd10 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/retrieve/AbstractRetrieveRequestFactory.java
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/retrieve/AbstractRetrieveRequestFactory.java
@@ -20,7 +20,7 @@ package org.apache.olingo.client.core.communication.request.retrieve;
import java.net.URI;
import org.apache.commons.lang3.StringUtils;
-import org.apache.olingo.client.api.ODataClient;
+import org.apache.olingo.client.api.CommonODataClient;
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;
@@ -30,15 +30,15 @@ import org.apache.olingo.client.api.communication.request.retrieve.ODataProperty
import org.apache.olingo.client.api.communication.request.retrieve.ODataRawRequest;
import org.apache.olingo.client.api.communication.request.retrieve.ODataServiceDocumentRequest;
import org.apache.olingo.client.api.communication.request.retrieve.ODataValueRequest;
-import org.apache.olingo.client.api.communication.request.retrieve.RetrieveRequestFactory;
+import org.apache.olingo.client.api.communication.request.retrieve.CommonRetrieveRequestFactory;
-public abstract class AbstractRetrieveRequestFactory implements RetrieveRequestFactory {
+public abstract class AbstractRetrieveRequestFactory implements CommonRetrieveRequestFactory {
private static final long serialVersionUID = -111683263158803362L;
- protected final ODataClient client;
+ protected final CommonODataClient client;
- protected AbstractRetrieveRequestFactory(final ODataClient client) {
+ protected AbstractRetrieveRequestFactory(final CommonODataClient client) {
this.client = client;
}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/retrieve/ODataEntityRequestImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/retrieve/ODataEntityRequestImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/retrieve/ODataEntityRequestImpl.java
index 2a35514..2390ac3 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/retrieve/ODataEntityRequestImpl.java
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/retrieve/ODataEntityRequestImpl.java
@@ -21,7 +21,7 @@ package org.apache.olingo.client.core.communication.request.retrieve;
import java.net.URI;
import org.apache.http.HttpResponse;
import org.apache.http.client.HttpClient;
-import org.apache.olingo.client.api.ODataClient;
+import org.apache.olingo.client.api.CommonODataClient;
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.domain.ODataEntity;
@@ -39,7 +39,7 @@ public class ODataEntityRequestImpl extends AbstractODataRetrieveRequest<ODataEn
* @param odataClient client instance getting this request
* @param query query to be executed.
*/
- ODataEntityRequestImpl(final ODataClient odataClient, final URI query) {
+ ODataEntityRequestImpl(final CommonODataClient odataClient, final URI query) {
super(odataClient, ODataPubFormat.class, query);
}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/retrieve/ODataEntitySetIteratorRequestImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/retrieve/ODataEntitySetIteratorRequestImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/retrieve/ODataEntitySetIteratorRequestImpl.java
index 345f673..261611c 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/retrieve/ODataEntitySetIteratorRequestImpl.java
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/retrieve/ODataEntitySetIteratorRequestImpl.java
@@ -21,7 +21,7 @@ package org.apache.olingo.client.core.communication.request.retrieve;
import java.net.URI;
import org.apache.http.HttpResponse;
import org.apache.http.client.HttpClient;
-import org.apache.olingo.client.api.ODataClient;
+import org.apache.olingo.client.api.CommonODataClient;
import org.apache.olingo.client.api.communication.request.retrieve.ODataEntitySetIteratorRequest;
import org.apache.olingo.client.api.communication.response.ODataRetrieveResponse;
import org.apache.olingo.client.api.domain.ODataEntitySetIterator;
@@ -42,7 +42,7 @@ public class ODataEntitySetIteratorRequestImpl
* @param odataClient client instance getting this request
* @param query query to be executed.
*/
- ODataEntitySetIteratorRequestImpl(final ODataClient odataClient, final URI query) {
+ ODataEntitySetIteratorRequestImpl(final CommonODataClient odataClient, final URI query) {
super(odataClient, ODataPubFormat.class, query);
}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/retrieve/ODataEntitySetRequestImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/retrieve/ODataEntitySetRequestImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/retrieve/ODataEntitySetRequestImpl.java
index a18cba9..1decb54 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/retrieve/ODataEntitySetRequestImpl.java
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/retrieve/ODataEntitySetRequestImpl.java
@@ -21,7 +21,7 @@ package org.apache.olingo.client.core.communication.request.retrieve;
import java.net.URI;
import org.apache.http.HttpResponse;
import org.apache.http.client.HttpClient;
-import org.apache.olingo.client.api.ODataClient;
+import org.apache.olingo.client.api.CommonODataClient;
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.domain.ODataEntitySet;
@@ -41,7 +41,7 @@ public class ODataEntitySetRequestImpl extends AbstractODataRetrieveRequest<ODat
* @param odataClient client instance getting this request
* @param query query to be executed.
*/
- ODataEntitySetRequestImpl(final ODataClient odataClient, final URI query) {
+ ODataEntitySetRequestImpl(final CommonODataClient odataClient, final URI query) {
super(odataClient, ODataPubFormat.class, query);
}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bab03624/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/retrieve/ODataLinkCollectionRequestImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/retrieve/ODataLinkCollectionRequestImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/retrieve/ODataLinkCollectionRequestImpl.java
deleted file mode 100644
index 73e6c67..0000000
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/retrieve/ODataLinkCollectionRequestImpl.java
+++ /dev/null
@@ -1,98 +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.core.communication.request.retrieve;
-
-import java.io.IOException;
-import java.net.URI;
-import org.apache.http.HttpResponse;
-import org.apache.http.client.HttpClient;
-import org.apache.olingo.client.api.ODataV3Client;
-import org.apache.olingo.client.api.communication.request.retrieve.ODataLinkCollectionRequest;
-import org.apache.olingo.client.api.communication.response.ODataRetrieveResponse;
-import org.apache.olingo.client.api.domain.ODataLinkCollection;
-import org.apache.olingo.client.api.format.ODataFormat;
-import org.apache.olingo.client.api.http.HttpClientException;
-
-/**
- * This class implements an OData link query request.
- */
-public class ODataLinkCollectionRequestImpl extends AbstractODataRetrieveRequest<ODataLinkCollection, ODataFormat>
- implements ODataLinkCollectionRequest {
-
- /**
- * Private constructor.
- *
- * @param odataClient client instance getting this request
- * @param targetURI target URI.
- * @param linkName link name.
- */
- ODataLinkCollectionRequestImpl(final ODataV3Client odataClient, final URI targetURI, final String linkName) {
- super(odataClient, ODataFormat.class,
- odataClient.getURIBuilder(targetURI.toASCIIString()).appendLinksSegment(linkName).build());
- }
-
- /**
- * {@inheritDoc }
- */
- @Override
- public ODataRetrieveResponse<ODataLinkCollection> execute() {
- return new ODataLinkCollectionResponseImpl(httpClient, doExecute());
- }
-
- protected class ODataLinkCollectionResponseImpl extends ODataRetrieveResponseImpl {
-
- private ODataLinkCollection links = null;
-
- /**
- * Constructor.
- * <p>
- * Just to create response templates to be initialized from batch.
- */
- private ODataLinkCollectionResponseImpl() {
- }
-
- /**
- * Constructor.
- *
- * @param client HTTP client.
- * @param res HTTP response.
- */
- private ODataLinkCollectionResponseImpl(final HttpClient client, final HttpResponse res) {
- super(client, res);
- }
-
- /**
- * {@inheritDoc }
- */
- @Override
- public ODataLinkCollection getBody() {
- if (links == null) {
- try {
- links = odataClient.getReader().readLinks(
- res.getEntity().getContent(), ODataFormat.fromString(getContentType()));
- } catch (IOException e) {
- throw new HttpClientException(e);
- } finally {
- this.close();
- }
- }
- return links;
- }
- }
-}