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

import com.l7tech.gateway.common.security.rbac.OperationType;
import com.l7tech.identity.User;
import com.l7tech.objectmodel.Entity;
import com.l7tech.objectmodel.EntityType;
import com.l7tech.objectmodel.FindException;
import com.l7tech.objectmodel.ObjectModelException;
import com.l7tech.objectmodel.PersistentEntity;
import com.l7tech.objectmodel.folder.HasFolder;
import com.l7tech.server.security.rbac.RbacServices;
import com.l7tech.server.security.rbac.SecurityFilter;
import com.l7tech.util.ConfigFactory;
import com.l7tech.util.ExceptionUtils;
import com.l7tech.util.Option;
import com.l7tech.util.TextUtils;
import com.l7tech.util.Functions.UnaryThrows;
import java.util.List;
import java.util.Map;
import java.util.Set;
import javax.validation.ConstraintViolation;
import javax.validation.Validation;
import javax.validation.Validator;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import org.springframework.dao.DataAccessException;
import org.springframework.transaction.PlatformTransactionManager;
import org.springframework.transaction.TransactionException;
import org.springframework.transaction.support.TransactionTemplate;

abstract class ResourceFactorySupport<R, E> implements ResourceFactory<R, E> {
   private static final boolean a;
   private final RbacServices b;
   private final SecurityFilter c;
   private final PlatformTransactionManager d;
   private final ao e = new ao();
   private final Validator f = Validation.buildDefaultValidatorFactory().getValidator();
   private static final String[] D;

   @Override
   public boolean isReadOnly() {
      return true;
   }

   @Override
   public boolean isCreateSupported() {
      try {
         if (!this.isReadOnly()) {
            return true;
         }
      } catch (IllegalStateException var1) {
         throw b(var1);
      }

      return false;
   }

   @Override
   public boolean isUpdateSupported() {
      try {
         if (!this.isReadOnly()) {
            return true;
         }
      } catch (IllegalStateException var1) {
         throw b(var1);
      }

      return false;
   }

   @Override
   public boolean isDeleteSupported() {
      try {
         if (!this.isReadOnly()) {
            return true;
         }
      } catch (IllegalStateException var1) {
         throw b(var1);
      }

      return false;
   }

   @Override
   public Map<String, String> createResource(Object var1) throws ResourceFactory.InvalidResourceException {
      throw new IllegalStateException(D[5]);
   }

   @Override
   public Map<String, String> createResource(String var1, Object var2) throws ResourceFactory.InvalidResourceException {
      throw new IllegalStateException(D[5]);
   }

   @Override
   public R putResource(Map<String, String> var1, Object var2) throws ResourceFactory.ResourceNotFoundException, ResourceFactory.InvalidResourceException {
      throw new IllegalStateException(D[10]);
   }

   @Override
   public String deleteResource(Map<String, String> var1) throws ResourceFactory.ResourceNotFoundException {
      throw new IllegalStateException(D[5]);
   }

   protected final void validate(Object var1, Class<?>... var2) throws ResourceFactory.InvalidResourceException {
      try {
         if (!a) {
            return;
         }
      } catch (ResourceFactory.InvalidResourceException var11) {
         throw b(var11);
      }

      Class[] var3 = var2;

      label48: {
         try {
            if (var3 != null && var3.length != 0) {
               break label48;
            }
         } catch (ResourceFactory.InvalidResourceException var10) {
            throw b(var10);
         }

         var3 = this.e.getValidationGroups(var1);
      }

      Set var4 = this.f.validate(var1, var3);
      if (!var4.isEmpty()) {
         StringBuilder var5 = new StringBuilder();
         boolean var6 = true;

         for (ConstraintViolation var8 : var4) {
            try {
               if (!var6) {
                  var5.append('\n');
               }
            } catch (ResourceFactory.InvalidResourceException var9) {
               throw b(var9);
            }

            var6 = false;
            var5.append(var8.getPropertyPath().toString());
            var5.append(' ');
            var5.append(var8.getMessage());
         }

         throw new ResourceFactory.InvalidResourceException(ResourceFactory.InvalidResourceException.ExceptionType.INVALID_VALUES, var5.toString());
      }
   }

   protected final <B extends PersistentEntity> Map<String, Object> getProperties(B var1, Class<B> var2) {
      return this.getProperties(null, var1, var2);
   }

