Browse Source

按要求修改

remotes/1611766341912730171/master
Palin 5 years ago
parent
commit
161206536e
  1. 2
      src/main/java/com/fanruan/api/design/work/ReportletPane.java
  2. 5
      src/main/java/com/fanruan/api/err/ValidationException.java
  3. 9
      src/main/java/com/fanruan/api/function/FunctionKit.java
  4. 4
      src/main/java/com/fanruan/api/newer/NodeVisitor.java
  5. 4
      src/main/java/com/fanruan/api/newer/RHFunctionProcessor.java
  6. 4
      src/main/java/com/fanruan/api/newer/TemplateSessionIDInfo.java
  7. 9
      src/main/java/com/fanruan/api/report/TemplateSessionIDInfo.java
  8. 4
      src/main/java/com/fanruan/api/report/analy/data/NodeVisitor.java
  9. 8
      src/main/java/com/fanruan/api/util/RenderKit.java
  10. 10
      src/test/java/com/fanruan/api/util/RenderKitTest.java

2
src/main/java/com/fanruan/api/design/ui/container/ReportletPane.java → src/main/java/com/fanruan/api/design/work/ReportletPane.java

@ -1,4 +1,4 @@
package com.fanruan.api.design.ui.container; package com.fanruan.api.design.work;
public class ReportletPane extends com.fr.design.gui.itree.filetree.ReportletPane { public class ReportletPane extends com.fr.design.gui.itree.filetree.ReportletPane {
} }

5
src/main/java/com/fanruan/api/err/ValidationException.java

@ -1,4 +1,7 @@
package com.fanruan.api.err; package com.fanruan.api.err;
public abstract class ValidationException extends com.fr.design.Exception.ValidationException { /**
* 验证异常
*/
public class ValidationException extends com.fr.design.Exception.ValidationException {
} }

9
src/main/java/com/fanruan/api/function/FunctionKit.java

@ -78,6 +78,7 @@ public class FunctionKit {
return new NameAndDescription[0]; return new NameAndDescription[0];
} }
/** /**
* 得到函数管理器实例 * 得到函数管理器实例
* @return 函数管理器 * @return 函数管理器
@ -86,8 +87,12 @@ public class FunctionKit {
return com.fr.file.FunctionManager.getInstance(); return com.fr.file.FunctionManager.getInstance();
} }
public static int generateFunctionID(String var0) { /**
return FunctionHelper.generateFunctionID(var0); * 得到函数标识
* @return 函数标识
*/
public static int generateFunctionID(String string) {
return FunctionHelper.generateFunctionID(string);
} }
} }

4
src/main/java/com/fanruan/api/newer/NodeVisitor.java

@ -1,4 +0,0 @@
package com.fanruan.api.newer;
public abstract class NodeVisitor extends com.fr.stable.core.NodeVisitor {
}

4
src/main/java/com/fanruan/api/newer/RHFunctionProcessor.java

@ -1,4 +0,0 @@
package com.fanruan.api.newer;
public abstract class RHFunctionProcessor extends com.fr.plugin.form.widget.monitor.RHFunctionProcessor {
}

4
src/main/java/com/fanruan/api/newer/TemplateSessionIDInfo.java

@ -1,4 +0,0 @@
package com.fanruan.api.newer;
public abstract class TemplateSessionIDInfo extends com.fr.web.core.TemplateSessionIDInfo {
}

9
src/main/java/com/fanruan/api/report/TemplateSessionIDInfo.java

@ -0,0 +1,9 @@
package com.fanruan.api.report;
/**
* @author Palin
* @version 10.0
* Created by Palin on 2019/9/9 0009
*/
public abstract class TemplateSessionIDInfo extends com.fr.web.core.TemplateSessionIDInfo{
}

4
src/main/java/com/fanruan/api/report/analy/data/NodeVisitor.java

@ -0,0 +1,4 @@
package com.fanruan.api.report.analy.data;
public abstract class NodeVisitor extends com.fr.stable.core.NodeVisitor {
}

8
src/main/java/com/fanruan/api/util/RenderKit.java

@ -23,13 +23,13 @@ public class RenderKit {
/** /**
* 根据参数, 来计算文档字符串 * 根据参数, 来计算文档字符串
* @param var0 待渲染的文本模板 * @param string 待渲染的文本模板
* @param var1 参数集合 * @param calculator 参数集合
* @return 返回渲染后的文本 * @return 返回渲染后的文本
* @throws Exception 渲染过程中出现错误则抛出此异常 * @throws Exception 渲染过程中出现错误则抛出此异常
*/ */
public static String render(String var0, Calculator var1) throws Exception { public static String render(String string, Calculator calculator) throws Exception {
return TemplateUtils.render(var0, var1); return TemplateUtils.render(string, calculator);
} }
} }

10
src/test/java/com/fanruan/api/util/RenderKitTest.java

@ -25,4 +25,12 @@ public class RenderKitTest extends Prepare {
String text = "${name} is ${age} years old, he earned ${salary} dollars per month."; String text = "${name} is ${age} years old, he earned ${salary} dollars per month.";
Assert.assertEquals("Alex is 20 years old, he earned 100 dollars per month.", RenderKit.renderParameter4Tpl(text, map)); Assert.assertEquals("Alex is 20 years old, he earned 100 dollars per month.", RenderKit.renderParameter4Tpl(text, map));
} }
}
@Test
public void render() throws Exception{
String string = new String("a");
Calculator calculator = new Calculator("b");
Assert.assertEquals("a", RenderKit.render(string));
Assert.assertEquals("b", RenderKit.render(calculator));
}
}

Loading…
Cancel
Save