imcode.server.user
Class ImcmsAuthenticatorAndUserAndRoleMapper
java.lang.Object
imcode.server.user.ImcmsAuthenticatorAndUserAndRoleMapper
- All Implemented Interfaces:
- Authenticator, RoleGetter, UserAndRoleRegistry
public class ImcmsAuthenticatorAndUserAndRoleMapper
- extends java.lang.Object
- implements UserAndRoleRegistry, Authenticator, RoleGetter
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SQL_ROLES_COLUMNS
public static final java.lang.String SQL_ROLES_COLUMNS
- See Also:
- Constant Field Values
SQL_SELECT_ROLE_BY_NAME
public static final java.lang.String SQL_SELECT_ROLE_BY_NAME
- See Also:
- Constant Field Values
SQL_INSERT_INTO_ROLES
public static final java.lang.String SQL_INSERT_INTO_ROLES
- See Also:
- Constant Field Values
ImcmsAuthenticatorAndUserAndRoleMapper
public ImcmsAuthenticatorAndUserAndRoleMapper(ImcmsServices services)
authenticate
public boolean authenticate(java.lang.String loginName,
java.lang.String password)
- Specified by:
authenticate in interface Authenticator
getUser
public UserDomainObject getUser(java.lang.String loginName)
- Specified by:
getUser in interface UserAndRoleRegistry
getUser
public UserDomainObject getUser(int userId)
- Returns:
- An object representing the user with the given id.
saveUser
public void saveUser(java.lang.String loginName,
UserDomainObject userToSave)
updateUserSessionId
public void updateUserSessionId(UserDomainObject loggedInUser)
getUserSessionId
public java.lang.String getUserSessionId(UserDomainObject loggedInUser)
saveUser
public void saveUser(UserDomainObject user)
addUser
public void addUser(UserDomainObject user)
throws UserAlreadyExistsException
- Throws:
UserAlreadyExistsException
getRoleNames
public java.lang.String[] getRoleNames(UserDomainObject user)
- Deprecated.
- Specified by:
getRoleNames in interface UserAndRoleRegistry
getAllRoleNames
public java.lang.String[] getAllRoleNames()
- Specified by:
getAllRoleNames in interface UserAndRoleRegistry
addRoleNames
public void addRoleNames(java.lang.String[] externalRoleNames)
getUsers
public UserDomainObject[] getUsers(boolean includeUserExtern,
boolean includeInactiveUsers)
getAllUsersWithRole
public UserDomainObject[] getAllUsersWithRole(RoleDomainObject role)
addRole
public RoleDomainObject addRole(java.lang.String roleName)
deleteRole
public void deleteRole(RoleDomainObject role)
getAllRoles
public RoleDomainObject[] getAllRoles()
getAllRolesExceptUsersRole
public RoleDomainObject[] getAllRolesExceptUsersRole()
getRoleById
public RoleDomainObject getRoleById(int roleId)
getRoleByName
public RoleDomainObject getRoleByName(java.lang.String wantedRoleName)
getRoleFromSqlResult
public RoleDomainObject getRoleFromSqlResult(java.lang.String[] sqlResult)
getAllUsers
public UserDomainObject[] getAllUsers()
findUsersByNamePrefix
public UserDomainObject[] findUsersByNamePrefix(java.lang.String namePrefix,
boolean includeInactiveUsers)
initUserPhoneNumbers
public void initUserPhoneNumbers(UserDomainObject user)
initUserRoles
public void initUserRoles(UserDomainObject user)
initUserUserAdminRoles
public void initUserUserAdminRoles(UserDomainObject user)
saveRole
public void saveRole(RoleDomainObject role)
throws NameTooLongException,
RoleAlreadyExistsException
- Throws:
NameTooLongException
RoleAlreadyExistsException
getUserPhoneNumbers
public PhoneNumber[] getUserPhoneNumbers(int userToChangeId)
getDefaultUser
public UserDomainObject getDefaultUser()
getRole
public RoleDomainObject getRole(RoleId roleId)
- Specified by:
getRole in interface RoleGetter
getUserByIpAddress
public UserDomainObject getUserByIpAddress(java.lang.String ipAddress)