You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@olingo.apache.org by mi...@apache.org on 2015/09/17 09:25:30 UTC
[05/10] olingo-odata4 git commit: [OLINGO-659] still more API clean-up
[OLINGO-659] still more API clean-up
Signed-off-by: Michael Bolz <mi...@sap.com>
Project: http://git-wip-us.apache.org/repos/asf/olingo-odata4/repo
Commit: http://git-wip-us.apache.org/repos/asf/olingo-odata4/commit/805028da
Tree: http://git-wip-us.apache.org/repos/asf/olingo-odata4/tree/805028da
Diff: http://git-wip-us.apache.org/repos/asf/olingo-odata4/diff/805028da
Branch: refs/heads/master
Commit: 805028da2f291cbb05d73dbbecb798ab6f8b2231
Parents: fbca4ef
Author: Klaus Straubinger <kl...@sap.com>
Authored: Wed Sep 16 10:53:17 2015 +0200
Committer: Michael Bolz <mi...@sap.com>
Committed: Wed Sep 16 14:39:50 2015 +0200
----------------------------------------------------------------------
.../olingo/commons/api/data/DeletedEntity.java | 8 ++-----
.../olingo/commons/api/data/Operation.java | 2 +-
.../olingo/commons/api/data/package-info.java | 2 +-
.../commons/api/edm/constants/package-info.java | 3 +--
.../commons/api/edm/geo/ComposedGeospatial.java | 3 ---
.../olingo/commons/api/ex/package-info.java | 2 +-
.../olingo/commons/api/format/TypeUtil.java | 20 +++++++++-------
.../olingo/commons/api/format/package-info.java | 6 +++--
.../olingo/commons/api/http/package-info.java | 2 +-
.../apache/olingo/server/api/HttpHeaders.java | 6 +++--
.../apache/olingo/server/api/ODataRequest.java | 2 +-
.../apache/olingo/server/api/package-info.java | 25 +++++++++-----------
.../server/api/processor/package-info.java | 24 +++++++++----------
13 files changed, 51 insertions(+), 54 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/805028da/lib/commons-api/src/main/java/org/apache/olingo/commons/api/data/DeletedEntity.java
----------------------------------------------------------------------
diff --git a/lib/commons-api/src/main/java/org/apache/olingo/commons/api/data/DeletedEntity.java b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/data/DeletedEntity.java
index 04f8055..a5a6a43 100644
--- a/lib/commons-api/src/main/java/org/apache/olingo/commons/api/data/DeletedEntity.java
+++ b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/data/DeletedEntity.java
@@ -29,13 +29,9 @@ public class DeletedEntity {
* Reason of the removal from the list
*/
public enum Reason {
- /**
- * The entity was deleted
- */
+ /** The entity was deleted. */
deleted,
- /**
- * The data of the entity as changed and not any longer part of the response
- */
+ /** The data of the entity has changed and is not any longer part of the response. */
changed
}
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/805028da/lib/commons-api/src/main/java/org/apache/olingo/commons/api/data/Operation.java
----------------------------------------------------------------------
diff --git a/lib/commons-api/src/main/java/org/apache/olingo/commons/api/data/Operation.java b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/data/Operation.java
index 4b25801..f7bf1fa 100644
--- a/lib/commons-api/src/main/java/org/apache/olingo/commons/api/data/Operation.java
+++ b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/data/Operation.java
@@ -21,7 +21,7 @@ package org.apache.olingo.commons.api.data;
import java.net.URI;
/**
- * Data representation for a operation.
+ * Data representation for an operation.
*/
public class Operation {
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/805028da/lib/commons-api/src/main/java/org/apache/olingo/commons/api/data/package-info.java
----------------------------------------------------------------------
diff --git a/lib/commons-api/src/main/java/org/apache/olingo/commons/api/data/package-info.java b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/data/package-info.java
index 8a74ab6..276a31d 100644
--- a/lib/commons-api/src/main/java/org/apache/olingo/commons/api/data/package-info.java
+++ b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/data/package-info.java
@@ -17,6 +17,6 @@
* under the License.
*/
/**
- * Contains all the data objects of an OData responses and OData requests
+ * Contains all the data objects of OData responses and OData requests
*/
package org.apache.olingo.commons.api.data;
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/805028da/lib/commons-api/src/main/java/org/apache/olingo/commons/api/edm/constants/package-info.java
----------------------------------------------------------------------
diff --git a/lib/commons-api/src/main/java/org/apache/olingo/commons/api/edm/constants/package-info.java b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/edm/constants/package-info.java
index 4bcdf36..5149056 100644
--- a/lib/commons-api/src/main/java/org/apache/olingo/commons/api/edm/constants/package-info.java
+++ b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/edm/constants/package-info.java
@@ -17,8 +17,7 @@
* under the License.
*/
/**
- * Contains representations for all constants related
- * EDM objects created during the URI parsing
+ * Contains representations for constants related to EDM objects.
*/
package org.apache.olingo.commons.api.edm.constants;
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/805028da/lib/commons-api/src/main/java/org/apache/olingo/commons/api/edm/geo/ComposedGeospatial.java
----------------------------------------------------------------------
diff --git a/lib/commons-api/src/main/java/org/apache/olingo/commons/api/edm/geo/ComposedGeospatial.java b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/edm/geo/ComposedGeospatial.java
index 8cfea8a..f7e9f3d 100644
--- a/lib/commons-api/src/main/java/org/apache/olingo/commons/api/edm/geo/ComposedGeospatial.java
+++ b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/edm/geo/ComposedGeospatial.java
@@ -43,9 +43,6 @@ public abstract class ComposedGeospatial<T extends Geospatial> extends Geospatia
}
}
- /**
- * {@inheritDoc }
- */
@Override
public Iterator<T> iterator() {
return this.geospatials.iterator();
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/805028da/lib/commons-api/src/main/java/org/apache/olingo/commons/api/ex/package-info.java
----------------------------------------------------------------------
diff --git a/lib/commons-api/src/main/java/org/apache/olingo/commons/api/ex/package-info.java b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/ex/package-info.java
index 04300d2..3a8fb90 100644
--- a/lib/commons-api/src/main/java/org/apache/olingo/commons/api/ex/package-info.java
+++ b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/ex/package-info.java
@@ -17,6 +17,6 @@
* under the License.
*/
/**
- * Contains all OData errors and exceptions related classes.
+ * Contains all OData errors and exception-related classes.
*/
package org.apache.olingo.commons.api.ex;
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/805028da/lib/commons-api/src/main/java/org/apache/olingo/commons/api/format/TypeUtil.java
----------------------------------------------------------------------
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 5fc7ce1..ffd6d6e 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
@@ -24,7 +24,9 @@ import java.util.Map;
import java.util.TreeMap;
/**
- * Helper class which is only used within this package (<code>AcceptType</code> and <code>ContentType</code> handling).
+ * Helper class which is only used within this package.
+ * @see AcceptType
+ * @see ContentType
*/
final class TypeUtil {
@@ -102,13 +104,15 @@ final class TypeUtil {
}
/**
- * Validate that parameter name and parameter value are valid .
- *
- * @param parameterName must be <code>not null</code>, <code>not empty</code> and <code>contains no whitespace
- * characters</code>
- * @param parameterValue must be <code>not null</code>, <code>not empty</code> and <code>not start with a whitespace
- * character</code>
- * @throws IllegalArgumentException if one of the above requirements are not met
+ * Validates that parameter name and parameter value are valid:
+ * <ul>
+ * <li>not <code>null</code></li>
+ * <li>not empty</li>
+ * <li>does not contain whitespace characters (name), or does not start with whitespace (value), respectively</li>
+ * </ul>
+ * @param parameterName name
+ * @param parameterValue value
+ * @throws IllegalArgumentException if one of the above requirements is not met
*/
static void validateParameterNameAndValue(final String parameterName, final String parameterValue)
throws IllegalArgumentException {
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/805028da/lib/commons-api/src/main/java/org/apache/olingo/commons/api/format/package-info.java
----------------------------------------------------------------------
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
index ef5c906..489597d 100644
--- 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
@@ -17,7 +17,9 @@
* under the License.
*/
/**
- * Contains all the format related objects (also related to http headers <coder>Prefer</coder>, <code>Accepted</code>
- * and <code>Content-Type</code>) which are used for handling of an OData responses and OData requests.
+ * Contains all the format-related objects used for the handling of
+ * OData responses and OData requests.
+ * They are related to the HTTP headers <code>Prefer</code>, <code>Accept</code>,
+ * and <code>Content-Type</code>.
*/
package org.apache.olingo.commons.api.format;
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/805028da/lib/commons-api/src/main/java/org/apache/olingo/commons/api/http/package-info.java
----------------------------------------------------------------------
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
index df85434..236070d 100644
--- 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
@@ -17,6 +17,6 @@
* under the License.
*/
/**
- * Contains all the http related objects which are used for handling of an OData responses and OData requests.
+ * Contains all the HTTP related objects which are used for handling of OData responses and OData requests.
*/
package org.apache.olingo.commons.api.http;
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/805028da/lib/server-api/src/main/java/org/apache/olingo/server/api/HttpHeaders.java
----------------------------------------------------------------------
diff --git a/lib/server-api/src/main/java/org/apache/olingo/server/api/HttpHeaders.java b/lib/server-api/src/main/java/org/apache/olingo/server/api/HttpHeaders.java
index eec22f0..cc0fd33 100644
--- a/lib/server-api/src/main/java/org/apache/olingo/server/api/HttpHeaders.java
+++ b/lib/server-api/src/main/java/org/apache/olingo/server/api/HttpHeaders.java
@@ -26,9 +26,11 @@ import java.util.List;
import java.util.Map;
/**
- * HttpHeader container.
+ * HttpHeader container for internal use in this package.
+ * @see ODataRequest
+ * @see ODataResponse
*/
-public class HttpHeaders {
+final class HttpHeaders {
private final Map<String, List<String>> headers = new LinkedHashMap<String, List<String>>();
/**
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/805028da/lib/server-api/src/main/java/org/apache/olingo/server/api/ODataRequest.java
----------------------------------------------------------------------
diff --git a/lib/server-api/src/main/java/org/apache/olingo/server/api/ODataRequest.java b/lib/server-api/src/main/java/org/apache/olingo/server/api/ODataRequest.java
index bb07096..21122b8 100644
--- a/lib/server-api/src/main/java/org/apache/olingo/server/api/ODataRequest.java
+++ b/lib/server-api/src/main/java/org/apache/olingo/server/api/ODataRequest.java
@@ -55,7 +55,7 @@ public class ODataRequest {
}
/**
- * <p>Set a header to the response.</p>
+ * <p>Sets a header in the request.</p>
* <p>The header name will be handled as case-insensitive key.</p>
* <p>If a header already exists then the header will be replaced by this new value.</p>
* @param name case-insensitive header name
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/805028da/lib/server-api/src/main/java/org/apache/olingo/server/api/package-info.java
----------------------------------------------------------------------
diff --git a/lib/server-api/src/main/java/org/apache/olingo/server/api/package-info.java b/lib/server-api/src/main/java/org/apache/olingo/server/api/package-info.java
index d87d42e..fcac1f9 100644
--- a/lib/server-api/src/main/java/org/apache/olingo/server/api/package-info.java
+++ b/lib/server-api/src/main/java/org/apache/olingo/server/api/package-info.java
@@ -18,20 +18,17 @@
*/
/**
* Olingo Server API
- * <p>
- * OData Library is a protocol implementation of the OData V4.0 standard. For details of this standard
- * see <a href="http://odata.org">odata.org</a>.
- * <p>
- * This API is intended to help implement an OData service. An OData service consists of a metadata provider
- * implementation and an OData processor implementation.
- * <p>
- * An OData service can be exposed by a web application using the standard java servlet API. See the Olingo tutorials
- * section on how to implement a V4 service for further information:
- * <a href="http://olingo.apache.org/doc/odata4/index.html">http://olingo.apache.org/doc/odata4/index.html
- * <p>
- * The main entry point is the org.apache.olingo.server.api.OData class. Use the newInstance() method to create a new
- * object and start providing your service from there.
- *
+ * <p>The OData Library is a protocol implementation of the OData V4.0 standard.
+ * For details of this standard see <a href="http://odata.org">odata.org</a>.</p>
+ * <p>This API is intended to help implementing an OData service.
+ * An OData service consists of a metadata provider implementation and an
+ * OData processor implementation.</p>
+ * <p>An OData service can be exposed by a web application using the standard java servlet API.
+ * For further information, see the <a href="http://olingo.apache.org/doc/odata4/">Olingo
+ * tutorials</a> on how to implement an OData service.</p>
+ * <p>The main entry point is the org.apache.olingo.server.api.OData class.
+ * Use the newInstance() method to create a new object and
+ * start providing your service from there.</p>
*/
package org.apache.olingo.server.api;
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/805028da/lib/server-api/src/main/java/org/apache/olingo/server/api/processor/package-info.java
----------------------------------------------------------------------
diff --git a/lib/server-api/src/main/java/org/apache/olingo/server/api/processor/package-info.java b/lib/server-api/src/main/java/org/apache/olingo/server/api/processor/package-info.java
index c1a1b0f..db41fb2 100644
--- a/lib/server-api/src/main/java/org/apache/olingo/server/api/processor/package-info.java
+++ b/lib/server-api/src/main/java/org/apache/olingo/server/api/processor/package-info.java
@@ -18,17 +18,17 @@
*/
/**
* Olingo Processors
- * <p>
- * Processors are used to handle OData requests and send back the OData reponse. Before a specific processor is called
- * the Olingo library will parse the URI and validate it. Afterwards the Processor which matches the return type is
- * called. E.g.: If a primitive property is requested by the URI we will call the PrimitveProcessor.read method.
- * <p>
- * Processors can be registered at the {@link org.apache.olingo.server.api.ODataHttpHandler} object. Per default we will
- * have the {@link org.apache.olingo.server.api.processor.DefaultProcessor} registered to perform basic functionality
- * like delivering the metadata and service document as well as rendering an OData error.
- * <br>In case an application would like to perform custom tasks for these cases a new
- * {@link org.apache.olingo.server.api.processor.ServiceDocumentProcessor} can be registered in order to overwrite the
- * default behaviour.
+ * <p>Processors are used to handle OData requests and send back the OData reponse.
+ * Before a specific processor is called the Olingo library will parse the URI and validate it.
+ * Afterwards the Processor which matches the return type is called.
+ * Example: If a primitive property is requested by the URI we will call the
+ * PrimitiveProcessor.readPrimitive method.</p>
+ * <p>Processors can be registered at the {@link org.apache.olingo.server.api.ODataHttpHandler} object.
+ * Per default the {@link org.apache.olingo.server.api.processor.DefaultProcessor} is registered
+ * to perform basic functionality like delivering the metadata and service documents, respectively,
+ * as well as rendering an OData error.
+ * In case an application would like to perform custom tasks for these cases a new
+ * {@link org.apache.olingo.server.api.processor.ServiceDocumentProcessor} can be registered
+ * in order to overwrite the default behavior.
*/
package org.apache.olingo.server.api.processor;
-