Class PropertyBasedArtifactUrlResolver
java.lang.Object
org.eclipse.hawkbit.artifact.urlresolver.PropertyBasedArtifactUrlResolver
- All Implemented Interfaces:
ArtifactUrlResolver
Implementation for ArtifactUrlHandler for creating urls to download resource based on patterns configured by
patterns:
Default:
{protocol}://{hostname}:{port}{contextPath}/{tenant}/controller/v1/{controllerId}
/softwaremodules/{softwareModuleId}/artifacts/{artifactFileName}
Default (MD5SUM files):
{protocol}://{hostname}:{port}{contextPath}/{tenant}/controller/v1/{controllerId}/
softwaremodules/{softwareModuleId}/artifacts/{artifactFileName}.MD5SUM
PropertyBasedArtifactUrlResolverProperties.
This mechanism can be used to generate links to arbitrary file hosting infrastructure. However, the hawkBit update server
supports hosting files as well in the following
invalid reference
UrlProtocol#getRef()
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.eclipse.hawkbit.artifact.urlresolver.ArtifactUrlResolver
ArtifactUrlResolver.ApiType, ArtifactUrlResolver.DownloadDescriptor -
Constructor Summary
ConstructorsConstructorDescriptionPropertyBasedArtifactUrlResolver(PropertyBasedArtifactUrlResolverProperties urlHandlerProperties, String contextPath) -
Method Summary
Modifier and TypeMethodDescriptiongetUrls(ArtifactUrlResolver.DownloadDescriptor downloadDescriptor, ArtifactUrlResolver.ApiType api) Returns a generated download URL for a given artifact parameters for a specific protocol.getUrls(ArtifactUrlResolver.DownloadDescriptor downloadDescriptor, ArtifactUrlResolver.ApiType api, URI requestUri) Returns a generated download URL for a given artifact parameters for a specific protocol.
-
Constructor Details
-
PropertyBasedArtifactUrlResolver
public PropertyBasedArtifactUrlResolver(PropertyBasedArtifactUrlResolverProperties urlHandlerProperties, String contextPath)
-
-
Method Details
-
getUrls
public List<ArtifactUrl> getUrls(ArtifactUrlResolver.DownloadDescriptor downloadDescriptor, ArtifactUrlResolver.ApiType api) Description copied from interface:ArtifactUrlResolverReturns a generated download URL for a given artifact parameters for a specific protocol.- Specified by:
getUrlsin interfaceArtifactUrlResolver- Parameters:
downloadDescriptor- data for URL generationapi- given protocol that URL needs to support- Returns:
- a URL for the given artifact parameters in a given protocol
-
getUrls
public List<ArtifactUrl> getUrls(ArtifactUrlResolver.DownloadDescriptor downloadDescriptor, ArtifactUrlResolver.ApiType api, URI requestUri) Description copied from interface:ArtifactUrlResolverReturns a generated download URL for a given artifact parameters for a specific protocol.- Specified by:
getUrlsin interfaceArtifactUrlResolver- Parameters:
downloadDescriptor- data for URL generationapi- given protocol that URL needs to supportrequestUri- of the request that allows the handler to align the generated URL to the original request.- Returns:
- a URL for the given artifact parameters in a given protocol
-