Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.juzu
Interface URLBuilder

    public interface URLBuilder

The `URLBuilder` produces URL for a Juzu application.

Builders can be obtained from a `MimeContext` object for building controller methods, however the favorite way to obtain a builder is to use a controller companion that provides a type safe way for creating fully configured builders.

Type safe `URLBuilder` factory method are generated for each view, action or resource controller methods. The signature of an url builder factory is obtained by translating the signature of the controller method and appending the suffix URL after the method name.

`

        public void MyController {

           @Action
           public void myAction(String param) { }

           @View
           public void myRender() {
              URLBuilder builder = MyController_.myActionURL("hello");
              String url = builder.toString();
           }
        }

`

Author:
  Julien Viet

Method Summary
`URLBuilder` | `escapeXML(Boolean escapeXML)`
`URLBuilder` | `setParameter(String name, String value)` Set a parameter on the URL that will be built by this builder.
`URLBuilder` | `setParameter(String name, String[] value)` Set a parameter on the URL that will be built by this builder.
`String` | `toString()` Build the string value of this URL.

Method Detail

### setParameter

    URLBuilder setParameter(String name,
                            String value)
                            throws NullPointerException

  Set a parameter on the URL that will be built by this builder. This method replaces the parameter with the given name . A parameter value of `null` indicates that this parameter should be removed.

  Parameters:
    `name` - the parameter name
    `value` - the parameter value
  Returns:
    this builder
  Throws:
    `NullPointerException` - if the name parameter is null

### setParameter

    URLBuilder setParameter(String name,
                            String[] value)
                            throws NullPointerException

  Set a parameter on the URL that will be built by this builder. This method replaces the parameter with the given name . A parameter value of `null` indicates that this parameter should be removed.

  Parameters:
    `name` - the parameter name
    `value` - the parameter value
  Returns:
    this builder
  Throws:
    `NullPointerException` - if the name parameter is null

### escapeXML

    URLBuilder escapeXML(Boolean escapeXML)

### toString

    String toString()

  Build the string value of this URL.

  Overrides:
    `toString` in class `Object`
  Returns:
    the string url

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2012 eXo Platform SAS. All Rights Reserved.