Package org.apache.gravitino.policy
Interface Policy
- All Superinterfaces:
Auditable
- All Known Implementing Classes:
PolicyDTO
The interface of the policy. The policy is a set of rules that can be associated with a metadata
object. The policy can be used for data governance and so on.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceThe interface of the associated objects of the policy.static enumThe built-in policy types. -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptiondefault Policy.AssociatedObjectscomment()Get the comment of the policy.content()Get the content of the policy.booleanenabled()Whether the policy is enabled or not.Check if the policy is inherited from a parent object or not.name()Get the name of the policy.Get the type of the policy.
-
Field Details
-
BUILT_IN_TYPE_PREFIX
The prefix for built-in policy types. All built-in policy types should start with this prefix.- See Also:
-
-
Method Details
-
name
String name()Get the name of the policy.- Returns:
- The name of the policy.
-
policyType
String policyType()Get the type of the policy.- Returns:
- The type of the policy.
-
comment
String comment()Get the comment of the policy.- Returns:
- The comment of the policy.
-
enabled
boolean enabled()Whether the policy is enabled or not.- Returns:
- True if the policy is enabled, false otherwise.
-
content
PolicyContent content()Get the content of the policy.- Returns:
- The content of the policy.
-
inherited
Check if the policy is inherited from a parent object or not.Note: The return value is optional, Only when the policy is associated with a metadata object, and called from the metadata object, the return value will be present. Otherwise, it will be empty.
- Returns:
- True if the policy is inherited, false if it is owned by the object itself. Empty if the policy is not associated with any object.
-
associatedObjects
- Returns:
- The associated objects of the policy.
-