diff options
| author | Andrew Branson <andrew.branson@cern.ch> | 2012-07-06 11:00:24 +0200 |
|---|---|---|
| committer | Andrew Branson <andrew.branson@cern.ch> | 2012-07-06 11:00:24 +0200 |
| commit | 24314dc1699c7e73048fa24e33729f1aa1ec0e86 (patch) | |
| tree | c97af82997783b860c36f4410973b23caff0d42e /src/main/java/com/c2kernel/entity/proxy | |
| parent | cc79e98c4763affba4fa2e17dfe5a412f9de66c3 (diff) | |
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.
Diffstat (limited to 'src/main/java/com/c2kernel/entity/proxy')
3 files changed, 6 insertions, 8 deletions
diff --git a/src/main/java/com/c2kernel/entity/proxy/AgentProxy.java b/src/main/java/com/c2kernel/entity/proxy/AgentProxy.java index 29cd13b..5c6a37e 100644 --- a/src/main/java/com/c2kernel/entity/proxy/AgentProxy.java +++ b/src/main/java/com/c2kernel/entity/proxy/AgentProxy.java @@ -37,7 +37,6 @@ import com.c2kernel.process.Gateway; import com.c2kernel.scripting.ErrorInfo;
import com.c2kernel.scripting.Script;
import com.c2kernel.scripting.ScriptingEngineException;
-import com.c2kernel.utils.CastorXMLUtility;
import com.c2kernel.utils.LocalObjectLoader;
import com.c2kernel.utils.Logger;
@@ -186,7 +185,7 @@ public class AgentProxy extends EntityProxy }
}
- public Object callScript(ItemProxy item, Job job) throws ScriptingEngineException {
+ private Object callScript(ItemProxy item, Job job) throws ScriptingEngineException {
Script script = new Script(item, this, job);
return script.execute();
}
@@ -263,11 +262,11 @@ public class AgentProxy extends EntityProxy /** Wrappers for scripts */
public String marshall(Object obj) throws Exception {
- return CastorXMLUtility.marshall(obj);
+ return Gateway.getMarshaller().marshall(obj);
}
public Object unmarshall(String obj) throws Exception {
- return CastorXMLUtility.unmarshall(obj);
+ return Gateway.getMarshaller().unmarshall(obj);
}
/** Let scripts resolve items */
diff --git a/src/main/java/com/c2kernel/entity/proxy/EntityProxy.java b/src/main/java/com/c2kernel/entity/proxy/EntityProxy.java index fae2e28..cb76a19 100644 --- a/src/main/java/com/c2kernel/entity/proxy/EntityProxy.java +++ b/src/main/java/com/c2kernel/entity/proxy/EntityProxy.java @@ -19,7 +19,6 @@ import com.c2kernel.entity.ManageableEntity; import com.c2kernel.persistency.ClusterStorageException;
import com.c2kernel.process.Gateway;
import com.c2kernel.property.Property;
-import com.c2kernel.utils.CastorXMLUtility;
import com.c2kernel.utils.Logger;
@@ -113,7 +112,7 @@ abstract public class EntityProxy implements ManageableEntity return retString.toString();
}
C2KLocalObject target = Gateway.getStorage().get(mSystemKey, path, null);
- return CastorXMLUtility.marshall(target);
+ return Gateway.getMarshaller().marshall(target);
} catch (ObjectNotFoundException e) {
throw e;
} catch (Exception e) {
diff --git a/src/main/java/com/c2kernel/entity/proxy/ItemProxy.java b/src/main/java/com/c2kernel/entity/proxy/ItemProxy.java index 658e0c8..dcaef55 100644 --- a/src/main/java/com/c2kernel/entity/proxy/ItemProxy.java +++ b/src/main/java/com/c2kernel/entity/proxy/ItemProxy.java @@ -24,7 +24,7 @@ import com.c2kernel.entity.ManageableEntity; import com.c2kernel.entity.agent.Job;
import com.c2kernel.entity.agent.JobArrayList;
import com.c2kernel.lifecycle.instance.stateMachine.Transitions;
-import com.c2kernel.utils.CastorXMLUtility;
+import com.c2kernel.process.Gateway;
import com.c2kernel.utils.Logger;
/******************************************************************************
@@ -163,7 +163,7 @@ public class ItemProxy extends EntityProxy JobArrayList thisJobList;
try {
String jobs = queryLifeCycle(agentId, filter);
- thisJobList = (JobArrayList)CastorXMLUtility.unmarshall(jobs);
+ thisJobList = (JobArrayList)Gateway.getMarshaller().unmarshall(jobs);
}
catch (Exception e) {
Logger.error(e);
|
