|
|
@ -1,5 +1,7 @@ |
|
|
|
package com.fr.design.actions.file.export; |
|
|
|
package com.fr.design.actions.file.export; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import com.fanruan.entity.template.TemplateExportBean; |
|
|
|
|
|
|
|
import com.fanruan.repository.TemplateRepository; |
|
|
|
import com.fr.design.actions.JTemplateAction; |
|
|
|
import com.fr.design.actions.JTemplateAction; |
|
|
|
import com.fr.design.base.mode.DesignModeContext; |
|
|
|
import com.fr.design.base.mode.DesignModeContext; |
|
|
|
import com.fr.design.dialog.FineJOptionPane; |
|
|
|
import com.fr.design.dialog.FineJOptionPane; |
|
|
@ -18,12 +20,8 @@ import com.fr.log.FineLoggerFactory; |
|
|
|
import com.fr.stable.StringUtils; |
|
|
|
import com.fr.stable.StringUtils; |
|
|
|
import com.fr.stable.project.ProjectConstants; |
|
|
|
import com.fr.stable.project.ProjectConstants; |
|
|
|
import com.fr.third.jodd.io.FileNameUtil; |
|
|
|
import com.fr.third.jodd.io.FileNameUtil; |
|
|
|
import com.fr.workspace.WorkContext; |
|
|
|
|
|
|
|
import com.fr.workspace.server.exporter.TemplateExportOperator; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import javax.swing.JOptionPane; |
|
|
|
import javax.swing.*; |
|
|
|
import javax.swing.SwingWorker; |
|
|
|
|
|
|
|
import javax.swing.UIManager; |
|
|
|
|
|
|
|
import java.awt.event.ActionEvent; |
|
|
|
import java.awt.event.ActionEvent; |
|
|
|
import java.io.OutputStream; |
|
|
|
import java.io.OutputStream; |
|
|
|
import java.util.Map; |
|
|
|
import java.util.Map; |
|
|
@ -215,9 +213,7 @@ public abstract class AbstractExportAction<E extends JTemplate<?, ?>> extends JT |
|
|
|
path = path.substring(ProjectConstants.REPORTLETS_NAME.length()); |
|
|
|
path = path.substring(ProjectConstants.REPORTLETS_NAME.length()); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
byte[] contents = |
|
|
|
byte[] contents = TemplateRepository.getInstance().export(new TemplateExportBean().setKey(exportKey()).setType(exportType()).setPath(path).setParas(para)); |
|
|
|
WorkContext.getCurrent().get(TemplateExportOperator.class) |
|
|
|
|
|
|
|
.export(exportKey(), exportType(), null, path, para); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
outputStream.write(contents); |
|
|
|
outputStream.write(contents); |
|
|
|
} |
|
|
|
} |
|
|
|