Package org.bremersee.security.access
Class AclBuilder.Impl
- java.lang.Object
-
- org.bremersee.security.access.AclBuilder.Impl
-
- All Implemented Interfaces:
AclBuilder
- Enclosing interface:
- AclBuilder
public static class AclBuilder.Impl extends Object implements AclBuilder
The default access control list builder implementation.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.bremersee.security.access.AclBuilder
AclBuilder.Impl
-
-
Constructor Summary
Constructors Constructor Description Impl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AclBuilder
addGroup(String group, String... permissions)
Adds group.AclBuilder
addRole(String role, String... permissions)
Adds role.AclBuilder
addUser(String user, String... permissions)
Adds user.<T> T
build(AclFactory<T> factory)
Build acl.AclBuilder
defaults(String... permissions)
Add default access control entries for the given permissions.AclBuilder
ensureAdminAccess(Collection<String> adminRoles, String... permissions)
Adds admin access.AclBuilder
from(String owner, Map<String,? extends Ace> map)
From acl (entity) values.AclBuilder
from(org.bremersee.common.model.AccessControlList acl)
From access control list DTO.AclBuilder
guest(Boolean isPublic, String... permissions)
Sets guest.AclBuilder
owner(String owner)
Sets owner.AclBuilder
removeAdminAccess(Collection<String> adminRoles, String... permissions)
Removes admin access.AclBuilder
removeGroup(String group, String... permissions)
Removes group.AclBuilder
removeRole(String role, String... permissions)
Removes role.AclBuilder
removeUser(String user, String... permissions)
Removes user.AclBuilder
reset()
Reset acl builder.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.bremersee.security.access.AclBuilder
buildAccessControlList, buildAcl, ensureAdminAccess, ensureAdminAccess, from, removeAdminAccess, removeAdminAccess
-
-
-
-
Method Detail
-
reset
public AclBuilder reset()
Description copied from interface:AclBuilder
Reset acl builder.- Specified by:
reset
in interfaceAclBuilder
- Returns:
- the acl builder
-
defaults
public AclBuilder defaults(String... permissions)
Description copied from interface:AclBuilder
Add default access control entries for the given permissions.- Specified by:
defaults
in interfaceAclBuilder
- Parameters:
permissions
- the permissions- Returns:
- the acl builder
-
from
public AclBuilder from(org.bremersee.common.model.AccessControlList acl)
Description copied from interface:AclBuilder
From access control list DTO.- Specified by:
from
in interfaceAclBuilder
- Parameters:
acl
- the acl dto- Returns:
- the acl builder
-
from
public AclBuilder from(String owner, Map<String,? extends Ace> map)
Description copied from interface:AclBuilder
From acl (entity) values.- Specified by:
from
in interfaceAclBuilder
- Parameters:
owner
- the ownermap
- the acl (entity) entry map- Returns:
- the acl builder
-
owner
public AclBuilder owner(String owner)
Description copied from interface:AclBuilder
Sets owner.- Specified by:
owner
in interfaceAclBuilder
- Parameters:
owner
- the owner- Returns:
- the acl builder
-
guest
public AclBuilder guest(Boolean isPublic, String... permissions)
Description copied from interface:AclBuilder
Sets guest.- Specified by:
guest
in interfaceAclBuilder
- Parameters:
isPublic
- is publicpermissions
- the permissions- Returns:
- the acl builder
-
addUser
public AclBuilder addUser(String user, String... permissions)
Description copied from interface:AclBuilder
Adds user.- Specified by:
addUser
in interfaceAclBuilder
- Parameters:
user
- the userpermissions
- the permissions- Returns:
- the acl builder
-
addRole
public AclBuilder addRole(String role, String... permissions)
Description copied from interface:AclBuilder
Adds role.- Specified by:
addRole
in interfaceAclBuilder
- Parameters:
role
- the rolepermissions
- the permissions- Returns:
- the acl builder
-
addGroup
public AclBuilder addGroup(String group, String... permissions)
Description copied from interface:AclBuilder
Adds group.- Specified by:
addGroup
in interfaceAclBuilder
- Parameters:
group
- the grouppermissions
- the permissions- Returns:
- the acl builder
-
removeUser
public AclBuilder removeUser(String user, String... permissions)
Description copied from interface:AclBuilder
Removes user.- Specified by:
removeUser
in interfaceAclBuilder
- Parameters:
user
- the userpermissions
- the permissions- Returns:
- the acl builder
-
removeRole
public AclBuilder removeRole(String role, String... permissions)
Description copied from interface:AclBuilder
Removes role.- Specified by:
removeRole
in interfaceAclBuilder
- Parameters:
role
- the rolepermissions
- the permissions- Returns:
- the acl builder
-
removeGroup
public AclBuilder removeGroup(String group, String... permissions)
Description copied from interface:AclBuilder
Removes group.- Specified by:
removeGroup
in interfaceAclBuilder
- Parameters:
group
- the grouppermissions
- the permissions- Returns:
- the acl builder
-
ensureAdminAccess
public AclBuilder ensureAdminAccess(Collection<String> adminRoles, String... permissions)
Description copied from interface:AclBuilder
Adds admin access.- Specified by:
ensureAdminAccess
in interfaceAclBuilder
- Parameters:
adminRoles
- the admin rolespermissions
- the permissions- Returns:
- the acl builder
-
removeAdminAccess
public AclBuilder removeAdminAccess(Collection<String> adminRoles, String... permissions)
Description copied from interface:AclBuilder
Removes admin access.- Specified by:
removeAdminAccess
in interfaceAclBuilder
- Parameters:
adminRoles
- the admin rolespermissions
- the permissions- Returns:
- the acl builder
-
build
public <T> T build(AclFactory<T> factory)
Description copied from interface:AclBuilder
Build acl.- Specified by:
build
in interfaceAclBuilder
- Type Parameters:
T
- the type of the acl- Parameters:
factory
- the factory- Returns:
- the acl
-
-