1
2
3
4
5
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
28
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);
35 return content;
36 }
37
38
39
40
41 public void init(ServiceContext context) {
42 }
43
44
45
46
47 public void destroy() {
48 }
49
50 }