org.xwiki.url
Class AbstractXWikiURL
java.lang.Object
org.xwiki.url.AbstractXWikiURL
- All Implemented Interfaces:
- XWikiURL
- Direct Known Subclasses:
- XWikiEntityURL
public class AbstractXWikiURL
- extends Object
- implements XWikiURL
Base XWikiURL implementation common to all extending classes. Manages XWiki URL parameters.
- Since:
- 2.0M1
- Version:
- $Id$
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AbstractXWikiURL
public AbstractXWikiURL(XWikiURLType type)
getType
public XWikiURLType getType()
-
- Specified by:
getType in interface XWikiURL
- Returns:
- the type of URL (Entity URL, Attachment URL, Template URL, etc)
- See Also:
XWikiURL.getType()
setType
public void setType(XWikiURLType type)
addParameter
public void addParameter(String name,
String value)
- Specified by:
addParameter in interface XWikiURL
value - the value of the parameter to add. If null then no value is added.
getParameters
public Map<String,List<String>> getParameters()
- 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 interface XWikiURL
- Returns:
- the XWiki URL parameters
- See Also:
XWikiURL.getParameters()
getParameterValues
public List<String> getParameterValues(String name)
-
- Specified by:
getParameterValues in interface XWikiURL
- Parameters:
name - the parameter name for which to return the values
- Returns:
- all the parameter values matching the passed parameter name
- See Also:
XWikiURL.getParameterValues(String)
getParameterValue
public String getParameterValue(String name)
-
- Specified by:
getParameterValue in interface XWikiURL
- Parameters:
name - the parameter name for which to return the value
- Returns:
- the first parameter value matching the passed parameter name
- See Also:
XWikiURL.getParameterValue(String)
Copyright © 2004-2012 XWiki. All Rights Reserved.