<commit_before>package alien4cloud.paas.cloudify2;

import org.springframework.beans.factory.config.BeanDefinition;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Component;

import alien4cloud.model.cloud.CloudResourceMatcherConfig;
import alien4cloud.paas.IManualResourceMatcherPaaSProvider;
import alien4cloud.paas.exception.PluginConfigurationException;

@Component("cloudify-paas-provider-bean")
@Scope(BeanDefinition.SCOPE_PROTOTYPE)
public class CloudifyPaaSProvider extends AbstractCloudifyPaaSProvider<PluginConfigurationBean> implements IManualResourceMatcherPaaSProvider {

    private PluginConfigurationBean configurationBean = new PluginConfigurationBean();

    @Override
    protected PluginConfigurationBean getPluginConfigurationBean() {
        return configurationBean;
    }

    @Override
    public PluginConfigurationBean getDefaultConfiguration() {
        return configurationBean;
    }

    @Override
    public void setConfiguration(PluginConfigurationBean configuration) throws PluginConfigurationException {
        this.configurationBean = configuration;
        this.cloudifyRestClientManager.setCloudifyConnectionConfiguration(configuration.getCloudifyConnectionConfiguration());
        configureDefault();
    }

    @Override
    public void updateMatcherConfig(CloudResourceMatcherConfig cloudResourceMatcherConfig) {
        this.recipeGenerator.getPaaSResourceMatcher().configure(cloudResourceMatcherConfig);
    }
}<commit_msg>ALIEN-538 : As a USER I want to be able to use Cloudify 3 as a cloud deployer. Events<commit_after>package alien4cloud.paas.cloudify2;

import org.springframework.beans.factory.config.BeanDefinition;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Component;

import alien4cloud.model.cloud.CloudResourceMatcherConfig;
import alien4cloud.model.cloud.CloudResourceType;
import alien4cloud.paas.IManualResourceMatcherPaaSProvider;
import alien4cloud.paas.exception.PluginConfigurationException;

@Component("cloudify-paas-provider-bean")
@Scope(BeanDefinition.SCOPE_PROTOTYPE)
public class CloudifyPaaSProvider extends AbstractCloudifyPaaSProvider<PluginConfigurationBean> implements IManualResourceMatcherPaaSProvider {

    private PluginConfigurationBean configurationBean = new PluginConfigurationBean();

    @Override
    protected PluginConfigurationBean getPluginConfigurationBean() {
        return configurationBean;
    }

    @Override
    public PluginConfigurationBean getDefaultConfiguration() {
        return configurationBean;
    }

    @Override
    public void setConfiguration(PluginConfigurationBean configuration) throws PluginConfigurationException {
        this.configurationBean = configuration;
        this.cloudifyRestClientManager.setCloudifyConnectionConfiguration(configuration.getCloudifyConnectionConfiguration());
        configureDefault();
    }

    @Override
    public void updateMatcherConfig(CloudResourceMatcherConfig cloudResourceMatcherConfig) {
        this.recipeGenerator.getPaaSResourceMatcher().configure(cloudResourceMatcherConfig);
    }

    @Override
    public String[] getAvailableResourceIds(CloudResourceType resourceType) {
        return null;
    }
}
{'fraction_non_alphanumeric': 0.06338028169014084, 'fraction_numerical': 0.004592774035517453, 'mean_word_length': 5.8924050632911396, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1890431', 'n_tokens_mistral': 790, 'n_tokens_neox': 760, 'n_words': 140}