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
Class WpsStrutsViewErrorCommand

    java.lang.Object
      com.ibm.wps.portlets.struts.WpsStrutsViewCommand
          com.ibm.wps.portlets.struts.WpsStrutsViewErrorCommand

All Implemented Interfaces:
  IViewCommand, java.io.Serializable

    public class WpsStrutsViewErrorCommand

extends WpsStrutsViewCommand

The `WpsStrutsViewErrorCommand` class is a specific command-pattern class used to display an error.

Since:
  4.1
See Also:
  Serialized Form

Field Summary
`protected static java.lang.String` | `ERROR_INFO` Name of the request attribute for the error info object.

Fields inherited from class com.ibm.wps.portlets.struts.WpsStrutsViewCommand
`LAST_MODIFIED, PREFIX`

Constructor Summary
`WpsStrutsViewErrorCommand(ErrorResponseInfo errorInfo, PortletRequest request)` Constructs the View command.

Method Summary
`static void` | `addAttributeNameToSave(java.lang.String attributeName)` Adds the name of an attribute from the object request the 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 Portal's render phase.
`void` | `execute(PortletRequest request, PortletResponse response, ViewCommandExecutionContext executionContext)` Executes the given command given the request and response objects.
`ErrorResponseInfo` | `getErrorInfo(PortletRequest request)` Gets the error response info object.
`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.
`void` | `saveAttributes(HttpServletRequest request, ViewCommandExecutionContext executionContext)` Saves the attributes specific to the ErrorResponseInfo rendering.

Methods inherited from class com.ibm.wps.portlets.struts.WpsStrutsViewCommand
`addAttribute, addParameterNameToSave, execute, getLastModified, getPrefix, getRemoveOnModeChange, getSavedAttributes, getSavedCommand, removeAttribute, removeParameterNameToSave, repopulateRequest, saveAsAttribute, saveAsParameter, saveAttribute, saveAttributes, saveCommand, saveCommand, saveParameter, saveParameters, setLastModified, setPrefix, setRemoveOnModeChange, setSavedAttributes`

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

Field Detail

### ERROR_INFO

    protected static final java.lang.String ERROR_INFO

  Name of the request attribute for the error info object.

  See Also:
    Constant Field Values

Constructor Detail

### WpsStrutsViewErrorCommand

    public WpsStrutsViewErrorCommand(ErrorResponseInfo errorInfo,
                                     PortletRequest request)

  Constructs the View command.

  Parameters:
    `errorInfo` - the error response info object
    `request` - The request object to save context information from

Method Detail

### execute

    public void execute(PortletRequest request,
                        PortletResponse response,
                        ViewCommandExecutionContext executionContext)
                 throws PortletException

  Executes the given command given the request and response objects.

  Specified by:
    `execute` in interface `IViewCommand`
  Overrides:
    `execute` in class `WpsStrutsViewCommand`
  Parameters:
    `request` - The request object
    `response` - The response object
    `executionContext` - the execution context object
  Throws:
    `PortletException` - if the request cannot be fulfilled

### saveAttributes

    public void saveAttributes(HttpServletRequest request,
                               ViewCommandExecutionContext executionContext)

  Saves the attributes specific to the ErrorResponseInfo rendering.

  Overrides:
    `saveAttributes` in class `WpsStrutsViewCommand`
  Parameters:
    `request` - the request object
    `executionContext` - the context object

### getErrorInfo

    public ErrorResponseInfo getErrorInfo(PortletRequest request)

  Gets the error response info object.

  Parameters:
    `request` - the portlet request object
  Returns:
    ErrorResponseInfo the error response info object

### addAttributeNameToSave

    public static void addAttributeNameToSave(java.lang.String attributeName)

  Adds the name of an attribute from the object request the needs to be saved if present for the execution of the IViewCommand in Portal's render phase.

  Parameters:
    `attributeName` - the name of the attribute

### removeAttributeNameToSave

    public static void removeAttributeNameToSave(java.lang.String attributeName)

  Removes the name of an attribute from the list of attribute names to save.

  Parameters:
    `attributeName` - the name of the attribute

### addAttributeTypeToSave

    public 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 Portal's render phase.

  Parameters:
    `attributeType` - the attribute type

### removeAttributeTypeToSave

    public static void removeAttributeTypeToSave(java.lang.Class attributeType)

  Removes the class type of the request attribute from the list of attributes to save.

  Parameters:
    `attributeType` - the attribute type

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