Class ProgressImpl
java.lang.Object
ch.tocco.nice2.tasks.impl.progress.ProgressImpl
- All Implemented Interfaces:
Progress
-
Constructor Summary
ConstructorDescriptionProgressImpl
(org.slf4j.Logger log, ProgressBean progressBean, ProgressPersistenceManager progressManager) -
Method Summary
Modifier and TypeMethodDescriptionvoid
addProgressListener
(ProgressListener progressListener) Get the textresources key of the progress.Get the id of the task.getType()
Get theProgressBean.Type
of the progress.getVars()
Get the variables (parameters for the placeholders in the label).void
removeProgressListener
(ProgressListener progressListener) void
updateAbsolute
(String labelKey, int total, int done) Set theProgressBean.Type
of the progress toProgressBean.Type.RUNNING_ABSOLUTE
and display the given label.void
updateAbsolute
(String labelKey, int total, int done, Map<String, String> vars) Set theProgressBean.Type
of the progress toProgressBean.Type.RUNNING_ABSOLUTE
and display the given label.void
Set theProgressBean.Type
of the progress toProgressBean.Type.CANCELLED
and display the default label (ProgressBean.DEFAULT_CANCELLED
) and notification (ProgressBean.DEFAULT_CANCELLED_NOTIFICATION
).void
updateCancelled
(String labelKey) Set theProgressBean.Type
of the progress toProgressBean.Type.CANCELLED
, display the given label and display the default notification (ProgressBean.DEFAULT_CANCELLED_NOTIFICATION
).void
updateCancelled
(String labelKey, String notificationKey) Set theProgressBean.Type
of the progress toProgressBean.Type.CANCELLED
and display the given label and notification.void
Set theProgressBean.Type
of the progress toProgressBean.Type.CANCELLED
and display the given label and notification.void
updateCancelled
(String labelKey, Map<String, String> vars) Set theProgressBean.Type
of the progress toProgressBean.Type.CANCELLED
, display the given label and display the default notification (ProgressBean.DEFAULT_CANCELLED_NOTIFICATION
).void
Set theProgressBean.Type
of the progress toProgressBean.Type.COMPLETED
and display the default label (ProgressBean.DEFAULT_COMPLETED
) and notification (ProgressBean.DEFAULT_COMPLETED_NOTIFICATION
).void
updateCompleted
(String labelKey) Set theProgressBean.Type
of the progress toProgressBean.Type.COMPLETED
, display the given label and display the default notification (ProgressBean.DEFAULT_COMPLETED_NOTIFICATION
).void
updateCompleted
(String labelKey, String notificationKey) Set theProgressBean.Type
of the progress toProgressBean.Type.COMPLETED
and display the given label and notification.void
updateCompleted
(String labelKey, String notificationKey, ProgressBean.NotificationType notificationType) Set theProgressBean.Type
of the progress toProgressBean.Type.COMPLETED
and display the given label and notification.void
updateCompleted
(String labelKey, String notificationKey, ProgressBean.NotificationType notificationType, Map<String, String> vars) Set theProgressBean.Type
of the progress toProgressBean.Type.COMPLETED
and display the given label and notification.void
Set theProgressBean.Type
of the progress toProgressBean.Type.COMPLETED
and display the given label and notification.void
updateCompleted
(String labelKey, Map<String, String> vars) Set theProgressBean.Type
of the progress toProgressBean.Type.COMPLETED
, display the given label and display the default notification (ProgressBean.DEFAULT_COMPLETED_NOTIFICATION
).void
Set theProgressBean.Type
of the progress toProgressBean.Type.FAILED
and display the default label (ProgressBean.DEFAULT_FAILED
) and notification (ProgressBean.DEFAULT_FAILED_NOTIFICATION
).void
updateFailed
(String labelKey) Set theProgressBean.Type
of the progress toProgressBean.Type.FAILED
, display the given label and display the default notification (ProgressBean.DEFAULT_FAILED_NOTIFICATION
).void
updateFailed
(String labelKey, String notificationKey) Set theProgressBean.Type
of the progress toProgressBean.Type.FAILED
and display the given label and notification.void
Set theProgressBean.Type
of the progress toProgressBean.Type.FAILED
and display the given label and notification.void
updateFailed
(String labelKey, Map<String, String> vars) Set theProgressBean.Type
of the progress toProgressBean.Type.FAILED
, display the given label and display the default notification (ProgressBean.DEFAULT_FAILED_NOTIFICATION
).void
updateInfinite
(String labelKey) Set theProgressBean.Type
of the progress toProgressBean.Type.RUNNING_INFINITE
and display the given label.void
updateInfinite
(String labelKey, Map<String, String> vars) Set theProgressBean.Type
of the progress toProgressBean.Type.RUNNING_INFINITE
and display the given label.
-
Constructor Details
-
ProgressImpl
public ProgressImpl(org.slf4j.Logger log, ProgressBean progressBean, ProgressPersistenceManager progressManager)
-
-
Method Details
-
addProgressListener
- Specified by:
addProgressListener
in interfaceProgress
-
removeProgressListener
- Specified by:
removeProgressListener
in interfaceProgress
-
getProgressListeners
- Specified by:
getProgressListeners
in interfaceProgress
-
updateInfinite
Description copied from interface:Progress
Set theProgressBean.Type
of the progress toProgressBean.Type.RUNNING_INFINITE
and display the given label.- Specified by:
updateInfinite
in interfaceProgress
- Parameters:
labelKey
- the key (text resources) of the label to display
-
updateInfinite
Description copied from interface:Progress
Set theProgressBean.Type
of the progress toProgressBean.Type.RUNNING_INFINITE
and display the given label.- Specified by:
updateInfinite
in 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:Progress
Set theProgressBean.Type
of the progress toProgressBean.Type.RUNNING_ABSOLUTE
and display the given label.- Specified by:
updateAbsolute
in 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:Progress
Set theProgressBean.Type
of the progress toProgressBean.Type.RUNNING_ABSOLUTE
and display the given label.- Specified by:
updateAbsolute
in 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:Progress
Set theProgressBean.Type
of the progress toProgressBean.Type.COMPLETED
and display the default label (ProgressBean.DEFAULT_COMPLETED
) and notification (ProgressBean.DEFAULT_COMPLETED_NOTIFICATION
).- Specified by:
updateCompleted
in interfaceProgress
-
updateCompleted
Description copied from interface:Progress
Set theProgressBean.Type
of the progress toProgressBean.Type.COMPLETED
, display the given label and display the default notification (ProgressBean.DEFAULT_COMPLETED_NOTIFICATION
).- Specified by:
updateCompleted
in interfaceProgress
- Parameters:
labelKey
- the key (text resources) of the label to display
-
updateCompleted
Description copied from interface:Progress
Set theProgressBean.Type
of the progress toProgressBean.Type.COMPLETED
, display the given label and display the default notification (ProgressBean.DEFAULT_COMPLETED_NOTIFICATION
).- Specified by:
updateCompleted
in 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:Progress
Set theProgressBean.Type
of the progress toProgressBean.Type.COMPLETED
and display the given label and notification.- Specified by:
updateCompleted
in 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:Progress
Set theProgressBean.Type
of the progress toProgressBean.Type.COMPLETED
and display the given label and notification.- Specified by:
updateCompleted
in 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:Progress
Set theProgressBean.Type
of the progress toProgressBean.Type.COMPLETED
and display the given label and notification.- Specified by:
updateCompleted
in 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:Progress
Set theProgressBean.Type
of the progress toProgressBean.Type.COMPLETED
and display the given label and notification.- Specified by:
updateCompleted
in 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:Progress
Set theProgressBean.Type
of the progress toProgressBean.Type.FAILED
and display the default label (ProgressBean.DEFAULT_FAILED
) and notification (ProgressBean.DEFAULT_FAILED_NOTIFICATION
).- Specified by:
updateFailed
in interfaceProgress
-
updateFailed
Description copied from interface:Progress
Set theProgressBean.Type
of the progress toProgressBean.Type.FAILED
, display the given label and display the default notification (ProgressBean.DEFAULT_FAILED_NOTIFICATION
).- Specified by:
updateFailed
in interfaceProgress
- Parameters:
labelKey
- the key (text resources) of the label to display
-
updateFailed
Description copied from interface:Progress
Set theProgressBean.Type
of the progress toProgressBean.Type.FAILED
, display the given label and display the default notification (ProgressBean.DEFAULT_FAILED_NOTIFICATION
).- Specified by:
updateFailed
in 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:Progress
Set theProgressBean.Type
of the progress toProgressBean.Type.FAILED
and display the given label and notification.- Specified by:
updateFailed
in 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:Progress
Set theProgressBean.Type
of the progress toProgressBean.Type.FAILED
and display the given label and notification.- Specified by:
updateFailed
in 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:Progress
Set theProgressBean.Type
of the progress toProgressBean.Type.CANCELLED
and display the default label (ProgressBean.DEFAULT_CANCELLED
) and notification (ProgressBean.DEFAULT_CANCELLED_NOTIFICATION
).- Specified by:
updateCancelled
in interfaceProgress
-
updateCancelled
Description copied from interface:Progress
Set theProgressBean.Type
of the progress toProgressBean.Type.CANCELLED
, display the given label and display the default notification (ProgressBean.DEFAULT_CANCELLED_NOTIFICATION
).- Specified by:
updateCancelled
in interfaceProgress
- Parameters:
labelKey
- the key (text resources) of the label to display
-
updateCancelled
Description copied from interface:Progress
Set theProgressBean.Type
of the progress toProgressBean.Type.CANCELLED
, display the given label and display the default notification (ProgressBean.DEFAULT_CANCELLED_NOTIFICATION
).- Specified by:
updateCancelled
in 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:Progress
Set theProgressBean.Type
of the progress toProgressBean.Type.CANCELLED
and display the given label and notification.- Specified by:
updateCancelled
in 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:Progress
Set theProgressBean.Type
of the progress toProgressBean.Type.CANCELLED
and display the given label and notification.- Specified by:
updateCancelled
in 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:Progress
Get the id of the task. -
getType
Description copied from interface:Progress
Get theProgressBean.Type
of the progress.- Specified by:
getType
in interfaceProgress
- Returns:
- the
ProgressBean.Type
-
getLabelKey
Description copied from interface:Progress
Get the textresources key of the progress.- Specified by:
getLabelKey
in interfaceProgress
- Returns:
- the textressources key
-
getVars
Description copied from interface:Progress
Get the variables (parameters for the placeholders in the label).
-