oracle.panama.rt
Interface Request


public interface Request

This interface represents the request objects in PTG Runtime.

Since:
Oracle9i Application Server Wireless Edition

Field Summary
TypeField
static java.lang.String CALLBACK_LABEL
          The callback label used by the module caller
static java.lang.String CALLBACK_URL
          The callback URL used by the module caller
static java.lang.String CHILDREN_DISPLAY_POSITION
          The parameter used by folder render to decide current position of displayed children
static java.lang.String CONNXN_ID
          The parameter used to identify the re-entrant request for a request currently blocked on a cache lookup
static java.lang.String DEBUG
          The optional parameter to enable logging of debug information
static java.lang.String DEVICE_ID
          The parameter used to identify the device for a re-entrant request on a cache lookup
static java.lang.String EFFECTIVE_USER_NAME
          The name of the effective user
static java.lang.String FULL_CALLBACK_URL
          The full (non-cached) callback URL used by the module caller
static java.lang.String GET_PAGE
           
static java.lang.String GO_SESSION_HOME
          A request to invoke the session home service
static java.lang.String LOCALE_PREFERENCE
           
static java.lang.String LOGIN
          The parameter used to force a new login dialog
static java.lang.String LOGOFF
          The parameter used to logoff the user and invalidate the session
static java.lang.String MODULE_STACK_SIZE
          The current size of the module stack
static java.lang.String MS_XFORMER
          The parameter can be used to select the result transformer other than the transformer designated by PAsection name
static java.lang.String PASSWORD
          The password for log-in user
static java.lang.String REQUEST_LANDMARK
          The parameter used to specify a landmark for the request
static java.lang.String REQUEST_USER_PROFILE
          The parameter used to specify a user profile for the request
static java.lang.String SECTION
          The name of a section in a Web Integration Adapter
static java.lang.String SERVICE_DESIGNER
          The parameter used by service designer to request adpater or simple results
static java.lang.String SERVICE_OID
          The object id of the requested service
static java.lang.String SERVICE_PATH
          The path of the requested service in the repository
static java.lang.String SESSION_HOME
          The object id of the service that is the session home
static java.lang.String SESSION_ID
          The session id parameter used to track the user sessions
static java.lang.String SESSION_LANDMARK
          The parameter used to specify a landmark for the session
static java.lang.String SESSION_USER_PROFILE
          The parameter used to specify a user profile for the session
static java.lang.String SHORT_NAME
          The short name for the service
static java.lang.String USER_NAME
          The name of the log-in user
static java.lang.String VIRTUAL_URL
          The virtual URL of the requested module
 
