Skip to content

Commit

Permalink
[BACKLOG-38506] Code changes for moving Job step 'connected to reposi…
Browse files Browse the repository at this point in the history
…tory' from core to plugin.
  • Loading branch information
nawaz34-hitachivantara committed Sep 14, 2023
1 parent c611a7d commit 4889c15
Show file tree
Hide file tree
Showing 24 changed files with 403 additions and 35 deletions.
13 changes: 13 additions & 0 deletions assemblies/plugins/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@
<pdi-json-plugin.version>10.1.0.0-SNAPSHOT</pdi-json-plugin.version>
<pdi-rest-plugin.version>9.6.0.0-SNAPSHOT</pdi-rest-plugin.version>
<get-repository-names-plugin.version>${project.version}</get-repository-names-plugin.version>
<connected-to-repository-plugin.version>${project.version}</connected-to-repository-plugin.version>
</properties>

<dependencies>
Expand Down Expand Up @@ -759,6 +760,18 @@
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.pentaho.di.plugins</groupId>
<artifactId>connected-to-repository-plugins</artifactId>
<version>${connected-to-repository-plugin.version}</version>
<type>zip</type>
<exclusions>
<exclusion>
<groupId>*</groupId>
<artifactId>*</artifactId>
</exclusion>
</exclusions>
</dependency>
</dependencies>


Expand Down
1 change: 0 additions & 1 deletion engine/src/main/resources/kettle-job-entries.xml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@
<job-entry id="DELETE_FOLDERS"> <description>i18n:org.pentaho.di.job.entry:JobEntry.DeleteFolders.TypeDesc</description> <classname>org.pentaho.di.job.entries.deletefolders.JobEntryDeleteFolders</classname> <category>i18n:org.pentaho.di.job:JobCategory.Category.FileManagement</category> <tooltip>i18n:org.pentaho.di.job.entry:JobEntry.DeleteFolders.Tooltip</tooltip> <iconfile>ui/images/DSF.svg</iconfile> <documentation_url>http://wiki.pentaho.com/display/EAI/Delete+folders</documentation_url> <cases_url/> <forum_url/> </job-entry>
<job-entry id="COLUMNS_EXIST"> <description>i18n:org.pentaho.di.job.entry:JobEntry.ColumnsExist.TypeDesc</description> <classname>org.pentaho.di.job.entries.columnsexist.JobEntryColumnsExist</classname> <category>i18n:org.pentaho.di.job:JobCategory.Category.Conditions</category> <tooltip>i18n:org.pentaho.di.job.entry:JobEntry.ColumnsExist.Tooltip</tooltip> <iconfile>ui/images/CEX.svg</iconfile> <documentation_url>http://wiki.pentaho.com/display/EAI/Columns+exist+in+a+table</documentation_url> <cases_url/> <forum_url/> </job-entry>
<job-entry id="EXPORT_REPOSITORY"> <description>i18n:org.pentaho.di.job.entry:JobEntry.ExportRepository.TypeDesc</description> <classname>org.pentaho.di.job.entries.exportrepository.JobEntryExportRepository</classname> <category>i18n:org.pentaho.di.job:JobCategory.Category.Repository</category> <tooltip>i18n:org.pentaho.di.job.entry:JobEntry.ExportRepository.Tooltip</tooltip> <iconfile>ui/images/EREP.svg</iconfile> <documentation_url>http://wiki.pentaho.com/display/EAI/Export+repository+to+XML+file</documentation_url> <cases_url/> <forum_url/> </job-entry>
<job-entry id="CONNECTED_TO_REPOSITORY"> <description>i18n:org.pentaho.di.job.entry:JobEntry.ConnectedToRepository.TypeDesc</description> <classname>org.pentaho.di.job.entries.connectedtorepository.JobEntryConnectedToRepository</classname> <category>i18n:org.pentaho.di.job:JobCategory.Category.Repository</category> <tooltip>i18n:org.pentaho.di.job.entry:JobEntry.ConnectedToRepository.Tooltip</tooltip> <iconfile>ui/images/CREP.svg</iconfile> <documentation_url>http://wiki.pentaho.com/display/EAI/Check+if+connected+to+Repository</documentation_url> <cases_url/> <forum_url/> </job-entry>
<job-entry id="TRUNCATE_TABLES"> <description>i18n:org.pentaho.di.job.entry:JobEntry.TruncateTables.TypeDesc</description> <classname>org.pentaho.di.job.entries.truncatetables.JobEntryTruncateTables</classname> <category>i18n:org.pentaho.di.job:JobCategory.Category.Utility</category> <tooltip>i18n:org.pentaho.di.job.entry:JobEntry.TruncateTables.Tooltip</tooltip> <iconfile>ui/images/TRT.svg</iconfile> <documentation_url>http://wiki.pentaho.com/display/EAI/Truncate+tables</documentation_url> <cases_url/> <forum_url/> </job-entry>
<job-entry id="SET_VARIABLES"> <description>i18n:org.pentaho.di.job.entry:JobEntry.SetVariables.TypeDesc</description> <classname>org.pentaho.di.job.entries.setvariables.JobEntrySetVariables</classname> <category>i18n:org.pentaho.di.job:JobCategory.Category.General</category> <tooltip>i18n:org.pentaho.di.job.entry:JobEntry.SetVariables.Tooltip</tooltip> <iconfile>ui/images/SVA.svg</iconfile> <documentation_url>http://wiki.pentaho.com/display/EAI/Set+variables+%28job+entry%29</documentation_url> <cases_url/> <forum_url/> </job-entry>
<job-entry id="WAIT_FOR_SQL"> <description>i18n:org.pentaho.di.job.entry:JobEntry.WaitForSQL.TypeDesc</description> <classname>org.pentaho.di.job.entries.waitforsql.JobEntryWaitForSQL</classname> <category>i18n:org.pentaho.di.job:JobCategory.Category.Utility</category> <tooltip>i18n:org.pentaho.di.job.entry:JobEntry.WaitForSQL.Tooltip</tooltip> <iconfile>ui/images/WSQL.svg</iconfile> <documentation_url>http://wiki.pentaho.com/display/EAI/Wait+for+SQL</documentation_url> <cases_url/> <forum_url/> </job-entry>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,6 @@ JobEntry.ColumnsExist.TypeDesc=Columns exist in a table
JobEntry.ColumnsExist.Tooltip=Check if one or several columns exist in a table on a specified connection
JobEntry.ExportRepository.TypeDesc=Export repository to XML file
JobEntry.ExportRepository.Tooltip=Export repository to XML file
JobEntry.ConnectedToRepository.TypeDesc=Check if connected to repository
JobEntry.ConnectedToRepository.Tooltip=Return true if we are connected to a repository
JobEntry.TruncateTables.TypeDesc=Truncate tables
JobEntry.TruncateTables.Tooltip=Truncate one or several tables.
JobEntry.SetVariables.TypeDesc=Set variables
Expand Down
1 change: 1 addition & 0 deletions plugins/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ __List of the current core plugins:__
* pentaho-reporting
* mondrianinput
* get-repository-names
* connected-to-repository

