View Javadoc

1   /*
2    * Created on 15.6.2005
3    *
4    * TODO To change the template for this generated file go to
5    * Window - Preferences - Java - Code Style - Code Templates
6    */
7   package net.sf.exorcist.dbe.impl;
8   
9   import net.sf.exorcist.api.ContentException;
10  import net.sf.exorcist.api.ContentState;
11  import net.sf.exorcist.core.memory.MemoryContentState;
12  import net.sf.exorcist.core.zip.ZipExporter;
13  import net.sf.exorcist.dbe.ExportService;
14  
15  import org.dbe.servent.Adapter;
16  import org.dbe.servent.ServiceContext;
17  
18  
19  /***
20   * @author Jukka Zitting
21   *
22   * TODO To change the template for this generated type comment go to
23   * Window - Preferences - Java - Code Style - Code Templates
24   */
25  public class XmlExportService implements ExportService, Adapter {
26  
27  	/* (non-Javadoc)
28  	 * @see fi.yukatan.dbe.exorcist.ExportService#exportContent(java.lang.String)
29  	 */
30  	public ContentState exportContent(String key) throws ContentException {
31  		ZipExporter exporter = new ZipExporter();
32  		exporter.setZipfile(key);
33  		ContentState content = new MemoryContentState();
34  		exporter.exportContent(content); // populates the content object
35  		return content;
36  	}
37  
38  	/* (non-Javadoc)
39  	 * @see org.dbe.servent.Adapter#init(org.dbe.servent.ServiceContext)
40  	 */
41  	public void init(ServiceContext context) {
42  	}
43  
44  	/* (non-Javadoc)
45  	 * @see org.dbe.servent.Adapter#destroy()
46  	 */
47  	public void destroy() {
48  	}
49  
50  }