Package org.apache.olingo.server.api
Class OData
java.lang.Object
org.apache.olingo.server.api.OData
- Direct Known Subclasses:
ODataNetty
Root object for serving factory tasks and support loose coupling of implementation (core) from the API.
This is not a singleton (static variables) to avoid issues with synchronization, OSGi, hot deployment and so on.
Each thread (request) should keep its own instance.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract DebugResponseHelpercreateDebugResponseHelper(String debugFormat) Creates a DebugResponseHelper for the given debugFormat.abstract ODataDeserializercreateDeserializer(ContentType contentType) Creates a new deserializer object for reading content in the specified format.abstract ODataDeserializercreateDeserializer(ContentType contentType, List<String> versions) Creates a new deserializer object for reading content in the specified format.abstract ODataDeserializercreateDeserializer(ContentType contentType, ServiceMetadata metadata) Creates a new deserializer object for reading content in the specified format.abstract ODataDeserializercreateDeserializer(ContentType contentType, ServiceMetadata metadata, List<String> versions) Creates a new deserializer object for reading content in the specified format.abstract EdmAssistedSerializercreateEdmAssistedSerializer(ContentType contentType) Creates a new serializer object capable of working without EDM information for rendering content in the specified format.abstract EdmAssistedSerializercreateEdmAssistedSerializer(ContentType contentType, List<String> versions) Creates a new serializer object capable of working without EDM information for rendering content in the specified format.abstract EdmDeltaSerializercreateEdmDeltaSerializer(ContentType contentType, List<String> versions) Creates a new serializer object capable of working without EDM information for rendering delta content in the specified format.abstract ETagHelperCreates a new ETag helper object for performing ETag-related tasks.abstract FixedFormatDeserializerCreates a new deserializer object for reading content in a fixed format, e.g., for binary input.abstract FixedFormatSerializerCreates a new serializer object for rendering content in a fixed format, e.g., for binary output or multipart/mixed outpu.abstract ODataHttpHandlercreateHandler(ServiceMetadata serviceMetadata) Creates a new ODataHttpHandler for handling OData requests in an HTTP context.abstract PreferencescreatePreferences(Collection<String> preferHeaders) Creates a new Preferences object out of Prefer HTTP request headers.abstract EdmPrimitiveTypeCreates a primitive-type instance.abstract ODataHandlercreateRawHandler(ServiceMetadata serviceMetadata) Creates a new ODataHandler for handling OData requests.abstract ODataSerializercreateSerializer(ContentType contentType) Creates a new serializer object for rendering content in the specified format.abstract ODataSerializercreateSerializer(ContentType contentType, List<String> versions) Creates a new serializer object for rendering content in the specified format.abstract ServiceMetadatacreateServiceMetadata(CsdlEdmProvider edmProvider, List<EdmxReference> references) Creates a metadata object for this service.abstract ServiceMetadatacreateServiceMetadata(CsdlEdmProvider edmProvider, List<EdmxReference> references, ServiceMetadataETagSupport serviceMetadataETagSupport) Creates a metadata object for this service.abstract UriHelperCreates a new URI helper object for performing URI-related tasks.static ODataUse this method to create a new OData instance.
-
Constructor Details
-
OData
public OData()
-
-
Method Details
-
newInstance
Use this method to create a new OData instance. Each thread/request should keep its own instance.- Returns:
- a new OData instance
-
createSerializer
public abstract ODataSerializer createSerializer(ContentType contentType) throws SerializerException Creates a new serializer object for rendering content in the specified format. Serializers are used in Processor implementations.- Parameters:
contentType- any format supported by Olingo (XML, JSON ...)- Throws:
SerializerException
-
createSerializer
public abstract ODataSerializer createSerializer(ContentType contentType, List<String> versions) throws SerializerException Creates a new serializer object for rendering content in the specified format. Serializers are used in Processor implementations.- Parameters:
contentType- any format supported by Olingo (XML, JSON ...)versions- any v4 version supported by Olingo (4.0, 4.01 ...)- Throws:
SerializerException
-
createFixedFormatSerializer
Creates a new serializer object for rendering content in a fixed format, e.g., for binary output or multipart/mixed outpu. Serializers are used in Processor implementations. -
createFixedFormatDeserializer
Creates a new deserializer object for reading content in a fixed format, e.g., for binary input. Deserializers are used in Processor implementations. -
createHandler
Creates a new ODataHttpHandler for handling OData requests in an HTTP context.- Parameters:
serviceMetadata- - metadata object required to handle an OData request
-
createRawHandler
Creates a new ODataHandler for handling OData requests.- Parameters:
serviceMetadata- - metadata object required to handle an OData request
-
createServiceMetadata
public abstract ServiceMetadata createServiceMetadata(CsdlEdmProvider edmProvider, List<EdmxReference> references) Creates a metadata object for this service.- Parameters:
edmProvider- a custom or default implementation for creating metadatareferences- list of edmx references- Returns:
- a service metadata implementation
-
createServiceMetadata
public abstract ServiceMetadata createServiceMetadata(CsdlEdmProvider edmProvider, List<EdmxReference> references, ServiceMetadataETagSupport serviceMetadataETagSupport) Creates a metadata object for this service.- Parameters:
edmProvider- a custom or default implementation for creating metadatareferences- list of edmx referencesserviceMetadataETagSupport-- Returns:
- a service metadata implementation
-
createUriHelper
Creates a new URI helper object for performing URI-related tasks. It can be used in Processor implementations. -
createDeserializer
public abstract ODataDeserializer createDeserializer(ContentType contentType) throws DeserializerException Creates a new deserializer object for reading content in the specified format. Deserializers are used in Processor implementations.- Parameters:
contentType- any content type supported by Olingo (XML, JSON ...)- Throws:
DeserializerException
-
createDeserializer
public abstract ODataDeserializer createDeserializer(ContentType contentType, ServiceMetadata metadata) throws DeserializerException Creates a new deserializer object for reading content in the specified format. Deserializers are used in Processor implementations.- Parameters:
contentType- any content type supported by Olingo (XML, JSON ...)metadata- ServiceMetada of the service- Throws:
DeserializerException
-
createDeserializer
public abstract ODataDeserializer createDeserializer(ContentType contentType, List<String> versions) throws DeserializerException Creates a new deserializer object for reading content in the specified format. Deserializers are used in Processor implementations.- Parameters:
contentType- any content type supported by Olingo (XML, JSON ...)service- version- Throws:
DeserializerException
-
createDeserializer
public abstract ODataDeserializer createDeserializer(ContentType contentType, ServiceMetadata metadata, List<String> versions) throws DeserializerException Creates a new deserializer object for reading content in the specified format. Deserializers are used in Processor implementations.- Parameters:
contentType- any content type supported by Olingo (XML, JSON ...)metadata- ServiceMetada of the serviceservice- version- Throws:
DeserializerException
-
createPrimitiveTypeInstance
Creates a primitive-type instance.- Parameters:
kind- the kind of the primitive type- Returns:
- an
EdmPrimitiveTypeinstance for the type kind
-
createETagHelper
Creates a new ETag helper object for performing ETag-related tasks. It can be used in Processor implementations. -
createPreferences
Creates a new Preferences object out of Prefer HTTP request headers. It can be used in Processor implementations. -
createDebugResponseHelper
Creates a DebugResponseHelper for the given debugFormat. If the format is not supported no exception is thrown. Instead we give back the implementation for the JSON format.- Parameters:
debugFormat- format to be used- Returns:
- a debug-response helper
-
createEdmAssistedSerializer
public abstract EdmAssistedSerializer createEdmAssistedSerializer(ContentType contentType) throws SerializerException Creates a new serializer object capable of working without EDM information for rendering content in the specified format.- Parameters:
contentType- a content type supported by Olingo- Throws:
SerializerException
-
createEdmAssistedSerializer
public abstract EdmAssistedSerializer createEdmAssistedSerializer(ContentType contentType, List<String> versions) throws SerializerException Creates a new serializer object capable of working without EDM information for rendering content in the specified format.- Parameters:
contentType- a content type supported by Olingoversions- Odata Version v4 or v4.01- Throws:
SerializerException
-
createEdmDeltaSerializer
public abstract EdmDeltaSerializer createEdmDeltaSerializer(ContentType contentType, List<String> versions) throws SerializerException Creates a new serializer object capable of working without EDM information for rendering delta content in the specified format.- Parameters:
contentType- a content type supported by Olingoversion- versions supported by Olingo- Throws:
SerializerException
-