Interface UserManager


  • public interface UserManager
    Deprecated.
    cq 5.5 Use org.apache.jackrabbit.api.security.user.UserManager instead.
    UserManager allows access to Users and Groups. These are the Objects that act on Resources. They are referred to by the common super-class 'Authorizable'.
    Basic search and creation means are provided.
    The UserManager for a Session can be accessed by use of UserManagerFactory

    NOTE: This does not go to the osg.services.UserManger, as it is not existing now...additionly to me its relation to Authentication outside Sling is not clear enough.

    See Also:
    Authorizable, UserManagerFactory
    • Method Detail

      • hasAuthorizable

        boolean hasAuthorizable​(String id)
        Deprecated.
        This method tests if the Manager has any Authorizable with this given ID.
        If this method evaluates to true a call to get(id) has to return a non-null Authorizable
        Parameters:
        id - to be probed
        Returns:
        true if an Authorizable with the given id exists
        See Also:
        get(String)
      • find

        Authorizable find​(Principal principal)
        Deprecated.
        Searches for an Authorizable for the given Principal.
        Parameters:
        principal - the Authorizable should contain
        Returns:
        the Authorizable or null if none found
        See Also:
        Authorizable.getPrincipal()
      • find

        Iterator<Authorizable> find​(String propertyName,
                                    String substring)
        Deprecated.
        Search for an Authorizable that contains the given query as a value of the given property.
        The value doesn't have to match exactly. Property names of Property to be searched. The Authorizable defines default properties, implementations may extend these
        Parameters:
        propertyName - to be searched in
        substring - to be found
        Returns:
        Iterator of hits, empty if no Authorizable matches
      • getUsers

        Iterator<User> getUsers()
        Deprecated.
        Returns:
        all Users this Manager knows. Should be used with care, may be time-consuming
      • getGroups

        Iterator<Group> getGroups()
        Deprecated.
        Returns:
        all Groups this Manager knows.Should be used with care, may be time-consuming
      • findByHome

        Authorizable findByHome​(String homePath)
        Deprecated.
        Searches an Authorizable which has the given path as Path of it's Home Path property. Thus that findByHomepath(homePath).getHomePath().equals(homePath)
        Parameters:
        homePath - path of the Authorizable's Home
        Returns:
        the Authorizable or null
        See Also:
        Authorizable.getHomePath()
      • isAutoSave

        boolean isAutoSave()
        Deprecated.
        If any write operations executed through the User API are automatically persisted this method returns true. In this case there are no pending transient changes left and there is no need to explicitly call Session.save(). If this method returns false any changes must be completed by an extra save call on the Session associated with this UserManager.
        Returns:
        true if changes are automatically persisted; false if changes made through this API (including method calls on Authorizable and subclasses are only transient and must be persisted using Session.save().
        See Also:
        autoSave(boolean)
      • autoSave

        boolean autoSave​(boolean enable)
        Deprecated.
        Changes the auto save behavior of this UserManager.
        Parameters:
        enable - If true changes made through this API will be automatically saved
        Returns:
        true if the autoSave mode was successfully changed.