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

import com.l7tech.gateway.api.PrivateKeyMO;
import com.l7tech.objectmodel.ObjectModelException;
import com.l7tech.util.Either;
import com.l7tech.util.Option;
import com.l7tech.util.Pair;

class bo implements ResourceFactorySupport.TransactionalCallback<Either<ResourceFactory.InvalidResourceException, PrivateKeyMO>> {
   final Pair val$keyId;
   final PrivateKeyResourceFactory this$0;

   bo(PrivateKeyResourceFactory var1, Pair var2) {
      this.this$0 = var1;
      this.val$keyId = var2;
   }

   public Either<ResourceFactory.InvalidResourceException, PrivateKeyMO> execute() throws ObjectModelException {
      try {
         return Either.right(this.this$0.a(this.this$0.a(this.val$keyId), Option.none()));
      } catch (ResourceFactory.ResourceNotFoundException var2) {
         throw new ResourceFactory.ResourceAccessException(var2);
      }
   }
}
