Skip to content

Commit

Permalink
Merge pull request pentaho#9004 from mmujahiduddin/BACKLOG-38428
Browse files Browse the repository at this point in the history
[BACKLOG-38428][Add] Random Credit Card Number Generator Plugin
  • Loading branch information
peterrinehart authored Sep 11, 2023
2 parents 602fff8 + 282c446 commit bff96e1
Show file tree
Hide file tree
Showing 26 changed files with 419 additions and 47 deletions.
13 changes: 13 additions & 0 deletions assemblies/plugins/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
<ldap-plugin.version>${project.version}</ldap-plugin.version>
<ivw-bulk-loader-plugin.version>${project.version}</ivw-bulk-loader-plugin.version>
<edi2xml-plugin.version>${project.version}</edi2xml-plugin.version>
<random-cc-number-generator-plugin.version>${project.version}</random-cc-number-generator-plugin.version>
<mondrianinput-plugin.version>${project.version}</mondrianinput-plugin.version>
<lucid-db-streaming-loader-plugin.version>${project.version}</lucid-db-streaming-loader-plugin.version>
<gp-bulk-loader-plugin.version>${project.version}</gp-bulk-loader-plugin.version>
Expand Down Expand Up @@ -313,6 +314,18 @@
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.pentaho.di.plugins</groupId>
<artifactId>random-cc-number-generator-plugins</artifactId>
<version>${random-cc-number-generator-plugin.version}</version>
<type>zip</type>
<exclusions>
<exclusion>
<groupId>*</groupId>
<artifactId>*</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.pentaho.di.plugins</groupId>
<artifactId>mondrianinput-plugin</artifactId>
Expand Down
1 change: 0 additions & 1 deletion engine/src/main/resources/kettle-steps.xml
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,6 @@
<step id="LoadFileInput"> <description>i18n:org.pentaho.di.trans.step:BaseStep.TypeLongDesc.LoadFileInput</description> <classname>org.pentaho.di.trans.steps.loadfileinput.LoadFileInputMeta</classname> <category>i18n:org.pentaho.di.trans.step:BaseStep.Category.Input</category> <tooltip>i18n:org.pentaho.di.trans.step:BaseStep.TypeTooltipDesc.LoadFileInput</tooltip> <iconfile>ui/images/LFI.svg</iconfile> <documentation_url>http://wiki.pentaho.com/display/EAI/Load+file+content+in+memory</documentation_url> <cases_url/> <forum_url/> </step>
<step id="FuzzyMatch"> <description>i18n:org.pentaho.di.trans.step:BaseStep.TypeLongDesc.FuzzyMatch</description> <classname>org.pentaho.di.trans.steps.fuzzymatch.FuzzyMatchMeta</classname> <category>i18n:org.pentaho.di.trans.step:BaseStep.Category.Lookup</category> <tooltip>i18n:org.pentaho.di.trans.step:BaseStep.TypeTooltipDesc.FuzzyMatch</tooltip> <iconfile>ui/images/FZM.svg</iconfile> <documentation_url>http://wiki.pentaho.com/display/EAI/Fuzzy+match</documentation_url> <cases_url/> <forum_url/> </step>
<step id="SSH"> <description>i18n:org.pentaho.di.trans.step:BaseStep.TypeLongDesc.SSH</description> <classname>org.pentaho.di.trans.steps.ssh.SSHMeta</classname> <category>i18n:org.pentaho.di.trans.step:BaseStep.Category.Utility</category> <tooltip>i18n:org.pentaho.di.trans.step:BaseStep.TypeTooltipDesc.SSH</tooltip> <iconfile>ui/images/SSH.svg</iconfile> <documentation_url>http://wiki.pentaho.com/display/EAI/Run+SSH+commands</documentation_url> <cases_url/> <forum_url/> </step>
<step id="RandomCCNumberGenerator"> <description>i18n:org.pentaho.di.trans.step:BaseStep.TypeLongDesc.RandomCCNumberGenerator</description> <classname>org.pentaho.di.trans.steps.randomccnumber.RandomCCNumberGeneratorMeta</classname> <category>i18n:org.pentaho.di.trans.step:BaseStep.Category.Input</category> <tooltip>i18n:org.pentaho.di.trans.step:BaseStep.TypeTooltipDesc.RandomCCNumberGenerator</tooltip> <iconfile>ui/images/CCG.svg</iconfile> <documentation_url>http://wiki.pentaho.com/display/EAI/Generate+random+credit+card+numbers</documentation_url> <cases_url/> <forum_url/> </step>
<step id="StringOperations"> <description>i18n:org.pentaho.di.trans.step:BaseStep.TypeLongDesc.StringOperations</description> <classname>org.pentaho.di.trans.steps.stringoperations.StringOperationsMeta</classname> <category>i18n:org.pentaho.di.trans.step:BaseStep.Category.Transform</category> <tooltip>i18n:org.pentaho.di.trans.step:BaseStep.TypeTooltipDesc.StringOperations</tooltip> <iconfile>ui/images/STM.svg</iconfile> <documentation_url>Products/String_Operations</documentation_url> <cases_url/> <forum_url/> </step>
<step id="StepsMetrics"> <description>i18n:org.pentaho.di.trans.step:BaseStep.TypeLongDesc.StepsMetrics</description> <classname>org.pentaho.di.trans.steps.stepsmetrics.StepsMetricsMeta</classname> <category>i18n:org.pentaho.di.trans.step:BaseStep.Category.Statistics</category> <tooltip>i18n:org.pentaho.di.trans.step:BaseStep.TypeTooltipDesc.StepsMetrics</tooltip> <iconfile>ui/images/SSTAS.svg</iconfile> <documentation_url>http://wiki.pentaho.com/display/EAI/Output+Steps+Metrics</documentation_url> <cases_url/> <forum_url/> </step>
<step id="PrioritizeStreams"> <description>i18n:org.pentaho.di.trans.step:BaseStep.TypeLongDesc.PrioritizeStreams</description> <classname>org.pentaho.di.trans.steps.prioritizestreams.PrioritizeStreamsMeta</classname> <category>i18n:org.pentaho.di.trans.step:BaseStep.Category.Flow</category> <tooltip>i18n:org.pentaho.di.trans.step:BaseStep.TypeTooltipDesc.PrioritizeStreams</tooltip> <iconfile>ui/images/PRS.svg</iconfile> <documentation_url>http://wiki.pentaho.com/display/EAI/Prioritize+streams</documentation_url> <cases_url/> <forum_url/> </step>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -360,8 +360,6 @@ BaseStep.TypeLongDesc.SSH=Run SSH commands
BaseStep.TypeTooltipDesc.SSH=Run SSH commands and returns result.
BaseStep.TypeLongDesc.MetaInject=ETL metadata injection
BaseStep.TypeTooltipDesc.MetaInject=This step allows you to inject metadata into an existing transformation prior to execution. This allows for the creation of dynamic and highly flexible data integration solutions.
BaseStep.TypeLongDesc.RandomCCNumberGenerator=Generate random credit card numbers
BaseStep.TypeTooltipDesc.RandomCCNumberGenerator=Generate random valide (luhn check) credit card numbers
BaseStep.TypeLongDesc.StringOperations=String operations
BaseStep.TypeTooltipDesc.StringOperations=Apply certain operations like trimming, padding and others to string value.
BaseStep.TypeLongDesc.HiveTableOutput=Hive Table Output
Expand Down
1 change: 1 addition & 0 deletions plugins/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ __List of the current core plugins:__
* excel
* ivw-bulk-loader
* edi2xml
* random-cc-number-generator
* engine-configuration
* pur
* repositories
Expand Down
1 change: 1 addition & 0 deletions plugins/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
<module>infobright-bulk-loader</module>
<module>ivw-bulk-loader</module>
<module>edi2xml</module>
<module>random-cc-number-generator</module>
<module>mysql-bulk-loader</module>
<module>yaml-input</module>
<module>metastore-locator</module>
Expand Down
55 changes: 55 additions & 0 deletions plugins/random-cc-number-generator/assemblies/plugin/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>org.pentaho.di.plugins</groupId>
<artifactId>random-cc-number-generator-assemblies</artifactId>
<version>10.1.0.0-SNAPSHOT</version>
</parent>

<artifactId>random-cc-number-generator-plugins</artifactId>
<version>10.1.0.0-SNAPSHOT</version>
<packaging>pom</packaging>

<name>Random Credit Card Number Generator Plugins Distribution</name>
<description></description>

<dependencies>
<dependency>
<groupId>org.pentaho.di.plugins</groupId>
<artifactId>random-cc-number-generator-plugins-impl</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.pentaho.di.plugins</groupId>
<artifactId>random-cc-number-generator-plugins-ui</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<id>add-libs</id>
<phase>generate-resources</phase>
<goals>
<goal>copy-dependencies</goal>
</goals>
<configuration>
<outputDirectory>${project.build.directory}/assembly/lib</outputDirectory>
<includeScope>compile</includeScope>
<excludeArtifactIds>random-cc-number-generator-plugins-impl,random-cc-number-generator-plugins-ui</excludeArtifactIds>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>

</project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
<assembly xmlns="http://maven.apache.org/ASSEMBLY/2.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/ASSEMBLY/2.0.0 http://maven.apache.org/xsd/assembly-2.0.0.xsd">
<id>random-cc-number-generator-plugin</id>
<formats>
<format>zip</format>
</formats>
<baseDirectory>random-cc-number-generator-plugins</baseDirectory>

<files>
<file>
<source>${project.basedir}/src/main/resources/version.xml</source>
<outputDirectory>.</outputDirectory>
<filtered>true</filtered>
</file>
</files>

<fileSets>
<!-- the staging dir -->
<fileSet>
<directory>${project.build.directory}/assembly</directory>
<outputDirectory>.</outputDirectory>
</fileSet>
</fileSets>

<dependencySets>
<dependencySet>
<outputDirectory>.</outputDirectory>
<includes>
<include>org.pentaho.di.plugins:random-cc-number-generator-plugins-impl:jar</include>
<include>org.pentaho.di.plugins:random-cc-number-generator-plugins-ui:jar</include>
</includes>
<useProjectArtifact>false</useProjectArtifact>
</dependencySet>
</dependencySets>
</assembly>


Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<?xml version="1.0" encoding="UTF-8"?>
<version>${project.version}</version>
22 changes: 22 additions & 0 deletions plugins/random-cc-number-generator/assemblies/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>org.pentaho.di.plugins</groupId>
<artifactId>random-cc-number-generator</artifactId>
<version>10.1.0.0-SNAPSHOT</version>
</parent>

<artifactId>random-cc-number-generator-assemblies</artifactId>
<version>10.1.0.0-SNAPSHOT</version>
<packaging>pom</packaging>

<name>Random Credit Card Number Generator Plugins Assemblies</name>

<modules>
<module>plugin</module>
</modules>
</project>
58 changes: 58 additions & 0 deletions plugins/random-cc-number-generator/impl/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>org.pentaho.di.plugins</groupId>
<artifactId>random-cc-number-generator</artifactId>
<version>10.1.0.0-SNAPSHOT</version>
</parent>

<artifactId>random-cc-number-generator-plugins-impl</artifactId>
<name>Random Credit Card Number Generator Plugins Impl</name>

<dependencies>
<dependency>
<groupId>pentaho-kettle</groupId>
<artifactId>kettle-core</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>pentaho-kettle</groupId>
<artifactId>kettle-engine</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.healthmarketscience.jackcess</groupId>
<artifactId>jackcess</artifactId>
<scope>compile</scope>
</dependency>

<!-- Test dependencies -->
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-all</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-core</artifactId>
<version>1.3</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>pentaho-kettle</groupId>
<artifactId>kettle-core</artifactId>
<classifier>tests</classifier>
<scope>test</scope>
</dependency>
<dependency>
<groupId>pentaho-kettle</groupId>
<artifactId>kettle-engine</artifactId>
<classifier>tests</classifier>
<scope>test</scope>
</dependency>
</dependencies>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
*
* Pentaho Data Integration
*
* Copyright (C) 2002-2017 by Hitachi Vantara : http://www.pentaho.com
* Copyright (C) 2002-2023 by Hitachi Vantara : http://www.pentaho.com
*
*******************************************************************************
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
*
* Pentaho Data Integration
*
* Copyright (C) 2002-2017 by Hitachi Vantara : http://www.pentaho.com
* Copyright (C) 2002-2023 by Hitachi Vantara : http://www.pentaho.com
*
*******************************************************************************
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
*
* Pentaho Data Integration
*
* Copyright (C) 2002-2017 by Hitachi Vantara : http://www.pentaho.com
* Copyright (C) 2002-2023 by Hitachi Vantara : http://www.pentaho.com
*
*******************************************************************************
*
Expand All @@ -27,6 +27,7 @@
import org.pentaho.di.core.CheckResult;
import org.pentaho.di.core.CheckResultInterface;
import org.pentaho.di.core.Const;
import org.pentaho.di.core.annotations.Step;
import org.pentaho.di.core.util.Utils;
import org.pentaho.di.core.database.DatabaseMeta;
import org.pentaho.di.core.exception.KettleException;
Expand Down Expand Up @@ -59,6 +60,14 @@
* @author Samatar
* @since 01-4-2010
*/

