net.datacrow.console.windows.fileimport
Class FileImportDialog.FileImportMediator

java.lang.Object
  extended by net.datacrow.console.windows.fileimport.FileImportDialog.FileImportMediator
All Implemented Interfaces:
IFileImportClient
Enclosing class:
FileImportDialog

public class FileImportDialog.FileImportMediator
extends java.lang.Object
implements IFileImportClient

Communicates between the dialog and the process to avoid NullPointerException when asking for values directly from the drop downs and such. This object stores the values as selected by the user and is used by the process.

Author:
Robert Jan van der Waals

Constructor Summary
FileImportDialog.FileImportMediator(FileImportDialog dlg)
           
 
Method Summary
 void addError(java.lang.Throwable e)
          Adds an error.
 void addMessage(java.lang.String message)
          Adds a messages.
 boolean cancelled()
          Indicates the process has been canceled.
 void finish()
          Indicate the process has finished.
 DcObject getDcContainer()
          The container to which the resulted items are added.
 int getDirectoryUsage()
          The directory usage implementation (free form).
 DcModule getModule()
           
 Region getRegion()
          The used region.
 SearchMode getSearchMode()
          The used search mode.
 IServer getServer()
          The used server.
 DcObject getStorageMedium()
          The storage medium to apply on the resulted items.
 void initProgressBar(int max)
          Sets the expected result count.
 void updateProgressBar(int value)
          Updates the progress bar to the specified value.
 boolean useOnlineServices()
          Indicates if online services should be used.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileImportDialog.FileImportMediator

public FileImportDialog.FileImportMediator(FileImportDialog dlg)
Method Detail

addMessage

public void addMessage(java.lang.String message)
Description copied from interface: IFileImportClient
Adds a messages.

Specified by:
addMessage in interface IFileImportClient

addError

public void addError(java.lang.Throwable e)
Description copied from interface: IFileImportClient
Adds an error.

Specified by:
addError in interface IFileImportClient

initProgressBar

public void initProgressBar(int max)
Description copied from interface: IFileImportClient
Sets the expected result count.

Specified by:
initProgressBar in interface IFileImportClient

updateProgressBar

public void updateProgressBar(int value)
Description copied from interface: IFileImportClient
Updates the progress bar to the specified value.

Specified by:
updateProgressBar in interface IFileImportClient

cancelled

public boolean cancelled()
Description copied from interface: IFileImportClient
Indicates the process has been canceled.

Specified by:
cancelled in interface IFileImportClient

useOnlineServices

public boolean useOnlineServices()
Description copied from interface: IFileImportClient
Indicates if online services should be used.

Specified by:
useOnlineServices in interface IFileImportClient

finish

public void finish()
Description copied from interface: IFileImportClient
Indicate the process has finished.

Specified by:
finish in interface IFileImportClient

getSearchMode

public SearchMode getSearchMode()
Description copied from interface: IFileImportClient
The used search mode.

Specified by:
getSearchMode in interface IFileImportClient
Returns:
The search mode or null.

getServer

public IServer getServer()
Description copied from interface: IFileImportClient
The used server.

Specified by:
getServer in interface IFileImportClient

getRegion

public Region getRegion()
Description copied from interface: IFileImportClient
The used region.

Specified by:
getRegion in interface IFileImportClient
Returns:
The region or null.

getDcContainer

public DcObject getDcContainer()
Description copied from interface: IFileImportClient
The container to which the resulted items are added.

Specified by:
getDcContainer in interface IFileImportClient
Returns:
A container or null.

getStorageMedium

public DcObject getStorageMedium()
Description copied from interface: IFileImportClient
The storage medium to apply on the resulted items.

Specified by:
getStorageMedium in interface IFileImportClient
Returns:
A storage medium or null.

getDirectoryUsage

public int getDirectoryUsage()
Description copied from interface: IFileImportClient
The directory usage implementation (free form).

Specified by:
getDirectoryUsage in interface IFileImportClient

getModule

public DcModule getModule()
Specified by:
getModule in interface IFileImportClient