airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From scnakand...@apache.org
Subject [36/57] airavata git commit: WIP
Date Thu, 28 Jul 2016 17:45:50 GMT
WIP


Project: http://git-wip-us.apache.org/repos/asf/airavata/repo
Commit: http://git-wip-us.apache.org/repos/asf/airavata/commit/171ee0c2
Tree: http://git-wip-us.apache.org/repos/asf/airavata/tree/171ee0c2
Diff: http://git-wip-us.apache.org/repos/asf/airavata/diff/171ee0c2

Branch: refs/heads/develop
Commit: 171ee0c26354f1cea131a2bbed81557283090da1
Parents: 7c6a11d
Author: scnakandala <supun.nakandala@gmail.com>
Authored: Mon Jul 11 18:48:46 2016 -0400
Committer: scnakandala <supun.nakandala@gmail.com>
Committed: Mon Jul 11 18:48:47 2016 -0400

----------------------------------------------------------------------
 .../server/handler/AiravataServerHandler.java   |    71 +
 .../java/org/apache/airavata/api/Airavata.java  | 51074 ++++++++++-------
 .../main/resources/lib/airavata/Airavata.cpp    | 16118 +++---
 .../src/main/resources/lib/airavata/Airavata.h  |  1070 +-
 .../lib/airavata/Airavata_server.skeleton.cpp   |    25 +
 .../lib/airavata/group_manager_model_types.cpp  |   196 +
 .../lib/airavata/group_manager_model_types.h    |    82 +
 .../resources/lib/Airavata/API/Airavata.php     | 14410 +++--
 .../lib/Airavata/Model/Group/Types.php          |   193 +
 .../lib/apache/airavata/api/Airavata-remote     |    35 +
 .../lib/apache/airavata/api/Airavata.py         |  7048 ++-
 .../lib/apache/airavata/model/group/ttypes.py   |   125 +
 .../apache/airavata/model/ComponentStatus.java  |     2 +-
 .../org/apache/airavata/model/EdgeModel.java    |     2 +-
 .../org/apache/airavata/model/NodeModel.java    |     2 +-
 .../org/apache/airavata/model/PortModel.java    |     2 +-
 .../apache/airavata/model/WorkflowModel.java    |     2 +-
 .../apache/airavata/model/WorkflowStatus.java   |     2 +-
 .../ApplicationDeploymentDescription.java       |     2 +-
 .../appdeployment/ApplicationModule.java        |     2 +-
 .../appcatalog/appdeployment/CommandObject.java |     2 +-
 .../appcatalog/appdeployment/SetEnvPaths.java   |     2 +-
 .../ApplicationInterfaceDescription.java        |     2 +-
 .../appcatalog/computeresource/BatchQueue.java  |     2 +-
 .../computeresource/CloudJobSubmission.java     |     2 +-
 .../ComputeResourceDescription.java             |     2 +-
 .../computeresource/GlobusJobSubmission.java    |     2 +-
 .../computeresource/JobSubmissionInterface.java |     2 +-
 .../computeresource/LOCALSubmission.java        |     2 +-
 .../computeresource/ResourceJobManager.java     |     2 +-
 .../computeresource/SSHJobSubmission.java       |     2 +-
 .../computeresource/UnicoreJobSubmission.java   |     2 +-
 .../ComputeResourcePreference.java              |     2 +-
 .../gatewayprofile/GatewayResourceProfile.java  |     2 +-
 .../gatewayprofile/StoragePreference.java       |     2 +-
 .../StorageResourceDescription.java             |     2 +-
 .../application/io/InputDataObjectType.java     |     2 +-
 .../application/io/OutputDataObjectType.java    |     2 +-
 .../airavata/model/commons/ErrorModel.java      |     2 +-
 .../model/commons/ValidationResults.java        |     2 +-
 .../airavata/model/commons/ValidatorResult.java |     2 +-
 .../data/movement/DataMovementInterface.java    |     2 +-
 .../data/movement/GridFTPDataMovement.java      |     2 +-
 .../model/data/movement/LOCALDataMovement.java  |     2 +-
 .../model/data/movement/SCPDataMovement.java    |     2 +-
 .../data/movement/UnicoreDataMovement.java      |     2 +-
 .../model/data/replica/DataProductModel.java    |     2 +-
 .../data/replica/DataReplicaLocationModel.java  |     2 +-
 .../model/error/AiravataClientException.java    |     2 +-
 .../model/error/AiravataSystemException.java    |     2 +-
 .../model/error/AuthenticationException.java    |     2 +-
 .../model/error/AuthorizationException.java     |     2 +-
 .../error/ExperimentNotFoundException.java      |     2 +-
 .../model/error/InvalidRequestException.java    |     2 +-
 .../model/error/LaunchValidationException.java  |     2 +-
 .../model/error/ProjectNotFoundException.java   |     2 +-
 .../airavata/model/error/TimedOutException.java |     2 +-
 .../airavata/model/error/ValidationResults.java |     2 +-
 .../airavata/model/error/ValidatorResult.java   |     2 +-
 .../model/experiment/ExperimentModel.java       |     2 +-
 .../model/experiment/ExperimentStatistics.java  |     2 +-
 .../experiment/ExperimentSummaryModel.java      |     2 +-
 .../experiment/UserConfigurationDataModel.java  |     2 +-
 .../org/apache/airavata/model/job/JobModel.java |     2 +-
 .../event/ExperimentStatusChangeEvent.java      |     2 +-
 .../model/messaging/event/JobIdentifier.java    |     2 +-
 .../messaging/event/JobStatusChangeEvent.java   |     2 +-
 .../event/JobStatusChangeRequestEvent.java      |     2 +-
 .../airavata/model/messaging/event/Message.java |     2 +-
 .../messaging/event/ProcessIdentifier.java      |     2 +-
 .../event/ProcessStatusChangeEvent.java         |     2 +-
 .../event/ProcessStatusChangeRequestEvent.java  |     2 +-
 .../messaging/event/ProcessSubmitEvent.java     |     2 +-
 .../messaging/event/ProcessTerminateEvent.java  |     2 +-
 .../model/messaging/event/TaskIdentifier.java   |     2 +-
 .../messaging/event/TaskOutputChangeEvent.java  |     2 +-
 .../messaging/event/TaskStatusChangeEvent.java  |     2 +-
 .../event/TaskStatusChangeRequestEvent.java     |     2 +-
 .../airavata/model/process/ProcessModel.java    |     2 +-
 .../ComputationalResourceSchedulingModel.java   |     2 +-
 .../airavata/model/security/AuthzToken.java     |     2 +-
 .../airavata/model/status/ExperimentStatus.java |     2 +-
 .../apache/airavata/model/status/JobStatus.java |     2 +-
 .../airavata/model/status/ProcessStatus.java    |     2 +-
 .../airavata/model/status/TaskStatus.java       |     2 +-
 .../model/task/DataStagingTaskModel.java        |     2 +-
 .../model/task/EnvironmentSetupTaskModel.java   |     2 +-
 .../model/task/JobSubmissionTaskModel.java      |     2 +-
 .../airavata/model/task/MonitorTaskModel.java   |     2 +-
 .../apache/airavata/model/task/TaskModel.java   |     2 +-
 .../airavata/model/user/NSFDemographics.java    |     2 +-
 .../apache/airavata/model/user/UserProfile.java |     2 +-
 .../airavata/model/workspace/Gateway.java       |     2 +-
 .../apache/airavata/model/workspace/Group.java  |     2 +-
 .../airavata/model/workspace/Notification.java  |     2 +-
 .../airavata/model/workspace/Project.java       |     2 +-
 .../apache/airavata/model/workspace/User.java   |     2 +-
 .../airavata/grouper/GroupManagerCPI.java       |     5 +
 .../airavata/grouper/GroupManagerImpl.java      |    14 +
 .../apache/airavata/grouper/group/Group.java    |     7 +
 .../airavata-apis/airavata_api.thrift           |    30 +
 .../group_manager_model.thrift                  |     8 +
 102 files changed, 52952 insertions(+), 37729 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/171ee0c2/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 176dde4..6441637 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
