|
|
|
@ -56,8 +56,7 @@ import com.fr.stable.xml.XMLTools;
|
|
|
|
|
import com.fr.stable.xml.XMLableReader; |
|
|
|
|
import com.fr.web.ResourceConstants; |
|
|
|
|
|
|
|
|
|
import javax.swing.JOptionPane; |
|
|
|
|
import javax.swing.UIManager; |
|
|
|
|
import javax.swing.*; |
|
|
|
|
import javax.xml.transform.Source; |
|
|
|
|
import javax.xml.transform.Transformer; |
|
|
|
|
import javax.xml.transform.TransformerConfigurationException; |
|
|
|
@ -65,7 +64,7 @@ import javax.xml.transform.TransformerException;
|
|
|
|
|
import javax.xml.transform.TransformerFactory; |
|
|
|
|
import javax.xml.transform.dom.DOMSource; |
|
|
|
|
import javax.xml.transform.stream.StreamResult; |
|
|
|
|
import java.awt.Component; |
|
|
|
|
import java.awt.*; |
|
|
|
|
import java.io.BufferedReader; |
|
|
|
|
import java.io.ByteArrayInputStream; |
|
|
|
|
import java.io.ByteArrayOutputStream; |
|
|
|
@ -1014,8 +1013,14 @@ public class RemoteEnv extends AbstractEnv {
|
|
|
|
|
} |
|
|
|
|
try { |
|
|
|
|
HashMap<String, String> para = new HashMap<String, String>(); |
|
|
|
|
para.put("op", "fr_remote_design"); |
|
|
|
|
para.put("cmd", "delete_file"); |
|
|
|
|
if (filePath.contains(ProjectConstants.ASSETS_NAME)) { |
|
|
|
|
para.put("op", "svgrelate"); |
|
|
|
|
para.put("cmd", "delete_svg"); |
|
|
|
|
} else { |
|
|
|
|
para.put("op", "fr_remote_design"); |
|
|
|
|
para.put("cmd", "delete_file"); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
para.put("file_path", filePath); |
|
|
|
|
|
|
|
|
|
HttpClient client = createHttpMethod(para); |
|
|
|
@ -1578,37 +1583,6 @@ public class RemoteEnv extends AbstractEnv {
|
|
|
|
|
return true; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 删除svg文件 |
|
|
|
|
* |
|
|
|
|
* @param filePath svg文件地址 |
|
|
|
|
* @return 删除成功返回true |
|
|
|
|
*/ |
|
|
|
|
public boolean deleteSvg(String filePath) { |
|
|
|
|
if (filePath == null) { |
|
|
|
|
return false; |
|
|
|
|
} |
|
|
|
|
try { |
|
|
|
|
HashMap<String, String> para = new HashMap<String, String>(); |
|
|
|
|
para.put("op", "svgrelate"); |
|
|
|
|
para.put("cmd", "delete_svg"); |
|
|
|
|
para.put("file_path", filePath); |
|
|
|
|
|
|
|
|
|
HttpClient client = createHttpMethod(para); |
|
|
|
|
InputStream input = execute4InputStream(client); |
|
|
|
|
|
|
|
|
|
if (input == null) { |
|
|
|
|
return false; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
return Boolean.valueOf(IOUtils.inputStream2String(input, EncodeConstants.ENCODING_UTF_8)); |
|
|
|
|
} catch (Exception e) { |
|
|
|
|
FRLogger.getLogger().error(e.getMessage()); |
|
|
|
|
} |
|
|
|
|
return false; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 写报表运行环境所需的配置文件 |
|
|
|
|
* |
|
|
|
|