Package org.gcube.application.shlink
Class FetchUrlShortenerResource
java.lang.Object
org.gcube.application.shlink.FetchUrlShortenerResource
- Direct Known Subclasses:
FetchUrlShortenerFromNewIS,FetchUrlShortenerFromOldIS
The abstract class FetchUrlShortenerResource provides a template for fetching
and managing the URL shortener service configuration from a runtime resource.
It defines methods to read properties and check availability of the service.
- Since:
- July 2025
- Author:
- Francesco Mangiacrapa
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract voidprotected Stringprotected Stringprotected StringgetScope()protected Stringprotected abstract booleanprotected StringreadPropertyValue(Map<String, org.gcube.common.resources.gcore.ServiceEndpoint.Property> propertiesMap, String key, boolean failOnNull) Read property value.
-
Field Details
-
logger
protected static org.slf4j.Logger logger -
config
-
SHORTENER
Name of the runtime resource for URL shortener service- See Also:
-
KEY
- See Also:
-
DOMAIN
- See Also:
-
isAvailable
protected boolean isAvailable -
scope
-
-
Constructor Details
-
FetchUrlShortenerResource
- Throws:
Exception
-
-
Method Details
-
fetchUrlShortener
- Throws:
Exception
-
isAvailable
protected abstract boolean isAvailable() -
readPropertyValue
protected String readPropertyValue(Map<String, org.gcube.common.resources.gcore.ServiceEndpoint.Property> propertiesMap, String key, boolean failOnNull) throws ExceptionRead property value.- Parameters:
propertiesMap- the properties mapkey- the key- Returns:
- the string
- Throws:
Exception- the exception
-
getScope
-
getShortnerServiceUrl
-
getDomain
-
getApiKey
-