Package org.apache.wiki.ui.progress
Class DefaultProgressManager
java.lang.Object
org.apache.wiki.ui.progress.DefaultProgressManager
- All Implemented Interfaces:
- ProgressManager
public class DefaultProgressManager extends Object implements ProgressManager
Manages progressing items.  In general this class is used whenever JSPWiki is doing something which may require a long time.
  In addition, this manager provides a JSON interface for finding remotely what the progress is.  The JSON object name is
  JSON_PROGRESSTRACKER = ""progressTracker"".
- Since:
- 2.6
- 
Nested Class SummaryNested Classes Modifier and Type Class Description classDefaultProgressManager.JSONTrackerProvides access to a progress indicator, assuming you know the ID.
- 
Field SummaryFields inherited from interface org.apache.wiki.ui.progress.ProgressManagerJSON_PROGRESSTRACKER
- 
Constructor SummaryConstructors Constructor Description DefaultProgressManager()Creates a new ProgressManager.
- 
Method SummaryModifier and Type Method Description StringgetNewProgressIdentifier()You can use this to get an unique process identifier.intgetProgress(String id)Get the progress in percents.voidstartProgress(ProgressItem pi, String id)Call this method to get your ProgressItem into the ProgressManager queue.voidstopProgress(String id)Call this method to remove your ProgressItem from the queue (after which getProgress() will no longer find it.
- 
Constructor Details- 
DefaultProgressManagerpublic DefaultProgressManager()Creates a new ProgressManager.
 
- 
- 
Method Details- 
getNewProgressIdentifierYou can use this to get an unique process identifier.- Specified by:
- getNewProgressIdentifierin interface- ProgressManager
- Returns:
- A new random value
 
- 
startProgressCall this method to get your ProgressItem into the ProgressManager queue. The ProgressItem will be moved to state STARTED.- Specified by:
- startProgressin interface- ProgressManager
- Parameters:
- pi- ProgressItem to start
- id- The progress identifier
 
- 
stopProgressCall this method to remove your ProgressItem from the queue (after which getProgress() will no longer find it. The ProgressItem will be moved to state STOPPED.- Specified by:
- stopProgressin interface- ProgressManager
- Parameters:
- id- The progress identifier
 
- 
getProgressGet the progress in percents.- Specified by:
- getProgressin interface- ProgressManager
- Parameters:
- id- The progress identifier.
- Returns:
- a value between 0 to 100 indicating the progress
- Throws:
- IllegalArgumentException- If no such progress item exists.
 
 
-