release version 1.12.0
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
<parent>
|
||||
<groupId>ru.entaxy.esb.platform.runtime.core</groupId>
|
||||
<artifactId>object-producing</artifactId>
|
||||
<version>1.11.0</version>
|
||||
<version>1.12.0</version>
|
||||
</parent>
|
||||
<groupId>ru.entaxy.esb.platform.runtime.core.object-producing</groupId>
|
||||
<artifactId>object-producer-api</artifactId>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* ~~~~~~licensing~~~~~~
|
||||
* object-producer-api
|
||||
* ==========
|
||||
* Copyright (C) 2020 - 2025 EmDev LLC
|
||||
* Copyright (C) 2020 - 2026 EmDev LLC
|
||||
* ==========
|
||||
* You may not use this file except in accordance with the License Terms of the Copyright
|
||||
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* ~~~~~~licensing~~~~~~
|
||||
* test-producers
|
||||
* ==========
|
||||
* Copyright (C) 2020 - 2025 EmDev LLC
|
||||
* Copyright (C) 2020 - 2026 EmDev LLC
|
||||
* ==========
|
||||
* You may not use this file except in accordance with the License Terms of the Copyright
|
||||
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* ~~~~~~licensing~~~~~~
|
||||
* test-producers
|
||||
* ==========
|
||||
* Copyright (C) 2020 - 2025 EmDev LLC
|
||||
* Copyright (C) 2020 - 2026 EmDev LLC
|
||||
* ==========
|
||||
* You may not use this file except in accordance with the License Terms of the Copyright
|
||||
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* ~~~~~~licensing~~~~~~
|
||||
* object-producer-api
|
||||
* ==========
|
||||
* Copyright (C) 2020 - 2025 EmDev LLC
|
||||
* Copyright (C) 2020 - 2026 EmDev LLC
|
||||
* ==========
|
||||
* You may not use this file except in accordance with the License Terms of the Copyright
|
||||
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* ~~~~~~licensing~~~~~~
|
||||
* test-producers
|
||||
* ==========
|
||||
* Copyright (C) 2020 - 2025 EmDev LLC
|
||||
* Copyright (C) 2020 - 2026 EmDev LLC
|
||||
* ==========
|
||||
* You may not use this file except in accordance with the License Terms of the Copyright
|
||||
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* ~~~~~~licensing~~~~~~
|
||||
* test-producers
|
||||
* ==========
|
||||
* Copyright (C) 2020 - 2025 EmDev LLC
|
||||
* Copyright (C) 2020 - 2026 EmDev LLC
|
||||
* ==========
|
||||
* You may not use this file except in accordance with the License Terms of the Copyright
|
||||
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* ~~~~~~licensing~~~~~~
|
||||
* test-producers
|
||||
* ==========
|
||||
* Copyright (C) 2020 - 2025 EmDev LLC
|
||||
* Copyright (C) 2020 - 2026 EmDev LLC
|
||||
* ==========
|
||||
* You may not use this file except in accordance with the License Terms of the Copyright
|
||||
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* ~~~~~~licensing~~~~~~
|
||||
* test-producers
|
||||
* ==========
|
||||
* Copyright (C) 2020 - 2025 EmDev LLC
|
||||
* Copyright (C) 2020 - 2026 EmDev LLC
|
||||
* ==========
|
||||
* You may not use this file except in accordance with the License Terms of the Copyright
|
||||
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* ~~~~~~licensing~~~~~~
|
||||
* test-producers
|
||||
* ==========
|
||||
* Copyright (C) 2020 - 2025 EmDev LLC
|
||||
* Copyright (C) 2020 - 2026 EmDev LLC
|
||||
* ==========
|
||||
* You may not use this file except in accordance with the License Terms of the Copyright
|
||||
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<parent>
|
||||
<groupId>ru.entaxy.esb.platform.runtime.core</groupId>
|
||||
<artifactId>object-producing</artifactId>
|
||||
<version>1.11.0</version>
|
||||
<version>1.12.0</version>
|
||||
</parent>
|
||||
<groupId>ru.entaxy.esb.platform.runtime.core.object-producing</groupId>
|
||||
<artifactId>object-producer-core</artifactId>
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
"validate":{},
|
||||
"generate":{},
|
||||
"build":{"artifact.version.policy":"dated-embedded"},
|
||||
"install":{"installLocal":false, "update":"", "startLevel": 120},
|
||||
"install":{"installLocal":false, "update":"", "startLevel": 120, "targetGroup": "entaxy_runtime"},
|
||||
"deploy":{"deployLocal":false},
|
||||
"store": {}
|
||||
},
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* ~~~~~~licensing~~~~~~
|
||||
* object-producer-core
|
||||
* ==========
|
||||
* Copyright (C) 2020 - 2025 EmDev LLC
|
||||
* Copyright (C) 2020 - 2026 EmDev LLC
|
||||
* ==========
|
||||
* You may not use this file except in accordance with the License Terms of the Copyright
|
||||
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* ~~~~~~licensing~~~~~~
|
||||
* test-producers
|
||||
* ==========
|
||||
* Copyright (C) 2020 - 2025 EmDev LLC
|
||||
* Copyright (C) 2020 - 2026 EmDev LLC
|
||||
* ==========
|
||||
* You may not use this file except in accordance with the License Terms of the Copyright
|
||||
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* ~~~~~~licensing~~~~~~
|
||||
* test-producers
|
||||
* ==========
|
||||
* Copyright (C) 2020 - 2025 EmDev LLC
|
||||
* Copyright (C) 2020 - 2026 EmDev LLC
|
||||
* ==========
|
||||
* You may not use this file except in accordance with the License Terms of the Copyright
|
||||
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* ~~~~~~licensing~~~~~~
|
||||
* object-producer-core
|
||||
* ==========
|
||||
* Copyright (C) 2020 - 2025 EmDev LLC
|
||||
* Copyright (C) 2020 - 2026 EmDev LLC
|
||||
* ==========
|
||||
* You may not use this file except in accordance with the License Terms of the Copyright
|
||||
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* ~~~~~~licensing~~~~~~
|
||||
* test-producers
|
||||
* ==========
|
||||
* Copyright (C) 2020 - 2025 EmDev LLC
|
||||
* Copyright (C) 2020 - 2026 EmDev LLC
|
||||
* ==========
|
||||
* You may not use this file except in accordance with the License Terms of the Copyright
|
||||
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* ~~~~~~licensing~~~~~~
|
||||
* object-producer-core
|
||||
* ==========
|
||||
* Copyright (C) 2020 - 2025 EmDev LLC
|
||||
* Copyright (C) 2020 - 2026 EmDev LLC
|
||||
* ==========
|
||||
* You may not use this file except in accordance with the License Terms of the Copyright
|
||||
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* ~~~~~~licensing~~~~~~
|
||||
* object-producer-core
|
||||
* ==========
|
||||
* Copyright (C) 2020 - 2025 EmDev LLC
|
||||
* Copyright (C) 2020 - 2026 EmDev LLC
|
||||
* ==========
|
||||
* You may not use this file except in accordance with the License Terms of the Copyright
|
||||
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* ~~~~~~licensing~~~~~~
|
||||
* object-producer-core
|
||||
* ==========
|
||||
* Copyright (C) 2020 - 2025 EmDev LLC
|
||||
* Copyright (C) 2020 - 2026 EmDev LLC
|
||||
* ==========
|
||||
* You may not use this file except in accordance with the License Terms of the Copyright
|
||||
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* ~~~~~~licensing~~~~~~
|
||||
* object-producer-core
|
||||
* ==========
|
||||
* Copyright (C) 2020 - 2025 EmDev LLC
|
||||
* Copyright (C) 2020 - 2026 EmDev LLC
|
||||
* ==========
|
||||
* You may not use this file except in accordance with the License Terms of the Copyright
|
||||
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* ~~~~~~licensing~~~~~~
|
||||
* test-producers
|
||||
* ==========
|
||||
* Copyright (C) 2020 - 2025 EmDev LLC
|
||||
* Copyright (C) 2020 - 2026 EmDev LLC
|
||||
* ==========
|
||||
* You may not use this file except in accordance with the License Terms of the Copyright
|
||||
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* ~~~~~~licensing~~~~~~
|
||||
* test-producers
|
||||
* ==========
|
||||
* Copyright (C) 2020 - 2025 EmDev LLC
|
||||
* Copyright (C) 2020 - 2026 EmDev LLC
|
||||
* ==========
|
||||
* You may not use this file except in accordance with the License Terms of the Copyright
|
||||
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* ~~~~~~licensing~~~~~~
|
||||
* test-producers
|
||||
* ==========
|
||||
* Copyright (C) 2020 - 2025 EmDev LLC
|
||||
* Copyright (C) 2020 - 2026 EmDev LLC
|
||||
* ==========
|
||||
* You may not use this file except in accordance with the License Terms of the Copyright
|
||||
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* ~~~~~~licensing~~~~~~
|
||||
* test-producers
|
||||
* ==========
|
||||
* Copyright (C) 2020 - 2025 EmDev LLC
|
||||
* Copyright (C) 2020 - 2026 EmDev LLC
|
||||
* ==========
|
||||
* You may not use this file except in accordance with the License Terms of the Copyright
|
||||
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* ~~~~~~licensing~~~~~~
|
||||
* test-producers
|
||||
* ==========
|
||||
* Copyright (C) 2020 - 2025 EmDev LLC
|
||||
* Copyright (C) 2020 - 2026 EmDev LLC
|
||||
* ==========
|
||||
* You may not use this file except in accordance with the License Terms of the Copyright
|
||||
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* ~~~~~~licensing~~~~~~
|
||||
* test-producers
|
||||
* ==========
|
||||
* Copyright (C) 2020 - 2025 EmDev LLC
|
||||
* Copyright (C) 2020 - 2026 EmDev LLC
|
||||
* ==========
|
||||
* You may not use this file except in accordance with the License Terms of the Copyright
|
||||
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property
|
||||
@@ -45,56 +45,58 @@ import ru.entaxy.platform.core.producer.executor.support.ObjectSupportRegistry;
|
||||
@CommandExecutor(id = "install", predecessors = "deploy")
|
||||
public class Install extends AbstractCommandExecutor {
|
||||
|
||||
private static final Logger log = LoggerFactory.getLogger(Install.class);
|
||||
|
||||
public static final String INSTALL_LOCAL_INSTRUCTION = "installLocal";
|
||||
public static final String UPDATE_INSTRUCTION = "update";
|
||||
public static final String INSTALL_ONLY_IF_MISSING_INSTRUCTION = "installOnlyIfMissing";
|
||||
public static final String START_LEVEL_INSTRUCTION = "startLevel";
|
||||
private static final Logger log = LoggerFactory.getLogger(Install.class);
|
||||
|
||||
public Install(EntaxyProducerService entaxyProducerService) {
|
||||
super(entaxyProducerService);
|
||||
}
|
||||
public static final String INSTALL_LOCAL_INSTRUCTION = "installLocal";
|
||||
public static final String UPDATE_INSTRUCTION = "update";
|
||||
public static final String INSTALL_ONLY_IF_MISSING_INSTRUCTION = "installOnlyIfMissing";
|
||||
public static final String START_LEVEL_INSTRUCTION = "startLevel";
|
||||
public static final String TARGET_GROUP_INSTRUCTION = "targetGroup";
|
||||
|
||||
@Override
|
||||
protected boolean doExecute(ProducerResult currentResult, CommandResult commandResult,
|
||||
Map<String, Object> instructions) throws Exception {
|
||||
public Install(EntaxyProducerService entaxyProducerService) {
|
||||
super(entaxyProducerService);
|
||||
}
|
||||
|
||||
DeployedObjectList objectList = currentResult.findResultObject(DeployedObjectList.class);
|
||||
if (objectList == null) {
|
||||
log.info("Nothing to install");
|
||||
return true;
|
||||
}
|
||||
|
||||
InstalledObjectList resultList = new InstalledObjectList();
|
||||
|
||||
for (DeployedObject obj: objectList) {
|
||||
|
||||
if (obj == null)
|
||||
continue;
|
||||
|
||||
printOutput(" = Installing for deployed of type [" + obj.getObject().getClass().getName() + "]" );
|
||||
|
||||
|
||||
ObjectInstaller installer = ObjectSupportRegistry.getInstance().findInstaller(obj);
|
||||
if (installer == null) {
|
||||
log.warn("ObjectInstaller not found for deployed object of type [{}]", obj.getObject().getClass().getName());
|
||||
printOutput(" :: ObjectInstaller not found");
|
||||
continue;
|
||||
}
|
||||
|
||||
printOutput(" :: ObjectInstaller is: " + installer.getClass().getName());
|
||||
InstalledObject result = installer.install(obj, instructions);
|
||||
if (result != null) {
|
||||
resultList.add(result);
|
||||
printOutput(" :: Result is: " + result.getClass().getName());
|
||||
} else
|
||||
printOutput(" :: Result is: NULL");
|
||||
}
|
||||
|
||||
commandResult.resultObject(resultList);
|
||||
|
||||
return true;
|
||||
}
|
||||
@Override
|
||||
protected boolean doExecute(ProducerResult currentResult, CommandResult commandResult,
|
||||
Map<String, Object> instructions) throws Exception {
|
||||
|
||||
DeployedObjectList objectList = currentResult.findResultObject(DeployedObjectList.class);
|
||||
if (objectList == null) {
|
||||
log.info("Nothing to install");
|
||||
return true;
|
||||
}
|
||||
|
||||
InstalledObjectList resultList = new InstalledObjectList();
|
||||
|
||||
for (DeployedObject obj : objectList) {
|
||||
|
||||
if (obj == null)
|
||||
continue;
|
||||
|
||||
printOutput(" = Installing for deployed of type [" + obj.getObject().getClass().getName() + "]");
|
||||
|
||||
|
||||
ObjectInstaller installer = ObjectSupportRegistry.getInstance().findInstaller(obj);
|
||||
if (installer == null) {
|
||||
log.warn("ObjectInstaller not found for deployed object of type [{}]",
|
||||
obj.getObject().getClass().getName());
|
||||
printOutput(" :: ObjectInstaller not found");
|
||||
continue;
|
||||
}
|
||||
|
||||
printOutput(" :: ObjectInstaller is: " + installer.getClass().getName());
|
||||
InstalledObject result = installer.install(obj, instructions);
|
||||
if (result != null) {
|
||||
resultList.add(result);
|
||||
printOutput(" :: Result is: " + result.getClass().getName());
|
||||
} else
|
||||
printOutput(" :: Result is: NULL");
|
||||
}
|
||||
|
||||
commandResult.resultObject(resultList);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* ~~~~~~licensing~~~~~~
|
||||
* test-producers
|
||||
* ==========
|
||||
* Copyright (C) 2020 - 2025 EmDev LLC
|
||||
* Copyright (C) 2020 - 2026 EmDev LLC
|
||||
* ==========
|
||||
* You may not use this file except in accordance with the License Terms of the Copyright
|
||||
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* ~~~~~~licensing~~~~~~
|
||||
* test-producers
|
||||
* ==========
|
||||
* Copyright (C) 2020 - 2025 EmDev LLC
|
||||
* Copyright (C) 2020 - 2026 EmDev LLC
|
||||
* ==========
|
||||
* You may not use this file except in accordance with the License Terms of the Copyright
|
||||
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* ~~~~~~licensing~~~~~~
|
||||
* test-producers
|
||||
* ==========
|
||||
* Copyright (C) 2020 - 2025 EmDev LLC
|
||||
* Copyright (C) 2020 - 2026 EmDev LLC
|
||||
* ==========
|
||||
* You may not use this file except in accordance with the License Terms of the Copyright
|
||||
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* ~~~~~~licensing~~~~~~
|
||||
* test-producers
|
||||
* ==========
|
||||
* Copyright (C) 2020 - 2025 EmDev LLC
|
||||
* Copyright (C) 2020 - 2026 EmDev LLC
|
||||
* ==========
|
||||
* You may not use this file except in accordance with the License Terms of the Copyright
|
||||
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* ~~~~~~licensing~~~~~~
|
||||
* object-producer-core
|
||||
* ==========
|
||||
* Copyright (C) 2020 - 2025 EmDev LLC
|
||||
* Copyright (C) 2020 - 2026 EmDev LLC
|
||||
* ==========
|
||||
* You may not use this file except in accordance with the License Terms of the Copyright
|
||||
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* ~~~~~~licensing~~~~~~
|
||||
* object-producer-core
|
||||
* ==========
|
||||
* Copyright (C) 2020 - 2025 EmDev LLC
|
||||
* Copyright (C) 2020 - 2026 EmDev LLC
|
||||
* ==========
|
||||
* You may not use this file except in accordance with the License Terms of the Copyright
|
||||
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* ~~~~~~licensing~~~~~~
|
||||
* object-producer-core
|
||||
* ==========
|
||||
* Copyright (C) 2020 - 2025 EmDev LLC
|
||||
* Copyright (C) 2020 - 2026 EmDev LLC
|
||||
* ==========
|
||||
* You may not use this file except in accordance with the License Terms of the Copyright
|
||||
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* ~~~~~~licensing~~~~~~
|
||||
* object-producer-core
|
||||
* ==========
|
||||
* Copyright (C) 2020 - 2025 EmDev LLC
|
||||
* Copyright (C) 2020 - 2026 EmDev LLC
|
||||
* ==========
|
||||
* You may not use this file except in accordance with the License Terms of the Copyright
|
||||
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* ~~~~~~licensing~~~~~~
|
||||
* object-producer-core
|
||||
* ==========
|
||||
* Copyright (C) 2020 - 2025 EmDev LLC
|
||||
* Copyright (C) 2020 - 2026 EmDev LLC
|
||||
* ==========
|
||||
* You may not use this file except in accordance with the License Terms of the Copyright
|
||||
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* ~~~~~~licensing~~~~~~
|
||||
* test-producers
|
||||
* ==========
|
||||
* Copyright (C) 2020 - 2025 EmDev LLC
|
||||
* Copyright (C) 2020 - 2026 EmDev LLC
|
||||
* ==========
|
||||
* You may not use this file except in accordance with the License Terms of the Copyright
|
||||
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* ~~~~~~licensing~~~~~~
|
||||
* test-producers
|
||||
* ==========
|
||||
* Copyright (C) 2020 - 2025 EmDev LLC
|
||||
* Copyright (C) 2020 - 2026 EmDev LLC
|
||||
* ==========
|
||||
* You may not use this file except in accordance with the License Terms of the Copyright
|
||||
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* ~~~~~~licensing~~~~~~
|
||||
* object-producer-core
|
||||
* ==========
|
||||
* Copyright (C) 2020 - 2025 EmDev LLC
|
||||
* Copyright (C) 2020 - 2026 EmDev LLC
|
||||
* ==========
|
||||
* You may not use this file except in accordance with the License Terms of the Copyright
|
||||
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* ~~~~~~licensing~~~~~~
|
||||
* object-producer-core
|
||||
* ==========
|
||||
* Copyright (C) 2020 - 2025 EmDev LLC
|
||||
* Copyright (C) 2020 - 2026 EmDev LLC
|
||||
* ==========
|
||||
* You may not use this file except in accordance with the License Terms of the Copyright
|
||||
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* ~~~~~~licensing~~~~~~
|
||||
* test-producers
|
||||
* ==========
|
||||
* Copyright (C) 2020 - 2025 EmDev LLC
|
||||
* Copyright (C) 2020 - 2026 EmDev LLC
|
||||
* ==========
|
||||
* You may not use this file except in accordance with the License Terms of the Copyright
|
||||
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* ~~~~~~licensing~~~~~~
|
||||
* test-producers
|
||||
* ==========
|
||||
* Copyright (C) 2020 - 2025 EmDev LLC
|
||||
* Copyright (C) 2020 - 2026 EmDev LLC
|
||||
* ==========
|
||||
* You may not use this file except in accordance with the License Terms of the Copyright
|
||||
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* ~~~~~~licensing~~~~~~
|
||||
* test-producers
|
||||
* ==========
|
||||
* Copyright (C) 2020 - 2025 EmDev LLC
|
||||
* Copyright (C) 2020 - 2026 EmDev LLC
|
||||
* ==========
|
||||
* You may not use this file except in accordance with the License Terms of the Copyright
|
||||
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* ~~~~~~licensing~~~~~~
|
||||
* test-producers
|
||||
* ==========
|
||||
* Copyright (C) 2020 - 2025 EmDev LLC
|
||||
* Copyright (C) 2020 - 2026 EmDev LLC
|
||||
* ==========
|
||||
* You may not use this file except in accordance with the License Terms of the Copyright
|
||||
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* ~~~~~~licensing~~~~~~
|
||||
* object-producer-core
|
||||
* ==========
|
||||
* Copyright (C) 2020 - 2025 EmDev LLC
|
||||
* Copyright (C) 2020 - 2026 EmDev LLC
|
||||
* ==========
|
||||
* You may not use this file except in accordance with the License Terms of the Copyright
|
||||
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* ~~~~~~licensing~~~~~~
|
||||
* test-producers
|
||||
* ==========
|
||||
* Copyright (C) 2020 - 2025 EmDev LLC
|
||||
* Copyright (C) 2020 - 2026 EmDev LLC
|
||||
* ==========
|
||||
* You may not use this file except in accordance with the License Terms of the Copyright
|
||||
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* ~~~~~~licensing~~~~~~
|
||||
* test-producers
|
||||
* ==========
|
||||
* Copyright (C) 2020 - 2025 EmDev LLC
|
||||
* Copyright (C) 2020 - 2026 EmDev LLC
|
||||
* ==========
|
||||
* You may not use this file except in accordance with the License Terms of the Copyright
|
||||
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* ~~~~~~licensing~~~~~~
|
||||
* object-producer-core
|
||||
* ==========
|
||||
* Copyright (C) 2020 - 2025 EmDev LLC
|
||||
* Copyright (C) 2020 - 2026 EmDev LLC
|
||||
* ==========
|
||||
* You may not use this file except in accordance with the License Terms of the Copyright
|
||||
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* ~~~~~~licensing~~~~~~
|
||||
* object-producer-core
|
||||
* ==========
|
||||
* Copyright (C) 2020 - 2025 EmDev LLC
|
||||
* Copyright (C) 2020 - 2026 EmDev LLC
|
||||
* ==========
|
||||
* You may not use this file except in accordance with the License Terms of the Copyright
|
||||
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* ~~~~~~licensing~~~~~~
|
||||
* object-producer-core
|
||||
* ==========
|
||||
* Copyright (C) 2020 - 2025 EmDev LLC
|
||||
* Copyright (C) 2020 - 2026 EmDev LLC
|
||||
* ==========
|
||||
* You may not use this file except in accordance with the License Terms of the Copyright
|
||||
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* ~~~~~~licensing~~~~~~
|
||||
* test-producers
|
||||
* ==========
|
||||
* Copyright (C) 2020 - 2025 EmDev LLC
|
||||
* Copyright (C) 2020 - 2026 EmDev LLC
|
||||
* ==========
|
||||
* You may not use this file except in accordance with the License Terms of the Copyright
|
||||
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* ~~~~~~licensing~~~~~~
|
||||
* object-producer-core
|
||||
* ==========
|
||||
* Copyright (C) 2020 - 2025 EmDev LLC
|
||||
* Copyright (C) 2020 - 2026 EmDev LLC
|
||||
* ==========
|
||||
* You may not use this file except in accordance with the License Terms of the Copyright
|
||||
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* ~~~~~~licensing~~~~~~
|
||||
* object-producer-core
|
||||
* ==========
|
||||
* Copyright (C) 2020 - 2025 EmDev LLC
|
||||
* Copyright (C) 2020 - 2026 EmDev LLC
|
||||
* ==========
|
||||
* You may not use this file except in accordance with the License Terms of the Copyright
|
||||
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property
|
||||
@@ -38,14 +38,19 @@ import java.util.Map;
|
||||
import java.util.Map.Entry;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import javax.xml.xpath.XPathConstants;
|
||||
import javax.xml.xpath.XPathExpression;
|
||||
|
||||
import org.osgi.framework.Bundle;
|
||||
import org.osgi.service.component.ComponentContext;
|
||||
import org.osgi.service.component.annotations.Activate;
|
||||
import org.osgi.service.component.annotations.Component;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.w3c.dom.Attr;
|
||||
import org.w3c.dom.Document;
|
||||
import org.w3c.dom.Element;
|
||||
import org.w3c.dom.NamedNodeMap;
|
||||
import org.w3c.dom.Node;
|
||||
import org.w3c.dom.NodeList;
|
||||
|
||||
@@ -58,6 +63,8 @@ import ru.entaxy.esb.platform.runtime.base.extensions.api.EntaxyExtension;
|
||||
import ru.entaxy.platform.base.support.CommonUtils;
|
||||
import ru.entaxy.platform.base.support.JSONUtils;
|
||||
import ru.entaxy.platform.base.support.xml.CommonXMLUtils;
|
||||
import ru.entaxy.platform.core.producer.executor.generationmodel.merge.MergeUtils.ElementDefinition;
|
||||
import ru.entaxy.platform.core.producer.executor.generationmodel.merge.MergeUtils.XPathComponents;
|
||||
import ru.entaxy.platform.core.producer.executor.generationmodel.merge.MergingMap.Mapping;
|
||||
import ru.entaxy.platform.core.producer.executor.support.EntaxyObjectPropertiesHelper;
|
||||
|
||||
@@ -427,27 +434,66 @@ public class BlueprintMergeProcessor extends AbstractMergeProcessor {
|
||||
if (ROOT_NODE_NAME.equalsIgnoreCase(mergeConfig.targetNodeName))
|
||||
targetNode = rootNode;
|
||||
else {
|
||||
String[] nodePath = mergeConfig.targetNodeName.split("/");
|
||||
Node currentNode = rootNode;
|
||||
for (int i = 0; i < nodePath.length; i++) {
|
||||
Node nextNode = null;
|
||||
NodeList list = currentNode.getChildNodes();
|
||||
for (int j = 0; j < list.getLength(); j++) {
|
||||
Node current = list.item(j);
|
||||
if (!nodePath[i].equalsIgnoreCase(current.getLocalName()))
|
||||
continue;
|
||||
if (CommonUtils.isValid(mergeConfig.targetNodeNamespace)) {
|
||||
if (!mergeConfig.targetNodeNamespace.equalsIgnoreCase(current.getNamespaceURI()))
|
||||
continue;
|
||||
if (mergeConfig.isUseXPath()) {
|
||||
// we assume targetNodeName as an XPath expression
|
||||
XPathComponents components = XPathComponents.fromString(mergeConfig.targetNodeName);
|
||||
try {
|
||||
XPathExpression expression =
|
||||
CommonXMLUtils.getXPathExpression(components.expression,
|
||||
components.namespaceContext);
|
||||
NodeList nodeList =
|
||||
(NodeList) expression.evaluate(defaultTargetNode, XPathConstants.NODESET);
|
||||
if (nodeList == null || nodeList.getLength() == 0) {
|
||||
throw new IllegalArgumentException(
|
||||
String.format("Node not found for expression [%s]", components.expression));
|
||||
}
|
||||
nextNode = current;
|
||||
break;
|
||||
if (nodeList.getLength() > 1)
|
||||
throw new IllegalArgumentException(
|
||||
String.format("More than one node found for expression [%s]",
|
||||
components.expression));
|
||||
targetNode = nodeList.item(0);
|
||||
} catch (Exception e) {
|
||||
log.error("Target node for merge not defined", e);
|
||||
}
|
||||
currentNode = nextNode;
|
||||
if (currentNode == null)
|
||||
break;
|
||||
} else {
|
||||
String[] nodePath = mergeConfig.targetNodeName.split("/");
|
||||
Node currentNode = rootNode;
|
||||
for (int i = 0; i < nodePath.length; i++) {
|
||||
|
||||
ElementDefinition currentDefinition = ElementDefinition.fromString(nodePath[i]);
|
||||
if (!currentDefinition.isValid())
|
||||
continue;
|
||||
|
||||
Node nextNode = null;
|
||||
NodeList list = currentNode.getChildNodes();
|
||||
for (int j = 0; j < list.getLength(); j++) {
|
||||
Node current = list.item(j);
|
||||
|
||||
// check node name
|
||||
if (!currentDefinition.nodeName.equalsIgnoreCase(current.getLocalName()))
|
||||
continue;
|
||||
|
||||
// check node namespace if provided
|
||||
if (CommonUtils.isValid(currentDefinition.namespace)) {
|
||||
if (!currentDefinition.namespace.equalsIgnoreCase(current.getNamespaceURI()))
|
||||
continue;
|
||||
}
|
||||
|
||||
// check target namespace if provided and if it's last fragment of
|
||||
// path
|
||||
if (CommonUtils.isValid(mergeConfig.targetNodeNamespace) && i == nodePath.length - 1) {
|
||||
if (!mergeConfig.targetNodeNamespace.equalsIgnoreCase(current.getNamespaceURI()))
|
||||
continue;
|
||||
}
|
||||
nextNode = current;
|
||||
break;
|
||||
}
|
||||
currentNode = nextNode;
|
||||
if (currentNode == null)
|
||||
break;
|
||||
}
|
||||
targetNode = currentNode;
|
||||
}
|
||||
targetNode = currentNode;
|
||||
}
|
||||
} else {
|
||||
targetNode = defaultTargetNode;
|
||||
@@ -622,6 +668,14 @@ public class BlueprintMergeProcessor extends AbstractMergeProcessor {
|
||||
if (trackOrder)
|
||||
this.processedNodes.add(adopted);
|
||||
|
||||
// Sort target node
|
||||
if (targetNode != null) {
|
||||
MergeConfig targetMergeConfig = config.getConfig(targetNode);
|
||||
if (targetMergeConfig.isRecoursive() && !targetMergeConfig.childrenOrder.isEmpty()) {
|
||||
reorderNode(targetNode, targetMergeConfig);
|
||||
}
|
||||
}
|
||||
// Sort source node
|
||||
if (effectiveRecoursive) {
|
||||
mergeFilteredNodes(adopted, sourceNode.getChildNodes(), true, processedNodes);
|
||||
|
||||
@@ -629,6 +683,12 @@ public class BlueprintMergeProcessor extends AbstractMergeProcessor {
|
||||
reorderNode(adopted, mergeConfig);
|
||||
}
|
||||
|
||||
if (mergeConfig.removeInlineConfig)
|
||||
MergeUtils.removeInlineMergeConfig(adopted);
|
||||
|
||||
if (mergeConfig.removeMergeNS)
|
||||
MergeUtils.removeMergeNSDeclaration(adopted);
|
||||
|
||||
return adopted;
|
||||
}
|
||||
|
||||
@@ -676,20 +736,26 @@ public class BlueprintMergeProcessor extends AbstractMergeProcessor {
|
||||
|
||||
// order nodes before and after *
|
||||
for (String nodeData : mergeConfig.childrenOrder) {
|
||||
int index = nodeData.indexOf(":");
|
||||
String nodeName = null;
|
||||
String nodeNamespace = null;
|
||||
/*
|
||||
int index = nodeData.indexOf(":");
|
||||
String nodeName = null;
|
||||
String nodeNamespace = null;
|
||||
|
||||
if (index <= 0)
|
||||
nodeName = nodeData;
|
||||
else {
|
||||
nodeName = nodeData.substring(0, index);
|
||||
try {
|
||||
nodeNamespace = nodeData.substring(index + 1);
|
||||
} catch (Exception ignore) {
|
||||
// ignore
|
||||
}
|
||||
}
|
||||
if (index <= 0)
|
||||
nodeName = nodeData;
|
||||
else {
|
||||
nodeName = nodeData.substring(0, index);
|
||||
try {
|
||||
nodeNamespace = nodeData.substring(index + 1);
|
||||
} catch (Exception ignore) {
|
||||
// ignore
|
||||
}
|
||||
}
|
||||
*/
|
||||
ElementDefinition definition = ElementDefinition.fromString(nodeData);
|
||||
|
||||
String nodeName = definition.nodeName;
|
||||
String nodeNamespace = definition.namespace;
|
||||
|
||||
if ("*".equals(nodeName)) {
|
||||
map.put(nodeData, new LinkedList<>());
|
||||
@@ -755,7 +821,8 @@ public class BlueprintMergeProcessor extends AbstractMergeProcessor {
|
||||
for (SortGroup group : list) {
|
||||
if (!group.allNodes.isEmpty())
|
||||
for (Node n : group.allNodes) {
|
||||
node.appendChild(node.getOwnerDocument().adoptNode(n.cloneNode(true)));
|
||||
// node.appendChild(node.getOwnerDocument().adoptNode(n.cloneNode(true)));
|
||||
node.appendChild(node.getOwnerDocument().adoptNode(n));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -822,6 +889,8 @@ public class BlueprintMergeProcessor extends AbstractMergeProcessor {
|
||||
String namespace = sourceNode.getNamespaceURI();
|
||||
JsonElement configElement = null;
|
||||
|
||||
JsonObject finalConfig = new JsonObject();
|
||||
|
||||
if (config.has(name + ":" + namespace)) {
|
||||
configElement = config.get(name + ":" + namespace);
|
||||
} else {
|
||||
@@ -834,7 +903,18 @@ public class BlueprintMergeProcessor extends AbstractMergeProcessor {
|
||||
}
|
||||
}
|
||||
|
||||
if (configElement == null)
|
||||
if (configElement != null) {
|
||||
if (configElement.isJsonObject())
|
||||
finalConfig = configElement.getAsJsonObject();
|
||||
else
|
||||
finalConfig.add("data", configElement);
|
||||
}
|
||||
|
||||
JsonObject inline = getInlineConfig(sourceNode);
|
||||
|
||||
JSONUtils.mergeObjects(inline, finalConfig);
|
||||
|
||||
if (finalConfig.entrySet().isEmpty())
|
||||
return DEFAULT_CONFIG;
|
||||
|
||||
try {
|
||||
@@ -846,6 +926,49 @@ public class BlueprintMergeProcessor extends AbstractMergeProcessor {
|
||||
|
||||
}
|
||||
|
||||
protected JsonObject getInlineConfig(Node sourceNode) {
|
||||
JsonObject result = new JsonObject();
|
||||
|
||||
if (sourceNode instanceof Element) {
|
||||
Element source = (Element) sourceNode;
|
||||
NamedNodeMap attributes = source.getAttributes();
|
||||
|
||||
int numAttrs = attributes.getLength();
|
||||
|
||||
for (int i = 0; i < numAttrs; i++) {
|
||||
Attr attr = (Attr) attributes.item(i);
|
||||
|
||||
if (!MergeUtils.NS_MERGE.equals(attr.getNamespaceURI()))
|
||||
continue;
|
||||
|
||||
String name = attr.getLocalName();
|
||||
String value = attr.getNodeValue();
|
||||
|
||||
try {
|
||||
// number
|
||||
Long l = Long.parseLong(value);
|
||||
result.addProperty(name, l);
|
||||
} catch (Exception ignoreL) {
|
||||
try {
|
||||
Double d = Double.parseDouble(value);
|
||||
result.addProperty(name, d);
|
||||
} catch (Exception ignoreD) {
|
||||
if ("true".equalsIgnoreCase(value)) {
|
||||
result.addProperty(name, true);
|
||||
} else if ("false".equalsIgnoreCase(value)) {
|
||||
result.addProperty(name, false);
|
||||
} else {
|
||||
result.addProperty(name, value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
protected enum MERGE_POSITION {
|
||||
@@ -901,6 +1024,12 @@ public class BlueprintMergeProcessor extends AbstractMergeProcessor {
|
||||
|
||||
List<String> childrenOrder = new ArrayList<>();
|
||||
|
||||
boolean useXPath = false;
|
||||
|
||||
boolean removeInlineConfig = true;
|
||||
|
||||
boolean removeMergeNS = true;
|
||||
|
||||
public boolean isRecoursiveSet() {
|
||||
return recoursive != null;
|
||||
}
|
||||
@@ -1005,6 +1134,14 @@ public class BlueprintMergeProcessor extends AbstractMergeProcessor {
|
||||
this.childrenOrder = childrenOrder;
|
||||
}
|
||||
|
||||
public boolean isUseXPath() {
|
||||
return useXPath;
|
||||
}
|
||||
|
||||
public void setUseXPath(boolean useXPath) {
|
||||
this.useXPath = useXPath;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* ~~~~~~licensing~~~~~~
|
||||
* object-producer-core
|
||||
* ==========
|
||||
* Copyright (C) 2020 - 2025 EmDev LLC
|
||||
* Copyright (C) 2020 - 2026 EmDev LLC
|
||||
* ==========
|
||||
* You may not use this file except in accordance with the License Terms of the Copyright
|
||||
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* ~~~~~~licensing~~~~~~
|
||||
* object-producer-core
|
||||
* ==========
|
||||
* Copyright (C) 2020 - 2025 EmDev LLC
|
||||
* Copyright (C) 2020 - 2026 EmDev LLC
|
||||
* ==========
|
||||
* You may not use this file except in accordance with the License Terms of the Copyright
|
||||
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property
|
||||
|
||||
@@ -0,0 +1,301 @@
|
||||
/*-
|
||||
* ~~~~~~licensing~~~~~~
|
||||
* object-producer-core
|
||||
* ==========
|
||||
* Copyright (C) 2020 - 2026 EmDev LLC
|
||||
* ==========
|
||||
* You may not use this file except in accordance with the License Terms of the Copyright
|
||||
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property
|
||||
* rights to the Software and any copies are the property of the Copyright Holder. Unless
|
||||
* it is explicitly allowed the Copyright Holder, the User is prohibited from using the
|
||||
* Software for commercial purposes to provide services to third parties.
|
||||
*
|
||||
* The Copyright Holder hereby declares that the Software is provided on an "AS IS".
|
||||
* Under no circumstances does the Copyright Holder guarantee or promise that the
|
||||
* Software provided by him will be suitable or not suitable for the specific purposes
|
||||
* of the User, that the Software will meet all commercial and personal subjective
|
||||
* expectations of the User, that the Software will work properly, without technical
|
||||
* errors, quickly and uninterruptedly.
|
||||
*
|
||||
* Under no circumstances shall the Copyright Holder or its Affiliates is not liable
|
||||
* to the User for any direct or indirect losses of the User, his expenses or actual
|
||||
* damage, including, downtime; loss of bussines; lost profit; lost earnings; loss
|
||||
* or damage to data, property, etc.
|
||||
* ~~~~~~/licensing~~~~~~
|
||||
*/
|
||||
package ru.entaxy.platform.core.producer.executor.generationmodel.merge;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Calendar;
|
||||
import java.util.Collections;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
import javax.xml.namespace.NamespaceContext;
|
||||
|
||||
import org.apache.commons.collections4.multimap.HashSetValuedHashMap;
|
||||
import org.w3c.dom.Attr;
|
||||
import org.w3c.dom.Element;
|
||||
import org.w3c.dom.NamedNodeMap;
|
||||
import org.w3c.dom.Node;
|
||||
|
||||
import ru.entaxy.platform.base.support.CommonUtils;
|
||||
|
||||
public class MergeUtils {
|
||||
|
||||
public static final String NS_MERGE = "http://www.entaxy.ru/schemas/merge/1.0";
|
||||
|
||||
public static class ElementDefinition {
|
||||
|
||||
public static final Pattern colonFormat = Pattern.compile("\\G^([^:\\/{}]+)(:([^\\[]*))?(\\[([^\\[]*)\\])?");
|
||||
public static final Pattern bracketsFormat =
|
||||
Pattern.compile("\\G^(\\{([^{}]+)\\})?([^:\\/{}\\[]+)(\\[([^\\[]*)\\])?");
|
||||
|
||||
public static Pattern namespacedElement = Pattern.compile("(\\{[^\\{]+\\}[a-zA-Z0-9-\\.]+)");
|
||||
|
||||
public static ElementDefinition fromString(String nodeSpec) {
|
||||
ElementDefinition result = new ElementDefinition();
|
||||
Matcher m = ElementDefinition.bracketsFormat.matcher(nodeSpec);
|
||||
if (!m.matches()) {
|
||||
m = ElementDefinition.colonFormat.matcher(nodeSpec);
|
||||
if (!m.matches()) {
|
||||
return result;
|
||||
}
|
||||
m.reset();
|
||||
if (m.find()) {
|
||||
result.nodeName = m.group(1);
|
||||
result.namespace = m.group(3);
|
||||
}
|
||||
} else {
|
||||
m.reset();
|
||||
if (m.find()) {
|
||||
result.namespace = m.group(2);
|
||||
result.nodeName = m.group(3);
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
public static List<ElementDefinition> findAllInBracketsFormat(String nodeSpec) {
|
||||
|
||||
List<ElementDefinition> result = new ArrayList<>();
|
||||
|
||||
Matcher m = namespacedElement.matcher(nodeSpec);
|
||||
|
||||
while (m.find()) {
|
||||
ElementDefinition def = ElementDefinition.fromString(m.group(1));
|
||||
result.add(def);
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
public String nodeName;
|
||||
public String namespace;
|
||||
|
||||
public boolean isValid() {
|
||||
return CommonUtils.isValid(nodeName);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return String.format("[%s] %s", namespace == null ? "" : namespace, nodeName == null ? "null" : nodeName);
|
||||
}
|
||||
|
||||
public String toBracketsFormat() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
if (namespace != null && !namespace.isBlank())
|
||||
sb.append('{').append(namespace).append('}');
|
||||
sb.append(nodeName);
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
public String toColonFormat() {
|
||||
StringBuilder sb = new StringBuilder(nodeName);
|
||||
if (namespace != null && !namespace.isBlank())
|
||||
sb.append(':').append(namespace);
|
||||
sb.append(nodeName);
|
||||
return sb.toString();
|
||||
}
|
||||
}
|
||||
|
||||
public static class XPathComponents {
|
||||
|
||||
public static Pattern namespacedElement = Pattern.compile("(\\{[^\\{]+\\}[a-zA-Z0-9-\\.]+)");
|
||||
public static Pattern nonPrefixedElement =
|
||||
Pattern.compile("(\\A|\\/|\\r|\\n|\\n\\r)([a-zA-Z0-9-_\\.]+)(\\Z|\\/|\\[|\\r|\\n|\\n\\r)");
|
||||
|
||||
public static XPathComponents fromString(String spec) {
|
||||
|
||||
|
||||
XPathComponents result = new XPathComponents();
|
||||
|
||||
if (spec == null || spec.isBlank())
|
||||
return result;
|
||||
|
||||
String expression = spec;
|
||||
|
||||
// replace all namespaced elements in format '{ns}element' with prefixed elements
|
||||
|
||||
List<ElementDefinition> list = ElementDefinition.findAllInBracketsFormat(spec);
|
||||
|
||||
/*if (list.isEmpty()) {
|
||||
System.out.println("DEFINITIONS NOT FOUND");
|
||||
}*/
|
||||
|
||||
for (ElementDefinition ed : list) {
|
||||
// System.out.println("DEFINITION:" + ed.toString());
|
||||
String prefix = null;
|
||||
if (ed.namespace == null || ed.namespace.isBlank())
|
||||
prefix = "*";
|
||||
else
|
||||
prefix = result.namespaceContext.getCreatePrefix(ed.namespace);
|
||||
expression = expression.replace(ed.toBracketsFormat(), prefix + ":" + ed.nodeName);
|
||||
}
|
||||
|
||||
// replace all non-namespaced elements with *:<element>
|
||||
|
||||
Matcher m = nonPrefixedElement.matcher(expression);
|
||||
List<int[]> nonPrefixed = new ArrayList<>();
|
||||
while (m.find()) {
|
||||
int[] data = new int[2];
|
||||
data[0] = m.start(2);
|
||||
data[1] = m.end(2);
|
||||
// System.out.println("NON-PREFIXED: " + m.group(2) + ":[" + data[0] + "," + data[1]
|
||||
// + "]");
|
||||
nonPrefixed.add(data);
|
||||
}
|
||||
|
||||
int offsetCount = 0;
|
||||
for (int[] data : nonPrefixed) {
|
||||
int offset = 2 * offsetCount;
|
||||
String before = expression.substring(0, data[0] + offset);
|
||||
String el = expression.substring(data[0] + offset, data[1] + offset);
|
||||
String after = expression.substring(data[1] + offset);
|
||||
// System.out.println("BEFORE: " + before);
|
||||
// System.out.println("DATA: " + el);
|
||||
// System.out.println("AFTER: " + after);
|
||||
expression = before + "*:" + el + after;
|
||||
offsetCount++;
|
||||
}
|
||||
|
||||
result.expression = expression;
|
||||
return result;
|
||||
}
|
||||
|
||||
public XPathNamespaceContext namespaceContext = new XPathNamespaceContext();
|
||||
public String expression;
|
||||
|
||||
}
|
||||
|
||||
public static class XPathNamespaceContext implements NamespaceContext {
|
||||
|
||||
protected HashSetValuedHashMap<String, String> storage = new HashSetValuedHashMap<>();
|
||||
|
||||
public String getCreatePrefix(String namespaceURI) {
|
||||
String result = getPrefix(namespaceURI);
|
||||
if (result != null)
|
||||
return result;
|
||||
String newPrefix = generatePrefix();
|
||||
while (hasPrefix(newPrefix))
|
||||
newPrefix = generatePrefix();
|
||||
storage.put(namespaceURI, newPrefix);
|
||||
return newPrefix;
|
||||
}
|
||||
|
||||
public boolean hasPrefix(String prefix) {
|
||||
return storage.values().contains(prefix);
|
||||
}
|
||||
|
||||
public String generatePrefix() {
|
||||
return "ns_" + Calendar.getInstance().getTimeInMillis();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getNamespaceURI(String prefix) {
|
||||
if (prefix == null)
|
||||
return null;
|
||||
Optional<String> result = storage.entries().stream().filter(e -> prefix.equals(e.getValue()))
|
||||
.map(e -> e.getKey()).findFirst();
|
||||
return result.isPresent() ? result.get() : null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPrefix(String namespaceURI) {
|
||||
if (storage.containsKey(namespaceURI))
|
||||
try {
|
||||
return storage.get(namespaceURI).iterator().next();
|
||||
} catch (Exception ignore) {
|
||||
// ignore
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Iterator<String> getPrefixes(String namespaceURI) {
|
||||
if (storage.containsKey(namespaceURI))
|
||||
return storage.get(namespaceURI).iterator();
|
||||
return Collections.emptyIterator();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return storage.asMap().toString();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public static void removeInlineMergeConfig(Node node) {
|
||||
if (!(node instanceof Element))
|
||||
return;
|
||||
Element element = (Element) node;
|
||||
List<Attr> attrs = getInlineMergeConfigAttributes(element);
|
||||
for (Attr attr : attrs)
|
||||
element.removeAttributeNode(attr);
|
||||
}
|
||||
|
||||
public static List<Attr> getInlineMergeConfigAttributes(Element source) {
|
||||
List<Attr> result = new ArrayList<>();
|
||||
|
||||
NamedNodeMap attributes = source.getAttributes();
|
||||
|
||||
int numAttrs = attributes.getLength();
|
||||
|
||||
for (int i = 0; i < numAttrs; i++) {
|
||||
Attr attr = (Attr) attributes.item(i);
|
||||
|
||||
if (!MergeUtils.NS_MERGE.equals(attr.getNamespaceURI()))
|
||||
continue;
|
||||
result.add(attr);
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
public static void removeMergeNSDeclaration(Node node) {
|
||||
if (!(node instanceof Element))
|
||||
return;
|
||||
Element element = (Element) node;
|
||||
Attr attr = getMergeNSDeclaration(element);
|
||||
if (attr != null)
|
||||
element.removeAttributeNode(attr);
|
||||
}
|
||||
|
||||
public static Attr getMergeNSDeclaration(Element source) {
|
||||
NamedNodeMap attributes = source.getAttributes();
|
||||
|
||||
int numAttrs = attributes.getLength();
|
||||
|
||||
for (int i = 0; i < numAttrs; i++) {
|
||||
Attr attr = (Attr) attributes.item(i);
|
||||
|
||||
if (attr.getNodeName().startsWith("xmlns:") && NS_MERGE.equals(attr.getNodeValue()))
|
||||
return attr;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -2,7 +2,7 @@
|
||||
* ~~~~~~licensing~~~~~~
|
||||
* object-producer-core
|
||||
* ==========
|
||||
* Copyright (C) 2020 - 2025 EmDev LLC
|
||||
* Copyright (C) 2020 - 2026 EmDev LLC
|
||||
* ==========
|
||||
* You may not use this file except in accordance with the License Terms of the Copyright
|
||||
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* ~~~~~~licensing~~~~~~
|
||||
* object-producer-core
|
||||
* ==========
|
||||
* Copyright (C) 2020 - 2025 EmDev LLC
|
||||
* Copyright (C) 2020 - 2026 EmDev LLC
|
||||
* ==========
|
||||
* You may not use this file except in accordance with the License Terms of the Copyright
|
||||
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* ~~~~~~licensing~~~~~~
|
||||
* object-producer-core
|
||||
* ==========
|
||||
* Copyright (C) 2020 - 2025 EmDev LLC
|
||||
* Copyright (C) 2020 - 2026 EmDev LLC
|
||||
* ==========
|
||||
* You may not use this file except in accordance with the License Terms of the Copyright
|
||||
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* ~~~~~~licensing~~~~~~
|
||||
* object-producer-core
|
||||
* ==========
|
||||
* Copyright (C) 2020 - 2025 EmDev LLC
|
||||
* Copyright (C) 2020 - 2026 EmDev LLC
|
||||
* ==========
|
||||
* You may not use this file except in accordance with the License Terms of the Copyright
|
||||
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* ~~~~~~licensing~~~~~~
|
||||
* object-producer-core
|
||||
* ==========
|
||||
* Copyright (C) 2020 - 2025 EmDev LLC
|
||||
* Copyright (C) 2020 - 2026 EmDev LLC
|
||||
* ==========
|
||||
* You may not use this file except in accordance with the License Terms of the Copyright
|
||||
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* ~~~~~~licensing~~~~~~
|
||||
* test-producers
|
||||
* ==========
|
||||
* Copyright (C) 2020 - 2025 EmDev LLC
|
||||
* Copyright (C) 2020 - 2026 EmDev LLC
|
||||
* ==========
|
||||
* You may not use this file except in accordance with the License Terms of the Copyright
|
||||
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* ~~~~~~licensing~~~~~~
|
||||
* object-producer-core
|
||||
* ==========
|
||||
* Copyright (C) 2020 - 2025 EmDev LLC
|
||||
* Copyright (C) 2020 - 2026 EmDev LLC
|
||||
* ==========
|
||||
* You may not use this file except in accordance with the License Terms of the Copyright
|
||||
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* ~~~~~~licensing~~~~~~
|
||||
* object-producer-core
|
||||
* ==========
|
||||
* Copyright (C) 2020 - 2025 EmDev LLC
|
||||
* Copyright (C) 2020 - 2026 EmDev LLC
|
||||
* ==========
|
||||
* You may not use this file except in accordance with the License Terms of the Copyright
|
||||
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* ~~~~~~licensing~~~~~~
|
||||
* test-producers
|
||||
* ==========
|
||||
* Copyright (C) 2020 - 2025 EmDev LLC
|
||||
* Copyright (C) 2020 - 2026 EmDev LLC
|
||||
* ==========
|
||||
* You may not use this file except in accordance with the License Terms of the Copyright
|
||||
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* ~~~~~~licensing~~~~~~
|
||||
* object-producer-core
|
||||
* ==========
|
||||
* Copyright (C) 2020 - 2025 EmDev LLC
|
||||
* Copyright (C) 2020 - 2026 EmDev LLC
|
||||
* ==========
|
||||
* You may not use this file except in accordance with the License Terms of the Copyright
|
||||
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* ~~~~~~licensing~~~~~~
|
||||
* test-producers
|
||||
* ==========
|
||||
* Copyright (C) 2020 - 2025 EmDev LLC
|
||||
* Copyright (C) 2020 - 2026 EmDev LLC
|
||||
* ==========
|
||||
* You may not use this file except in accordance with the License Terms of the Copyright
|
||||
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* ~~~~~~licensing~~~~~~
|
||||
* test-producers
|
||||
* ==========
|
||||
* Copyright (C) 2020 - 2025 EmDev LLC
|
||||
* Copyright (C) 2020 - 2026 EmDev LLC
|
||||
* ==========
|
||||
* You may not use this file except in accordance with the License Terms of the Copyright
|
||||
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* ~~~~~~licensing~~~~~~
|
||||
* test-producers
|
||||
* ==========
|
||||
* Copyright (C) 2020 - 2025 EmDev LLC
|
||||
* Copyright (C) 2020 - 2026 EmDev LLC
|
||||
* ==========
|
||||
* You may not use this file except in accordance with the License Terms of the Copyright
|
||||
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* ~~~~~~licensing~~~~~~
|
||||
* object-producer-core
|
||||
* ==========
|
||||
* Copyright (C) 2020 - 2025 EmDev LLC
|
||||
* Copyright (C) 2020 - 2026 EmDev LLC
|
||||
* ==========
|
||||
* You may not use this file except in accordance with the License Terms of the Copyright
|
||||
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* ~~~~~~licensing~~~~~~
|
||||
* object-producer-core
|
||||
* ==========
|
||||
* Copyright (C) 2020 - 2025 EmDev LLC
|
||||
* Copyright (C) 2020 - 2026 EmDev LLC
|
||||
* ==========
|
||||
* You may not use this file except in accordance with the License Terms of the Copyright
|
||||
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property
|
||||
@@ -25,7 +25,9 @@
|
||||
*/
|
||||
package ru.entaxy.platform.core.producer.executor.support;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import org.osgi.framework.Constants;
|
||||
@@ -250,6 +252,9 @@ public class ArtifactSupport implements ObjectBuilder, ObjectDeployer, ObjectIns
|
||||
? artifactService.deployLocal(artifact)
|
||||
: artifactService.deployShared(artifact);
|
||||
|
||||
if (da.getException() != null)
|
||||
throw da.getException();
|
||||
|
||||
printer.printOutput("DEPLOYED: ["
|
||||
+ da.getLocation()
|
||||
+ "]");
|
||||
@@ -296,6 +301,22 @@ public class ArtifactSupport implements ObjectBuilder, ObjectDeployer, ObjectIns
|
||||
? commandInstructions.getLong(Install.START_LEVEL_INSTRUCTION)
|
||||
: -1;
|
||||
|
||||
Object targetGroup = commandInstructions.get(Install.TARGET_GROUP_INSTRUCTION);
|
||||
List<String> targetGroups = new ArrayList<>();
|
||||
if (targetGroup != null) {
|
||||
if (targetGroup instanceof List) {
|
||||
for (Object obj : (List) targetGroup)
|
||||
if (obj != null)
|
||||
targetGroups.add(obj.toString());
|
||||
} else {
|
||||
String val = targetGroup.toString();
|
||||
String[] splitted = val.split(",");
|
||||
for (String s : splitted)
|
||||
if (s != null && !s.isBlank())
|
||||
targetGroups.add(s.trim());
|
||||
}
|
||||
}
|
||||
|
||||
DeployedArtifact da = (DeployedArtifact) object.getObject();
|
||||
|
||||
InstallationResult result = null;
|
||||
@@ -313,6 +334,8 @@ public class ArtifactSupport implements ObjectBuilder, ObjectDeployer, ObjectIns
|
||||
} else {
|
||||
ClusterInstaller clusterInstaller = artifactService.installers().cluster()
|
||||
.artifact(da);
|
||||
if (!targetGroups.isEmpty())
|
||||
clusterInstaller.groups((String[]) targetGroups.toArray(new String[] {}));
|
||||
installer = clusterInstaller;
|
||||
printer.printOutput("-> Installing clustered");
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* ~~~~~~licensing~~~~~~
|
||||
* object-producer-core
|
||||
* ==========
|
||||
* Copyright (C) 2020 - 2025 EmDev LLC
|
||||
* Copyright (C) 2020 - 2026 EmDev LLC
|
||||
* ==========
|
||||
* You may not use this file except in accordance with the License Terms of the Copyright
|
||||
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* ~~~~~~licensing~~~~~~
|
||||
* object-producer-core
|
||||
* ==========
|
||||
* Copyright (C) 2020 - 2025 EmDev LLC
|
||||
* Copyright (C) 2020 - 2026 EmDev LLC
|
||||
* ==========
|
||||
* You may not use this file except in accordance with the License Terms of the Copyright
|
||||
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* ~~~~~~licensing~~~~~~
|
||||
* object-producer-core
|
||||
* ==========
|
||||
* Copyright (C) 2020 - 2025 EmDev LLC
|
||||
* Copyright (C) 2020 - 2026 EmDev LLC
|
||||
* ==========
|
||||
* You may not use this file except in accordance with the License Terms of the Copyright
|
||||
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property
|
||||
@@ -29,6 +29,7 @@ import java.util.List;
|
||||
|
||||
import org.osgi.service.component.annotations.Activate;
|
||||
import org.osgi.service.component.annotations.Component;
|
||||
import org.osgi.service.component.annotations.Deactivate;
|
||||
import org.osgi.service.component.annotations.Reference;
|
||||
import org.osgi.service.component.annotations.ReferenceCardinality;
|
||||
import org.osgi.service.component.annotations.ReferencePolicy;
|
||||
@@ -41,54 +42,62 @@ import ru.entaxy.platform.core.producer.executor.deployer.DeployedObject;
|
||||
import ru.entaxy.platform.core.producer.executor.deployer.ObjectDeployer;
|
||||
import ru.entaxy.platform.core.producer.executor.installer.ObjectInstaller;
|
||||
|
||||
@Component (service = ObjectSupportRegistry.class, immediate = true)
|
||||
@Component(service = ObjectSupportRegistry.class, immediate = true)
|
||||
public class ObjectSupportRegistry {
|
||||
|
||||
private static ObjectSupportRegistry INSTANCE = null;
|
||||
|
||||
public static ObjectSupportRegistry getInstance() {
|
||||
return INSTANCE;
|
||||
}
|
||||
|
||||
@Reference (cardinality = ReferenceCardinality.MULTIPLE, policy = ReferencePolicy.DYNAMIC, policyOption = ReferencePolicyOption.GREEDY)
|
||||
volatile List<ObjectBuilder> objectBuilders;
|
||||
private static ObjectSupportRegistry INSTANCE = null;
|
||||
|
||||
@Reference (cardinality = ReferenceCardinality.MULTIPLE, policy = ReferencePolicy.DYNAMIC, policyOption = ReferencePolicyOption.GREEDY)
|
||||
volatile List<ObjectDeployer> objectDeployers;
|
||||
|
||||
@Reference (cardinality = ReferenceCardinality.MULTIPLE, policy = ReferencePolicy.DYNAMIC, policyOption = ReferencePolicyOption.GREEDY)
|
||||
volatile List<ObjectInstaller> objectInstallers;
|
||||
|
||||
@Activate
|
||||
public void activate() {
|
||||
INSTANCE = this;
|
||||
}
|
||||
|
||||
public ObjectBuilder findBuilder(Generated generated) {
|
||||
synchronized (this.objectBuilders) {
|
||||
for (ObjectBuilder ob: this.objectBuilders)
|
||||
if (ob.isBuildable(generated))
|
||||
return ob;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
public static ObjectSupportRegistry getInstance() {
|
||||
return INSTANCE;
|
||||
}
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MULTIPLE, policy = ReferencePolicy.DYNAMIC,
|
||||
policyOption = ReferencePolicyOption.GREEDY)
|
||||
volatile List<ObjectBuilder> objectBuilders;
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MULTIPLE, policy = ReferencePolicy.DYNAMIC,
|
||||
policyOption = ReferencePolicyOption.GREEDY)
|
||||
volatile List<ObjectDeployer> objectDeployers;
|
||||
|
||||
@Reference(cardinality = ReferenceCardinality.MULTIPLE, policy = ReferencePolicy.DYNAMIC,
|
||||
policyOption = ReferencePolicyOption.GREEDY)
|
||||
volatile List<ObjectInstaller> objectInstallers;
|
||||
|
||||
@Activate
|
||||
public void activate() {
|
||||
INSTANCE = this;
|
||||
}
|
||||
|
||||
@Deactivate
|
||||
public void deactivate() {
|
||||
INSTANCE = null;
|
||||
}
|
||||
|
||||
public ObjectBuilder findBuilder(Generated generated) {
|
||||
synchronized (this.objectBuilders) {
|
||||
for (ObjectBuilder ob : this.objectBuilders)
|
||||
if (ob.isBuildable(generated))
|
||||
return ob;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public ObjectDeployer findDeployer(BuiltObject object) {
|
||||
synchronized (this.objectDeployers) {
|
||||
for (ObjectDeployer od : this.objectDeployers)
|
||||
if (od.isDeployable(object))
|
||||
return od;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public ObjectInstaller findInstaller(DeployedObject object) {
|
||||
synchronized (this.objectInstallers) {
|
||||
for (ObjectInstaller oi : this.objectInstallers)
|
||||
if (oi.isInstallable(object))
|
||||
return oi;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public ObjectDeployer findDeployer(BuiltObject object) {
|
||||
synchronized (this.objectDeployers) {
|
||||
for (ObjectDeployer od: this.objectDeployers)
|
||||
if (od.isDeployable(object))
|
||||
return od;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public ObjectInstaller findInstaller(DeployedObject object) {
|
||||
synchronized (this.objectInstallers) {
|
||||
for (ObjectInstaller oi: this.objectInstallers)
|
||||
if (oi.isInstallable(object))
|
||||
return oi;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* ~~~~~~licensing~~~~~~
|
||||
* object-producer-core
|
||||
* ==========
|
||||
* Copyright (C) 2020 - 2025 EmDev LLC
|
||||
* Copyright (C) 2020 - 2026 EmDev LLC
|
||||
* ==========
|
||||
* You may not use this file except in accordance with the License Terms of the Copyright
|
||||
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* ~~~~~~licensing~~~~~~
|
||||
* test-producers
|
||||
* ==========
|
||||
* Copyright (C) 2020 - 2025 EmDev LLC
|
||||
* Copyright (C) 2020 - 2026 EmDev LLC
|
||||
* ==========
|
||||
* You may not use this file except in accordance with the License Terms of the Copyright
|
||||
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* ~~~~~~licensing~~~~~~
|
||||
* test-producers
|
||||
* ==========
|
||||
* Copyright (C) 2020 - 2025 EmDev LLC
|
||||
* Copyright (C) 2020 - 2026 EmDev LLC
|
||||
* ==========
|
||||
* You may not use this file except in accordance with the License Terms of the Copyright
|
||||
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* ~~~~~~licensing~~~~~~
|
||||
* object-producer-core
|
||||
* ==========
|
||||
* Copyright (C) 2020 - 2025 EmDev LLC
|
||||
* Copyright (C) 2020 - 2026 EmDev LLC
|
||||
* ==========
|
||||
* You may not use this file except in accordance with the License Terms of the Copyright
|
||||
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* ~~~~~~licensing~~~~~~
|
||||
* test-producers
|
||||
* ==========
|
||||
* Copyright (C) 2020 - 2025 EmDev LLC
|
||||
* Copyright (C) 2020 - 2026 EmDev LLC
|
||||
* ==========
|
||||
* You may not use this file except in accordance with the License Terms of the Copyright
|
||||
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* ~~~~~~licensing~~~~~~
|
||||
* test-producers
|
||||
* ==========
|
||||
* Copyright (C) 2020 - 2025 EmDev LLC
|
||||
* Copyright (C) 2020 - 2026 EmDev LLC
|
||||
* ==========
|
||||
* You may not use this file except in accordance with the License Terms of the Copyright
|
||||
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* ~~~~~~licensing~~~~~~
|
||||
* test-producers
|
||||
* ==========
|
||||
* Copyright (C) 2020 - 2025 EmDev LLC
|
||||
* Copyright (C) 2020 - 2026 EmDev LLC
|
||||
* ==========
|
||||
* You may not use this file except in accordance with the License Terms of the Copyright
|
||||
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* ~~~~~~licensing~~~~~~
|
||||
* object-producer-core
|
||||
* ==========
|
||||
* Copyright (C) 2020 - 2025 EmDev LLC
|
||||
* Copyright (C) 2020 - 2026 EmDev LLC
|
||||
* ==========
|
||||
* You may not use this file except in accordance with the License Terms of the Copyright
|
||||
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* ~~~~~~licensing~~~~~~
|
||||
* test-producers
|
||||
* ==========
|
||||
* Copyright (C) 2020 - 2025 EmDev LLC
|
||||
* Copyright (C) 2020 - 2026 EmDev LLC
|
||||
* ==========
|
||||
* You may not use this file except in accordance with the License Terms of the Copyright
|
||||
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* ~~~~~~licensing~~~~~~
|
||||
* object-producer-core
|
||||
* ==========
|
||||
* Copyright (C) 2020 - 2025 EmDev LLC
|
||||
* Copyright (C) 2020 - 2026 EmDev LLC
|
||||
* ==========
|
||||
* You may not use this file except in accordance with the License Terms of the Copyright
|
||||
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* ~~~~~~licensing~~~~~~
|
||||
* object-producer-core
|
||||
* ==========
|
||||
* Copyright (C) 2020 - 2025 EmDev LLC
|
||||
* Copyright (C) 2020 - 2026 EmDev LLC
|
||||
* ==========
|
||||
* You may not use this file except in accordance with the License Terms of the Copyright
|
||||
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* ~~~~~~licensing~~~~~~
|
||||
* object-producer-core
|
||||
* ==========
|
||||
* Copyright (C) 2020 - 2025 EmDev LLC
|
||||
* Copyright (C) 2020 - 2026 EmDev LLC
|
||||
* ==========
|
||||
* You may not use this file except in accordance with the License Terms of the Copyright
|
||||
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* ~~~~~~licensing~~~~~~
|
||||
* object-producer-core
|
||||
* ==========
|
||||
* Copyright (C) 2020 - 2025 EmDev LLC
|
||||
* Copyright (C) 2020 - 2026 EmDev LLC
|
||||
* ==========
|
||||
* You may not use this file except in accordance with the License Terms of the Copyright
|
||||
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* ~~~~~~licensing~~~~~~
|
||||
* object-producer-core
|
||||
* ==========
|
||||
* Copyright (C) 2020 - 2025 EmDev LLC
|
||||
* Copyright (C) 2020 - 2026 EmDev LLC
|
||||
* ==========
|
||||
* You may not use this file except in accordance with the License Terms of the Copyright
|
||||
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* ~~~~~~licensing~~~~~~
|
||||
* object-producer-core
|
||||
* ==========
|
||||
* Copyright (C) 2020 - 2025 EmDev LLC
|
||||
* Copyright (C) 2020 - 2026 EmDev LLC
|
||||
* ==========
|
||||
* You may not use this file except in accordance with the License Terms of the Copyright
|
||||
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* ~~~~~~licensing~~~~~~
|
||||
* object-producer-core
|
||||
* ==========
|
||||
* Copyright (C) 2020 - 2025 EmDev LLC
|
||||
* Copyright (C) 2020 - 2026 EmDev LLC
|
||||
* ==========
|
||||
* You may not use this file except in accordance with the License Terms of the Copyright
|
||||
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* ~~~~~~licensing~~~~~~
|
||||
* object-producer-core
|
||||
* ==========
|
||||
* Copyright (C) 2020 - 2025 EmDev LLC
|
||||
* Copyright (C) 2020 - 2026 EmDev LLC
|
||||
* ==========
|
||||
* You may not use this file except in accordance with the License Terms of the Copyright
|
||||
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* ~~~~~~licensing~~~~~~
|
||||
* object-producer-core
|
||||
* ==========
|
||||
* Copyright (C) 2020 - 2025 EmDev LLC
|
||||
* Copyright (C) 2020 - 2026 EmDev LLC
|
||||
* ==========
|
||||
* You may not use this file except in accordance with the License Terms of the Copyright
|
||||
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* ~~~~~~licensing~~~~~~
|
||||
* test-producers
|
||||
* ==========
|
||||
* Copyright (C) 2020 - 2025 EmDev LLC
|
||||
* Copyright (C) 2020 - 2026 EmDev LLC
|
||||
* ==========
|
||||
* You may not use this file except in accordance with the License Terms of the Copyright
|
||||
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* ~~~~~~licensing~~~~~~
|
||||
* test-producers
|
||||
* ==========
|
||||
* Copyright (C) 2020 - 2025 EmDev LLC
|
||||
* Copyright (C) 2020 - 2026 EmDev LLC
|
||||
* ==========
|
||||
* You may not use this file except in accordance with the License Terms of the Copyright
|
||||
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* ~~~~~~licensing~~~~~~
|
||||
* test-producers
|
||||
* ==========
|
||||
* Copyright (C) 2020 - 2025 EmDev LLC
|
||||
* Copyright (C) 2020 - 2026 EmDev LLC
|
||||
* ==========
|
||||
* You may not use this file except in accordance with the License Terms of the Copyright
|
||||
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* ~~~~~~licensing~~~~~~
|
||||
* object-producer-core
|
||||
* ==========
|
||||
* Copyright (C) 2020 - 2025 EmDev LLC
|
||||
* Copyright (C) 2020 - 2026 EmDev LLC
|
||||
* ==========
|
||||
* You may not use this file except in accordance with the License Terms of the Copyright
|
||||
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* ~~~~~~licensing~~~~~~
|
||||
* test-producers
|
||||
* ==========
|
||||
* Copyright (C) 2020 - 2025 EmDev LLC
|
||||
* Copyright (C) 2020 - 2026 EmDev LLC
|
||||
* ==========
|
||||
* You may not use this file except in accordance with the License Terms of the Copyright
|
||||
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property
|
||||
|
||||
@@ -5,6 +5,21 @@
|
||||
"fragment": {
|
||||
"isTransparent": true
|
||||
},
|
||||
"camelContext": {
|
||||
"recoursive": true,
|
||||
"targetNodeName": "##root",
|
||||
"unique": ["id"],
|
||||
"position": "inside_last",
|
||||
"conflicts": ["ignore"],
|
||||
"childrenOrder": [
|
||||
"globalOptions:http://camel.apache.org/schema/blueprint",
|
||||
"propertyPlaceholder:http://camel.apache.org/schema/blueprint",
|
||||
"errorHandler:http://camel.apache.org/schema/blueprint",
|
||||
"transformers:http://camel.apache.org/schema/blueprint",
|
||||
"redeliveryPolicyProfile:http://camel.apache.org/schema/blueprint",
|
||||
"*"
|
||||
]
|
||||
},
|
||||
"bean": {
|
||||
"targetNodeName": "##root",
|
||||
"position": "inside_first",
|
||||
@@ -53,12 +68,10 @@
|
||||
"createTargetNode": true,
|
||||
"targetNodeXML": "<propertyPlaceholder id=\"propertiesForCamel\" xmlns=\"http://camel.apache.org/schema/blueprint\" />"
|
||||
},
|
||||
"redeliveryPolicyProfile": {
|
||||
"targetNodeName": "camelContext/errorHandler",
|
||||
"position": "after",
|
||||
"conflict": "ignore" /*[ignore, replace]*/,
|
||||
"createTargetNode": true,
|
||||
"targetNodeXML": "<errorHandler />"
|
||||
"redeliveryPolicyProfile:http://camel.apache.org/schema/blueprint": {
|
||||
"targetNodeName": "camelContext",
|
||||
"position": "inside_last",
|
||||
"conflict": "ignore" /*[ignore, replace]*/
|
||||
},
|
||||
"errorHandlerRef": {
|
||||
"targetNodeName": "camelContext",
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<parent>
|
||||
<groupId>ru.entaxy.esb.platform.runtime.core</groupId>
|
||||
<artifactId>object-producing</artifactId>
|
||||
<version>1.11.0</version>
|
||||
<version>1.12.0</version>
|
||||
</parent>
|
||||
<groupId>ru.entaxy.esb.platform.runtime.core.object-producing</groupId>
|
||||
<artifactId>object-producing-config-support</artifactId>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* ~~~~~~licensing~~~~~~
|
||||
* object-producing-config-support
|
||||
* ==========
|
||||
* Copyright (C) 2020 - 2025 EmDev LLC
|
||||
* Copyright (C) 2020 - 2026 EmDev LLC
|
||||
* ==========
|
||||
* You may not use this file except in accordance with the License Terms of the Copyright
|
||||
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user