Class UserIdRoleProvider

java.lang.Object
org.opencastproject.userdirectory.UserIdRoleProvider
All Implemented Interfaces:
RoleProvider, org.osgi.service.cm.ManagedService

public class UserIdRoleProvider extends Object implements RoleProvider, org.osgi.service.cm.ManagedService
The user id role provider assigns the user id role.
  • Field Details

    • securityService

      protected SecurityService securityService
      The security service
    • userDirectoryService

      protected UserDirectoryService userDirectoryService
      The user directory service
  • Constructor Details

    • UserIdRoleProvider

      public UserIdRoleProvider()
  • Method Details

    • setSecurityService

      public void setSecurityService(SecurityService securityService)
      Parameters:
      securityService - the securityService to set
    • setUserDirectoryService

      public void setUserDirectoryService(UserDirectoryService userDirectoryService)
      Sets the user directory service
      Parameters:
      userDirectoryService - the userDirectoryService to set
    • isSanitize

      public static boolean isSanitize()
    • getUserRolePrefix

      public static String getUserRolePrefix()
    • getUserIdRole

      public static String getUserIdRole(String userName)
    • 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
      See Also:
    • getOrganization

      public String getOrganization()
      Description copied from interface: RoleProvider
      Returns the identifier for the organization that is defining this set of roles.
      Specified by:
      getOrganization in interface RoleProvider
      Returns:
      the defining organization
      See Also:
    • 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
      See Also:
    • updated

      public void updated(Dictionary properties) throws org.osgi.service.cm.ConfigurationException
      Specified by:
      updated in interface org.osgi.service.cm.ManagedService
      Throws:
      org.osgi.service.cm.ConfigurationException