http://git-wip-us.apache.org/repos/asf/airavata/blob/47290ad1/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/messaging/event/ProcessSubmitEvent.java ---------------------------------------------------------------------- diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/messaging/event/ProcessSubmitEvent.java b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/messaging/event/ProcessSubmitEvent.java index 3d78f51..e1e9d8a 100644 --- a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/messaging/event/ProcessSubmitEvent.java +++ b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/messaging/event/ProcessSubmitEvent.java @@ -51,7 +51,7 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-03-30") +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-04-22") public class ProcessSubmitEvent implements org.apache.thrift.TBase<ProcessSubmitEvent, ProcessSubmitEvent._Fields>, java.io.Serializable, Cloneable, Comparable<ProcessSubmitEvent> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ProcessSubmitEvent");
http://git-wip-us.apache.org/repos/asf/airavata/blob/47290ad1/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/messaging/event/ProcessTerminateEvent.java ---------------------------------------------------------------------- diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/messaging/event/ProcessTerminateEvent.java b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/messaging/event/ProcessTerminateEvent.java index 55c6ecb..b5e5042 100644 --- a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/messaging/event/ProcessTerminateEvent.java +++ b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/messaging/event/ProcessTerminateEvent.java @@ -51,7 +51,7 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-03-30") +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-04-22") public class ProcessTerminateEvent implements org.apache.thrift.TBase<ProcessTerminateEvent, ProcessTerminateEvent._Fields>, java.io.Serializable, Cloneable, Comparable<ProcessTerminateEvent> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ProcessTerminateEvent"); http://git-wip-us.apache.org/repos/asf/airavata/blob/47290ad1/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/messaging/event/TaskIdentifier.java ---------------------------------------------------------------------- diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/messaging/event/TaskIdentifier.java b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/messaging/event/TaskIdentifier.java index 5144e46..b36c42f 100644 --- a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/messaging/event/TaskIdentifier.java +++ b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/messaging/event/TaskIdentifier.java @@ -51,7 +51,7 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-03-30") +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-04-22") public class TaskIdentifier implements org.apache.thrift.TBase<TaskIdentifier, TaskIdentifier._Fields>, java.io.Serializable, Cloneable, Comparable<TaskIdentifier> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TaskIdentifier"); http://git-wip-us.apache.org/repos/asf/airavata/blob/47290ad1/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/messaging/event/TaskOutputChangeEvent.java ---------------------------------------------------------------------- diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/messaging/event/TaskOutputChangeEvent.java b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/messaging/event/TaskOutputChangeEvent.java index ce6cec8..ee992c8 100644 --- a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/messaging/event/TaskOutputChangeEvent.java +++ b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/messaging/event/TaskOutputChangeEvent.java @@ -51,7 +51,7 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-03-30") +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-04-22") public class TaskOutputChangeEvent implements org.apache.thrift.TBase<TaskOutputChangeEvent, TaskOutputChangeEvent._Fields>, java.io.Serializable, Cloneable, Comparable<TaskOutputChangeEvent> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TaskOutputChangeEvent"); http://git-wip-us.apache.org/repos/asf/airavata/blob/47290ad1/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/messaging/event/TaskStatusChangeEvent.java ---------------------------------------------------------------------- diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/messaging/event/TaskStatusChangeEvent.java b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/messaging/event/TaskStatusChangeEvent.java index 2c04194..e177ed1 100644 --- a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/messaging/event/TaskStatusChangeEvent.java +++ b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/messaging/event/TaskStatusChangeEvent.java @@ -51,7 +51,7 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-03-30") +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-04-22") public class TaskStatusChangeEvent implements org.apache.thrift.TBase<TaskStatusChangeEvent, TaskStatusChangeEvent._Fields>, java.io.Serializable, Cloneable, Comparable<TaskStatusChangeEvent> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TaskStatusChangeEvent"); http://git-wip-us.apache.org/repos/asf/airavata/blob/47290ad1/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/messaging/event/TaskStatusChangeRequestEvent.java ---------------------------------------------------------------------- diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/messaging/event/TaskStatusChangeRequestEvent.java b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/messaging/event/TaskStatusChangeRequestEvent.java index 733c148..61d48f2 100644 --- a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/messaging/event/TaskStatusChangeRequestEvent.java +++ b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/messaging/event/TaskStatusChangeRequestEvent.java @@ -51,7 +51,7 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-03-30") +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-04-22") public class TaskStatusChangeRequestEvent implements org.apache.thrift.TBase<TaskStatusChangeRequestEvent, TaskStatusChangeRequestEvent._Fields>, java.io.Serializable, Cloneable, Comparable<TaskStatusChangeRequestEvent> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TaskStatusChangeRequestEvent"); http://git-wip-us.apache.org/repos/asf/airavata/blob/47290ad1/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/process/ProcessModel.java ---------------------------------------------------------------------- diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/process/ProcessModel.java b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/process/ProcessModel.java index d7c95ba..8e307d4 100644 --- a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/process/ProcessModel.java +++ b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/process/ProcessModel.java @@ -60,7 +60,7 @@ import org.slf4j.LoggerFactory; * * */ -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-03-30") +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-04-22") public class ProcessModel implements org.apache.thrift.TBase<ProcessModel, ProcessModel._Fields>, java.io.Serializable, Cloneable, Comparable<ProcessModel> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ProcessModel"); http://git-wip-us.apache.org/repos/asf/airavata/blob/47290ad1/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/scheduling/ComputationalResourceSchedulingModel.java ---------------------------------------------------------------------- diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/scheduling/ComputationalResourceSchedulingModel.java b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/scheduling/ComputationalResourceSchedulingModel.java index debaa55..228c78d 100644 --- a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/scheduling/ComputationalResourceSchedulingModel.java +++ b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/scheduling/ComputationalResourceSchedulingModel.java @@ -56,7 +56,7 @@ import org.slf4j.LoggerFactory; * * */ -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-03-30") +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-04-22") public class ComputationalResourceSchedulingModel implements org.apache.thrift.TBase<ComputationalResourceSchedulingModel, ComputationalResourceSchedulingModel._Fields>, java.io.Serializable, Cloneable, Comparable<ComputationalResourceSchedulingModel> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ComputationalResourceSchedulingModel"); http://git-wip-us.apache.org/repos/asf/airavata/blob/47290ad1/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/security/AuthzToken.java ---------------------------------------------------------------------- diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/security/AuthzToken.java b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/security/AuthzToken.java index b3d6b9c..cedff25 100644 --- a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/security/AuthzToken.java +++ b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/security/AuthzToken.java @@ -51,7 +51,7 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-03-30") +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-04-22") public class AuthzToken implements org.apache.thrift.TBase<AuthzToken, AuthzToken._Fields>, java.io.Serializable, Cloneable, Comparable<AuthzToken> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("AuthzToken"); http://git-wip-us.apache.org/repos/asf/airavata/blob/47290ad1/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/status/ExperimentStatus.java ---------------------------------------------------------------------- diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/status/ExperimentStatus.java b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/status/ExperimentStatus.java index 89e9668..ebf6f98 100644 --- a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/status/ExperimentStatus.java +++ b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/status/ExperimentStatus.java @@ -64,7 +64,7 @@ import org.slf4j.LoggerFactory; * User friendly reason on how the state is inferred. * */ -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-03-30") +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-04-22") public class ExperimentStatus implements org.apache.thrift.TBase<ExperimentStatus, ExperimentStatus._Fields>, java.io.Serializable, Cloneable, Comparable<ExperimentStatus> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ExperimentStatus"); http://git-wip-us.apache.org/repos/asf/airavata/blob/47290ad1/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/status/JobStatus.java ---------------------------------------------------------------------- diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/status/JobStatus.java b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/status/JobStatus.java index 44e7306..b2beab4 100644 --- a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/status/JobStatus.java +++ b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/status/JobStatus.java @@ -51,7 +51,7 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-03-30") +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-04-22") public class JobStatus implements org.apache.thrift.TBase<JobStatus, JobStatus._Fields>, java.io.Serializable, Cloneable, Comparable<JobStatus> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("JobStatus"); http://git-wip-us.apache.org/repos/asf/airavata/blob/47290ad1/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/status/ProcessStatus.java ---------------------------------------------------------------------- diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/status/ProcessStatus.java b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/status/ProcessStatus.java index 0dd999f..70f2708 100644 --- a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/status/ProcessStatus.java +++ b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/status/ProcessStatus.java @@ -51,7 +51,7 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-03-30") +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-04-22") public class ProcessStatus implements org.apache.thrift.TBase<ProcessStatus, ProcessStatus._Fields>, java.io.Serializable, Cloneable, Comparable<ProcessStatus> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ProcessStatus"); http://git-wip-us.apache.org/repos/asf/airavata/blob/47290ad1/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/status/TaskStatus.java ---------------------------------------------------------------------- diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/status/TaskStatus.java b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/status/TaskStatus.java index 03bdf15..13a384e 100644 --- a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/status/TaskStatus.java +++ b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/status/TaskStatus.java @@ -51,7 +51,7 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-03-30") +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-04-22") public class TaskStatus implements org.apache.thrift.TBase<TaskStatus, TaskStatus._Fields>, java.io.Serializable, Cloneable, Comparable<TaskStatus> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TaskStatus"); http://git-wip-us.apache.org/repos/asf/airavata/blob/47290ad1/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/task/DataStagingTaskModel.java ---------------------------------------------------------------------- diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/task/DataStagingTaskModel.java b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/task/DataStagingTaskModel.java index 617d209..8f25df2 100644 --- a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/task/DataStagingTaskModel.java +++ b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/task/DataStagingTaskModel.java @@ -51,7 +51,7 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-03-30") +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-04-22") public class DataStagingTaskModel implements org.apache.thrift.TBase<DataStagingTaskModel, DataStagingTaskModel._Fields>, java.io.Serializable, Cloneable, Comparable<DataStagingTaskModel> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("DataStagingTaskModel"); http://git-wip-us.apache.org/repos/asf/airavata/blob/47290ad1/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/task/EnvironmentSetupTaskModel.java ---------------------------------------------------------------------- diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/task/EnvironmentSetupTaskModel.java b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/task/EnvironmentSetupTaskModel.java index af2b209..689f851 100644 --- a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/task/EnvironmentSetupTaskModel.java +++ b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/task/EnvironmentSetupTaskModel.java @@ -55,7 +55,7 @@ import org.slf4j.LoggerFactory; * EnvironmentSetupTaskModel: A structure holding the environment creation task details * */ -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-03-30") +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-04-22") public class EnvironmentSetupTaskModel implements org.apache.thrift.TBase<EnvironmentSetupTaskModel, EnvironmentSetupTaskModel._Fields>, java.io.Serializable, Cloneable, Comparable<EnvironmentSetupTaskModel> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("EnvironmentSetupTaskModel"); http://git-wip-us.apache.org/repos/asf/airavata/blob/47290ad1/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/task/JobSubmissionTaskModel.java ---------------------------------------------------------------------- diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/task/JobSubmissionTaskModel.java b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/task/JobSubmissionTaskModel.java index cbf8a02..b5a35a6 100644 --- a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/task/JobSubmissionTaskModel.java +++ b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/task/JobSubmissionTaskModel.java @@ -51,7 +51,7 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-03-30") +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-04-22") public class JobSubmissionTaskModel implements org.apache.thrift.TBase<JobSubmissionTaskModel, JobSubmissionTaskModel._Fields>, java.io.Serializable, Cloneable, Comparable<JobSubmissionTaskModel> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("JobSubmissionTaskModel"); http://git-wip-us.apache.org/repos/asf/airavata/blob/47290ad1/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/task/MonitorTaskModel.java ---------------------------------------------------------------------- diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/task/MonitorTaskModel.java b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/task/MonitorTaskModel.java index af46f7e..3ad2397 100644 --- a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/task/MonitorTaskModel.java +++ b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/task/MonitorTaskModel.java @@ -51,7 +51,7 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-03-30") +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-04-22") public class MonitorTaskModel implements org.apache.thrift.TBase<MonitorTaskModel, MonitorTaskModel._Fields>, java.io.Serializable, Cloneable, Comparable<MonitorTaskModel> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("MonitorTaskModel"); http://git-wip-us.apache.org/repos/asf/airavata/blob/47290ad1/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/task/TaskModel.java ---------------------------------------------------------------------- diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/task/TaskModel.java b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/task/TaskModel.java index 1859145..6051a2f 100644 --- a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/task/TaskModel.java +++ b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/task/TaskModel.java @@ -60,7 +60,7 @@ import org.slf4j.LoggerFactory; * subTaskModel: * A generic byte object for the Task developer to store internal serialized data into registry catalogs. */ -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-03-30") +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-04-22") public class TaskModel implements org.apache.thrift.TBase<TaskModel, TaskModel._Fields>, java.io.Serializable, Cloneable, Comparable<TaskModel> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TaskModel"); http://git-wip-us.apache.org/repos/asf/airavata/blob/47290ad1/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/workspace/Gateway.java ---------------------------------------------------------------------- diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/workspace/Gateway.java b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/workspace/Gateway.java index 4058956..afd7680 100644 --- a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/workspace/Gateway.java +++ b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/workspace/Gateway.java @@ -51,7 +51,7 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-03-30") +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-04-22") public class Gateway implements org.apache.thrift.TBase<Gateway, Gateway._Fields>, java.io.Serializable, Cloneable, Comparable<Gateway> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("Gateway"); http://git-wip-us.apache.org/repos/asf/airavata/blob/47290ad1/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/workspace/Group.java ---------------------------------------------------------------------- diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/workspace/Group.java b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/workspace/Group.java index 1f1c6c5..9de120a 100644 --- a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/workspace/Group.java +++ b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/workspace/Group.java @@ -51,7 +51,7 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-03-30") +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-04-22") public class Group implements org.apache.thrift.TBase<Group, Group._Fields>, java.io.Serializable, Cloneable, Comparable<Group> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("Group"); http://git-wip-us.apache.org/repos/asf/airavata/blob/47290ad1/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/workspace/Project.java ---------------------------------------------------------------------- diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/workspace/Project.java b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/workspace/Project.java index 836dbf6..2a9548e 100644 --- a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/workspace/Project.java +++ b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/workspace/Project.java @@ -51,7 +51,7 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-03-30") +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-04-22") public class Project implements org.apache.thrift.TBase<Project, Project._Fields>, java.io.Serializable, Cloneable, Comparable<Project> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("Project"); http://git-wip-us.apache.org/repos/asf/airavata/blob/47290ad1/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/workspace/User.java ---------------------------------------------------------------------- diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/workspace/User.java b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/workspace/User.java index 9c2d6a7..b0fcf3b 100644 --- a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/workspace/User.java +++ b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/workspace/User.java @@ -51,7 +51,7 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-03-30") +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-04-22") public class User implements org.apache.thrift.TBase<User, User._Fields>, java.io.Serializable, Cloneable, Comparable<User> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("User"); http://git-wip-us.apache.org/repos/asf/airavata/blob/47290ad1/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/ResourceType.java ---------------------------------------------------------------------- diff --git a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/ResourceType.java b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/ResourceType.java index 3c5bd5a..1d7aeba 100644 --- a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/ResourceType.java +++ b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/ResourceType.java @@ -23,6 +23,7 @@ public enum ResourceType { GATEWAY, PROJECT, USER, + NOTIFICATION, PROJECT_USER, GATEWAY_WORKER, EXPERIMENT, http://git-wip-us.apache.org/repos/asf/airavata/blob/47290ad1/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/impl/ExperimentCatalogImpl.java ---------------------------------------------------------------------- diff --git a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/impl/ExperimentCatalogImpl.java b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/impl/ExperimentCatalogImpl.java index 48d31b0..9060f52 100644 --- a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/impl/ExperimentCatalogImpl.java +++ b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/impl/ExperimentCatalogImpl.java @@ -38,6 +38,7 @@ import org.apache.airavata.model.status.ProcessStatus; import org.apache.airavata.model.status.TaskStatus; import org.apache.airavata.model.task.TaskModel; import org.apache.airavata.model.workspace.Gateway; +import org.apache.airavata.model.workspace.Notification; import org.apache.airavata.model.workspace.Project; import org.apache.airavata.registry.core.experiment.catalog.ExpCatResourceUtils; import org.apache.airavata.registry.core.experiment.catalog.resources.GatewayResource; @@ -57,6 +58,7 @@ public class ExperimentCatalogImpl implements ExperimentCatalog { private ExperimentRegistry experimentRegistry = null; private ProjectRegistry projectRegistry = null; private GatewayRegistry gatewayRegistry = null; + private NotificationRegistry notificationRegistry = null; public ExperimentCatalogImpl() throws RegistryException{ try { @@ -77,6 +79,7 @@ public class ExperimentCatalogImpl implements ExperimentCatalog { experimentRegistry = new ExperimentRegistry(gatewayResource, user); projectRegistry = new ProjectRegistry(gatewayResource, user); gatewayRegistry = new GatewayRegistry(); + notificationRegistry = new NotificationRegistry(); } catch (ApplicationSettingsException e) { logger.error("Unable to read airavata server properties..", e); throw new RegistryException("Unable to read airavata server properties..", e); @@ -100,6 +103,7 @@ public class ExperimentCatalogImpl implements ExperimentCatalog { experimentRegistry = new ExperimentRegistry(gatewayResource, user); projectRegistry = new ProjectRegistry(gatewayResource, user); gatewayRegistry = new GatewayRegistry(); + notificationRegistry = new NotificationRegistry(); } /** @@ -122,6 +126,8 @@ public class ExperimentCatalogImpl implements ExperimentCatalog { return experimentRegistry.addExperiment((ExperimentModel) newObjectToAdd); case GATEWAY: return gatewayRegistry.addGateway((Gateway)newObjectToAdd); + case NOTIFICATION: + return notificationRegistry.createNotification((Notification)newObjectToAdd); default: logger.error("Unsupported top level type..", new UnsupportedOperationException()); throw new UnsupportedOperationException(); @@ -212,6 +218,8 @@ public class ExperimentCatalogImpl implements ExperimentCatalog { case GATEWAY: gatewayRegistry.updateGateway((String)identifier, (Gateway)newObjectToUpdate); break; + case NOTIFICATION: + notificationRegistry.updateNotification((Notification)newObjectToUpdate); case EXPERIMENT: experimentRegistry.updateExperiment((ExperimentModel) newObjectToUpdate, (String) identifier); break; @@ -319,6 +327,8 @@ public class ExperimentCatalogImpl implements ExperimentCatalog { return projectRegistry.getProject((String)identifier); case GATEWAY: return gatewayRegistry.getGateway((String)identifier); + case NOTIFICATION: + return notificationRegistry.getNotification((String) identifier); case EXPERIMENT: return experimentRegistry.getExperiment((String) identifier, null); case USER_CONFIGURATION_DATA: @@ -390,6 +400,11 @@ public class ExperimentCatalogImpl implements ExperimentCatalog { result.add(gateway); } return result; + case NOTIFICATION: + List<Notification> notifications = notificationRegistry.getAllGatewayNotifications((String) value); + for(Notification n : notifications) + result.add(n); + return result; case EXPERIMENT: List<ExperimentModel> experimentList = experimentRegistry.getExperimentList(fieldName, value); for (ExperimentModel experiment : experimentList) { @@ -615,6 +630,8 @@ public class ExperimentCatalogImpl implements ExperimentCatalog { case GATEWAY: gatewayRegistry.removeGateway((String)identifier); break; + case NOTIFICATION: + notificationRegistry.deleteNotification((String)identifier); case EXPERIMENT: experimentRegistry.removeExperiment((String) identifier); break; http://git-wip-us.apache.org/repos/asf/airavata/blob/47290ad1/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/impl/NotificationRegistry.java ---------------------------------------------------------------------- diff --git a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/impl/NotificationRegistry.java b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/impl/NotificationRegistry.java new file mode 100644 index 0000000..d30274e --- /dev/null +++ b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/impl/NotificationRegistry.java @@ -0,0 +1,87 @@ +/* + * + * 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.core.experiment.catalog.impl; + +import org.apache.airavata.model.workspace.Notification; +import org.apache.airavata.registry.core.experiment.catalog.ExperimentCatResource; +import org.apache.airavata.registry.core.experiment.catalog.ResourceType; +import org.apache.airavata.registry.core.experiment.catalog.resources.NotificationResource; +import org.apache.airavata.registry.core.experiment.catalog.utils.ThriftDataModelConversion; +import org.apache.airavata.registry.cpi.RegistryException; + +import java.sql.Timestamp; +import java.util.ArrayList; +import java.util.List; +import java.util.UUID; + +public class NotificationRegistry { + + public String createNotification(Notification notification) throws RegistryException { + notification.setNotificationId(getNotificationId()); + updateNotification(notification); + return notification.getNotificationId(); + } + + public void updateNotification(Notification notification) throws RegistryException { + NotificationResource notificationResource = new NotificationResource(); + notificationResource.setNotificationId(notification.getNotificationId()); + notificationResource.setGatewayId(notification.getGatewayId()); + notificationResource.setTitle(notification.getTitle()); + notificationResource.setNotificationMessage(notification.getNotifcationMessage()); + if(notification.getPublishedtime() != 0) + notificationResource.setPublishedTime(new Timestamp(notification.getPublishedtime())); + if(notification.getExpirationTime() != 0) + notificationResource.setExpirationTime(new Timestamp(notification.getExpirationTime())); + notificationResource.save(); + } + + public Notification getNotification(String notificationId) throws RegistryException{ + NotificationResource notificationResource = new NotificationResource(); + NotificationResource resource = (NotificationResource)notificationResource.get(ResourceType.NOTIFICATION, notificationId); + if(resource != null){ + return ThriftDataModelConversion.getNotification(resource); + } + return null; + } + + public void deleteNotification(String notificationId) throws RegistryException { + NotificationResource notificationResource = new NotificationResource(); + notificationResource.remove(ResourceType.NOTIFICATION, notificationId); + } + + public List<Notification> getAllGatewayNotifications(String gatewayId) throws RegistryException { + List<Notification> notifications = new ArrayList<>(); + NotificationResource notificationResource = new NotificationResource(); + List<ExperimentCatResource> resources = notificationResource.getAllNotifications(gatewayId); + if(resources != null && !resources.isEmpty()){ + for(ExperimentCatResource e : resources){ + notifications.add(ThriftDataModelConversion.getNotification((NotificationResource) e)); + } + } + return notifications; + } + + private String getNotificationId (){ + return UUID.randomUUID().toString(); + } + +} http://git-wip-us.apache.org/repos/asf/airavata/blob/47290ad1/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/impl/UserReg.java ---------------------------------------------------------------------- diff --git a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/impl/UserReg.java b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/impl/UserReg.java deleted file mode 100644 index 6dd6130..0000000 --- a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/impl/UserReg.java +++ /dev/null @@ -1,41 +0,0 @@ -/* - * - * 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.core.experiment.catalog.impl; - -import org.apache.airavata.common.exception.ApplicationSettingsException; -import org.apache.airavata.common.utils.ServerSettings; -import org.apache.airavata.registry.core.experiment.catalog.ExpCatResourceUtils; -import org.apache.airavata.registry.core.experiment.catalog.resources.WorkerResource; -import org.apache.airavata.registry.cpi.RegistryException; - -public class UserReg { - public WorkerResource getSystemUser() throws ApplicationSettingsException, RegistryException { - return (WorkerResource) ExpCatResourceUtils.getWorker(ServerSettings.getDefaultUserGateway(), ServerSettings.getDefaultUser()); - } - - public WorkerResource getExistingUser (String gatewayName, String userName) throws RegistryException { - return (WorkerResource) ExpCatResourceUtils.getWorker(gatewayName, userName); - } - - - -} http://git-wip-us.apache.org/repos/asf/airavata/blob/47290ad1/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/impl/UserRegistry.java ---------------------------------------------------------------------- diff --git a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/impl/UserRegistry.java b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/impl/UserRegistry.java new file mode 100644 index 0000000..eeee3c2 --- /dev/null +++ b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/impl/UserRegistry.java @@ -0,0 +1,41 @@ +/* + * + * 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.core.experiment.catalog.impl; + +import org.apache.airavata.common.exception.ApplicationSettingsException; +import org.apache.airavata.common.utils.ServerSettings; +import org.apache.airavata.registry.core.experiment.catalog.ExpCatResourceUtils; +import org.apache.airavata.registry.core.experiment.catalog.resources.WorkerResource; +import org.apache.airavata.registry.cpi.RegistryException; + +public class UserRegistry { + public WorkerResource getSystemUser() throws ApplicationSettingsException, RegistryException { + return (WorkerResource) ExpCatResourceUtils.getWorker(ServerSettings.getDefaultUserGateway(), ServerSettings.getDefaultUser()); + } + + public WorkerResource getExistingUser (String gatewayName, String userName) throws RegistryException { + return (WorkerResource) ExpCatResourceUtils.getWorker(gatewayName, userName); + } + + + +} http://git-wip-us.apache.org/repos/asf/airavata/blob/47290ad1/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/model/Notification.java ---------------------------------------------------------------------- diff --git a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/model/Notification.java b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/model/Notification.java new file mode 100644 index 0000000..14d43f9 --- /dev/null +++ b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/model/Notification.java @@ -0,0 +1,98 @@ +/* + * + * 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.core.experiment.catalog.model; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.Id; +import javax.persistence.Table; +import java.sql.Timestamp; + +@Entity +@Table(name = "NOTIFICATION") +public class Notification { + private final static Logger logger = LoggerFactory.getLogger(Notification.class); + private String notificationId; + private String gatewayId; + private String title; + private String notificationMessage; + private Timestamp publishedDate; + private Timestamp expirationDate; + + @Id + @Column(name = "NOTIFICATION_ID") + public String getNotificationId() { + return notificationId; + } + + public void setNotificationId(String notificationId) { + this.notificationId = notificationId; + } + + @Column(name = "GATEWAY_ID") + public String getGatewayId() { + return gatewayId; + } + + public void setGatewayId(String gatewayId) { + this.gatewayId = gatewayId; + } + + @Column(name = "TITLE") + public String getTitle() { + return title; + } + + public void setTitle(String title) { + this.title = title; + } + + @Column(name = "NOTIFICATION_MESSAGE") + public String setNotificationMessage() { + return notificationMessage; + } + + public void setNotificationMessage(String notificationMessage) { + this.notificationMessage = notificationMessage; + } + + @Column(name = "PUBLISHED_DATE") + public Timestamp getPublishedDate() { + return publishedDate; + } + + public void setPublishedDate (Timestamp publishedDate) { + this.publishedDate = publishedDate; + } + + @Column(name = "EXPIRATION_DATE") + public Timestamp getExpirationDate() { + return expirationDate; + } + + public void setExpirationDate (Timestamp expirationDate) { + this.expirationDate = expirationDate; + } + +} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/airavata/blob/47290ad1/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/resources/AbstractExpCatResource.java ---------------------------------------------------------------------- diff --git a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/resources/AbstractExpCatResource.java b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/resources/AbstractExpCatResource.java index fb91261..5d04eff 100644 --- a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/resources/AbstractExpCatResource.java +++ b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/resources/AbstractExpCatResource.java @@ -33,6 +33,7 @@ public abstract class AbstractExpCatResource implements ExperimentCatResource { public static final String USERS = "Users"; public static final String GATEWAY_WORKER = "GatewayWorker"; public static final String PROJECT = "Project"; + public static final String NOTIFICATION = "Notification"; public static final String PROJECT_USER = "ProjectUser"; public static final String EXPERIMENT = "Experiment"; public static final String EXPERIMENT_INPUT = "ExperimentInput"; @@ -68,6 +69,12 @@ public abstract class AbstractExpCatResource implements ExperimentCatResource { public static final String GATEWAY_ID = "gatewayId"; } + // Notifications table + public final class NotificationConstants { + public static final String NOTIFICATION_ID = "notificationId"; + public static final String GATEWAY_ID = "gatewayId"; + } + // Gateway_Worker table public final class GatewayWorkerConstants { public static final String USERNAME = "userName"; http://git-wip-us.apache.org/repos/asf/airavata/blob/47290ad1/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/resources/NotificationResource.java ---------------------------------------------------------------------- diff --git a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/resources/NotificationResource.java b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/resources/NotificationResource.java new file mode 100644 index 0000000..a569578 --- /dev/null +++ b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/resources/NotificationResource.java @@ -0,0 +1,267 @@ +/* + * + * 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.core.experiment.catalog.resources; + +import org.apache.airavata.registry.core.experiment.catalog.ExpCatResourceUtils; +import org.apache.airavata.registry.core.experiment.catalog.ExperimentCatResource; +import org.apache.airavata.registry.core.experiment.catalog.ResourceType; +import org.apache.airavata.registry.core.experiment.catalog.model.Notification; +import org.apache.airavata.registry.core.experiment.catalog.utils.QueryGenerator; +import org.apache.airavata.registry.cpi.RegistryException; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import javax.persistence.EntityManager; +import javax.persistence.Query; +import java.sql.Timestamp; +import java.util.ArrayList; +import java.util.List; + +public class NotificationResource extends AbstractExpCatResource { + + private final static Logger logger = LoggerFactory.getLogger(NotificationResource.class); + + private String notificationId; + private String gatewayId; + private String title; + private String notificationMessage; + private Timestamp publishedTime; + private Timestamp expirationTime; + + public String getNotificationId() { + return notificationId; + } + + public void setNotificationId(String notificationId) { + this.notificationId = notificationId; + } + + public String getGatewayId() { + return gatewayId; + } + + public void setGatewayId(String gatewayId) { + this.gatewayId = gatewayId; + } + + public String getTitle() { + return title; + } + + public void setTitle(String title) { + this.title = title; + } + + public String getNotificationMessage() { + return notificationMessage; + } + + public void setNotificationMessage(String notificationMessage) { + this.notificationMessage = notificationMessage; + } + + public Timestamp getPublishedTime() { + return publishedTime; + } + + public void setPublishedTime(Timestamp publishedTime) { + this.publishedTime = publishedTime; + } + + public Timestamp getExpirationTime() { + return expirationTime; + } + + public void setExpirationTime(Timestamp expirationTime) { + this.expirationTime = expirationTime; + } + + /** + * @param type child resource type + * @return child resource + */ + public ExperimentCatResource create(ResourceType type) throws RegistryException { + logger.error("Unsupported resource type for user resource.", new UnsupportedOperationException()); + throw new UnsupportedOperationException(); + } + + /** + * @param type child resource type + * @param name child resource name + */ + public void remove(ResourceType type, Object name) throws RegistryException { + EntityManager em = null; + try { + em = ExpCatResourceUtils.getEntityManager(); + em.getTransaction().begin(); + QueryGenerator generator = new QueryGenerator(NOTIFICATION); + generator.setParameter(NotificationConstants.GATEWAY_ID, gatewayId); + Query q = generator.deleteQuery(em); + q.executeUpdate(); + em.getTransaction().commit(); + em.close(); + } catch (Exception e) { + logger.error(e.getMessage(), e); + throw new RegistryException(e); + } finally { + if (em != null && em.isOpen()) { + if (em.getTransaction().isActive()) { + em.getTransaction().rollback(); + } + em.close(); + } + } + } + + /** + * @param type child resource type + * @param name child resource name + * @return UnsupportedOperationException + */ + public ExperimentCatResource get(ResourceType type, Object notificationId) throws RegistryException { + EntityManager em = null; + try { + if(!type.equals(ResourceType.NOTIFICATION)){ + logger.error("Unsupported resource type for Notification resource.", new IllegalArgumentException()); + throw new IllegalArgumentException("Unsupported resource type for Notification resource."); + } + em = ExpCatResourceUtils.getEntityManager(); + em.getTransaction().begin(); + QueryGenerator generator = new QueryGenerator(NOTIFICATION); + generator.setParameter(NotificationConstants.NOTIFICATION_ID, notificationId); + Query q = generator.selectQuery(em); + Notification notification = (Notification)q.getSingleResult(); + em.getTransaction().commit(); + em.close(); + if(notification != null) + return Utils.getResource(ResourceType.NOTIFICATION, notification); + else + return null; + } catch (Exception e) { + logger.error(e.getMessage(), e); + throw new RegistryException(e); + } finally { + if (em != null && em.isOpen()) { + if (em.getTransaction().isActive()) { + em.getTransaction().rollback(); + } + em.close(); + } + } + } + + /** + * @param type child resource type + * @return UnsupportedOperationException + */ + public List<ExperimentCatResource> get(ResourceType type) throws RegistryException { + logger.error("Unsupported resource type for user resource.", new UnsupportedOperationException()); + throw new UnsupportedOperationException(); + } + + /** + * save user to the database + */ + public void save() throws RegistryException { + EntityManager em = null; + try { + em = ExpCatResourceUtils.getEntityManager(); + Notification existingNotification = em.find(Notification.class, notificationId); + em.close(); + em = ExpCatResourceUtils.getEntityManager(); + em.getTransaction().begin(); + if (existingNotification != null) { + existingNotification.setNotificationId(notificationId); + existingNotification.setGatewayId(gatewayId); + existingNotification.setTitle(title); + existingNotification.setNotificationMessage(notificationMessage); + existingNotification.setPublishedDate(publishedTime); + existingNotification.setExpirationDate(expirationTime); + em.merge(existingNotification); + } else { + Notification notification = new Notification(); + notification.setNotificationId(notificationId); + notification.setGatewayId(gatewayId); + notification.setTitle(title); + notification.setNotificationMessage(notificationMessage); + notification.setPublishedDate(publishedTime); + notification.setExpirationDate(expirationTime); + em.persist(notification); + } + em.getTransaction().commit(); + em.close(); + } catch (Exception e) { + logger.error(e.getMessage(), e); + throw new RegistryException(e); + } finally { + if (em != null && em.isOpen()) { + if (em.getTransaction().isActive()) { + em.getTransaction().rollback(); + } + em.close(); + } + } + } + + /** + * @param type child resource type + * @param name child resource name + * @return UnsupportedOperationException + */ + public boolean isExists(ResourceType type, Object name) throws RegistryException { + logger.error("Unsupported resource type for user resource.", new UnsupportedOperationException()); + throw new UnsupportedOperationException(); + } + + public List<ExperimentCatResource> getAllNotifications(String gatewayId) throws RegistryException{ + List<ExperimentCatResource> resourceList = new ArrayList<ExperimentCatResource>(); + EntityManager em = null; + try { + em = ExpCatResourceUtils.getEntityManager(); + em.getTransaction().begin(); + QueryGenerator generator = new QueryGenerator(NOTIFICATION); + generator.setParameter(NotificationConstants.GATEWAY_ID, gatewayId); + Query q = generator.selectQuery(em); + List<?> results = q.getResultList(); + if (results.size() != 0) { + for (Object result : results) { + Notification notification = (Notification) result; + NotificationResource notificationResource = (NotificationResource) + Utils.getResource(ResourceType.NOTIFICATION, notification); + resourceList.add(notificationResource); + } + } + em.getTransaction().commit(); + em.close(); + } catch (Exception e) { + logger.error(e.getMessage(), e); + throw new RegistryException(e); + } finally { + if (em != null && em.isOpen()) { + if (em.getTransaction().isActive()) { + em.getTransaction().rollback(); + } + em.close(); + } + } + return resourceList; + } +} http://git-wip-us.apache.org/repos/asf/airavata/blob/47290ad1/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/resources/Utils.java ---------------------------------------------------------------------- diff --git a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/resources/Utils.java b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/resources/Utils.java index 340e020..0f5e2e5 100644 --- a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/resources/Utils.java +++ b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/resources/Utils.java @@ -180,6 +180,13 @@ public class Utils { logger.error("Object should be a Project.", new IllegalArgumentException()); throw new IllegalArgumentException("Object should be a Project."); } + case NOTIFICATION: + if (o instanceof Notification){ + return createNotification((Notification) o); + } else { + logger.error("Object should be a Project.", new IllegalArgumentException()); + throw new IllegalArgumentException("Object should be a Project."); + } case PROJECT_USER: if (o instanceof ProjectUser){ return createProjectUser((ProjectUser) o); @@ -361,6 +368,20 @@ public class Utils { return projectResource; } + private static ExperimentCatResource createNotification(Notification o) { + NotificationResource notificationResource = new NotificationResource(); + if (o != null){ + notificationResource.setNotificationId(o.getNotificationId()); + notificationResource.setGatewayId(o.getGatewayId()); + notificationResource.setTitle(o.getTitle()); + notificationResource.setNotificationMessage(o.setNotificationMessage()); + notificationResource.setPublishedTime(o.getPublishedDate()); + notificationResource.setExpirationTime(o.getExpirationDate()); + } + + return notificationResource; + } + private static ExperimentCatResource createProjectUser(ProjectUser o) { ProjectUserResource projectUserResource = new ProjectUserResource(); if (o != null){ http://git-wip-us.apache.org/repos/asf/airavata/blob/47290ad1/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/utils/ThriftDataModelConversion.java ---------------------------------------------------------------------- diff --git a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/utils/ThriftDataModelConversion.java b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/utils/ThriftDataModelConversion.java index d6f92ff..30523c4 100644 --- a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/utils/ThriftDataModelConversion.java +++ b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/utils/ThriftDataModelConversion.java @@ -36,6 +36,7 @@ import org.apache.airavata.model.status.*; import org.apache.airavata.model.task.TaskModel; import org.apache.airavata.model.task.TaskTypes; import org.apache.airavata.model.workspace.Gateway; +import org.apache.airavata.model.workspace.Notification; import org.apache.airavata.model.workspace.Project; import org.apache.airavata.registry.core.experiment.catalog.ExperimentCatResource; import org.apache.airavata.registry.core.experiment.catalog.resources.*; @@ -562,4 +563,20 @@ public class ThriftDataModelConversion { } return null; } + + public static Notification getNotification(NotificationResource resource){ + if(resource != null){ + Notification notification = new Notification(); + notification.setNotificationId(resource.getNotificationId()); + notification.setGatewayId(resource.getGatewayId()); + notification.setTitle(resource.getTitle()); + notification.setNotifcationMessage(resource.getNotificationMessage()); + if(resource.getPublishedTime() != null) + notification.setPublishedtime(resource.getPublishedTime().getTime()); + if(resource.getExpirationTime() != null) + notification.setExpirationTime(resource.getExpirationTime().getTime()); + return notification; + } + return null; + } } \ No newline at end of file http://git-wip-us.apache.org/repos/asf/airavata/blob/47290ad1/modules/registry/registry-core/src/main/resources/META-INF/persistence.xml ---------------------------------------------------------------------- diff --git a/modules/registry/registry-core/src/main/resources/META-INF/persistence.xml b/modules/registry/registry-core/src/main/resources/META-INF/persistence.xml index f38cdc6..150cf55 100644 --- a/modules/registry/registry-core/src/main/resources/META-INF/persistence.xml +++ b/modules/registry/registry-core/src/main/resources/META-INF/persistence.xml @@ -91,6 +91,7 @@ <class>org.apache.airavata.registry.core.experiment.catalog.model.UserConfigurationData</class> <class>org.apache.airavata.registry.core.experiment.catalog.model.Job</class> <class>org.apache.airavata.registry.core.experiment.catalog.model.JobStatus</class> + <class>org.apache.airavata.registry.core.experiment.catalog.model.Notification</class> <exclude-unlisted-classes>true</exclude-unlisted-classes> </persistence-unit> <persistence-unit name="replicacatalog_data"> http://git-wip-us.apache.org/repos/asf/airavata/blob/47290ad1/modules/registry/registry-core/src/main/resources/expcatalog-derby.sql ---------------------------------------------------------------------- diff --git a/modules/registry/registry-core/src/main/resources/expcatalog-derby.sql b/modules/registry/registry-core/src/main/resources/expcatalog-derby.sql index a00dacf..e437e8f 100644 --- a/modules/registry/registry-core/src/main/resources/expcatalog-derby.sql +++ b/modules/registry/registry-core/src/main/resources/expcatalog-derby.sql @@ -27,6 +27,17 @@ CREATE TABLE GATEWAY PRIMARY KEY (GATEWAY_ID) ); +CREATE TABLE NOTIFICATION +( + NOTIFICATION_ID VARCHAR(255), + GATEWAY_ID VARCHAR(255), + TITLE VARCHAR(255), + NOTIFICATION_MESSAGE VARCHAR(4096), + PUBLISHED_DATE TIMESTAMP, + EXPIRATION_DATE TIMESTAMP, + PRIMARY KEY (NOTIFICATION_ID) +); + CREATE TABLE USERS ( USER_NAME VARCHAR(255), http://git-wip-us.apache.org/repos/asf/airavata/blob/47290ad1/modules/registry/registry-core/src/main/resources/expcatalog-mysql.sql ---------------------------------------------------------------------- diff --git a/modules/registry/registry-core/src/main/resources/expcatalog-mysql.sql b/modules/registry/registry-core/src/main/resources/expcatalog-mysql.sql index 252e940..9bdad05 100644 --- a/modules/registry/registry-core/src/main/resources/expcatalog-mysql.sql +++ b/modules/registry/registry-core/src/main/resources/expcatalog-mysql.sql @@ -27,6 +27,17 @@ CREATE TABLE GATEWAY PRIMARY KEY (GATEWAY_ID) ); +CREATE TABLE NOTIFICATION +( + NOTIFICATION_ID VARCHAR(255), + GATEWAY_ID VARCHAR(255), + TITLE VARCHAR(255), + NOTIFICATION_MESSAGE VARCHAR(4096), + PUBLISHED_DATE TIMESTAMP, + EXPIRATION_DATE TIMESTAMP, + PRIMARY KEY (NOTIFICATION_ID) +); + CREATE TABLE USERS ( USER_NAME VARCHAR(255), http://git-wip-us.apache.org/repos/asf/airavata/blob/47290ad1/modules/registry/registry-cpi/src/main/java/org/apache/airavata/registry/cpi/ExpCatParentDataType.java ---------------------------------------------------------------------- diff --git a/modules/registry/registry-cpi/src/main/java/org/apache/airavata/registry/cpi/ExpCatParentDataType.java b/modules/registry/registry-cpi/src/main/java/org/apache/airavata/registry/cpi/ExpCatParentDataType.java index 1482e13..b9eca68 100644 --- a/modules/registry/registry-cpi/src/main/java/org/apache/airavata/registry/cpi/ExpCatParentDataType.java +++ b/modules/registry/registry-cpi/src/main/java/org/apache/airavata/registry/cpi/ExpCatParentDataType.java @@ -25,7 +25,8 @@ public enum ExpCatParentDataType { USER, PROJECT, EXPERIMENT, - GATEWAY + GATEWAY, + NOTIFICATION } http://git-wip-us.apache.org/repos/asf/airavata/blob/47290ad1/modules/registry/registry-cpi/src/main/java/org/apache/airavata/registry/cpi/ExperimentCatalogModelType.java ---------------------------------------------------------------------- diff --git a/modules/registry/registry-cpi/src/main/java/org/apache/airavata/registry/cpi/ExperimentCatalogModelType.java b/modules/registry/registry-cpi/src/main/java/org/apache/airavata/registry/cpi/ExperimentCatalogModelType.java index 44cb2ed..433ce60 100644 --- a/modules/registry/registry-cpi/src/main/java/org/apache/airavata/registry/cpi/ExperimentCatalogModelType.java +++ b/modules/registry/registry-cpi/src/main/java/org/apache/airavata/registry/cpi/ExperimentCatalogModelType.java @@ -25,6 +25,7 @@ public enum ExperimentCatalogModelType { USER, PROJECT, GATEWAY, + NOTIFICATION, EXPERIMENT, EXPERIMENT_STATISTICS, EXPERIMENT_INPUT, http://git-wip-us.apache.org/repos/asf/airavata/blob/47290ad1/thrift-interface-descriptions/airavata-apis/airavata_api.thrift ---------------------------------------------------------------------- diff --git a/thrift-interface-descriptions/airavata-apis/airavata_api.thrift b/thrift-interface-descriptions/airavata-apis/airavata_api.thrift index d54a6d9..117feed 100644 --- a/thrift-interface-descriptions/airavata-apis/airavata_api.thrift +++ b/thrift-interface-descriptions/airavata-apis/airavata_api.thrift @@ -197,6 +197,39 @@ service Airavata { 3: airavata_errors.AiravataSystemException ase, 4: airavata_errors.AuthorizationException ae) + /** + * API methods to retrieve notifications +**/ + string createNotification(1: required security_model.AuthzToken authzToken, 2: required workspace_model.Notification notification) + throws (1: airavata_errors.InvalidRequestException ire, + 2: airavata_errors.AiravataClientException ace, + 3: airavata_errors.AiravataSystemException ase, + 4: airavata_errors.AuthorizationException ae) + + void updateNotification(1: required security_model.AuthzToken authzToken, 2: required workspace_model.Notification notification) + throws (1: airavata_errors.InvalidRequestException ire, + 2: airavata_errors.AiravataClientException ace, + 3: airavata_errors.AiravataSystemException ase, + 4: airavata_errors.AuthorizationException ae) + + + void deleteNotification(1: required security_model.AuthzToken authzToken, 2: required string gatewayId, 3: required string notificationId) + throws (1: airavata_errors.InvalidRequestException ire, + 2: airavata_errors.AiravataClientException ace, + 3: airavata_errors.AiravataSystemException ase, + 4: airavata_errors.AuthorizationException ae) + + workspace_model.Notification getNotification(1: required security_model.AuthzToken authzToken, 2: required string gatewayId, 3: required string notificationId) + throws (1: airavata_errors.InvalidRequestException ire, + 2: airavata_errors.AiravataClientException ace, + 3: airavata_errors.AiravataSystemException ase, + 4: airavata_errors.AuthorizationException ae) + + list<workspace_model.Notification> getAllNotifications(1: required security_model.AuthzToken authzToken, 2: required string gatewayId) + throws (1: airavata_errors.InvalidRequestException ire, + 2: airavata_errors.AiravataClientException ace, + 3: airavata_errors.AiravataSystemException ase, + 4: airavata_errors.AuthorizationException ae) /** * Airavata Adminstrative Funcationality http://git-wip-us.apache.org/repos/asf/airavata/blob/47290ad1/thrift-interface-descriptions/data-models/experiment-catalog-models/workspace_model.thrift ---------------------------------------------------------------------- diff --git a/thrift-interface-descriptions/data-models/experiment-catalog-models/workspace_model.thrift b/thrift-interface-descriptions/data-models/experiment-catalog-models/workspace_model.thrift index 98622ff..468edc3 100644 --- a/thrift-interface-descriptions/data-models/experiment-catalog-models/workspace_model.thrift +++ b/thrift-interface-descriptions/data-models/experiment-catalog-models/workspace_model.thrift @@ -60,4 +60,13 @@ struct Gateway { 2: optional string gatewayName, 3: optional string domain, 4: optional string emailAddress +} + +struct Notification { + 1: optional string notificationId, + 2: required string gatewayId, + 3: required string title, + 4: required string notifcationMessage, + 5: optional i64 publishedtime, + 6: optional i64 expirationTime } \ No newline at end of file
