airavata-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (AIRAVATA-2657) Refactoring App Catalog implementation - ApplicationDeployment and ApplicationInterface
Date Fri, 23 Mar 2018 17:54:00 GMT

    [ https://issues.apache.org/jira/browse/AIRAVATA-2657?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16411786#comment-16411786
] 

ASF GitHub Bot commented on AIRAVATA-2657:
------------------------------------------

DImuthuUpe commented on a change in pull request #167: [AIRAVATA-2657] Refactoring App Catalog
Implementation - ApplicationDeployment and ApplicationInterface Modules
URL: https://github.com/apache/airavata/pull/167#discussion_r176816330
 
 

 ##########
 File path: modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/repositories/appcatalog/ApplicationDeploymentRepository.java
 ##########
 @@ -0,0 +1,159 @@
+/**
+ *
+ * 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.repositories.appcatalog;
+
+import org.apache.airavata.model.appcatalog.appdeployment.*;
+import org.apache.airavata.registry.core.entities.appcatalog.*;
+import org.apache.airavata.registry.core.utils.DBConstants;
+import org.apache.airavata.registry.core.utils.ObjectMapperSingleton;
+import org.apache.airavata.registry.core.utils.QueryConstants;
+import org.apache.airavata.registry.cpi.AppCatalogException;
+import org.apache.airavata.registry.cpi.ApplicationDeployment;
+import org.dozer.Mapper;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.sql.Timestamp;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+public class ApplicationDeploymentRepository extends AppCatAbstractRepository<ApplicationDeploymentDescription,
ApplicationDeploymentEntity, String> implements ApplicationDeployment {
+    private final static Logger logger = LoggerFactory.getLogger(ApplicationDeploymentRepository.class);
+
+    public ApplicationDeploymentRepository() {
+        super(ApplicationDeploymentDescription.class, ApplicationDeploymentEntity.class);
+    }
+
+    protected String saveApplicationDeploymentDescriptorData(
+            ApplicationDeploymentDescription applicationDeploymentDescription, String gatewayId)
throws AppCatalogException {
+        ApplicationDeploymentEntity applicationDeploymentEntity = saveApplicationDeployment(applicationDeploymentDescription,
gatewayId);
+        return applicationDeploymentEntity.getAppDeploymentId();
+    }
+
+    protected ApplicationDeploymentEntity saveApplicationDeployment(
+            ApplicationDeploymentDescription applicationDeploymentDescription, String gatewayId)
throws AppCatalogException {
+        String applicationDeploymentId = applicationDeploymentDescription.getAppDeploymentId();
+        Mapper mapper = ObjectMapperSingleton.getInstance();
+        ApplicationDeploymentEntity applicationDeploymentEntity = mapper.map(applicationDeploymentDescription,
ApplicationDeploymentEntity.class);
+        if (gatewayId != null)
 
 Review comment:
   Just print the message mentioning why that block is executing

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


> Refactoring App Catalog implementation - ApplicationDeployment and ApplicationInterface
> ---------------------------------------------------------------------------------------
>
>                 Key: AIRAVATA-2657
>                 URL: https://issues.apache.org/jira/browse/AIRAVATA-2657
>             Project: Airavata
>          Issue Type: Task
>          Components: Application Catalog
>            Reporter: Sneha Tilak
>            Assignee: Sneha Tilak
>            Priority: Major
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message