Package com.orchestranetworks.rest.util

# Interface URIInfoUtility

public interface URIInfoUtility
This class provides useful methods to generate URI specific to EBX®.

These methods automatically take into account EBX® server's configuration and current context such as REST proxy configuration and REST Forward modes.

Since:
  5.9.0
See Also:
  - `SessionContext.getURIInfoUtility()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `<T extends URIBuilderForBuiltin<T>>
  T`
  `createBuilderForBuiltin(CategoryURIBuilder<T> aCategoryURIBuilder)`
  Creates a `URI` builder useful for generating URIs for the EBX® built-in REST services.
  `<T extends URIBuilderForBuiltin<T>>
  T`
  `createBuilderForBuiltin(CategoryURIBuilder<T> aCategoryURIBuilder, boolean isRequestQueryParamsPropagated)`
  Creates a `URI` builder useful for generating URIs for the EBX® built-in REST services.
  `URIBuilderForResource`
  `createBuilderForResource()`
  Creates a `URI` builder for generating URIs or URLs for resources packaged with the current module.
  `URIBuilderForResource`
  `createBuilderForResource(String aModuleName)`
  Creates a `URI` builder for generating URIs or URLs for resources packaged with a specified module.
  `UriBuilder`
  `createBuilderForRESTApplication()`
  Creates a `URI` builder for generating URIs or URLs for REST services associated to the current REST application.
  `UriBuilder`
  `createBuilderForServer()`
  Creates a URI builder for generating URIs or URLs for resources hosted by the current server.
  `URI`
  `getBaseURIForBuiltin()`
  Returns the EBX® built-in REST services base `URI`.
  `URI`
  `getBaseURIForRESTApplication()`
  Returns the REST application base `URI` for the current application.
  `URI`
  `getBaseURIForServer()`
  Returns the server base `URI`.

- ## Method Details

  - ### createBuilderForBuiltin

    <T extends URIBuilderForBuiltin<T>> T createBuilderForBuiltin(CategoryURIBuilder<T> aCategoryURIBuilder) throws IllegalArgumentException
    Creates a `URI` builder useful for generating URIs for the EBX® built-in REST services.

    The `URI` builder will not be initialized with the current HTTP request's query parameters.

    Throws:
      `IllegalArgumentException`
    See Also:
      - `createBuilderForBuiltin(CategoryURIBuilder, boolean)`

  - ### createBuilderForBuiltin

    <T extends URIBuilderForBuiltin<T>> T createBuilderForBuiltin(CategoryURIBuilder<T> aCategoryURIBuilder, boolean isRequestQueryParamsPropagated) throws IllegalArgumentException
    Creates a `URI` builder useful for generating URIs for the EBX® built-in REST services.

    The builder is initialized with the built-in data services base `URI`. The data services base `URI` is automatically initialized by the REST Toolkit depending on the current request.

    Parameters:
      `aCategoryURIBuilder` - the service category `URI` builder which is declared as a constant in `CategoryURIBuilder`. It specifies for which REST category the `URI` builder will be used.
      `isRequestQueryParamsPropagated` - `true` if the `URI` builder must be initialized with the current HTTP request's query parameters, `false` otherwise.
    Returns:
      the appropriate `URI` builder for the provided `aCategoryURIBuilder`.
    Throws:
      `IllegalArgumentException` - if `aCategoryURIBuilder` is `null`
    Since:
      6.0.0
    See Also:
      - built-in REST services URL

  - ### createBuilderForResource

    URIBuilderForResource createBuilderForResource() throws ModuleNotFoundException
    Creates a `URI` builder for generating URIs or URLs for resources packaged with the current module.
    Throws:
      `ModuleNotFoundException`
    See Also:
      - `createBuilderForResource(String)`

  - ### createBuilderForResource

    URIBuilderForResource createBuilderForResource(String aModuleName) throws ModuleNotFoundException
    Creates a `URI` builder for generating URIs or URLs for resources packaged with a specified module.
    Parameters:
      `aModuleName` - the specified module name, if `null` or empty, the current module is used
    Throws:
      `ModuleNotFoundException` - the module is not registered

  - ### createBuilderForRESTApplication

    UriBuilder createBuilderForRESTApplication()
    Creates a `URI` builder for generating URIs or URLs for REST services associated to the current REST application.

    The base path is the one specified by the annotation `ApplicationPath` defined on the class extending `RESTApplicationAbstract`.

    Overriding already provided values is not supported and must be avoided.

    See Also:
      - Application definitions

  - ### createBuilderForServer

    UriBuilder createBuilderForServer()
    Creates a URI builder for generating URIs or URLs for resources hosted by the current server.

    The builder is initialized using the `getBaseURIForServer()` method.

    Overriding already provided values is not supported and must be avoided.

  - ### getBaseURIForBuiltin

    URI getBaseURIForBuiltin()
    Returns the EBX® built-in REST services base `URI`.
    Since:
      6.0.0
    See Also:
      - `createBuilderForBuiltin(CategoryURIBuilder)`

  - ### getBaseURIForRESTApplication

    URI getBaseURIForRESTApplication()
    Returns the REST application base `URI` for the current application.
    See Also:
      - `createBuilderForRESTApplication()`

  - ### getBaseURIForServer

    URI getBaseURIForServer()
    Returns the server base `URI`.
    See Also:
      - `createBuilderForServer()`