Package org.apache.wiki.ui.progress

# Interface ProgressManager

All Known Implementing Classes:
  `DefaultProgressManager`

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

## Field Summary

Fields
Modifier and Type
Field
Description
`static final String`
`JSON_PROGRESSTRACKER`

## Method Summary

Modifier and Type
Method
Description
`String`
`getNewProgressIdentifier()`
You can use this to get an unique process identifier.
`int`
`getProgress(String id)`
Get the progress in percents.
`void`
`startProgress(ProgressItem pi, String id)`
Call this method to get your ProgressItem into the ProgressManager queue.
`void`
`stopProgress(String id)`
Call this method to remove your ProgressItem from the queue (after which getProgress() will no longer find it.

## Field Details

### JSON_PROGRESSTRACKER

static final String JSON_PROGRESSTRACKER

See Also:
  - Constant Field Values

## Method Details

### getNewProgressIdentifier

String getNewProgressIdentifier()
You can use this to get an unique process identifier.

Returns:
  A new random value

### startProgress

void startProgress(ProgressItem pi, String id)
Call this method to get your ProgressItem into the ProgressManager queue. The ProgressItem will be moved to state STARTED.

Parameters:
  `pi` - ProgressItem to start
  `id` - The progress identifier

### stopProgress

void stopProgress(String id)
Call 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.

Parameters:
  `id` - The progress identifier

### getProgress

int getProgress(String id) throws IllegalArgumentException
Get the progress in percents.

Parameters:
  `id` - The progress identifier.
Returns:
  a value between 0 to 100 indicating the progress
Throws:
  `IllegalArgumentException` - If no such progress item exists.