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.Splitter
The splitter for splitting the names. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic SecurableObject
Create the catalogSecurableObject
with the given catalog name and privileges.static SecurableObject
ofFileset
(SecurableObject schema, String fileset, List<Privilege> privileges) Create the filesetSecurableObject
with the given securable schema object, fileset name and privileges.static SecurableObject
ofMetalake
(String metalake, List<Privilege> privileges) Create the metalakeSecurableObject
with the given metalake name and privileges.static SecurableObject
ofModel
(SecurableObject schema, String model, List<Privilege> privileges) Create the modelSecurableObject
with the given securable schema object, model name and privileges.static SecurableObject
ofSchema
(SecurableObject catalog, String schema, List<Privilege> privileges) Create the schemaSecurableObject
with the given securable catalog object, schema name and privileges.static SecurableObject
ofTable
(SecurableObject schema, String table, List<Privilege> privileges) Create the tableSecurableObject
with the given securable schema object, table name and privileges.static SecurableObject
ofTopic
(SecurableObject schema, String topic, List<Privilege> privileges) Create the topicSecurableObject
with the given securable schema object ,topic name and privileges.static SecurableObject
parse
(String fullName, MetadataObject.Type type, List<Privilege> privileges) Create aSecurableObject
from 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 metalakeSecurableObject
with the given metalake name and privileges.- Parameters:
metalake
- The metalake nameprivileges
- The privileges of the metalake- Returns:
- The created metalake
SecurableObject
-
ofCatalog
Create the catalogSecurableObject
with 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 schemaSecurableObject
with 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 tableSecurableObject
with 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 topicSecurableObject
with 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 filesetSecurableObject
with 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 modelSecurableObject
with 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 aSecurableObject
from 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
-