Class PathBasedCredentialContext

java.lang.Object
org.apache.gravitino.credential.PathBasedCredentialContext
All Implemented Interfaces:
CredentialContext

public class PathBasedCredentialContext extends Object implements CredentialContext
LocationContext is generated when user requesting resources associated with storage location like table, fileset, etc.
  • Constructor Details

    • PathBasedCredentialContext

      public PathBasedCredentialContext(String userName, Set<String> writePaths, Set<String> readPaths)
      Constructor for PathBasedCredentialContext.
      Parameters:
      userName - the name of the user
      writePaths - the set of paths that the user can write to
      readPaths - the set of paths that the user can read from
  • Method Details

    • getUserName

      public String getUserName()
      Description copied from interface: CredentialContext
      Providing the username.
      Specified by:
      getUserName in interface CredentialContext
      Returns:
      A string identifying user name.
    • getWritePaths

      public Set<String> getWritePaths()
      Get the set of paths that the user can write to.
      Returns:
      set of paths that the user can write to
    • getReadPaths

      public Set<String> getReadPaths()
      Get the set of paths that the user can read from.
      Returns:
      set of paths that the user can read from
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object