/*
 * Decompiled with CFR 0.152.
 * 
 * Could not load the following classes:
 *  com.l7tech.objectmodel.migration.PropertyResolver
 *  com.l7tech.objectmodel.migration.PropertyResolver$Type
 */
package com.l7tech.server.migration;

import com.l7tech.objectmodel.migration.PropertyResolver;
import com.l7tech.server.EntityFinder;
import com.l7tech.server.ServerConfig;
import com.l7tech.server.cassandra.CassandraConnectionEntityManager;
import com.l7tech.server.cluster.ClusterPropertyManager;
import com.l7tech.server.globalresources.ResourceEntryManager;
import com.l7tech.server.jdbc.JdbcConnectionManager;
import com.l7tech.server.migration.AssertionPropertyResolver;
import com.l7tech.server.migration.CassandraConnectionPropertyResolver;
import com.l7tech.server.migration.DefaultEntityPropertyResolver;
import com.l7tech.server.migration.JdbcConnectionPropertyResolver;
import com.l7tech.server.migration.PolicyPropertyResolver;
import com.l7tech.server.migration.ResourceEntryPropertyResolver;
import com.l7tech.server.migration.ServerVariablePropertyResolver;
import com.l7tech.server.migration.ServiceDocumentResolver;
import com.l7tech.server.migration.SsgKeyResolver;
import com.l7tech.server.migration.UserGroupResolver;
import com.l7tech.server.migration.ValueReferencePropertyResolver;
import com.l7tech.server.migration.a;
import com.l7tech.server.migration.b;
import com.l7tech.server.migration.c;
import com.l7tech.server.migration.d;
import com.l7tech.server.security.keystore.SsgKeyStoreManager;
import com.l7tech.server.service.ServiceDocumentManager;
import java.util.HashMap;
import java.util.Map;

public class PropertyResolverFactory {
    private EntityFinder a;
    private SsgKeyStoreManager b;
    private ServiceDocumentManager c;
    private ClusterPropertyManager d;
    private ResourceEntryManager e;
    private ServerConfig f;
    private JdbcConnectionManager g;
    private CassandraConnectionEntityManager h;
    private Map<PropertyResolver.Type, PropertyResolver> i = new HashMap<PropertyResolver.Type, PropertyResolver>();

    public PropertyResolverFactory(EntityFinder entityFinder, ServiceDocumentManager serviceDocumentManager, SsgKeyStoreManager ssgKeyStoreManager, ClusterPropertyManager clusterPropertyManager, ResourceEntryManager resourceEntryManager, ServerConfig serverConfig, JdbcConnectionManager jdbcConnectionManager, CassandraConnectionEntityManager cassandraConnectionEntityManager) {
        this.a = entityFinder;
        this.b = ssgKeyStoreManager;
        this.c = serviceDocumentManager;
        this.d = clusterPropertyManager;
        this.e = resourceEntryManager;
        this.f = serverConfig;
        this.g = jdbcConnectionManager;
        this.h = cassandraConnectionEntityManager;
        this.a();
    }

    private void a() {
        this.a(new DefaultEntityPropertyResolver(this, PropertyResolver.Type.DEFAULT));
        this.a(new ServiceDocumentResolver(this, PropertyResolver.Type.SERVICE_DOCUMENT, this.c));
        this.a(new a(this, this, PropertyResolver.Type.SERVICE, this.a));
        this.a(new b(this, this, PropertyResolver.Type.SERVICE_ALIAS, this.a));
        this.a(new PolicyPropertyResolver(this, PropertyResolver.Type.POLICY));
        this.a(new c(this, this, PropertyResolver.Type.POLICY_ALIAS, this.a));
        this.a(new AssertionPropertyResolver(this, PropertyResolver.Type.ASSERTION));
        this.a(new d(this, this, PropertyResolver.Type.ID_PROVIDER_CONFIG, this.a));
        this.a(new UserGroupResolver(this, PropertyResolver.Type.USERGROUP));
        this.a(new ValueReferencePropertyResolver(this, PropertyResolver.Type.VALUE_REFERENCE));
        this.a(new SsgKeyResolver(this, PropertyResolver.Type.SSGKEY, this.b));
        this.a(new ServerVariablePropertyResolver(this, PropertyResolver.Type.SERVER_VARIABLE, this.d, this.f));
        this.a(new ResourceEntryPropertyResolver(this, PropertyResolver.Type.RESOURCE_ENTRY, this.e));
        this.a(new JdbcConnectionPropertyResolver(this, PropertyResolver.Type.JDBC_CONNECTION, this.g));
        this.a(new CassandraConnectionPropertyResolver(this, PropertyResolver.Type.CASSANDRA_CONNECTION, this.h));
    }

    private void a(PropertyResolver propertyResolver) {
        this.i.put(propertyResolver.getType(), propertyResolver);
    }

    public PropertyResolver getPropertyResolver(PropertyResolver.Type type) {
        return this.i.get(type);
    }
}

