ActionUtils (Hyperic HQ Plugin API)
Keywords: org.hyperic.hq.ui.util.ActionUtils class

Overview | Package | Class | Tree | Deprecated | Index | Help
| Hyperic HQ Plugin API v. 4.4.0.2
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.hyperic.hq.ui.util
Class ActionUtils

    java.lang.Object
      org.hyperic.hq.ui.util.ActionUtils

    public class ActionUtils

extends java.lang.Object

Utilities class that provides general convenience methods.

Constructor Summary
`ActionUtils()`

Method Summary
`static org.apache.struts.action.ActionForward` | `changeForwardPath(org.apache.struts.action.ActionForward forward, java.util.Map params)` Return a new `ActionForward` based on the given one but with the specified parameter name and value added to the new forward's path.
`static org.apache.struts.action.ActionForward` | `changeForwardPath(org.apache.struts.action.ActionForward forward, java.lang.String param, java.lang.String value)`
`static java.lang.String` | `changeUrl(java.lang.String url, java.util.Map params)` Change a url by appending all of the `params` to it.
`static java.util.List` | `convertEnumsToLabelBeans(java.util.List enums)` Convert a list of `HypericEnum`s into a list of `LabelValueBean`s
`static java.lang.String` | `findReturnPath(org.apache.struts.action.ActionMapping mapping, java.util.Map params)` Return a URL path that will return control to the current action.
`static java.lang.String` | `findReturnPath(org.apache.struts.action.ActionMapping mapping, java.lang.String param, java.lang.String value)`
`static java.util.List` | `getConfigValues(ConfigSchema schema, ConfigResponse config)`

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

Constructor Detail

### ActionUtils

    public ActionUtils()

Method Detail

### changeForwardPath

    public static org.apache.struts.action.ActionForward changeForwardPath(org.apache.struts.action.ActionForward forward,
                                                                           java.util.Map params)
                                                                    throws java.lang.Exception

  Return a new `ActionForward` based on the given one but with the specified parameter name and value added to the new forward's path. NOTE: this method would be unnecessary if Struts allowed us to "unfreeze" the `ForwardConfig` that is the superclass of the forward.

  Parameters:
    `forward` - the ActionForward on which the new forward is based
    `param` - the name of the path parameter to add
    `value` - the value of the parameter to add
  Throws:
    `javax.servlet.ServletException` - if encoding the path parameter fails
    `java.lang.Exception`

### changeForwardPath

    public static org.apache.struts.action.ActionForward changeForwardPath(org.apache.struts.action.ActionForward forward,
                                                                           java.lang.String param,
                                                                           java.lang.String value)
                                                                    throws java.lang.Exception

  Throws:
    `java.lang.Exception`

### changeUrl

    public static java.lang.String changeUrl(java.lang.String url,
                                             java.util.Map params)
                                      throws java.lang.Exception

  Change a url by appending all of the `params` to it.

  Parameters:
    `url` - the original URL
    `params` - the name-value pairs to append
  Returns:
    the new url
  Throws:
    `java.lang.Exception`

### findReturnPath

    public static java.lang.String findReturnPath(org.apache.struts.action.ActionMapping mapping,
                                                  java.util.Map params)
                                           throws java.lang.Exception

  Return a URL path that will return control to the current action. This path is generated by adding the specified parameter to the path of the forward specified as the "input" forward for the given mapping.

  Parameters:
    `mapping` - the ActionMapping describing the current action's forwards
    `param` - the name of the path parameter to add
    `value` - the value of the parameter to add
  Throws:
    `javax.servlet.ServletException` - if encoding the path parameter fails or input has not been set
    `java.lang.Exception`

### findReturnPath

    public static java.lang.String findReturnPath(org.apache.struts.action.ActionMapping mapping,
                                                  java.lang.String param,
                                                  java.lang.String value)
                                           throws java.lang.Exception

  Throws:
    `java.lang.Exception`

### getConfigValues

    public static java.util.List getConfigValues(ConfigSchema schema,
                                                 ConfigResponse config)

### convertEnumsToLabelBeans

    public static java.util.List convertEnumsToLabelBeans(java.util.List enums)

  Convert a list of `HypericEnum`s into a list of `LabelValueBean`s

Overview | Package | Class | Tree | Deprecated | Index | Help
| Hyperic HQ Plugin API v. 4.4.0.2
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2004-2006 Hyperic, Inc. support@hyperic.net, All Rights Reserved.