Remove unused org.eclipse.hawkbit.api.HostnameResolver (#1978)

_release_notes_

Signed-off-by: Avgustin Marinov <Avgustin.Marinov@bosch.com>
This commit is contained in:
Avgustin Marinov
2024-11-08 17:05:14 +02:00
committed by GitHub
parent d9ee7541a4
commit 56c548e474
6 changed files with 18 additions and 84 deletions

View File

@@ -13,18 +13,16 @@ import java.net.URI;
import java.util.List;
/**
* Interface declaration of the {@link ArtifactUrlHandler} which generates the
* URLs to specific artifacts.
* Interface declaration of the {@link ArtifactUrlHandler} which generates the URLs to specific artifacts.
*/
public interface ArtifactUrlHandler {
/**
* Returns a generated download URL for a given artifact parameters for a
* specific protocol.
* Returns a generated download URL for a given artifact parameters for a specific protocol.
*
* @param placeholder data for URL generation
* @param api given protocol that URL needs to support
* @return an URL for the given artifact parameters in a given protocol
* @return a URL for the given artifact parameters in a given protocol
*/
List<ArtifactUrl> getUrls(URLPlaceholder placeholder, ApiType api);
@@ -34,9 +32,8 @@ public interface ArtifactUrlHandler {
*
* @param placeholder data for URL generation
* @param api given protocol that URL needs to support
* @param requestUri of the request that allows the handler to align the generated
* URL to the original request.
* @return an URL for the given artifact parameters in a given protocol
* @param requestUri of the request that allows the handler to align the generated URL to the original request.
* @return a URL for the given artifact parameters in a given protocol
*/
List<ArtifactUrl> getUrls(URLPlaceholder placeholder, ApiType api, URI requestUri);
}
}

View File

@@ -13,8 +13,7 @@ import lombok.AccessLevel;
import lombok.NoArgsConstructor;
/**
* Utility class for Base10 to Base62 conversion and vice versa. Base62 has the
* benefit of being shorter in ASCII representation than Base10.
* Utility class for Base10 to Base62 conversion and vice versa. Base62 has the benefit of being shorter in ASCII representation than Base10.
*/
@NoArgsConstructor(access = AccessLevel.PRIVATE)
public final class Base62Util {
@@ -23,15 +22,15 @@ public final class Base62Util {
private static final int BASE62_BASE = BASE62_ALPHABET.length();
/**
* @param base10 number
* @param l number
* @return converted number into Base62 ASCII string
*/
public static String fromBase10(final long base10) {
if (base10 == 0) {
public static String fromBase10(final long l) {
if (l == 0) {
return "0";
}
long temp = base10;
long temp = l;
final StringBuilder sb = new StringBuilder();
while (temp > 0) {
@@ -48,10 +47,10 @@ public final class Base62Util {
return toBase10(new StringBuilder(base62).reverse().toString().toCharArray());
}
private static Long fromBase10(final long base10, final StringBuilder sb) {
final int rem = (int) (base10 % BASE62_BASE);
private static Long fromBase10(final long l, final StringBuilder sb) {
final int rem = (int) (l % BASE62_BASE);
sb.append(BASE62_ALPHABET.charAt(rem));
return base10 / BASE62_BASE;
return l / BASE62_BASE;
}
private static Long toBase10(final char[] chars) {

View File

@@ -1,26 +0,0 @@
/**
* Copyright (c) 2015 Bosch Software Innovations GmbH and others
*
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
*/
package org.eclipse.hawkbit.api;
import java.net.URL;
/**
* Resolve to reach the server url.
*/
@FunctionalInterface
public interface HostnameResolver {
/**
* Resolved the hostname
*
* @return resolved hostname as URL
*/
URL resolveHostname();
}