Class PermDescriptor
java.lang.Object
org.apache.derby.iapi.sql.dictionary.TupleDescriptor
org.apache.derby.iapi.sql.dictionary.PermissionsDescriptor
org.apache.derby.iapi.sql.dictionary.PermDescriptor
- All Implemented Interfaces:
Cloneable, Dependable, Provider
This class describes rows in the SYS.SYSPERMS system table, which keeps track of the
permissions that have been granted but not revoked.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringprivate booleanprivate Stringprivate Stringprivate UUIDstatic final Stringstatic final Stringstatic final StringFields inherited from class PermissionsDescriptor
oidFields inherited from interface Dependable
ACTIVATION, ALIAS, COLUMNS_IN_TABLE, COLUMNS_PERMISSION, CONGLOMERATE, CONSTRAINT, DEFAULT, FILE, HEAP, INDEX, PERM, PREPARED_STATEMENT, ROLE_GRANT, ROUTINE_PERMISSION, SCHEMA, SEQUENCE, STORED_PREPARED_STATEMENT, TABLE, TABLE_PERMISSION, TRIGGER, VIEW -
Constructor Summary
ConstructorsConstructorDescriptionPermDescriptor(DataDictionary dd, UUID permUUID) PermDescriptor(DataDictionary dataDictionary, UUID permUUID, String objectType, UUID permObjectId, String permission, String grantor, String grantee, boolean isGrantable) Constructor -
Method Summary
Modifier and TypeMethodDescriptionbooleancheckOwner(String authorizationId) This method checks if the passed authorization id is same as the owner of the object on which this permission is defined.booleanintGet the provider's type.Get an object which can be written to disk and which, when read from disk, will find or reconstruct this in-memory Dependable.Return the name of this Provider.static PrivilegedSQLObjectgetProtectedObject(DataDictionary dd, UUID objectID, String objectType) Get the protected object.inthashCode()booleantoString()Methods inherited from class PermissionsDescriptor
clone, getGrantee, getGrantor, getObjectID, getUUID, isPersistent, keyEquals, keyHashCode, setGrantee, setUUIDMethods inherited from class TupleDescriptor
getColumnDependableFinder, getDataDictionary, getDependableFinder, getDescriptorName, getDescriptorType, setDataDictionaryMethods inherited from interface Dependable
getObjectID, isPersistent
-
Field Details
-
SEQUENCE_TYPE
- See Also:
-
UDT_TYPE
- See Also:
-
AGGREGATE_TYPE
- See Also:
-
USAGE_PRIV
- See Also:
-
objectType
-
permObjectId
-
permission
-
grantable
private boolean grantable
-
-
Constructor Details
-
PermDescriptor
public PermDescriptor(DataDictionary dataDictionary, UUID permUUID, String objectType, UUID permObjectId, String permission, String grantor, String grantee, boolean isGrantable) Constructor- Parameters:
dataDictionary- data dictionarypermUUID- unique identification in time and space of this perm descriptorobjectType- E.g., SEQUENCE_TYPEpermObjectId- Unique id of the object being protectedpermission- E.g., USAGE_PRIVgrantor- Authorization id which confers the privilegegrantee- Authorization id which receives the privilegeisGrantable- True if the privilege can be granted onwards
-
PermDescriptor
- Throws:
StandardException
-
-
Method Details
-
getObjectType
-
getPermObjectId
-
getPermission
-
isGrantable
public boolean isGrantable() -
getCatalogNumber
public int getCatalogNumber()- Specified by:
getCatalogNumberin classPermissionsDescriptor
-
toString
-
equals
-
hashCode
-
checkOwner
Description copied from class:PermissionsDescriptorThis method checks if the passed authorization id is same as the owner of the object on which this permission is defined. This method gets called by create view/constraint/trigger to see if this permission needs to be saved in dependency system for the view/constraint/trigger. If the same user is the owner of the the object being accessed and the newly created object, then no need to keep this privilege dependency- Specified by:
checkOwnerin classPermissionsDescriptor- Returns:
- boolean If passed authorization id is owner of the table
- Throws:
StandardException- See Also:
-
getProtectedObject
public static PrivilegedSQLObject getProtectedObject(DataDictionary dd, UUID objectID, String objectType) throws StandardException Get the protected object.- Parameters:
dd- MetadataobjectID- Unique handle on the protected objectobjectType- Type of the object- Throws:
StandardException
-
getObjectName
Return the name of this Provider. (Useful for errors.)- Specified by:
getObjectNamein interfaceDependable- Returns:
- String The name of this provider.
-
getClassType
Get the provider's type.- Specified by:
getClassTypein interfaceDependable- Returns:
- char The provider's type.
-
getDependableFinder
Description copied from interface:DependableGet an object which can be written to disk and which, when read from disk, will find or reconstruct this in-memory Dependable.- Specified by:
getDependableFinderin interfaceDependable- Returns:
- the stored form of this provider
- See Also:
-