Package org.xwiki.url
Class AbstractXWikiURL
- java.lang.Object
-
- org.xwiki.url.AbstractXWikiURL
-
- All Implemented Interfaces:
XWikiURL
- Direct Known Subclasses:
XWikiEntityURL
public abstract class AbstractXWikiURL extends Object implements XWikiURL
Base XWikiURL implementation common to all extending classes. Manages XWiki URL parameters.- Since:
- 2.0M1
- Version:
- $Id: 90269f6a4aae81012c765905a048e97983dbbba2 $
-
-
Constructor Summary
Constructors Constructor Description AbstractXWikiURL(XWikiURLType type)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addParameter(String name, String value)
Map<String,List<String>>
getParameters()
A XWiki URL parameter provides optional additional information about the URL.String
getParameterValue(String name)
List<String>
getParameterValues(String name)
XWikiURLType
getType()
void
setType(XWikiURLType type)
-
-
-
Constructor Detail
-
AbstractXWikiURL
public AbstractXWikiURL(XWikiURLType type)
-
-
Method Detail
-
getType
public XWikiURLType getType()
-
setType
public void setType(XWikiURLType type)
-
addParameter
public void addParameter(String name, String value)
- Specified by:
addParameter
in interfaceXWikiURL
value
- the value of the parameter to add. If null then no value is added.
-
getParameters
public Map<String,List<String>> getParameters()
Description copied from interface:XWikiURL
A XWiki URL parameter provides optional additional information about the URL. For example these will find their way into the Query String when the XWiki URL serialized to a standard URL. Note that there can be several values for the same name (since this is allowed in URLs and we want to map a URL to a XWiki URL). Also note that the order in the map is the same as the order in the URL.- Specified by:
getParameters
in interfaceXWikiURL
- Returns:
- the XWiki URL parameters
-
getParameterValues
public List<String> getParameterValues(String name)
- Specified by:
getParameterValues
in interfaceXWikiURL
- Parameters:
name
- the parameter name for which to return the values- Returns:
- all the parameter values matching the passed parameter name
-
getParameterValue
public String getParameterValue(String name)
- Specified by:
getParameterValue
in interfaceXWikiURL
- Parameters:
name
- the parameter name for which to return the value- Returns:
- the first parameter value matching the passed parameter name
-
-