com.xpn.xwiki.api
Class Context
java.lang.Object
com.xpn.xwiki.api.Api
com.xpn.xwiki.api.Context
public class Context
- extends Api
Fields inherited from class com.xpn.xwiki.api.Api |
context |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Context
public Context(XWikiContext context)
getRequest
public XWikiRequest getRequest()
- Returns:
- an object which contains the Request context
getResponse
public XWikiResponse getResponse()
- Returns:
- an object which contains the response object
getMode
public int getMode()
getDatabase
public java.lang.String getDatabase()
- Returns:
- the current database name
getOriginalDatabase
public java.lang.String getOriginalDatabase()
- Returns:
- the original database
setDatabase
public void setDatabase(java.lang.String database)
- set the database if you have the programming right
- Parameters:
database
- the data name
getURLFactory
public XWikiURLFactory getURLFactory()
- Returns:
- the url Factory
isVirtual
public boolean isVirtual()
- Returns:
- true if the server is in virtual mode (ie host more than one wiki)
getAction
public java.lang.String getAction()
- Returns:
- the requested action
getLanguage
public java.lang.String getLanguage()
- Returns:
- the language of the current user
getXWiki
public XWiki getXWiki()
- Returns:
- the XWiki object if you have the programming right
getDoc
public XWikiDocument getDoc()
- Returns:
- the current requested document
getUser
public java.lang.String getUser()
- Returns:
- the current user which made the request
getLocalUser
public java.lang.String getLocalUser()
- Returns:
- the local username of the current user which made the request
setDoc
public void setDoc(XWikiDocument doc)
- set the document if you have the programming right
- Parameters:
doc
-
getContext
public XWikiContext getContext()
- Returns:
- the unwrapped version of the context if you have the programming right
getProtectedContext
protected XWikiContext getProtectedContext()
get
public java.lang.Object get(java.lang.String key)
put
public void put(java.lang.String key,
Object value)
setFinished
public void setFinished(boolean finished)
getCacheDuration
public int getCacheDuration()
- Returns:
- the cache duration
setCacheDuration
public void setCacheDuration(int duration)
- Parameters:
duration
- in second
Copyright 2003 Ludovic Dubost