airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lah...@apache.org
Subject svn commit: r1179864 - in /incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya: component/gui/JCRRegistryWindow.java component/registry/JCRComponentRegistry.java gui/ErrorMessages.java
Date Thu, 06 Oct 2011 21:31:32 GMT
Author: lahiru
Date: Thu Oct  6 21:31:31 2011
New Revision: 1179864

URL: http://svn.apache.org/viewvc?rev=1179864&view=rev
Log:
fixing https://issues.apache.org/jira/browse/AIRAVATA-130.

Modified:
    incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/component/gui/JCRRegistryWindow.java
    incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/component/registry/JCRComponentRegistry.java
    incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/gui/ErrorMessages.java

Modified: incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/component/gui/JCRRegistryWindow.java
URL: http://svn.apache.org/viewvc/incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/component/gui/JCRRegistryWindow.java?rev=1179864&r1=1179863&r2=1179864&view=diff
==============================================================================
--- incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/component/gui/JCRRegistryWindow.java
(original)
+++ incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/component/gui/JCRRegistryWindow.java
Thu Oct  6 21:31:31 2011
@@ -99,8 +99,13 @@ public class JCRRegistryWindow {
             this.engine.getErrorWindow().error(ErrorMessages.URL_WRONG, e);
             return;
         }
-
-        JCRComponentRegistry registry = new JCRComponentRegistry(url, username, password);
+        JCRComponentRegistry registry = null;
+        try {
+            registry = new JCRComponentRegistry(url, username, password);
+        } catch (Exception e) {
+            this.engine.getErrorWindow().error(ErrorMessages.CREDENTIALS_WRONG,e);
+            return;
+        }
         XBayaConfiguration configuration = this.engine.getConfiguration();
         configuration.setJcrComponentRegistry(registry);
         configuration.setRegigstryUserName(username);

Modified: incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/component/registry/JCRComponentRegistry.java
URL: http://svn.apache.org/viewvc/incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/component/registry/JCRComponentRegistry.java?rev=1179864&r1=1179863&r2=1179864&view=diff
==============================================================================
--- incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/component/registry/JCRComponentRegistry.java
(original)
+++ incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/component/registry/JCRComponentRegistry.java
Thu Oct  6 21:31:31 2011
@@ -31,17 +31,23 @@ import org.apache.airavata.registry.api.
 import org.apache.airavata.registry.api.user.UserManager;
 import org.apache.airavata.xbaya.component.gui.ComponentTreeNode;
 
+import javax.jcr.RepositoryException;
+
 public class JCRComponentRegistry extends ComponentRegistry {
 
     private static final String NAME = "JCR Components";
     
     private JCRRegistry registry;
 
-    public JCRComponentRegistry(URI url, String username, String password) {
+    public JCRComponentRegistry(URI url, String username, String password) throws RepositoryException
{
         HashMap<String, String> map = new HashMap<String, String>();
         map.put("org.apache.jackrabbit.repository.uri", url.toString());
-        this.registry = new JCRRegistry("org.apache.jackrabbit.rmi.repository.RmiRepositoryFactory",
username,
-                password, map);
+        try {
+            this.registry = new JCRRegistry("org.apache.jackrabbit.rmi.repository.RmiRepositoryFactory",
username,
+                    password, map);
+        } catch (RepositoryException e) {
+            throw e;
+        }
     }
 
     static {

Modified: incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/gui/ErrorMessages.java
URL: http://svn.apache.org/viewvc/incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/gui/ErrorMessages.java?rev=1179864&r1=1179863&r2=1179864&view=diff
==============================================================================
--- incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/gui/ErrorMessages.java
(original)
+++ incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/gui/ErrorMessages.java
Thu Oct  6 21:31:31 2011
@@ -262,4 +262,5 @@ public interface ErrorMessages {
      * MORE_THAN_ONE_CONNECTIONS
      */
     public static final String MORE_THAN_ONE_CONNECTIONS = "Cannot connect more than one
output ports to an input port.";
+    String CREDENTIALS_WRONG = "Please check credentials";
 }
\ No newline at end of file



Mime
View raw message