|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--uk.org.ogsadai.engine.RequestContext
This class encapsulates information describing the context of a
request made to an Engine
. This includes the security
credentials of the user making the request. An instance of this
class is passed as a parameter to the invoke
method of
the Engine
interface in order to initiate a
request. This class also provides access to any external inputs and
outputs of a request.
Field Summary | |
private static java.lang.String |
COPYRIGHT_NOTICE
Copyright statement. |
private AttachmentManager |
mAttachmentManager
Attachment manager |
private AccessAuthorizer |
mAuthorizer
Authorization manager |
private java.lang.Throwable |
mCause
Holds the exception that caused the request to fail, if any |
private DataServiceResourceFactory |
mDataServiceResourceFactory
A factory that allows activities to create new data service resources. |
private Request |
mRequest
The request that this object is the context for. |
private java.lang.String |
mResourceID
Resource associated with a request. |
private SecurityContext |
mSecurityContext
Security credentials associated with a request. |
private java.lang.String |
mURL
URL associated with a request. |
Constructor Summary | |
RequestContext()
Constructs a new invocation context. |
|
RequestContext(SecurityContext securityContext)
Constructs an invocation context for the specified security context. |
Method Summary | |
AttachmentManager |
getAttachmentManager()
Gets the attachment manager through which attachments can be added to the outgoing response. |
AccessAuthorizer |
getAuthorizer()
Returns an authorizer that authorizes access to data service resources and activities. |
java.lang.Throwable |
getCauseOfError()
If there is an error during the processing of a request, return the exception. |
DataServiceResourceFactory |
getDataServiceResourceFactory()
Gets the data service resource factory that can be used to create new data service resources. |
Request |
getRequest()
Gets the request that this object is the context for. |
java.lang.String |
getResourceID()
Gets the resource ID associated with this request |
SecurityContext |
getSecurityContext()
Gets the security context associated with a request. |
java.lang.String |
getURL()
Gets the URL associated with this request |
boolean |
hasError()
Indicates whether or not there has been an error while the request has been processing. |
void |
setAttachmentManager(AttachmentManager attachmentManager)
Sets the attachment manager through which attachments can be added to the outgoing response. |
void |
setAuthorizer(AccessAuthorizer authorizer)
Sets the authorizer that authorizes access to data service resources and activities. |
void |
setDataServiceResourceFactory(DataServiceResourceFactory factory)
Sets the data service resource factory that can be used to create new data service resources. |
void |
setError(java.lang.Throwable cause)
Sets a reference to the first error raised by an activity. |
void |
setRequest(Request request)
Sets the request that this object is the context for. |
void |
setResourceID(java.lang.String resourceID)
Sets the resource ID associated with this request |
void |
setSecurityContext(SecurityContext securityContext)
Sets the security context associated with a request. |
void |
setURL(java.lang.String url)
Sets the URL associated with this request |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private static final java.lang.String COPYRIGHT_NOTICE
private SecurityContext mSecurityContext
private Request mRequest
private java.lang.Throwable mCause
private java.lang.String mURL
private java.lang.String mResourceID
private DataServiceResourceFactory mDataServiceResourceFactory
private AttachmentManager mAttachmentManager
private AccessAuthorizer mAuthorizer
Constructor Detail |
public RequestContext()
public RequestContext(SecurityContext securityContext)
securityContext
- Security contextMethod Detail |
public SecurityContext getSecurityContext()
SecurityContext
instancepublic final void setSecurityContext(SecurityContext securityContext)
securityContext
- Security contextpublic final DataServiceResourceFactory getDataServiceResourceFactory()
null
if
none.public final void setDataServiceResourceFactory(DataServiceResourceFactory factory)
factory
- Data service resource factory or null
if none.public java.lang.String getURL()
public void setURL(java.lang.String url)
url
- URL associated with this requestpublic java.lang.String getResourceID()
public void setResourceID(java.lang.String resourceID)
resourceID
- Resource ID associated with this requestpublic final void setError(java.lang.Throwable cause)
cause
- Error raised by an activity.public final boolean hasError()
true
if there has been an error, otherwise
false
public final java.lang.Throwable getCauseOfError()
null
public final void setRequest(Request request)
request
- The request.public Request getRequest()
java.lang.IllegalStateException
- If this method is called before setRequest
.public AttachmentManager getAttachmentManager()
public void setAttachmentManager(AttachmentManager attachmentManager)
attachmentManager
- public AccessAuthorizer getAuthorizer()
public void setAuthorizer(AccessAuthorizer authorizer)
authorizer
- access authorizer
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |