Class PreferenceAppliedHeaderEmitter
java.lang.Object
org.gcube.informationsystem.resourceregistry.http.headers.preference.PreferenceAppliedHeaderEmitter
Emits the
Preference-Applied header for the honored OperationReturn
preference of an Operation Envelope response.
Unlike X-Warning (open-ended cardinality) and X-Result-Scope (a bounded
set of tokens), exactly one OperationReturn ever applies per request, so there is
nothing to combine - this mirrors ResultScopeHeaderEmitter's shape without the
multi-value handling.
- Author:
- Luca Frosini (ISTI - CNR)
-
Method Summary
Modifier and TypeMethodDescriptionstatic voidaddPreferenceAppliedHeader(jakarta.ws.rs.core.MultivaluedMap<String, Object> headers, org.gcube.informationsystem.resourceregistry.api.rest.OperationReturn operationReturn) Emits thePreference-Appliedheader into the given JAX-RS multivalued map, if present.static voidaddPreferenceAppliedHeader(jakarta.ws.rs.core.Response.ResponseBuilder rb, org.gcube.informationsystem.resourceregistry.api.rest.OperationReturn operationReturn) Emits thePreference-Appliedheader into the given response builder, if present.
-
Method Details
-
addPreferenceAppliedHeader
public static void addPreferenceAppliedHeader(jakarta.ws.rs.core.Response.ResponseBuilder rb, org.gcube.informationsystem.resourceregistry.api.rest.OperationReturn operationReturn) Emits thePreference-Appliedheader into the given response builder, if present.- Parameters:
rb- the response builder to add the header tooperationReturn- the honored operation-return preference, ornull
-
addPreferenceAppliedHeader
public static void addPreferenceAppliedHeader(jakarta.ws.rs.core.MultivaluedMap<String, Object> headers, org.gcube.informationsystem.resourceregistry.api.rest.OperationReturn operationReturn) Emits thePreference-Appliedheader into the given JAX-RS multivalued map, if present.- Parameters:
headers- the multivalued headers map to add the header tooperationReturn- the honored operation-return preference, ornull
-