| |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.ibm.wps.portlets.struts.WpsStrutsViewCommand
public abstract class WpsStrutsViewCommand
The WpsStrutsViewCommand
class is a command pattern class used to
provide a mechanism to encapsulate the information needed to redisplay a view.
The WpsStrutsViewCommand is the base class for all commands in the Struts
Portlet Framework. The base class provides the methods to save all the attributes
that need to be saved with the command, and provides the methods to repopulate
the request attributes.
Field Summary | |
---|---|
protected static java.lang.String | LAST_MODIFIED
Request attribute name for the last modified timestamp. |
protected static java.lang.String | PREFIX
Request attribute name for the module prefix. |
Constructor Summary | |
---|---|
WpsStrutsViewCommand()
Default constructor for the WpsStrutsView command. | |
WpsStrutsViewCommand(PortletRequest request)
Constructs the WpsStrutsViewCommand object. |
Method Summary | |
---|---|
protected static void | addAttribute(java.lang.Object attribute,
java.util.List list)
Adds the attribute to the list. |
static void | addAttributeNameToSave(java.lang.String attributeName)
Adds the name of an attribute from the object request that needs to be saved if present for the execution of the IViewCommand in Portal's render phase |
static void | addAttributeTypeToSave(java.lang.Class attributeType)
Adds the class type of an attribute from the request that needs to be saved if present for the execution of the IViewCommand in ortal's render phase. |
static void | addParameterNameToSave(java.lang.String parameterName)
Adds the name of an parameter from the object request that needs to be saved if present for the execution of the IViewCommand in Portal's render phase |
void | execute(PortletRequest request,
PortletResponse response,
ViewCommandExecutionContext executionContext)
Executes the given command given the request and response objects. |
void | execute(PortletRequest request,
ViewCommandExecutionContext executionContext)
Executes the given command given the request and response objects. |
long | getLastModified(PortletRequest request)
Returns the last modified time. |
java.lang.String | getPrefix(PortletRequest request)
Returns the prefix associated with this command. |
boolean | getRemoveOnModeChange()
Returns the state of removeOnModeChange. |
java.util.Map | getSavedAttributes()
Returns the saved attribute map. |
static IViewCommand | getSavedCommand(PortletRequest pRequest,
ViewCommandExecutionContext context)
Gets the saved command from the Command Manager Factory. |
protected static void | removeAttribute(java.lang.Object attribute,
java.util.List list)
Removes the attribute from the list. |
static void | removeAttributeNameToSave(java.lang.String attributeName)
Removes the name of an attribute from the list of attribute names to save. |
static void | removeAttributeTypeToSave(java.lang.Class attributeType)
Removes the class type of the request attribute from the list of attributes to save. |
static void | removeParameterNameToSave(java.lang.String parameterName)
Removes the name of an parameter from the list of parameter names to save. |
protected void | repopulateRequest(PortletRequest request)
Repopulates the given request from saved values. |
protected void | saveAsAttribute(java.lang.String name,
java.lang.Object value)
Saves the given named object for later retrieval as an attribute for when the command is executed. |
protected void | saveAsParameter(java.lang.String name,
java.lang.String value)
Saves the given named object for later retrieval as an parameter for when the command is executed. |
protected void | saveAttribute(HttpServletRequest request,
java.lang.String name)
Saves the given request attribute for later retrieval when the command is executed. |
void | saveAttributes(HttpServletRequest request,
ViewCommandExecutionContext context)
Saves attributes from the request by name for later retrieval when the command is executed. |
protected void | saveAttributes(HttpServletRequest request,
ViewCommandExecutionContext context,
java.util.List namesToSave,
java.util.List typesToSave)
Saves attributes from the request by name for later retrieval when the command is executed. |
void | saveCommand(HttpServletRequest request)
Saves the current command using the Command Manager Factory. |
void | saveCommand(HttpServletRequest request,
java.lang.String commandPrefix)
Saves the current command using the Command Manager Factory. |
protected void | saveParameter(HttpServletRequest request,
java.lang.String name)
Saves the given request parameter for later retrieval when the command is executed. |
protected void | saveParameters(HttpServletRequest request,
ViewCommandExecutionContext context,
java.util.List namesToSave)
Saves parameters from the request by name for later retrieval when the command is executed. |
void | setLastModified(PortletRequest request,
long lastModified)
Sets the last modified time. |
void | setPrefix(PortletRequest request,
java.lang.String prefix)
Sets the prefix associated with this command. |
void | setRemoveOnModeChange(boolean value)
Allows setting a flag so that this command is removed when the user switches modes. |
void | setSavedAttributes(java.util.Map attributeMap)
Sets the saved attribute map. |
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 PREFIX
protected static final java.lang.String LAST_MODIFIED
Constructor Detail |
---|
public WpsStrutsViewCommand()
public WpsStrutsViewCommand(PortletRequest request)
Method Detail |
---|
public static void addAttributeNameToSave(java.lang.String attributeName)
public static void removeAttributeNameToSave(java.lang.String attributeName)
public static void addAttributeTypeToSave(java.lang.Class attributeType)
public static void removeAttributeTypeToSave(java.lang.Class attributeType)
public static void addParameterNameToSave(java.lang.String parameterName)
public static void removeParameterNameToSave(java.lang.String parameterName)
public static IViewCommand getSavedCommand(PortletRequest pRequest, ViewCommandExecutionContext context) throws PortletException
public void saveCommand(HttpServletRequest request) throws PortletException
public void saveCommand(HttpServletRequest request, java.lang.String commandPrefix) throws PortletException
protected void repopulateRequest(PortletRequest request)
public void execute(PortletRequest request, PortletResponse response, ViewCommandExecutionContext executionContext) throws PortletException
protected void saveAttributes(HttpServletRequest request, ViewCommandExecutionContext context, java.util.List namesToSave, java.util.List typesToSave)
protected void saveAttribute(HttpServletRequest request, java.lang.String name)
protected void saveAsAttribute(java.lang.String name, java.lang.Object value)
protected void saveParameters(HttpServletRequest request, ViewCommandExecutionContext context, java.util.List namesToSave)
protected void saveParameter(HttpServletRequest request, java.lang.String name)
protected void saveAsParameter(java.lang.String name, java.lang.String value)
public void saveAttributes(HttpServletRequest request, ViewCommandExecutionContext context)
public java.util.Map getSavedAttributes()
public void setSavedAttributes(java.util.Map attributeMap)
public void setRemoveOnModeChange(boolean value)
public boolean getRemoveOnModeChange()
public java.lang.String getPrefix(PortletRequest request)
public void setPrefix(PortletRequest request, java.lang.String prefix)
public void execute(PortletRequest request, ViewCommandExecutionContext executionContext) throws PortletException
protected static void addAttribute(java.lang.Object attribute, java.util.List list)
protected static void removeAttribute(java.lang.Object attribute, java.util.List list)
public long getLastModified(PortletRequest request)
public void setLastModified(PortletRequest request, long lastModified)
| |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |