Class RequestContext.Data

java.lang.Object
ch.tocco.nice2.boot.api.executioncontext.RequestContext.Data
Enclosing interface:
RequestContext

public static class RequestContext.Data extends Object
  • Constructor Details

    • Data

      public Data(String baseUrl, String path, @Nullable @Nullable String clientIpAddress, @Nullable @Nullable String userAgent, @Nullable @Nullable String requestId, @Nullable @Nullable String requestedBusinessUnit, @Nullable @Nullable String originId, @Nullable @Nullable String ruleProvider)
  • Method Details

    • getBaseUrl

      public String getBaseUrl()
      Returns:
      the current URL without path (e.g. "https://backoffice.tocco.ch")
    • getPath

      public String getPath()
      Returns:
      the path part of the URL (e.g. "/tocco")
    • getClientIpAddress

      public Optional<String> getClientIpAddress()
      Returns:
      the IP address of the client
    • getUserAgent

      public Optional<String> getUserAgent()
      Returns:
      the user agent string of the client
    • getRequestId

      public Optional<String> getRequestId()
      Returns:
      the request id ("X-Request-Id" header)
    • getRequestedBusinessUnit

      public Optional<String> getRequestedBusinessUnit()
      Returns:
      the request id ("X-Business-Unit" header)
    • getRequestOrigin

      public Optional<String> getRequestOrigin()
      Returns:
      the request id ("X-Origin-Id" header)
    • getRuleProvider

      public Optional<String> getRuleProvider()
      Returns:
      the rule provider id ("X-Rule-Provider-Id" header)