|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.xpn.xwiki.api.Api
public class Api
Base class for all API Objects. API Objects are the Java Objects that can be manipulated from Velocity or Groovy in XWiki documents.
| Field Summary | |
|---|---|
protected XWikiContext |
context
The current context, needed by the underlying protected object. |
| Constructor Summary | |
|---|---|
Api(XWikiContext context)
|
|
| Method Summary | |
|---|---|
protected java.util.List<Document> |
convert(java.util.List<XWikiDocument> xdocList)
Convert a list of internal representation of documents to public api documents. |
protected Document |
convert(XWikiDocument xdoc)
Convert an internal representation of document to public api document. |
protected XWikiContext |
getXWikiContext()
Get the current context. |
boolean |
hasAccessLevel(java.lang.String right,
java.lang.String docname)
Check if the current user has an access level on a given document. |
boolean |
hasAdminRights()
Check if the current user has administration rights on the current space. |
boolean |
hasProgrammingRights()
Check if the current document has programming rights, meaning that it was last saved by a user with the programming right globally granted. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected XWikiContext context
getXWikiContext()| Constructor Detail |
|---|
public Api(XWikiContext context)
context - the XWiki Context objectgetXWikiContext()| Method Detail |
|---|
protected XWikiContext getXWikiContext()
public boolean hasProgrammingRights()
public boolean hasAdminRights()
public boolean hasAccessLevel(java.lang.String right,
java.lang.String docname)
throws XWikiException
right - The name of the right to verify (eg "programming", "admin", "register", etc).docname - The document for which to verify the right.
XWikiException - In case of an error finding the document or accessing groups information.protected java.util.List<Document> convert(java.util.List<XWikiDocument> xdocList)
xdocList - the internal documents.
protected Document convert(XWikiDocument xdoc)
xdoc - the internal document.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||