Class ExchangeHintBuilder
- java.lang.Object
-
- org.onehippo.cms7.crisp.api.exchange.ExchangeHintBuilder
-
public abstract class ExchangeHintBuilder extends Object
Builder to help buildExchangeHint
instance.
-
-
Constructor Summary
Constructors Constructor Description ExchangeHintBuilder()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Deprecated Methods Modifier and Type Method Description abstract ExchangeHint
build()
Build aExchangeHint
.static ExchangeHintBuilder
create()
Create a defaultExchangeHintBuilder
instance.abstract String
methodName()
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.UserequestHeaders()
andrequestBody()
instead.abstract ExchangeHintBuilder
request(Object request)
Deprecated.UserequestHeaders(Map)
andrequestBody(Object)
instead.abstract Object
requestBody()
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.abstract Map<String,List<String>>
requestHeaders()
Return request headers.abstract ExchangeHintBuilder
requestHeaders(Map<String,List<String>> requestHeaders)
Reset request headers by the given newrequestHeaders
.
-
-
-
Method Detail
-
create
public static ExchangeHintBuilder create()
Create a defaultExchangeHintBuilder
instance.- Returns:
- a default
ExchangeHintBuilder
instance
-
build
public abstract ExchangeHint build()
Build aExchangeHint
.- Returns:
-
methodName
public abstract ExchangeHintBuilder methodName(String methodName)
Set method hint name.- Parameters:
methodName
- method hint name.- Returns:
- this ExchangeHintBuilder
-
methodName
public abstract String methodName()
Return method hint name- Returns:
- method hint name
-
request
@Deprecated public abstract ExchangeHintBuilder request(Object 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 public abstract Object 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
public abstract ExchangeHintBuilder requestHeader(String headerName, String... headerValue)
Add request headers.- Parameters:
headerName
- request header nameheaderValue
- request header values- Returns:
- this builder
-
requestHeaders
public abstract ExchangeHintBuilder requestHeaders(Map<String,List<String>> requestHeaders)
Reset request headers by the given newrequestHeaders
.- Parameters:
requestHeaders
- request headers- Returns:
- this builder
-
requestHeaders
public abstract Map<String,List<String>> requestHeaders()
Return request headers.- Returns:
- request headers
-
requestBody
public abstract ExchangeHintBuilder requestBody(Object 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
public abstract Object 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
public abstract ExchangeHintBuilder noCache(boolean 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
-
-