@@ -37,6 +37,7 @@ import org.apache.airavata.grouper.GroupManagerCPI;
 import org.apache.airavata.grouper.GroupManagerException;
 import org.apache.airavata.grouper.GroupManagerFactory;
 import org.apache.airavata.grouper.SubjectType;
+import org.apache.airavata.grouper.group.Group;
 import org.apache.airavata.grouper.permission.PermissionAction;
 import org.apache.airavata.grouper.resource.Resource;
 import org.apache.airavata.messaging.core.MessageContext;
@@ -60,6 +61,7 @@ import org.apache.airavata.model.data.replica.DataProductModel;
 import org.apache.airavata.model.data.replica.DataReplicaLocationModel;
 import org.apache.airavata.model.error.*;
 import org.apache.airavata.model.experiment.*;
+import org.apache.airavata.model.group.GroupModel;
 import org.apache.airavata.model.group.ResourcePermissionType;
 import org.apache.airavata.model.group.ResourceType;
 import org.apache.airavata.model.job.JobModel;
@@ -4500,6 +4502,75 @@ public class AiravataServerHandler implements Airavata.Iface {
         }
     }
 
+    @Override
+    @SecurityCheck
+    public boolean createGroup(AuthzToken authzToken, GroupModel groupModel) throws InvalidRequestException,
AiravataClientException, AiravataSystemException, AuthorizationException, TException {
+        try {
+            GroupManagerCPI groupManager = GroupManagerFactory.getGroupManager();
+            Group group = new Group();
+            group.setName(groupModel.getName());
+            group.setDescription(groupModel.getDescription());
+            group.setMembers(groupModel.getMembers());
+            groupManager.createGroup(group);
+        } catch (Exception e) {
+            String msg = "Error Creating Group" ;
+            logger.error(msg, e);
+            AiravataSystemException exception = new AiravataSystemException(AiravataErrorType.INTERNAL_ERROR);
+            exception.setMessage(msg + " More info : " + e.getMessage());
+            throw exception;
+        }
+        return true;
+    }
+
+    @Override
+    @SecurityCheck
+    public boolean updateGroup(AuthzToken authzToken, GroupModel groupModel) throws InvalidRequestException,
AiravataClientException, AiravataSystemException, AuthorizationException, TException {
+        try {
+            GroupManagerCPI groupManager = GroupManagerFactory.getGroupManager();
+            Group group = new Group();
+            group.setId(groupModel.getId());
+            group.setName(groupModel.getName());
+            group.setDescription(groupModel.getDescription());
+            group.setMembers(groupModel.getMembers());
+            groupManager.updateGroup(group);
+        } catch (Exception e) {
+            String msg = "Error Updating Group" ;
+            logger.error(msg, e);
+            AiravataSystemException exception = new AiravataSystemException(AiravataErrorType.INTERNAL_ERROR);
+            exception.setMessage(msg + " More info : " + e.getMessage());
+            throw exception;
+        }
+        return true;
+    }
+
+    @Override
+    @SecurityCheck
+    public boolean deleteGroup(AuthzToken authzToken, String groupId, String ownerId, String
gatewayId) throws InvalidRequestException, AiravataClientException, AiravataSystemException,
AuthorizationException, TException {
+        try {
+            GroupManagerCPI groupManager = GroupManagerFactory.getGroupManager();
+
+        } catch (Exception e) {
+            String msg = "Error Deleting Group. Group ID: " + groupId ;
+            logger.error(msg, e);
+            AiravataSystemException exception = new AiravataSystemException(AiravataErrorType.INTERNAL_ERROR);
+            exception.setMessage(msg + " More info : " + e.getMessage());
+            throw exception;
+        }
+        return true;
+    }
+
+    @Override
+    @SecurityCheck
+    public GroupModel getGroup(AuthzToken authzToken, String groupId) throws InvalidRequestException,
AiravataClientException, AiravataSystemException, AuthorizationException, TException {
+        return null;
+    }
+
+    @Override
+    @SecurityCheck
+    public List<GroupModel> getAllGroupsUserBelongs(AuthzToken authzToken, String userName,
String gatewayId) throws InvalidRequestException, AiravataClientException, AiravataSystemException,
AuthorizationException, TException {
+        return null;
+    }
+
     private void initializeResourceWithGrouper(String resourceId, ResourceType resourceType)
throws RegistryException, GroupManagerException {
         ExperimentCatalog experimentCatalog = RegistryFactory.getDefaultExpCatalog();
         GroupManagerCPI groupManager = GroupManagerFactory.getGroupManager();


Mime
View raw message