Search in sources :

Example 31 with JarRuntimeInfo

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

the class FixedFlowInputDefinition 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)

Example 32 with JarRuntimeInfo

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

the class NetSuiteConnectionDefinitionTest method testGetRuntimeInfo.

@Test
public void testGetRuntimeInfo() {
    NetSuiteConnectionProperties properties = new NetSuiteConnectionProperties("test");
    properties.initForRuntime();
    RuntimeInfo runtimeInfo = definition.getRuntimeInfo(ExecutionEngine.DI, properties, ConnectorTopology.NONE);
    assertNotNull(runtimeInfo);
    assertThat(runtimeInfo, instanceOf(JarRuntimeInfo.class));
    JarRuntimeInfo jarRuntimeInfo = (JarRuntimeInfo) runtimeInfo;
    assertThat(jarRuntimeInfo.getRuntimeClassName(), endsWith(".NetSuiteSourceOrSinkImpl"));
}
Also used : RuntimeInfo(org.talend.daikon.runtime.RuntimeInfo) JarRuntimeInfo(org.talend.components.api.component.runtime.JarRuntimeInfo) JarRuntimeInfo(org.talend.components.api.component.runtime.JarRuntimeInfo) Test(org.junit.Test)

Example 33 with JarRuntimeInfo

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

the class NetSuiteOutputDefinitionTest method testRuntimeInfoForIncoming.

@Test
public void testRuntimeInfoForIncoming() {
    NetSuiteOutputProperties properties = new NetSuiteOutputProperties("test");
    properties.initForRuntime();
    RuntimeInfo runtimeInfo = definition.getRuntimeInfo(ExecutionEngine.DI, properties, ConnectorTopology.INCOMING);
    assertNotNull(runtimeInfo);
    assertThat(runtimeInfo, instanceOf(JarRuntimeInfo.class));
    JarRuntimeInfo jarRuntimeInfo = (JarRuntimeInfo) runtimeInfo;
    assertThat(jarRuntimeInfo.getRuntimeClassName(), endsWith(".NetSuiteSinkImpl"));
}
Also used : JarRuntimeInfo(org.talend.components.api.component.runtime.JarRuntimeInfo) RuntimeInfo(org.talend.daikon.runtime.RuntimeInfo) JarRuntimeInfo(org.talend.components.api.component.runtime.JarRuntimeInfo) Test(org.junit.Test)

Example 34 with JarRuntimeInfo

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

the class NetSuiteOutputDefinitionTest method testRuntimeInfoForIncomingAndOutgoing.

@Test
public void testRuntimeInfoForIncomingAndOutgoing() {
    NetSuiteOutputProperties properties = new NetSuiteOutputProperties("test");
    properties.initForRuntime();
    RuntimeInfo runtimeInfo = definition.getRuntimeInfo(ExecutionEngine.DI, properties, ConnectorTopology.INCOMING_AND_OUTGOING);
    assertNotNull(runtimeInfo);
    assertThat(runtimeInfo, instanceOf(JarRuntimeInfo.class));
    JarRuntimeInfo jarRuntimeInfo = (JarRuntimeInfo) runtimeInfo;
    assertThat(jarRuntimeInfo.getRuntimeClassName(), endsWith(".NetSuiteSinkImpl"));
}
Also used : JarRuntimeInfo(org.talend.components.api.component.runtime.JarRuntimeInfo) RuntimeInfo(org.talend.daikon.runtime.RuntimeInfo) JarRuntimeInfo(org.talend.components.api.component.runtime.JarRuntimeInfo) Test(org.junit.Test)

Example 35 with JarRuntimeInfo

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

the class FieldSelectorDefinition method getRuntimeInfo.

@Override
public RuntimeInfo getRuntimeInfo(ExecutionEngine engine, ComponentProperties properties, ConnectorTopology connectorTopology) {
    assertEngineCompatibility(engine);
    assertConnectorTopologyCompatibility(connectorTopology);
    try {
        return new JarRuntimeInfo(new URL("mvn:org.talend.components/processing-runtime"), DependenciesReader.computeDependenciesFilePath(ProcessingFamilyDefinition.MAVEN_GROUP_ID, ProcessingFamilyDefinition.MAVEN_ARTIFACT_ID), "org.talend.components.processing.runtime.fieldselector.FieldSelectorRuntime");
    } 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