use of org.bimserver.models.store.ActionState in project BIMserver by opensourceBIM.
the class LongAction method changeActionState.
protected void changeActionState(ActionState actiontState, String title, int progress) {
ActionState oldState = this.actionState;
if (actiontState == ActionState.FINISHED) {
stop = new GregorianCalendar();
}
int oldProgress = this.progress.get();
String oldTitle = this.title;
this.title = title;
this.progress.set(progress);
this.actionState = actiontState;
if (oldState != actiontState || progress != oldProgress || !oldTitle.equals(title)) {
if (title != null && oldTitle != null && !title.equals(oldTitle)) {
stage++;
}
bimServer.getNotificationsManager().notify(new ProgressNotification(bimServer, progressTopic, getState()));
}
}
Aggregations