Open SiteSearch 4.1.1
Final

ORG.oclc.jassi
Class Action

java.lang.Object
  |
  +--ORG.oclc.jassi.Action

public class Action
extends Object

The Action class is a container of information for the user's current HTTP request and all subsequent Next command transactions. Action uses input parameters contained in the UserStateObject object and the HttpMessage object.

Specific functionality such as the NEXTCMD format is specified as follows:

:next=NEXTCMD%7F:widgets%7F:

See Also:
HttpMessage, UserStateObject

Field Summary
protected  String className
          String representing the class from the URL in the current transaction.
 DataPairs cookie_widgets
          DataPairs object containing the name/value data pairs from the "Cookie" HTTP Header in the current transaction.
protected static String documentRoot
          String location where the document root directory is defined by the JaSSI Server ini file.
protected  String mimeTypeExt
          String representing the Mime type extension from the URL in the current transaction.
protected static String nameSpace
          String namespace as defined by the JaSSI Server ini file.
protected  String nextCmd
          String representing the Next command from the URL in the current transaction.
protected  String rawWidgets
          String representing the raw widgets from the URL in the current transaction.
protected  String uri
          String representing the URI from the URL in the current transaction.
 DataPairs widgets
          DataPairs object containing the name/value data pairs from the URL in the current transaction.
 
Constructor Summary
Action()
          Constructs an Action Object.
Action(UserStateObject u, HttpMessage httpObj)
          Constructs a Action object using input parameters of a UserStateObject object and an HttpMessage object.
 
Method Summary
 String getClassName()
          Returns the class name as parsed from the URL of the current transaction.
static String getDocumentRoot()
          Returns the document root directory within JaSSI.
 String getMimeTypeExt()
          Returns the mime type extension as parsed from the URL of the current transaction.
 String getRawWidgets()
          Returns the raw widgets as parsed from the URL of the current transaction.
 String getUri()
          Returns the URI as parsed from the URL of the current transaction.
static String hackUri(String uri)
           
 void init(String aurl)
          Takes an HTTP request message and breaks the message into a URI, tokenizes the widgets from the input parameter HTTP URI, and parses out the class or html file to load.
 void init(String aurl, String abodyUrl)
          Takes an HTTP request message and breaks the message into a URI, tokenizes the widgets from the input parameters HTTP URI and HTTP BODY, and parses out the class or html file to load.
 void init(String aurl, String abodyUrl, String cookie_data)
          Takes an HTTP request message and breaks the message into a URI, tokenizes the widgets from the input parameters HTTP URI and HTTP BODY, and parses out the class or html file to load.
 void removeRawWidgetData(String name)
          Removes a name/value pair from the rawWidgets String using the input parameter String as the key to the widget.
 Vector setupClassOrder()
          Sets up the order in which to load the class or html file parsed from the HTTP request based on the package order defined in the JaSSI Server ini file.
 DataPairs tokenizeWidgets(String data)
          Parses the raw widgets passed in as the String parameter and stores them as name/value pairs in a Datapairs object.
 DataPairs tokenizeWidgets(String data, String separator)
          Parses the raw widgets passed in as the String parameter and stores them as name/value pairs in a Datapairs object.
 String toString()
          Generates the String representation of the object.
 String unescape(String s)
          Decodes a URL encoded HTTP request.
 DataPairs widgets()
          Returns the Widgets vector from the URL of the current transaction.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

className

protected String className
String representing the class from the URL in the current transaction.

cookie_widgets

public DataPairs cookie_widgets
DataPairs object containing the name/value data pairs from the "Cookie" HTTP Header in the current transaction.

documentRoot

protected static String documentRoot
String location where the document root directory is defined by the JaSSI Server ini file.

mimeTypeExt

protected String mimeTypeExt
String representing the Mime type extension from the URL in the current transaction.

nameSpace

protected static String nameSpace
String namespace as defined by the JaSSI Server ini file.

