public class RequestContext extends PluginContext
Modifier and Type | Class and Description |
---|---|
static interface |
RequestContext.ClientConnection
This interface provides information on the client connection that
submitted the request being processed.
|
static interface |
RequestContext.Logger
This interface provides access to the logger to append log information in
the access, debug and error logs.
|
static interface |
RequestContext.Request
This interface provides information on the request being processed.
|
static interface |
RequestContext.RequestBuilder
This interface is a builder to create new Request instances.
|
PluginContext.ControlBuilder, PluginContext.TypeBuilder, PluginContext.Utils
Modifier and Type | Method and Description |
---|---|
RequestContext.ClientConnection |
getClientConnection()
Retrieves the ClientConnection associated to this context.
|
RequestManager |
getInternalRequestManager()
Returns the RequestManager instance that performs internal requests.
|
RequestContext.Logger |
getLogger()
Retrieve the logger associated to this context.
|
RequestContext.Request |
getRequest()
Returns the context request associated to this context.
|
RequestContext.RequestBuilder |
getRequestBuilder(boolean asRoot)
Retrieves the Request builder associated to this context.
|
RequestContext.RequestBuilder |
getRequestBuilder(boolean asRoot,
boolean isInternal)
Retrieves the Request builder associated to this context.
|
getConfiguration, getControlBuilder, getTypeBuilder, getUtils
public RequestManager getInternalRequestManager()
public RequestContext.RequestBuilder getRequestBuilder(boolean asRoot)
Note that only requests created from this builder can be performed with privileges of root.
Note that invoking this method as:getRequestBuilder(asRoot);
is the same as invoking:
getRequestBuilder(asRoot, asRoot);
asRoot
- if true
the returned RequestBuilder creates all
requests with privilege of Root.
If false
then requests are created with the level of
privilege of the current authenticated user or as anonymous
if the current user is not authenticated.public RequestContext.RequestBuilder getRequestBuilder(boolean asRoot, boolean isInternal)
Note that only requests created from this builder can be performed with privileges of root.
The isInternal
parameter flags the requests built from the returned
RequestBuilder with the specified value. See
Request.isInternal()
for more information.
asRoot
- if true
the returned RequestBuilder creates all
requests with privilege of Root.
If false
then requests are created with the level of
privilege of the current authenticated user or as anonymous
if the current user is not authenticated.isInternal
- if true
the returned RequestBuilder creates all
requests as internal requests.
If false
then created requests are not tagged as
internal requests and have a lower level of privilege.public RequestContext.Logger getLogger()
public RequestContext.ClientConnection getClientConnection()
public RequestContext.Request getRequest()