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

import com.l7tech.gateway.api.ManagedObjectFactory;
import com.l7tech.gateway.api.ServiceAliasMO;
import com.l7tech.gateway.api.ServiceMO;
import com.l7tech.gateway.api.impl.ManagedObjectReference;
import com.l7tech.gateway.common.service.PublishedService;
import com.l7tech.gateway.common.service.PublishedServiceAlias;
import com.l7tech.gateway.common.service.ServiceHeader;
import com.l7tech.objectmodel.AliasHeader;
import com.l7tech.objectmodel.folder.Folder;
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 = ServiceAliasMO.class)
public class ServiceAliasResourceFactory
   extends SecurityZoneableEntityManagerResourceFactory<ServiceAliasMO, PublishedServiceAlias, AliasHeader<PublishedService>> {
   private static final String o;
   private FolderResourceFactory p;
   private AliasManager<PublishedServiceAlias, PublishedService, ServiceHeader> q;
   private ServiceResourceFactory r;
   private static final String[] s;

   public ServiceAliasResourceFactory(
      RbacServices var1,
      SecurityFilter var2,
      PlatformTransactionManager var3,
      AliasManager<PublishedServiceAlias, PublishedService, ServiceHeader> var4,
      ServiceResourceFactory var5,
      FolderResourceFactory var6,
      SecurityZoneManager var7
   ) {
      super(false, false, var1, var2, var3, var4, var7);
      this.q = var4;
      this.r = var5;
      this.p = var6;
   }

   public ServiceAliasMO asResource(PublishedServiceAlias var1) {
      ServiceAliasMO var2 = ManagedObjectFactory.createServiceAlias();
      var2.setId(var1.getId());
      var2.setVersion(var1.getVersion());
      var2.setFolderId(this.getFolderId(var1));
      var2.setServiceReference(new ManagedObjectReference(ServiceMO.class, var1.getEntityGoid().toString()));
      this.doSecurityZoneAsResource(var2, var1);
      return var2;
   }

   public PublishedServiceAlias 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/ServiceAliasMO
      // 004: ifne 01c
      // 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/ServiceAliasResourceFactory.s [Ljava/lang/String;
      // 011: bipush 11
      // 013: aaload
      // 014: invokespecial com/l7tech/external/assertions/gatewaymanagement/server/ResourceFactory$InvalidResourceException.<init> (Lcom/l7tech/external/assertions/gatewaymanagement/server/ResourceFactory$InvalidResourceException$ExceptionType;Ljava/lang/String;)V
      // 017: athrow
      // 018: invokestatic com/l7tech/external/assertions/gatewaymanagement/server/ServiceAliasResourceFactory.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 01b: athrow
      // 01c: aload 1
      // 01d: checkcast com/l7tech/gateway/api/ServiceAliasMO
      // 020: astore 3
      // 021: aload 0
      // 022: getfield com/l7tech/external/assertions/gatewaymanagement/server/ServiceAliasResourceFactory.p Lcom/l7tech/external/assertions/gatewaymanagement/server/FolderResourceFactory;
      // 025: aload 3
      // 026: invokevirtual com/l7tech/gateway/api/ServiceAliasMO.getFolderId ()Ljava/lang/String;
      // 029: invokestatic com/l7tech/util/Option.optional (Ljava/lang/Object;)Lcom/l7tech/util/Option;
      // 02c: invokevirtual com/l7tech/external/assertions/gatewaymanagement/server/FolderResourceFactory.a (Lcom/l7tech/util/Option;)Lcom/l7tech/util/Option;
      // 02f: astore 4
      // 031: aload 4
      // 033: invokevirtual com/l7tech/util/Option.isSome ()Z
      // 036: ifne 081
      // 039: iload 2
      // 03a: ifeq 059
      // 03d: goto 044
      // 040: invokestatic com/l7tech/external/assertions/gatewaymanagement/server/ServiceAliasResourceFactory.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 043: athrow
      // 044: new com/l7tech/external/assertions/gatewaymanagement/server/ResourceFactory$InvalidResourceException
      // 047: dup
      // 048: getstatic com/l7tech/external/assertions/gatewaymanagement/server/ResourceFactory$InvalidResourceException$ExceptionType.INVALID_VALUES Lcom/l7tech/external/assertions/gatewaymanagement/server/ResourceFactory$InvalidResourceException$ExceptionType;
      // 04b: getstatic com/l7tech/external/assertions/gatewaymanagement/server/ServiceAliasResourceFactory.s [Ljava/lang/String;
      // 04e: bipush 10
      // 050: aaload
      // 051: invokespecial com/l7tech/external/assertions/gatewaymanagement/server/ResourceFactory$InvalidResourceException.<init> (Lcom/l7tech/external/assertions/gatewaymanagement/server/ResourceFactory$InvalidResourceException$ExceptionType;Ljava/lang/String;)V
      // 054: athrow
      // 055: invokestatic com/l7tech/external/assertions/gatewaymanagement/server/ServiceAliasResourceFactory.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 058: athrow
      // 059: new com/l7tech/objectmodel/folder/Folder
      // 05c: dup
      // 05d: invokespecial com/l7tech/objectmodel/folder/Folder.<init> ()V
      // 060: astore 5
      // 062: aload 5
      // 064: aload 3
      // 065: invokevirtual com/l7tech/gateway/api/ServiceAliasMO.getFolderId ()Ljava/lang/String;
      // 068: invokestatic com/l7tech/util/Option.optional (Ljava/lang/Object;)Lcom/l7tech/util/Option;
      // 06b: getstatic com/l7tech/objectmodel/folder/Folder.ROOT_FOLDER_ID Lcom/l7tech/objectmodel/Goid;
      // 06e: invokevirtual com/l7tech/objectmodel/Goid.toString ()Ljava/lang/String;
      // 071: invokevirtual com/l7tech/util/Option.orSome (Ljava/lang/Object;)Ljava/lang/Object;
      // 074: checkcast java/lang/String
      // 077: invokevirtual com/l7tech/objectmodel/folder/Folder.setId (Ljava/lang/String;)V
      // 07a: aload 5
      // 07c: invokestatic com/l7tech/util/Option.some (Ljava/lang/Object;)Lcom/l7tech/util/Option;
      // 07f: astore 4
      // 081: aload 0
      // 082: getfield com/l7tech/external/assertions/gatewaymanagement/server/ServiceAliasResourceFactory.p Lcom/l7tech/external/assertions/gatewaymanagement/server/FolderResourceFactory;
      // 085: aconst_null
      // 086: aload 4
      // 088: invokevirtual com/l7tech/util/Option.some ()Ljava/lang/Object;
      // 08b: checkcast com/l7tech/objectmodel/folder/Folder
      // 08e: invokevirtual com/l7tech/external/assertions/gatewaymanagement/server/FolderResourceFactory.a (Lcom/l7tech/objectmodel/folder/Folder;Lcom/l7tech/objectmodel/folder/Folder;)Lcom/l7tech/objectmodel/folder/Folder;
      // 091: pop
      // 092: aload 3
      // 093: invokevirtual com/l7tech/gateway/api/ServiceAliasMO.getServiceReference ()Lcom/l7tech/gateway/api/impl/ManagedObjectReference;
      // 096: invokevirtual com/l7tech/gateway/api/impl/ManagedObjectReference.getId ()Ljava/lang/String;
      // 099: astore 6
      // 09b: aload 0
      // 09c: getfield com/l7tech/external/assertions/gatewaymanagement/server/ServiceAliasResourceFactory.r Lcom/l7tech/external/assertions/gatewaymanagement/server/ServiceResourceFactory;
      // 09f: getstatic com/l7tech/external/assertions/gatewaymanagement/server/ServiceAliasResourceFactory.s [Ljava/lang/String;
      // 0a2: astore 8
      // 0a4: aload 8
      // 0a6: bipush 0
      // 0a7: aaload
      // 0a8: aload 6
      // 0aa: invokestatic java/util/Collections.singletonMap (Ljava/lang/Object;Ljava/lang/Object;)Ljava/util/Map;
      // 0ad: invokevirtual com/l7tech/external/assertions/gatewaymanagement/server/ServiceResourceFactory.selectEntity (Ljava/util/Map;)Lcom/l7tech/objectmodel/PersistentEntity;
      // 0b0: checkcast com/l7tech/gateway/common/service/PublishedService
      // 0b3: astore 5
      // 0b5: aload 0
      // 0b6: aload 5
      // 0b8: invokevirtual com/l7tech/gateway/common/service/PublishedService.getFolder ()Lcom/l7tech/objectmodel/folder/Folder;
      // 0bb: invokevirtual com/l7tech/external/assertions/gatewaymanagement/server/ServiceAliasResourceFactory.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/ServiceAliasResourceFactory.a (Lcom/l7tech/objectmodel/folder/Folder;)Z
      // 0cd: ifeq 10e
      // 0d0: goto 0d7
      // 0d3: invokestatic com/l7tech/external/assertions/gatewaymanagement/server/ServiceAliasResourceFactory.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 0d6: athrow
      // 0d7: goto 0f9
      // 0da: invokestatic com/l7tech/external/assertions/gatewaymanagement/server/ServiceAliasResourceFactory.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 0dd: athrow
      // 0de: aload 5
      // 0e0: invokevirtual com/l7tech/gateway/common/service/PublishedService.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 10e
      // 0ee: iload 2
      // 0ef: ifeq 10e
      // 0f2: goto 0f9
      // 0f5: invokestatic com/l7tech/external/assertions/gatewaymanagement/server/ServiceAliasResourceFactory.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/ServiceAliasResourceFactory.s [Ljava/lang/String;
      // 103: bipush 6
      // 105: aaload
      // 106: invokespecial com/l7tech/external/assertions/gatewaymanagement/server/ResourceFactory$InvalidResourceException.<init> (Lcom/l7tech/external/assertions/gatewaymanagement/server/ResourceFactory$InvalidResourceException$ExceptionType;Ljava/lang/String;)V
      // 109: athrow
      // 10a: invokestatic com/l7tech/external/assertions/gatewaymanagement/server/ServiceAliasResourceFactory.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 10d: athrow
      // 10e: goto 13c
      // 111: astore 7
      // 113: iload 2
      // 114: ifeq 12c
      // 117: new com/l7tech/external/assertions/gatewaymanagement/server/ResourceFactory$InvalidResourceException
      // 11a: dup
      // 11b: getstatic com/l7tech/external/assertions/gatewaymanagement/server/ResourceFactory$InvalidResourceException$ExceptionType.INVALID_VALUES Lcom/l7tech/external/assertions/gatewaymanagement/server/ResourceFactory$InvalidResourceException$ExceptionType;
      // 11e: getstatic com/l7tech/external/assertions/gatewaymanagement/server/ServiceAliasResourceFactory.s [Ljava/lang/String;
      // 121: bipush 16
      // 123: aaload
      // 124: invokespecial com/l7tech/external/assertions/gatewaymanagement/server/ResourceFactory$InvalidResourceException.<init> (Lcom/l7tech/external/assertions/gatewaymanagement/server/ResourceFactory$InvalidResourceException$ExceptionType;Ljava/lang/String;)V
      // 127: athrow
      // 128: invokestatic com/l7tech/external/assertions/gatewaymanagement/server/ServiceAliasResourceFactory.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 12b: athrow
      // 12c: new com/l7tech/gateway/common/service/PublishedService
      // 12f: dup
      // 130: invokespecial com/l7tech/gateway/common/service/PublishedService.<init> ()V
      // 133: astore 5
      // 135: aload 5
      // 137: aload 6
      // 139: invokevirtual com/l7tech/gateway/common/service/PublishedService.setId (Ljava/lang/String;)V
      // 13c: aload 0
      // 13d: getfield com/l7tech/external/assertions/gatewaymanagement/server/ServiceAliasResourceFactory.q Lcom/l7tech/server/service/AliasManager;
      // 140: aload 0
      // 141: aload 6
      // 143: invokevirtual com/l7tech/external/assertions/gatewaymanagement/server/ServiceAliasResourceFactory.toInternalId (Ljava/lang/String;)Lcom/l7tech/objectmodel/Goid;
      // 146: aload 4
      // 148: invokevirtual com/l7tech/util/Option.some ()Ljava/lang/Object;
      // 14b: checkcast com/l7tech/objectmodel/folder/Folder
      // 14e: invokevirtual com/l7tech/objectmodel/folder/Folder.getGoid ()Lcom/l7tech/objectmodel/Goid;
      // 151: invokeinterface com/l7tech/server/service/AliasManager.findAliasByEntityAndFolder (Lcom/l7tech/objectmodel/Goid;Lcom/l7tech/objectmodel/Goid;)Lcom/l7tech/objectmodel/Alias; 3
      // 156: checkcast com/l7tech/gateway/common/service/PublishedServiceAlias
      // 159: astore 7
      // 15b: aload 7
      // 15d: ifnull 19d
      // 160: iload 2
      // 161: ifeq 19d
      // 164: goto 16b
      // 167: invokestatic com/l7tech/external/assertions/gatewaymanagement/server/ServiceAliasResourceFactory.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 16a: athrow
      // 16b: new com/l7tech/external/assertions/gatewaymanagement/server/ResourceFactory$InvalidResourceException
      // 16e: dup
      // 16f: getstatic com/l7tech/external/assertions/gatewaymanagement/server/ResourceFactory$InvalidResourceException$ExceptionType.INVALID_VALUES Lcom/l7tech/external/assertions/gatewaymanagement/server/ResourceFactory$InvalidResourceException$ExceptionType;
      // 172: aload 5
      // 174: invokevirtual com/l7tech/gateway/common/service/PublishedService.getName ()Ljava/lang/String;
      // 177: aload 4
      // 179: invokevirtual com/l7tech/util/Option.some ()Ljava/lang/Object;
      // 17c: checkcast com/l7tech/objectmodel/folder/Folder
      // 17f: invokevirtual com/l7tech/objectmodel/folder/Folder.getName ()Ljava/lang/String;
      // 182: getstatic com/l7tech/external/assertions/gatewaymanagement/server/ServiceAliasResourceFactory.s [Ljava/lang/String;
      // 185: bipush 4
      // 186: aaload
      // 187: dup_x2
      // 188: pop
      // 189: getstatic com/l7tech/external/assertions/gatewaymanagement/server/ServiceAliasResourceFactory.s [Ljava/lang/String;
      // 18c: bipush 9
      // 18e: aaload
      // 18f: swap
      // 190: 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" ]
      // 195: invokespecial com/l7tech/external/assertions/gatewaymanagement/server/ResourceFactory$InvalidResourceException.<init> (Lcom/l7tech/external/assertions/gatewaymanagement/server/ResourceFactory$InvalidResourceException$ExceptionType;Ljava/lang/String;)V
      // 198: athrow
      // 199: invokestatic com/l7tech/external/assertions/gatewaymanagement/server/ServiceAliasResourceFactory.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 19c: athrow
      // 19d: goto 1b3
      // 1a0: astore 7
      // 1a2: new com/l7tech/external/assertions/gatewaymanagement/server/ResourceFactory$InvalidResourceException
      // 1a5: dup
      // 1a6: getstatic com/l7tech/external/assertions/gatewaymanagement/server/ResourceFactory$InvalidResourceException$ExceptionType.INVALID_VALUES Lcom/l7tech/external/assertions/gatewaymanagement/server/ResourceFactory$InvalidResourceException$ExceptionType;
      // 1a9: getstatic com/l7tech/external/assertions/gatewaymanagement/server/ServiceAliasResourceFactory.s [Ljava/lang/String;
      // 1ac: bipush 7
      // 1ae: aaload
      // 1af: invokespecial com/l7tech/external/assertions/gatewaymanagement/server/ResourceFactory$InvalidResourceException.<init> (Lcom/l7tech/external/assertions/gatewaymanagement/server/ResourceFactory$InvalidResourceException$ExceptionType;Ljava/lang/String;)V
      // 1b2: athrow
      // 1b3: new com/l7tech/gateway/common/service/PublishedServiceAlias
      // 1b6: dup
      // 1b7: aload 5
      // 1b9: aload 4
      // 1bb: invokevirtual com/l7tech/util/Option.some ()Ljava/lang/Object;
      // 1be: checkcast com/l7tech/objectmodel/folder/Folder
      // 1c1: invokespecial com/l7tech/gateway/common/service/PublishedServiceAlias.<init> (Lcom/l7tech/gateway/common/service/PublishedService;Lcom/l7tech/objectmodel/folder/Folder;)V
      // 1c4: astore 7
      // 1c6: aload 0
      // 1c7: aload 3
      // 1c8: aload 7
      // 1ca: iload 2
      // 1cb: invokevirtual com/l7tech/external/assertions/gatewaymanagement/server/ServiceAliasResourceFactory.doSecurityZoneFromResource (Lcom/l7tech/gateway/api/SecurityZoneableObject;Lcom/l7tech/objectmodel/PersistentEntity;Z)V
      // 1ce: aload 7
      // 1d0: 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 (154 -> 180): 180 java/lang/NullPointerException
      // try (152 -> 156): 157 java/lang/NullPointerException
      // try (121 -> 131): 131 java/lang/NullPointerException
      // try (140 -> 182): 183 com/l7tech/objectmodel/FindException
      // try (140 -> 182): 183 com/l7tech/external/assertions/gatewaymanagement/server/ResourceFactory$InvalidResourceSelectors
   }

   protected void updateEntity(PublishedServiceAlias param1, PublishedServiceAlias 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/gateway/common/service/PublishedServiceAlias.getEntityGoid ()Lcom/l7tech/objectmodel/Goid;
      // 004: aload 2
      // 005: invokevirtual com/l7tech/gateway/common/service/PublishedServiceAlias.getEntityGoid ()Lcom/l7tech/objectmodel/Goid;
      // 008: invokevirtual com/l7tech/objectmodel/Goid.equals (Ljava/lang/Object;)Z
      // 00b: ifne 023
      // 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/ServiceAliasResourceFactory.s [Ljava/lang/String;
      // 018: bipush 13
      // 01a: aaload
      // 01b: invokespecial com/l7tech/external/assertions/gatewaymanagement/server/ResourceFactory$InvalidResourceException.<init> (Lcom/l7tech/external/assertions/gatewaymanagement/server/ResourceFactory$InvalidResourceException$ExceptionType;Ljava/lang/String;)V
      // 01e: athrow
      // 01f: invokestatic com/l7tech/external/assertions/gatewaymanagement/server/ServiceAliasResourceFactory.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 022: athrow
      // 023: aload 2
      // 024: invokevirtual com/l7tech/gateway/common/service/PublishedServiceAlias.getEntityGoid ()Lcom/l7tech/objectmodel/Goid;
      // 027: astore 3
      // 028: aload 0
      // 029: getfield com/l7tech/external/assertions/gatewaymanagement/server/ServiceAliasResourceFactory.r Lcom/l7tech/external/assertions/gatewaymanagement/server/ServiceResourceFactory;
      // 02c: getstatic com/l7tech/external/assertions/gatewaymanagement/server/ServiceAliasResourceFactory.s [Ljava/lang/String;
      // 02f: astore 6
      // 031: aload 6
      // 033: bipush 3
      // 034: aaload
      // 035: aload 2
      // 036: invokevirtual com/l7tech/gateway/common/service/PublishedServiceAlias.getEntityGoid ()Lcom/l7tech/objectmodel/Goid;
      // 039: invokevirtual com/l7tech/objectmodel/Goid.toString ()Ljava/lang/String;
      // 03c: invokestatic java/util/Collections.singletonMap (Ljava/lang/Object;Ljava/lang/Object;)Ljava/util/Map;
      // 03f: invokevirtual com/l7tech/external/assertions/gatewaymanagement/server/ServiceResourceFactory.selectEntity (Ljava/util/Map;)Lcom/l7tech/objectmodel/PersistentEntity;
      // 042: checkcast com/l7tech/gateway/common/service/PublishedService
      // 045: astore 4
      // 047: aload 0
      // 048: aload 4
      // 04a: invokevirtual com/l7tech/gateway/common/service/PublishedService.getFolder ()Lcom/l7tech/objectmodel/folder/Folder;
      // 04d: invokevirtual com/l7tech/external/assertions/gatewaymanagement/server/ServiceAliasResourceFactory.a (Lcom/l7tech/objectmodel/folder/Folder;)Z
      // 050: ifeq 06c
      // 053: aload 0
      // 054: aload 2
      // 055: invokevirtual com/l7tech/gateway/common/service/PublishedServiceAlias.getFolder ()Lcom/l7tech/objectmodel/folder/Folder;
      // 058: invokevirtual com/l7tech/external/assertions/gatewaymanagement/server/ServiceAliasResourceFactory.a (Lcom/l7tech/objectmodel/folder/Folder;)Z
      // 05b: ifeq 090
      // 05e: goto 065
      // 061: invokestatic com/l7tech/external/assertions/gatewaymanagement/server/ServiceAliasResourceFactory.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 064: athrow
      // 065: goto 07b
      // 068: invokestatic com/l7tech/external/assertions/gatewaymanagement/server/ServiceAliasResourceFactory.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 06b: athrow
      // 06c: aload 4
      // 06e: invokevirtual com/l7tech/gateway/common/service/PublishedService.getFolder ()Lcom/l7tech/objectmodel/folder/Folder;
      // 071: aload 2
      // 072: invokevirtual com/l7tech/gateway/common/service/PublishedServiceAlias.getFolder ()Lcom/l7tech/objectmodel/folder/Folder;
      // 075: invokevirtual com/l7tech/objectmodel/folder/Folder.equals (Ljava/lang/Object;)Z
      // 078: ifeq 090
      // 07b: new com/l7tech/external/assertions/gatewaymanagement/server/ResourceFactory$InvalidResourceException
      // 07e: dup
      // 07f: getstatic com/l7tech/external/assertions/gatewaymanagement/server/ResourceFactory$InvalidResourceException$ExceptionType.INVALID_VALUES Lcom/l7tech/external/assertions/gatewaymanagement/server/ResourceFactory$InvalidResourceException$ExceptionType;
      // 082: getstatic com/l7tech/external/assertions/gatewaymanagement/server/ServiceAliasResourceFactory.s [Ljava/lang/String;
      // 085: bipush 14
      // 087: aaload
      // 088: invokespecial com/l7tech/external/assertions/gatewaymanagement/server/ResourceFactory$InvalidResourceException.<init> (Lcom/l7tech/external/assertions/gatewaymanagement/server/ResourceFactory$InvalidResourceException$ExceptionType;Ljava/lang/String;)V
      // 08b: athrow
      // 08c: invokestatic com/l7tech/external/assertions/gatewaymanagement/server/ServiceAliasResourceFactory.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 08f: athrow
      // 090: goto 0aa
      // 093: astore 5
      // 095: new com/l7tech/external/assertions/gatewaymanagement/server/ResourceFactory$InvalidResourceException
      // 098: dup
      // 099: getstatic com/l7tech/external/assertions/gatewaymanagement/server/ResourceFactory$InvalidResourceException$ExceptionType.INVALID_VALUES Lcom/l7tech/external/assertions/gatewaymanagement/server/ResourceFactory$InvalidResourceException$ExceptionType;
      // 09c: getstatic com/l7tech/external/assertions/gatewaymanagement/server/ServiceAliasResourceFactory.s [Ljava/lang/String;
      // 09f: astore 6
      // 0a1: aload 6
      // 0a3: bipush 12
      // 0a5: aaload
      // 0a6: invokespecial com/l7tech/external/assertions/gatewaymanagement/server/ResourceFactory$InvalidResourceException.<init> (Lcom/l7tech/external/assertions/gatewaymanagement/server/ResourceFactory$InvalidResourceException$ExceptionType;Ljava/lang/String;)V
      // 0a9: athrow
      // 0aa: aload 0
      // 0ab: getfield com/l7tech/external/assertions/gatewaymanagement/server/ServiceAliasResourceFactory.q Lcom/l7tech/server/service/AliasManager;
      // 0ae: aload 3
      // 0af: aload 2
      // 0b0: invokevirtual com/l7tech/gateway/common/service/PublishedServiceAlias.getFolder ()Lcom/l7tech/objectmodel/folder/Folder;
      // 0b3: invokevirtual com/l7tech/objectmodel/folder/Folder.getGoid ()Lcom/l7tech/objectmodel/Goid;
      // 0b6: invokeinterface com/l7tech/server/service/AliasManager.findAliasByEntityAndFolder (Lcom/l7tech/objectmodel/Goid;Lcom/l7tech/objectmodel/Goid;)Lcom/l7tech/objectmodel/Alias; 3
      // 0bb: checkcast com/l7tech/gateway/common/service/PublishedServiceAlias
      // 0be: astore 5
      // 0c0: aload 5
      // 0c2: ifnull 0f3
      // 0c5: new com/l7tech/external/assertions/gatewaymanagement/server/ResourceFactory$InvalidResourceException
      // 0c8: dup
      // 0c9: getstatic com/l7tech/external/assertions/gatewaymanagement/server/ResourceFactory$InvalidResourceException$ExceptionType.INVALID_VALUES Lcom/l7tech/external/assertions/gatewaymanagement/server/ResourceFactory$InvalidResourceException$ExceptionType;
      // 0cc: aload 4
      // 0ce: invokevirtual com/l7tech/gateway/common/service/PublishedService.getName ()Ljava/lang/String;
      // 0d1: aload 2
      // 0d2: invokevirtual com/l7tech/gateway/common/service/PublishedServiceAlias.getFolder ()Lcom/l7tech/objectmodel/folder/Folder;
      // 0d5: invokevirtual com/l7tech/objectmodel/folder/Folder.getName ()Ljava/lang/String;
      // 0d8: getstatic com/l7tech/external/assertions/gatewaymanagement/server/ServiceAliasResourceFactory.s [Ljava/lang/String;
      // 0db: bipush 15
      // 0dd: aaload
      // 0de: dup_x2
      // 0df: pop
      // 0e0: getstatic com/l7tech/external/assertions/gatewaymanagement/server/ServiceAliasResourceFactory.s [Ljava/lang/String;
      // 0e3: bipush 1
      // 0e4: aaload
      // 0e5: swap
      // 0e6: 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" ]
      // 0eb: invokespecial com/l7tech/external/assertions/gatewaymanagement/server/ResourceFactory$InvalidResourceException.<init> (Lcom/l7tech/external/assertions/gatewaymanagement/server/ResourceFactory$InvalidResourceException$ExceptionType;Ljava/lang/String;)V
      // 0ee: athrow
      // 0ef: invokestatic com/l7tech/external/assertions/gatewaymanagement/server/ServiceAliasResourceFactory.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 0f2: athrow
      // 0f3: goto 108
      // 0f6: astore 5
      // 0f8: new com/l7tech/external/assertions/gatewaymanagement/server/ResourceFactory$InvalidResourceException
      // 0fb: dup
      // 0fc: getstatic com/l7tech/external/assertions/gatewaymanagement/server/ResourceFactory$InvalidResourceException$ExceptionType.INVALID_VALUES Lcom/l7tech/external/assertions/gatewaymanagement/server/ResourceFactory$InvalidResourceException$ExceptionType;
      // 0ff: getstatic com/l7tech/external/assertions/gatewaymanagement/server/ServiceAliasResourceFactory.s [Ljava/lang/String;
      // 102: bipush 2
      // 103: aaload
      // 104: invokespecial com/l7tech/external/assertions/gatewaymanagement/server/ResourceFactory$InvalidResourceException.<init> (Lcom/l7tech/external/assertions/gatewaymanagement/server/ResourceFactory$InvalidResourceException$ExceptionType;Ljava/lang/String;)V
      // 107: athrow
      // 108: aload 2
      // 109: invokevirtual com/l7tech/gateway/common/service/PublishedServiceAlias.getFolder ()Lcom/l7tech/objectmodel/folder/Folder;
      // 10c: ifnull 129
      // 10f: aload 1
      // 110: aload 0
      // 111: getfield com/l7tech/external/assertions/gatewaymanagement/server/ServiceAliasResourceFactory.p Lcom/l7tech/external/assertions/gatewaymanagement/server/FolderResourceFactory;
      // 114: aload 1
      // 115: invokevirtual com/l7tech/gateway/common/service/PublishedServiceAlias.getFolder ()Lcom/l7tech/objectmodel/folder/Folder;
      // 118: aload 2
      // 119: invokevirtual com/l7tech/gateway/common/service/PublishedServiceAlias.getFolder ()Lcom/l7tech/objectmodel/folder/Folder;
      // 11c: invokevirtual com/l7tech/external/assertions/gatewaymanagement/server/FolderResourceFactory.a (Lcom/l7tech/objectmodel/folder/Folder;Lcom/l7tech/objectmodel/folder/Folder;)Lcom/l7tech/objectmodel/folder/Folder;
      // 11f: invokevirtual com/l7tech/gateway/common/service/PublishedServiceAlias.setFolder (Lcom/l7tech/objectmodel/folder/Folder;)V
      // 122: goto 129
      // 125: invokestatic com/l7tech/external/assertions/gatewaymanagement/server/ServiceAliasResourceFactory.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 128: athrow
      // 129: aload 1
      // 12a: aload 2
      // 12b: invokevirtual com/l7tech/gateway/common/service/PublishedServiceAlias.getSecurityZone ()Lcom/l7tech/objectmodel/SecurityZone;
      // 12e: invokevirtual com/l7tech/gateway/common/service/PublishedServiceAlias.setSecurityZone (Lcom/l7tech/objectmodel/SecurityZone;)V
      // 131: return
      // try (49 -> 63): 63 com/l7tech/external/assertions/gatewaymanagement/server/ResourceFactory$ResourceNotFoundException
      // try (38 -> 47): 47 com/l7tech/external/assertions/gatewaymanagement/server/ResourceFactory$ResourceNotFoundException
      // try (33 -> 43): 44 com/l7tech/external/assertions/gatewaymanagement/server/ResourceFactory$ResourceNotFoundException
      // try (0 -> 14): 14 com/l7tech/external/assertions/gatewaymanagement/server/ResourceFactory$ResourceNotFoundException
      // try (19 -> 65): 66 com/l7tech/external/assertions/gatewaymanagement/server/ResourceFactory$ResourceNotFoundException
      // try (86 -> 108): 108 com/l7tech/external/assertions/gatewaymanagement/server/ResourceFactory$ResourceNotFoundException
      // try (77 -> 110): 111 com/l7tech/objectmodel/FindException
      // try (120 -> 132): 133 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 31
      // 04: aload 1
      // 05: invokevirtual com/l7tech/objectmodel/folder/Folder.getId ()Ljava/lang/String;
      // 08: getstatic com/l7tech/external/assertions/gatewaymanagement/server/ServiceAliasResourceFactory.s [Ljava/lang/String;
      // 0b: bipush 5
      // 0c: aaload
      // 0d: invokevirtual java/lang/String.equals (Ljava/lang/Object;)Z
      // 10: ifne 31
      // 13: goto 1a
      // 16: invokestatic com/l7tech/external/assertions/gatewaymanagement/server/ServiceAliasResourceFactory.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 19: athrow
      // 1a: aload 1
      // 1b: invokevirtual com/l7tech/objectmodel/folder/Folder.getId ()Ljava/lang/String;
      // 1e: getstatic com/l7tech/objectmodel/folder/Folder.ROOT_FOLDER_ID Lcom/l7tech/objectmodel/Goid;
      // 21: invokevirtual com/l7tech/objectmodel/Goid.toString ()Ljava/lang/String;
      // 24: invokevirtual java/lang/String.equals (Ljava/lang/Object;)Z
      // 27: ifeq 39
      // 2a: goto 31
      // 2d: invokestatic com/l7tech/external/assertions/gatewaymanagement/server/ServiceAliasResourceFactory.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 30: athrow
      // 31: bipush 1
      // 32: goto 3a
      // 35: invokestatic com/l7tech/external/assertions/gatewaymanagement/server/ServiceAliasResourceFactory.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 38: athrow
      // 39: bipush 0
      // 3a: 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 = "4\t\u001a}\fi;Nc\u0012$M`1Bq\u0002.Ml'\u000bd\u00191\t`;\u000b\"\b\u0003d+GgV)\u0002%*Cg\u00156Mc&Y\"\u0013%\u0004v=Bl\u0011}\fi Jq\u00024\t\u0011\u001c\u0001l(X\"\u0019;Mv,Yt\u001f>\b%\u0005pX5y\u0019:\u001e\fk'DvV>\u001f`(_gV<\u0001l(X\"\u001f3Mq!N\"\u0005<\u0000`iMm\u001a9\bwiJqV2\u001fl.Bl\u00171Mv,Yt\u001f>\b\"\b\u0003d+GgV)\u0002%*Cg\u00156Mc&Y\"\u0013%\u0004v=Bl\u0011}\fi Jq\u0005pX5y\u0019\u001a}\fi;Nc\u0012$M`1Bq\u0002.Ml'\u000bd\u00191\t`;\u000b\u0017\r\fw,EvV;\u0002i-NpV3\u0002qiMm\u00033\t\u00158\u0015u,Hv\u00139Mu&Gk\u0015$Md%Bc\u0005\u00184\u0003s(Gk\u0012}\u001dj%Ba\u000f}\u001f`/Np\u00133\u000e`>(\u0003d+GgV)\u0002%*Cc\u0018:\b%9Dn\u001f>\u0014%;Nd\u0013/\bk*N\"\u0019;Md'\u000bg\u000e4\u001eq EeV.\bw?Ba\u0013}\fi Jq8\u001e\fk'DvV5\fs,\u000bc\u001a4\fviBlV)\u0005`iXc\u001b8Mc&Gf\u0013/Md:\u000bm\u00044\nl'JnV.\bw?Ba\u0013";
      int var4 = "4\t\u001a}\fi;Nc\u0012$M`1Bq\u0002.Ml'\u000bd\u00191\t`;\u000b\"\b\u0003d+GgV)\u0002%*Cg\u00156Mc&Y\"\u0013%\u0004v=Bl\u0011}\fi Jq\u00024\t\u0011\u001c\u0001l(X\"\u0019;Mv,Yt\u001f>\b%\u0005pX5y\u0019:\u001e\fk'DvV>\u001f`(_gV<\u0001l(X\"\u001f3Mq!N\"\u0005<\u0000`iMm\u001a9\bwiJqV2\u001fl.Bl\u00171Mv,Yt\u001f>\b\"\b\u0003d+GgV)\u0002%*Cg\u00156Mc&Y\"\u0013%\u0004v=Bl\u0011}\fi Jq\u0005pX5y\u0019\u001a}\fi;Nc\u0012$M`1Bq\u0002.Ml'\u000bd\u00191\t`;\u000b\u0017\r\fw,EvV;\u0002i-NpV3\u0002qiMm\u00033\t\u00158\u0015u,Hv\u00139Mu&Gk\u0015$Md%Bc\u0005\u00184\u0003s(Gk\u0012}\u001dj%Ba\u000f}\u001f`/Np\u00133\u000e`>(\u0003d+GgV)\u0002%*Cc\u0018:\b%9Dn\u001f>\u0014%;Nd\u0013/\bk*N\"\u0019;Md'\u000bg\u000e4\u001eq EeV.\bw?Ba\u0013}\fi Jq8\u001e\fk'DvV5\fs,\u000bc\u001a4\fviBlV)\u0005`iXc\u001b8Mc&Gf\u0013/Md:\u000bm\u00044\nl'JnV.\bw?Ba\u0013"
         .length();
      char var1 = 2;
      int var7 = -1;

      label24:
      while (true) {
         byte var10000 = 19;
         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[8];
                     return;
                  }

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

                  var2 = "or\u001f[+QjH>\u0005_*\u0007lM{V\u0019Gp\u0000[4\u0018a\u000em\u0013H.\u0018fK>\u0004_>\u0014wKp\u0015_";
                  var4 = "or\u001f[+QjH>\u0005_*\u0007lM{V\u0019Gp\u0000[4\u0018a\u000em\u0013H.\u0018fK>\u0004_>\u0014wKp\u0015_".length();
                  var1 = 17;
                  var7 = -1;
            }

            var10000 = 96;
            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] ^ 101);
      }

      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 -> 78;
            case 1 -> 126;
            case 2 -> 22;
            case 3 -> 90;
            case 4 -> 56;
            case 5 -> 17;
            default -> 101;
         });
      }

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