   protected final <B extends PersistentEntity> Map<String, Object> getProperties(
      @Nullable Map<String, Object> param1, @NotNull B param2, @NotNull Class<B> param3
   ) {
      // $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 2
      // 001: ifnonnull 00f
      // 004: bipush 0
      // 005: invokestatic com/l7tech/external/assertions/gatewaymanagement/server/ResourceFactorySupport.a (I)V
      // 008: goto 00f
      // 00b: invokestatic com/l7tech/external/assertions/gatewaymanagement/server/ResourceFactorySupport.b (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 00e: athrow
      // 00f: aload 3
      // 010: ifnonnull 01e
      // 013: bipush 1
      // 014: invokestatic com/l7tech/external/assertions/gatewaymanagement/server/ResourceFactorySupport.a (I)V
      // 017: goto 01e
      // 01a: invokestatic com/l7tech/external/assertions/gatewaymanagement/server/ResourceFactorySupport.b (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 01d: athrow
      // 01e: new java/util/HashMap
      // 021: dup
      // 022: invokespecial java/util/HashMap.<init> ()V
      // 025: astore 4
      // 027: aload 1
      // 028: ifnull 03a
      // 02b: aload 4
      // 02d: aload 1
      // 02e: invokeinterface java/util/Map.putAll (Ljava/util/Map;)V 2
      // 033: goto 03a
      // 036: invokestatic com/l7tech/external/assertions/gatewaymanagement/server/ResourceFactorySupport.b (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 039: athrow
      // 03a: aload 0
      // 03b: getfield com/l7tech/external/assertions/gatewaymanagement/server/ResourceFactorySupport.e Lcom/l7tech/external/assertions/gatewaymanagement/server/ao;
      // 03e: aload 3
      // 03f: invokevirtual com/l7tech/external/assertions/gatewaymanagement/server/ao.getIgnoredProperties (Ljava/lang/Class;)Ljava/util/Collection;
      // 042: astore 5
      // 044: aload 0
      // 045: getfield com/l7tech/external/assertions/gatewaymanagement/server/ResourceFactorySupport.e Lcom/l7tech/external/assertions/gatewaymanagement/server/ao;
      // 048: aload 3
      // 049: invokevirtual com/l7tech/external/assertions/gatewaymanagement/server/ao.getPasswordProperties (Ljava/lang/Class;)Ljava/util/Collection;
      // 04c: astore 6
      // 04e: aload 0
      // 04f: getfield com/l7tech/external/assertions/gatewaymanagement/server/ResourceFactorySupport.e Lcom/l7tech/external/assertions/gatewaymanagement/server/ao;
      // 052: aload 3
      // 053: invokevirtual com/l7tech/external/assertions/gatewaymanagement/server/ao.getPropertiesMap (Ljava/lang/Class;)Ljava/util/Map;
      // 056: astore 7
      // 058: aload 3
      // 059: invokestatic com/l7tech/util/BeanUtils.getProperties (Ljava/lang/Class;)Ljava/util/Set;
      // 05c: aload 5
      // 05e: aload 5
      // 060: invokeinterface java/util/Collection.size ()I 1
      // 065: anewarray 193
      // 068: invokeinterface java/util/Collection.toArray ([Ljava/lang/Object;)[Ljava/lang/Object; 2
      // 06d: checkcast [Ljava/lang/String;
      // 070: invokestatic com/l7tech/util/BeanUtils.omitProperties (Ljava/util/Set;[Ljava/lang/String;)Ljava/util/Set;
      // 073: astore 8
      // 075: aload 8
      // 077: invokeinterface java/util/Set.iterator ()Ljava/util/Iterator; 1
      // 07c: astore 9
      // 07e: aload 9
      // 080: invokeinterface java/util/Iterator.hasNext ()Z 1
      // 085: ifeq 1d5
      // 088: aload 9
      // 08a: invokeinterface java/util/Iterator.next ()Ljava/lang/Object; 1
      // 08f: checkcast java/beans/PropertyDescriptor
      // 092: astore 10
      // 094: aload 7
      // 096: aload 10
      // 098: invokevirtual java/beans/PropertyDescriptor.getName ()Ljava/lang/String;
      // 09b: invokeinterface java/util/Map.containsKey (Ljava/lang/Object;)Z 2
      // 0a0: ifne 0c6
      // 0a3: new com/l7tech/external/assertions/gatewaymanagement/server/ResourceFactory$ResourceAccessException
      // 0a6: dup
      // 0a7: aload 10
      // 0a9: invokevirtual java/beans/PropertyDescriptor.getName ()Ljava/lang/String;
      // 0ac: getstatic com/l7tech/external/assertions/gatewaymanagement/server/ResourceFactorySupport.D [Ljava/lang/String;
      // 0af: bipush 9
      // 0b1: aaload
      // 0b2: swap
      // 0b3: getstatic com/l7tech/external/assertions/gatewaymanagement/server/ResourceFactorySupport.D [Ljava/lang/String;
      // 0b6: bipush 23
      // 0b8: aaload
      // 0b9: invokedynamic makeConcatWithConstants (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" ]
      // 0be: invokespecial com/l7tech/external/assertions/gatewaymanagement/server/ResourceFactory$ResourceAccessException.<init> (Ljava/lang/String;)V
      // 0c1: athrow
      // 0c2: invokestatic com/l7tech/external/assertions/gatewaymanagement/server/ResourceFactorySupport.b (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 0c5: athrow
      // 0c6: aload 7
      // 0c8: aload 10
      // 0ca: invokevirtual java/beans/PropertyDescriptor.getName ()Ljava/lang/String;
      // 0cd: invokeinterface java/util/Map.get (Ljava/lang/Object;)Ljava/lang/Object; 2
      // 0d2: ifnull 0eb
      // 0d5: aload 7
      // 0d7: aload 10
      // 0d9: invokevirtual java/beans/PropertyDescriptor.getName ()Ljava/lang/String;
      // 0dc: invokeinterface java/util/Map.get (Ljava/lang/Object;)Ljava/lang/Object; 2
      // 0e1: checkcast java/lang/String
      // 0e4: goto 0f0
      // 0e7: invokestatic com/l7tech/external/assertions/gatewaymanagement/server/ResourceFactorySupport.b (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 0ea: athrow
      // 0eb: aload 10
      // 0ed: invokevirtual java/beans/PropertyDescriptor.getName ()Ljava/lang/String;
      // 0f0: astore 11
      // 0f2: aload 10
      // 0f4: invokevirtual java/beans/PropertyDescriptor.getReadMethod ()Ljava/lang/reflect/Method;
      // 0f7: aload 2
      // 0f8: bipush 0
      // 0f9: anewarray 464
      // 0fc: invokevirtual java/lang/reflect/Method.invoke (Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;
      // 0ff: astore 12
      // 101: aload 6
      // 103: aload 10
      // 105: invokevirtual java/beans/PropertyDescriptor.getName ()Ljava/lang/String;
      // 108: invokeinterface java/util/Collection.contains (Ljava/lang/Object;)Z 2
      // 10d: ifeq 138
      // 110: aload 12
      // 112: ifnull 138
      // 115: goto 11c
      // 118: invokestatic com/l7tech/external/assertions/gatewaymanagement/server/ResourceFactorySupport.b (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 11b: athrow
      // 11c: getstatic com/l7tech/server/policy/variable/ServerVariables.SINGLE_SECPASS_PATTERN Ljava/util/regex/Pattern;
      // 11f: aload 12
      // 121: invokevirtual java/lang/Object.toString ()Ljava/lang/String;
      // 124: invokevirtual java/util/regex/Pattern.matcher (Ljava/lang/CharSequence;)Ljava/util/regex/Matcher;
      // 127: astore 13
      // 129: aload 13
      // 12b: invokevirtual java/util/regex/Matcher.matches ()Z
      // 12e: ifne 138
      // 131: goto 07e
      // 134: invokestatic com/l7tech/external/assertions/gatewaymanagement/server/ResourceFactorySupport.b (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 137: athrow
      // 138: aload 12
      // 13a: ifnonnull 144
      // 13d: goto 1d2
      // 140: invokestatic com/l7tech/external/assertions/gatewaymanagement/server/ResourceFactorySupport.b (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 143: athrow
      // 144: aload 12
      // 146: instanceof java/lang/Boolean
      // 149: ifne 179
      // 14c: aload 12
      // 14e: instanceof java/lang/Number
      // 151: ifne 179
      // 154: goto 15b
      // 157: invokestatic com/l7tech/external/assertions/gatewaymanagement/server/ResourceFactorySupport.b (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 15a: athrow
      // 15b: aload 12
      // 15d: instanceof java/lang/String
      // 160: ifne 179
      // 163: goto 16a
      // 166: invokestatic com/l7tech/external/assertions/gatewaymanagement/server/ResourceFactorySupport.b (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 169: athrow
      // 16a: aload 12
      // 16c: instanceof java/util/Date
      // 16f: ifeq 18c
      // 172: goto 179
      // 175: invokestatic com/l7tech/external/assertions/gatewaymanagement/server/ResourceFactorySupport.b (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 178: athrow
      // 179: aload 4
      // 17b: aload 11
      // 17d: aload 12
      // 17f: invokeinterface java/util/Map.put (Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object; 3
      // 184: pop
      // 185: goto 1d2
      // 188: invokestatic com/l7tech/external/assertions/gatewaymanagement/server/ResourceFactorySupport.b (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 18b: athrow
      // 18c: aload 12
      // 18e: instanceof java/lang/Enum
      // 191: ifeq 1ad
      // 194: aload 4
      // 196: aload 11
      // 198: aload 12
      // 19a: checkcast java/lang/Enum
      // 19d: invokestatic com/l7tech/external/assertions/gatewaymanagement/server/ao.getEnumText (Ljava/lang/Enum;)Ljava/lang/String;
      // 1a0: invokeinterface java/util/Map.put (Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object; 3
      // 1a5: pop
      // 1a6: goto 1d2
      // 1a9: invokestatic com/l7tech/external/assertions/gatewaymanagement/server/ResourceFactorySupport.b (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 1ac: athrow
      // 1ad: new com/l7tech/external/assertions/gatewaymanagement/server/ResourceFactory$ResourceAccessException
      // 1b0: dup
      // 1b1: aload 12
      // 1b3: invokevirtual java/lang/Object.getClass ()Ljava/lang/Class;
      // 1b6: invokestatic java/lang/String.valueOf (Ljava/lang/Object;)Ljava/lang/String;
      // 1b9: getstatic com/l7tech/external/assertions/gatewaymanagement/server/ResourceFactorySupport.D [Ljava/lang/String;
      // 1bc: astore 14
      // 1be: aload 14
      // 1c0: bipush 12
      // 1c2: aaload
      // 1c3: swap
      // 1c4: aload 14
      // 1c6: bipush 23
      // 1c8: aaload
      // 1c9: invokedynamic makeConcatWithConstants (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" ]
      // 1ce: invokespecial com/l7tech/external/assertions/gatewaymanagement/server/ResourceFactory$ResourceAccessException.<init> (Ljava/lang/String;)V
      // 1d1: athrow
      // 1d2: goto 07e
      // 1d5: goto 210
      // 1d8: astore 5
      // 1da: new com/l7tech/external/assertions/gatewaymanagement/server/ResourceFactory$ResourceAccessException
      // 1dd: dup
      // 1de: aload 5
      // 1e0: invokevirtual java/lang/reflect/InvocationTargetException.getCause ()Ljava/lang/Throwable;
      // 1e3: invokespecial com/l7tech/external/assertions/gatewaymanagement/server/ResourceFactory$ResourceAccessException.<init> (Ljava/lang/Throwable;)V
      // 1e6: athrow
      // 1e7: astore 5
      // 1e9: new com/l7tech/external/assertions/gatewaymanagement/server/ResourceFactory$ResourceAccessException
      // 1ec: dup
      // 1ed: aload 5
      // 1ef: invokespecial com/l7tech/external/assertions/gatewaymanagement/server/ResourceFactory$ResourceAccessException.<init> (Ljava/lang/Throwable;)V
      // 1f2: athrow
      // 1f3: astore 5
      // 1f5: aload 5
      // 1f7: ldc java/beans/IntrospectionException
      // 1f9: invokestatic com/l7tech/util/ExceptionUtils.causedBy (Ljava/lang/Throwable;Ljava/lang/Class;)Z
      // 1fc: ifeq 20d
      // 1ff: new com/l7tech/external/assertions/gatewaymanagement/server/ResourceFactory$ResourceAccessException
      // 202: dup
      // 203: aload 5
      // 205: invokespecial com/l7tech/external/assertions/gatewaymanagement/server/ResourceFactory$ResourceAccessException.<init> (Ljava/lang/Throwable;)V
      // 208: athrow
      // 209: invokestatic com/l7tech/external/assertions/gatewaymanagement/server/ResourceFactorySupport.b (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 20c: athrow
      // 20d: aload 5
      // 20f: athrow
      // 210: aload 4
      // 212: areturn
      // try (160 -> 171): 171 java/lang/reflect/InvocationTargetException
      // try (146 -> 158): 158 java/lang/reflect/InvocationTargetException
      // try (140 -> 149): 150 java/lang/reflect/InvocationTargetException
      // try (134 -> 143): 144 java/lang/reflect/InvocationTargetException
      // try (131 -> 137): 138 java/lang/reflect/InvocationTargetException
      // try (126 -> 129): 129 java/lang/reflect/InvocationTargetException
      // try (120 -> 124): 124 java/lang/reflect/InvocationTargetException
      // try (105 -> 112): 113 java/lang/reflect/InvocationTargetException
      // try (82 -> 93): 93 java/lang/reflect/InvocationTargetException
      // try (61 -> 80): 80 java/lang/reflect/InvocationTargetException
      // try (18 -> 23): 24 java/lang/reflect/InvocationTargetException
      // try (7 -> 11): 12 java/lang/reflect/InvocationTargetException
      // try (0 -> 4): 5 java/lang/reflect/InvocationTargetException
      // try (26 -> 191): 192 java/lang/reflect/InvocationTargetException
      // try (26 -> 191): 199 java/lang/IllegalAccessException
      // try (26 -> 191): 205 java/lang/RuntimeException
      // try (206 -> 215): 215 java/lang/reflect/InvocationTargetException
   }

