All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.servicerocket.confluence.plugin.utility.library.EnvironmentProviderModuleDescriptorFactory Maven / Gradle / Ivy

The newest version!
package com.servicerocket.confluence.plugin.utility.library;

import com.atlassian.plugin.ModuleDescriptor;
import com.atlassian.plugin.hostcontainer.HostContainer;
import com.atlassian.plugin.module.ModuleFactory;
import com.atlassian.plugin.osgi.external.SingleModuleDescriptorFactory;
import com.servicerocket.confluence.randombits.support.core.env.EnvironmentProvider;

/**
 * Constructs a new {@link EnvironmentProviderModuleDescriptor}s.
 */
public class EnvironmentProviderModuleDescriptorFactory extends SingleModuleDescriptorFactory {

    private final ModuleFactory moduleFactory;

    public EnvironmentProviderModuleDescriptorFactory(HostContainer hostContainer, ModuleFactory moduleFactory) {
        super(hostContainer, "environment-provider", EnvironmentProviderModuleDescriptor.class);
        this.moduleFactory = moduleFactory;
    }


    @Override
    public ModuleDescriptor getModuleDescriptor(String type) {
        return hasModuleDescriptor(type) ? new EnvironmentProviderModuleDescriptor(moduleFactory) : null;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy