public class ServiceUriBuilder extends Object
| Constructor and Description |
|---|
ServiceUriBuilder() |
| Modifier and Type | Method and Description |
|---|---|
protected static String |
appendSlashIfMissing(String path)
Adds a slash ('/') as a suffix if it is not yet present.
|
URI |
build(URI baseUri,
String relativePath)
Builds a ERP service URI for a given relative path.
|
protected static String |
encloseSlashesIfMissing(String path)
Encloses the given String with a slash ('/') if they are not yet present.
|
protected static String |
prependSlashIfMissing(String path)
Adds a slash ('/') as a prefix if it is not yet present.
|
protected static String prependSlashIfMissing(String path)
path - The String to prefix with a slash.protected static String appendSlashIfMissing(String path)
path - The String to suffix with a slash.protected static String encloseSlashesIfMissing(String path)
path - The String to pre- and suffix with a slash.@Nonnull public URI build(@Nonnull URI baseUri, @Nonnull String relativePath)
baseUri - The URI to replace/adjust the path property.relativePath - The relative path to be used.baseUri, modified by adjusting the contained path with the
given relativePath.IllegalArgumentException - If the new URI object could not be created, most likely due to a wrongly formatted relativePath.Copyright © 2020 SAP SE. All rights reserved.