   protected final <B extends PersistentEntity> void setProperties(B param1, Map<String, Object> param2, Class<? extends B> param3) 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 0
      // 001: getfield com/l7tech/external/assertions/gatewaymanagement/server/ResourceFactorySupport.e Lcom/l7tech/external/assertions/gatewaymanagement/server/ao;
      // 004: aload 3
      // 005: invokevirtual com/l7tech/external/assertions/gatewaymanagement/server/ao.getIgnoredProperties (Ljava/lang/Class;)Ljava/util/Collection;
      // 008: astore 4
      // 00a: aload 0
      // 00b: getfield com/l7tech/external/assertions/gatewaymanagement/server/ResourceFactorySupport.e Lcom/l7tech/external/assertions/gatewaymanagement/server/ao;
      // 00e: aload 3
      // 00f: invokevirtual com/l7tech/external/assertions/gatewaymanagement/server/ao.getPropertiesMap (Ljava/lang/Class;)Ljava/util/Map;
      // 012: astore 5
      // 014: aload 0
      // 015: getfield com/l7tech/external/assertions/gatewaymanagement/server/ResourceFactorySupport.e Lcom/l7tech/external/assertions/gatewaymanagement/server/ao;
      // 018: aload 3
      // 019: invokevirtual com/l7tech/external/assertions/gatewaymanagement/server/ao.getPropertyDefaultsMap (Ljava/lang/Class;)Ljava/util/Map;
      // 01c: astore 6
      // 01e: aload 3
      // 01f: invokestatic com/l7tech/util/BeanUtils.getProperties (Ljava/lang/Class;)Ljava/util/Set;
      // 022: aload 4
      // 024: aload 4
      // 026: invokeinterface java/util/Collection.size ()I 1
      // 02b: anewarray 193
      // 02e: invokeinterface java/util/Collection.toArray ([Ljava/lang/Object;)[Ljava/lang/Object; 2
      // 033: checkcast [Ljava/lang/String;
      // 036: invokestatic com/l7tech/util/BeanUtils.omitProperties (Ljava/util/Set;[Ljava/lang/String;)Ljava/util/Set;
      // 039: astore 7
      // 03b: aload 7
      // 03d: invokeinterface java/util/Set.iterator ()Ljava/util/Iterator; 1
      // 042: astore 8
      // 044: aload 8
      // 046: invokeinterface java/util/Iterator.hasNext ()Z 1
      // 04b: ifeq 20b
      // 04e: aload 8
      // 050: invokeinterface java/util/Iterator.next ()Ljava/lang/Object; 1
      // 055: checkcast java/beans/PropertyDescriptor
      // 058: astore 9
      // 05a: aload 5
      // 05c: aload 9
      // 05e: invokevirtual java/beans/PropertyDescriptor.getName ()Ljava/lang/String;
      // 061: invokeinterface java/util/Map.containsKey (Ljava/lang/Object;)Z 2
      // 066: ifeq 09f
      // 069: aload 5
      // 06b: aload 9
      // 06d: invokevirtual java/beans/PropertyDescriptor.getName ()Ljava/lang/String;
      // 070: invokeinterface java/util/Map.get (Ljava/lang/Object;)Ljava/lang/Object; 2
      // 075: ifnull 095
      // 078: goto 07f
      // 07b: invokestatic com/l7tech/external/assertions/gatewaymanagement/server/ResourceFactorySupport.b (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 07e: athrow
      // 07f: aload 5
      // 081: aload 9
      // 083: invokevirtual java/beans/PropertyDescriptor.getName ()Ljava/lang/String;
      // 086: invokeinterface java/util/Map.get (Ljava/lang/Object;)Ljava/lang/Object; 2
      // 08b: checkcast java/lang/String
      // 08e: goto 09a
      // 091: invokestatic com/l7tech/external/assertions/gatewaymanagement/server/ResourceFactorySupport.b (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 094: athrow
      // 095: aload 9
      // 097: invokevirtual java/beans/PropertyDescriptor.getName ()Ljava/lang/String;
      // 09a: astore 10
      // 09c: goto 0c1
      // 09f: new com/l7tech/external/assertions/gatewaymanagement/server/ResourceFactory$ResourceAccessException
      // 0a2: dup
      // 0a3: aload 9
      // 0a5: invokevirtual java/beans/PropertyDescriptor.getName ()Ljava/lang/String;
      // 0a8: getstatic com/l7tech/external/assertions/gatewaymanagement/server/ResourceFactorySupport.D [Ljava/lang/String;
      // 0ab: astore 18
      // 0ad: aload 18
      // 0af: bipush 14
      // 0b1: aaload
      // 0b2: swap
      // 0b3: aload 18
      // 0b5: bipush 6
      // 0b7: aaload
      // 0b8: invokedynamic makeConcatWithConstants (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" ]
      // 0bd: invokespecial com/l7tech/external/assertions/gatewaymanagement/server/ResourceFactory$ResourceAccessException.<init> (Ljava/lang/String;)V
      // 0c0: athrow
      // 0c1: aload 2
      // 0c2: ifnull 0d4
      // 0c5: aload 2
      // 0c6: aload 10
      // 0c8: invokeinterface java/util/Map.get (Ljava/lang/Object;)Ljava/lang/Object; 2
      // 0cd: goto 0d5
      // 0d0: invokestatic com/l7tech/external/assertions/gatewaymanagement/server/ResourceFactorySupport.b (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 0d3: athrow
      // 0d4: aconst_null
      // 0d5: astore 11
      // 0d7: aload 11
      // 0d9: ifnonnull 0ea
      // 0dc: aload 6
      // 0de: aload 9
      // 0e0: invokevirtual java/beans/PropertyDescriptor.getName ()Ljava/lang/String;
      // 0e3: invokeinterface java/util/Map.get (Ljava/lang/Object;)Ljava/lang/Object; 2
      // 0e8: astore 11
      // 0ea: aload 9
      // 0ec: invokevirtual java/beans/PropertyDescriptor.getWriteMethod ()Ljava/lang/reflect/Method;
      // 0ef: astore 12
      // 0f1: aload 12
      // 0f3: invokevirtual java/lang/reflect/Method.getParameterTypes ()[Ljava/lang/Class;
      // 0f6: bipush 0
      // 0f7: aaload
      // 0f8: astore 13
      // 0fa: aload 11
      // 0fc: ifnull 195
      // 0ff: aload 13
      // 101: invokevirtual java/lang/Class.isPrimitive ()Z
      // 104: ifne 195
      // 107: goto 10e
      // 10a: invokestatic com/l7tech/external/assertions/gatewaymanagement/server/ResourceFactorySupport.b (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 10d: athrow
      // 10e: aload 13
      // 110: aload 11
      // 112: invokevirtual java/lang/Object.getClass ()Ljava/lang/Class;
      // 115: invokevirtual java/lang/Class.isAssignableFrom (Ljava/lang/Class;)Z
      // 118: ifne 195
      // 11b: goto 122
      // 11e: invokestatic com/l7tech/external/assertions/gatewaymanagement/server/ResourceFactorySupport.b (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 121: athrow
      // 122: aload 11
      // 124: instanceof java/lang/String
      // 127: ifeq 151
      // 12a: goto 131
      // 12d: invokestatic com/l7tech/external/assertions/gatewaymanagement/server/ResourceFactorySupport.b (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 130: athrow
      // 131: ldc java/lang/Enum
      // 133: aload 13
      // 135: invokevirtual java/lang/Class.isAssignableFrom (Ljava/lang/Class;)Z
      // 138: ifeq 151
      // 13b: goto 142
      // 13e: invokestatic com/l7tech/external/assertions/gatewaymanagement/server/ResourceFactorySupport.b (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 141: athrow
      // 142: aload 13
      // 144: aload 11
      // 146: checkcast java/lang/String
      // 149: invokestatic com/l7tech/external/assertions/gatewaymanagement/server/ao.getEnumValue (Ljava/lang/Class;Ljava/lang/String;)Ljava/lang/Enum;
      // 14c: astore 11
      // 14e: goto 1c8
      // 151: new com/l7tech/external/assertions/gatewaymanagement/server/ResourceFactory$InvalidResourceException
      // 154: dup
      // 155: getstatic com/l7tech/external/assertions/gatewaymanagement/server/ResourceFactory$InvalidResourceException$ExceptionType.UNEXPECTED_TYPE Lcom/l7tech/external/assertions/gatewaymanagement/server/ResourceFactory$InvalidResourceException$ExceptionType;
      // 158: aload 11
      // 15a: invokevirtual java/lang/Object.getClass ()Ljava/lang/Class;
      // 15d: invokestatic java/lang/String.valueOf (Ljava/lang/Object;)Ljava/lang/String;
      // 160: aload 10
      // 162: aload 13
      // 164: invokestatic java/lang/String.valueOf (Ljava/lang/Object;)Ljava/lang/String;
      // 167: astore 15
      // 169: astore 16
      // 16b: astore 17
      // 16d: getstatic com/l7tech/external/assertions/gatewaymanagement/server/ResourceFactorySupport.D [Ljava/lang/String;
      // 170: astore 18
      // 172: aload 18
      // 174: bipush 17
      // 176: aaload
      // 177: aload 17
      // 179: aload 18
      // 17b: bipush 16
      // 17d: aaload
      // 17e: aload 16
      // 180: aload 18
      // 182: bipush 24
      // 184: aaload
      // 185: aload 15
      // 187: aload 18
      // 189: bipush 18
      // 18b: aaload
      // 18c: invokedynamic makeConcatWithConstants (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;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\u0001\u0001\u0001" ]
      // 191: invokespecial com/l7tech/external/assertions/gatewaymanagement/server/ResourceFactory$InvalidResourceException.<init> (Lcom/l7tech/external/assertions/gatewaymanagement/server/ResourceFactory$InvalidResourceException$ExceptionType;Ljava/lang/String;)V
      // 194: athrow
      // 195: aload 11
      // 197: ifnonnull 1c8
      // 19a: aload 13
      // 19c: invokevirtual java/lang/Class.isPrimitive ()Z
      // 19f: ifeq 1c8
      // 1a2: goto 1a9
      // 1a5: invokestatic com/l7tech/external/assertions/gatewaymanagement/server/ResourceFactorySupport.b (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 1a8: athrow
      // 1a9: new com/l7tech/external/assertions/gatewaymanagement/server/ResourceFactory$InvalidResourceException
      // 1ac: dup
      // 1ad: getstatic com/l7tech/external/assertions/gatewaymanagement/server/ResourceFactory$InvalidResourceException$ExceptionType.MISSING_VALUES Lcom/l7tech/external/assertions/gatewaymanagement/server/ResourceFactory$InvalidResourceException$ExceptionType;
      // 1b0: aload 10
      // 1b2: getstatic com/l7tech/external/assertions/gatewaymanagement/server/ResourceFactorySupport.D [Ljava/lang/String;
      // 1b5: bipush 20
      // 1b7: aaload
      // 1b8: swap
      // 1b9: ldc "'"
      // 1bb: invokedynamic makeConcatWithConstants (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" ]
      // 1c0: invokespecial com/l7tech/external/assertions/gatewaymanagement/server/ResourceFactory$InvalidResourceException.<init> (Lcom/l7tech/external/assertions/gatewaymanagement/server/ResourceFactory$InvalidResourceException$ExceptionType;Ljava/lang/String;)V
      // 1c3: athrow
      // 1c4: invokestatic com/l7tech/external/assertions/gatewaymanagement/server/ResourceFactorySupport.b (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 1c7: athrow
      // 1c8: aload 12
      // 1ca: aload 1
      // 1cb: bipush 1
      // 1cc: anewarray 464
      // 1cf: dup
      // 1d0: bipush 0
      // 1d1: aload 11
      // 1d3: aastore
      // 1d4: invokevirtual java/lang/reflect/Method.invoke (Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;
      // 1d7: pop
      // 1d8: goto 208
      // 1db: astore 14
      // 1dd: new com/l7tech/external/assertions/gatewaymanagement/server/ResourceFactory$ResourceAccessException
      // 1e0: dup
      // 1e1: aload 10
      // 1e3: aload 11
      // 1e5: invokestatic java/lang/String.valueOf (Ljava/lang/Object;)Ljava/lang/String;
      // 1e8: getstatic com/l7tech/external/assertions/gatewaymanagement/server/ResourceFactorySupport.D [Ljava/lang/String;
      // 1eb: astore 18
      // 1ed: aload 18
      // 1ef: bipush 30
      // 1f1: aaload
      // 1f2: dup_x2
      // 1f3: pop
      // 1f4: aload 18
      // 1f6: bipush 31
      // 1f8: aaload
      // 1f9: swap
      // 1fa: 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" ]
      // 1ff: aload 14
      // 201: invokevirtual java/lang/reflect/InvocationTargetException.getCause ()Ljava/lang/Throwable;
      // 204: invokespecial com/l7tech/external/assertions/gatewaymanagement/server/ResourceFactory$ResourceAccessException.<init> (Ljava/lang/String;Ljava/lang/Throwable;)V
      // 207: athrow
      // 208: goto 044
      // 20b: goto 237
      // 20e: astore 4
      // 210: aload 4
      // 212: ldc java/beans/IntrospectionException
      // 214: invokestatic com/l7tech/util/ExceptionUtils.causedBy (Ljava/lang/Throwable;Ljava/lang/Class;)Z
      // 217: ifeq 228
      // 21a: new com/l7tech/external/assertions/gatewaymanagement/server/ResourceFactory$ResourceAccessException
      // 21d: dup
      // 21e: aload 4
      // 220: invokespecial com/l7tech/external/assertions/gatewaymanagement/server/ResourceFactory$ResourceAccessException.<init> (Ljava/lang/Throwable;)V
      // 223: athrow
      // 224: invokestatic com/l7tech/external/assertions/gatewaymanagement/server/ResourceFactorySupport.b (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 227: athrow
      // 228: aload 4
      // 22a: athrow
      // 22b: astore 4
      // 22d: new com/l7tech/external/assertions/gatewaymanagement/server/ResourceFactory$ResourceAccessException
      // 230: dup
      // 231: aload 4
      // 233: invokespecial com/l7tech/external/assertions/gatewaymanagement/server/ResourceFactory$ResourceAccessException.<init> (Ljava/lang/Throwable;)V
      // 236: athrow
      // 237: return
      // try (170 -> 188): 188 java/lang/reflect/InvocationTargetException
      // try (168 -> 173): 174 java/lang/reflect/InvocationTargetException
      // try (117 -> 127): 128 java/lang/reflect/InvocationTargetException
      // try (109 -> 120): 121 java/lang/reflect/InvocationTargetException
      // try (103 -> 114): 115 java/lang/reflect/InvocationTargetException
      // try (101 -> 106): 107 java/lang/reflect/InvocationTargetException
      // try (76 -> 82): 82 java/lang/reflect/InvocationTargetException
      // try (40 -> 54): 54 java/lang/reflect/InvocationTargetException
      // try (35 -> 45): 46 java/lang/reflect/InvocationTargetException
      // try (190 -> 200): 201 java/lang/reflect/InvocationTargetException
      // try (0 -> 224): 225 java/lang/RuntimeException
      // try (0 -> 224): 239 java/lang/IllegalAccessException
      // try (226 -> 235): 235 java/lang/reflect/InvocationTargetException
   }

   protected final <PT> Option<PT> getProperty(@Nullable Map<String, ?> param1, @NotNull String param2, @NotNull Option<PT> param3, @NotNull Class<PT> param4) 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:
      // 00: aload 2
      // 01: ifnonnull 0f
      // 04: bipush 2
      // 05: invokestatic com/l7tech/external/assertions/gatewaymanagement/server/ResourceFactorySupport.a (I)V
      // 08: goto 0f
      // 0b: invokestatic com/l7tech/external/assertions/gatewaymanagement/server/ResourceFactorySupport.b (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 0e: athrow
      // 0f: aload 3
      // 10: ifnonnull 1e
      // 13: bipush 3
      // 14: invokestatic com/l7tech/external/assertions/gatewaymanagement/server/ResourceFactorySupport.a (I)V
      // 17: goto 1e
      // 1a: invokestatic com/l7tech/external/assertions/gatewaymanagement/server/ResourceFactorySupport.b (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 1d: athrow
      // 1e: aload 4
      // 20: ifnonnull 2e
      // 23: bipush 4
      // 24: invokestatic com/l7tech/external/assertions/gatewaymanagement/server/ResourceFactorySupport.a (I)V
      // 27: goto 2e
      // 2a: invokestatic com/l7tech/external/assertions/gatewaymanagement/server/ResourceFactorySupport.b (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 2d: athrow
      // 2e: aload 1
      // 2f: ifnull 84
      // 32: aload 1
      // 33: aload 2
      // 34: invokeinterface java/util/Map.get (Ljava/lang/Object;)Ljava/lang/Object; 2
      // 39: astore 6
      // 3b: aload 6
      // 3d: ifnull 7c
      // 40: aload 4
      // 42: aload 6
      // 44: invokevirtual java/lang/Class.isInstance (Ljava/lang/Object;)Z
      // 47: ifne 6d
      // 4a: goto 51
      // 4d: invokestatic com/l7tech/external/assertions/gatewaymanagement/server/ResourceFactorySupport.b (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 50: athrow
      // 51: new com/l7tech/external/assertions/gatewaymanagement/server/ResourceFactory$InvalidResourceException
      // 54: dup
      // 55: getstatic com/l7tech/external/assertions/gatewaymanagement/server/ResourceFactory$InvalidResourceException$ExceptionType.INVALID_VALUES Lcom/l7tech/external/assertions/gatewaymanagement/server/ResourceFactory$InvalidResourceException$ExceptionType;
      // 58: aload 2
      // 59: getstatic com/l7tech/external/assertions/gatewaymanagement/server/ResourceFactorySupport.D [Ljava/lang/String;
      // 5c: bipush 8
      // 5e: aaload
      // 5f: swap
      // 60: invokedynamic makeConcatWithConstants (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" ]
      // 65: invokespecial com/l7tech/external/assertions/gatewaymanagement/server/ResourceFactory$InvalidResourceException.<init> (Lcom/l7tech/external/assertions/gatewaymanagement/server/ResourceFactory$InvalidResourceException$ExceptionType;Ljava/lang/String;)V
      // 68: athrow
      // 69: invokestatic com/l7tech/external/assertions/gatewaymanagement/server/ResourceFactorySupport.b (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 6c: athrow
      // 6d: aload 4
      // 6f: aload 6
      // 71: invokevirtual java/lang/Class.cast (Ljava/lang/Object;)Ljava/lang/Object;
      // 74: invokestatic com/l7tech/util/Option.some (Ljava/lang/Object;)Lcom/l7tech/util/Option;
      // 77: astore 5
      // 79: goto 81
      // 7c: invokestatic com/l7tech/util/Option.none ()Lcom/l7tech/util/Option;
      // 7f: astore 5
      // 81: goto 89
      // 84: invokestatic com/l7tech/util/Option.none ()Lcom/l7tech/util/Option;
      // 87: astore 5
      // 89: aload 5
      // 8b: aload 3
      // 8c: invokevirtual com/l7tech/util/Option.orElse (Lcom/l7tech/util/Option;)Lcom/l7tech/util/Option;
      // 8f: areturn
      // try (0 -> 4): 5 com/l7tech/external/assertions/gatewaymanagement/server/ResourceFactory$InvalidResourceException
      // try (7 -> 11): 12 com/l7tech/external/assertions/gatewaymanagement/server/ResourceFactory$InvalidResourceException
      // try (14 -> 18): 19 com/l7tech/external/assertions/gatewaymanagement/server/ResourceFactory$InvalidResourceException
      // try (27 -> 33): 34 com/l7tech/external/assertions/gatewaymanagement/server/ResourceFactory$InvalidResourceException
      // try (29 -> 47): 47 com/l7tech/external/assertions/gatewaymanagement/server/ResourceFactory$InvalidResourceException
   }

   protected final String asName(String var1) {
      return (String)Option.optional(var1).map(TextUtils.trim()).toNull();
   }

   protected final String getFolderId(HasFolder var1) {
      String var2 = null;
      if (var1.getFolder() != null) {
         var2 = var1.getFolder().getId();
      }

      return var2;
   }

   protected final void checkPermitted(@NotNull OperationType var1, @Nullable String var2, @Nullable Entity var3) {
      try {
         if (var1 == null) {
            a(5);
         }
      } catch (IllegalStateException var5) {
         throw b(var5);
      }

      try {
         if (var3 == null) {
            return;
         }
      } catch (IllegalStateException var6) {
         throw b(var6);
      }

      EntityType var4 = EntityType.findTypeByEntity(var3.getClass());
      this.a(var1, var3, var4, var2, new ck(this, var3, var1, var2));
   }

   protected final void checkPermittedForSomeEntity(@NotNull OperationType var1, @NotNull EntityType var2) {
      try {
         if (var1 == null) {
            a(6);
         }
      } catch (IllegalStateException var3) {
         throw b(var3);
      }

      try {
         if (var2 == null) {
            a(7);
         }
      } catch (IllegalStateException var4) {
         throw b(var4);
      }

      this.a(var1, null, var2, null, new cl(this, var1, var2));
   }

   protected final void checkPermittedForAnyEntity(@NotNull OperationType var1, @NotNull EntityType var2) {
      try {
         if (var1 == null) {
            a(8);
         }
      } catch (IllegalStateException var3) {
         throw b(var3);
      }

      try {
         if (var2 == null) {
            a(9);
         }
      } catch (IllegalStateException var4) {
         throw b(var4);
      }

      this.a(var1, null, var2, null, new cm(this, var1, var2));
   }

   protected final <ET> List<ET> accessFilter(List<ET> param1, EntityType param2, OperationType param3, @Nullable String param4) throws FindException {
      // $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: invokestatic com/l7tech/server/util/JaasUtils.getCurrentUser ()Lcom/l7tech/identity/User;
      // 03: astore 6
      // 05: getstatic com/l7tech/gateway/common/security/rbac/OperationType.DELETE Lcom/l7tech/gateway/common/security/rbac/OperationType;
      // 08: aload 3
      // 09: invokevirtual com/l7tech/gateway/common/security/rbac/OperationType.equals (Ljava/lang/Object;)Z
      // 0c: ifne 20
      // 0f: getstatic com/l7tech/gateway/common/security/rbac/OperationType.UPDATE Lcom/l7tech/gateway/common/security/rbac/OperationType;
      // 12: aload 3
      // 13: invokevirtual com/l7tech/gateway/common/security/rbac/OperationType.equals (Ljava/lang/Object;)Z
      // 16: ifeq 32
      // 19: goto 20
      // 1c: invokestatic com/l7tech/external/assertions/gatewaymanagement/server/ResourceFactorySupport.b (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 1f: athrow
      // 20: new java/lang/IllegalArgumentException
      // 23: dup
      // 24: getstatic com/l7tech/external/assertions/gatewaymanagement/server/ResourceFactorySupport.D [Ljava/lang/String;
      // 27: bipush 32
      // 29: aaload
      // 2a: invokespecial java/lang/IllegalArgumentException.<init> (Ljava/lang/String;)V
      // 2d: athrow
      // 2e: invokestatic com/l7tech/external/assertions/gatewaymanagement/server/ResourceFactorySupport.b (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 31: athrow
      // 32: aload 6
      // 34: ifnull 6b
      // 37: aload 0
      // 38: getfield com/l7tech/external/assertions/gatewaymanagement/server/ResourceFactorySupport.b Lcom/l7tech/server/security/rbac/RbacServices;
      // 3b: aload 6
      // 3d: aload 3
      // 3e: aload 2
      // 3f: invokeinterface com/l7tech/server/security/rbac/RbacServices.isPermittedForAnyEntityOfType (Lcom/l7tech/identity/User;Lcom/l7tech/gateway/common/security/rbac/OperationType;Lcom/l7tech/objectmodel/EntityType;)Z 4
      // 44: ifeq 54
      // 47: goto 4e
      // 4a: invokestatic com/l7tech/external/assertions/gatewaymanagement/server/ResourceFactorySupport.b (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 4d: athrow
      // 4e: aload 1
      // 4f: astore 5
      // 51: goto 70
      // 54: aload 0
      // 55: getfield com/l7tech/external/assertions/gatewaymanagement/server/ResourceFactorySupport.c Lcom/l7tech/server/security/rbac/SecurityFilter;
      // 58: aload 1
      // 59: aload 6
      // 5b: aload 3
      // 5c: aload 4
      // 5e: invokeinterface com/l7tech/server/security/rbac/SecurityFilter.filter (Ljava/util/Collection;Lcom/l7tech/identity/User;Lcom/l7tech/gateway/common/security/rbac/OperationType;Ljava/lang/String;)Ljava/util/Collection; 5
      // 63: checkcast java/util/List
      // 66: astore 5
      // 68: goto 70
      // 6b: invokestatic java/util/Collections.emptyList ()Ljava/util/List;
      // 6e: astore 5
      // 70: aload 5
      // 72: areturn
      // try (2 -> 10): 11 com/l7tech/objectmodel/FindException
      // try (6 -> 20): 20 com/l7tech/objectmodel/FindException
      // try (22 -> 31): 32 com/l7tech/objectmodel/FindException
   }

   protected void handleObjectModelException(ObjectModelException var1) {
      throw new ResourceFactory.ResourceAccessException(ExceptionUtils.getMessage(var1), var1);
   }

   protected <R> R transactional(ResourceFactorySupport.TransactionalCallback<R> var1, boolean var2) {
      try {
         TransactionTemplate var3 = new TransactionTemplate(this.d);
         var3.setReadOnly(var2);
         return (R)var3.execute(new cn(this, var1));
      } catch (TransactionException var4) {
         throw new ResourceFactory.ResourceAccessException(ExceptionUtils.getMessage(var4), var4);
      } catch (DataAccessException var5) {
         throw new ResourceFactory.ResourceAccessException(ExceptionUtils.getMessage(var5), var5);
      }
   }

   ResourceFactorySupport(RbacServices var1, SecurityFilter var2, PlatformTransactionManager var3) {
      this.c = var2;
      this.b = var1;
      this.d = var3;
   }

   private void a(
      @NotNull OperationType param1,
      @Nullable Entity param2,
      @NotNull EntityType param3,
      @Nullable String param4,
      @NotNull UnaryThrows<Boolean, User, FindException> param5
   ) {
      // $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: ifnonnull 10
      // 04: bipush 10
      // 06: invokestatic com/l7tech/external/assertions/gatewaymanagement/server/ResourceFactorySupport.a (I)V
      // 09: goto 10
      // 0c: invokestatic com/l7tech/external/assertions/gatewaymanagement/server/ResourceFactorySupport.b (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 0f: athrow
      // 10: aload 3
      // 11: ifnonnull 20
      // 14: bipush 11
      // 16: invokestatic com/l7tech/external/assertions/gatewaymanagement/server/ResourceFactorySupport.a (I)V
      // 19: goto 20
      // 1c: invokestatic com/l7tech/external/assertions/gatewaymanagement/server/ResourceFactorySupport.b (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 1f: athrow
      // 20: aload 5
      // 22: ifnonnull 31
      // 25: bipush 12
      // 27: invokestatic com/l7tech/external/assertions/gatewaymanagement/server/ResourceFactorySupport.a (I)V
      // 2a: goto 31
      // 2d: invokestatic com/l7tech/external/assertions/gatewaymanagement/server/ResourceFactorySupport.b (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 30: athrow
      // 31: invokestatic com/l7tech/server/util/JaasUtils.getCurrentUser ()Lcom/l7tech/identity/User;
      // 34: invokestatic com/l7tech/util/Option.optional (Ljava/lang/Object;)Lcom/l7tech/util/Option;
      // 37: astore 6
      // 39: aload 6
      // 3b: aload 5
      // 3d: invokevirtual com/l7tech/util/Option.exists (Lcom/l7tech/util/Functions$UnaryThrows;)Z
      // 40: ifne 74
      // 43: aload 4
      // 45: ifnull 6a
      // 48: goto 4f
      // 4b: invokestatic com/l7tech/external/assertions/gatewaymanagement/server/ResourceFactorySupport.b (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 4e: athrow
      // 4f: aload 2
      // 50: ifnull 6a
      // 53: goto 5a
      // 56: invokestatic com/l7tech/external/assertions/gatewaymanagement/server/ResourceFactorySupport.b (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 59: athrow
      // 5a: new com/l7tech/gateway/common/security/rbac/PermissionDeniedException
      // 5d: dup
      // 5e: aload 1
      // 5f: aload 2
      // 60: aload 4
      // 62: invokespecial com/l7tech/gateway/common/security/rbac/PermissionDeniedException.<init> (Lcom/l7tech/gateway/common/security/rbac/OperationType;Lcom/l7tech/objectmodel/Entity;Ljava/lang/String;)V
      // 65: athrow
      // 66: invokestatic com/l7tech/external/assertions/gatewaymanagement/server/ResourceFactorySupport.b (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 69: athrow
      // 6a: new com/l7tech/gateway/common/security/rbac/PermissionDeniedException
      // 6d: dup
      // 6e: aload 1
      // 6f: aload 3
      // 70: invokespecial com/l7tech/gateway/common/security/rbac/PermissionDeniedException.<init> (Lcom/l7tech/gateway/common/security/rbac/OperationType;Lcom/l7tech/objectmodel/EntityType;)V
      // 73: athrow
      // 74: goto 91
      // 77: astore 7
      // 79: new com/l7tech/gateway/common/security/rbac/PermissionDeniedException
      // 7c: dup
      // 7d: aload 1
      // 7e: aload 3
      // 7f: getstatic com/l7tech/external/assertions/gatewaymanagement/server/ResourceFactorySupport.D [Ljava/lang/String;
      // 82: bipush 22
      // 84: aaload
      // 85: invokespecial com/l7tech/gateway/common/security/rbac/PermissionDeniedException.<init> (Lcom/l7tech/gateway/common/security/rbac/OperationType;Lcom/l7tech/objectmodel/EntityType;Ljava/lang/String;)V
      // 88: aload 7
      // 8a: invokevirtual com/l7tech/gateway/common/security/rbac/PermissionDeniedException.initCause (Ljava/lang/Throwable;)Ljava/lang/Throwable;
      // 8d: checkcast com/l7tech/gateway/common/security/rbac/PermissionDeniedException
      // 90: athrow
      // 91: return
      // try (33 -> 45): 45 com/l7tech/objectmodel/FindException
      // try (28 -> 35): 36 com/l7tech/objectmodel/FindException
      // try (24 -> 30): 31 com/l7tech/objectmodel/FindException
      // try (14 -> 18): 19 com/l7tech/objectmodel/FindException
      // try (7 -> 11): 12 com/l7tech/objectmodel/FindException
      // try (0 -> 4): 5 com/l7tech/objectmodel/FindException
      // try (24 -> 53): 54 com/l7tech/objectmodel/FindException
   }

   static {
      String[] var5 = new String[34];
      int var3 = 0;
      String var2 = ".\u001c\u001fZ\\M\f9\u0000&P@c\r/\u0010$N)\u001c\"\u0010B\u0017\u0011/\u0010'\u0010KX\u0011/\u0001!^B\u000f\u00049\u0000*MZI\n$\u0000`XOT\u0000=\u00126RON\u0004-\u0016\"Z@TJ9\u0016=IKRJ\u0018\u0016<P[R\u0006/5.\\ZO\u00173 :O^O\u0017>>\u000b\u0001(JCE\u000b>S)P\\\u0000%\u0004\u001c;q[L\tj\u0003.MOM\u0000>\u0016=\u001f\t\u0005\u0016mS Y\u000e\u0005\u0016dV<\u001fCU\u0016>S!PZ\u0000\u0007/S!JBL\r-\u0016;o\\O\u0015/\u0001;VKS\n/\u001d;VZY13\u0003*\t\u0018\u0016.[\u000eO\u000b&\n\u0002m]\f:\u0001 OKR\u00113=.RK\u001b\u0003\u001d9^BI\u0001j\u0005.S[EE,\u001c=\u001f^R\n:\u0016=KW\u0000\u0019\u001f\u001d$QAW\u000bj\u0016!KGT\u001cj\u0003=P^E\u0017>\no\u0018\t\u0018\u0016.[\u000eO\u000b&\n\u001a)\u001b*\\Ep\u00008\u001e&KZE\u0001\f\u001c=~@Y $\u0007&KW\u001b\u001f\u001d<J^P\n8\u0007*[\u000eP\u0017%\u0003*MZYE>\n?Z\u000e\u0007\f.\u0016)^[L\u0011\u001c\u0012#JK\u0019\u001f\u001d$QAW\u000bj\u0016!KGT\u001cj\u0003=P^E\u0017>\no\u0018\u0004(\u0016.Q\u0010mS)P\\\u0000\u00158\u001c?Z\\T\u001cjT\u0012\u001f\u001d<J^P\n8\u0007*[\u000eT\u001c:\u0016o\u0018\u0002mZ\u000e)\u001b*\\Ep\u00008\u001e&KZE\u0001\u001b\u0007\u001a<LGN\u0002j\u0001*N[I\u0017/\u0017oO\\O\u0015/\u0001;F\u000e\u0007\u000b-\u0016;o\\O\u0015/\u0001;F\u001a\u000f\u0001=P\\\u0000\f$S?Z\\M\f9\u0000&P@\u0000\u0006\"\u0016,T\u0000\u0002m]\rmSgMKQ\u0010#\u0001*L\u000e\u0007B)\u001c\"\u0011B\u0017\u0011/\u0010'\u0011KX\u0011/\u0001!^B\u000e\u00049\u0000*MZI\n$\u0000aXOT\u0000=\u00126RON\u0004-\u0016\"Z@TK<\u0012#VJA\u0011#\u001c!z@A\u0007&\u0016+\u001b)\u001b*\\Ep\u00008\u001e&KZE\u0001\f\u001c=lAM\u0000\u000f\u001d;VZY\n:\u0016=RGS\u0016#\u001c!\t(\u0016.QmL\u00049\u0000\r:\u0001 OKR\u001130#^]S\u0018\u000f\u0001=P\\\u0000\u0016/\u0007;V@GE:\u0001 OKR\u00113Sh\fmS;P\u000eV\u0004&\u0006*\u0005\u000e";
      int var4 = ".\u001c\u001fZ\\M\f9\u0000&P@c\r/\u0010$N)\u001c\"\u0010B\u0017\u0011/\u0010'\u0010KX\u0011/\u0001!^B\u000f\u00049\u0000*MZI\n$\u0000`XOT\u0000=\u00126RON\u0004-\u0016\"Z@TJ9\u0016=IKRJ\u0018\u0016<P[R\u0006/5.\\ZO\u00173 :O^O\u0017>>\u000b\u0001(JCE\u000b>S)P\\\u0000%\u0004\u001c;q[L\tj\u0003.MOM\u0000>\u0016=\u001f\t\u0005\u0016mS Y\u000e\u0005\u0016dV<\u001fCU\u0016>S!PZ\u0000\u0007/S!JBL\r-\u0016;o\\O\u0015/\u0001;VKS\n/\u001d;VZY13\u0003*\t\u0018\u0016.[\u000eO\u000b&\n\u0002m]\f:\u0001 OKR\u00113=.RK\u001b\u0003\u001d9^BI\u0001j\u0005.S[EE,\u001c=\u001f^R\n:\u0016=KW\u0000\u0019\u001f\u001d$QAW\u000bj\u0016!KGT\u001cj\u0003=P^E\u0017>\no\u0018\t\u0018\u0016.[\u000eO\u000b&\n\u001a)\u001b*\\Ep\u00008\u001e&KZE\u0001\f\u001c=~@Y $\u0007&KW\u001b\u001f\u001d<J^P\n8\u0007*[\u000eP\u0017%\u0003*MZYE>\n?Z\u000e\u0007\f.\u0016)^[L\u0011\u001c\u0012#JK\u0019\u001f\u001d$QAW\u000bj\u0016!KGT\u001cj\u0003=P^E\u0017>\no\u0018\u0004(\u0016.Q\u0010mS)P\\\u0000\u00158\u001c?Z\\T\u001cjT\u0012\u001f\u001d<J^P\n8\u0007*[\u000eT\u001c:\u0016o\u0018\u0002mZ\u000e)\u001b*\\Ep\u00008\u001e&KZE\u0001\u001b\u0007\u001a<LGN\u0002j\u0001*N[I\u0017/\u0017oO\\O\u0015/\u0001;F\u000e\u0007\u000b-\u0016;o\\O\u0015/\u0001;F\u001a\u000f\u0001=P\\\u0000\f$S?Z\\M\f9\u0000&P@\u0000\u0006\"\u0016,T\u0000\u0002m]\rmSgMKQ\u0010#\u0001*L\u000e\u0007B)\u001c\"\u0011B\u0017\u0011/\u0010'\u0011KX\u0011/\u0001!^B\u000e\u00049\u0000*MZI\n$\u0000aXOT\u0000=\u00126RON\u0004-\u0016\"Z@TK<\u0012#VJA\u0011#\u001c!z@A\u0007&\u0016+\u001b)\u001b*\\Ep\u00008\u001e&KZE\u0001\f\u001c=lAM\u0000\u000f\u001d;VZY\n:\u0016=RGS\u0016#\u001c!\t(\u0016.QmL\u00049\u0000\r:\u0001 OKR\u001130#^]S\u0018\u000f\u0001=P\\\u0000\u0016/\u0007;V@GE:\u0001 OKR\u00113Sh\fmS;P\u000eV\u0004&\u0006*\u0005\u000e"
         .length();
      char var1 = 17;
      int var7 = -1;

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

         while (true) {
            String var8 = a(var10000, d(var10001));
            switch (var10002) {
               case 0:
                  var5[var3++] = var8;
                  if ((var7 += var1) >= var4) {
                     D = var5;
                     a = ConfigFactory.getBooleanProperty(D[25], true);
                     return;
                  }

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

                  var2 = "mxG7/'uGxE{,-mZrY2$#!CvR{$+u\u000euN{j\"n\\7o\u001e\u0006\u0001Uk7D)j\u0011QjV\u007f\u001ej+qKeJ/#+o]\rAgN)+0hAy\u007f\":!";
                  var4 = "mxG7/'uGxE{,-mZrY2$#!CvR{$+u\u000euN{j\"n\\7o\u001e\u0006\u0001Uk7D)j\u0011QjV\u007f\u001ej+qKeJ/#+o]\rAgN)+0hAy\u007f\":!".length();
                  var1 = '@';
                  var7 = -1;
            }

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

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

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

      return var10000;
   }

   private static String a(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 -> 69;
            case 1 -> 124;
            case 2 -> 64;
            case 3 -> 48;
            case 4 -> 33;
            case 5 -> 47;
            default -> 106;
         });
      }

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

   protected interface TransactionalCallback<R> {
      R execute() throws ObjectModelException;
   }
}
