KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > info > magnolia > cms > core > ie > ExportHandler


1 /**
2  *
3  * Magnolia and its source-code is licensed under the LGPL.
4  * You may copy, adapt, and redistribute this file for commercial or non-commercial use.
5  * When copying, adapting, or redistributing this document in keeping with the guidelines above,
6  * you are required to provide proper attribution to obinary.
7  * If you reproduce or distribute the document without making any substantive modifications to its content,
8  * please use the following attribution line:
9  *
10  * Copyright 1993-2006 obinary Ltd. (http://www.obinary.com) All rights reserved.
11  *
12  */

13 package info.magnolia.cms.core.ie;
14
15 import info.magnolia.cms.core.Content;
16
17 import java.io.IOException JavaDoc;
18 import java.io.OutputStream JavaDoc;
19
20 import javax.jcr.RepositoryException;
21
22
23 /**
24  * Date: May 24, 2005 Time: 10:47:49 AM
25  * @author Sameer Charles $Id :$
26  */

27 public interface ExportHandler {
28
29     /**
30      * if true include only link to the binary properties else embed in the exported data
31      * @param binaryAsLink
32      */

33     void setBinaryAsLink(boolean binaryAsLink);
34
35     /**
36      * returns true if the binary properties are included as link
37      */

38     boolean getBinaryAsLink();
39
40     /**
41      * export content to an object defined by the implementing class
42      * @param content to be exported
43      * @return Object
44      * @throws RepositoryException
45      */

46     Object JavaDoc exportContent(Content content) throws RepositoryException;
47
48     /**
49      * export content to the provided output stream
50      * @param content to be exported
51      * @param outStream
52      * @throws RepositoryException
53      * @throws IOException
54      */

55     void exportContent(Content content, OutputStream JavaDoc outStream) throws RepositoryException, IOException JavaDoc;
56
57     /**
58      * set exporter implementation dependent parameters
59      * @param key
60      * @param value
61      */

62     void setParameter(String JavaDoc key, Object JavaDoc value);
63
64     /**
65      * get parameter previously set on this exporter
66      * @return Object
67      */

68     Object JavaDoc getParameter(String JavaDoc key);
69 }
70
Popular Tags