com.xpn.xwiki.api
Class Api

java.lang.Object
  extended by com.xpn.xwiki.api.Api
Direct Known Subclasses:
AdWordsPluginApi, AlexaPluginApi, Attachment, CalendarPluginApi, ChartingPluginApi, Context, Document, DocumentInfoAPI, Element, FeedPluginApi, FlickrPluginApi, GooglePluginApi, GraphVizPluginApi, IPResolverPluginApi, LDAPPluginApi, MailPluginApi, PackageAPI, PluginApi, QueryPluginApi, SVGPluginApi, TerraServerPluginApi, User, XWiki

public class Api
extends java.lang.Object


Field Summary
protected  XWikiContext context
           
 
Constructor Summary
Api(XWikiContext context)
           
 
Method Summary
 boolean checkProgrammingRights()
          check if the current user has the programming right
 boolean hasAccessLevel(java.lang.String right, java.lang.String docname)
          check if the current user has the given right
 boolean hasAdminRights()
          check if the current user has the Admin right
 boolean hasProgrammingRights()
          check if the current user has the programming right
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

context

protected XWikiContext context
Constructor Detail

Api

public Api(XWikiContext context)
Method Detail

checkProgrammingRights

public boolean checkProgrammingRights()
check if the current user has the programming right

Returns:
true if he has

hasProgrammingRights

public boolean hasProgrammingRights()
check if the current user has the programming right

Returns:
true if he has

hasAdminRights

public boolean hasAdminRights()
check if the current user has the Admin right

Returns:
true if he has

hasAccessLevel

public boolean hasAccessLevel(java.lang.String right,
                              java.lang.String docname)
                       throws XWikiException
check if the current user has the given right

Returns:
true if he has
Throws:
XWikiException


Copyright 2003 Ludovic Dubost