Package org.xwiki.resource.entity
Class EntityResourceReference
- java.lang.Object
-
- org.xwiki.resource.AbstractResourceReference
-
- org.xwiki.resource.entity.EntityResourceReference
-
- All Implemented Interfaces:
ResourceReference
public class EntityResourceReference extends AbstractResourceReference
Represents an XWiki Resource Reference pointing to an Entity (Document, Space, Wiki, Object, etc).- Since:
- 6.1M2
- Version:
- $Id: f096cf0edd45f9a858e018ce1b4f66a8a66dcb2e $
-
-
Field Summary
Fields Modifier and Type Field Description static ResourceType
TYPE
Represents an Entity Resource Type.
-
Constructor Summary
Constructors Constructor Description EntityResourceReference(EntityReference entityReference, EntityResourceAction action)
EntityResourceReference(EntityReference entityReference, EntityResourceAction action, String anchor)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object object)
EntityResourceAction
getAction()
String
getAnchor()
EntityReference
getEntityReference()
Locale
getLocale()
String
getRevision()
int
hashCode()
void
setAction(EntityResourceAction action)
void
setAnchor(String anchor)
void
setEntityReference(EntityReference entityReference)
void
setLocale(Locale locale)
void
setRevision(String revision)
String
toString()
-
Methods inherited from class org.xwiki.resource.AbstractResourceReference
addParameter, getParameters, getParameterValue, getParameterValues, getType, setParameter, setType
-
-
-
-
Field Detail
-
TYPE
public static final ResourceType TYPE
Represents an Entity Resource Type.
-
-
Constructor Detail
-
EntityResourceReference
public EntityResourceReference(EntityReference entityReference, EntityResourceAction action)
- Parameters:
entityReference
- the entity reference being wrappedaction
- the instance representing the technical Action id (e.g. View, Download, etc)
-
EntityResourceReference
@Unstable public EntityResourceReference(EntityReference entityReference, EntityResourceAction action, String anchor)
- Parameters:
entityReference
- the entity reference being wrappedaction
- the instance representing the technical Action id (e.g. View, Download, etc)anchor
- the anchor- Since:
- 15.4RC1
-
-
Method Detail
-
getAction
public EntityResourceAction getAction()
- Returns:
- the action requested on this resource (e.g. View, Download, Edit, etc)
-
setAction
public void setAction(EntityResourceAction action)
- Parameters:
action
- seegetAction()
-
getEntityReference
public EntityReference getEntityReference()
- Returns:
- the wrapped entity reference
-
setEntityReference
public void setEntityReference(EntityReference entityReference)
- Parameters:
entityReference
- seegetEntityReference()
-
getAnchor
@Unstable public String getAnchor()
- Returns:
- the anchor
- Since:
- 15.4RC1
-
setAnchor
@Unstable public void setAnchor(String anchor)
- Parameters:
anchor
- the anchor- Since:
- 15.4RC1
-
setLocale
public void setLocale(Locale locale)
- Parameters:
locale
- seegetLocale()
-
getLocale
public Locale getLocale()
- Returns:
- the locale of the entity
-
setRevision
public void setRevision(String revision)
- Parameters:
revision
- seegetRevision()
-
getRevision
public String getRevision()
- Returns:
- the version of the resource (eg "2.1", etc)
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classAbstractResourceReference
-
equals
public boolean equals(Object object)
- Overrides:
equals
in classAbstractResourceReference
-
toString
public String toString()
- Overrides:
toString
in classAbstractResourceReference
-
-