Class MoodleUserProviderInstance

java.lang.Object
org.opencastproject.userdirectory.moodle.MoodleUserProviderInstance
All Implemented Interfaces:
org.opencastproject.security.api.RoleProvider, org.opencastproject.security.api.UserProvider

public class MoodleUserProviderInstance extends Object implements org.opencastproject.security.api.UserProvider, org.opencastproject.security.api.RoleProvider
A UserProvider that reads user roles from Moodle.
  • Constructor Details

    • MoodleUserProviderInstance

      public MoodleUserProviderInstance()
  • Method Details

    • setOrgDirectory

      public void setOrgDirectory(org.opencastproject.security.api.OrganizationDirectoryService orgDirectory)
      OSGi DI
    • updated

      public void updated(org.osgi.framework.BundleContext bundleContext, Map<String,Object> properties) throws org.osgi.service.cm.ConfigurationException
      Throws:
      org.osgi.service.cm.ConfigurationException
    • 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
      See Also:
      • UserProvider.invalidate(java.lang.String)
    • getRolesForUser

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

      public Iterator<org.opencastproject.security.api.Role> findRoles(String query, org.opencastproject.security.api.Role.Target target, int offset, int limit)

      We search for COURSEID, COURSEID_Learner, COURSEID_Instructor

      Specified by:
      findRoles in interface org.opencastproject.security.api.RoleProvider