1 package org.kuali.ole.deliver.controller;
2
3 import com.thoughtworks.xstream.XStream;
4 import org.kuali.ole.deliver.bo.OleConfigDocument;
5 import org.kuali.ole.deliver.bo.OlePatronConfig;
6
7 import java.io.IOException;
8 import java.net.URISyntaxException;
9
10
11
12
13
14
15
16
17 public class OlePatronConfigObjectGeneratorFromXML {
18
19
20
21
22
23
24
25
26
27
28 public OlePatronConfig buildKrmsFromFileContent(String fileContent) throws URISyntaxException, IOException {
29 XStream xStream = new XStream();
30 xStream.alias("patronConfig", OlePatronConfig.class);
31 xStream.alias("document", OleConfigDocument.class);
32 Object object = xStream.fromXML(fileContent);
33 return (OlePatronConfig) object;
34 }
35 }