SilverStream
Application Server 3.5

com.sssw.srv.busobj
Class AgoHttpRequestEvent

java.lang.Object
 |
 +--java.util.EventObject
       |
       +--com.sssw.srv.busobj.AgoBusinessObjectEvent
             |
             +--com.sssw.srv.busobj.AgoHttpRequestEvent
All Implemented Interfaces:
AgiHttpServletRequest, HttpServletRequest, Serializable, ServletRequest

public class AgoHttpRequestEvent
extends AgoBusinessObjectEvent
implements AgiHttpServletRequest

Extends javax.servlet.ServletRequest for use with <INPUT TYPE=FILE> fields in a multipart/form-data POST.

See Also:
Serialized Form

Fields inherited from class java.util.EventObject
source
 
Constructor Summary
AgoHttpRequestEvent()
           
 
Method Summary
static Hashtable decodeURLEncodedForm(String s)
          Takes a string encoded as an application/x-www-form-urlencoded MIME type and parses it into a Hashtable of query terms.
static String getContentTypeFromExtension(String ext)
          Utility routine to get the content type in string form from an extension in String form.
 URL getDatabaseURL()
          Return the current database's URL.
static String getExtensionFromURL(String url)
          Utility routine to get the extension from a String form of an URL.
 byte[] getFileContent(String name)
          Returns the file content from an HTML form-field of type <INPUT TYPE=FILE>
 String getFileContentType(String name)
          Returns the file content type (MimeType) from an HTML form-field of type <INPUT TYPE=FILE>.
 
Methods inherited from class com.sssw.srv.busobj.AgoBusinessObjectEvent
getAgaData, getDatabase, getServer, getSession, getUser, runAgData, updateTransactionally, userInGroup
 
Methods inherited from class java.util.EventObject
getSource, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods implemented from interface com.sssw.shr.http.AgiHttpServletRequest
delegateToPage, getParameterAsObject, invokeBusinessObject, invokeBusinessObject
 
Methods implemented from interface javax.servlet.http.HttpServletRequest
getAuthType, getCookies, getDateHeader, getHeader, getHeaderNames, getIntHeader, getMethod, getPathInfo, getPathTranslated, getQueryString, getRemoteUser, getRequestedSessionId, getRequestURI, getServletPath, getSession, isRequestedSessionIdFromCookie, isRequestedSessionIdFromUrl, isRequestedSessionIdFromURL, isRequestedSessionIdValid
 
Methods implemented from interface javax.servlet.ServletRequest
getAttribute, getAttributeNames, getCharacterEncoding, getContentLength, getContentType, getInputStream, getParameter, getParameterNames, getParameterValues, getProtocol, getReader, getRealPath, getRemoteAddr, getRemoteHost, getScheme, getServerName, getServerPort, setAttribute
 

Constructor Detail

AgoHttpRequestEvent

public AgoHttpRequestEvent()
Method Detail

getFileContent

public byte[] getFileContent(String name)
Returns the file content from an HTML form-field of type <INPUT TYPE=FILE>
Specified by:
getFileContent in interface AgiHttpServletRequest
Parameters:
name - a String
Usage:

The file pathname is accessed using getValue() for the same Parameter name.

See Also:
AgoHttpRequestEvent.getFileContentType( String name )

getFileContentType

public String getFileContentType(String name)
Returns the file content type (MimeType) from an HTML form-field of type <INPUT TYPE=FILE>.
Specified by:
getFileContentType in interface AgiHttpServletRequest
Parameters:
name - parameter name as a String
Usage:

The file pathname is accessed using getValue for the same Parameter name.

See Also:
AgoHttpRequestEvent.getFileContent( String name )

getExtensionFromURL

public static String getExtensionFromURL(String url)
                                  throws AgoUnrecoverableSystemException
Utility routine to get the extension from a String form of an URL.
Parameters:
url - an URL in String form.
Usage:

Note that in 1.0 this method used to throw AgentException. It now throws AgoUnrecoverableSystemException on error. The upgrade tool that upgrades UserContentAgents to Servlets (and TableListeners) makes this conversion on preexisting code.


getContentTypeFromExtension

public static String getContentTypeFromExtension(String ext)
                                          throws AgoUnrecoverableSystemException
Utility routine to get the content type in string form from an extension in String form.
Parameters:
ext - an extension in String form.

decodeURLEncodedForm

public static Hashtable decodeURLEncodedForm(String s)
Takes a string encoded as an application/x-www-form-urlencoded MIME type and parses it into a Hashtable of query terms.
Returns:
A Hashtable of the query terms or null on error

getDatabaseURL

public URL getDatabaseURL()
Return the current database's URL.
Specified by:
getDatabaseURL in interface AgiHttpServletRequest
Overrides:
getDatabaseURL in class AgoBusinessObjectEvent
Usage:
Used for HTTP 1.1 requests to ensure that the hostname is provided by the servlet's request header.

SilverStream
Application Server 3.5