From 636dafe1d3ef669c13e1e76756bcf97a42e953cb Mon Sep 17 00:00:00 2001 From: Jason King Date: Thu, 24 Nov 2011 17:05:59 +0000 Subject: [PATCH] Issue 695: Added Template, TemplateStorage,Template*Client, JAXB Test and Test files --- .../domain/template/Template.java | 301 ++++++++++++++++++ .../domain/template/TemplateStorage.java | 122 +++++++ .../features/TemplateAsyncClient.java | 53 +++ .../features/TemplateClient.java | 47 +++ .../features/TemplateAsyncClientTest.java | 61 ++++ .../xml/TemplateJAXBParsingTest.java | 162 ++++++++++ .../src/test/resources/template.xml | 46 +++ .../src/test/resources/templates.xml | 55 ++++ 8 files changed, 847 insertions(+) create mode 100644 sandbox-providers/tmrk-enterprisecloud/src/main/java/org/jclouds/tmrk/enterprisecloud/domain/template/Template.java create mode 100644 sandbox-providers/tmrk-enterprisecloud/src/main/java/org/jclouds/tmrk/enterprisecloud/domain/template/TemplateStorage.java create mode 100644 sandbox-providers/tmrk-enterprisecloud/src/main/java/org/jclouds/tmrk/enterprisecloud/features/TemplateAsyncClient.java create mode 100644 sandbox-providers/tmrk-enterprisecloud/src/main/java/org/jclouds/tmrk/enterprisecloud/features/TemplateClient.java create mode 100644 sandbox-providers/tmrk-enterprisecloud/src/test/java/org/jclouds/tmrk/enterprisecloud/features/TemplateAsyncClientTest.java create mode 100644 sandbox-providers/tmrk-enterprisecloud/src/test/java/org/jclouds/tmrk/enterprisecloud/xml/TemplateJAXBParsingTest.java create mode 100644 sandbox-providers/tmrk-enterprisecloud/src/test/resources/template.xml create mode 100644 sandbox-providers/tmrk-enterprisecloud/src/test/resources/templates.xml diff --git a/sandbox-providers/tmrk-enterprisecloud/src/main/java/org/jclouds/tmrk/enterprisecloud/domain/template/Template.java b/sandbox-providers/tmrk-enterprisecloud/src/main/java/org/jclouds/tmrk/enterprisecloud/domain/template/Template.java new file mode 100644 index 0000000000..643b7122c4 --- /dev/null +++ b/sandbox-providers/tmrk-enterprisecloud/src/main/java/org/jclouds/tmrk/enterprisecloud/domain/template/Template.java @@ -0,0 +1,301 @@ +/** + * Licensed to jclouds, Inc. (jclouds) under one or more + * contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. jclouds licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.jclouds.tmrk.enterprisecloud.domain.template; + +import org.jclouds.javax.annotation.Nullable; +import org.jclouds.tmrk.enterprisecloud.domain.ConfigurationOptionRange; +import org.jclouds.tmrk.enterprisecloud.domain.CustomizationOption; +import org.jclouds.tmrk.enterprisecloud.domain.Links; +import org.jclouds.tmrk.enterprisecloud.domain.ResourceCapacityRange; +import org.jclouds.tmrk.enterprisecloud.domain.internal.BaseNamedResource; +import org.jclouds.tmrk.enterprisecloud.domain.internal.BaseResource; +import org.jclouds.tmrk.enterprisecloud.domain.software.OperatingSystem; + +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlRootElement; +import java.net.URI; + +/** + * + * @author Jason King + * + */ +@XmlRootElement(name = "Template") +public class Template extends BaseNamedResource