Package org.opennms.netmgt.config.api
Interface UserConfig
-
- All Known Implementing Classes:
MockUserManager,UserFactory,UserManager
public interface UserConfigThis is an interface for UserManager- Author:
- Ryan Lambeth
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classUserConfig.ContactType
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleancheckSaltedPassword(String raw, String encrypted)checkSaltedPasswordbooleancomparePasswords(String userID, String aPassword)comparePasswordsintcountUsersWithRole(String roleid)countUsersWithRolevoiddeleteUser(String name)deleteUserStringencryptedPassword(String aPassword, boolean useSalt)encryptedPasswordStringgetContactInfo(String userID, String command)getContactInfoStringgetContactInfo(String userId, UserConfig.ContactType contactType)getContactInfoStringgetContactInfo(User user, String command)getContactInfoStringgetContactServiceProvider(String userID, String command)getContactServiceProviderStringgetContactServiceProvider(User user, String command)getContactServiceProviderStringgetEmail(String userID)getEmailStringgetEmail(User user)getEmailStringgetHomePhone(String userID)getHomePhoneStringgetHomePhone(User user)getHomePhoneStringgetMicroblogName(String name)getMicroblogNameStringgetMobilePhone(String userID)getMobilePhoneStringgetMobilePhone(User user)getMobilePhoneStringgetNumericPage(String userID)getNumericPageStringgetNumericPage(User user)getNumericPageStringgetNumericPin(String userID)getNumericaPinStringgetNumericPin(User user)getNumericPinOnmsUsergetOnmsUser(String username)getOnmsUserOnmsUserListgetOnmsUserList()getOnmsUserListStringgetPagerEmail(String userID)getPagerEmailStringgetPagerEmail(User user)getPagerEmailStringgetTextPage(String userID)getTextPageStringgetTextPage(User user)getTextPageStringgetTextPin(String userID)getTextPinStringgetTextPin(User user)getTextPinStringgetTuiPin(String name)getTuiPinStringgetTuiPin(User user)getTuiPinUsergetUser(String name)getUserList<String>getUserNames()getUserNamesMap<String,User>getUsers()getUsersString[]getUsersScheduledForRole(String roleid, Date time)getUsersScheduledForRoleString[]getUsersWithRole(String roleid)getUsersWithRoleStringgetWorkPhone(String userID)getWorkPhoneStringgetWorkPhone(User user)getWorkPhoneStringgetXMPPAddress(String userID)getXMPPAddressStringgetXMPPAddress(User user)getXMPPAddressbooleanhasOnCallRole(String roleid)hasOnCallRolebooleanhasUser(String userName)hasUserbooleanisUserOnDuty(String user, Calendar time)isUserOnDutybooleanisUserScheduledForRole(User user, String roleid, Date time)isUserScheduledForRolevoidparseXML(InputStream in)parseXMLvoidrenameUser(String oldName, String newName)renameUservoidsave(OnmsUser onmsUser)savevoidsaveUser(String name, User details)saveUservoidsaveUsers(Collection<User> usersList)saveUsersvoidsetContactInfo(String userId, UserConfig.ContactType contactType, String contactValue)setContactInfovoidsetEncryptedPassword(String userID, String aPassword, boolean salted)setEncryptedPasswordvoidsetUnencryptedPassword(String userID, String aPassword)setUnencryptedPasswordvoidupdate()updatebooleanuserHasRole(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:
FileNotFoundExceptionIOException
-
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, FileNotFoundExceptionupdate
- Throws:
IOExceptionFileNotFoundException
-
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:
FileNotFoundExceptionIOException
-
isUserScheduledForRole
boolean isUserScheduledForRole(User user, String roleid, Date time) throws FileNotFoundException, IOException
isUserScheduledForRole
- Parameters:
a- Usera- Stringa- Date- Returns:
- a boolean
- Throws:
FileNotFoundExceptionIOException
-
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
-
-