Browse Source

DEC-15367 fix: 预览方式切换失效

master
Roger.Chen 4 years ago
parent
commit
a8772dc550
  1. 6
      plugin.xml
  2. 26
      src/main/java/com/fr/plugin/showtype/NewPreviewType.java
  3. 34
      src/main/java/com/fr/plugin/showtype/NewPreviewTypeProvider.java

6
plugin.xml

@ -5,18 +5,18 @@
<active>yes</active> <active>yes</active>
<version>1.0</version> <version>1.0</version>
<env-version>10.0</env-version> <env-version>10.0</env-version>
<jartime>2020-08-27</jartime> <jartime>2020-08-24</jartime>
<vendor>finereport.mata</vendor> <vendor>finereport.mata</vendor>
<description><![CDATA[新预览显示类型]]></description> <description><![CDATA[新预览显示类型]]></description>
<change-notes><![CDATA[ <change-notes><![CDATA[
<p>[2020-08-27]新预览显示类型</p> <p>[2020-08-24]新预览显示类型</p>
]]> ]]>
</change-notes> </change-notes>
<extra-core> <extra-core>
<LocaleFinder class="com.fr.plugin.showtype.NewPreviewTypeLocaleFinder"/> <LocaleFinder class="com.fr.plugin.showtype.NewPreviewTypeLocaleFinder"/>
</extra-core> </extra-core>
<extra-decision> <extra-decision>
<ShowTypeProvider class="com.fr.plugin.showtype.NewPreviewTypeProvider"/> <ShowTypeProvider class="com.fr.plugin.showtype.NewPreviewType"/>
</extra-decision> </extra-decision>
<function-recorder class="com.fr.plugin.showtype.NewPreviewType"/> <function-recorder class="com.fr.plugin.showtype.NewPreviewType"/>
<lifecycle-monitor class="com.fr.plugin.showtype.NewPreviewInitializeMonitor"/> <lifecycle-monitor class="com.fr.plugin.showtype.NewPreviewInitializeMonitor"/>

26
src/main/java/com/fr/plugin/showtype/NewPreviewType.java

@ -1,28 +1,38 @@
package com.fr.plugin.showtype; package com.fr.plugin.showtype;
import com.fr.decision.authority.base.constant.type.show.ShowType; import com.fr.decision.fun.impl.AbstractShowTypeProvider;
import com.fr.decision.web.DirectoryComponent;
import com.fr.intelli.record.Focus; import com.fr.intelli.record.Focus;
import com.fr.intelli.record.Original; import com.fr.intelli.record.Original;
import com.fr.record.analyzer.EnableMetrics; import com.fr.record.analyzer.EnableMetrics;
import com.fr.web.struct.Atom;
/** /**
* @Author Roger * @Author Roger
* @Date 2020/8/18 18:18 * @Date 2020/8/18 17:42
* @Version 10.0 * @Version 10.0
*/ */
@EnableMetrics @EnableMetrics
public class NewPreviewType extends ShowType { public class NewPreviewType extends AbstractShowTypeProvider {
public static final NewPreviewType KEY = new NewPreviewType(); @Override
public Atom attach() {
return DirectoryComponent.KEY;
}
@Override @Override
@Focus(id = "com.fr.plugin.showtype.v10", text = "Fine-Plugin_New_Preview_Type", source = Original.PLUGIN) public Atom client() {
protected int getTypeValue() { return NewPreviewComponent.KEY;
return 5;
} }
@Override @Override
public String getTypeName() { public String typeName() {
return "newPreview"; return "newPreview";
} }
@Override
@Focus(id = "com.fr.plugin.showtype.v10", text = "Fine-Plugin_New_Preview_Type", source = Original.PLUGIN)
public int typeValue() {
return 5;
}
} }

34
src/main/java/com/fr/plugin/showtype/NewPreviewTypeProvider.java

@ -1,34 +0,0 @@
package com.fr.plugin.showtype;
import com.fr.decision.authority.base.constant.type.show.ShowType;
import com.fr.decision.fun.impl.AbstractShowTypeProvider;
import com.fr.decision.web.DirectoryComponent;
import com.fr.web.struct.Atom;
/**
* @Author Roger
* @Date 2020/8/18 17:42
* @Version 10.0
*/
public class NewPreviewTypeProvider extends AbstractShowTypeProvider {
@Override
public String nameForShowType() {
return "newPreview";
}
@Override
public ShowType registerShowType() {
return NewPreviewType.KEY;
}
@Override
public Atom attach() {
return DirectoryComponent.KEY;
}
@Override
public Atom client() {
return NewPreviewComponent.KEY;
}
}
Loading…
Cancel
Save