Package com.flowable.content.rest
Class ContentRestUrlBuilder
java.lang.Object
com.flowable.content.rest.ContentRestUrlBuilder
public class ContentRestUrlBuilder
extends java.lang.Object
Helper class for building URLs based on a base URL.
An instance can be created by using
fromRequest(HttpServletRequest)
and fromCurrentRequest()
which extracts the base URL from the request or by specifying the base URL through
usingBaseUrl(String)
buildUrl(String[], Object...)
can be called several times to build URLs based on the base URL- Author:
- Tijs Rademakers
-
Field Summary
Fields Modifier and Type Field Description protected java.lang.String
baseUrl
-
Constructor Summary
Constructors Modifier Constructor Description protected
ContentRestUrlBuilder()
protected
ContentRestUrlBuilder(java.lang.String baseUrl)
-
Method Summary
Modifier and Type Method Description java.lang.String
buildUrl(java.lang.String[] fragments, java.lang.Object... arguments)
static ContentRestUrlBuilder
fromCurrentRequest()
Extracts the base URL from current requeststatic ContentRestUrlBuilder
fromRequest(javax.servlet.http.HttpServletRequest request)
Extracts the base URL from the requestjava.lang.String
getBaseUrl()
static ContentRestUrlBuilder
usingBaseUrl(java.lang.String baseUrl)
Uses baseUrl as the base URL
-
Field Details
-
baseUrl
protected java.lang.String baseUrl
-
-
Constructor Details
-
ContentRestUrlBuilder
protected ContentRestUrlBuilder() -
ContentRestUrlBuilder
protected ContentRestUrlBuilder(java.lang.String baseUrl)
-
-
Method Details
-
getBaseUrl
public java.lang.String getBaseUrl() -
buildUrl
public java.lang.String buildUrl(java.lang.String[] fragments, java.lang.Object... arguments) -
usingBaseUrl
Uses baseUrl as the base URL -
fromRequest
Extracts the base URL from the request -
fromCurrentRequest
Extracts the base URL from current request
-