Package org.bremersee.security.access
Class AclMapperImpl<T extends Acl<? extends Ace>>
- java.lang.Object
-
- org.bremersee.security.access.AclMapperImpl<T>
-
-
Constructor Summary
Constructors Constructor Description AclMapperImpl(@NotNull AclFactory<T> aclFactory)
Instantiates a new acl mapper.AclMapperImpl(@NotNull AclFactory<T> aclFactory, String[] defaultPermissions, boolean switchAdminAccess)
Instantiates a new acl mapper.AclMapperImpl(@NotNull AclFactory<T> aclFactory, String[] defaultPermissions, boolean switchAdminAccess, boolean returnNull)
Instantiates a new acl mapper.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.bremersee.common.model.AccessControlList
defaultAccessControlList(String owner)
Default access control list (dto).T
defaultAcl(String owner)
Default acl (entity).AclFactory<T>
getAclFactory()
Gets acl factory.Set<String>
getAdminRoles()
Gets admin roles.T
map(org.bremersee.common.model.AccessControlList accessControlList)
Map access control list dto to entity.org.bremersee.common.model.AccessControlList
map(T acl)
Map access control list (entity) to dto.void
setAdminRoles(Set<String> adminRoles)
Sets admin roles.
-
-
-
Constructor Detail
-
AclMapperImpl
public AclMapperImpl(@NotNull @NotNull AclFactory<T> aclFactory)
Instantiates a new acl mapper.- Parameters:
aclFactory
- the acl factory
-
AclMapperImpl
public AclMapperImpl(@NotNull @NotNull AclFactory<T> aclFactory, @Nullable String[] defaultPermissions, boolean switchAdminAccess)
Instantiates a new acl mapper.- Parameters:
aclFactory
- the acl factorydefaultPermissions
- the default permissionsswitchAdminAccess
- the switch admin access
-
AclMapperImpl
public AclMapperImpl(@NotNull @NotNull AclFactory<T> aclFactory, @Nullable String[] defaultPermissions, boolean switchAdminAccess, boolean returnNull)
Instantiates a new acl mapper.- Parameters:
aclFactory
- the acl factorydefaultPermissions
- the default permissionsswitchAdminAccess
- the switch admin accessreturnNull
- the return null
-
-
Method Detail
-
setAdminRoles
public void setAdminRoles(Set<String> adminRoles)
Sets admin roles.- Parameters:
adminRoles
- the admin roles
-
getAclFactory
public AclFactory<T> getAclFactory()
Description copied from interface:AclMapper
Gets acl factory.- Specified by:
getAclFactory
in interfaceAclMapper<T extends Acl<? extends Ace>>
- Returns:
- the acl factory
-
defaultAccessControlList
public org.bremersee.common.model.AccessControlList defaultAccessControlList(String owner)
Description copied from interface:AclMapper
Default access control list (dto).- Specified by:
defaultAccessControlList
in interfaceAclMapper<T extends Acl<? extends Ace>>
- Parameters:
owner
- the owner- Returns:
- the access control list (can be null)
-
map
public org.bremersee.common.model.AccessControlList map(T acl)
Description copied from interface:AclMapper
Map access control list (entity) to dto.
-
map
public T map(org.bremersee.common.model.AccessControlList accessControlList)
Description copied from interface:AclMapper
Map access control list dto to entity.
-
-