All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class org.w3c.jigsaw.frames.PostableFrame

java.lang.Object
   |
   +----org.w3c.tools.resources.AttributeHolder
           |
           +----org.w3c.tools.resources.Resource
                   |
                   +----org.w3c.tools.resources.FramedResource
                           |
                           +----org.w3c.tools.resources.ResourceFrame
                                   |
                                   +----org.w3c.tools.resources.ProtocolFrame
                                           |
                                           +----org.w3c.jigsaw.frames.HTTPFrame
                                                   |
                                                   +----org.w3c.jigsaw.frames.PostableFrame

public class PostableFrame
extends HTTPFrame
Handle POST.


Variable Index

 o ATTR_CONVERT_GET
Attribute index - Should we silently convert GET to POST methods ?
 o ATTR_OVERIDE
Attribute index - Should we override form values when multiple ?

Constructor Index

 o PostableFrame()

Method Index

 o get(Request)
Get this resource body.
 o getConvertGetFlag()
Get the 'convert GET to POST' flag.
 o getOverrideFlag()
Get the 'override multiple form field value' flag.
 o handle(Request, URLDecoder)
Handle the form submission, after posted data parsing.
 o post(Request)
Perform the post method.
 o setValue(int, Object)
Catch setValue, to maintain cached header values correctness.

Variables

 o ATTR_OVERIDE
 protected static int ATTR_OVERIDE
Attribute index - Should we override form values when multiple ?

 o ATTR_CONVERT_GET
 protected static int ATTR_CONVERT_GET
Attribute index - Should we silently convert GET to POST methods ?

Constructors

 o PostableFrame
 public PostableFrame()

Methods

 o getConvertGetFlag
 public boolean getConvertGetFlag()
Get the 'convert GET to POST' flag.

 o getOverrideFlag
 public boolean getOverrideFlag()
Get the 'override multiple form field value' flag.

 o setValue
 public synchronized void setValue(int idx,
                                   Object value)
Catch setValue, to maintain cached header values correctness.

Parameters:
idx - The index of the attribute to be set.
value - The new value for the attribute.
Overrides:
setValue in class HTTPFrame
 o get
 public Reply get(Request request) throws ProtocolException, ResourceException
Get this resource body. If we are allowed to convert GET requests to POST, than we first check to see if there is some search string in the request, and continue with normal POST request processing.

If there is no search string, or if we are not allowed to convert GETs to POSTs, than we just invoke our super method, which will perform the appropriate job.

Parameters:
request - The request to handle.
Throws: ProtocolException
If request couldn't be processed.
Throws: ResourceException
If the resource got a fatal error.
Overrides:
get in class HTTPFrame
 o post
 public Reply post(Request request) throws ProtocolException, ResourceException
Perform the post method.

Parameters:
request - The request to handle.
Throws: ProtocolException
If request couldn't be processed.
Throws: ResourceException
If the resource got a fatal error.
Overrides:
post in class HTTPFrame
 o handle
 public Reply handle(Request request,
                     URLDecoder data) throws ProtocolException
Handle the form submission, after posted data parsing.

This method ought to be abstract, but for reasonable reason, it will just dump (parsed) the form content back to the client, so that it can be used for debugging.

Parameters:
request - The request proper.
data - The parsed data content.
Throws: ProtocolException
If form data processing failed.
See Also:
URLDecoder

All Packages  Class Hierarchy  This Package  Previous  Next  Index