public class ResourceReference extends Object implements Cloneable
| Constructor and Description |
|---|
ResourceReference(String reference,
ResourceType type) |
| Modifier and Type | Method and Description |
|---|---|
void |
addBaseReference(String baseReference) |
void |
addBaseReferences(List<String> baseReferences) |
ResourceReference |
clone() |
boolean |
equals(Object object) |
List<String> |
getBaseReferences() |
String |
getParameter(String name)
In order for Resource references to be extensible we allow for extra parameters in addition to the Resource
reference.
|
Map<String,String> |
getParameters() |
String |
getReference() |
ResourceType |
getType() |
int |
hashCode() |
boolean |
isTyped() |
void |
removeParameter(String name) |
void |
setParameter(String name,
String value) |
void |
setParameters(Map<String,String> parameters) |
void |
setReference(String reference) |
void |
setType(ResourceType type) |
void |
setTyped(boolean isTyped) |
String |
toString() |
public ResourceReference(String reference, ResourceType type)
reference - see getReference()type - see getType()public void setTyped(boolean isTyped)
isTyped - see isTyped()public boolean isTyped()
public void setReference(String reference)
reference - see getReference()public String getReference()
getType()public void addBaseReference(String baseReference)
baseReference - see getBaseReferences()public void addBaseReferences(List<String> baseReferences)
baseReferences - see getBaseReferences()public List<String> getBaseReferences()
getReference()
returns a non absolute reference, can be null. When resolving references the list should be
evaluated from first to last (the last entries qualifying the entries earlier in the list)public ResourceType getType()
ResourceTypepublic void setType(ResourceType type)
type - the type of the resourceResourceTypepublic void setParameter(String name, String value)
name - see getParameter(String)value - see getParameter(String)public void setParameters(Map<String,String> parameters)
parameters - see getParameters()public void removeParameter(String name)
name - see getParameter(String)public String getParameter(String name)
name - the name of the parameter to getpublic Map<String,String> getParameters()
getParameter(String)public String toString()
The output is syntax independent since this class is used for all syntaxes. Specific syntaxes should extend this class and override this method to perform syntax-dependent formatting.
toString in class ObjectObject.toString()public ResourceReference clone()
Copyright © 2004–2015 XWiki. All rights reserved.