AppdefGroupValue (Hyperic HQ Plugin API)
Keywords: org.hyperic.hq.appdef.shared.AppdefGroupValue 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.appdef.shared
Class AppdefGroupValue

    java.lang.Object
      org.hyperic.hq.appdef.shared.AppdefResourceValue
          org.hyperic.hq.appdef.shared.AppdefGroupValue

All Implemented Interfaces:
  java.io.Serializable, java.lang.Cloneable, java.lang.Comparable, GroupValue

    public class AppdefGroupValue

extends AppdefResourceValue
implements GroupValue, java.lang.Cloneable, java.io.Serializable

Appdef GroupValue implements the grouping subsystem's GroupValue interface and provides the implementation for its methods. The class extends the domain of groupable elements to include appdef entities. The group entries are converted to and from appdef entities as required to meet the needs of consumers. Note, despite the "Value" name and implied value object pattern, this class is not necessarily light weight. It is likely that an instance of this class will hold references to one or more visitor class instances. This makes it an extremely bad candidate for, say, sticking in the session. (MOST of this junk belongs in an abstract base class in the grouping subsystem. However, the requirement is that this class MUST extend AppdefResourceValue and since Java doesn't allow multiple inheritance, well, we're stuck with this.)

See Also:
  Serialized Form

Constructor Summary
`AppdefGroupValue()`
`AppdefGroupValue(java.lang.Integer id)`

Method Summary
`void` | `addAppdefEntity(AppdefEntityID entity)` Adds an entity identified by AppdefEntityID to our group.
`void` | `addEntry(GroupEntry entry)` Adds an entry to the group.
`java.lang.Object` | `clone()` A deep copy clone implementation specifically addresses the need for the GroupManager to have a way to create new instances of the concrete groups for which it has no class definition.
`boolean` | `equals(java.lang.Object other)`
`boolean` | `existsAppdefEntity(AppdefEntityID entity)` Asserts that an element exists in the group.
`boolean` | `existsEntry(GroupEntry entry)` Asserts that an element exists in the group.
`PageList` | `getAppdefGroupEntries()` Fetch the group members as a paged list of AppdefEntityIDs.
`PageList` | `getAppdefGroupEntries(java.util.Comparator comparator)` Fetch the group members as a paged list of AppdefEntityIDs.
`AppdefResourceTypeValue` | `getAppdefResourceTypeValue()` Gets the appdef resource type value of this group.
`int` | `getClusterId()` The group's clusterId
`java.lang.Long` | `getCTime()`
`java.lang.String` | `getDescription()` Group description
`AppdefEntityID` | `getEntityId()` get an entity ID for the object
`int` | `getGroupEntResType()` The group entity resource type
`PageList` | `getGroupEntries()` The PageList of group entries
`int` | `getGroupEntType()` The group entity type
`int` | `getGroupType()` The group type (adhoc, compatible)
`java.lang.String` | `getGroupTypeLabel()` The group type label
`java.lang.Integer` | `getId()` The group identifier
`java.lang.String` | `getLocation()` Location - now applicable
`java.lang.String` | `getModifiedBy()` ModifiedBy - now applicable
`java.lang.Long` | `getMTime()`
`java.lang.String` | `getName()` The name of the group
`java.lang.String` | `getOwner()` Owner - not applicable, here only to satisfy interface.
`int` | `getSize()` The group size PageList.size()
`AuthzSubject` | `getSubject()`
`int` | `getTotalSize()` The group total size (PageList.getTotalSize())
`int` | `hashCode()`
`boolean` | `isGroupAdhoc()` Test whether the group type is one of the adhoc types.
`boolean` | `isGroupCompat()` Test whether the group type is one of the compatible types.
`void` | `removeAppdefEntity(AppdefEntityID entity)` Removes an entity identified by AppdefEntityID from our group.
`void` | `removeEntry(GroupEntry goner)` Removes an entry from the group.
`void` | `setAppdefResourceTypeValue(AppdefResourceTypeValue artv)` Sets the appdef resource type value of this group.
`void` | `setClusterId(int clusterId)`
`void` | `setCTime(java.lang.Long ctime)`
`void` | `setDescription(java.lang.String desc)`
`void` | `setGroupEntResType(int groupEntResType)`
`void` | `setGroupEntType(int groupEntType)`
`void` | `setGroupType(int groupType)`
`void` | `setId(java.lang.Integer id)`
`void` | `setLocation(java.lang.String s)`
`void` | `setModifiedBy(java.lang.String s)`
`void` | `setMTime(java.lang.Long mtime)`
`void` | `setName(java.lang.String name)`
`void` | `setOwner(java.lang.String s)`
`void` | `setSubject(AuthzSubject s)` The group owner
`void` | `setTotalSize(int groupTotalSize)` The group total size (PageList.setTotalSize())
`java.lang.String` | `toString()`

