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

java.lang.Object
  extended byde.tuberlin.cs.flp.jspwiki.plugin.wikiarchive.ArchiveHandlerAbstract
      extended byde.tuberlin.cs.flp.jspwiki.plugin.wikiarchive.ArchiveHandlerExternalFormatAbstract
          extended byde.tuberlin.cs.flp.jspwiki.plugin.wikiarchive.ArchiveHandlerPlaintext
All Implemented Interfaces:
ArchiveHandler

public class ArchiveHandlerPlaintext
extends ArchiveHandlerExternalFormatAbstract

Archive handler for archives which treat their entries as plain text.


Field Summary
static java.lang.String CONTENT_SUFFIX
           
static java.lang.String CONTENT_TYPE
           
protected static java.lang.String ENTRY_MARKER
          Start and end of an entry name, introducing a new entry.
protected static char ENTRY_MARKER_CHAR
           
protected static int MARKER_SIZE
           
 
Fields inherited from class de.tuberlin.cs.flp.jspwiki.plugin.wikiarchive.ArchiveHandlerAbstract
config, engine
 
Fields inherited from interface de.tuberlin.cs.flp.jspwiki.plugin.wikiarchive.ArchiveHandler
EXPORT, IMPORT
 
Constructor Summary
ArchiveHandlerPlaintext()
           
 
Method Summary
protected  void createEntry(java.lang.Object data, ArchiveEntry entry)
          Creates a new archive entry in the data source handled by this ArchiveIOHandler.
protected static java.lang.String entry2text(ArchiveEntry entry)
           
 java.lang.String getContentSuffix()
          Content type for export via HTTP.
 java.lang.String getContentType()
          Content type for export via HTTP.
protected  java.util.Map parseAll(java.lang.Object data)
          Retrieves all archive entries from the data source.
protected  void replaceEntry(java.lang.Object data, ArchiveEntry newEntry, ArchiveEntry oldEntry)
          Replaces an archive entry in the data source handled by this ArchiveIOHandler.
 
Methods inherited from class de.tuberlin.cs.flp.jspwiki.plugin.wikiarchive.ArchiveHandlerExternalFormatAbstract
createData, dataToString, msgDone, msgNotDone, msgToDo, stringToData
 
Methods inherited from class de.tuberlin.cs.flp.jspwiki.plugin.wikiarchive.ArchiveHandlerAbstract
equalEntries, getEngine, init, performIO, setEngine
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CONTENT_TYPE

public static final java.lang.String CONTENT_TYPE
See Also:
Constant Field Values

CONTENT_SUFFIX

public static final java.lang.String CONTENT_SUFFIX
See Also:
Constant Field Values

ENTRY_MARKER

protected static final java.lang.String ENTRY_MARKER
Start and end of an entry name, introducing a new entry.

See Also:
Constant Field Values

ENTRY_MARKER_CHAR

protected static final char ENTRY_MARKER_CHAR
See Also:
Constant Field Values

MARKER_SIZE

protected static final int MARKER_SIZE
See Also:
Constant Field Values
Constructor Detail

ArchiveHandlerPlaintext

public ArchiveHandlerPlaintext()
Method Detail

getContentType

public java.lang.String getContentType()
Content type for export via HTTP.

Specified by:
getContentType in interface ArchiveHandler
Specified by:
getContentType in class ArchiveHandlerAbstract
Returns:

getContentSuffix

public java.lang.String getContentSuffix()
Content type for export via HTTP.

Specified by:
getContentSuffix in interface ArchiveHandler
Specified by:
getContentSuffix in class ArchiveHandlerAbstract
Returns:

createEntry

protected void createEntry(java.lang.Object data,
                           ArchiveEntry entry)
Creates a new archive entry in the data source handled by this ArchiveIOHandler.

Specified by:
createEntry in class ArchiveHandlerAbstract
Parameters:
data - The data source handled by this ArchiveHandler, which is of type StringBuffer here.
entry - The entry.

replaceEntry

protected void replaceEntry(java.lang.Object data,
                            ArchiveEntry newEntry,
                            ArchiveEntry oldEntry)
Replaces an archive entry in the data source handled by this ArchiveIOHandler.

Specified by:
replaceEntry in class ArchiveHandlerAbstract
Parameters:
data - The data source handled by this ArchiveHandler, which is of type StringBuffer here.
newEntry - The new entry.
oldEntry - The old entry.

parseAll

protected java.util.Map parseAll(java.lang.Object data)
                          throws java.io.IOException
Retrieves all archive entries from the data source.

Specified by:
parseAll in class ArchiveHandlerAbstract
Parameters:
data - The data source handled by this ArchiveHandler, which is of type StringBuffer here.
Returns:
Throws:
java.io.IOException - if an i/o error occurs

entry2text

protected static java.lang.String entry2text(ArchiveEntry entry)
Parameters:
entry -
Returns: