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


public interface ICrystalDocumentSaveBehavior

This interface defines a save behavior for a ICrystalReportsEditor object. By defining a save behavior, you can save a report to a custom location or a custom format. To use this class, return an object that implements this interface from a class that implements the IEditorInput.getAdapter method.

See Also:
EditorUtilities.getDefaultSaveBehavior()

Method Summary
 IEditorInput doSave(ICrystalReportsEditor editor, IProgressMonitor progress)
          Saves the editor.
 IEditorInput doSaveAs(ICrystalReportsEditor editor, IProgressMonitor progress)
          Saves the editor to a new location.
 boolean isDirty(ICrystalReportsEditor editor)
          Returns true if the editor has unsaved changes.
 

Method Detail

doSave

IEditorInput doSave(ICrystalReportsEditor editor,
                    IProgressMonitor progress)
Saves the editor. This method uses an IProgressMonitor object to provide progress updates to the user. This method may delegate to the doSaveAs method. If this method delegates to the doSaveAs method, the IEditorInput object that is returned may have changed.

Parameters:
editor - the editor to save, may not be null
progress - the progress monitor to display the saving status to, may not be null
Returns:
the IEditorInput object for the editor, or null if the operation was canceled

doSaveAs

IEditorInput doSaveAs(ICrystalReportsEditor editor,
                      IProgressMonitor progress)
Saves the editor to a new location. This method uses an IProgressMonitor object to provide progress updates to the user.

Parameters:
editor - the editor to save, may not be null
progress - the progress monitor to display the saving status to, may not be null
Returns:
an IEditorInput object representing the new location, or null if the operation was canceled

isDirty

boolean isDirty(ICrystalReportsEditor editor)
Returns true if the editor has unsaved changes.

Parameters:
editor - the editor to check for unsaved changes
Returns:
true if the editor has unsaved changes, false otherwise