diff --git a/pom.xml b/pom.xml
index cf35050..b00e4c2 100644
--- a/pom.xml
+++ b/pom.xml
@@ -27,7 +27,7 @@
kafka-connect-transform-common
0.1.0-SNAPSHOT
- afka-connect-transform-common
+ kafka-connect-transform-common
https://github.com/jcustenborder/kafka-connect-transform-common
2017
diff --git a/src/main/java/com/github/jcustenborder/kafka/connect/transform/common/BaseTransformation.java b/src/main/java/com/github/jcustenborder/kafka/connect/transform/common/BaseTransformation.java
index 7cf6812..1cd1e7b 100644
--- a/src/main/java/com/github/jcustenborder/kafka/connect/transform/common/BaseTransformation.java
+++ b/src/main/java/com/github/jcustenborder/kafka/connect/transform/common/BaseTransformation.java
@@ -15,28 +15,160 @@
*/
package com.github.jcustenborder.kafka.connect.transform.common;
+import com.github.jcustenborder.kafka.connect.utils.data.SchemaHelper;
import org.apache.kafka.connect.connector.ConnectRecord;
+import org.apache.kafka.connect.data.Decimal;
+import org.apache.kafka.connect.data.Schema;
import org.apache.kafka.connect.data.SchemaAndValue;
import org.apache.kafka.connect.data.Struct;
+import org.apache.kafka.connect.data.Time;
+import org.apache.kafka.connect.data.Timestamp;
import org.apache.kafka.connect.transforms.Transformation;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.math.BigDecimal;
+import java.util.Date;
+import java.util.List;
import java.util.Map;
public abstract class BaseTransformation> implements Transformation {
+ private static final Logger log = LoggerFactory.getLogger(BaseTransformation.class);
- protected abstract SchemaAndValue processStruct(R record, SchemaAndValue schemaAndValue);
+ protected SchemaAndValue processMap(R record, Map input) {
+ throw new UnsupportedOperationException("MAP is not a supported type.");
+ }
+
+ protected SchemaAndValue processStruct(R record, Schema inputSchema, Struct input) {
+ throw new UnsupportedOperationException("STRUCT is not a supported type.");
+ }
+
+ protected SchemaAndValue processString(R record, Schema inputSchema, String input) {
+ throw new UnsupportedOperationException("STRING is not a supported type.");
+ }
+
+ protected SchemaAndValue processBytes(R record, Schema inputSchema, byte[] input) {
+ throw new UnsupportedOperationException("BYTES is not a supported type.");
+ }
+
+ protected SchemaAndValue processInt8(R record, Schema inputSchema, byte input) {
+ throw new UnsupportedOperationException("INT8 is not a supported type.");
+ }
+
+ protected SchemaAndValue processInt16(R record, Schema inputSchema, short input) {
+ throw new UnsupportedOperationException("INT16 is not a supported type.");
+ }
- protected abstract SchemaAndValue processMap(R record, SchemaAndValue schemaAndValue);
+ protected SchemaAndValue processInt32(R record, Schema inputSchema, int input) {
+ throw new UnsupportedOperationException("INT32 is not a supported type.");
+ }
+
+ protected SchemaAndValue processInt64(R record, Schema inputSchema, long input) {
+ throw new UnsupportedOperationException("INT64 is not a supported type.");
+ }
+
+ protected SchemaAndValue processBoolean(R record, Schema inputSchema, boolean input) {
+ throw new UnsupportedOperationException("BOOLEAN is not a supported type.");
+ }
+
+ protected SchemaAndValue processTimestamp(R record, Schema inputSchema, Date input) {
+ throw new UnsupportedOperationException("Timestamp is not a supported type.");
+ }
+
+ protected SchemaAndValue processDate(R record, Schema inputSchema, Date input) {
+ throw new UnsupportedOperationException("Date is not a supported type.");
+ }
+
+ protected SchemaAndValue processTime(R record, Schema inputSchema, Date input) {
+ throw new UnsupportedOperationException("Time is not a supported type.");
+ }
- protected SchemaAndValue process(R record, SchemaAndValue schemaAndValue) {
+ protected SchemaAndValue processDecimal(R record, Schema inputSchema, BigDecimal input) {
+ throw new UnsupportedOperationException("Decimal is not a supported type.");
+ }
+
+ protected SchemaAndValue processFloat64(R record, Schema inputSchema, double input) {
+ throw new UnsupportedOperationException("FLOAT64 is not a supported type.");
+ }
+
+ protected SchemaAndValue processFloat32(R record, Schema inputSchema, float input) {
+ throw new UnsupportedOperationException("FLOAT32 is not a supported type.");
+ }
+
+ protected SchemaAndValue processArray(R record, Schema inputSchema, List