Interface UserManagementService

  • All Known Implementing Classes:
    UserMgmtServiceImpl

    public interface UserManagementService
    a simple service to provide a user and groups setup API
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void assignToGroup​(org.apache.jackrabbit.api.JackrabbitSession session, org.apache.jackrabbit.api.security.user.UserManager userManager, String memberName, org.apache.jackrabbit.api.security.user.Group group)
      Assign an member (user or group) to a group if not always a member.
      void assignToGroup​(org.apache.jackrabbit.api.JackrabbitSession session, org.apache.jackrabbit.api.security.user.UserManager userManager, org.apache.jackrabbit.api.security.user.Authorizable authorizable, String groupName)
      Assign an member (user or group) to a group if not always a member.
      org.apache.jackrabbit.api.security.user.Group getOrCreateGroup​(org.apache.jackrabbit.api.JackrabbitSession session, org.apache.jackrabbit.api.security.user.UserManager userManager, String pathAndName)
      Retrieves a group by their name; if the group doesn't exist the group will be created.
      org.apache.jackrabbit.api.security.user.Authorizable getOrCreateUser​(org.apache.jackrabbit.api.JackrabbitSession session, org.apache.jackrabbit.api.security.user.UserManager userManager, String pathAndName, boolean systemUser)
      Retrieves a user by its name; if the user doesn't exist the user will be created.
    • Method Detail

      • getOrCreateUser

        org.apache.jackrabbit.api.security.user.Authorizable getOrCreateUser​(org.apache.jackrabbit.api.JackrabbitSession session,
                                                                             org.apache.jackrabbit.api.security.user.UserManager userManager,
                                                                             String pathAndName,
                                                                             boolean systemUser)
                                                                      throws javax.jcr.RepositoryException
        Retrieves a user by its name; if the user doesn't exist the user will be created.
        Parameters:
        pathAndName - the name of the user with an optional prepended intermediate path for user creation
        Throws:
        javax.jcr.RepositoryException
      • getOrCreateGroup

        org.apache.jackrabbit.api.security.user.Group getOrCreateGroup​(org.apache.jackrabbit.api.JackrabbitSession session,
                                                                       org.apache.jackrabbit.api.security.user.UserManager userManager,
                                                                       String pathAndName)
                                                                throws javax.jcr.RepositoryException
        Retrieves a group by their name; if the group doesn't exist the group will be created.
        Parameters:
        pathAndName - the name of the group with an optional prepended intermediate path for group creation
        Throws:
        javax.jcr.RepositoryException
      • assignToGroup

        void assignToGroup​(org.apache.jackrabbit.api.JackrabbitSession session,
                           org.apache.jackrabbit.api.security.user.UserManager userManager,
                           org.apache.jackrabbit.api.security.user.Authorizable authorizable,
                           String groupName)
                    throws javax.jcr.RepositoryException
        Assign an member (user or group) to a group if not always a member.
        Parameters:
        authorizable - the name of the authorizable (the name only)
        groupName - the name of the group (the simple name only)
        Throws:
        javax.jcr.RepositoryException
      • assignToGroup

        void assignToGroup​(org.apache.jackrabbit.api.JackrabbitSession session,
                           org.apache.jackrabbit.api.security.user.UserManager userManager,
                           String memberName,
                           org.apache.jackrabbit.api.security.user.Group group)
                    throws javax.jcr.RepositoryException
        Assign an member (user or group) to a group if not always a member.
        Parameters:
        memberName - the name of the authorizable (the name only)
        Throws:
        javax.jcr.RepositoryException