public class ApiVersionRouterContext extends AbstractContext
Context which is created when a request is and has been routed
based on resource API version. The context includes:
data| Constructor and Description |
|---|
ApiVersionRouterContext(Context parent,
DefaultVersionBehaviour defaultVersionBehaviour,
boolean warningEnabled)
Creates a new resource API version routing context having the provided
parent, default versioning behaviour and whether warnings will be
issued.
|
ApiVersionRouterContext(JsonValue savedContext,
ClassLoader classLoader)
Restore from JSON representation.
|
| Modifier and Type | Method and Description |
|---|---|
DefaultVersionBehaviour |
getDefaultVersionBehaviour()
Gets the default version behaviour if the request does not contain a
resource API version.
|
Version |
getProtocolVersion()
Gets the protocol API version of the framework used to handle the request.
|
Version |
getResourceVersion()
Gets the API version of the resource that the request was routed to.
|
boolean |
isWarningEnabled()
Gets whether a warning should be issued to the calling client if the
request does not contain a resource API version.
|
void |
setProtocolVersion(Version protocolVersion)
Sets the protocol API version of the framework used to handle the request.
|
asContext, containsContext, containsContext, getContext, getContextName, getId, getParent, isRootContext, toJsonValue, toStringpublic ApiVersionRouterContext(Context parent, DefaultVersionBehaviour defaultVersionBehaviour, boolean warningEnabled)
parent - The parent context.defaultVersionBehaviour - The default version behaviour.warningEnabled - Whether warnings will be issued to the client.public ApiVersionRouterContext(JsonValue savedContext, ClassLoader classLoader)
savedContext - The JSON representation from which this context's
attributes should be parsed.classLoader - The ClassLoader which can properly resolve
the persisted class-name.public DefaultVersionBehaviour getDefaultVersionBehaviour()
public boolean isWarningEnabled()
true if warnings should be issued to the client.public void setProtocolVersion(Version protocolVersion)
protocolVersion - The framework protocol API version.public Version getProtocolVersion()
public Version getResourceVersion()
Copyright © 2025 Open Identity Platform Community. All rights reserved.