Class CanvasUserRoleProvider

java.lang.Object
org.opencastproject.userdirectory.canvas.CanvasUserRoleProvider
All Implemented Interfaces:
RoleProvider, UserProvider

public class CanvasUserRoleProvider extends Object implements UserProvider, RoleProvider
  • 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

      public void setOrgDirectory(OrganizationDirectoryService orgDirectory)
    • setSecurityService

      public void setSecurityService(SecurityService securityService)
    • getRolesForUser

      public List<Role> getRolesForUser(String userName)
      Description copied from interface: RoleProvider
      Returns the roles for this user or an empty array if no roles are applicable.
      Specified by:
      getRolesForUser in interface RoleProvider
      Parameters:
      userName - the user id
      Returns:
      the set of roles
    • findRoles

      public Iterator<Role> findRoles(String query, Role.Target target, int offset, int limit)
      Description copied from interface: RoleProvider
      Return the found roles as an iterator.
      Specified by:
      findRoles in interface RoleProvider
      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 offset
      limit - the limit. 0 means no limit
      Returns:
      an iterator of role's
    • getName

      public String getName()
      Description copied from interface: UserProvider
      Gets the provider name
      Specified by:
      getName in interface UserProvider
      Returns:
      the provider name
    • getUsers

      public Iterator<User> getUsers()
      Description copied from interface: UserProvider
      Gets all known users.
      Specified by:
      getUsers in interface UserProvider
      Returns:
      the users
    • loadUser

      public User loadUser(String userName)
      Description copied from interface: UserProvider
      Loads a user by username, or returns null if this user is not known to this provider.
      Specified by:
      loadUser in interface UserProvider
      Parameters:
      userName - the username
      Returns:
      the user
    • countUsers

      public long countUsers()
      Description copied from interface: UserProvider
      Returns the number of users in the provider
      Specified by:
      countUsers in interface UserProvider
      Returns:
      the count of users in the provider
    • getOrganization

      public String getOrganization()
      Description copied from interface: UserProvider
      Returns the identifier for the organization that is associated with this user provider. If equal to UserProvider.ALL_ORGANIZATIONS, this provider will always be consulted, regardless of the organization.
      Specified by:
      getOrganization in interface RoleProvider
      Specified by:
      getOrganization in interface UserProvider
      Returns:
      the defining organization
    • findUsers

      public Iterator<User> findUsers(String query, int offset, int limit)
      Description copied from interface: UserProvider
      Return the found user's as an iterator.
      Specified by:
      findUsers in interface UserProvider
      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 offset
      limit - the limit. 0 means no limit
      Returns:
      an iterator of user's
    • invalidate

      public void invalidate(String userName)
      Description copied from interface: UserProvider
      Discards any cached value for given user name.
      Specified by:
      invalidate in interface UserProvider
      Parameters:
      userName - the user name