Package org.apache.gravitino.policy
Interface PolicyChange
- All Known Implementing Classes:
PolicyChange.RenamePolicy
,PolicyChange.UpdateContent
,PolicyChange.UpdatePolicyComment
Interface for supporting policy changes. This interface will be used to provide policy
modification operations for each policy.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final class
A policy change to rename the policy.static final class
A policy change to update the content of the policy.static final class
Creates a new policy change to update the comment of the policy. -
Method Summary
Static MethodsModifier and TypeMethodDescriptionstatic PolicyChange
Creates a new policy change to rename the policy.static PolicyChange
updateComment
(String newComment) Creates a new policy change to update the policy comment.static PolicyChange
updateContent
(String policyType, PolicyContent content) Creates a new policy change to update the content of the policy.
-
Method Details
-
rename
Creates a new policy change to rename the policy.- Parameters:
newName
- The new name of the policy.- Returns:
- The policy change.
-
updateComment
Creates a new policy change to update the policy comment.- Parameters:
newComment
- The new comment for the policy.- Returns:
- The policy change.
-
updateContent
Creates a new policy change to update the content of the policy.- Parameters:
policyType
- The type of the policy, used for validation.content
- The new content for the policy.- Returns:
- The policy change.
-