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)
SecurityManagerassignUsersToGroup in interface SecurityManagerusers - The users collectiongroup - The groupSecurityManager.assignUsersToGroup(java.util.Collection,
com.logicaldoc.core.security.Group)public void assignUserToGroups(User user, Collection<Group> groups)
SecurityManagerassignUserToGroups in interface SecurityManageruser - The user to be assignedgroups - The groups collectionSecurityManager.assignUserToGroups(com.logicaldoc.core.security.User,
java.util.Collection)public void assignUserToGroup(User user, Group group)
SecurityManagerassignUserToGroup in interface SecurityManageruser - 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)
SecurityManagerremoveUsersFromGroup in interface SecurityManagerusers - 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)
SecurityManagerremoveUserFromGroup in interface SecurityManagergroup - The group to be updatedSecurityManager.removeUserFromGroup(com.logicaldoc.core.security.User,
com.logicaldoc.core.security.Group)public void removeUserFromAllGroups(User user)
SecurityManagerremoveUserFromAllGroups in interface SecurityManageruser - The user to be removedSecurityManager.removeUserFromAllGroups(com.logicaldoc.core.security.User)public void removeAllUsersFromGroup(Group group)
SecurityManagerremoveAllUsersFromGroup in interface SecurityManagergroup - The group from which all users must be removedSecurityManager.removeAllUsersFromGroup(com.logicaldoc.core.security.Group)public void assignUserToGroups(User user, long[] groupIds)
SecurityManagerassignUserToGroups in interface SecurityManageruser - The user to be assignedgroupIds - Array of group idsSecurityManager.assignUserToGroups(com.logicaldoc.core.security.User,
long[])public Set<Group> getAllowedGroups(long menuId)
SecurityManagergetAllowedGroups in interface SecurityManagermenuId - The menu to considercom.logicaldoc.core.security.SecurityManager#getAllowedGroups(com.logicaldoc.core.security.Menu)public boolean isMemberOf(long userId,
long groupId)
SecurityManagerisMemberOf in interface SecurityManageruserId - The user identifiergroupId - The group identifierpublic boolean isMemberOf(long userId,
String groupName)
SecurityManagerisMemberOf in interface SecurityManageruserId - The user identifiergroupName - The group nameCopyright © 2008-2014 Logical Objects. All Rights Reserved.