nextCmd

protected String nextCmd
String representing the Next command from the URL in the current transaction.

rawWidgets

protected String rawWidgets
String representing the raw widgets from the URL in the current transaction.

uri

protected String uri
String representing the URI from the URL in the current transaction.

widgets

public DataPairs widgets
DataPairs object containing the name/value data pairs from the URL in the current transaction.
Constructor Detail

Action

public Action()
Constructs an Action Object.

Action

public Action(UserStateObject u,
              HttpMessage httpObj)
Constructs a Action object using input parameters of a UserStateObject object and an HttpMessage object.
Parameters:
u - the user's UserStateObject.
httpObj - the current transaction's HttpMessage Object.
Method Detail

getClassName

public final String getClassName()
Returns the class name as parsed from the URL of the current transaction.
Returns:
the class name.

getDocumentRoot

public static final String getDocumentRoot()
Returns the document root directory within JaSSI.
Returns:
the document root specified in the JaSSI Server ini file.

getMimeTypeExt

public final String getMimeTypeExt()
Returns the mime type extension as parsed from the URL of the current transaction.
Returns:
the mime type extension.

getRawWidgets

public final String getRawWidgets()
Returns the raw widgets as parsed from the URL of the current transaction.
Returns:
the raw widgets in a String format.

getUri

public final String getUri()
Returns the URI as parsed from the URL of the current transaction.
Returns:
the URI.

init

public void init(String aurl)
Takes an HTTP request message and breaks the message into a URI, tokenizes the widgets from the input parameter HTTP URI, and parses out the class or html file to load.
Parameters:
aurl - the URL received in the current transaction.

init

public void init(String aurl,
                 String abodyUrl)
Takes an HTTP request message and breaks the message into a URI, tokenizes the widgets from the input parameters HTTP URI and HTTP BODY, and parses out the class or html file to load.
Parameters:
aurl - the URL received in the current transaction.
abodyUrl - the BODY received in the current transaction.

init

public void init(String aurl,
                 String abodyUrl,
                 String cookie_data)
Takes an HTTP request message and breaks the message into a URI, tokenizes the widgets from the input parameters HTTP URI and HTTP BODY, and parses out the class or html file to load.
Parameters:
aurl - the URL received in the current transaction.
abodyUrl - the BODY received in the current transaction.
cookie_data - the Cookie received in the current transaction.

hackUri

public static String hackUri(String uri)

removeRawWidgetData

public final void removeRawWidgetData(String name)
Removes a name/value pair from the rawWidgets String using the input parameter String as the key to the widget.
Parameters:
name - the widget to remove from the raw widgets String.

unescape

public String unescape(String s)
Decodes a URL encoded HTTP request.
Parameters:
s - the string to be decoded.
Returns:
the URL encoded string.

setupClassOrder

public final Vector setupClassOrder()
Sets up the order in which to load the class or html file parsed from the HTTP request based on the package order defined in the JaSSI Server ini file.

tokenizeWidgets

public final DataPairs tokenizeWidgets(String data)
Parses the raw widgets passed in as the String parameter and stores them as name/value pairs in a Datapairs object.
Parameters:
data - the String of raw widgets for the current transaction.
Returns:
the DataPairs object containing the raw widget pairs.

tokenizeWidgets

public final DataPairs tokenizeWidgets(String data,
                                       String separator)
Parses the raw widgets passed in as the String parameter and stores them as name/value pairs in a Datapairs object.
Parameters:
data - the String of raw widgets for the current transaction.
separator - the String used as a token terminator.
Returns:
the DataPairs object containing the raw widget pairs.

toString

public final String toString()
Generates the String representation of the object.
Returns:
the String representation of the object.
Overrides:
toString in class Object

widgets

public final DataPairs widgets()
Returns the Widgets vector from the URL of the current transaction.
Returns:
the DataPairs object which contains the vector of widgets.

Open SiteSearch 4.1.1
Final