Class CmsProgressThread

java.lang.Object
java.lang.Thread
org.opencms.workplace.threads.A_CmsProgressThread
org.opencms.workplace.commons.CmsProgressThread
All Implemented Interfaces:
Runnable

public class CmsProgressThread extends org.opencms.workplace.threads.A_CmsProgressThread
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
  • Constructor Details

    • CmsProgressThread

      public CmsProgressThread(A_CmsListDialog list, String key, Locale locale)
      Constructs a new progress thread with the given name.

      Parameters:
      list - the list to use for the progress to display
      key - the key of the thread
      locale - 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

      public Throwable 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

      public long getFinishTime()
      Returns the time the thread was finished.

      Returns:
      the time the thread was finished
    • getKey

      public String 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

      public Locale getLocale()
      Returns the locale to use for this thread.

      Returns:
      the locale to use for this thread
    • getProgress

      public int getProgress()
      Returns the progress.

      Returns:
      the progress
    • getResult

      public String getResult()
      Returns the finished result as HTML of the list.

      Returns:
      the finished result as HTML of the list
    • getRuntime

      public long getRuntime()
      Returns the time this report has been running.

      Returns:
      the time this report has been running
    • getStartTime

      public long getStartTime()
      Returns the time the thread has started.

      Returns:
      the time the thread has started
    • run

      public void run()
      Specified by:
      run in interface Runnable
      Overrides:
      run in class Thread
      See Also:
    • setDescription

      public void setDescription(String description)
      Sets the description to show for the progress.

      Specified by:
      setDescription in class org.opencms.workplace.threads.A_CmsProgressThread
      Parameters:
      description - the description to show for the progress to set
    • setLocale

      public void setLocale(Locale locale)
      Sets the locale to use for this thread.

      Parameters:
      locale - the locale to use for this thread to set
    • setProgress

      public void setProgress(int progress)
      Sets the progress.

      Specified by:
      setProgress in class org.opencms.workplace.threads.A_CmsProgressThread
      Parameters:
      progress - the progress to set