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;
|
||||
String functionClass = funcDef.getFunctionClass();
|
||||
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;
|
||||
}
|
||||
|
||||
|
||||
@@ -47,7 +47,7 @@ public class IniSafeNetKJDecrypt extends PostfixMathCommand {
|
||||
|
||||
try {
|
||||
keyMgr = new KeyFixManager(sConf);
|
||||
decData = keyMgr.decrypt(iniSafeKey, value);
|
||||
decData = keyMgr.decrypt(value);
|
||||
inStack.push(decData);
|
||||
} catch (Exception e) {
|
||||
//throw new ExecutionException(e.getMessage(), parameters, e);
|
||||
|
||||
@@ -47,7 +47,8 @@ public class IniSafeNetKJEncrypt extends PostfixMathCommand {
|
||||
|
||||
try {
|
||||
keyMgr = new KeyFixManager(sConf);
|
||||
encData = keyMgr.encrypt(iniSafeKey, value);
|
||||
//encData = keyMgr.encrypt(iniSafeKey, value);
|
||||
encData = keyMgr.encrypt(value);
|
||||
inStack.push(encData);
|
||||
} catch (Exception 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,7 +8,7 @@ import org.nfunk.jep.function.PostfixMathCommand;
|
||||
|
||||
public class Trim extends PostfixMathCommand {
|
||||
public Trim() {
|
||||
numberOfParameters = 1;
|
||||
numberOfParameters = 2;
|
||||
}
|
||||
|
||||
public void run(Stack inStack) throws ParseException {
|
||||
@@ -16,6 +16,8 @@ public class Trim extends PostfixMathCommand {
|
||||
|
||||
Object p1 = inStack.pop();
|
||||
|
||||
Object p2 = inStack.pop();
|
||||
|
||||
if (p1 instanceof byte[]) {
|
||||
inStack.push(new String((byte[]) p1).trim());
|
||||
} else if (p1 instanceof String) {
|
||||
|
||||
@@ -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");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -20,5 +20,6 @@ public class ConcatFunction extends PostfixMathCommand {
|
||||
String value = param1 + param2;
|
||||
|
||||
inStack.push(value);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user