ENTAXY-480 release version 1.8.3

This commit is contained in:
2023-08-03 04:44:09 +03:00
parent 603889d627
commit 5844a2e5cf
2546 changed files with 11242 additions and 207556 deletions

View File

@ -3,7 +3,7 @@
<parent>
<groupId>ru.entaxy.esb.platform.runtime.core.objects-implementations</groupId>
<artifactId>connection-implementation</artifactId>
<version>1.8.2.2</version>
<version>1.8.3</version>
</parent>
<groupId>ru.entaxy.esb.platform.runtime.core.objects-implementations.connection-implementation</groupId>
<artifactId>connection-producing</artifactId>
@ -35,4 +35,20 @@
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<extensions>true</extensions>
<configuration>
<instructions>
<Entaxy-Factory-Provider>true</Entaxy-Factory-Provider>
<Entaxy-Template-Provider>true</Entaxy-Template-Provider>
</instructions>
</configuration>
</plugin>
</plugins>
</build>
</project>

View File

@ -2,7 +2,7 @@
* ~~~~~~licensing~~~~~~
* connection-producing
* ==========
* Copyright (C) 2020 - 2022 EmDev LLC
* Copyright (C) 2020 - 2023 EmDev LLC
* ==========
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.

View File

@ -2,7 +2,7 @@
* ~~~~~~licensing~~~~~~
* connection-producing
* ==========
* Copyright (C) 2020 - 2022 EmDev LLC
* Copyright (C) 2020 - 2023 EmDev LLC
* ==========
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -27,8 +27,11 @@ import org.osgi.service.component.ComponentContext;
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.util.tracker.BundleTracker;
import ru.entaxy.platform.base.objects.factory.tracker.TrackedFactoryManager;
import ru.entaxy.platform.base.support.osgi.tracker.BundleTrackerUtils;
import ru.entaxy.platform.base.support.osgi.tracker.filter.BundleHeaderFilter;
@ -39,6 +42,9 @@ public class AdapterWrapManager {
protected BundleTracker<List<TrackedAdapter>> adapterTracker;
@Reference (cardinality = ReferenceCardinality.MANDATORY)
TrackedFactoryManager trackedFactoryManager;
@Activate
public void activate(ComponentContext componentContext) {
this.bundleContext = componentContext.getBundleContext();
@ -48,7 +54,7 @@ public class AdapterWrapManager {
)
.customizer(
(new TrackedAdapterCustomizer())
.listener(new TrackedAdapterCustomizerListener(bundleContext))
.listener(new TrackedAdapterCustomizerListener(bundleContext, trackedFactoryManager))
)
.bundleState(Bundle.ACTIVE | Bundle.INSTALLED | Bundle.RESOLVED)
.get();

View File

@ -2,7 +2,7 @@
* ~~~~~~licensing~~~~~~
* connection-producing
* ==========
* Copyright (C) 2020 - 2022 EmDev LLC
* Copyright (C) 2020 - 2023 EmDev LLC
* ==========
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.

View File

@ -2,7 +2,7 @@
* ~~~~~~licensing~~~~~~
* connection-producing
* ==========
* Copyright (C) 2020 - 2022 EmDev LLC
* Copyright (C) 2020 - 2023 EmDev LLC
* ==========
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.

View File

@ -2,7 +2,7 @@
* ~~~~~~licensing~~~~~~
* connection-producing
* ==========
* Copyright (C) 2020 - 2022 EmDev LLC
* Copyright (C) 2020 - 2023 EmDev LLC
* ==========
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -90,7 +90,7 @@ public class AdapterWrapperGenerationProcessor implements GenerationProcessor {
Map<String, Object> copy = new HashMap<>(parameters);
parameters.put("connection", copy);
System.out.println("\n\n===>>>\n:" + parameters.toString() + "\n\n");
// System.out.println("\n\n===>>>\n:" + parameters.toString() + "\n\n");
log.debug("RESULT PARAMETERS :: " + parameters.toString());

View File

@ -2,7 +2,7 @@
* ~~~~~~licensing~~~~~~
* connection-producing
* ==========
* Copyright (C) 2020 - 2022 EmDev LLC
* Copyright (C) 2020 - 2023 EmDev LLC
* ==========
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -37,7 +37,9 @@ import ru.entaxy.platform.base.objects.EntaxyObject;
import ru.entaxy.platform.base.objects.EntaxyObject.OBJECT_TYPES;
import ru.entaxy.platform.base.objects.factory.EntaxyFactory;
import ru.entaxy.platform.base.objects.factory.EntaxyFactory.CONFIGURATION.OUTPUTS;
import ru.entaxy.platform.base.objects.factory.EntaxyFactoryUtils;
import ru.entaxy.platform.base.objects.factory.configuration.FactoryElement;
import ru.entaxy.platform.base.objects.factory.tracker.TrackedFactoryManager;
import ru.entaxy.platform.base.support.CommonUtils;
import ru.entaxy.platform.base.support.JSONUtils;
@ -68,7 +70,9 @@ public class ConfigConverter {
factoryElement.setId(metadata.get("id").getAsString());
factoryElement.setType(OBJECT_TYPES.CONNECTION);
JsonElement factoryJson = gson.toJsonTree(factoryElement);
JsonObject factoryJson = gson.toJsonTree(factoryElement).getAsJsonObject();
factoryJson.addProperty(EntaxyFactory.CONFIGURATION.FACTORY.PARENT
, TrackedFactoryManager.DEFAULT_PARENT);
configuration.add(EntaxyFactory.CONFIGURATION.FACTORY_SECTION_NAME, factoryJson);
// add type specific section
@ -102,11 +106,11 @@ public class ConfigConverter {
JsonObject sourceGenerator = sourceGenerators.get(i).getAsJsonObject();
JsonObject targetOutput = new JsonObject();
log.info("GENERATOR: " + sourceGenerator.toString());
log.debug("GENERATOR: " + sourceGenerator.toString());
// name
String name = sourceGenerator.get("type").getAsString();
log.info("GENERATOR NAME: " + name);
log.debug("GENERATOR NAME: " + name);
// isDefault: true for 'init'
if (EntaxyFactory.CONFIGURATION.OUTPUTS.OUTPUT_TYPE_INIT.equals(name))

View File

@ -2,7 +2,7 @@
* ~~~~~~licensing~~~~~~
* connection-producing
* ==========
* Copyright (C) 2020 - 2022 EmDev LLC
* Copyright (C) 2020 - 2023 EmDev LLC
* ==========
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.

View File

@ -2,7 +2,7 @@
* ~~~~~~licensing~~~~~~
* connection-producing
* ==========
* Copyright (C) 2020 - 2022 EmDev LLC
* Copyright (C) 2020 - 2023 EmDev LLC
* ==========
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -37,6 +37,7 @@ import org.slf4j.LoggerFactory;
import ru.entaxy.base.generator.template.impl.ProvidedTemplate;
import ru.entaxy.base.generator.template.impl.TemplateMetadata;
import ru.entaxy.base.generator.template.impl.TemplateProvider;
import ru.entaxy.platform.base.support.JSONUtils;
import ru.entaxy.platform.base.support.osgi.tracker.UniformBundleTrackerCustomizer;
public class TrackedAdapterCustomizer extends UniformBundleTrackerCustomizer<List<TrackedAdapter>> {
@ -52,12 +53,8 @@ public class TrackedAdapterCustomizer extends UniformBundleTrackerCustomizer<Lis
try {
String metadata = new BufferedReader (
new InputStreamReader(
metadataUrl.openStream(), StandardCharsets.UTF_8))
.lines()
.collect(Collectors.joining("\n"));
String metadata = JSONUtils.getJsonRootObjectString(metadataUrl);
TrackedAdapter trackedAdapter = new TrackedAdapter();
trackedAdapter.setMetadata(metadata);
trackedAdapter.setBundleId(bundle.getBundleId());
@ -65,8 +62,8 @@ public class TrackedAdapterCustomizer extends UniformBundleTrackerCustomizer<Lis
String configuration = ConfigConverter.convertFromAdapter(metadata);
trackedAdapter.setConfiguration(configuration);
log.info("TrackedAdapter metadata: \n" + metadata);
log.info("TrackedAdapter configuration: \n" + configuration);
log.debug("TrackedAdapter metadata: \n" + metadata);
log.debug("TrackedAdapter configuration: \n" + configuration);
Enumeration<URL> foundEntries = bundle.findEntries("/template/", "*.*", true);
while (foundEntries.hasMoreElements()) {

View File

@ -2,7 +2,7 @@
* ~~~~~~licensing~~~~~~
* connection-producing
* ==========
* Copyright (C) 2020 - 2022 EmDev LLC
* Copyright (C) 2020 - 2023 EmDev LLC
* ==========
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -28,12 +28,17 @@ import org.osgi.framework.BundleContext;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.google.gson.JsonObject;
import ru.entaxy.base.generator.template.Template;
import ru.entaxy.base.generator.template.TemplateImpl;
import ru.entaxy.base.generator.template.TemplateService;
import ru.entaxy.platform.base.objects.factory.EntaxyFactory;
import ru.entaxy.platform.base.objects.factory.EntaxyFactoryUtils;
import ru.entaxy.platform.base.objects.factory.impl.DefaultFactory;
import ru.entaxy.platform.base.objects.factory.tracker.TrackedFactoryManager;
import ru.entaxy.platform.base.support.CommonUtils;
import ru.entaxy.platform.base.support.JSONUtils;
import ru.entaxy.platform.base.support.osgi.tracker.BundleTrackerCustomizerListener;
public class TrackedAdapterCustomizerListener implements BundleTrackerCustomizerListener<List<TrackedAdapter>> {
@ -42,9 +47,12 @@ public class TrackedAdapterCustomizerListener implements BundleTrackerCustomizer
protected BundleContext bundleContext;
public TrackedAdapterCustomizerListener(BundleContext bundleContext) {
protected TrackedFactoryManager trackedFactoryManager;
public TrackedAdapterCustomizerListener(BundleContext bundleContext, TrackedFactoryManager factoryManager) {
super();
this.bundleContext = bundleContext;
this.trackedFactoryManager = factoryManager;
}
@Override
@ -56,15 +64,18 @@ public class TrackedAdapterCustomizerListener implements BundleTrackerCustomizer
AdapterWrapperDefaultFactory factory = new AdapterWrapperDefaultFactory();
// factory.setFactoryId(adapter.getId());
factory.configure(adapter.configuration);
adapter.setId(factory.getFactoryId());
JsonObject effective = EntaxyFactoryUtils.calculateEffectiveJson(
JSONUtils.getJsonRootObject(adapter.configuration)
, trackedFactoryManager);
factory.configure(effective);
adapter.setId(factory.getId());
if (!factory.isValid())
continue;
Dictionary<String, String> props = new Hashtable<String, String>();
props.put(EntaxyFactory.SERVICE.PROP_ID, factory.getFactoryId());
props.put(EntaxyFactory.SERVICE.PROP_TYPE, factory.getFactoryType());
props.put(EntaxyFactory.SERVICE.PROP_ID, factory.getId());
props.put(EntaxyFactory.SERVICE.PROP_TYPE, factory.getType());
props.put(EntaxyFactory.SERVICE.PROP_ORIGIN_BUNDLE, adapter.getBundleId()+"");
adapter.serviceRegistration = this.bundleContext.registerService(

View File

@ -3,7 +3,7 @@
<parent>
<groupId>ru.entaxy.esb.platform.runtime.core</groupId>
<artifactId>objects-implementations</artifactId>
<version>1.8.2.2</version>
<version>1.8.3</version>
</parent>
<groupId>ru.entaxy.esb.platform.runtime.core.objects-implementations</groupId>
<artifactId>connection-implementation</artifactId>
@ -12,5 +12,6 @@
<description>ENTAXY :: PLATFORM :: CORE :: OBJECTS IMPLEMENTATIONS :: CONNECTION</description>
<modules>
<module>connection-producing</module>
<module>standard-connections-pack</module>
</modules>
</project>

View File

@ -3,7 +3,7 @@
<parent>
<groupId>ru.entaxy.esb.platform.runtime</groupId>
<artifactId>core</artifactId>
<version>1.8.2.2</version>
<version>1.8.3</version>
</parent>
<groupId>ru.entaxy.esb.platform.runtime.core</groupId>
<artifactId>objects-implementations</artifactId>
@ -41,5 +41,7 @@
<modules>
<module>profile-implementation</module>
<module>connection-implementation</module>
<module>connector-implementation</module>
<module>route-implementation</module>
</modules>
</project>

View File

@ -3,7 +3,7 @@
<parent>
<groupId>ru.entaxy.esb.platform.runtime.core</groupId>
<artifactId>objects-implementations</artifactId>
<version>1.8.2.2</version>
<version>1.8.3</version>
</parent>
<groupId>ru.entaxy.esb.platform.runtime.core.objects-implementations</groupId>
<artifactId>profile-implementation</artifactId>
@ -11,6 +11,7 @@
<name>ENTAXY :: PLATFORM :: CORE :: OBJECTS IMPLEMENTATIONS :: PROFILE</name>
<description>ENTAXY :: PLATFORM :: CORE :: OBJECTS IMPLEMENTATIONS :: PROFILE</description>
<modules>
<module>profile-runtime</module>
<module>profile-producing</module>
<module>profile-storage</module>
</modules>

View File

@ -1,9 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>ru.entaxy.esb.platform.runtime.core.objects-implementations</groupId>
<artifactId>profile-implementation</artifactId>
<version>1.8.2.2</version>
<version>1.8.3</version>
</parent>
<groupId>ru.entaxy.esb.platform.runtime.core.objects-implementations.profile-implementation</groupId>
<artifactId>profile-producing</artifactId>
@ -13,20 +14,17 @@
<properties>
<bundle.osgi.export.pkg>ru.entaxy.platform.base.objects.profile.producing</bundle.osgi.export.pkg>
<license.update.headers.exclude>**/ru/entaxy/resource/**/*.xml</license.update.headers.exclude>
</properties>
<dependencies>
<dependency>
<groupId>
ru.entaxy.esb.platform.runtime.core.object-producing
</groupId>
<groupId>ru.entaxy.esb.platform.runtime.core.object-producing</groupId>
<artifactId>object-producer-api</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>
ru.entaxy.esb.platform.runtime.core.object-producing
</groupId>
<groupId>ru.entaxy.esb.platform.runtime.core.object-producing</groupId>
<artifactId>object-producer-core</artifactId>
<version>${project.version}</version>
</dependency>
@ -47,7 +45,8 @@
<configuration>
<instructions>
<Entaxy-Factory-Provider>true</Entaxy-Factory-Provider>
<Entaxy-Template-Provider>true</Entaxy-Template-Provider>
<Entaxy-Template-Provider>true</Entaxy-Template-Provider>
<Entaxy-Resource-Provider>true</Entaxy-Resource-Provider>
</instructions>
</configuration>
</plugin>
@ -55,4 +54,4 @@
</plugins>
</build>
</project>
</project>

View File

@ -2,7 +2,7 @@
* ~~~~~~licensing~~~~~~
* test-producers
* ==========
* Copyright (C) 2020 - 2022 EmDev LLC
* Copyright (C) 2020 - 2023 EmDev LLC
* ==========
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.

View File

@ -1,21 +1,27 @@
{
"factory": {
"id": "common-profile",
"type": "entaxy.runtime.profile"
"type": "entaxy.runtime.profile",
"displayName": "System profile [LEGACY]",
"isDeprecated": true,
"isAbstract": false
},
"entaxy.runtime.profile": {
"displayName": "Common system profile"
"profileType": "SYSTEM"
},
"fields": {
"systemName": {
"displayName": "System Name",
"type": "String",
"required": true,
"immutable": true
},
"description": {
"displayName": "Description",
"type": "String"
},
"useDefaultRoute": {
"displayName": "Use Default Route",
"type": "Boolean",
"required": true,
"defaultValue": true
@ -38,11 +44,27 @@
}
}
},
"##publish": {
"defaultValue": {
"profileType": {
"@CALCULATED": {
"expression": "${#FACTORY#.#TYPEINFO#.profileType}",
"lazy": false
}
}
}
}
},
"outputs": {
"init": {
"isDefault": true
"isDefault": true,
"fields": {
"systemName": {},
"description": {},
"useDefaultRoute": {},
"defaultRoute": {}
}
}
}

View File

@ -21,7 +21,11 @@
},
"outputs": {
"init": {
"isDefault": true
"isDefault": true,
"fields": {
"systemName": {},
"description": {}
}
}
}

View File

@ -4,7 +4,7 @@
~~~~~~licensing~~~~~~
profile-producing
==========
Copyright (C) 2020 - 2021 EmDev LLC
Copyright (C) 2020 - 2023 EmDev LLC
==========
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.

View File

@ -4,7 +4,7 @@
~~~~~~licensing~~~~~~
profile-producing
==========
Copyright (C) 2020 - 2021 EmDev LLC
Copyright (C) 2020 - 2023 EmDev LLC
==========
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.

View File

@ -3,7 +3,7 @@
<parent>
<groupId>ru.entaxy.esb.platform.runtime.core.objects-implementations</groupId>
<artifactId>profile-implementation</artifactId>
<version>1.8.2.2</version>
<version>1.8.3</version>
</parent>
<groupId>ru.entaxy.esb.platform.runtime.core.objects-implementations.profile-implementation</groupId>
<artifactId>profile-storage</artifactId>

View File

@ -2,14 +2,14 @@
* ~~~~~~licensing~~~~~~
* test-producers
* ==========
* Copyright (C) 2020 - 2022 EmDev LLC
* Copyright (C) 2020 - 2023 EmDev LLC
* ==========
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*
* http://www.apache.org/licenses/LICENSE-2.0
*
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.