|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectccc.domain.Entity
ccc.domain.Principal
ccc.domain.GroupEntity
public class GroupEntity
A security group.
Constructor Summary | |
---|---|
protected |
GroupEntity()
Constructor: for persistence only. |
|
GroupEntity(java.lang.String name,
java.lang.String... permissions)
Constructor. |
Method Summary | |
---|---|
Group |
createDto()
Create a DTO for this group. |
java.util.Set<java.lang.String> |
getPermissions()
Accessor. |
boolean |
hasPermission(java.lang.String permission)
Query - determine whether this group has the specified permission. |
boolean |
includes(UserEntity user)
Check if the specified user is included by this principal. |
static java.util.List<Group> |
map(java.util.Collection<GroupEntity> groups)
Map a list of groups to a list of group DTOs. |
void |
setPermissions(java.util.Set<java.lang.String> permissions)
Mutator. |
Methods inherited from class ccc.domain.Principal |
---|
getName, setName |
Methods inherited from class ccc.domain.Entity |
---|
equals, getId, getVersion, hashCode, setId, toJson, toString |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
protected GroupEntity()
public GroupEntity(java.lang.String name, java.lang.String... permissions)
name
- The group's name.permissions
- The group's permissions.Method Detail |
---|
public final java.util.Set<java.lang.String> getPermissions()
public final void setPermissions(java.util.Set<java.lang.String> permissions)
permissions
- The permissions to set.public boolean hasPermission(java.lang.String permission)
permission
- The permission name.
public Group createDto()
public static java.util.List<Group> map(java.util.Collection<GroupEntity> groups)
groups
- The groups to map.
public boolean includes(UserEntity user)
includes
in class Principal
user
- The user to check.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |