diff --git a/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/AbstractService.java b/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/AbstractService.java
index 0fd8c46e6..6a2d8ce0e 100644
--- a/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/AbstractService.java
+++ b/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/AbstractService.java
@@ -31,7 +31,7 @@ import org.apache.olingo.client.api.EdmEnabledODataClient;
import org.apache.olingo.client.api.edm.xml.XMLMetadata;
import org.apache.olingo.client.core.ODataClientFactory;
import org.apache.olingo.client.core.edm.ClientCsdlEdmProvider;
-import org.apache.olingo.commons.api.ODataRuntimeException;
+import org.apache.olingo.commons.api.ex.ODataRuntimeException;
import org.apache.olingo.commons.api.edm.Edm;
import org.apache.olingo.commons.api.edm.constants.ODataServiceVersion;
import org.apache.olingo.commons.api.format.ContentType;
diff --git a/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/api/ODataFlushException.java b/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/api/ODataFlushException.java
index 13edbd04e..8cd5b026d 100644
--- a/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/api/ODataFlushException.java
+++ b/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/api/ODataFlushException.java
@@ -19,7 +19,7 @@
package org.apache.olingo.ext.proxy.api;
import java.util.List;
-import org.apache.olingo.commons.api.ODataRuntimeException;
+import org.apache.olingo.commons.api.ex.ODataRuntimeException;
public class ODataFlushException extends ODataRuntimeException {
diff --git a/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/api/ODataResponseError.java b/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/api/ODataResponseError.java
index ead17f514..732d436ec 100644
--- a/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/api/ODataResponseError.java
+++ b/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/api/ODataResponseError.java
@@ -19,7 +19,7 @@
package org.apache.olingo.ext.proxy.api;
import org.apache.olingo.client.api.communication.request.ODataRequest;
-import org.apache.olingo.commons.api.ODataRuntimeException;
+import org.apache.olingo.commons.api.ex.ODataRuntimeException;
public class ODataResponseError {
diff --git a/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/commons/NonTransactionalPersistenceManagerImpl.java b/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/commons/NonTransactionalPersistenceManagerImpl.java
index 04d1851cf..91f8cbee1 100644
--- a/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/commons/NonTransactionalPersistenceManagerImpl.java
+++ b/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/commons/NonTransactionalPersistenceManagerImpl.java
@@ -29,7 +29,7 @@ import org.apache.olingo.client.api.communication.request.ODataStreamedRequest;
import org.apache.olingo.client.api.communication.response.ODataEntityCreateResponse;
import org.apache.olingo.client.api.communication.response.ODataEntityUpdateResponse;
import org.apache.olingo.client.api.communication.response.ODataResponse;
-import org.apache.olingo.commons.api.ODataRuntimeException;
+import org.apache.olingo.commons.api.ex.ODataRuntimeException;
import org.apache.olingo.ext.proxy.AbstractService;
import org.apache.olingo.ext.proxy.api.ODataFlushException;
import org.apache.olingo.ext.proxy.api.ODataResponseError;
diff --git a/fit/src/test/java/org/apache/olingo/fit/tecsvc/client/BasicITCase.java b/fit/src/test/java/org/apache/olingo/fit/tecsvc/client/BasicITCase.java
index c4efe2173..a8c39415b 100644
--- a/fit/src/test/java/org/apache/olingo/fit/tecsvc/client/BasicITCase.java
+++ b/fit/src/test/java/org/apache/olingo/fit/tecsvc/client/BasicITCase.java
@@ -69,7 +69,7 @@ import org.apache.olingo.client.api.domain.ClientValue;
import org.apache.olingo.client.api.edm.xml.Reference;
import org.apache.olingo.client.api.edm.xml.XMLMetadata;
import org.apache.olingo.client.core.ODataClientFactory;
-import org.apache.olingo.commons.api.ODataError;
+import org.apache.olingo.commons.api.ex.ODataError;
import org.apache.olingo.commons.api.edm.Edm;
import org.apache.olingo.commons.api.edm.EdmPrimitiveTypeException;
import org.apache.olingo.commons.api.edm.FullQualifiedName;
diff --git a/fit/src/test/java/org/apache/olingo/fit/tecsvc/client/BatchClientITCase.java b/fit/src/test/java/org/apache/olingo/fit/tecsvc/client/BatchClientITCase.java
index f3c7e7eda..66456cccb 100644
--- a/fit/src/test/java/org/apache/olingo/fit/tecsvc/client/BatchClientITCase.java
+++ b/fit/src/test/java/org/apache/olingo/fit/tecsvc/client/BatchClientITCase.java
@@ -50,7 +50,7 @@ import org.apache.olingo.client.api.domain.ClientObjectFactory;
import org.apache.olingo.client.api.http.HttpClientException;
import org.apache.olingo.client.api.uri.URIBuilder;
import org.apache.olingo.client.core.communication.request.batch.ODataChangesetResponseItem;
-import org.apache.olingo.commons.api.ODataPreferenceNames;
+import org.apache.olingo.commons.api.format.PreferenceName;
import org.apache.olingo.commons.api.edm.EdmPrimitiveTypeException;
import org.apache.olingo.commons.api.edm.FullQualifiedName;
import org.apache.olingo.commons.api.format.ContentType;
@@ -317,7 +317,7 @@ public class BatchClientITCase extends AbstractTestITCase {
// Fetch result
final ODataBatchResponse response = payload.getResponse();
assertEquals(HttpStatusCode.ACCEPTED.getStatusCode(), response.getStatusCode());
- assertEquals(ODataPreferenceNames.CONTINUE_ON_ERROR.toString(),
+ assertEquals(PreferenceName.CONTINUE_ON_ERROR.getName(),
response.getHeader(HttpHeader.PREFERENCE_APPLIED).iterator().next());
final Iteratormessage
.
+ *
+ * @param msg message text for exception
+ */
public ODataRuntimeException(final String msg) {
super(msg);
}
+ /**
+ * Create with message
for and cause
of exception.
+ *
+ * @param msg message text for exception
+ * @param cause cause of exception
+ */
public ODataRuntimeException(final String msg, final Exception cause) {
super(msg, cause);
}
+ /**
+ * Create with cause
of exception.
+ *
+ * @param cause cause of exception
+ */
public ODataRuntimeException(final Exception cause) {
super(cause);
}
diff --git a/lib/commons-api/src/main/java/org/apache/olingo/commons/api/ODataPreferenceNames.java b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/format/PreferenceName.java
similarity index 81%
rename from lib/commons-api/src/main/java/org/apache/olingo/commons/api/ODataPreferenceNames.java
rename to lib/commons-api/src/main/java/org/apache/olingo/commons/api/format/PreferenceName.java
index 28d152353..f77e61571 100644
--- a/lib/commons-api/src/main/java/org/apache/olingo/commons/api/ODataPreferenceNames.java
+++ b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/format/PreferenceName.java
@@ -16,12 +16,12 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.apache.olingo.commons.api;
+package org.apache.olingo.commons.api.format;
/**
* Names of preferences defined in the OData standard.
*/
-public enum ODataPreferenceNames {
+public enum PreferenceName {
ALLOW_ENTITY_REFERENCES("odata.allow-entityreferences"),
CALLBACK("odata.callback"),
@@ -31,16 +31,23 @@ public enum ODataPreferenceNames {
TRACK_CHANGES("odata.track-changes"),
RETURN("return"),
RESPOND_ASYNC("respond-async"),
- WAIT("wait");
+ WAIT("wait"),
+ RETURN_CONTENT("return-content"),
+ RETURN_NO_CONTENT("return-no-content"),
+ KEY_AS_SEGMENT("KeyAsSegment");
private final String preferenceName;
- ODataPreferenceNames(final String preferenceName) {
+ PreferenceName(final String preferenceName) {
this.preferenceName = preferenceName;
}
+ public String getName() {
+ return preferenceName;
+ }
+
@Override
public String toString() {
- return preferenceName;
+ return getName();
}
}
diff --git a/lib/commons-api/src/main/java/org/apache/olingo/commons/api/format/TypeUtil.java b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/format/TypeUtil.java
index d1e7a1a15..5fc7ce106 100644
--- a/lib/commons-api/src/main/java/org/apache/olingo/commons/api/format/TypeUtil.java
+++ b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/format/TypeUtil.java
@@ -23,6 +23,9 @@ import java.util.Locale;
import java.util.Map;
import java.util.TreeMap;
+/**
+ * Helper class which is only used within this package (AcceptType
and ContentType
handling).
+ */
final class TypeUtil {
static final String MEDIA_TYPE_WILDCARD = "*";
@@ -37,7 +40,7 @@ final class TypeUtil {
private TypeUtil() { /* static helper class */}
/** Creates a parameter map with predictable order. */
- protected static Map
;
separated key=value
pairs
+ * @param parameterMap map to which all parsed parameters are added
*/
- protected static void parseParameters(final String parameters, final Mapkey=value
pair without spaces between key and value.
+ * + * See RFC 7231: + * The type, subtype, and parameter name tokens are case-insensitive. + * Parameter values might or might not be case-sensitive, depending on + * the semantics of the parameter name. The presence or absence of a + * parameter might be significant to the processing of a media-type, + * depending on its definition within the media type registry. + *
+ * + * @param parameter askey=value
pair
+ * @return key
as first array value (as lower case) and value
as second array value
+ */
+ static String[] parseParameter(final String parameter) {
if (parameter.isEmpty()) {
throw new IllegalArgumentException("An empty parameter is not allowed.");
}
@@ -84,11 +101,23 @@ final class TypeUtil {
return keyValue;
}
- protected static void validateParameterNameAndValue(final String parameterName, final String parameterValue)
+ /**
+ * Validate that parameter name and parameter value are valid .
+ *
+ * @param parameterName must be not null
, not empty
and contains no whitespace
+ * characters
+ * @param parameterValue must be not null
, not empty
and not start with a whitespace
+ * character
+ * @throws IllegalArgumentException if one of the above requirements are not met
+ */
+ static void validateParameterNameAndValue(final String parameterName, final String parameterValue)
throws IllegalArgumentException {
if (parameterName == null || parameterName.isEmpty() || parameterName.indexOf(WHITESPACE_CHAR) >= 0) {
throw new IllegalArgumentException("Illegal parameter name '" + parameterName + "'.");
}
+ if (parameterValue == null || parameterValue.isEmpty()) {
+ throw new IllegalArgumentException("Value parameter is NULL or empty.");
+ }
if (Character.isWhitespace(parameterValue.charAt(0))) {
throw new IllegalArgumentException("Value of parameter '" + parameterName + "' starts with whitespace.");
}
diff --git a/lib/commons-api/src/main/java/org/apache/olingo/commons/api/format/package-info.java b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/format/package-info.java
new file mode 100644
index 000000000..ef5c906ad
--- /dev/null
+++ b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/format/package-info.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.
+ */
+/**
+ * Contains all the format related objects (also related to http headers Accepted
+ * and Content-Type
) which are used for handling of an OData responses and OData requests.
+ */
+package org.apache.olingo.commons.api.format;
\ No newline at end of file
diff --git a/lib/commons-api/src/main/java/org/apache/olingo/commons/api/http/HttpStatusCode.java b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/http/HttpStatusCode.java
index 0d7784b09..f33942926 100644
--- a/lib/commons-api/src/main/java/org/apache/olingo/commons/api/http/HttpStatusCode.java
+++ b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/http/HttpStatusCode.java
@@ -81,7 +81,7 @@ public enum HttpStatusCode {
* @return the status code info
*/
public String getInfo() {
- return toString();
+ return info;
}
/**
@@ -91,7 +91,6 @@ public enum HttpStatusCode {
*/
@Override
public String toString() {
- return info;
+ return getInfo();
}
-
}
diff --git a/lib/commons-api/src/main/java/org/apache/olingo/commons/api/http/package-info.java b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/http/package-info.java
new file mode 100644
index 000000000..df854343d
--- /dev/null
+++ b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/http/package-info.java
@@ -0,0 +1,22 @@
+/*
+ * 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.
+ */
+/**
+ * Contains all the http related objects which are used for handling of an OData responses and OData requests.
+ */
+package org.apache.olingo.commons.api.http;
\ No newline at end of file
diff --git a/lib/commons-api/src/test/java/org/apache/olingo/commons/api/format/ContentTypeTest.java b/lib/commons-api/src/test/java/org/apache/olingo/commons/api/format/ContentTypeTest.java
index f173a767b..2c21ae5ad 100644
--- a/lib/commons-api/src/test/java/org/apache/olingo/commons/api/format/ContentTypeTest.java
+++ b/lib/commons-api/src/test/java/org/apache/olingo/commons/api/format/ContentTypeTest.java
@@ -100,6 +100,9 @@ public class ContentTypeTest {
@Test
public void testParse() {
assertNull(ContentType.parse("a"));
+ assertNull(ContentType.parse("a/b;c"));
+ assertNull(ContentType.parse("a/b;c="));
+ assertNull(ContentType.parse("a/b;c= "));
}
@Test(expected = IllegalArgumentException.class)
diff --git a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/EdmEntityContainerImpl.java b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/EdmEntityContainerImpl.java
index 027364a31..48f088942 100644
--- a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/EdmEntityContainerImpl.java
+++ b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/EdmEntityContainerImpl.java
@@ -24,7 +24,7 @@ import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
-import org.apache.olingo.commons.api.ODataException;
+import org.apache.olingo.commons.api.ex.ODataException;
import org.apache.olingo.commons.api.edm.Edm;
import org.apache.olingo.commons.api.edm.EdmActionImport;
import org.apache.olingo.commons.api.edm.EdmEntityContainer;
diff --git a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/EdmProviderImpl.java b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/EdmProviderImpl.java
index 39c66aab6..53dc4e78e 100644
--- a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/EdmProviderImpl.java
+++ b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/EdmProviderImpl.java
@@ -25,7 +25,7 @@ import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
-import org.apache.olingo.commons.api.ODataException;
+import org.apache.olingo.commons.api.ex.ODataException;
import org.apache.olingo.commons.api.edm.EdmAction;
import org.apache.olingo.commons.api.edm.EdmAnnotation;
import org.apache.olingo.commons.api.edm.EdmAnnotations;
diff --git a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/primitivetype/EdmDateTimeOffset.java b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/primitivetype/EdmDateTimeOffset.java
index 816a9afb6..ab295bf4e 100644
--- a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/primitivetype/EdmDateTimeOffset.java
+++ b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/primitivetype/EdmDateTimeOffset.java
@@ -216,7 +216,7 @@ public final class EdmDateTimeOffset extends SingletonPrimitiveType {
if (value instanceof Date) {
// Although java.util.Date, as stated in its documentation,
// "is intended to reflect coordinated universal time (UTC)",
- // its toString() method uses the default time zone. And so do we.
+ // its getName() method uses the default time zone. And so do we.
dateTimeValue = Calendar.getInstance();
dateTimeValue.setTime((Date) value);
} else if (value instanceof Calendar) {
diff --git a/lib/server-api/src/main/java/org/apache/olingo/server/api/OData.java b/lib/server-api/src/main/java/org/apache/olingo/server/api/OData.java
index 6c37ea81f..c8e5eee97 100644
--- a/lib/server-api/src/main/java/org/apache/olingo/server/api/OData.java
+++ b/lib/server-api/src/main/java/org/apache/olingo/server/api/OData.java
@@ -21,7 +21,7 @@ package org.apache.olingo.server.api;
import java.util.Collection;
import java.util.List;
-import org.apache.olingo.commons.api.ODataRuntimeException;
+import org.apache.olingo.commons.api.ex.ODataRuntimeException;
import org.apache.olingo.commons.api.edm.EdmPrimitiveType;
import org.apache.olingo.commons.api.edm.EdmPrimitiveTypeKind;
import org.apache.olingo.commons.api.edm.provider.CsdlEdmProvider;
diff --git a/lib/server-api/src/main/java/org/apache/olingo/server/api/ODataApplicationException.java b/lib/server-api/src/main/java/org/apache/olingo/server/api/ODataApplicationException.java
index db2712198..15e600eee 100644
--- a/lib/server-api/src/main/java/org/apache/olingo/server/api/ODataApplicationException.java
+++ b/lib/server-api/src/main/java/org/apache/olingo/server/api/ODataApplicationException.java
@@ -20,7 +20,7 @@ package org.apache.olingo.server.api;
import java.util.Locale;
-import org.apache.olingo.commons.api.ODataException;
+import org.apache.olingo.commons.api.ex.ODataException;
import org.apache.olingo.commons.api.http.HttpStatusCode;
/**
diff --git a/lib/server-api/src/main/java/org/apache/olingo/server/api/ODataLibraryException.java b/lib/server-api/src/main/java/org/apache/olingo/server/api/ODataLibraryException.java
index 013280aab..f7f5dee6b 100644
--- a/lib/server-api/src/main/java/org/apache/olingo/server/api/ODataLibraryException.java
+++ b/lib/server-api/src/main/java/org/apache/olingo/server/api/ODataLibraryException.java
@@ -25,7 +25,7 @@ import java.util.MissingFormatArgumentException;
import java.util.MissingResourceException;
import java.util.ResourceBundle;
-import org.apache.olingo.commons.api.ODataException;
+import org.apache.olingo.commons.api.ex.ODataException;
/**
* Abstract superclass of all translatable server exceptions.
diff --git a/lib/server-api/src/main/java/org/apache/olingo/server/api/ODataServerError.java b/lib/server-api/src/main/java/org/apache/olingo/server/api/ODataServerError.java
index 9365d7e7b..5e74af98b 100644
--- a/lib/server-api/src/main/java/org/apache/olingo/server/api/ODataServerError.java
+++ b/lib/server-api/src/main/java/org/apache/olingo/server/api/ODataServerError.java
@@ -22,8 +22,8 @@ import java.util.List;
import java.util.Locale;
import java.util.Map;
-import org.apache.olingo.commons.api.ODataError;
-import org.apache.olingo.commons.api.ODataErrorDetail;
+import org.apache.olingo.commons.api.ex.ODataError;
+import org.apache.olingo.commons.api.ex.ODataErrorDetail;
/**
* Server error.
diff --git a/lib/server-api/src/main/java/org/apache/olingo/server/api/prefer/PreferencesApplied.java b/lib/server-api/src/main/java/org/apache/olingo/server/api/prefer/PreferencesApplied.java
index e97f8779e..5aa04c133 100644
--- a/lib/server-api/src/main/java/org/apache/olingo/server/api/prefer/PreferencesApplied.java
+++ b/lib/server-api/src/main/java/org/apache/olingo/server/api/prefer/PreferencesApplied.java
@@ -25,7 +25,7 @@ import java.util.Locale;
import java.util.Map;
import java.util.Set;
-import org.apache.olingo.commons.api.ODataPreferenceNames;
+import org.apache.olingo.commons.api.format.PreferenceName;
import org.apache.olingo.server.api.prefer.Preferences.Return;
/**
@@ -72,14 +72,14 @@ public final class PreferencesApplied {
private boolean isSafe(String key) {
if(SAFE_PREFERENCE_NAMES.isEmpty()) {
- SAFE_PREFERENCE_NAMES.add(ODataPreferenceNames.ALLOW_ENTITY_REFERENCES.toString());
- SAFE_PREFERENCE_NAMES.add(ODataPreferenceNames.CALLBACK.toString());
- SAFE_PREFERENCE_NAMES.add(ODataPreferenceNames.CONTINUE_ON_ERROR.toString());
- SAFE_PREFERENCE_NAMES.add(ODataPreferenceNames.MAX_PAGE_SIZE.toString());
- SAFE_PREFERENCE_NAMES.add(ODataPreferenceNames.TRACK_CHANGES.toString());
- SAFE_PREFERENCE_NAMES.add(ODataPreferenceNames.RETURN.toString());
- SAFE_PREFERENCE_NAMES.add(ODataPreferenceNames.RESPOND_ASYNC.toString());
- SAFE_PREFERENCE_NAMES.add(ODataPreferenceNames.WAIT.toString());
+ SAFE_PREFERENCE_NAMES.add(PreferenceName.ALLOW_ENTITY_REFERENCES.getName());
+ SAFE_PREFERENCE_NAMES.add(PreferenceName.CALLBACK.getName());
+ SAFE_PREFERENCE_NAMES.add(PreferenceName.CONTINUE_ON_ERROR.getName());
+ SAFE_PREFERENCE_NAMES.add(PreferenceName.MAX_PAGE_SIZE.getName());
+ SAFE_PREFERENCE_NAMES.add(PreferenceName.TRACK_CHANGES.getName());
+ SAFE_PREFERENCE_NAMES.add(PreferenceName.RETURN.getName());
+ SAFE_PREFERENCE_NAMES.add(PreferenceName.RESPOND_ASYNC.getName());
+ SAFE_PREFERENCE_NAMES.add(PreferenceName.WAIT.getName());
}
return SAFE_PREFERENCE_NAMES.contains(key);
}
@@ -105,49 +105,49 @@ public final class PreferencesApplied {
/** Sets odata.allow-entityreferences
. */
public Builder allowEntityReferences() {
- add(ODataPreferenceNames.ALLOW_ENTITY_REFERENCES.toString(), null);
+ add(PreferenceName.ALLOW_ENTITY_REFERENCES.getName(), null);
return this;
}
/** Sets odata.callback
. */
public Builder callback() {
- add(ODataPreferenceNames.CALLBACK.toString(), null);
+ add(PreferenceName.CALLBACK.getName(), null);
return this;
}
/** Sets odata.continue-on-error
. */
public Builder continueOnError() {
- add(ODataPreferenceNames.CONTINUE_ON_ERROR.toString(), null);
+ add(PreferenceName.CONTINUE_ON_ERROR.getName(), null);
return this;
}
/** Sets the value of the applied preference odata.maxpagesize
. */
public Builder maxPageSize(final Integer maxPageSize) {
- add(ODataPreferenceNames.MAX_PAGE_SIZE.toString(), Integer.toString(maxPageSize));
+ add(PreferenceName.MAX_PAGE_SIZE.getName(), Integer.toString(maxPageSize));
return this;
}
/** Sets odata.track-changes
. */
public Builder trackChanges() {
- add(ODataPreferenceNames.TRACK_CHANGES.toString(), null);
+ add(PreferenceName.TRACK_CHANGES.getName(), null);
return this;
}
/** Sets the value of the applied preference return
. */
public Builder returnRepresentation(final Return returnRepresentation) {
- add(ODataPreferenceNames.RETURN.toString(), returnRepresentation.name().toLowerCase(Locale.ROOT));
+ add(PreferenceName.RETURN.getName(), returnRepresentation.name().toLowerCase(Locale.ROOT));
return this;
}
/** Sets odata.respond-async
. */
public Builder respondAsync() {
- add(ODataPreferenceNames.RESPOND_ASYNC.toString(), null);
+ add(PreferenceName.RESPOND_ASYNC.getName(), null);
return this;
}
/** Sets the value of the applied preference wait
. */
public Builder waitPreference(final Integer wait) {
- add(ODataPreferenceNames.WAIT.toString(), Integer.toString(wait));
+ add(PreferenceName.WAIT.getName(), Integer.toString(wait));
return this;
}
diff --git a/lib/server-api/src/main/java/org/apache/olingo/server/api/uri/queryoption/expression/ExpressionVisitException.java b/lib/server-api/src/main/java/org/apache/olingo/server/api/uri/queryoption/expression/ExpressionVisitException.java
index c114c65d8..956b06ff8 100644
--- a/lib/server-api/src/main/java/org/apache/olingo/server/api/uri/queryoption/expression/ExpressionVisitException.java
+++ b/lib/server-api/src/main/java/org/apache/olingo/server/api/uri/queryoption/expression/ExpressionVisitException.java
@@ -18,7 +18,7 @@
*/
package org.apache.olingo.server.api.uri.queryoption.expression;
-import org.apache.olingo.commons.api.ODataException;
+import org.apache.olingo.commons.api.ex.ODataException;
/**
* Exception class used by the {@link ExpressionVisitor} to throw exceptions while traversing the expression tree
diff --git a/lib/server-core-ext/src/main/java/org/apache/olingo/server/core/OData4Impl.java b/lib/server-core-ext/src/main/java/org/apache/olingo/server/core/OData4Impl.java
index bde9c966c..29cb55142 100644
--- a/lib/server-core-ext/src/main/java/org/apache/olingo/server/core/OData4Impl.java
+++ b/lib/server-core-ext/src/main/java/org/apache/olingo/server/core/OData4Impl.java
@@ -18,7 +18,7 @@
*/
package org.apache.olingo.server.core;
-import org.apache.olingo.commons.api.ODataRuntimeException;
+import org.apache.olingo.commons.api.ex.ODataRuntimeException;
import org.apache.olingo.server.api.OData;
import org.apache.olingo.server.api.ODataHttpHandler;
import org.apache.olingo.server.api.ServiceMetadata;
diff --git a/lib/server-core-ext/src/main/java/org/apache/olingo/server/core/SchemaBasedEdmProvider.java b/lib/server-core-ext/src/main/java/org/apache/olingo/server/core/SchemaBasedEdmProvider.java
index a35f3bcf6..3256bf4b0 100644
--- a/lib/server-core-ext/src/main/java/org/apache/olingo/server/core/SchemaBasedEdmProvider.java
+++ b/lib/server-core-ext/src/main/java/org/apache/olingo/server/core/SchemaBasedEdmProvider.java
@@ -22,7 +22,7 @@ import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
-import org.apache.olingo.commons.api.ODataException;
+import org.apache.olingo.commons.api.ex.ODataException;
import org.apache.olingo.commons.api.edm.FullQualifiedName;
import org.apache.olingo.commons.api.edm.provider.CsdlAction;
import org.apache.olingo.commons.api.edm.provider.CsdlActionImport;
diff --git a/lib/server-core-ext/src/test/java/org/apache/olingo/server/core/MetadataParserTest.java b/lib/server-core-ext/src/test/java/org/apache/olingo/server/core/MetadataParserTest.java
index 10502ad6b..1c2b28feb 100644
--- a/lib/server-core-ext/src/test/java/org/apache/olingo/server/core/MetadataParserTest.java
+++ b/lib/server-core-ext/src/test/java/org/apache/olingo/server/core/MetadataParserTest.java
@@ -27,7 +27,7 @@ import static org.junit.Assert.assertTrue;
import java.io.FileReader;
import java.util.List;
-import org.apache.olingo.commons.api.ODataException;
+import org.apache.olingo.commons.api.ex.ODataException;
import org.apache.olingo.commons.api.edm.FullQualifiedName;
import org.apache.olingo.commons.api.edm.provider.CsdlAction;
import org.apache.olingo.commons.api.edm.provider.CsdlActionImport;
diff --git a/lib/server-core-ext/src/test/java/org/apache/olingo/server/core/ServiceDispatcherTest.java b/lib/server-core-ext/src/test/java/org/apache/olingo/server/core/ServiceDispatcherTest.java
index 0d0c6ad30..636a6b6a6 100644
--- a/lib/server-core-ext/src/test/java/org/apache/olingo/server/core/ServiceDispatcherTest.java
+++ b/lib/server-core-ext/src/test/java/org/apache/olingo/server/core/ServiceDispatcherTest.java
@@ -189,9 +189,9 @@ public class ServiceDispatcherTest {
Mockito.verify(handler).read(arg1.capture(), arg2.capture());
DataRequest request = arg1.getValue();
- // Need toString on ContextURL class
+ // Need getName on ContextURL class
// assertEquals("",
- // request.getContextURL(request.getOdata()).toString());
+ // request.getContextURL(request.getOdata()).getName());
assertEquals("application/json;odata.metadata=minimal", request.getResponseContentType()
.toContentTypeString());
}
@@ -209,9 +209,9 @@ public class ServiceDispatcherTest {
Mockito.verify(handler).read(arg1.capture(), arg2.capture());
DataRequest request = arg1.getValue();
- // Need toString on ContextURL class
+ // Need getName on ContextURL class
// assertEquals("",
- // request.getContextURL(request.getOdata()).toString());
+ // request.getContextURL(request.getOdata()).getName());
assertEquals("text/plain", request.getResponseContentType().toContentTypeString());
}
});
diff --git a/lib/server-core/src/main/java/org/apache/olingo/server/core/ODataHttpHandlerImpl.java b/lib/server-core/src/main/java/org/apache/olingo/server/core/ODataHttpHandlerImpl.java
index 517018569..050f285f2 100644
--- a/lib/server-core/src/main/java/org/apache/olingo/server/core/ODataHttpHandlerImpl.java
+++ b/lib/server-core/src/main/java/org/apache/olingo/server/core/ODataHttpHandlerImpl.java
@@ -34,7 +34,7 @@ import java.util.Map.Entry;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
-import org.apache.olingo.commons.api.ODataRuntimeException;
+import org.apache.olingo.commons.api.ex.ODataRuntimeException;
import org.apache.olingo.commons.api.http.HttpHeader;
import org.apache.olingo.commons.api.http.HttpMethod;
import org.apache.olingo.server.api.OData;
diff --git a/lib/server-core/src/main/java/org/apache/olingo/server/core/batchhandler/referenceRewriting/BatchReferenceRewriter.java b/lib/server-core/src/main/java/org/apache/olingo/server/core/batchhandler/referenceRewriting/BatchReferenceRewriter.java
index a941c336d..a05b1e9a0 100644
--- a/lib/server-core/src/main/java/org/apache/olingo/server/core/batchhandler/referenceRewriting/BatchReferenceRewriter.java
+++ b/lib/server-core/src/main/java/org/apache/olingo/server/core/batchhandler/referenceRewriting/BatchReferenceRewriter.java
@@ -23,7 +23,7 @@ import java.util.Map;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
-import org.apache.olingo.commons.api.ODataRuntimeException;
+import org.apache.olingo.commons.api.ex.ODataRuntimeException;
import org.apache.olingo.commons.api.http.HttpHeader;
import org.apache.olingo.commons.api.http.HttpMethod;
import org.apache.olingo.server.api.ODataRequest;
diff --git a/lib/server-core/src/main/java/org/apache/olingo/server/core/debug/DebugResponseHelperImpl.java b/lib/server-core/src/main/java/org/apache/olingo/server/core/debug/DebugResponseHelperImpl.java
index f81a256aa..5510c546a 100644
--- a/lib/server-core/src/main/java/org/apache/olingo/server/core/debug/DebugResponseHelperImpl.java
+++ b/lib/server-core/src/main/java/org/apache/olingo/server/core/debug/DebugResponseHelperImpl.java
@@ -31,7 +31,7 @@ import java.util.Locale;
import java.util.Map;
import java.util.Map.Entry;
-import org.apache.olingo.commons.api.ODataRuntimeException;
+import org.apache.olingo.commons.api.ex.ODataRuntimeException;
import org.apache.olingo.commons.api.format.ContentType;
import org.apache.olingo.commons.api.http.HttpHeader;
import org.apache.olingo.commons.api.http.HttpStatusCode;
diff --git a/lib/server-core/src/main/java/org/apache/olingo/server/core/deserializer/batch/BatchParser.java b/lib/server-core/src/main/java/org/apache/olingo/server/core/deserializer/batch/BatchParser.java
index 3aeb1b564..243cbe0ca 100644
--- a/lib/server-core/src/main/java/org/apache/olingo/server/core/deserializer/batch/BatchParser.java
+++ b/lib/server-core/src/main/java/org/apache/olingo/server/core/deserializer/batch/BatchParser.java
@@ -23,7 +23,7 @@ import java.io.InputStream;
import java.util.LinkedList;
import java.util.List;
-import org.apache.olingo.commons.api.ODataRuntimeException;
+import org.apache.olingo.commons.api.ex.ODataRuntimeException;
import org.apache.olingo.server.api.deserializer.batch.BatchDeserializerException;
import org.apache.olingo.server.api.deserializer.batch.BatchOptions;
import org.apache.olingo.server.api.deserializer.batch.BatchRequestPart;
diff --git a/lib/server-core/src/main/java/org/apache/olingo/server/core/prefer/PreferencesImpl.java b/lib/server-core/src/main/java/org/apache/olingo/server/core/prefer/PreferencesImpl.java
index 50cf89e4d..ecafdc45f 100644
--- a/lib/server-core/src/main/java/org/apache/olingo/server/core/prefer/PreferencesImpl.java
+++ b/lib/server-core/src/main/java/org/apache/olingo/server/core/prefer/PreferencesImpl.java
@@ -23,7 +23,7 @@ import java.util.Collection;
import java.util.Locale;
import java.util.Map;
-import org.apache.olingo.commons.api.ODataPreferenceNames;
+import org.apache.olingo.commons.api.format.PreferenceName;
import org.apache.olingo.server.api.prefer.Preferences;
/**
@@ -46,15 +46,15 @@ public class PreferencesImpl implements Preferences {
}
public boolean hasAllowEntityReferences() {
- return preferences.containsKey(ODataPreferenceNames.ALLOW_ENTITY_REFERENCES.toString());
+ return preferences.containsKey(PreferenceName.ALLOW_ENTITY_REFERENCES.getName());
}
public URI getCallback() {
- if (preferences.containsKey(ODataPreferenceNames.CALLBACK.toString())
- && preferences.get(ODataPreferenceNames.CALLBACK.toString()).getParameters() != null
- && preferences.get(ODataPreferenceNames.CALLBACK.toString()).getParameters().get(URL) != null) {
+ if (preferences.containsKey(PreferenceName.CALLBACK.getName())
+ && preferences.get(PreferenceName.CALLBACK.getName()).getParameters() != null
+ && preferences.get(PreferenceName.CALLBACK.getName()).getParameters().get(URL) != null) {
try {
- return URI.create(preferences.get(ODataPreferenceNames.CALLBACK.toString()).getParameters().get(URL));
+ return URI.create(preferences.get(PreferenceName.CALLBACK.getName()).getParameters().get(URL));
} catch (final IllegalArgumentException e) {
return null;
}
@@ -63,20 +63,20 @@ public class PreferencesImpl implements Preferences {
}
public boolean hasContinueOnError() {
- return preferences.containsKey(ODataPreferenceNames.CONTINUE_ON_ERROR.toString());
+ return preferences.containsKey(PreferenceName.CONTINUE_ON_ERROR.getName());
}
public Integer getMaxPageSize() {
- return getNonNegativeIntegerPreference(ODataPreferenceNames.MAX_PAGE_SIZE.toString());
+ return getNonNegativeIntegerPreference(PreferenceName.MAX_PAGE_SIZE.getName());
}
public boolean hasTrackChanges() {
- return preferences.containsKey(ODataPreferenceNames.TRACK_CHANGES.toString());
+ return preferences.containsKey(PreferenceName.TRACK_CHANGES.getName());
}
public Return getReturn() {
- if (preferences.containsKey(ODataPreferenceNames.RETURN.toString())) {
- final String value = preferences.get(ODataPreferenceNames.RETURN.toString()).getValue();
+ if (preferences.containsKey(PreferenceName.RETURN.getName())) {
+ final String value = preferences.get(PreferenceName.RETURN.getName()).getValue();
if (Return.REPRESENTATION.toString().toLowerCase(Locale.ROOT).equals(value)) {
return Return.REPRESENTATION;
} else if (Return.MINIMAL.toString().toLowerCase(Locale.ROOT).equals(value)) {
@@ -87,11 +87,11 @@ public class PreferencesImpl implements Preferences {
}
public boolean hasRespondAsync() {
- return preferences.containsKey(ODataPreferenceNames.RESPOND_ASYNC.toString());
+ return preferences.containsKey(PreferenceName.RESPOND_ASYNC.getName());
}
public Integer getWait() {
- return getNonNegativeIntegerPreference(ODataPreferenceNames.WAIT.toString());
+ return getNonNegativeIntegerPreference(PreferenceName.WAIT.getName());
}
private Integer getNonNegativeIntegerPreference(final String name) {
diff --git a/lib/server-core/src/main/java/org/apache/olingo/server/core/serializer/BatchResponseSerializer.java b/lib/server-core/src/main/java/org/apache/olingo/server/core/serializer/BatchResponseSerializer.java
index 95a33f5cd..f7fd01d28 100644
--- a/lib/server-core/src/main/java/org/apache/olingo/server/core/serializer/BatchResponseSerializer.java
+++ b/lib/server-core/src/main/java/org/apache/olingo/server/core/serializer/BatchResponseSerializer.java
@@ -31,7 +31,7 @@ import java.util.List;
import java.util.Map;
import java.util.UUID;
-import org.apache.olingo.commons.api.ODataRuntimeException;
+import org.apache.olingo.commons.api.ex.ODataRuntimeException;
import org.apache.olingo.commons.api.http.HttpContentType;
import org.apache.olingo.commons.api.http.HttpHeader;
import org.apache.olingo.commons.api.http.HttpStatusCode;
diff --git a/lib/server-core/src/main/java/org/apache/olingo/server/core/serializer/json/ODataErrorSerializer.java b/lib/server-core/src/main/java/org/apache/olingo/server/core/serializer/json/ODataErrorSerializer.java
index 97faaa079..c3c39d0ea 100644
--- a/lib/server-core/src/main/java/org/apache/olingo/server/core/serializer/json/ODataErrorSerializer.java
+++ b/lib/server-core/src/main/java/org/apache/olingo/server/core/serializer/json/ODataErrorSerializer.java
@@ -21,8 +21,8 @@ package org.apache.olingo.server.core.serializer.json;
import java.io.IOException;
import org.apache.olingo.commons.api.Constants;
-import org.apache.olingo.commons.api.ODataError;
-import org.apache.olingo.commons.api.ODataErrorDetail;
+import org.apache.olingo.commons.api.ex.ODataError;
+import org.apache.olingo.commons.api.ex.ODataErrorDetail;
import org.apache.olingo.server.api.serializer.SerializerException;
import com.fasterxml.jackson.core.JsonGenerator;
diff --git a/lib/server-core/src/main/java/org/apache/olingo/server/core/serializer/xml/ODataXmlSerializer.java b/lib/server-core/src/main/java/org/apache/olingo/server/core/serializer/xml/ODataXmlSerializer.java
index 899226feb..f998fe7b4 100644
--- a/lib/server-core/src/main/java/org/apache/olingo/server/core/serializer/xml/ODataXmlSerializer.java
+++ b/lib/server-core/src/main/java/org/apache/olingo/server/core/serializer/xml/ODataXmlSerializer.java
@@ -31,7 +31,7 @@ import javax.xml.stream.XMLStreamException;
import javax.xml.stream.XMLStreamWriter;
import org.apache.olingo.commons.api.Constants;
-import org.apache.olingo.commons.api.ODataErrorDetail;
+import org.apache.olingo.commons.api.ex.ODataErrorDetail;
import org.apache.olingo.commons.api.data.ComplexValue;
import org.apache.olingo.commons.api.data.ContextURL;
import org.apache.olingo.commons.api.data.Entity;
diff --git a/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/UriInfoImpl.java b/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/UriInfoImpl.java
index 15a70bec8..6b42a9935 100644
--- a/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/UriInfoImpl.java
+++ b/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/UriInfoImpl.java
@@ -25,7 +25,7 @@ import java.util.HashMap;
import java.util.List;
import java.util.Map;
-import org.apache.olingo.commons.api.ODataRuntimeException;
+import org.apache.olingo.commons.api.ex.ODataRuntimeException;
import org.apache.olingo.commons.api.edm.EdmEntityType;
import org.apache.olingo.server.api.uri.UriInfo;
import org.apache.olingo.server.api.uri.UriInfoAll;
diff --git a/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/parser/Parser.java b/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/parser/Parser.java
index b2dfff87f..794948e88 100644
--- a/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/parser/Parser.java
+++ b/lib/server-core/src/main/java/org/apache/olingo/server/core/uri/parser/Parser.java
@@ -30,7 +30,7 @@ import org.antlr.v4.runtime.RecognitionException;
import org.antlr.v4.runtime.Token;
import org.antlr.v4.runtime.atn.PredictionMode;
import org.antlr.v4.runtime.misc.ParseCancellationException;
-import org.apache.olingo.commons.api.ODataRuntimeException;
+import org.apache.olingo.commons.api.ex.ODataRuntimeException;
import org.apache.olingo.commons.api.edm.Edm;
import org.apache.olingo.server.api.uri.UriInfo;
import org.apache.olingo.server.api.uri.UriInfoKind;
diff --git a/lib/server-core/src/test/java/org/apache/olingo/server/core/debug/ServerCoreDebuggerTest.java b/lib/server-core/src/test/java/org/apache/olingo/server/core/debug/ServerCoreDebuggerTest.java
index 32ec1954f..0ec0fceaf 100644
--- a/lib/server-core/src/test/java/org/apache/olingo/server/core/debug/ServerCoreDebuggerTest.java
+++ b/lib/server-core/src/test/java/org/apache/olingo/server/core/debug/ServerCoreDebuggerTest.java
@@ -29,7 +29,7 @@ import java.io.IOException;
import javax.servlet.http.HttpServletRequest;
import org.apache.commons.io.IOUtils;
-import org.apache.olingo.commons.api.ODataRuntimeException;
+import org.apache.olingo.commons.api.ex.ODataRuntimeException;
import org.apache.olingo.server.api.OData;
import org.apache.olingo.server.api.ODataResponse;
import org.apache.olingo.server.api.debug.DebugInformation;
diff --git a/lib/server-core/src/test/java/org/apache/olingo/server/core/edm/provider/EdmEntityContainerImplTest.java b/lib/server-core/src/test/java/org/apache/olingo/server/core/edm/provider/EdmEntityContainerImplTest.java
index b7017ec53..82aa145d8 100644
--- a/lib/server-core/src/test/java/org/apache/olingo/server/core/edm/provider/EdmEntityContainerImplTest.java
+++ b/lib/server-core/src/test/java/org/apache/olingo/server/core/edm/provider/EdmEntityContainerImplTest.java
@@ -29,7 +29,7 @@ import static org.mockito.Mockito.when;
import java.util.ArrayList;
import java.util.List;
-import org.apache.olingo.commons.api.ODataException;
+import org.apache.olingo.commons.api.ex.ODataException;
import org.apache.olingo.commons.api.edm.EdmActionImport;
import org.apache.olingo.commons.api.edm.EdmEntityContainer;
import org.apache.olingo.commons.api.edm.EdmEntitySet;
diff --git a/lib/server-core/src/test/java/org/apache/olingo/server/core/edm/provider/EdmProviderImplTest.java b/lib/server-core/src/test/java/org/apache/olingo/server/core/edm/provider/EdmProviderImplTest.java
index 1456c37e3..c094b1dfc 100644
--- a/lib/server-core/src/test/java/org/apache/olingo/server/core/edm/provider/EdmProviderImplTest.java
+++ b/lib/server-core/src/test/java/org/apache/olingo/server/core/edm/provider/EdmProviderImplTest.java
@@ -30,7 +30,7 @@ import java.lang.reflect.Method;
import java.util.ArrayList;
import java.util.List;
-import org.apache.olingo.commons.api.ODataException;
+import org.apache.olingo.commons.api.ex.ODataException;
import org.apache.olingo.commons.api.edm.Edm;
import org.apache.olingo.commons.api.edm.EdmComplexType;
import org.apache.olingo.commons.api.edm.EdmEntityContainer;
@@ -125,24 +125,24 @@ public class EdmProviderImplTest {
try {
localEdm.getUnboundAction(fqn);
} catch (EdmException e) {
- assertEquals("org.apache.olingo.commons.api.ODataException: msg", e.getMessage());
+ assertEquals("org.apache.olingo.commons.api.ex.ODataException: msg", e.getMessage());
}
try {
localEdm.getUnboundFunction(fqn, null);
} catch (EdmException e) {
- assertEquals("org.apache.olingo.commons.api.ODataException: msg", e.getMessage());
+ assertEquals("org.apache.olingo.commons.api.ex.ODataException: msg", e.getMessage());
}
try {
localEdm.getBoundAction(fqn, fqn, true);
} catch (EdmException e) {
- assertEquals("org.apache.olingo.commons.api.ODataException: msg", e.getMessage());
+ assertEquals("org.apache.olingo.commons.api.ex.ODataException: msg", e.getMessage());
}
try {
localEdm.getBoundFunction(fqn, fqn, true, null);
} catch (EdmException e) {
- assertEquals("org.apache.olingo.commons.api.ODataException: msg", e.getMessage());
+ assertEquals("org.apache.olingo.commons.api.ex.ODataException: msg", e.getMessage());
}
}
diff --git a/lib/server-core/src/test/java/org/apache/olingo/server/core/edm/provider/EdmSchemaImplTest.java b/lib/server-core/src/test/java/org/apache/olingo/server/core/edm/provider/EdmSchemaImplTest.java
index 3714046fa..fd344c523 100644
--- a/lib/server-core/src/test/java/org/apache/olingo/server/core/edm/provider/EdmSchemaImplTest.java
+++ b/lib/server-core/src/test/java/org/apache/olingo/server/core/edm/provider/EdmSchemaImplTest.java
@@ -27,7 +27,7 @@ import static org.mockito.Mockito.when;
import java.util.ArrayList;
import java.util.List;
-import org.apache.olingo.commons.api.ODataException;
+import org.apache.olingo.commons.api.ex.ODataException;
import org.apache.olingo.commons.api.edm.Edm;
import org.apache.olingo.commons.api.edm.EdmAction;
import org.apache.olingo.commons.api.edm.EdmActionImport;
diff --git a/lib/server-core/src/test/java/org/apache/olingo/server/core/serializer/json/ComplexTypeHelper.java b/lib/server-core/src/test/java/org/apache/olingo/server/core/serializer/json/ComplexTypeHelper.java
index 567e3a528..eff637f7c 100644
--- a/lib/server-core/src/test/java/org/apache/olingo/server/core/serializer/json/ComplexTypeHelper.java
+++ b/lib/server-core/src/test/java/org/apache/olingo/server/core/serializer/json/ComplexTypeHelper.java
@@ -24,7 +24,7 @@ import static org.mockito.Mockito.when;
import java.util.ArrayList;
import java.util.List;
-import org.apache.olingo.commons.api.ODataException;
+import org.apache.olingo.commons.api.ex.ODataException;
import org.apache.olingo.commons.api.edm.EdmComplexType;
import org.apache.olingo.commons.api.edm.EdmPrimitiveTypeKind;
import org.apache.olingo.commons.api.edm.FullQualifiedName;
diff --git a/lib/server-core/src/test/java/org/apache/olingo/server/core/serializer/json/ODataJsonSerializerTest.java b/lib/server-core/src/test/java/org/apache/olingo/server/core/serializer/json/ODataJsonSerializerTest.java
index 1994e0c66..4be074b02 100644
--- a/lib/server-core/src/test/java/org/apache/olingo/server/core/serializer/json/ODataJsonSerializerTest.java
+++ b/lib/server-core/src/test/java/org/apache/olingo/server/core/serializer/json/ODataJsonSerializerTest.java
@@ -27,7 +27,7 @@ import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.List;
-import org.apache.olingo.commons.api.ODataException;
+import org.apache.olingo.commons.api.ex.ODataException;
import org.apache.olingo.commons.api.data.ComplexValue;
import org.apache.olingo.commons.api.data.ContextURL;
import org.apache.olingo.commons.api.data.Property;
diff --git a/lib/server-core/src/test/java/org/apache/olingo/server/core/serializer/json/ServerErrorSerializerTest.java b/lib/server-core/src/test/java/org/apache/olingo/server/core/serializer/json/ServerErrorSerializerTest.java
index 324207689..8f5cb8749 100644
--- a/lib/server-core/src/test/java/org/apache/olingo/server/core/serializer/json/ServerErrorSerializerTest.java
+++ b/lib/server-core/src/test/java/org/apache/olingo/server/core/serializer/json/ServerErrorSerializerTest.java
@@ -26,7 +26,7 @@ import java.util.ArrayList;
import java.util.List;
import org.apache.commons.io.IOUtils;
-import org.apache.olingo.commons.api.ODataErrorDetail;
+import org.apache.olingo.commons.api.ex.ODataErrorDetail;
import org.apache.olingo.commons.api.format.ContentType;
import org.apache.olingo.server.api.OData;
import org.apache.olingo.server.api.ODataServerError;
diff --git a/lib/server-core/src/test/java/org/apache/olingo/server/core/serializer/xml/MetadataDocumentXmlSerializerTest.java b/lib/server-core/src/test/java/org/apache/olingo/server/core/serializer/xml/MetadataDocumentXmlSerializerTest.java
index 9e9a04d3e..52fc7737a 100644
--- a/lib/server-core/src/test/java/org/apache/olingo/server/core/serializer/xml/MetadataDocumentXmlSerializerTest.java
+++ b/lib/server-core/src/test/java/org/apache/olingo/server/core/serializer/xml/MetadataDocumentXmlSerializerTest.java
@@ -32,7 +32,7 @@ import java.util.Collections;
import java.util.List;
import org.apache.commons.io.IOUtils;
-import org.apache.olingo.commons.api.ODataException;
+import org.apache.olingo.commons.api.ex.ODataException;
import org.apache.olingo.commons.api.edm.Edm;
import org.apache.olingo.commons.api.edm.EdmComplexType;
import org.apache.olingo.commons.api.edm.EdmPrimitiveTypeKind;
diff --git a/lib/server-core/src/test/java/org/apache/olingo/server/core/serializer/xml/ServerErrorXmlSerializerTest.java b/lib/server-core/src/test/java/org/apache/olingo/server/core/serializer/xml/ServerErrorXmlSerializerTest.java
index 6968b2b9d..aea1fdbda 100644
--- a/lib/server-core/src/test/java/org/apache/olingo/server/core/serializer/xml/ServerErrorXmlSerializerTest.java
+++ b/lib/server-core/src/test/java/org/apache/olingo/server/core/serializer/xml/ServerErrorXmlSerializerTest.java
@@ -25,7 +25,7 @@ import java.util.ArrayList;
import java.util.List;
import org.apache.commons.io.IOUtils;
-import org.apache.olingo.commons.api.ODataErrorDetail;
+import org.apache.olingo.commons.api.ex.ODataErrorDetail;
import org.apache.olingo.commons.api.format.ContentType;
import org.apache.olingo.server.api.OData;
import org.apache.olingo.server.api.ODataServerError;
diff --git a/lib/server-tecsvc/src/main/java/org/apache/olingo/server/tecsvc/async/AsyncProcessor.java b/lib/server-tecsvc/src/main/java/org/apache/olingo/server/tecsvc/async/AsyncProcessor.java
index da16f9b63..4e070832b 100644
--- a/lib/server-tecsvc/src/main/java/org/apache/olingo/server/tecsvc/async/AsyncProcessor.java
+++ b/lib/server-tecsvc/src/main/java/org/apache/olingo/server/tecsvc/async/AsyncProcessor.java
@@ -18,7 +18,7 @@
*/
package org.apache.olingo.server.tecsvc.async;
-import org.apache.olingo.commons.api.ODataRuntimeException;
+import org.apache.olingo.commons.api.ex.ODataRuntimeException;
import org.apache.olingo.commons.api.http.HttpHeader;
import org.apache.olingo.server.api.ODataApplicationException;
import org.apache.olingo.server.api.ODataLibraryException;
diff --git a/lib/server-tecsvc/src/main/java/org/apache/olingo/server/tecsvc/async/TechnicalAsyncService.java b/lib/server-tecsvc/src/main/java/org/apache/olingo/server/tecsvc/async/TechnicalAsyncService.java
index 857a45ff7..ce08e5203 100644
--- a/lib/server-tecsvc/src/main/java/org/apache/olingo/server/tecsvc/async/TechnicalAsyncService.java
+++ b/lib/server-tecsvc/src/main/java/org/apache/olingo/server/tecsvc/async/TechnicalAsyncService.java
@@ -18,7 +18,7 @@
*/
package org.apache.olingo.server.tecsvc.async;
-import org.apache.olingo.commons.api.ODataRuntimeException;
+import org.apache.olingo.commons.api.ex.ODataRuntimeException;
import org.apache.olingo.commons.api.format.ContentType;
import org.apache.olingo.commons.api.http.HttpHeader;
import org.apache.olingo.commons.api.http.HttpStatusCode;
diff --git a/lib/server-tecsvc/src/main/java/org/apache/olingo/server/tecsvc/processor/queryoptions/options/SystemQueryOptionsRuntimeException.java b/lib/server-tecsvc/src/main/java/org/apache/olingo/server/tecsvc/processor/queryoptions/options/SystemQueryOptionsRuntimeException.java
index 57bb20464..469052d2e 100644
--- a/lib/server-tecsvc/src/main/java/org/apache/olingo/server/tecsvc/processor/queryoptions/options/SystemQueryOptionsRuntimeException.java
+++ b/lib/server-tecsvc/src/main/java/org/apache/olingo/server/tecsvc/processor/queryoptions/options/SystemQueryOptionsRuntimeException.java
@@ -18,7 +18,7 @@
*/
package org.apache.olingo.server.tecsvc.processor.queryoptions.options;
-import org.apache.olingo.commons.api.ODataRuntimeException;
+import org.apache.olingo.commons.api.ex.ODataRuntimeException;
public class SystemQueryOptionsRuntimeException extends ODataRuntimeException {
diff --git a/lib/server-tecsvc/src/main/java/org/apache/olingo/server/tecsvc/provider/ActionProvider.java b/lib/server-tecsvc/src/main/java/org/apache/olingo/server/tecsvc/provider/ActionProvider.java
index 1365a4554..2227315ba 100644
--- a/lib/server-tecsvc/src/main/java/org/apache/olingo/server/tecsvc/provider/ActionProvider.java
+++ b/lib/server-tecsvc/src/main/java/org/apache/olingo/server/tecsvc/provider/ActionProvider.java
@@ -22,7 +22,7 @@ import java.util.Arrays;
import java.util.Collections;
import java.util.List;
-import org.apache.olingo.commons.api.ODataException;
+import org.apache.olingo.commons.api.ex.ODataException;
import org.apache.olingo.commons.api.edm.FullQualifiedName;
import org.apache.olingo.commons.api.edm.provider.CsdlAction;
import org.apache.olingo.commons.api.edm.provider.CsdlParameter;
diff --git a/lib/server-tecsvc/src/main/java/org/apache/olingo/server/tecsvc/provider/ComplexTypeProvider.java b/lib/server-tecsvc/src/main/java/org/apache/olingo/server/tecsvc/provider/ComplexTypeProvider.java
index 819c19f2c..b3b9864fe 100644
--- a/lib/server-tecsvc/src/main/java/org/apache/olingo/server/tecsvc/provider/ComplexTypeProvider.java
+++ b/lib/server-tecsvc/src/main/java/org/apache/olingo/server/tecsvc/provider/ComplexTypeProvider.java
@@ -21,7 +21,7 @@ package org.apache.olingo.server.tecsvc.provider;
import java.util.ArrayList;
import java.util.Arrays;
-import org.apache.olingo.commons.api.ODataException;
+import org.apache.olingo.commons.api.ex.ODataException;
import org.apache.olingo.commons.api.edm.FullQualifiedName;
import org.apache.olingo.commons.api.edm.provider.CsdlComplexType;
import org.apache.olingo.commons.api.edm.provider.CsdlNavigationProperty;
diff --git a/lib/server-tecsvc/src/main/java/org/apache/olingo/server/tecsvc/provider/ContainerProvider.java b/lib/server-tecsvc/src/main/java/org/apache/olingo/server/tecsvc/provider/ContainerProvider.java
index 3a1777556..ff53d09a5 100644
--- a/lib/server-tecsvc/src/main/java/org/apache/olingo/server/tecsvc/provider/ContainerProvider.java
+++ b/lib/server-tecsvc/src/main/java/org/apache/olingo/server/tecsvc/provider/ContainerProvider.java
@@ -22,7 +22,7 @@ import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
-import org.apache.olingo.commons.api.ODataException;
+import org.apache.olingo.commons.api.ex.ODataException;
import org.apache.olingo.commons.api.edm.FullQualifiedName;
import org.apache.olingo.commons.api.edm.provider.CsdlActionImport;
import org.apache.olingo.commons.api.edm.provider.CsdlEntityContainer;
diff --git a/lib/server-tecsvc/src/main/java/org/apache/olingo/server/tecsvc/provider/EdmTechProvider.java b/lib/server-tecsvc/src/main/java/org/apache/olingo/server/tecsvc/provider/EdmTechProvider.java
index 37951a341..ffb1946cb 100644
--- a/lib/server-tecsvc/src/main/java/org/apache/olingo/server/tecsvc/provider/EdmTechProvider.java
+++ b/lib/server-tecsvc/src/main/java/org/apache/olingo/server/tecsvc/provider/EdmTechProvider.java
@@ -22,7 +22,7 @@ import java.util.Arrays;
import java.util.Collections;
import java.util.List;
-import org.apache.olingo.commons.api.ODataException;
+import org.apache.olingo.commons.api.ex.ODataException;
import org.apache.olingo.commons.api.edm.FullQualifiedName;
import org.apache.olingo.commons.api.edm.provider.CsdlAbstractEdmProvider;
import org.apache.olingo.commons.api.edm.provider.CsdlAction;
diff --git a/lib/server-tecsvc/src/main/java/org/apache/olingo/server/tecsvc/provider/EntityTypeProvider.java b/lib/server-tecsvc/src/main/java/org/apache/olingo/server/tecsvc/provider/EntityTypeProvider.java
index 6ee0d2d0f..a1067ca50 100644
--- a/lib/server-tecsvc/src/main/java/org/apache/olingo/server/tecsvc/provider/EntityTypeProvider.java
+++ b/lib/server-tecsvc/src/main/java/org/apache/olingo/server/tecsvc/provider/EntityTypeProvider.java
@@ -20,7 +20,7 @@ package org.apache.olingo.server.tecsvc.provider;
import java.util.Arrays;
-import org.apache.olingo.commons.api.ODataException;
+import org.apache.olingo.commons.api.ex.ODataException;
import org.apache.olingo.commons.api.edm.FullQualifiedName;
import org.apache.olingo.commons.api.edm.provider.CsdlEntityType;
import org.apache.olingo.commons.api.edm.provider.CsdlNavigationProperty;
diff --git a/lib/server-tecsvc/src/main/java/org/apache/olingo/server/tecsvc/provider/EnumTypeProvider.java b/lib/server-tecsvc/src/main/java/org/apache/olingo/server/tecsvc/provider/EnumTypeProvider.java
index bc382cf74..7479c28fb 100644
--- a/lib/server-tecsvc/src/main/java/org/apache/olingo/server/tecsvc/provider/EnumTypeProvider.java
+++ b/lib/server-tecsvc/src/main/java/org/apache/olingo/server/tecsvc/provider/EnumTypeProvider.java
@@ -20,7 +20,7 @@ package org.apache.olingo.server.tecsvc.provider;
import java.util.Arrays;
-import org.apache.olingo.commons.api.ODataException;
+import org.apache.olingo.commons.api.ex.ODataException;
import org.apache.olingo.commons.api.edm.EdmPrimitiveTypeKind;
import org.apache.olingo.commons.api.edm.FullQualifiedName;
import org.apache.olingo.commons.api.edm.provider.CsdlEnumMember;
diff --git a/lib/server-tecsvc/src/main/java/org/apache/olingo/server/tecsvc/provider/FunctionProvider.java b/lib/server-tecsvc/src/main/java/org/apache/olingo/server/tecsvc/provider/FunctionProvider.java
index 1694d1370..df4cfbd20 100644
--- a/lib/server-tecsvc/src/main/java/org/apache/olingo/server/tecsvc/provider/FunctionProvider.java
+++ b/lib/server-tecsvc/src/main/java/org/apache/olingo/server/tecsvc/provider/FunctionProvider.java
@@ -23,7 +23,7 @@ import java.util.Arrays;
import java.util.Collections;
import java.util.List;
-import org.apache.olingo.commons.api.ODataException;
+import org.apache.olingo.commons.api.ex.ODataException;
import org.apache.olingo.commons.api.edm.FullQualifiedName;
import org.apache.olingo.commons.api.edm.provider.CsdlFunction;
import org.apache.olingo.commons.api.edm.provider.CsdlParameter;
diff --git a/lib/server-tecsvc/src/main/java/org/apache/olingo/server/tecsvc/provider/SchemaProvider.java b/lib/server-tecsvc/src/main/java/org/apache/olingo/server/tecsvc/provider/SchemaProvider.java
index 7891556dc..b07ae60f6 100644
--- a/lib/server-tecsvc/src/main/java/org/apache/olingo/server/tecsvc/provider/SchemaProvider.java
+++ b/lib/server-tecsvc/src/main/java/org/apache/olingo/server/tecsvc/provider/SchemaProvider.java
@@ -21,7 +21,7 @@ package org.apache.olingo.server.tecsvc.provider;
import java.util.ArrayList;
import java.util.List;
-import org.apache.olingo.commons.api.ODataException;
+import org.apache.olingo.commons.api.ex.ODataException;
import org.apache.olingo.commons.api.edm.provider.CsdlAction;
import org.apache.olingo.commons.api.edm.provider.CsdlComplexType;
import org.apache.olingo.commons.api.edm.provider.CsdlEntityType;
diff --git a/lib/server-test/src/test/java/org/apache/olingo/server/core/ODataHandlerTest.java b/lib/server-test/src/test/java/org/apache/olingo/server/core/ODataHandlerTest.java
index 8cd470655..b6c6a81fd 100644
--- a/lib/server-test/src/test/java/org/apache/olingo/server/core/ODataHandlerTest.java
+++ b/lib/server-test/src/test/java/org/apache/olingo/server/core/ODataHandlerTest.java
@@ -33,7 +33,7 @@ import java.util.Collections;
import java.util.Locale;
import org.apache.commons.io.IOUtils;
-import org.apache.olingo.commons.api.ODataException;
+import org.apache.olingo.commons.api.ex.ODataException;
import org.apache.olingo.commons.api.edm.FullQualifiedName;
import org.apache.olingo.commons.api.edm.constants.ODataServiceVersion;
import org.apache.olingo.commons.api.edm.provider.CsdlAbstractEdmProvider;
diff --git a/lib/server-test/src/test/java/org/apache/olingo/server/core/uri/UriInfoImplTest.java b/lib/server-test/src/test/java/org/apache/olingo/server/core/uri/UriInfoImplTest.java
index 56870352c..9448b406b 100644
--- a/lib/server-test/src/test/java/org/apache/olingo/server/core/uri/UriInfoImplTest.java
+++ b/lib/server-test/src/test/java/org/apache/olingo/server/core/uri/UriInfoImplTest.java
@@ -24,7 +24,7 @@ import static org.junit.Assert.assertNotNull;
import java.util.ArrayList;
import java.util.List;
-import org.apache.olingo.commons.api.ODataRuntimeException;
+import org.apache.olingo.commons.api.ex.ODataRuntimeException;
import org.apache.olingo.commons.api.edm.Edm;
import org.apache.olingo.commons.api.edm.EdmEntityType;
import org.apache.olingo.commons.core.edm.EdmProviderImpl;
diff --git a/lib/server-test/src/test/java/org/apache/olingo/server/core/uri/testutil/EdmTechTestProvider.java b/lib/server-test/src/test/java/org/apache/olingo/server/core/uri/testutil/EdmTechTestProvider.java
index e3a5eb332..e3250ea63 100644
--- a/lib/server-test/src/test/java/org/apache/olingo/server/core/uri/testutil/EdmTechTestProvider.java
+++ b/lib/server-test/src/test/java/org/apache/olingo/server/core/uri/testutil/EdmTechTestProvider.java
@@ -21,7 +21,7 @@ package org.apache.olingo.server.core.uri.testutil;
import java.util.Arrays;
import java.util.List;
-import org.apache.olingo.commons.api.ODataException;
+import org.apache.olingo.commons.api.ex.ODataException;
import org.apache.olingo.commons.api.edm.EdmPrimitiveTypeKind;
import org.apache.olingo.commons.api.edm.FullQualifiedName;
import org.apache.olingo.commons.api.edm.provider.CsdlComplexType;
diff --git a/samples/client/src/main/java/org/apache/olingo/samples/client/core/http/SocketFactoryHttpClientFactory.java b/samples/client/src/main/java/org/apache/olingo/samples/client/core/http/SocketFactoryHttpClientFactory.java
index 65521e18b..538e1190d 100644
--- a/samples/client/src/main/java/org/apache/olingo/samples/client/core/http/SocketFactoryHttpClientFactory.java
+++ b/samples/client/src/main/java/org/apache/olingo/samples/client/core/http/SocketFactoryHttpClientFactory.java
@@ -30,7 +30,7 @@ import org.apache.http.impl.conn.BasicClientConnectionManager;
import org.apache.http.params.CoreProtocolPNames;
import org.apache.olingo.commons.api.http.HttpMethod;
import org.apache.olingo.client.core.http.AbstractHttpClientFactory;
-import org.apache.olingo.commons.api.ODataRuntimeException;
+import org.apache.olingo.commons.api.ex.ODataRuntimeException;
/**
* Shows how to customize the way how the underlying network socket are managed by the HTTP component; the specific
diff --git a/samples/server/src/main/java/org/apache/olingo/server/sample/data/DataProvider.java b/samples/server/src/main/java/org/apache/olingo/server/sample/data/DataProvider.java
index 69a4530c7..d3608563c 100644
--- a/samples/server/src/main/java/org/apache/olingo/server/sample/data/DataProvider.java
+++ b/samples/server/src/main/java/org/apache/olingo/server/sample/data/DataProvider.java
@@ -21,7 +21,7 @@ package org.apache.olingo.server.sample.data;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
-import org.apache.olingo.commons.api.ODataException;
+import org.apache.olingo.commons.api.ex.ODataException;
import org.apache.olingo.commons.api.data.Entity;
import org.apache.olingo.commons.api.data.EntityCollection;
import org.apache.olingo.commons.api.data.Property;
diff --git a/samples/server/src/main/java/org/apache/olingo/server/sample/edmprovider/CarsEdmProvider.java b/samples/server/src/main/java/org/apache/olingo/server/sample/edmprovider/CarsEdmProvider.java
index 4d3ba9d70..628ad7d2c 100644
--- a/samples/server/src/main/java/org/apache/olingo/server/sample/edmprovider/CarsEdmProvider.java
+++ b/samples/server/src/main/java/org/apache/olingo/server/sample/edmprovider/CarsEdmProvider.java
@@ -22,7 +22,7 @@ import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
-import org.apache.olingo.commons.api.ODataException;
+import org.apache.olingo.commons.api.ex.ODataException;
import org.apache.olingo.commons.api.edm.EdmPrimitiveTypeKind;
import org.apache.olingo.commons.api.edm.FullQualifiedName;
import org.apache.olingo.commons.api.edm.provider.CsdlAbstractEdmProvider;