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.Pair;
import java.util.Collection;

class g implements ResourceFactorySupport.TransactionalCallback<Either<ResourceFactory.InvalidResourceException, String>> {
   final Object val$resource;
   final ClusterPropertyBackedResourceFactory this$0;

   g(ClusterPropertyBackedResourceFactory var1, Object var2) {
      this.this$0 = var1;
      this.val$resource = var2;
   }

   public Either<ResourceFactory.InvalidResourceException, String> execute() throws ObjectModelException {
      try {
         Pair var1 = this.this$0.internalFromResource(this.val$resource);
         ClusterProperty var2 = this.this$0.c();
         Collection var3 = this.this$0.a(var2);
         Collection var4 = this.this$0.a(var1.left, var3);
         this.this$0.a(var2, this.this$0.a(var4));
         return Either.right(this.this$0.b(var1.left));
      } catch (ResourceFactory.InvalidResourceException var5) {
         return Either.left(var5);
      }
   }
}