Method Summary
TypeMethod
 void addRequestListener(RequestListener listener)
          Add a listener for events from this request.
 void addRequestListeners(java.util.Vector listeners)
          Add a collection of listeners for events from request object.
 Response execute()
          Execute a newly created request.
 Arguments getArguments()
          Get the arguments containing all URL parameters and header attributes.
 java.lang.Object getAttribute(AttributeCategory category, java.lang.String name)
          Get the value of the named attribute in the chosen category
 java.util.Enumeration getAttributeNames(AttributeCategory category)
          Get an enumeration of all attribute names in a given category
 java.lang.String getAuthenticationType()
          Get the type of authentication used to identify the user.
 java.lang.String[] getCarriers()
           
 java.lang.String getCharacterEncoding()
          Get the language and locale used for character encoding
 Point getCurrentLocation()
          Get the location of the user using one of the following sources, 1.
 Device getDevice()
          Get the device model derived from the user agent type.
 DeviceAddress getDeviceAddress()
           
 java.lang.String getDeviceId()
          Get the device id,
 java.util.Enumeration getHeaderAttributes()
          Get the enumeration of attributes obtained from http header or equivalent source.
 java.util.Date getLocationAcquisitionTime()
          Get the time when the user location was acquired
 LocationMark getLocationMark()
          Get the landmark that identifies the location of the caller.
 java.lang.String getMobileId()
          Get the mobile id, which can be used for automatic location acquisition.
 java.lang.String getParameter(java.lang.String paramName)
          Get the value of a parameter from the "Parameters" category
 java.lang.String[] getParameterValues(java.lang.String paramName)
          Get the values of a parameter from the "Parameters" category
 Profile getProfile()
          Get the user profile.
 java.lang.String getRemoteAddress()
          Get the IP address or other network address of the user agent.
 java.lang.String getRemoteAuthenticationType()
          Returns the name of the authentication scheme used to authenticate the user.
 java.lang.String getRemoteUser()
          Returns the name of the user making this request, if the user has been authenticated (say thru mod_sso), or null if the user has not been authenticated.
 java.lang.String getRequestedSessionId()
          Get the session id contained in the request.
 Response getResponse()
          Get the Response interface associated with this request.
 java.lang.String getScheme()
          Get the schema used for the request message.
 ServiceContext getServiceContext()
          Get the service context for the current request, current session, and requested service.
 java.lang.String getServiceHomeURL()
           
 long getServiceOid()
          Get the value of "PAoid" parameter which specifies the object id of the requested service.
 java.lang.String getServiceParentURL()
           
 java.lang.String getServicePath()
          Get the value of "PAservicepath" which specifies the path of the requested service in the repository.
 Session getSession()
          Get the session associated with the current request.
 java.lang.String getSubscriberId()
          Deprecated. use getMobileId instead
 java.lang.String getUserHomeURL()
           
 void invalidate()
          Invalidate the request and the associated service context and response objects.
 boolean isAutoLocated()
          Get the auto located (boolean) value.
 boolean isDebugOn()
          Test whether logging of debug information is requested.
 boolean isRequestedSessionIdValid()
          Test if the requested session id is valid.
 boolean isSecure()
          Verify whether the request is transmitted over a secure channel such HTTPS or SSL.
 boolean isValid()
          Test if the user is authenticated and session has been established.
 void removeAttribute(AttributeCategory category, java.lang.String name)
          Remove the named attribute from the given category
 void removeParameter(java.lang.String paramName)
          Remove the parameter from the "Parameters" category
 void removeRequestListener(RequestListener listener)
          Remove a listener for events from this request.
 void removeRequestListeners(java.util.Vector listeners)
          Remove a collection of listeners for events from request object.
 void setAttribute(AttributeCategory category, java.lang.String name, java.lang.Object value)
          Set the value of the named attribute in the chosen category
 void setAutoLocated(boolean autoLocated)
          Set the auto located (boolean) parameter.
 void setDebugOn(boolean value)
          Set the flag to request logging of debug information for the current request.
 void setLocationMark(LocationMark landmark)
          Set the landmark that identifies the location of the caller.
 void setParameter(java.lang.String paramName, java.lang.String paramValue)
          Set the value of a named parameter in the "Parameters" category
 void setProfile(Profile profile)
          Set the user profile.
 void setSenderAddress(DeliveryType deliveryType, java.lang.String address, java.lang.String[] carrierInfo)
          Sets the address of the sender
 void setUserAgent(java.lang.String userAgent)
          Set the type of the user agent.
 void terminateSession()
          Terminate the user's session and return a logon page.
 ServiceContext validate()
          Validate the request by authenticating the user and authorizing the service.
 

Field Detail

USER_NAME

public static final java.lang.String USER_NAME
The name of the log-in user

EFFECTIVE_USER_NAME

public static final java.lang.String EFFECTIVE_USER_NAME
The name of the effective user

PASSWORD

public static final java.lang.String PASSWORD
The password for log-in user

SERVICE_OID

public static final java.lang.String SERVICE_OID
The object id of the requested service

SESSION_HOME

public static final java.lang.String SESSION_HOME
The object id of the service that is the session home

GO_SESSION_HOME

