Repository: airavata Updated Branches: refs/heads/develop 8fdf63aa2 -> 83b1321dd
changing catch exceptions from GroupManagerExc to Exc Project: http://git-wip-us.apache.org/repos/asf/airavata/repo Commit: http://git-wip-us.apache.org/repos/asf/airavata/commit/83b1321d Tree: http://git-wip-us.apache.org/repos/asf/airavata/tree/83b1321d Diff: http://git-wip-us.apache.org/repos/asf/airavata/diff/83b1321d Branch: refs/heads/develop Commit: 83b1321dd55e4faa6e43377f17e1f2d16a009c3e Parents: 8fdf63a Author: scnakandala <[email protected]> Authored: Thu Jul 7 03:01:15 2016 -0400 Committer: scnakandala <[email protected]> Committed: Thu Jul 7 03:01:15 2016 -0400 ---------------------------------------------------------------------- .../server/handler/AiravataServerHandler.java | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/airavata/blob/83b1321d/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 6ed3829..55c6392 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 @@ -636,7 +636,7 @@ public class AiravataServerHandler implements Airavata.Iface { existingProject.getProjectID(), ResourceType.PROJECT, ResourcePermissionType.WRITE)){ throw new AuthorizationException("User does not have permission to access this resource"); } - } catch (GroupManagerException e) { + } catch (Exception e) { throw new AuthorizationException("User does not have permission to access this resource"); } } @@ -675,7 +675,7 @@ public class AiravataServerHandler implements Airavata.Iface { existingProject.getProjectID(), ResourceType.PROJECT, ResourcePermissionType.WRITE)){ throw new AuthorizationException("User does not have permission to access this resource"); } - } catch (GroupManagerException e) { + } catch (Exception e) { throw new AuthorizationException("User does not have permission to access this resource"); } } @@ -730,7 +730,7 @@ public class AiravataServerHandler implements Airavata.Iface { }else { throw new AuthorizationException("User does not have permission to access this resource"); } - } catch (GroupManagerException e) { + } catch (Exception e) { throw new AuthorizationException("User does not have permission to access this resource"); } } @@ -866,7 +866,7 @@ public class AiravataServerHandler implements Airavata.Iface { final List<String> accessibleProjIds = new ArrayList<>(); try{ accessibleProjIds.addAll(getAllAccessibleResourcesForUser(userName+"@"+gatewayId, ResourceType.PROJECT, ResourcePermissionType.READ)); - }catch (GroupManagerException ex){ + }catch (Exception ex){ logger.error(ex.getMessage(), ex); List<Object> allUserProjects = experimentCatalog.search(ExperimentCatalogModelType.PROJECT, temp, -1, 0, Constants.FieldConstants.ProjectConstants.CREATION_TIME, ResultOrderType.DESC); @@ -959,7 +959,7 @@ public class AiravataServerHandler implements Airavata.Iface { final List<String> accessibleExpIds = new ArrayList<>(); try{ accessibleExpIds.addAll(getAllAccessibleResourcesForUser(userName + "@" + gatewayId, ResourceType.EXPERIMENT, ResourcePermissionType.READ)); - }catch (GroupManagerException ex){ + }catch (Exception ex){ logger.error(ex.getMessage(), ex); List<Object> allUserExperiments = experimentCatalog.search(ExperimentCatalogModelType.EXPERIMENT, temp, -1, 0, Constants.FieldConstants.ExperimentConstants.CREATION_TIME, ResultOrderType.DESC); @@ -1062,7 +1062,7 @@ public class AiravataServerHandler implements Airavata.Iface { project.getProjectID(), ResourceType.PROJECT, ResourcePermissionType.READ)){ throw new AuthorizationException("User does not have permission to access this resource"); } - } catch (GroupManagerException e) { + } catch (Exception e) { throw new AuthorizationException("User does not have permission to access this resource"); } } @@ -1251,7 +1251,7 @@ public class AiravataServerHandler implements Airavata.Iface { experimentModel.getExperimentId(), ResourceType.EXPERIMENT, ResourcePermissionType.WRITE)){ throw new AuthorizationException("User does not have permission to access this resource"); } - } catch (GroupManagerException e) { + } catch (Exception e) { throw new AuthorizationException("User does not have permission to access this resource"); } } @@ -1310,7 +1310,7 @@ public class AiravataServerHandler implements Airavata.Iface { }else { throw new AuthorizationException("User does not have permission to access this resource"); } - } catch (GroupManagerException e) { + } catch (Exception e) { throw new AuthorizationException("User does not have permission to access this resource"); } } @@ -1448,7 +1448,7 @@ public class AiravataServerHandler implements Airavata.Iface { experimentModel.getExperimentId(), ResourceType.EXPERIMENT, ResourcePermissionType.WRITE)){ throw new AuthorizationException("User does not have permission to access this resource"); } - } catch (GroupManagerException e) { + } catch (Exception e) { throw new AuthorizationException("User does not have permission to access this resource"); } } @@ -4476,7 +4476,7 @@ public class AiravataServerHandler implements Airavata.Iface { List<String> accessibleUsers = new ArrayList<>(); accessibleUsers.addAll(groupManager.getAllAccessibleUsers(resourceId, gResourceType, gPermissionType)); return accessibleUsers; - } catch (GroupManagerException e) { + } catch (Exception e) { String msg = "Error in getting all accessible users for resource. Resource ID : " + resourceId + " Resource Type : " + resourceType.toString() ; logger.error(msg, e); AiravataSystemException exception = new AiravataSystemException(AiravataErrorType.INTERNAL_ERROR);
