ENTAXY-248 release 1.8.1
This commit is contained in:
@ -7,7 +7,7 @@
|
||||
<parent>
|
||||
<groupId>ru.entaxy.esb.system</groupId>
|
||||
<artifactId>management</artifactId>
|
||||
<version>1.8.0</version>
|
||||
<version>1.8.1</version>
|
||||
<relativePath>../pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
|
@ -32,6 +32,8 @@ public interface ConnectorManager {
|
||||
|
||||
BundleDto startConnector(ConnectorDto connectorDto) throws Exception;
|
||||
|
||||
BundleDto startConnector(Connector connector) throws Exception;
|
||||
|
||||
BundleDto stopConnector(ConnectorDto connectorDto) throws Exception;
|
||||
|
||||
BundleDto stopConnector(Connector connector) throws Exception;
|
||||
|
@ -30,6 +30,7 @@ import ru.entaxy.esb.system.jpa.SystemService;
|
||||
import ru.entaxy.esb.system.jpa.entity.System;
|
||||
import ru.entaxy.esb.system.management.bundle.jpa.dto.BundleDto;
|
||||
import ru.entaxy.esb.system.management.bundle.jpa.dto.BundleStatus;
|
||||
import ru.entaxy.esb.system.management.bundle.jpa.entity.BundleEntity;
|
||||
import ru.entaxy.esb.system.management.bundle.manager.BundleManager;
|
||||
import ru.entaxy.esb.system.management.connector.manager.dto.ConnectorDto;
|
||||
import ru.entaxy.esb.system.management.connector.manager.mapper.ConnectorMapper;
|
||||
@ -83,6 +84,13 @@ public class ConnectorManagerImpl implements ConnectorManager {
|
||||
return bundle;
|
||||
}
|
||||
|
||||
@Override
|
||||
public BundleDto startConnector(Connector connector) throws Exception {
|
||||
BundleDto bundle = bundleManager.startBundle(connectorMapper.toBundleDto(connector.getBundleEntity()));
|
||||
connectorService.setBundleEntity(connector, connectorMapper.toBundleEntity(bundle));
|
||||
return bundle;
|
||||
}
|
||||
|
||||
@Override
|
||||
public BundleDto stopConnector(ConnectorDto connectorDto) throws Exception {
|
||||
Connector connector = connectorService.getConnectorByName(connectorDto.getSystemUuid(), connectorDto.getTemplateName());
|
||||
@ -101,14 +109,17 @@ public class ConnectorManagerImpl implements ConnectorManager {
|
||||
@Override
|
||||
public BundleDto uninstallConnector(ConnectorDto connectorDto) throws Exception {
|
||||
Connector connector = connectorService.getConnectorByName(connectorDto.getSystemUuid(), connectorDto.getTemplateName());
|
||||
bundleManager.uninstallBundleByName(connector.getName(), CONNECTOR, String.valueOf(connector.getVersion()));
|
||||
BundleEntity bundleEntity = connector.getBundleEntity();
|
||||
bundleManager.uninstallBundleByName(bundleEntity.getName(), CONNECTOR, String.valueOf(connector.getVersion()));
|
||||
connectorService.removeConnector(connector);
|
||||
return new BundleDto(connector.getName(), BundleStatus.UNINSTALL);
|
||||
}
|
||||
|
||||
@Override
|
||||
public BundleDto uninstallConnector(Connector connector) throws Exception {
|
||||
bundleManager.uninstallBundleByName(connector.getName(), CONNECTOR, String.valueOf(connector.getVersion()));
|
||||
BundleEntity bundleEntity = connector.getBundleEntity();
|
||||
bundleManager.uninstallBundleByName(bundleEntity.getName(), CONNECTOR, String.valueOf(connector.getVersion()));
|
||||
connectorService.removeConnector(connector);
|
||||
return new BundleDto(connector.getName(), BundleStatus.UNINSTALL);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user