@Step( id = "RandomCCNumberGenerator", name = "BaseStep.TypeLongDesc.RandomCCNumberGenerator",
description = "BaseStep.TypeTooltipDesc.RandomCCNumberGenerator",
categoryDescription = "i18n:org.pentaho.di.trans.step:BaseStep.Category.Input",
image = "CCG.svg",
documentationUrl = "http://wiki.pentaho.com/display/EAI/Generate+random+credit+card+numbers",
i18nPackageName = "org.pentaho.di.trans.steps.randomccnumber" )

public class RandomCCNumberGeneratorMeta extends BaseStepMeta implements StepMetaInterface {
private static Class<?> PKG = RandomCCNumberGeneratorMeta.class; // for i18n purposes, needed by Translator2!!

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
*
* Pentaho Data Integration
*
* Copyright (C) 2002-2017 by Hitachi Vantara : http://www.pentaho.com
* Copyright (C) 2002-2023 by Hitachi Vantara : http://www.pentaho.com
*
* This file is dual-licensed under the Apache Software License V2 and is
* also available under the terms of the GNU Lesser GPL version 2.1 as provided
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
#
#
#Thu Aug 05 09:41:38 CEST 2010
BaseStep.TypeLongDesc.RandomCCNumberGenerator=Generate random credit card numbers
BaseStep.TypeTooltipDesc.RandomCCNumberGenerator=Generate random valid credit card numbers
RandomCCNumberGeneratorDialog.Button.PreviewRows=Preview rows
RandomCCNumberGeneratorDialog.CCNumberFieldName.Label=Credit card number field
RandomCCNumberGeneratorMeta.CardNumberField=Card number
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,4 @@ RandomCCNumberGenerator.Log.NoFieldSpecified=You have to specify at least one fi
RandomCCNumberGeneratorDialog.ErrorPreviewingData.DialogTitle=\u30d7\u30ec\u30d3\u30e5\u30fc\u30c7\u30fc\u30bf\u8868\u793a\u30a8\u30e9\u30fc
RandomCCNumberGeneratorDialog.NumberRows.DialogTitle=\u30d7\u30ec\u30d3\u30e5\u30fc\u30b5\u30a4\u30ba\u5165\u529b
RandomCCNumberGeneratorDialog.ErrorPreviewingData.DialogMessage=\u30d7\u30ec\u30d3\u30e5\u30fc\u4e2d\u306b\u30a8\u30e9\u30fc\u304c\u767a\u751f\u3057\u307e\u3057\u305f\u3002
RandomCCNumberGeneratorDialog.NumberRows.DialogMessage=\u30d7\u30ec\u30d3\u30e5\u30fc\u30b5\u30a4\u30ba\u3092\u5165\u529b
RandomCCNumberGeneratorDialog.NumberRows.DialogMessage=\u30d7\u30ec\u30d3\u30e5\u30fc\u30b5\u30a4\u30ba\u3092\u5165\u529b
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ RandomCCNumberGeneratorDialog.NumberRows.DialogMessage=\u8f93\u5165\u9700\u8981\
RandomCCNumberGeneratorDialog.wOutputFields.Label=\u8f93\u51fa\u5b57\u6bb5
RandomCCNumberGeneratorDialog.CCSizeColumn.Column=\u591a\u5c11?
RandomCCNumberGeneratorDialog.NumberRows.DialogTitle=\u8f93\u5165\u9884\u89c8\u5927\u5c0f
RandomCCNumberGeneratorDialog.DialogTitle=\u751f\u6210\u968f\u673a\u7684\u4fe1\u7528\u5361\u53f7
RandomCCNumberGeneratorDialog.DialogTitle=\u751f\u6210\u968f\u673a\u7684\u4fe1\u7528\u5361\u53f7
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
*
* Pentaho Data Integration
*
* Copyright (C) 2002-2017 by Hitachi Vantara : http://www.pentaho.com
* Copyright (C) 2002-2023 by Hitachi Vantara : http://www.pentaho.com
*
*******************************************************************************
*
Expand Down
Loading

0 comments on commit bff96e1

Please sign in to comment.