Package org.teiid.olingo.service
Class TeiidServiceHandler
- java.lang.Object
-
- org.teiid.olingo.service.TeiidServiceHandler
-
- All Implemented Interfaces:
org.apache.olingo.server.api.processor.Processor,org.apache.olingo.server.core.ServiceHandler
public class TeiidServiceHandler extends Object implements org.apache.olingo.server.core.ServiceHandler
-
-
Constructor Summary
Constructors Constructor Description TeiidServiceHandler(String schemaName)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddReference(org.apache.olingo.server.core.requests.DataRequest request, String entityETag, URI referenceId, org.apache.olingo.server.core.responses.NoContentResponse response)voidanyUnsupported(org.apache.olingo.server.api.ODataRequest request, org.apache.olingo.server.api.ODataResponse response)voidapply(org.apache.olingo.server.core.requests.DataRequest request, org.apache.olingo.server.api.ODataResponse response)voidcommit(String txnId)voidcreateEntity(org.apache.olingo.server.core.requests.DataRequest request, org.apache.olingo.commons.api.data.Entity entity, org.apache.olingo.server.core.responses.EntityResponse response)voidcrossJoin(org.apache.olingo.server.core.requests.DataRequest request, List<String> entitySetNames, org.apache.olingo.server.api.ODataResponse response)voiddeleteEntity(org.apache.olingo.server.core.requests.DataRequest request, String entityETag, org.apache.olingo.server.core.responses.EntityResponse response)voiddeleteReference(org.apache.olingo.server.core.requests.DataRequest request, URI deleteId, String entityETag, org.apache.olingo.server.core.responses.NoContentResponse response)static ClientgetClient()voidinit(org.apache.olingo.server.api.OData odata, org.apache.olingo.server.api.ServiceMetadata serviceMetadata)<T extends org.apache.olingo.server.core.responses.ServiceResponse>
voidinvoke(org.apache.olingo.server.core.requests.ActionRequest request, String eTag, T response)<T extends org.apache.olingo.server.core.responses.ServiceResponse>
voidinvoke(org.apache.olingo.server.core.requests.FunctionRequest request, org.apache.olingo.commons.api.http.HttpMethod method, T response)voidprocessError(org.apache.olingo.server.api.ODataServerError error, org.apache.olingo.server.core.responses.ErrorResponse response)<T extends org.apache.olingo.server.core.responses.ServiceResponse>
voidread(org.apache.olingo.server.core.requests.DataRequest request, T response)voidreadMediaStream(org.apache.olingo.server.core.requests.MediaRequest request, org.apache.olingo.server.core.responses.StreamResponse response)voidreadMetadata(org.apache.olingo.server.core.requests.MetadataRequest request, org.apache.olingo.server.core.responses.MetadataResponse response)voidreadServiceDocument(org.apache.olingo.server.core.requests.ServiceDocumentRequest request, org.apache.olingo.server.core.responses.ServiceDocumentResponse response)voidrollback(String txnId)static voidsetClient(Client client)voidsetPrepared(boolean flag)StringstartTransaction()booleansupportsDataIsolation()voidupdateEntity(org.apache.olingo.server.core.requests.DataRequest request, org.apache.olingo.commons.api.data.Entity entity, boolean merge, String entityETag, org.apache.olingo.server.core.responses.EntityResponse response)voidupdateProperty(org.apache.olingo.server.core.requests.DataRequest request, org.apache.olingo.commons.api.data.Property property, boolean rawValue, boolean merge, String entityETag, org.apache.olingo.server.core.responses.PropertyResponse response)since Teiid only deals with primitive types, merge does not applyvoidupdateReference(org.apache.olingo.server.core.requests.DataRequest request, String entityETag, URI referenceId, org.apache.olingo.server.core.responses.NoContentResponse response)voidupsertEntity(org.apache.olingo.server.core.requests.DataRequest request, org.apache.olingo.commons.api.data.Entity entity, boolean merge, String entityETag, org.apache.olingo.server.core.responses.EntityResponse response)voidupsertMediaStream(org.apache.olingo.server.core.requests.MediaRequest request, String entityETag, InputStream mediaContent, org.apache.olingo.server.core.responses.NoContentResponse response)voidupsertStreamProperty(org.apache.olingo.server.core.requests.DataRequest request, String entityETag, InputStream streamContent, org.apache.olingo.server.core.responses.NoContentResponse response)
-
-
-
Constructor Detail
-
TeiidServiceHandler
public TeiidServiceHandler(String schemaName)
-
-
Method Detail
-
getClient
public static Client getClient()
-
setClient
public static void setClient(Client client)
-
init
public void init(org.apache.olingo.server.api.OData odata, org.apache.olingo.server.api.ServiceMetadata serviceMetadata)- Specified by:
initin interfaceorg.apache.olingo.server.api.processor.Processor
-
setPrepared
public void setPrepared(boolean flag)
-
readMetadata
public void readMetadata(org.apache.olingo.server.core.requests.MetadataRequest request, org.apache.olingo.server.core.responses.MetadataResponse response) throws org.apache.olingo.server.api.ODataLibraryException, org.apache.olingo.server.api.ODataApplicationException- Specified by:
readMetadatain interfaceorg.apache.olingo.server.core.ServiceHandler- Throws:
org.apache.olingo.server.api.ODataLibraryExceptionorg.apache.olingo.server.api.ODataApplicationException
-
readServiceDocument
public void readServiceDocument(org.apache.olingo.server.core.requests.ServiceDocumentRequest request, org.apache.olingo.server.core.responses.ServiceDocumentResponse response) throws org.apache.olingo.server.api.ODataLibraryException, org.apache.olingo.server.api.ODataApplicationException- Specified by:
readServiceDocumentin interfaceorg.apache.olingo.server.core.ServiceHandler- Throws:
org.apache.olingo.server.api.ODataLibraryExceptionorg.apache.olingo.server.api.ODataApplicationException
-
read
public <T extends org.apache.olingo.server.core.responses.ServiceResponse> void read(org.apache.olingo.server.core.requests.DataRequest request, T response) throws org.apache.olingo.server.api.ODataLibraryException, org.apache.olingo.server.api.ODataApplicationException- Specified by:
readin interfaceorg.apache.olingo.server.core.ServiceHandler- Throws:
org.apache.olingo.server.api.ODataLibraryExceptionorg.apache.olingo.server.api.ODataApplicationException
-
createEntity
public void createEntity(org.apache.olingo.server.core.requests.DataRequest request, org.apache.olingo.commons.api.data.Entity entity, org.apache.olingo.server.core.responses.EntityResponse response) throws org.apache.olingo.server.api.ODataLibraryException, org.apache.olingo.server.api.ODataApplicationException- Specified by:
createEntityin interfaceorg.apache.olingo.server.core.ServiceHandler- Throws:
org.apache.olingo.server.api.ODataLibraryExceptionorg.apache.olingo.server.api.ODataApplicationException
-
updateEntity
public void updateEntity(org.apache.olingo.server.core.requests.DataRequest request, org.apache.olingo.commons.api.data.Entity entity, boolean merge, String entityETag, org.apache.olingo.server.core.responses.EntityResponse response) throws org.apache.olingo.server.api.ODataLibraryException, org.apache.olingo.server.api.ODataApplicationException- Specified by:
updateEntityin interfaceorg.apache.olingo.server.core.ServiceHandler- Throws:
org.apache.olingo.server.api.ODataLibraryExceptionorg.apache.olingo.server.api.ODataApplicationException
-
deleteEntity
public void deleteEntity(org.apache.olingo.server.core.requests.DataRequest request, String entityETag, org.apache.olingo.server.core.responses.EntityResponse response) throws org.apache.olingo.server.api.ODataLibraryException, org.apache.olingo.server.api.ODataApplicationException- Specified by:
deleteEntityin interfaceorg.apache.olingo.server.core.ServiceHandler- Throws:
org.apache.olingo.server.api.ODataLibraryExceptionorg.apache.olingo.server.api.ODataApplicationException
-
updateProperty
public void updateProperty(org.apache.olingo.server.core.requests.DataRequest request, org.apache.olingo.commons.api.data.Property property, boolean rawValue, boolean merge, String entityETag, org.apache.olingo.server.core.responses.PropertyResponse response) throws org.apache.olingo.server.api.ODataLibraryException, org.apache.olingo.server.api.ODataApplicationExceptionsince Teiid only deals with primitive types, merge does not apply- Specified by:
updatePropertyin interfaceorg.apache.olingo.server.core.ServiceHandler- Throws:
org.apache.olingo.server.api.ODataLibraryExceptionorg.apache.olingo.server.api.ODataApplicationException
-
upsertStreamProperty
public void upsertStreamProperty(org.apache.olingo.server.core.requests.DataRequest request, String entityETag, InputStream streamContent, org.apache.olingo.server.core.responses.NoContentResponse response) throws org.apache.olingo.server.api.ODataLibraryException, org.apache.olingo.server.api.ODataApplicationException- Specified by:
upsertStreamPropertyin interfaceorg.apache.olingo.server.core.ServiceHandler- Throws:
org.apache.olingo.server.api.ODataLibraryExceptionorg.apache.olingo.server.api.ODataApplicationException
-
invoke
public <T extends org.apache.olingo.server.core.responses.ServiceResponse> void invoke(org.apache.olingo.server.core.requests.FunctionRequest request, org.apache.olingo.commons.api.http.HttpMethod method, T response) throws org.apache.olingo.server.api.ODataLibraryException, org.apache.olingo.server.api.ODataApplicationException- Specified by:
invokein interfaceorg.apache.olingo.server.core.ServiceHandler- Throws:
org.apache.olingo.server.api.ODataLibraryExceptionorg.apache.olingo.server.api.ODataApplicationException
-
invoke
public <T extends org.apache.olingo.server.core.responses.ServiceResponse> void invoke(org.apache.olingo.server.core.requests.ActionRequest request, String eTag, T response) throws org.apache.olingo.server.api.ODataLibraryException, org.apache.olingo.server.api.ODataApplicationException- Specified by:
invokein interfaceorg.apache.olingo.server.core.ServiceHandler- Throws:
org.apache.olingo.server.api.ODataLibraryExceptionorg.apache.olingo.server.api.ODataApplicationException
-
readMediaStream
public void readMediaStream(org.apache.olingo.server.core.requests.MediaRequest request, org.apache.olingo.server.core.responses.StreamResponse response) throws org.apache.olingo.server.api.ODataLibraryException, org.apache.olingo.server.api.ODataApplicationException- Specified by:
readMediaStreamin interfaceorg.apache.olingo.server.core.ServiceHandler- Throws:
org.apache.olingo.server.api.ODataLibraryExceptionorg.apache.olingo.server.api.ODataApplicationException
-
upsertMediaStream
public void upsertMediaStream(org.apache.olingo.server.core.requests.MediaRequest request, String entityETag, InputStream mediaContent, org.apache.olingo.server.core.responses.NoContentResponse response) throws org.apache.olingo.server.api.ODataLibraryException, org.apache.olingo.server.api.ODataApplicationException- Specified by:
upsertMediaStreamin interfaceorg.apache.olingo.server.core.ServiceHandler- Throws:
org.apache.olingo.server.api.ODataLibraryExceptionorg.apache.olingo.server.api.ODataApplicationException
-
anyUnsupported
public void anyUnsupported(org.apache.olingo.server.api.ODataRequest request, org.apache.olingo.server.api.ODataResponse response) throws org.apache.olingo.server.api.ODataLibraryException, org.apache.olingo.server.api.ODataApplicationException- Specified by:
anyUnsupportedin interfaceorg.apache.olingo.server.core.ServiceHandler- Throws:
org.apache.olingo.server.api.ODataLibraryExceptionorg.apache.olingo.server.api.ODataApplicationException
-
addReference
public void addReference(org.apache.olingo.server.core.requests.DataRequest request, String entityETag, URI referenceId, org.apache.olingo.server.core.responses.NoContentResponse response) throws org.apache.olingo.server.api.ODataLibraryException, org.apache.olingo.server.api.ODataApplicationException- Specified by:
addReferencein interfaceorg.apache.olingo.server.core.ServiceHandler- Throws:
org.apache.olingo.server.api.ODataLibraryExceptionorg.apache.olingo.server.api.ODataApplicationException
-
updateReference
public void updateReference(org.apache.olingo.server.core.requests.DataRequest request, String entityETag, URI referenceId, org.apache.olingo.server.core.responses.NoContentResponse response) throws org.apache.olingo.server.api.ODataLibraryException, org.apache.olingo.server.api.ODataApplicationException- Specified by:
updateReferencein interfaceorg.apache.olingo.server.core.ServiceHandler- Throws:
org.apache.olingo.server.api.ODataLibraryExceptionorg.apache.olingo.server.api.ODataApplicationException
-
deleteReference
public void deleteReference(org.apache.olingo.server.core.requests.DataRequest request, URI deleteId, String entityETag, org.apache.olingo.server.core.responses.NoContentResponse response) throws org.apache.olingo.server.api.ODataLibraryException, org.apache.olingo.server.api.ODataApplicationException- Specified by:
deleteReferencein interfaceorg.apache.olingo.server.core.ServiceHandler- Throws:
org.apache.olingo.server.api.ODataLibraryExceptionorg.apache.olingo.server.api.ODataApplicationException
-
startTransaction
public String startTransaction() throws org.apache.olingo.server.api.ODataLibraryException, org.apache.olingo.server.api.ODataApplicationException
- Specified by:
startTransactionin interfaceorg.apache.olingo.server.core.ServiceHandler- Throws:
org.apache.olingo.server.api.ODataLibraryExceptionorg.apache.olingo.server.api.ODataApplicationException
-
commit
public void commit(String txnId) throws org.apache.olingo.server.api.ODataLibraryException, org.apache.olingo.server.api.ODataApplicationException
- Specified by:
commitin interfaceorg.apache.olingo.server.core.ServiceHandler- Throws:
org.apache.olingo.server.api.ODataLibraryExceptionorg.apache.olingo.server.api.ODataApplicationException
-
rollback
public void rollback(String txnId) throws org.apache.olingo.server.api.ODataLibraryException, org.apache.olingo.server.api.ODataApplicationException
- Specified by:
rollbackin interfaceorg.apache.olingo.server.core.ServiceHandler- Throws:
org.apache.olingo.server.api.ODataLibraryExceptionorg.apache.olingo.server.api.ODataApplicationException
-
crossJoin
public void crossJoin(org.apache.olingo.server.core.requests.DataRequest request, List<String> entitySetNames, org.apache.olingo.server.api.ODataResponse response) throws org.apache.olingo.server.api.ODataLibraryException, org.apache.olingo.server.api.ODataApplicationException- Specified by:
crossJoinin interfaceorg.apache.olingo.server.core.ServiceHandler- Throws:
org.apache.olingo.server.api.ODataLibraryExceptionorg.apache.olingo.server.api.ODataApplicationException
-
apply
public void apply(org.apache.olingo.server.core.requests.DataRequest request, org.apache.olingo.server.api.ODataResponse response) throws org.apache.olingo.server.api.ODataLibraryException, org.apache.olingo.server.api.ODataApplicationException- Specified by:
applyin interfaceorg.apache.olingo.server.core.ServiceHandler- Throws:
org.apache.olingo.server.api.ODataLibraryExceptionorg.apache.olingo.server.api.ODataApplicationException
-
upsertEntity
public void upsertEntity(org.apache.olingo.server.core.requests.DataRequest request, org.apache.olingo.commons.api.data.Entity entity, boolean merge, String entityETag, org.apache.olingo.server.core.responses.EntityResponse response) throws org.apache.olingo.server.api.ODataLibraryException, org.apache.olingo.server.api.ODataApplicationException- Specified by:
upsertEntityin interfaceorg.apache.olingo.server.core.ServiceHandler- Throws:
org.apache.olingo.server.api.ODataLibraryExceptionorg.apache.olingo.server.api.ODataApplicationException
-
supportsDataIsolation
public boolean supportsDataIsolation()
- Specified by:
supportsDataIsolationin interfaceorg.apache.olingo.server.core.ServiceHandler
-
processError
public void processError(org.apache.olingo.server.api.ODataServerError error, org.apache.olingo.server.core.responses.ErrorResponse response)- Specified by:
processErrorin interfaceorg.apache.olingo.server.core.ServiceHandler
-
-