Browse Source

适配多线程同步

research/10.0
yaoh.wu 6 years ago
parent
commit
9a60234296
  1. 7
      designer-base/src/main/java/com/fr/design/actions/file/export/AbstractExportAction.java
  2. 8
      designer-form/src/main/java/com/fr/design/actions/file/export/EmbeddedFormExportExportAction.java
  3. 8
      designer-realize/src/main/java/com/fr/design/actions/file/export/AbstractWorkBookExportAction.java

7
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.exception.RemoteDesignPermissionDeniedException;
import com.fr.file.FILE; import com.fr.file.FILE;
import com.fr.file.FILEChooserPane; import com.fr.file.FILEChooserPane;
import com.fr.io.exporter.ExporterKey;
import com.fr.file.filter.ChooseFileFilter; import com.fr.file.filter.ChooseFileFilter;
import com.fr.io.exporter.DesignExportType; import com.fr.io.exporter.DesignExportType;
import com.fr.log.FineLoggerFactory; import com.fr.log.FineLoggerFactory;
@ -38,7 +39,7 @@ public abstract class AbstractExportAction<E extends JTemplate<?, ?>> extends JT
* *
* @return String scopeName * @return String scopeName
*/ */
public abstract String exportScopeName(); public abstract ExporterKey exportKey();
/** /**
* 导出类型 * 导出类型
@ -209,11 +210,11 @@ public abstract class AbstractExportAction<E extends JTemplate<?, ?>> extends JT
// todo 后续想想办法 // todo 后续想想办法
if (WorkContext.getCurrent().isLocal()) { if (WorkContext.getCurrent().isLocal()) {
WorkContext.getCurrent().get(TemplateExportOperator.class) WorkContext.getCurrent().get(TemplateExportOperator.class)
.export(exportScopeName(), exportType(), outputStream, path, para); .export(exportKey(), exportType(), outputStream, path, para);
} else { } else {
byte[] contents = byte[] contents =
WorkContext.getCurrent().get(TemplateExportOperator.class) WorkContext.getCurrent().get(TemplateExportOperator.class)
.export(exportScopeName(), exportType(), null, path, para); .export(exportKey(), exportType(), null, path, para);
outputStream.write(contents); outputStream.write(contents);
} }

8
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.mainframe.JForm;
import com.fr.design.menu.KeySetUtils; import com.fr.design.menu.KeySetUtils;
import com.fr.design.parameter.ParameterInputPane; import com.fr.design.parameter.ParameterInputPane;
import com.fr.io.exporter.ExporterKey;
import com.fr.file.filter.ChooseFileFilter; import com.fr.file.filter.ChooseFileFilter;
import com.fr.form.main.Form; import com.fr.form.main.Form;
import com.fr.io.exporter.DesignExportScope;
import com.fr.io.exporter.DesignExportType; import com.fr.io.exporter.DesignExportType;
import com.fr.stable.ArrayUtils; import com.fr.stable.ArrayUtils;
import java.util.HashMap; import java.util.HashMap;
import java.util.Map; import java.util.Map;
import static com.fr.io.exporter.DesignExportScope.FINE_FORM;
/** /**
* Export Embedded. * Export Embedded.
*/ */
@ -33,8 +33,8 @@ public class EmbeddedFormExportExportAction extends AbstractExportAction<JForm>
} }
@Override @Override
public String exportScopeName() { public ExporterKey exportKey() {
return FINE_FORM.toString(); return DesignExportScope.FINE_FORM;
} }
@Override @Override

8
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.DesignerContext;
import com.fr.design.mainframe.JWorkBook; import com.fr.design.mainframe.JWorkBook;
import com.fr.design.parameter.ParameterInputPane; 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.TemplateWorkBook;
import com.fr.main.impl.WorkBook; import com.fr.main.impl.WorkBook;
import java.util.HashMap; import java.util.HashMap;
import java.util.Map; import java.util.Map;
import static com.fr.io.exporter.DesignExportScope.FINE_BOOK;
/** /**
* Abstract export action. * Abstract export action.
*/ */
@ -31,8 +31,8 @@ public abstract class AbstractWorkBookExportAction extends AbstractExportAction<
return this.getEditingComponent().getTarget(); return this.getEditingComponent().getTarget();
} }
public String exportScopeName() { public ExporterKey exportKey() {
return FINE_BOOK.toString(); return DesignExportScope.FINE_BOOK;
} }
@Override @Override

Loading…
Cancel
Save