planetj.html
Class HTMLExtractor

java.lang.Object
  |
  +--planetj.html.HTMLExtractor

public class HTMLExtractor
extends Object

This class is used for extracting HTML data into Rows. It may also be used for retrieving selected Rows out of the HttpSession in the HttpServletRequest.

Author:
PlanetJ Corporation

Field Summary
static byte ARRAY_LIST
           
static String EXTRACTABLE_FIELD
           
static String EXTRACTABLE_RC_FIELD
           
static String EXTRACTABLE_RC_PREFIX
           
static String EXTRACTABLE_ROW_FIELD
           
static String EXTRACTABLE_ROW_PREFIX
           
static byte ROW_COLLECTION
           
static String TRANSIENT
           
 
Constructor Summary
HTMLExtractor()
           
 
Method Summary
static Row extractDataIntoRow(Row row, javax.servlet.http.HttpServletRequest request)
          Extracts information off the HttpServletRequest and puts its in the given Row.
static Row extractDataIntoRow(String rowNavKey, Row row, javax.servlet.http.HttpServletRequest request)
          Extracts information off the HttpServletRequest and puts it in the given Row.
static void extractTableData(RowCollection rc, javax.servlet.http.HttpServletRequest request)
          Extracts information off the HttpServletRequest out of a table and puts it in the given RowCollection's Rows.
static void extractTableData(String rcKey, RowCollection rc, javax.servlet.http.HttpServletRequest request)
          Extracts information off the HttpServletRequest out of a table and puts it in the given RowCollection's Rows.
static Row extractTableDataIntoRow(String rcNavKey, String rowNavKey, Row row, javax.servlet.http.HttpServletRequest request)
          Extracts information off the HttpServletRequest out of a table and puts it in the given Row.
static Row getSelectedRow(String rcSessionId, javax.servlet.http.HttpServletRequest request)
          Retrieves the selected Row from the HttpServletRequest.
static List getSelectedRows(String rcSessionId, byte returnType, javax.servlet.http.HttpServletRequest request)
          Retrieves the selected Rows from the HttpServletRequest.
static List getSelectedRows(String rcSessionId, javax.servlet.http.HttpServletRequest req)
          Retrieves the selected Rows from the HttpServletRequest.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ROW_COLLECTION

public static final byte ROW_COLLECTION
See Also:
Constant Field Values

ARRAY_LIST

public static final byte ARRAY_LIST
See Also:
Constant Field Values

TRANSIENT

public static final String TRANSIENT
See Also:
Constant Field Values

EXTRACTABLE_FIELD

public static final String EXTRACTABLE_FIELD
See Also:
Constant Field Values

EXTRACTABLE_RC_FIELD

public static final String EXTRACTABLE_RC_FIELD
See Also:
Constant Field Values

EXTRACTABLE_ROW_FIELD

public static final String EXTRACTABLE_ROW_FIELD
See Also:
Constant Field Values

EXTRACTABLE_ROW_PREFIX

public static final String EXTRACTABLE_ROW_PREFIX
See Also:
Constant Field Values

EXTRACTABLE_RC_PREFIX

public static final String EXTRACTABLE_RC_PREFIX
See Also:
Constant Field Values
Constructor Detail

HTMLExtractor

public HTMLExtractor()
Method Detail

extractDataIntoRow

public static Row extractDataIntoRow(String rowNavKey,
                                     Row row,
                                     javax.servlet.http.HttpServletRequest request)
                              throws CMException
Extracts information off the HttpServletRequest and puts it in the given Row.

Parameters:
row - Row to extract values into
request - HttpServletRequest containing values to extract
Returns:
Row
CMException

extractDataIntoRow

public static Row extractDataIntoRow(Row row,
                                     javax.servlet.http.HttpServletRequest request)
                              throws CMException
Extracts information off the HttpServletRequest and puts its in the given Row. This method requires the Row to already be in navigation. (e.g. it already has a navigation key)

Parameters:
row - Row to extract data into
request - request from the client
CMException

extractTableData

public static void extractTableData(String rcKey,
                                    RowCollection rc,
                                    javax.servlet.http.HttpServletRequest request)
                             throws CMException
Extracts information off the HttpServletRequest out of a table and puts it in the given RowCollection's Rows. This method requires the RowCollection is already in navigation. (e.g. it already has a navigation key)

Parameters:
rcKey - Navigation key for the given RowCollection
rc - RowCollection to extract data into
request - request from client
CMException

extractTableData

public static void extractTableData(RowCollection rc,
                                    javax.servlet.http.HttpServletRequest request)
                             throws CMException
Extracts information off the HttpServletRequest out of a table and puts it in the given RowCollection's Rows. This method requires the RowCollection is already in navigation. (e.g. it already has a navigation key)

Parameters:
rc - RowCollection to extract data into
request - request from client.
CMException

extractTableDataIntoRow

public static Row extractTableDataIntoRow(String rcNavKey,
                                          String rowNavKey,
                                          Row row,
                                          javax.servlet.http.HttpServletRequest request)
                                   throws CMException
Extracts information off the HttpServletRequest out of a table and puts it in the given Row. A RowCollections index in the Session can be retrieved by asking the SessionManager what its index is.

Parameters:
row - Row to extract values into
request - HttpServletRequest containing values to extract.
Returns:
Row
CMException

getSelectedRow

public static Row getSelectedRow(String rcSessionId,
                                 javax.servlet.http.HttpServletRequest request)
                          throws DataEngineException
Retrieves the selected Row from the HttpServletRequest. If more than one Row is selected in the RowCollection, then the first selected Row is returned.

Parameters:
request - HttpServletRequest to get selected Row
Returns:
Row
DataEngineException

getSelectedRows

public static List getSelectedRows(String rcSessionId,
                                   byte returnType,
                                   javax.servlet.http.HttpServletRequest request)
                            throws DataEngineException
Retrieves the selected Rows from the HttpServletRequest.

Parameters:
rcSessionId - The ID of the existing table in the session
returnType - Indicates whether the rows should be returned in an ArrayList or RowCollection. These options are defined as constants in the class.
Returns:
A newly created List of the specified type, containing only the rows in the original RowCollection which were selected
DataEngineException

getSelectedRows

public static List getSelectedRows(String rcSessionId,
                                   javax.servlet.http.HttpServletRequest req)
                            throws DataEngineException
Retrieves the selected Rows from the HttpServletRequest. The rows are returned in a brand new RowCollection.

Parameters:
req - The HttpServletRequest
Returns:
A newly created RowCollection containing only the rows in the original RowCollection which were selected
DataEngineException