package foundation.action;
|
|
import foundation.util.Util;
|
|
public class WorkStepKey {
|
|
|
public static String getOperatorKey(String operator) {
|
if (operator == null) {
|
return null;
|
}
|
|
return operator.toLowerCase();
|
}
|
|
public static String getObjectKey(String dataName, String operator) {
|
//1. 数据对象为空的时候
|
if (Util.isEmpty(dataName)) {
|
String result = operator;
|
return result.toLowerCase();
|
}
|
|
//2. 有事件码的时候
|
String result = dataName + "-" + operator;
|
return result.toLowerCase();
|
}
|
|
public static String getEventKey(Moment moment, String eventCode) {
|
String result = moment.name() + "-" + eventCode;
|
return result.toLowerCase();
|
}
|
|
public static String getObjectEventKey(String dataName, Moment moment, String eventCode) {
|
String result = dataName + "-" + moment.name() + "-" + eventCode;
|
return result.toLowerCase();
|
}
|
|
public static String getExecuteKey(String providerName, String methodName) {
|
String result = providerName + "-" + methodName;
|
return result.toLowerCase();
|
}
|
|
}
|