/*
 * Decompiled with CFR 0.152.
 * 
 * Could not load the following classes:
 *  com.l7tech.policy.bundle.MigrationDryRunResult
 *  org.jetbrains.annotations.NotNull
 */
package com.l7tech.server.event.bundle;

import com.l7tech.policy.bundle.MigrationDryRunResult;
import com.l7tech.server.event.bundle.PolicyBundleInstallerEvent;
import com.l7tech.server.policy.bundle.PolicyBundleInstallerContext;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.jetbrains.annotations.NotNull;

/*
 * Exception performing whole class analysis ignored.
 */
public class DryRunInstallPolicyBundleEvent
extends PolicyBundleInstallerEvent {
    private List<String> serviceConflict;
    private List<String> policyConflict;
    private List<String> certificateConflict;
    private List<String> jdbcConnsThatDontExist;
    private List<String> missingAssertions;
    private List<String> encapsulatedAssertionConflict;
    private List<MigrationDryRunResult> migrationErrorMappings;
    private Map<String, String> componentIdToBundleXmlMap;
    static final long serialVersionUID = 3062812341140538650L;
    private static final String[] c;

    public DryRunInstallPolicyBundleEvent(@NotNull Object object, @NotNull PolicyBundleInstallerContext policyBundleInstallerContext) {
        if (object == null) {
            DryRunInstallPolicyBundleEvent.$$$reportNull$$$0(0);
        }
        if (policyBundleInstallerContext == null) {
            DryRunInstallPolicyBundleEvent.$$$reportNull$$$0(1);
        }
        super(object, policyBundleInstallerContext);
        this.serviceConflict = new ArrayList<String>();
        this.policyConflict = new ArrayList<String>();
        this.certificateConflict = new ArrayList<String>();
        this.jdbcConnsThatDontExist = new ArrayList<String>();
        this.missingAssertions = new ArrayList<String>();
        this.encapsulatedAssertionConflict = new ArrayList<String>();
        this.migrationErrorMappings = new ArrayList<MigrationDryRunResult>();
        this.componentIdToBundleXmlMap = new HashMap<String, String>();
    }

    public void addServiceConflict(String string) {
        this.serviceConflict.add(string);
    }

    public void addPolicyNameWithConflict(String string) {
        this.policyConflict.add(string);
    }

    public void addCertificateNameWithConflict(String string) {
        this.certificateConflict.add(string);
    }

    public void addMissingJdbcConnection(String string) {
        this.jdbcConnsThatDontExist.add(string);
    }

    public void addMissingAssertion(String string) {
        this.missingAssertions.add(string);
    }

    public void addEncapsulatedAssertionConflict(String string) {
        this.encapsulatedAssertionConflict.add(string);
    }

    public void addMigrationErrorMapping(MigrationDryRunResult migrationDryRunResult) {
        this.migrationErrorMappings.add(migrationDryRunResult);
    }

    public void addComponentIdToBundleXml(String string, String string2) {
        this.componentIdToBundleXmlMap.put(string, string2);
    }

    public List<String> getServiceConflict() {
        return Collections.unmodifiableList(this.serviceConflict);
    }

    public List<String> getPolicyConflict() {
        return Collections.unmodifiableList(this.policyConflict);
    }

    public List<String> getCertificateConflict() {
        return Collections.unmodifiableList(this.certificateConflict);
    }

    public List<String> getJdbcConnsThatDontExist() {
        return Collections.unmodifiableList(this.jdbcConnsThatDontExist);
    }

    public List<String> getMissingAssertions() {
        return Collections.unmodifiableList(this.missingAssertions);
    }

    public List<String> getEncapsulatedAssertionConflict() {
        return Collections.unmodifiableList(this.encapsulatedAssertionConflict);
    }

    public List<MigrationDryRunResult> getMigrationErrorMappings() {
        return Collections.unmodifiableList(this.migrationErrorMappings);
    }

    public Map<String, String> getComponentIdToBundleXmlMap() {
        return this.componentIdToBundleXmlMap;
    }

    /*
     * Exception decompiling
     */
    private static /* synthetic */ void $$$reportNull$$$0(int var0) {
        /*
         * This method has failed to decompile.  When submitting a bug report, please provide this stack trace, and (if you hold appropriate legal rights) the relevant class file.
         * 
         * org.benf.cfr.reader.util.ConfusedCFRException: Tried to end blocks [0[TRYBLOCK]], but top level block is 1[SWITCH]
         *     at org.benf.cfr.reader.bytecode.analysis.opgraph.Op04StructuredStatement.processEndingBlocks(Op04StructuredStatement.java:435)
         *     at org.benf.cfr.reader.bytecode.analysis.opgraph.Op04StructuredStatement.buildNestedBlocks(Op04StructuredStatement.java:484)
         *     at org.benf.cfr.reader.bytecode.analysis.opgraph.Op03SimpleStatement.createInitialStructuredBlock(Op03SimpleStatement.java:736)
         *     at org.benf.cfr.reader.bytecode.CodeAnalyser.getAnalysisInner(CodeAnalyser.java:850)
         *     at org.benf.cfr.reader.bytecode.CodeAnalyser.getAnalysisOrWrapFail(CodeAnalyser.java:278)
         *     at org.benf.cfr.reader.bytecode.CodeAnalyser.getAnalysis(CodeAnalyser.java:201)
         *     at org.benf.cfr.reader.entities.attributes.AttributeCode.analyse(AttributeCode.java:94)
         *     at org.benf.cfr.reader.entities.Method.analyse(Method.java:531)
         *     at org.benf.cfr.reader.entities.ClassFile.analyseMid(ClassFile.java:1050)
         *     at org.benf.cfr.reader.entities.ClassFile.analyseTop(ClassFile.java:942)
         *     at org.benf.cfr.reader.Driver.doJarVersionTypes(Driver.java:257)
         *     at org.benf.cfr.reader.Driver.doJar(Driver.java:139)
         *     at org.benf.cfr.reader.CfrDriverImpl.analyse(CfrDriverImpl.java:76)
         *     at org.benf.cfr.reader.Main.main(Main.java:54)
         */
        throw new IllegalStateException("Decompilation failed");
    }

    private static IllegalArgumentException a(IllegalArgumentException illegalArgumentException) {
        return illegalArgumentException;
    }

    /*
     * Unable to fully structure code
     */
    static {
        block10: {
            block9: {
                var5 = new String[5];
                var3_1 = 0;
                var2_2 = "q\"zJz3Tw.\u007fJeaRd(eJsrE|98\u0007cjD~(8!d}rg#^\u000bepA~!G\nzmCk\u000fb\u000brhEW;r\u000bb\u0006.$y\fb:\u0007q\"y\u0011s|T";
                var4_3 = "q\"zJz3Tw.\u007fJeaRd(eJsrE|98\u0007cjD~(8!d}rg#^\u000bepA~!G\nzmCk\u000fb\u000brhEW;r\u000bb\u0006.$y\fb:\u0007q\"y\u0011s|T".length();
                var1_4 = 61;
                var0_5 = -1;
lbl7:
                // 2 sources

                while (true) {
                    v0 = 63;
                    v1 = ++var0_5;
                    v2 = var2_2.substring(v1, v1 + var1_4);
                    v3 = -1;
                    break block9;
                    break;
                }
lbl13:
                // 1 sources

                while (true) {
                    var5[var3_1++] = DryRunInstallPolicyBundleEvent.c(v0, DryRunInstallPolicyBundleEvent.c(v2));
                    if ((var0_5 += var1_4) < var4_3) {
                        var1_4 = var2_2.charAt(var0_5);
                        ** continue;
                    }
                    var2_2 = "f%e\u0010rf>T8w\u0017|fIajv\rc#g[%d,doK5:q\u0010pnBa/bB6&T2j\u007f\u00041&T;ocB|vTaj~\re#Epj~\u0017}o";
                    var4_3 = "f%e\u0010rf>T8w\u0017|fIajv\rc#g[%d,doK5:q\u0010pnBa/bB6&T2j\u007f\u00041&T;ocB|vTaj~\re#Epj~\u0017}o".length();
                    var1_4 = 6;
                    var0_5 = -1;
lbl22:
                    // 2 sources

                    while (true) {
                        v0 = 56;
                        v4 = ++var0_5;
                        v2 = var2_2.substring(v4, v4 + var1_4);
                        v3 = 0;
                        break block9;
                        break;
                    }
                    break;
                }
lbl28:
                // 1 sources

                while (true) {
                    var5[var3_1++] = DryRunInstallPolicyBundleEvent.c(v0, DryRunInstallPolicyBundleEvent.c(v2));
                    if ((var0_5 += var1_4) < var4_3) {
                        var1_4 = var2_2.charAt(var0_5);
                        ** continue;
                    }
                    break block10;
                    break;
                }
            }
            switch (v3) {
                default: {
                    ** continue;
                }
                ** case 0:
lbl39:
                // 1 sources

                ** continue;
            }
        }
        DryRunInstallPolicyBundleEvent.c = var5;
    }

    private static char[] c(String string) {
        char[] cArray = string.toCharArray();
        if (cArray.length < 2) {
            cArray = cArray;
            cArray[0] = (char)(cArray[0] ^ 0x1F);
        }
        return cArray;
    }

    /*
     * Handled impossible loop by duplicating code
     * Enabled aggressive block sorting
     */
    private static String c(int n2, char[] cArray) {
        char[] cArray2;
        block11: {
            int n3;
            int n4;
            int n5;
            block10: {
                n5 = n2;
                cArray2 = cArray;
                n4 = cArray.length;
                n3 = 0;
                if (!true) break block10;
                n4 = n4;
                if (n4 <= n3) break block11;
            }
            do {
                n5 = n5;
                cArray2 = cArray2;
                int n6 = n3;
                cArray2[n6] = (char)(cArray2[n6] ^ (n5 ^ (switch (n3 % 7) {
                    case 0 -> 45;
                    case 1 -> 114;
                    case 2 -> 40;
                    case 3 -> 90;
                    case 4 -> 41;
                    case 5 -> 59;
                    default -> 31;
                })));
                ++n3;
                n4 = n4;
            } while (n4 > n3);
        }
        return new String(cArray2).intern();
    }
}

