airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chath...@apache.org
Subject [1/2] airavata git commit: fixing NPEs at registry level
Date Mon, 06 Jul 2015 15:21:10 GMT
Repository: airavata
Updated Branches:
  refs/heads/master 1d27a9c75 -> 343ea0aa3


fixing NPEs at registry level


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

Branch: refs/heads/master
Commit: 82e60f39cdffd691a4a4afb7752ba870a0034a6d
Parents: cc79236
Author: Chathuri Wimalasena <chathuri@apache.org>
Authored: Mon Jul 6 11:20:32 2015 -0400
Committer: Chathuri Wimalasena <chathuri@apache.org>
Committed: Mon Jul 6 11:20:32 2015 -0400

----------------------------------------------------------------------
 .../catalog/model/ExperimentError.java          |  6 ++--
 .../catalog/model/ExperimentInput.java          | 24 ++++++-------
 .../catalog/model/ExperimentOutput.java         | 18 +++++-----
 .../core/experiment/catalog/model/Process.java  |  6 ++--
 .../experiment/catalog/model/ProcessError.java  |  6 ++--
 .../experiment/catalog/model/ProcessInput.java  | 24 ++++++-------
 .../experiment/catalog/model/ProcessOutput.java | 18 +++++-----
 .../experiment/catalog/model/TaskError.java     |  6 ++--
 .../catalog/model/UserConfigurationData.java    | 30 ++++++++--------
 .../resources/ExperimentErrorResource.java      |  6 ++--
 .../resources/ExperimentInputResource.java      | 24 ++++++-------
 .../resources/ExperimentOutputResource.java     | 18 +++++-----
 .../catalog/resources/ExperimentResource.java   |  6 ++--
 .../catalog/resources/ProcessErrorResource.java |  6 ++--
 .../catalog/resources/ProcessInputResource.java | 24 ++++++-------
 .../resources/ProcessOutputResource.java        | 18 +++++-----
 .../catalog/resources/ProcessResource.java      |  6 ++--
 .../catalog/resources/TaskErrorResource.java    |  6 ++--
 .../UserConfigurationDataResource.java          | 30 ++++++++--------
 .../utils/ThriftDataModelConversion.java        | 38 +++++++++++---------
 20 files changed, 163 insertions(+), 157 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/82e60f39/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/model/ExperimentError.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/model/ExperimentError.java b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/model/ExperimentError.java
