Class BrightspaceUserProviderInstance

java.lang.Object
org.opencastproject.userdirectory.brightspace.BrightspaceUserProviderInstance
All Implemented Interfaces:
org.opencastproject.security.api.CachingUserProviderMXBean, org.opencastproject.security.api.RoleProvider, org.opencastproject.security.api.UserProvider

public class BrightspaceUserProviderInstance extends Object implements org.opencastproject.security.api.UserProvider, org.opencastproject.security.api.RoleProvider, org.opencastproject.security.api.CachingUserProviderMXBean
  • Constructor Details

    • BrightspaceUserProviderInstance

      public BrightspaceUserProviderInstance(String pid, BrightspaceClient client, org.opencastproject.security.api.Organization organization, int cacheSize, int cacheExpiration, Set instructorRoles, Set ignoredUsernames)
      Constructs a Brighspace user provider with the needed settings
      Parameters:
      pid - The PID of this service.
      client - The Brightspace rest service client.
      organization - The organisation.
      cacheSize - The number of users to cache.
      cacheExpiration - The number of minutes to cache users.
  • Method Details

    • getCacheHitRatio

      public float getCacheHitRatio()
      Specified by:
      getCacheHitRatio in interface org.opencastproject.security.api.CachingUserProviderMXBean
    • getName

      public String getName()
      Specified by:
      getName in interface org.opencastproject.security.api.UserProvider
      See Also:
      • UserProvider.getName()
    • getUsers

      public Iterator<org.opencastproject.security.api.User> getUsers()
      Specified by:
      getUsers in interface org.opencastproject.security.api.UserProvider
      See Also:
      • UserProvider.getUsers()
    • loadUser

      public org.opencastproject.security.api.User loadUser(String userName)
      Specified by:
      loadUser in interface org.opencastproject.security.api.UserProvider
      See Also:
      • UserProvider.loadUser(java.lang.String)
    • countUsers

      public long countUsers()
      Specified by:
      countUsers in interface org.opencastproject.security.api.UserProvider
      See Also:
      • UserProvider.countUsers()
    • getOrganization

      public String getOrganization()
      Specified by:
      getOrganization in interface org.opencastproject.security.api.RoleProvider
      Specified by:
      getOrganization in interface org.opencastproject.security.api.UserProvider
      See Also:
      • UserProvider.getOrganization()
    • findUsers

      public Iterator<org.opencastproject.security.api.User> findUsers(String query, int offset, int limit)
      Specified by:
      findUsers in interface org.opencastproject.security.api.UserProvider
      See Also:
      • UserProvider.findUsers(java.lang.String, int, int)
    • invalidate

      public void invalidate(String userName)
      Specified by:
      invalidate in interface org.opencastproject.security.api.UserProvider
    • getRolesForUser

      public List<org.opencastproject.security.api.Role> getRolesForUser(String username)
      Specified by:
      getRolesForUser in interface org.opencastproject.security.api.RoleProvider
    • findRoles

      public Iterator<org.opencastproject.security.api.Role> findRoles(String query, org.opencastproject.security.api.Role.Target target, int offset, int limit)
      Specified by:
      findRoles in interface org.opencastproject.security.api.RoleProvider