org.xwiki.resource
Class EntityResource

java.lang.Object
  extended by org.xwiki.resource.AbstractResource
      extended by org.xwiki.resource.EntityResource
All Implemented Interfaces:
Resource

@Unstable
public class EntityResource
extends AbstractResource

Represents an XWiki Resource pointing to an Entity (Document, Space, Wiki, Object, etc).

Since:
5.3M1
Version:
$Id: 3a1c53ad1d86059f28d972599e09f8581f8d6a17 $

Constructor Summary
EntityResource(EntityReference entityReference)
           
 
Method Summary
 String getAction()
           
 EntityReference getEntityReference()
           
 Locale getLocale()
           
 String getRevision()
           
 void setAction(String action)
           
 void setEntityReference(EntityReference entityReference)
           
 void setLocale(Locale locale)
           
 void setRevision(String revision)
           
 
Methods inherited from class org.xwiki.resource.AbstractResource
addParameter, getParameters, getParameterValue, getParameterValues, getType, setType
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EntityResource

public EntityResource(EntityReference entityReference)
Parameters:
entityReference - the entity reference being wrapped
Method Detail

getAction

public String getAction()
Returns:
the action requested on this resource (e.g. "view", "download", etc). Note that We're not using a typed object since the action name can be anything and corresponds to an Action Component role hint.

setAction

public void setAction(String action)
Parameters:
action - see getAction()

getEntityReference

public EntityReference getEntityReference()
Returns:
the wrapped entity reference

setEntityReference

public void setEntityReference(EntityReference entityReference)
Parameters:
entityReference - see getEntityReference()

setLocale

public void setLocale(Locale locale)
Parameters:
locale - see getLocale()

getLocale

public Locale getLocale()
Returns:
the locale of the entity

setRevision

public void setRevision(String revision)
Parameters:
revision - see getRevision()

getRevision

public String getRevision()
Returns:
the version of the resource (eg "2.1", etc)


Copyright © 2004–2014 XWiki. All rights reserved.