public class DirListingExportHandler extends Object implements IOHandler, PropertyHandler
DirListingExportHandler represents a simple export for collections:
 a human-readable view listing the members.
 
 Note: If exportContent(ExportContext, boolean) is called the view list
 child nodes only, without respecting their representation as DavResources.
| Constructor and Description | 
|---|
DirListingExportHandler()
Creates a new  
DirListingExportHandler | 
DirListingExportHandler(IOManager ioManager)
Creates a new  
DirListingExportHandler | 
| Modifier and Type | Method and Description | 
|---|---|
boolean | 
canExport(ExportContext context,
         boolean isCollection)
Returns true, if this handler can run a successful export based on the
 specified context. 
 | 
boolean | 
canExport(ExportContext context,
         DavResource resource)
Returns true, if this handler can run a successful export based on
 the specified context and resource. 
 | 
boolean | 
canExport(PropertyExportContext context,
         boolean isCollection)
Always returns false. 
 | 
boolean | 
canImport(ImportContext context,
         boolean isFolder)
Always returns false 
 | 
boolean | 
canImport(ImportContext context,
         DavResource resource)
Always returns false 
 | 
boolean | 
canImport(PropertyImportContext context,
         boolean isCollection)
Returns true, if this handler can run a property import based on the
 specified context. 
 | 
boolean | 
exportContent(ExportContext context,
             boolean isCollection)
Runs the export for the given context. 
 | 
boolean | 
exportContent(ExportContext context,
             DavResource resource)
Runs the export for the given context and resource. 
 | 
boolean | 
exportProperties(PropertyExportContext exportContext,
                boolean isCollection)
Exports properties to the given context. 
 | 
IOManager | 
getIOManager()
Returns the  
IOManager that called this handler or null. | 
String | 
getName()
Returns a human readable name for this  
IOHandler. | 
boolean | 
importContent(ImportContext context,
             boolean isCollection)
Does nothing and returns false 
 | 
boolean | 
importContent(ImportContext context,
             DavResource resource)
Does nothing and returns false 
 | 
Map<? extends PropEntry,?> | 
importProperties(PropertyImportContext importContext,
                boolean isCollection)
Imports, modifies or removes properties according the the
  
change list available from
 the import context. | 
void | 
setIOManager(IOManager ioManager)
Sets the  
IOManager that called this handler. | 
public DirListingExportHandler()
DirListingExportHandlerpublic DirListingExportHandler(IOManager ioManager)
DirListingExportHandlerioManager - public boolean canImport(ImportContext context, boolean isFolder)
canImport in interface IOHandlerIOHandler.canImport(ImportContext, boolean)public boolean canImport(ImportContext context, DavResource resource)
canImport in interface IOHandlerIOHandler.canImport(ImportContext, DavResource)public boolean importContent(ImportContext context, boolean isCollection) throws IOException
importContent in interface IOHandlerIOException - if an unexpected error occurs or if this method has
 been called although IOHandler.canImport(ImportContext, boolean)
 returns false.IOHandler.importContent(ImportContext, boolean)public boolean importContent(ImportContext context, DavResource resource) throws IOException
importContent in interface IOHandlerIOException - if an unexpected error occurs or if this method has
 been called although IOHandler.canImport(ImportContext, DavResource)
 returns false.IOHandler.importContent(ImportContext, DavResource)public boolean canExport(ExportContext context, boolean isCollection)
IOHandlercanExport in interface IOHandlerIOHandler.canExport(ExportContext, boolean)public boolean canExport(ExportContext context, DavResource resource)
IOHandlerIOHandler.canExport(ExportContext, boolean)
 where the isCollection flag is determined by
 DavResource.isCollection().canExport in interface IOHandlerIOHandler.canExport(ExportContext, DavResource), 
DavResource.isCollection()public boolean exportContent(ExportContext context, boolean isCollection) throws IOException
IOHandlerExportContext does not provide a stream
 the implementation should set the properties only and ignore the content to
 be exported. A simple implementation may return the same as
 IOHandler.exportContent(ExportContext, boolean) where the
 isCollection flag is determined by DavResource.isCollection()
 
 Please note, that it is the responsibility of the specified
 ExportContext to assert, that its stream is not written
 multiple times when being passed to a chain of IOHandlers.
exportContent in interface IOHandlerIOException - if an unexpected error occurs or if this method has
 been called although IOHandler.canExport(ExportContext, boolean)
 returns false.IOHandler.exportContent(ExportContext, boolean)public boolean exportContent(ExportContext context, DavResource resource) throws IOException
IOHandlerExportContext does not provide a stream
 the implementation should set the properties only and ignore the content to
 be exported. A simple implementation may return the same as
 IOHandler.exportContent(ExportContext, boolean) where the
 isCollection flag is determined by DavResource.isCollection()
 
 Please note, that it is the responsibility of the specified
 ExportContext to assert, that its stream is not written
 multiple times when being passed to a chain of IOHandlers.
exportContent in interface IOHandlerIOException - if an unexpected error occurs or if this method has
 been called although IOHandler.canExport(ExportContext, DavResource)
 returns false.IOHandler.exportContent(ExportContext, DavResource)public IOManager getIOManager()
IOHandlerIOManager that called this handler or null.getIOManager in interface IOHandlerIOHandler.getIOManager()public void setIOManager(IOManager ioManager)
IOHandlerIOManager that called this handler.setIOManager in interface IOHandlerIOHandler.setIOManager(IOManager)public String getName()
IOHandlerIOHandler.getName in interface IOHandlerIOHandler.getName()public boolean canExport(PropertyExportContext context, boolean isCollection)
canExport in interface PropertyHandlercontext - isCollection - public boolean exportProperties(PropertyExportContext exportContext, boolean isCollection) throws RepositoryException
PropertyHandlerIOHandler.exportContent(ExportContext, boolean).exportProperties in interface PropertyHandlerRepositoryException - If an attempt is made to export properties
 even if PropertyHandler.canExport(PropertyExportContext, boolean)
 returns false or if some other unrecoverable error occurs.PropertyHandler.exportProperties(PropertyExportContext, boolean)public boolean canImport(PropertyImportContext context, boolean isCollection)
PropertyHandlercanImport in interface PropertyHandlerPropertyHandler can import properties
 given the specified parameters.public Map<? extends PropEntry,?> importProperties(PropertyImportContext importContext, boolean isCollection) throws RepositoryException
PropertyHandlerchange list available from
 the import context. Note, that according to JSR 170 setting a property
 value to null is equivalent to its removal.
 The return value of this method must be used to provided detailed information about any kind of failures.
importProperties in interface PropertyHandlerRepositoryException - If
 PropertyHandler.canImport(PropertyImportContext, boolean)
 returns false for the given parameters or if some other unrecoverable
 error occurred. Note, that normal failure of a property update must be
 reported with the return value and should not result in an exception.PropertyHandler.importProperties(PropertyImportContext, boolean)Copyright © 2004–2020 The Apache Software Foundation. All rights reserved.