Squiz Matrix  4.12.2
 All Data Structures Namespaces Functions Variables Pages
AssetRefreshWorker Class Reference
Inheritance diagram for AssetRefreshWorker:
MatrixSwingWorker

Public Member Functions

 AssetRefreshWorker (boolean throwVisibleError)
 
 AssetRefreshWorker (String[] assetids, boolean throwVisibleError)
 
 AssetRefreshWorker (MatrixTreeNode node, boolean throwVisibleError)
 
Object construct ()
 
void finished ()
 
void start ()
 
- Public Member Functions inherited from MatrixSwingWorker
void finished ()
 
void interrupt ()
 
Object get ()
 
 MatrixSwingWorker ()
 
void start ()
 

Protected Member Functions

String getStatusBarFailMessage ()
 
String getStatusBarSuccessMessage ()
 
String getStatusBarWaitMessage ()
 
String getErrorMessage ()
 
String getErrorTitle ()
 
String getLogMessage ()
 
int getStatusClearTime ()
 
- Protected Member Functions inherited from MatrixSwingWorker
synchronized Object getValue ()
 

Detailed Description

The AssetRefreshWorker makes a request to the Matrix system for the specified assets in a separate thread, then refresh the assets in the EventDispachThread. You should use this class over all other methods of refreshing as it correctly obeys the swing thread laws.

Example:

   AssetRefreshWorker worker = new AssetRefreshWorker(assetid, true);
   worker.start();
Author
Marc McIntyre mmcin.nosp@m.tyre.nosp@m.@squi.nosp@m.z.ne.nosp@m.t

Definition at line 39 of file AssetRefreshWorker.java.

Constructor & Destructor Documentation

AssetRefreshWorker ( boolean  throwVisibleError)
inline

Refreshes all known assets.

Parameters
throwVisibleErrorif TRUE an dialog error is thrown if one occurs

Definition at line 49 of file AssetRefreshWorker.java.

AssetRefreshWorker ( String[]  assetids,
boolean  throwVisibleError 
)
inline

Refreshes the specified assets.

Parameters
assetidsthe assetids to refresh
throwVisibleErrorif TRUE an dialog error is thrown if one occurs

Definition at line 59 of file AssetRefreshWorker.java.

AssetRefreshWorker ( MatrixTreeNode  node,
boolean  throwVisibleError 
)
inline

Refreshes the specified node and its children.

Parameters
nodethe node to refresh
throwVisibleErrorif TRUE an dialog error is thrown if one occurs

Definition at line 69 of file AssetRefreshWorker.java.

Member Function Documentation

Object construct ( )
inlinevirtual

Constructs the worker and returns the object to be used by get(). No GUI updates should be executed in the method. GUI updates should occur in finished()

Returns
the object to get obtained by get()
See Also
MatrixSwingWorker.get()
MatrixSwingWorker.construct()
finished()
MatrixSwingWorker.finished()

Implements MatrixSwingWorker.

Definition at line 85 of file AssetRefreshWorker.java.

void finished ( )
inline

Called from the EventDispachThread once construct has completed.

See Also
construct()
MatrixSwingWorker.finished()

Definition at line 98 of file AssetRefreshWorker.java.

String getErrorMessage ( )
inlineprotected

Returns the message used in the dialog error popup By default the error is 'Error While Requesting' followed by the error

Returns
the error message

Definition at line 160 of file AssetRefreshWorker.java.

String getErrorTitle ( )
inlineprotected

Returns the message used in the dialog title when an error occurs By default the error is 'Error Refreshing Assets'

Returns
the error message

Definition at line 167 of file AssetRefreshWorker.java.

String getLogMessage ( )
inlineprotected

Returns the message used logging an error message. By default this method calls getErrorMessage()

Returns
the error message

Definition at line 174 of file AssetRefreshWorker.java.

String getStatusBarFailMessage ( )
inlineprotected

Returns the message used when in the status bar when an error occurs. By default the error is 'Failed!'

Returns
the error message

Definition at line 139 of file AssetRefreshWorker.java.

String getStatusBarSuccessMessage ( )
inlineprotected

Returns the message used when in the status bar when no error occurs. By default the message is 'Success!'

Returns
the success message

Definition at line 146 of file AssetRefreshWorker.java.

String getStatusBarWaitMessage ( )
inlineprotected

Returns the message used while waiting for construct() to return By default the message is 'Requesting...'

Returns
the waiting message

Definition at line 153 of file AssetRefreshWorker.java.

int getStatusClearTime ( )
inlineprotected

Returns the duration in milliseconds that the status bar waits before clearing the success or error message. By default this is set to 1000 ms.

Returns
the duration to wait before clearing the message

Definition at line 181 of file AssetRefreshWorker.java.

void start ( )
inline

Starts the worker.

See Also
MatrixSwingWorker.start()

Definition at line 129 of file AssetRefreshWorker.java.


The documentation for this class was generated from the following file: