|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjuzu.URLBuilder
public final class 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();
}
}
| Nested Class Summary | |
|---|---|
static class |
URLBuilder.ESCAPE_XML
Escape XML type literal. |
| Field Summary | |
|---|---|
static URLBuilder.ESCAPE_XML |
ESCAPE_XML
Escape XML type literal instance. |
| Constructor Summary | |
|---|---|
URLBuilder(juzu.impl.request.spi.MimeBridge bridge,
juzu.impl.controller.descriptor.ControllerMethod method)
|
|
| Method Summary | ||
|---|---|---|
URLBuilder |
escapeXML(Boolean escapeXML)
|
|
juzu.impl.utils.ParameterMap |
getParameters()
|
|
URLBuilder |
setParameter(String name,
String value)
|
|
URLBuilder |
setParameter(String name,
String[] value)
|
|
URLBuilder |
setParameters(Map<String,String[]> parameters)
|
|
|
setProperty(PropertyType<T> propertyType,
T propertyValue)
Set or clear a property of the URL. |
|
String |
toString()
Build the string value of this URL. |
|
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static URLBuilder.ESCAPE_XML ESCAPE_XML
| Constructor Detail |
|---|
public URLBuilder(juzu.impl.request.spi.MimeBridge bridge,
juzu.impl.controller.descriptor.ControllerMethod method)
| Method Detail |
|---|
public URLBuilder setParameter(String name,
String value)
throws NullPointerException
NullPointerException
public URLBuilder setParameter(String name,
String[] value)
throws NullPointerException,
IllegalArgumentException
NullPointerException
IllegalArgumentException
public URLBuilder setParameters(Map<String,String[]> parameters)
throws NullPointerException,
IllegalArgumentException
NullPointerException
IllegalArgumentExceptionpublic juzu.impl.utils.ParameterMap getParameters()
public URLBuilder escapeXML(Boolean escapeXML)
public <T> URLBuilder setProperty(PropertyType<T> propertyType,
T propertyValue)
throws IllegalArgumentException
T - the property generic typepropertyType - the property typepropertyValue - the property value
IllegalArgumentException - if the property is not validpublic String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||