You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airavata.apache.org by ch...@apache.org on 2016/02/08 17:49:10 UTC
[28/50] [abbrv] airavata git commit: adding workflow related resource
layer
http://git-wip-us.apache.org/repos/asf/airavata/blob/2a2782a6/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/workflow/catalog/utils/WorkflowCatalogQueryGenerator.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/workflow/catalog/utils/WorkflowCatalogQueryGenerator.java b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/workflow/catalog/utils/WorkflowCatalogQueryGenerator.java
new file mode 100644
index 0000000..d3a5a42
--- /dev/null
+++ b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/workflow/catalog/utils/WorkflowCatalogQueryGenerator.java
@@ -0,0 +1,90 @@
+/*
+ *
+ * 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.workflow.catalog.utils;
+
+import javax.persistence.EntityManager;
+import javax.persistence.Query;
+import java.util.HashMap;
+import java.util.Map;
+
+public class WorkflowCatalogQueryGenerator {
+ private String tableName;
+ private Map<String,Object> matches=new HashMap<String, Object>();
+ private static final String SELECT_OBJ="p";
+ private static final String DELETE_OBJ="p";
+ private static final String TABLE_OBJ="p";
+
+ public WorkflowCatalogQueryGenerator(String tableName, Object[]... params) {
+ setTableName(tableName);
+ for (Object[] param : params) {
+ addMatch(param[0].toString(), param[1]);
+ }
+ }
+
+ public String getTableName() {
+ return tableName;
+ }
+ public void setTableName(String tableName) {
+ this.tableName = tableName;
+ }
+ public void addMatch(String colName, Object matchValue){
+ matches.put(colName, matchValue);
+ }
+
+ public void setParameter(String colName, Object matchValue){
+ addMatch(colName, matchValue);
+ }
+
+ public Query selectQuery(EntityManager entityManager){
+ String queryString="SELECT "+ SELECT_OBJ + " FROM " +getTableName()+" "+TABLE_OBJ;
+ return generateQueryWithParameters(entityManager, queryString);
+ }
+
+ public Query deleteQuery(EntityManager entityManager){
+ String queryString="Delete FROM "+getTableName()+" "+TABLE_OBJ;
+ return generateQueryWithParameters(entityManager, queryString);
+ }
+
+ private Query generateQueryWithParameters(EntityManager entityManager,
+ String queryString) {
+ Map<String,Object> queryParameters=new HashMap<String, Object>();
+ if (matches.size()>0){
+ String matchString = "";
+ int paramCount=0;
+ for (String colName : matches.keySet()) {
+ String paramName="param"+paramCount;
+ queryParameters.put(paramName, matches.get(colName));
+ if (!matchString.equals("")){
+ matchString+=" AND ";
+ }
+ matchString+=TABLE_OBJ+"."+colName+" =:"+paramName;
+ paramCount++;
+ }
+ queryString+=" WHERE "+matchString;
+ }
+ Query query = entityManager.createQuery(queryString);
+ for (String paramName : queryParameters.keySet()) {
+ query.setParameter(paramName, queryParameters.get(paramName));
+ }
+ return query;
+ }
+}
http://git-wip-us.apache.org/repos/asf/airavata/blob/2a2782a6/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/workflow/catalog/utils/WorkflowCatalogResourceType.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/workflow/catalog/utils/WorkflowCatalogResourceType.java b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/workflow/catalog/utils/WorkflowCatalogResourceType.java
new file mode 100644
index 0000000..2af0151
--- /dev/null
+++ b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/workflow/catalog/utils/WorkflowCatalogResourceType.java
@@ -0,0 +1,33 @@
+/*
+ *
+ * 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.workflow.catalog.utils;
+
+public enum WorkflowCatalogResourceType {
+ WORKFLOW,
+ WORKFLOW_INPUT,
+ WORKFLOW_OUTPUT,
+ WORKFLOW_STATUS,
+ COMPONENT_STATUS,
+ NODE,
+ EDGE,
+ PORT
+}
http://git-wip-us.apache.org/repos/asf/airavata/blob/2a2782a6/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/workflow/catalog/utils/WorkflowCatalogThriftConversion.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/workflow/catalog/utils/WorkflowCatalogThriftConversion.java b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/workflow/catalog/utils/WorkflowCatalogThriftConversion.java
new file mode 100644
index 0000000..68b42e3
--- /dev/null
+++ b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/workflow/catalog/utils/WorkflowCatalogThriftConversion.java
@@ -0,0 +1,76 @@
+/*
+ *
+ * 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.workflow.catalog.utils;
+
+import org.apache.airavata.model.Workflow;
+import org.apache.airavata.model.application.io.DataType;
+import org.apache.airavata.model.application.io.InputDataObjectType;
+import org.apache.airavata.registry.core.workflow.catalog.resources.WorkflowCatAbstractResource;
+import org.apache.airavata.registry.core.workflow.catalog.resources.WorkflowCatalogResource;
+import org.apache.airavata.registry.core.workflow.catalog.resources.WorkflowInputResource;
+import org.apache.airavata.registry.core.workflow.catalog.resources.WorkflowResource;
+import org.apache.airavata.registry.cpi.WorkflowCatalogException;
+
+import java.util.ArrayList;
+import java.util.List;
+
+public class WorkflowCatalogThriftConversion {
+
+ public static InputDataObjectType getWorkflowInput (WorkflowInputResource resource){
+ InputDataObjectType input = new InputDataObjectType();
+ input.setName(resource.getInputKey());
+ input.setApplicationArgument(resource.getAppArgument());
+ input.setInputOrder(resource.getInputOrder());
+ input.setType(DataType.valueOf(resource.getDataType()));
+ input.setMetaData(resource.getMetadata());
+ input.setUserFriendlyDescription(resource.getUserFriendlyDesc());
+ input.setIsRequired(resource.getRequired());
+ input.setRequiredToAddedToCommandLine(resource.getRequiredToCMD());
+ input.setDataStaged(resource.isDataStaged());
+ return input;
+ }
+
+ public static List<InputDataObjectType> getWFInputs(List<WorkflowCatalogResource> resources){
+ List<InputDataObjectType> inputResources = new ArrayList<InputDataObjectType>();
+ if (resources != null && !resources.isEmpty()){
+ for (WorkflowCatalogResource resource : resources){
+ inputResources.add(getWorkflowInput((WorkflowInputResource) resource));
+ }
+ }
+ return inputResources;
+ }
+
+ public static Workflow getWorkflow (WorkflowResource resource) throws WorkflowCatalogException {
+ Workflow workflow = new Workflow();
+ workflow.setTemplateId(resource.getWfTemplateId());
+ workflow.setGraph(resource.getGraph());
+ workflow.setName(resource.getWfName());
+ if (resource.getImage() != null){
+ workflow.setImage(resource.getImage().getBytes());
+ }
+ WorkflowInputResource inputResource = new WorkflowInputResource();
+ List<WorkflowCatalogResource> resources = inputResource.get(WorkflowCatAbstractResource.WorkflowInputConstants.WF_TEMPLATE_ID, resource.getWfTemplateId());
+ workflow.setWorkflowInputs(getWFInputs(resources));
+
+ return workflow;
+ }
+}
http://git-wip-us.apache.org/repos/asf/airavata/blob/2a2782a6/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/workflow/catalog/utils/WorkflowCatalogUtils.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/workflow/catalog/utils/WorkflowCatalogUtils.java b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/workflow/catalog/utils/WorkflowCatalogUtils.java
new file mode 100644
index 0000000..dce8263
--- /dev/null
+++ b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/workflow/catalog/utils/WorkflowCatalogUtils.java
@@ -0,0 +1,31 @@
+/*
+ *
+ * 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.workflow.catalog.utils;
+
+import java.util.UUID;
+
+public class WorkflowCatalogUtils {
+ public static String getID (String name){
+ String pro = name.replaceAll("\\s", "");
+ return pro + "_" + UUID.randomUUID();
+ }
+}
http://git-wip-us.apache.org/repos/asf/airavata/blob/2a2782a6/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 da544c9..7d2a15a 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
@@ -61,9 +61,6 @@
<class>org.apache.airavata.registry.core.app.catalog.model.JobManagerCommand</class>
<class>org.apache.airavata.registry.core.app.catalog.model.LocalSubmission</class>
<class>org.apache.airavata.registry.core.app.catalog.model.LocalDataMovement</class>
- <class>org.apache.airavata.registry.core.app.catalog.model.Workflow</class>
- <class>org.apache.airavata.registry.core.app.catalog.model.WorkflowInput</class>
- <class>org.apache.airavata.registry.core.app.catalog.model.WorkflowOutput</class>
<class>org.apache.airavata.registry.core.app.catalog.model.Configuration</class>
<class>org.apache.airavata.registry.core.app.catalog.model.GatewayClientCredential</class>
<exclude-unlisted-classes>true</exclude-unlisted-classes>
@@ -104,4 +101,16 @@
<class>org.apache.airavata.registry.core.data.catalog.model.Configuration</class>
<exclude-unlisted-classes>true</exclude-unlisted-classes>
</persistence-unit>
+ <persistence-unit name="workflowcatalog_data">
+ <provider>org.apache.openjpa.persistence.PersistenceProviderImpl</provider>
+ <class>org.apache.airavata.registry.core.workflow.catalog.model.Workflow</class>
+ <class>org.apache.airavata.registry.core.workflow.catalog.model.WorkflowInput</class>
+ <class>org.apache.airavata.registry.core.workflow.catalog.model.WorkflowOutput</class>
+ <class>org.apache.airavata.registry.core.workflow.catalog.model.Edge</class>
+ <class>org.apache.airavata.registry.core.workflow.catalog.model.Node</class>
+ <class>org.apache.airavata.registry.core.workflow.catalog.model.Port</class>
+ <class>org.apache.airavata.registry.core.workflow.catalog.model.ComponentStatus</class>
+ <class>org.apache.airavata.registry.core.workflow.catalog.model.WorkflowStatus</class>
+ <exclude-unlisted-classes>true</exclude-unlisted-classes>
+ </persistence-unit>
</persistence>
http://git-wip-us.apache.org/repos/asf/airavata/blob/2a2782a6/modules/registry/registry-core/src/main/resources/workflow-derby.sql
----------------------------------------------------------------------
diff --git a/modules/registry/registry-core/src/main/resources/workflow-derby.sql b/modules/registry/registry-core/src/main/resources/workflow-derby.sql
index f2af1be..8c590f8 100644
--- a/modules/registry/registry-core/src/main/resources/workflow-derby.sql
+++ b/modules/registry/registry-core/src/main/resources/workflow-derby.sql
@@ -36,7 +36,7 @@ CREATE TABLE WORKFLOW_INPUT
(
TEMPLATE_ID VARCHAR(255),
INPUT_KEY VARCHAR(255),
- INPUT_VALUE VARCHAR(255),
+ INPUT_VALUE CLOB,
DATA_TYPE VARCHAR(255),
METADATA VARCHAR(255),
APP_ARGUMENT VARCHAR(255),
@@ -70,10 +70,12 @@ CREATE TABLE WORKFLOW_OUTPUT
CREATE TABLE COMPONENT_STATUS
(
STATUS_ID VARCHAR (255) NOT NULL,
+ TEMPLATE_ID VARCHAR (255) NOT NULL,
STATE VARCHAR(255),
REASON VARCHAR(255),
- PRIMARY KEY (STATUS_ID)
UPDATE_TIME timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
+ PRIMARY KEY (STATUS_ID)
+ FOREIGN KEY (TEMPLATE_ID) REFERENCES WORKFLOW(TEMPLATE_ID) ON DELETE CASCADE
);
CREATE TABLE WORKFLOW_STATUS
@@ -83,7 +85,7 @@ CREATE TABLE WORKFLOW_STATUS
STATE VARCHAR(255),
REASON VARCHAR(255),
UPDATE_TIME timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
- PRIMARY KEY (STATUS_ID, COMPONENT_ID),
+ PRIMARY KEY (STATUS_ID, TEMPLATE_ID),
FOREIGN KEY (TEMPLATE_ID) REFERENCES WORKFLOW(TEMPLATE_ID) ON DELETE CASCADE
);
@@ -94,6 +96,7 @@ CREATE TABLE EDGE
NAME VARCHAR (255),
COMPONENT_STATUS_ID VARCHAR(255),
DESCRIPTION VARCHAR(500),
+ CREATED_TIME timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (EDGE_ID, TEMPLATE_ID),
FOREIGN KEY (TEMPLATE_ID) REFERENCES WORKFLOW(TEMPLATE_ID) ON DELETE CASCADE
);
@@ -105,6 +108,7 @@ CREATE TABLE PORT
NAME VARCHAR (255),
COMPONENT_STATUS_ID VARCHAR(255),
DESCRIPTION VARCHAR(500),
+ CREATED_TIME timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (PORT_ID, TEMPLATE_ID),
FOREIGN KEY (TEMPLATE_ID) REFERENCES WORKFLOW(TEMPLATE_ID) ON DELETE CASCADE
);
@@ -118,6 +122,7 @@ CREATE TABLE NODE
APPLICATION_NAME VARCHAR (255),
COMPONENT_STATUS_ID VARCHAR(255),
DESCRIPTION VARCHAR(500),
+ CREATED_TIME timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (NODE_ID, TEMPLATE_ID),
FOREIGN KEY (TEMPLATE_ID) REFERENCES WORKFLOW(TEMPLATE_ID) ON DELETE CASCADE
);
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/airavata/blob/2a2782a6/modules/registry/registry-core/src/main/resources/workflow-mysql.sql
----------------------------------------------------------------------
diff --git a/modules/registry/registry-core/src/main/resources/workflow-mysql.sql b/modules/registry/registry-core/src/main/resources/workflow-mysql.sql
index d723343..3527d60 100644
--- a/modules/registry/registry-core/src/main/resources/workflow-mysql.sql
+++ b/modules/registry/registry-core/src/main/resources/workflow-mysql.sql
@@ -54,7 +54,7 @@ CREATE TABLE WORKFLOW_OUTPUT
(
TEMPLATE_ID VARCHAR(255),
OUTPUT_KEY VARCHAR(255),
- OUTPUT_VALUE VARCHAR(255),
+ OUTPUT_VALUE LONGTEXT,
DATA_TYPE VARCHAR(255),
IS_REQUIRED SMALLINT,
REQUIRED_TO_COMMANDLINE SMALLINT,
@@ -70,10 +70,12 @@ CREATE TABLE WORKFLOW_OUTPUT
CREATE TABLE COMPONENT_STATUS
(
STATUS_ID VARCHAR (255) NOT NULL,
+ TEMPLATE_ID VARCHAR (255) NOT NULL,
STATE VARCHAR(255),
REASON VARCHAR(255),
UPDATE_TIME timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (STATUS_ID)
+ FOREIGN KEY (TEMPLATE_ID) REFERENCES WORKFLOW(TEMPLATE_ID) ON DELETE CASCADE
);
CREATE TABLE WORKFLOW_STATUS
@@ -83,7 +85,7 @@ CREATE TABLE WORKFLOW_STATUS
STATE VARCHAR(255),
REASON VARCHAR(255),
UPDATE_TIME timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
- PRIMARY KEY (STATUS_ID, COMPONENT_ID),
+ PRIMARY KEY (STATUS_ID, TEMPLATE_ID),
FOREIGN KEY (TEMPLATE_ID) REFERENCES WORKFLOW(TEMPLATE_ID) ON DELETE CASCADE
);
@@ -94,6 +96,7 @@ CREATE TABLE EDGE
NAME VARCHAR (255),
COMPONENT_STATUS_ID VARCHAR(255),
DESCRIPTION VARCHAR(500),
+ CREATED_TIME timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (EDGE_ID, TEMPLATE_ID),
FOREIGN KEY (TEMPLATE_ID) REFERENCES WORKFLOW(TEMPLATE_ID) ON DELETE CASCADE
);
@@ -105,6 +108,7 @@ CREATE TABLE PORT
NAME VARCHAR (255),
COMPONENT_STATUS_ID VARCHAR(255),
DESCRIPTION VARCHAR(500),
+ CREATED_TIME timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (PORT_ID, TEMPLATE_ID),
FOREIGN KEY (TEMPLATE_ID) REFERENCES WORKFLOW(TEMPLATE_ID) ON DELETE CASCADE
);
@@ -118,6 +122,7 @@ CREATE TABLE NODE
APPLICATION_NAME VARCHAR (255),
COMPONENT_STATUS_ID VARCHAR(255),
DESCRIPTION VARCHAR(500),
+ CREATED_TIME timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (NODE_ID, TEMPLATE_ID),
FOREIGN KEY (TEMPLATE_ID) REFERENCES WORKFLOW(TEMPLATE_ID) ON DELETE CASCADE
);
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/airavata/blob/2a2782a6/modules/registry/registry-cpi/src/main/java/org/apache/airavata/registry/cpi/WorkflowCatalog.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-cpi/src/main/java/org/apache/airavata/registry/cpi/WorkflowCatalog.java b/modules/registry/registry-cpi/src/main/java/org/apache/airavata/registry/cpi/WorkflowCatalog.java
index f465e7e..34c8ff6 100644
--- a/modules/registry/registry-cpi/src/main/java/org/apache/airavata/registry/cpi/WorkflowCatalog.java
+++ b/modules/registry/registry-cpi/src/main/java/org/apache/airavata/registry/cpi/WorkflowCatalog.java
@@ -28,19 +28,19 @@ import java.util.List;
public interface WorkflowCatalog {
- public List<String> getAllWorkflows(String gatewayId) throws AppCatalogException;
+ public List<String> getAllWorkflows(String gatewayId) throws WorkflowCatalogException;
- public org.apache.airavata.model.Workflow getWorkflow(String workflowTemplateId) throws AppCatalogException;
+ public org.apache.airavata.model.Workflow getWorkflow(String workflowTemplateId) throws WorkflowCatalogException;
- public void deleteWorkflow(String workflowTemplateId) throws AppCatalogException;
+ public void deleteWorkflow(String workflowTemplateId) throws WorkflowCatalogException;
- public String registerWorkflow(org.apache.airavata.model.Workflow workflow, String gatewayId) throws AppCatalogException;
+ public String registerWorkflow(org.apache.airavata.model.Workflow workflow, String gatewayId) throws WorkflowCatalogException;
- public void updateWorkflow(String workflowTemplateId, org.apache.airavata.model.Workflow workflow) throws AppCatalogException;
+ public void updateWorkflow(String workflowTemplateId, org.apache.airavata.model.Workflow workflow) throws WorkflowCatalogException;
- public String getWorkflowTemplateId(String workflowName) throws AppCatalogException;
+ public String getWorkflowTemplateId(String workflowName) throws WorkflowCatalogException;
- public boolean isWorkflowExistWithName(String workflowName) throws AppCatalogException;
+ public boolean isWorkflowExistWithName(String workflowName) throws WorkflowCatalogException;
- public void updateWorkflowOutputs(String workflowTemplateId, List<OutputDataObjectType> workflowOutputs) throws AppCatalogException;
+ public void updateWorkflowOutputs(String workflowTemplateId, List<OutputDataObjectType> workflowOutputs) throws WorkflowCatalogException;
}
http://git-wip-us.apache.org/repos/asf/airavata/blob/2a2782a6/modules/registry/registry-cpi/src/main/java/org/apache/airavata/registry/cpi/WorkflowCatalogException.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-cpi/src/main/java/org/apache/airavata/registry/cpi/WorkflowCatalogException.java b/modules/registry/registry-cpi/src/main/java/org/apache/airavata/registry/cpi/WorkflowCatalogException.java
new file mode 100644
index 0000000..5581115
--- /dev/null
+++ b/modules/registry/registry-cpi/src/main/java/org/apache/airavata/registry/cpi/WorkflowCatalogException.java
@@ -0,0 +1,36 @@
+/**
+ * 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.cpi;
+
+public class WorkflowCatalogException extends Exception{
+ private static final long serialVersionUID = -2849422320139467602L;
+
+ public WorkflowCatalogException(Throwable e) {
+ super(e);
+ }
+
+ public WorkflowCatalogException(String message) {
+ super(message, null);
+ }
+
+ public WorkflowCatalogException(String message, Throwable e) {
+ super(message, e);
+ }
+}