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 Link icon

    • Data Link icon

      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 Link icon

    • getBaseUrl Link icon

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

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

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

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

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

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

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

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