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.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<E extends JTemplate<?, ?>> extends JT
*
* @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 后续想想办法
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);
}

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.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<JForm>
}
@Override
public String exportScopeName() {
return FINE_FORM.toString();
public ExporterKey exportKey() {
return DesignExportScope.FINE_FORM;
}
@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.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

Loading…
Cancel
Save