Package org.apache.jackrabbit.server.io
Class IOManagerImpl
- java.lang.Object
-
- 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 simpleIOManager
implementation that provides a default constructor and does define anyIOHandler
s.
-
-
Constructor Summary
Constructors Constructor Description IOManagerImpl()
Create a newIOManager
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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.
-
-
-
Constructor Detail
-
IOManagerImpl
public IOManagerImpl()
Create a newIOManager
. Note, that this manager does not define anyIOHandler
s by default. UseaddIOHandler(IOHandler)
in order to populate the internal list of handlers that are called forimportContent
andexportContent
.
-
-
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 interfaceIOManager
- 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 interfaceIOManager
- 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 interfaceIOManager
- Returns:
- content type detector
-
setDetector
public void setDetector(org.apache.tika.detect.Detector detector)
Sets the configured type detector.- Specified by:
setDetector
in interfaceIOManager
- 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 indicates 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 interfaceIOManager
- 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 indicates 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 interfaceIOManager
- 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 indicates 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 interfaceIOManager
- 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 indicates 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 interfaceIOManager
- Returns:
- true if any of the handlers could run the export successfully, false otherwise.
- Throws:
IOException
- See Also:
IOManager.exportContent(ExportContext, DavResource)
-
-