You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airavata.apache.org by sa...@apache.org on 2012/12/31 21:05:35 UTC
svn commit: r1427236 - in
/airavata/trunk/modules/airavata-client/src/main/java/org/apache/airavata/client/impl:
ApplicationOutputDataSettingsImpl.java WorkflowOutputDataSettingsImpl.java
Author: samindaw
Date: Mon Dec 31 20:05:35 2012
New Revision: 1427236
URL: http://svn.apache.org/viewvc?rev=1427236&view=rev
Log:
workflow output data handle impl
Added:
airavata/trunk/modules/airavata-client/src/main/java/org/apache/airavata/client/impl/ApplicationOutputDataSettingsImpl.java (with props)
airavata/trunk/modules/airavata-client/src/main/java/org/apache/airavata/client/impl/WorkflowOutputDataSettingsImpl.java (with props)
Added: airavata/trunk/modules/airavata-client/src/main/java/org/apache/airavata/client/impl/ApplicationOutputDataSettingsImpl.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/airavata-client/src/main/java/org/apache/airavata/client/impl/ApplicationOutputDataSettingsImpl.java?rev=1427236&view=auto
==============================================================================
--- airavata/trunk/modules/airavata-client/src/main/java/org/apache/airavata/client/impl/ApplicationOutputDataSettingsImpl.java (added)
+++ airavata/trunk/modules/airavata-client/src/main/java/org/apache/airavata/client/impl/ApplicationOutputDataSettingsImpl.java Mon Dec 31 20:05:35 2012
@@ -0,0 +1,85 @@
+/*
+ *
+ * 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.client.impl;
+
+import org.apache.airavata.client.api.OutputDataSettings;
+
+public class ApplicationOutputDataSettingsImpl implements OutputDataSettings {
+ private String outputDataDirectory;
+ private String dataRegistry;
+ private Boolean dataPersistent;
+
+ public ApplicationOutputDataSettingsImpl() {
+ }
+
+ public ApplicationOutputDataSettingsImpl(String outputDataDirectory, String dataRegistryUrl, Boolean dataPersistent) {
+ setOutputDataDirectory(outputDataDirectory);
+ setDataRegistryUrl(dataRegistryUrl);
+ setDataPersistent(dataPersistent);
+ }
+
+ @Override
+ public String getOutputDataDirectory() {
+ return outputDataDirectory;
+ }
+
+ @Override
+ public String getDataRegistryUrl() {
+ return dataRegistry;
+ }
+
+ @Override
+ public Boolean isDataPersistent() {
+ return dataPersistent;
+ }
+
+ @Override
+ public void setOutputDataDirectory(String outputDataDirectory) {
+ this.outputDataDirectory=outputDataDirectory;
+ }
+
+ @Override
+ public void setDataRegistryUrl(String dataRegistryUrl) {
+ this.dataRegistry=dataRegistryUrl;
+ }
+
+ @Override
+ public void setDataPersistent(boolean isDataPersistance) {
+ this.dataPersistent=isDataPersistance;
+ }
+
+ @Override
+ public void resetOutputDataDirectory() {
+ this.outputDataDirectory=null;
+ }
+
+ @Override
+ public void resetDataRegistryUrl() {
+ this.dataRegistry=null;
+ }
+
+ @Override
+ public void resetDataPersistent() {
+ this.dataPersistent=null;
+ }
+
+}
Propchange: airavata/trunk/modules/airavata-client/src/main/java/org/apache/airavata/client/impl/ApplicationOutputDataSettingsImpl.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: airavata/trunk/modules/airavata-client/src/main/java/org/apache/airavata/client/impl/WorkflowOutputDataSettingsImpl.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/airavata-client/src/main/java/org/apache/airavata/client/impl/WorkflowOutputDataSettingsImpl.java?rev=1427236&view=auto
==============================================================================
--- airavata/trunk/modules/airavata-client/src/main/java/org/apache/airavata/client/impl/WorkflowOutputDataSettingsImpl.java (added)
+++ airavata/trunk/modules/airavata-client/src/main/java/org/apache/airavata/client/impl/WorkflowOutputDataSettingsImpl.java Mon Dec 31 20:05:35 2012
@@ -0,0 +1,74 @@
+/*
+ *
+ * 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.client.impl;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+
+import org.apache.airavata.client.api.OutputDataSettings;
+import org.apache.airavata.client.api.WorkflowOutputDataSettings;
+
+public class WorkflowOutputDataSettingsImpl implements
+ WorkflowOutputDataSettings {
+ private List<OutputDataSettings> outputDataSettingsList;
+
+ private List<OutputDataSettings> getOutputDataSettingsList(){
+ if (outputDataSettingsList==null){
+ outputDataSettingsList=new ArrayList<OutputDataSettings>();
+ }
+ return outputDataSettingsList;
+ }
+
+ @Override
+ public OutputDataSettings[] getOutputDataSettings() {
+ return getOutputDataSettingsList().toArray(new OutputDataSettings[]{});
+ }
+
+ @Override
+ public OutputDataSettings addNewOutputDataSettings(
+ String outputDataDirectory, String dataRegistryURL,
+ boolean isDataPersistent) {
+ getOutputDataSettingsList().add(new ApplicationOutputDataSettingsImpl(outputDataDirectory, dataRegistryURL, isDataPersistent));
+ return getOutputDataSettingsList().get(getOutputDataSettingsList().size()-1);
+ }
+
+ @Override
+ public void addNewOutputDataSettings(
+ OutputDataSettings... outputDataSettings) {
+ getOutputDataSettingsList().addAll(Arrays.asList(outputDataSettings));
+
+ }
+
+ @Override
+ public void removeOutputDataSettings(OutputDataSettings outputDataSettings) {
+ if (getOutputDataSettingsList().contains(outputDataSettings)){
+ getOutputDataSettingsList().remove(outputDataSettings);
+ }
+ }
+
+ @Override
+ public void removeAllOutputDataSettings() {
+ getOutputDataSettingsList().clear();
+ }
+
+}
Propchange: airavata/trunk/modules/airavata-client/src/main/java/org/apache/airavata/client/impl/WorkflowOutputDataSettingsImpl.java
------------------------------------------------------------------------------
svn:mime-type = text/plain