You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airavata.apache.org by sa...@apache.org on 2013/05/24 15:54:43 UTC
svn commit: r1486055 - in /airavata/trunk/modules:
airavata-client/src/main/java/org/apache/airavata/client/api/
airavata-client/src/main/java/org/apache/airavata/client/impl/
registry/registry-api/src/main/java/org/apache/airavata/registry/api/excepti...
Author: samindaw
Date: Fri May 24 13:54:43 2013
New Revision: 1486055
URL: http://svn.apache.org/r1486055
Log:
updating exception throw order
Added:
airavata/trunk/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/exception/worker/GFacJobAlreadyExistsException.java (with props)
airavata/trunk/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/exception/worker/GFacJobDoesNotExistsException.java (with props)
Removed:
airavata/trunk/modules/airavata-client/src/main/java/org/apache/airavata/client/api/AiravataAPIInvocationException.java
airavata/trunk/modules/airavata-client/src/main/java/org/apache/airavata/client/api/DescriptorRecordAlreadyExistsException.java
Modified:
airavata/trunk/modules/airavata-client/src/main/java/org/apache/airavata/client/api/ApplicationManager.java
airavata/trunk/modules/airavata-client/src/main/java/org/apache/airavata/client/api/ExecutionManager.java
airavata/trunk/modules/airavata-client/src/main/java/org/apache/airavata/client/impl/ApplicationManagerImpl.java
airavata/trunk/modules/rest/client/src/main/java/org/apache/airavata/rest/client/DescriptorResourceClient.java
airavata/trunk/modules/rest/client/src/main/java/org/apache/airavata/rest/client/UserWorkflowResourceClient.java
Modified: airavata/trunk/modules/airavata-client/src/main/java/org/apache/airavata/client/api/ApplicationManager.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/airavata-client/src/main/java/org/apache/airavata/client/api/ApplicationManager.java?rev=1486055&r1=1486054&r2=1486055&view=diff
==============================================================================
--- airavata/trunk/modules/airavata-client/src/main/java/org/apache/airavata/client/api/ApplicationManager.java (original)
+++ airavata/trunk/modules/airavata-client/src/main/java/org/apache/airavata/client/api/ApplicationManager.java Fri May 24 13:54:43 2013
@@ -223,8 +223,8 @@ public interface ApplicationManager {
* @throws AiravataAPIInvocationException If an error occurred while saving the host description.
* @throws DescriptorAlreadyExistsException If host descriptor object already exists in the system.
*/
- public void addHostDescription (HostDescription host) throws AiravataAPIInvocationException,
- DescriptorAlreadyExistsException;
+ public void addHostDescription (HostDescription host) throws DescriptorAlreadyExistsException,
+ AiravataAPIInvocationException;
/**
Modified: airavata/trunk/modules/airavata-client/src/main/java/org/apache/airavata/client/api/ExecutionManager.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/airavata-client/src/main/java/org/apache/airavata/client/api/ExecutionManager.java?rev=1486055&r1=1486054&r2=1486055&view=diff
==============================================================================
--- airavata/trunk/modules/airavata-client/src/main/java/org/apache/airavata/client/api/ExecutionManager.java (original)
+++ airavata/trunk/modules/airavata-client/src/main/java/org/apache/airavata/client/api/ExecutionManager.java Fri May 24 13:54:43 2013
@@ -24,7 +24,6 @@ package org.apache.airavata.client.api;
import java.util.List;
import org.apache.airavata.client.api.exception.AiravataAPIInvocationException;
-import org.apache.airavata.common.workflow.execution.context.WorkflowContextHeaderBuilder;
import org.apache.airavata.registry.api.ExecutionErrors;
import org.apache.airavata.registry.api.workflow.ExecutionError;
import org.apache.airavata.registry.api.workflow.ExperimentExecutionError;
Modified: airavata/trunk/modules/airavata-client/src/main/java/org/apache/airavata/client/impl/ApplicationManagerImpl.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/airavata-client/src/main/java/org/apache/airavata/client/impl/ApplicationManagerImpl.java?rev=1486055&r1=1486054&r2=1486055&view=diff
==============================================================================
--- airavata/trunk/modules/airavata-client/src/main/java/org/apache/airavata/client/impl/ApplicationManagerImpl.java (original)
+++ airavata/trunk/modules/airavata-client/src/main/java/org/apache/airavata/client/impl/ApplicationManagerImpl.java Fri May 24 13:54:43 2013
@@ -85,8 +85,8 @@ public class ApplicationManagerImpl impl
}
@Override
- public void addServiceDescription(ServiceDescription serviceDescription) throws AiravataAPIInvocationException,
- DescriptorAlreadyExistsException {
+ public void addServiceDescription(ServiceDescription serviceDescription) throws DescriptorAlreadyExistsException,
+ AiravataAPIInvocationException{
try {
getClient().getRegistryClient().addServiceDescriptor(serviceDescription);
} catch (org.apache.airavata.registry.api.exception.gateway.DescriptorAlreadyExistsException e) {
@@ -168,7 +168,7 @@ public class ApplicationManagerImpl impl
@Override
public void addApplicationDescription(ServiceDescription serviceDescription, HostDescription hostDescription,
ApplicationDescription applicationDeploymentDescription)
- throws AiravataAPIInvocationException, DescriptorAlreadyExistsException {
+ throws DescriptorAlreadyExistsException, AiravataAPIInvocationException{
try {
getClient().getRegistryClient().addApplicationDescriptor(serviceDescription.getType().getName(),
@@ -311,8 +311,8 @@ public class ApplicationManagerImpl impl
}
@Override
- public void addHostDescription(HostDescription host) throws AiravataAPIInvocationException,
- DescriptorAlreadyExistsException {
+ public void addHostDescription(HostDescription host) throws DescriptorAlreadyExistsException,
+ AiravataAPIInvocationException{
try {
getClient().getRegistryClient().addHostDescriptor(host);
Added: airavata/trunk/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/exception/worker/GFacJobAlreadyExistsException.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/exception/worker/GFacJobAlreadyExistsException.java?rev=1486055&view=auto
==============================================================================
--- airavata/trunk/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/exception/worker/GFacJobAlreadyExistsException.java (added)
+++ airavata/trunk/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/exception/worker/GFacJobAlreadyExistsException.java Fri May 24 13:54:43 2013
@@ -0,0 +1,34 @@
+/*
+ *
+ * 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.registry.api.exception.worker;
+
+import org.apache.airavata.registry.api.exception.RegistryException;
+
+public class GFacJobAlreadyExistsException extends RegistryException {
+
+ private static final long serialVersionUID = -8006347245307495767L;
+
+ public GFacJobAlreadyExistsException(String jobId) {
+ super("A GFac job from the ID '"+jobId+"' is already present in the registry!!!");
+ }
+
+}
Propchange: airavata/trunk/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/exception/worker/GFacJobAlreadyExistsException.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: airavata/trunk/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/exception/worker/GFacJobDoesNotExistsException.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/exception/worker/GFacJobDoesNotExistsException.java?rev=1486055&view=auto
==============================================================================
--- airavata/trunk/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/exception/worker/GFacJobDoesNotExistsException.java (added)
+++ airavata/trunk/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/exception/worker/GFacJobDoesNotExistsException.java Fri May 24 13:54:43 2013
@@ -0,0 +1,34 @@
+/*
+ *
+ * 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.registry.api.exception.worker;
+
+import org.apache.airavata.registry.api.exception.RegistryException;
+
+public class GFacJobDoesNotExistsException extends RegistryException {
+
+ private static final long serialVersionUID = -8006347245307495767L;
+
+ public GFacJobDoesNotExistsException(String jobId) {
+ super("There is no GFac job corresponding to ID '"+jobId+"' present in the registry!!!");
+ }
+
+}
Propchange: airavata/trunk/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/exception/worker/GFacJobDoesNotExistsException.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Modified: airavata/trunk/modules/rest/client/src/main/java/org/apache/airavata/rest/client/DescriptorResourceClient.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/rest/client/src/main/java/org/apache/airavata/rest/client/DescriptorResourceClient.java?rev=1486055&r1=1486054&r2=1486055&view=diff
==============================================================================
--- airavata/trunk/modules/rest/client/src/main/java/org/apache/airavata/rest/client/DescriptorResourceClient.java (original)
+++ airavata/trunk/modules/rest/client/src/main/java/org/apache/airavata/rest/client/DescriptorResourceClient.java Fri May 24 13:54:43 2013
@@ -169,7 +169,7 @@ public class DescriptorResourceClient {
+ status);
}else if (status == ClientConstant.HTTP_BAD_REQUEST){
logger.debug("Descriptor already exists...");
- throw new DescriptorAlreadyExistsException(hostDescription.getType().getHostName() + " already exists !!!");
+ throw new DescriptorAlreadyExistsException(hostDescription.getType().getHostName());
} else {
if (response.getCookies().size() > 0) {
cookie = response.getCookies().get(0).toCookie();
@@ -178,7 +178,7 @@ public class DescriptorResourceClient {
}
}else if (status == ClientConstant.HTTP_BAD_REQUEST){
logger.debug("Descriptor already exists...");
- throw new DescriptorAlreadyExistsException(hostDescription.getType().getHostName() + " already exists !!!");
+ throw new DescriptorAlreadyExistsException(hostDescription.getType().getHostName());
}
else {
logger.error(response.getEntity(String.class));
@@ -498,7 +498,7 @@ public class DescriptorResourceClient {
if (status == ClientConstant.HTTP_BAD_REQUEST){
logger.debug("Descriptor already exists...");
- throw new DescriptorAlreadyExistsException(serviceDescriptor.getServiceName() + " already exists !!!");
+ throw new DescriptorAlreadyExistsException(serviceDescriptor.getServiceName());
} else if (status != ClientConstant.HTTP_OK) {
logger.error(response.getEntity(String.class));
throw new RuntimeException("Failed : HTTP error code : "
@@ -511,7 +511,7 @@ public class DescriptorResourceClient {
}
} else if (status == ClientConstant.HTTP_BAD_REQUEST){
logger.debug("Descriptor already exists...");
- throw new DescriptorAlreadyExistsException(serviceDescriptor.getServiceName() + " already exists !!!");
+ throw new DescriptorAlreadyExistsException(serviceDescriptor.getServiceName());
} else {
logger.error(response.getEntity(String.class));
throw new RuntimeException("Failed : HTTP error code : "
@@ -783,7 +783,7 @@ public class DescriptorResourceClient {
if (status == ClientConstant.HTTP_BAD_REQUEST){
logger.debug("Descriptor already exists...");
- throw new DescriptorAlreadyExistsException(applicationDescriptor.getName() + " already exists !!!");
+ throw new DescriptorAlreadyExistsException(applicationDescriptor.getName());
} else if (status != ClientConstant.HTTP_OK && status != ClientConstant.HTTP_UNAUTHORIZED) {
logger.error(response.getEntity(String.class));
throw new RuntimeException("Failed : HTTP error code : "
@@ -796,7 +796,7 @@ public class DescriptorResourceClient {
}
} else if (status == ClientConstant.HTTP_BAD_REQUEST){
logger.debug("Descriptor already exists...");
- throw new DescriptorAlreadyExistsException(applicationDescriptor.getName() + " already exists !!!");
+ throw new DescriptorAlreadyExistsException(applicationDescriptor.getName());
} else {
logger.error(response.getEntity(String.class));
throw new RuntimeException("Failed : HTTP error code : "
@@ -837,7 +837,7 @@ public class DescriptorResourceClient {
if (status == ClientConstant.HTTP_BAD_REQUEST){
logger.debug("Descriptor already exists...");
- throw new DescriptorAlreadyExistsException(applicationDescriptor.getName() + " already exists !!!");
+ throw new DescriptorAlreadyExistsException(applicationDescriptor.getName());
} else if (status != ClientConstant.HTTP_OK) {
logger.error(response.getEntity(String.class));
throw new RuntimeException("Failed : HTTP error code : "
@@ -850,7 +850,7 @@ public class DescriptorResourceClient {
}
} else if (status == ClientConstant.HTTP_BAD_REQUEST){
logger.debug("Descriptor already exists...");
- throw new DescriptorAlreadyExistsException(applicationDescriptor.getName() + " already exists !!!");
+ throw new DescriptorAlreadyExistsException(applicationDescriptor.getName());
} else {
logger.error(response.getEntity(String.class));
throw new RuntimeException("Failed : HTTP error code : "
Modified: airavata/trunk/modules/rest/client/src/main/java/org/apache/airavata/rest/client/UserWorkflowResourceClient.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/rest/client/src/main/java/org/apache/airavata/rest/client/UserWorkflowResourceClient.java?rev=1486055&r1=1486054&r2=1486055&view=diff
==============================================================================
--- airavata/trunk/modules/rest/client/src/main/java/org/apache/airavata/rest/client/UserWorkflowResourceClient.java (original)
+++ airavata/trunk/modules/rest/client/src/main/java/org/apache/airavata/rest/client/UserWorkflowResourceClient.java Fri May 24 13:54:43 2013
@@ -165,7 +165,7 @@ public class UserWorkflowResourceClient
status = response.getStatus();
if (status == ClientConstant.HTTP_BAD_REQUEST){
logger.debug("Workflow already exists...");
- throw new UserWorkflowAlreadyExistsException(workflowName + " already exists !!!");
+ throw new UserWorkflowAlreadyExistsException(workflowName);
}
else if (status != ClientConstant.HTTP_OK) {
logger.error(response.getEntity(String.class));
@@ -179,7 +179,7 @@ public class UserWorkflowResourceClient
}
} else if (status == ClientConstant.HTTP_BAD_REQUEST){
logger.debug("Descriptor already exists...");
- throw new UserWorkflowAlreadyExistsException(workflowName + " already exists !!!");
+ throw new UserWorkflowAlreadyExistsException(workflowName);
} else {
logger.error(response.getEntity(String.class));
throw new RuntimeException("Failed : HTTP error code : "