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(String raw, String encrypted)
checkSaltedPasswordboolean
comparePasswords(String userID, String aPassword)
comparePasswordsint
countUsersWithRole(String roleid)
countUsersWithRolevoid
deleteUser(String name)
deleteUserString
encryptedPassword(String aPassword, boolean useSalt)
encryptedPasswordString
getContactInfo(String userID, String command)
getContactInfoString
getContactInfo(String userId, UserConfig.ContactType contactType)
getContactInfoString
getContactInfo(User user, String command)
getContactInfoString
getContactServiceProvider(String userID, String command)
getContactServiceProviderString
getContactServiceProvider(User user, String command)
getContactServiceProviderString
getEmail(String userID)
getEmailString
getEmail(User user)
getEmailString
getHomePhone(String userID)
getHomePhoneString
getHomePhone(User user)
getHomePhoneString
getMicroblogName(String name)
getMicroblogNameString
getMobilePhone(String userID)
getMobilePhoneString
getMobilePhone(User user)
getMobilePhoneString
getNumericPage(String userID)
getNumericPageString
getNumericPage(User user)
getNumericPageString
getNumericPin(String userID)
getNumericaPinString
getNumericPin(User user)
getNumericPinOnmsUser
getOnmsUser(String username)
getOnmsUserOnmsUserList
getOnmsUserList()
getOnmsUserListString
getPagerEmail(String userID)
getPagerEmailString
getPagerEmail(User user)
getPagerEmailString
getTextPage(String userID)
getTextPageString
getTextPage(User user)
getTextPageString
getTextPin(String userID)
getTextPinString
getTextPin(User user)
getTextPinString
getTuiPin(String name)
getTuiPinString
getTuiPin(User user)
getTuiPinUser
getUser(String name)
getUserList<String>
getUserNames()
getUserNamesMap<String,User>
getUsers()
getUsersString[]
getUsersScheduledForRole(String roleid, Date time)
getUsersScheduledForRoleString[]
getUsersWithRole(String roleid)
getUsersWithRoleString
getWorkPhone(String userID)
getWorkPhoneString
getWorkPhone(User user)
getWorkPhoneString
getXMPPAddress(String userID)
getXMPPAddressString
getXMPPAddress(User user)
getXMPPAddressboolean
hasOnCallRole(String roleid)
hasOnCallRoleboolean
hasUser(String userName)
hasUserboolean
isUserOnDuty(String user, Calendar time)
isUserOnDutyboolean
isUserScheduledForRole(User user, String roleid, Date time)
isUserScheduledForRolevoid
parseXML(InputStream in)
parseXMLvoid
renameUser(String oldName, String newName)
renameUservoid
save(OnmsUser onmsUser)
savevoid
saveUser(String name, User details)
saveUservoid
saveUsers(Collection<User> usersList)
saveUsersvoid
setContactInfo(String userId, UserConfig.ContactType contactType, String contactValue)
setContactInfovoid
setEncryptedPassword(String userID, String aPassword, boolean salted)
setEncryptedPasswordvoid
setUnencryptedPassword(String userID, String aPassword)
setUnencryptedPasswordvoid
update()
updateboolean
userHasRole(User user, String roleid)
userHasRole
-
-
-
Method Detail
-
parseXML
void parseXML(InputStream in)
parseXML
- Parameters:
an
- InputStream
-
saveUser
void saveUser(String name, User details) throws Exception
saveUser
- Parameters:
a
- Stringa
- User- Throws:
Exception
-
save
void save(OnmsUser onmsUser) throws Exception
save
- Parameters:
an
- OnmsUser- Throws:
Exception
-
isUserOnDuty
boolean isUserOnDuty(String user, Calendar time) throws IOException
isUserOnDuty
- Parameters:
a
- Stringa
- Calendar- Returns:
- a boolean
- Throws:
IOException
-
getUsers
Map<String,User> getUsers() throws IOException
getUsers
- Returns:
- a Map
- Throws:
IOException
-
getOnmsUserList
OnmsUserList getOnmsUserList() throws IOException
getOnmsUserList
- Returns:
- an OnmsUserList
- Throws:
IOException
-
getOnmsUser
OnmsUser getOnmsUser(String username) throws IOException
getOnmsUser
- Parameters:
a
- String- Returns:
- an OnmsUser
- Throws:
IOException
-
hasUser
boolean hasUser(String userName) throws IOException
hasUser
- Parameters:
a
- String- Returns:
- a boolean
- Throws:
IOException
-
getUserNames
List<String> getUserNames() throws IOException
getUserNames
- Returns:
- a List
- Throws:
IOException
-
getUser
User getUser(String name) throws IOException
getUser
- Parameters:
a
- String- Returns:
- a User
- Throws:
IOException
-
getTuiPin
String getTuiPin(String name) throws IOException
getTuiPin
- Parameters:
a
- String- Returns:
- a String
- Throws:
IOException
-
getTuiPin
String getTuiPin(User user) throws IOException
getTuiPin
- Parameters:
a
- User- Returns:
- a String
- Throws:
IOException
-
getMicroblogName
String getMicroblogName(String name) throws FileNotFoundException, IOException
getMicroblogName
- Parameters:
a
- String- Returns:
- a String
- Throws:
FileNotFoundException
IOException
-
setContactInfo
void setContactInfo(String userId, UserConfig.ContactType contactType, String contactValue) throws Exception
setContactInfo
- Parameters:
a
- Stringa
- ContactTypea
- String- Throws:
Exception
-
getContactInfo
String getContactInfo(String userId, UserConfig.ContactType contactType) throws IOException
getContactInfo
- Parameters:
a
- Stringa
- ContactType- Returns:
- a String
- Throws:
IOException
-
getContactInfo
String getContactInfo(String userID, String command) throws IOException
getContactInfo
- Parameters:
a
- Stringa
- String- Returns:
- a String
- Throws:
IOException
-
getContactInfo
String getContactInfo(User user, String command) throws IOException
getContactInfo
- Parameters:
a
- Usera
- String- Returns:
- a String
- Throws:
IOException
-
getContactServiceProvider
String getContactServiceProvider(String userID, String command) throws IOException
getContactServiceProvider
- Parameters:
a
- Stringa
- String- Returns:
- a String
- Throws:
IOException
-
getContactServiceProvider
String getContactServiceProvider(User user, String command) throws IOException
getContactServiceProvider
- Parameters:
a
- Usera
- String- Returns:
- a String
- Throws:
IOException
-
getEmail
String getEmail(String userID) throws IOException
getEmail
- Parameters:
a
- String- Returns:
- a String
- Throws:
IOException
-
getEmail
String getEmail(User user) throws IOException
getEmail
- Parameters:
a
- User- Returns:
- a String
- Throws:
IOException
-
getPagerEmail
String getPagerEmail(String userID) throws IOException
getPagerEmail
- Parameters:
a
- String- Returns:
- a String
- Throws:
IOException
-
getPagerEmail
String getPagerEmail(User user) throws IOException
getPagerEmail
- Parameters:
a
- User- Returns:
- a String
- Throws:
IOException
-
getNumericPin
String getNumericPin(String userID) throws IOException
getNumericaPin
- Parameters:
a
- String- Returns:
- a String
- Throws:
IOException
-
getNumericPin
String getNumericPin(User user) throws IOException
getNumericPin
- Parameters:
a
- User- Returns:
- a String
- Throws:
IOException
-
getXMPPAddress
String getXMPPAddress(String userID) throws IOException
getXMPPAddress
- Parameters:
a
- String- Returns:
- a String
- Throws:
IOException
-
getXMPPAddress
String getXMPPAddress(User user) throws IOException
getXMPPAddress
- Parameters:
a
- User- Returns:
- a String
- Throws:
IOException
-
getNumericPage
String getNumericPage(String userID) throws IOException
getNumericPage
- Parameters:
a
- String- Returns:
- a String
- Throws:
IOException
-
getNumericPage
String getNumericPage(User user) throws IOException
getNumericPage
- Parameters:
a
- User- Returns:
- a String
- Throws:
IOException
-
getTextPin
String getTextPin(String userID) throws IOException
getTextPin
- Parameters:
a
- String- Returns:
- a String
- Throws:
IOException
-
getTextPin
String getTextPin(User user) throws IOException
getTextPin
- Parameters:
a
- User- Returns:
- a String
- Throws:
IOException
-
getTextPage
String getTextPage(String userID) throws IOException
getTextPage
- Parameters:
a
- String- Returns:
- a String
- Throws:
IOException
-
getTextPage
String getTextPage(User user) throws IOException
getTextPage
- Parameters:
a
- User- Returns:
- a String
- Throws:
IOException
-
getWorkPhone
String getWorkPhone(String userID) throws IOException
getWorkPhone
- Parameters:
a
- String- Returns:
- a String
- Throws:
IOException
-
getWorkPhone
String getWorkPhone(User user) throws IOException
getWorkPhone
- Parameters:
a
- User- Returns:
- a String
- Throws:
IOException
-
getMobilePhone
String getMobilePhone(String userID) throws IOException
getMobilePhone
- Parameters:
a
- String- Returns:
- a String
- Throws:
IOException
-
getMobilePhone
String getMobilePhone(User user) throws IOException
getMobilePhone
- Parameters:
a
- User- Returns:
- a String
- Throws:
IOException
-
getHomePhone
String getHomePhone(String userID) throws IOException
getHomePhone
- Parameters:
a
- String- Returns:
- a String
- Throws:
IOException
-
getHomePhone
String getHomePhone(User user) throws IOException
getHomePhone
- Parameters:
a
- User- Returns:
- a String
- Throws:
IOException
-
saveUsers
void saveUsers(Collection<User> usersList) throws Exception
saveUsers
- Parameters:
a
- Collection- Throws:
Exception
-
deleteUser
void deleteUser(String name) throws Exception
deleteUser
- Parameters:
a
- String- Throws:
Exception
-
renameUser
void renameUser(String oldName, String newName) throws Exception
renameUser
- Parameters:
a
- Stringa
- String- Throws:
Exception
-
setEncryptedPassword
void setEncryptedPassword(String userID, String aPassword, boolean salted) throws Exception
setEncryptedPassword
- Parameters:
a
- Stringa
- Stringa
- boolean- Throws:
Exception
-
setUnencryptedPassword
void setUnencryptedPassword(String userID, String aPassword) throws Exception
setUnencryptedPassword
- Parameters:
a
- Stringa
- String- Throws:
Exception
-
encryptedPassword
String encryptedPassword(String aPassword, boolean useSalt)
encryptedPassword
- Parameters:
a
- Stringa
- boolean- Returns:
- a String
-
comparePasswords
boolean comparePasswords(String userID, String aPassword)
comparePasswords
- Parameters:
a
- Stringa
- String- Returns:
- a boolean
-
checkSaltedPassword
boolean checkSaltedPassword(String raw, String encrypted)
checkSaltedPassword
- Parameters:
a
- Stringa
- String- Returns:
- a boolean
-
update
void update() throws IOException, FileNotFoundException
update
- Throws:
IOException
FileNotFoundException
-
getUsersWithRole
String[] getUsersWithRole(String roleid) throws IOException
getUsersWithRole
- Parameters:
roleid
-- Returns:
- Throws:
IOException
-
userHasRole
boolean userHasRole(User user, String roleid) throws FileNotFoundException, IOException
userHasRole
- Parameters:
a
- Usera
- String- Returns:
- a boolean
- Throws:
FileNotFoundException
IOException
-
isUserScheduledForRole
boolean isUserScheduledForRole(User user, String roleid, Date time) throws FileNotFoundException, IOException
isUserScheduledForRole
- Parameters:
a
- Usera
- Stringa
- Date- Returns:
- a boolean
- Throws:
FileNotFoundException
IOException
-
getUsersScheduledForRole
String[] getUsersScheduledForRole(String roleid, Date time) throws IOException
getUsersScheduledForRole
- Parameters:
a
- Stringa
- Date- Returns:
- a String[]
- Throws:
IOException
-
hasOnCallRole
boolean hasOnCallRole(String roleid) throws IOException
hasOnCallRole
- Parameters:
a
- String- Returns:
- a boolean
- Throws:
IOException
-
countUsersWithRole
int countUsersWithRole(String roleid) throws IOException
countUsersWithRole
- Parameters:
a
- String- Returns:
- an int
- Throws:
IOException
-
-