package com.l7tech.external.assertions.gatewaymanagement.server;

import com.l7tech.gateway.api.ManagedObjectFactory;
import com.l7tech.gateway.api.PolicyAliasMO;
import com.l7tech.gateway.api.PolicyMO;
import com.l7tech.gateway.api.impl.ManagedObjectReference;
import com.l7tech.objectmodel.AliasHeader;
import com.l7tech.objectmodel.folder.Folder;
import com.l7tech.policy.Policy;
import com.l7tech.policy.PolicyAlias;
import com.l7tech.policy.PolicyHeader;
import com.l7tech.server.security.rbac.RbacServices;
import com.l7tech.server.security.rbac.SecurityFilter;
import com.l7tech.server.security.rbac.SecurityZoneManager;
import com.l7tech.server.service.AliasManager;
import org.springframework.transaction.PlatformTransactionManager;

@ResourceFactory.ResourceType(type = PolicyAliasMO.class)
public class PolicyAliasResourceFactory extends SecurityZoneableEntityManagerResourceFactory<PolicyAliasMO, PolicyAlias, AliasHeader<Policy>> {
   private static final String o;
   private FolderResourceFactory p;
   private AliasManager<PolicyAlias, Policy, PolicyHeader> q;
   private PolicyResourceFactory r;
   private static final String[] s;

   public PolicyAliasResourceFactory(
      RbacServices var1,
      SecurityFilter var2,
      PlatformTransactionManager var3,
      AliasManager<PolicyAlias, Policy, PolicyHeader> var4,
      PolicyResourceFactory var5,
      FolderResourceFactory var6,
      SecurityZoneManager var7
   ) {
      super(false, false, var1, var2, var3, var4, var7);
      this.q = var4;
      this.r = var5;
      this.p = var6;
   }

   public PolicyAliasMO asResource(PolicyAlias var1) {
      PolicyAliasMO var2 = ManagedObjectFactory.createPolicyAlias();
      var2.setId(var1.getId());
      var2.setVersion(var1.getVersion());
      var2.setFolderId(this.getFolderId(var1));
      var2.setPolicyReference(new ManagedObjectReference(PolicyMO.class, var1.getEntityGoid().toString()));
      this.doSecurityZoneAsResource(var2, var1);
      return var2;
   }

   public PolicyAlias fromResource(Object param1, boolean param2) throws ResourceFactory.InvalidResourceException {
      // $VF: Couldn't be decompiled
      // Please report this to the Vineflower issue tracker, at https://github.com/Vineflower/vineflower/issues with a copy of the class file (if you have the rights to distribute it!)
      // java.lang.RuntimeException: parsing failure!
      //   at org.jetbrains.java.decompiler.modules.decompiler.decompose.DomHelper.parseGraph(DomHelper.java:211)
      //   at org.jetbrains.java.decompiler.main.rels.MethodProcessor.codeToJava(MethodProcessor.java:174)
      //
      // Bytecode:
      // 000: aload 1
      // 001: instanceof com/l7tech/gateway/api/PolicyAliasMO
      // 004: ifne 01b
      // 007: new com/l7tech/external/assertions/gatewaymanagement/server/ResourceFactory$InvalidResourceException
      // 00a: dup
      // 00b: getstatic com/l7tech/external/assertions/gatewaymanagement/server/ResourceFactory$InvalidResourceException$ExceptionType.UNEXPECTED_TYPE Lcom/l7tech/external/assertions/gatewaymanagement/server/ResourceFactory$InvalidResourceException$ExceptionType;
      // 00e: getstatic com/l7tech/external/assertions/gatewaymanagement/server/PolicyAliasResourceFactory.s [Ljava/lang/String;
      // 011: bipush 4
      // 012: aaload
      // 013: invokespecial com/l7tech/external/assertions/gatewaymanagement/server/ResourceFactory$InvalidResourceException.<init> (Lcom/l7tech/external/assertions/gatewaymanagement/server/ResourceFactory$InvalidResourceException$ExceptionType;Ljava/lang/String;)V
      // 016: athrow
      // 017: invokestatic com/l7tech/external/assertions/gatewaymanagement/server/PolicyAliasResourceFactory.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 01a: athrow
      // 01b: aload 1
      // 01c: checkcast com/l7tech/gateway/api/PolicyAliasMO
      // 01f: astore 3
      // 020: aload 0
      // 021: getfield com/l7tech/external/assertions/gatewaymanagement/server/PolicyAliasResourceFactory.p Lcom/l7tech/external/assertions/gatewaymanagement/server/FolderResourceFactory;
      // 024: aload 3
      // 025: invokevirtual com/l7tech/gateway/api/PolicyAliasMO.getFolderId ()Ljava/lang/String;
      // 028: invokestatic com/l7tech/util/Option.optional (Ljava/lang/Object;)Lcom/l7tech/util/Option;
      // 02b: invokevirtual com/l7tech/external/assertions/gatewaymanagement/server/FolderResourceFactory.a (Lcom/l7tech/util/Option;)Lcom/l7tech/util/Option;
      // 02e: astore 4
      // 030: aload 4
      // 032: invokevirtual com/l7tech/util/Option.isSome ()Z
      // 035: ifne 080
      // 038: iload 2
      // 039: ifeq 058
      // 03c: goto 043
      // 03f: invokestatic com/l7tech/external/assertions/gatewaymanagement/server/PolicyAliasResourceFactory.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 042: athrow
      // 043: new com/l7tech/external/assertions/gatewaymanagement/server/ResourceFactory$InvalidResourceException
      // 046: dup
      // 047: getstatic com/l7tech/external/assertions/gatewaymanagement/server/ResourceFactory$InvalidResourceException$ExceptionType.INVALID_VALUES Lcom/l7tech/external/assertions/gatewaymanagement/server/ResourceFactory$InvalidResourceException$ExceptionType;
      // 04a: getstatic com/l7tech/external/assertions/gatewaymanagement/server/PolicyAliasResourceFactory.s [Ljava/lang/String;
      // 04d: bipush 7
      // 04f: aaload
      // 050: invokespecial com/l7tech/external/assertions/gatewaymanagement/server/ResourceFactory$InvalidResourceException.<init> (Lcom/l7tech/external/assertions/gatewaymanagement/server/ResourceFactory$InvalidResourceException$ExceptionType;Ljava/lang/String;)V
      // 053: athrow
      // 054: invokestatic com/l7tech/external/assertions/gatewaymanagement/server/PolicyAliasResourceFactory.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 057: athrow
      // 058: new com/l7tech/objectmodel/folder/Folder
      // 05b: dup
      // 05c: invokespecial com/l7tech/objectmodel/folder/Folder.<init> ()V
      // 05f: astore 5
      // 061: aload 5
      // 063: aload 3
      // 064: invokevirtual com/l7tech/gateway/api/PolicyAliasMO.getFolderId ()Ljava/lang/String;
      // 067: invokestatic com/l7tech/util/Option.optional (Ljava/lang/Object;)Lcom/l7tech/util/Option;
      // 06a: getstatic com/l7tech/objectmodel/folder/Folder.ROOT_FOLDER_ID Lcom/l7tech/objectmodel/Goid;
      // 06d: invokevirtual com/l7tech/objectmodel/Goid.toString ()Ljava/lang/String;
      // 070: invokevirtual com/l7tech/util/Option.orSome (Ljava/lang/Object;)Ljava/lang/Object;
      // 073: checkcast java/lang/String
      // 076: invokevirtual com/l7tech/objectmodel/folder/Folder.setId (Ljava/lang/String;)V
      // 079: aload 5
      // 07b: invokestatic com/l7tech/util/Option.some (Ljava/lang/Object;)Lcom/l7tech/util/Option;
      // 07e: astore 4
      // 080: aload 0
      // 081: getfield com/l7tech/external/assertions/gatewaymanagement/server/PolicyAliasResourceFactory.p Lcom/l7tech/external/assertions/gatewaymanagement/server/FolderResourceFactory;
      // 084: aconst_null
      // 085: aload 4
      // 087: invokevirtual com/l7tech/util/Option.some ()Ljava/lang/Object;
      // 08a: checkcast com/l7tech/objectmodel/folder/Folder
      // 08d: invokevirtual com/l7tech/external/assertions/gatewaymanagement/server/FolderResourceFactory.a (Lcom/l7tech/objectmodel/folder/Folder;Lcom/l7tech/objectmodel/folder/Folder;)Lcom/l7tech/objectmodel/folder/Folder;
      // 090: pop
      // 091: aload 3
      // 092: invokevirtual com/l7tech/gateway/api/PolicyAliasMO.getPolicyReference ()Lcom/l7tech/gateway/api/impl/ManagedObjectReference;
      // 095: invokevirtual com/l7tech/gateway/api/impl/ManagedObjectReference.getId ()Ljava/lang/String;
      // 098: astore 5
      // 09a: aload 0
      // 09b: getfield com/l7tech/external/assertions/gatewaymanagement/server/PolicyAliasResourceFactory.r Lcom/l7tech/external/assertions/gatewaymanagement/server/PolicyResourceFactory;
      // 09e: getstatic com/l7tech/external/assertions/gatewaymanagement/server/PolicyAliasResourceFactory.s [Ljava/lang/String;
      // 0a1: astore 8
      // 0a3: aload 8
      // 0a5: bipush 14
      // 0a7: aaload
      // 0a8: aload 5
      // 0aa: invokestatic java/util/Collections.singletonMap (Ljava/lang/Object;Ljava/lang/Object;)Ljava/util/Map;
      // 0ad: invokevirtual com/l7tech/external/assertions/gatewaymanagement/server/PolicyResourceFactory.selectEntity (Ljava/util/Map;)Lcom/l7tech/objectmodel/PersistentEntity;
      // 0b0: checkcast com/l7tech/policy/Policy
      // 0b3: astore 6
      // 0b5: aload 0
      // 0b6: aload 6
      // 0b8: invokevirtual com/l7tech/policy/Policy.getFolder ()Lcom/l7tech/objectmodel/folder/Folder;
      // 0bb: invokevirtual com/l7tech/external/assertions/gatewaymanagement/server/PolicyAliasResourceFactory.a (Lcom/l7tech/objectmodel/folder/Folder;)Z
      // 0be: ifeq 0de
      // 0c1: aload 0
      // 0c2: aload 4
      // 0c4: invokevirtual com/l7tech/util/Option.some ()Ljava/lang/Object;
      // 0c7: checkcast com/l7tech/objectmodel/folder/Folder
      // 0ca: invokevirtual com/l7tech/external/assertions/gatewaymanagement/server/PolicyAliasResourceFactory.a (Lcom/l7tech/objectmodel/folder/Folder;)Z
      // 0cd: ifeq 10d
      // 0d0: goto 0d7
      // 0d3: invokestatic com/l7tech/external/assertions/gatewaymanagement/server/PolicyAliasResourceFactory.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 0d6: athrow
      // 0d7: goto 0f9
      // 0da: invokestatic com/l7tech/external/assertions/gatewaymanagement/server/PolicyAliasResourceFactory.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 0dd: athrow
      // 0de: aload 6
      // 0e0: invokevirtual com/l7tech/policy/Policy.getFolder ()Lcom/l7tech/objectmodel/folder/Folder;
      // 0e3: aload 4
      // 0e5: invokevirtual com/l7tech/util/Option.some ()Ljava/lang/Object;
      // 0e8: invokevirtual com/l7tech/objectmodel/folder/Folder.equals (Ljava/lang/Object;)Z
      // 0eb: ifeq 10d
      // 0ee: iload 2
      // 0ef: ifeq 10d
      // 0f2: goto 0f9
      // 0f5: invokestatic com/l7tech/external/assertions/gatewaymanagement/server/PolicyAliasResourceFactory.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 0f8: athrow
      // 0f9: new com/l7tech/external/assertions/gatewaymanagement/server/ResourceFactory$InvalidResourceException
      // 0fc: dup
      // 0fd: getstatic com/l7tech/external/assertions/gatewaymanagement/server/ResourceFactory$InvalidResourceException$ExceptionType.INVALID_VALUES Lcom/l7tech/external/assertions/gatewaymanagement/server/ResourceFactory$InvalidResourceException$ExceptionType;
      // 100: getstatic com/l7tech/external/assertions/gatewaymanagement/server/PolicyAliasResourceFactory.s [Ljava/lang/String;
      // 103: bipush 3
      // 104: aaload
      // 105: invokespecial com/l7tech/external/assertions/gatewaymanagement/server/ResourceFactory$InvalidResourceException.<init> (Lcom/l7tech/external/assertions/gatewaymanagement/server/ResourceFactory$InvalidResourceException$ExceptionType;Ljava/lang/String;)V
      // 108: athrow
      // 109: invokestatic com/l7tech/external/assertions/gatewaymanagement/server/PolicyAliasResourceFactory.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 10c: athrow
      // 10d: goto 141
      // 110: astore 7
      // 112: iload 2
      // 113: ifeq 12b
      // 116: new com/l7tech/external/assertions/gatewaymanagement/server/ResourceFactory$InvalidResourceException
      // 119: dup
      // 11a: getstatic com/l7tech/external/assertions/gatewaymanagement/server/ResourceFactory$InvalidResourceException$ExceptionType.INVALID_VALUES Lcom/l7tech/external/assertions/gatewaymanagement/server/ResourceFactory$InvalidResourceException$ExceptionType;
      // 11d: getstatic com/l7tech/external/assertions/gatewaymanagement/server/PolicyAliasResourceFactory.s [Ljava/lang/String;
      // 120: bipush 9
      // 122: aaload
      // 123: invokespecial com/l7tech/external/assertions/gatewaymanagement/server/ResourceFactory$InvalidResourceException.<init> (Lcom/l7tech/external/assertions/gatewaymanagement/server/ResourceFactory$InvalidResourceException$ExceptionType;Ljava/lang/String;)V
      // 126: athrow
      // 127: invokestatic com/l7tech/external/assertions/gatewaymanagement/server/PolicyAliasResourceFactory.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 12a: athrow
      // 12b: new com/l7tech/policy/Policy
      // 12e: dup
      // 12f: getstatic com/l7tech/policy/PolicyType.INCLUDE_FRAGMENT Lcom/l7tech/policy/PolicyType;
      // 132: aconst_null
      // 133: aconst_null
      // 134: bipush 0
      // 135: invokespecial com/l7tech/policy/Policy.<init> (Lcom/l7tech/policy/PolicyType;Ljava/lang/String;Ljava/lang/String;Z)V
      // 138: astore 6
      // 13a: aload 6
      // 13c: aload 5
      // 13e: invokevirtual com/l7tech/policy/Policy.setId (Ljava/lang/String;)V
      // 141: aload 0
      // 142: getfield com/l7tech/external/assertions/gatewaymanagement/server/PolicyAliasResourceFactory.q Lcom/l7tech/server/service/AliasManager;
      // 145: aload 0
      // 146: aload 5
      // 148: invokevirtual com/l7tech/external/assertions/gatewaymanagement/server/PolicyAliasResourceFactory.toInternalId (Ljava/lang/String;)Lcom/l7tech/objectmodel/Goid;
      // 14b: aload 4
      // 14d: invokevirtual com/l7tech/util/Option.some ()Ljava/lang/Object;
      // 150: checkcast com/l7tech/objectmodel/folder/Folder
      // 153: invokevirtual com/l7tech/objectmodel/folder/Folder.getGoid ()Lcom/l7tech/objectmodel/Goid;
      // 156: invokeinterface com/l7tech/server/service/AliasManager.findAliasByEntityAndFolder (Lcom/l7tech/objectmodel/Goid;Lcom/l7tech/objectmodel/Goid;)Lcom/l7tech/objectmodel/Alias; 3
      // 15b: checkcast com/l7tech/policy/PolicyAlias
      // 15e: astore 7
      // 160: iload 2
      // 161: ifeq 1a2
      // 164: aload 7
      // 166: ifnull 1a2
      // 169: goto 170
      // 16c: invokestatic com/l7tech/external/assertions/gatewaymanagement/server/PolicyAliasResourceFactory.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 16f: athrow
      // 170: new com/l7tech/external/assertions/gatewaymanagement/server/ResourceFactory$InvalidResourceException
      // 173: dup
      // 174: getstatic com/l7tech/external/assertions/gatewaymanagement/server/ResourceFactory$InvalidResourceException$ExceptionType.INVALID_VALUES Lcom/l7tech/external/assertions/gatewaymanagement/server/ResourceFactory$InvalidResourceException$ExceptionType;
      // 177: aload 6
      // 179: invokevirtual com/l7tech/policy/Policy.getName ()Ljava/lang/String;
      // 17c: aload 4
      // 17e: invokevirtual com/l7tech/util/Option.some ()Ljava/lang/Object;
      // 181: checkcast com/l7tech/objectmodel/folder/Folder
      // 184: invokevirtual com/l7tech/objectmodel/folder/Folder.getName ()Ljava/lang/String;
      // 187: getstatic com/l7tech/external/assertions/gatewaymanagement/server/PolicyAliasResourceFactory.s [Ljava/lang/String;
      // 18a: bipush 11
      // 18c: aaload
      // 18d: dup_x2
      // 18e: pop
      // 18f: getstatic com/l7tech/external/assertions/gatewaymanagement/server/PolicyAliasResourceFactory.s [Ljava/lang/String;
      // 192: bipush 0
      // 193: aaload
      // 194: swap
      // 195: invokedynamic makeConcatWithConstants (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String; bsm=java/lang/invoke/StringConcatFactory.makeConcatWithConstants (Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/invoke/CallSite; args=[ "\u0001\u0001\u0001\u0001" ]
      // 19a: invokespecial com/l7tech/external/assertions/gatewaymanagement/server/ResourceFactory$InvalidResourceException.<init> (Lcom/l7tech/external/assertions/gatewaymanagement/server/ResourceFactory$InvalidResourceException$ExceptionType;Ljava/lang/String;)V
      // 19d: athrow
      // 19e: invokestatic com/l7tech/external/assertions/gatewaymanagement/server/PolicyAliasResourceFactory.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 1a1: athrow
      // 1a2: goto 1b7
      // 1a5: astore 7
      // 1a7: new com/l7tech/external/assertions/gatewaymanagement/server/ResourceFactory$InvalidResourceException
      // 1aa: dup
      // 1ab: getstatic com/l7tech/external/assertions/gatewaymanagement/server/ResourceFactory$InvalidResourceException$ExceptionType.INVALID_VALUES Lcom/l7tech/external/assertions/gatewaymanagement/server/ResourceFactory$InvalidResourceException$ExceptionType;
      // 1ae: getstatic com/l7tech/external/assertions/gatewaymanagement/server/PolicyAliasResourceFactory.s [Ljava/lang/String;
      // 1b1: bipush 5
      // 1b2: aaload
      // 1b3: invokespecial com/l7tech/external/assertions/gatewaymanagement/server/ResourceFactory$InvalidResourceException.<init> (Lcom/l7tech/external/assertions/gatewaymanagement/server/ResourceFactory$InvalidResourceException$ExceptionType;Ljava/lang/String;)V
      // 1b6: athrow
      // 1b7: new com/l7tech/policy/PolicyAlias
      // 1ba: dup
      // 1bb: aload 6
      // 1bd: aload 4
      // 1bf: invokevirtual com/l7tech/util/Option.some ()Ljava/lang/Object;
      // 1c2: checkcast com/l7tech/objectmodel/folder/Folder
      // 1c5: invokespecial com/l7tech/policy/PolicyAlias.<init> (Lcom/l7tech/policy/Policy;Lcom/l7tech/objectmodel/folder/Folder;)V
      // 1c8: astore 7
      // 1ca: aload 0
      // 1cb: aload 3
      // 1cc: aload 7
      // 1ce: iload 2
      // 1cf: invokevirtual com/l7tech/external/assertions/gatewaymanagement/server/PolicyAliasResourceFactory.doSecurityZoneFromResource (Lcom/l7tech/gateway/api/SecurityZoneableObject;Lcom/l7tech/objectmodel/PersistentEntity;Z)V
      // 1d2: aload 7
      // 1d4: areturn
      // try (104 -> 117): 117 java/lang/NullPointerException
      // try (98 -> 106): 107 java/lang/NullPointerException
      // try (86 -> 96): 96 java/lang/NullPointerException
      // try (81 -> 92): 93 java/lang/NullPointerException
      // try (26 -> 39): 39 java/lang/NullPointerException
      // try (23 -> 28): 29 java/lang/NullPointerException
      // try (0 -> 11): 11 java/lang/NullPointerException
      // try (69 -> 119): 120 java/lang/NullPointerException
      // try (69 -> 119): 120 com/l7tech/external/assertions/gatewaymanagement/server/ResourceFactory$ResourceNotFoundException
      // try (158 -> 184): 184 java/lang/NullPointerException
      // try (156 -> 160): 161 java/lang/NullPointerException
      // try (121 -> 131): 131 java/lang/NullPointerException
      // try (144 -> 186): 187 com/l7tech/objectmodel/FindException
      // try (144 -> 186): 187 com/l7tech/external/assertions/gatewaymanagement/server/ResourceFactory$InvalidResourceSelectors
   }

   protected void updateEntity(PolicyAlias param1, PolicyAlias param2) throws ResourceFactory.InvalidResourceException {
      // $VF: Couldn't be decompiled
      // Please report this to the Vineflower issue tracker, at https://github.com/Vineflower/vineflower/issues with a copy of the class file (if you have the rights to distribute it!)
      // java.lang.RuntimeException: parsing failure!
      //   at org.jetbrains.java.decompiler.modules.decompiler.decompose.DomHelper.parseGraph(DomHelper.java:211)
      //   at org.jetbrains.java.decompiler.main.rels.MethodProcessor.codeToJava(MethodProcessor.java:174)
      //
      // Bytecode:
      // 000: aload 1
      // 001: invokevirtual com/l7tech/policy/PolicyAlias.getEntityGoid ()Lcom/l7tech/objectmodel/Goid;
      // 004: aload 2
      // 005: invokevirtual com/l7tech/policy/PolicyAlias.getEntityGoid ()Lcom/l7tech/objectmodel/Goid;
      // 008: invokevirtual com/l7tech/objectmodel/Goid.equals (Ljava/lang/Object;)Z
      // 00b: ifne 022
      // 00e: new com/l7tech/external/assertions/gatewaymanagement/server/ResourceFactory$InvalidResourceException
      // 011: dup
      // 012: getstatic com/l7tech/external/assertions/gatewaymanagement/server/ResourceFactory$InvalidResourceException$ExceptionType.INVALID_VALUES Lcom/l7tech/external/assertions/gatewaymanagement/server/ResourceFactory$InvalidResourceException$ExceptionType;
      // 015: getstatic com/l7tech/external/assertions/gatewaymanagement/server/PolicyAliasResourceFactory.s [Ljava/lang/String;
      // 018: bipush 2
      // 019: aaload
      // 01a: invokespecial com/l7tech/external/assertions/gatewaymanagement/server/ResourceFactory$InvalidResourceException.<init> (Lcom/l7tech/external/assertions/gatewaymanagement/server/ResourceFactory$InvalidResourceException$ExceptionType;Ljava/lang/String;)V
      // 01d: athrow
      // 01e: invokestatic com/l7tech/external/assertions/gatewaymanagement/server/PolicyAliasResourceFactory.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 021: athrow
      // 022: aload 0
      // 023: getfield com/l7tech/external/assertions/gatewaymanagement/server/PolicyAliasResourceFactory.r Lcom/l7tech/external/assertions/gatewaymanagement/server/PolicyResourceFactory;
      // 026: getstatic com/l7tech/external/assertions/gatewaymanagement/server/PolicyAliasResourceFactory.s [Ljava/lang/String;
      // 029: astore 5
      // 02b: aload 5
      // 02d: bipush 16
      // 02f: aaload
      // 030: aload 2
      // 031: invokevirtual com/l7tech/policy/PolicyAlias.getEntityGoid ()Lcom/l7tech/objectmodel/Goid;
      // 034: invokevirtual com/l7tech/objectmodel/Goid.toString ()Ljava/lang/String;
      // 037: invokestatic java/util/Collections.singletonMap (Ljava/lang/Object;Ljava/lang/Object;)Ljava/util/Map;
      // 03a: invokevirtual com/l7tech/external/assertions/gatewaymanagement/server/PolicyResourceFactory.selectEntity (Ljava/util/Map;)Lcom/l7tech/objectmodel/PersistentEntity;
      // 03d: checkcast com/l7tech/policy/Policy
      // 040: astore 3
      // 041: aload 0
      // 042: aload 3
      // 043: invokevirtual com/l7tech/policy/Policy.getFolder ()Lcom/l7tech/objectmodel/folder/Folder;
      // 046: invokevirtual com/l7tech/external/assertions/gatewaymanagement/server/PolicyAliasResourceFactory.a (Lcom/l7tech/objectmodel/folder/Folder;)Z
      // 049: ifeq 065
      // 04c: aload 0
      // 04d: aload 2
      // 04e: invokevirtual com/l7tech/policy/PolicyAlias.getFolder ()Lcom/l7tech/objectmodel/folder/Folder;
      // 051: invokevirtual com/l7tech/external/assertions/gatewaymanagement/server/PolicyAliasResourceFactory.a (Lcom/l7tech/objectmodel/folder/Folder;)Z
      // 054: ifeq 088
      // 057: goto 05e
      // 05a: invokestatic com/l7tech/external/assertions/gatewaymanagement/server/PolicyAliasResourceFactory.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 05d: athrow
      // 05e: goto 073
      // 061: invokestatic com/l7tech/external/assertions/gatewaymanagement/server/PolicyAliasResourceFactory.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 064: athrow
      // 065: aload 3
      // 066: invokevirtual com/l7tech/policy/Policy.getFolder ()Lcom/l7tech/objectmodel/folder/Folder;
      // 069: aload 2
      // 06a: invokevirtual com/l7tech/policy/PolicyAlias.getFolder ()Lcom/l7tech/objectmodel/folder/Folder;
      // 06d: invokevirtual com/l7tech/objectmodel/folder/Folder.equals (Ljava/lang/Object;)Z
      // 070: ifeq 088
      // 073: new com/l7tech/external/assertions/gatewaymanagement/server/ResourceFactory$InvalidResourceException
      // 076: dup
      // 077: getstatic com/l7tech/external/assertions/gatewaymanagement/server/ResourceFactory$InvalidResourceException$ExceptionType.INVALID_VALUES Lcom/l7tech/external/assertions/gatewaymanagement/server/ResourceFactory$InvalidResourceException$ExceptionType;
      // 07a: getstatic com/l7tech/external/assertions/gatewaymanagement/server/PolicyAliasResourceFactory.s [Ljava/lang/String;
      // 07d: bipush 13
      // 07f: aaload
      // 080: invokespecial com/l7tech/external/assertions/gatewaymanagement/server/ResourceFactory$InvalidResourceException.<init> (Lcom/l7tech/external/assertions/gatewaymanagement/server/ResourceFactory$InvalidResourceException$ExceptionType;Ljava/lang/String;)V
      // 083: athrow
      // 084: invokestatic com/l7tech/external/assertions/gatewaymanagement/server/PolicyAliasResourceFactory.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 087: athrow
      // 088: goto 0a2
      // 08b: astore 4
      // 08d: new com/l7tech/external/assertions/gatewaymanagement/server/ResourceFactory$InvalidResourceException
      // 090: dup
      // 091: getstatic com/l7tech/external/assertions/gatewaymanagement/server/ResourceFactory$InvalidResourceException$ExceptionType.INVALID_VALUES Lcom/l7tech/external/assertions/gatewaymanagement/server/ResourceFactory$InvalidResourceException$ExceptionType;
      // 094: getstatic com/l7tech/external/assertions/gatewaymanagement/server/PolicyAliasResourceFactory.s [Ljava/lang/String;
      // 097: astore 5
      // 099: aload 5
      // 09b: bipush 10
      // 09d: aaload
      // 09e: invokespecial com/l7tech/external/assertions/gatewaymanagement/server/ResourceFactory$InvalidResourceException.<init> (Lcom/l7tech/external/assertions/gatewaymanagement/server/ResourceFactory$InvalidResourceException$ExceptionType;Ljava/lang/String;)V
      // 0a1: athrow
      // 0a2: aload 0
      // 0a3: getfield com/l7tech/external/assertions/gatewaymanagement/server/PolicyAliasResourceFactory.q Lcom/l7tech/server/service/AliasManager;
      // 0a6: aload 2
      // 0a7: invokevirtual com/l7tech/policy/PolicyAlias.getEntityGoid ()Lcom/l7tech/objectmodel/Goid;
      // 0aa: aload 2
      // 0ab: invokevirtual com/l7tech/policy/PolicyAlias.getFolder ()Lcom/l7tech/objectmodel/folder/Folder;
      // 0ae: invokevirtual com/l7tech/objectmodel/folder/Folder.getGoid ()Lcom/l7tech/objectmodel/Goid;
      // 0b1: invokeinterface com/l7tech/server/service/AliasManager.findAliasByEntityAndFolder (Lcom/l7tech/objectmodel/Goid;Lcom/l7tech/objectmodel/Goid;)Lcom/l7tech/objectmodel/Alias; 3
      // 0b6: checkcast com/l7tech/policy/PolicyAlias
      // 0b9: astore 4
      // 0bb: aload 4
      // 0bd: ifnull 0ed
      // 0c0: new com/l7tech/external/assertions/gatewaymanagement/server/ResourceFactory$InvalidResourceException
      // 0c3: dup
      // 0c4: getstatic com/l7tech/external/assertions/gatewaymanagement/server/ResourceFactory$InvalidResourceException$ExceptionType.INVALID_VALUES Lcom/l7tech/external/assertions/gatewaymanagement/server/ResourceFactory$InvalidResourceException$ExceptionType;
      // 0c7: aload 3
      // 0c8: invokevirtual com/l7tech/policy/Policy.getName ()Ljava/lang/String;
      // 0cb: aload 2
      // 0cc: invokevirtual com/l7tech/policy/PolicyAlias.getFolder ()Lcom/l7tech/objectmodel/folder/Folder;
      // 0cf: invokevirtual com/l7tech/objectmodel/folder/Folder.getName ()Ljava/lang/String;
      // 0d2: getstatic com/l7tech/external/assertions/gatewaymanagement/server/PolicyAliasResourceFactory.s [Ljava/lang/String;
      // 0d5: bipush 1
      // 0d6: aaload
      // 0d7: dup_x2
      // 0d8: pop
      // 0d9: getstatic com/l7tech/external/assertions/gatewaymanagement/server/PolicyAliasResourceFactory.s [Ljava/lang/String;
      // 0dc: bipush 6
      // 0de: aaload
      // 0df: swap
      // 0e0: invokedynamic makeConcatWithConstants (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String; bsm=java/lang/invoke/StringConcatFactory.makeConcatWithConstants (Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/invoke/CallSite; args=[ "\u0001\u0001\u0001\u0001" ]
      // 0e5: invokespecial com/l7tech/external/assertions/gatewaymanagement/server/ResourceFactory$InvalidResourceException.<init> (Lcom/l7tech/external/assertions/gatewaymanagement/server/ResourceFactory$InvalidResourceException$ExceptionType;Ljava/lang/String;)V
      // 0e8: athrow
      // 0e9: invokestatic com/l7tech/external/assertions/gatewaymanagement/server/PolicyAliasResourceFactory.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 0ec: athrow
      // 0ed: goto 103
      // 0f0: astore 4
      // 0f2: new com/l7tech/external/assertions/gatewaymanagement/server/ResourceFactory$InvalidResourceException
      // 0f5: dup
      // 0f6: getstatic com/l7tech/external/assertions/gatewaymanagement/server/ResourceFactory$InvalidResourceException$ExceptionType.INVALID_VALUES Lcom/l7tech/external/assertions/gatewaymanagement/server/ResourceFactory$InvalidResourceException$ExceptionType;
      // 0f9: getstatic com/l7tech/external/assertions/gatewaymanagement/server/PolicyAliasResourceFactory.s [Ljava/lang/String;
      // 0fc: bipush 12
      // 0fe: aaload
      // 0ff: invokespecial com/l7tech/external/assertions/gatewaymanagement/server/ResourceFactory$InvalidResourceException.<init> (Lcom/l7tech/external/assertions/gatewaymanagement/server/ResourceFactory$InvalidResourceException$ExceptionType;Ljava/lang/String;)V
      // 102: athrow
      // 103: aload 2
      // 104: invokevirtual com/l7tech/policy/PolicyAlias.getFolder ()Lcom/l7tech/objectmodel/folder/Folder;
      // 107: ifnull 124
      // 10a: aload 1
      // 10b: aload 0
      // 10c: getfield com/l7tech/external/assertions/gatewaymanagement/server/PolicyAliasResourceFactory.p Lcom/l7tech/external/assertions/gatewaymanagement/server/FolderResourceFactory;
      // 10f: aload 1
      // 110: invokevirtual com/l7tech/policy/PolicyAlias.getFolder ()Lcom/l7tech/objectmodel/folder/Folder;
      // 113: aload 2
      // 114: invokevirtual com/l7tech/policy/PolicyAlias.getFolder ()Lcom/l7tech/objectmodel/folder/Folder;
      // 117: invokevirtual com/l7tech/external/assertions/gatewaymanagement/server/FolderResourceFactory.a (Lcom/l7tech/objectmodel/folder/Folder;Lcom/l7tech/objectmodel/folder/Folder;)Lcom/l7tech/objectmodel/folder/Folder;
      // 11a: invokevirtual com/l7tech/policy/PolicyAlias.setFolder (Lcom/l7tech/objectmodel/folder/Folder;)V
      // 11d: goto 124
      // 120: invokestatic com/l7tech/external/assertions/gatewaymanagement/server/PolicyAliasResourceFactory.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 123: athrow
      // 124: aload 1
      // 125: aload 2
      // 126: invokevirtual com/l7tech/policy/PolicyAlias.getSecurityZone ()Lcom/l7tech/objectmodel/SecurityZone;
      // 129: invokevirtual com/l7tech/policy/PolicyAlias.setSecurityZone (Lcom/l7tech/objectmodel/SecurityZone;)V
      // 12c: return
      // try (46 -> 60): 60 com/l7tech/external/assertions/gatewaymanagement/server/ResourceFactory$ResourceNotFoundException
      // try (35 -> 44): 44 com/l7tech/external/assertions/gatewaymanagement/server/ResourceFactory$ResourceNotFoundException
      // try (30 -> 40): 41 com/l7tech/external/assertions/gatewaymanagement/server/ResourceFactory$ResourceNotFoundException
      // try (0 -> 14): 14 com/l7tech/external/assertions/gatewaymanagement/server/ResourceFactory$ResourceNotFoundException
      // try (16 -> 62): 63 com/l7tech/external/assertions/gatewaymanagement/server/ResourceFactory$ResourceNotFoundException
      // try (84 -> 106): 106 com/l7tech/external/assertions/gatewaymanagement/server/ResourceFactory$ResourceNotFoundException
      // try (74 -> 108): 109 com/l7tech/objectmodel/FindException
      // try (118 -> 130): 131 com/l7tech/external/assertions/gatewaymanagement/server/ResourceFactory$ResourceNotFoundException
   }

