public CommandRunnerProgressHelper(AdminCommand command, String name, Job job, ProgressStatus clientProgressStatus) { if (command instanceof GenericCrudCommand) { GenericCrudCommand gcc = (GenericCrudCommand) command; Class decorator = gcc.getDecoratorClass(); if (decorator != null) { progressAnnotation = (Progress) decorator.getAnnotation(Progress.class); } } else if (command instanceof ProgressProvider) { progressAnnotation = ((ProgressProvider) command).getProgress(); } else { progressAnnotation = command.getClass().getAnnotation(Progress.class); } this.commandProgress = (CommandProgressImpl) job.getCommandProgress(); //Possible from checkpoint if (progressAnnotation != null) { if (commandProgress == null) { if (progressAnnotation.name() == null || progressAnnotation.name().isEmpty()) { commandProgress = new CommandProgressImpl(name, createIdForCommandProgress(job)); } else { commandProgress = new CommandProgressImpl(progressAnnotation.name(), createIdForCommandProgress(job)); } } connectWithClientProgressStatus(job, clientProgressStatus); job.setCommandProgress(commandProgress); } }