incubator-ace-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r1069629 - in /incubator/ace/trunk/ace-webui-vaadin/src/main/java/org/apache/ace/webui/vaadin: Associations.java NamedTargetObject.java
Date Thu, 10 Feb 2011 23:59:36 GMT
Author: marrs
Date: Thu Feb 10 23:59:36 2011
New Revision: 1069629

URL: http://svn.apache.org/viewvc?rev=1069629&view=rev
Log:
Broke associations between distributions and targets, fixed them again.

Modified:
    incubator/ace/trunk/ace-webui-vaadin/src/main/java/org/apache/ace/webui/vaadin/Associations.java
    incubator/ace/trunk/ace-webui-vaadin/src/main/java/org/apache/ace/webui/vaadin/NamedTargetObject.java

Modified: incubator/ace/trunk/ace-webui-vaadin/src/main/java/org/apache/ace/webui/vaadin/Associations.java
URL: http://svn.apache.org/viewvc/incubator/ace/trunk/ace-webui-vaadin/src/main/java/org/apache/ace/webui/vaadin/Associations.java?rev=1069629&r1=1069628&r2=1069629&view=diff
==============================================================================
--- incubator/ace/trunk/ace-webui-vaadin/src/main/java/org/apache/ace/webui/vaadin/Associations.java
(original)
+++ incubator/ace/trunk/ace-webui-vaadin/src/main/java/org/apache/ace/webui/vaadin/Associations.java
Thu Feb 10 23:59:36 2011
@@ -94,6 +94,9 @@ public class Associations {
     	else if (object instanceof StatefulGatewayObject) {
     		return new NamedTargetObject((StatefulGatewayObject) object);
     	}
+    	else if (object instanceof GatewayObject) {
+    		return new NamedTargetObject((GatewayObject) object);
+    	}
     	return null;
     }
     

Modified: incubator/ace/trunk/ace-webui-vaadin/src/main/java/org/apache/ace/webui/vaadin/NamedTargetObject.java
URL: http://svn.apache.org/viewvc/incubator/ace/trunk/ace-webui-vaadin/src/main/java/org/apache/ace/webui/vaadin/NamedTargetObject.java?rev=1069629&r1=1069628&r2=1069629&view=diff
==============================================================================
--- incubator/ace/trunk/ace-webui-vaadin/src/main/java/org/apache/ace/webui/vaadin/NamedTargetObject.java
(original)
+++ incubator/ace/trunk/ace-webui-vaadin/src/main/java/org/apache/ace/webui/vaadin/NamedTargetObject.java
Thu Feb 10 23:59:36 2011
@@ -1,18 +1,29 @@
 package org.apache.ace.webui.vaadin;
 
 import org.apache.ace.client.repository.RepositoryObject;
+import org.apache.ace.client.repository.object.GatewayObject;
 import org.apache.ace.client.repository.stateful.StatefulGatewayObject;
 import org.apache.ace.webui.NamedObject;
 
 class NamedTargetObject implements NamedObject {
-    private final StatefulGatewayObject m_target;
+    private final RepositoryObject m_target;
 
     public NamedTargetObject(StatefulGatewayObject target) {
         m_target = target;
     }
+    
+    public NamedTargetObject(GatewayObject target) {
+        m_target = target;
+    }
 
     public String getName() {
-        return m_target.getID();
+    	if (m_target instanceof StatefulGatewayObject) {
+    		return ((StatefulGatewayObject) m_target).getID();
+    	}
+    	else if (m_target instanceof GatewayObject) {
+    		return ((GatewayObject) m_target).getID();
+    	}
+    	return null;
     }
 
     public String getDescription() {



Mime
View raw message