From d8838e5bced3372e921c04d49e7ab9325c56f02c Mon Sep 17 00:00:00 2001 From: hzzz Date: Tue, 5 Jun 2018 09:35:33 +0800 Subject: [PATCH] =?UTF-8?q?operator=E6=B3=A8=E5=86=8C=E4=BB=8Eengine-cross?= =?UTF-8?q?=E7=A7=BB=E5=8A=A8=E5=88=B0designer-env?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../FormMobileTemplateSettingsPane.java | 2 +- .../fr/start/module/DesignerEnvProvider.java | 169 +++++++++++++++++- 2 files changed, 165 insertions(+), 6 deletions(-) diff --git a/designer-form/src/com/fr/design/form/mobile/FormMobileTemplateSettingsPane.java b/designer-form/src/com/fr/design/form/mobile/FormMobileTemplateSettingsPane.java index dbb758a90d..b17a3caea2 100644 --- a/designer-form/src/com/fr/design/form/mobile/FormMobileTemplateSettingsPane.java +++ b/designer-form/src/com/fr/design/form/mobile/FormMobileTemplateSettingsPane.java @@ -38,7 +38,7 @@ public class FormMobileTemplateSettingsPane extends BasicBeanPane( + new OldSerializerAdapter.OldSerializer() { + @Override + public void serializer(ModifiedTable obj, OutputStream out) throws Exception { + DavXMLUtils.writeXMLModifiedTables(obj, out); + } + }, + new OldSerializerAdapter.OldDeserializer() { + @Override + public ModifiedTable desializer(InputStream in) throws Exception { + return DavXMLUtils.readXMLModifiedTables(in); + } + } + )); + + EnvProxy.addSerializer(com.fr.data.impl.Connection.class, new OldSerializerAdapter( + new OldSerializerAdapter.OldSerializer() { + @Override + public void serializer(Connection obj, OutputStream out) { + DavXMLUtils.writeXMLFileDatabaseConnection(obj, out); + } + }, + new OldSerializerAdapter.OldDeserializer() { + @Override + public Connection desializer(InputStream in) throws Exception { + return DavXMLUtils.readXMLDatabaseConnection(in); + } + } + )); + + EnvProxy.addSerializer(FileNode[].class, new OldSerializerAdapter( + new OldSerializerAdapter.OldSerializer() { + @Override + public void serializer(FileNode[] obj, OutputStream out) { + DavXMLUtils.writeXMLFileNodes(obj, out); + } + }, + new OldSerializerAdapter.OldDeserializer() { + @Override + public FileNode[] desializer(InputStream in) { + return DavXMLUtils.readXMLFileNodes(in); + } + } + )); + + EnvProxy.addSerializer(TableProcedure[].class, new OldSerializerAdapter( + new OldSerializerAdapter.OldSerializer() { + @Override + public void serializer(TableProcedure[] obj, OutputStream out) { + DavXMLUtils.writeXMLFileSQLTable(obj, out); + } + }, + new OldSerializerAdapter.OldDeserializer() { + @Override + public TableProcedure[] desializer(InputStream in) throws Exception { + return DavXMLUtils.readXMLSQLTables(in); + } + } + )); + + EnvProxy.addSerializer(TableData.class, new OldSerializerAdapter( + new OldSerializerAdapter.OldSerializer() { + @Override + public void serializer(TableData obj, OutputStream out) { + DavXMLUtils.writeXMLFileTableData(obj, out); + } + }, + new OldSerializerAdapter.OldDeserializer() { + @Override + public TableData desializer(InputStream in) throws Exception { + return DavXMLUtils.readXMLTableData(in); + } + } + )); + + EnvProxy.addSerializer(Parameter[].class, new OldSerializerAdapter( + new OldSerializerAdapter.OldSerializer() { + @Override + public void serializer(Parameter[] obj, OutputStream out) { + DavXMLUtils.writeXMLFileParameters(obj, out); + } + }, + new OldSerializerAdapter.OldDeserializer() { + @Override + public Parameter[] desializer(InputStream in) throws Exception { + return DavXMLUtils.readXMLParameters(in); + } + } + )); + + EnvProxy.addSerializer(StoreProcedure.class, new OldSerializerAdapter( + new OldSerializerAdapter.OldSerializer() { + @Override + public void serializer(StoreProcedure obj, OutputStream out) { + DavXMLUtils.writeXMLFileStoreProcedure(obj, out); + } + }, + new OldSerializerAdapter.OldDeserializer() { + @Override + public StoreProcedure desializer(InputStream in) throws Exception { + return DavXMLUtils.readXMLStoreProcedure(in); + } + } + )); + + EnvProxy.addSerializer(StoreProcedureParameter[].class, new OldSerializerAdapter( + new OldSerializerAdapter.OldSerializer() { + @Override + public void serializer(StoreProcedureParameter[] obj, OutputStream out) { + DavXMLUtils.writeXMLFileParameters(obj, out); + } + }, + new OldSerializerAdapter.OldDeserializer() { + @Override + public StoreProcedureParameter[] desializer(InputStream in) throws Exception { + return DavXMLUtils.readXMLStoreProcedureParameters(in); + } + } + )); + } + }