Class AclMapperImpl<T extends Acl<? extends Ace>>

  • Type Parameters:
    T - the acl type
    All Implemented Interfaces:
    AclMapper<T>

    public class AclMapperImpl<T extends Acl<? extends Ace>>
    extends Object
    implements AclMapper<T>
    The acl mapper implementation.
    Author:
    Christian Bremer
    • 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 factory
        defaultPermissions - the default permissions
        switchAdminAccess - 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 factory
        defaultPermissions - the default permissions
        switchAdminAccess - the switch admin access
        returnNull - the return null
    • Method Detail

      • getAdminRoles

        public Set<String> getAdminRoles()
        Gets admin roles.
        Returns:
        the admin roles
      • setAdminRoles

        public void setAdminRoles​(Set<String> adminRoles)
        Sets admin roles.
        Parameters:
        adminRoles - the admin roles
      • defaultAccessControlList

        public org.bremersee.common.model.AccessControlList defaultAccessControlList​(String owner)
        Description copied from interface: AclMapper
        Default access control list (dto).
        Specified by:
        defaultAccessControlList in interface AclMapper<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.
        Specified by:
        map in interface AclMapper<T extends Acl<? extends Ace>>
        Parameters:
        acl - the acl
        Returns:
        the access control list
      • map

        public T map​(org.bremersee.common.model.AccessControlList accessControlList)
        Description copied from interface: AclMapper
        Map access control list dto to entity.
        Specified by:
        map in interface AclMapper<T extends Acl<? extends Ace>>
        Parameters:
        accessControlList - the access control list
        Returns:
        the acl of the specified type
      • defaultAcl

        public T defaultAcl​(String owner)
        Description copied from interface: AclMapper
        Default acl (entity).
        Specified by:
        defaultAcl in interface AclMapper<T extends Acl<? extends Ace>>
        Parameters:
        owner - the owner
        Returns:
        the acl (can be null)