oracle.panama.rt
Interface ServiceContext


public interface ServiceContext

This interface represents the ServiceContext objects in PTG Runtime.

Since:
Oracle9i Application Server Wireless Edition

Field Summary
TypeField
static java.lang.String ABS_REQUEST_NAME
          The Argument with this name contains the page-name of the request.
Eg.
static java.lang.String ACCEPT_LANG
          Http header attribute name for accepted language list
static java.lang.String AMP_EXPLICIT
           
static java.lang.String COUNTRY
          The argument with this name contains the country name of the current location
static java.lang.String DEVICE
          The argument with this name contains the name of the device model
static java.lang.String DEVICE_CATEGORY
           
static java.lang.String ENC_SUFFIX
          Suffix for encoded parameters among the arguments
static java.lang.String FIRST_ACCEPT_LANG
          The argument with this name contains the first language derived from the list of accepted languages specified in the http header.
static java.lang.String HTTP_REQUEST_NAME
          The Argument with this name contains absolute URL to the portal servlet using the HTTP protocol
static java.lang.String HTTPS_REQUEST_NAME
          The Argument with this name contains absolute URL to the portal servlet using the HTTPS protocol
static java.lang.String IMAGE_PREFERENCES
           
static java.lang.String INP_FIRST_SERVICE_NAME
          The Argument with this name contains the name of Service which is invoked.
Ex.
static java.lang.String INP_FIRST_SERVICE_NAME_ENC
          Encoded INP_FIRST_SERVICE_NAME
static java.lang.String INP_FIRST_SERVICE_URL
          The Argument with this name contains the comlete URL of Service which is invoked.
Ex.
static java.lang.String INP_FIRST_SERVICE_URL_ENC
          Encoded INP_FIRST_SERVICE_NAME
static java.lang.String LATITUDE
          The argument with this name contains the latitude part of the current location
static java.lang.String LONGITUDE
          The argument with this name contains the longitude part of the current location
static java.lang.String MAX_DOC_SIZE
           
static java.lang.String POSTALCODE
          The argument with this name contains the postalcode of the current location
static java.lang.String REQUEST_NAME
          The Argument with this name contains the page-name of the request.
Eg.
static java.lang.String RESULT
          The XML element tag name for results
static java.lang.String SCREEN_COLS
           
static java.lang.String SCREEN_HEIGHT
           
static java.lang.String SCREEN_ROWS
           
static java.lang.String SCREEN_WIDTH
           
static java.lang.String SERVICE_REQUEST
          The XML element tag name for service request information
static java.lang.String SESSION
          The Argument with this name contains the session id url.
Eg.
static java.lang.String SOFT_KEYS
           
static java.lang.String SR_FROM_ADAPTER
          For debug, the service request information from the Adapter is stored under this name
static java.lang.String SR_FROM_SERVICE
          For debug, the service request information from the the Service is stored under this name
static java.lang.String STATE
          The argument with this name contains the state name of the current location
static java.lang.String USER
          The argument with this name contains the name of the user
static java.lang.String USER_AGENT
           
static java.lang.String USER_LANGUAGE
          The argument with this name contains the preferred language for the user
 
Method Summary
TypeMethod
 org.w3c.dom.Element getAdapterResult()
           
 java.lang.String getAdapterResultString()
          Get the string result of the invocation of the adapter.
 byte[] getBinaryDeviceResult()
          Get the device result given in the device's markup language.
 Folder getCurrentFolder()
          Get the current folder
 Device getDevice()
          Get the device object representing the capability of the user agent that issues the request.
 java.lang.String getDeviceResult()
          Get the device result given in the device's markup language.
 int getDeviceResultLength()
          Get the content length of binary result.
 java.lang.String getDeviceResultType()
          Get the content type of binary result.
 org.w3c.dom.Element getElement()
          Externalize the contents of ServiceContext in XML doument format.
 org.w3c.dom.Element getElement(org.w3c.dom.Document owner)
          Externalize the contents of ServiceContext in XML doument format.
 java.lang.String getExceptionMessage()
          Get the diagnostic message from XML transformers and parsers.
 Arguments getInputArguments()
          Get an array of input arguments for the service.
 OutputArguments getOutputArguments()
           
 Profile getProfile()
          Get the user profile for the request.
 Request getRequest()
          Get the request that initiated the service invocation context.
 Response getResponse()
          Get the response that will receive the output from service invocation.
 java.lang.String getSection()
           
 java.lang.String getServerInfo()
          Get the name and version of the server software, separated by a forward slash (/).
 Service getService()
          Get the service to be invoked for the current request.
 java.lang.String getServiceHomeURL()
           
 java.lang.String getServiceParentURL()
           
 Session getSession()
          Get the session for the service context.
 org.w3c.dom.Element getSimpleResult()
          Get the simple result after one or more XML transformations.
 java.lang.String getSimpleResultString()
          Get the string for the simple result.
 java.lang.String getSRDTDVersion()
          Get the dtd version of the simple result
 java.lang.String getUserHomeURL()
           
 org.w3c.dom.Document getXMLDocument()
          Get the XML document to contain all dom elements created for this context.
 boolean isAnyResultPresent()
          Check if the results are suppressed
 void setAdapterResult(org.w3c.dom.Element result)
           
 void setAnyResultPresent(boolean present)
          This flag is normally true, but can be changed to false to suppress the output results.
 void setDeviceResult(byte[] result, java.lang.String contentType, int contentLength)
          Set the device result given in the device's markup language.
 void setDeviceResult(java.lang.String result)
          Set the device result given in the device's markup language.
 void setDeviceResult(java.lang.String result, java.lang.String contentType, int contentLength)
          Set the device result given in the device's markup language.
 void setExceptionMessage(java.lang.String msg)
          Set the diagnostic message from XML transformers and parsers.
 void setInputArguments(Arguments args)
          Set the input arguments for the service.
 void setOutputArguments(OutputArguments args)
           
 void setSimpleResult(org.w3c.dom.Element result)
          Set the simple result after one or mor XML transformations.
 

