Class Group
- java.lang.Object
- 
- org.opennms.web.admin.groups.parsers.Group
 
- 
- All Implemented Interfaces:
- java.lang.Cloneable
 
 public class Group extends java.lang.Object implements java.lang.CloneableThis is a data class to store the group information from the groups.xml file- Since:
- 1.8.1
- Version:
- 1.1.1.1
- Author:
- Jason Johns , OpenNMS , Jason Johns , OpenNMS
 
- 
- 
Field SummaryFields Modifier and Type Field Description static java.lang.StringGROUP_NAME_PROPERTY
 - 
Constructor SummaryConstructors Constructor Description Group()Default constructor, initializes the users list
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddPropertyChangeListener(java.beans.PropertyChangeListener listener)addPropertyChangeListenervoidaddUser(java.lang.String aUser)Adds a username to the list of usersvoidclearUsers()Removes all users from the group.Groupclone()clonejava.lang.StringgetGroupComments()Returns the comments for the groupGroupInfogetGroupInfo()Returns the group information for this groupjava.lang.StringgetGroupName()Returns the group nameintgetUserCount()Returns a count of the users in the listjava.util.List<java.lang.String>getUsers()Returns the list of usersbooleanhasUser(java.lang.String aUser)Returns whether the group has this user in its users listvoidremovePropertyChangeListener(java.beans.PropertyChangeListener listener)removePropertyChangeListenervoidremoveUser(java.lang.String aUser)Removes a username from the list of usersvoidsetGroupComments(java.lang.String someComments)Sets the comments for the groupvoidsetGroupInfo(GroupInfo someInfo)Sets the group information for this groupvoidsetGroupName(java.lang.String aName)Sets the group namejava.lang.StringtoString()Returns a String representation of the group, used primarily for debugging.
 
- 
- 
- 
Field Detail- 
GROUP_NAME_PROPERTYpublic static final java.lang.String GROUP_NAME_PROPERTY - See Also:
- Constant Field Values
 
 
- 
 - 
Method Detail- 
clonepublic Group clone() clone - Overrides:
- clonein class- java.lang.Object
- Returns:
- a Groupobject.
 
 - 
addPropertyChangeListenerpublic void addPropertyChangeListener(java.beans.PropertyChangeListener listener) addPropertyChangeListener - Parameters:
- listener- a- PropertyChangeListenerobject.
 
 - 
removePropertyChangeListenerpublic void removePropertyChangeListener(java.beans.PropertyChangeListener listener) removePropertyChangeListener - Parameters:
- listener- a- PropertyChangeListenerobject.
 
 - 
getGroupInfopublic GroupInfo getGroupInfo() Returns the group information for this group- Returns:
- the group info
 
 - 
setGroupInfopublic void setGroupInfo(GroupInfo someInfo) Sets the group information for this group- Parameters:
- someInfo- the group info
 
 - 
setGroupNamepublic void setGroupName(java.lang.String aName) Sets the group name- Parameters:
- aName- the name of the group
 
 - 
getGroupNamepublic java.lang.String getGroupName() Returns the group name- Returns:
- the name of the group
 
 - 
setGroupCommentspublic void setGroupComments(java.lang.String someComments) Sets the comments for the group- Parameters:
- someComments- the comments for the group
 
 - 
getGroupCommentspublic java.lang.String getGroupComments() Returns the comments for the group- Returns:
- the comments for the group
 
 - 
hasUserpublic boolean hasUser(java.lang.String aUser) Returns whether the group has this user in its users list- Parameters:
- aUser- a- Stringobject.
- Returns:
- true if user is in list, false if not
 
 - 
addUserpublic void addUser(java.lang.String aUser) Adds a username to the list of users- Parameters:
- aUser- a new username
 
 - 
removeUserpublic void removeUser(java.lang.String aUser) Removes a username from the list of users- Parameters:
- aUser- the user to remove
 
 - 
clearUserspublic void clearUsers() Removes all users from the group.
 - 
getUserspublic java.util.List<java.lang.String> getUsers() Returns the list of users- Returns:
- the list of users
 
 - 
getUserCountpublic int getUserCount() Returns a count of the users in the list- Returns:
- how many users in this group
 
 - 
toStringpublic java.lang.String toString() Returns a String representation of the group, used primarily for debugging.- Overrides:
- toStringin class- java.lang.Object
- Returns:
- a string representation
 
 
- 
 
-