Class PolicyUpdateRequest.UpdatePolicyContentRequest
java.lang.Object
org.apache.gravitino.dto.requests.PolicyUpdateRequest.UpdatePolicyContentRequest
- All Implemented Interfaces:
PolicyUpdateRequest
,RESTMessage
,RESTRequest
- Enclosing interface:
- PolicyUpdateRequest
public static class PolicyUpdateRequest.UpdatePolicyContentRequest
extends Object
implements PolicyUpdateRequest
The policy update request for updating a policy content.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.gravitino.dto.requests.PolicyUpdateRequest
PolicyUpdateRequest.RenamePolicyRequest, PolicyUpdateRequest.UpdatePolicyCommentRequest, PolicyUpdateRequest.UpdatePolicyContentRequest
-
Constructor Summary
ConstructorsConstructorDescriptionUpdatePolicyContentRequest
(String policyType, PolicyContentDTO newContent) Creates a new UpdatePolicyContentRequest. -
Method Summary
Modifier and TypeMethodDescriptionReturns the policy change.void
validate()
Ensures that a constructed instance of a REST message is valid according to the REST spec.
-
Constructor Details
-
UpdatePolicyContentRequest
Creates a new UpdatePolicyContentRequest.- Parameters:
policyType
- The type of the policy, used for validation and serialization. This should match the type of the content being updated.newContent
- The new content of the policy.
-
-
Method Details
-
policyChange
Description copied from interface:PolicyUpdateRequest
Returns the policy change.- Specified by:
policyChange
in interfacePolicyUpdateRequest
- Returns:
- the policy change.
-
validate
Description copied from interface:RESTMessage
Ensures that a constructed instance of a REST message is valid according to the REST spec.This is needed when parsing data that comes from external sources and the object might have been constructed without all the required fields present.
- Specified by:
validate
in interfaceRESTMessage
- Throws:
IllegalArgumentException
-