com.plumtree.openfoundation.web
Interface IXPRequest

All Known Implementing Classes:
XPRequest

public interface IXPRequest

Summary description for IXPRequest.


Method Summary
 void ClearUnderlyingObject()
          Clear all the member variables.
 java.lang.Object GetAttribute(java.lang.String name)
          Returns the named attribute.
 java.lang.String GetAuthType()
          Returns the name of the authentication scheme used.
 java.lang.String GetBasicAuthPassword()
          Returns the password being used for basic authentication.
 java.lang.String GetBasicAuthUserName()
          Returns the user name being used for basic authentication.
 byte[] GetBytes()
          Returns the uploaded data.
 java.lang.String GetClientAddress()
          Returns the IP address of the client as a String in dotted quad form.
 java.lang.String GetCompletePath()
          Returns the complete path to the uploaded file.
 int GetContentLength()
          Returns the length of the content sent by the client in bytes.
 java.lang.String GetContentType()
          Returns the MIME type of the content sent by the client.
 XPCookie[] GetCookies()
          Returns an array of cookies sent by the client.
 java.lang.String GetHeader(java.lang.String name)
          Returns the value of the given HTTP header.
 IXPEnumerator GetHeaderNames()
          Returns an Enumeration of names of all HTTP headers in the HTTP request.
 XPInputStream GetInputStream()
          Returns the content of the incoming HTTP body.
 IXPEnumerator GetLocales()
          Returns an Enumeration of XPLocale that the client will accept content in, based on the Accept-Language header.
 java.lang.String GetMethod()
          Returns the HTTP data transfer method used by the client.
 IXPEnumerator GetParameterNames()
          Returns an Enumeration of names of the parameters that are passed by the client using one of the HTTP data transfer methods like GET or POST.
 java.lang.String GetParameterValue(java.lang.String name)
          Returns the value of the parameter given the parameter name.
 java.lang.String[] GetParameterValues(java.lang.String name)
          Returns an array of the values of the parameter given the parameter name.
 java.lang.String GetQueryString()
          Returns the query string.
 java.lang.String GetRemoteFilePath()
          Returns the path to the remote file to be uploaded.
 java.lang.String GetRemoteUser()
          Returns the name of the remote user, if present; otherwise empty string.
 java.lang.String GetRequestedSessionId()
          Returns the session ID specified by the client.
 java.lang.String GetRequestURI()
          Returns the section of the URL between the protocol and the query string.
 java.lang.String GetRequestURL()
          Returns the full URL, without the query string.
 java.lang.String GetScheme()
          Returns a String containing the name of the scheme used to make this request (such as http, https, or ftp).
 java.lang.String GetServerName()
          Returns the host name of the server.
 int GetServerPort()
          Returns the server port.
 java.lang.String GetServerVariable(java.lang.String name)
          Deprecated. This method is deprecated, because it will always behave differently in Java and .NET
 IXPEnumerator GetServerVariableNames()
          Deprecated. This method is deprecated, because it will always behave differently in Java and .NET
 XPSession GetSession()
          Returns the XPSession for this request.
 boolean IsSecureConnection()
          Returns a boolean indicating whether this request was made using a secure channel, such as HTTPS.
 void ParseRequest()
          Gets the QueryString and Form data and constructs a hashtable of parameter/value pairs.
 void Save(java.lang.String _sFilePath)
          Saves the last file to be uploaded from a multi-part MIME request to the specified directory.
 void SetAttribute(java.lang.String name, java.lang.Object _value)
          Sets the named attribute.
 

Method Detail

GetAttribute

public java.lang.Object GetAttribute(java.lang.String name)
Returns the named attribute.

Parameters:
name - Name of the attribute
Returns:
Object value of the attribute

GetContentLength

public int GetContentLength()
Returns the length of the content sent by the client in bytes.

Returns:
Length of the content sent by the client in bytes

GetAuthType

public java.lang.String GetAuthType()
Returns the name of the authentication scheme used.

Returns:
string indicating the authentication scheme, or null if no authentication is being used.

GetBasicAuthUserName

public java.lang.String GetBasicAuthUserName()
Returns the user name being used for basic authentication.

Returns:
The user name being used for basic authentication, empty string if basic authentication is not being used.

GetBasicAuthPassword

public java.lang.String GetBasicAuthPassword()
Returns the password being used for basic authentication.

Returns:
The password being used for basic authentication, empty string if basic authentication is not being used.

GetClientAddress

public java.lang.String GetClientAddress()
Returns the IP address of the client as a String in dotted quad form.

Returns:
the IP address of the client in dotted quad form.

GetContentType

public java.lang.String GetContentType()
Returns the MIME type of the content sent by the client.

Returns:
MIME type of the content sent by the client. For e.g. text/html null if type is not known.

GetInputStream

public XPInputStream GetInputStream()
Returns the content of the incoming HTTP body.

Returns:
content of the incoming HTTP body stored as an XPInputStream object

GetCookies

public XPCookie[] GetCookies()
Returns an array of cookies sent by the client.

Returns:
Array of cookies sent by the client. An empty array if there are no cookies

GetHeader

public java.lang.String GetHeader(java.lang.String name)
Returns the value of the given HTTP header.

