release version 1.11.0

This commit is contained in:
2025-07-10 23:47:05 +03:00
parent 5cb6857fa1
commit 8dd9cf9cf2
3082 changed files with 278464 additions and 1833 deletions

View File

@ -3,7 +3,7 @@
<parent>
<groupId>ru.entaxy.esb.platform.runtime.base</groupId>
<artifactId>resources</artifactId>
<version>1.10.0</version>
<version>1.11.0</version>
</parent>
<groupId>ru.entaxy.esb.platform.runtime.base.resources</groupId>
<artifactId>resources-service</artifactId>

View File

@ -2,7 +2,7 @@
* ~~~~~~licensing~~~~~~
* resources-service
* ==========
* Copyright (C) 2020 - 2024 EmDev LLC
* Copyright (C) 2020 - 2025 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

View File

@ -2,7 +2,7 @@
* ~~~~~~licensing~~~~~~
* resources-service
* ==========
* Copyright (C) 2020 - 2024 EmDev LLC
* Copyright (C) 2020 - 2025 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

View File

@ -2,7 +2,7 @@
* ~~~~~~licensing~~~~~~
* resources-service
* ==========
* Copyright (C) 2020 - 2024 EmDev LLC
* Copyright (C) 2020 - 2025 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

View File

@ -2,7 +2,7 @@
* ~~~~~~licensing~~~~~~
* resources-service
* ==========
* Copyright (C) 2020 - 2024 EmDev LLC
* Copyright (C) 2020 - 2025 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

View File

@ -2,7 +2,7 @@
* ~~~~~~licensing~~~~~~
* resources-service
* ==========
* Copyright (C) 2020 - 2024 EmDev LLC
* Copyright (C) 2020 - 2025 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

View File