public static final java.lang.String GO_SESSION_HOME
A request to invoke the session home service

SERVICE_PATH

public static final java.lang.String SERVICE_PATH
The path of the requested service in the repository

VIRTUAL_URL

public static final java.lang.String VIRTUAL_URL
The virtual URL of the requested module

CALLBACK_URL

public static final java.lang.String CALLBACK_URL
The callback URL used by the module caller

FULL_CALLBACK_URL

public static final java.lang.String FULL_CALLBACK_URL
The full (non-cached) callback URL used by the module caller

CALLBACK_LABEL

public static final java.lang.String CALLBACK_LABEL
The callback label used by the module caller

MODULE_STACK_SIZE

public static final java.lang.String MODULE_STACK_SIZE
The current size of the module stack

SHORT_NAME

public static final java.lang.String SHORT_NAME
The short name for the service

SECTION

public static final java.lang.String SECTION
The name of a section in a Web Integration Adapter

SESSION_ID

public static final java.lang.String SESSION_ID
The session id parameter used to track the user sessions

REQUEST_LANDMARK

public static final java.lang.String REQUEST_LANDMARK
The parameter used to specify a landmark for the request

SESSION_LANDMARK

public static final java.lang.String SESSION_LANDMARK
The parameter used to specify a landmark for the session

REQUEST_USER_PROFILE

public static final java.lang.String REQUEST_USER_PROFILE
The parameter used to specify a user profile for the request

SESSION_USER_PROFILE

public static final java.lang.String SESSION_USER_PROFILE
The parameter used to specify a user profile for the session

LOGIN

public static final java.lang.String LOGIN
The parameter used to force a new login dialog

LOGOFF

public static final java.lang.String LOGOFF
The parameter used to logoff the user and invalidate the session

DEBUG

public static final java.lang.String DEBUG
The optional parameter to enable logging of debug information

SERVICE_DESIGNER

public static final java.lang.String SERVICE_DESIGNER
The parameter used by service designer to request adpater or simple results

MS_XFORMER

public static final java.lang.String MS_XFORMER
The parameter can be used to select the result transformer other than the transformer designated by PAsection name

CONNXN_ID

public static final java.lang.String CONNXN_ID
The parameter used to identify the re-entrant request for a request currently blocked on a cache lookup

DEVICE_ID

public static final java.lang.String DEVICE_ID
The parameter used to identify the device for a re-entrant request on a cache lookup

CHILDREN_DISPLAY_POSITION

public static final java.lang.String CHILDREN_DISPLAY_POSITION
The parameter used by folder render to decide current position of displayed children

GET_PAGE

public static final java.lang.String GET_PAGE

LOCALE_PREFERENCE

public static final java.lang.String LOCALE_PREFERENCE
Method Detail

getAttribute

public java.lang.Object getAttribute(AttributeCategory category,
                                     java.lang.String name)
Get the value of the named attribute in the chosen category
Parameters:
category - the attribute category
name - the name of the attribute
Returns:
the value of the attribute

setAttribute

public void setAttribute(AttributeCategory category,
                         java.lang.String name,
                         java.lang.Object value)
Set the value of the named attribute in the chosen category
Parameters:
category - the attribute category
name - the name of the attribute
value - the value for named attribute

getAttributeNames

public java.util.Enumeration getAttributeNames(AttributeCategory category)
Get an enumeration of all attribute names in a given category
Parameters:
category - the attribute category
Returns:
an enumeration of Strings for attribute names

removeAttribute

public void removeAttribute(AttributeCategory category,
                            java.lang.String name)
Remove the named attribute from the given category
Parameters:
category - the attribute category
name - the name of the attribute

getParameter

public java.lang.String getParameter(java.lang.String paramName)
Get the value of a parameter from the "Parameters" category
Parameters:
paramName - name of the parameter
Returns:
value of the named parameter

getParameterValues

