org.apache.jackrabbit.server.io
Class IOManagerImpl

java.lang.Object
  extended by org.apache.jackrabbit.server.io.IOManagerImpl
All Implemented Interfaces:
IOManager
Direct Known Subclasses:
DefaultIOManager

public class IOManagerImpl
extends Object
implements IOManager

IOManagerImpl represents the most simple IOManager implementation that provides a default constructor and does define any IOHandlers.


Constructor Summary
IOManagerImpl()
          Create a new IOManager.
 
Method Summary
 void addIOHandler(IOHandler ioHandler)
          Adds the specified handler to the list of handlers.
 boolean exportContent(ExportContext context, boolean isCollection)
          Passes the specified information to the IOHandlers present on this manager.
 boolean exportContent(ExportContext context, DavResource resource)
          Passes the specified information to the IOHandlers present on this manager.
 org.apache.tika.detect.Detector getDetector()
          Return the configured type detector.
 IOHandler[] getIOHandlers()
          Returns all handlers that have been added to this manager.
 boolean importContent(ImportContext context, boolean isCollection)
          Passes the specified context and boolean value to the IOHandlers present on this manager.
 boolean importContent(ImportContext context, DavResource resource)
          Passes the specified information to the IOHandlers present on this manager.
 void setDetector(org.apache.tika.detect.Detector detector)
          Sets the configured type detector.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IOManagerImpl

public IOManagerImpl()
Create a new IOManager. Note, that this manager does not define any IOHandlers by default. Use addIOHandler(IOHandler) in order to populate the internal list of handlers that are called for importContent and exportContent.

Method Detail

addIOHandler

public void addIOHandler(IOHandler ioHandler)
Description copied from interface: IOManager
Adds the specified handler to the list of handlers.

Specified by:
addIOHandler in interface IOManager
Parameters:
ioHandler - to be added
See Also:
IOManager.addIOHandler(IOHandler)

getIOHandlers

public IOHandler[] getIOHandlers()
Description copied from interface: IOManager
Returns all handlers that have been added to this manager.

Specified by:
getIOHandlers in interface IOManager
Returns:
Array of all handlers
See Also:
IOManager.getIOHandlers()

getDetector

public org.apache.tika.detect.Detector getDetector()
Return the configured type detector.

Specified by:
getDetector in interface IOManager
Returns:
content type detector

setDetector

public void setDetector(org.apache.tika.detect.Detector detector)
Sets the configured type detector.

Specified by:
setDetector in interface IOManager
Parameters:
detector - content type detector

importContent

public boolean importContent(ImportContext context,
                             boolean isCollection)
                      throws IOException
Description copied from interface: IOManager
Passes the specified context and boolean value to the IOHandlers present on this manager. As soon as the first handler incidates success the import should be considered completed. If none of the handlers can deal with the given information this method must return false.

Specified by:
importContent in interface IOManager
Returns:
true if any of the handlers import the given context. False otherwise.
Throws:
IOException
See Also:
IOManager.importContent(ImportContext, boolean)

importContent

public boolean importContent(ImportContext context,
                             DavResource resource)
                      throws IOException
Description copied from interface: IOManager
Passes the specified information to the IOHandlers present on this manager. As soon as the first handler incidates success the import should be considered completed. If none of the handlers can deal with the given information this method must return false.

Specified by:
importContent in interface IOManager
Returns:
true if any of the handlers import the information present on the specified context.
Throws:
IOException
See Also:
IOManager.importContent(ImportContext, DavResource)

exportContent

public boolean exportContent(ExportContext context,
                             boolean isCollection)
                      throws IOException
Description copied from interface: IOManager
Passes the specified information to the IOHandlers present on this manager. As soon as the first handler incidates success the export should be considered completed. If none of the handlers can deal with the given information this method must return false.

Specified by:
exportContent in interface IOManager
Returns:
true if any of the handlers could run the export successfully, false otherwise.
Throws:
IOException
See Also:
IOManager.exportContent(ExportContext, boolean)

exportContent

public boolean exportContent(ExportContext context,
                             DavResource resource)
                      throws IOException
Description copied from interface: IOManager
Passes the specified information to the IOHandlers present on this manager. As soon as the first handler incidates success the export should be considered completed. If none of the handlers can deal with the given information this method must return false.

Specified by:
exportContent in interface IOManager
Returns:
true if any of the handlers could run the export successfully, false otherwise.
Throws:
IOException
See Also:
IOManager.exportContent(ExportContext, DavResource)


Copyright © 2004-2010 The Apache Software Foundation. All Rights Reserved.