org.xwiki.resource
Interface Resource
- All Known Implementing Classes:
- AbstractResource, EntityResource
@Unstable
public interface Resource
Represents a XWiki Resource (Entity Resource, Attachment Resource, Template Resource, etc).
- Since:
- 5.3M1
- Version:
- $Id: 01c2b1223c558e88ccbc23e9b8c9cc2ce66e4729 $
getType
ResourceType getType()
- Returns:
- the type of Resource (Entity Resource, Attachment Resource, Template Resource, etc)
addParameter
void addParameter(String name,
String value)
- Parameters:
name - the name of the parameter to addvalue - the value of the parameter to add. If null then no value is added.
getParameters
Map<String,List<String>> getParameters()
- A Resource parameter provides optional additional information about the Resource.
For example these will find their way into the Query String when the Resource is serialized to a standard URL.
Note that there can be several values for the same name (since for example this is allowed in URLs and we want
to map a URL to a XWiki Resource). Also note that the order in the map is the same as the order in the
representation when it was parsed.
- Returns:
- the Resource parameters
getParameterValues
List<String> getParameterValues(String name)
- Parameters:
name - the parameter name for which to return the values
- Returns:
- all the parameter values matching the passed parameter name
getParameterValue
String getParameterValue(String name)
- Parameters:
name - the parameter name for which to return the value
- Returns:
- the first parameter value matching the passed parameter name
Copyright © 2004–2014 XWiki. All rights reserved.