KickJava   Java API By Example, From Geeks To Geeks.

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


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.InputStream JavaDoc;
19
20 import javax.jcr.RepositoryException;
21
22
23 /**
24  * Date: May 24, 2005 Time: 4:48:26 PM
25  * @author Sameer Charles $Id :$
26  */

27 public interface ImportHandler {
28
29     /**
30      * If true, this importer assumes that binary data is not embedded in main data file
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      * import content from the given input stream
42      * @param target where this content stream should be imported
43      * @param inStream
44      * @throws RepositoryException
45      * @throws java.io.IOException
46      */

47     void importContent(Content target, InputStream JavaDoc inStream) throws RepositoryException, IOException JavaDoc;
48
49     /**
50      * set importer implementation dependent parameters
51      * @param key
52      * @param value
53      */

54     void setParameter(String JavaDoc key, Object JavaDoc value);
55
56     /**
57      * get parameter previously set on this importer
58      * @return Object
59      */

60     Object JavaDoc getParameter(String JavaDoc key);
61 }
62
Popular Tags