public class ApiTypeMapper extends Object implements IApiTypeMapper, ResourcePropertyKeys
IApiTypeMapper.IApiGroup, IApiTypeMapper.IVersionedApiResource, IApiTypeMapper.IVersionedTypeAPI_GROUPS_API, DOT, FWD_SLASH, KUBE_API, OS_APIANNOTATIONS, APIVERSION, CREATION_TIMESTAMP, FROM, GROUP, KIND, LABELS, METADATA, METADATA_NAME, METADATA_NAMESPACE, METADATA_RESOURCE_VERSION, METADATA_UID, NAME, NAMESPACE, OBJECTS, PORTS, PROTOCOL, RESOURCE_VERSION, TYPE, VALUE, VERBS, VERSION| Constructor and Description |
|---|
ApiTypeMapper(String baseUrl,
okhttp3.OkHttpClient client,
IAuthorizationContext authorizationContext) |
| Modifier and Type | Method and Description |
|---|---|
IApiTypeMapper.IVersionedApiResource |
getEndpointFor(String apiVersion,
String kind)
return the versioned endpoint for the given kind
|
String[] |
getNameAndCapability(org.jboss.dmr.ModelNode node) |
String |
getPreferedVersionFor(String endpoint) |
IApiTypeMapper.IVersionedType |
getType(String apiVersion,
String kind)
Get the type information best matching the version and kind arguments
|
boolean |
isSupported(IResource resource)
Using the kind and apiVersion, determine if the cluster is able to consume
the given resource
|
boolean |
isSupported(String kind)
Using the kind determine if the cluster is able to consume the given resource
|
boolean |
isSupported(String version,
String kind)
Using the kind and apiVersion, determine if the cluster is able to consume
the given resource
|
public ApiTypeMapper(String baseUrl, okhttp3.OkHttpClient client, IAuthorizationContext authorizationContext)
public String getPreferedVersionFor(String endpoint)
getPreferedVersionFor in interface IApiTypeMapperpublic boolean isSupported(IResource resource)
IApiTypeMapperisSupported in interface IApiTypeMapperpublic boolean isSupported(String kind)
IApiTypeMapperisSupported in interface IApiTypeMapperkind - the resource kindpublic boolean isSupported(String version, String kind)
IApiTypeMapperisSupported in interface IApiTypeMapperversion - the apiVersion, null or empty is best guesskind - the resource kindpublic IApiTypeMapper.IVersionedApiResource getEndpointFor(String apiVersion, String kind)
IApiTypeMappergetEndpointFor in interface IApiTypeMapperpublic IApiTypeMapper.IVersionedType getType(String apiVersion, String kind)
IApiTypeMappergetType in interface IApiTypeMapperapiVersion - the optional version (with or without group)kind - the type kindpublic String[] getNameAndCapability(org.jboss.dmr.ModelNode node)
Copyright © 2020 Red Hat, Inc. All Rights Reserved.