Class ProgressImpl
java.lang.Object
ch.tocco.nice2.tasks.impl.progress.ProgressImpl
- All Implemented Interfaces:
Progress
-
Constructor Summary
ConstructorsConstructorDescriptionProgressImpl(org.slf4j.Logger log, ProgressBean progressBean, ProgressPersistenceManager progressManager) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddProgressListener(ProgressListener progressListener) Get the textresources key of the progress.Get the id of the task.getType()Get theProgressBean.Typeof the progress.getVars()Get the variables (parameters for the placeholders in the label).voidremoveProgressListener(ProgressListener progressListener) voidupdateAbsolute(String labelKey, int total, int done) Set theProgressBean.Typeof the progress toProgressBean.Type.RUNNING_ABSOLUTEand display the given label.voidupdateAbsolute(String labelKey, int total, int done, Map<String, String> vars) Set theProgressBean.Typeof the progress toProgressBean.Type.RUNNING_ABSOLUTEand display the given label.voidSet theProgressBean.Typeof the progress toProgressBean.Type.CANCELLEDand display the default label (ProgressBean.DEFAULT_CANCELLED) and notification (ProgressBean.DEFAULT_CANCELLED_NOTIFICATION).voidupdateCancelled(String labelKey) Set theProgressBean.Typeof the progress toProgressBean.Type.CANCELLED, display the given label and display the default notification (ProgressBean.DEFAULT_CANCELLED_NOTIFICATION).voidupdateCancelled(String labelKey, String notificationKey) Set theProgressBean.Typeof the progress toProgressBean.Type.CANCELLEDand display the given label and notification.voidSet theProgressBean.Typeof the progress toProgressBean.Type.CANCELLEDand display the given label and notification.voidupdateCancelled(String labelKey, Map<String, String> vars) Set theProgressBean.Typeof the progress toProgressBean.Type.CANCELLED, display the given label and display the default notification (ProgressBean.DEFAULT_CANCELLED_NOTIFICATION).voidSet theProgressBean.Typeof the progress toProgressBean.Type.COMPLETEDand display the default label (ProgressBean.DEFAULT_COMPLETED) and notification (ProgressBean.DEFAULT_COMPLETED_NOTIFICATION).voidupdateCompleted(String labelKey) Set theProgressBean.Typeof the progress toProgressBean.Type.COMPLETED, display the given label and display the default notification (ProgressBean.DEFAULT_COMPLETED_NOTIFICATION).voidupdateCompleted(String labelKey, String notificationKey) Set theProgressBean.Typeof the progress toProgressBean.Type.COMPLETEDand display the given label and notification.voidupdateCompleted(String labelKey, String notificationKey, ProgressBean.NotificationType notificationType) Set theProgressBean.Typeof the progress toProgressBean.Type.COMPLETEDand display the given label and notification.voidupdateCompleted(String labelKey, String notificationKey, ProgressBean.NotificationType notificationType, Map<String, String> vars) Set theProgressBean.Typeof the progress toProgressBean.Type.COMPLETEDand display the given label and notification.voidSet theProgressBean.Typeof the progress toProgressBean.Type.COMPLETEDand display the given label and notification.voidupdateCompleted(String labelKey, Map<String, String> vars) Set theProgressBean.Typeof the progress toProgressBean.Type.COMPLETED, display the given label and display the default notification (ProgressBean.DEFAULT_COMPLETED_NOTIFICATION).voidSet theProgressBean.Typeof the progress toProgressBean.Type.FAILEDand display the default label (ProgressBean.DEFAULT_FAILED) and notification (ProgressBean.DEFAULT_FAILED_NOTIFICATION).voidupdateFailed(String labelKey) Set theProgressBean.Typeof the progress toProgressBean.Type.FAILED, display the given label and display the default notification (ProgressBean.DEFAULT_FAILED_NOTIFICATION).voidupdateFailed(String labelKey, String notificationKey) Set theProgressBean.Typeof the progress toProgressBean.Type.FAILEDand display the given label and notification.voidSet theProgressBean.Typeof the progress toProgressBean.Type.FAILEDand display the given label and notification.voidupdateFailed(String labelKey, Map<String, String> vars) Set theProgressBean.Typeof the progress toProgressBean.Type.FAILED, display the given label and display the default notification (ProgressBean.DEFAULT_FAILED_NOTIFICATION).voidupdateInfinite(String labelKey) Set theProgressBean.Typeof the progress toProgressBean.Type.RUNNING_INFINITEand display the given label.voidupdateInfinite(String labelKey, Map<String, String> vars) Set theProgressBean.Typeof the progress toProgressBean.Type.RUNNING_INFINITEand display the given label.
-
Constructor Details
-
ProgressImpl
public ProgressImpl(org.slf4j.Logger log, ProgressBean progressBean, ProgressPersistenceManager progressManager)
-
-
Method Details
-
addProgressListener
- Specified by:
addProgressListenerin interfaceProgress
-
removeProgressListener
- Specified by:
removeProgressListenerin interfaceProgress
-
getProgressListeners
- Specified by:
getProgressListenersin interfaceProgress
-
updateInfinite
Description copied from interface:ProgressSet theProgressBean.Typeof the progress toProgressBean.Type.RUNNING_INFINITEand display the given label.- Specified by:
updateInfinitein interfaceProgress- Parameters:
labelKey- the key (text resources) of the label to display
-
updateInfinite
Description copied from interface:ProgressSet theProgressBean.Typeof the progress toProgressBean.Type.RUNNING_INFINITEand display the given label.- Specified by:
updateInfinitein interfaceProgress- Parameters:
labelKey- the key (text resources) of the label to displayvars- a map with the parameters to replace the placeholders in the label with
-
updateAbsolute
Description copied from interface:ProgressSet theProgressBean.Typeof the progress toProgressBean.Type.RUNNING_ABSOLUTEand display the given label.- Specified by:
updateAbsolutein interfaceProgress- Parameters:
labelKey- the key (text resources) of the label to displaytotal- the total count of the itemsdone- the count of the items that are already done
-
updateAbsolute
Description copied from interface:ProgressSet theProgressBean.Typeof the progress toProgressBean.Type.RUNNING_ABSOLUTEand display the given label.- Specified by:
updateAbsolutein interfaceProgress- Parameters:
labelKey- the key (text ressurces) of the label to displaytotal- the total count of the itemsdone- the count of the items that are already donevars- a map with the parameters to replace the placeholders in the label with
-
updateCompleted
public void updateCompleted()Description copied from interface:ProgressSet theProgressBean.Typeof the progress toProgressBean.Type.COMPLETEDand display the default label (ProgressBean.DEFAULT_COMPLETED) and notification (ProgressBean.DEFAULT_COMPLETED_NOTIFICATION).- Specified by:
updateCompletedin interfaceProgress
-
updateCompleted
Description copied from interface:ProgressSet theProgressBean.Typeof the progress toProgressBean.Type.COMPLETED, display the given label and display the default notification (ProgressBean.DEFAULT_COMPLETED_NOTIFICATION).- Specified by:
updateCompletedin interfaceProgress- Parameters:
labelKey- the key (text resources) of the label to display
-
updateCompleted
Description copied from interface:ProgressSet theProgressBean.Typeof the progress toProgressBean.Type.COMPLETED, display the given label and display the default notification (ProgressBean.DEFAULT_COMPLETED_NOTIFICATION).- Specified by:
updateCompletedin interfaceProgress- Parameters:
labelKey- the key (text resources) of the label to displayvars- a map with the parameters to replace the placeholders in the label with.
-
updateCompleted
Description copied from interface:ProgressSet theProgressBean.Typeof the progress toProgressBean.Type.COMPLETEDand display the given label and notification.- Specified by:
updateCompletedin interfaceProgress- Parameters:
labelKey- the key (text resources) of the label to displaynotificationKey- the key (text resources) of the notification to display
-
updateCompleted
Description copied from interface:ProgressSet theProgressBean.Typeof the progress toProgressBean.Type.COMPLETEDand display the given label and notification.- Specified by:
updateCompletedin interfaceProgress- Parameters:
labelKey- the key (text resources) of the label to displaynotificationKey- the key (text resources) of the notification to displayvars- a map with the parameters to replace the placeholders in the label and also in the notification with.
-
updateCompleted
public void updateCompleted(String labelKey, String notificationKey, ProgressBean.NotificationType notificationType) Description copied from interface:ProgressSet theProgressBean.Typeof the progress toProgressBean.Type.COMPLETEDand display the given label and notification.- Specified by:
updateCompletedin interfaceProgress- Parameters:
labelKey- the key (text resources) of the label to displaynotificationKey- the key (text resources) of the notification to displaynotificationType- the type of the notification to display
-
updateCompleted
public void updateCompleted(String labelKey, String notificationKey, ProgressBean.NotificationType notificationType, Map<String, String> vars) Description copied from interface:ProgressSet theProgressBean.Typeof the progress toProgressBean.Type.COMPLETEDand display the given label and notification.- Specified by:
updateCompletedin interfaceProgress- Parameters:
labelKey- the key (text resources) of the label to displaynotificationKey- the key (text resources) of the notification to displaynotificationType- the type of the notification to displayvars- a map with the parameters to replace the placeholders in the label and also in the notification with.
-
updateFailed
public void updateFailed()Description copied from interface:ProgressSet theProgressBean.Typeof the progress toProgressBean.Type.FAILEDand display the default label (ProgressBean.DEFAULT_FAILED) and notification (ProgressBean.DEFAULT_FAILED_NOTIFICATION).- Specified by:
updateFailedin interfaceProgress
-
updateFailed
Description copied from interface:ProgressSet theProgressBean.Typeof the progress toProgressBean.Type.FAILED, display the given label and display the default notification (ProgressBean.DEFAULT_FAILED_NOTIFICATION).- Specified by:
updateFailedin interfaceProgress- Parameters:
labelKey- the key (text resources) of the label to display
-
updateFailed
Description copied from interface:ProgressSet theProgressBean.Typeof the progress toProgressBean.Type.FAILED, display the given label and display the default notification (ProgressBean.DEFAULT_FAILED_NOTIFICATION).- Specified by:
updateFailedin interfaceProgress- Parameters:
labelKey- the key (text resources) of the label to displayvars- a map with the parameters to replace the placeholders in the label with.
-
updateFailed
Description copied from interface:ProgressSet theProgressBean.Typeof the progress toProgressBean.Type.FAILEDand display the given label and notification.- Specified by:
updateFailedin interfaceProgress- Parameters:
labelKey- the key (text resources) of the label to displaynotificationKey- the key (text resources) of the notification to display
-
updateFailed
Description copied from interface:ProgressSet theProgressBean.Typeof the progress toProgressBean.Type.FAILEDand display the given label and notification.- Specified by:
updateFailedin interfaceProgress- Parameters:
labelKey- the key (text resources) of the label to displaynotificationKey- the key (text resources) of the notification to displayvars- a map with the parameters to replace the placeholders in the label and also in the notification with.
-
updateCancelled
public void updateCancelled()Description copied from interface:ProgressSet theProgressBean.Typeof the progress toProgressBean.Type.CANCELLEDand display the default label (ProgressBean.DEFAULT_CANCELLED) and notification (ProgressBean.DEFAULT_CANCELLED_NOTIFICATION).- Specified by:
updateCancelledin interfaceProgress
-
updateCancelled
Description copied from interface:ProgressSet theProgressBean.Typeof the progress toProgressBean.Type.CANCELLED, display the given label and display the default notification (ProgressBean.DEFAULT_CANCELLED_NOTIFICATION).- Specified by:
updateCancelledin interfaceProgress- Parameters:
labelKey- the key (text resources) of the label to display
-
updateCancelled
Description copied from interface:ProgressSet theProgressBean.Typeof the progress toProgressBean.Type.CANCELLED, display the given label and display the default notification (ProgressBean.DEFAULT_CANCELLED_NOTIFICATION).- Specified by:
updateCancelledin interfaceProgress- Parameters:
labelKey- the key (text resources) of the label to displayvars- a map with the parameters to replace the placeholders in the label with.
-
updateCancelled
Description copied from interface:ProgressSet theProgressBean.Typeof the progress toProgressBean.Type.CANCELLEDand display the given label and notification.- Specified by:
updateCancelledin interfaceProgress- Parameters:
labelKey- the key (text resources) of the label to displaynotificationKey- the key (text resources) of the notification to display
-
updateCancelled
Description copied from interface:ProgressSet theProgressBean.Typeof the progress toProgressBean.Type.CANCELLEDand display the given label and notification.- Specified by:
updateCancelledin interfaceProgress- Parameters:
labelKey- the key (text resources) of the label to displaynotificationKey- the key (text resources) of the notification to displayvars- a map with the parameters to replace the placeholders in the label and also in the notification with.
-
getTaskId
Description copied from interface:ProgressGet the id of the task. -
getType
Description copied from interface:ProgressGet theProgressBean.Typeof the progress.- Specified by:
getTypein interfaceProgress- Returns:
- the
ProgressBean.Type
-
getLabelKey
Description copied from interface:ProgressGet the textresources key of the progress.- Specified by:
getLabelKeyin interfaceProgress- Returns:
- the textressources key
-
getVars
Description copied from interface:ProgressGet the variables (parameters for the placeholders in the label).
-