Field Detail

SERVICE_REQUEST

public static final java.lang.String SERVICE_REQUEST
The XML element tag name for service request information

RESULT

public static final java.lang.String RESULT
The XML element tag name for results

DEVICE

public static final java.lang.String DEVICE
The argument with this name contains the name of the device model

REQUEST_NAME

public static final java.lang.String REQUEST_NAME
The Argument with this name contains the page-name of the request.
Eg. In the string "http://www.panama.com/master/parm.jsp?PAservicepath=/master/getQuote" the REQUEST_NAME holds "parm.jsp".

ABS_REQUEST_NAME

public static final java.lang.String ABS_REQUEST_NAME
The Argument with this name contains the page-name of the request.
Eg. In the string "http://www.panama.com/ptg/rm?PAservicepath=/master/getQuote" the ABS_REQUEST_NAME holds "http://www.panama.com/ptg/rm".

HTTP_REQUEST_NAME

public static final java.lang.String HTTP_REQUEST_NAME
The Argument with this name contains absolute URL to the portal servlet using the HTTP protocol

HTTPS_REQUEST_NAME

public static final java.lang.String HTTPS_REQUEST_NAME
The Argument with this name contains absolute URL to the portal servlet using the HTTPS protocol

SESSION

public static final java.lang.String SESSION
The Argument with this name contains the session id url.
Eg. PAsid=3

INP_FIRST_SERVICE_NAME

public static final java.lang.String INP_FIRST_SERVICE_NAME
The Argument with this name contains the name of Service which is invoked.
Ex. In the string "http://www.panama.com/master/parm.jsp?PAservicepath=/master/getQuote" the INP_FIRST_SERVICE_NAME holds "getQuote".

ENC_SUFFIX

public static final java.lang.String ENC_SUFFIX
Suffix for encoded parameters among the arguments

AMP_EXPLICIT

public static final java.lang.String AMP_EXPLICIT

INP_FIRST_SERVICE_NAME_ENC

public static final java.lang.String INP_FIRST_SERVICE_NAME_ENC
Encoded INP_FIRST_SERVICE_NAME

INP_FIRST_SERVICE_URL

public static final java.lang.String INP_FIRST_SERVICE_URL
The Argument with this name contains the comlete URL of Service which is invoked.
Ex. In the string "http://www.panama.com/master/parm.jsp?PAservicepath=/master/getQuote" the INP_FIRST_SERVICE_NAME holds "/master/getQuote".

INP_FIRST_SERVICE_URL_ENC

public static final java.lang.String INP_FIRST_SERVICE_URL_ENC
Encoded INP_FIRST_SERVICE_NAME

SR_FROM_ADAPTER

public static final java.lang.String SR_FROM_ADAPTER
For debug, the service request information from the Adapter is stored under this name

SR_FROM_SERVICE

public static final java.lang.String SR_FROM_SERVICE
For debug, the service request information from the the Service is stored under this name

USER_AGENT

public static final java.lang.String USER_AGENT

ACCEPT_LANG

public static final java.lang.String ACCEPT_LANG
Http header attribute name for accepted language list

FIRST_ACCEPT_LANG

public static final java.lang.String FIRST_ACCEPT_LANG
The argument with this name contains the first language derived from the list of accepted languages specified in the http header.

USER

public static final java.lang.String USER
The argument with this name contains the name of the user

USER_LANGUAGE

public static final java.lang.String USER_LANGUAGE
The argument with this name contains the preferred language for the user

LONGITUDE

public static final java.lang.String LONGITUDE
The argument with this name contains the longitude part of the current location

LATITUDE

public static final java.lang.String LATITUDE
The argument with this name contains the latitude part of the current location

COUNTRY

public static final java.lang.String COUNTRY
The argument with this name contains the country name of the current location

STATE

public static final java.lang.String STATE
The argument with this name contains the state name of the current location

POSTALCODE

public static final java.lang.String POSTALCODE
The argument with this name contains the postalcode of the current location

SCREEN_COLS

public static final java.lang.String SCREEN_COLS

SCREEN_ROWS

public static final java.lang.String SCREEN_ROWS

SCREEN_WIDTH

public static final java.lang.String SCREEN_WIDTH

SCREEN_HEIGHT

