what-the-bank/sources/com/kofax/kmc/kut/utilities/appstats/AppStatsState.java

302 lines
15 KiB
Java
Raw Permalink Normal View History

2024-07-27 18:17:47 +07:00
package com.kofax.kmc.kut.utilities.appstats;
import com.kofax.kmc.kut.utilities.error.ErrorInfo;
import java.util.EnumSet;
import java.util.HashMap;
import java.util.Map;
import java.util.Set;
/* loaded from: classes3.dex */
public enum AppStatsState {
APP_STATS_UNINITIALIZED(a.STATE_UNINITIALIZED),
APP_STATS_INITIALIZING(a.STATE_INITIALIZING),
APP_STATS_INITIALIZED(a.STATE_INITIALIZED),
APP_STATS_PURGING(a.STATE_PURGING),
APP_STATS_RECORDING(a.STATE_RECORDING),
APP_STATS_WRITING(a.STATE_WRITING),
APP_STATS_RECORDING_WRITING(a.STATE_RECORDING_WRITING),
APP_STATS_EXPORTING(a.STATE_EXPORTING),
APP_STATS_BEGINNING_SESSION(a.STATE_BEGINNING_SESSION),
APP_STATS_LOGGING_SESSION(a.STATE_LOGGING_SESSION),
APP_STATS_ENDING_SESSION(a.STATE_ENDING_SESSION),
APP_STATS_UPGRADING(a.STATE_UPGRADING);
a qf;
private Set<b> qg;
private final String qe = "task parameter '%s' does not represent a supported action for AppStatsState %s";
private Map<b, Map<a, a>> qh = new HashMap();
private Map<b, Map<a, a>> qi = new HashMap();
private Map<a, ErrorInfo> qj = new HashMap();
AppStatsState(a aVar) {
this.qf = aVar;
switch (AnonymousClass1.ql[aVar.ordinal()]) {
case 1:
this.qg = EnumSet.of(b.TASK_NONE);
break;
case 2:
this.qg = EnumSet.of(b.TASK_INIT_APPSTATS);
this.qh.put(b.TASK_INIT_APPSTATS, new HashMap());
this.qi.put(b.TASK_INIT_APPSTATS, new HashMap());
this.qh.get(b.TASK_INIT_APPSTATS).put(a.STATE_UNINITIALIZED, a.STATE_INITIALIZED);
Map<a, a> map = this.qh.get(b.TASK_INIT_APPSTATS);
a aVar2 = a.STATE_INITIALIZED;
map.put(aVar2, aVar2);
Map<a, a> map2 = this.qi.get(b.TASK_INIT_APPSTATS);
a aVar3 = a.STATE_UNINITIALIZED;
map2.put(aVar3, aVar3);
this.qi.get(b.TASK_INIT_APPSTATS).put(a.STATE_INITIALIZED, a.STATE_UNINITIALIZED);
this.qj.put(a.STATE_RECORDING, ErrorInfo.KMC_UT_STATS_INIT_NOT_ALLOWED);
this.qj.put(a.STATE_EXPORTING, ErrorInfo.KMC_UT_STATS_INIT_NOT_ALLOWED);
this.qj.put(a.STATE_WRITING, ErrorInfo.KMC_UT_STATS_INIT_NOT_ALLOWED);
this.qj.put(a.STATE_RECORDING_WRITING, ErrorInfo.KMC_UT_STATS_INIT_NOT_ALLOWED);
break;
case 3:
this.qg = EnumSet.of(b.TASK_STOP_RECORD);
this.qh.put(b.TASK_STOP_RECORD, new HashMap());
this.qh.get(b.TASK_STOP_RECORD).put(a.STATE_RECORDING, a.STATE_INITIALIZED);
break;
case 4:
this.qg = EnumSet.of(b.TASK_PURGE);
this.qh.put(b.TASK_PURGE, new HashMap());
this.qi.put(b.TASK_PURGE, new HashMap());
this.qh.get(b.TASK_PURGE).put(a.STATE_INITIALIZED, a.STATE_UNINITIALIZED);
this.qi.get(b.TASK_PURGE).put(a.STATE_INITIALIZED, a.STATE_UNINITIALIZED);
this.qj.put(a.STATE_RECORDING, ErrorInfo.KMC_UT_STATS_PURGE_NOT_ALLOWED);
this.qj.put(a.STATE_EXPORTING, ErrorInfo.KMC_UT_STATS_PURGE_NOT_ALLOWED);
this.qj.put(a.STATE_WRITING, ErrorInfo.KMC_UT_STATS_PURGE_NOT_ALLOWED);
this.qj.put(a.STATE_RECORDING_WRITING, ErrorInfo.KMC_UT_STATS_PURGE_NOT_ALLOWED);
this.qj.put(a.STATE_UNINITIALIZED, ErrorInfo.KMC_UT_STATS_UNINITIALIZED);
break;
case 5:
this.qg = EnumSet.of(b.TASK_START_RECORD);
this.qh.put(b.TASK_START_RECORD, new HashMap());
this.qh.get(b.TASK_START_RECORD).put(a.STATE_INITIALIZED, a.STATE_RECORDING);
this.qj.put(a.STATE_RECORDING, ErrorInfo.KMC_UT_STATS_ALREADY_RECORDING);
this.qj.put(a.STATE_RECORDING_WRITING, ErrorInfo.KMC_UT_STATS_ALREADY_RECORDING);
this.qj.put(a.STATE_EXPORTING, ErrorInfo.KMC_UT_STATS_RECORD_NOT_ALLOWED);
this.qj.put(a.STATE_UNINITIALIZED, ErrorInfo.KMC_UT_STATS_UNINITIALIZED);
break;
case 6:
this.qg = EnumSet.of(b.TASK_WRITE, b.TASK_STOP_RECORD);
this.qh.put(b.TASK_WRITE, new HashMap());
this.qh.put(b.TASK_STOP_RECORD, new HashMap());
this.qi.put(b.TASK_WRITE, new HashMap());
this.qi.put(b.TASK_STOP_RECORD, new HashMap());
Map<a, a> map3 = this.qh.get(b.TASK_WRITE);
a aVar4 = a.STATE_INITIALIZED;
map3.put(aVar4, aVar4);
this.qh.get(b.TASK_STOP_RECORD).put(a.STATE_RECORDING_WRITING, a.STATE_WRITING);
this.qh.get(b.TASK_WRITE).put(a.STATE_WRITING, a.STATE_INITIALIZED);
Map<a, a> map4 = this.qi.get(b.TASK_WRITE);
a aVar5 = a.STATE_INITIALIZED;
map4.put(aVar5, aVar5);
Map<a, a> map5 = this.qi.get(b.TASK_WRITE);
a aVar6 = a.STATE_RECORDING;
map5.put(aVar6, aVar6);
this.qj.put(a.STATE_WRITING, ErrorInfo.KMC_UT_STATS_ALREADY_WRITING);
this.qj.put(a.STATE_RECORDING_WRITING, ErrorInfo.KMC_UT_STATS_ALREADY_WRITING);
this.qj.put(a.STATE_EXPORTING, ErrorInfo.KMC_UT_STATS_WRITING_NOT_ALLOWED);
this.qj.put(a.STATE_UNINITIALIZED, ErrorInfo.KMC_UT_STATS_UNINITIALIZED);
break;
case 7:
this.qg = EnumSet.of(b.TASK_START_RECORD, b.TASK_WRITE);
this.qh.put(b.TASK_START_RECORD, new HashMap());
this.qh.put(b.TASK_WRITE, new HashMap());
this.qh.get(b.TASK_START_RECORD).put(a.STATE_WRITING, a.STATE_RECORDING_WRITING);
this.qh.get(b.TASK_WRITE).put(a.STATE_RECORDING, a.STATE_RECORDING_WRITING);
this.qh.get(b.TASK_WRITE).put(a.STATE_WRITING, a.STATE_RECORDING);
this.qh.get(b.TASK_WRITE).put(a.STATE_RECORDING_WRITING, a.STATE_RECORDING);
break;
case 8:
this.qg = EnumSet.of(b.TASK_EXPORT);
this.qh.put(b.TASK_EXPORT, new HashMap());
this.qi.put(b.TASK_EXPORT, new HashMap());
Map<a, a> map6 = this.qh.get(b.TASK_EXPORT);
a aVar7 = a.STATE_INITIALIZED;
map6.put(aVar7, aVar7);
this.qi.get(b.TASK_EXPORT).put(a.STATE_RECORDING, a.STATE_INITIALIZED);
this.qj.put(a.STATE_EXPORTING, ErrorInfo.KMC_UT_STATS_ALREADY_EXPORTING);
this.qj.put(a.STATE_RECORDING, ErrorInfo.KMC_UT_STATS_EXPORT_NOT_ALLOWED);
this.qj.put(a.STATE_RECORDING_WRITING, ErrorInfo.KMC_UT_STATS_EXPORT_NOT_ALLOWED);
this.qj.put(a.STATE_WRITING, ErrorInfo.KMC_UT_STATS_EXPORT_NOT_ALLOWED);
this.qj.put(a.STATE_UNINITIALIZED, ErrorInfo.KMC_UT_STATS_UNINITIALIZED);
break;
case 9:
this.qg = EnumSet.of(b.TASK_UPGRADE);
this.qh.put(b.TASK_UPGRADE, new HashMap());
this.qi.put(b.TASK_UPGRADE, new HashMap());
Map<a, a> map7 = this.qh.get(b.TASK_UPGRADE);
a aVar8 = a.STATE_UNINITIALIZED;
map7.put(aVar8, aVar8);
Map<a, a> map8 = this.qi.get(b.TASK_UPGRADE);
a aVar9 = a.STATE_UNINITIALIZED;
map8.put(aVar9, aVar9);
this.qj.put(a.STATE_INITIALIZED, ErrorInfo.KMC_UT_STATS_DATASTORE_UPGRADE_WRONG_STATE);
this.qj.put(a.STATE_WRITING, ErrorInfo.KMC_UT_STATS_DATASTORE_UPGRADE_WRONG_STATE);
this.qj.put(a.STATE_RECORDING, ErrorInfo.KMC_UT_STATS_DATASTORE_UPGRADE_WRONG_STATE);
this.qj.put(a.STATE_RECORDING_WRITING, ErrorInfo.KMC_UT_STATS_DATASTORE_UPGRADE_WRONG_STATE);
this.qj.put(a.STATE_EXPORTING, ErrorInfo.KMC_UT_STATS_DATASTORE_UPGRADE_WRONG_STATE);
break;
case 10:
this.qg = EnumSet.of(b.TASK_BEGIN_SESSION);
this.qh.put(b.TASK_BEGIN_SESSION, new HashMap());
this.qi.put(b.TASK_BEGIN_SESSION, new HashMap());
Map<a, a> map9 = this.qh.get(b.TASK_BEGIN_SESSION);
a aVar10 = a.STATE_RECORDING;
map9.put(aVar10, aVar10);
Map<a, a> map10 = this.qh.get(b.TASK_BEGIN_SESSION);
a aVar11 = a.STATE_RECORDING_WRITING;
map10.put(aVar11, aVar11);
Map<a, a> map11 = this.qi.get(b.TASK_BEGIN_SESSION);
a aVar12 = a.STATE_RECORDING;
map11.put(aVar12, aVar12);
Map<a, a> map12 = this.qi.get(b.TASK_BEGIN_SESSION);
a aVar13 = a.STATE_RECORDING_WRITING;
map12.put(aVar13, aVar13);
this.qj.put(a.STATE_UNINITIALIZED, ErrorInfo.KMC_UT_STATS_UNINITIALIZED);
this.qj.put(a.STATE_WRITING, ErrorInfo.KMC_UT_STATS_BEGIN_SESSION_NOT_ALLOWED);
this.qj.put(a.STATE_INITIALIZED, ErrorInfo.KMC_UT_STATS_BEGIN_SESSION_NOT_ALLOWED);
this.qj.put(a.STATE_EXPORTING, ErrorInfo.KMC_UT_STATS_BEGIN_SESSION_NOT_ALLOWED);
break;
case 11:
this.qg = EnumSet.of(b.TASK_LOG_SESSION);
this.qh.put(b.TASK_LOG_SESSION, new HashMap());
this.qi.put(b.TASK_LOG_SESSION, new HashMap());
Map<a, a> map13 = this.qh.get(b.TASK_LOG_SESSION);
a aVar14 = a.STATE_RECORDING;
map13.put(aVar14, aVar14);
Map<a, a> map14 = this.qh.get(b.TASK_LOG_SESSION);
a aVar15 = a.STATE_RECORDING_WRITING;
map14.put(aVar15, aVar15);
Map<a, a> map15 = this.qi.get(b.TASK_LOG_SESSION);
a aVar16 = a.STATE_RECORDING;
map15.put(aVar16, aVar16);
Map<a, a> map16 = this.qi.get(b.TASK_LOG_SESSION);
a aVar17 = a.STATE_RECORDING_WRITING;
map16.put(aVar17, aVar17);
this.qj.put(a.STATE_UNINITIALIZED, ErrorInfo.KMC_UT_STATS_UNINITIALIZED);
this.qj.put(a.STATE_WRITING, ErrorInfo.KMC_UT_STATS_LOG_SESSION_EVENT_NOT_ALLOWED);
this.qj.put(a.STATE_INITIALIZED, ErrorInfo.KMC_UT_STATS_LOG_SESSION_EVENT_NOT_ALLOWED);
this.qj.put(a.STATE_EXPORTING, ErrorInfo.KMC_UT_STATS_LOG_SESSION_EVENT_NOT_ALLOWED);
break;
case 12:
this.qg = EnumSet.of(b.TASK_END_SESSION);
this.qh.put(b.TASK_END_SESSION, new HashMap());
this.qi.put(b.TASK_END_SESSION, new HashMap());
Map<a, a> map17 = this.qh.get(b.TASK_END_SESSION);
a aVar18 = a.STATE_RECORDING;
map17.put(aVar18, aVar18);
Map<a, a> map18 = this.qh.get(b.TASK_END_SESSION);
a aVar19 = a.STATE_RECORDING_WRITING;
map18.put(aVar19, aVar19);
Map<a, a> map19 = this.qi.get(b.TASK_END_SESSION);
a aVar20 = a.STATE_RECORDING;
map19.put(aVar20, aVar20);
Map<a, a> map20 = this.qi.get(b.TASK_END_SESSION);
a aVar21 = a.STATE_RECORDING_WRITING;
map20.put(aVar21, aVar21);
this.qj.put(a.STATE_UNINITIALIZED, ErrorInfo.KMC_UT_STATS_UNINITIALIZED);
this.qj.put(a.STATE_WRITING, ErrorInfo.KMC_UT_STATS_END_SESSION_NOT_ALLOWED);
this.qj.put(a.STATE_INITIALIZED, ErrorInfo.KMC_UT_STATS_END_SESSION_NOT_ALLOWED);
this.qj.put(a.STATE_EXPORTING, ErrorInfo.KMC_UT_STATS_END_SESSION_NOT_ALLOWED);
break;
}
this.qj.put(a.STATE_ANY, ErrorInfo.KMC_UT_STATS_INVALID_STATE_TRANSITION);
}
/* renamed from: com.kofax.kmc.kut.utilities.appstats.AppStatsState$1, reason: invalid class name */
/* loaded from: classes3.dex */
static /* synthetic */ class AnonymousClass1 {
static final int[] ql;
static {
int[] iArr = new int[a.values().length];
ql = iArr;
try {
iArr[a.STATE_UNINITIALIZED.ordinal()] = 1;
} catch (NoSuchFieldError unused) {
}
try {
ql[a.STATE_INITIALIZING.ordinal()] = 2;
} catch (NoSuchFieldError unused2) {
}
try {
ql[a.STATE_INITIALIZED.ordinal()] = 3;
} catch (NoSuchFieldError unused3) {
}
try {
ql[a.STATE_PURGING.ordinal()] = 4;
} catch (NoSuchFieldError unused4) {
}
try {
ql[a.STATE_RECORDING.ordinal()] = 5;
} catch (NoSuchFieldError unused5) {
}
try {
ql[a.STATE_WRITING.ordinal()] = 6;
} catch (NoSuchFieldError unused6) {
}
try {
ql[a.STATE_RECORDING_WRITING.ordinal()] = 7;
} catch (NoSuchFieldError unused7) {
}
try {
ql[a.STATE_EXPORTING.ordinal()] = 8;
} catch (NoSuchFieldError unused8) {
}
try {
ql[a.STATE_UPGRADING.ordinal()] = 9;
} catch (NoSuchFieldError unused9) {
}
try {
ql[a.STATE_BEGINNING_SESSION.ordinal()] = 10;
} catch (NoSuchFieldError unused10) {
}
try {
ql[a.STATE_LOGGING_SESSION.ordinal()] = 11;
} catch (NoSuchFieldError unused11) {
}
try {
ql[a.STATE_ENDING_SESSION.ordinal()] = 12;
} catch (NoSuchFieldError unused12) {
}
}
}
/* JADX INFO: Access modifiers changed from: package-private */
public final ErrorInfo a(b bVar, a aVar) {
boolean contains = this.qg.contains(bVar);
boolean containsKey = this.qh.get(bVar).containsKey(aVar);
ErrorInfo errorInfo = ErrorInfo.KMC_SUCCESS;
if (!contains || !containsKey) {
errorInfo = this.qj.get(aVar);
}
return errorInfo == null ? this.qj.get(a.STATE_ANY) : errorInfo;
}
/* JADX INFO: Access modifiers changed from: package-private */
public final AppStatsState b(b bVar, a aVar) {
if (!this.qg.contains(bVar)) {
throw new IllegalArgumentException(String.format("task parameter '%s' does not represent a supported action for AppStatsState %s", bVar, this));
}
AppStatsState aV = this.qh.get(bVar).get(aVar).aV();
if (aV != null) {
return aV;
}
throw new TypeNotPresentException(aVar.name(), new Throwable("Failed to map AppStatsState nextState from StateID=".concat(String.valueOf(aVar))));
}
/* JADX INFO: Access modifiers changed from: package-private */
public final AppStatsState c(b bVar, a aVar) {
if (!this.qg.contains(bVar)) {
throw new IllegalArgumentException("task parameter '%s' does not represent a supported action for AppStatsState %s");
}
AppStatsState aV = this.qi.get(bVar).get(aVar).aV();
if (aV != null) {
return aV;
}
throw new TypeNotPresentException(aVar.name(), new Throwable("Failed to map AppStatsState errorState from StateID=".concat(String.valueOf(aVar))));
}
}