You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airavata.apache.org by sc...@apache.org on 2016/08/12 16:01:33 UTC
airavata git commit: return empty list when user not existant
Repository: airavata
Updated Branches:
refs/heads/develop 7eacf8452 -> d19f8c5c9
return empty list when user not existant
Project: http://git-wip-us.apache.org/repos/asf/airavata/repo
Commit: http://git-wip-us.apache.org/repos/asf/airavata/commit/d19f8c5c
Tree: http://git-wip-us.apache.org/repos/asf/airavata/tree/d19f8c5c
Diff: http://git-wip-us.apache.org/repos/asf/airavata/diff/d19f8c5c
Branch: refs/heads/develop
Commit: d19f8c5c9369af25e291c78807e7e2c539350ce2
Parents: 7eacf84
Author: scnakandala <su...@gmail.com>
Authored: Fri Aug 12 12:01:29 2016 -0400
Committer: scnakandala <su...@gmail.com>
Committed: Fri Aug 12 12:01:29 2016 -0400
----------------------------------------------------------------------
.../service/handler/RegistryServerHandler.java | 19 +++++--------------
1 file changed, 5 insertions(+), 14 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/airavata/blob/d19f8c5c/modules/registry/registry-server/registry-api-service/src/main/java/org/apache/airavata/registry/api/service/handler/RegistryServerHandler.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-server/registry-api-service/src/main/java/org/apache/airavata/registry/api/service/handler/RegistryServerHandler.java b/modules/registry/registry-server/registry-api-service/src/main/java/org/apache/airavata/registry/api/service/handler/RegistryServerHandler.java
index 1d7c74b..2646147 100644
--- a/modules/registry/registry-server/registry-api-service/src/main/java/org/apache/airavata/registry/api/service/handler/RegistryServerHandler.java
+++ b/modules/registry/registry-server/registry-api-service/src/main/java/org/apache/airavata/registry/api/service/handler/RegistryServerHandler.java
@@ -346,11 +346,8 @@ public class RegistryServerHandler implements RegistryService.Iface {
List<Project> projects = new ArrayList<Project>();
try {
if (!ExpCatResourceUtils.isUserExist(userName, gatewayId)){
- logger.error("User does not exist in the system. Please provide a valid user..");
- AiravataSystemException exception = new AiravataSystemException();
- exception.setAiravataErrorType(AiravataErrorType.INTERNAL_ERROR);
- exception.setMessage("User does not exist in the system. Please provide a valid user..");
- throw exception;
+ logger.warn("User does not exist in the system. Please provide a valid user..");
+ return projects;
}
experimentCatalog = RegistryFactory.getExperimentCatalog(gatewayId);
Map<String, String> filters = new HashMap<String, String>();
@@ -466,22 +463,16 @@ public class RegistryServerHandler implements RegistryService.Iface {
exception.setMessage("Username cannot be empty. Please provide a valid user..");
throw exception;
}
- if(!isUserExists(gatewayId, userName)){
- return new ArrayList<>();
- }
if (!isGatewayExistInternal(gatewayId)){
logger.error("Gateway does not exist.Please provide a valid gateway id...");
throw new AiravataSystemException(AiravataErrorType.INTERNAL_ERROR);
}
+ List<ExperimentModel> experiments = new ArrayList<ExperimentModel>();
try {
if (!ExpCatResourceUtils.isUserExist(userName, gatewayId)){
- logger.error("User does not exist in the system. Please provide a valid user..");
- AiravataSystemException exception = new AiravataSystemException();
- exception.setAiravataErrorType(AiravataErrorType.INTERNAL_ERROR);
- exception.setMessage("User does not exist in the system. Please provide a valid user..");
- throw exception;
+ logger.warn("User does not exist in the system. Please provide a valid user..");
+ return experiments;
}
- List<ExperimentModel> experiments = new ArrayList<ExperimentModel>();
experimentCatalog = RegistryFactory.getExperimentCatalog(gatewayId);
List<Object> list = experimentCatalog.get(ExperimentCatalogModelType.EXPERIMENT,
Constants.FieldConstants.ExperimentConstants.USER_NAME, userName, limit, offset,