1   package org.kuali.ole.docstore.common.exception;
2   
3   import com.thoughtworks.xstream.XStream;
4   
5   
6   
7   
8   
9   
10  
11  
12  public class DocstoreExceptionProcessor {
13  
14      private static XStream xStream = getXstream();
15  
16      private static XStream getXstream() {
17          XStream xStream = new XStream();
18          xStream.alias("exception", DocstoreException.class);
19          return xStream;
20      }
21  
22      public static DocstoreException fromXML(String fileContent) {
23          return (DocstoreException) xStream.fromXML(fileContent);
24      }
25  
26      public static String toXml(DocstoreException docstoreException) {
27          return xStream.toXML(docstoreException);
28  
29      }
30  
31  
32  }