Class PrivilegeDTO

java.lang.Object
org.apache.gravitino.dto.authorization.PrivilegeDTO
All Implemented Interfaces:
Privilege

public class PrivilegeDTO extends Object implements Privilege
Data transfer object representing a privilege.
  • Constructor Details

    • PrivilegeDTO

      protected PrivilegeDTO()
      Default constructor for Jackson deserialization.
    • PrivilegeDTO

      protected PrivilegeDTO(Privilege.Name name, Privilege.Condition condition)
      Creates a new instance of PrivilegeDTO.
      Parameters:
      name - The name of the Privilege DTO.
      condition - The condition of the Privilege DTO.
  • Method Details

    • name

      public Privilege.Name name()
      Specified by:
      name in interface Privilege
      Returns:
      The generic name of the privilege.
    • simpleString

      public String simpleString()
      Specified by:
      simpleString in interface Privilege
      Returns:
      A readable string representation for the privilege.
    • condition

      public Privilege.Condition condition()
      Specified by:
      condition in interface Privilege
      Returns:
      The condition of the privilege. `ALLOW` means that you are allowed to use the privilege, `DENY` means that you are denied to use the privilege
    • canBindTo

      public boolean canBindTo(MetadataObject.Type type)
      Description copied from interface: Privilege
      If the privilege can bind to a securable object, then this method will return true, otherwise false.
      Specified by:
      canBindTo in interface Privilege
      Parameters:
      type - The securable object type.
      Returns:
      It will return true if the privilege can bind to a securable object, otherwise false.
    • builder

      public static PrivilegeDTO.Builder builder()
      Returns:
      the builder for creating a new instance of PrivilegeDTO.