From 24314dc1699c7e73048fa24e33729f1aa1ec0e86 Mon Sep 17 00:00:00 2001 From: Andrew Branson Date: Fri, 6 Jul 2012 11:00:24 +0200 Subject: Modules serialize with Castor. Just about to remove the parsing. CastorXMLUtility is now a static member of gateway. Domain specific instances can be used by domain applications, but the maps do not interfere with the kernel. --- src/main/java/com/c2kernel/persistency/XMLClusterStorage.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/main/java/com/c2kernel/persistency/XMLClusterStorage.java') diff --git a/src/main/java/com/c2kernel/persistency/XMLClusterStorage.java b/src/main/java/com/c2kernel/persistency/XMLClusterStorage.java index 01c7b90..056fe28 100644 --- a/src/main/java/com/c2kernel/persistency/XMLClusterStorage.java +++ b/src/main/java/com/c2kernel/persistency/XMLClusterStorage.java @@ -7,7 +7,6 @@ import com.c2kernel.lookup.EntityPath; import com.c2kernel.lookup.InvalidEntityPathException; import com.c2kernel.persistency.outcome.Outcome; import com.c2kernel.process.Gateway; -import com.c2kernel.utils.CastorXMLUtility; import com.c2kernel.utils.FileStringUtility; import com.c2kernel.utils.Logger; @@ -67,7 +66,7 @@ public class XMLClusterStorage extends ClusterStorage { if (type.equals("Outcome")) return new Outcome(path, objString); else { - C2KLocalObject obj = (C2KLocalObject)CastorXMLUtility.unmarshall(objString); + C2KLocalObject obj = (C2KLocalObject)Gateway.getMarshaller().unmarshall(objString); return obj; } @@ -83,7 +82,7 @@ public class XMLClusterStorage extends ClusterStorage { try { String filePath = getFilePath(sysKey, getPath(obj)+".xml"); Logger.msg(7, "Writing "+filePath); - String data = CastorXMLUtility.marshall(obj); + String data = Gateway.getMarshaller().marshall(obj); String dir = filePath.substring(0, filePath.lastIndexOf('/')); if( !FileStringUtility.checkDir( dir ) ) { -- cgit v1.2.3