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

import com.l7tech.gateway.common.cluster.ClusterProperty;
import com.l7tech.objectmodel.ObjectModelException;
import com.l7tech.util.Either;
import com.l7tech.util.Option;
import java.util.Collection;
import java.util.Map;

class r implements ResourceFactorySupport.TransactionalCallback<Either<ResourceFactory.ResourceNotFoundException, String>> {
   final Map val$selectorMap;
   final ClusterPropertyBackedResourceFactory this$0;

   r(ClusterPropertyBackedResourceFactory var1, Map var2) {
      this.this$0 = var1;
      this.val$selectorMap = var2;
   }

   public Either<ResourceFactory.ResourceNotFoundException, String> execute() throws ObjectModelException {
      try {
         ClusterProperty var1 = this.this$0.a(false, this.val$selectorMap.toString());
         Collection var2 = this.this$0.a(var1);
         Option var3 = this.this$0.a(this.val$selectorMap, var2);
         Collection var4 = this.this$0.a(this.val$selectorMap, var3, var2);
         this.this$0.a(var1, this.this$0.a(var4));
         return Either.right(this.this$0.b(var3.some()));
      } catch (ResourceFactory.ResourceNotFoundException var5) {
         return Either.left(var5);
      }
   }
}
