public interface IUserService extends IMetaComponent
Modifier and Type | Field and Description |
---|---|
static int |
ADMIN_DBID
The DB ID of the admin user is 1
|
static int |
EVERYONE_DBID
the db ID of the everyone group is 4
|
Modifier and Type | Method and Description |
---|---|
IThingID |
checkUser(IThingID userID)
if this user is from another service, return the corresponding user from this service
throws exception if not found
|
IUser |
getAdminUser()
get the admin user
|
IThingID |
getAdminUserID()
Get the ID of the admin user
|
List<String> |
getEmptyUUIDUsers()
Get List of users whose UUID is null
|
IGroup |
getEveryoneGroup()
get the everyone group
|
IThingID |
getEveryoneGroupID()
Get the ID of the everyone group
|
IThingID |
getGroupIDByURI(IURI uri)
Looks up a group by a given URI.
|
IThingIDList |
getGroups(String dnPrefix,
int startIndex,
int endIndex)
Generates a list of groups for specified DN prefix
|
IThingID |
getRoleIDByURI(IURI uri)
Looks up a role by a given URI.
|
Map<String,Object> |
getUserDetailsByURI(IURI uri)
Get User details for a given URI
|
Map<String,Object> |
getUserDetailsByUUID(String uuid)
Get User details for a given UUID
|
IThingID |
getUserIDByURI(IURI uri)
Looks up a user by a given URI.
|
IThingIDList |
getUsers(IThingID directoryID,
int startIndex,
int endIndex)
Generates a list of users for specified directory
|
IThingIDList |
getUsers(String dnPrefix,
int startIndex,
int endIndex)
Generates a list of groups for specified DN prefix
|
default int |
getUsersCount(boolean includeInvalid)
Returns the number of all initialized users in MWS or for a particular directoryService
|
default int |
getUsersCount(IThingID directoryID)
Returns the number of all initialized users in MWS or for a particular directoryService
|
IThingID |
initializeGroup(IInitializableGroup group)
Enters group metadata into the DB.
|
IThingID |
initializeRole(IInitializableRole role)
Enters group metadata into the DB.
|
IThingID |
initializeUser(IInitializableUser dsuser)
Whenever you need to translate user data from LDAP into a IUser, you must call
this function.
|
void |
invalidateUserUUID()
set null to all user UUID values
|
void |
setAdminUserURI(IURI uri)
Set the stored URI for the admin user.
|
void |
setEveryoneGroupURI(IURI uri)
Set the stored URI for the everyone group.
|
void |
updateDirectoryName(String oldDir,
String newDir)
Updates the directory name part of user/group/role dn's to a new name
ex: updateDirectoryName("/directory/bellevue/", "/directory/usa/");
|
void |
updateDistinguishedName(String oldDN,
String newDN,
int type)
Updates the Distinguished name of user/group
|
void |
updateUUID(String UUID,
String DN,
int type)
Updates the UUID attribute for a DN
|
getMetaContext, setMetaContext
getComponentData, getComponentName, getComponentProvider, getURI, isInitialized, setComponentData, setComponentProvider
init, shutdown
static final int ADMIN_DBID
static final int EVERYONE_DBID
IThingID getAdminUserID()
IUser getAdminUser()
IThingID getEveryoneGroupID()
IGroup getEveryoneGroup()
IThingID initializeUser(IInitializableUser dsuser) throws MetaException
dsuser
- User info from LDAP serverMetaException
- on DB or LDAP errorIThingID initializeGroup(IInitializableGroup group) throws MetaException
group
- from LDAPMetaException
- on DB or LDAP errorIThingID initializeRole(IInitializableRole role) throws MetaException
role
- from LDAPMetaException
- on DB or LDAP errorIThingIDList getUsers(String dnPrefix, int startIndex, int endIndex) throws MetaException
dnPrefix
- if null, returns all usersstartIndex
- index of first itemendIndex
- index of last, -1 for allMetaException
- if invalid directory name or DB errorIThingIDList getUsers(IThingID directoryID, int startIndex, int endIndex) throws MetaException
directoryID
- if 0, returns all usersstartIndex
- index of first itemendIndex
- index of last, -1 for allMetaException
- if invalid directory name or DB errordefault int getUsersCount(IThingID directoryID) throws MetaException
directoryID
- - if null returns ALL users count, otherwise count for particular dirService onlyMetaException
- if invalid directory name or DB errordefault int getUsersCount(boolean includeInvalid) throws MetaException
includeInvalid
- - if true, the service will include users which are not valid anymore(due to various reasons)MetaException
- if invalid directory name or DB errorIThingIDList getGroups(String dnPrefix, int startIndex, int endIndex) throws MetaException
dnPrefix
- if null, returns all usersstartIndex
- index of first itemendIndex
- index of last, -1 for allMetaException
- if invalid directory name or DB errorIThingID getUserIDByURI(IURI uri) throws MetaException
uri
- URI of userMetaException
- if DB errorIThingID getGroupIDByURI(IURI uri) throws MetaException
uri
- URI of groupMetaException
- if DB errorIThingID getRoleIDByURI(IURI uri) throws MetaException
uri
- URI of roleMetaException
- DB errorIThingID checkUser(IThingID userID) throws MetaException
userID
- of user to checkMetaException
void setAdminUserURI(IURI uri) throws MetaException
uri
- MetaException
void setEveryoneGroupURI(IURI uri) throws MetaException
uri
- MetaException
void updateDirectoryName(String oldDir, String newDir) throws MetaException
oldDir
- newDir
- MetaException
void updateDistinguishedName(String oldDN, String newDN, int type) throws MetaException
oldDN
- newDN
- type
- MetaException
void updateUUID(String UUID, String DN, int type) throws MetaException
uuid
- DN
- type
- MetaException
Map<String,Object> getUserDetailsByURI(IURI uri) throws MetaException
uri
- MetaException
Map<String,Object> getUserDetailsByUUID(String uuid) throws MetaException
uuid
- MetaException
void invalidateUserUUID() throws MetaException
MetaException
List<String> getEmptyUUIDUsers() throws MetaException
MetaException