Parameters:
name - Name of the HTTP header. For e.g. HTTP_USER_AGENT
Returns:
The given HTTP header as a String, null if not found.

GetHeaderNames

public IXPEnumerator GetHeaderNames()
Returns an Enumeration of names of all HTTP headers in the HTTP request.

Returns:
Enumeration of names of all HTTP headers in the HTTP request

GetLocales

public IXPEnumerator GetLocales()
Returns an Enumeration of XPLocale that the client will accept content in, based on the Accept-Language header.

Returns:
Enumeration of XPLocale objects.

GetMethod

public java.lang.String GetMethod()
Returns the HTTP data transfer method used by the client.

Returns:
String value that specifies the HTTP data transfer method used by the client. For e.g., GET, POST, HEAD etc.

GetParameterNames

public IXPEnumerator GetParameterNames()
Returns an Enumeration of names of the parameters that are passed by the client using one of the HTTP data transfer methods like GET or POST.

Returns:
Enumeration of names of the parameters that are passed by the client using one of the HTTP data transfer methods like GET or POST

GetParameterValue

public java.lang.String GetParameterValue(java.lang.String name)
Returns the value of the parameter given the parameter name.

Parameters:
name - Name of the parameter
Returns:
Value of the parameter, null if not found.

GetParameterValues

public java.lang.String[] GetParameterValues(java.lang.String name)
Returns an array of the values of the parameter given the parameter name.

Parameters:
name - Name of the parameter
Returns:
Array of the values of the parameter

IsSecureConnection

public boolean IsSecureConnection()
Returns a boolean indicating whether this request was made using a secure channel, such as HTTPS.

Returns:
a boolean indicating whether this request was made using a secure channel, such as HTTPS.

GetQueryString

public java.lang.String GetQueryString()
Returns the query string.

Returns:
a String that is the query string, null if no query string present.

GetRequestedSessionId

public java.lang.String GetRequestedSessionId()
Returns the session ID specified by the client.

Returns:
a String that is the session ID, null if not specified.

GetRequestURI

public java.lang.String GetRequestURI()
Returns the section of the URL between the protocol and the query string.

Returns:
A String for the URI.

GetRequestURL

public java.lang.String GetRequestURL()
Returns the full URL, without the query string.

Returns:
A String for the full URL, without query string.

GetRemoteUser

public java.lang.String GetRemoteUser()
Returns the name of the remote user, if present; otherwise empty string.

Returns:
The remote user name.

GetScheme

public java.lang.String GetScheme()
Returns a String containing the name of the scheme used to make this request (such as http, https, or ftp).

Returns:
a String containing the name of the scheme used to make this request

GetServerName

public java.lang.String GetServerName()
Returns the host name of the server.

Returns:
A String containing the host name of the server

GetServerPort

public int GetServerPort()
Returns the server port.

Returns:
The integer value of the server port.

GetServerVariable

public java.lang.String GetServerVariable(java.lang.String name)
Deprecated. This method is deprecated, because it will always behave differently in Java and .NET

Returns the server variable (same as attribute in Java).

Parameters:
name - Name of the
Returns:
String value of the server variable.

GetServerVariableNames

public IXPEnumerator GetServerVariableNames()
Deprecated. This method is deprecated, because it will always behave differently in Java and .NET

Returns an enumeration of the server variables (same as attribute in Java).

Returns:
An enumeration of the server variables.

GetSession

public XPSession GetSession()
Returns the XPSession for this request.

Returns:
the XPSession for this request.

SetAttribute

public void SetAttribute(java.lang.String name,
                         java.lang.Object _value)
Sets the named attribute.

Parameters:
name - Name of the attribute
_value - Object value of the attribute

GetBytes

public byte[] GetBytes()
Returns the uploaded data.

Returns:
the uploaded data as a byte array, null if no data.

GetCompletePath

public java.lang.String GetCompletePath()
Returns the complete path to the uploaded file. This method is only valid after XPRequest.Save() has been called. It will return null until then.

Returns:
a String containing the complete path to the uploaded file, null if no file was uploaded.

GetRemoteFilePath

public java.lang.String GetRemoteFilePath()
Returns the path to the remote file to be uploaded. This is the last file to be uploaded in a multi-part MIME request.

Returns:
a String containing the path to the remote file to be uploaded, null if no file was uploaded.

Save

public void Save(java.lang.String _sFilePath)
          throws java.io.IOException
Saves the last file to be uploaded from a multi-part MIME request to the specified directory.

Parameters:
_sFilePath - a String containing the path to the directory where the remote file should be uploaded to.
Throws:
java.io.IOException - if saving into file fails.

ParseRequest

public void ParseRequest()
Gets the QueryString and Form data and constructs a hashtable of parameter/value pairs. If more than one parameter has the same name, then the value of that parameter would be an array of strings with all values for that parameter. If it is a multipart form, then the file and parameter parts are parsed. The UI should only upload a single file at a time. After this method is called, the POST body is no longer available and the input stream will not return any data.

Throws:
java.io.IOException - if it can't parse the request.

ClearUnderlyingObject

public void ClearUnderlyingObject()
Clear all the member variables.



Copyright © 2002, 2003, 2004 Plumtree Software Inc. All Rights Reserved.