org.jclouds.trmk.ecloud.TerremarkECloudApiMetadata Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of trmk-ecloud Show documentation
Show all versions of trmk-ecloud Show documentation
jclouds Terremark Enterprise Cloud provider
package org.jclouds.trmk.ecloud;
import static org.jclouds.trmk.vcloud_0_8.reference.TerremarkConstants.PROPERTY_TERREMARK_EXTENSION_NAME;
import static org.jclouds.trmk.vcloud_0_8.reference.TerremarkConstants.PROPERTY_TERREMARK_EXTENSION_VERSION;
import java.net.URI;
import java.util.Properties;
import org.jclouds.apis.ApiMetadata;
import org.jclouds.rest.RestContext;
import org.jclouds.trmk.ecloud.compute.config.TerremarkECloudComputeServiceContextModule;
import org.jclouds.trmk.ecloud.config.TerremarkECloudRestClientModule;
import org.jclouds.trmk.vcloud_0_8.internal.TerremarkVCloudApiMetadata;
import com.google.common.collect.ImmutableSet;
import com.google.common.reflect.TypeToken;
import com.google.inject.Module;
/**
* Implementation of {@link ApiMetadata} for Terremark eCloud v2.8 API
*
* @author Adrian Cole
*/
public class TerremarkECloudApiMetadata extends TerremarkVCloudApiMetadata {
/** The serialVersionUID */
private static final long serialVersionUID = -6212626084139698761L;
public static final TypeToken> CONTEXT_TOKEN = new TypeToken>() {
private static final long serialVersionUID = -5070937833892503232L;
};
@Override
public Builder toBuilder() {
return new Builder().fromApiMetadata(this);
}
public TerremarkECloudApiMetadata() {
this(new Builder());
}
protected TerremarkECloudApiMetadata(Builder builder) {
super(builder);
}
public static Properties defaultProperties() {
Properties properties = TerremarkVCloudApiMetadata.defaultProperties();
properties.setProperty(PROPERTY_TERREMARK_EXTENSION_NAME, "eCloudExtensions");
properties.setProperty(PROPERTY_TERREMARK_EXTENSION_VERSION, "2.8");
return properties;
}
public static class Builder extends TerremarkVCloudApiMetadata.Builder {
protected Builder() {
super(TerremarkECloudClient.class, TerremarkECloudAsyncClient.class);
id("trmk-ecloud")
.name("Terremark Enterprise Cloud v2.8 API")
.version("0.8b-ext2.8")
.defaultEndpoint("https://services.enterprisecloud.terremark.com/api")
.documentation(URI.create("http://support.theenterprisecloud.com/kb/default.asp?id=533&Lang=1&SID="))
.defaultProperties(TerremarkECloudApiMetadata.defaultProperties())
.defaultModules(ImmutableSet.>of(TerremarkECloudRestClientModule.class, TerremarkECloudComputeServiceContextModule.class));
}
@Override
public TerremarkECloudApiMetadata build() {
return new TerremarkECloudApiMetadata(this);
}
@Override
public Builder fromApiMetadata(ApiMetadata in) {
super.fromApiMetadata(in);
return this;
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy