package _VisualDVM.TestingSystem.SAPFOR.ServerSapfor;
import Common.Visual.Fonts.VisualiserFonts;
import Common.Visual.StatusEnum;
public enum ServerSapforState implements StatusEnum {
    Queued,
    DVMRepositorySynchronization,
    SAPFORRepositorySynchronization,
    Compilation,
    Done,
    DoneWithErrors;
    @Override
    public VisualiserFonts getFont() {
        switch (this) {
            case Queued:
                return VisualiserFonts.UnknownState;
            case Done:
                return VisualiserFonts.GoodState;
            case DoneWithErrors:
                return VisualiserFonts.BadState;
            case Compilation:
            case DVMRepositorySynchronization:
            case SAPFORRepositorySynchronization:
                return VisualiserFonts.ProgressState;
            default:
                return VisualiserFonts.UnknownState;
        }
    }
    @Override
    public String getDescription() {
        switch (this) {
            case Queued:
                return "в очереди";
            case DVMRepositorySynchronization:
                return "синхронизация репозитория DVM";
            case SAPFORRepositorySynchronization:
                return "синхронизация репозитория SAPFOR";
            case Compilation:
                return "сборка";
            case Done:
                return "успешно";
            case DoneWithErrors:
                return "с ошибками";
            default:
                return StatusEnum.super.getDescription();
        }
    }
    public boolean isActive() {
        switch (this) {
            case Done:
            case DoneWithErrors:
                return false;
            default:
                return true;
        }
    }
}
