public class SecurityManagerImpl extends Object implements SecurityManager
SecurityManager
Modifier and Type | Field and Description |
---|---|
protected GroupDAO |
groupDAO |
protected static org.slf4j.Logger |
log |
protected MenuDAO |
menuDAO |
protected UserDAO |
userDAO |
Modifier and Type | Method and Description |
---|---|
void |
assignUsersToGroup(Collection<User> users,
Group group)
Assign a collection of users to a group.
|
void |
assignUserToGroup(User user,
Group group)
Assign a user to a group.
|
void |
assignUserToGroups(User user,
Collection<Group> groups)
Assign a user to a collection of groups.
|
void |
assignUserToGroups(User user,
long[] groupIds)
Assign a user to a collection of groups.
|
Set<Group> |
getAllowedGroups(long menuId)
Retrieves the collection of groups that can access the given menu
|
boolean |
isMemberOf(long userId,
long groupId)
Checks if a given user is member of a particular group
|
boolean |
isMemberOf(long userId,
String groupName)
Checks if a given user is member of a particular group
|
void |
removeAllUsersFromGroup(Group group)
Removes all users from group
|
void |
removeUserFromAllGroups(User user)
Removes the specified user from a all groups except it's user's group
|
void |
removeUserFromGroup(User user,
Group group)
Removes the specified user from a group.
|
void |
removeUsersFromGroup(Collection<User> users,
Group group)
Removes the specified users from a group.
|
void |
setGroupDAO(GroupDAO groupDAO) |
void |
setMenuDAO(MenuDAO menuDAO) |
void |
setUserDAO(UserDAO userDAO) |
protected static org.slf4j.Logger log
protected UserDAO userDAO
protected GroupDAO groupDAO
protected MenuDAO menuDAO
public void setMenuDAO(MenuDAO menuDAO)
public void setGroupDAO(GroupDAO groupDAO)
public void setUserDAO(UserDAO userDAO)
public void assignUsersToGroup(Collection<User> users, Group group)
SecurityManager
assignUsersToGroup
in interface SecurityManager
users
- The users collectiongroup
- The groupSecurityManager.assignUsersToGroup(java.util.Collection,
com.logicaldoc.core.security.Group)
public void assignUserToGroups(User user, Collection<Group> groups)
SecurityManager
assignUserToGroups
in interface SecurityManager
user
- The user to be assignedgroups
- The groups collectionSecurityManager.assignUserToGroups(com.logicaldoc.core.security.User,
java.util.Collection)
public void assignUserToGroup(User user, Group group)
SecurityManager
assignUserToGroup
in interface SecurityManager
user
- The user to be assignedgroup
- The groupSecurityManager.assignUserToGroup(com.logicaldoc.core.security.User,
com.logicaldoc.core.security.Group)
public void removeUsersFromGroup(Collection<User> users, Group group)
SecurityManager
removeUsersFromGroup
in interface SecurityManager
users
- The users to be removedgroup
- The group to be updatedSecurityManager.removeUsersFromGroup(java.util.Collection,
com.logicaldoc.core.security.Group)
public void removeUserFromGroup(User user, Group group)
SecurityManager
removeUserFromGroup
in interface SecurityManager
group
- The group to be updatedSecurityManager.removeUserFromGroup(com.logicaldoc.core.security.User,
com.logicaldoc.core.security.Group)
public void removeUserFromAllGroups(User user)
SecurityManager
removeUserFromAllGroups
in interface SecurityManager
user
- The user to be removedSecurityManager.removeUserFromAllGroups(com.logicaldoc.core.security.User)
public void removeAllUsersFromGroup(Group group)
SecurityManager
removeAllUsersFromGroup
in interface SecurityManager
group
- The group from which all users must be removedSecurityManager.removeAllUsersFromGroup(com.logicaldoc.core.security.Group)
public void assignUserToGroups(User user, long[] groupIds)
SecurityManager
assignUserToGroups
in interface SecurityManager
user
- The user to be assignedgroupIds
- Array of group idsSecurityManager.assignUserToGroups(com.logicaldoc.core.security.User,
long[])
public Set<Group> getAllowedGroups(long menuId)
SecurityManager
getAllowedGroups
in interface SecurityManager
menuId
- The menu to considercom.logicaldoc.core.security.SecurityManager#getAllowedGroups(com.logicaldoc.core.security.Menu)
public boolean isMemberOf(long userId, long groupId)
SecurityManager
isMemberOf
in interface SecurityManager
userId
- The user identifiergroupId
- The group identifierpublic boolean isMemberOf(long userId, String groupName)
SecurityManager
isMemberOf
in interface SecurityManager
userId
- The user identifiergroupName
- The group nameCopyright © 2008-2014 Logical Objects. All Rights Reserved.