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.resource.common.monitor.visibility
Class InventoryHelper

    java.lang.Object
      org.hyperic.hq.ui.action.resource.common.monitor.visibility.InventoryHelper

Direct Known Subclasses:
  ApplicationInventoryHelper, GroupInventoryHelper, PlatformInventoryHelper, RootInventoryHelper, ServerInventoryHelper, ServiceInventoryHelper

    public abstract class InventoryHelper

extends java.lang.Object

A class that provides utility methods for common monitoring tasks. Typical usage: an action class uses the `getHelper` factory method to obtain an `InventoryHelper` specific to the entity type of a particular resource.

Field Summary
`protected AppdefEntityID` | `entityId`
`protected org.apache.commons.logging.Log` | `log`

Constructor Summary
`protected` | `InventoryHelper(AppdefEntityID entityId)`

Method Summary
`abstract java.util.Map` | `getChildCounts(javax.servlet.http.HttpServletRequest request, javax.servlet.ServletContext ctx, AppdefResourceValue resource)` Get from the Bizapp the numbers of children of the given resource.
`abstract AppdefResourceType` | `getChildResourceType(javax.servlet.http.HttpServletRequest req, javax.servlet.ServletContext ctx, AppdefEntityTypeID atid)` Get a child resource type from the Bizapp.
`abstract java.util.List` | `getChildResourceTypes(javax.servlet.http.HttpServletRequest request, javax.servlet.ServletContext ctx, AppdefResourceValue resource)` Get the set of child resource types representing a resource's child resources.
`static InventoryHelper` | `getHelper(AppdefEntityID entityId)` Return a subclass of `InventoryHelper` specific to the entity type of a particular resource.
`java.lang.Integer` | `getSelectedChildId(javax.servlet.http.HttpServletRequest request, java.util.List childTypes, java.util.Map childCounts)` Retrieve the id of the selected child resource type from the request.
`java.lang.Integer` | `getSelectedChildId(javax.servlet.http.HttpServletRequest request, java.util.List childTypes, java.util.Map childCounts, boolean defaultOverride)` Retrieve the id of the selected child resource type from the request.
`AppdefResourceTypeValue` | `getSelectedChildType(javax.servlet.http.HttpServletRequest request, java.util.List childTypes, java.util.Map childCounts, java.lang.Integer selectedId)` Retrieve the `AppdefResourceTypeValue` representing the currently selected child resource type (or, if the `isPerformance` flag is not set, the default child resource type, if none is currently selected).
`boolean` | `isResourceConfigured(javax.servlet.http.HttpServletRequest request, javax.servlet.ServletContext ctx, boolean setError)`
`boolean` | `selectDefaultSubtab()` Return a boolean indicating whether or not performance pages should select the default subtab when none is selected.
`boolean` | `showPerformanceSubtabs()` Return a boolean indicating whether or not performance pages should show child type subtabs.

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

Field Detail

### log

    protected org.apache.commons.logging.Log log

### entityId

    protected AppdefEntityID entityId

Constructor Detail

### InventoryHelper

    protected InventoryHelper(AppdefEntityID entityId)

Method Detail

### getHelper

    public static InventoryHelper getHelper(AppdefEntityID entityId)

  Return a subclass of `InventoryHelper` specific to the entity type of a particular resource.

### getChildResourceTypes

    public abstract java.util.List getChildResourceTypes(javax.servlet.http.HttpServletRequest request,
                                                         javax.servlet.ServletContext ctx,
                                                         AppdefResourceValue resource)
                                                  throws java.lang.Exception

  Get the set of child resource types representing a resource's child resources.

  Throws:
    `java.lang.Exception`

### getChildResourceType

    public abstract AppdefResourceType getChildResourceType(javax.servlet.http.HttpServletRequest req,
                                                            javax.servlet.ServletContext ctx,
                                                            AppdefEntityTypeID atid)
                                                     throws java.lang.Exception

  Get a child resource type from the Bizapp.

  Parameters:
    `id` - the id of the child resource type
  Throws:
    `java.lang.Exception`

### getChildCounts

    public abstract java.util.Map getChildCounts(javax.servlet.http.HttpServletRequest request,
                                                 javax.servlet.ServletContext ctx,
                                                 AppdefResourceValue resource)
                                          throws java.lang.Exception

  Get from the Bizapp the numbers of children of the given resource. Returns a `Map` of counts keyed by child resource type.

  Parameters:
    `resource` - the appdef resource whose children we are counting
  Throws:
    `java.lang.Exception`

### getSelectedChildId

    public java.lang.Integer getSelectedChildId(javax.servlet.http.HttpServletRequest request,
                                                java.util.List childTypes,
                                                java.util.Map childCounts,
                                                boolean defaultOverride)

  Retrieve the id of the selected child resource type from the request. If no selection was made, then return the default id if `selectDefaultSubtab` allows.

  Parameters:
    `childTypes` - the complete List of child resource types for this entity type
    `childCounts` - the Map of child resource counts keyed by resource type
    `defaultOverride` - whether or not to override `selectDefaultSubtab`

### getSelectedChildId

    public java.lang.Integer getSelectedChildId(javax.servlet.http.HttpServletRequest request,
                                                java.util.List childTypes,
                                                java.util.Map childCounts)

  Retrieve the id of the selected child resource type from the request. If no selection was made, then return the default id if `selectDefaultSubtab` allows.

  Parameters:
    `childTypes` - the complete List of child resource types for this entity type
    `childCounts` - the Map of child resource counts keyed by resource type

### getSelectedChildType

    public AppdefResourceTypeValue getSelectedChildType(javax.servlet.http.HttpServletRequest request,
                                                        java.util.List childTypes,
                                                        java.util.Map childCounts,
                                                        java.lang.Integer selectedId)

  Retrieve the `AppdefResourceTypeValue` representing the currently selected child resource type (or, if the `isPerformance` flag is not set, the default child resource type, if none is currently selected).

  Parameters:
    `childTypes` - the complete List of child resource types for this entity type
    `childCounts` - the Map of child resource counts keyed by resource type
    `isPerformance` - a Boolean indicating whether or not we are currently displaying a performance page

### showPerformanceSubtabs

    public boolean showPerformanceSubtabs()

  Return a boolean indicating whether or not performance pages should show child type subtabs. The default behavior is to show subtabs.

### selectDefaultSubtab

    public boolean selectDefaultSubtab()

  Return a boolean indicating whether or not performance pages should select the default subtab when none is selected. The default behavior is to select the default subtab.

### isResourceConfigured

    public boolean isResourceConfigured(javax.servlet.http.HttpServletRequest request,
                                        javax.servlet.ServletContext ctx,
                                        boolean setError)
                                 throws javax.servlet.ServletException,
                                        AppdefEntityNotFoundException,
                                        SessionNotFoundException,
                                        SessionTimeoutException,
                                        PermissionException,
                                        EncodingException,
                                        java.rmi.RemoteException

  Throws:
    `javax.servlet.ServletException`
    `AppdefEntityNotFoundException`
    `SessionNotFoundException`
    `SessionTimeoutException`
    `PermissionException`
    `EncodingException`
    `java.rmi.RemoteException`

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.