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 GroupManagergetInstance()Singleton static call to get the only instance that should exist for the GroupFactorystatic voidinit()initvoidreload()Parses the groups.xmlprotected voidsaveXml(String data)saveXmlstatic voidsetInstance(GroupManager mgr)setInstancevoidupdate()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
-
-
-
-
Constructor Detail
-
GroupFactory
public GroupFactory() throws FileNotFoundException, IOExceptionConstructor which parses the file- Throws:
IOException- if any.FileNotFoundException- if any.
-
-
Method Detail
-
init
public static void init() throws IOException, FileNotFoundExceptioninit
- Throws:
IOException- if any.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- aGroupManagerobject.
-
reload
public void reload() throws IOException, FileNotFoundExceptionParses the groups.xml- Throws:
IOException- if any.FileNotFoundException- if any.
-
saveXml
protected void saveXml(String data) throws IOException
saveXml
- Specified by:
saveXmlin classGroupManager- Parameters:
data- aStringobject.- Throws:
IOException- if any.
-
update
public void update() throws IOExceptionupdate
- Specified by:
updatein classGroupManager- Throws:
IOException- if any.
-
-