@Service(value="cuba_AccessGroupsService") public class AccessGroupServiceBean extends java.lang.Object implements AccessGroupsService
Modifier and Type | Field and Description |
---|---|
protected DataManager |
dataManager |
protected DatatypeRegistry |
datatypes |
protected AccessGroupDefinitionsRepository |
groupsRepository |
protected Metadata |
metadata |
protected ServerConfig |
serverConfig |
NAME
Constructor and Description |
---|
AccessGroupServiceBean() |
Modifier and Type | Method and Description |
---|---|
protected ConstraintCheckType |
evaluateConstraintType(AccessConstraint accessConstraint) |
Group |
findPredefinedGroupByName(java.lang.String name)
Find predefined group by its name
|
java.util.Collection<Group> |
getAllGroups()
Load all access groups including design time groups
|
java.util.Collection<SessionAttribute> |
getGroupAttributes(Group group)
Load session attributes for specified access group
|
java.util.Collection<Constraint> |
getGroupConstraints(Group group)
Load group constraints for specified access group
|
Group |
getUserDefaultGroup()
Get default group for new user
|
protected Constraint |
mapToConstraint(AccessConstraint accessConstraint,
Group group) |
protected Group |
mapToGroup(AccessGroupDefinition groupDefinition) |
protected SessionAttribute |
mapToSessionAttribute(java.lang.String key,
java.lang.Object value) |
@Inject protected DataManager dataManager
@Inject protected AccessGroupDefinitionsRepository groupsRepository
@Inject protected Metadata metadata
@Inject protected ServerConfig serverConfig
@Inject protected DatatypeRegistry datatypes
public java.util.Collection<Group> getAllGroups()
AccessGroupsService
getAllGroups
in interface AccessGroupsService
public java.util.Collection<Constraint> getGroupConstraints(Group group)
AccessGroupsService
getGroupConstraints
in interface AccessGroupsService
public Group findPredefinedGroupByName(java.lang.String name)
AccessGroupsService
findPredefinedGroupByName
in interface AccessGroupsService
@Nullable public Group getUserDefaultGroup()
AccessGroupsService
getUserDefaultGroup
in interface AccessGroupsService
public java.util.Collection<SessionAttribute> getGroupAttributes(Group group)
AccessGroupsService
getGroupAttributes
in interface AccessGroupsService
protected Group mapToGroup(AccessGroupDefinition groupDefinition)
protected Constraint mapToConstraint(AccessConstraint accessConstraint, Group group)
protected SessionAttribute mapToSessionAttribute(java.lang.String key, java.lang.Object value)
protected ConstraintCheckType evaluateConstraintType(AccessConstraint accessConstraint)