Browse Source

KERNEL-1117 发现之前遗漏的地方,进行补充

pull/11/head
Kalven 5 years ago
parent
commit
7a6824f448
  1. 15
      src/main/java/com/fanruan/api/design/util/FunctionDefNAD.java
  2. 18
      src/main/java/com/fanruan/api/design/util/FunctionManagerKit.java
  3. 17
      src/main/java/com/fanruan/api/design/util/NameAndFunctionList.java
  4. 15
      src/main/java/com/fanruan/api/design/util/NameAndTypeAndFunctionList.java
  5. 10
      src/main/java/com/fanruan/api/function/AVERAGE.java
  6. 10
      src/main/java/com/fanruan/api/function/CHAR.java
  7. 10
      src/main/java/com/fanruan/api/function/COUNT.java
  8. 10
      src/main/java/com/fanruan/api/function/DATE.java
  9. 10
      src/main/java/com/fanruan/api/function/MAX.java
  10. 10
      src/main/java/com/fanruan/api/function/MIN.java
  11. 10
      src/main/java/com/fanruan/api/function/RANGE.java
  12. 10
      src/main/java/com/fanruan/api/function/SUM.java
  13. 10
      src/main/java/com/fanruan/api/function/TIME.java
  14. 18
      src/main/java/com/fanruan/api/macro/OperatingSystemKit.java
  15. 5
      src/main/java/com/fanruan/api/macro/ProductConstants.java
  16. 18
      src/main/java/com/fanruan/api/plugin/ExtraClassManagerKit.java
  17. 21
      src/test/java/com/fanruan/api/base/ParameterHelperKitTest.java

15
src/main/java/com/fanruan/api/design/util/FunctionDefNAD.java

@ -0,0 +1,15 @@
package com.fanruan.api.design.util;
import com.fr.stable.script.FunctionDef;
/**
* 函数名和描述
* @author Kalven
* @version 10.0
* Created by Kalven on 2019/8/31
*/
public class FunctionDefNAD extends com.fr.design.formula.FunctionDefNAD {
public FunctionDefNAD(FunctionDef functionDef) {
super(functionDef);
}
}

18
src/main/java/com/fanruan/api/design/util/FunctionManagerKit.java

@ -0,0 +1,18 @@
package com.fanruan.api.design.util;
/**
* 函数管理器
* @author Kalven
* @version 10.0
* Created by Kalven on 2019/8/31
*/
public class FunctionManagerKit {
/**
* 得到函数管理器实例
* @return 函数管理器
*/
public static com.fr.file.FunctionManager getInstance() {
return com.fr.file.FunctionManager.getInstance();
}
}

17
src/main/java/com/fanruan/api/design/util/NameAndFunctionList.java

@ -0,0 +1,17 @@
package com.fanruan.api.design.util;
import com.fr.stable.script.Function;
import java.util.Arrays;
/**
* 名称对应的函数列表
* @author Kalven
* @version 10.0
* Created by Kalven on 2019/8/31
*/
public class NameAndFunctionList extends com.fr.design.formula.NameAndFunctionList {
public NameAndFunctionList(String name, Function[] fns) {
super(name, fns);
}
}

15
src/main/java/com/fanruan/api/design/util/NameAndTypeAndFunctionList.java

@ -0,0 +1,15 @@
package com.fanruan.api.design.util;
import com.fr.stable.script.Function;
/**
* 名字和类型对应的函数列表
* @author Kalven
* @version 10.0
* Created by Kalven on 2019/8/31
*/
public class NameAndTypeAndFunctionList extends com.fr.design.formula.NameAndTypeAndFunctionList {
public NameAndTypeAndFunctionList(String name, Function.Type type) {
super(name, type);
}
}

10
src/main/java/com/fanruan/api/function/AVERAGE.java

@ -0,0 +1,10 @@
package com.fanruan.api.function;
/**
* 基本函数求平均值
* @author Kalven
* @version 10.0
* Created by Kalven on 2019/8/31
*/
public class AVERAGE extends com.fr.function.AVERAGE {
}

10
src/main/java/com/fanruan/api/function/CHAR.java

@ -0,0 +1,10 @@
package com.fanruan.api.function;
/**
* 基本函数求ASCII码对应的字符
* @author Kalven
* @version 10.0
* Created by Kalven on 2019/8/31
*/
public class CHAR extends com.fr.function.CHAR {
}

10
src/main/java/com/fanruan/api/function/COUNT.java

@ -0,0 +1,10 @@
package com.fanruan.api.function;
/**
* 基本函数计算区域内所含项的个数
* @author Kalven
* @version 10.0
* Created by Kalven on 2019/8/31
*/
public class COUNT extends com.fr.function.COUNT {
}

10
src/main/java/com/fanruan/api/function/DATE.java

@ -0,0 +1,10 @@
package com.fanruan.api.function;
/**
* 基本函数获取一个表示某一特定日期的系列数
* @author Kalven
* @version 10.0
* Created by Kalven on 2019/8/31
*/
public class DATE extends com.fr.function.DATE {
}

10
src/main/java/com/fanruan/api/function/MAX.java

@ -0,0 +1,10 @@
package com.fanruan.api.function;
/**
* 基本函数求最大值
* @author Kalven
* @version 10.0
* Created by Kalven on 2019/8/31
*/
public class MAX extends com.fr.function.MAX {
}

10
src/main/java/com/fanruan/api/function/MIN.java

@ -0,0 +1,10 @@
package com.fanruan.api.function;
/**
* 基本函数求最小值
* @author Kalven
* @version 10.0
* Created by Kalven on 2019/8/31
*/
public class MIN extends com.fr.function.MIN {
}

10
src/main/java/com/fanruan/api/function/RANGE.java

@ -0,0 +1,10 @@
package com.fanruan.api.function;
/**
* 基本函数取范围内满足条件的数据序列
* @author Kalven
* @version 10.0
* Created by Kalven on 2019/8/31
*/
public class RANGE extends com.fr.function.RANGE {
}

10
src/main/java/com/fanruan/api/function/SUM.java

@ -0,0 +1,10 @@
package com.fanruan.api.function;
/**
* 基本函数求和
* @author Kalven
* @version 10.0
* Created by Kalven on 2019/8/31
*/
public class SUM extends com.fr.function.SUM {
}

10
src/main/java/com/fanruan/api/function/TIME.java

@ -0,0 +1,10 @@
package com.fanruan.api.function;
/**
* 基本函数求代表指定时间的小数
* @author Kalven
* @version 10.0
* Created by Kalven on 2019/8/31
*/
public class TIME extends com.fr.function.TIME {
}

18
src/main/java/com/fanruan/api/macro/OperatingSystemKit.java

@ -0,0 +1,18 @@
package com.fanruan.api.macro;
import com.fr.stable.OperatingSystem;
/**
* @author Kalven
* @version 10.0
* Created by Kalven on 2019/8/31
*/
public class OperatingSystemKit {
/**
* 判断是否为windows
* @return 判断结果
*/
public static boolean isWindows() {
return OperatingSystem.isWindows();
}
}

5
src/main/java/com/fanruan/api/macro/ProductConstants.java

@ -11,4 +11,9 @@ public class ProductConstants {
* 详细的产品名字
*/
public static final String PRODUCT_NAME = com.fr.stable.ProductConstants.PRODUCT_NAME;
/**
* 大的版本号
*/
public static final String MAIN_VERSION = com.fr.stable.ProductConstants.MAIN_VERSION;
}

18
src/main/java/com/fanruan/api/plugin/ExtraClassManagerKit.java

@ -0,0 +1,18 @@
package com.fanruan.api.plugin;
import com.fr.plugin.ExtraClassManager;
/**
* @author Kalven
* @version 10.0
* Created by Kalven on 2019/8/31
*/
public class ExtraClassManagerKit {
/**
* 获取ExtraClassManager实例
* @return ExtraClassManager实例
*/
public static ExtraClassManager getInstance() {
return ExtraClassManager.getInstance();
}
}

21
src/test/java/com/fanruan/api/base/ParameterHelperKitTest.java

@ -1,21 +0,0 @@
package com.fanruan.api.base;
import com.fr.stable.ParameterProvider;
import org.junit.Test;
import static org.junit.Assert.*;
/**
* @author Kalven
* @version 10.0
* Created by Kalven on 2019/8/31
*/
public class ParameterHelperKitTest {
@Test
public void analyze4Parameters() {
ParameterProvider p[] = ParameterHelperKit.analyze4Parameters("var a1 = '${A1}';\n" +
"return \"A1的值\" + (a1 > 10 ? \"大于10\" : \"小于等于10\");",false);
assertEquals(p[0].getValue(),"");
}
}
Loading…
Cancel
Save