org.opennms.netmgt.config
Class UserFactory

java.lang.Object
  extended by org.opennms.netmgt.config.UserManager
      extended by org.opennms.netmgt.config.UserFactory

public class UserFactory
extends UserManager


Field Summary
protected  File usersFile
          File path of users.xml
 
Fields inherited from class org.opennms.netmgt.config.UserManager
m_dutySchedules, m_groupManager, m_users
 
Constructor Summary
UserFactory()
          Initializes the factory
 
Method Summary
static UserManager getInstance()
          Singleton static call to get the only instance that should exist for the UserFactory
static void init()
           
 boolean isUpdateNeeded()
           
 void reload()
           
protected  void saveXML(String writerString)
           
static void setInstance(UserManager mgr)
           
protected  void update()
           
 
Methods inherited from class org.opennms.netmgt.config.UserManager
comparePasswords, countUsersWithRole, deleteUser, encryptedPassword, getContactInfo, getContactInfo, getContactServiceProvider, getContactServiceProvider, getEmail, getEmail, getNumericPage, getNumericPage, getNumericPin, getNumericPin, getPagerEmail, getPagerEmail, getTextPage, getTextPage, getTextPin, getTextPin, getUser, getUserNames, getUsers, getUsersScheduledForRole, getUsersWithRole, getXMPPAddress, getXMPPAddress, hasRole, hasUser, isUserOnDuty, isUserScheduledForRole, parseXML, renameUser, saveUser, saveUsers, setEncryptedPassword, setUnencryptedPassword, userHasRole
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

usersFile

protected File usersFile
File path of users.xml

Constructor Detail

UserFactory

public UserFactory()
            throws org.exolab.castor.xml.MarshalException,
                   org.exolab.castor.xml.ValidationException,
                   FileNotFoundException,
                   IOException
Initializes the factory

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

init

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

getInstance

public static UserManager getInstance()
Singleton static call to get the only instance that should exist for the UserFactory

Returns:
the single user factory instance

setInstance

public static void setInstance(UserManager mgr)

reload

public void reload()
            throws IOException,
                   FileNotFoundException,
                   org.exolab.castor.xml.MarshalException,
                   org.exolab.castor.xml.ValidationException
Throws:
IOException
FileNotFoundException
org.exolab.castor.xml.MarshalException
org.exolab.castor.xml.ValidationException

saveXML

protected void saveXML(String writerString)
                throws IOException
Specified by:
saveXML in class UserManager
Parameters:
writerString -
Throws:
IOException

isUpdateNeeded

public boolean isUpdateNeeded()
Specified by:
isUpdateNeeded in class UserManager
Returns:

update

protected void update()
               throws IOException,
                      FileNotFoundException,
                      org.exolab.castor.xml.MarshalException,
                      org.exolab.castor.xml.ValidationException
Specified by:
update in class UserManager
Throws:
IOException
FileNotFoundException
org.exolab.castor.xml.MarshalException
org.exolab.castor.xml.ValidationException


Copyright © 2009. All Rights Reserved.