index af410cc..5b84c6e 100644
--- a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/model/ExperimentError.java
+++ b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/model/ExperimentError.java
@@ -36,7 +36,7 @@ public class ExperimentError {
     private Timestamp creationTime;
     private String actualErrorMessage;
     private String userFriendlyMessage;
-    private Boolean transientOrPersistent;
+    private boolean transientOrPersistent;
     private String rootCauseErrorIdList;
     private Experiment experiment;
 
@@ -94,11 +94,11 @@ public class ExperimentError {
 
     @Basic
     @Column(name = "TRANSIENT_OR_PERSISTENT")
-    public Boolean getTransientOrPersistent() {
+    public boolean getTransientOrPersistent() {
         return transientOrPersistent;
     }
 
-    public void setTransientOrPersistent(Boolean transientOrPersistent) {
+    public void setTransientOrPersistent(boolean transientOrPersistent) {
         this.transientOrPersistent = transientOrPersistent;
     }
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/82e60f39/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/model/ExperimentInput.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/model/ExperimentInput.java b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/model/ExperimentInput.java
index cb425bb..ffb6713 100644
--- a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/model/ExperimentInput.java
+++ b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/model/ExperimentInput.java
@@ -35,13 +35,13 @@ public class ExperimentInput {
     private String inputValue;
     private String dataType;
     private String applicationArgument;
-    private Boolean standardInput;
+    private boolean standardInput;
     private String userFriendlyDescription;
     private String metadata;
     private Integer inputOrder;
-    private Boolean isRequired;
-    private Boolean requiredToAddedToCmd;
-    private Boolean dataStaged;
+    private boolean isRequired;
+    private boolean requiredToAddedToCmd;
+    private boolean dataStaged;
     private Experiment experiment;
 
     @Id
@@ -97,11 +97,11 @@ public class ExperimentInput {
 
     @Basic
     @Column(name = "STANDARD_INPUT")
-    public Boolean getStandardInput() {
+    public boolean getStandardInput() {
         return standardInput;
     }
 
-    public void setStandardInput(Boolean standardInput) {
+    public void setStandardInput(boolean standardInput) {
         this.standardInput = standardInput;
     }
 
@@ -137,31 +137,31 @@ public class ExperimentInput {
 
     @Basic
     @Column(name = "IS_REQUIRED")
-    public Boolean getIsRequired() {
+    public boolean getIsRequired() {
         return isRequired;
     }
 
-    public void setIsRequired(Boolean isRequired) {
+    public void setIsRequired(boolean isRequired) {
         this.isRequired = isRequired;
     }
 
     @Basic
     @Column(name = "REQUIRED_TO_ADDED_TO_CMD")
-    public Boolean getRequiredToAddedToCmd() {
+    public boolean getRequiredToAddedToCmd() {
         return requiredToAddedToCmd;
     }
 
-    public void setRequiredToAddedToCmd(Boolean requiredToAddedToCmd) {
+    public void setRequiredToAddedToCmd(boolean requiredToAddedToCmd) {
         this.requiredToAddedToCmd = requiredToAddedToCmd;
     }
 
     @Basic
     @Column(name = "DATA_STAGED")
-    public Boolean getDataStaged() {
+    public boolean getDataStaged() {
         return dataStaged;
     }
 
-    public void setDataStaged(Boolean dataStaged) {
+    public void setDataStaged(boolean dataStaged) {
         this.dataStaged = dataStaged;
     }
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/82e60f39/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/model/ExperimentOutput.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/model/ExperimentOutput.java b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/model/ExperimentOutput.java
index af81ea2..bd8b288 100644
--- a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/model/ExperimentOutput.java
+++ b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/model/ExperimentOutput.java
@@ -35,9 +35,9 @@ public class ExperimentOutput {
     private String outputValue;
     private String dataType;
     private String applicationArgument;
-    private Boolean isRequired;
-    private Boolean requiredToAddedToCmd;
-    private Boolean dataMovement;
+    private boolean isRequired;
+    private boolean requiredToAddedToCmd;
+    private boolean dataMovement;
     private String location;
     private String searchQuery;
     private Experiment experiment;
@@ -95,31 +95,31 @@ public class ExperimentOutput {
 
     @Basic
     @Column(name = "IS_REQUIRED")
-    public Boolean getIsRequired() {
+    public boolean getIsRequired() {
         return isRequired;
     }
 
-    public void setIsRequired(Boolean isRequired) {
+    public void setIsRequired(boolean isRequired) {
         this.isRequired = isRequired;
     }
 
     @Basic
     @Column(name = "REQUIRED_TO_ADDED_TO_CMD")
-    public Boolean getRequiredToAddedToCmd() {
+    public boolean getRequiredToAddedToCmd() {
         return requiredToAddedToCmd;
     }
 
-    public void setRequiredToAddedToCmd(Boolean requiredToAddedToCmd) {
+    public void setRequiredToAddedToCmd(boolean requiredToAddedToCmd) {
         this.requiredToAddedToCmd = requiredToAddedToCmd;
     }
 
     @Basic
     @Column(name = "DATA_MOVEMENT")
-    public Boolean getDataMovement() {
+    public boolean getDataMovement() {
         return dataMovement;
     }
 
-    public void setDataMovement(Boolean dataMovement) {
+    public void setDataMovement(boolean dataMovement) {
         this.dataMovement = dataMovement;
     }
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/82e60f39/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/model/Process.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/model/Process.java b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/model/Process.java
index 83c45a7..c96c335 100644
--- a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/model/Process.java
+++ b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/model/Process.java
@@ -41,7 +41,7 @@ public class Process {
     private String applicationDeploymentId;
     private String computeResourceId;
     private String gatewayExecutionId;
-    private Boolean enableEmailNotification;
+    private boolean enableEmailNotification;
     private String emailAddresses;
     private Experiment experiment;
     private Collection<ProcessError> processErrors;
@@ -155,11 +155,11 @@ public class Process {
 
     @Basic
     @Column(name = "ENABLE_EMAIL_NOTIFICATION")
-    public Boolean getEnableEmailNotification() {
+    public boolean getEnableEmailNotification() {
         return enableEmailNotification;
     }
 
-    public void setEnableEmailNotification(Boolean enableEmailNotification) {
+    public void setEnableEmailNotification(boolean enableEmailNotification) {
         this.enableEmailNotification = enableEmailNotification;
     }
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/82e60f39/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/model/ProcessError.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/model/ProcessError.java b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/model/ProcessError.java
index 14af4f5..63fbdb2 100644
--- a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/model/ProcessError.java
+++ b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/model/ProcessError.java
@@ -37,7 +37,7 @@ public class ProcessError {
     private Timestamp creationTime;
     private String actualErrorMessage;
     private String userFriendlyMessage;
-    private Boolean transientOrPersistent;
+    private boolean transientOrPersistent;
     private String rootCauseErrorIdList;
     private Process process;
 
@@ -95,11 +95,11 @@ public class ProcessError {
 
     @Basic
     @Column(name = "TRANSIENT_OR_PERSISTENT")
-    public Boolean getTransientOrPersistent() {
+    public boolean getTransientOrPersistent() {
         return transientOrPersistent;
     }
 
-    public void setTransientOrPersistent(Boolean transientOrPersistent) {
+    public void setTransientOrPersistent(boolean transientOrPersistent) {
         this.transientOrPersistent = transientOrPersistent;
     }
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/82e60f39/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/model/ProcessInput.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/model/ProcessInput.java b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/model/ProcessInput.java
index 70dc3d1..57721c1 100644
--- a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/model/ProcessInput.java
+++ b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/model/ProcessInput.java
@@ -36,13 +36,13 @@ public class ProcessInput {
     private String inputValue;
     private String dataType;
     private String applicationArgument;
-    private Boolean standardInput;
+    private boolean standardInput;
     private String userFriendlyDescription;
     private String metadata;
     private Integer inputOrder;
-    private Boolean isRequired;
-    private Boolean requiredToAddedToCmd;
-    private Boolean dataStaged;
+    private boolean isRequired;
+    private boolean requiredToAddedToCmd;
+    private boolean dataStaged;
     private Process process;
 
     @Id
@@ -98,11 +98,11 @@ public class ProcessInput {
 
     @Basic
     @Column(name = "STANDARD_INPUT")
-    public Boolean getStandardInput() {
+    public boolean getStandardInput() {
         return standardInput;
     }
 
-    public void setStandardInput(Boolean standardInput) {
+    public void setStandardInput(boolean standardInput) {
         this.standardInput = standardInput;
     }
 
@@ -138,31 +138,31 @@ public class ProcessInput {
 
     @Basic
     @Column(name = "IS_REQUIRED")
-    public Boolean getIsRequired() {
+    public boolean getIsRequired() {
         return isRequired;
     }
 
-    public void setIsRequired(Boolean isRequired) {
+    public void setIsRequired(boolean isRequired) {
         this.isRequired = isRequired;
     }
 
     @Basic
     @Column(name = "REQUIRED_TO_ADDED_TO_CMD")
-    public Boolean getRequiredToAddedToCmd() {
+    public boolean getRequiredToAddedToCmd() {
         return requiredToAddedToCmd;
     }
 
-    public void setRequiredToAddedToCmd(Boolean requiredToAddedToCmd) {
+    public void setRequiredToAddedToCmd(boolean requiredToAddedToCmd) {
         this.requiredToAddedToCmd = requiredToAddedToCmd;
     }
 
     @Basic
     @Column(name = "DATA_STAGED")
-    public Boolean getDataStaged() {
+    public boolean getDataStaged() {
         return dataStaged;
     }
 
-    public void setDataStaged(Boolean dataStaged) {
+    public void setDataStaged(boolean dataStaged) {
         this.dataStaged = dataStaged;
     }
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/82e60f39/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/model/ProcessOutput.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/model/ProcessOutput.java b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/model/ProcessOutput.java
index 628b153..7c1738c 100644
--- a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/model/ProcessOutput.java
+++ b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/model/ProcessOutput.java
@@ -36,9 +36,9 @@ public class ProcessOutput {
     private String outputValue;
     private String dataType;
     private String applicationArgument;
-    private Boolean isRequired;
-    private Boolean requiredToAddedToCmd;
-    private Boolean dataMovement;
+    private boolean isRequired;
+    private boolean requiredToAddedToCmd;
+    private boolean dataMovement;
     private String location;
     private String searchQuery;
     private Process process;
@@ -96,31 +96,31 @@ public class ProcessOutput {
 
     @Basic
     @Column(name = "IS_REQUIRED")
-    public Boolean getIsRequired() {
+    public boolean getIsRequired() {
         return isRequired;
     }
 
-    public void setIsRequired(Boolean isRequired) {
+    public void setIsRequired(boolean isRequired) {
         this.isRequired = isRequired;
     }
 
     @Basic
     @Column(name = "REQUIRED_TO_ADDED_TO_CMD")
-    public Boolean getRequiredToAddedToCmd() {
+    public boolean getRequiredToAddedToCmd() {
         return requiredToAddedToCmd;
     }
 
-    public void setRequiredToAddedToCmd(Boolean requiredToAddedToCmd) {
+    public void setRequiredToAddedToCmd(boolean requiredToAddedToCmd) {
         this.requiredToAddedToCmd = requiredToAddedToCmd;
     }
 
     @Basic
     @Column(name = "DATA_MOVEMENT")
-    public Boolean getDataMovement() {
+    public boolean getDataMovement() {
         return dataMovement;
     }
 
-    public void setDataMovement(Boolean dataMovement) {
+    public void setDataMovement(boolean dataMovement) {
         this.dataMovement = dataMovement;
     }
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/82e60f39/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/model/TaskError.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/model/TaskError.java b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/model/TaskError.java
index ad6dccd..281b9f3 100644
--- a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/model/TaskError.java
+++ b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/model/TaskError.java
@@ -36,7 +36,7 @@ public class TaskError {
     private Timestamp creationTime;
     private String actualErrorMessage;
     private String userFriendlyMessage;
-    private Boolean transientOrPersistent;
+    private boolean transientOrPersistent;
     private String rootCauseErrorIdList;
     private Task task;
 
@@ -94,11 +94,11 @@ public class TaskError {
 
     @Basic
     @Column(name = "TRANSIENT_OR_PERSISTENT")
-    public Boolean getTransientOrPersistent() {
+    public boolean getTransientOrPersistent() {
         return transientOrPersistent;
     }
 
-    public void setTransientOrPersistent(Boolean transientOrPersistent) {
+    public void setTransientOrPersistent(boolean transientOrPersistent) {
         this.transientOrPersistent = transientOrPersistent;
     }
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/82e60f39/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/model/UserConfigurationData.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/model/UserConfigurationData.java b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/model/UserConfigurationData.java
index fc7144e..8039ce1 100644
--- a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/model/UserConfigurationData.java
+++ b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/model/UserConfigurationData.java
@@ -30,12 +30,12 @@ import javax.persistence.*;
 public class UserConfigurationData {
     private final static Logger logger = LoggerFactory.getLogger(UserConfigurationData.class);
     private String experimentId;
-    private Boolean airavataAutoSchedule;
-    private Boolean overrideManualScheduledParams;
-    private Boolean shareExperimentPublically;
-    private Boolean throttleResources;
+    private boolean airavataAutoSchedule;
+    private boolean overrideManualScheduledParams;
+    private boolean shareExperimentPublically;
+    private boolean throttleResources;
     private String userDn;
-    private Boolean generateCert;
+    private boolean generateCert;
     private String resourceHostId;
     private Integer totalCpuCount;
     private Integer nodeCount;
@@ -57,41 +57,41 @@ public class UserConfigurationData {
 
     @Basic
     @Column(name = "AIRAVATA_AUTO_SCHEDULE")
-    public Boolean getAiravataAutoSchedule() {
+    public boolean getAiravataAutoSchedule() {
         return airavataAutoSchedule;
     }
 
-    public void setAiravataAutoSchedule(Boolean airavataAutoSchedule) {
+    public void setAiravataAutoSchedule(boolean airavataAutoSchedule) {
         this.airavataAutoSchedule = airavataAutoSchedule;
     }
 
     @Basic
     @Column(name = "OVERRIDE_MANUAL_SCHEDULED_PARAMS")
-    public Boolean getOverrideManualScheduledParams() {
+    public boolean getOverrideManualScheduledParams() {
         return overrideManualScheduledParams;
     }
 
-    public void setOverrideManualScheduledParams(Boolean overrideManualScheduledParams) {
+    public void setOverrideManualScheduledParams(boolean overrideManualScheduledParams) {
         this.overrideManualScheduledParams = overrideManualScheduledParams;
     }
 
     @Basic
     @Column(name = "SHARE_EXPERIMENT_PUBLICALLY")
-    public Boolean getShareExperimentPublically() {
+    public boolean getShareExperimentPublically() {
         return shareExperimentPublically;
     }
 
-    public void setShareExperimentPublically(Boolean shareExperimentPublically) {
+    public void setShareExperimentPublically(boolean shareExperimentPublically) {
         this.shareExperimentPublically = shareExperimentPublically;
     }
 
     @Basic
     @Column(name = "THROTTLE_RESOURCES")
-    public Boolean getThrottleResources() {
+    public boolean getThrottleResources() {
         return throttleResources;
     }
 
-    public void setThrottleResources(Boolean throttleResources) {
+    public void setThrottleResources(boolean throttleResources) {
         this.throttleResources = throttleResources;
     }
 
@@ -107,11 +107,11 @@ public class UserConfigurationData {
 
     @Basic
     @Column(name = "GENERATE_CERT")
-    public Boolean getGenerateCert() {
+    public boolean getGenerateCert() {
         return generateCert;
     }
 
-    public void setGenerateCert(Boolean generateCert) {
+    public void setGenerateCert(boolean generateCert) {
         this.generateCert = generateCert;
     }
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/82e60f39/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/resources/ExperimentErrorResource.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/resources/ExperimentErrorResource.java b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/resources/ExperimentErrorResource.java
index 1a35455..6a049d3 100644
--- a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/resources/ExperimentErrorResource.java
+++ b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/resources/ExperimentErrorResource.java
@@ -41,7 +41,7 @@ public class ExperimentErrorResource extends AbstractExpCatResource {
     private Timestamp creationTime;
     private String actualErrorMessage;
     private String userFriendlyMessage;
-    private Boolean transientOrPersistent;
+    private boolean transientOrPersistent;
     private String rootCauseErrorIdList;
 
     public String getErrorId() {
@@ -84,11 +84,11 @@ public class ExperimentErrorResource extends AbstractExpCatResource {
         this.userFriendlyMessage = userFriendlyMessage;
     }
 
-    public Boolean getTransientOrPersistent() {
+    public boolean getTransientOrPersistent() {
         return transientOrPersistent;
     }
 
-    public void setTransientOrPersistent(Boolean transientOrPersistent) {
+    public void setTransientOrPersistent(boolean transientOrPersistent) {
         this.transientOrPersistent = transientOrPersistent;
     }
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/82e60f39/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/resources/ExperimentInputResource.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/resources/ExperimentInputResource.java b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/resources/ExperimentInputResource.java
index 2aa40dd..56e3128 100644
--- a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/resources/ExperimentInputResource.java
+++ b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/resources/ExperimentInputResource.java
@@ -40,13 +40,13 @@ public class ExperimentInputResource extends AbstractExpCatResource {
     private String inputValue;
     private String dataType;
     private String applicationArgument;
-    private Boolean standardInput = false;
+    private boolean standardInput = false;
     private String userFriendlyDescription;
     private String metadata;
     private Integer inputOrder;
-    private Boolean isRequired;
-    private Boolean requiredToAddedToCmd;
-    private Boolean dataStaged = false;
+    private boolean isRequired;
+    private boolean requiredToAddedToCmd;
+    private boolean dataStaged = false;
 
     public String getExperimentId() {
         return experimentId;
@@ -88,11 +88,11 @@ public class ExperimentInputResource extends AbstractExpCatResource {
         this.applicationArgument = applicationArgument;
     }
 
-    public Boolean getStandardInput() {
+    public boolean getStandardInput() {
         return standardInput;
     }
 
-    public void setStandardInput(Boolean standardInput) {
+    public void setStandardInput(boolean standardInput) {
         this.standardInput = standardInput;
     }
 
@@ -120,27 +120,27 @@ public class ExperimentInputResource extends AbstractExpCatResource {
         this.inputOrder = inputOrder;
     }
 
-    public Boolean getIsRequired() {
+    public boolean getIsRequired() {
         return isRequired;
     }
 
-    public void setIsRequired(Boolean isRequired) {
+    public void setIsRequired(boolean isRequired) {
         this.isRequired = isRequired;
     }
 
-    public Boolean getRequiredToAddedToCmd() {
+    public boolean getRequiredToAddedToCmd() {
         return requiredToAddedToCmd;
     }
 
-    public void setRequiredToAddedToCmd(Boolean requiredToAddedToCmd) {
+    public void setRequiredToAddedToCmd(boolean requiredToAddedToCmd) {
         this.requiredToAddedToCmd = requiredToAddedToCmd;
     }
 
-    public Boolean getDataStaged() {
+    public boolean getDataStaged() {
         return dataStaged;
     }
 
-    public void setDataStaged(Boolean dataStaged) {
+    public void setDataStaged(boolean dataStaged) {
         this.dataStaged = dataStaged;
     }
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/82e60f39/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/resources/ExperimentOutputResource.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/resources/ExperimentOutputResource.java b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/resources/ExperimentOutputResource.java
index 974baaf..1d4b06c 100644
--- a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/resources/ExperimentOutputResource.java
+++ b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/resources/ExperimentOutputResource.java
@@ -40,9 +40,9 @@ public class ExperimentOutputResource extends AbstractExpCatResource {
     private String outputValue;
     private String dataType;
     private String applicationArgument;
-    private Boolean isRequired;
-    private Boolean requiredToAddedToCmd;
-    private Boolean dataMovement;
+    private boolean isRequired;
+    private boolean requiredToAddedToCmd;
+    private boolean dataMovement;
     private String location;
     private String searchQuery;
 
@@ -86,27 +86,27 @@ public class ExperimentOutputResource extends AbstractExpCatResource {
         this.applicationArgument = applicationArgument;
     }
 
-    public Boolean getIsRequired() {
+    public boolean getIsRequired() {
         return isRequired;
     }
 
-    public void setIsRequired(Boolean isRequired) {
+    public void setIsRequired(boolean isRequired) {
         this.isRequired = isRequired;
     }
 
-    public Boolean getRequiredToAddedToCmd() {
+    public boolean getRequiredToAddedToCmd() {
         return requiredToAddedToCmd;
     }
 
-    public void setRequiredToAddedToCmd(Boolean requiredToAddedToCmd) {
+    public void setRequiredToAddedToCmd(boolean requiredToAddedToCmd) {
         this.requiredToAddedToCmd = requiredToAddedToCmd;
     }
 
-    public Boolean getDataMovement() {
+    public boolean getDataMovement() {
         return dataMovement;
     }
 
-    public void setDataMovement(Boolean dataMovement) {
+    public void setDataMovement(boolean dataMovement) {
         this.dataMovement = dataMovement;
     }
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/82e60f39/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/resources/ExperimentResource.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/resources/ExperimentResource.java b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/resources/ExperimentResource.java
index 7209e14..ea55bec 100644
--- a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/resources/ExperimentResource.java
+++ b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/resources/ExperimentResource.java
@@ -49,7 +49,7 @@ public class ExperimentResource extends AbstractExpCatResource {
     private String description;
     private String executionId;
     private String gatewayExecutionId;
-    private Boolean enableEmailNotification;
+    private boolean enableEmailNotification;
     private String emailAddresses;
 
     public String getExperimentId() {
@@ -132,11 +132,11 @@ public class ExperimentResource extends AbstractExpCatResource {
         this.gatewayExecutionId = gatewayExecutionId;
     }
 
-    public Boolean getEnableEmailNotification() {
+    public boolean getEnableEmailNotification() {
         return enableEmailNotification;
     }
 
-    public void setEnableEmailNotification(Boolean enableEmailNotification) {
+    public void setEnableEmailNotification(boolean enableEmailNotification) {
         this.enableEmailNotification = enableEmailNotification;
     }
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/82e60f39/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/resources/ProcessErrorResource.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/resources/ProcessErrorResource.java b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/resources/ProcessErrorResource.java
index 127b4c0..7f84a74 100644
--- a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/resources/ProcessErrorResource.java
+++ b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/resources/ProcessErrorResource.java
@@ -41,7 +41,7 @@ public class ProcessErrorResource extends AbstractExpCatResource {
     private Timestamp creationTime;
     private String actualErrorMessage;
     private String userFriendlyMessage;
-    private Boolean transientOrPersistent;
+    private boolean transientOrPersistent;
     private String rootCauseErrorIdList;
 
     public String getErrorId() {
@@ -84,11 +84,11 @@ public class ProcessErrorResource extends AbstractExpCatResource {
         this.userFriendlyMessage = userFriendlyMessage;
     }
 
-    public Boolean getTransientOrPersistent() {
+    public boolean getTransientOrPersistent() {
         return transientOrPersistent;
     }
 
-    public void setTransientOrPersistent(Boolean transientOrPersistent) {
+    public void setTransientOrPersistent(boolean transientOrPersistent) {
         this.transientOrPersistent = transientOrPersistent;
     }
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/82e60f39/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/resources/ProcessInputResource.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/resources/ProcessInputResource.java b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/resources/ProcessInputResource.java
index 7c09cd0..d2437a0 100644
--- a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/resources/ProcessInputResource.java
+++ b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/resources/ProcessInputResource.java
@@ -40,13 +40,13 @@ public class ProcessInputResource extends AbstractExpCatResource {
     private String inputValue;
     private String dataType;
     private String applicationArgument;
-    private Boolean standardInput = false;
+    private boolean standardInput = false;
     private String userFriendlyDescription;
     private String metadata;
     private Integer inputOrder;
-    private Boolean isRequired;
-    private Boolean requiredToAddedToCmd;
-    private Boolean dataStaged = false;
+    private boolean isRequired = false;
+    private boolean requiredToAddedToCmd = false;
+    private boolean dataStaged = false;
 
     public String getProcessId() {
         return processId;
@@ -88,11 +88,11 @@ public class ProcessInputResource extends AbstractExpCatResource {
         this.applicationArgument = applicationArgument;
     }
 
-    public Boolean getStandardInput() {
+    public boolean getStandardInput() {
         return standardInput;
     }
 
-    public void setStandardInput(Boolean standardInput) {
+    public void setStandardInput(boolean standardInput) {
         this.standardInput = standardInput;
     }
 
@@ -120,27 +120,27 @@ public class ProcessInputResource extends AbstractExpCatResource {
         this.inputOrder = inputOrder;
     }
 
-    public Boolean getIsRequired() {
+    public boolean getIsRequired() {
         return isRequired;
     }
 
-    public void setIsRequired(Boolean isRequired) {
+    public void setIsRequired(boolean isRequired) {
         this.isRequired = isRequired;
     }
 
-    public Boolean getRequiredToAddedToCmd() {
+    public boolean getRequiredToAddedToCmd() {
         return requiredToAddedToCmd;
     }
 
-    public void setRequiredToAddedToCmd(Boolean requiredToAddedToCmd) {
+    public void setRequiredToAddedToCmd(boolean requiredToAddedToCmd) {
         this.requiredToAddedToCmd = requiredToAddedToCmd;
     }
 
-    public Boolean getDataStaged() {
+    public boolean getDataStaged() {
         return dataStaged;
     }
 
-    public void setDataStaged(Boolean dataStaged) {
+    public void setDataStaged(boolean dataStaged) {
         this.dataStaged = dataStaged;
     }
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/82e60f39/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/resources/ProcessOutputResource.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/resources/ProcessOutputResource.java b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/resources/ProcessOutputResource.java
index f1ec1f0..bee0ef7 100644
--- a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/resources/ProcessOutputResource.java
+++ b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/resources/ProcessOutputResource.java
@@ -40,9 +40,9 @@ public class ProcessOutputResource extends AbstractExpCatResource {
     private String outputValue;
     private String dataType;
     private String applicationArgument;
-    private Boolean isRequired;
-    private Boolean requiredToAddedToCmd;
-    private Boolean dataMovement;
+    private boolean isRequired;
+    private boolean requiredToAddedToCmd;
+    private boolean dataMovement;
     private String location;
     private String searchQuery;
 
@@ -86,27 +86,27 @@ public class ProcessOutputResource extends AbstractExpCatResource {
         this.applicationArgument = applicationArgument;
     }
 
-    public Boolean getIsRequired() {
+    public boolean getIsRequired() {
         return isRequired;
     }
 
-    public void setIsRequired(Boolean isRequired) {
+    public void setIsRequired(boolean isRequired) {
         this.isRequired = isRequired;
     }
 
-    public Boolean getRequiredToAddedToCmd() {
+    public boolean getRequiredToAddedToCmd() {
         return requiredToAddedToCmd;
     }
 
-    public void setRequiredToAddedToCmd(Boolean requiredToAddedToCmd) {
+    public void setRequiredToAddedToCmd(boolean requiredToAddedToCmd) {
         this.requiredToAddedToCmd = requiredToAddedToCmd;
     }
 
-    public Boolean getDataMovement() {
+    public boolean getDataMovement() {
         return dataMovement;
     }
 
-    public void setDataMovement(Boolean dataMovement) {
+    public void setDataMovement(boolean dataMovement) {
         this.dataMovement = dataMovement;
     }
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/82e60f39/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/resources/ProcessResource.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/resources/ProcessResource.java b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/resources/ProcessResource.java
index 9a26a45..cdd1cfe 100644
--- a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/resources/ProcessResource.java
+++ b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/resources/ProcessResource.java
@@ -49,7 +49,7 @@ public class ProcessResource extends AbstractExpCatResource {
     private String applicationDeploymentId;
     private String computeResourceId;
     private String gatewayExecutionId;
-    private Boolean enableEmailNotification;
+    private boolean enableEmailNotification;
     private String emailAddresses;
 
     public String getProcessId() {
@@ -132,11 +132,11 @@ public class ProcessResource extends AbstractExpCatResource {
         this.gatewayExecutionId = gatewayExecutionId;
     }
 
-    public Boolean getEnableEmailNotification() {
+    public boolean getEnableEmailNotification() {
         return enableEmailNotification;
     }
 
-    public void setEnableEmailNotification(Boolean enableEmailNotification) {
+    public void setEnableEmailNotification(boolean enableEmailNotification) {
         this.enableEmailNotification = enableEmailNotification;
     }
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/82e60f39/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/resources/TaskErrorResource.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/resources/TaskErrorResource.java b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/resources/TaskErrorResource.java
index b8239c4..1ec0c45 100644
--- a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/resources/TaskErrorResource.java
+++ b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/resources/TaskErrorResource.java
@@ -41,7 +41,7 @@ public class TaskErrorResource extends AbstractExpCatResource {
     private Timestamp creationTime;
     private String actualErrorMessage;
     private String userFriendlyMessage;
-    private Boolean transientOrPersistent;
+    private boolean transientOrPersistent;
     private String rootCauseErrorIdList;
 
     public String getErrorId() {
@@ -84,11 +84,11 @@ public class TaskErrorResource extends AbstractExpCatResource {
         this.userFriendlyMessage = userFriendlyMessage;
     }
 
-    public Boolean getTransientOrPersistent() {
+    public boolean getTransientOrPersistent() {
         return transientOrPersistent;
     }
 
-    public void setTransientOrPersistent(Boolean transientOrPersistent) {
+    public void setTransientOrPersistent(boolean transientOrPersistent) {
         this.transientOrPersistent = transientOrPersistent;
     }
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/82e60f39/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/resources/UserConfigurationDataResource.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/resources/UserConfigurationDataResource.java b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/resources/UserConfigurationDataResource.java
index da90c4a..0ee986a 100644
--- a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/resources/UserConfigurationDataResource.java
+++ b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/resources/UserConfigurationDataResource.java
@@ -35,12 +35,12 @@ import java.util.List;
 public class UserConfigurationDataResource extends AbstractExpCatResource {
     private static final Logger logger = LoggerFactory.getLogger(UserConfigurationDataResource.class);
     private String experimentId;
-    private Boolean airavataAutoSchedule;
-    private Boolean overrideManualScheduledParams;
-    private Boolean shareExperimentPublically;
-    private Boolean throttleResources;
+    private boolean airavataAutoSchedule;
+    private boolean overrideManualScheduledParams;
+    private boolean shareExperimentPublically;
+    private boolean throttleResources;
     private String userDn;
-    private Boolean generateCert;
+    private boolean generateCert;
     private String resourceHostId;
     private Integer totalCpuCount;
     private Integer nodeCount;
@@ -113,35 +113,35 @@ public class UserConfigurationDataResource extends AbstractExpCatResource {
         this.totalPhysicalMemory = totalPhysicalMemory;
     }
 
-    public Boolean getAiravataAutoSchedule() {
+    public boolean getAiravataAutoSchedule() {
         return airavataAutoSchedule;
     }
 
-    public void setAiravataAutoSchedule(Boolean airavataAutoSchedule) {
+    public void setAiravataAutoSchedule(boolean airavataAutoSchedule) {
         this.airavataAutoSchedule = airavataAutoSchedule;
     }
 
-    public Boolean getOverrideManualScheduledParams() {
+    public boolean getOverrideManualScheduledParams() {
         return overrideManualScheduledParams;
     }
 
-    public void setOverrideManualScheduledParams(Boolean overrideManualScheduledParams) {
+    public void setOverrideManualScheduledParams(boolean overrideManualScheduledParams) {
         this.overrideManualScheduledParams = overrideManualScheduledParams;
     }
 
-    public Boolean getShareExperimentPublically() {
+    public boolean getShareExperimentPublically() {
         return shareExperimentPublically;
     }
 
-    public void setShareExperimentPublically(Boolean shareExperimentPublically) {
+    public void setShareExperimentPublically(boolean shareExperimentPublically) {
         this.shareExperimentPublically = shareExperimentPublically;
     }
 
-    public Boolean getThrottleResources() {
+    public boolean getThrottleResources() {
         return throttleResources;
     }
 
-    public void setThrottleResources(Boolean throttleResources) {
+    public void setThrottleResources(boolean throttleResources) {
         this.throttleResources = throttleResources;
     }
 
@@ -153,11 +153,11 @@ public class UserConfigurationDataResource extends AbstractExpCatResource {
         this.userDn = userDn;
     }
 
-    public Boolean getGenerateCert() {
+    public boolean getGenerateCert() {
         return generateCert;
     }
 
-    public void setGenerateCert(Boolean generateCert) {
+    public void setGenerateCert(boolean generateCert) {
         this.generateCert = generateCert;
     }
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/82e60f39/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 6ca626c..b022653 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
@@ -21,6 +21,7 @@
 
 package org.apache.airavata.registry.core.experiment.catalog.utils;
 
+import org.apache.airavata.common.utils.AiravataUtils;
 import org.apache.airavata.model.application.io.DataType;
 import org.apache.airavata.model.application.io.InputDataObjectType;
 import org.apache.airavata.model.application.io.OutputDataObjectType;
@@ -42,6 +43,7 @@ import org.apache.airavata.registry.cpi.RegistryException;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+import java.sql.Timestamp;
 import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.List;
@@ -273,11 +275,12 @@ public class ThriftDataModelConversion {
     public static ExperimentStatus getExperimentStatus(ExperimentStatusResource status){
         if (status != null){
             ExperimentStatus experimentStatus = new ExperimentStatus();
-            if (status.getState() == null || status.getState().equals("")){
-                status.setState("UNKNOWN");
-            }
             experimentStatus.setState(ExperimentState.valueOf(status.getState()));
-            experimentStatus.setTimeOfStateChange(status.getTimeOfStateChange().getTime());
+            Timestamp timeOfStateChange = status.getTimeOfStateChange();
+            if (timeOfStateChange == null){
+                timeOfStateChange = AiravataUtils.getCurrentTimestamp();
+            }
+            experimentStatus.setTimeOfStateChange(timeOfStateChange.getTime());
             experimentStatus.setReason(status.getReason());
             return experimentStatus;
         }
@@ -287,11 +290,12 @@ public class ThriftDataModelConversion {
     public static ProcessStatus getProcessStatus (ProcessStatusResource status){
         if (status != null){
             ProcessStatus processStatus = new ProcessStatus();
-            if (status.getState() == null || status.getState().equals("")){
-                status.setState("UNKNOWN");
-            }
             processStatus.setState(ProcessState.valueOf(status.getState()));
-            processStatus.setTimeOfStateChange(status.getTimeOfStateChange().getTime());
+            Timestamp timeOfStateChange = status.getTimeOfStateChange();
+            if (timeOfStateChange == null){
+                timeOfStateChange = AiravataUtils.getCurrentTimestamp();
+            }
+            processStatus.setTimeOfStateChange(timeOfStateChange.getTime());
             processStatus.setReason(status.getReason());
             return processStatus;
         }
@@ -301,11 +305,12 @@ public class ThriftDataModelConversion {
     public static TaskStatus getTaskStatus (TaskStatusResource status){
         if (status != null){
             TaskStatus taskStatus = new TaskStatus();
-            if (status.getState() == null || status.getState().equals("")){
-                status.setState("UNKNOWN");
-            }
             taskStatus.setState(TaskState.valueOf(status.getState()));
-            taskStatus.setTimeOfStateChange(status.getTimeOfStateChange().getTime());
+            Timestamp timeOfStateChange = status.getTimeOfStateChange();
+            if (timeOfStateChange == null){
+                timeOfStateChange = AiravataUtils.getCurrentTimestamp();
+            }
+            taskStatus.setTimeOfStateChange(timeOfStateChange.getTime());
             taskStatus.setReason(status.getReason());
             return taskStatus;
         }
@@ -315,11 +320,12 @@ public class ThriftDataModelConversion {
     public static JobStatus getJobStatus (JobStatusResource status){
         if (status != null){
             JobStatus jobStatus = new JobStatus();
-            if (status.getState() == null || status.getState().equals("")){
-                status.setState("UNKNOWN");
-            }
             jobStatus.setJobState(JobState.valueOf(status.getState()));
-            jobStatus.setTimeOfStateChange(status.getTimeOfStateChange().getTime());
+            Timestamp timeOfStateChange = status.getTimeOfStateChange();
+            if (timeOfStateChange == null){
+                timeOfStateChange = AiravataUtils.getCurrentTimestamp();
+            }
+            jobStatus.setTimeOfStateChange(timeOfStateChange.getTime());
             jobStatus.setReason(status.getReason());
             return jobStatus;
         }


Mime
View raw message