Class ScenarioSimulationXMLPersistence
- java.lang.Object
-
- org.drools.scenariosimulation.backend.util.ScenarioSimulationXMLPersistence
-
public class ScenarioSimulationXMLPersistence extends Object
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static StringcleanUpUnusedNodes(String input)static voidconfigureXStreamMappings(com.thoughtworks.xstream.XStream toConfigure)Method to configure the commonly-used mappings defined in {@see XSTREAM_MAPPINGS}StringextractVersion(String rawXml)static doublegetColumnWidth(String expressionIdentifierName)static StringgetCurrentVersion()static ScenarioSimulationXMLPersistencegetInstance()MigrationStrategygetMigrationStrategy()protected org.drools.scenariosimulation.api.model.ScenarioSimulationModelinternalUnmarshal(String xml)Stringmarshal(org.drools.scenariosimulation.api.model.ScenarioSimulationModel sc)StringmigrateIfNecessary(String rawXml)voidsetMigrationStrategy(MigrationStrategy migrationStrategy)org.drools.scenariosimulation.api.model.ScenarioSimulationModelunmarshal(String rawXml)org.drools.scenariosimulation.api.model.ScenarioSimulationModelunmarshal(String rawXml, boolean migrate)
-
-
-
Method Detail
-
configureXStreamMappings
public static void configureXStreamMappings(com.thoughtworks.xstream.XStream toConfigure)
Method to configure the commonly-used mappings defined in {@see XSTREAM_MAPPINGS}- Parameters:
toConfigure-
-
getInstance
public static ScenarioSimulationXMLPersistence getInstance()
-
getCurrentVersion
public static String getCurrentVersion()
-
cleanUpUnusedNodes
public static String cleanUpUnusedNodes(String input) throws Exception
- Throws:
Exception
-
getColumnWidth
public static double getColumnWidth(String expressionIdentifierName)
-
marshal
public String marshal(org.drools.scenariosimulation.api.model.ScenarioSimulationModel sc)
-
unmarshal
public org.drools.scenariosimulation.api.model.ScenarioSimulationModel unmarshal(String rawXml) throws Exception
- Throws:
Exception
-
unmarshal
public org.drools.scenariosimulation.api.model.ScenarioSimulationModel unmarshal(String rawXml, boolean migrate) throws Exception
- Throws:
Exception
-
migrateIfNecessary
public String migrateIfNecessary(String rawXml) throws Exception
- Throws:
Exception
-
getMigrationStrategy
public MigrationStrategy getMigrationStrategy()
-
setMigrationStrategy
public void setMigrationStrategy(MigrationStrategy migrationStrategy)
-
-