Class PgJdbcPrivilege

java.lang.Object
org.pgcodekeeper.core.database.pg.jdbc.PgJdbcPrivilege

public final class PgJdbcPrivilege extends Object
Parser for aclItem arrays
Author:
ryabinin_av
  • Method Details

    • getGrantee

      public String getGrantee()
    • getGrantValues

      public List<String> getGrantValues()
      Returns the list of granted privileges.
      Returns:
      unmodifiable list of grant values
    • isGO

      public boolean isGO()
    • isDefault

      public boolean isDefault()
    • isGrantAllToPublic

      public boolean isGrantAllToPublic()
      Returns whether this privilege grants all permissions to PUBLIC.
      Returns:
      true if this grants ALL to PUBLIC
    • getGrantString

      public String getGrantString(String column)
      Returns a formatted grant string with column suffixes.
      Parameters:
      column - the column suffix to append to each grant
      Returns:
      formatted grant string
    • parse

      public static List<PgJdbcPrivilege> parse(String aclArrayAsString, String order, String owner)
      Parses AclItem array string into a list of privilege objects.
      Parameters:
      aclArrayAsString - string representation of AclItem array
      order - target order for privileges inside the privilege string
      owner - owner name (owner's privileges go first)
      Returns:
      list of parsed privileges