AddResourcesPrepareAction (Hyperic HQ Plugin API)
Keywords: org.hyperic.hq.ui.action.portlet.addresource.AddResourcesPrepareAction 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.action.portlet.addresource
Class AddResourcesPrepareAction

    java.lang.Object
      org.apache.struts.action.Action
          org.hyperic.hq.ui.action.portlet.addresource.AddResourcesPrepareAction

    public class AddResourcesPrepareAction

extends org.apache.struts.action.Action

An Action that retrieves data from the user preferences of the form. The purpose of this is to add resources to the resource health dashboard widget This implementation heavily based on: org.hyperic.hq.ui.action.admin.role.AddUsersRoleFormPrepareAction

Field Summary

Fields inherited from class org.apache.struts.action.Action
`servlet`

Constructor Summary
`AddResourcesPrepareAction()`

Method Summary
`java.util.List` | `buildAvailableResourceTypes(java.util.List avail)` builds a unique list of AppdefResourceTypeValue objects
`org.apache.struts.action.ActionForward` | `execute(org.apache.struts.action.ActionMapping mapping, org.apache.struts.action.ActionForm form, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)` Retrieve this data and store it in the specified request parameters: `GroupValue` object identified by `Constants.RESOURCE_PARAM` request parameter in `Constants.RESOURCE_ATTR` `List` of available `AppdefResourceValue` objects (those not already associated with the group) in `Constants.AVAIL_RESOURCES_ATTR` `Integer` number of available roles in `Constants.NUM_AVAIL_RESOURCES_ATTR` `List` of pending `OwnedRoleValue` objects (those in queue to be associated with the resource) in `Constants.PENDING_RESOURCES_ATTR` `Integer` number of pending resources in `Constants.NUM_PENDING_RESOURCES_ATTR` `List` of pending `AppdefResourceValue` ids (those in queue to be associated with the resource) in `Constants.PENDING_RESOURCES_SES_ATTR` This Action edits 2 lists of Resources: pending, and available.
`static java.util.List` | `subsetAvailableResources(java.util.List avail, java.lang.Integer filterType)` returns a filtered subset of available resources for a given resource based on the the resource type type

Methods inherited from class org.apache.struts.action.Action
`addErrors, addMessages, execute, generateToken, getErrors, getLocale, getMessages, getResources, getResources, getServlet, isCancelled, isTokenValid, isTokenValid, resetToken, saveErrors, saveErrors, saveMessages, saveMessages, saveToken, setLocale, setServlet`

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

Constructor Detail

### AddResourcesPrepareAction

    public AddResourcesPrepareAction()

Method Detail

### execute

    public org.apache.struts.action.ActionForward execute(org.apache.struts.action.ActionMapping mapping,
                                                          org.apache.struts.action.ActionForm form,
                                                          javax.servlet.http.HttpServletRequest request,
                                                          javax.servlet.http.HttpServletResponse response)
                                                   throws java.lang.Exception

  Retrieve this data and store it in the specified request parameters:
  - `GroupValue` object identified by `Constants.RESOURCE_PARAM` request parameter in `Constants.RESOURCE_ATTR`
  - `List` of available `AppdefResourceValue` objects (those not already associated with the group) in `Constants.AVAIL_RESOURCES_ATTR`
  - `Integer` number of available roles in `Constants.NUM_AVAIL_RESOURCES_ATTR`
  - `List` of pending `OwnedRoleValue` objects (those in queue to be associated with the resource) in `Constants.PENDING_RESOURCES_ATTR`
  - `Integer` number of pending resources in `Constants.NUM_PENDING_RESOURCES_ATTR`
  - `List` of pending `AppdefResourceValue` ids (those in queue to be associated with the resource) in `Constants.PENDING_RESOURCES_SES_ATTR`
  This Action edits 2 lists of Resources: pending, and available.

  Overrides:
    `execute` in class `org.apache.struts.action.Action`
  Throws:
    `java.lang.Exception`

### subsetAvailableResources

    public static java.util.List subsetAvailableResources(java.util.List avail,
                                                          java.lang.Integer filterType)

  returns a filtered subset of available resources for a given resource based on the the resource type type

  Returns:
    a list of AppdefResourceValue objects

### buildAvailableResourceTypes

    public java.util.List buildAvailableResourceTypes(java.util.List avail)

  builds a unique list of AppdefResourceTypeValue objects

  Returns:
    a unique list of AppdefResourceTypeValue objects

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.