Package org.cristalise.kernel.utils
Class CastorXMLUtility
java.lang.Object
org.cristalise.kernel.utils.CastorXMLUtility
Loads all castor mapfiles, and wraps marshalling/unmarshalling
-
Constructor Summary
ConstructorsConstructorDescriptionCastorXMLUtility(ResourceLoader aResourceLoader, Properties aAppProperties, URL mapURL) Looks for a file called 'index' at the given URL, and loads every file listed in there by relative path -
Method Summary
-
Constructor Details
-
CastorXMLUtility
public CastorXMLUtility(ResourceLoader aResourceLoader, Properties aAppProperties, URL mapURL) throws InvalidDataException Looks for a file called 'index' at the given URL, and loads every file listed in there by relative path- Parameters:
aResourceLoader- the resource loader able to return the right class loaderaAppProperties- the application properties containing optional castor configurationmapURL- the root URL for the mapfiles- Throws:
InvalidDataException
-
-
Method Details
-
marshall
Marshalls a mapped object to xml string. The mapping must be loaded before. See updateMapping().- Parameters:
obj- the object to be marshalled- Returns:
- the xml string of the marshalled object
- Throws:
InvalidDataException- all errors captured
-
unmarshall
Unmarshalls a mapped object from XML string. The mapping must be loaded before. See updateMapping().- Parameters:
data- the string to be unmarshalled- Returns:
- the unmarshalled object
- Throws:
InvalidDataException- all errors captured
-