Package org.apache.gravitino.policy
Class PolicyContents
java.lang.Object
org.apache.gravitino.policy.PolicyContents
Utility class for creating instances of
PolicyContent
.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
A custom content implementation ofPolicyContent
that holds custom rules and properties. -
Method Summary
Modifier and TypeMethodDescriptionstatic PolicyContent
custom
(Map<String, Object> rules, Set<MetadataObject.Type> supportedObjectTypes, Map<String, String> properties) Creates a custom policy content with the given rules and properties.
-
Method Details
-
custom
public static PolicyContent custom(Map<String, Object> rules, Set<MetadataObject.Type> supportedObjectTypes, Map<String, String> properties) Creates a custom policy content with the given rules and properties.- Parameters:
rules
- The custom rules of the policy.supportedObjectTypes
- The set of metadata object types that the policy can be applied to.properties
- The additional properties of the policy.- Returns:
- A new instance of
PolicyContent
with the specified rules and properties.
-