use of org.talend.components.api.component.runtime.JarRuntimeInfo in project components by Talend.
the class NetSuiteInputDefinitionTest method testRuntimeInfo.
@Test
public void testRuntimeInfo() {
NetSuiteInputProperties properties = new NetSuiteInputProperties("test");
properties.initForRuntime();
RuntimeInfo runtimeInfo = definition.getRuntimeInfo(ExecutionEngine.DI, properties, ConnectorTopology.OUTGOING);
assertNotNull(runtimeInfo);
assertThat(runtimeInfo, instanceOf(JarRuntimeInfo.class));
JarRuntimeInfo jarRuntimeInfo = (JarRuntimeInfo) runtimeInfo;
assertThat(jarRuntimeInfo.getRuntimeClassName(), endsWith(".NetSuiteSourceImpl"));
}
use of org.talend.components.api.component.runtime.JarRuntimeInfo in project components by Talend.
the class NetSuiteRuntimeInfoTest method testRuntimeVersion.
public void testRuntimeVersion(String apiVersion) throws Exception {
NetSuiteConnectionProperties connProps = new NetSuiteConnectionProperties("test");
connProps.setupProperties();
connProps.endpoint.setValue("https://webservices.netsuite.com/services/NetSuitePort_" + apiVersion);
connProps.apiVersion.setValue(NetSuiteVersion.detectVersion(connProps.endpoint.getStringValue()).getMajorAsString("."));
RuntimeInfo runtimeInfo = NetSuiteComponentDefinition.getRuntimeInfo(connProps, NetSuiteComponentDefinition.RUNTIME_CLASS);
assertNotNull(runtimeInfo);
assertThat(runtimeInfo, instanceOf(JarRuntimeInfo.class));
JarRuntimeInfo jarRuntimeInfo = (JarRuntimeInfo) runtimeInfo;
assertNotNull(jarRuntimeInfo.getJarUrl());
assertNotNull(jarRuntimeInfo.getDepTxtPath());
assertEquals(jarRuntimeInfo.getRuntimeClassName(), "org.talend.components.netsuite.v" + apiVersion + ".NetSuiteRuntimeImpl");
}
use of org.talend.components.api.component.runtime.JarRuntimeInfo in project components by Talend.
the class BigQueryOutputDefinition 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/bigquery-runtime"), DependenciesReader.computeDependenciesFilePath("org.talend.components", "bigquery-runtime"), RUNTIME);
} catch (MalformedURLException e) {
throw new ComponentException(e);
}
}
use of org.talend.components.api.component.runtime.JarRuntimeInfo in project components by Talend.
the class BigQueryInputDefinition 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/bigquery-runtime"), DependenciesReader.computeDependenciesFilePath("org.talend.components", "bigquery-runtime"), RUNTIME);
} catch (MalformedURLException e) {
throw new ComponentException(e);
}
}
use of org.talend.components.api.component.runtime.JarRuntimeInfo in project components by Talend.
the class S3InputDefinition 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);
}
}
Aggregations