public class QualificationUpdateReminderAutoMail extends SimpleQualificationOperation {

  private static final ILogger LOGGER =
      AppServiceFacade.getLoggerService().getLogger(QualificationUpdateReminderAutoMail.class);

  public QualificationUpdateReminderAutoMail(UserId userId, TldServiceFacade tld) {
    this(OperationConfiguration.create(), userId, tld);
  }

  public QualificationUpdateReminderAutoMail(
      OperationConfiguration conf, UserId userId, TldServiceFacade tld) {
    super(conf.setType(OperationType.UpdateReminderAutoMail), userId, tld);
  }

  @Override
  protected OperationStatus executeSimpleImpl() throws Exception {
    LOGGER.debug("QualificationUpdateReminderAutoMail");
    Qualification qualification = this.getQualification();
    AppServiceFacade.getQualificationService()
        .createQualificationCheckAutoReachability(
            qualification, true, this.userIdCaller, this.tldCaller);

    return OperationStatus.Succed;
  }
}
public class CustomerStatusDescriber implements IDescriber<CustomerStatus> {

  private static final ILogger LOGGER =
      AppServiceFacade.getLoggerService().getLogger(CustomerStatusDescriber.class);

  @Override
  public String getDescription(
      CustomerStatus status, Locale locale, UserId userId, TldServiceFacade tld) {

    if (status == CustomerStatus.ACTIVE) return "Actif";
    if (status == CustomerStatus.ARCHIVED) return "Archivé";
    if (status == CustomerStatus.INACTIVE) return "Inactif";
    if (status instanceof Blocked) return "Bloqué";

    CustomerStatusDescriber.LOGGER.warn("No description defined for customer status:" + status);
    return status.getDictionaryKey();
  }
}