Package com.qfs.desc

Interface IFieldPermission

All Known Subinterfaces:
IWritableFieldPermission
All Known Implementing Classes:
WritableFieldPermission

public interface IFieldPermission
Component storing the roles that have read or write permission over a table column.
Author:
ActiveViam
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    canRead(Set<String> roles)
    Check if a user can read a field.
    boolean
    Check if a user can update a field.
    Returns all the roles allowed to read this field.
    Returns all the roles allowed to write this field.
  • Method Details

    • getReaderRoles

      Set<String> getReaderRoles()
      Returns all the roles allowed to read this field.
    • getWriterRoles

      Set<String> getWriterRoles()
      Returns all the roles allowed to write this field.
    • canRead

      boolean canRead(Set<String> roles)
      Check if a user can read a field.
      Parameters:
      roles - the set of roles of the user.
      Returns:
      true if at least one of the roles has the reader permission.
    • canWrite

      boolean canWrite(Set<String> roles)
      Check if a user can update a field.
      Parameters:
      roles - the set of roles of the user.
      Returns:
      true if at least one of the roles has the writer permission.