org.opencrx.kernel.backend
Class Exporter
java.lang.Object
org.opencrx.kernel.backend.AbstractImpl
org.opencrx.kernel.backend.Exporter
public class Exporter
- extends AbstractImpl
|
Constructor Summary |
protected |
Exporter()
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MIME_TYPE_XML
public static final String MIME_TYPE_XML
- See Also:
- Constant Field Values
MIME_TYPE_EXCEL
public static final String MIME_TYPE_EXCEL
- See Also:
- Constant Field Values
FILE_EXT_XLS
public static final String FILE_EXT_XLS
- See Also:
- Constant Field Values
FILE_EXT_XML
public static final String FILE_EXT_XML
- See Also:
- Constant Field Values
FILE_EXT_BIN
public static final String FILE_EXT_BIN
- See Also:
- Constant Field Values
FILE_EXT_ZIP
public static final String FILE_EXT_ZIP
- See Also:
- Constant Field Values
MAX_LEVELS
protected static final int MAX_LEVELS
- See Also:
- Constant Field Values
Exporter
protected Exporter()
register
public static void register()
getInstance
public static Exporter getInstance()
throws ServiceException
- Throws:
ServiceException
exportItem
public void exportItem(OutputStream out,
PrintStream ps,
List<Exporter.TraversedObject> startPoints,
List<Exporter.TraversedObject> allExportedObjects,
List<Exporter.TraversedObject> allReferencedObjects,
Exporter.ExportParams params)
throws IOException,
ServiceException
- Throws:
IOException
ServiceException
exportItem
public Object[] exportItem(RefObject_1_0 object,
ExportProfile exportProfile,
String referenceFilter,
String itemMimeType)
throws ServiceException
- Export object according to the given export profile and itemMimeType. The
default implementation allows to export objects in the format
text/xml or application/x-excel. The default implementation recursively walks
the object (composites and references objects) according to the reference
filter.
Override this method for custom-specific export and rendering of objects. E.g.
a custom-specific implementation could work as follows:
- Derive the document type / template from the export profile.
- Generate an XML according to the document type and object.
- Invoke a (remote) rendering engine with the parameters:
- document type (or exportProfile.template if the document templates are not stored in the rendering engine)
- generated XML
- exportProfile.itemMimeType
- Return the rendered object.
- Throws:
ServiceException
getContent
protected Collection<?> getContent(Exporter.TraversedObject object,
String referenceName)
This software is published under the BSD license. Copyright © 2003-2012, CRIXP AG, Switzerland, All rights reserved. Use is subject to license terms.