   private boolean a(Folder param1) {
      // $VF: Couldn't be decompiled
      // Please report this to the Vineflower issue tracker, at https://github.com/Vineflower/vineflower/issues with a copy of the class file (if you have the rights to distribute it!)
      // java.lang.RuntimeException: parsing failure!
      //   at org.jetbrains.java.decompiler.modules.decompiler.decompose.DomHelper.parseGraph(DomHelper.java:211)
      //   at org.jetbrains.java.decompiler.main.rels.MethodProcessor.codeToJava(MethodProcessor.java:174)
      //
      // Bytecode:
      // 00: aload 1
      // 01: ifnull 32
      // 04: aload 1
      // 05: invokevirtual com/l7tech/objectmodel/folder/Folder.getId ()Ljava/lang/String;
      // 08: getstatic com/l7tech/external/assertions/gatewaymanagement/server/PolicyAliasResourceFactory.s [Ljava/lang/String;
      // 0b: bipush 8
      // 0d: aaload
      // 0e: invokevirtual java/lang/String.equals (Ljava/lang/Object;)Z
      // 11: ifne 32
      // 14: goto 1b
      // 17: invokestatic com/l7tech/external/assertions/gatewaymanagement/server/PolicyAliasResourceFactory.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 1a: athrow
      // 1b: aload 1
      // 1c: invokevirtual com/l7tech/objectmodel/folder/Folder.getId ()Ljava/lang/String;
      // 1f: getstatic com/l7tech/objectmodel/folder/Folder.ROOT_FOLDER_ID Lcom/l7tech/objectmodel/Goid;
      // 22: invokevirtual com/l7tech/objectmodel/Goid.toString ()Ljava/lang/String;
      // 25: invokevirtual java/lang/String.equals (Ljava/lang/Object;)Z
      // 28: ifeq 3a
      // 2b: goto 32
      // 2e: invokestatic com/l7tech/external/assertions/gatewaymanagement/server/PolicyAliasResourceFactory.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 31: athrow
      // 32: bipush 1
      // 33: goto 3b
      // 36: invokestatic com/l7tech/external/assertions/gatewaymanagement/server/PolicyAliasResourceFactory.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 39: athrow
      // 3a: bipush 0
      // 3b: ireturn
      // try (0 -> 9): 10 java/lang/NullPointerException
      // try (2 -> 18): 19 java/lang/NullPointerException
      // try (12 -> 23): 23 java/lang/NullPointerException
   }

