ENTAXY-248 release 1.8.1
This commit is contained in:
@ -5,7 +5,7 @@
|
||||
<parent>
|
||||
<groupId>ru.entaxy.esb.platform.runtime.base</groupId>
|
||||
<artifactId>connecting</artifactId>
|
||||
<version>1.8.0</version>
|
||||
<version>1.8.1</version>
|
||||
</parent>
|
||||
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
@ -29,10 +29,5 @@
|
||||
<artifactId>adapters-core</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>ru.entaxy.esb.system.management.blueprint.generator</groupId>
|
||||
<artifactId>blueprint-generator</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
@ -19,38 +19,74 @@
|
||||
*/
|
||||
package ru.entaxy.esb.platform.runtime.base.connecting.connection.util;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import ru.entaxy.esb.platform.runtime.base.connecting.adapter.core.api.Adapter;
|
||||
import ru.entaxy.esb.platform.runtime.base.connecting.adapter.core.util.AdapterUtil;
|
||||
import ru.entaxy.esb.platform.runtime.base.connecting.adapter.core.util.ConnectionUsageType;
|
||||
import ru.entaxy.esb.platform.runtime.base.connecting.connection.Connection;
|
||||
import ru.entaxy.esb.system.management.blueprint.generator.Blueprint;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import ru.entaxy.esb.platform.runtime.base.connecting.generator.Generated;
|
||||
|
||||
public class ConnectionUtil {
|
||||
private static final Logger log = LoggerFactory.getLogger(ConnectionUtil.class);
|
||||
|
||||
// TODO: 09.07.2021 Artifact wrapper needed instead of Blueprint (not only blueprint can be return from generator)
|
||||
public static Blueprint get(Connection connection, String usageType) throws Exception {
|
||||
|
||||
public static Generated get(Connection connection, String usageType) throws Exception {
|
||||
Adapter adapter = AdapterUtil.getAdapter(connection.getAdapterName());
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
map.put("connectionName", connection.getName());
|
||||
map.put("connection", connection);
|
||||
return adapter.generate(usageType, map);
|
||||
}
|
||||
public static Blueprint getInit(Connection connection) throws Exception {
|
||||
public static Generated getInit(Connection connection) throws Exception {
|
||||
return get(connection, ConnectionUsageType.INIT);
|
||||
}
|
||||
public static Blueprint getRef(Connection connection) throws Exception {
|
||||
|
||||
public static Generated getRef(Connection connection) throws Exception {
|
||||
return get(connection, ConnectionUsageType.REF);
|
||||
}
|
||||
public static Blueprint getFrom(Connection connection) throws Exception {
|
||||
|
||||
public static Generated getFrom(Connection connection) throws Exception {
|
||||
return get(connection, ConnectionUsageType.FROM);
|
||||
}
|
||||
public static Blueprint getTo(Connection connection) throws Exception {
|
||||
|
||||
public static Generated getTo(Connection connection) throws Exception {
|
||||
return get(connection, ConnectionUsageType.TO);
|
||||
}
|
||||
|
||||
/*
|
||||
@Deprecated
|
||||
public static Blueprint getBlueprint(Connection connection, String usageType) throws Exception {
|
||||
Adapter adapter = AdapterUtil.getAdapter(connection.getAdapterName());
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
map.put("connectionName", connection.getName());
|
||||
map.put("connection", connection);
|
||||
return adapter.generateBlueprint(usageType, map);
|
||||
}
|
||||
@Deprecated
|
||||
public static Blueprint getBlueprintInit(Connection connection) throws Exception {
|
||||
return getBlueprint(connection, ConnectionUsageType.INIT);
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public static Blueprint getBlueprintRef(Connection connection) throws Exception {
|
||||
return getBlueprint(connection, ConnectionUsageType.REF);
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public static Blueprint getBlueprintFrom(Connection connection) throws Exception {
|
||||
return getBlueprint(connection, ConnectionUsageType.FROM);
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public static Blueprint getBlueprintTo(Connection connection) throws Exception {
|
||||
return getBlueprint(connection, ConnectionUsageType.TO);
|
||||
}
|
||||
|
||||
*/
|
||||
}
|
||||
|
Reference in New Issue
Block a user