org.keycloak.util

## Class KeycloakUriBuilder

- java.lang.Object
- - org.keycloak.util.KeycloakUriBuilder

-     public class KeycloakUriBuilder
      extends Object

  Version:
    $Revision: 1 $
  Author:
    Bill Burke

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `KeycloakUriBuilder()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `URI` | `build(Object... values)`
    `URI` | `build(Object[] values, boolean encodeSlashInPath)`
    `URI` | `buildFromEncodedMap(Map<String,?> values)`
    `URI` | `buildFromMap(Map<String,?> values)`
    `URI` | `buildFromMap(Map<String,?> values, boolean encodeSlashInPath)`
    `protected URI` | `buildFromValues(boolean encodeSlash, boolean encoded, Object... values)`
    `protected URI` | `buildUriFromMap(Map<String,?> paramMap, boolean fromEncodedMap, boolean encodeSlash)`
    `KeycloakUriBuilder` | `clone()`
    `static boolean` | `compare(String s1, String s2)`
    `static Matcher` | `createUriParamMatcher(String string)`
    `KeycloakUriBuilder` | `fragment(String fragment)`
    `static KeycloakUriBuilder` | `fromPath(String path)`
    `static KeycloakUriBuilder` | `fromTemplate(String uriTemplate)` You may put path parameters anywhere within the uriTemplate except port
    `static KeycloakUriBuilder` | `fromUri(String uriTemplate)`
    `static KeycloakUriBuilder` | `fromUri(URI uri)`
    `String` | `getFragment()`
    `String` | `getHost()`
    `String` | `getPath()`
    `List<String>` | `getPathParamNamesInDeclarationOrder()` Return a unique order list of path params
    `int` | `getPort()`
    `String` | `getQuery()`
    `String` | `getScheme()`
    `String` | `getUserInfo()`
    `KeycloakUriBuilder` | `host(String host)`
    `KeycloakUriBuilder` | `matrixParam(String name, Object... values)`
    `protected KeycloakUriBuilder` | `parseHierarchicalUri(String uriTemplate, Matcher match)`
    `KeycloakUriBuilder` | `path(String segment)`
    `protected static String` | `paths(boolean encode, String basePath, String... segments)`
    `KeycloakUriBuilder` | `port(int port)`
    `KeycloakUriBuilder` | `queryParam(String name, Object... values)`
    `static URI` | `relativize(URI from, URI to)`
    `KeycloakUriBuilder` | `replaceMatrix(String matrix)`
    `protected StringBuffer` | `replaceParameter(Map<String,?> paramMap, boolean fromEncodedMap, boolean isTemplate, String string, StringBuffer buffer, boolean encodeSlash)`
    `KeycloakUriBuilder` | `replacePath(String path)`
    `protected StringBuffer` | `replacePathParameter(String name, String value, boolean isEncoded, String string, StringBuffer buffer, boolean encodeSlash)`
    `KeycloakUriBuilder` | `replaceQuery(String query)`
    `KeycloakUriBuilder` | `replaceQueryParam(String name, Object... values)`
    `protected StringBuffer` | `replaceQueryStringParameter(Map<String,?> paramMap, boolean fromEncodedMap, boolean isTemplate, String string, StringBuffer buffer)`
    `KeycloakUriBuilder` | `resolveTemplate(String name, Object value)`
    `KeycloakUriBuilder` | `resolveTemplate(String name, Object value, boolean encodeSlashInPath)`
    `KeycloakUriBuilder` | `resolveTemplates(Map<String,Object> templateValues)`
    `KeycloakUriBuilder` | `resolveTemplates(Map<String,Object> templateValues, boolean encodeSlashInPath)`
    `KeycloakUriBuilder` | `resolveTemplatesFromEncoded(Map<String,Object> templateValues)`
    `KeycloakUriBuilder` | `scheme(String scheme)`
    `KeycloakUriBuilder` | `schemeSpecificPart(String ssp)`
    `KeycloakUriBuilder` | `segment(String... segments)`
    `KeycloakUriBuilder` | `substitutePathParam(String name, Object value, boolean isEncoded)` Only replace path params in path of URI.
    `String` | `toTemplate()`
    `KeycloakUriBuilder` | `uri(String uriTemplate)`
    `KeycloakUriBuilder` | `uri(URI uri)`
    `KeycloakUriBuilder` | `uriTemplate(String uriTemplate)` You may put path parameters anywhere within the uriTemplate except port
    `KeycloakUriBuilder` | `userInfo(String ui)`

    - ### Methods inherited from class java.lang.Object

      `equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### KeycloakUriBuilder

          public KeycloakUriBuilder()

  - ### Method Detail

    - #### fromUri

          public static KeycloakUriBuilder fromUri(URI uri)

    - #### fromUri

          public static KeycloakUriBuilder fromUri(String uriTemplate)

    - #### fromPath

          public static KeycloakUriBuilder fromPath(String path)
                                             throws IllegalArgumentException

      Throws:
        `IllegalArgumentException`

    - #### clone

          public KeycloakUriBuilder clone()

      Overrides:
        `clone` in class `Object`

    - #### compare

          public static boolean compare(String s1,
                        String s2)

    - #### relativize

          public static URI relativize(URI from,
                       URI to)

    - #### fromTemplate

          public static KeycloakUriBuilder fromTemplate(String uriTemplate)

      You may put path parameters anywhere within the uriTemplate except port
      Parameters:
        `uriTemplate` -
      Returns:

    - #### uriTemplate

          public KeycloakUriBuilder uriTemplate(String uriTemplate)

      You may put path parameters anywhere within the uriTemplate except port
      Parameters:
        `uriTemplate` -
      Returns:

    - #### parseHierarchicalUri

          protected KeycloakUriBuilder parseHierarchicalUri(String uriTemplate,
                                                Matcher match)

    - #### uri

          public KeycloakUriBuilder uri(String uriTemplate)
                                 throws IllegalArgumentException

      Throws:
        `IllegalArgumentException`

    - #### uri

          public KeycloakUriBuilder uri(URI uri)
                                 throws IllegalArgumentException

      Throws:
        `IllegalArgumentException`

    - #### scheme

          public KeycloakUriBuilder scheme(String scheme)
                                    throws IllegalArgumentException

      Throws:
        `IllegalArgumentException`

    - #### schemeSpecificPart

          public KeycloakUriBuilder schemeSpecificPart(String ssp)
                                                throws IllegalArgumentException

      Throws:
        `IllegalArgumentException`

    - #### userInfo

          public KeycloakUriBuilder userInfo(String ui)

    - #### host

          public KeycloakUriBuilder host(String host)
                                  throws IllegalArgumentException

      Throws:
        `IllegalArgumentException`

    - #### port

          public KeycloakUriBuilder port(int port)
                                  throws IllegalArgumentException

      Throws:
        `IllegalArgumentException`

    - #### paths

          protected static String paths(boolean encode,
                     String basePath,
                     String... segments)

    - #### path

          public KeycloakUriBuilder path(String segment)
                                  throws IllegalArgumentException

      Throws:
        `IllegalArgumentException`

    - #### replaceMatrix

          public KeycloakUriBuilder replaceMatrix(String matrix)
                                           throws IllegalArgumentException

      Throws:
        `IllegalArgumentException`

    - #### replaceQuery

          public KeycloakUriBuilder replaceQuery(String query)
                                          throws IllegalArgumentException

      Throws:
        `IllegalArgumentException`

    - #### fragment

          public KeycloakUriBuilder fragment(String fragment)
                                      throws IllegalArgumentException

      Throws:
        `IllegalArgumentException`

    - #### substitutePathParam

          public KeycloakUriBuilder substitutePathParam(String name,
                                               Object value,
                                               boolean isEncoded)

      Only replace path params in path of URI. This changes state of URIBuilder.
      Parameters:
        `name` -
        `value` -
        `isEncoded` -
      Returns:

    - #### buildFromMap

          public URI buildFromMap(Map<String,?> values)
                           throws IllegalArgumentException

      Throws:
        `IllegalArgumentException`

    - #### buildFromEncodedMap

          public URI buildFromEncodedMap(Map<String,?> values)
                                  throws IllegalArgumentException

      Throws:
        `IllegalArgumentException`

    - #### buildFromMap

          public URI buildFromMap(Map<String,?> values,
                         boolean encodeSlashInPath)
                           throws IllegalArgumentException

      Throws:
        `IllegalArgumentException`

    - #### buildUriFromMap

          protected URI buildUriFromMap(Map<String,?> paramMap,
                            boolean fromEncodedMap,
                            boolean encodeSlash)
                                 throws IllegalArgumentException

      Throws:
        `IllegalArgumentException`

    - #### replacePathParameter

          protected StringBuffer replacePathParameter(String name,
                                          String value,
                                          boolean isEncoded,
                                          String string,
                                          StringBuffer buffer,
                                          boolean encodeSlash)

    - #### createUriParamMatcher

          public static Matcher createUriParamMatcher(String string)

    - #### replaceParameter

          protected StringBuffer replaceParameter(Map<String,?> paramMap,
                                      boolean fromEncodedMap,
                                      boolean isTemplate,
                                      String string,
                                      StringBuffer buffer,
                                      boolean encodeSlash)

    - #### replaceQueryStringParameter

          protected StringBuffer replaceQueryStringParameter(Map<String,?> paramMap,
                                                 boolean fromEncodedMap,
                                                 boolean isTemplate,
                                                 String string,
                                                 StringBuffer buffer)

    - #### getPathParamNamesInDeclarationOrder

          public List<String> getPathParamNamesInDeclarationOrder()

      Return a unique order list of path params
      Returns:

    - #### build

          public URI build(Object... values)
                    throws IllegalArgumentException

      Throws:
        `IllegalArgumentException`

    - #### buildFromValues

          protected URI buildFromValues(boolean encodeSlash,
                            boolean encoded,
                            Object... values)

    - #### matrixParam

          public KeycloakUriBuilder matrixParam(String name,
                                       Object... values)
                                         throws IllegalArgumentException

      Throws:
        `IllegalArgumentException`

    - #### queryParam

          public KeycloakUriBuilder queryParam(String name,
                                      Object... values)
                                        throws IllegalArgumentException

      Throws:
        `IllegalArgumentException`

    - #### replaceQueryParam

          public KeycloakUriBuilder replaceQueryParam(String name,
                                             Object... values)
                                               throws IllegalArgumentException

      Throws:
        `IllegalArgumentException`

    - #### getHost

          public String getHost()

    - #### getScheme

          public String getScheme()

    - #### getPort

          public int getPort()

    - #### getUserInfo

          public String getUserInfo()

    - #### getPath

          public String getPath()

    - #### getQuery

          public String getQuery()

    - #### getFragment

          public String getFragment()

    - #### segment

          public KeycloakUriBuilder segment(String... segments)
                                     throws IllegalArgumentException

      Throws:
        `IllegalArgumentException`

    - #### replacePath

          public KeycloakUriBuilder replacePath(String path)

    - #### build

          public URI build(Object[] values,
                  boolean encodeSlashInPath)
                    throws IllegalArgumentException

      Throws:
        `IllegalArgumentException`

    - #### toTemplate

          public String toTemplate()

    - #### resolveTemplate

          public KeycloakUriBuilder resolveTemplate(String name,
                                           Object value)
                                             throws IllegalArgumentException

      Throws:
        `IllegalArgumentException`

    - #### resolveTemplates

          public KeycloakUriBuilder resolveTemplates(Map<String,Object> templateValues)
                                              throws IllegalArgumentException

      Throws:
        `IllegalArgumentException`

    - #### resolveTemplate

          public KeycloakUriBuilder resolveTemplate(String name,
                                           Object value,
                                           boolean encodeSlashInPath)
                                             throws IllegalArgumentException

      Throws:
        `IllegalArgumentException`

    - #### resolveTemplates

          public KeycloakUriBuilder resolveTemplates(Map<String,Object> templateValues,
                                            boolean encodeSlashInPath)
                                              throws IllegalArgumentException

      Throws:
        `IllegalArgumentException`

    - #### resolveTemplatesFromEncoded

          public KeycloakUriBuilder resolveTemplatesFromEncoded(Map<String,Object> templateValues)
                                                         throws IllegalArgumentException

      Throws:
        `IllegalArgumentException`

Copyright © 2014. All Rights Reserved.