Methods inherited from class org.hyperic.hq.appdef.shared.AppdefResourceValue
`compareTo, getHostName, getPlatformTypeCountMap, getResourceTypeCountMap, getServerTypeCountMap, getServiceTypeCountMap, setHostName`

Methods inherited from class java.lang.Object
`finalize, getClass, notify, notifyAll, wait, wait, wait`

Constructor Detail

### AppdefGroupValue

    public AppdefGroupValue()

### AppdefGroupValue

    public AppdefGroupValue(java.lang.Integer id)

Method Detail

### getId

    public java.lang.Integer getId()

  The group identifier

  Specified by:
    `getId` in interface `GroupValue`
  Specified by:
    `getId` in class `AppdefResourceValue`

### setId

    public void setId(java.lang.Integer id)

  Specified by:
    `setId` in interface `GroupValue`
  Specified by:
    `setId` in class `AppdefResourceValue`

### getEntityId

    public AppdefEntityID getEntityId()

  Description copied from class: `AppdefResourceValue`
  get an entity ID for the object

  Specified by:
    `getEntityId` in class `AppdefResourceValue`

### getGroupType

    public int getGroupType()

  The group type (adhoc, compatible)

  Specified by:
    `getGroupType` in interface `GroupValue`

### setGroupType

    public void setGroupType(int groupType)

  Specified by:
    `setGroupType` in interface `GroupValue`

### getGroupTypeLabel

    public java.lang.String getGroupTypeLabel()

  The group type label

### isGroupAdhoc

    public boolean isGroupAdhoc()

  Test whether the group type is one of the adhoc types.

### isGroupCompat

    public boolean isGroupCompat()

  Test whether the group type is one of the compatible types.

### getGroupEntType

    public int getGroupEntType()

  The group entity type

  Specified by:
    `getGroupEntType` in interface `GroupValue`

### setGroupEntType

    public void setGroupEntType(int groupEntType)

  Specified by:
    `setGroupEntType` in interface `GroupValue`

### getGroupEntResType

    public int getGroupEntResType()

  The group entity resource type

  Specified by:
    `getGroupEntResType` in interface `GroupValue`

### setGroupEntResType

    public void setGroupEntResType(int groupEntResType)

  Specified by:
    `setGroupEntResType` in interface `GroupValue`

### getClusterId

    public int getClusterId()

  Description copied from interface: `GroupValue`
  The group's clusterId

  Specified by:
    `getClusterId` in interface `GroupValue`

### setClusterId

    public void setClusterId(int clusterId)

  Specified by:
    `setClusterId` in interface `GroupValue`

### getName

    public java.lang.String getName()

  The name of the group

  Specified by:
    `getName` in interface `GroupValue`
  Specified by:
    `getName` in class `AppdefResourceValue`

### setName

    public void setName(java.lang.String name)

  Specified by:
    `setName` in interface `GroupValue`
  Specified by:
    `setName` in class `AppdefResourceValue`

### getDescription

    public java.lang.String getDescription()

  Group description

  Specified by:
    `getDescription` in interface `GroupValue`
  Specified by:
    `getDescription` in class `AppdefResourceValue`

### setDescription

    public void setDescription(java.lang.String desc)

  Specified by:
    `setDescription` in interface `GroupValue`
  Specified by:
    `setDescription` in class `AppdefResourceValue`

### setSubject

    public void setSubject(AuthzSubject s)

  The group owner

  Specified by:
    `setSubject` in interface `GroupValue`

### getSubject

    public AuthzSubject getSubject()

  Specified by:
    `getSubject` in interface `GroupValue`

### getSize

    public int getSize()

  The group size PageList.size()

  Specified by:
    `getSize` in interface `GroupValue`

### getTotalSize

    public int getTotalSize()

  The group total size (PageList.getTotalSize())

  Specified by:
    `getTotalSize` in interface `GroupValue`

### setTotalSize

    public void setTotalSize(int groupTotalSize)

  The group total size (PageList.setTotalSize())

  Specified by:
    `setTotalSize` in interface `GroupValue`

### getGroupEntries

    public PageList getGroupEntries()

  The PageList of group entries

  Specified by:
    `getGroupEntries` in interface `GroupValue`

### getAppdefGroupEntries

    public PageList getAppdefGroupEntries()

  Fetch the group members as a paged list of AppdefEntityIDs. The group will always contain a page list of values because ResourceGroupManager sees to it that all requests for group members receives a paged list. To specify a page control, pass it into the AppdefGroupManager's findGroup method (or to GroupUtil's) methods.

  Returns:
    paged list of members.

