com.ibm.wbi.protocol.http.beans
Class ImageMapRequestEditor

com.ibm.wbi.Meg
  |
  +--com.ibm.wbi.RequestEditor
        |
        +--com.ibm.wbi.protocol.http.HttpRequestEditor
              |
              +--com.ibm.wbi.protocol.http.beans.ImageMapRequestEditor

public class ImageMapRequestEditor
extends HttpRequestEditor

An Editor that creates a request for a specific url based on whether the user clicked inside of an ImageMap.


Field Summary
static java.lang.String COPYRIGHT
          IBM copyright information
protected  ImageMap map
           
 
Fields inherited from class com.ibm.wbi.Meg
EDITOR, GENERATOR, MONITOR, REQUEST_EDITOR, UNDEFINED
 
Constructor Summary
ImageMapRequestEditor()
          Creates a new ImageMapRequestEditor object with no associated ImageMap.
ImageMapRequestEditor(ImageMap m)
          Creates a new ImageMapRequestEditor object with an associated ImageMap.
 
Method Summary
 ImageMap getImageMap()
          Returns the associated ImageMap.
 void handleRequest(RequestEvent e)
          Determines the url associated with the image map the user clicked on.
 void setImageMap(ImageMap m)
          Sets the associated ImageMap.
 
Methods inherited from class com.ibm.wbi.protocol.http.HttpRequestEditor
getOriginalHttpRequest, setFinalHttpRequest
 
Methods inherited from class com.ibm.wbi.RequestEditor
getType
 
Methods inherited from class com.ibm.wbi.Meg
forwardRequest, getCondition, getEnabled, getMegProperty, getMegProperty, getMegPropertyKeys, getName, getPlugin, getPriority, getSystemContext, initialize, initialize, isEnabled, isMegApplicable, loadMegResources, run, setCondition, setEnabled, setMegProperty, setName, setPriority, setSystemContext, setup, setup, setup, setup
 

Field Detail

COPYRIGHT

public static final java.lang.String COPYRIGHT
IBM copyright information

map

protected ImageMap map
Constructor Detail

ImageMapRequestEditor

public ImageMapRequestEditor()
Creates a new ImageMapRequestEditor object with no associated ImageMap.

ImageMapRequestEditor

public ImageMapRequestEditor(ImageMap m)
Creates a new ImageMapRequestEditor object with an associated ImageMap.
Parameters:
m - ImageMap that should be associated with the Editor
Method Detail

setImageMap

public void setImageMap(ImageMap m)
Sets the associated ImageMap.
Parameters:
m - ImageMap that should be associated with the Editor

getImageMap

public ImageMap getImageMap()
Returns the associated ImageMap.
Returns:
ImageMap that is associated with the Editor

handleRequest

public void handleRequest(RequestEvent e)
                   throws RequestRejectedException,
                          java.io.IOException
Determines the url associated with the image map the user clicked on. Creates a new request and edits it to contain that url.
Overrides:
handleRequest in class HttpRequestEditor
Following copied from class: com.ibm.wbi.protocol.http.HttpRequestEditor
Parameters:
event - The request event with an input and output stream.
Throws:
RequestRejectedException - If rejecting request, this must be thrown before the first write() is made to the output stream.
java.io.Exception - can be thrown if an exception was generated by the Meg while processing the MegInput/OutputStreams.