Class CanvasUserRoleProvider
java.lang.Object
org.opencastproject.userdirectory.canvas.CanvasUserRoleProvider
- All Implemented Interfaces:
RoleProvider,UserProvider
-
Field Summary
Fields inherited from interface org.opencastproject.security.api.UserProvider
ALL_ORGANIZATIONS -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidactivate(org.osgi.service.component.ComponentContext cc) longReturns the number of users in the providerfindRoles(String query, Role.Target target, int offset, int limit) Return the found roles as an iterator.Return the found user's as an iterator.getName()Gets the provider nameReturns the identifier for the organization that is associated with this user provider.getRolesForUser(String userName) Returns the roles for this user or an empty array if no roles are applicable.getUsers()Gets all known users.voidinvalidate(String userName) Discards any cached value for given user name.Loads a user by username, or returns null if this user is not known to this provider.voidsetOrgDirectory(OrganizationDirectoryService orgDirectory) voidsetSecurityService(SecurityService securityService) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.opencastproject.security.api.UserProvider
findUsers
-
Constructor Details
-
CanvasUserRoleProvider
public CanvasUserRoleProvider()
-
-
Method Details
-
activate
public void activate(org.osgi.service.component.ComponentContext cc) throws org.osgi.service.cm.ConfigurationException - Throws:
org.osgi.service.cm.ConfigurationException
-
setOrgDirectory
-
setSecurityService
-
getRolesForUser
Description copied from interface:RoleProviderReturns the roles for this user or an empty array if no roles are applicable.- Specified by:
getRolesForUserin interfaceRoleProvider- Parameters:
userName- the user id- Returns:
- the set of roles
-
findRoles
Description copied from interface:RoleProviderReturn the found roles as an iterator.- Specified by:
findRolesin interfaceRoleProvider- Parameters:
query- the query. Use the wildcards "_" to match any single character and "%" to match an arbitrary number of characters (including zero characters).offset- the offsetlimit- the limit. 0 means no limit- Returns:
- an iterator of role's
-
getName
Description copied from interface:UserProviderGets the provider name- Specified by:
getNamein interfaceUserProvider- Returns:
- the provider name
-
getUsers
Description copied from interface:UserProviderGets all known users.- Specified by:
getUsersin interfaceUserProvider- Returns:
- the users
-
loadUser
Description copied from interface:UserProviderLoads a user by username, or returns null if this user is not known to this provider.- Specified by:
loadUserin interfaceUserProvider- Parameters:
userName- the username- Returns:
- the user
-
countUsers
public long countUsers()Description copied from interface:UserProviderReturns the number of users in the provider- Specified by:
countUsersin interfaceUserProvider- Returns:
- the count of users in the provider
-
getOrganization
Description copied from interface:UserProviderReturns the identifier for the organization that is associated with this user provider. If equal toUserProvider.ALL_ORGANIZATIONS, this provider will always be consulted, regardless of the organization.- Specified by:
getOrganizationin interfaceRoleProvider- Specified by:
getOrganizationin interfaceUserProvider- Returns:
- the defining organization
-
findUsers
Description copied from interface:UserProviderReturn the found user's as an iterator.- Specified by:
findUsersin interfaceUserProvider- Parameters:
query- the query. Use the wildcards "_" to match any single character and "%" to match an arbitrary number of characters (including zero characters).offset- the offsetlimit- the limit. 0 means no limit- Returns:
- an iterator of user's
-
invalidate
Description copied from interface:UserProviderDiscards any cached value for given user name.- Specified by:
invalidatein interfaceUserProvider- Parameters:
userName- the user name
-