|
BEA Systems, Inc. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--examples.portlet.bean.TodoBean
JSP Bean for the mytodo_edit.jsp and the grouptodo_edit.jsp pages that are used by the My To Do List and Group To Do List portlet examples.
Field Summary | |
static java.lang.String |
CHECK
Constant for the SQL Query String that checks to see if there are any to do items for a user or group. |
static java.lang.String |
CHECKBOX
Used in processing the HTTP request. |
static java.lang.String |
DELETE
Constant for the SQL DELETE String that deletes a to do item for a user or group. |
protected static int |
HIGH
|
protected static java.lang.String |
HIGH_S
|
static java.lang.String |
INSERT
Constant for the SQL INSERT String that creates a new to do item for a user or group. |
protected static int |
LOW
|
protected static java.lang.String |
LOW_S
|
protected static int |
MEDIUM
|
protected static java.lang.String |
MEDIUM_S
|
static int |
MODE_DELETE
Mode constant for delete mode. |
static int |
MODE_INSERT
Mode constant for insert mode. |
static int |
MODE_UPDATE
Mode constant for update mode. |
static java.lang.String |
QUERY
Constant for the SQL Query String that finds all the to do items for a user or group. |
static java.lang.String |
UPDATE
Constant for the SQL UPDATE String that updates a to do item for a user or group. |
Fields inherited from interface com.beasys.commerce.axiom.util.ToolkitConstants |
DEFAULT_ID_CACHE,
DEFAULT_ID_PROCEDURE,
DEFAULT_JDBC_POOL_NAME,
DEFAULT_JTS_POOL_NAME,
DEFAULT_LOGGING_LEVEL,
DEFAULT_WEBLOGIC_HOST,
DEFAULT_WEBLOGIC_PORT,
ID_CACHE,
ID_PROCEDURE,
JDBC_POOL_NAME,
JTS_POOL_NAME,
LOG_DEBUG,
LOG_ERROR,
LOG_FATAL,
LOG_INFO,
LOG_SECURITY,
LOG_WARNING,
LOGGING_LEVEL,
WEBLOGIC_HOST,
WEBLOGIC_PORT |
Constructor Summary | |
TodoBean()
Creates a new instance. |
Method Summary | |
java.lang.String[][] |
asTable()
Returns a 2 dimensional array (table) of the user's or group's current to do items. |
void |
createQuery(java.sql.PreparedStatement ps,
java.lang.String anId)
A helper method to create the to do list query string. |
void |
fillCheck(java.sql.PreparedStatement ps,
java.lang.String anOwner)
A helper method to fill the CHECK SQL statement. |
void |
fillDelete(java.sql.PreparedStatement ps,
java.lang.String anOwner)
A helper method to fill the DELETE SQL statement. |
void |
fillInsert(java.sql.PreparedStatement ps,
java.lang.String anOwner)
A helper method to fill the INSERT SQL statement. |
void |
fillUpdate(java.sql.PreparedStatement ps,
java.lang.String anOwner,
java.lang.String item,
int status)
A helper method to fill the UPDATE SQL statement. |
int |
getMode()
Returns the mode for this request. |
protected java.lang.String |
getPriorityFor(int aPriority)
Returns the priority for a to do item. |
void |
load(java.sql.ResultSet rs)
Loads the to do items into the items list with the results of a query. |
void |
process(javax.servlet.http.HttpServletRequest aRequest,
java.lang.String anOwner,
java.sql.PreparedStatement ps)
Process the check box updates. |
void |
setDelete(java.lang.String anItem)
Sets the delete mode and the item to delete. |
void |
setInsertButton(java.lang.String ignore)
Sets the mode to insert. |
void |
setMode(int aMode)
Sets the mode for a request. |
void |
setNewItemText(java.lang.String someText)
Sets the text for a new to do item. |
void |
setPrioritySelect(java.lang.String aValue)
Sets the priority for a to do item. |
void |
setUpdateButton(java.lang.String ignore)
Sets the mode to update. |
protected void |
updateStatus(examples.portlet.bean.TodoBean.Item i,
boolean aBool,
java.lang.String anOwner,
java.sql.PreparedStatement ps)
A helper method to fill the UPDATE SQL statement with a new to do item status. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Field Detail |
public static final java.lang.String CHECKBOX
public static final int MODE_UPDATE
public static final int MODE_INSERT
public static final int MODE_DELETE
public static final java.lang.String QUERY
public static final java.lang.String UPDATE
public static final java.lang.String INSERT
public static final java.lang.String CHECK
public static final java.lang.String DELETE
protected static final int HIGH
protected static final java.lang.String HIGH_S
protected static final int MEDIUM
protected static final java.lang.String MEDIUM_S
protected static final int LOW
protected static final java.lang.String LOW_S
Constructor Detail |
public TodoBean()
Method Detail |
public int getMode()
public void setMode(int aMode)
aMode
- One of the mode constants.public void setNewItemText(java.lang.String someText)
someText
- The to do item text.public void setPrioritySelect(java.lang.String aValue)
aValue
- The to do item priority value.protected java.lang.String getPriorityFor(int aPriority)
public java.lang.String[][] asTable()
public void createQuery(java.sql.PreparedStatement ps, java.lang.String anId) throws java.sql.SQLException
ps
- The prepared statement for the query.anId
- The owner's (user's) idpublic void load(java.sql.ResultSet rs)
rs
- The query result set.public void setUpdateButton(java.lang.String ignore)
public void setInsertButton(java.lang.String ignore)
public void fillUpdate(java.sql.PreparedStatement ps, java.lang.String anOwner, java.lang.String item, int status) throws java.sql.SQLException
ps
- The prepared statement for the query.anOwner
- The owner's (user's) id.item
- The to do item to update.status
- The status of the to do item.public void fillDelete(java.sql.PreparedStatement ps, java.lang.String anOwner) throws java.sql.SQLException
ps
- The prepared statement for the query.anOwner
- The owner's (user's) id.public void fillCheck(java.sql.PreparedStatement ps, java.lang.String anOwner) throws java.sql.SQLException
ps
- The prepared statement for the query.anOwner
- The owner's (user's) id.public void fillInsert(java.sql.PreparedStatement ps, java.lang.String anOwner) throws java.sql.SQLException
ps
- The prepared statement for the query.anOwner
- The owner's (user's) id.protected void updateStatus(examples.portlet.bean.TodoBean.Item i, boolean aBool, java.lang.String anOwner, java.sql.PreparedStatement ps) throws java.sql.SQLException
i
- An Item object representing the to do item.aBool
- true if checked, false if not checked.anOwner
- The owner's (user's) id.ps
- The prepared statement for the query.public void setDelete(java.lang.String anItem)
anItem
- The item name to delete.public void process(javax.servlet.http.HttpServletRequest aRequest, java.lang.String anOwner, java.sql.PreparedStatement ps) throws java.sql.SQLException
aRequest
- The HTTP request.anOwner
- The owner of the item.ps
- The prepared SQL statement to execute.
|
BEA Systems, Inc. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |