Package org.fluentlenium.core.url
Class UrlTemplate
- java.lang.Object
-
- org.fluentlenium.core.url.UrlTemplate
-
public class UrlTemplate extends Object
A simple template engine for URL parameters.
-
-
Constructor Summary
Constructors Constructor Description UrlTemplate(String template)
Creates a new template
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description UrlTemplate
add(String value)
Add property value.UrlTemplate
addAll(List<String> values)
Add all property propertiesvoid
clear()
Remove all property values.List<UrlParameter>
getParameters()
Get all declared parameter parameters of this template.ParsedUrlTemplate
parse(String input)
Get properties from stringUrlTemplate
put(String name, String value)
Set property value.UrlTemplate
put(Map<String,String> values)
Set property properties.String
render()
Render the string.
-
-
-
Constructor Detail
-
UrlTemplate
public UrlTemplate(String template)
Creates a new template- Parameters:
template
- template string
-
-
Method Detail
-
clear
public void clear()
Remove all property values.
-
getParameters
public List<UrlParameter> getParameters()
Get all declared parameter parameters of this template.- Returns:
- declared parameter parameters
-
add
public UrlTemplate add(String value)
Add property value.- Parameters:
value
- property value- Returns:
this
reference to chain calls
-
put
public UrlTemplate put(String name, String value)
Set property value.- Parameters:
name
- namevalue
- value- Returns:
this
reference to chain calls
-
addAll
public UrlTemplate addAll(List<String> values)
Add all property properties- Parameters:
values
- property properties- Returns:
this
reference to chain calls
-
put
public UrlTemplate put(Map<String,String> values)
Set property properties.- Parameters:
values
- properties- Returns:
this
reference to chain calls
-
render
public String render()
Render the string.- Returns:
- rendered url, based on template with parameters applied.
-
parse
public ParsedUrlTemplate parse(String input)
Get properties from string- Parameters:
input
- string- Returns:
- properties
-
-