T - the class of the Controller to create links topublic class SimpleMethodLinkBuilder<T> extends Object implements MethodLinkBuilder<T>
MethodLinkBuilder implementation which delegates the creation
of UriComponents instances to its Controller methods through
a MethodLinkFactory of the same Controller.| Constructor and Description |
|---|
SimpleMethodLinkBuilder(MethodLinkFactory<T> linkFactory,
String methodName,
Set<io.springlets.web.mvc.support.SimpleMethodLinkBuilder.ParameterIndex> parameters,
Map<String,Object> pathVariables)
Creates a builder for a Controller's method with the given options.
|
| Modifier and Type | Method and Description |
|---|---|
MethodLinkBuilder<T> |
arg(int index,
Object parameter)
Provides parameters for the method.
|
String |
toPath()
Returns the Path of the URI String to the method with the current builder
configuration.
|
String |
toString() |
org.springframework.web.util.UriComponents |
toUri()
Creates a
UriComponents instance with the current builder
configuration. |
String |
toUriString()
Returns the full URI String to the method with the current builder
configuration.
|
MethodLinkBuilder<T> |
with(String variable,
Object value)
Adds a path variable to build the method URI.
|
public SimpleMethodLinkBuilder(MethodLinkFactory<T> linkFactory, String methodName, Set<io.springlets.web.mvc.support.SimpleMethodLinkBuilder.ParameterIndex> parameters, Map<String,Object> pathVariables)
linkFactory - to use to create the linksmethodName - the name of the Controller's methodparameters - of the methodpathVariables - path variables defined in the the
RequestMapping of the method to be replacedpublic MethodLinkBuilder<T> arg(int index, Object parameter)
MethodLinkBuilderarg in interface MethodLinkBuilder<T>public MethodLinkBuilder<T> with(String variable, Object value)
MethodLinkBuilderRequestMapping of the method.with in interface MethodLinkBuilder<T>variable - name of the path variablevalue - value to replace withpublic org.springframework.web.util.UriComponents toUri()
MethodLinkBuilderUriComponents instance with the current builder
configuration.toUri in interface MethodLinkBuilder<T>public String toUriString()
MethodLinkBuildertoUriString in interface MethodLinkBuilder<T>public String toPath()
MethodLinkBuildertoPath in interface MethodLinkBuilder<T>Copyright © 2018 DISID Corporation. All rights reserved.