Author: adietish
Date: 2011-02-18 11:42:20 -0500 (Fri, 18 Feb 2011)
New Revision: 29244
Modified:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/ChangeLog
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/DeltaCloud.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/DeltaCloudManager.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/DeltaCloudXMLBuilder.java
Log:
[JBIDE-8333] now persisting last selected realm and profile per cloud.
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/ChangeLog
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/ChangeLog 2011-02-18 15:39:12
UTC (rev 29243)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/ChangeLog 2011-02-18 16:42:20
UTC (rev 29244)
@@ -1,3 +1,17 @@
+2011-02-18 André Dietisheim <André Dietisheim@adietisheim-thinkpad>
+
+ * src/org/jboss/tools/deltacloud/core/DeltaCloudManager.java
+ (loadCloud):
+ (printCloud):
+ * src/org/jboss/tools/deltacloud/core/DeltaCloud.java
+ (lastRealmName):
+ (lastProfileId):
+ (setLastProfileId):
+ (getLastProfileId):
+ (getLastRealmName):
+ (setLastRealmName):
+ [JBIDE-8333]
+
2011-02-15 André Dietisheim <André Dietisheim@adietisheim-thinkpad>
* src/org/jboss/tools/deltacloud/core/DeltaCloud.java (update):
Modified:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/DeltaCloud.java
===================================================================
---
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/DeltaCloud.java 2011-02-18
15:39:12 UTC (rev 29243)
+++
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/DeltaCloud.java 2011-02-18
16:42:20 UTC (rev 29244)
@@ -50,7 +50,9 @@
private DeltaCloudDriver driver;
private String lastKeyname = "";
private String lastImageId = "";
-
+ private String lastRealmName = "";
+ private String lastProfileId = "";
+
private DeltaCloudClient client;
private DeltaCloudImagesRepository imagesRepo;
@@ -192,6 +194,22 @@
this.lastImageId = lastImageId;
}
+ public void setLastRealmName(String lastRealmName) {
+ this.lastRealmName = lastRealmName;
+ }
+
+ public String getLastRealmName() {
+ return lastRealmName;
+ }
+
+ public void setLastProfileId(String lastProfileId) {
+ this.lastProfileId = lastProfileId;
+ }
+
+ public String getLastProfileId() {
+ return lastProfileId;
+ }
+
private void setName(String name) {
firePropertyChange(PROP_NAME, this.name, this.name = name);
}
Modified:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/DeltaCloudManager.java
===================================================================
---
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/DeltaCloudManager.java 2011-02-18
15:39:12 UTC (rev 29243)
+++
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/DeltaCloudManager.java 2011-02-18
16:42:20 UTC (rev 29244)
@@ -108,11 +108,15 @@
String instanceFilterRules =
getNodeValue(attrs.getNamedItem("instancefilter")); // $NON-NLS-1$
String lastKeyName =
getNodeValue(attrs.getNamedItem(DeltaCloudXMLBuilder.ATTR_LASTKEYNAME)); // $NON-NLS-1$
String lastImageId =
getNodeValue(attrs.getNamedItem(DeltaCloudXMLBuilder.ATTR_LASTIMAGE)); // $NON-NLS-1$
+ String lastRealmName =
getNodeValue(attrs.getNamedItem(DeltaCloudXMLBuilder.ATTR_LASTREALM)); // $NON-NLS-1$
+ String lastProfileId =
getNodeValue(attrs.getNamedItem(DeltaCloudXMLBuilder.ATTR_LASTPROFILE)); // $NON-NLS-1$
Collection<IInstanceAliasMapping> aliasMappings = getInstanceMappings(n);
cloud = new DeltaCloud(name, url, username, driver, imageFilterRules,
instanceFilterRules, aliasMappings);
clouds.add(cloud);
cloud.setLastImageId(lastImageId);
cloud.setLastKeyname(lastKeyName);
+ cloud.setLastRealmName(lastRealmName);
+ cloud.setLastProfileId(lastProfileId);
return cloud;
} catch (DeltaCloudException e) {
throw e;
@@ -208,6 +212,8 @@
DeltaCloudXMLBuilder.ATTR_INSTANCEFILTER, d.getInstanceFilter().toString(),
printWriter);
DeltaCloudXMLBuilder.attribute(DeltaCloudXMLBuilder.ATTR_LASTKEYNAME,
d.getLastKeyname(), printWriter);
DeltaCloudXMLBuilder.attribute(DeltaCloudXMLBuilder.ATTR_LASTIMAGE, d.getLastImageId(),
printWriter);
+ DeltaCloudXMLBuilder.attribute(DeltaCloudXMLBuilder.ATTR_LASTREALM,
d.getLastRealmName(), printWriter);
+ DeltaCloudXMLBuilder.attribute(DeltaCloudXMLBuilder.ATTR_LASTPROFILE,
d.getLastProfileId(), printWriter);
DeltaCloudXMLBuilder.closeTag(printWriter);
printInstances(d, printWriter);
DeltaCloudXMLBuilder.endTag(DeltaCloudXMLBuilder.TAG_CLOUD, printWriter);
Modified:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/DeltaCloudXMLBuilder.java
===================================================================
---
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/DeltaCloudXMLBuilder.java 2011-02-18
15:39:12 UTC (rev 29243)
+++
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/DeltaCloudXMLBuilder.java 2011-02-18
16:42:20 UTC (rev 29244)
@@ -29,6 +29,8 @@
public static final String ATTR_INSTANCEFILTER = "instancefilter";
public static final String ATTR_LASTKEYNAME = "lastkeyname";
public static final String ATTR_LASTIMAGE = "lastimage";
+ public static final String ATTR_LASTPROFILE = "lastprofile";
+ public static final String ATTR_LASTREALM = "lastrealm";
public static final void xmlHeader(PrintWriter printWriter) {
printWriter.print("<?xml version=\"1.0\" encoding=\"");
Show replies by date