public class ProcessorServiceHandler extends Object implements ServiceHandler
| Constructor and Description |
|---|
ProcessorServiceHandler() |
| Modifier and Type | Method and Description |
|---|---|
void |
addReference(DataRequest request,
String entityETag,
URI referenceId,
NoContentResponse response)
Add references (relationships) to Entity.
|
void |
anyUnsupported(org.apache.olingo.server.api.ODataRequest request,
org.apache.olingo.server.api.ODataResponse response)
Any Unsupported one will be directed here.
|
void |
commit(String txnId)
When a batch operation is complete and all the intermediate service requests are successful, then
commit is called with transaction id returned in the startTransaction method.
|
void |
createEntity(DataRequest request,
org.apache.olingo.commons.api.data.Entity entity,
EntityResponse response)
Create new entity in the service based on the entity object provided
|
void |
crossJoin(DataRequest dataRequest,
List<String> entitySetNames,
org.apache.olingo.server.api.ODataResponse response)
This is not complete, more URL parsing changes required.
|
void |
deleteEntity(DataRequest request,
String entityETag,
EntityResponse response)
Delete the Entity
|
void |
deleteReference(DataRequest request,
URI deleteId,
String entityETag,
NoContentResponse response)
Delete references (relationships) in an Entity
|
void |
init(org.apache.olingo.server.api.OData odata,
org.apache.olingo.server.api.ServiceMetadata serviceMetadata) |
<T extends ServiceResponse> |
invoke(ActionRequest request,
String eTag,
T response)
Invocation of a Function.
|
<T extends ServiceResponse> |
invoke(FunctionRequest request,
org.apache.olingo.commons.api.http.HttpMethod method,
T response)
Invocation of a Function.
|
<T extends ServiceResponse> |
read(DataRequest request,
T response)
Read operation for EntitySets, Entities, Properties, Media etc.
|
void |
readMediaStream(MediaRequest request,
StreamResponse response)
Read media stream content of a Entity
|
void |
readMetadata(MetadataRequest request,
MetadataResponse response)
Read CSDL document of the Service
|
void |
readServiceDocument(ServiceDocumentRequest request,
ServiceDocumentResponse response)
Read ServiceDocument of the service
|
void |
register(org.apache.olingo.server.api.processor.Processor processor) |
void |
rollback(String txnId)
When a batch operation is in-complete due to an error in the middle of changeset, then rollback is
called with transaction id, that returned from startTransaction method.
|
String |
startTransaction()
During a batch operation, this method starts the transaction (if any) before any operation is handled
by the service.
|
void |
updateEntity(DataRequest request,
org.apache.olingo.commons.api.data.Entity entity,
boolean merge,
String entityETag,
EntityResponse response)
Update the entity object.
|
void |
updateProperty(DataRequest request,
org.apache.olingo.commons.api.data.Property property,
boolean merge,
String entityETag,
PropertyResponse response)
Update a non-media/stream property.if the value of property NULL, it should be treated as
DeleteProperty 11.4.9.2
|
void |
updateReference(DataRequest request,
String entityETag,
URI referenceId,
NoContentResponse response)
Update references (relationships) in an Entity; This is always against single valued navigation property
|
void |
upsertEntity(DataRequest request,
org.apache.olingo.commons.api.data.Entity entity,
boolean merge,
String entityETag,
EntityResponse response)
Update or create the entity object.
|
void |
upsertMediaStream(MediaRequest request,
String entityETag,
InputStream mediaContent,
NoContentResponse response)
Update of Media Stream Content of a Entity.
|
void |
upsertStreamProperty(DataRequest request,
String entityETag,
InputStream streamContent,
NoContentResponse response)
Update Stream property, if StreamContent is null, it should treated as delete request
|
public void init(org.apache.olingo.server.api.OData odata,
org.apache.olingo.server.api.ServiceMetadata serviceMetadata)
init in interface org.apache.olingo.server.api.processor.Processorpublic void register(org.apache.olingo.server.api.processor.Processor processor)
public void readMetadata(MetadataRequest request, MetadataResponse response) throws org.apache.olingo.server.api.ODataLibraryException, org.apache.olingo.server.api.ODataApplicationException
ServiceHandlerreadMetadata in interface ServiceHandlerorg.apache.olingo.server.api.ODataLibraryExceptionorg.apache.olingo.server.api.ODataApplicationExceptionpublic void readServiceDocument(ServiceDocumentRequest request, ServiceDocumentResponse response) throws org.apache.olingo.server.api.ODataLibraryException, org.apache.olingo.server.api.ODataApplicationException
ServiceHandlerreadServiceDocument in interface ServiceHandlerorg.apache.olingo.server.api.ODataLibraryExceptionorg.apache.olingo.server.api.ODataApplicationExceptionpublic <T extends ServiceResponse> void read(DataRequest request, T response) throws org.apache.olingo.server.api.ODataLibraryException, org.apache.olingo.server.api.ODataApplicationException
ServiceHandlerread in interface ServiceHandlerorg.apache.olingo.server.api.ODataLibraryExceptionorg.apache.olingo.server.api.ODataApplicationExceptionpublic void createEntity(DataRequest request, org.apache.olingo.commons.api.data.Entity entity, EntityResponse response) throws org.apache.olingo.server.api.ODataLibraryException, org.apache.olingo.server.api.ODataApplicationException
ServiceHandlercreateEntity in interface ServiceHandlerorg.apache.olingo.server.api.ODataLibraryExceptionorg.apache.olingo.server.api.ODataApplicationExceptionpublic void updateEntity(DataRequest request, org.apache.olingo.commons.api.data.Entity entity, boolean merge, String entityETag, EntityResponse response) throws org.apache.olingo.server.api.ODataLibraryException, org.apache.olingo.server.api.ODataApplicationException
ServiceHandlerupdateEntity in interface ServiceHandlermerge - - true if merge operation, false it needs to be replacedentityETag - - previous entity tag if provided by the user. "*" means allow.org.apache.olingo.server.api.ODataLibraryExceptionorg.apache.olingo.server.api.ODataApplicationExceptionpublic void deleteEntity(DataRequest request, String entityETag, EntityResponse response) throws org.apache.olingo.server.api.ODataLibraryException, org.apache.olingo.server.api.ODataApplicationException
ServiceHandlerdeleteEntity in interface ServiceHandlerentityETag - - entity tag to match, if provided by the user. "*" means alloworg.apache.olingo.server.api.ODataLibraryExceptionorg.apache.olingo.server.api.ODataApplicationExceptionpublic void updateProperty(DataRequest request, org.apache.olingo.commons.api.data.Property property, boolean merge, String entityETag, PropertyResponse response) throws org.apache.olingo.server.api.ODataLibraryException, org.apache.olingo.server.api.ODataApplicationException
ServiceHandlerupdateProperty in interface ServiceHandlerproperty - - Updated property.merge - - if the property is complex, true here means merge, false is replaceentityETag - - entity tag to match before update operation, "*" allows all.org.apache.olingo.server.api.ODataLibraryExceptionorg.apache.olingo.server.api.ODataApplicationExceptionpublic void upsertStreamProperty(DataRequest request, String entityETag, InputStream streamContent, NoContentResponse response) throws org.apache.olingo.server.api.ODataLibraryException, org.apache.olingo.server.api.ODataApplicationException
ServiceHandlerupsertStreamProperty in interface ServiceHandlerentityETag - - entity tag to match before update operation, "*" allows all.streamContent - - updated stream contentorg.apache.olingo.server.api.ODataLibraryExceptionorg.apache.olingo.server.api.ODataApplicationExceptionpublic <T extends ServiceResponse> void invoke(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
ServiceHandlerinvoke in interface ServiceHandlerorg.apache.olingo.server.api.ODataLibraryExceptionorg.apache.olingo.server.api.ODataApplicationExceptionpublic <T extends ServiceResponse> void invoke(ActionRequest request, String eTag, T response) throws org.apache.olingo.server.api.ODataLibraryException, org.apache.olingo.server.api.ODataApplicationException
ServiceHandlerinvoke in interface ServiceHandlerorg.apache.olingo.server.api.ODataLibraryExceptionorg.apache.olingo.server.api.ODataApplicationExceptionpublic void readMediaStream(MediaRequest request, StreamResponse response) throws org.apache.olingo.server.api.ODataLibraryException, org.apache.olingo.server.api.ODataApplicationException
ServiceHandlerreadMediaStream in interface ServiceHandlerorg.apache.olingo.server.api.ODataLibraryExceptionorg.apache.olingo.server.api.ODataApplicationExceptionpublic void upsertMediaStream(MediaRequest request, String entityETag, InputStream mediaContent, NoContentResponse response) throws org.apache.olingo.server.api.ODataLibraryException, org.apache.olingo.server.api.ODataApplicationException
ServiceHandlerupsertMediaStream in interface ServiceHandlerentityETag - - entity etag to match before update operation, "*" allows all.mediaContent - - if null, must be treated as delete requestorg.apache.olingo.server.api.ODataLibraryExceptionorg.apache.olingo.server.api.ODataApplicationExceptionpublic 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
ServiceHandleranyUnsupported in interface ServiceHandlerorg.apache.olingo.server.api.ODataLibraryExceptionorg.apache.olingo.server.api.ODataApplicationExceptionpublic void addReference(DataRequest request, String entityETag, URI referenceId, NoContentResponse response) throws org.apache.olingo.server.api.ODataLibraryException, org.apache.olingo.server.api.ODataApplicationException
ServiceHandleraddReference in interface ServiceHandlerentityETag - - entity etag to match before add operation, "*" allows all.referenceId - - references to addresponse - - return always should be 204org.apache.olingo.server.api.ODataLibraryExceptionorg.apache.olingo.server.api.ODataApplicationExceptionpublic void updateReference(DataRequest request, String entityETag, URI referenceId, NoContentResponse response) throws org.apache.olingo.server.api.ODataLibraryException, org.apache.olingo.server.api.ODataApplicationException
ServiceHandlerupdateReference in interface ServiceHandlerresponse - - always should be 204org.apache.olingo.server.api.ODataLibraryExceptionorg.apache.olingo.server.api.ODataApplicationExceptionpublic void deleteReference(DataRequest request, URI deleteId, String entityETag, NoContentResponse response) throws org.apache.olingo.server.api.ODataLibraryException, org.apache.olingo.server.api.ODataApplicationException
ServiceHandlerdeleteReference in interface ServiceHandlerdeleteId - for collection valued navigation this will be non-null value;
for single valued navigation property, this will be nullresponse - - always should be 204org.apache.olingo.server.api.ODataLibraryExceptionorg.apache.olingo.server.api.ODataApplicationExceptionpublic String startTransaction()
ServiceHandlerstartTransaction in interface ServiceHandlerpublic void commit(String txnId)
ServiceHandlercommit in interface ServiceHandlerpublic void rollback(String txnId)
ServiceHandlerrollback in interface ServiceHandlerpublic void crossJoin(DataRequest dataRequest, List<String> entitySetNames, org.apache.olingo.server.api.ODataResponse response) throws org.apache.olingo.server.api.ODataLibraryException, org.apache.olingo.server.api.ODataApplicationException
ServiceHandlercrossJoin in interface ServiceHandlerorg.apache.olingo.server.api.ODataLibraryExceptionorg.apache.olingo.server.api.ODataApplicationExceptionpublic void upsertEntity(DataRequest request, org.apache.olingo.commons.api.data.Entity entity, boolean merge, String entityETag, EntityResponse response) throws org.apache.olingo.server.api.ODataLibraryException, org.apache.olingo.server.api.ODataApplicationException
ServiceHandlerupsertEntity in interface ServiceHandlerentity - - Entity to create or updatemerge - - in the case of update, true to do merge operation with current entity,
false the entity needs to be replacedentityETag - - previous entity tag if provided by the user. "*" means allow.org.apache.olingo.server.api.ODataLibraryExceptionorg.apache.olingo.server.api.ODataApplicationExceptionCopyright © 2013–2015 The Apache Software Foundation. All rights reserved.