org.opennms.netmgt.config
Class GroupFactory

java.lang.Object
  extended by org.opennms.netmgt.config.GroupManager
      extended by org.opennms.netmgt.config.GroupFactory

public class GroupFactory
extends GroupManager

GroupFactory class.

Version:
$Id: $
Author:
ranger

Field Summary
 
Fields inherited from class org.opennms.netmgt.config.GroupManager
m_dutySchedules
 
Constructor Summary
GroupFactory()
          Constructor which parses the file
 
Method Summary
static GroupManager getInstance()
          Singleton static call to get the only instance that should exist for the GroupFactory
static void init()
          init
 void reload()
          Parses the groups.xml via the Castor classes
protected  void saveXml(String data)
          saveXml
static void setInstance(GroupManager mgr)
          setInstance
 void update()
          update
 
Methods inherited from class org.opennms.netmgt.config.GroupManager
deleteGroup, deleteRole, deleteUser, findGroupsForUser, getGroup, getGroupNames, getGroups, getRole, getRoleNames, getRoles, getRoleScheduleEntries, getSchedulesForRoleAt, getUserSchedulesForRole, groupNextOnDuty, hasGroup, isGroupOnDuty, isUserScheduledForRole, parseXml, parseXml, renameGroup, renameUser, saveGroup, saveGroups, saveRole, setGroups, userHasRole
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GroupFactory

public GroupFactory()
             throws org.exolab.castor.xml.MarshalException,
                    org.exolab.castor.xml.ValidationException,
                    FileNotFoundException,
                    IOException
Constructor which parses the file

Throws:
IOException - if any.
FileNotFoundException - if any.
org.exolab.castor.xml.ValidationException - if any.
org.exolab.castor.xml.MarshalException - if any.
Method Detail

init

public static void init()
                 throws IOException,
                        FileNotFoundException,
                        org.exolab.castor.xml.MarshalException,
                        org.exolab.castor.xml.ValidationException

init

Throws:
IOException - if any.
FileNotFoundException - if any.
org.exolab.castor.xml.MarshalException - if any.
org.exolab.castor.xml.ValidationException - 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 - a GroupManager object.

reload

public void reload()
            throws IOException,
                   FileNotFoundException,
                   org.exolab.castor.xml.MarshalException,
                   org.exolab.castor.xml.ValidationException
Parses the groups.xml via the Castor classes

Throws:
IOException - if any.
FileNotFoundException - if any.
org.exolab.castor.xml.MarshalException - if any.
org.exolab.castor.xml.ValidationException - if any.

saveXml

protected void saveXml(String data)
                throws IOException

saveXml

Specified by:
saveXml in class GroupManager
Parameters:
data - a String object.
Throws:
IOException - if any.

update

public void update()
            throws IOException,
                   org.exolab.castor.xml.MarshalException,
                   org.exolab.castor.xml.ValidationException

update

Specified by:
update in class GroupManager
Throws:
IOException - if any.
org.exolab.castor.xml.MarshalException - if any.
org.exolab.castor.xml.ValidationException - if any.


Copyright © 2011. All Rights Reserved.