@ -2,7 +2,7 @@
* ~~~~~~licensing~~~~~~
* resources-service
* ==========
* Copyright (C) 2020 - 2024 EmDev LLC
* Copyright (C) 2020 - 2025 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
@ -33,6 +33,7 @@ import java.util.ArrayList;
import java.util.Calendar;
import java.util.Collections;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
import org.osgi.framework.BundleContext;
@ -112,7 +113,9 @@ public class EntaxyResourceServiceImpl implements EntaxyResourceService {
return null;
String location = resourceLocation;
try {
location = EntaxyResourceURLFactory.getLocalUri(resourceLocation).toString();
location = EntaxyResourceURLFactory
.getLocalUri(resourceLocation.replaceAll(" ", "%20")).toString()
.replaceAll("%20", " ");
} catch (URISyntaxException e) {
log.warn(String.format("Failed getting local URI for [%s]", resourceLocation), e);
}
@ -137,7 +140,9 @@ public class EntaxyResourceServiceImpl implements EntaxyResourceService {
String location = resourceLocation;
try {
location = EntaxyResourceURLFactory.getLocalUri(resourceLocation).toString();
location = EntaxyResourceURLFactory
.getLocalUri(resourceLocation.replaceAll(" ", "%20")).toString()
.replaceAll("%20", " ");
} catch (URISyntaxException e) {
log.warn(String.format("Failed getting local URI for [%s]", resourceLocation), e);
}
@ -166,6 +171,11 @@ public class EntaxyResourceServiceImpl implements EntaxyResourceService {
}
}
@Override
public Map<String, EntaxyResourceProvider> getProviders() {
return controller.getProviders();
}
protected void updateResourceTimestamp(EntaxyResource resource, String timestamp) {
if (resource == null)
return;

View File

@ -2,7 +2,7 @@
* ~~~~~~licensing~~~~~~
* resources-service
* ==========
* Copyright (C) 2020 - 2024 EmDev LLC
* Copyright (C) 2020 - 2025 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
@ -74,6 +74,10 @@ public class ProvidersController {
return this.providers.getOrDefault(protocol, null);
}
public Map<String, EntaxyResourceProvider> getProviders() {
return this.providers;
}
public void registerProtocolCallback(String protocol, EntaxyResourceProtocolAvailableCallback callback) {
if (!callbacks.containsKey(protocol))
callbacks.put(protocol, new ArrayList<>());

View File

@ -2,7 +2,7 @@
* ~~~~~~licensing~~~~~~
* resources-service
* ==========
* Copyright (C) 2020 - 2024 EmDev LLC
* Copyright (C) 2020 - 2025 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

View File

@ -2,7 +2,7 @@
* ~~~~~~licensing~~~~~~
* resources-service
* ==========
* Copyright (C) 2020 - 2024 EmDev LLC
* Copyright (C) 2020 - 2025 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

View File

@ -2,7 +2,7 @@
* ~~~~~~licensing~~~~~~
* resources-service
* ==========
* Copyright (C) 2020 - 2024 EmDev LLC
* Copyright (C) 2020 - 2025 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
@ -239,6 +239,8 @@ public class FileResourceProvider extends AbstractResourceProvider {
@Override
protected void deleteMatadata() {
if (!metadataInited)
initMetadata();
deleteFile(metadataFile);
}

View File

@ -2,7 +2,7 @@
* ~~~~~~licensing~~~~~~
* resources-service
* ==========
* Copyright (C) 2020 - 2024 EmDev LLC
* Copyright (C) 2020 - 2025 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

View File

@ -2,7 +2,7 @@
* ~~~~~~licensing~~~~~~
* resources-service
* ==========
* Copyright (C) 2020 - 2024 EmDev LLC
* Copyright (C) 2020 - 2025 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

View File

@ -2,7 +2,7 @@
* ~~~~~~licensing~~~~~~
* resources-service
* ==========
* Copyright (C) 2020 - 2024 EmDev LLC
* Copyright (C) 2020 - 2025 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

View File

@ -2,7 +2,7 @@
* ~~~~~~licensing~~~~~~
* schema-impl
* ==========
* Copyright (C) 2020 - 2024 EmDev LLC
* Copyright (C) 2020 - 2025 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

View File

@ -2,7 +2,7 @@
* ~~~~~~licensing~~~~~~
* resources-service
* ==========
* Copyright (C) 2020 - 2024 EmDev LLC
* Copyright (C) 2020 - 2025 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
@ -79,18 +79,23 @@ public class ResourceProvider {
int splitIndex = path.indexOf("/");
String protocol = splitIndex > 0
? path.substring(0, splitIndex)
: "";
: path;
if (splitIndex > 0)
path = path.substring(splitIndex + 1);
else
path = "";
if (!CommonUtils.isValid(protocol) || !CommonUtils.isValid(resourceName))
if (!CommonUtils.isValid(protocol) || !CommonUtils.isValid(resourceName)) {
log.warn("Incorrect resource URL: [{}]", entry.toString());
continue;
}
if (!resources.containsKey(protocol))
resources.put(protocol, new ArrayList<>());
resources.get(protocol).add(new ResourceDescriptor(entry, path + "/" + resourceName));
resources.get(protocol)
.add(new ResourceDescriptor(entry, (CommonUtils.isValid(path) ? path + "/" : "") + resourceName));
}

View File

@ -2,7 +2,7 @@
* ~~~~~~licensing~~~~~~
* resources-service
* ==========
* Copyright (C) 2020 - 2024 EmDev LLC
* Copyright (C) 2020 - 2025 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

View File

@ -2,7 +2,7 @@
* ~~~~~~licensing~~~~~~
* resources-service
* ==========
* Copyright (C) 2020 - 2024 EmDev LLC
* Copyright (C) 2020 - 2025 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

View File

@ -2,7 +2,7 @@
* ~~~~~~licensing~~~~~~
* resources-service
* ==========
* Copyright (C) 2020 - 2024 EmDev LLC
* Copyright (C) 2020 - 2025 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