You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@olingo.apache.org by ch...@apache.org on 2013/09/20 15:33:28 UTC
[06/59] [abbrv] Clean up of odata api
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata2/blob/cf4caabf/odata-api/src/main/java/org/apache/olingo/odata2/api/ep/EntityProvider.java
----------------------------------------------------------------------
diff --git a/odata-api/src/main/java/org/apache/olingo/odata2/api/ep/EntityProvider.java b/odata-api/src/main/java/org/apache/olingo/odata2/api/ep/EntityProvider.java
index cb876aa..c37a8bc 100644
--- a/odata-api/src/main/java/org/apache/olingo/odata2/api/ep/EntityProvider.java
+++ b/odata-api/src/main/java/org/apache/olingo/odata2/api/ep/EntityProvider.java
@@ -1,18 +1,18 @@
/*******************************************************************************
* Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
+ * or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
+ * 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
+ * with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * 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
+ * KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
******************************************************************************/
@@ -40,32 +40,32 @@ import org.apache.olingo.odata2.api.rt.RuntimeDelegate;
import org.apache.olingo.odata2.api.servicedocument.ServiceDocument;
/**
- * <p>Entity Provider</p>
+ * <p>Entity Provider</p>
* <p>An {@link EntityProvider} provides all necessary <b>read</b> and <b>write</b>
* methods for accessing the entities defined in an <code>Entity Data Model</code>.
* Therefore this library provides (in its <code>core</code> packages) as convenience
* basic entity providers for accessing entities in the <b>XML</b> and <b>JSON</b>
* formats.</p>
- *
+ *
*/
public final class EntityProvider {
/**
- * (Internal) interface for all {@link EntityProvider} necessary <b>read</b> and <b>write</b> methods for accessing
+ * (Internal) interface for all {@link EntityProvider} necessary <b>read</b> and <b>write</b> methods for accessing
* entities defined in an <code>Entity Data Model</code>.
* <p>
* This interface is declared as inner interface (class) because the {@link EntityProvider} provides a convenience
* access (and basic implementation for <b>XML</b> and <b>JSON</b> format) to all interface methods.
* <br/>
- * Hence, it is <b>not recommended</b> to implement this interface (it is possible to implement it and to provide an
+ * Hence, it is <b>not recommended</b> to implement this interface (it is possible to implement it and to provide an
* own {@link EntityProvider} for support of additional formats but it is recommended to
* handle additional formats directly within an <code>ODataProcessor</code>).
*/
public interface EntityProviderInterface {
/**
- * Write metadata document in XML format for the given schemas and the provided predefined
- * namespaces at the EDMX element. PredefinedNamespaces is of type
+ * Write metadata document in XML format for the given schemas and the provided predefined
+ * namespaces at the EDMX element. PredefinedNamespaces is of type
* Map{@literal <}prefix,namespace{@literal >} and may be null or an empty Map.
*
* @param schemas all XML schemas which will be written
@@ -73,7 +73,8 @@ public final class EntityProvider {
* @return resulting {@link ODataResponse} with written metadata content.
* @throws EntityProviderException if writing of data (serialization) fails
*/
- ODataResponse writeMetadata(List<Schema> schemas, Map<String, String> predefinedNamespaces) throws EntityProviderException;
+ ODataResponse writeMetadata(List<Schema> schemas, Map<String, String> predefinedNamespaces)
+ throws EntityProviderException;
/**
* Write service document based on given {@link Edm} and <code>service root</code> as
@@ -117,39 +118,45 @@ public final class EntityProvider {
ODataResponse writeBinary(String mimeType, byte[] data) throws EntityProviderException;
/**
- * Write given <code>data</code> (which is given in form of a {@link List} with a {@link Map} for each entity. Such a {@link Map}
- * contains all properties [as <code>property name</code> to <code>property value</code> mapping] for the entry) in the specified
- * format (given as <code>contentType</code>) based on given <code>entity data model for an entity set</code> (given as {@link EdmEntitySet})
+ * Write given <code>data</code> (which is given in form of a {@link List} with a {@link Map} for each entity. Such
+ * a {@link Map} contains all properties [as <code>property name</code> to <code>property value</code> mapping] for
+ * the entry) in the specified
+ * format (given as <code>contentType</code>) based on given <code>entity data model for an entity set</code> (given
+ * as {@link EdmEntitySet})
* and <code>properties</code> for this entity provider (given as {@link EntityProviderWriteProperties}).
*
* @param contentType format in which the feed should be written
* @param entitySet entity data model for given entity data set
* @param data set of entries in form of a {@link List} with a {@link Map} for each entity (such a {@link Map}
- * contains all properties [as <code>property name</code> to <code>property value</code> mapping).
- * @param properties additional properties necessary for writing of data
+ * contains all properties [as <code>property name</code> to <code>property value</code> mapping).
+ * @param properties additional properties necessary for writing of data
* @return resulting {@link ODataResponse} with written feed content.
* @throws EntityProviderException if writing of data (serialization) fails
*/
- ODataResponse writeFeed(String contentType, EdmEntitySet entitySet, List<Map<String, Object>> data, EntityProviderWriteProperties properties) throws EntityProviderException;
+ ODataResponse writeFeed(String contentType, EdmEntitySet entitySet, List<Map<String, Object>> data,
+ EntityProviderWriteProperties properties) throws EntityProviderException;
/**
- * Write given <code>data</code> (which is given in form of a {@link Map} for which contains all properties
+ * Write given <code>data</code> (which is given in form of a {@link Map} for which contains all properties
* as <code>property name</code> to <code>property value</code> mapping) for the entry in the specified
- * format (given as <code>contentType</code>) based on <code>entity data model for an entity set</code> (given as {@link EdmEntitySet})
+ * format (given as <code>contentType</code>) based on <code>entity data model for an entity set</code> (given as
+ * {@link EdmEntitySet})
* and <code>properties</code> for this entity provider (given as {@link EntityProviderWriteProperties}).
*
* @param contentType format in which the entry should be written
* @param entitySet entity data model for given entity data set
- * @param data which contains all properties as <code>property name</code> to <code>property value</code> mapping for the entry
- * @param properties additional properties necessary for writing of data
+ * @param data which contains all properties as <code>property name</code> to <code>property value</code> mapping
+ * for the entry
+ * @param properties additional properties necessary for writing of data
* @return resulting {@link ODataResponse} with written entry content
* @throws EntityProviderException if writing of data (serialization) fails
*/
- ODataResponse writeEntry(String contentType, EdmEntitySet entitySet, Map<String, Object> data, EntityProviderWriteProperties properties) throws EntityProviderException;
+ ODataResponse writeEntry(String contentType, EdmEntitySet entitySet, Map<String, Object> data,
+ EntityProviderWriteProperties properties) throws EntityProviderException;
/**
* Write given <code>value</code> (which is given in form of an {@link Object}) for the property in the specified
- * format (given as <code>contentType</code>) based on given <code>entity data model for an entity property</code>
+ * format (given as <code>contentType</code>) based on given <code>entity data model for an entity property</code>
* (given as {@link EdmProperty}).
*
* @param contentType format in which the property should be written
@@ -158,59 +165,71 @@ public final class EntityProvider {
* @return resulting {@link ODataResponse} with written property content.
* @throws EntityProviderException if writing of data (serialization) fails
*/
- ODataResponse writeProperty(String contentType, EdmProperty edmProperty, Object value) throws EntityProviderException;
+ ODataResponse writeProperty(String contentType, EdmProperty edmProperty, Object value)
+ throws EntityProviderException;
/**
- * Write <b>link</b> for key property based on <code>entity data model for an entity set</code> (given as {@link EdmEntitySet})
+ * Write <b>link</b> for key property based on <code>entity data model for an entity set</code> (given as
+ * {@link EdmEntitySet})
* in the specified format (given as <code>contentType</code>).
- * The necessary key property values must be provided within the <code>data</code> (in the form of <code>property name</code>
+ * The necessary key property values must be provided within the <code>data</code> (in the form of <code>property
+ * name</code>
* to <code>property value</code> mapping) and <code>properties</code> for this entity provider must be set
* (given as {@link EntityProviderWriteProperties}).
*
* @param contentType format in which the entry should be written
* @param entitySet entity data model for given entity data set
- * @param data which contains all key properties as <code>property name</code> to <code>property value</code> mapping for the entry
- * @param properties additional properties necessary for writing of data
+ * @param data which contains all key properties as <code>property name</code> to <code>property value</code>
+ * mapping for the entry
+ * @param properties additional properties necessary for writing of data
* @return resulting {@link ODataResponse} with written link content.
* @throws EntityProviderException if writing of data (serialization) fails
*/
- ODataResponse writeLink(String contentType, EdmEntitySet entitySet, Map<String, Object> data, EntityProviderWriteProperties properties) throws EntityProviderException;
+ ODataResponse writeLink(String contentType, EdmEntitySet entitySet, Map<String, Object> data,
+ EntityProviderWriteProperties properties) throws EntityProviderException;
/**
- * Write all <b>links</b> for key property based on <code>entity data model for an entity set</code> (given as {@link EdmEntitySet})
+ * Write all <b>links</b> for key property based on <code>entity data model for an entity set</code> (given as
+ * {@link EdmEntitySet})
* in the specified format (given as <code>contentType</code>) for a set of entries.
- * The necessary key property values must be provided within the <code>data</code> (in form of a {@link List} with a {@link Map}
- * for each entry. Such a {@link Map} contains all key properties [as <code>property name</code> to
- * <code>property value</code> mapping] for the entry) and <code>properties</code> for this entity provider must be set
+ * The necessary key property values must be provided within the <code>data</code> (in form of a {@link List} with a
+ * {@link Map} for each entry. Such a {@link Map} contains all key properties [as <code>property name</code> to
+ * <code>property value</code> mapping] for the entry) and <code>properties</code> for this entity provider must be
+ * set
* (given as {@link EntityProviderWriteProperties}).
*
* @param contentType format in which the entry should be written
* @param entitySet entity data model for given entity data set
* @param data set of entries in form of a {@link List} with a {@link Map} for each entry (such a {@link Map}
- * contains all key properties [as <code>property name</code> to <code>property value</code> mapping).
- * @param properties additional properties necessary for writing of data
+ * contains all key properties [as <code>property name</code> to <code>property value</code> mapping).
+ * @param properties additional properties necessary for writing of data
* @return resulting {@link ODataResponse} with written links content.
* @throws EntityProviderException if writing of data (serialization) fails
*/
- ODataResponse writeLinks(String contentType, EdmEntitySet entitySet, List<Map<String, Object>> data, EntityProviderWriteProperties properties) throws EntityProviderException;
+ ODataResponse writeLinks(String contentType, EdmEntitySet entitySet, List<Map<String, Object>> data,
+ EntityProviderWriteProperties properties) throws EntityProviderException;
/**
- * Write <code>data</code> result (given as {@link Object}) of function import based on <code>return type</code>
- * of {@link EdmFunctionImport} in specified format (given as <code>contentType</code>). Additional <code>properties</code>
+ * Write <code>data</code> result (given as {@link Object}) of function import based on <code>return type</code>
+ * of {@link EdmFunctionImport} in specified format (given as <code>contentType</code>). Additional
+ * <code>properties</code>
* for this entity provider must be set (given as {@link EntityProviderWriteProperties}).
*
* @param contentType format in which the entry should be written
* @param functionImport entity data model for executed function import
* @param data result of function import
- * @param properties additional properties necessary for writing of data
+ * @param properties additional properties necessary for writing of data
* @return resulting {@link ODataResponse} with written function import result content.
* @throws EntityProviderException if writing of data (serialization) fails
*/
- ODataResponse writeFunctionImport(String contentType, EdmFunctionImport functionImport, Object data, EntityProviderWriteProperties properties) throws EntityProviderException;
+ ODataResponse writeFunctionImport(String contentType, EdmFunctionImport functionImport, Object data,
+ EntityProviderWriteProperties properties) throws EntityProviderException;
/**
- * Read (de-serialize) a data feed from <code>content</code> (as {@link InputStream}) in specified format (given as <code>contentType</code>)
- * based on <code>entity data model</code> (given as {@link EdmEntitySet}) and provide this data as {@link ODataEntry}.
+ * Read (de-serialize) a data feed from <code>content</code> (as {@link InputStream}) in specified format (given as
+ * <code>contentType</code>)
+ * based on <code>entity data model</code> (given as {@link EdmEntitySet}) and provide this data as
+ * {@link ODataEntry}.
*
* @param contentType format of content in the given input stream.
* @param entitySet entity data model for entity set to be read
@@ -219,7 +238,8 @@ public final class EntityProvider {
* @return an {@link ODataFeed} object
* @throws EntityProviderException if reading of data (de-serialization) fails
*/
- ODataFeed readFeed(String contentType, EdmEntitySet entitySet, InputStream content, EntityProviderReadProperties properties) throws EntityProviderException;
+ ODataFeed readFeed(String contentType, EdmEntitySet entitySet, InputStream content,
+ EntityProviderReadProperties properties) throws EntityProviderException;
/**
* Reads (de-serializes) data from <code>content</code> (as {@link InputStream})
@@ -229,19 +249,22 @@ public final class EntityProvider {
* Does not return complete entry data but only data present in the
* de-serialized content.
* @param contentType format of content in the given input stream
- * @param entitySet entity data model for entity set to be read
- * @param content data in form of an {@link InputStream} which
- * contains the data in specified format
- * @param properties additional properties necessary for reading
- * content from {@link InputStream} into {@link Map}.
+ * @param entitySet entity data model for entity set to be read
+ * @param content data in form of an {@link InputStream} which
+ * contains the data in specified format
+ * @param properties additional properties necessary for reading
+ * content from {@link InputStream} into {@link Map}.
* @return entry as {@link ODataEntry}
* @throws EntityProviderException if reading of data (de-serialization) fails
*/
- ODataEntry readEntry(String contentType, EdmEntitySet entitySet, InputStream content, EntityProviderReadProperties properties) throws EntityProviderException;
+ ODataEntry readEntry(String contentType, EdmEntitySet entitySet, InputStream content,
+ EntityProviderReadProperties properties) throws EntityProviderException;
/**
- * Read (de-serialize) properties from <code>content</code> (as {@link InputStream}) in specified format (given as <code>contentType</code>)
- * based on <code>entity data model</code> (given as {@link EdmProperty}) and provide this data as {@link Map} which contains
+ * Read (de-serialize) properties from <code>content</code> (as {@link InputStream}) in specified format (given as
+ * <code>contentType</code>)
+ * based on <code>entity data model</code> (given as {@link EdmProperty}) and provide this data as {@link Map} which
+ * contains
* the read data in form of <code>property name</code> to <code>property value</code> mapping.
*
* @param contentType format of content in the given input stream.
@@ -251,25 +274,30 @@ public final class EntityProvider {
* @return property as name and value in a map
* @throws EntityProviderException if reading of data (de-serialization) fails
*/
- Map<String, Object> readProperty(String contentType, EdmProperty edmProperty, InputStream content, EntityProviderReadProperties properties) throws EntityProviderException;
+ Map<String, Object> readProperty(String contentType, EdmProperty edmProperty, InputStream content,
+ EntityProviderReadProperties properties) throws EntityProviderException;
/**
- * Read (de-serialize) a property value from <code>content</code> (as {@link InputStream}) in format <code>text/plain</code>
+ * Read (de-serialize) a property value from <code>content</code> (as {@link InputStream}) in format
+ * <code>text/plain</code>
* based on <code>entity data model</code> (given as {@link EdmProperty}) and provide this data as {@link Object}.
*
* @param edmProperty entity data model for entity property to be read
* @param content data in form of an {@link InputStream} which contains the data in format <code>text/plain</code>
- * @param typeMapping defines the mapping for this <code>edm property</code> to a <code>java class</code> which should be used
- * during read of the content. If according <code>edm property</code> can not be read
- * into given <code>java class</code> an {@link EntityProviderException} is thrown.
- * Supported mappings are documented in {@link org.apache.olingo.odata2.api.edm.EdmSimpleType}.
+ * @param typeMapping defines the mapping for this <code>edm property</code> to a <code>java class</code> which
+ * should be used
+ * during read of the content. If according <code>edm property</code> can not be read
+ * into given <code>java class</code> an {@link EntityProviderException} is thrown.
+ * Supported mappings are documented in {@link org.apache.olingo.odata2.api.edm.EdmSimpleType}.
* @return property value as object
* @throws EntityProviderException if reading of data (de-serialization) fails
*/
- Object readPropertyValue(EdmProperty edmProperty, InputStream content, Class<?> typeMapping) throws EntityProviderException;
+ Object readPropertyValue(EdmProperty edmProperty, InputStream content, Class<?> typeMapping)
+ throws EntityProviderException;
/**
- * Read (de-serialize) a link from <code>content</code> (as {@link InputStream}) in specified format (given as <code>contentType</code>)
+ * Read (de-serialize) a link from <code>content</code> (as {@link InputStream}) in specified format (given as
+ * <code>contentType</code>)
* based on <code>entity data model</code> (given as {@link EdmEntitySet}) and provide the link as {@link String}.
*
* @param contentType format of content in the given input stream.
@@ -284,27 +312,30 @@ public final class EntityProvider {
* Read (de-serialize) all links from <code>content</code> (as {@link InputStream})
* in specified format (given as <code>contentType</code>) based on <code>entity data model</code>
* (given as {@link EdmEntitySet}) and provide the link as List of Strings.
- *
+ *
* @param contentType format of content in the given input stream.
* @param entitySet entity data model for entity property to be read
* @param content data in form of an {@link InputStream} which contains the data in specified format
* @return links as List of Strings
* @throws EntityProviderException if reading of data (de-serialization) fails
*/
- List<String> readLinks(String contentType, EdmEntitySet entitySet, InputStream content) throws EntityProviderException;
+ List<String> readLinks(String contentType, EdmEntitySet entitySet, InputStream content)
+ throws EntityProviderException;
/**
- * Read (de-serialize) data from metadata <code>inputStream</code> (as {@link InputStream}) and provide Edm as {@link Edm}
+ * Read (de-serialize) data from metadata <code>inputStream</code> (as {@link InputStream}) and provide Edm as
+ * {@link Edm}
*
* @param inputStream the given input stream
- * @param validate has to be true if metadata should be validated
+ * @param validate has to be true if metadata should be validated
* @return Edm as {@link Edm}
* @throws EntityProviderException if reading of data (de-serialization) fails
*/
Edm readMetadata(InputStream inputStream, boolean validate) throws EntityProviderException;
/**
- * Read (de-serialize) binary data from <code>content</code> (as {@link InputStream}) and provide it as <code>byte[]</code>.
+ * Read (de-serialize) binary data from <code>content</code> (as {@link InputStream}) and provide it as
+ * <code>byte[]</code>.
*
* @param content data in form of an {@link InputStream} which contains the binary data
* @return binary data as bytes
@@ -314,31 +345,34 @@ public final class EntityProvider {
/**
* <p>Serializes an error message according to the OData standard.</p>
- * @param context contains error details see {@link ODataErrorContext}
- * @return an {@link ODataResponse} containing the serialized error message
+ * @param context contains error details see {@link ODataErrorContext}
+ * @return an {@link ODataResponse} containing the serialized error message
*/
ODataResponse writeErrorDocument(ODataErrorContext context);
/**
- * Read (de-serialize) data from service document <code>inputStream</code> (as {@link InputStream}) and provide ServiceDocument as {@link ServiceDocument}
+ * Read (de-serialize) data from service document <code>inputStream</code> (as {@link InputStream}) and provide
+ * ServiceDocument as {@link ServiceDocument}
*
* @param serviceDocument the given input stream
* @param contentType format of content in the given input stream
* @return ServiceDocument as {@link ServiceDocument}
- * @throws EntityProviderException if reading of data (de-serialization) fails
+ * @throws EntityProviderException if reading of data (de-serialization) fails
*/
ServiceDocument readServiceDocument(InputStream serviceDocument, String contentType) throws EntityProviderException;
/**
- * Parse Batch Request body <code>inputStream</code> (as {@link InputStream}) and provide a list of Batch Parts as {@link BatchPart}
+ * Parse Batch Request body <code>inputStream</code> (as {@link InputStream}) and provide a list of Batch Parts as
+ * {@link BatchPart}
*
* @param contentType format of content in the given input stream
* @param content request body
* @param properties additional properties necessary for parsing. Must not be null.
* @return list of {@link BatchPart}
- * @throws BatchException if parsing fails
+ * @throws BatchException if parsing fails
*/
- List<BatchRequestPart> parseBatchRequest(String contentType, InputStream content, EntityProviderBatchProperties properties) throws BatchException;
+ List<BatchRequestPart> parseBatchRequest(String contentType, InputStream content,
+ EntityProviderBatchProperties properties) throws BatchException;
/**
* Write responses of Batch Response Parts in Batch Response as {@link ODataResponse}.
@@ -346,7 +380,7 @@ public final class EntityProvider {
*
* @param batchResponseParts a list of {@link BatchResponsePart}
* @return Batch Response as {@link ODataResponse}
- * @throws BatchException
+ * @throws BatchException
*/
ODataResponse writeBatchResponse(List<BatchResponsePart> batchResponseParts) throws BatchException;
@@ -354,18 +388,19 @@ public final class EntityProvider {
* Create Batch Request body as InputStream.
*
* @param batchParts a list of BatchPartRequests {@link BatchPart}
- * @param boundary
+ * @param boundary
* @return Batch Request as InputStream
*/
InputStream writeBatchRequest(List<BatchPart> batchParts, String boundary);
- /**
- * Parse Batch Response body (as {@link InputStream}) and provide a list of single responses as {@link BatchSingleResponse}
- *
+ /**
+ * Parse Batch Response body (as {@link InputStream}) and provide a list of single responses as
+ * {@link BatchSingleResponse}
+ *
* @param content response body
* @param contentType format of content in the given input stream (incl. boundary parameter)
* @return list of {@link BatchSingleResponse}
- * @throws BatchException
+ * @throws BatchException
*/
List<BatchSingleResponse> parseBatchResponse(String contentType, InputStream content) throws BatchException;
@@ -383,16 +418,16 @@ public final class EntityProvider {
/**
* <p>Serializes an error message according to the OData standard.</p>
* An exception is not thrown because this method is used in exception handling.</p>
- * @param context contains error details see {@link ODataErrorContext}
- * @return an {@link ODataResponse} containing the serialized error message
+ * @param context contains error details see {@link ODataErrorContext}
+ * @return an {@link ODataResponse} containing the serialized error message
*/
public static ODataResponse writeErrorDocument(final ODataErrorContext context) {
return createEntityProvider().writeErrorDocument(context);
}
/**
- * Write metadata document in XML format for the given schemas and the provided predefined
- * namespaces at the EDMX element. PredefinedNamespaces is of type
+ * Write metadata document in XML format for the given schemas and the provided predefined
+ * namespaces at the EDMX element. PredefinedNamespaces is of type
* Map{@literal <}prefix,namespace{@literal >} and may be null or an empty Map.
*
* @param schemas all XML schemas which will be written
@@ -400,7 +435,8 @@ public final class EntityProvider {
* @return resulting {@link ODataResponse} with written metadata content.
* @throws EntityProviderException if writing of data (serialization) fails
*/
- public static ODataResponse writeMetadata(final List<Schema> schemas, final Map<String, String> predefinedNamespaces) throws EntityProviderException {
+ public static ODataResponse writeMetadata(final List<Schema> schemas, final Map<String, String> predefinedNamespaces)
+ throws EntityProviderException {
return createEntityProvider().writeMetadata(schemas, predefinedNamespaces);
}
@@ -414,7 +450,8 @@ public final class EntityProvider {
* @return resulting {@link ODataResponse} with written service document content.
* @throws EntityProviderException if writing of data (serialization) fails
*/
- public static ODataResponse writeServiceDocument(final String contentType, final Edm edm, final String serviceRoot) throws EntityProviderException {
+ public static ODataResponse writeServiceDocument(final String contentType, final Edm edm, final String serviceRoot)
+ throws EntityProviderException {
return createEntityProvider().writeServiceDocument(contentType, edm, serviceRoot);
}
@@ -426,7 +463,8 @@ public final class EntityProvider {
* @return resulting {@link ODataResponse} with written property value content.
* @throws EntityProviderException if writing of data (serialization) fails
*/
- public static ODataResponse writePropertyValue(final EdmProperty edmProperty, final Object value) throws EntityProviderException {
+ public static ODataResponse writePropertyValue(final EdmProperty edmProperty, final Object value)
+ throws EntityProviderException {
return createEntityProvider().writePropertyValue(edmProperty, value);
}
@@ -454,43 +492,50 @@ public final class EntityProvider {
}
/**
- * Write given <code>data</code> (which is given in form of a {@link List} with a {@link Map} for each entity. Such a {@link Map}
- * contains all properties [as <code>property name</code> to <code>property value</code> mapping] for the entry) in the specified
- * format (given as <code>contentType</code>) based on given <code>entity data model for an entity set</code> (given as {@link EdmEntitySet})
+ * Write given <code>data</code> (which is given in form of a {@link List} with a {@link Map} for each entity. Such a
+ * {@link Map} contains all properties [as <code>property name</code> to <code>property value</code> mapping] for the
+ * entry) in the specified
+ * format (given as <code>contentType</code>) based on given <code>entity data model for an entity set</code> (given
+ * as {@link EdmEntitySet})
* and <code>properties</code> for this entity provider (given as {@link EntityProviderWriteProperties}).
*
* @param contentType format in which the feed should be written
* @param entitySet entity data model for given entity data set
* @param data set of entries in form of a {@link List} with a {@link Map} for each entity (such a {@link Map}
- * contains all properties [as <code>property name</code> to <code>property value</code> mapping).
- * @param properties additional properties necessary for writing of data
+ * contains all properties [as <code>property name</code> to <code>property value</code> mapping).
+ * @param properties additional properties necessary for writing of data
* @return resulting {@link ODataResponse} with written feed content.
* @throws EntityProviderException if writing of data (serialization) fails
*/
- public static ODataResponse writeFeed(final String contentType, final EdmEntitySet entitySet, final List<Map<String, Object>> data, final EntityProviderWriteProperties properties) throws EntityProviderException {
+ public static ODataResponse writeFeed(final String contentType, final EdmEntitySet entitySet,
+ final List<Map<String, Object>> data, final EntityProviderWriteProperties properties)
+ throws EntityProviderException {
return createEntityProvider().writeFeed(contentType, entitySet, data, properties);
}
/**
- * Write given <code>data</code> (which is given in form of a {@link Map} for which contains all properties
+ * Write given <code>data</code> (which is given in form of a {@link Map} for which contains all properties
* as <code>property name</code> to <code>property value</code> mapping) for the entry in the specified
- * format (given as <code>contentType</code>) based on <code>entity data model for an entity set</code> (given as {@link EdmEntitySet})
+ * format (given as <code>contentType</code>) based on <code>entity data model for an entity set</code> (given as
+ * {@link EdmEntitySet})
* and <code>properties</code> for this entity provider (given as {@link EntityProviderWriteProperties}).
*
* @param contentType format in which the entry should be written
* @param entitySet entity data model for given entity data set
- * @param data which contains all properties as <code>property name</code> to <code>property value</code> mapping for the entry
- * @param properties additional properties necessary for writing of data
+ * @param data which contains all properties as <code>property name</code> to <code>property value</code> mapping for
+ * the entry
+ * @param properties additional properties necessary for writing of data
* @return resulting {@link ODataResponse} with written entry content
* @throws EntityProviderException if writing of data (serialization) fails
*/
- public static ODataResponse writeEntry(final String contentType, final EdmEntitySet entitySet, final Map<String, Object> data, final EntityProviderWriteProperties properties) throws EntityProviderException {
+ public static ODataResponse writeEntry(final String contentType, final EdmEntitySet entitySet,
+ final Map<String, Object> data, final EntityProviderWriteProperties properties) throws EntityProviderException {
return createEntityProvider().writeEntry(contentType, entitySet, data, properties);
}
/**
* Write given <code>value</code> (which is given in form of an {@link Object}) for the property in the specified
- * format (given as <code>contentType</code>) based on given <code>entity data model for an entity property</code>
+ * format (given as <code>contentType</code>) based on given <code>entity data model for an entity property</code>
* (given as {@link EdmProperty}).
*
* @param contentType format in which the property should be written
@@ -499,112 +544,137 @@ public final class EntityProvider {
* @return resulting {@link ODataResponse} with written property content.
* @throws EntityProviderException if writing of data (serialization) fails
*/
- public static ODataResponse writeProperty(final String contentType, final EdmProperty edmProperty, final Object value) throws EntityProviderException {
+ public static ODataResponse
+ writeProperty(final String contentType, final EdmProperty edmProperty, final Object value)
+ throws EntityProviderException {
return createEntityProvider().writeProperty(contentType, edmProperty, value);
}
/**
- * Write <b>link</b> for key property based on <code>entity data model for an entity set</code> (given as {@link EdmEntitySet})
+ * Write <b>link</b> for key property based on <code>entity data model for an entity set</code> (given as
+ * {@link EdmEntitySet})
* in the specified format (given as <code>contentType</code>).
- * The necessary key property values must be provided within the <code>data</code> (in the form of <code>property name</code>
+ * The necessary key property values must be provided within the <code>data</code> (in the form of <code>property
+ * name</code>
* to <code>property value</code> mapping) and <code>properties</code> for this entity provider must be set
* (given as {@link EntityProviderWriteProperties}).
*
* @param contentType format in which the entry should be written
* @param entitySet entity data model for given entity data set
- * @param data which contains all key properties as <code>property name</code> to <code>property value</code> mapping for the entry
- * @param properties additional properties necessary for writing of data
+ * @param data which contains all key properties as <code>property name</code> to <code>property value</code> mapping
+ * for the entry
+ * @param properties additional properties necessary for writing of data
* @return resulting {@link ODataResponse} with written link content.
* @throws EntityProviderException if writing of data (serialization) fails
*/
- public static ODataResponse writeLink(final String contentType, final EdmEntitySet entitySet, final Map<String, Object> data, final EntityProviderWriteProperties properties) throws EntityProviderException {
+ public static ODataResponse writeLink(final String contentType, final EdmEntitySet entitySet,
+ final Map<String, Object> data, final EntityProviderWriteProperties properties) throws EntityProviderException {
return createEntityProvider().writeLink(contentType, entitySet, data, properties);
}
/**
- * Write all <b>links</b> for key property based on <code>entity data model for an entity set</code> (given as {@link EdmEntitySet})
+ * Write all <b>links</b> for key property based on <code>entity data model for an entity set</code> (given as
+ * {@link EdmEntitySet})
* in the specified format (given as <code>contentType</code>) for a set of entries.
- * The necessary key property values must be provided within the <code>data</code> (in form of a {@link List} with a {@link Map}
- * for each entry. Such a {@link Map} contains all key properties [as <code>property name</code> to
- * <code>property value</code> mapping] for the entry) and <code>properties</code> for this entity provider must be set
+ * The necessary key property values must be provided within the <code>data</code> (in form of a {@link List} with a
+ * {@link Map} for each entry. Such a {@link Map} contains all key properties [as <code>property name</code> to
+ * <code>property value</code> mapping] for the entry) and <code>properties</code> for this entity provider must be
+ * set
* (given as {@link EntityProviderWriteProperties}).
*
* @param contentType format in which the entry should be written
* @param entitySet entity data model for given entity data set
- * @param data set of entries in form of a {@link List} with a {@link Map} for each entry (such a {@link Map}
- * contains all key properties [as <code>property name</code> to <code>property value</code> mapping).
- * @param properties additional properties necessary for writing of data
+ * @param data set of entries in form of a {@link List} with a {@link Map} for each entry (such a {@link Map} contains
+ * all key properties [as <code>property name</code> to <code>property value</code> mapping).
+ * @param properties additional properties necessary for writing of data
* @return resulting {@link ODataResponse} with written links content.
* @throws EntityProviderException if writing of data (serialization) fails
*/
- public static ODataResponse writeLinks(final String contentType, final EdmEntitySet entitySet, final List<Map<String, Object>> data, final EntityProviderWriteProperties properties) throws EntityProviderException {
+ public static ODataResponse writeLinks(final String contentType, final EdmEntitySet entitySet,
+ final List<Map<String, Object>> data, final EntityProviderWriteProperties properties)
+ throws EntityProviderException {
return createEntityProvider().writeLinks(contentType, entitySet, data, properties);
}
/**
- * Write <code>data</code> result (given as {@link Object}) of function import based on <code>return type</code>
- * of {@link EdmFunctionImport} in specified format (given as <code>contentType</code>). Additional <code>properties</code>
+ * Write <code>data</code> result (given as {@link Object}) of function import based on <code>return type</code>
+ * of {@link EdmFunctionImport} in specified format (given as <code>contentType</code>). Additional
+ * <code>properties</code>
* for this entity provider must be set (given as {@link EntityProviderWriteProperties}).
*
* @param contentType format in which the entry should be written
* @param functionImport entity data model for executed function import
* @param data result of function import
- * @param properties additional properties necessary for writing of data
+ * @param properties additional properties necessary for writing of data
* @return resulting {@link ODataResponse} with written function import result content.
* @throws EntityProviderException if writing of data (serialization) fails
*/
- public static ODataResponse writeFunctionImport(final String contentType, final EdmFunctionImport functionImport, final Object data, final EntityProviderWriteProperties properties) throws EntityProviderException {
+ public static ODataResponse writeFunctionImport(final String contentType, final EdmFunctionImport functionImport,
+ final Object data, final EntityProviderWriteProperties properties) throws EntityProviderException {
return createEntityProvider().writeFunctionImport(contentType, functionImport, data, properties);
}
/**
- * Read (de-serialize) a data feed from <code>content</code> (as {@link InputStream}) in specified format (given as <code>contentType</code>)
- * based on <code>entity data model</code> (given as {@link EdmEntitySet}) and provide this data as {@link ODataEntry}.
+ * Read (de-serialize) a data feed from <code>content</code> (as {@link InputStream}) in specified format (given as
+ * <code>contentType</code>)
+ * based on <code>entity data model</code> (given as {@link EdmEntitySet}) and provide this data as {@link ODataEntry}
+ * .
*
* @param contentType format of content in the given input stream.
* @param entitySet entity data model for entity set to be read
* @param content feed data in form of an {@link InputStream} which contains the data in specified format
- * @param properties additional properties necessary for reading content from {@link InputStream} into {@link Map}. Must not be null.
+ * @param properties additional properties necessary for reading content from {@link InputStream} into {@link Map}.
+ * Must not be null.
* @return an {@link ODataFeed} object
* @throws EntityProviderException if reading of data (de-serialization) fails
*/
- public static ODataFeed readFeed(final String contentType, final EdmEntitySet entitySet, final InputStream content, final EntityProviderReadProperties properties) throws EntityProviderException {
+ public static ODataFeed readFeed(final String contentType, final EdmEntitySet entitySet, final InputStream content,
+ final EntityProviderReadProperties properties) throws EntityProviderException {
return createEntityProvider().readFeed(contentType, entitySet, content, properties);
}
/**
- * Read (de-serialize) data from <code>content</code> (as {@link InputStream}) in specified format (given as <code>contentType</code>)
- * based on <code>entity data model</code> (given as {@link EdmEntitySet}) and provide this data as {@link ODataEntry}.
+ * Read (de-serialize) data from <code>content</code> (as {@link InputStream}) in specified format (given as
+ * <code>contentType</code>)
+ * based on <code>entity data model</code> (given as {@link EdmEntitySet}) and provide this data as {@link ODataEntry}
+ * .
*
* @param contentType format of content in the given input stream.
* @param entitySet entity data model for entity set to be read
* @param content data in form of an {@link InputStream} which contains the data in specified format
- * @param properties additional properties necessary for reading content from {@link InputStream} into {@link Map}. Must not be null.
+ * @param properties additional properties necessary for reading content from {@link InputStream} into {@link Map}.
+ * Must not be null.
* @return entry as {@link ODataEntry}
* @throws EntityProviderException if reading of data (de-serialization) fails
*/
- public static ODataEntry readEntry(final String contentType, final EdmEntitySet entitySet, final InputStream content, final EntityProviderReadProperties properties) throws EntityProviderException {
+ public static ODataEntry readEntry(final String contentType, final EdmEntitySet entitySet, final InputStream content,
+ final EntityProviderReadProperties properties) throws EntityProviderException {
return createEntityProvider().readEntry(contentType, entitySet, content, properties);
}
/**
- * Read (de-serialize) properties from <code>content</code> (as {@link InputStream}) in specified format (given as <code>contentType</code>)
- * based on <code>entity data model</code> (given as {@link EdmProperty}) and provide this data as {@link Map} which contains
+ * Read (de-serialize) properties from <code>content</code> (as {@link InputStream}) in specified format (given as
+ * <code>contentType</code>)
+ * based on <code>entity data model</code> (given as {@link EdmProperty}) and provide this data as {@link Map} which
+ * contains
* the read data in form of <code>property name</code> to <code>property value</code> mapping.
*
* @param contentType format of content in the given input stream.
* @param edmProperty entity data model for entity property to be read
* @param content data in form of an {@link InputStream} which contains the data in specified format
- * @param properties additional properties necessary for reading content from {@link InputStream} into {@link Map}. Must not be null.
+ * @param properties additional properties necessary for reading content from {@link InputStream} into {@link Map}.
+ * Must not be null.
* @return property as name and value in a map
* @throws EntityProviderException if reading of data (de-serialization) fails
*/
- public static Map<String, Object> readProperty(final String contentType, final EdmProperty edmProperty, final InputStream content, final EntityProviderReadProperties properties) throws EntityProviderException {
+ public static Map<String, Object> readProperty(final String contentType, final EdmProperty edmProperty,
+ final InputStream content, final EntityProviderReadProperties properties) throws EntityProviderException {
return createEntityProvider().readProperty(contentType, edmProperty, content, properties);
}
/**
- * Read (de-serialize) a property value from <code>content</code> (as {@link InputStream}) in format <code>text/plain</code>
+ * Read (de-serialize) a property value from <code>content</code> (as {@link InputStream}) in format
+ * <code>text/plain</code>
* based on <code>entity data model</code> (given as {@link EdmProperty}) and provide this data as {@link Object}.
*
* @param edmProperty entity data model for entity property to be read
@@ -612,29 +682,34 @@ public final class EntityProvider {
* @return property value as object
* @throws EntityProviderException if reading of data (de-serialization) fails
*/
- public static Object readPropertyValue(final EdmProperty edmProperty, final InputStream content) throws EntityProviderException {
+ public static Object readPropertyValue(final EdmProperty edmProperty, final InputStream content)
+ throws EntityProviderException {
return createEntityProvider().readPropertyValue(edmProperty, content, null);
}
/**
- * Read (de-serialize) a property value from <code>content</code> (as {@link InputStream}) in format <code>text/plain</code>
+ * Read (de-serialize) a property value from <code>content</code> (as {@link InputStream}) in format
+ * <code>text/plain</code>
* based on <code>entity data model</code> (given as {@link EdmProperty}) and provide this data as {@link Object}.
*
* @param edmProperty entity data model for entity property to be read
* @param content data in form of an {@link InputStream} which contains the data in format <code>text/plain</code>
- * @param typeMapping defines the mapping for this <code>edm property</code> to a <code>java class</code> which should be used
- * during read of the content. If according <code>edm property</code> can not be read
- * into given <code>java class</code> an {@link EntityProviderException} is thrown.
- * Supported mappings are documented in {@link org.apache.olingo.odata2.api.edm.EdmSimpleType}.
+ * @param typeMapping defines the mapping for this <code>edm property</code> to a <code>java class</code> which should
+ * be used
+ * during read of the content. If according <code>edm property</code> can not be read
+ * into given <code>java class</code> an {@link EntityProviderException} is thrown.
+ * Supported mappings are documented in {@link org.apache.olingo.odata2.api.edm.EdmSimpleType}.
* @return property value as object
* @throws EntityProviderException if reading of data (de-serialization) fails
*/
- public static Object readPropertyValue(final EdmProperty edmProperty, final InputStream content, final Class<?> typeMapping) throws EntityProviderException {
+ public static Object readPropertyValue(final EdmProperty edmProperty, final InputStream content,
+ final Class<?> typeMapping) throws EntityProviderException {
return createEntityProvider().readPropertyValue(edmProperty, content, typeMapping);
}
/**
- * Read (de-serialize) a link from <code>content</code> (as {@link InputStream}) in specified format (given as <code>contentType</code>)
+ * Read (de-serialize) a link from <code>content</code> (as {@link InputStream}) in specified format (given as
+ * <code>contentType</code>)
* based on <code>entity data model</code> (given as {@link EdmEntitySet}) and provide the link as {@link String}.
*
* @param contentType format of content in the given input stream.
@@ -643,7 +718,8 @@ public final class EntityProvider {
* @return link as string
* @throws EntityProviderException if reading of data (de-serialization) fails
*/
- public static String readLink(final String contentType, final EdmEntitySet entitySet, final InputStream content) throws EntityProviderException {
+ public static String readLink(final String contentType, final EdmEntitySet entitySet, final InputStream content)
+ throws EntityProviderException {
return createEntityProvider().readLink(contentType, entitySet, content);
}
@@ -651,19 +727,21 @@ public final class EntityProvider {
* Read (de-serialize) a link collection from <code>content</code> (as {@link InputStream})
* in specified format (given as <code>contentType</code>) based on <code>entity data model</code>
* (given as {@link EdmEntitySet}) and provide the links as List of Strings.
- *
+ *
* @param contentType format of content in the given input stream.
* @param entitySet entity data model for entity property to be read
* @param content data in form of an {@link InputStream} which contains the data in specified format
* @return links as List of Strings
* @throws EntityProviderException if reading of data (de-serialization) fails
*/
- public static List<String> readLinks(final String contentType, final EdmEntitySet entitySet, final InputStream content) throws EntityProviderException {
+ public static List<String> readLinks(final String contentType, final EdmEntitySet entitySet,
+ final InputStream content) throws EntityProviderException {
return createEntityProvider().readLinks(contentType, entitySet, content);
}
/**
- * Read (de-serialize) binary data from <code>content</code> (as {@link InputStream}) and provide it as <code>byte[]</code>.
+ * Read (de-serialize) binary data from <code>content</code> (as {@link InputStream}) and provide it as
+ * <code>byte[]</code>.
*
* @param content data in form of an {@link InputStream} which contains the binary data
* @return binary data as bytes
@@ -674,10 +752,11 @@ public final class EntityProvider {
}
/**
- * Read (de-serialize) data from metadata <code>inputStream</code> (as {@link InputStream}) and provide Edm as {@link Edm}
+ * Read (de-serialize) data from metadata <code>inputStream</code> (as {@link InputStream}) and provide Edm as
+ * {@link Edm}
*
* @param metadataXml a metadata xml input stream (means the metadata document)
- * @param validate has to be true if metadata should be validated
+ * @param validate has to be true if metadata should be validated
* @return Edm as {@link Edm}
* @throws EntityProviderException if reading of data (de-serialization) fails
*/
@@ -686,19 +765,22 @@ public final class EntityProvider {
}
/**
- * Read (de-serialize) data from service document <code>inputStream</code> (as {@link InputStream}) and provide ServiceDocument as {@link ServiceDocument}
+ * Read (de-serialize) data from service document <code>inputStream</code> (as {@link InputStream}) and provide
+ * ServiceDocument as {@link ServiceDocument}
*
* @param serviceDocument the given input stream
* @param contentType format of content in the given input stream
* @return ServiceDocument as {@link ServiceDocument}
- * @throws EntityProviderException if reading of data (de-serialization) fails
+ * @throws EntityProviderException if reading of data (de-serialization) fails
*/
- public static ServiceDocument readServiceDocument(final InputStream serviceDocument, final String contentType) throws EntityProviderException {
+ public static ServiceDocument readServiceDocument(final InputStream serviceDocument, final String contentType)
+ throws EntityProviderException {
return createEntityProvider().readServiceDocument(serviceDocument, contentType);
}
/**
- * Parse Batch Request body <code>inputStream</code> (as {@link InputStream}) and provide a list of Batch Request parts as {@link BatchRequestPart}
+ * Parse Batch Request body <code>inputStream</code> (as {@link InputStream}) and provide a list of Batch Request
+ * parts as {@link BatchRequestPart}
*
* @param contentType format of content in the given input stream
* @param content request body
@@ -706,7 +788,8 @@ public final class EntityProvider {
* @return list of {@link BatchRequestPart}
* @throws BatchException if parsing fails
*/
- public static List<BatchRequestPart> parseBatchRequest(final String contentType, final InputStream content, final EntityProviderBatchProperties properties) throws BatchException {
+ public static List<BatchRequestPart> parseBatchRequest(final String contentType, final InputStream content,
+ final EntityProviderBatchProperties properties) throws BatchException {
return createEntityProvider().parseBatchRequest(contentType, content, properties);
}
@@ -716,9 +799,10 @@ public final class EntityProvider {
*
* @param batchResponseParts a list of {@link BatchResponsePart}
* @return Batch Response as {@link ODataResponse}
- * @throws BatchException
+ * @throws BatchException
*/
- public static ODataResponse writeBatchResponse(final List<BatchResponsePart> batchResponseParts) throws BatchException {
+ public static ODataResponse writeBatchResponse(final List<BatchResponsePart> batchResponseParts)
+ throws BatchException {
return createEntityProvider().writeBatchResponse(batchResponseParts);
}
@@ -726,22 +810,24 @@ public final class EntityProvider {
* Create Batch Request body as InputStream.
*
* @param batchParts a list of BatchPartRequests {@link BatchPart}
- * @param boundary
+ * @param boundary
* @return Batch Request as InputStream
*/
public static InputStream writeBatchRequest(final List<BatchPart> batchParts, final String boundary) {
return createEntityProvider().writeBatchRequest(batchParts, boundary);
}
- /**
- * Parse Batch Response body (as {@link InputStream}) and provide a list of single responses as {@link BatchSingleResponse}
- *
+ /**
+ * Parse Batch Response body (as {@link InputStream}) and provide a list of single responses as
+ * {@link BatchSingleResponse}
+ *
* @param content response body
* @param contentType format of content in the given input stream (inclusive boundary parameter)
* @return list of {@link BatchSingleResponse}
- * @throws BatchException
+ * @throws BatchException
*/
- public static List<BatchSingleResponse> parseBatchResponse(final InputStream content, final String contentType) throws BatchException {
+ public static List<BatchSingleResponse> parseBatchResponse(final InputStream content, final String contentType)
+ throws BatchException {
return createEntityProvider().parseBatchResponse(contentType, content);
}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata2/blob/cf4caabf/odata-api/src/main/java/org/apache/olingo/odata2/api/ep/EntityProviderBatchProperties.java
----------------------------------------------------------------------
diff --git a/odata-api/src/main/java/org/apache/olingo/odata2/api/ep/EntityProviderBatchProperties.java b/odata-api/src/main/java/org/apache/olingo/odata2/api/ep/EntityProviderBatchProperties.java
index 46d5362..0cb47ec 100644
--- a/odata-api/src/main/java/org/apache/olingo/odata2/api/ep/EntityProviderBatchProperties.java
+++ b/odata-api/src/main/java/org/apache/olingo/odata2/api/ep/EntityProviderBatchProperties.java
@@ -1,18 +1,18 @@
/*******************************************************************************
* Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
+ * or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
+ * 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
+ * with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * 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
+ * KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
******************************************************************************/
@@ -23,7 +23,7 @@ import org.apache.olingo.odata2.api.uri.PathInfo;
/**
* The {@link EntityProviderBatchProperties} contains necessary informations to parse a Batch Request body.
*
- *
+ *
*/
public class EntityProviderBatchProperties {
/**
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata2/blob/cf4caabf/odata-api/src/main/java/org/apache/olingo/odata2/api/ep/EntityProviderException.java
----------------------------------------------------------------------
diff --git a/odata-api/src/main/java/org/apache/olingo/odata2/api/ep/EntityProviderException.java b/odata-api/src/main/java/org/apache/olingo/odata2/api/ep/EntityProviderException.java
index 8b4b498..a2ddc91 100644
--- a/odata-api/src/main/java/org/apache/olingo/odata2/api/ep/EntityProviderException.java
+++ b/odata-api/src/main/java/org/apache/olingo/odata2/api/ep/EntityProviderException.java
@@ -1,18 +1,18 @@
/*******************************************************************************
* Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
+ * or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
+ * 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
+ * with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * 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
+ * KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
******************************************************************************/
@@ -23,7 +23,7 @@ import org.apache.olingo.odata2.api.exception.ODataMessageException;
/**
* An {@link EntityProviderException} is the base exception for all <code>EntityProvider</code> related exceptions.
- * It extends the {@link ODataMessageException} and provides several {@link MessageReference} for specification of
+ * It extends the {@link ODataMessageException} and provides several {@link MessageReference} for specification of
* the thrown exception.
*/
public class EntityProviderException extends ODataMessageException {
@@ -33,48 +33,71 @@ public class EntityProviderException extends ODataMessageException {
/** INVALID_STATE requires no content value */
public static final MessageReference COMMON = createMessageReference(EntityProviderException.class, "COMMON");
/** EXCEPTION_OCCURRED requires 1 content value ('exception name') */
- public static final MessageReference EXCEPTION_OCCURRED = createMessageReference(EntityProviderException.class, "EXCEPTION_OCCURRED");
+ public static final MessageReference EXCEPTION_OCCURRED = createMessageReference(EntityProviderException.class,
+ "EXCEPTION_OCCURRED");
/** INVALIDMAPPING requires 1 content value ('propertyName') */
- public static final MessageReference INVALID_MAPPING = createMessageReference(EntityProviderException.class, "INVALID_MAPPING");
+ public static final MessageReference INVALID_MAPPING = createMessageReference(EntityProviderException.class,
+ "INVALID_MAPPING");
/** INVALID_ENTITYTYPE requires 2 content values ('supplied entity type' and 'content entity type') */
- public static final MessageReference INVALID_ENTITYTYPE = createMessageReference(EntityProviderException.class, "INVALID_ENTITYTYPE");
+ public static final MessageReference INVALID_ENTITYTYPE = createMessageReference(EntityProviderException.class,
+ "INVALID_ENTITYTYPE");
/** INVALID_COMPLEX_TYPE requires 2 content values ('supplied complex type' and 'content complex type') */
- public static final MessageReference INVALID_COMPLEX_TYPE = createMessageReference(EntityProviderException.class, "INVALID_COMPLEX_TYPE");
+ public static final MessageReference INVALID_COMPLEX_TYPE = createMessageReference(EntityProviderException.class,
+ "INVALID_COMPLEX_TYPE");
/** INVALID_CONTENT requires 2 content values ('invalid tag' and 'parent tag') */
- public static final MessageReference INVALID_CONTENT = createMessageReference(EntityProviderException.class, "INVALID_CONTENT");
+ public static final MessageReference INVALID_CONTENT = createMessageReference(EntityProviderException.class,
+ "INVALID_CONTENT");
/** INVALID_PROPERTY_VALUE requires 1 content value ('invalid value') */
- public static final MessageReference INVALID_PROPERTY_VALUE = createMessageReference(EntityProviderException.class, "INVALID_PROPERTY_VALUE");
+ public static final MessageReference INVALID_PROPERTY_VALUE = createMessageReference(EntityProviderException.class,
+ "INVALID_PROPERTY_VALUE");
/** MISSING_PROPERTY requires 1 content value ('invalid value') */
- public static final MessageReference MISSING_PROPERTY = createMessageReference(EntityProviderException.class, "MISSING_PROPERTY");
+ public static final MessageReference MISSING_PROPERTY = createMessageReference(EntityProviderException.class,
+ "MISSING_PROPERTY");
/** INVALID_PARENT_TAG requires 2 content values ('missing attribute name' and 'tag name') */
- public static final MessageReference MISSING_ATTRIBUTE = createMessageReference(EntityProviderException.class, "MISSING_ATTRIBUTE");
- public static final MessageReference UNSUPPORTED_PROPERTY_TYPE = createMessageReference(EntityProviderException.class, "UNSUPPORTED_PROPERTY_TYPE");
- public static final MessageReference INLINECOUNT_INVALID = createMessageReference(EntityProviderException.class, "INLINECOUNT_INVALID");
+ public static final MessageReference MISSING_ATTRIBUTE = createMessageReference(EntityProviderException.class,
+ "MISSING_ATTRIBUTE");
+ public static final MessageReference UNSUPPORTED_PROPERTY_TYPE = createMessageReference(
+ EntityProviderException.class, "UNSUPPORTED_PROPERTY_TYPE");
+ public static final MessageReference INLINECOUNT_INVALID = createMessageReference(EntityProviderException.class,
+ "INLINECOUNT_INVALID");
/** INVALID_STATE requires 1 content value ('message') */
- public static final MessageReference INVALID_STATE = createMessageReference(EntityProviderException.class, "INVALID_STATE");
+ public static final MessageReference INVALID_STATE = createMessageReference(EntityProviderException.class,
+ "INVALID_STATE");
/** INVALID_INLINE_CONTENT requires 1 content value ('invalid inline message') */
- public static final MessageReference INVALID_INLINE_CONTENT = createMessageReference(EntityProviderException.class, "INVALID_INLINE_CONTENT");
+ public static final MessageReference INVALID_INLINE_CONTENT = createMessageReference(EntityProviderException.class,
+ "INVALID_INLINE_CONTENT");
/** INVALID_PROPERTY requires 1 content value ('invalid property name') */
- public static final MessageReference INVALID_PROPERTY = createMessageReference(EntityProviderException.class, "INVALID_PROPERTY");
+ public static final MessageReference INVALID_PROPERTY = createMessageReference(EntityProviderException.class,
+ "INVALID_PROPERTY");
/** ILLEGAL_ARGUMENT requires 1 content value ('message') */
- public static final MessageReference ILLEGAL_ARGUMENT = createMessageReference(EntityProviderException.class, "ILLEGAL_ARGUMENT");
+ public static final MessageReference ILLEGAL_ARGUMENT = createMessageReference(EntityProviderException.class,
+ "ILLEGAL_ARGUMENT");
/** INVALID_NAMESPACE requires 1 content value ('invalid tag/namespace') */
- public static final MessageReference INVALID_NAMESPACE = createMessageReference(EntityProviderException.class, "INVALID_NAMESPACE");
+ public static final MessageReference INVALID_NAMESPACE = createMessageReference(EntityProviderException.class,
+ "INVALID_NAMESPACE");
/** INVALID_PARENT_TAG requires 2 content values ('expected parent tag' and 'found parent tag') */
- public static final MessageReference INVALID_PARENT_TAG = createMessageReference(EntityProviderException.class, "INVALID_PARENT_TAG");
- public static final MessageReference EXPANDNOTSUPPORTED = createMessageReference(EntityProviderException.class, "EXPANDNOTSUPPORTED");
+ public static final MessageReference INVALID_PARENT_TAG = createMessageReference(EntityProviderException.class,
+ "INVALID_PARENT_TAG");
+ public static final MessageReference EXPANDNOTSUPPORTED = createMessageReference(EntityProviderException.class,
+ "EXPANDNOTSUPPORTED");
/** DOUBLE_PROPERTY requires 1 content value ('double tag/property') */
- public static final MessageReference DOUBLE_PROPERTY = createMessageReference(EntityProviderException.class, "DOUBLE_PROPERTY");
+ public static final MessageReference DOUBLE_PROPERTY = createMessageReference(EntityProviderException.class,
+ "DOUBLE_PROPERTY");
/** NOT_SET_CHARACTER_ENCODING requires no content value */
- public static final MessageReference NOT_SET_CHARACTER_ENCODING = createMessageReference(EntityProviderException.class, "NOT_SET_CHARACTER_ENCODING");
+ public static final MessageReference NOT_SET_CHARACTER_ENCODING = createMessageReference(
+ EntityProviderException.class, "NOT_SET_CHARACTER_ENCODING");
/** UNSUPPORTED_CHARACTER_ENCODING requires 1 content value ('found but unsupported character encoding') */
- public static final MessageReference UNSUPPORTED_CHARACTER_ENCODING = createMessageReference(EntityProviderException.class, "UNSUPPORTED_CHARACTER_ENCODING");
+ public static final MessageReference UNSUPPORTED_CHARACTER_ENCODING = createMessageReference(
+ EntityProviderException.class, "UNSUPPORTED_CHARACTER_ENCODING");
/** MEDIA_DATA_NOT_INITIAL requires no content value */
- public static final MessageReference MEDIA_DATA_NOT_INITIAL = createMessageReference(EntityProviderException.class, "MEDIA_DATA_NOT_INITIAL");
+ public static final MessageReference MEDIA_DATA_NOT_INITIAL = createMessageReference(EntityProviderException.class,
+ "MEDIA_DATA_NOT_INITIAL");
/** END_DOCUMENT_EXPECTED requires 1 content value ('actual token') */
- public static final MessageReference END_DOCUMENT_EXPECTED = createMessageReference(EntityProviderException.class, "END_DOCUMENT_EXPECTED");
+ public static final MessageReference END_DOCUMENT_EXPECTED = createMessageReference(EntityProviderException.class,
+ "END_DOCUMENT_EXPECTED");
/** MISSING_RESULTS_ARRAY requires no content value */
- public static final MessageReference MISSING_RESULTS_ARRAY = createMessageReference(EntityProviderException.class, "MISSING_RESULTS_ARRAY");
+ public static final MessageReference MISSING_RESULTS_ARRAY = createMessageReference(EntityProviderException.class,
+ "MISSING_RESULTS_ARRAY");
public EntityProviderException(final MessageReference messageReference) {
super(messageReference);
@@ -88,7 +111,8 @@ public class EntityProviderException extends ODataMessageException {
super(messageReference, errorCode);
}
- public EntityProviderException(final MessageReference messageReference, final Throwable cause, final String errorCode) {
+ public EntityProviderException(final MessageReference messageReference, final Throwable cause,
+ final String errorCode) {
super(messageReference, cause, errorCode);
}
}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata2/blob/cf4caabf/odata-api/src/main/java/org/apache/olingo/odata2/api/ep/EntityProviderReadProperties.java
----------------------------------------------------------------------
diff --git a/odata-api/src/main/java/org/apache/olingo/odata2/api/ep/EntityProviderReadProperties.java b/odata-api/src/main/java/org/apache/olingo/odata2/api/ep/EntityProviderReadProperties.java
index 97e4002..a012487 100644
--- a/odata-api/src/main/java/org/apache/olingo/odata2/api/ep/EntityProviderReadProperties.java
+++ b/odata-api/src/main/java/org/apache/olingo/odata2/api/ep/EntityProviderReadProperties.java
@@ -1,18 +1,18 @@
/*******************************************************************************
* Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
+ * or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
+ * 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
+ * with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * 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
+ * KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
******************************************************************************/
@@ -34,13 +34,13 @@ import org.apache.olingo.odata2.api.ep.callback.OnReadInlineContent;
* <li>and the <code>type mappings</code></li>
* </ul>
* </p>
- *
+ *
*/
public class EntityProviderReadProperties {
/** Callback which is necessary if entity contains inlined navigation properties. */
private OnReadInlineContent callback;
/**
- * if merge is <code>true</code> the input content is in context of a <b>merge</b> (e.g. MERGE, PATCH) read request,
+ * if merge is <code>true</code> the input content is in context of a <b>merge</b> (e.g. MERGE, PATCH) read request,
* otherwise if <code>false</code> it is a <b>non-merge</b> (e.g. CREATE) read request
*/
private boolean merge;
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata2/blob/cf4caabf/odata-api/src/main/java/org/apache/olingo/odata2/api/ep/EntityProviderWriteProperties.java
----------------------------------------------------------------------
diff --git a/odata-api/src/main/java/org/apache/olingo/odata2/api/ep/EntityProviderWriteProperties.java b/odata-api/src/main/java/org/apache/olingo/odata2/api/ep/EntityProviderWriteProperties.java
index b4429e2..1b5a25c 100644
--- a/odata-api/src/main/java/org/apache/olingo/odata2/api/ep/EntityProviderWriteProperties.java
+++ b/odata-api/src/main/java/org/apache/olingo/odata2/api/ep/EntityProviderWriteProperties.java
@@ -1,18 +1,18 @@
/*******************************************************************************
* Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
+ * or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
+ * 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
+ * with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * 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
+ * KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
******************************************************************************/
@@ -27,8 +27,9 @@ import org.apache.olingo.odata2.api.commons.InlineCount;
import org.apache.olingo.odata2.api.uri.ExpandSelectTreeNode;
/**
- * {@link EntityProviderWriteProperties} contains all additional properties which are necessary to <b>write (serialize)</b> an
- * {@link org.apache.olingo.odata2.api.ep.entry.ODataEntry} into an specific format (e.g. <code>XML</code> or <code>JSON</code> or ...).
+ * {@link EntityProviderWriteProperties} contains all additional properties which are necessary to <b>write
+ * (serialize)</b> an {@link org.apache.olingo.odata2.api.ep.entry.ODataEntry} into an specific format (e.g.
+ * <code>XML</code> or <code>JSON</code> or ...).
*/
public class EntityProviderWriteProperties {
@@ -68,9 +69,9 @@ public class EntityProviderWriteProperties {
}
/**
- * Gets the type of the inlinecount request from the system query option.
- * @return the type of the inlinecount request from the system query option
- */
+ * Gets the type of the inlinecount request from the system query option.
+ * @return the type of the inlinecount request from the system query option
+ */
public final InlineCount getInlineCountType() {
return inlineCountType;
}
@@ -88,7 +89,7 @@ public class EntityProviderWriteProperties {
}
/**
- * Gets the inlinecount.
+ * Gets the inlinecount.
* @return the inlinecount as Integer
* @see #getInlineCountType
*/
@@ -112,7 +113,7 @@ public class EntityProviderWriteProperties {
private final EntityProviderWriteProperties properties = new EntityProviderWriteProperties();
/**
- * @param mediaResourceMimeType the mediaResourceMimeType to set
+ * @param mediaResourceMimeType the mediaResourceMimeType to set
*/
public final ODataEntityProviderPropertiesBuilder mediaResourceMimeType(final String mediaResourceMimeType) {
properties.mediaResourceMimeType = mediaResourceMimeType;
@@ -120,7 +121,7 @@ public class EntityProviderWriteProperties {
}
/**
- * @param inlineCountType the inlineCountType to set
+ * @param inlineCountType the inlineCountType to set
*/
public final ODataEntityProviderPropertiesBuilder inlineCountType(final InlineCount inlineCountType) {
properties.inlineCountType = inlineCountType;
@@ -128,7 +129,7 @@ public class EntityProviderWriteProperties {
}
/**
- * @param inlineCount the inlineCount to set
+ * @param inlineCount the inlineCount to set
*/
public final ODataEntityProviderPropertiesBuilder inlineCount(final Integer inlineCount) {
properties.inlineCount = inlineCount;
@@ -160,7 +161,8 @@ public class EntityProviderWriteProperties {
}
/**
- * Set a expand select tree which results from $expand and $select query parameter. Usually the data structure is constructed
+ * Set a expand select tree which results from $expand and $select query parameter. Usually the data structure is
+ * constructed
* by the uri parser.
* @param expandSelectTree data structure
* @return properties builder
@@ -194,7 +196,8 @@ public class EntityProviderWriteProperties {
}
public static ODataEntityProviderPropertiesBuilder fromProperties(final EntityProviderWriteProperties properties) {
- final ODataEntityProviderPropertiesBuilder b = EntityProviderWriteProperties.serviceRoot(properties.getServiceRoot());
+ final ODataEntityProviderPropertiesBuilder b = EntityProviderWriteProperties.serviceRoot(properties
+ .getServiceRoot());
b.fromProperties(properties);
return b;
}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata2/blob/cf4caabf/odata-api/src/main/java/org/apache/olingo/odata2/api/ep/callback/OnReadInlineContent.java
----------------------------------------------------------------------
diff --git a/odata-api/src/main/java/org/apache/olingo/odata2/api/ep/callback/OnReadInlineContent.java b/odata-api/src/main/java/org/apache/olingo/odata2/api/ep/callback/OnReadInlineContent.java
index fb4319f..2b6afe8 100644
--- a/odata-api/src/main/java/org/apache/olingo/odata2/api/ep/callback/OnReadInlineContent.java
+++ b/odata-api/src/main/java/org/apache/olingo/odata2/api/ep/callback/OnReadInlineContent.java
@@ -1,18 +1,18 @@
/*******************************************************************************
* Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
+ * or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
+ * 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
+ * with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * 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
+ * KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
******************************************************************************/
@@ -23,24 +23,24 @@ import org.apache.olingo.odata2.api.ep.EntityProviderReadProperties;
import org.apache.olingo.odata2.api.exception.ODataApplicationException;
/**
- * <p>
- * Callback interface for the deep insert read calls (read of <code><m:inline></code> content).
+ * <p>
+ * Callback interface for the deep insert read calls (read of <code><m:inline></code> content).
* Typically the {@link #receiveReadProperties(EntityProviderReadProperties, EdmNavigationProperty)} method is called
* when an inline navigation property is found and will be read.
- * </p>
- * <p>
- * The {@link #handleReadEntry(ReadEntryResult)} and {@link #handleReadFeed(ReadFeedResult)} methods are called
+ * </p>
+ * <p>
+ * The {@link #handleReadEntry(ReadEntryResult)} and {@link #handleReadFeed(ReadFeedResult)} methods are called
* after the inline navigation property was read and deliver the read (de-serialized) entity or list of entities.
- * If inlined navigation property is <code>nullable</code> and not set a {@link ReadEntryResult} is given with the
+ * If inlined navigation property is <code>nullable</code> and not set a {@link ReadEntryResult} is given with the
* <code>navigationPropertyName</code> and a <code>NULL</code> entry set.
* </p>
*
- *
+ *
*/
public interface OnReadInlineContent {
/**
- * Receive (request) to be used {@link EntityProviderReadProperties} to read the found inline navigation property
+ * Receive (request) to be used {@link EntityProviderReadProperties} to read the found inline navigation property
* (<code>><m:inline>...</m:inline></code>).
*
* @param readProperties read properties which are used to read enclosing parent entity
@@ -48,17 +48,17 @@ public interface OnReadInlineContent {
* @return read properties which are used to read (de-serialize) found inline navigation property
* @throws ODataApplicationException
*/
- EntityProviderReadProperties receiveReadProperties(EntityProviderReadProperties readProperties, EdmNavigationProperty navigationProperty) throws ODataApplicationException;
+ EntityProviderReadProperties receiveReadProperties(EntityProviderReadProperties readProperties,
+ EdmNavigationProperty navigationProperty) throws ODataApplicationException;
/**
* Handles reading (de-serialization) entry result.
* The given {@link ReadEntryResult} object contains all contextual information
* about the de-serialized inline navigation property and the entry as
* {@link org.apache.olingo.odata2.api.ep.entry.ODataEntry ODataEntry}.
- *
+ *
* @param readEntryResult with contextual information about and de-serialized
- * inlined navigation property as
- * {@link org.apache.olingo.odata2.api.ep.entry.ODataEntry ODataEntry}
+ * inlined navigation property as {@link org.apache.olingo.odata2.api.ep.entry.ODataEntry ODataEntry}
* @throws ODataApplicationException
*/
void handleReadEntry(ReadEntryResult readEntryResult) throws ODataApplicationException;
@@ -68,10 +68,9 @@ public interface OnReadInlineContent {
* The given {@link ReadFeedResult} object contains all contextual information
* about the de-serialized inline navigation property and the entry as
* a list of {@link org.apache.olingo.odata2.api.ep.entry.ODataEntry ODataEntry}.
- *
+ *
* @param readFeedResult with contextual information about and de-serialized
- * inlined navigation property as a list of
- * {@link org.apache.olingo.odata2.api.ep.entry.ODataEntry ODataEntry}
+ * inlined navigation property as a list of {@link org.apache.olingo.odata2.api.ep.entry.ODataEntry ODataEntry}
* @throws ODataApplicationException
*/
void handleReadFeed(ReadFeedResult readFeedResult) throws ODataApplicationException;
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata2/blob/cf4caabf/odata-api/src/main/java/org/apache/olingo/odata2/api/ep/callback/OnWriteEntryContent.java
----------------------------------------------------------------------
diff --git a/odata-api/src/main/java/org/apache/olingo/odata2/api/ep/callback/OnWriteEntryContent.java b/odata-api/src/main/java/org/apache/olingo/odata2/api/ep/callback/OnWriteEntryContent.java
index 7e725d2..1c4f74b 100644
--- a/odata-api/src/main/java/org/apache/olingo/odata2/api/ep/callback/OnWriteEntryContent.java
+++ b/odata-api/src/main/java/org/apache/olingo/odata2/api/ep/callback/OnWriteEntryContent.java
@@ -1,18 +1,18 @@
/*******************************************************************************
* Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
+ * or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
+ * 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
+ * with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * 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
+ * KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
******************************************************************************/
@@ -22,17 +22,18 @@ import org.apache.olingo.odata2.api.ODataCallback;
import org.apache.olingo.odata2.api.exception.ODataApplicationException;
/**
- * Callback interface for the $expand query option.
+ * Callback interface for the $expand query option.
* <p>If an expand clause for a navigation property which points to an entry is found this callback will be called.
* <br>Pointing to an entry means the navigation property has a multiplicity of 0..1 or 1..1.
*
- *
- *
+ *
+ *
*/
public interface OnWriteEntryContent extends ODataCallback {
/**
- * Retrieves the data for an entry. See {@link WriteEntryCallbackContext} for details on the context and {@link WriteEntryCallbackResult} for details on the result of this method.
+ * Retrieves the data for an entry. See {@link WriteEntryCallbackContext} for details on the context and
+ * {@link WriteEntryCallbackResult} for details on the result of this method.
* @param context of this entry
* @return result - must not be null.
* @throws ODataApplicationException