|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sage.orion.sdata.servlet.SDataRequestImpl
public class SDataRequestImpl
TODO: Fill in Javadoc for SDataRequestImpl.
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface com.sage.orion.sdata.servlet.SDataRequest |
---|
SDataRequest.SDataMethod |
Constructor Summary | |
---|---|
SDataRequestImpl(javax.servlet.http.HttpServletRequest request,
javax.servlet.ServletContext context,
SDataServletContext sDataContext,
SDataDiagnoses sdataDiagnoses)
Constructor. |
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()
TODO: javadoc |
java.lang.String |
getContractName()
Gets the contract name in the SData Request. |
java.lang.String |
getDataSet()
Get the dataset from the url 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 |
SDataServletContext |
getsDataContext()
Get the SDataServlet context for the request. |
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()
TODO - isConnectionRequest(), getConnectionID() and isStatelessRequest() are routines specific to Sage 300 ERP. |
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 |
void |
setAuthorizationToken(java.lang.String token)
sets the authorization token. |
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 |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public SDataRequestImpl(javax.servlet.http.HttpServletRequest request, javax.servlet.ServletContext context, SDataServletContext sDataContext, SDataDiagnoses sdataDiagnoses)
FIXME The request should only be used during the constructor; no reference to it should remain after the construction. At least, that is my view. But I guess it does not really matter.
request
- the original HTTP request;context
- the servlet context in which this is happeningsDataContext
- the SDataServletContext
.sdataDiagnoses
- the error stack for this requestMethod Detail |
---|
public java.lang.String getContractName()
SDataRequest
getContractName
in interface SDataRequest
SDataRequest.hasContract()
public java.lang.String getDataSet()
getDataSet
in interface SDataRequest
SDataRequest.hasDataset()
,
SDataRequest.hasDefaultDataset()
public java.lang.String getResourceKindName()
SDataRequest
getResourceKindName
in interface SDataRequest
public SDataRequest.SDataMethod getMethod()
SDataRequest
getMethod
in interface SDataRequest
public SDataRequestFeed getFeedPayload()
SDataRequest
getFeedPayload
in interface SDataRequest
public SDataRequestEntry getEntryPayload()
SDataRequest
getEntryPayload
in interface SDataRequest
public java.util.List<ResourceElement> getResourceElements()
SDataRequest
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.
getResourceElements
in interface SDataRequest
List
of the resource elements
public PagingControl getPagingControlRequest()
SDataRequest
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
getPagingControlRequest
in interface SDataRequest
public TrackingIDInfo getTrackingIDInfoRequest()
SDataRequest
getTrackingIDInfoRequest
in interface SDataRequest
public java.lang.String getResourcesURL()
SDataRequest
getResourcesURL
in interface SDataRequest
public java.lang.String getFullURL()
SDataRequest
getFullURL
in interface SDataRequest
public java.lang.String getResourceSetURL()
SDataRequest
getResourceSetURL
in interface SDataRequest
public SDataDiagnoses getSDataDiagnoses()
SDataRequest
getSDataDiagnoses
in interface SDataRequest
SDataDiagnoses
for the request.public boolean isSpecialRequest()
SDataRequest
isSpecialRequest
in interface SDataRequest
public boolean isSchemaRequest()
SDataRequest
isSchemaRequest
in interface SDataRequest
public boolean isServiceRequest()
SDataRequest
isServiceRequest
in interface SDataRequest
public boolean isTemplateRequest()
SDataRequest
isTemplateRequest
in interface SDataRequest
public boolean isBatchRequest()
SDataRequest
isBatchRequest
in interface SDataRequest
public java.lang.String getWhereClause()
SDataRequest
getWhereClause
in interface SDataRequest
public com.sage.swt.common.filter.QueryExpression getQueryFilter()
SDataRequest
getQueryFilter
in interface SDataRequest
public boolean hasQueryFilter()
hasQueryFilter
in interface SDataRequest
public java.util.List<OrderByParameter> getOrderByParameters()
SDataRequest
getOrderByParameters
in interface SDataRequest
public boolean hasDataset()
SDataRequest
SDataRequest.hasDefaultDataset()
to see if the dataset specified is the
default dataset or a named dataset. If it is a named dataset then call
SDataRequest.getDataSet()
to get the name of the dataset.
hasDataset
in interface SDataRequest
SDataRequest.hasDefaultDataset()
,
SDataRequest.getDataSet()
public boolean hasDefaultDataset()
SDataRequest
hasDefaultDataset
in interface SDataRequest
public boolean isAsyncRequest()
isAsyncRequest
in interface SDataRequest
public boolean isForSingleResource()
SDataRequest
isForSingleResource
in interface SDataRequest
public boolean isSameRequest(SDataRequest other)
SDataRequest
isSameRequest
in interface SDataRequest
other
- The other SDataRequest to compare.
public java.lang.String getApplicationName()
SDataRequest
The application name returned consists only of ASCII characters and is returned in lower case.
getApplicationName
in interface SDataRequest
SDataRequest.hasApplication()
public boolean isConnectRequest()
isConnectRequest
in interface SDataRequest
SDataRequest.isStatelessRequest()
,
SDataRequest.getConnectionID()
,
SDataRequest.getSequenceNumber()
public java.lang.String getConnectionID()
getConnectionID
in interface SDataRequest
SDataRequest.getSequenceNumber()
,
SDataRequest.isStatelessRequest()
,
SDataRequest.isConnectRequest()
,
SDataRequest.isCommitted()
public boolean isStatelessRequest()
SDataRequest
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 SDataRequest.getConnectionID()
to
find the connection ID.
The connection maintenance requests themselves (see
SDataRequest.isConnectRequest()
) are stateless.
This and the other methods about state are Sage 300 ERP extensions
isStatelessRequest
in interface SDataRequest
SDataRequest.isConnectRequest()
,
SDataRequest.getConnectionID()
,
SDataRequest.getSequenceNumber()
,
SDataRequest.isCommitted()
public boolean isServiceListRequest()
SDataRequest
isServiceListRequest
in interface SDataRequest
public boolean isCommitted()
SDataRequest
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
isCommitted
in interface SDataRequest
SDataRequest.isStatelessRequest()
,
SDataRequest.isConnectRequest()
,
SDataRequest.getConnectionID()
public boolean specifiesInlinedSchema()
SDataRequest
specifiesInlinedSchema
in interface SDataRequest
public int getSequenceNumber()
SDataRequest
If the request has a connection ID (see SDataRequest.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
getSequenceNumber
in interface SDataRequest
SDataRequest.getConnectionID()
,
SDataRequest.isStatelessRequest()
,
SDataRequest.isConnectRequest()
,
SDataRequest.isCommitted()
public javax.servlet.http.HttpSession getHttpSession()
SDataRequest
getHttpSession
in interface SDataRequest
HTTP Session
public java.util.Locale getHttpSessionLocale()
SDataRequest
getHttpSessionLocale
in interface SDataRequest
HTTP Session
public java.lang.String getWebappURL()
SDataRequest
getWebappURL
in interface SDataRequest
public boolean hasApplication()
SDataRequest
SDataRequest.getApplicationName()
to get the name of the application.
hasApplication
in interface SDataRequest
SDataRequest.getApplicationName()
,
SDataRequest.hasContract()
public boolean hasContract()
SDataRequest
SDataRequest.getContractName()
to get the name of the contract.
hasContract
in interface SDataRequest
SDataRequest.getContractName()
,
SDataRequest.hasDataset()
,
SDataRequest.hasApplication()
public java.lang.String toString()
toString
in class java.lang.Object
public boolean specifiesReturnDelta()
specifiesReturnDelta
in interface SDataRequest
public SDataServer getServer()
getServer
in interface SDataRequest
SDataServer
representing the server that is handling
the requestpublic QueryPayloadControl getQueryPayloadControl()
QueryPayloadControl
for the SDataRequest.
getQueryPayloadControl
in interface SDataRequest
QueryPayloadControl
containing the various
elements that control the response payload contentpublic java.lang.String getIfMatch()
getIfMatch
in interface SDataRequest
public void setAuthorizationToken(java.lang.String token)
The token should be set once and once only.
token
- the token to setgetAuthorizationToken()
public java.lang.String getAuthorizationToken()
getAuthorizationToken
in interface SDataRequest
public java.lang.String getAccpacSessionID()
SDataRequest
getAccpacSessionID
in interface SDataRequest
public SDataServletContext getsDataContext()
SDataServletContext
public int getSessionTimeout()
SDataRequest
getSessionTimeout
in interface SDataRequest
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |