Package org.opennms.netmgt.config
Class GroupFactory
- java.lang.Object
-
- org.opennms.netmgt.config.GroupManager
-
- org.opennms.netmgt.config.GroupFactory
-
- All Implemented Interfaces:
GroupConfig
public class GroupFactory extends GroupManager
GroupFactory class.
- Version:
- $Id: $
- Author:
- ranger
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.opennms.netmgt.config.GroupManager
GroupManager.OnmsGroupListMapper, GroupManager.OnmsGroupMapper
-
-
Field Summary
-
Fields inherited from class org.opennms.netmgt.config.GroupManager
m_dutySchedules
-
-
Constructor Summary
Constructors Constructor Description GroupFactory()
Constructor which parses the file
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static GroupManager
getInstance()
Singleton static call to get the only instance that should exist for the GroupFactorystatic void
init()
initvoid
reload()
Parses the groups.xmlprotected void
saveXml(java.lang.String data)
saveXmlstatic void
setInstance(GroupManager mgr)
setInstancevoid
update()
update-
Methods inherited from class org.opennms.netmgt.config.GroupManager
deleteGroup, deleteRole, deleteUser, findGroupsForUser, getGroup, getGroupNames, getGroups, getOnmsGroup, getOnmsGroupList, getRole, getRoleNames, getRoles, getRoleScheduleEntries, getSchedulesForRoleAt, getUserSchedulesForRole, groupNextOnDuty, hasGroup, isGroupOnDuty, isUserScheduledForRole, parseXml, renameGroup, renameUser, save, saveGroup, saveGroups, saveRole, setGroups, userHasRole
-
-
-
-
Method Detail
-
init
public static void init() throws java.io.IOException, java.io.FileNotFoundException
init
- Throws:
java.io.IOException
- if any.java.io.FileNotFoundException
- if any.
-
getInstance
public static GroupManager getInstance()
Singleton static call to get the only instance that should exist for the GroupFactory- Returns:
- the single group factory instance
-
setInstance
public static void setInstance(GroupManager mgr)
setInstance
- Parameters:
mgr
- aGroupManager
object.
-
reload
public void reload() throws java.io.IOException, java.io.FileNotFoundException
Parses the groups.xml- Throws:
java.io.IOException
- if any.java.io.FileNotFoundException
- if any.
-
saveXml
protected void saveXml(java.lang.String data) throws java.io.IOException
saveXml
- Specified by:
saveXml
in classGroupManager
- Parameters:
data
- aString
object.- Throws:
java.io.IOException
- if any.
-
update
public void update() throws java.io.IOException
update
- Specified by:
update
in classGroupManager
- Throws:
java.io.IOException
- if any.
-
-