You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airavata.apache.org by ch...@apache.org on 2014/07/07 21:02:58 UTC
git commit: implementing getAll in server handler
Repository: airavata
Updated Branches:
refs/heads/master c7a330069 -> 9a7ee5b85
implementing getAll in server handler
Project: http://git-wip-us.apache.org/repos/asf/airavata/repo
Commit: http://git-wip-us.apache.org/repos/asf/airavata/commit/9a7ee5b8
Tree: http://git-wip-us.apache.org/repos/asf/airavata/tree/9a7ee5b8
Diff: http://git-wip-us.apache.org/repos/asf/airavata/diff/9a7ee5b8
Branch: refs/heads/master
Commit: 9a7ee5b85c3865609d29112b58bfc65cc30af1fa
Parents: c7a3300
Author: Chathuri Wimalasena <ka...@gmail.com>
Authored: Mon Jul 7 15:02:55 2014 -0400
Committer: Chathuri Wimalasena <ka...@gmail.com>
Committed: Mon Jul 7 15:02:55 2014 -0400
----------------------------------------------------------------------
.../server/handler/AiravataServerHandler.java | 29 ++++++++++++++++++--
1 file changed, 27 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/airavata/blob/9a7ee5b8/airavata-api/airavata-api-server/src/main/java/org/apache/airavata/api/server/handler/AiravataServerHandler.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-api-server/src/main/java/org/apache/airavata/api/server/handler/AiravataServerHandler.java b/airavata-api/airavata-api-server/src/main/java/org/apache/airavata/api/server/handler/AiravataServerHandler.java
index 54072dd..5246518 100644
--- a/airavata-api/airavata-api-server/src/main/java/org/apache/airavata/api/server/handler/AiravataServerHandler.java
+++ b/airavata-api/airavata-api-server/src/main/java/org/apache/airavata/api/server/handler/AiravataServerHandler.java
@@ -1465,7 +1465,23 @@ public class AiravataServerHandler implements Airavata.Iface, Watcher {
*/
@Override
public Map<String, String> getAllApplicationInterfaceNames() throws InvalidRequestException, AiravataClientException, AiravataSystemException, TException {
- return null;
+ try {
+ appCatalog = AppCatalogFactory.getAppCatalog();
+ List<ApplicationInterfaceDescription> allApplicationInterfaces = appCatalog.getApplicationInterface().getAllApplicationInterfaces();
+ Map<String, String> allApplicationInterfacesMap = new HashMap<String, String>();
+ if (allApplicationInterfaces != null && !allApplicationInterfaces.isEmpty()){
+ for (ApplicationInterfaceDescription interfaceDescription : allApplicationInterfaces){
+ allApplicationInterfacesMap.put(interfaceDescription.getApplicationInterfaceId(), interfaceDescription.getApplicationName());
+ }
+ }
+ return allApplicationInterfacesMap;
+ } catch (AppCatalogException e) {
+ logger.error("Error while retrieving application interfaces...", e);
+ AiravataSystemException exception = new AiravataSystemException();
+ exception.setAiravataErrorType(AiravataErrorType.INTERNAL_ERROR);
+ exception.setMessage("Error while retrieving application interfaces. More info : " + e.getMessage());
+ throw exception;
+ }
}
/**
@@ -1476,7 +1492,16 @@ public class AiravataServerHandler implements Airavata.Iface, Watcher {
*/
@Override
public List<ApplicationInterfaceDescription> getAllApplicationInterfaces() throws InvalidRequestException, AiravataClientException, AiravataSystemException, TException {
- return null;
+ try {
+ appCatalog = AppCatalogFactory.getAppCatalog();
+ return appCatalog.getApplicationInterface().getAllApplicationInterfaces();
+ } catch (AppCatalogException e) {
+ logger.error("Error while retrieving application interfaces...", e);
+ AiravataSystemException exception = new AiravataSystemException();
+ exception.setAiravataErrorType(AiravataErrorType.INTERNAL_ERROR);
+ exception.setMessage("Error while retrieving application interfaces. More info : " + e.getMessage());
+ throw exception;
+ }
}
/**