Package com.qfs.desc

Interface ITableSecurityBuilder

    • Method Detail

      • supportInsertion

        ITableSecurityBuilder supportInsertion()
        Indicates if inserting new records is allowed.
        Returns:
        this for chained calls.
      • supportDeletion

        ITableSecurityBuilder supportDeletion()
        Indicates if deleting records is allowed.
        Returns:
        this for chained calls.
      • withTableWriters

        ITableSecurityBuilder withTableWriters​(List<String> writers)
        Set the writers for all the fields in the table.
        Parameters:
        writers - the writers for the whole table.
        Returns:
        this for chained calls.
      • withTableWriters

        ITableSecurityBuilder withTableWriters​(String... writers)
        Set the writers for all the fields in the table.
        Parameters:
        writers - the writers for the whole table.
        Returns:
        this for chained calls.
      • withTableReaders

        ITableSecurityBuilder withTableReaders​(List<String> readers)
        Set the readers for all the fields in the table.
        Parameters:
        readers - the readers for the whole table.
        Returns:
        this for chained calls.
      • withTableReaders

        ITableSecurityBuilder withTableReaders​(String... readers)
        Set the readers for all the fields in the table.
        Parameters:
        readers - the readers for the whole table.
        Returns:
        this for chained calls.
      • addFieldPermission

        ITableSecurityBuilder addFieldPermission​(String field,
                                                 List<String> readers,
                                                 List<String> writers)
        Add permission for a specific field in the table. This permission is added to the permissions for the whole table.

        If you use #withTableReader(admin).addFieldPermission(myfield, [user1], []) then both admin and user1 will be able to see "myfield".

        Parameters:
        field - the field which receive additional permissions.
        readers - the additional readers for the field.
        writers - the additional writers for the field.
        Returns:
        this builder for chained calls.
      • setFieldPermission

        ITableSecurityBuilder setFieldPermission​(String field,
                                                 List<String> readers,
                                                 List<String> writers)
        Set new permission for a specific field in the table. This permission will REPLACE the permissions defined for the whole table.

        If you use .withTableReader(admin).setFieldPermission(myfield, [user1], []) then only user1 will be able to see "myfield".

        Parameters:
        field - the field which receive new permissions.
        readers - the new readers for the field.
        writers - the new writers for the field.
        Returns:
        this builder for chained calls.
      • build

        ITableSecurity build()
        Returns the table security corresponding to this builder.