### getAppdefGroupEntries

    public PageList getAppdefGroupEntries(java.util.Comparator comparator)

  Fetch the group members as a paged list of AppdefEntityIDs. The group will always contain a page list of values because ResourceGroupManager sees to it that all requests for group members receives a paged list. To specify a page control, pass it into the AppdefGroupManager's findGroup method (or to GroupUtil's) methods.

  Parameters:
    `optional` - comparator
  Returns:
    paged list of members.

### getCTime

    public java.lang.Long getCTime()

  Specified by:
    `getCTime` in interface `GroupValue`
  Specified by:
    `getCTime` in class `AppdefResourceValue`

### getMTime

    public java.lang.Long getMTime()

  Specified by:
    `getMTime` in interface `GroupValue`
  Specified by:
    `getMTime` in class `AppdefResourceValue`

### setCTime

    public void setCTime(java.lang.Long ctime)

  Specified by:
    `setCTime` in interface `GroupValue`

### setMTime

    public void setMTime(java.lang.Long mtime)

  Specified by:
    `setMTime` in interface `GroupValue`

### addAppdefEntity

    public void addAppdefEntity(AppdefEntityID entity)

  Adds an entity identified by AppdefEntityID to our group. Conversion to the underlying group entry type (GroupEntry) will be automatic.

  Parameters:
    `appdef` - entity id

### existsAppdefEntity

    public boolean existsAppdefEntity(AppdefEntityID entity)

  Asserts that an element exists in the group.

  Returns:
    true if in group, false if not in group

### existsEntry

    public boolean existsEntry(GroupEntry entry)

  Asserts that an element exists in the group.

  Specified by:
    `existsEntry` in interface `GroupValue`
  Returns:
    true if in group, false if not in group

### removeAppdefEntity

    public void removeAppdefEntity(AppdefEntityID entity)

  Removes an entity identified by AppdefEntityID from our group.

### getAppdefResourceTypeValue

    public AppdefResourceTypeValue getAppdefResourceTypeValue()

  Gets the appdef resource type value of this group.

  Overrides:
    `getAppdefResourceTypeValue` in class `AppdefResourceValue`
  Returns:
    value object dowcasted to its base abstract class

### setAppdefResourceTypeValue

    public void setAppdefResourceTypeValue(AppdefResourceTypeValue artv)

  Sets the appdef resource type value of this group.

  Parameters:
    `artv` - - The entity type value object.

### addEntry

    public void addEntry(GroupEntry entry)

  Adds an entry to the group.

  Specified by:
    `addEntry` in interface `GroupValue`
  Parameters:
    `group` - entry value object.

### removeEntry

    public void removeEntry(GroupEntry goner)

  Removes an entry from the group.

  Specified by:
    `removeEntry` in interface `GroupValue`

### toString

    public java.lang.String toString()

  Overrides:
    `toString` in class `java.lang.Object`

### equals

    public boolean equals(java.lang.Object other)

  Specified by:
    `equals` in interface `GroupValue`
  Overrides:
    `equals` in class `java.lang.Object`

### hashCode

    public int hashCode()

  Specified by:
    `hashCode` in interface `GroupValue`
  Overrides:
    `hashCode` in class `java.lang.Object`

### getOwner

    public java.lang.String getOwner()

  Owner - not applicable, here only to satisfy interface.

  Specified by:
    `getOwner` in interface `GroupValue`
  Specified by:
    `getOwner` in class `AppdefResourceValue`

### setOwner

    public void setOwner(java.lang.String s)

  Specified by:
    `setOwner` in interface `GroupValue`
  Specified by:
    `setOwner` in class `AppdefResourceValue`

### getModifiedBy

    public java.lang.String getModifiedBy()

  ModifiedBy - now applicable

  Specified by:
    `getModifiedBy` in interface `GroupValue`
  Specified by:
    `getModifiedBy` in class `AppdefResourceValue`

### setModifiedBy

    public void setModifiedBy(java.lang.String s)

  Specified by:
    `setModifiedBy` in interface `GroupValue`
  Specified by:
    `setModifiedBy` in class `AppdefResourceValue`

### getLocation

    public java.lang.String getLocation()

  Location - now applicable

  Specified by:
    `getLocation` in interface `GroupValue`
  Specified by:
    `getLocation` in class `AppdefResourceValue`

### setLocation

    public void setLocation(java.lang.String s)

  Specified by:
    `setLocation` in interface `GroupValue`
  Specified by:
    `setLocation` in class `AppdefResourceValue`

### clone

    public java.lang.Object clone()
                           throws java.lang.CloneNotSupportedException

  A deep copy clone implementation specifically addresses the need for the GroupManager to have a way to create new instances of the concrete groups for which it has no class definition.

  Specified by:
    `clone` in interface `GroupValue`
  Overrides:
    `clone` in class `java.lang.Object`
  Throws:
    `java.lang.CloneNotSupportedException`

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.