Class 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.
    • Constructor Detail

      • Impl

        public Impl()
    • Method Detail

      • defaults

        public AclBuilder defaults​(String... permissions)
        Description copied from interface: AclBuilder
        Add default access control entries for the given permissions.
        Specified by:
        defaults in interface AclBuilder
        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 interface AclBuilder
        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 interface AclBuilder
        Parameters:
        owner - the owner
        map - 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 interface AclBuilder
        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 interface AclBuilder
        Parameters:
        isPublic - is public
        permissions - 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 interface AclBuilder
        Parameters:
        user - the user
        permissions - 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 interface AclBuilder
        Parameters:
        role - the role
        permissions - 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 interface AclBuilder
        Parameters:
        group - the group
        permissions - 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 interface AclBuilder
        Parameters:
        user - the user
        permissions - 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 interface AclBuilder
        Parameters:
        role - the role
        permissions - 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 interface AclBuilder
        Parameters:
        group - the group
        permissions - 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 interface AclBuilder
        Type Parameters:
        T - the type of the acl
        Parameters:
        factory - the factory
        Returns:
        the acl