Overview  Package   Class  Tree  Serialized  Deprecated  Index  Help 

com.ibm.wps.portlets.struts.plugins
Class CommandManagerFactory

java.lang.Object
  extended bycom.ibm.wps.portlets.struts.plugins.CommandManagerFactory
Direct Known Subclasses:
DynaCacheCommandManagerFactory, MapCommandManagerFactory, SessionCommandManagerFactory

public abstract class CommandManagerFactory
extends java.lang.Object

The CommandManager class is a factory class for creating classes that control the storage and retrieval of IViewCommands. The factory classes must implement the methods to get, set, and remove commands.

Since:
5.1

Constructor Summary
CommandManagerFactory()
          Constructs the factory object.
 

Method Summary
abstract  IViewCommand getCommand(org.apache.jetspeed.portlet.PortletRequest request, org.apache.jetspeed.portlet.PortletResponse response)
          Gets the IViewCommand.
abstract  IViewCommand getCommand(org.apache.jetspeed.portlet.PortletRequest request, org.apache.jetspeed.portlet.PortletResponse response, java.lang.String prefix)
          Gets the IViewCommand.
 java.lang.String getCommandPrefix(org.apache.jetspeed.portlet.PortletRequest request)
          Returns the command prefix determined from the request object.
static CommandManagerFactory getFactory(javax.servlet.ServletContext servletContext)
          Gets the CommandManagerFactory object for this context.
abstract  void removeCommand(org.apache.jetspeed.portlet.PortletRequest request, org.apache.jetspeed.portlet.PortletResponse response, java.lang.String prefix)
          Removes the IViewCommand.
abstract  void setCommand(org.apache.jetspeed.portlet.PortletRequest request, org.apache.jetspeed.portlet.PortletResponse response, IViewCommand command)
          Sets the IViewCommand.
abstract  void setCommand(org.apache.jetspeed.portlet.PortletRequest request, org.apache.jetspeed.portlet.PortletResponse response, IViewCommand command, java.lang.String prefix)
          Sets the IViewCommand.
static void setFactory(javax.servlet.ServletContext servletContext, CommandManagerFactory factory)
          Sets a new CommandManagerFactory object.
 

Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CommandManagerFactory

public CommandManagerFactory()
Constructs the factory object.

Method Detail

setFactory

public static void setFactory(javax.servlet.ServletContext servletContext,
                              CommandManagerFactory factory)
Sets a new CommandManagerFactory object.

Parameters:
servletContext - the servlet context
factory - the factory object

getFactory

public static CommandManagerFactory getFactory(javax.servlet.ServletContext servletContext)
Gets the CommandManagerFactory object for this context.

Parameters:
servletContext - the servlet context
Returns:
returns the CommandManagerFactory object

getCommandPrefix

public java.lang.String getCommandPrefix(org.apache.jetspeed.portlet.PortletRequest request)
Returns the command prefix determined from the request object.

Parameters:
request - the portlet request object
Returns:
the command prefix

getCommand

public abstract IViewCommand getCommand(org.apache.jetspeed.portlet.PortletRequest request,
                                        org.apache.jetspeed.portlet.PortletResponse response)
                                 throws org.apache.jetspeed.portlet.PortletException
Gets the IViewCommand. The portal mode will be obtained from the PortletRequest.

Parameters:
request - the portlet request object
response - the portlet response object, can be null
Returns:
returns the IViewCommand
Throws:
org.apache.jetspeed.portlet.PortletException - if the request cannot be fulfilled

getCommand

public abstract IViewCommand getCommand(org.apache.jetspeed.portlet.PortletRequest request,
                                        org.apache.jetspeed.portlet.PortletResponse response,
                                        java.lang.String prefix)
                                 throws org.apache.jetspeed.portlet.PortletException
Gets the IViewCommand. The prefix (that is, portlet mode) can be specified and may differ from the mode obtained from the request object.

Parameters:
request - the portlet request object
response - the portlet request object, can be null
prefix - the prefix
Returns:
returns the IViewCommand
Throws:
org.apache.jetspeed.portlet.PortletException - if the request cannot be fulfilled

setCommand

public abstract void setCommand(org.apache.jetspeed.portlet.PortletRequest request,
                                org.apache.jetspeed.portlet.PortletResponse response,
                                IViewCommand command)
                         throws org.apache.jetspeed.portlet.PortletException
Sets the IViewCommand. The mode should be obtained from the PortletRequest.

Parameters:
request - the portlet request object
response - the portlet response object, can be null
command - the command.
Throws:
org.apache.jetspeed.portlet.PortletException - if the request cannot be fulfilled

setCommand

public abstract void setCommand(org.apache.jetspeed.portlet.PortletRequest request,
                                org.apache.jetspeed.portlet.PortletResponse response,
                                IViewCommand command,
                                java.lang.String prefix)
                         throws org.apache.jetspeed.portlet.PortletException
Sets the IViewCommand. The prefix (that is, portlet mode) can be specified and may differ from the mode obtained from the request object.

Parameters:
request - the portlet request object
response - the portlet response object, can be null
command - the command.
prefix - the prefix
Throws:
org.apache.jetspeed.portlet.PortletException - if the request cannot be fulfilled

removeCommand

public abstract void removeCommand(org.apache.jetspeed.portlet.PortletRequest request,
                                   org.apache.jetspeed.portlet.PortletResponse response,
                                   java.lang.String prefix)
                            throws org.apache.jetspeed.portlet.PortletException
Removes the IViewCommand. The prefix (that is, portlet mode) can be specified and may differ from the mode obtained from the request object.

Parameters:
request - the portlet request object
response - the portlet response object, can be null
prefix - the prefix
Throws:
org.apache.jetspeed.portlet.PortletException - if the request cannot be fulfilled

Overview  Package   Class  Tree  Serialized  Deprecated  Index  Help 

 

WebSphere is a trademark of the IBM Corporation in the United States, other countries, or both.

 

IBM is a trademark of the IBM Corporation in the United States, other countries, or both.