public static final java.lang.String SCREEN_HEIGHT

DEVICE_CATEGORY

public static final java.lang.String DEVICE_CATEGORY

SOFT_KEYS

public static final java.lang.String SOFT_KEYS

IMAGE_PREFERENCES

public static final java.lang.String IMAGE_PREFERENCES

MAX_DOC_SIZE

public static final java.lang.String MAX_DOC_SIZE
Method Detail

getServerInfo

public java.lang.String getServerInfo()
Get the name and version of the server software, separated by a forward slash (/).
Returns:
the string value describing the server

getService

public Service getService()
Get the service to be invoked for the current request. The service is specified by "PAoid" or "PAservicepath" parameters.
Returns:
the requested service

getSection

public java.lang.String getSection()
Returns:
the requested section name

getDevice

public Device getDevice()
Get the device object representing the capability of the user agent that issues the request.
Returns:
the associated device model

getSession

public Session getSession()
Get the session for the service context.
Returns:
the session for the service context

getRequest

public Request getRequest()
Get the request that initiated the service invocation context.
Returns:
the request that initiated the current context

getResponse

public Response getResponse()
Get the response that will receive the output from service invocation.
Returns:
the response to receive the service invocation result

getInputArguments

public Arguments getInputArguments()
Get an array of input arguments for the service.
Returns:
an array of input arguments

setInputArguments

public void setInputArguments(Arguments args)
Set the input arguments for the service.
Parameters:
args - an array of input arguments for the service

getCurrentFolder

public Folder getCurrentFolder()
Get the current folder
Returns:
Folder current folder

getOutputArguments

public OutputArguments getOutputArguments()
Returns:
an array of output arguments

setOutputArguments

public void setOutputArguments(OutputArguments args)
Parameters:
args - an array of output arguments for the service

setDeviceResult

public void setDeviceResult(java.lang.String result)
Set the device result given in the device's markup language.

setDeviceResult

public void setDeviceResult(java.lang.String result,
                            java.lang.String contentType,
                            int contentLength)
Set the device result given in the device's markup language.

getDeviceResult

public java.lang.String getDeviceResult()
Get the device result given in the device's markup language.

setDeviceResult

public void setDeviceResult(byte[] result,
                            java.lang.String contentType,
                            int contentLength)
Set the device result given in the device's markup language.

getBinaryDeviceResult

public byte[] getBinaryDeviceResult()
Get the device result given in the device's markup language.

getDeviceResultType

public java.lang.String getDeviceResultType()
Get the content type of binary result.

getDeviceResultLength

public int getDeviceResultLength()
Get the content length of binary result.

getSimpleResultString

public java.lang.String getSimpleResultString()
Get the string for the simple result.
Returns:
the formatted string for simple result

getSRDTDVersion

public java.lang.String getSRDTDVersion()
Get the dtd version of the simple result
Returns:
String the dtd version of Simple Result

getSimpleResult

public org.w3c.dom.Element getSimpleResult()
Get the simple result after one or more XML transformations.
Returns:
the root element of the XML document for simple result

setSimpleResult

public void setSimpleResult(org.w3c.dom.Element result)
Set the simple result after one or mor XML transformations.
Parameters:
result - the root element of the XML document for simple result

getAdapterResultString

public java.lang.String getAdapterResultString()
Get the string result of the invocation of the adapter.
Returns:
the formatted string for adapter result

getAdapterResult

public org.w3c.dom.Element getAdapterResult()
Returns:
the root element of the XML document for adapter result

setAdapterResult

public void setAdapterResult(org.w3c.dom.Element result)
Parameters:
result - the root element of the XML document for adapter result

getExceptionMessage

public java.lang.String getExceptionMessage()
Get the diagnostic message from XML transformers and parsers.

setExceptionMessage

public void setExceptionMessage(java.lang.String msg)
Set the diagnostic message from XML transformers and parsers.

setAnyResultPresent

public void setAnyResultPresent(boolean present)
This flag is normally true, but can be changed to false to suppress the output results. param present false if the results are suppressed

isAnyResultPresent

public boolean isAnyResultPresent()
Check if the results are suppressed
Returns:
false if result has been suppressed

getXMLDocument

public org.w3c.dom.Document getXMLDocument()
Get the XML document to contain all dom elements created for this context.
Returns:
the factory for all dom elements in the document

getElement

public org.w3c.dom.Element getElement()
Externalize the contents of ServiceContext in XML doument format. This may include adapter result, simple result, and all arguments that also include service, device, user, and query parameters. Elements will be created under the service context's document owner.
Returns:
the root element of the XML document

getElement

public org.w3c.dom.Element getElement(org.w3c.dom.Document owner)
Externalize the contents of ServiceContext in XML doument format. This may include adapter result, simple result, and all arguments that also include service, device, user, and query parameters.
Parameters:
owner - the output elements are to be created under the owner document
Returns:
the root element of the XML document

getProfile

public Profile getProfile()
Get the user profile for the request. If no profile specified for request, then get the profile for the session.

getServiceHomeURL

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

getServiceParentURL

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

getUserHomeURL

public java.lang.String getUserHomeURL()
Returns:
home url;