Class ExchangeHintBuilder
java.lang.Object
org.onehippo.cms7.crisp.api.exchange.ExchangeHintBuilder
Builder to help build
ExchangeHint
instance.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionabstract ExchangeHint
build()
Build aExchangeHint
.static ExchangeHintBuilder
create()
Create a defaultExchangeHintBuilder
instance.abstract String
Return method hint nameabstract ExchangeHintBuilder
methodName
(String methodName) Set method hint name.abstract boolean
noCache()
Return true if the underlyingResourceResolver
should disallow caching.abstract ExchangeHintBuilder
noCache
(boolean noCache) Set the flag whether or not the underlyingResourceResolver
should disallow caching.abstract Object
request()
Deprecated.abstract ExchangeHintBuilder
Deprecated.UserequestHeaders(Map)
andrequestBody(Object)
instead.abstract Object
Return request body object representation or request callback instance than can be understood by the backend.abstract ExchangeHintBuilder
requestBody
(Object requestBody) Set request body object representation or request callback instance than can be understood by the backendabstract ExchangeHintBuilder
requestHeader
(String headerName, String... headerValue) Add request headers.Return request headers.abstract ExchangeHintBuilder
requestHeaders
(Map<String, List<String>> requestHeaders) Reset request headers by the given newrequestHeaders
.
-
Constructor Details
-
ExchangeHintBuilder
public ExchangeHintBuilder()
-
-
Method Details
-
create
Create a defaultExchangeHintBuilder
instance.- Returns:
- a default
ExchangeHintBuilder
instance
-
build
Build aExchangeHint
.- Returns:
-
methodName
Set method hint name.- Parameters:
methodName
- method hint name.- Returns:
- this ExchangeHintBuilder
-
methodName
Return method hint name- Returns:
- method hint name
-
request
Deprecated.UserequestHeaders(Map)
andrequestBody(Object)
instead.Set request object representation or request callback instance than can be understood by the backend.Note: It is strongly recommended to use
requestHeader(String, String...)
andrequestBody(Object)
instead of using this deprecated method. WhenrequestHeader(String, String...)
orrequestBody(Object)
is used, any invocation of this deprecated method will be just ignored.- Parameters:
request
- request object representation or request callback instance that can be understood by the backend- Returns:
- request object representation or request callback instance that can be understood by the backend
-
request
Deprecated.UserequestHeaders()
andrequestBody()
instead.Return request object representation or request callback instance than can be understood by the backend.Note: It is strongly recommended to use
requestHeaders()
andrequestBody()
instead of using this deprecated method.- Returns:
- request object representation or request callback instance that can be understood by the backend
-
requestHeader
Add request headers.- Parameters:
headerName
- request header nameheaderValue
- request header values- Returns:
- this builder
-
requestHeaders
Reset request headers by the given newrequestHeaders
.- Parameters:
requestHeaders
- request headers- Returns:
- this builder
-
requestHeaders
Return request headers.- Returns:
- request headers
-
requestBody
Set request body object representation or request callback instance than can be understood by the backend- Parameters:
requestBody
- request body object representation or request callback instance that can be understood by the backend- Returns:
- this builder
-
requestBody
Return request body object representation or request callback instance than can be understood by the backend.- Returns:
- request body object representation or request callback instance that can be understood by the backend
-
noCache
Set the flag whether or not the underlyingResourceResolver
should disallow caching.- Parameters:
noCache
- flag whether or not the underlyingResourceResolver
should disallow caching- Returns:
- this builder
-
noCache
public abstract boolean noCache()Return true if the underlyingResourceResolver
should disallow caching.- Returns:
- true if the underlying
ResourceResolver
should disallow caching
-
requestHeaders()
andrequestBody()
instead.