Class UserMgmtServiceImpl
- java.lang.Object
-
- com.composum.sling.core.usermanagement.core.impl.UserMgmtServiceImpl
-
- All Implemented Interfaces:
UserManagementService
public class UserMgmtServiceImpl extends Object implements UserManagementService
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected classUserMgmtServiceImpl.NamePrincipal
-
Constructor Summary
Constructors Constructor Description UserMgmtServiceImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidassignToGroup(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.voidassignToGroup(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.GroupgetOrCreateGroup(org.apache.jackrabbit.api.JackrabbitSession session, org.apache.jackrabbit.api.security.user.UserManager userManager, String path)Retrieves a group by their name; if the group doesn't exist the group will be created.org.apache.jackrabbit.api.security.user.AuthorizablegetOrCreateUser(org.apache.jackrabbit.api.JackrabbitSession session, org.apache.jackrabbit.api.security.user.UserManager userManager, String path, boolean systemUser)Retrieves a user by its name; if the user doesn't exist the user will be created.protected String[]pathAndName(String pathAndName)
-
-
-
Method Detail
-
getOrCreateUser
public org.apache.jackrabbit.api.security.user.Authorizable getOrCreateUser(org.apache.jackrabbit.api.JackrabbitSession session, org.apache.jackrabbit.api.security.user.UserManager userManager, String path, boolean systemUser) throws javax.jcr.RepositoryExceptionRetrieves a user by its name; if the user doesn't exist the user will be created.- Specified by:
getOrCreateUserin interfaceUserManagementService- Parameters:
path- the name of the user with an optional prepended intermediate path for user creation- Throws:
javax.jcr.RepositoryException
-
getOrCreateGroup
public org.apache.jackrabbit.api.security.user.Group getOrCreateGroup(org.apache.jackrabbit.api.JackrabbitSession session, org.apache.jackrabbit.api.security.user.UserManager userManager, String path) throws javax.jcr.RepositoryExceptionRetrieves a group by their name; if the group doesn't exist the group will be created.- Specified by:
getOrCreateGroupin interfaceUserManagementService- Parameters:
path- the name of the group with an optional prepended intermediate path for group creation- Throws:
javax.jcr.RepositoryException
-
assignToGroup
public 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.RepositoryExceptionAssign an member (user or group) to a group if not always a member.- Specified by:
assignToGroupin interfaceUserManagementService- 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
public 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.RepositoryExceptionAssign an member (user or group) to a group if not always a member.- Specified by:
assignToGroupin interfaceUserManagementService- Parameters:
memberName- the name of the authorizable (the name only)- Throws:
javax.jcr.RepositoryException
-
-