__Deprecated plugins:__

Expand Down
55 changes: 55 additions & 0 deletions plugins/connected-to-repository/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>connected-to-repository-assemblies</artifactId>
<version>10.1.0.0-SNAPSHOT</version>
</parent>

<artifactId>connected-to-repository-plugins</artifactId>
<version>10.1.0.0-SNAPSHOT</version>
<packaging>pom</packaging>

<name>PDI check if connected to repository plugin</name>
<description></description>

<dependencies>
<dependency>
<groupId>org.pentaho.di.plugins</groupId>
<artifactId>connected-to-repository-plugins-impl</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.pentaho.di.plugins</groupId>
<artifactId>connected-to-repository-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>connected-to-repository-plugins-impl,connected-to-repository-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>connected-to-repository-plugin</id>
<formats>
<format>zip</format>
</formats>
<baseDirectory>connected-to-repository-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:connected-to-repository-plugins-impl:jar</include>
<include>org.pentaho.di.plugins:connected-to-repository-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/connected-to-repository/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>connected-to-repository</artifactId>
<version>10.1.0.0-SNAPSHOT</version>
</parent>

<artifactId>connected-to-repository-assemblies</artifactId>
<version>10.1.0.0-SNAPSHOT</version>
<packaging>pom</packaging>

<name>PDI check if connected to repository plugin</name>

<modules>
<module>plugin</module>
</modules>
</project>
58 changes: 58 additions & 0 deletions plugins/connected-to-repository/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>connected-to-repository</artifactId>
<version>10.1.0.0-SNAPSHOT</version>
</parent>

<artifactId>connected-to-repository-plugins-impl</artifactId>
<name>PDI check if connected to repository plugin</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-2019 by Hitachi Vantara : http://www.pentaho.com
* Copyright (C) 2002-2023 by Hitachi Vantara : http://www.pentaho.com
*
*******************************************************************************
*
Expand All @@ -25,6 +25,7 @@
import java.util.List;

