package com.l7tech.server.service;

import com.l7tech.gateway.common.uddi.UDDIRegistry;
import com.l7tech.objectmodel.FindException;
import com.l7tech.objectmodel.Goid;
import com.l7tech.uddi.WsdlPortInfo;
import java.util.concurrent.Callable;

class s implements Callable<WsdlPortInfo[]> {
   final Goid val$registryGoid;
   final String val$serviceKey;
   final boolean val$getFirstOnly;
   final ServiceAdminImpl this$0;
   private static final String a;

   s(ServiceAdminImpl var1, Goid var2, String var3, boolean var4) {
      this.this$0 = var1;
      this.val$registryGoid = var2;
      this.val$serviceKey = var3;
      this.val$getFirstOnly = var4;
   }

   public WsdlPortInfo[] call() throws Exception {
      UDDIRegistry var1 = this.this$0.s.findByPrimaryKey(this.val$registryGoid);

      try {
         if (var1 == null) {
            throw new FindException(a + this.val$registryGoid);
         }
      } catch (Exception var2) {
         throw a(var2);
      }

      return this.this$0.a(var1, new t(this));
   }

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

   static {
      String var10002 = a(101, a(".iR\tFc<GuA\u000fCy,\u0015~\u0004"));
      byte var10001 = -1;
      a = var10002;
   }

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

      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 -> 2;
            case 1 -> 98;
            case 2 -> 65;
            case 3 -> 13;
            case 4 -> 79;
            case 5 -> 111;
            default -> 61;
         });
      }

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