|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Interface ArchiveIOHandler. Each i/o-handler takes care about import and export between the Archive
model interface and one type of data source/sink. Importing and exporting from/to external data sources is implicitly implemented by WikiArchive, which uses the Archive
model interface as intermediate data container between the Wiki's internal i/o-handler and any other i/o-handler. Using this architecture, only bidirectional conversions between the Archive
model interface and each data source (including the Wiki itself) need to be implemented. Direct conversions between different types are never needed, as the Archive
model interface acts as intermediate data container. Each WikiArchive needs at least one ArchiveIOHandler registered for type "wiki", Allows the implementation of pluggable i/o-handlers for internal Wiki i/o and any external import/export data source.
de.tuberlin.cs.flp.jspwiki.plugin.WikiArchive#initIOHandlers(Object[][])
Field Summary | |
static boolean |
EXPORT
|
static boolean |
IMPORT
|
Method Summary | |
java.lang.Object |
createData()
Creates an empty data source to be filled for export. |
java.lang.String |
dataToString(java.lang.Object data)
Converts the handled data source to string for export. |
java.lang.String |
getContentSuffix()
Content suffix for export via HTTP. |
java.lang.String |
getContentType()
Content type for export via HTTP. |
void |
init(WikiEngine engine,
java.util.Map config)
Initializes this ArchiveHandler. |
java.lang.String |
performIO(boolean io,
Archive archive,
java.lang.Object data,
int mode,
java.util.Collection exceptions)
Perform either input from the Archive model interface
into the data source handled by this ArchiveIOHandler. |
void |
stringToData(java.lang.String s,
java.lang.Object data)
Converts a string to a handled data source for import. |
Field Detail |
public static final boolean IMPORT
public static final boolean EXPORT
Method Detail |
public void init(WikiEngine engine, java.util.Map config)
engine
- config
- public java.lang.String performIO(boolean io, Archive archive, java.lang.Object data, int mode, java.util.Collection exceptions) throws java.io.IOException
Archive
model interface
into the data source handled by this ArchiveIOHandler.
io
- Switch between input or output mode, Archive
model interface.archive
- The Archive
model interface.data
- The data source handled by this ArchiveIOHandler.mode
- The processing mode. This is a bit mask with:exceptions
- Collection of entry names that should be treated as exceptions to the behaviour specified by mode
. (Not used.)
java.io.IOException
- if an i/o error occurspublic java.lang.Object createData() throws java.io.IOException
java.io.IOException
public java.lang.String dataToString(java.lang.Object data) throws java.io.IOException
data
-
java.io.IOException
public void stringToData(java.lang.String s, java.lang.Object data) throws java.io.IOException
s
- data
-
java.io.IOException
public java.lang.String getContentType()
public java.lang.String getContentSuffix()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |