Return-Path: X-Original-To: apmail-airavata-commits-archive@www.apache.org Delivered-To: apmail-airavata-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id F00BCD6BC for ; Mon, 31 Dec 2012 20:05:59 +0000 (UTC) Received: (qmail 84129 invoked by uid 500); 31 Dec 2012 20:05:59 -0000 Delivered-To: apmail-airavata-commits-archive@airavata.apache.org Received: (qmail 84095 invoked by uid 500); 31 Dec 2012 20:05:59 -0000 Mailing-List: contact commits-help@airavata.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@airavata.apache.org Delivered-To: mailing list commits@airavata.apache.org Received: (qmail 84087 invoked by uid 99); 31 Dec 2012 20:05:59 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 31 Dec 2012 20:05:59 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 31 Dec 2012 20:05:56 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id CE97F23888CD; Mon, 31 Dec 2012 20:05:35 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1427236 - in /airavata/trunk/modules/airavata-client/src/main/java/org/apache/airavata/client/impl: ApplicationOutputDataSettingsImpl.java WorkflowOutputDataSettingsImpl.java Date: Mon, 31 Dec 2012 20:05:35 -0000 To: commits@airavata.apache.org From: samindaw@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20121231200535.CE97F23888CD@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org 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 outputDataSettingsList; + + private List getOutputDataSettingsList(){ + if (outputDataSettingsList==null){ + outputDataSettingsList=new ArrayList(); + } + 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