Merge remote-tracking branch 'origin/jenkins_with_weblogic' into jenkins_with_weblogic
This commit is contained in:
@@ -110,7 +110,8 @@ public class Parser implements Serializable {
|
|||||||
if (funcDef == null) continue;
|
if (funcDef == null) continue;
|
||||||
String functionClass = funcDef.getFunctionClass();
|
String functionClass = funcDef.getFunctionClass();
|
||||||
if (functionClass == null) continue;
|
if (functionClass == null) continue;
|
||||||
if(!functionClass.startsWith("com.eactive.eai.transformer.function")) {
|
if(!(functionClass.startsWith("com.eactive.eai.transformer.function")
|
||||||
|
|| functionClass.startsWith("com.eactive.eai.custom.transformer.function"))) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -47,7 +47,7 @@ public class IniSafeNetKJDecrypt extends PostfixMathCommand {
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
keyMgr = new KeyFixManager(sConf);
|
keyMgr = new KeyFixManager(sConf);
|
||||||
decData = keyMgr.decrypt(iniSafeKey, value);
|
decData = keyMgr.decrypt(value);
|
||||||
inStack.push(decData);
|
inStack.push(decData);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
//throw new ExecutionException(e.getMessage(), parameters, e);
|
//throw new ExecutionException(e.getMessage(), parameters, e);
|
||||||
|
|||||||
@@ -47,7 +47,8 @@ public class IniSafeNetKJEncrypt extends PostfixMathCommand {
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
keyMgr = new KeyFixManager(sConf);
|
keyMgr = new KeyFixManager(sConf);
|
||||||
encData = keyMgr.encrypt(iniSafeKey, value);
|
//encData = keyMgr.encrypt(iniSafeKey, value);
|
||||||
|
encData = keyMgr.encrypt(value);
|
||||||
inStack.push(encData);
|
inStack.push(encData);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
//throw new ExecutionException(e.getMessage(), parameters, e);
|
//throw new ExecutionException(e.getMessage(), parameters, e);
|
||||||
|
|||||||
@@ -0,0 +1,37 @@
|
|||||||
|
package com.eactive.eai.transformer.function.generic;
|
||||||
|
|
||||||
|
import java.util.Stack;
|
||||||
|
|
||||||
|
import org.apache.commons.lang3.StringUtils;
|
||||||
|
import org.nfunk.jep.ParseException;
|
||||||
|
import org.nfunk.jep.function.PostfixMathCommand;
|
||||||
|
|
||||||
|
public class Concat extends PostfixMathCommand {
|
||||||
|
public Concat() {
|
||||||
|
numberOfParameters = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void run(Stack inStack) throws ParseException {
|
||||||
|
|
||||||
|
checkStack(inStack);
|
||||||
|
|
||||||
|
Object p2 = inStack.pop();
|
||||||
|
|
||||||
|
if (p2 instanceof String) {
|
||||||
|
String str2 = (String) p2;
|
||||||
|
Object p1 = inStack.pop();
|
||||||
|
|
||||||
|
if (p1 instanceof String) {
|
||||||
|
String str1 = (String) p1;
|
||||||
|
|
||||||
|
inStack.push(str1 + str2);
|
||||||
|
|
||||||
|
} else {
|
||||||
|
throw new ParseException("Invalid parameter type, p1 is not string");
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
throw new ParseException("Invalid parameter type, p2 is not string");
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -8,13 +8,15 @@ import org.nfunk.jep.function.PostfixMathCommand;
|
|||||||
|
|
||||||
public class Trim extends PostfixMathCommand {
|
public class Trim extends PostfixMathCommand {
|
||||||
public Trim() {
|
public Trim() {
|
||||||
numberOfParameters = 1;
|
numberOfParameters = 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void run(Stack inStack) throws ParseException {
|
public void run(Stack inStack) throws ParseException {
|
||||||
checkStack(inStack);
|
checkStack(inStack);
|
||||||
|
|
||||||
Object p1 = inStack.pop();
|
Object p1 = inStack.pop();
|
||||||
|
|
||||||
|
Object p2 = inStack.pop();
|
||||||
|
|
||||||
if (p1 instanceof byte[]) {
|
if (p1 instanceof byte[]) {
|
||||||
inStack.push(new String((byte[]) p1).trim());
|
inStack.push(new String((byte[]) p1).trim());
|
||||||
|
|||||||
@@ -0,0 +1,31 @@
|
|||||||
|
package com.eactive.eai.transformer.function.validate;
|
||||||
|
|
||||||
|
import java.util.Stack;
|
||||||
|
|
||||||
|
import org.apache.commons.lang3.StringUtils;
|
||||||
|
import org.nfunk.jep.ParseException;
|
||||||
|
import org.nfunk.jep.function.PostfixMathCommand;
|
||||||
|
|
||||||
|
public class isBlank extends PostfixMathCommand {
|
||||||
|
|
||||||
|
public isBlank() {
|
||||||
|
numberOfParameters = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void run(Stack inStack) throws ParseException {
|
||||||
|
|
||||||
|
checkStack(inStack);
|
||||||
|
|
||||||
|
Object p1 = inStack.pop();
|
||||||
|
|
||||||
|
if (p1 instanceof String) {
|
||||||
|
String str1 = (String) p1;
|
||||||
|
|
||||||
|
inStack.push(StringUtils.isBlank(str1));
|
||||||
|
|
||||||
|
} else {
|
||||||
|
throw new ParseException("Invalid parameter type, p1 is not string");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -9,7 +9,7 @@ public class ConcatFunction extends PostfixMathCommand {
|
|||||||
|
|
||||||
public ConcatFunction() {
|
public ConcatFunction() {
|
||||||
numberOfParameters = 2;
|
numberOfParameters = 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void run(Stack inStack) throws ParseException {
|
public void run(Stack inStack) throws ParseException {
|
||||||
checkStack(inStack);
|
checkStack(inStack);
|
||||||
@@ -20,5 +20,6 @@ public class ConcatFunction extends PostfixMathCommand {
|
|||||||
String value = param1 + param2;
|
String value = param1 + param2;
|
||||||
|
|
||||||
inStack.push(value);
|
inStack.push(value);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user