public class UserAgent extends Object
| Modifier and Type | Field and Description |
|---|---|
protected static String |
cicdProvider |
protected static Environment |
env |
| Constructor and Description |
|---|
UserAgent() |
| Modifier and Type | Method and Description |
|---|---|
static String |
asString() |
static boolean |
matchAlphanum(String s) |
static boolean |
matchAlphanumOrSemVer(String s) |
static boolean |
matchSemVer(String s) |
static String |
sanitize(String s)
Replaces all non-alphanumeric characters with a hyphen.
|
static void |
withOtherInfo(String key,
String value) |
static void |
withPartner(String partner) |
static void |
withProduct(String product,
String productVersion) |
protected static volatile String cicdProvider
protected static Environment env
public static String sanitize(String s)
Note: Semver strings are comprised of alphanumeric characters, hyphens, periods and plus signs. This function will not remove these characters.
s - The string to sanitize.public static boolean matchSemVer(String s) throws IllegalArgumentException
IllegalArgumentExceptionpublic static boolean matchAlphanum(String s) throws IllegalArgumentException
IllegalArgumentExceptionpublic static boolean matchAlphanumOrSemVer(String s) throws IllegalArgumentException
IllegalArgumentExceptionpublic static void withPartner(String partner)
public static String asString()
Copyright © 2025. All rights reserved.