Class SecurableObjects
java.lang.Object
org.apache.gravitino.authorization.SecurableObjects
The helper class for
SecurableObject.-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.google.common.base.SplitterThe splitter for splitting the names. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic SecurableObjectCreate the catalogSecurableObjectwith the given catalog name and privileges.static SecurableObjectofFileset(SecurableObject schema, String fileset, List<Privilege> privileges) Create the filesetSecurableObjectwith the given securable schema object, fileset name and privileges.static SecurableObjectofMetalake(String metalake, List<Privilege> privileges) Create the metalakeSecurableObjectwith the given metalake name and privileges.static SecurableObjectofModel(SecurableObject schema, String model, List<Privilege> privileges) Create the modelSecurableObjectwith the given securable schema object, model name and privileges.static SecurableObjectofSchema(SecurableObject catalog, String schema, List<Privilege> privileges) Create the schemaSecurableObjectwith the given securable catalog object, schema name and privileges.static SecurableObjectofTable(SecurableObject schema, String table, List<Privilege> privileges) Create the tableSecurableObjectwith the given securable schema object, table name and privileges.static SecurableObjectofTopic(SecurableObject schema, String topic, List<Privilege> privileges) Create the topicSecurableObjectwith the given securable schema object ,topic name and privileges.static SecurableObjectparse(String fullName, MetadataObject.Type type, List<Privilege> privileges) Create aSecurableObjectfrom the given full name.
-
Field Details
-
DOT_SPLITTER
public static final com.google.common.base.Splitter DOT_SPLITTERThe splitter for splitting the names.
-
-
Constructor Details
-
SecurableObjects
public SecurableObjects()
-
-
Method Details
-
ofMetalake
Create the metalakeSecurableObjectwith the given metalake name and privileges.- Parameters:
metalake- The metalake nameprivileges- The privileges of the metalake- Returns:
- The created metalake
SecurableObject
-
ofCatalog
Create the catalogSecurableObjectwith the given catalog name and privileges.- Parameters:
catalog- The catalog nameprivileges- The privileges of the catalog- Returns:
- The created catalog
SecurableObject
-
ofSchema
public static SecurableObject ofSchema(SecurableObject catalog, String schema, List<Privilege> privileges) Create the schemaSecurableObjectwith the given securable catalog object, schema name and privileges.- Parameters:
catalog- The catalog securable object.schema- The schema nameprivileges- The privileges of the schema- Returns:
- The created schema
SecurableObject
-
ofTable
public static SecurableObject ofTable(SecurableObject schema, String table, List<Privilege> privileges) Create the tableSecurableObjectwith the given securable schema object, table name and privileges.- Parameters:
schema- The schema securable objecttable- The table nameprivileges- The privileges of the table- Returns:
- The created table
SecurableObject
-
ofTopic
public static SecurableObject ofTopic(SecurableObject schema, String topic, List<Privilege> privileges) Create the topicSecurableObjectwith the given securable schema object ,topic name and privileges.- Parameters:
schema- The schema securable objecttopic- The topic nameprivileges- The privileges of the topic- Returns:
- The created topic
SecurableObject
-
ofFileset
public static SecurableObject ofFileset(SecurableObject schema, String fileset, List<Privilege> privileges) Create the filesetSecurableObjectwith the given securable schema object, fileset name and privileges.- Parameters:
schema- The schema securable objectfileset- The fileset nameprivileges- The privileges of the fileset- Returns:
- The created fileset
SecurableObject
-
ofModel
public static SecurableObject ofModel(SecurableObject schema, String model, List<Privilege> privileges) Create the modelSecurableObjectwith the given securable schema object, model name and privileges.- Parameters:
schema- The schema securable objectmodel- The model nameprivileges- The privileges of the fileset- Returns:
- The created model
SecurableObject
-
parse
public static SecurableObject parse(String fullName, MetadataObject.Type type, List<Privilege> privileges) Create aSecurableObjectfrom the given full name.- Parameters:
fullName- The full name of securable object.type- The securable object type.privileges- The securable object privileges.- Returns:
- The created
SecurableObject
-