public enum SqlGatewayRestAPIVersion extends Enum<SqlGatewayRestAPIVersion> implements RestAPIVersion<SqlGatewayRestAPIVersion>, EndpointVersion
Sql Gateway REST API versions are global and thus apply to every REST component.
Changes that must result in an API version increment include but are not limited to: - modification of a handler url - addition of new mandatory parameters - removal of a handler/request - modifications to request/response bodies (excluding additions)
Modifier and Type | Method and Description |
---|---|
static SqlGatewayRestAPIVersion |
fromURIToVersion(String uri)
Convert uri to SqlGatewayRestAPIVersion.
|
static SqlGatewayRestAPIVersion |
getDefaultVersion()
Returns the default version.
|
static List<SqlGatewayRestAPIVersion> |
getStableVersions()
Returns the supported stable versions.
|
String |
getURLVersionPrefix()
Returns the URL version prefix (e.g.
|
boolean |
isDefaultVersion()
Returns whether this version is the default REST API version.
|
boolean |
isStableVersion()
Returns whether this version is considered stable.
|
static SqlGatewayRestAPIVersion |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static SqlGatewayRestAPIVersion[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
getLatestVersion
compareTo
public static final SqlGatewayRestAPIVersion V0
public static final SqlGatewayRestAPIVersion V1
public static final SqlGatewayRestAPIVersion V2
public static SqlGatewayRestAPIVersion[] values()
for (SqlGatewayRestAPIVersion c : SqlGatewayRestAPIVersion.values()) System.out.println(c);
public static SqlGatewayRestAPIVersion valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic String getURLVersionPrefix()
getURLVersionPrefix
in interface RestAPIVersion<SqlGatewayRestAPIVersion>
public boolean isDefaultVersion()
isDefaultVersion
in interface RestAPIVersion<SqlGatewayRestAPIVersion>
public boolean isStableVersion()
isStableVersion
in interface RestAPIVersion<SqlGatewayRestAPIVersion>
public static SqlGatewayRestAPIVersion fromURIToVersion(String uri)
public static List<SqlGatewayRestAPIVersion> getStableVersions()
public static SqlGatewayRestAPIVersion getDefaultVersion()
Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.