Daisy Open Source CMS

org.outerj.daisy.tools.importexport.export
Class BaseExportListener

java.lang.Object
  extended by org.outerj.daisy.tools.importexport.export.BaseExportListener
All Implemented Interfaces:
ExportListener

public abstract class BaseExportListener
extends Object
implements ExportListener

Provides some base functionality that is likely useful for different ExportListener implementations.


Nested Class Summary
static class BaseExportListener.FailureInfo
           
static class BaseExportListener.ItemFailureInfo
          Failure info for non-documents.
 
Constructor Summary
BaseExportListener()
           
 
Method Summary
 void failed(ImpExpVariantKey variantKey, Throwable e)
          Called when exporting a document fails.
 void failedItem(String itemType, String itemName, Throwable e)
           
 void generateSax(ContentHandler contentHandler)
           
 List getBrokenLinks()
          Gets list of broken links.
 List<BaseExportListener.FailureInfo> getFailed()
           
 List<BaseExportListener.ItemFailureInfo> getFailedItems()
           
 Set<ImpExpVariantKey> getLinks()
           
 List<ImpExpVariantKey> getSkippedBecauseNoLiveVersion()
           
 List<ImpExpVariantKey> getSkippedBecauseRetired()
           
 List<ImpExpVariantKey> getSucceeded()
           
 void hasLink(ImpExpVariantKey sourceVariantKeyk, ImpExpVariantKey targetVariantKey, LinkType linkType)
          Reports that a document contains a link to another document.
 void skippedBecauseNoLiveVersion(ImpExpVariantKey variantKey)
           
 void skippedBecauseRetired(ImpExpVariantKey variantKey)
           
 void success(ImpExpVariantKey variantKey)
          Called when the export of a document succeeded.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.outerj.daisy.tools.importexport.export.ExportListener
endDocumentProgress, info, isInterrupted, startDocumentProgress, updateDocumentProgress
 

Constructor Detail

BaseExportListener

public BaseExportListener()
Method Detail

failed

public void failed(ImpExpVariantKey variantKey,
                   Throwable e)
            throws Exception
Description copied from interface: ExportListener
Called when exporting a document fails.

The implementation can decide to simply log this or throw an exception in order to stop the whole export.

Specified by:
failed in interface ExportListener
Throws:
Exception

success

public void success(ImpExpVariantKey variantKey)
Description copied from interface: ExportListener
Called when the export of a document succeeded.

Specified by:
success in interface ExportListener

skippedBecauseRetired

public void skippedBecauseRetired(ImpExpVariantKey variantKey)
Specified by:
skippedBecauseRetired in interface ExportListener

skippedBecauseNoLiveVersion

public void skippedBecauseNoLiveVersion(ImpExpVariantKey variantKey)
Specified by:
skippedBecauseNoLiveVersion in interface ExportListener

hasLink

public void hasLink(ImpExpVariantKey sourceVariantKeyk,
                    ImpExpVariantKey targetVariantKey,
                    LinkType linkType)
Description copied from interface: ExportListener
Reports that a document contains a link to another document. This may be called multiple times with the same arguments, if a link to the same document occurs more then once.

Specified by:
hasLink in interface ExportListener

getLinks

public Set<ImpExpVariantKey> getLinks()

getSucceeded

public List<ImpExpVariantKey> getSucceeded()

getFailed

public List<BaseExportListener.FailureInfo> getFailed()

getSkippedBecauseRetired

public List<ImpExpVariantKey> getSkippedBecauseRetired()

getSkippedBecauseNoLiveVersion

public List<ImpExpVariantKey> getSkippedBecauseNoLiveVersion()

getBrokenLinks

public List getBrokenLinks()
Gets list of broken links. The broken links are determined the first time this method is called.


failedItem

public void failedItem(String itemType,
                       String itemName,
                       Throwable e)
Specified by:
failedItem in interface ExportListener

getFailedItems

public List<BaseExportListener.ItemFailureInfo> getFailedItems()

generateSax

public void generateSax(ContentHandler contentHandler)
                 throws SAXException
Throws:
SAXException

Daisy Open Source CMS