Search in sources :

Example 26 with JarRuntimeInfo

use of org.talend.components.api.component.runtime.JarRuntimeInfo in project components by Talend.

the class ElasticsearchInputDefinition method getRuntimeInfo.

@Override
public RuntimeInfo getRuntimeInfo(ExecutionEngine engine, ComponentProperties properties, ConnectorTopology connectorTopology) {
    assertEngineCompatibility(engine);
    assertConnectorTopologyCompatibility(connectorTopology);
    try {
        switch(((ElasticsearchInputProperties) properties).getDatasetProperties().getDatastoreProperties().version.getValue()) {
            case V_2_4:
            default:
                return new JarRuntimeInfo(new URL(MAVEN_RUNTIME_URI), DependenciesReader.computeDependenciesFilePath(MAVEN_GROUP_ID, MAVEN_RUNTIME_ARTIFACT_ID), RUNTIME_2_4);
        }
    } catch (MalformedURLException e) {
        throw new ComponentException(e);
    }
}
Also used : MalformedURLException(java.net.MalformedURLException) ComponentException(org.talend.components.api.exception.ComponentException) JarRuntimeInfo(org.talend.components.api.component.runtime.JarRuntimeInfo) URL(java.net.URL)

Example 27 with JarRuntimeInfo

use of org.talend.components.api.component.runtime.JarRuntimeInfo in project components by Talend.

the class SimpleFileIOInputDefinition method getRuntimeInfo.

@Override
public RuntimeInfo getRuntimeInfo(ExecutionEngine engine, ComponentProperties properties, ConnectorTopology connectorTopology) {
    assertEngineCompatibility(engine);
    assertConnectorTopologyCompatibility(connectorTopology);
    try {
        return new JarRuntimeInfo(new URL(SimpleFileIOComponentFamilyDefinition.MAVEN_DEFAULT_RUNTIME_URI), DependenciesReader.computeDependenciesFilePath(SimpleFileIOComponentFamilyDefinition.MAVEN_GROUP_ID, SimpleFileIOComponentFamilyDefinition.MAVEN_DEFAULT_RUNTIME_ARTIFACT_ID), RUNTIME);
    } catch (MalformedURLException e) {
        throw new ComponentException(e);
    }
}
Also used : MalformedURLException(java.net.MalformedURLException) ComponentException(org.talend.components.api.exception.ComponentException) JarRuntimeInfo(org.talend.components.api.component.runtime.JarRuntimeInfo) URL(java.net.URL)

Example 28 with JarRuntimeInfo

use of org.talend.components.api.component.runtime.JarRuntimeInfo in project components by Talend.

the class KafkaInputDefinition method getRuntimeInfo.

@Override
public RuntimeInfo getRuntimeInfo(ExecutionEngine engine, ComponentProperties properties, ConnectorTopology connectorTopology) {
    assertEngineCompatibility(engine);
    assertConnectorTopologyCompatibility(connectorTopology);
    try {
        return new JarRuntimeInfo(new URL(KafkaFamilyDefinition.MAVEN_DEFAULT_RUNTIME_URI), DependenciesReader.computeDependenciesFilePath(KafkaFamilyDefinition.MAVEN_GROUP_ID, KafkaFamilyDefinition.MAVEN_DEFAULT_RUNTIME_ARTIFACT_ID), RUNTIME);
    } catch (MalformedURLException e) {
        throw new ComponentException(e);
    }
}
Also used : MalformedURLException(java.net.MalformedURLException) ComponentException(org.talend.components.api.exception.ComponentException) JarRuntimeInfo(org.talend.components.api.component.runtime.JarRuntimeInfo) URL(java.net.URL)

Example 29 with JarRuntimeInfo

use of org.talend.components.api.component.runtime.JarRuntimeInfo in project components by Talend.

the class KafkaOutputDefinition method getRuntimeInfo.

@Override
public RuntimeInfo getRuntimeInfo(ExecutionEngine engine, ComponentProperties properties, ConnectorTopology connectorTopology) {
    assertEngineCompatibility(engine);
    assertConnectorTopologyCompatibility(connectorTopology);
    try {
        return new JarRuntimeInfo(new URL(KafkaFamilyDefinition.MAVEN_DEFAULT_RUNTIME_URI), DependenciesReader.computeDependenciesFilePath(KafkaFamilyDefinition.MAVEN_GROUP_ID, KafkaFamilyDefinition.MAVEN_DEFAULT_RUNTIME_ARTIFACT_ID), RUNTIME);
    } catch (MalformedURLException e) {
        throw new ComponentException(e);
    }
}
Also used : MalformedURLException(java.net.MalformedURLException) ComponentException(org.talend.components.api.exception.ComponentException) JarRuntimeInfo(org.talend.components.api.component.runtime.JarRuntimeInfo) URL(java.net.URL)

Example 30 with JarRuntimeInfo

use of org.talend.components.api.component.runtime.JarRuntimeInfo in project components by Talend.

the class FixedInputDefinition method getRuntimeInfo.

@Override
public RuntimeInfo getRuntimeInfo(ExecutionEngine engine, ComponentProperties properties, ConnectorTopology connectorTopology) {
    assertEngineCompatibility(engine);
    assertConnectorTopologyCompatibility(connectorTopology);
    try {
        return new JarRuntimeInfo(new URL(LocalIOComponentFamilyDefinition.MAVEN_DEFAULT_RUNTIME_URI), DependenciesReader.computeDependenciesFilePath(LocalIOComponentFamilyDefinition.MAVEN_GROUP_ID, LocalIOComponentFamilyDefinition.MAVEN_DEFAULT_RUNTIME_ARTIFACT_ID), RUNTIME);
    } catch (MalformedURLException e) {
        throw new ComponentException(e);
    }
}
Also used : MalformedURLException(java.net.MalformedURLException) ComponentException(org.talend.components.api.exception.ComponentException) JarRuntimeInfo(org.talend.components.api.component.runtime.JarRuntimeInfo) URL(java.net.URL)

Aggregations

JarRuntimeInfo (org.talend.components.api.component.runtime.JarRuntimeInfo)44 URL (java.net.URL)28 MalformedURLException (java.net.MalformedURLException)27 ComponentException (org.talend.components.api.exception.ComponentException)27 RuntimeInfo (org.talend.daikon.runtime.RuntimeInfo)7 Test (org.junit.Test)5 File (java.io.File)1 IOException (java.io.IOException)1 ArrayList (java.util.ArrayList)1 Bundle (org.osgi.framework.Bundle)1 BusinessException (org.talend.commons.exception.BusinessException)1 ConnectorTopology (org.talend.components.api.component.ConnectorTopology)1 NetSuiteConnectionProperties (org.talend.components.netsuite.connection.NetSuiteConnectionProperties)1 ModuleNeeded (org.talend.core.model.general.ModuleNeeded)1 MavenArtifact (org.talend.core.runtime.maven.MavenArtifact)1