Interface SubjectManager


  • public interface SubjectManager
    Manage subjects (users and roles) in the external security system including searching for users and roles and importing users.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static String NO_ADD_WILDCARD_PREFIX
      Add this prefix to a query to indicate that wildcards should not be added
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      com.redwood.scheduler.api.model.Subject importUser​(String uid, String isolationGroupName)
      Import a user into an isolation group, current user (from the session used to create the SubjectManager) must have the User_Administration privilege grant
      SubjectSearchResult[] search​(String query, Set<com.redwood.scheduler.api.model.enumeration.SubjectType> types, int fetchSize)
      Search for subjects (users and roles).
    • Field Detail

      • NO_ADD_WILDCARD_PREFIX

        static final String NO_ADD_WILDCARD_PREFIX
        Add this prefix to a query to indicate that wildcards should not be added
        See Also:
        Constant Field Values
    • Method Detail

      • search

        SubjectSearchResult[] search​(String query,
                                     Set<com.redwood.scheduler.api.model.enumeration.SubjectType> types,
                                     int fetchSize)
        Search for subjects (users and roles).
        Parameters:
        query - the query to search with, may contain * as a wildcard. If it does not contain any wildcards then wildcards will be added at the start and end unless the query starts with NO_ADD_WILDCARD_PREFIX (NOADDWILDCARD:).
        types - the types of subject to search for, use constants from SubjectSearchResult.
        fetchSize - the maximum fetch size, if greater than zero.
        Returns:
        the subjects found.
      • importUser

        com.redwood.scheduler.api.model.Subject importUser​(String uid,
                                                           String isolationGroupName)
        Import a user into an isolation group, current user (from the session used to create the SubjectManager) must have the User_Administration privilege grant
        Parameters:
        uid - the user id in the external security system.
        isolationGroupName - the isolation group to import into.
        Returns:
        the imported user.