|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.turbine.modules.Assembler org.apache.turbine.modules.Action org.apache.turbine.modules.ActionEvent org.apache.jetspeed.modules.actions.portlets.PortletActionEvent org.apache.jetspeed.modules.actions.portlets.PortletAction org.apache.jetspeed.modules.actions.portlets.GenericMVCAction org.apache.jetspeed.modules.actions.portlets.VelocityPortletAction org.apache.jetspeed.modules.actions.portlets.browser.DatabaseBrowserAction
This action sets up the template context for retrieving paged data from the resultSet according to the quey speciified by the user.
Field Summary | |
protected static java.lang.String |
BROWSER_ITERATOR
|
protected static java.lang.String |
BROWSER_TABLE_SIZE
|
protected static java.lang.String |
BROWSER_TITLE_ITERATOR
|
protected static java.lang.String |
CUSTOMIZE_TEMPLATE
|
protected static java.lang.String |
DATABASE_BROWSER_ACTION_KEY
|
protected static java.lang.String |
LINKS_READ
|
protected static java.lang.String |
NEXT
|
protected static java.lang.String |
PEID
|
protected static java.lang.String |
POOLNAME
|
protected static java.lang.String |
PREVIOUS
|
protected static java.lang.String |
ROW_LINK
|
protected static java.lang.String |
ROW_LINK_IDS
|
protected static java.lang.String |
ROW_LINK_TARGETS
|
protected static java.lang.String |
ROW_LINK_TYPES
|
protected static java.lang.String |
SORT_COLUMN_NAME
|
protected static java.lang.String |
SQL
|
protected static java.lang.String |
SQL_PARAM_PREFIX
|
protected java.util.List |
sqlParameters
|
protected static java.lang.String |
START
|
protected static java.lang.String |
TABLE_LINK
|
protected static java.lang.String |
TABLE_LINK_IDS
|
protected static java.lang.String |
TABLE_LINK_TARGETS
|
protected static java.lang.String |
TABLE_LINK_TYPES
|
protected static java.lang.String |
USER_OBJECT_NAMES
|
protected static java.lang.String |
USER_OBJECT_TYPES
|
protected static java.lang.String |
USER_OBJECTS
|
protected static java.lang.String |
VELOCITY_NULL_ENTRY
|
protected static java.lang.String |
WINDOW_SIZE
|
Fields inherited from class org.apache.turbine.modules.ActionEvent |
BUTTON, BUTTON_LENGTH, LENGTH, METHOD_NAME_LENGTH, METHOD_NAME_PREFIX |
Constructor Summary | |
DatabaseBrowserAction()
|
Method Summary | |
protected void |
buildConfigureContext(VelocityPortlet portlet,
org.apache.velocity.context.Context context,
org.apache.turbine.util.RunData rundata)
Subclasses should override this method if they wish to provide their own customization behavior. |
protected void |
buildMaximizedContext(VelocityPortlet portlet,
org.apache.velocity.context.Context context,
org.apache.turbine.util.RunData rundata)
Build the maximized state content for this portlet. |
protected void |
buildNormalContext(VelocityPortlet portlet,
org.apache.velocity.context.Context context,
org.apache.turbine.util.RunData rundata)
Build the normal state content for this portlet. |
protected void |
clearDatabaseBrowserIterator(VelocityPortlet portlet,
org.apache.turbine.util.RunData rundata)
Centralizes the calls to runData.getUser.removeTemp() - to clear the DatabaseBrowserIterator from the temp storage. |
protected void |
clearParameterFromPSML(VelocityPortlet portlet,
org.apache.turbine.util.RunData rundata,
java.lang.String attributeName)
|
protected void |
clearParameterFromTemp(VelocityPortlet portlet,
org.apache.turbine.util.RunData rundata,
java.lang.String attrName)
|
protected void |
clearQueryString(VelocityPortlet portlet,
org.apache.turbine.util.RunData rundata)
|
void |
doRefresh(org.apache.turbine.util.RunData rundata,
org.apache.velocity.context.Context context)
This method is called when the user hits refresh to refetch the result set. |
void |
doUpdate(org.apache.turbine.util.RunData rundata,
org.apache.velocity.context.Context context)
This method is called when the user configures any of the parameters. |
boolean |
filter(java.util.List row,
org.apache.turbine.util.RunData rundata)
Filter the row programmatically on a query. |
protected BrowserIterator |
getDatabaseBrowserIterator(VelocityPortlet portlet,
org.apache.turbine.util.RunData rundata)
Centralizes the calls to runData.getUser.getTemp() - to retrieve the DatabaseBrowserIterator. |
protected java.lang.String |
getParameterFromPSML(VelocityPortlet portlet,
org.apache.turbine.util.RunData rundata,
java.lang.String attrName,
java.lang.String attrDefValue)
|
protected java.lang.String |
getParameterFromRegistry(VelocityPortlet portlet,
java.lang.String attrName,
java.lang.String attrDefValue)
|
protected java.lang.Object |
getParameterFromTemp(VelocityPortlet portlet,
org.apache.turbine.util.RunData rundata,
java.lang.String attrName)
|
protected java.lang.String |
getParameterUsingFallback(VelocityPortlet portlet,
org.apache.turbine.util.RunData rundata,
java.lang.String attrName,
java.lang.String attrDefValue)
|
java.lang.String |
getQueryString(org.apache.turbine.util.RunData rundata,
org.apache.velocity.context.Context context)
This method returns the query to be executed to get the results which will be opened in the browser. |
protected java.lang.String |
getQueryString(VelocityPortlet portlet,
org.apache.turbine.util.RunData rundata,
org.apache.velocity.context.Context context)
This method returns the sql from the getQuery method which can be overwritten according to the needs of the application. |
protected java.lang.String |
getRequestParameter(VelocityPortlet portlet,
org.apache.turbine.util.RunData rundata,
java.lang.String attrName)
|
protected void |
getRows(VelocityPortlet portlet,
org.apache.turbine.util.RunData rundata,
java.lang.String sql,
int windowSize)
Execute the sql statement as specified by the user or the default, and store the resultSet in a vector. |
java.util.List |
getSQLParameters()
|
protected int |
getStartIndex()
to be used if sorting behavior to be overwritten |
protected int |
getStartVariable(VelocityPortlet portlet,
org.apache.turbine.util.RunData rundata,
java.lang.String attrName,
java.lang.String sortColName,
BrowserIterator iterator)
|
protected boolean |
isMyRequest(VelocityPortlet portlet,
org.apache.turbine.util.RunData rundata)
|
void |
populate(int rowIndex,
int columnIndex,
java.util.List row)
This method should be overwritten every time the user object needs to be populated with some user specific constraints. |
protected void |
readLinkParameters(VelocityPortlet portlet,
org.apache.turbine.util.RunData rundata,
org.apache.velocity.context.Context context)
|
protected void |
readSqlParameters(VelocityPortlet portlet,
org.apache.turbine.util.RunData rundata)
|
protected void |
readUserParameters(VelocityPortlet portlet,
org.apache.turbine.util.RunData rundata,
org.apache.velocity.context.Context context)
|
protected void |
setDatabaseBrowserIterator(VelocityPortlet portlet,
org.apache.turbine.util.RunData rundata,
BrowserIterator iterator)
Centralizes the calls to runData.getUser.setTemp() - to set the DatabaseBrowserIterator. |
protected void |
setParameterToPSML(VelocityPortlet portlet,
org.apache.turbine.util.RunData rundata,
java.lang.String attrName,
java.lang.String attrValue)
|
protected void |
setParameterToTemp(VelocityPortlet portlet,
org.apache.turbine.util.RunData rundata,
java.lang.String attrName,
java.lang.Object attrValue)
|
void |
setSQLParameters(java.util.List parameters)
|
Methods inherited from class org.apache.jetspeed.modules.actions.portlets.VelocityPortletAction |
buildConfigureContext, buildMaximizedContext, buildNormalContext |
Methods inherited from class org.apache.jetspeed.modules.actions.portlets.GenericMVCAction |
checkAdministrativeAction, doPerform, getAttribute, getAttribute, getPortletInstance, perform, setAttribute |
Methods inherited from class org.apache.jetspeed.modules.actions.portlets.PortletAction |
doPerform, getContext, getPortlet, getTemplate, resetTemplate, setTemplate, setTemplate |
Methods inherited from class org.apache.jetspeed.modules.actions.portlets.PortletActionEvent |
executeEvents, fireEvent |
Methods inherited from class org.apache.turbine.modules.ActionEvent |
executeEvents, formatString |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected static final java.lang.String SQL
protected static final java.lang.String POOLNAME
protected static final java.lang.String START
protected static final java.lang.String CUSTOMIZE_TEMPLATE
protected static final java.lang.String WINDOW_SIZE
protected static final java.lang.String USER_OBJECT_NAMES
protected static final java.lang.String USER_OBJECT_TYPES
protected static final java.lang.String USER_OBJECTS
protected static final java.lang.String SQL_PARAM_PREFIX
protected static final java.lang.String LINKS_READ
protected static final java.lang.String ROW_LINK
protected static final java.lang.String TABLE_LINK
protected static final java.lang.String ROW_LINK_IDS
protected static final java.lang.String ROW_LINK_TYPES
protected static final java.lang.String ROW_LINK_TARGETS
protected static final java.lang.String TABLE_LINK_IDS
protected static final java.lang.String TABLE_LINK_TYPES
protected static final java.lang.String TABLE_LINK_TARGETS
protected static final java.lang.String BROWSER_TABLE_SIZE
protected static final java.lang.String DATABASE_BROWSER_ACTION_KEY
protected static final java.lang.String BROWSER_ITERATOR
protected static final java.lang.String BROWSER_TITLE_ITERATOR
protected static final java.lang.String NEXT
protected static final java.lang.String PREVIOUS
protected static final java.lang.String VELOCITY_NULL_ENTRY
protected static final java.lang.String PEID
protected static final java.lang.String SORT_COLUMN_NAME
protected java.util.List sqlParameters
Constructor Detail |
public DatabaseBrowserAction()
Method Detail |
protected void buildMaximizedContext(VelocityPortlet portlet, org.apache.velocity.context.Context context, org.apache.turbine.util.RunData rundata)
buildMaximizedContext
in class VelocityPortletAction
portlet
- The velocity-based portlet that is being built.context
- The velocity context for this request.rundata
- The turbine rundata context for this request.protected void buildConfigureContext(VelocityPortlet portlet, org.apache.velocity.context.Context context, org.apache.turbine.util.RunData rundata)
buildConfigureContext
in class VelocityPortletAction
protected void buildNormalContext(VelocityPortlet portlet, org.apache.velocity.context.Context context, org.apache.turbine.util.RunData rundata)
buildNormalContext
in class VelocityPortletAction
portlet
- The velocity-based portlet that is being built.context
- The velocity context for this request.rundata
- The turbine rundata context for this request.public void doUpdate(org.apache.turbine.util.RunData rundata, org.apache.velocity.context.Context context)
context
- The velocity context for this request.public void doRefresh(org.apache.turbine.util.RunData rundata, org.apache.velocity.context.Context context)
context
- The velocity context for this request.public boolean filter(java.util.List row, org.apache.turbine.util.RunData rundata)
BrowserQuery
filter
in interface BrowserQuery
row
- The row being inspected for filtration.
protected void getRows(VelocityPortlet portlet, org.apache.turbine.util.RunData rundata, java.lang.String sql, int windowSize) throws java.lang.Exception
sql
- The sql statement to be executed.
java.lang.Exception
protected BrowserIterator getDatabaseBrowserIterator(VelocityPortlet portlet, org.apache.turbine.util.RunData rundata)
protected void setDatabaseBrowserIterator(VelocityPortlet portlet, org.apache.turbine.util.RunData rundata, BrowserIterator iterator)
protected void clearDatabaseBrowserIterator(VelocityPortlet portlet, org.apache.turbine.util.RunData rundata)
public java.lang.String getQueryString(org.apache.turbine.util.RunData rundata, org.apache.velocity.context.Context context)
getQueryString
in interface BrowserQuery
protected java.lang.String getQueryString(VelocityPortlet portlet, org.apache.turbine.util.RunData rundata, org.apache.velocity.context.Context context)
protected void clearQueryString(VelocityPortlet portlet, org.apache.turbine.util.RunData rundata)
protected int getStartIndex()
protected java.lang.String getParameterUsingFallback(VelocityPortlet portlet, org.apache.turbine.util.RunData rundata, java.lang.String attrName, java.lang.String attrDefValue)
protected void clearParameterFromPSML(VelocityPortlet portlet, org.apache.turbine.util.RunData rundata, java.lang.String attributeName)
protected void setParameterToPSML(VelocityPortlet portlet, org.apache.turbine.util.RunData rundata, java.lang.String attrName, java.lang.String attrValue)
protected java.lang.String getParameterFromPSML(VelocityPortlet portlet, org.apache.turbine.util.RunData rundata, java.lang.String attrName, java.lang.String attrDefValue)
protected java.lang.String getParameterFromRegistry(VelocityPortlet portlet, java.lang.String attrName, java.lang.String attrDefValue)
protected java.lang.Object getParameterFromTemp(VelocityPortlet portlet, org.apache.turbine.util.RunData rundata, java.lang.String attrName)
protected void setParameterToTemp(VelocityPortlet portlet, org.apache.turbine.util.RunData rundata, java.lang.String attrName, java.lang.Object attrValue)
protected void clearParameterFromTemp(VelocityPortlet portlet, org.apache.turbine.util.RunData rundata, java.lang.String attrName)
protected boolean isMyRequest(VelocityPortlet portlet, org.apache.turbine.util.RunData rundata)
protected java.lang.String getRequestParameter(VelocityPortlet portlet, org.apache.turbine.util.RunData rundata, java.lang.String attrName)
protected int getStartVariable(VelocityPortlet portlet, org.apache.turbine.util.RunData rundata, java.lang.String attrName, java.lang.String sortColName, BrowserIterator iterator)
public void setSQLParameters(java.util.List parameters)
setSQLParameters
in interface BrowserQuery
public java.util.List getSQLParameters()
getSQLParameters
in interface BrowserQuery
protected void readSqlParameters(VelocityPortlet portlet, org.apache.turbine.util.RunData rundata)
protected void readUserParameters(VelocityPortlet portlet, org.apache.turbine.util.RunData rundata, org.apache.velocity.context.Context context)
protected void readLinkParameters(VelocityPortlet portlet, org.apache.turbine.util.RunData rundata, org.apache.velocity.context.Context context)
public void populate(int rowIndex, int columnIndex, java.util.List row)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |