de.tuberlin.cs.flp.jspwiki.plugin.wikiarchive


Interface ArchiveHandler


public interface ArchiveHandler
Namespace: wikiarchive


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.
Authors:
Jens Gulden
Version:
0.2.0
See also:
de.tuberlin.cs.flp.jspwiki.plugin.WikiArchive#initIOHandlers(Object[][])


Attribute Summary
public static boolean  EXPORT
 
public static boolean  IMPORT
 

Method Summary
public Object   createData()
Creates an empty data source to be filled for export.  
public String   dataToString(Object data)
Converts the handled data source to string for export.  
public String   getContentSuffix()
Content suffix for export via HTTP.  
public String   getContentType()
Content type for export via HTTP.  
public void  init(WikiEngine engine, Map config)
Initializes this ArchiveHandler.  
public String   performIO(boolean io, Archive archive, Object data, int mode, Collection exceptions)
Perform either input from the Archive model interface into the data source handled by this ArchiveIOHandler. @param plugin The WikiArchive plugin. 
public void  stringToData(String s, Object data)
Converts a string to a handled data source for import.  

Tagged Values
static false
documentation#author Jens Gulden
documentation#see de.tuberlin.cs.flp.jspwiki.plugin.WikiArchive#initIOHandlers(Object[][])
documentation#version 0.2.0

Attribute Detail

EXPORT

public static final boolean EXPORT

Multiplicity: 1..1
Ordering: unspecified



IMPORT

public static final boolean IMPORT

Multiplicity: 1..1
Ordering: unspecified

Method Detail

createData

public Object createData()


Creates an empty data source to be filled for export.
Returns:


dataToString

public String dataToString(Object data)


Converts the handled data source to string for export.
Parameters:
data -
Returns:


getContentSuffix

public String getContentSuffix()


Content suffix for export via HTTP.
Returns:


getContentType

public String getContentType()


Content type for export via HTTP.
Returns:


init

public void init(WikiEngine engine, Map config)


Initializes this ArchiveHandler.
Parameters:
engine -
config -


performIO

public String performIO(boolean io, Archive archive, Object data, int mode, Collection exceptions)


Perform either input from the Archive model interface into the data source handled by this ArchiveIOHandler. @param plugin The WikiArchive plugin.
Method Tagged Values
documentation#throws IOException if an i/o error occurs

Parameters:
io - Switch between input or output mode, true for input into data source, false for output into 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:
bit #0 set: update exisiting entries with new values, if new data is different
bit #1 set: insert new entries
bit #2 set: ask individually for each entry (generate HTML checkbox-form first)
exceptions - Collection of entry names that should be treated as exceptions to the behaviour specified by mode. (Not used.)
Returns:
Exceptions:
IOException if an i/o error occurs


stringToData

public void stringToData(String s, Object data)


Converts a string to a handled data source for import.
Parameters:
s -
data -

previous   TOC   next

Generated with Poseidon for UMLTM.
Poseidon is a registered trademark of Gentleware AG in the USA and other countries. Copyright 2003-2006 Gentleware AG, Ludwigstr. 12, 20357 Hamburg, Germany. All Rights Reserved.
UML is a trademark or registered trademark of Object Management Group, Inc. in the U.S. and other countries.