Issue 695: Removed @XmlRootElement from internal objects as not needed

This commit is contained in:
Jason King 2011-11-18 10:10:32 +00:00
parent f69d3da354
commit 2c12a26fe5
15 changed files with 13 additions and 46 deletions

View File

@ -18,13 +18,6 @@
*/ */
package org.jclouds.tmrk.enterprisecloud.domain; package org.jclouds.tmrk.enterprisecloud.domain;
import static com.google.common.base.CaseFormat.LOWER_CAMEL;
import static com.google.common.base.CaseFormat.UPPER_UNDERSCORE;
import static com.google.common.base.Preconditions.checkNotNull;
import java.net.URI;
import java.util.Map;
import org.jclouds.javax.annotation.Nullable; import org.jclouds.javax.annotation.Nullable;
import org.jclouds.tmrk.enterprisecloud.domain.internal.BaseNamedResource; import org.jclouds.tmrk.enterprisecloud.domain.internal.BaseNamedResource;
import org.jclouds.tmrk.enterprisecloud.domain.internal.BaseResource; import org.jclouds.tmrk.enterprisecloud.domain.internal.BaseResource;
@ -32,14 +25,18 @@ import org.jclouds.tmrk.enterprisecloud.domain.internal.BaseResource;
import javax.xml.bind.annotation.XmlAttribute; import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlEnum; import javax.xml.bind.annotation.XmlEnum;
import javax.xml.bind.annotation.XmlEnumValue; import javax.xml.bind.annotation.XmlEnumValue;
import javax.xml.bind.annotation.XmlRootElement; import java.net.URI;
import java.util.Map;
import static com.google.common.base.CaseFormat.LOWER_CAMEL;
import static com.google.common.base.CaseFormat.UPPER_UNDERSCORE;
import static com.google.common.base.Preconditions.checkNotNull;
/** /**
* *
* @author Adrian Cole * @author Adrian Cole
* *
*/ */
@XmlRootElement(name = "Action")
public class Action extends BaseNamedResource<Action> { public class Action extends BaseNamedResource<Action> {
@XmlEnum @XmlEnum
public static enum ActionDisabled { public static enum ActionDisabled {

View File

@ -21,7 +21,6 @@ package org.jclouds.tmrk.enterprisecloud.domain;
import com.google.common.collect.Sets; import com.google.common.collect.Sets;
import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import java.util.Collections; import java.util.Collections;
import java.util.LinkedHashSet; import java.util.LinkedHashSet;
import java.util.Set; import java.util.Set;
@ -33,7 +32,6 @@ import static com.google.common.base.Preconditions.checkNotNull;
* Needed because parsing is done with JAXB and it does not handle Generic collections * Needed because parsing is done with JAXB and it does not handle Generic collections
* @author Jason King * @author Jason King
*/ */
@XmlRootElement(name = "Actions")
public class Actions { public class Actions {
private LinkedHashSet<Action> actions = Sets.newLinkedHashSet(); private LinkedHashSet<Action> actions = Sets.newLinkedHashSet();

View File

@ -21,7 +21,6 @@ package org.jclouds.tmrk.enterprisecloud.domain;
import com.google.common.collect.Sets; import com.google.common.collect.Sets;
import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import java.util.Collections; import java.util.Collections;
import java.util.LinkedHashSet; import java.util.LinkedHashSet;
import java.util.Set; import java.util.Set;
@ -33,7 +32,6 @@ import static com.google.common.base.Preconditions.checkNotNull;
* Needed because parsing is done with JAXB and it does not handle Generic collections * Needed because parsing is done with JAXB and it does not handle Generic collections
* @author Jason King * @author Jason King
*/ */
@XmlRootElement(name = "Disks")
public class Disks { public class Disks {
private LinkedHashSet<VirtualDisk> disks = Sets.newLinkedHashSet(); private LinkedHashSet<VirtualDisk> disks = Sets.newLinkedHashSet();

View File

@ -20,12 +20,9 @@ package org.jclouds.tmrk.enterprisecloud.domain;
import org.jclouds.tmrk.enterprisecloud.domain.internal.BaseNamedResource; import org.jclouds.tmrk.enterprisecloud.domain.internal.BaseNamedResource;
import javax.xml.bind.annotation.XmlRootElement;
/** /**
* @author Jason King * @author Jason King
*/ */
@XmlRootElement(name = "Group")
public class Group extends BaseNamedResource<Group> { public class Group extends BaseNamedResource<Group> {
public Group() { public Group() {

View File

@ -22,7 +22,6 @@ import org.jclouds.javax.annotation.Nullable;
import org.jclouds.tmrk.enterprisecloud.domain.internal.BaseResource; import org.jclouds.tmrk.enterprisecloud.domain.internal.BaseResource;
import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import java.net.URI; import java.net.URI;
import java.util.Collections; import java.util.Collections;
import java.util.Map; import java.util.Map;
@ -33,7 +32,6 @@ import static com.google.common.base.Preconditions.checkNotNull;
/** /**
* @author Jason King * @author Jason King
*/ */
@XmlRootElement(name = "HardwareConfiguration")
public class HardwareConfiguration extends BaseResource<HardwareConfiguration> { public class HardwareConfiguration extends BaseResource<HardwareConfiguration> {
@SuppressWarnings("unchecked") @SuppressWarnings("unchecked")

View File

@ -21,7 +21,6 @@ package org.jclouds.tmrk.enterprisecloud.domain;
import org.jclouds.javax.annotation.Nullable; import org.jclouds.javax.annotation.Nullable;
import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
/** /**
* Layout is a logical aggregation of virtual machines and physical devices defined by the organization. * Layout is a logical aggregation of virtual machines and physical devices defined by the organization.
@ -32,7 +31,6 @@ import javax.xml.bind.annotation.XmlRootElement;
* As physical devices are not allocated from the compute pool, they do not appear on compute pool layouts. * As physical devices are not allocated from the compute pool, they do not appear on compute pool layouts.
* @author Jason King * @author Jason King
*/ */
@XmlRootElement(name = "Layout")
public class Layout { public class Layout {
@XmlElement(name = "Group") @XmlElement(name = "Group")
private Group group; private Group group;

View File

@ -18,22 +18,22 @@
*/ */
package org.jclouds.tmrk.enterprisecloud.domain; package org.jclouds.tmrk.enterprisecloud.domain;
import static com.google.common.base.Preconditions.checkNotNull;
import java.net.URI;
import java.util.Map;
import org.jclouds.tmrk.enterprisecloud.domain.internal.BaseNamedResource; import org.jclouds.tmrk.enterprisecloud.domain.internal.BaseNamedResource;
import org.jclouds.tmrk.enterprisecloud.domain.internal.BaseResource; import org.jclouds.tmrk.enterprisecloud.domain.internal.BaseResource;
import javax.xml.bind.annotation.*; import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlEnum;
import javax.xml.bind.annotation.XmlEnumValue;
import java.net.URI;
import java.util.Map;
import static com.google.common.base.Preconditions.checkNotNull;
/** /**
* *
* @author Adrian Cole * @author Adrian Cole
* *
*/ */
@XmlRootElement(name = "Link")
public class Link extends BaseNamedResource<Link> { public class Link extends BaseNamedResource<Link> {
@XmlEnum @XmlEnum
public static enum Relationship { public static enum Relationship {

View File

@ -21,7 +21,6 @@ package org.jclouds.tmrk.enterprisecloud.domain;
import com.google.common.collect.Sets; import com.google.common.collect.Sets;
import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import java.util.Collections; import java.util.Collections;
import java.util.LinkedHashSet; import java.util.LinkedHashSet;
import java.util.Set; import java.util.Set;
@ -31,7 +30,6 @@ import java.util.Set;
* Needed because parsing is done with JAXB and it does not handle Generic collections * Needed because parsing is done with JAXB and it does not handle Generic collections
* @author Jason King * @author Jason King
*/ */
@XmlRootElement(name = "Links")
public class Links { public class Links {
private LinkedHashSet<Link> links = Sets.newLinkedHashSet(); private LinkedHashSet<Link> links = Sets.newLinkedHashSet();

View File

@ -20,12 +20,9 @@ package org.jclouds.tmrk.enterprisecloud.domain;
import org.jclouds.tmrk.enterprisecloud.domain.internal.ResourceCapacity; import org.jclouds.tmrk.enterprisecloud.domain.internal.ResourceCapacity;
import javax.xml.bind.annotation.XmlRootElement;
/** /**
* @author Jason King * @author Jason King
*/ */
@XmlRootElement(name = "Memory")
public class Memory extends ResourceCapacity<Memory> { public class Memory extends ResourceCapacity<Memory> {
@SuppressWarnings("unchecked") @SuppressWarnings("unchecked")

View File

@ -25,7 +25,6 @@ import org.jclouds.tmrk.enterprisecloud.domain.internal.BaseResource;
import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlEnum; import javax.xml.bind.annotation.XmlEnum;
import javax.xml.bind.annotation.XmlEnumValue; import javax.xml.bind.annotation.XmlEnumValue;
import javax.xml.bind.annotation.XmlRootElement;
import java.net.URI; import java.net.URI;
import static com.google.common.base.CaseFormat.LOWER_CAMEL; import static com.google.common.base.CaseFormat.LOWER_CAMEL;
@ -36,7 +35,6 @@ import static com.google.common.base.CaseFormat.UPPER_UNDERSCORE;
* @author Jason King * @author Jason King
* *
*/ */
@XmlRootElement(name = "Network")
public class NetworkReference extends BaseNamedResource<NetworkReference> { public class NetworkReference extends BaseNamedResource<NetworkReference> {
@XmlEnum @XmlEnum
public static enum NetworkType { public static enum NetworkType {

View File

@ -21,7 +21,6 @@ package org.jclouds.tmrk.enterprisecloud.domain;
import com.google.common.collect.Sets; import com.google.common.collect.Sets;
import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import java.util.Collections; import java.util.Collections;
import java.util.LinkedHashSet; import java.util.LinkedHashSet;
import java.util.Set; import java.util.Set;
@ -31,7 +30,6 @@ import java.util.Set;
* Needed because parsing is done with JAXB and it does not handle Generic collections * Needed because parsing is done with JAXB and it does not handle Generic collections
* @author Jason King * @author Jason King
*/ */
@XmlRootElement(name = "Nics")
public class Nics { public class Nics {
private LinkedHashSet<VirtualNic> nics = Sets.newLinkedHashSet(); private LinkedHashSet<VirtualNic> nics = Sets.newLinkedHashSet();

View File

@ -20,12 +20,9 @@ package org.jclouds.tmrk.enterprisecloud.domain;
import org.jclouds.tmrk.enterprisecloud.domain.internal.BaseNamedResource; import org.jclouds.tmrk.enterprisecloud.domain.internal.BaseNamedResource;
import javax.xml.bind.annotation.XmlRootElement;
/** /**
* @author Jason King * @author Jason King
*/ */
@XmlRootElement(name = "Row")
public class Row extends BaseNamedResource<Row> { public class Row extends BaseNamedResource<Row> {
public Row() { public Row() {
//For JAXB //For JAXB

View File

@ -20,12 +20,9 @@ package org.jclouds.tmrk.enterprisecloud.domain;
import org.jclouds.tmrk.enterprisecloud.domain.internal.ResourceCapacity; import org.jclouds.tmrk.enterprisecloud.domain.internal.ResourceCapacity;
import javax.xml.bind.annotation.XmlRootElement;
/** /**
* @author Jason King * @author Jason King
*/ */
@XmlRootElement(name = "Size")
public class Size extends ResourceCapacity<Size> { public class Size extends ResourceCapacity<Size> {
@SuppressWarnings("unchecked") @SuppressWarnings("unchecked")

View File

@ -21,12 +21,10 @@ package org.jclouds.tmrk.enterprisecloud.domain;
import org.jclouds.javax.annotation.Nullable; import org.jclouds.javax.annotation.Nullable;
import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
/** /**
* @author Jason King * @author Jason King
*/ */
@XmlRootElement(name = "Disk")
public class VirtualDisk { public class VirtualDisk {
@SuppressWarnings("unchecked") @SuppressWarnings("unchecked")

View File

@ -21,12 +21,10 @@ package org.jclouds.tmrk.enterprisecloud.domain;
import org.jclouds.javax.annotation.Nullable; import org.jclouds.javax.annotation.Nullable;
import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
/** /**
* @author Jason King * @author Jason King
*/ */
@XmlRootElement(name = "Nic")
public class VirtualNic { public class VirtualNic {
@SuppressWarnings("unchecked") @SuppressWarnings("unchecked")