Package fr.paris.lutece.util.url
Class UrlItem
- java.lang.Object
-
- fr.paris.lutece.util.url.UrlItem
-
public class UrlItem extends Object
This class provides utility methods for the generation of Url String
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddParameter(String strName, int nValue)Add a Parameter to the url.voidaddParameter(String strName, String strValue)Add a Parameter to the url.StringgetAnchor()Get the anchorStringgetUrl()Return the url string.StringgetUrlWithEntity()Return the url string.voidsetAnchor(String strAnchorName)Set the anchorStringtoString()
-
-
-
Constructor Detail
-
UrlItem
public UrlItem(String strRoot)
Constructs an url with no parameters.- Parameters:
strRoot- The url's root.
-
-
Method Detail
-
addParameter
public void addParameter(String strName, String strValue)
Add a Parameter to the url.- Parameters:
strName- The name of the parameter.strValue- The value of the parameter.
-
addParameter
public void addParameter(String strName, int nValue)
Add a Parameter to the url.- Parameters:
strName- The name of the parameter.nValue- The value of the parameter.
-
getUrl
public String getUrl()
Return the url string.- Returns:
- String The url string.
-
getUrlWithEntity
public String getUrlWithEntity()
Return the url string.- Returns:
- String The url string with entity code.
-
getAnchor
public String getAnchor()
Get the anchor- Returns:
- the _srtAnchor
-
setAnchor
public void setAnchor(String strAnchorName)
Set the anchor- Parameters:
strAnchorName- the _srtAnchor to set
-
-