public java.lang.String[] getParameterValues(java.lang.String paramName)
Get the values of a parameter from the "Parameters" category
Parameters:
paramName - name of the parameter
Returns:
a array containing values of the named parameter

setParameter

public void setParameter(java.lang.String paramName,
                         java.lang.String paramValue)
Set the value of a named parameter in the "Parameters" category
Parameters:
paramName - name of the parameter
paramValue - value of the parameter

removeParameter

public void removeParameter(java.lang.String paramName)
Remove the parameter from the "Parameters" category
Parameters:
paramName - name of the parameter

getCharacterEncoding

public java.lang.String getCharacterEncoding()
Get the language and locale used for character encoding
Returns:
a string value like ISO-8859-n

getScheme

public java.lang.String getScheme()
Get the schema used for the request message. For device user agents, possible values of schema are "http", "https", or "ftp". For runtime agent or recursive invocation, the schema is "internal".
Returns:
the name of the schema used for request messaging

getRemoteAddress

public java.lang.String getRemoteAddress()
Get the IP address or other network address of the user agent. Returns "local" if the request is from an internal runtime agent.
Returns:
the network address of the user agent or runtime agent

isSecure

public boolean isSecure()
Verify whether the request is transmitted over a secure channel such HTTPS or SSL.
Returns:
true if the messaging channel is secure

getAuthenticationType

public java.lang.String getAuthenticationType()
Get the type of authentication used to identify the user.
Returns:
the type may be name of AuthenticationContext
See Also:
AuthenticationContext

getRemoteUser

public java.lang.String getRemoteUser()
Returns the name of the user making this request, if the user has been authenticated (say thru mod_sso), or null if the user has not been authenticated.
Returns:
the name of the user making this request or null

getRemoteAuthenticationType

public java.lang.String getRemoteAuthenticationType()
Returns the name of the authentication scheme used to authenticate the user.
Returns:
the name of the authentication scheme

getRequestedSessionId

public java.lang.String getRequestedSessionId()
Get the session id contained in the request.
Returns:
return the value of "PAsid" parameter if any

isRequestedSessionIdValid

public boolean isRequestedSessionIdValid()
Test if the requested session id is valid. Session id is valid if the user session has not expired.
Returns:
true if the session id is still valid or authentication succeeds and a new session has been validated.

isValid

public boolean isValid()
Test if the user is authenticated and session has been established.
Returns:
true if the user is authenticated and service is authorized

getSession

public Session getSession()
Get the session associated with the current request. The session id in the request may be used to locate the session.
Returns:
the session for the user agent that sends the request

getServiceContext

public ServiceContext getServiceContext()
Get the service context for the current request, current session, and requested service. A service context provides an API based on the XML document model for setting and transforming response data.
Returns:
a service context for current request, session, and service

getDevice

public Device getDevice()
Get the device model derived from the user agent type.
Returns:
the device model

getServiceOid

public long getServiceOid()
                   throws PanamaException
Get the value of "PAoid" parameter which specifies the object id of the requested service.
Returns:
the unique object id of the requested service

getServicePath

public java.lang.String getServicePath()
Get the value of "PAservicepath" which specifies the path of the requested service in the repository.
Returns:
the absolute path of the requested service in the repository

setUserAgent

public void setUserAgent(java.lang.String userAgent)
Set the type of the user agent. Using this method, non-http clients can programmatically set the user agent name to have an equivalent effect as the "user-agent" attribute in http header. The user agent is used to determine the device type.
Parameters:
userAgent - the type of the user-agent
See Also:
DeviceIdentificationHook

getArguments

public Arguments getArguments()
                       throws PanamaException
Get the arguments containing all URL parameters and header attributes. return the input arguments

execute

public Response execute()
                 throws PanamaException
Execute a newly created request. It applies the business logics such as authentication, authorization, and invocation of the service using the given parameters.
Returns:
the response that contains data from the invoked service

validate

public ServiceContext validate()
                        throws PanamaException
