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

ru.yandex.qatools.camelot.common.builders.BasicPluginUriBuilder Maven / Gradle / Ivy

There is a newer version: 2.5.4
Show newest version
package ru.yandex.qatools.camelot.common.builders;

import ru.yandex.qatools.camelot.common.PluginUriBuilder;
import ru.yandex.qatools.camelot.config.Plugin;

import static org.apache.commons.lang3.StringUtils.isEmpty;

/**
 * @author Ilya Sadykov
 */
public class BasicPluginUriBuilder implements PluginUriBuilder {

    @Override
    public String broadcastUri(String pluginId, String suffix) {
        return localUri(pluginId, suffix);
    }

    @Override
    public String localUri(String pluginId, String suffix) {
        return "seda:plugin." + pluginId + ((isEmpty(suffix)) ? "" : "." + suffix);
    }

    @Override
    public String pluginInputUri(Plugin plugin, String suffix, String brokerConfig) {
        return plugin.getBaseInputUri() +
                "." + plugin.getId() +
                ((isEmpty(suffix)) ? "" : "." + suffix) +
                ((isEmpty(brokerConfig)) ? "" : suffix);
    }

    @Override
    public String tmpInputBufferUri() {
        return localUri("tmp", "input");
    }

    @Override
    public String frontendBroadcastUri() {
        return localUri("frontend", "input");
    }

    @Override
    public String basePluginInputUri() {
        return "seda:plugin";
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy