|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface SDataRequest
The SDataRequest
interface exposes the incoming SData Request in
terms of SData terminology. To support asynchronous operations all
implementations must be aware that they might be put away in memory for some
time.
Nested Class Summary | |
---|---|
static class |
SDataRequest.SDataMethod
The possible types of SData request |
Method Summary | |
---|---|
java.lang.String |
getAccpacSessionID()
Gets the Sage 300 ERP (formerly Accpac) session ID for the current session. |
java.lang.String |
getApplicationName()
Gets the application name from the request. |
java.lang.String |
getAuthorizationToken()
gets the authorization token for the request. |
java.lang.String |
getConnectionID()
Gets the connectionID of the request. |
java.lang.String |
getContractName()
Gets the contract name in the SData Request. |
java.lang.String |
getDataSet()
Gets the dataset name for the SData Request. |
SDataRequestEntry |
getEntryPayload()
Gets the Entry payload. |
SDataRequestFeed |
getFeedPayload()
Gets the Feed payload. |
java.lang.String |
getFullURL()
returns the full URI of the Resources set |
javax.servlet.http.HttpSession |
getHttpSession()
returns the HTTP Session |
java.util.Locale |
getHttpSessionLocale()
returns the HTTP Session Locale |
java.lang.String |
getIfMatch()
Gets the if-Match header value, or null if there is none. |
SDataRequest.SDataMethod |
getMethod()
Gets the method for the SDataRequest. |
java.util.List<OrderByParameter> |
getOrderByParameters()
Gets the list of order by parameters from the url. |
PagingControl |
getPagingControlRequest()
return the paging request |
com.sage.swt.common.filter.QueryExpression |
getQueryFilter()
Gets the QueryFilter for the SDataRequest. |
QueryPayloadControl |
getQueryPayloadControl()
Gets the QueryPayloadControl for the SDataRequest. |
java.util.List<ResourceElement> |
getResourceElements()
Gets a list of the Resource Elements. |
java.lang.String |
getResourceKindName()
Gets the ResourceKindName for the SDataRequest. |
java.lang.String |
getResourceSetURL()
Get the URL that defines the resource set. |
java.lang.String |
getResourcesURL()
returns the full URI of the Resources set, as required for links |
SDataDiagnoses |
getSDataDiagnoses()
Get the error stack for this request. |
int |
getSequenceNumber()
Gets the sequence number of the request. |
SDataServer |
getServer()
Gets the SData Server that is handling the request. |
int |
getSessionTimeout()
Gets the Tomcat Session Timeout value in minutes. |
TrackingIDInfo |
getTrackingIDInfoRequest()
Get the TrackingIDInfo object from either the Resource Element or from Query Parameter. |
java.lang.String |
getWebappURL()
returns the URL of the Webapp |
java.lang.String |
getWhereClause()
returns the where clause or null if there is none |
boolean |
hasApplication()
Checks to see if the request has an application specified. |
boolean |
hasContract()
Checks to see if the request has a contract specified. |
boolean |
hasDataset()
Checks to see if the request has a dataset specified (including the hyphen signifying the default dataset). |
boolean |
hasDefaultDataset()
returns whether the request specifies the default dataset as opposed to a named dataset |
boolean |
hasQueryFilter()
|
boolean |
isAsyncRequest()
|
boolean |
isBatchRequest()
returns whether the request is for a batch |
boolean |
isCommitted()
returns true if and only if the request is to be committed. |
boolean |
isConnectRequest()
returns true if and only if the request is for maintaining a connection. |
boolean |
isForSingleResource()
returns true if the request is for a single resource, i.e. |
boolean |
isSameRequest(SDataRequest other)
is this request the same as the other one in all important aspects (e.g. |
boolean |
isSchemaRequest()
returns whether the request is for a schema |
boolean |
isServiceListRequest()
returns true if the request is a Service Request to get a list of services. |
boolean |
isServiceRequest()
returns whether the request is for a service operation |
boolean |
isSpecialRequest()
returns whether the request is a special (e.g. |
boolean |
isStatelessRequest()
returns true if and only if the request is stateless. |
boolean |
isTemplateRequest()
returns whether the request is for a template |
boolean |
specifiesInlinedSchema()
returns true if and only if the request specifies that an inlined schema should be included in the response |
boolean |
specifiesReturnDelta()
returns true if and only if the request specified that the server should only include the properties that have been modified in the response |
Method Detail |
---|
SDataServer getServer()
SDataServer
representing the server that is handling
the requestjava.lang.String getApplicationName()
The application name returned consists only of ASCII characters and is returned in lower case.
hasApplication()
java.lang.String getAuthorizationToken()
java.lang.String getConnectionID()
The request has a connection ID if it is a connection maintenance request
(see isConnectRequest()
) or if it is not a stateless request (see
isStatelessRequest()
).
The returned value will not be a null reference nor an empty string
This and the other methods about state are Sage 300 ERP extensions
java.lang.IllegalStateException
- if the request is not one that would have a connection id (i.e.
is stateless and not a connection maintenance request)
MalformedURLException
- if there is no connection ID when there should be one or if
there is some other defect with the connection ID itselfgetSequenceNumber()
,
isStatelessRequest()
,
isConnectRequest()
,
isCommitted()
java.lang.String getContractName()
hasContract()
java.lang.String getDataSet()
hasDataset()
to see if there is a dataset. If the dataset is the
default dataset (as indicated currently by a hyphen in the URL) then the
behaviour is not defined. Call hasDefaultDataset()
to see if the
dataset is the default dataset (after checking that there is indeed a
dataset in the URL).
hasDataset()
,
hasDefaultDataset()
boolean hasApplication()
getApplicationName()
to get the name of the application.
getApplicationName()
,
hasContract()
boolean hasContract()
getContractName()
to get the name of the contract.
getContractName()
,
hasDataset()
,
hasApplication()
boolean hasDataset()
hasDefaultDataset()
to see if the dataset specified is the
default dataset or a named dataset. If it is a named dataset then call
getDataSet()
to get the name of the dataset.
hasDefaultDataset()
,
getDataSet()
SDataRequestEntry getEntryPayload()
SDataRequestFeed getFeedPayload()
java.lang.String getFullURL()
java.lang.String getWebappURL()
javax.servlet.http.HttpSession getHttpSession()
HTTP Session
java.util.Locale getHttpSessionLocale()
HTTP Session
java.lang.String getIfMatch()
SDataRequest.SDataMethod getMethod()
java.util.List<OrderByParameter> getOrderByParameters()
PagingControl getPagingControlRequest()
There must be a paging request (i.e. this function must return a non-null value), although the request may actually have no data in it
com.sage.swt.common.filter.QueryExpression getQueryFilter()
QueryPayloadControl getQueryPayloadControl()
QueryPayloadControl
for the SDataRequest.
QueryPayloadControl
containing the various
elements that control the response payload contentjava.util.List<ResourceElement> getResourceElements()
A Resource Element is a resource or property name along with its key or predicate, or one of the special names such as $schema.
e.g. http://someserver/sdata/app('abc')/contract/Orders('01')/Details('6')/DetailComments consists of 3 Resource Element objects: Orders, Details and DetailComments.
List
of the resource elements
java.lang.String getResourceKindName()
java.lang.String getResourceSetURL()
java.lang.String getResourcesURL()
SDataDiagnoses getSDataDiagnoses()
SDataDiagnoses
for the request.int getSequenceNumber()
If the request has a connection ID (see getConnectionID()
) then
it must also have a sequence number, which specifies the order in which
the requests were generated, so that they can be handled in the same
order.
This and the other methods about state are Sage 300 ERP extensions
java.lang.IllegalStateException
- if the request is not one that would have a sequence number
(i.e. is stateless and not a connection maintenance request)
MalformedURLException
- if there is no sequence number when there should be one or if
there is some other defect with the sequence number itselfgetConnectionID()
,
isStatelessRequest()
,
isConnectRequest()
,
isCommitted()
TrackingIDInfo getTrackingIDInfoRequest()
java.lang.String getWhereClause()
boolean hasDefaultDataset()
java.lang.IllegalStateException
- if there is no dataset specified (see @link
hasDataset()
boolean hasQueryFilter()
boolean isAsyncRequest()
boolean isBatchRequest()
boolean isCommitted()
If the request is stateful then the request may be flagged as not to be committed. If the request is stateless then for convenience this function will return true rather than throwing an exception.
This and the other methods about state are Sage 300 ERP extensions
isStatelessRequest()
,
isConnectRequest()
,
getConnectionID()
boolean isConnectRequest()
Currently maintaining a connection includes creating or deleting the connection. If we add the ability to get information about the connection or update the state of the connection then those will be here too, as will getting the schema
This does not return true if the request is merely using a connection; see
isStatelessRequest()
.
This and the other methods about state are Sage 300 ERP extensions
isStatelessRequest()
,
getConnectionID()
,
getSequenceNumber()
boolean isForSingleResource()
boolean isSameRequest(SDataRequest other)
other
- The other SDataRequest to compare.
boolean isSchemaRequest()
boolean isServiceListRequest()
boolean isServiceRequest()
boolean isSpecialRequest()
boolean isStatelessRequest()
If the request is not stateless (is stateful) then the request will typically be handled slightly differently from if it is stateless.
If the request is not stateless then call getConnectionID()
to
find the connection ID.
The connection maintenance requests themselves (see
isConnectRequest()
) are stateless.
This and the other methods about state are Sage 300 ERP extensions
isConnectRequest()
,
getConnectionID()
,
getSequenceNumber()
,
isCommitted()
boolean isTemplateRequest()
boolean specifiesInlinedSchema()
boolean specifiesReturnDelta()
java.lang.String getAccpacSessionID()
int getSessionTimeout()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |