Package com.qfs.desc
Interface ITableSecurityBuilder
- All Known Implementing Classes:
TableSecurityBuilder
public interface ITableSecurityBuilder
Builder for the
ITableSecurity.- Author:
- ActiveViam
-
Method Summary
Modifier and TypeMethodDescriptionAdd permission for a specific field in the table.build()Returns the table security corresponding to this builder.Set new permission for a specific field in the table.Indicates if deleting records is allowed.Indicates if inserting new records is allowed.withTableReaders(String... readers) Set the readers for all the fields in the table.withTableReaders(List<String> readers) Set the readers for all the fields in the table.withTableWriters(String... writers) Set the writers for all the fields in the table.withTableWriters(List<String> writers) Set the writers for all the fields in the table.
-
Method Details
-
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
Set the writers for all the fields in the table.- Parameters:
writers- the writers for the whole table.- Returns:
- this for chained calls.
-
withTableWriters
Set the writers for all the fields in the table.- Parameters:
writers- the writers for the whole table.- Returns:
- this for chained calls.
-
withTableReaders
Set the readers for all the fields in the table.- Parameters:
readers- the readers for the whole table.- Returns:
- this for chained calls.
-
withTableReaders
Set the readers for all the fields in the table.- Parameters:
readers- the readers for the whole table.- Returns:
- this for chained calls.
-
addFieldPermission
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
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.
-