You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airavata.apache.org by sh...@apache.org on 2015/06/12 03:07:22 UTC
airavata git commit: Refactor commons exceptions
Repository: airavata
Updated Branches:
refs/heads/master 8d16d0ec5 -> 5a6b64703
Refactor commons exceptions
Project: http://git-wip-us.apache.org/repos/asf/airavata/repo
Commit: http://git-wip-us.apache.org/repos/asf/airavata/commit/5a6b6470
Tree: http://git-wip-us.apache.org/repos/asf/airavata/tree/5a6b6470
Diff: http://git-wip-us.apache.org/repos/asf/airavata/diff/5a6b6470
Branch: refs/heads/master
Commit: 5a6b647032f487916a43e97ad8a73f59ddc8ca01
Parents: 8d16d0e
Author: Shameera Rathanyaka <sh...@gmail.com>
Authored: Thu Jun 11 21:07:11 2015 -0400
Committer: Shameera Rathanyaka <sh...@gmail.com>
Committed: Thu Jun 11 21:07:11 2015 -0400
----------------------------------------------------------------------
.../exception/AiravataStratupException.java | 9 +++
.../ApplicationSettingsLoadException.java | 38 ------------
.../ApplicationSettingsStoreException.java | 34 -----------
.../exception/LazyLoadedDataException.java | 30 ----------
...UnspecifiedApplicationSettingsException.java | 30 ----------
.../common/exception/UtilsException.java | 61 --------------------
.../common/utils/ApplicationSettings.java | 11 ++--
.../airavata/common/utils/BrowserLauncher.java | 26 ++++-----
.../apache/airavata/common/utils/WSDLUtil.java | 1 -
.../apache/airavata/common/utils/XMLUtil.java | 10 ++--
.../exceptions/LazyLoadedDataException.java | 32 ++++++++++
.../model/exceptions/UtilsException.java | 61 ++++++++++++++++++++
.../airavata/workflow/model/gpel/DSCUtil.java | 2 -
.../model/gpel/script/WorkflowWSDL.java | 10 ++--
.../model/graph/system/ParameterNode.java | 7 ++-
.../airavata/workflow/model/wf/Workflow.java | 6 +-
.../workflow/model/wf/WorkflowData.java | 3 +-
.../xbaya/modifier/WorkflowModifier.java | 2 -
18 files changed, 138 insertions(+), 235 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/airavata/blob/5a6b6470/modules/commons/src/main/java/org/apache/airavata/common/exception/AiravataStratupException.java
----------------------------------------------------------------------
diff --git a/modules/commons/src/main/java/org/apache/airavata/common/exception/AiravataStratupException.java b/modules/commons/src/main/java/org/apache/airavata/common/exception/AiravataStratupException.java
new file mode 100644
index 0000000..e503f4b
--- /dev/null
+++ b/modules/commons/src/main/java/org/apache/airavata/common/exception/AiravataStratupException.java
@@ -0,0 +1,9 @@
+package org.apache.airavata.common.exception;
+
+/**
+ * Created by syodage on 6/11/15.
+ */
+public class AiravataStratupException extends Exception {
+ private static final long serialVersionUID = 495204868100143133L;
+
+}
http://git-wip-us.apache.org/repos/asf/airavata/blob/5a6b6470/modules/commons/src/main/java/org/apache/airavata/common/exception/ApplicationSettingsLoadException.java
----------------------------------------------------------------------
diff --git a/modules/commons/src/main/java/org/apache/airavata/common/exception/ApplicationSettingsLoadException.java b/modules/commons/src/main/java/org/apache/airavata/common/exception/ApplicationSettingsLoadException.java
deleted file mode 100644
index 2735cf3..0000000
--- a/modules/commons/src/main/java/org/apache/airavata/common/exception/ApplicationSettingsLoadException.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-
-package org.apache.airavata.common.exception;
-
-public class ApplicationSettingsLoadException extends ApplicationSettingsException {
-
- private static final long serialVersionUID = -5102090895499711299L;
- public ApplicationSettingsLoadException(String message) {
- super(message);
- }
-
- public ApplicationSettingsLoadException(Throwable e) {
- this(e.getMessage(),e);
- }
-
- public ApplicationSettingsLoadException(String message, Throwable e) {
- super(message,e);
- }
-}
http://git-wip-us.apache.org/repos/asf/airavata/blob/5a6b6470/modules/commons/src/main/java/org/apache/airavata/common/exception/ApplicationSettingsStoreException.java
----------------------------------------------------------------------
diff --git a/modules/commons/src/main/java/org/apache/airavata/common/exception/ApplicationSettingsStoreException.java b/modules/commons/src/main/java/org/apache/airavata/common/exception/ApplicationSettingsStoreException.java
deleted file mode 100644
index 5f258bf..0000000
--- a/modules/commons/src/main/java/org/apache/airavata/common/exception/ApplicationSettingsStoreException.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-
-package org.apache.airavata.common.exception;
-
-public class ApplicationSettingsStoreException extends ApplicationSettingsException {
-
- private static final long serialVersionUID = -5102090895499711299L;
- public ApplicationSettingsStoreException(String filePath) {
- super("Error while attempting to store settings in "+filePath);
- }
-
- public ApplicationSettingsStoreException(String filePath, Throwable e) {
- super(filePath,e);
- }
-}
http://git-wip-us.apache.org/repos/asf/airavata/blob/5a6b6470/modules/commons/src/main/java/org/apache/airavata/common/exception/LazyLoadedDataException.java
----------------------------------------------------------------------
diff --git a/modules/commons/src/main/java/org/apache/airavata/common/exception/LazyLoadedDataException.java b/modules/commons/src/main/java/org/apache/airavata/common/exception/LazyLoadedDataException.java
deleted file mode 100644
index 4ba58d7..0000000
--- a/modules/commons/src/main/java/org/apache/airavata/common/exception/LazyLoadedDataException.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-
-package org.apache.airavata.common.exception;
-
-public class LazyLoadedDataException extends AiravataException {
- private static final long serialVersionUID = -3164776318582067936L;
- public LazyLoadedDataException(String message) {
- super(message);
- }
-
-}
http://git-wip-us.apache.org/repos/asf/airavata/blob/5a6b6470/modules/commons/src/main/java/org/apache/airavata/common/exception/UnspecifiedApplicationSettingsException.java
----------------------------------------------------------------------
diff --git a/modules/commons/src/main/java/org/apache/airavata/common/exception/UnspecifiedApplicationSettingsException.java b/modules/commons/src/main/java/org/apache/airavata/common/exception/UnspecifiedApplicationSettingsException.java
deleted file mode 100644
index c29ff24..0000000
--- a/modules/commons/src/main/java/org/apache/airavata/common/exception/UnspecifiedApplicationSettingsException.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-
-package org.apache.airavata.common.exception;
-
-public class UnspecifiedApplicationSettingsException extends ApplicationSettingsException {
-
- private static final long serialVersionUID = -1159027432434546003L;
- public UnspecifiedApplicationSettingsException(String key) {
- super("The '"+key+"' is not configured in settings!!!");
- }
-}
http://git-wip-us.apache.org/repos/asf/airavata/blob/5a6b6470/modules/commons/src/main/java/org/apache/airavata/common/exception/UtilsException.java
----------------------------------------------------------------------
diff --git a/modules/commons/src/main/java/org/apache/airavata/common/exception/UtilsException.java b/modules/commons/src/main/java/org/apache/airavata/common/exception/UtilsException.java
deleted file mode 100644
index a412fe1..0000000
--- a/modules/commons/src/main/java/org/apache/airavata/common/exception/UtilsException.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-
-package org.apache.airavata.common.exception;
-
-public class UtilsException extends Exception {
-
- /**
- * Constructs a UtilsException.
- *
- */
- public UtilsException() {
- super();
- }
-
- /**
- * Constructs a UtilsException.
- *
- * @param message
- */
- public UtilsException(String message) {
- super(message);
- }
-
- /**
- * Constructs a UtilsException.
- *
- * @param cause
- */
- public UtilsException(Throwable cause) {
- super(cause);
- }
-
- /**
- * Constructs a UtilsException.
- *
- * @param message
- * @param cause
- */
- public UtilsException(String message, Throwable cause) {
- super(message, cause);
- }
-}
http://git-wip-us.apache.org/repos/asf/airavata/blob/5a6b6470/modules/commons/src/main/java/org/apache/airavata/common/utils/ApplicationSettings.java
----------------------------------------------------------------------
diff --git a/modules/commons/src/main/java/org/apache/airavata/common/utils/ApplicationSettings.java b/modules/commons/src/main/java/org/apache/airavata/common/utils/ApplicationSettings.java
index 9a59573..b521962 100644
--- a/modules/commons/src/main/java/org/apache/airavata/common/utils/ApplicationSettings.java
+++ b/modules/commons/src/main/java/org/apache/airavata/common/utils/ApplicationSettings.java
@@ -34,9 +34,6 @@ import java.util.regex.Matcher;
import java.util.regex.Pattern;
import org.apache.airavata.common.exception.ApplicationSettingsException;
-import org.apache.airavata.common.exception.ApplicationSettingsLoadException;
-import org.apache.airavata.common.exception.ApplicationSettingsStoreException;
-import org.apache.airavata.common.exception.UnspecifiedApplicationSettingsException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -116,13 +113,13 @@ public class ApplicationSettings {
INSTANCE=settingsInstance;
}
- private void saveProperties() throws ApplicationSettingsStoreException{
+ private void saveProperties() throws ApplicationSettingsException{
URL url = getPropertyFileURL();
if (url.getProtocol().equalsIgnoreCase("file")){
try {
properties.store(new FileOutputStream(url.getPath()), Calendar.getInstance().toString());
} catch (Exception e) {
- throw new ApplicationSettingsStoreException(url.getPath(), e);
+ throw new ApplicationSettingsException(url.getPath(), e);
}
}else{
logger.warn("Properties cannot be updated to location "+url.toString());
@@ -131,7 +128,7 @@ public class ApplicationSettings {
private void validateSuccessfulPropertyFileLoad() throws ApplicationSettingsException{
if (propertyLoadException!=null){
- throw new ApplicationSettingsLoadException(propertyLoadException);
+ throw new ApplicationSettingsException(propertyLoadException.getMessage(), propertyLoadException);
}
}
@@ -190,7 +187,7 @@ public class ApplicationSettings {
if (properties.containsKey(key)){
rawValue=properties.getProperty(key);
}else{
- throw new UnspecifiedApplicationSettingsException(key);
+ throw new ApplicationSettingsException(key);
}
}
return deriveAbsoluteValueImpl(rawValue);
http://git-wip-us.apache.org/repos/asf/airavata/blob/5a6b6470/modules/commons/src/main/java/org/apache/airavata/common/utils/BrowserLauncher.java
----------------------------------------------------------------------
diff --git a/modules/commons/src/main/java/org/apache/airavata/common/utils/BrowserLauncher.java b/modules/commons/src/main/java/org/apache/airavata/common/utils/BrowserLauncher.java
index 8946aa3..3ac6d4e 100644
--- a/modules/commons/src/main/java/org/apache/airavata/common/utils/BrowserLauncher.java
+++ b/modules/commons/src/main/java/org/apache/airavata/common/utils/BrowserLauncher.java
@@ -26,7 +26,7 @@ import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.net.URL;
-import org.apache.airavata.common.exception.UtilsException;
+import org.apache.airavata.common.exception.AiravataException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -44,9 +44,9 @@ public class BrowserLauncher {
*
* @param url
* The specified URL.
- * @throws UtilsException
+ * @throws AiravataException
*/
- public static void openURL(URL url) throws UtilsException {
+ public static void openURL(URL url) throws AiravataException {
openURL(url.toString());
}
@@ -55,9 +55,9 @@ public class BrowserLauncher {
*
* @param url
* The specified URL.
- * @throws UtilsException
+ * @throws AiravataException
*/
- public static void openURL(String url) throws UtilsException {
+ public static void openURL(String url) throws AiravataException {
logger.debug("Enter:" + url);
String osName = System.getProperty("os.name");
try {
@@ -74,25 +74,25 @@ public class BrowserLauncher {
if (Runtime.getRuntime().exec(new String[] { "which", browsers[count] }).waitFor() == 0)
browser = browsers[count];
if (browser == null) {
- throw new UtilsException("Could not find web browser.");
+ throw new AiravataException("Could not find web browser.");
} else {
Runtime.getRuntime().exec(new String[] { browser, url });
}
}
} catch (ClassNotFoundException e) {
- throw new UtilsException(ERROR_MESSAGE, e);
+ throw new AiravataException(ERROR_MESSAGE, e);
} catch (NoSuchMethodException e) {
- throw new UtilsException(ERROR_MESSAGE, e);
+ throw new AiravataException(ERROR_MESSAGE, e);
} catch (IllegalAccessException e) {
- throw new UtilsException(ERROR_MESSAGE, e);
+ throw new AiravataException(ERROR_MESSAGE, e);
} catch (InvocationTargetException e) {
- throw new UtilsException(ERROR_MESSAGE, e);
+ throw new AiravataException(ERROR_MESSAGE, e);
} catch (IOException e) {
- throw new UtilsException(ERROR_MESSAGE, e);
+ throw new AiravataException(ERROR_MESSAGE, e);
} catch (InterruptedException e) {
- throw new UtilsException(ERROR_MESSAGE, e);
+ throw new AiravataException(ERROR_MESSAGE, e);
} catch (RuntimeException e) {
- throw new UtilsException(ERROR_MESSAGE, e);
+ throw new AiravataException(ERROR_MESSAGE, e);
}
}
}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/airavata/blob/5a6b6470/modules/commons/src/main/java/org/apache/airavata/common/utils/WSDLUtil.java
----------------------------------------------------------------------
diff --git a/modules/commons/src/main/java/org/apache/airavata/common/utils/WSDLUtil.java b/modules/commons/src/main/java/org/apache/airavata/common/utils/WSDLUtil.java
index 81c8d93..e4c0bfb 100644
--- a/modules/commons/src/main/java/org/apache/airavata/common/utils/WSDLUtil.java
+++ b/modules/commons/src/main/java/org/apache/airavata/common/utils/WSDLUtil.java
@@ -25,7 +25,6 @@ import java.net.URI;
import java.util.LinkedList;
import java.util.List;
-import org.apache.airavata.common.exception.UtilsException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.xmlpull.infoset.XmlAttribute;
http://git-wip-us.apache.org/repos/asf/airavata/blob/5a6b6470/modules/commons/src/main/java/org/apache/airavata/common/utils/XMLUtil.java
----------------------------------------------------------------------
diff --git a/modules/commons/src/main/java/org/apache/airavata/common/utils/XMLUtil.java b/modules/commons/src/main/java/org/apache/airavata/common/utils/XMLUtil.java
index 0ba02f9..95ee1f3 100644
--- a/modules/commons/src/main/java/org/apache/airavata/common/utils/XMLUtil.java
+++ b/modules/commons/src/main/java/org/apache/airavata/common/utils/XMLUtil.java
@@ -38,7 +38,7 @@ import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.ParserConfigurationException;
-import org.apache.airavata.common.exception.UtilsException;
+import org.apache.airavata.common.exception.AiravataException;
import org.apache.xmlbeans.XmlError;
import org.apache.xmlbeans.XmlObject;
import org.apache.xmlbeans.XmlOptions;
@@ -245,14 +245,14 @@ public class XMLUtil {
* @return The cloned XmlElement.
*/
public static org.xmlpull.infoset.XmlElement deepClone(org.xmlpull.infoset.XmlElement element)
- throws UtilsException {
+ throws AiravataException {
try {
XmlElement clonedElement = element.clone();
clonedElement.setParent(null);
return clonedElement;
} catch (CloneNotSupportedException e) {
// This should not happen because we don't put any special Objects.
- throw new UtilsException(e);
+ throw new AiravataException(e.getMessage(), e);
}
}
@@ -319,7 +319,7 @@ public class XMLUtil {
*
* @param xmlObject
*/
- public static void validate(XmlObject xmlObject) throws UtilsException {
+ public static void validate(XmlObject xmlObject) throws AiravataException {
XmlOptions validateOptions = new XmlOptions();
ArrayList errorList = new ArrayList();
validateOptions.setErrorListener(errorList);
@@ -339,7 +339,7 @@ public class XMLUtil {
stringBuilder.append("Message:" + error.getMessage());
stringBuilder.append("Location of invalid XML: " + error.getCursorLocation().xmlText());
}
- throw new UtilsException(stringBuilder.toString());
+ throw new AiravataException(stringBuilder.toString());
}
/**
http://git-wip-us.apache.org/repos/asf/airavata/blob/5a6b6470/modules/workflow-model/workflow-model-core/src/main/java/org/apache/airavata/workflow/model/exceptions/LazyLoadedDataException.java
----------------------------------------------------------------------
diff --git a/modules/workflow-model/workflow-model-core/src/main/java/org/apache/airavata/workflow/model/exceptions/LazyLoadedDataException.java b/modules/workflow-model/workflow-model-core/src/main/java/org/apache/airavata/workflow/model/exceptions/LazyLoadedDataException.java
new file mode 100644
index 0000000..3832b07
--- /dev/null
+++ b/modules/workflow-model/workflow-model-core/src/main/java/org/apache/airavata/workflow/model/exceptions/LazyLoadedDataException.java
@@ -0,0 +1,32 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+
+package org.apache.airavata.workflow.model.exceptions;
+
+import org.apache.airavata.common.exception.AiravataException;
+
+public class LazyLoadedDataException extends AiravataException {
+ private static final long serialVersionUID = -3164776318582067936L;
+ public LazyLoadedDataException(String message) {
+ super(message);
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/airavata/blob/5a6b6470/modules/workflow-model/workflow-model-core/src/main/java/org/apache/airavata/workflow/model/exceptions/UtilsException.java
----------------------------------------------------------------------
diff --git a/modules/workflow-model/workflow-model-core/src/main/java/org/apache/airavata/workflow/model/exceptions/UtilsException.java b/modules/workflow-model/workflow-model-core/src/main/java/org/apache/airavata/workflow/model/exceptions/UtilsException.java
new file mode 100644
index 0000000..6b97525
--- /dev/null
+++ b/modules/workflow-model/workflow-model-core/src/main/java/org/apache/airavata/workflow/model/exceptions/UtilsException.java
@@ -0,0 +1,61 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+
+package org.apache.airavata.workflow.model.exceptions;
+
+public class UtilsException extends Exception {
+
+ /**
+ * Constructs a UtilsException.
+ *
+ */
+ public UtilsException() {
+ super();
+ }
+
+ /**
+ * Constructs a UtilsException.
+ *
+ * @param message
+ */
+ public UtilsException(String message) {
+ super(message);
+ }
+
+ /**
+ * Constructs a UtilsException.
+ *
+ * @param cause
+ */
+ public UtilsException(Throwable cause) {
+ super(cause);
+ }
+
+ /**
+ * Constructs a UtilsException.
+ *
+ * @param message
+ * @param cause
+ */
+ public UtilsException(String message, Throwable cause) {
+ super(message, cause);
+ }
+}
http://git-wip-us.apache.org/repos/asf/airavata/blob/5a6b6470/modules/workflow-model/workflow-model-core/src/main/java/org/apache/airavata/workflow/model/gpel/DSCUtil.java
----------------------------------------------------------------------
diff --git a/modules/workflow-model/workflow-model-core/src/main/java/org/apache/airavata/workflow/model/gpel/DSCUtil.java b/modules/workflow-model/workflow-model-core/src/main/java/org/apache/airavata/workflow/model/gpel/DSCUtil.java
index a7a64e7..2019d39 100644
--- a/modules/workflow-model/workflow-model-core/src/main/java/org/apache/airavata/workflow/model/gpel/DSCUtil.java
+++ b/modules/workflow-model/workflow-model-core/src/main/java/org/apache/airavata/workflow/model/gpel/DSCUtil.java
@@ -27,8 +27,6 @@ import java.net.URLEncoder;
import javax.xml.namespace.QName;
-import org.apache.airavata.common.exception.UtilsException;
-import org.apache.airavata.common.utils.WSDLUtil;
import org.apache.airavata.workflow.model.exceptions.WorkflowRuntimeException;
//import xsul5.wsdl.WsdlDefinitions;
http://git-wip-us.apache.org/repos/asf/airavata/blob/5a6b6470/modules/workflow-model/workflow-model-core/src/main/java/org/apache/airavata/workflow/model/gpel/script/WorkflowWSDL.java
----------------------------------------------------------------------
diff --git a/modules/workflow-model/workflow-model-core/src/main/java/org/apache/airavata/workflow/model/gpel/script/WorkflowWSDL.java b/modules/workflow-model/workflow-model-core/src/main/java/org/apache/airavata/workflow/model/gpel/script/WorkflowWSDL.java
index ee8f40b..7f6ea22 100644
--- a/modules/workflow-model/workflow-model-core/src/main/java/org/apache/airavata/workflow/model/gpel/script/WorkflowWSDL.java
+++ b/modules/workflow-model/workflow-model-core/src/main/java/org/apache/airavata/workflow/model/gpel/script/WorkflowWSDL.java
@@ -25,9 +25,9 @@ import java.util.List;
import javax.xml.namespace.QName;
-import org.apache.airavata.common.exception.UtilsException;
+import org.apache.airavata.common.exception.AiravataException;
+import org.apache.airavata.workflow.model.exceptions.UtilsException;
import org.apache.airavata.common.utils.WSConstants;
-import org.apache.airavata.common.utils.WSDLUtil;
import org.apache.airavata.common.utils.XMLUtil;
import org.apache.airavata.workflow.model.component.ws.WSComponentPort;
import org.apache.airavata.workflow.model.graph.GraphException;
@@ -326,7 +326,7 @@ public class WorkflowWSDL {
XmlElement annotation = element.addElement(WSConstants.ANNOTATION_TAG);
try {
annotation.addElement(XMLUtil.deepClone(appinfo));
- } catch (UtilsException e) {
+ } catch (AiravataException e) {
log.error(e.getMessage(), e);
}
}
@@ -369,7 +369,7 @@ public class WorkflowWSDL {
XmlElement annotation = element.element(null, WSConstants.ANNOTATION_TAG, true);
try {
annotation.addElement(XMLUtil.deepClone(appinfo));
- } catch (UtilsException e) {
+ } catch (AiravataException e) {
log.error(e.getMessage(), e);
}
}
@@ -388,7 +388,7 @@ public class WorkflowWSDL {
XmlElement valueElement = null;
try {
valueElement = XMLUtil.deepClone((XmlElement) value);
- } catch (UtilsException e) {
+ } catch (AiravataException e) {
log.error(e.getMessage(), e);
}
XmlElement annotation = element.element(null, WSConstants.ANNOTATION_TAG, true);
http://git-wip-us.apache.org/repos/asf/airavata/blob/5a6b6470/modules/workflow-model/workflow-model-core/src/main/java/org/apache/airavata/workflow/model/graph/system/ParameterNode.java
----------------------------------------------------------------------
diff --git a/modules/workflow-model/workflow-model-core/src/main/java/org/apache/airavata/workflow/model/graph/system/ParameterNode.java b/modules/workflow-model/workflow-model-core/src/main/java/org/apache/airavata/workflow/model/graph/system/ParameterNode.java
index 739b231..25afc30 100644
--- a/modules/workflow-model/workflow-model-core/src/main/java/org/apache/airavata/workflow/model/graph/system/ParameterNode.java
+++ b/modules/workflow-model/workflow-model-core/src/main/java/org/apache/airavata/workflow/model/graph/system/ParameterNode.java
@@ -26,7 +26,8 @@ import java.util.List;
import com.google.gson.JsonElement;
import com.google.gson.JsonObject;
-import org.apache.airavata.common.exception.UtilsException;
+import org.apache.airavata.common.exception.AiravataException;
+import org.apache.airavata.workflow.model.exceptions.UtilsException;
import org.apache.airavata.common.utils.XMLUtil;
import org.apache.airavata.model.appcatalog.appinterface.DataType;
import org.apache.airavata.workflow.model.graph.DataEdge;
@@ -167,7 +168,7 @@ abstract public class ParameterNode extends SystemNode {
// clone and detach from the parent
try {
this.metadata = XMLUtil.deepClone(metadata);
- } catch (UtilsException e) {
+ } catch (AiravataException e) {
log.error(e.getMessage(), e);
}
@@ -329,7 +330,7 @@ abstract public class ParameterNode extends SystemNode {
// called multiple times.
try {
metadataElement.addChild(XMLUtil.deepClone(this.metadata));
- } catch (UtilsException e) {
+ } catch (AiravataException e) {
log.error(e.getMessage(), e);
}
}
http://git-wip-us.apache.org/repos/asf/airavata/blob/5a6b6470/modules/workflow-model/workflow-model-core/src/main/java/org/apache/airavata/workflow/model/wf/Workflow.java
----------------------------------------------------------------------
diff --git a/modules/workflow-model/workflow-model-core/src/main/java/org/apache/airavata/workflow/model/wf/Workflow.java b/modules/workflow-model/workflow-model-core/src/main/java/org/apache/airavata/workflow/model/wf/Workflow.java
index 705b4ae..5a87a97 100644
--- a/modules/workflow-model/workflow-model-core/src/main/java/org/apache/airavata/workflow/model/wf/Workflow.java
+++ b/modules/workflow-model/workflow-model-core/src/main/java/org/apache/airavata/workflow/model/wf/Workflow.java
@@ -37,9 +37,9 @@ import javax.xml.namespace.QName;
import com.google.gson.JsonObject;
import com.google.gson.JsonPrimitive;
-import org.apache.airavata.common.exception.UtilsException;
+import org.apache.airavata.common.exception.AiravataException;
+import org.apache.airavata.workflow.model.exceptions.UtilsException;
import org.apache.airavata.common.utils.JSONUtil;
-import org.apache.airavata.common.utils.WSDLUtil;
import org.apache.airavata.common.utils.XMLUtil;
import org.apache.airavata.workflow.model.component.Component;
import org.apache.airavata.workflow.model.component.ComponentException;
@@ -666,7 +666,7 @@ public class Workflow implements Cloneable {
} catch (WorkflowException e) {
// This should not happen.
throw new WorkflowRuntimeException(e);
- } catch (UtilsException e) {
+ } catch (AiravataException e) {
// This should not happen.
throw new WorkflowRuntimeException(e);
}
http://git-wip-us.apache.org/repos/asf/airavata/blob/5a6b6470/modules/workflow-model/workflow-model-core/src/main/java/org/apache/airavata/workflow/model/wf/WorkflowData.java
----------------------------------------------------------------------
diff --git a/modules/workflow-model/workflow-model-core/src/main/java/org/apache/airavata/workflow/model/wf/WorkflowData.java b/modules/workflow-model/workflow-model-core/src/main/java/org/apache/airavata/workflow/model/wf/WorkflowData.java
index 66c3f38..444e659 100644
--- a/modules/workflow-model/workflow-model-core/src/main/java/org/apache/airavata/workflow/model/wf/WorkflowData.java
+++ b/modules/workflow-model/workflow-model-core/src/main/java/org/apache/airavata/workflow/model/wf/WorkflowData.java
@@ -21,11 +21,12 @@
package org.apache.airavata.workflow.model.wf;
+import org.apache.airavata.workflow.model.exceptions.LazyLoadedDataException;
+
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlRootElement;
-import org.apache.airavata.common.exception.LazyLoadedDataException;
@XmlAccessorType(XmlAccessType.FIELD)
@XmlRootElement
http://git-wip-us.apache.org/repos/asf/airavata/blob/5a6b6470/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/modifier/WorkflowModifier.java
----------------------------------------------------------------------
diff --git a/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/modifier/WorkflowModifier.java b/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/modifier/WorkflowModifier.java
index 3b38b1f..5a0c9cf 100644
--- a/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/modifier/WorkflowModifier.java
+++ b/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/modifier/WorkflowModifier.java
@@ -29,8 +29,6 @@ import java.util.HashSet;
import java.util.List;
import java.util.Set;
-import org.apache.airavata.common.exception.UtilsException;
-import org.apache.airavata.common.utils.WSDLUtil;
import org.apache.airavata.workflow.model.component.system.InputComponent;
import org.apache.airavata.workflow.model.component.ws.WSComponent;
import org.apache.airavata.workflow.model.exceptions.WorkflowRuntimeException;