Validate the request by authenticating the user and authorizing the service.
Returns:
the service context if the validation succeeds

invalidate

public void invalidate()
Invalidate the request and the associated service context and response objects. Resources associated with the service context will be released. Invalidation may be mandatory for some type of requests.

isDebugOn

public boolean isDebugOn()
Test whether logging of debug information is requested. This flag may be set through setDebugOn(boolean value) method. It may also be set through the URL using the "PAdebug" parameter.
Returns:
true if logging of debug information is selected

setDebugOn

public void setDebugOn(boolean value)
Set the flag to request logging of debug information for the current request.
Parameters:
value - true to select debug logging

addRequestListener

public void addRequestListener(RequestListener listener)
Add a listener for events from this request.

removeRequestListener

public void removeRequestListener(RequestListener listener)
Remove a listener for events from this request.

addRequestListeners

public void addRequestListeners(java.util.Vector listeners)
Add a collection of listeners for events from request object.

removeRequestListeners

public void removeRequestListeners(java.util.Vector listeners)
Remove a collection of listeners for events from request object.

setLocationMark

public void setLocationMark(LocationMark landmark)
Set the landmark that identifies the location of the caller. End-users may specify their location by selecting from a list of predefined land marks.
Parameters:
landmark - the landmark that identifies the location of the caller

getLocationMark

public LocationMark getLocationMark()
Get the landmark that identifies the location of the caller. End-users may specify their location by selecting from a list of predefined location marks.
Returns:
the landmark that identifies the location of the caller

getCurrentLocation

public Point getCurrentLocation()
                         throws CallerLocationException
Get the location of the user using one of the following sources, 1. from automatic location tracking module 2. from current landmark specified by user 3. or from the default landmark in the user profile
Throws:
CallerLocationException -  

getLocationAcquisitionTime

public java.util.Date getLocationAcquisitionTime()
Get the time when the user location was acquired
Returns:
Date the time

isAutoLocated

public boolean isAutoLocated()
Get the auto located (boolean) value.
Returns:
the boolean value of the boolean parameter
See Also:
setAutoLocated(boolean)

setAutoLocated

public void setAutoLocated(boolean autoLocated)
Set the auto located (boolean) parameter.
Parameters:
autoLocated - the new value for the boolean parameter
See Also:
isAutoLocated()

getHeaderAttributes

public java.util.Enumeration getHeaderAttributes()
Get the enumeration of attributes obtained from http header or equivalent source.

getDeviceId

public java.lang.String getDeviceId()
Get the device id,
Returns:
the device id string

getMobileId

public java.lang.String getMobileId()
Get the mobile id, which can be used for automatic location acquisition.
Returns:
the mobile id string

getSubscriberId

public java.lang.String getSubscriberId()
Deprecated. use getMobileId instead

Get the subscriber id, which can be used for automatic location acquisition.
Returns:
the subscriber id string

terminateSession

public void terminateSession()
Terminate the user's session and return a logon page.

getProfile

public Profile getProfile()
Get the user profile.

setProfile

public void setProfile(Profile profile)
Set the user profile.

setSenderAddress

public void setSenderAddress(DeliveryType deliveryType,
                             java.lang.String address,
                             java.lang.String[] carrierInfo)
Sets the address of the sender
Parameters:
deliveryType - the delivery type
address - the address of the sender
carrierInfo - delivery type specific parameters. For example, imap/pop server address for EMAIL delivery type

getDeviceAddress

public DeviceAddress getDeviceAddress()

getCarriers

public java.lang.String[] getCarriers()

getUserHomeURL

public java.lang.String getUserHomeURL()
Returns:
the user's home deck url

getServiceHomeURL

public java.lang.String getServiceHomeURL()
Returns:
service home url

getServiceParentURL

public java.lang.String getServiceParentURL()
Returns:
the containing folder url

getResponse

public Response getResponse()
Get the Response interface associated with this request.