Package org.opencms.workplace.commons
Class CmsProgressThread
java.lang.Object
java.lang.Thread
org.opencms.workplace.threads.A_CmsProgressThread
org.opencms.workplace.commons.CmsProgressThread
- All Implemented Interfaces:
Runnable
This class is used to build a list (
A_CmsListDialog
) in the background
and to show the progress of building to the user.To work correctly the operations while building the list have to update the actual progress.
- Since:
- 7.0.0
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Thread
Thread.State, Thread.UncaughtExceptionHandler
-
Field Summary
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
-
Constructor Summary
ConstructorDescriptionCmsProgressThread
(A_CmsListDialog list, String key, Locale locale) Constructs a new progress thread with the given name. -
Method Summary
Modifier and TypeMethodDescriptionReturns the description to show for the progress.getError()
Returns the error exception in case there was an error during the execution of this thread, null otherwise.long
Returns the time the thread was finished.getKey()
Returns the key of this thread.getList()
Returns the list of the progress bar.Returns the locale to use for this thread.int
Returns the progress.Returns the finished result as HTML of the list.long
Returns the time this report has been running.long
Returns the time the thread has started.void
run()
void
setDescription
(String description) Sets the description to show for the progress.void
Sets the locale to use for this thread.void
setProgress
(int progress) Sets the progress.Methods inherited from class java.lang.Thread
activeCount, checkAccess, clone, countStackFrames, currentThread, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, onSpinWait, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, suspend, toString, yield
-
Constructor Details
-
CmsProgressThread
Constructs a new progress thread with the given name.- Parameters:
list
- the list to use for the progress to displaykey
- the key of the threadlocale
- the locale to use for this thread
-
-
Method Details
-
getDescription
Returns the description to show for the progress.- Returns:
- the description to show for the progress
-
getError
Returns the error exception in case there was an error during the execution of this thread, null otherwise.- Returns:
- the error exception in case there was an error, null otherwise
-
getFinishTime
Returns the time the thread was finished.- Returns:
- the time the thread was finished
-
getKey
Returns the key of this thread.- Returns:
- the key of this thread
-
getList
Returns the list of the progress bar.- Returns:
- the list of the progress bar
-
getLocale
Returns the locale to use for this thread.- Returns:
- the locale to use for this thread
-
getProgress
Returns the progress.- Returns:
- the progress
-
getResult
Returns the finished result as HTML of the list.- Returns:
- the finished result as HTML of the list
-
getRuntime
Returns the time this report has been running.- Returns:
- the time this report has been running
-
getStartTime
Returns the time the thread has started.- Returns:
- the time the thread has started
-
run
-
setDescription
Sets the description to show for the progress.- Specified by:
setDescription
in classorg.opencms.workplace.threads.A_CmsProgressThread
- Parameters:
description
- the description to show for the progress to set
-
setLocale
Sets the locale to use for this thread.- Parameters:
locale
- the locale to use for this thread to set
-
setProgress
Sets the progress.- Specified by:
setProgress
in classorg.opencms.workplace.threads.A_CmsProgressThread
- Parameters:
progress
- the progress to set
-