Class FieldPolicy
java.lang.Object
com.kazforge.jsonapi.representation.FieldPolicy
Application allow-list over
(resourceType, fieldName) pairs for sparse fieldsets.
Policy is consulted only for names in a present fieldset entry. A present empty fieldset list selects no attributes/relationships and does not consult per-field allows; non-field resource members such as mapped resource meta remain independent.
-
Method Summary
Modifier and TypeMethodDescriptionstatic FieldPolicyallowAll()Permits every mapped fieldset field name.static FieldPolicyallowing(Set<FieldAllowance> allowances) Permits only the given owner-type + field allowances.booleanReturns whether a present fieldset may includefieldNameon a resource whose JSON:API type isresourceType.static FieldPolicydenyAll()Rejects every fieldset field name.booleaninthashCode()
-
Method Details
-
denyAll
Rejects every fieldset field name. -
allowAll
Permits every mapped fieldset field name. -
allowing
Permits only the given owner-type + field allowances. The allowance set is defensively copied. -
allows
Returns whether a present fieldset may includefieldNameon a resource whose JSON:API type isresourceType. -
equals
-
hashCode
public int hashCode()
-