   private static Exception a(Exception var0) {
      return var0;
   }

   static {
      String[] var5 = new String[17];
      int var3 = 0;
      String var2 = "q3<N4j8(r5D8x(\"r9Rqm3=65Nq\u0010\u0010>9]\"+37r S=b?(r=$<1^=n|%=p_9j267pL>g52+pN4m9#7>_4+37r1Rqn$8!$U?l|!=<U2r|0>9]\"9\u00123>R>\u007f|2 5]%n|0>9]\"+5?r$T4+/0?5\u001c7d057\"\u001c0x|> 9[8e==r S=b?(\u00154* Y2\u007f95r S=b?(r1P8j/\"\u0004<1^=n|%=p_9n?:r6S#+9);#H8e;q3<U0x\u001aq3<N4j8(r5D8x(\"r9Rqm3=65Nq\u0010\u0017=<X4y|?=$\u001c7d)?6\u0005|g`\fc\u00188<&]=b8q\"?P8h%q 5Z4y9?15\u00188<&]=b8q\"?P8h%q 5Z4y9?15\u0010\u0010>9]\"+37r S=b?(r\"\u0004<1^=n|%=p_9n?:r6S#+9);#H8e;q3<U0x9\u00123>R>\u007f|2 5]%n|0>9]\"+5?r$T4+/0?5\u001c7d057\"\u001c0x|> 9[8e==r S=b?(\u000286";
      int var4 = "q3<N4j8(r5D8x(\"r9Rqm3=65Nq\u0010\u0010>9]\"+37r S=b?(r=$<1^=n|%=p_9j267pL>g52+pN4m9#7>_4+37r1Rqn$8!$U?l|!=<U2r|0>9]\"9\u00123>R>\u007f|2 5]%n|0>9]\"+5?r$T4+/0?5\u001c7d057\"\u001c0x|> 9[8e==r S=b?(\u00154* Y2\u007f95r S=b?(r1P8j/\"\u0004<1^=n|%=p_9n?:r6S#+9);#H8e;q3<U0x\u001aq3<N4j8(r5D8x(\"r9Rqm3=65Nq\u0010\u0017=<X4y|?=$\u001c7d)?6\u0005|g`\fc\u00188<&]=b8q\"?P8h%q 5Z4y9?15\u00188<&]=b8q\"?P8h%q 5Z4y9?15\u0010\u0010>9]\"+37r S=b?(r\"\u0004<1^=n|%=p_9n?:r6S#+9);#H8e;q3<U0x9\u00123>R>\u007f|2 5]%n|0>9]\"+5?r$T4+/0?5\u001c7d057\"\u001c0x|> 9[8e==r S=b?(\u000286"
         .length();
      char var1 = 26;
      int var7 = -1;

      label24:
      while (true) {
         byte var10000 = 65;
         String var10001 = var2.substring(++var7, var7 + var1);
         byte var10002 = -1;

         while (true) {
            String var8 = d(var10000, a(var10001));
            switch (var10002) {
               case 0:
                  var5[var3++] = var8;
                  if ((var7 += var1) >= var4) {
                     s = var5;
                     o = s[15];
                     return;
                  }

                  var1 = var2.charAt(var7);
                  break;
               default:
                  var5[var3++] = var8;
                  if ((var7 += var1) < var4) {
                     var1 = var2.charAt(var7);
                     continue label24;
                  }

                  var2 = "wlk\u0007h\u00023=";
                  var4 = "wlk\u0007h\u00023=".length();
                  var1 = 5;
                  var7 = -1;
            }

            var10000 = 74;
            var10001 = var2.substring(++var7, var7 + var1);
            var10002 = 0;
         }
      }
   }

   private static char[] a(String var0) {
      char[] var10000 = var0.toCharArray();
      if (var10000.length < 2) {
         var10000[0] = (char)(var10000[0] ^ 29);
      }

      return var10000;
   }

   private static String d(int var0, char[] var1) {
      int var10003 = var1.length;
      int var10002 = var0;
      char[] var10001 = var1;
      int var10000 = var10003;

      for (int var2 = 0; var10000 > var2; var2++) {
         var10001[var2] = (char)(var10001[var2] ^ var10002 ^ switch (var2 % 7) {
            case 0 -> 16;
            case 1 -> 19;
            case 2 -> 17;
            case 3 -> 125;
            case 4 -> 16;
            case 5 -> 74;
            default -> 29;
         });
      }

      return new String(var10001).intern();
   }
}
