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
IOManagerImplrepresents the most simpleIOManagerimplementation that provides a default constructor and does define anyIOHandlers.
-
-
Constructor Summary
Constructors Constructor Description IOManagerImpl()Create a newIOManager.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddIOHandler(IOHandler ioHandler)Adds the specified handler to the list of handlers.booleanexportContent(ExportContext context, boolean isCollection)Passes the specified information to the IOHandlers present on this manager.booleanexportContent(ExportContext context, DavResource resource)Passes the specified information to the IOHandlers present on this manager.org.apache.tika.detect.DetectorgetDetector()Return the configured type detector.IOHandler[]getIOHandlers()Returns all handlers that have been added to this manager.booleanimportContent(ImportContext context, boolean isCollection)Passes the specified context and boolean value to the IOHandlers present on this manager.booleanimportContent(ImportContext context, DavResource resource)Passes the specified information to the IOHandlers present on this manager.voidsetDetector(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 anyIOHandlers by default. UseaddIOHandler(IOHandler)in order to populate the internal list of handlers that are called forimportContentandexportContent.
-
-
Method Detail
-
addIOHandler
public void addIOHandler(IOHandler ioHandler)
Description copied from interface:IOManagerAdds the specified handler to the list of handlers.- Specified by:
addIOHandlerin interfaceIOManager- Parameters:
ioHandler- to be added- See Also:
IOManager.addIOHandler(IOHandler)
-
getIOHandlers
public IOHandler[] getIOHandlers()
Description copied from interface:IOManagerReturns all handlers that have been added to this manager.- Specified by:
getIOHandlersin 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:
getDetectorin interfaceIOManager- Returns:
- content type detector
-
setDetector
public void setDetector(org.apache.tika.detect.Detector detector)
Sets the configured type detector.- Specified by:
setDetectorin interfaceIOManager- Parameters:
detector- content type detector
-
importContent
public boolean importContent(ImportContext context, boolean isCollection) throws IOException
Description copied from interface:IOManagerPasses 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:
importContentin 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:IOManagerPasses 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:
importContentin 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:IOManagerPasses 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:
exportContentin 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:IOManagerPasses 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:
exportContentin interfaceIOManager- Returns:
- true if any of the handlers could run the export successfully, false otherwise.
- Throws:
IOException- See Also:
IOManager.exportContent(ExportContext, DavResource)
-
-