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</groupId>
<artifactId>base</artifactId>
<version>1.8.2.2</version>
<version>1.8.3</version>
</parent>
<groupId>ru.entaxy.esb.platform.runtime.base</groupId>
<artifactId>base-support</artifactId>

View File

@ -2,7 +2,7 @@
* ~~~~~~licensing~~~~~~
* base-support
* ==========
* 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

@ -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.
@ -44,11 +44,29 @@ public class DependencySorter {
.collect(Collectors.toList());
if (nextObjects.isEmpty())
// TODO create more informative exception
throw new Exception("Contains unsatisfied dependencies");
throw new UnsatisfiedDependenciesException(
origin.stream().filter(obj->!result.contains(obj))
.collect(Collectors.toList())
);
result.addAll(nextObjects);
}
return result;
}
@SuppressWarnings("serial")
public static class UnsatisfiedDependenciesException extends Exception {
protected List<Object> objects;
public UnsatisfiedDependenciesException(List<?> list) {
super("Contains unsatisfied dependencies");
this.objects.addAll(list);
}
public List<Object> getObjects() {
return objects;
}
}
}

View File

@ -2,7 +2,7 @@
* ~~~~~~licensing~~~~~~
* base-support
* ==========
* 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

@ -1,7 +1,7 @@
/* ~~~~~~licensing~~~~~~
* base-support
* ==========
* 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.
@ -103,13 +103,19 @@ public class JSONUtils {
return result;
}
public static String getJsonRootObjectString(URL url) throws IOException {
try (BufferedReader reader = new BufferedReader(new InputStreamReader(
url.openStream(), StandardCharsets.UTF_8))){
String data = reader
.lines()
.collect(Collectors.joining("\n"));
return data;
}
}
public static JsonObject getJsonRootObject(URL url) throws IOException {
String metadata = new BufferedReader (
new InputStreamReader(
url.openStream(), StandardCharsets.UTF_8))
.lines()
.collect(Collectors.joining("\n"));
return JSONUtils.getJsonRootObject(metadata);
return JSONUtils.getJsonRootObject(getJsonRootObjectString(url));
}
public static JsonObject getJsonRootObject(String jsonData) {
@ -207,6 +213,40 @@ public class JSONUtils {
// System.out.println("\n -- found --\n" + currentElement.toString() + "\n");
return true;
}
public static JsonElement findElement(JsonObject jsonObject, String pathFragment) {
JsonElement result = findElement(jsonObject, pathFragment, "");
return result;
}
public static JsonElement findElement(JsonObject jsonObject, String pathFragment, String parentPath) {
for (Entry<String, JsonElement> entry: jsonObject.entrySet()) {
String currentPath = parentPath + "." + entry.getKey();
if (currentPath.endsWith(pathFragment))
return entry.getValue();
}
for (Entry<String, JsonElement> entry: jsonObject.entrySet()) {
if (!entry.getValue().isJsonObject())
continue;
String currentPath = parentPath + "." + entry.getKey();
JsonElement currentResult = findElement(entry.getValue().getAsJsonObject(), pathFragment, currentPath);
if (currentResult != null)
return currentResult;
}
return null;
}
public static class JsonTraverse {

View File

@ -2,7 +2,7 @@
* ~~~~~~licensing~~~~~~
* base-support
* ==========
* 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

@ -2,7 +2,7 @@
* ~~~~~~licensing~~~~~~
* base-support
* ==========
* 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

@ -2,7 +2,7 @@
* ~~~~~~licensing~~~~~~
* profile-management
* ==========
* 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

@ -2,7 +2,7 @@
* ~~~~~~licensing~~~~~~
* profile-management
* ==========
* 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

@ -2,7 +2,7 @@
* ~~~~~~licensing~~~~~~
* profile-management
* ==========
* 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

@ -2,7 +2,7 @@
* ~~~~~~licensing~~~~~~
* profile-management
* ==========
* 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

@ -2,7 +2,7 @@
* ~~~~~~licensing~~~~~~
* profile-management
* ==========
* 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

@ -2,7 +2,7 @@
* ~~~~~~licensing~~~~~~
* base-support
* ==========
* 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

@ -2,7 +2,7 @@
* ~~~~~~licensing~~~~~~
* profile-management
* ==========
* 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

@ -2,7 +2,7 @@
* ~~~~~~licensing~~~~~~
* base-support
* ==========
* 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

@ -2,7 +2,7 @@
* ~~~~~~licensing~~~~~~
* base-support
* ==========
* 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.