Package org.opennms.netmgt.config.api
Interface UserConfig
-
- All Known Implementing Classes:
MockUserManager
,UserFactory
,UserManager
public interface UserConfig
This is an interface for UserManager- Author:
- Ryan Lambeth
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
UserConfig.ContactType
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
checkSaltedPassword(java.lang.String raw, java.lang.String encrypted)
checkSaltedPasswordboolean
comparePasswords(java.lang.String userID, java.lang.String aPassword)
comparePasswordsint
countUsersWithRole(java.lang.String roleid)
countUsersWithRolevoid
deleteUser(java.lang.String name)
deleteUserjava.lang.String
encryptedPassword(java.lang.String aPassword, boolean useSalt)
encryptedPasswordjava.lang.String
getContactInfo(java.lang.String userID, java.lang.String command)
getContactInfojava.lang.String
getContactInfo(java.lang.String userId, UserConfig.ContactType contactType)
getContactInfojava.lang.String
getContactInfo(User user, java.lang.String command)
getContactInfojava.lang.String
getContactServiceProvider(java.lang.String userID, java.lang.String command)
getContactServiceProviderjava.lang.String
getContactServiceProvider(User user, java.lang.String command)
getContactServiceProviderjava.lang.String
getEmail(java.lang.String userID)
getEmailjava.lang.String
getEmail(User user)
getEmailjava.lang.String
getHomePhone(java.lang.String userID)
getHomePhonejava.lang.String
getHomePhone(User user)
getHomePhonejava.lang.String
getMicroblogName(java.lang.String name)
getMicroblogNamejava.lang.String
getMobilePhone(java.lang.String userID)
getMobilePhonejava.lang.String
getMobilePhone(User user)
getMobilePhonejava.lang.String
getNumericPage(java.lang.String userID)
getNumericPagejava.lang.String
getNumericPage(User user)
getNumericPagejava.lang.String
getNumericPin(java.lang.String userID)
getNumericaPinjava.lang.String
getNumericPin(User user)
getNumericPinOnmsUser
getOnmsUser(java.lang.String username)
getOnmsUserOnmsUserList
getOnmsUserList()
getOnmsUserListjava.lang.String
getPagerEmail(java.lang.String userID)
getPagerEmailjava.lang.String
getPagerEmail(User user)
getPagerEmailjava.lang.String
getTextPage(java.lang.String userID)
getTextPagejava.lang.String
getTextPage(User user)
getTextPagejava.lang.String
getTextPin(java.lang.String userID)
getTextPinjava.lang.String
getTextPin(User user)
getTextPinjava.lang.String
getTuiPin(java.lang.String name)
getTuiPinjava.lang.String
getTuiPin(User user)
getTuiPinUser
getUser(java.lang.String name)
getUserjava.util.List<java.lang.String>
getUserNames()
getUserNamesjava.util.Map<java.lang.String,User>
getUsers()
getUsersjava.lang.String[]
getUsersScheduledForRole(java.lang.String roleid, java.util.Date time)
getUsersScheduledForRolejava.lang.String[]
getUsersWithRole(java.lang.String roleid)
getUsersWithRolejava.lang.String
getWorkPhone(java.lang.String userID)
getWorkPhonejava.lang.String
getWorkPhone(User user)
getWorkPhonejava.lang.String
getXMPPAddress(java.lang.String userID)
getXMPPAddressjava.lang.String
getXMPPAddress(User user)
getXMPPAddressboolean
hasOnCallRole(java.lang.String roleid)
hasOnCallRoleboolean
hasUser(java.lang.String userName)
hasUserboolean
isUserOnDuty(java.lang.String user, java.util.Calendar time)
isUserOnDutyboolean
isUserScheduledForRole(User user, java.lang.String roleid, java.util.Date time)
isUserScheduledForRolevoid
parseXML(java.io.InputStream in)
parseXMLvoid
renameUser(java.lang.String oldName, java.lang.String newName)
renameUservoid
save(OnmsUser onmsUser)
savevoid
saveUser(java.lang.String name, User details)
saveUservoid
saveUsers(java.util.Collection<User> usersList)
saveUsersvoid
setContactInfo(java.lang.String userId, UserConfig.ContactType contactType, java.lang.String contactValue)
setContactInfovoid
setEncryptedPassword(java.lang.String userID, java.lang.String aPassword, boolean salted)
setEncryptedPasswordvoid
setUnencryptedPassword(java.lang.String userID, java.lang.String aPassword)
setUnencryptedPasswordvoid
update()
updateboolean
userHasRole(User user, java.lang.String roleid)
userHasRole
-
-
-
Method Detail
-
parseXML
void parseXML(java.io.InputStream in)
parseXML
- Parameters:
an
- InputStream
-
saveUser
void saveUser(java.lang.String name, User details) throws java.lang.Exception
saveUser
- Parameters:
a
- Stringa
- User- Throws:
java.lang.Exception
-
save
void save(OnmsUser onmsUser) throws java.lang.Exception
save
- Parameters:
an
- OnmsUser- Throws:
java.lang.Exception
-
isUserOnDuty
boolean isUserOnDuty(java.lang.String user, java.util.Calendar time) throws java.io.IOException
isUserOnDuty
- Parameters:
a
- Stringa
- Calendar- Returns:
- a boolean
- Throws:
java.io.IOException
-
getUsers
java.util.Map<java.lang.String,User> getUsers() throws java.io.IOException
getUsers
- Returns:
- a Map
- Throws:
java.io.IOException
-
getOnmsUserList
OnmsUserList getOnmsUserList() throws java.io.IOException
getOnmsUserList
- Returns:
- an OnmsUserList
- Throws:
java.io.IOException
-
getOnmsUser
OnmsUser getOnmsUser(java.lang.String username) throws java.io.IOException
getOnmsUser
- Parameters:
a
- String- Returns:
- an OnmsUser
- Throws:
java.io.IOException
-
hasUser
boolean hasUser(java.lang.String userName) throws java.io.IOException
hasUser
- Parameters:
a
- String- Returns:
- a boolean
- Throws:
java.io.IOException
-
getUserNames
java.util.List<java.lang.String> getUserNames() throws java.io.IOException
getUserNames
- Returns:
- a List
- Throws:
java.io.IOException
-
getUser
User getUser(java.lang.String name) throws java.io.IOException
getUser
- Parameters:
a
- String- Returns:
- a User
- Throws:
java.io.IOException
-
getTuiPin
java.lang.String getTuiPin(java.lang.String name) throws java.io.IOException
getTuiPin
- Parameters:
a
- String- Returns:
- a String
- Throws:
java.io.IOException
-
getTuiPin
java.lang.String getTuiPin(User user) throws java.io.IOException
getTuiPin
- Parameters:
a
- User- Returns:
- a String
- Throws:
java.io.IOException
-
getMicroblogName
java.lang.String getMicroblogName(java.lang.String name) throws java.io.FileNotFoundException, java.io.IOException
getMicroblogName
- Parameters:
a
- String- Returns:
- a String
- Throws:
java.io.FileNotFoundException
java.io.IOException
-
setContactInfo
void setContactInfo(java.lang.String userId, UserConfig.ContactType contactType, java.lang.String contactValue) throws java.lang.Exception
setContactInfo
- Parameters:
a
- Stringa
- ContactTypea
- String- Throws:
java.lang.Exception
-
getContactInfo
java.lang.String getContactInfo(java.lang.String userId, UserConfig.ContactType contactType) throws java.io.IOException
getContactInfo
- Parameters:
a
- Stringa
- ContactType- Returns:
- a String
- Throws:
java.io.IOException
-
getContactInfo
java.lang.String getContactInfo(java.lang.String userID, java.lang.String command) throws java.io.IOException
getContactInfo
- Parameters:
a
- Stringa
- String- Returns:
- a String
- Throws:
java.io.IOException
-
getContactInfo
java.lang.String getContactInfo(User user, java.lang.String command) throws java.io.IOException
getContactInfo
- Parameters:
a
- Usera
- String- Returns:
- a String
- Throws:
java.io.IOException
-
getContactServiceProvider
java.lang.String getContactServiceProvider(java.lang.String userID, java.lang.String command) throws java.io.IOException
getContactServiceProvider
- Parameters:
a
- Stringa
- String- Returns:
- a String
- Throws:
java.io.IOException
-
getContactServiceProvider
java.lang.String getContactServiceProvider(User user, java.lang.String command) throws java.io.IOException
getContactServiceProvider
- Parameters:
a
- Usera
- String- Returns:
- a String
- Throws:
java.io.IOException
-
getEmail
java.lang.String getEmail(java.lang.String userID) throws java.io.IOException
getEmail
- Parameters:
a
- String- Returns:
- a String
- Throws:
java.io.IOException
-
getEmail
java.lang.String getEmail(User user) throws java.io.IOException
getEmail
- Parameters:
a
- User- Returns:
- a String
- Throws:
java.io.IOException
-
getPagerEmail
java.lang.String getPagerEmail(java.lang.String userID) throws java.io.IOException
getPagerEmail
- Parameters:
a
- String- Returns:
- a String
- Throws:
java.io.IOException
-
getPagerEmail
java.lang.String getPagerEmail(User user) throws java.io.IOException
getPagerEmail
- Parameters:
a
- User- Returns:
- a String
- Throws:
java.io.IOException
-
getNumericPin
java.lang.String getNumericPin(java.lang.String userID) throws java.io.IOException
getNumericaPin
- Parameters:
a
- String- Returns:
- a String
- Throws:
java.io.IOException
-
getNumericPin
java.lang.String getNumericPin(User user) throws java.io.IOException
getNumericPin
- Parameters:
a
- User- Returns:
- a String
- Throws:
java.io.IOException
-
getXMPPAddress
java.lang.String getXMPPAddress(java.lang.String userID) throws java.io.IOException
getXMPPAddress
- Parameters:
a
- String- Returns:
- a String
- Throws:
java.io.IOException
-
getXMPPAddress
java.lang.String getXMPPAddress(User user) throws java.io.IOException
getXMPPAddress
- Parameters:
a
- User- Returns:
- a String
- Throws:
java.io.IOException
-
getNumericPage
java.lang.String getNumericPage(java.lang.String userID) throws java.io.IOException
getNumericPage
- Parameters:
a
- String- Returns:
- a String
- Throws:
java.io.IOException
-
getNumericPage
java.lang.String getNumericPage(User user) throws java.io.IOException
getNumericPage
- Parameters:
a
- User- Returns:
- a String
- Throws:
java.io.IOException
-
getTextPin
java.lang.String getTextPin(java.lang.String userID) throws java.io.IOException
getTextPin
- Parameters:
a
- String- Returns:
- a String
- Throws:
java.io.IOException
-
getTextPin
java.lang.String getTextPin(User user) throws java.io.IOException
getTextPin
- Parameters:
a
- User- Returns:
- a String
- Throws:
java.io.IOException
-
getTextPage
java.lang.String getTextPage(java.lang.String userID) throws java.io.IOException
getTextPage
- Parameters:
a
- String- Returns:
- a String
- Throws:
java.io.IOException
-
getTextPage
java.lang.String getTextPage(User user) throws java.io.IOException
getTextPage
- Parameters:
a
- User- Returns:
- a String
- Throws:
java.io.IOException
-
getWorkPhone
java.lang.String getWorkPhone(java.lang.String userID) throws java.io.IOException
getWorkPhone
- Parameters:
a
- String- Returns:
- a String
- Throws:
java.io.IOException
-
getWorkPhone
java.lang.String getWorkPhone(User user) throws java.io.IOException
getWorkPhone
- Parameters:
a
- User- Returns:
- a String
- Throws:
java.io.IOException
-
getMobilePhone
java.lang.String getMobilePhone(java.lang.String userID) throws java.io.IOException
getMobilePhone
- Parameters:
a
- String- Returns:
- a String
- Throws:
java.io.IOException
-
getMobilePhone
java.lang.String getMobilePhone(User user) throws java.io.IOException
getMobilePhone
- Parameters:
a
- User- Returns:
- a String
- Throws:
java.io.IOException
-
getHomePhone
java.lang.String getHomePhone(java.lang.String userID) throws java.io.IOException
getHomePhone
- Parameters:
a
- String- Returns:
- a String
- Throws:
java.io.IOException
-
getHomePhone
java.lang.String getHomePhone(User user) throws java.io.IOException
getHomePhone
- Parameters:
a
- User- Returns:
- a String
- Throws:
java.io.IOException
-
saveUsers
void saveUsers(java.util.Collection<User> usersList) throws java.lang.Exception
saveUsers
- Parameters:
a
- Collection- Throws:
java.lang.Exception
-
deleteUser
void deleteUser(java.lang.String name) throws java.lang.Exception
deleteUser
- Parameters:
a
- String- Throws:
java.lang.Exception
-
renameUser
void renameUser(java.lang.String oldName, java.lang.String newName) throws java.lang.Exception
renameUser
- Parameters:
a
- Stringa
- String- Throws:
java.lang.Exception
-
setEncryptedPassword
void setEncryptedPassword(java.lang.String userID, java.lang.String aPassword, boolean salted) throws java.lang.Exception
setEncryptedPassword
- Parameters:
a
- Stringa
- Stringa
- boolean- Throws:
java.lang.Exception
-
setUnencryptedPassword
void setUnencryptedPassword(java.lang.String userID, java.lang.String aPassword) throws java.lang.Exception
setUnencryptedPassword
- Parameters:
a
- Stringa
- String- Throws:
java.lang.Exception
-
encryptedPassword
java.lang.String encryptedPassword(java.lang.String aPassword, boolean useSalt)
encryptedPassword
- Parameters:
a
- Stringa
- boolean- Returns:
- a String
-
comparePasswords
boolean comparePasswords(java.lang.String userID, java.lang.String aPassword)
comparePasswords
- Parameters:
a
- Stringa
- String- Returns:
- a boolean
-
checkSaltedPassword
boolean checkSaltedPassword(java.lang.String raw, java.lang.String encrypted)
checkSaltedPassword
- Parameters:
a
- Stringa
- String- Returns:
- a boolean
-
update
void update() throws java.io.IOException, java.io.FileNotFoundException
update
- Throws:
java.io.IOException
java.io.FileNotFoundException
-
getUsersWithRole
java.lang.String[] getUsersWithRole(java.lang.String roleid) throws java.io.IOException
getUsersWithRole
- Parameters:
roleid
-- Returns:
- Throws:
java.io.IOException
-
userHasRole
boolean userHasRole(User user, java.lang.String roleid) throws java.io.FileNotFoundException, java.io.IOException
userHasRole
- Parameters:
a
- Usera
- String- Returns:
- a boolean
- Throws:
java.io.FileNotFoundException
java.io.IOException
-
isUserScheduledForRole
boolean isUserScheduledForRole(User user, java.lang.String roleid, java.util.Date time) throws java.io.FileNotFoundException, java.io.IOException
isUserScheduledForRole
- Parameters:
a
- Usera
- Stringa
- Date- Returns:
- a boolean
- Throws:
java.io.FileNotFoundException
java.io.IOException
-
getUsersScheduledForRole
java.lang.String[] getUsersScheduledForRole(java.lang.String roleid, java.util.Date time) throws java.io.IOException
getUsersScheduledForRole
- Parameters:
a
- Stringa
- Date- Returns:
- a String[]
- Throws:
java.io.IOException
-
hasOnCallRole
boolean hasOnCallRole(java.lang.String roleid) throws java.io.IOException
hasOnCallRole
- Parameters:
a
- String- Returns:
- a boolean
- Throws:
java.io.IOException
-
countUsersWithRole
int countUsersWithRole(java.lang.String roleid) throws java.io.IOException
countUsersWithRole
- Parameters:
a
- String- Returns:
- an int
- Throws:
java.io.IOException
-
-