public abstract class BaseApiMetadata extends Object implements ApiMetadata
ApiMetadata
to be extended by those
implementing ApiMetadata.
(Note: This class must be abstract to allow ServiceLoader
to work properly.Modifier and Type | Class and Description |
---|---|
static class |
BaseApiMetadata.Builder |
Modifier and Type | Field and Description |
---|---|
protected com.google.common.base.Optional<String> |
buildVersion |
protected com.google.common.reflect.TypeToken<? extends Context> |
context |
protected com.google.common.base.Optional<String> |
credentialName |
protected com.google.common.base.Optional<String> |
defaultCredential |
protected com.google.common.base.Optional<String> |
defaultEndpoint |
protected com.google.common.base.Optional<String> |
defaultIdentity |
protected Set<Class<? extends com.google.inject.Module>> |
defaultModules |
protected Properties |
defaultProperties |
protected URI |
documentation |
protected String |
endpointName |
protected String |
id |
protected String |
identityName |
protected String |
name |
protected String |
version |
protected Set<com.google.common.reflect.TypeToken<? extends View>> |
views |
Modifier | Constructor and Description |
---|---|
protected |
BaseApiMetadata(BaseApiMetadata.Builder builder) |
|
BaseApiMetadata(String id,
String name,
Set<com.google.common.reflect.TypeToken<? extends View>> views,
String endpointName,
String identityName,
com.google.common.base.Optional<String> credentialName,
String version,
com.google.common.base.Optional<String> buildVersion,
com.google.common.base.Optional<String> defaultEndpoint,
com.google.common.base.Optional<String> defaultIdentity,
com.google.common.base.Optional<String> defaultCredential,
Properties defaultProperties,
URI documentation,
com.google.common.reflect.TypeToken<? extends Context> context,
Set<Class<? extends com.google.inject.Module>> defaultModules) |
Modifier and Type | Method and Description |
---|---|
static Properties |
defaultProperties() |
boolean |
equals(Object o) |
com.google.common.base.Optional<String> |
getBuildVersion()
Explicitly identifies the build that the server jclouds connects to is
running.
|
com.google.common.reflect.TypeToken<? extends Context> |
getContext() |
com.google.common.base.Optional<String> |
getCredentialName()
Note: if the api doesn't need a credential, this will return absent.
|
com.google.common.base.Optional<String> |
getDefaultCredential()
Explicitly sets the secret, which when combined with the identity, will
create an authenticated subject or session
|
com.google.common.base.Optional<String> |
getDefaultEndpoint()
Explicitly identifies the most top-level endpoint to a service provider.
|
com.google.common.base.Optional<String> |
getDefaultIdentity()
Explicitly identifies the login identity into a provider
|
Set<Class<? extends com.google.inject.Module>> |
getDefaultModules()
Modules that configure dependency injection for this context
|
Properties |
getDefaultProperties()
Configuration Properties used when creating connections to this api
|
URI |
getDocumentation() |
String |
getEndpointName()
The
endpointName helps the user supply the correct data when
prompted. |
String |
getId() |
String |
getIdentityName() |
String |
getName() |
String |
getVersion()
Explicitly identifies the version of an api.
|
Set<com.google.common.reflect.TypeToken<? extends View>> |
getViews() |
int |
hashCode() |
protected com.google.common.base.Objects.ToStringHelper |
string() |
BaseApiMetadata.Builder |
toBuilder() |
String |
toString() |
protected final String id
protected final String name
protected final String endpointName
protected final String identityName
protected final com.google.common.base.Optional<String> credentialName
protected final String version
protected final com.google.common.base.Optional<String> buildVersion
protected final com.google.common.base.Optional<String> defaultEndpoint
protected final com.google.common.base.Optional<String> defaultIdentity
protected final com.google.common.base.Optional<String> defaultCredential
protected final Properties defaultProperties
protected final URI documentation
protected final com.google.common.reflect.TypeToken<? extends Context> context
protected BaseApiMetadata(BaseApiMetadata.Builder builder)
public BaseApiMetadata(String id, String name, Set<com.google.common.reflect.TypeToken<? extends View>> views, String endpointName, String identityName, com.google.common.base.Optional<String> credentialName, String version, com.google.common.base.Optional<String> buildVersion, com.google.common.base.Optional<String> defaultEndpoint, com.google.common.base.Optional<String> defaultIdentity, com.google.common.base.Optional<String> defaultCredential, Properties defaultProperties, URI documentation, com.google.common.reflect.TypeToken<? extends Context> context, Set<Class<? extends com.google.inject.Module>> defaultModules)
public static Properties defaultProperties()
protected com.google.common.base.Objects.ToStringHelper string()
public String getId()
getId
in interface ApiMetadata
public String getName()
getName
in interface ApiMetadata
public Set<com.google.common.reflect.TypeToken<? extends View>> getViews()
getViews
in interface ApiMetadata
BlobStoreContext
public String getEndpointName()
endpointName
helps the user supply the correct data when
prompted.
For example, on OpenStack APIs, this could be: Keystone url
Path of byon.yaml
Default: "https endpoint"
getEndpointName
in interface ApiMetadata
public String getIdentityName()
getIdentityName
in interface ApiMetadata
public com.google.common.base.Optional<String> getCredentialName()
getCredentialName
in interface ApiMetadata
public String getVersion()
getVersion
in interface ApiMetadata
public com.google.common.base.Optional<String> getBuildVersion()
4.1.8
while
the build version is 4.1.8r75467
. Or a vcloud endpoint may be api
version 1.0
while the build is 1.5.0.0.124312
getBuildVersion
in interface ApiMetadata
public com.google.common.base.Optional<String> getDefaultEndpoint()
String
as we permit endpoints that require
variable expansion.
ex.
https://${jclouds.identity}.blob.core.windows.net
getDefaultEndpoint
in interface ApiMetadata
public com.google.common.base.Optional<String> getDefaultIdentity()
getDefaultIdentity
in interface ApiMetadata
public com.google.common.base.Optional<String> getDefaultCredential()
getDefaultCredential
in interface ApiMetadata
ApiMetadata.getDefaultIdentity()
,
ApiMetadata.getCredentialName()
public Properties getDefaultProperties()
getDefaultProperties
in interface ApiMetadata
public URI getDocumentation()
getDocumentation
in interface ApiMetadata
public com.google.common.reflect.TypeToken<? extends Context> getContext()
getContext
in interface ApiMetadata
RestContext<EC2Client, EC2AsyncClient>
public Set<Class<? extends com.google.inject.Module>> getDefaultModules()
getDefaultModules
in interface ApiMetadata
public BaseApiMetadata.Builder toBuilder()
toBuilder
in interface ApiMetadata
ApiMetadata.Builder
Copyright © 2009-2013 jclouds. All Rights Reserved.