release version 1.11.0
This commit is contained in:
@ -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>
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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;
|
||||
|
@ -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<>());
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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));
|
||||
|
||||
}
|
||||
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
Reference in New Issue
Block a user