Skip to content

Commit 46e30e1

Browse files
pgaglani1yumaoka
authored andcommitted
refactor filters (#141)
* refactor filters * adding parent and update package * removing java8 version * getting info from parent pom
1 parent dcbf16a commit 46e30e1

25 files changed

Lines changed: 26 additions & 25 deletions

File tree

examples/custom-res-filter/csv-filter/.classpath renamed to csv-res-filter/.classpath

File renamed without changes.

examples/custom-res-filter/csv-filter/.gitignore renamed to csv-res-filter/.gitignore

File renamed without changes.

examples/custom-res-filter/csv-filter/.project renamed to csv-res-filter/.project

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<projectDescription>
3-
<name>csv-filter</name>
3+
<name>csv-res-filter</name>
44
<comment></comment>
55
<projects>
66
</projects>

examples/custom-res-filter/csv-filter/.settings/org.eclipse.core.resources.prefs renamed to csv-res-filter/.settings/org.eclipse.core.resources.prefs

File renamed without changes.

examples/custom-res-filter/csv-filter/.settings/org.eclipse.jdt.core.prefs renamed to csv-res-filter/.settings/org.eclipse.jdt.core.prefs

File renamed without changes.

examples/custom-res-filter/csv-filter/.settings/org.eclipse.jdt.ui.prefs renamed to csv-res-filter/.settings/org.eclipse.jdt.ui.prefs

File renamed without changes.

examples/custom-res-filter/csv-filter/.settings/org.eclipse.m2e.core.prefs renamed to csv-res-filter/.settings/org.eclipse.m2e.core.prefs

File renamed without changes.

examples/custom-res-filter/csv-filter/README.md renamed to csv-res-filter/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,14 +38,14 @@ A custom resource filter must extends one of above abstract class. Once you have
3838
one or more filter implementations ready, you need to impelment a concrete subclass
3939
of [ResourceFilterProvider](https://github.com/IBM-Cloud/gp-java-tools/blob/master/gp-res-filter/src/main/java/com/ibm/g11n/pipeline/resfilter/ResourceFilterProvider.java).
4040

41-
In this example, [CSVFilter](https://github.com/IBM-Cloud/gp-java-tools/blob/master/examples/custom-res-filter/csv-filter/src/main/java/com/ibm/g11n/pipeline/example/CSVFilter.java)
42-
extends `ResourceFilter` and [MultiBundleCSVFilter](https://github.com/IBM-Cloud/gp-java-tools/blob/master/examples/custom-res-filter/csv-filter/src/main/java/com/ibm/g11n/pipeline/example/MultiBundleCSVFilter.java) extends `MultiBundleResourceFilter`.
41+
In this example, [CSVFilter](https://github.com/IBM-Cloud/gp-java-tools/blob/master/csv-res-filter/src/main/java/com/ibm/g11n/pipeline/CSVFilter.java)
42+
extends `ResourceFilter` and [MultiBundleCSVFilter](https://github.com/IBM-Cloud/gp-java-tools/blob/master/csv-res-filter/src/main/java/com/ibm/g11n/pipeline/MultiBundleCSVFilter.java) extends `MultiBundleResourceFilter`.
4343

4444
To integrate your custom filter implementation, you must create a text file
4545
`com.ibm.g11n.pipeline.resfilter.ResourceFilterProvider` specifying your
4646
`ResourceFilterProvider` implementation class, then place the file under
4747
`META-INF/services` in a jar file. In this CSV filter example, the service
48-
description file is found [here](https://github.com/IBM-Cloud/gp-java-tools/blob/master/examples/custom-res-filter/csv-filter/src/main/resources/META-INF/services/com.ibm.g11n.pipeline.resfilter.ResourceFilterProvider).
48+
description file is found [here](https://github.com/IBM-Cloud/gp-java-tools/blob/master/csv-res-filter/src/main/resources/META-INF/services/com.ibm.g11n.pipeline.resfilter.ResourceFilterProvider).
4949

5050
Once your custom filter jar file is ready, you just need to put the file in
5151
your runtime class path of Globalization Pipeline tools integrated with

examples/custom-res-filter/csv-filter/pom.xml renamed to csv-res-filter/pom.xml

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,17 @@
11
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
22
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
33
<modelVersion>4.0.0</modelVersion>
4-
<groupId>com.ibm.g11n.pipeline</groupId>
5-
<artifactId>csv-filter</artifactId>
6-
<version>1.0.0</version>
4+
<parent>
5+
<groupId>com.ibm.g11n.pipeline</groupId>
6+
<artifactId>gp-java-tools</artifactId>
7+
<version>1.2.7-SNAPSHOT</version>
8+
</parent>
9+
10+
<artifactId>csv-res-filter</artifactId>
711
<name>Custom resource filter example - CSV filter</name>
812

913
<properties>
1014
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
11-
<maven.compiler.source>1.7</maven.compiler.source>
12-
<maven.compiler.target>1.7</maven.compiler.target>
1315
</properties>
1416

1517
<dependencies>
@@ -21,7 +23,7 @@
2123
<dependency>
2224
<groupId>com.ibm.g11n.pipeline</groupId>
2325
<artifactId>gp-res-filter</artifactId>
24-
<version>1.2.0</version>
26+
<version>1.2.7-SNAPSHOT</version>
2527
</dependency>
2628
<!-- JUnit -->
2729
<dependency>

examples/custom-res-filter/csv-filter/src/main/java/com/ibm/g11n/pipeline/example/CSVFilter.java renamed to csv-res-filter/src/main/java/com/ibm/g11n/pipeline/resfilter/csv/CSVFilter.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
* See the License for the specific language governing permissions and
1414
* limitations under the License.
1515
*/
16-
package com.ibm.g11n.pipeline.example;
16+
package com.ibm.g11n.pipeline.resfilter.csv;
1717

1818
import java.io.BufferedWriter;
1919
import java.io.IOException;

0 commit comments

Comments
 (0)