From 9a602342961e0d15f50f7244ef39670396a7375e Mon Sep 17 00:00:00 2001 From: "yaoh.wu" Date: Wed, 21 Nov 2018 10:33:35 +0800 Subject: [PATCH] =?UTF-8?q?=E9=80=82=E9=85=8D=E5=A4=9A=E7=BA=BF=E7=A8=8B?= =?UTF-8?q?=E5=90=8C=E6=AD=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../design/actions/file/export/AbstractExportAction.java | 7 ++++--- .../file/export/EmbeddedFormExportExportAction.java | 8 ++++---- .../actions/file/export/AbstractWorkBookExportAction.java | 8 ++++---- 3 files changed, 12 insertions(+), 11 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/actions/file/export/AbstractExportAction.java b/designer-base/src/main/java/com/fr/design/actions/file/export/AbstractExportAction.java index 0105d7f95..4d9c976ce 100644 --- a/designer-base/src/main/java/com/fr/design/actions/file/export/AbstractExportAction.java +++ b/designer-base/src/main/java/com/fr/design/actions/file/export/AbstractExportAction.java @@ -9,6 +9,7 @@ import com.fr.design.mainframe.JTemplate; import com.fr.exception.RemoteDesignPermissionDeniedException; import com.fr.file.FILE; import com.fr.file.FILEChooserPane; +import com.fr.io.exporter.ExporterKey; import com.fr.file.filter.ChooseFileFilter; import com.fr.io.exporter.DesignExportType; import com.fr.log.FineLoggerFactory; @@ -38,7 +39,7 @@ public abstract class AbstractExportAction> extends JT * * @return String scopeName */ - public abstract String exportScopeName(); + public abstract ExporterKey exportKey(); /** * 导出类型 @@ -209,11 +210,11 @@ public abstract class AbstractExportAction> extends JT // todo 后续想想办法 if (WorkContext.getCurrent().isLocal()) { WorkContext.getCurrent().get(TemplateExportOperator.class) - .export(exportScopeName(), exportType(), outputStream, path, para); + .export(exportKey(), exportType(), outputStream, path, para); } else { byte[] contents = WorkContext.getCurrent().get(TemplateExportOperator.class) - .export(exportScopeName(), exportType(), null, path, para); + .export(exportKey(), exportType(), null, path, para); outputStream.write(contents); } diff --git a/designer-form/src/main/java/com/fr/design/actions/file/export/EmbeddedFormExportExportAction.java b/designer-form/src/main/java/com/fr/design/actions/file/export/EmbeddedFormExportExportAction.java index 6f5742276..cd5c29ced 100644 --- a/designer-form/src/main/java/com/fr/design/actions/file/export/EmbeddedFormExportExportAction.java +++ b/designer-form/src/main/java/com/fr/design/actions/file/export/EmbeddedFormExportExportAction.java @@ -8,16 +8,16 @@ import com.fr.design.mainframe.DesignerContext; import com.fr.design.mainframe.JForm; import com.fr.design.menu.KeySetUtils; import com.fr.design.parameter.ParameterInputPane; +import com.fr.io.exporter.ExporterKey; import com.fr.file.filter.ChooseFileFilter; import com.fr.form.main.Form; +import com.fr.io.exporter.DesignExportScope; import com.fr.io.exporter.DesignExportType; import com.fr.stable.ArrayUtils; import java.util.HashMap; import java.util.Map; -import static com.fr.io.exporter.DesignExportScope.FINE_FORM; - /** * Export Embedded. */ @@ -33,8 +33,8 @@ public class EmbeddedFormExportExportAction extends AbstractExportAction } @Override - public String exportScopeName() { - return FINE_FORM.toString(); + public ExporterKey exportKey() { + return DesignExportScope.FINE_FORM; } @Override diff --git a/designer-realize/src/main/java/com/fr/design/actions/file/export/AbstractWorkBookExportAction.java b/designer-realize/src/main/java/com/fr/design/actions/file/export/AbstractWorkBookExportAction.java index bfec88744..22a411820 100644 --- a/designer-realize/src/main/java/com/fr/design/actions/file/export/AbstractWorkBookExportAction.java +++ b/designer-realize/src/main/java/com/fr/design/actions/file/export/AbstractWorkBookExportAction.java @@ -8,14 +8,14 @@ import com.fr.design.dialog.DialogActionAdapter; import com.fr.design.mainframe.DesignerContext; import com.fr.design.mainframe.JWorkBook; import com.fr.design.parameter.ParameterInputPane; +import com.fr.io.exporter.ExporterKey; +import com.fr.io.exporter.DesignExportScope; import com.fr.main.TemplateWorkBook; import com.fr.main.impl.WorkBook; import java.util.HashMap; import java.util.Map; -import static com.fr.io.exporter.DesignExportScope.FINE_BOOK; - /** * Abstract export action. */ @@ -31,8 +31,8 @@ public abstract class AbstractWorkBookExportAction extends AbstractExportAction< return this.getEditingComponent().getTarget(); } - public String exportScopeName() { - return FINE_BOOK.toString(); + public ExporterKey exportKey() { + return DesignExportScope.FINE_BOOK; } @Override