Class ExchangeHintBuilder

java.lang.Object
org.onehippo.cms7.crisp.api.exchange.ExchangeHintBuilder

public abstract class ExchangeHintBuilder extends Object
Builder to help build ExchangeHint instance.
  • Constructor Details

    • ExchangeHintBuilder

      public ExchangeHintBuilder()
  • Method Details

    • create

      public static ExchangeHintBuilder create()
      Create a default ExchangeHintBuilder instance.
      Returns:
      a default ExchangeHintBuilder instance
    • build

      public abstract ExchangeHint build()
      Build a ExchangeHint.
      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.
      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...) and requestBody(Object) instead of using this deprecated method. When requestHeader(String, String...) or requestBody(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.
      Return request object representation or request callback instance than can be understood by the backend.

      Note: It is strongly recommended to use requestHeaders() and requestBody() 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 name
      headerValue - request header values
      Returns:
      this builder
    • requestHeaders

      public abstract ExchangeHintBuilder requestHeaders(Map<String,List<String>> requestHeaders)
      Reset request headers by the given new requestHeaders.
      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 underlying ResourceResolver should disallow caching.
      Parameters:
      noCache - flag whether or not the underlying ResourceResolver should disallow caching
      Returns:
      this builder
    • noCache

      public abstract boolean noCache()
      Return true if the underlying ResourceResolver should disallow caching.
      Returns:
      true if the underlying ResourceResolver should disallow caching