import org.pentaho.di.cluster.SlaveServer;
import org.pentaho.di.core.annotations.JobEntry;
import org.pentaho.di.core.util.Utils;
import org.pentaho.di.core.Result;
import org.pentaho.di.core.database.DatabaseMeta;
Expand All @@ -46,6 +47,10 @@
* @author Samatar
* @since 23-06-2008
*/

@JobEntry(id = "CONNECTED_TO_REPOSITORY",name = "JobEntry.ConnectedToRepository.TypeDesc",image = "CREP.svg",
description = "JobEntry.ConnectedToRepository.Tooltip",categoryDescription = "i18n:org.pentaho.di.job:JobCategory.Category.Repository",
i18nPackageName = "i18n:org.pentaho.di.job.entry:JobEntry.ConnectedToRepository",documentationUrl = "http://wiki.pentaho.com/display/EAI/Check+if+connected+to+Repository")
public class JobEntryConnectedToRepository extends JobEntryBase implements Cloneable, JobEntryInterface {
private static Class<?> PKG = JobEntryConnectedToRepository.class; // for i18n purposes, needed by Translator2!!

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
#
#
#Mon Jun 23 18:54:52 CEST 2008
JobEntry.ConnectedToRepository.TypeDesc=Check if connected to repository
JobEntry.ConnectedToRepository.Tooltip=Return true if we are connected to a repository
JobEntryConnectedToRepositoryDialog.SelectRepository.Title=Repositories list
JobEntryConnectedToRepositoryDialog.specificUser.Tooltip=Specify user (login)
JobEntryConnectedToRepositoryDialog.specificRep.Label=Specify repository
Expand Down
118 changes: 118 additions & 0 deletions plugins/connected-to-repository/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
<?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>pdi-plugins</artifactId>
<version>10.1.0.0-SNAPSHOT</version>
</parent>

<artifactId>connected-to-repository</artifactId>
<version>10.1.0.0-SNAPSHOT</version>
<packaging>pom</packaging>

<name>PDI check if connected to repository plugin</name>
<description>This plugin is for pentaho Data integration (ETL) a.k.a kettle</description>
<url>http://www.pentaho.com/</url>

<modules>
<module>impl</module>
<module>ui</module>
<module>assemblies</module>
</modules>

<licenses>
<license>
<name>Apache License, Version 2.0</name>
<url>https://www.apache.org/licenses/LICENSE-2.0.txt</url>
<distribution>repo</distribution>
<comments>A business-friendly OSS license</comments>
</license>
</licenses>

<properties>
<org.eclipse.swt.version>4.6</org.eclipse.swt.version>
<jface.version>3.3.0-I20070606-0010</jface.version>
<pdi.version>10.1.0.0-SNAPSHOT</pdi.version>
</properties>

<dependencyManagement>
<dependencies>
<dependency>
<groupId>pentaho-kettle</groupId>
<artifactId>kettle-engine</artifactId>
<version>${pdi.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>pentaho-kettle</groupId>
<artifactId>kettle-core</artifactId>
<version>${pdi.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>pentaho-kettle</groupId>
<artifactId>kettle-ui-swt</artifactId>
<version>${pdi.version}</version>
<scope>provided</scope>
</dependency>

<!-- SWT is required to compile,inorder to work with architecture -->
<dependency>
<groupId>org.eclipse.swt</groupId>
<artifactId>org.eclipse.swt.gtk.linux.x86_64</artifactId>
<version>${org.eclipse.swt.version}</version>
<scope>provided</scope>
<exclusions>
<exclusion>
<artifactId>*</artifactId>
<groupId>*</groupId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.eclipse</groupId>
<artifactId>jface</artifactId>
<version>${jface.version}</version>
<scope>provided</scope>
<exclusions>
<exclusion>
<artifactId>*</artifactId>
<groupId>*</groupId>
</exclusion>
</exclusions>
</dependency>
<!--test dependencies-->
<dependency>
<groupId>pentaho-kettle</groupId>
<artifactId>kettle-core</artifactId>
<version>${pdi.version}</version>
<classifier>tests</classifier>
<scope>test</scope>
</dependency>
<dependency>
<groupId>pentaho-kettle</groupId>
<artifactId>kettle-engine</artifactId>
<version>${pdi.version}</version>
<classifier>tests</classifier>
<scope>test</scope>
</dependency>

<dependency>
<groupId>com.healthmarketscience.jackcess</groupId>
<artifactId>jackcess</artifactId>
<version>1.2.6</version>
<scope>compile</scope>
<exclusions>
<exclusion>
<artifactId>*</artifactId>
<groupId>*</groupId>
</exclusion>
</exclusions>
</dependency>
</dependencies>
</dependencyManagement>
</project>
Loading

0 comments on commit 4889c15

Please sign in to comment.