You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airavata.apache.org by sh...@apache.org on 2016/08/31 14:12:25 UTC

airavata git commit: Fixed saving current time as reservation start and endtime

Repository: airavata
Updated Branches:
  refs/heads/develop cc009e3c6 -> 2b3dec807


Fixed saving current time as reservation start and endtime


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

Branch: refs/heads/develop
Commit: 2b3dec80736c0542346c70a6d6ab122d9f6448d5
Parents: cc009e3
Author: Shameera Rathnayaka <sh...@gmail.com>
Authored: Wed Aug 31 10:12:01 2016 -0400
Committer: Shameera Rathnayaka <sh...@gmail.com>
Committed: Wed Aug 31 10:12:01 2016 -0400

----------------------------------------------------------------------
 .../app/catalog/impl/GwyResourceProfileImpl.java  | 18 ++++++++++++++----
 1 file changed, 14 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/2b3dec80/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/impl/GwyResourceProfileImpl.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/impl/GwyResourceProfileImpl.java b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/impl/GwyResourceProfileImpl.java
index bbf300a..b2d31a4 100644
--- a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/impl/GwyResourceProfileImpl.java
+++ b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/impl/GwyResourceProfileImpl.java
@@ -84,8 +84,13 @@ public class GwyResourceProfileImpl implements GwyResourceProfile {
                     resource.setScratchLocation(preference.getScratchLocation());
                     resource.setQualityOfService(preference.getQualityOfService());
                     resource.setReservation(preference.getReservation());
-                    resource.setReservationStartTime(AiravataUtils.getTime(preference.getReservationStartTime()));
-                    resource.setReservationEndTime(AiravataUtils.getTime(preference.getReservationEndTime()));
+                    if(preference.getReservationStartTime() > 0){
+                        resource.setReservationStartTime(AiravataUtils.getTime(preference.getReservationStartTime()));
+                    }
+
+                    if (preference.getReservationEndTime() > 0) {
+                        resource.setReservationEndTime(AiravataUtils.getTime(preference.getReservationEndTime()));
+                    }
                     resource.save();
                 }
             }
@@ -144,8 +149,13 @@ public class GwyResourceProfileImpl implements GwyResourceProfile {
                     resource.setUsageReportingGatewayId(preference.getUsageReportingGatewayId());
                     resource.setQualityOfService(preference.getQualityOfService());
                     resource.setReservation(preference.getReservation());
-                    resource.setReservationStartTime(AiravataUtils.getTime(preference.getReservationStartTime()));
-                    resource.setReservationEndTime(AiravataUtils.getTime(preference.getReservationEndTime()));
+                    if(preference.getReservationStartTime() > 0){
+                        resource.setReservationStartTime(AiravataUtils.getTime(preference.getReservationStartTime()));
+                    }
+
+                    if (preference.getReservationEndTime() > 0) {
+                        resource.setReservationEndTime(AiravataUtils.getTime(preference.getReservationEndTime()));
+                    }
                     resource.save();
                 }
             }