OpenNMS API 1.2.3

org.opennms.web.admin.groups.parsers
Class Group

java.lang.Object
  extended byorg.opennms.web.admin.groups.parsers.Group
All Implemented Interfaces:
java.lang.Cloneable

public class Group
extends java.lang.Object
implements java.lang.Cloneable

This is a data class to store the group information from the groups.xml file

Version:
1.1.1.1
Author:
Jason Johns , OpenNMS

Field Summary
static java.lang.String GROUP_NAME_PROPERTY
           
private  java.lang.String m_groupComments
          The comments for the group
private  java.lang.String m_groupName
          The name of the group
private  java.beans.PropertyChangeSupport m_propChange
           
private  java.util.List m_users
          The list of users in the group
 
Constructor Summary
Group()
          Default constructor, intializes the users list
 
Method Summary
 void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
           
 void addUser(java.lang.String aUser)
          Adds a username to the list of users
 void clearUsers()
          Removes all users from the group.
 java.lang.Object clone()
           
 java.lang.String getGroupComments()
          Returns the comments for the group
 java.lang.String getGroupName()
          Returns the group name
 int getUserCount()
          Returns a count of the users in the list
 java.util.List getUsers()
          Returns the list of users
 boolean hasUser(java.lang.String aUser)
          Returns whether the group has this user in its users list
 void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
           
 void removeUser(java.lang.String aUser)
          Removes a username from the list of users
 void setGroupComments(java.lang.String someComments)
          Sets the comments for the group
 void setGroupName(java.lang.String aName)
          Sets the group name
 java.lang.String toString()
          Returns a String representation of the group, used primarily for debugging.
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

GROUP_NAME_PROPERTY

public static final java.lang.String GROUP_NAME_PROPERTY
See Also:
Constant Field Values

m_groupName

private java.lang.String m_groupName
The name of the group


m_groupComments

private java.lang.String m_groupComments
The comments for the group


m_users

private java.util.List m_users
The list of users in the group


m_propChange

private java.beans.PropertyChangeSupport m_propChange
Constructor Detail

Group

public Group()
Default constructor, intializes the users list

Method Detail

clone

public java.lang.Object clone()

addPropertyChangeListener

public void addPropertyChangeListener(java.beans.PropertyChangeListener listener)

removePropertyChangeListener

public void removePropertyChangeListener(java.beans.PropertyChangeListener listener)

setGroupName

public void setGroupName(java.lang.String aName)
Sets the group name

Parameters:
aName - the name of the group

getGroupName

public java.lang.String getGroupName()
Returns the group name

Returns:
the name of the group

setGroupComments

public void setGroupComments(java.lang.String someComments)
Sets the comments for the group

Parameters:
someComments - the comments for the group

getGroupComments

public java.lang.String getGroupComments()
Returns the comments for the group

Returns:
the comments for the group

hasUser

public boolean hasUser(java.lang.String aUser)
Returns whether the group has this user in its users list

Returns:
true if user is in list, false if not

addUser

public void addUser(java.lang.String aUser)
Adds a username to the list of users

Parameters:
aUser - a new username

removeUser

public void removeUser(java.lang.String aUser)
Removes a username from the list of users

Parameters:
aUser - the user to remove

clearUsers

public void clearUsers()
Removes all users from the group.


getUsers

public java.util.List getUsers()
Returns the list of users

Returns:
the list of users

getUserCount

public int getUserCount()
Returns a count of the users in the list

Returns:
how many users in this group

toString

public java.lang.String toString()
Returns a String representation of the group, used primarily for debugging.

Returns:
a string representation

OpenNMS API 1.2.3

Generated by eevans on May 29 2005 2015.