http://git-wip-us.apache.org/repos/asf/oodt/blob/2fc7bced/tools/pdi_plugin/src/org/apache/oodt/filemgrdelete/FilemgrDeleteStepMeta.java ---------------------------------------------------------------------- diff --git a/tools/pdi_plugin/src/org/apache/oodt/filemgrdelete/FilemgrDeleteStepMeta.java b/tools/pdi_plugin/src/org/apache/oodt/filemgrdelete/FilemgrDeleteStepMeta.java deleted file mode 100644 index e89484c..0000000 --- a/tools/pdi_plugin/src/org/apache/oodt/filemgrdelete/FilemgrDeleteStepMeta.java +++ /dev/null @@ -1,349 +0,0 @@ -/* - * 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.oodt.filemgrdelete; - -import org.eclipse.swt.widgets.Shell; -import org.pentaho.di.core.CheckResult; -import org.pentaho.di.core.CheckResultInterface; -import org.pentaho.di.core.annotations.Step; -import org.pentaho.di.core.database.DatabaseMeta; -import org.pentaho.di.core.exception.KettleException; -import org.pentaho.di.core.exception.KettleStepException; -import org.pentaho.di.core.exception.KettleValueException; -import org.pentaho.di.core.exception.KettleXMLException; -import org.pentaho.di.core.row.RowMetaInterface; -import org.pentaho.di.core.row.ValueMeta; -import org.pentaho.di.core.row.ValueMetaInterface; -import org.pentaho.di.core.variables.VariableSpace; -import org.pentaho.di.core.xml.XMLHandler; -import org.pentaho.di.i18n.BaseMessages; -import org.pentaho.di.repository.ObjectId; -import org.pentaho.di.repository.Repository; -import org.pentaho.di.trans.Trans; -import org.pentaho.di.trans.TransMeta; -import org.pentaho.di.trans.step.*; -import org.pentaho.metastore.api.IMetaStore; -import org.w3c.dom.Node; - -import java.util.List; - -/** - * This class is part of the demo step plug-in implementation. - * It demonstrates the basics of developing a plug-in step for PDI. - * - * The demo step adds a new string field to the row stream and sets its - * value to "Hello World!". The user may select the name of the new field. - * - * This class is the implementation of StepMetaInterface. - * Classes implementing this interface need to: - * - * - keep track of the step settings - * - serialize step settings both to xml and a repository - * - provide new instances of objects implementing StepDialogInterface, StepInterface and StepDataInterface - * - report on how the step modifies the meta-data of the row-stream (row structure and field types) - * - perform a sanity-check on the settings provided by the user - * - */ - -@Step( - id = "FilemgrCheck", - image = "org/apache/oodt/filemgrcheck/resources/check/oodt.jpg", - i18nPackageName="bi.meteorite.filemgrcheck", - name="FilemgrCheckStep.Name", - description = "FilemgrCheckStep.TooltipDesc", - categoryDescription="i18n:org.pentaho.di.trans.step:BaseStep.Category.Transform" -) -public class FilemgrDeleteStepMeta extends BaseStepMeta implements StepMetaInterface { - - /** - * The PKG member is used when looking up internationalized strings. - * The properties file with localized keys is expected to reside in - * {the package of the class specified}/messages/messages_{locale}.properties - */ - private static Class<?> PKG = FilemgrDeleteStepMeta.class; // for i18n purposes - - /** - * Stores the name of the field added to the row-stream. - */ - private String outputField; - private String filenameField; - private String serverURLField; - private String resultField; - - /** - * Constructor should call super() to make sure the base class has a chance to initialize properly. - */ - public FilemgrDeleteStepMeta() { - super(); - } - - /** - * Called by Spoon to get a new instance of the SWT dialog for the step. - * A standard implementation passing the arguments to the constructor of the step dialog is recommended. - * - * @param shell an SWT Shell - * @param meta description of the step - * @param transMeta description of the the transformation - * @param name the name of the step - * @return new instance of a dialog for this step - */ - public StepDialogInterface getDialog(Shell shell, StepMetaInterface meta, TransMeta transMeta, String name) { - return new FilemgrDeleteStepDialog(shell, meta, transMeta, name); - } - - /** - * Called by PDI to get a new instance of the step implementation. - * A standard implementation passing the arguments to the constructor of the step class is recommended. - * - * @param stepMeta description of the step - * @param stepDataInterface instance of a step data class - * @param cnr copy number - * @param transMeta description of the transformation - * @param disp runtime implementation of the transformation - * @return the new instance of a step implementation - */ - public StepInterface getStep(StepMeta stepMeta, StepDataInterface stepDataInterface, int cnr, TransMeta transMeta, Trans disp) { - return new FilemgrDeleteStep(stepMeta, stepDataInterface, cnr, transMeta, disp); - } - - /** - * Called by PDI to get a new instance of the step data class. - */ - public StepDataInterface getStepData() { - return new FilemgrDeleteStepData(); - } - - /** - * This method is called every time a new step is created and should allocate/set the step configuration - * to sensible defaults. The values set here will be used by Spoon when a new step is created. - */ - public void setDefault() { - outputField = "demo_field"; - filenameField = "fieldname"; - serverURLField = "http://localhost:9000"; - resultField = "result"; - } - - /** - * Getter for the name of the field added by this step - * @return the name of the field added - */ - public String getOutputField() { - return outputField; - } - - /** - * Setter for the name of the field added by this step - * @param outputField the name of the field added - */ - public void setOutputField(String outputField) { - this.outputField = outputField; - } - - - public String getFilenameField(){ - return filenameField; - } - - public void setFilenameField(String filenameField){ - this.filenameField = filenameField; - } - /** - * This method is used when a step is duplicated in Spoon. It needs to return a deep copy of this - * step meta object. Be sure to create proper deep copies if the step configuration is stored in - * modifiable objects. - * - * See org.pentaho.di.trans.steps.rowgenerator.RowGeneratorMeta.clone() for an example on creating - * a deep copy. - * - * @return a deep copy of this - */ - public Object clone() { - Object retval = super.clone(); - return retval; - } - - /** - * This method is called by Spoon when a step needs to serialize its configuration to XML. The expected - * return value is an XML fragment consisting of one or more XML tags. - * - * Please use org.pentaho.di.core.xml.XMLHandler to conveniently generate the XML. - * - * @return a string containing the XML serialization of this step - */ - public String getXML() throws KettleValueException { - - // only one field to serialize - String xml = " "; - xml += " " +XMLHandler.addTagValue("outputfield", outputField); - xml += " " +XMLHandler.addTagValue("filenamefield", filenameField); - xml += " " +XMLHandler.addTagValue("serverurlfield", serverURLField); - xml += " " +XMLHandler.addTagValue("resultfield", resultField); - return xml; - } - - /** - * This method is called by PDI when a step needs to load its configuration from XML. - * - * Please use org.pentaho.di.core.xml.XMLHandler to conveniently read from the - * XML node passed in. - * - * @param stepnode the XML node containing the configuration - * @param databases the databases available in the transformation - * @param metaStore the metaStore to optionally read from - */ - public void loadXML(Node stepnode, List<DatabaseMeta> databases, IMetaStore metaStore) throws KettleXMLException { - - try { - setOutputField(XMLHandler.getNodeValue(XMLHandler.getSubNode(stepnode, "outputfield"))); - setFilenameField(XMLHandler.getNodeValue(XMLHandler.getSubNode(stepnode, "filenamefield"))); - setServerURLField(XMLHandler.getNodeValue(XMLHandler.getSubNode(stepnode, "serverurlfield"))); - setResultField(XMLHandler.getNodeValue(XMLHandler.getSubNode(stepnode, "resultfield"))); - } catch (Exception e) { - throw new KettleXMLException("Demo plugin unable to read step info from XML node", e); - } - - } - /** - * This method is called by Spoon when a step needs to serialize its configuration to a repository. - * The repository implementation provides the necessary methods to save the step attributes. - * - * @param rep the repository to save to - * @param metaStore the metaStore to optionally write to - * @param id_transformation the id to use for the transformation when saving - * @param id_step the id to use for the step when saving - */ - public void saveRep(Repository rep, IMetaStore metaStore, ObjectId id_transformation, ObjectId id_step) throws KettleException - { - try{ - rep.saveStepAttribute(id_transformation, id_step, "outputfield", outputField); //$NON-NLS-1$ - } - catch(Exception e){ - throw new KettleException("Unable to save step into repository: "+id_step, e); - } - } - - /** - * This method is called by PDI when a step needs to read its configuration from a repository. - * The repository implementation provides the necessary methods to read the step attributes. - * - * @param rep the repository to read from - * @param metaStore the metaStore to optionally read from - * @param id_step the id of the step being read - * @param databases the databases available in the transformation - */ - public void readRep(Repository rep, IMetaStore metaStore, ObjectId id_step, List<DatabaseMeta> databases) throws KettleException { - try{ - outputField = rep.getStepAttributeString(id_step, "outputfield"); //$NON-NLS-1$ - } - catch(Exception e){ - throw new KettleException("Unable to load step from repository", e); - } - } - - /** - * This method is called to determine the changes the step is making to the row-stream. - * To that end a RowMetaInterface object is passed in, containing the row-stream structure as it is when entering - * the step. This method must apply any changes the step makes to the row stream. Usually a step adds fields to the - * row-stream. - * - * @param inputRowMeta the row structure coming in to the step - * @param name the name of the step making the changes - * @param info row structures of any info steps coming in - * @param nextStep the description of a step this step is passing rows to - * @param space the variable space for resolving variables - * @param repository the repository instance optionally read from - * @param metaStore the metaStore to optionally read from - */ - public void getFields(RowMetaInterface inputRowMeta, String name, RowMetaInterface[] info, StepMeta nextStep, VariableSpace space, Repository repository, IMetaStore metaStore) throws KettleStepException{ - - /* - * This implementation appends the outputField to the row-stream - */ - - // a value meta object contains the meta data for a field - ValueMetaInterface v = new ValueMeta(outputField, ValueMeta.TYPE_STRING); - - // setting trim type to "both" - v.setTrimType(ValueMeta.TRIM_TYPE_BOTH); - - // the name of the step that adds this field - v.setOrigin(name); - - // modify the row structure and add the field this step generates - inputRowMeta.addValueMeta(v); - - } - - - /** - * This method is called when the user selects the "Verify Transformation" option in Spoon. - * A list of remarks is passed in that this method should add to. Each remark is a comment, warning, error, or ok. - * The method should perform as many checks as necessary to catch design-time errors. - * - * Typical checks include: - * - verify that all mandatory configuration is given - * - verify that the step receives any input, unless it's a row generating step - * - verify that the step does not receive any input if it does not take them into account - * - verify that the step finds fields it relies on in the row-stream - * - * @param remarks - * @param transMeta - * @param stepMeta - * @param prev - * @param input - * @param output - * @param info - * @param space - * @param repository - * @param metaStore - */ - public void check(List<CheckResultInterface> remarks, TransMeta transMeta, StepMeta stepMeta, RowMetaInterface prev, String input[], String output[], RowMetaInterface info, VariableSpace space, Repository repository, IMetaStore metaStore) { - - CheckResult cr; - - // See if there are input streams leading to this step! - if (input.length > 0) { - cr = new CheckResult(CheckResult.TYPE_RESULT_OK, BaseMessages.getString(PKG, "Demo.CheckResult.ReceivingRows.OK"), stepMeta); - remarks.add(cr); - } else { - cr = new CheckResult(CheckResult.TYPE_RESULT_ERROR, BaseMessages.getString(PKG, "Demo.CheckResult.ReceivingRows.ERROR"), stepMeta); - remarks.add(cr); - } - - } - - - public void setServerURLField(String serverURLField) { - this.serverURLField = serverURLField; - } - - public String getServerURLField() { - return serverURLField; - } - - - public void setResultField(String resultField) { - this.resultField = resultField; - } - - public String getResultField() { - return resultField; - } -}
http://git-wip-us.apache.org/repos/asf/oodt/blob/2fc7bced/tools/pdi_plugin/src/org/apache/oodt/filemgrdelete/OODTConfig.java ---------------------------------------------------------------------- diff --git a/tools/pdi_plugin/src/org/apache/oodt/filemgrdelete/OODTConfig.java b/tools/pdi_plugin/src/org/apache/oodt/filemgrdelete/OODTConfig.java deleted file mode 100644 index 0ebe318..0000000 --- a/tools/pdi_plugin/src/org/apache/oodt/filemgrdelete/OODTConfig.java +++ /dev/null @@ -1,57 +0,0 @@ -/* - * 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.oodt.filemgrdelete; - - -import org.apache.oodt.cas.filemgr.system.XmlRpcFileManagerClient; - -import java.net.URL; -import java.util.logging.Level; -import java.util.logging.Logger; - -/** - * Created by bugg on 07/03/14. - */ -public class OODTConfig { - - private static final Logger LOG = Logger.getLogger(OODTConfig.class.getName()); - - private URL fmUrl; - - public URL getFmUrl(){ - return this.fmUrl; - } - - private static XmlRpcFileManagerClient client = null; - - public boolean loadXMLRpcClient(String fmUrlStr){ - try { - client = new XmlRpcFileManagerClient(new URL(fmUrlStr)); - } catch (Exception e) { - LOG.log(Level.SEVERE, - "Unable to create file manager client: Message: " - + e.getMessage() + ": errors to follow"); - } - return true; - } - - public XmlRpcFileManagerClient getXMLRpcClient(){ - return client; - } -} http://git-wip-us.apache.org/repos/asf/oodt/blob/2fc7bced/tools/pdi_plugin/src/org/apache/oodt/filemgrdelete/OODTProcesses.java ---------------------------------------------------------------------- diff --git a/tools/pdi_plugin/src/org/apache/oodt/filemgrdelete/OODTProcesses.java b/tools/pdi_plugin/src/org/apache/oodt/filemgrdelete/OODTProcesses.java deleted file mode 100644 index c33bcb7..0000000 --- a/tools/pdi_plugin/src/org/apache/oodt/filemgrdelete/OODTProcesses.java +++ /dev/null @@ -1,57 +0,0 @@ -/* - * 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.oodt.filemgrdelete; - -import org.apache.oodt.cas.filemgr.structs.Product; -import org.apache.oodt.cas.filemgr.structs.Reference; -import org.apache.oodt.cas.filemgr.system.XmlRpcFileManagerClient; - -import java.io.File; -import java.net.URI; -import java.util.List; - -/** - * Created by bugg on 07/03/14. - */ -public class OODTProcesses { - - public boolean deleteProductByName(OODTConfig config, String filename) throws Exception { - XmlRpcFileManagerClient client = config.getXMLRpcClient(); - Product p = client.getProductByName(filename); - List<Reference> refs = client.getProductReferences(p); - if (refs == null) { - throw new Exception("FileManager returned null References"); - } - for (Reference ref : refs) { - if (!client.removeFile(new File(new URI(ref.getDataStoreReference())) - .getAbsolutePath())) { - throw new Exception("Failed to delete file '" - + ref.getDataStoreReference() + "'"); - } - } - if (client.removeProduct(p)) { - // printer.println("Successfully deleted product '" - // + p.getProductName() + "'"); - return true; - } else { - throw new Exception("Delete product returned false"); - } - } - - -} http://git-wip-us.apache.org/repos/asf/oodt/blob/2fc7bced/tools/pdi_plugin/src/org/apache/oodt/filemgrdelete/PushPullObjectFactory.java ---------------------------------------------------------------------- diff --git a/tools/pdi_plugin/src/org/apache/oodt/filemgrdelete/PushPullObjectFactory.java b/tools/pdi_plugin/src/org/apache/oodt/filemgrdelete/PushPullObjectFactory.java deleted file mode 100644 index a710e1f..0000000 --- a/tools/pdi_plugin/src/org/apache/oodt/filemgrdelete/PushPullObjectFactory.java +++ /dev/null @@ -1,74 +0,0 @@ -/* - * 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.oodt.filemgrdelete; - -//OODT imports -import org.apache.oodt.cas.filemgr.ingest.Cache; -import org.apache.oodt.cas.filemgr.ingest.CacheFactory; -import org.apache.oodt.cas.filemgr.ingest.Ingester; - -//JDK imports -import java.lang.reflect.InvocationTargetException; - -/** - * - * @author bfoster - * @version $Revision$ - * - * <p> - * Describe your class here - * </p>. - */ -public class PushPullObjectFactory { - - private PushPullObjectFactory() throws InstantiationException { - throw new InstantiationException("Don't construct factory classes!"); - } - - public static <T> T createNewInstance(Class<T> clazz) throws InstantiationException { - try { - return clazz.newInstance(); - } catch (Exception e) { - throw new InstantiationException( - "Failed to create new object : " - + e.getMessage()); - } - } - - public static Ingester createIngester(String ingesterClass, - String cacheFactoryClass) throws InstantiationException, - IllegalAccessException, ClassNotFoundException, - IllegalArgumentException, SecurityException, - InvocationTargetException, NoSuchMethodException { - String dataTransferFactory = "org.apache.oodt.cas.filemgr.datatransfer.LocalDataTransferFactory"; - System.out.println("TRANSFER: " + dataTransferFactory); - if (cacheFactoryClass == null || cacheFactoryClass.equals("")) { - return (Ingester) Class.forName(ingesterClass).getConstructor( - dataTransferFactory.getClass()).newInstance( - dataTransferFactory); - } else { - Class<CacheFactory> cacheFactory = (Class<CacheFactory>) Class - .forName(cacheFactoryClass); - Cache cache = cacheFactory.newInstance().createCache(); - return (Ingester) Class.forName(ingesterClass).getConstructor( - dataTransferFactory.getClass(), cache.getClass()) - .newInstance(dataTransferFactory, cache); - } - } - -} http://git-wip-us.apache.org/repos/asf/oodt/blob/2fc7bced/tools/pdi_plugin/src/org/apache/oodt/filemgrdelete/messages/messages_en_US.properties ---------------------------------------------------------------------- diff --git a/tools/pdi_plugin/src/org/apache/oodt/filemgrdelete/messages/messages_en_US.properties b/tools/pdi_plugin/src/org/apache/oodt/filemgrdelete/messages/messages_en_US.properties deleted file mode 100644 index ef95599..0000000 --- a/tools/pdi_plugin/src/org/apache/oodt/filemgrdelete/messages/messages_en_US.properties +++ /dev/null @@ -1,11 +0,0 @@ -Demo.Shell.Title=Demo step -Demo.FieldName.Label=Output field name -Demo.CheckResult.ReceivingRows.OK=Step is receiving input from other steps. -Demo.CheckResult.ReceivingRows.ERROR=No input received from other steps! - -FilemgrDeleteStep.Name=OODT Filemgr File Delete -FilemgrDeleteStep.TooltipDesc=Remove a file from the file manager - -FilemgrDelete.FieldName.Label=Stream Field Name -FilemgrDelete.ServerURL.Label=Filemgr URL -FilemgrDelete.Result.Label=Result Field http://git-wip-us.apache.org/repos/asf/oodt/blob/2fc7bced/tools/pdi_plugin/src/org/apache/oodt/filemgrget/FilemgrGetStep.java ---------------------------------------------------------------------- diff --git a/tools/pdi_plugin/src/org/apache/oodt/filemgrget/FilemgrGetStep.java b/tools/pdi_plugin/src/org/apache/oodt/filemgrget/FilemgrGetStep.java deleted file mode 100644 index eb9cc62..0000000 --- a/tools/pdi_plugin/src/org/apache/oodt/filemgrget/FilemgrGetStep.java +++ /dev/null @@ -1,244 +0,0 @@ -package org.apache.oodt.filemgrget; - -import org.apache.oodt.cas.filemgr.structs.exceptions.CatalogException; -import org.apache.oodt.cas.filemgr.structs.exceptions.ConnectionException; -import org.apache.oodt.cas.filemgr.structs.exceptions.DataTransferException; -import org.pentaho.di.core.Const; -import org.pentaho.di.core.exception.KettleException; -import org.pentaho.di.core.row.RowMeta; -import org.pentaho.di.trans.Trans; -import org.pentaho.di.trans.TransMeta; -import org.pentaho.di.trans.step.*; -import sun.util.logging.resources.logging_de; - -import java.io.IOException; -import java.net.MalformedURLException; -import java.util.Map; - -import static org.pentaho.di.core.row.RowDataUtil.allocateRowData; - -/** -* Copyright 2014 OSBI Ltd -* -* Licensed 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. -*/ - -/* - * 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. - */ - -public class FilemgrGetStep extends BaseStep implements StepInterface { - - private OODTConfig oodt = new OODTConfig(); - private OODTProcesses oodtproc = new OODTProcesses(); - private FilemgrGetStepData data; - private FilemgrGetStepMeta meta; - /** - * The constructor should simply pass on its arguments to the parent class. - * - * @param s step description - * @param stepDataInterface step data class - * @param c step copy - * @param t transformation description - * @param dis transformation executing - */ - public FilemgrGetStep(StepMeta s, StepDataInterface stepDataInterface, int c, TransMeta t, Trans dis) { - super(s, stepDataInterface, c, t, dis); - } - - /** - * This method is called by PDI during transformation startup. - * - * It should initialize required for step execution. - * - * The meta and data implementations passed in can safely be cast - * to the step's respective implementations. - * - * It is mandatory that super.init() is called to ensure correct behavior. - * - * Typical tasks executed here are establishing the connection to a database, - * as wall as obtaining resources, like file handles. - * - * @param smi step meta interface implementation, containing the step settings - * @param sdi step data interface implementation, used to store runtime information - * - * @return true if initialization completed successfully, false if there was an error preventing the step from working. - * - */ - public boolean init(StepMetaInterface smi, StepDataInterface sdi) { - // Casting to step-specific implementation classes is safe - meta = (FilemgrGetStepMeta) smi; - data = (FilemgrGetStepData) sdi; - - - logDetailed("loading xmlrpcclient"); - try { - oodt.loadXMLRpcClient(meta.getServerURLField()); - } catch (MalformedURLException e) { - logError("Incorrect URL", e); - } catch (ConnectionException e) { - logError("There was a problem connecting", e); - } - logDetailed("finished loading xmlrpcclient"); - - - return super.init(meta, data); - } - - - private Object[] buildEmptyRow() { - - return allocateRowData(data.outputRowMeta.size()); - } - - /** - * Once the transformation starts executing, the processRow() method is called repeatedly - * by PDI for as long as it returns true. To indicate that a step has finished processing rows - * this method must call setOutputDone() and return false; - * - * Steps which process incoming rows typically call getRow() to read a single row from the - * input stream, change or add row content, call putRow() to pass the changed row on - * and return true. If getRow() returns null, no more rows are expected to come in, - * and the processRow() implementation calls setOutputDone() and returns false to - * indicate that it is done too. - * - * Steps which generate rows typically construct a new row Object[] using a call to - * RowDataUtil.allocateRowData(numberOfFields), add row content, and call putRow() to - * pass the new row on. Above process may happen in a loop to generate multiple rows, - * at the end of which processRow() would call setOutputDone() and return false; - * - * @param smi the step meta interface containing the step settings - * @param sdi the step data interface that should be used to store - * - * @return true to indicate that the function should be called again, false if the step is done - */ - public boolean processRow(StepMetaInterface smi, StepDataInterface sdi) throws KettleException { - - - if ( first ) { - first = false; - data.outputRowMeta = new RowMeta(); - meta.getFields( data.outputRowMeta, getStepname(), null, null, this, repository, metaStore ); - } - - if(meta.getProcessType() == Process.LIST){ - try { - Map<String, Map<String, String>> products = oodtproc.getAllProducts(oodt, environmentSubstitute(meta.getProductTypeField())); - for (Map.Entry<String, Map<String,String>> entry : products.entrySet()) - { - Object[] row = buildEmptyRow(); - - incrementLinesRead(); - - row[0] = entry.getKey(); - int i = 1; - for(Map.Entry<String,String> innerentry : entry.getValue().entrySet()){ - row[i] = innerentry.getValue(); - i++; - } - - putRow(data.outputRowMeta, row); - } - - } catch (Exception e) { - logError("Could not get data", e); - } - - } - else if(meta.getProcessType() == Process.GET && meta.getSearchType() == Search.ID){ - - try { - String lookup = meta.getLookup(); - if(!Const.isEmpty(lookup)){ - lookup = environmentSubstitute(lookup); - } - - Object[] row = buildEmptyRow(); - row[0] = oodtproc.getProductByID(oodt, lookup); - putRow(data.outputRowMeta, row); - - } catch (CatalogException e) { - logError("Catalog Exception", e); - } catch (DataTransferException e) { - logError("Data Transfer Exception", e); - } catch (IOException e) { - logError("IO Exception",e); - } - } - else if(meta.getProcessType() == Process.GET && meta.getSearchType() == Search.NAME){ - try { - String lookup = meta.getLookup(); - if(!Const.isEmpty(lookup)){ - lookup = environmentSubstitute(lookup); - } - - Object[] row = buildEmptyRow(); - row[0] = oodtproc.getProductByName(oodt, lookup); - putRow(data.outputRowMeta, row); - } catch (CatalogException e) { - logError("Catalog Exception", e); - } catch (DataTransferException e) { - logError("Data Transfer Exception", e); - } catch (IOException e) { - logError("IO Exception", e); - } - } - - - // log progress if it is time to to so - if (checkFeedback(getLinesRead())) { - logBasic("Linenr " + getLinesRead()); // Some basic logging - } - - // indicate that processRow() should be called again - setOutputDone(); - return false; - } - - /** - * This method is called by PDI once the step is done processing. - * - * The dispose() method is the counterpart to init() and should release any resources - * acquired for step execution like file handles or database connections. - * - * The meta and data implementations passed in can safely be cast - * to the step's respective implementations. - * - * It is mandatory that super.dispose() is called to ensure correct behavior. - * - * @param smi step meta interface implementation, containing the step settings - * @param sdi step data interface implementation, used to store runtime information - */ - public void dispose(StepMetaInterface smi, StepDataInterface sdi) { - - // Casting to step-specific implementation classes is safe - FilemgrGetStepMeta meta = (FilemgrGetStepMeta) smi; - FilemgrGetStepData data = (FilemgrGetStepData) sdi; - - super.dispose(meta, data); - } - -} http://git-wip-us.apache.org/repos/asf/oodt/blob/2fc7bced/tools/pdi_plugin/src/org/apache/oodt/filemgrget/FilemgrGetStepData.java ---------------------------------------------------------------------- diff --git a/tools/pdi_plugin/src/org/apache/oodt/filemgrget/FilemgrGetStepData.java b/tools/pdi_plugin/src/org/apache/oodt/filemgrget/FilemgrGetStepData.java deleted file mode 100644 index ada2397..0000000 --- a/tools/pdi_plugin/src/org/apache/oodt/filemgrget/FilemgrGetStepData.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * 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.oodt.filemgrget; - -import org.pentaho.di.core.row.RowMetaInterface; -import org.pentaho.di.trans.step.BaseStepData; -import org.pentaho.di.trans.step.StepDataInterface; - -/** -* Copyright 2014 OSBI Ltd -* -* Licensed 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. -*/ -public class FilemgrGetStepData extends BaseStepData implements StepDataInterface { - - public RowMetaInterface outputRowMeta; - - public String fieldname; - - public FilemgrGetStepData() - { - super(); - } -} - http://git-wip-us.apache.org/repos/asf/oodt/blob/2fc7bced/tools/pdi_plugin/src/org/apache/oodt/filemgrget/FilemgrGetStepDialog.java ---------------------------------------------------------------------- diff --git a/tools/pdi_plugin/src/org/apache/oodt/filemgrget/FilemgrGetStepDialog.java b/tools/pdi_plugin/src/org/apache/oodt/filemgrget/FilemgrGetStepDialog.java deleted file mode 100644 index c6aaf0b..0000000 --- a/tools/pdi_plugin/src/org/apache/oodt/filemgrget/FilemgrGetStepDialog.java +++ /dev/null @@ -1,438 +0,0 @@ -/* - * 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.oodt.filemgrget; - -import org.eclipse.swt.SWT; -import org.eclipse.swt.events.*; -import org.eclipse.swt.layout.FormAttachment; -import org.eclipse.swt.layout.FormData; -import org.eclipse.swt.layout.FormLayout; -import org.eclipse.swt.layout.RowLayout; -import org.eclipse.swt.widgets.*; -import org.pentaho.di.core.Const; -import org.pentaho.di.i18n.BaseMessages; -import org.pentaho.di.trans.TransMeta; -import org.pentaho.di.trans.step.BaseStepMeta; -import org.pentaho.di.trans.step.StepDialogInterface; -import org.pentaho.di.ui.core.widget.TextVar; -import org.pentaho.di.ui.trans.step.BaseStepDialog; - -/** -* Copyright 2014 OSBI Ltd -* -* Licensed 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. -*/ -public class FilemgrGetStepDialog extends BaseStepDialog implements StepDialogInterface { - - /** - * The PKG member is used when looking up internationalized strings. - * The properties file with localized keys is expected to reside in - * {the package of the class specified}/messages/messages_{locale}.properties - */ - private static Class<?> PKG = FilemgrGetStepMeta.class; // for i18n purposes - - // this is the object the stores the step's settings - // the dialog reads the settings from it when opening - // the dialog writes the settings to it when confirmed - private FilemgrGetStepMeta meta; - - // text field holding the name of the field to add to the row stream - //private Text wHelloFieldName; - - // text field holding the name of the field to check the filename against - private TextVar wFilenameField; - private Text wServerURLField; - private TextVar wResultField; - private Button[] radioButtons2 = new Button[2]; - private Button[] radioButtons = new Button[2]; - private Search selectedsearch; - private Process selectedprocess; - /** - * The constructor should simply invoke super() and save the incoming meta - * object to a local variable, so it can conveniently read and write settings - * from/to it. - * - * @param parent the SWT shell to open the dialog in - * @param in the meta object holding the step's settings - * @param transMeta transformation description - * @param sname the step name - */ - public FilemgrGetStepDialog(Shell parent, Object in, TransMeta transMeta, String sname) { - super(parent, (BaseStepMeta) in, transMeta, sname); - meta = (FilemgrGetStepMeta) in; - } - - /** - * This method is called by Spoon when the user opens the settings dialog of the step. - * It should open the dialog and return only once the dialog has been closed by the user. - * - * If the user confirms the dialog, the meta object (passed in the constructor) must - * be updated to reflect the new step settings. The changed flag of the meta object must - * reflect whether the step configuration was changed by the dialog. - * - * If the user cancels the dialog, the meta object must not be updated, and its changed flag - * must remain unaltered. - * - * The open() method must return the name of the step after the user has confirmed the dialog, - * or null if the user cancelled the dialog. - */ - public String open() { - - // store some convenient SWT variables - Shell parent = getParent(); - Display display = parent.getDisplay(); - - // SWT code for preparing the dialog - shell = new Shell(parent, SWT.DIALOG_TRIM | SWT.RESIZE | SWT.MIN | SWT.MAX); - props.setLook(shell); - setShellImage(shell, meta); - - // Save the value of the changed flag on the meta object. If the user cancels - // the dialog, it will be restored to this saved value. - // The "changed" variable is inherited from BaseStepDialog - changed = meta.hasChanged(); - - // The ModifyListener used on all controls. It will update the meta object to - // indicate that changes are being made. - ModifyListener lsMod = new ModifyListener() { - public void modifyText(ModifyEvent e) { - meta.setChanged(); - } - }; - - // ------------------------------------------------------- // - // SWT code for building the actual settings dialog // - // ------------------------------------------------------- // - FormLayout formLayout = new FormLayout(); - formLayout.marginWidth = Const.FORM_MARGIN; - formLayout.marginHeight = Const.FORM_MARGIN; - - shell.setLayout(formLayout); - shell.setText(BaseMessages.getString(PKG, "FilemgrGetStep.Name")); - - int middle = props.getMiddlePct(); - int margin = Const.MARGIN; - - // Stepname line - wlStepname = new Label(shell, SWT.RIGHT); - wlStepname.setText(BaseMessages.getString(PKG, "System.Label.StepName")); - props.setLook(wlStepname); - fdlStepname = new FormData(); - fdlStepname.left = new FormAttachment(0, 0); - fdlStepname.right = new FormAttachment(middle, -margin); - fdlStepname.top = new FormAttachment(0, margin); - wlStepname.setLayoutData(fdlStepname); - - wStepname = new Text(shell, SWT.SINGLE | SWT.LEFT | SWT.BORDER); - wStepname.setText(stepname); - props.setLook(wStepname); - wStepname.addModifyListener(lsMod); - fdStepname = new FormData(); - fdStepname.left = new FormAttachment(middle, 0); - fdStepname.top = new FormAttachment(0, margin); - fdStepname.right = new FormAttachment(100, 0); - wStepname.setLayoutData(fdStepname); - - // servername field value - Label wlServerName = new Label(shell, SWT.RIGHT); - wlServerName.setText(BaseMessages.getString(PKG, "FilemgrGet.ServerURL.Label")); - props.setLook(wlServerName); - FormData fdlServerName = new FormData(); - fdlServerName.left = new FormAttachment(0, 0); - fdlServerName.right = new FormAttachment(middle, -margin); - fdlServerName.top = new FormAttachment(wStepname, margin); - wlServerName.setLayoutData(fdlServerName); - - wServerURLField = new Text(shell, SWT.SINGLE | SWT.LEFT | SWT.BORDER); - props.setLook(wServerURLField); - wServerURLField.addModifyListener(lsMod); - FormData fdServerName = new FormData(); - fdServerName.left = new FormAttachment(middle, 0); - fdServerName.right = new FormAttachment(100, 0); - fdServerName.top = new FormAttachment(wStepname, margin); - wServerURLField.setLayoutData(fdServerName); - - // product type - Label wlValName = new Label(shell, SWT.RIGHT); - wlValName.setText(BaseMessages.getString(PKG, "FilemgrGet.ProductType.Label")); - props.setLook(wlValName); - FormData fdlValName = new FormData(); - fdlValName.left = new FormAttachment(0, 0); - fdlValName.right = new FormAttachment(middle, -margin); - fdlValName.top = new FormAttachment(wServerURLField, margin); - wlValName.setLayoutData(fdlValName); - - wFilenameField = new TextVar(transMeta, shell, SWT.SINGLE | SWT.LEFT | SWT.BORDER); - props.setLook(wFilenameField); - wFilenameField.addModifyListener(lsMod); - FormData fdValName = new FormData(); - fdValName.left = new FormAttachment(middle, 0); - fdValName.right = new FormAttachment(100, 0); - fdValName.top = new FormAttachment(wServerURLField, margin); - wFilenameField.setLayoutData(fdValName); - - - // processtype value - Label wlProcessTypeName = new Label(shell, SWT.RIGHT); - wlProcessTypeName.setText(BaseMessages.getString(PKG, "FilemgrGet.ProcessType.Label")); - props.setLook(wlProcessTypeName); - FormData fdlProcessTypeName = new FormData(); - fdlProcessTypeName.left = new FormAttachment(0, 0); - fdlProcessTypeName.right = new FormAttachment(middle, -margin); - fdlProcessTypeName.top = new FormAttachment(wFilenameField, margin); - wlProcessTypeName.setLayoutData(fdlProcessTypeName); - - Composite composite = new Composite(shell, SWT.NULL); - composite.setLayout(new RowLayout()); - radioButtons2[0] = new Button(composite, SWT.RADIO); - radioButtons2[0].setSelection(true); - radioButtons2[0].setText("List Products"); - radioButtons2[0].pack(); - radioButtons2[1] = new Button(composite, SWT.RADIO); - radioButtons2[1].setSelection(false); - radioButtons2[1].setText("Get Product"); - radioButtons2[1].pack(); - props.setLook(radioButtons2[0]); - props.setLook(radioButtons2[1]); - - - //wFilenameField.addModifyListener(lsMod); - FormData fdProcessTypeName = new FormData(); - fdProcessTypeName.left = new FormAttachment(middle, 0); - fdProcessTypeName.right = new FormAttachment(100, 0); - fdProcessTypeName.top = new FormAttachment(wFilenameField, margin); - composite.setLayoutData(fdProcessTypeName); - - - // search type value - Label wlSearchName = new Label(shell, SWT.RIGHT); - wlSearchName.setText(BaseMessages.getString(PKG, "FilemgrGet.SearchType.Label")); - props.setLook(wlSearchName); - FormData fdlSearchName = new FormData(); - fdlSearchName.left = new FormAttachment(0, 0); - fdlSearchName.right = new FormAttachment(middle, -margin); - fdlSearchName.top = new FormAttachment(composite, margin); - wlSearchName.setLayoutData(fdlSearchName); - - Composite composite1 = new Composite(shell, SWT.NULL); - composite1.setLayout(new RowLayout()); - radioButtons[0] = new Button(composite1, SWT.RADIO); - radioButtons[0].setSelection(true); - radioButtons[0].setText("Name"); - radioButtons[0].pack(); - radioButtons[1] = new Button(composite1, SWT.RADIO); - radioButtons[1].setSelection(false); - radioButtons[1].setText("ID"); - radioButtons[1].pack(); - props.setLook(radioButtons[0]); - props.setLook(radioButtons[1]); - radioButtons[0].addSelectionListener(new SelectionAdapter() { - public void widgetSelected(SelectionEvent e) { - selectedsearch = Search.NAME; - } - }); - radioButtons[1].addSelectionListener(new SelectionAdapter() { - public void widgetSelected(SelectionEvent e) { - selectedsearch = Search.ID; - } - }); - - FormData fdSearchName = new FormData(); - fdSearchName.left = new FormAttachment(middle, 0); - fdSearchName.right = new FormAttachment(100, 0); - fdSearchName.top = new FormAttachment(composite, margin); - composite1.setLayoutData(fdSearchName); - - if(meta.getProcessType()==Process.LIST){ - radioButtons[0].setEnabled(false); - radioButtons[1].setEnabled(false); - } - - - // servername field value - Label wlResultName = new Label(shell, SWT.RIGHT); - wlResultName.setText(BaseMessages.getString(PKG, "FilemgrGet.Result.Label")); - props.setLook(wlResultName); - FormData fdlResultName = new FormData(); - fdlResultName.left = new FormAttachment(0, 0); - fdlResultName.right = new FormAttachment(middle, -margin); - fdlResultName.top = new FormAttachment(composite1, margin); - wlResultName.setLayoutData(fdlResultName); - - wResultField = new TextVar(transMeta, shell, SWT.SINGLE | SWT.LEFT | SWT.BORDER); - props.setLook(wResultField); - wResultField.addModifyListener(lsMod); - FormData fdResultName = new FormData(); - fdResultName.left = new FormAttachment(middle, 0); - fdResultName.right = new FormAttachment(100, 0); - fdResultName.top = new FormAttachment(composite1, margin); - wResultField.setLayoutData(fdResultName); - wResultField.addModifyListener(new ModifyListener() { - public void modifyText(ModifyEvent e) { - wResultField.setToolTipText(transMeta.environmentSubstitute(wResultField.getText())); - } - }); - - if(meta.getProcessType()==Process.LIST){ - wResultField.setEnabled(false); - } - // OK and cancel buttons - wOK = new Button(shell, SWT.PUSH); - wOK.setText(BaseMessages.getString(PKG, "System.Button.OK")); - wCancel = new Button(shell, SWT.PUSH); - wCancel.setText(BaseMessages.getString(PKG, "System.Button.Cancel")); - - BaseStepDialog.positionBottomButtons(shell, new Button[] { wOK, wCancel }, margin, wResultField); - - // Add listeners for cancel and OK - lsCancel = new Listener() { - public void handleEvent(Event e) {cancel();} - }; - lsOK = new Listener() { - public void handleEvent(Event e) {ok();} - }; - - wCancel.addListener(SWT.Selection, lsCancel); - wOK.addListener(SWT.Selection, lsOK); - - /** - * Radio button listeners - */ - radioButtons2[0].addSelectionListener(new SelectionAdapter() { - public void widgetSelected(SelectionEvent e) { - selectedprocess = Process.LIST; - wResultField.setEnabled(false); - radioButtons[0].setEnabled(false); - radioButtons[1].setEnabled(false); - - } - }); - radioButtons2[1].addSelectionListener(new SelectionAdapter() { - public void widgetSelected(SelectionEvent e) { - selectedprocess = Process.GET; - radioButtons[0].setEnabled(true); - radioButtons[1].setEnabled(true); - wResultField.setEnabled(true); - } - }); - - // default listener (for hitting "enter") - lsDef = new SelectionAdapter() { - public void widgetDefaultSelected(SelectionEvent e) {ok();} - }; - wStepname.addSelectionListener(lsDef); - wFilenameField.addSelectionListener(lsDef); - wServerURLField.addSelectionListener(lsDef); - wResultField.addSelectionListener(lsDef); - // Detect X or ALT-F4 or something that kills this window and cancel the dialog properly - shell.addShellListener(new ShellAdapter() { - public void shellClosed(ShellEvent e) {cancel();} - }); - - // Set/Restore the dialog size based on last position on screen - // The setSize() method is inherited from BaseStepDialog - setSize(); - - // populate the dialog with the values from the meta object - populateDialog(); - - // restore the changed flag to original value, as the modify listeners fire during dialog population - meta.setChanged(changed); - - // open dialog and enter event loop - shell.open(); - while (!shell.isDisposed()) { - if (!display.readAndDispatch()) - display.sleep(); - } - - // at this point the dialog has closed, so either ok() or cancel() have been executed - // The "stepname" variable is inherited from BaseStepDialog - return stepname; - } - - /** - * This helper method puts the step configuration stored in the meta object - * and puts it into the dialog controls. - */ - private void populateDialog() { - wStepname.selectAll(); - wFilenameField.setText(meta.getProductTypeField()); - wServerURLField.setText(meta.getServerURLField()); - wResultField.setText(meta.getResultField()); - if(meta.getSearchType() == Search.NAME){ - radioButtons[0].setSelection(true); - radioButtons[1].setSelection(false); - selectedsearch = Search.NAME; - } - else{ - radioButtons[1].setSelection(true); - radioButtons[0].setSelection(false); - selectedsearch = Search.ID; - } - - if(meta.getProcessType() == Process.LIST){ - radioButtons2[0].setSelection(true); - radioButtons2[1].setSelection(false); - selectedprocess= Process.LIST; - } - else{ - radioButtons2[1].setSelection(true); - radioButtons2[0].setSelection(false); - selectedprocess = Process.GET; - } - - } - - /** - * Called when the user cancels the dialog. - */ - private void cancel() { - // The "stepname" variable will be the return value for the open() method. - // Setting to null to indicate that dialog was cancelled. - stepname = null; - // Restoring original "changed" flag on the met aobject - meta.setChanged(changed); - // close the SWT dialog window - dispose(); - } - - /** - * Called when the user confirms the dialog - */ - private void ok() { - stepname = wStepname.getText(); - meta.setProductName(wFilenameField.getText()); - meta.setServerURLField(wServerURLField.getText()); - meta.setResultField(wResultField.getText()); - meta.setProcessType(selectedprocess); - meta.setSearchType(selectedsearch); - // close the SWT dialog window - dispose(); - } -} http://git-wip-us.apache.org/repos/asf/oodt/blob/2fc7bced/tools/pdi_plugin/src/org/apache/oodt/filemgrget/FilemgrGetStepMeta.java ---------------------------------------------------------------------- diff --git a/tools/pdi_plugin/src/org/apache/oodt/filemgrget/FilemgrGetStepMeta.java b/tools/pdi_plugin/src/org/apache/oodt/filemgrget/FilemgrGetStepMeta.java deleted file mode 100644 index 3b295fc..0000000 --- a/tools/pdi_plugin/src/org/apache/oodt/filemgrget/FilemgrGetStepMeta.java +++ /dev/null @@ -1,410 +0,0 @@ -/* - * 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.oodt.filemgrget; - -import org.eclipse.swt.widgets.Shell; -import org.pentaho.di.core.CheckResult; -import org.pentaho.di.core.CheckResultInterface; -import org.pentaho.di.core.annotations.Step; -import org.pentaho.di.core.database.DatabaseMeta; -import org.pentaho.di.core.exception.KettleException; -import org.pentaho.di.core.exception.KettleStepException; -import org.pentaho.di.core.exception.KettleValueException; -import org.pentaho.di.core.exception.KettleXMLException; -import org.pentaho.di.core.row.RowMetaInterface; -import org.pentaho.di.core.row.ValueMeta; -import org.pentaho.di.core.row.ValueMetaInterface; -import org.pentaho.di.core.variables.VariableSpace; -import org.pentaho.di.core.xml.XMLHandler; -import org.pentaho.di.i18n.BaseMessages; -import org.pentaho.di.repository.ObjectId; -import org.pentaho.di.repository.Repository; -import org.pentaho.di.trans.Trans; -import org.pentaho.di.trans.TransMeta; -import org.pentaho.di.trans.step.*; -import org.pentaho.metastore.api.IMetaStore; -import org.w3c.dom.Node; - -import java.util.List; - -/** -* Copyright 2014 OSBI Ltd -* -* Licensed 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. -*/ - -@Step( - id = "FilemgrGet", - image = "org/apache/oodt/filemgrcheck/resources/check/oodt.jpg", - i18nPackageName="bi.meteorite.filemgrget", - name="FilemgrGetStep.Name", - description = "FilemgrGetStep.TooltipDesc", - categoryDescription="i18n:org.pentaho.di.trans.step:BaseStep.Category.BigData" -) -public class FilemgrGetStepMeta extends BaseStepMeta implements StepMetaInterface { - - /** - * The PKG member is used when looking up internationalized strings. - * The properties file with localized keys is expected to reside in - * {the package of the class specified}/messages/messages_{locale}.properties - */ - private static Class<?> PKG = FilemgrGetStepMeta.class; // for i18n purposes - - /** - * Stores the name of the field added to the row-stream. - */ - private String outputField; - private String productName; - private String serverURLField; - private String resultField; - private Search searchtypeField; - private Process processtypeField; - - /** - * Constructor should call super() to make sure the base class has a chance to initialize properly. - */ - public FilemgrGetStepMeta() { - super(); - } - - /** - * Called by Spoon to get a new instance of the SWT dialog for the step. - * A standard implementation passing the arguments to the constructor of the step dialog is recommended. - * - * @param shell an SWT Shell - * @param meta description of the step - * @param transMeta description of the the transformation - * @param name the name of the step - * @return new instance of a dialog for this step - */ - public StepDialogInterface getDialog(Shell shell, StepMetaInterface meta, TransMeta transMeta, String name) { - return new FilemgrGetStepDialog(shell, meta, transMeta, name); - } - - /** - * Called by PDI to get a new instance of the step implementation. - * A standard implementation passing the arguments to the constructor of the step class is recommended. - * -gf * @param stepMeta description of the step - * @param stepDataInterface instance of a step data class - * @param cnr copy number - * @param transMeta description of the transformation - * @param disp runtime implementation of the transformation - * @return the new instance of a step implementation - */ - public StepInterface getStep(StepMeta stepMeta, StepDataInterface stepDataInterface, int cnr, TransMeta transMeta, Trans disp) { - return new FilemgrGetStep(stepMeta, stepDataInterface, cnr, transMeta, disp); - } - - /** - * Called by PDI to get a new instance of the step data class. - */ - public StepDataInterface getStepData() { - return new FilemgrGetStepData(); - } - - /** - * This method is called every time a new step is created and should allocate/set the step configuration - * to sensible defaults. The values set here will be used by Spoon when a new step is created. - */ - public void setDefault() { - outputField = "demo_field"; - serverURLField = "http://localhost:9000"; - resultField = "result"; - productName = "GenericFile"; - searchtypeField = Search.NAME; - processtypeField = Process.LIST; - } - - /** - * Getter for the name of the field added by this step - * @return the name of the field added - */ - public String getOutputField() { - return outputField; - } - - /** - * Setter for the name of the field added by this step - * @param outputField the name of the field added - */ - public void setOutputField(String outputField) { - this.outputField = outputField; - } - - - public String getProductTypeField(){ - return productName; - } - - public void setProductName(String productName){ - this.productName = productName; - } - /** - * This method is used when a step is duplicated in Spoon. It needs to return a deep copy of this - * step meta object. Be sure to create proper deep copies if the step configuration is stored in - * modifiable objects. - * - * See org.pentaho.di.trans.steps.rowgenerator.RowGeneratorMeta.clone() for an example on creating - * a deep copy. - * - * @return a deep copy of this - */ - public Object clone() { - return super.clone(); - } - - /** - * This method is called by Spoon when a step needs to serialize its configuration to XML. The expected - * return value is an XML fragment consisting of one or more XML tags. - * - * Please use org.pentaho.di.core.xml.XMLHandler to conveniently generate the XML. - * - * @return a string containing the XML serialization of this step - */ - public String getXML() throws KettleValueException { - - // only one field to serialize - String xml = " "; - xml += " " +XMLHandler.addTagValue("outputfield", outputField); - xml += " " +XMLHandler.addTagValue("filenamefield", productName); - xml += " " +XMLHandler.addTagValue("serverurlfield", serverURLField); - xml += " " +XMLHandler.addTagValue("resultfield", resultField); - xml += " " +XMLHandler.addTagValue("producttypefield", productName); - xml += " " +XMLHandler.addTagValue("searchtypefield", searchtypeField.toString()); - xml += " " +XMLHandler.addTagValue("processtypefield", processtypeField.toString()); - return xml; - } - - /** - * This method is called by PDI when a step needs to load its configuration from XML. - * - * Please use org.pentaho.di.core.xml.XMLHandler to conveniently read from the - * XML node passed in. - * - * @param stepnode the XML node containing the configuration - * @param databases the databases available in the transformation - * @param metaStore the metaStore to optionally read from - */ - public void loadXML(Node stepnode, List<DatabaseMeta> databases, IMetaStore metaStore) throws KettleXMLException { - - try { - setOutputField(XMLHandler.getNodeValue(XMLHandler.getSubNode(stepnode, "outputfield"))); - setProductName(XMLHandler.getNodeValue(XMLHandler.getSubNode(stepnode, "filenamefield"))); - setServerURLField(XMLHandler.getNodeValue(XMLHandler.getSubNode(stepnode, "serverurlfield"))); - setResultField(XMLHandler.getNodeValue(XMLHandler.getSubNode(stepnode, "resultfield"))); - setProductName(XMLHandler.getNodeValue(XMLHandler.getSubNode(stepnode, "producttypefield"))); - setSearchType(Search.valueOf(XMLHandler.getNodeValue(XMLHandler.getSubNode(stepnode, "searchtypefield")))); - setProcessType(Process.valueOf(XMLHandler.getNodeValue(XMLHandler.getSubNode(stepnode, "processtypefield")))); - - } catch (Exception e) { - throw new KettleXMLException("Demo plugin unable to read step info from XML node", e); - } - - } - /** - * This method is called by Spoon when a step needs to serialize its configuration to a repository. - * The repository implementation provides the necessary methods to save the step attributes. - * - * @param rep the repository to save to - * @param metaStore the metaStore to optionally write to - * @param id_transformation the id to use for the transformation when saving - * @param id_step the id to use for the step when saving - */ - public void saveRep(Repository rep, IMetaStore metaStore, ObjectId id_transformation, ObjectId id_step) throws KettleException - { - try{ - rep.saveStepAttribute(id_transformation, id_step, "outputfield", outputField); //$NON-NLS-1$ - } - catch(Exception e){ - throw new KettleException("Unable to save step into repository: "+id_step, e); - } - } - - /** - * This method is called by PDI when a step needs to read its configuration from a repository. - * The repository implementation provides the necessary methods to read the step attributes. - * - * @param rep the repository to read from - * @param metaStore the metaStore to optionally read from - * @param id_step the id of the step being read - * @param databases the databases available in the transformation - */ - public void readRep(Repository rep, IMetaStore metaStore, ObjectId id_step, List<DatabaseMeta> databases) throws KettleException { - try{ - outputField = rep.getStepAttributeString(id_step, "outputfield"); //$NON-NLS-1$ - } - catch(Exception e){ - throw new KettleException("Unable to load step from repository", e); - } - } - - /** - * This method is called to determine the changes the step is making to the row-stream. - * To that end a RowMetaInterface object is passed in, containing the row-stream structure as it is when entering - * the step. This method must apply any changes the step makes to the row stream. Usually a step adds fields to the - * row-stream. - * - * @param inputRowMeta the row structure coming in to the step - * @param name the name of the step making the changes - * @param info row structures of any info steps coming in - * @param nextStep the description of a step this step is passing rows to - * @param space the variable space for resolving variables - * @param repository the repository instance optionally read from - * @param metaStore the metaStore to optionally read from - */ - public void getFields(RowMetaInterface inputRowMeta, String name, RowMetaInterface[] info, StepMeta nextStep, VariableSpace space, Repository repository, IMetaStore metaStore) throws KettleStepException{ - - /* - * This implementation appends the outputField to the row-stream - */ - if(getProcessType() == Process.LIST){ - // a value meta object contains the meta data for a field - ValueMetaInterface v = new ValueMeta("id", ValueMeta.TYPE_STRING); - - // setting trim type to "both" - v.setTrimType(ValueMeta.TRIM_TYPE_BOTH); - - // the name of the step that adds this field - v.setOrigin(name); - - // modify the row structure and add the field this step generates - inputRowMeta.addValueMeta(v); - - ValueMetaInterface v2 = new ValueMeta("type", ValueMeta.TYPE_STRING); - v2.setTrimType(ValueMeta.TRIM_TYPE_BOTH); - v2.setOrigin(name); - inputRowMeta.addValueMeta(v2); - - ValueMetaInterface v3 = new ValueMeta("name", ValueMeta.TYPE_STRING); - v3.setTrimType(ValueMeta.TRIM_TYPE_BOTH); - v3.setOrigin(name); - inputRowMeta.addValueMeta(v3); - - ValueMetaInterface v4 = new ValueMeta("structure", ValueMeta.TYPE_STRING); - v4.setTrimType(ValueMeta.TRIM_TYPE_BOTH); - v4.setOrigin(name); - inputRowMeta.addValueMeta(v4); - - ValueMetaInterface v5 = new ValueMeta("transferstatus", ValueMeta.TYPE_STRING); - v5.setTrimType(ValueMeta.TRIM_TYPE_BOTH); - v5.setOrigin(name); - inputRowMeta.addValueMeta(v5); - - ValueMetaInterface v6 = new ValueMeta("metadata", ValueMeta.TYPE_STRING); - v6.setTrimType(ValueMeta.TRIM_TYPE_BOTH); - v6.setOrigin(name); - inputRowMeta.addValueMeta(v6); - } - else{ - ValueMetaInterface v6 = new ValueMeta("export", ValueMeta.TYPE_STRING); - v6.setTrimType(ValueMeta.TRIM_TYPE_BOTH); - v6.setOrigin(name); - inputRowMeta.addValueMeta(v6); - } - } - - /** - * This method is called when the user selects the "Verify Transformation" option in Spoon. - * A list of remarks is passed in that this method should add to. Each remark is a comment, warning, error, or ok. - * The method should perform as many checks as necessary to catch design-time errors. - * - * Typical checks include: - * - verify that all mandatory configuration is given - * - verify that the step receives any input, unless it's a row generating step - * - verify that the step does not receive any input if it does not take them into account - * - verify that the step finds fields it relies on in the row-stream - * - * @param remarks the list of remarks to append to - * @param transMeta the description of the transformation - * @param stepMeta the description of the step - * @param prev the structure of the incoming row-stream - * @param input names of steps sending input to the step - * @param output names of steps this step is sending output to - * @param info fields coming in from info steps - * @param metaStore metaStore to optionally read from - */ - public void check(List<CheckResultInterface> remarks, TransMeta transMeta, StepMeta stepMeta, RowMetaInterface prev, String input[], String output[], RowMetaInterface info, VariableSpace space, Repository repository, IMetaStore metaStore) { - - CheckResult cr; - - // See if there are input streams leading to this step! - if (input.length > 0) { - cr = new CheckResult(CheckResult.TYPE_RESULT_OK, BaseMessages.getString(PKG, "Demo.CheckResult.ReceivingRows.OK"), stepMeta); - remarks.add(cr); - } else { - cr = new CheckResult(CheckResult.TYPE_RESULT_ERROR, BaseMessages.getString(PKG, "Demo.CheckResult.ReceivingRows.ERROR"), stepMeta); - remarks.add(cr); - } - - } - - - public void setServerURLField(String serverURLField) { - this.serverURLField = serverURLField; - } - - public String getServerURLField() { - return serverURLField; - } - - - public void setResultField(String resultField) { - this.resultField = resultField; - } - - public String getResultField() { - return resultField; - } - - - public Process getProcessType() { - - return processtypeField; - } - - public void setProcessType(Process processtypeField){ - this.processtypeField = processtypeField; - } - - public Search getSearchType() { - return searchtypeField; - } - - public void setSearchType(Search searchType){ - this.searchtypeField = searchType; - } - - public String getLookup() { - return resultField; - } - - public void setLookup(String lookup){ - this.resultField = lookup; - } -} http://git-wip-us.apache.org/repos/asf/oodt/blob/2fc7bced/tools/pdi_plugin/src/org/apache/oodt/filemgrget/OODTConfig.java ---------------------------------------------------------------------- diff --git a/tools/pdi_plugin/src/org/apache/oodt/filemgrget/OODTConfig.java b/tools/pdi_plugin/src/org/apache/oodt/filemgrget/OODTConfig.java deleted file mode 100644 index dc295f9..0000000 --- a/tools/pdi_plugin/src/org/apache/oodt/filemgrget/OODTConfig.java +++ /dev/null @@ -1,60 +0,0 @@ -/* - * 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.oodt.filemgrget; - -import org.apache.oodt.cas.filemgr.structs.exceptions.ConnectionException; -import org.apache.oodt.cas.filemgr.system.XmlRpcFileManagerClient; - -import java.net.MalformedURLException; -import java.net.URL; -import java.util.logging.Level; -import java.util.logging.Logger; - -/** -* Copyright 2014 OSBI Ltd -* -* Licensed 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. -*/ -public class OODTConfig { - - private static final Logger LOG = Logger.getLogger(OODTConfig.class.getName()); - - private static XmlRpcFileManagerClient client = null; - - public boolean loadXMLRpcClient(String fmUrlStr) throws MalformedURLException, ConnectionException { - - client = new XmlRpcFileManagerClient(new URL(fmUrlStr), true); - - return true; - } - - public XmlRpcFileManagerClient getXMLRpcClient(){ - return client; - } - -} http://git-wip-us.apache.org/repos/asf/oodt/blob/2fc7bced/tools/pdi_plugin/src/org/apache/oodt/filemgrget/OODTProcesses.java ---------------------------------------------------------------------- diff --git a/tools/pdi_plugin/src/org/apache/oodt/filemgrget/OODTProcesses.java b/tools/pdi_plugin/src/org/apache/oodt/filemgrget/OODTProcesses.java deleted file mode 100644 index 4da706f..0000000 --- a/tools/pdi_plugin/src/org/apache/oodt/filemgrget/OODTProcesses.java +++ /dev/null @@ -1,130 +0,0 @@ -/* - * 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.oodt.filemgrget; - -import com.google.gson.Gson; -import org.apache.oodt.cas.filemgr.datatransfer.DataTransfer; -import org.apache.oodt.cas.filemgr.datatransfer.LocalDataTransferFactory; -import org.apache.oodt.cas.filemgr.structs.Product; -import org.apache.oodt.cas.filemgr.structs.ProductPage; -import org.apache.oodt.cas.filemgr.structs.ProductType; -import org.apache.oodt.cas.filemgr.structs.exceptions.CatalogException; -import org.apache.oodt.cas.filemgr.structs.exceptions.DataTransferException; -import org.apache.oodt.cas.filemgr.system.XmlRpcFileManagerClient; -import org.apache.oodt.cas.metadata.Metadata; - -import java.io.File; -import java.io.IOException; -import java.util.*; - -/** - * Copyright 2014 OSBI Ltd - * <p/> - * Licensed 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 - * <p/> - * http://www.apache.org/licenses/LICENSE-2.0 - * <p/> - * 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. - */ -public class OODTProcesses { - - - public Map<String, Map<String, String>> getAllProducts(OODTConfig config, String productTypeName) throws Exception { - XmlRpcFileManagerClient client = config.getXMLRpcClient(); - ProductType type = client.getProductTypeByName(productTypeName); - if (type == null) { - throw new Exception("FileManager returned null ProductType"); - } - ProductPage firstPage = client.getFirstPage(type); - if (firstPage == null) { - throw new Exception("FileManager returned null product page"); - } - - Map<String, Map<String, String>> o = new ConcurrentHashMap<String, Map<String, String>>(); - - for (int pid = 0; pid < firstPage.getTotalPages(); pid++) { - if (pid > 0) { - firstPage = client.getNextPage(type, firstPage); - } - for (Product p : firstPage.getPageProducts()) { - Metadata met = client.getMetadata(p); - - Map<String, String> h = new ConcurrentHashMap<String, String>(); - h.put("name", p.getProductName()); - h.put("type", p.getProductType().getName()); - h.put("structure", p.getProductStructure()); - h.put("transferstatus", p.getTransferStatus()); - Gson g = new Gson(); - String json = g.toJson(met.getHashtable()); - h.put("metadata", json); - o.put(p.getProductId(), h); - - } - - } - return o; - - } - - - public String getProductByID(OODTConfig config, String id) throws CatalogException, IOException, DataTransferException { - Product product = config.getXMLRpcClient().getProductById(id); - product.setProductReferences(config.getXMLRpcClient().getProductReferences(product)); - LocalDataTransferFactory ldtf = new LocalDataTransferFactory(); - DataTransfer dt = ldtf.createDataTransfer(); - String rand = UUID.randomUUID().toString(); - File theDir = new File("/tmp/oodt/" + rand); - boolean mkdir = false; - if (!theDir.exists()) { - mkdir = theDir.mkdir(); - } - if (mkdir) { - dt.retrieveProduct(product, new File("/tmp/oodt/" + rand)); - return "/tmp/oodt/" + rand + "/" + product.getProductName(); - } else { - return null; - } - } - - public String getProductByName(OODTConfig config, String name) throws CatalogException, IOException, DataTransferException { - Product product = config.getXMLRpcClient().getProductByName(name); - product.setProductReferences(config.getXMLRpcClient().getProductReferences(product)); - LocalDataTransferFactory ldtf = new LocalDataTransferFactory(); - DataTransfer dt = ldtf.createDataTransfer(); - String rand = UUID.randomUUID().toString(); - File theDir = new File("/tmp/oodt/" + rand); - boolean mkdir = false; - if (!theDir.exists()) { - mkdir = theDir.mkdir(); - } - if (mkdir) { - dt.retrieveProduct(product, new File("/tmp/oodt/" + rand)); - return "/tmp/oodt/" + rand + "/" + product.getProductName(); - } else { - return null; - } - - } - -} http://git-wip-us.apache.org/repos/asf/oodt/blob/2fc7bced/tools/pdi_plugin/src/org/apache/oodt/filemgrget/Process.java ---------------------------------------------------------------------- diff --git a/tools/pdi_plugin/src/org/apache/oodt/filemgrget/Process.java b/tools/pdi_plugin/src/org/apache/oodt/filemgrget/Process.java deleted file mode 100644 index a780e0f..0000000 --- a/tools/pdi_plugin/src/org/apache/oodt/filemgrget/Process.java +++ /dev/null @@ -1,37 +0,0 @@ -/* - * 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.oodt.filemgrget; - -/** -* Copyright 2014 OSBI Ltd -* -* Licensed 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. -*/ -public enum Process { - LIST,GET -} http://git-wip-us.apache.org/repos/asf/oodt/blob/2fc7bced/tools/pdi_plugin/src/org/apache/oodt/filemgrget/Search.java ---------------------------------------------------------------------- diff --git a/tools/pdi_plugin/src/org/apache/oodt/filemgrget/Search.java b/tools/pdi_plugin/src/org/apache/oodt/filemgrget/Search.java deleted file mode 100644 index d3cd5ad..0000000 --- a/tools/pdi_plugin/src/org/apache/oodt/filemgrget/Search.java +++ /dev/null @@ -1,37 +0,0 @@ -/* - * 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.oodt.filemgrget; - -/** -* Copyright 2014 OSBI Ltd -* -* Licensed 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. -*/ -public enum Search { - NAME,ID -} http://git-wip-us.apache.org/repos/asf/oodt/blob/2fc7bced/tools/pdi_plugin/src/org/apache/oodt/filemgrget/messages/messages_en_US.properties ---------------------------------------------------------------------- diff --git a/tools/pdi_plugin/src/org/apache/oodt/filemgrget/messages/messages_en_US.properties b/tools/pdi_plugin/src/org/apache/oodt/filemgrget/messages/messages_en_US.properties deleted file mode 100644 index f40155a..0000000 --- a/tools/pdi_plugin/src/org/apache/oodt/filemgrget/messages/messages_en_US.properties +++ /dev/null @@ -1,9 +0,0 @@ -FilemgrGetStep.Name=OODT Filemgr File Get -FilemgrGetStep.TooltipDesc=Get the file from the repository - -FilemgrGet.ProductType.Label=Product Type Field -FilemgrGet.ProcessType.Label=Process Type -FilemgrGet.SearchType.Label=Search Type -FilemgrGet.FieldName.Label=Product Type -FilemgrGet.ServerURL.Label=Filemgr URL -FilemgrGet.Result.Label=Product Name/ID http://git-wip-us.apache.org/repos/asf/oodt/blob/2fc7bced/tools/pdi_plugin/src/org/apache/oodt/filemgrget/resources/get/oodt.jpg ---------------------------------------------------------------------- diff --git a/tools/pdi_plugin/src/org/apache/oodt/filemgrget/resources/get/oodt.jpg b/tools/pdi_plugin/src/org/apache/oodt/filemgrget/resources/get/oodt.jpg deleted file mode 100644 index 5810409..0000000 Binary files a/tools/pdi_plugin/src/org/apache/oodt/filemgrget/resources/get/oodt.jpg and /dev/null differ http://git-wip-us.apache.org/repos/asf/oodt/blob/2fc7bced/tools/pdi_plugin/src/org/apache/oodt/filemgrget/resources/get/oodt.png ---------------------------------------------------------------------- diff --git a/tools/pdi_plugin/src/org/apache/oodt/filemgrget/resources/get/oodt.png b/tools/pdi_plugin/src/org/apache/oodt/filemgrget/resources/get/oodt.png deleted file mode 100644 index e69de29..0000000
