Package org.opennms.netmgt.config
Class UserFactory
- java.lang.Object
-
- org.opennms.netmgt.config.UserManager
-
- org.opennms.netmgt.config.UserFactory
-
- All Implemented Interfaces:
UserConfig
public class UserFactory extends UserManager
UserFactory class.
- Version:
- $Id: $
- Author:
- ranger
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.opennms.netmgt.config.api.UserConfig
UserConfig.ContactType
-
-
Field Summary
-
Fields inherited from class org.opennms.netmgt.config.UserManager
ALLOW_UNSALTED_PROPERTY, m_dutySchedules, m_groupManager, m_users
-
-
Constructor Summary
Constructors Constructor Description UserFactory()Initializes the factory
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddoUpdate()updatelonggetFileSize()static UserManagergetInstance()Singleton static call to get the only instance that should exist for the UserFactorylonggetLastModified()static voidinit()initbooleanisUpdateNeeded()isUpdateNeededvoidreload()reloadprotected voidsaveXML(String writerString)saveXMLstatic voidsetInstance(UserManager mgr)Setter for the fieldinstance.-
Methods inherited from class org.opennms.netmgt.config.UserManager
checkSaltedPassword, comparePasswords, countUsersWithRole, deleteUser, encryptedPassword, getContactInfo, getContactInfo, getContactInfo, getContactServiceProvider, getContactServiceProvider, getEmail, getEmail, getHomePhone, getHomePhone, getMicroblogName, getMicroblogName, getMobilePhone, getMobilePhone, getNumericPage, getNumericPage, getNumericPin, getNumericPin, getOnmsUser, getOnmsUserList, getPagerEmail, getPagerEmail, getTextPage, getTextPage, getTextPin, getTextPin, getTuiPin, getTuiPin, getUser, getUserNames, getUsers, getUsersScheduledForRole, getUsersWithRole, getWorkPhone, getWorkPhone, getXMPPAddress, getXMPPAddress, hasOnCallRole, hasUser, isUserOnDuty, isUserScheduledForRole, parseXML, renameUser, save, saveUser, saveUsers, setContactInfo, setEncryptedPassword, setUnencryptedPassword, update, userHasRole
-
-
-
-
Constructor Detail
-
UserFactory
public UserFactory() throws FileNotFoundException, IOExceptionInitializes the factory- 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 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)
Setter for the field
instance.- Parameters:
mgr- aUserManagerobject.
-
reload
public void reload() throws IOException, FileNotFoundExceptionreload
- Specified by:
reloadin classUserManager- Throws:
IOException- if any.FileNotFoundException- if any.
-
saveXML
protected void saveXML(String writerString) throws IOException
saveXML
- Specified by:
saveXMLin classUserManager- Parameters:
writerString- aStringobject.- Throws:
IOException- if any.
-
isUpdateNeeded
public boolean isUpdateNeeded()
isUpdateNeeded
- Specified by:
isUpdateNeededin classUserManager- Returns:
- a boolean.
-
doUpdate
public void doUpdate() throws IOException, FileNotFoundExceptionupdate
- Specified by:
doUpdatein classUserManager- Throws:
IOException- if any.FileNotFoundException- if any.
-
getLastModified
public long getLastModified()
- Specified by:
getLastModifiedin classUserManager
-
getFileSize
public long getFileSize()
- Specified by:
getFileSizein classUserManager
-
-