Overview | Package | Class | Tree | Serialized | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

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

    java.lang.Object
      com.ibm.wps.portlets.struts.plugins.CommandManagerFactory

    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(PortletRequest request, PortletResponse response)` Gets the IViewCommand.
`abstract IViewCommand` | `getCommand(PortletRequest request, PortletResponse response, java.lang.String prefix)` Gets the IViewCommand.
`java.lang.String` | `getCommandPrefix(PortletRequest request)` Returns the command prefix determined from the request object.
`static CommandManagerFactory` | `getFactory(ServletContext servletContext)` Gets the CommandManagerFactory object for this context.
`abstract void` | `removeCommand(PortletRequest request, PortletResponse response, java.lang.String prefix)` Removes the IViewCommand.
`abstract void` | `setCommand(PortletRequest request, PortletResponse response, IViewCommand command)` Sets the IViewCommand.
`abstract void` | `setCommand(PortletRequest request, PortletResponse response, IViewCommand command, java.lang.String prefix)` Sets the IViewCommand.
`static void` | `setFactory(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(ServletContext servletContext,
                                  CommandManagerFactory factory)

  Sets a new CommandManagerFactory object.

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

### getFactory

    public static CommandManagerFactory getFactory(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(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(PortletRequest request,
                                            PortletResponse response)
                                     throws 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:
    `PortletException` - if the request cannot be fulfilled

### getCommand

    public abstract IViewCommand getCommand(PortletRequest request,
                                            PortletResponse response,
                                            java.lang.String prefix)
                                     throws 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:
    `PortletException` - if the request cannot be fulfilled

### setCommand

    public abstract void setCommand(PortletRequest request,
                                    PortletResponse response,
                                    IViewCommand command)
                             throws 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:
    `PortletException` - if the request cannot be fulfilled

### setCommand

    public abstract void setCommand(PortletRequest request,
                                    PortletResponse response,
                                    IViewCommand command,
                                    java.lang.String prefix)
                             throws 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:
    `PortletException` - if the request cannot be fulfilled

### removeCommand

    public abstract void removeCommand(PortletRequest request,
                                       PortletResponse response,
                                       java.lang.String prefix)
                                throws 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:
    `PortletException` - if the request cannot be fulfilled

Overview | Package | Class | Tree | Serialized | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD