|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectno.sesat.search.view.navigation.AbstractUrlGenerator
no.sesat.search.view.navigation.BasicUrlGenerator
public class BasicUrlGenerator
This implementation generates the URL components as parameters: param1=param1Value¶m1=param2value. It is designed for extension in a way that makes it easy to create a subclass that generates some of the url components as path components (e.g. /search/param1Value/?param2=param2value).
| Constructor Summary | |
|---|---|
BasicUrlGenerator(DataModel dataModel,
NavigationConfig.Navigation navigation,
NavigationState state)
Creates a new url generator. |
|
| Method Summary | |
|---|---|
protected void |
appendParameterComponent(String component,
String encodedValue)
Appends the component and its encodedValue as a parameter component. |
protected void |
appendPathComponent(String component,
String value)
Appends the component as a path component. |
protected Set<String> |
getParameterComponents(NavigationConfig.Nav nav,
Set<String> extraUrlComponents,
String value)
Returns the list of components which are supposded to be generated as parameter components. |
protected String |
getParameterValue(String parameter,
String unencodedValue,
NavigationConfig.Nav nav,
Map<String,String> extraParameters)
|
protected List<String> |
getPathComponents(NavigationConfig.Nav nav)
Returns a list of components which are supposed to be generated as path components. |
String |
getURL(String unencodedValue,
NavigationConfig.Nav nav)
Returns the navigation URL for navigating nav to the given encodedValue. |
String |
getURL(String unencodedValue,
NavigationConfig.Nav nav,
Map<String,String> extraComponents)
Returns the navigation URL for navigating nav to the given encodedValue. |
protected StringBuilder |
getUrlBuilder()
Returns the string builder used for generating the url. |
| Methods inherited from class no.sesat.search.view.navigation.AbstractUrlGenerator |
|---|
enc, getDataModel, getNavigationState, getPrefix, getUrlComponentNames, getUrlComponentValue |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public BasicUrlGenerator(DataModel dataModel,
NavigationConfig.Navigation navigation,
NavigationState state)
dataModel - the datamodel.navigation - the navigation to generate urls for.state - the state of the current navigations.| Method Detail |
|---|
public final String getURL(String unencodedValue,
NavigationConfig.Nav nav)
unencodedValue - the unencoded value.nav - the navigator to navigate.
public String getURL(String unencodedValue,
NavigationConfig.Nav nav,
Map<String,String> extraComponents)
unencodedValue - the unencoded value.nav - the navigator to navigate.extraComponents - any extra components that should go into the URL. these should be all unencoded.
protected List<String> getPathComponents(NavigationConfig.Nav nav)
nav - the nav.
protected Set<String> getParameterComponents(NavigationConfig.Nav nav,
Set<String> extraUrlComponents,
String value)
nav - the nav.extraUrlComponents - any extra components for the URL.value -
protected void appendPathComponent(String component,
String value)
component - the component.value - the value of the component.
protected void appendParameterComponent(String component,
String encodedValue)
component - the component.encodedValue - the encodedValue of the component.
protected String getParameterValue(String parameter,
String unencodedValue,
NavigationConfig.Nav nav,
Map<String,String> extraParameters)
parameter - the parameter's name/key.unencodedValue - nav - extraParameters -
protected final StringBuilder getUrlBuilder()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||