com.businessobjects.crystalreports.designer.sdk.input
Interface IReportClientDocumentFactory


public interface IReportClientDocumentFactory

This interface defines a factory that creates ReportClientDocument objects. This interface is typically used to load reports from a custom location. To use this class, return an object that implements this interface from a class that implements the org.eclipse.ui.IEditorInput.getAdapter method.


Method Summary
 ReportClientDocument createDocument(IReportClientDocumentLoadingProgressMonitor progress)
          Creates a ReportClientDocument object.
 java.lang.String getLoadingTitle()
          Returns the title for the loading process.
 boolean handleCreationException(java.lang.Exception ex)
          Handles exceptions thrown by the createDocument method.
 

Method Detail

createDocument

ReportClientDocument createDocument(IReportClientDocumentLoadingProgressMonitor progress)
                                    throws java.lang.Exception
Creates a ReportClientDocument object. This method is called on a background thread. Code that requires the Display thread should not be used from this method. If user interaction is required, throw an exception. Exceptions are handled by a call to the handleCreationException method on the same instance.

Parameters:
progress - the progress monitor to display the loading status to
Returns:
a new ReportClientDocument object
Throws:
java.lang.Exception - if document creation fails
java.util.concurrent.CancellationException - if document creation is canceled
java.lang.InterruptedException - if when document creation is canceled
See Also:
IReportClientDocumentLoadingProgressMonitor

getLoadingTitle

java.lang.String getLoadingTitle()
Returns the title for the loading process.

Returns:
the title for the loading process or null to use the default title

handleCreationException

boolean handleCreationException(java.lang.Exception ex)
                                throws java.util.concurrent.CancellationException
Handles exceptions thrown by the createDocument method. This method is called from the Display thread. Therefore, you may perform UI based tasks such as opening a dialog box or prompting the user for input. Return true if the exception was handled successfully. This causes the createDocument method to be called again on the same factory.

Parameters:
ex - the exception to handle
Returns:
true if the exception was handled successfully, false otherwise
Throws:
java.util.concurrent.CancellationException - if document creation was canceled