From 9852a579e9d9d05566d3ad3611c6bba899cfae5a Mon Sep 17 00:00:00 2001 From: Jason King Date: Fri, 18 Nov 2011 17:56:29 +0000 Subject: [PATCH] Issue 695: Converted setAction to addAction and moved annotation to field --- .../java/org/jclouds/tmrk/enterprisecloud/domain/Actions.java | 4 ++-- .../tmrk/enterprisecloud/domain/HardwareConfiguration.java | 2 +- .../jclouds/tmrk/enterprisecloud/domain/VirtualMachine.java | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/sandbox-providers/tmrk-enterprisecloud/src/main/java/org/jclouds/tmrk/enterprisecloud/domain/Actions.java b/sandbox-providers/tmrk-enterprisecloud/src/main/java/org/jclouds/tmrk/enterprisecloud/domain/Actions.java index 9f7889c969..0e803c396f 100644 --- a/sandbox-providers/tmrk-enterprisecloud/src/main/java/org/jclouds/tmrk/enterprisecloud/domain/Actions.java +++ b/sandbox-providers/tmrk-enterprisecloud/src/main/java/org/jclouds/tmrk/enterprisecloud/domain/Actions.java @@ -34,10 +34,10 @@ import static com.google.common.base.Preconditions.checkNotNull; */ public class Actions { + @XmlElement(name = "Action") private LinkedHashSet actions = Sets.newLinkedHashSet(); - @XmlElement(name = "Action") - void setAction(Action action) { + void addAction(Action action) { checkNotNull(action,"action"); this.actions.add(action); } diff --git a/sandbox-providers/tmrk-enterprisecloud/src/main/java/org/jclouds/tmrk/enterprisecloud/domain/HardwareConfiguration.java b/sandbox-providers/tmrk-enterprisecloud/src/main/java/org/jclouds/tmrk/enterprisecloud/domain/HardwareConfiguration.java index 83d7247004..cb8193383d 100644 --- a/sandbox-providers/tmrk-enterprisecloud/src/main/java/org/jclouds/tmrk/enterprisecloud/domain/HardwareConfiguration.java +++ b/sandbox-providers/tmrk-enterprisecloud/src/main/java/org/jclouds/tmrk/enterprisecloud/domain/HardwareConfiguration.java @@ -162,7 +162,7 @@ public class HardwareConfiguration extends BaseResource { private Nics virtualNics = new Nics(); public HardwareConfiguration(Set actions, int processorCount, @Nullable Memory memory, Set virtualDisks, Set virtualNics) { - for( Action action: checkNotNull(actions, "actions")) this.actions.setAction(action); + for( Action action: checkNotNull(actions, "actions")) this.actions.addAction(action); for( VirtualDisk disk: checkNotNull(virtualDisks, "virtualDisks")) this.virtualDisks.setVirtualDisk(disk); for( VirtualNic virtualNic: checkNotNull(virtualNics, "virtualNics")) this.virtualNics.setVirtualNic(virtualNic); diff --git a/sandbox-providers/tmrk-enterprisecloud/src/main/java/org/jclouds/tmrk/enterprisecloud/domain/VirtualMachine.java b/sandbox-providers/tmrk-enterprisecloud/src/main/java/org/jclouds/tmrk/enterprisecloud/domain/VirtualMachine.java index 98eb3ba394..93e24ce748 100644 --- a/sandbox-providers/tmrk-enterprisecloud/src/main/java/org/jclouds/tmrk/enterprisecloud/domain/VirtualMachine.java +++ b/sandbox-providers/tmrk-enterprisecloud/src/main/java/org/jclouds/tmrk/enterprisecloud/domain/VirtualMachine.java @@ -87,7 +87,7 @@ public class VirtualMachine extends BaseNamedResource { */ public Builder actions(Set actions) { checkNotNull(actions,"actions"); - for(Action action:actions) this.actions.setAction(action); + for(Action action:actions) this.actions.addAction(action); return this; }