org.rhq.core.domain.resource.composite
Class ResourceFacets

java.lang.Object
  extended by org.rhq.core.domain.resource.composite.ResourceFacets
All Implemented Interfaces:
Serializable

public class ResourceFacets
extends Object
implements Serializable

The set of facets a Resource or compatible Resource group supports - used to determine which quick-nav icons and tabs to display in the GUI.

See Also:
Serialized Form

Field Summary
static ResourceFacets ALL
           
static ResourceFacets NONE
           
 
Constructor Summary
ResourceFacets()
           
ResourceFacets(int resourceTypeId, boolean measurement, boolean event, boolean pluginConfiguration, boolean configuration, boolean operation, boolean content, boolean callTime, boolean support, boolean drift, boolean bundle)
           
ResourceFacets(int resourceTypeId, Number measurement, Number event, Number pluginConfiguration, Number configuration, Number operation, Number content, Number callTime, Number support, Number drift, Number bundle)
           
 
Method Summary
 Set<ResourceTypeFacet> getFacets()
          Returns an enum representation of the facets.
 int getResourceTypeId()
           
 boolean isBundle()
          Does this resource expose bundle deploy capability?
 boolean isCallTime()
          Does this resource expose any call-time metrics?
 boolean isConfiguration()
          Does this resource expose its configuration?
 boolean isContent()
          Does this resource expose any content?
 boolean isDrift()
          Does this resource expose drift capability?
 boolean isEvent()
          Does this resource have any event definitions?
 boolean isMeasurement()
          Does this resource expose any metrics?
 boolean isOperation()
          Does this resource expose any operations?
 boolean isPluginConfiguration()
          Does this resource have a plugin configuration?
 boolean isSupport()
          Does this resource expose support snapshot capability?
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NONE

public static ResourceFacets NONE

ALL

public static ResourceFacets ALL
Constructor Detail

ResourceFacets

public ResourceFacets()

ResourceFacets

public ResourceFacets(int resourceTypeId,
                      boolean measurement,
                      boolean event,
                      boolean pluginConfiguration,
                      boolean configuration,
                      boolean operation,
                      boolean content,
                      boolean callTime,
                      boolean support,
                      boolean drift,
                      boolean bundle)

ResourceFacets

public ResourceFacets(int resourceTypeId,
                      Number measurement,
                      Number event,
                      Number pluginConfiguration,
                      Number configuration,
                      Number operation,
                      Number content,
                      Number callTime,
                      Number support,
                      Number drift,
                      Number bundle)
Method Detail

getResourceTypeId

public int getResourceTypeId()

isMeasurement

public boolean isMeasurement()
Does this resource expose any metrics? (currently not used for anything in the GUI, since the Monitor and Alert tabs are always displayed).

Returns:
true if the resource exposes any metrics, false otherwise

isEvent

public boolean isEvent()
Does this resource have any event definitions?

Returns:
true if the resource has any event definitions

isPluginConfiguration

public boolean isPluginConfiguration()
Does this resource have a plugin configuration? If so, the Inventory>Connection subtab will be displayed in the GUI.

Returns:
true if the resource has a plugin configuration, false otherwise

isConfiguration

public boolean isConfiguration()
Does this resource expose its configuration? If so, the Configure tab will be displayed in the GUI.

Returns:
true if the resource exposes its configuration, false otherwise

isOperation

public boolean isOperation()
Does this resource expose any operations? If so, the Operations tab will be displayed in the GUI.

Returns:
true if the resource exposes its operations, false otherwise

isContent

public boolean isContent()
Does this resource expose any content? If so, the Content tab will be displayed in the GUI.

Returns:
true if the resource exposes its content, false otherwise

isCallTime

public boolean isCallTime()
Does this resource expose any call-time metrics? If so, the Call Time sub-tab will be displayed in the GUI.

Returns:
true if the resource exposes any call-time metrics, false otherwise

isSupport

public boolean isSupport()
Does this resource expose support snapshot capability? If so, the Support sub-tab will be displayed in the GUI.

Returns:
true if the resource allows support snapshots, false otherwise

isDrift

public boolean isDrift()
Does this resource expose drift capability? If so, the Drift sub-tab will be displayed in the GUI.

Returns:
true if the resource allows drift detection, false otherwise

isBundle

public boolean isBundle()
Does this resource expose bundle deploy capability? If so, the Bundle sub-tab will be displayed in the GUI (TODO: this is not currently implemented but we have other needs for knowning whether a type supports bundle deployment.

Returns:
true if the resource allows bundle deployment, false otherwise

getFacets

public Set<ResourceTypeFacet> getFacets()
Returns an enum representation of the facets.

Returns:
an enum representation of the facets


Copyright © 2008-2011 Red Hat, Inc.. All Rights Reserved.