com.xpn.xwiki.plugin
Class PluginApi<T extends XWikiPluginInterface>

java.lang.Object
  extended by com.xpn.xwiki.api.Api
      extended by com.xpn.xwiki.plugin.PluginApi<T>
Type Parameters:
T - The type of the internal plugin.
Direct Known Subclasses:
FileUploadPluginApi, GraphVizPluginApi, ImagePluginAPI, RightsManagerPluginApi

Deprecated. the plugin technology is deprecated, consider rewriting as components

@Deprecated
public class PluginApi<T extends XWikiPluginInterface>
extends Api

Base class for all plugin APIs. API Objects are the Java Objects that can be manipulated from Velocity or Groovy scripts in XWiki documents. They wrap around a fully functional and privileged Plugin object, and forward safe calls to that object.

Version:
$Id: bbabcff306a8c61a4a9e568e2bc38754345ff1de $

Field Summary
 
Fields inherited from class com.xpn.xwiki.api.Api
context
 
Constructor Summary
PluginApi(T plugin, XWikiContext context)
          Deprecated. API constructor.
 
Method Summary
 T getInternalPlugin()
          Deprecated. Return the inner plugin object, if the user has the required programming rights.
protected  T getProtectedPlugin()
          Deprecated. Return the inner plugin object.
 void setPlugin(T plugin)
          Deprecated. Set the inner plugin object.
 
Methods inherited from class com.xpn.xwiki.api.Api
convert, convert, getXWikiContext, hasAccessLevel, hasAdminRights, hasProgrammingRights, hasWikiAdminRights
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PluginApi

public PluginApi(T plugin,
                 XWikiContext context)
Deprecated. 
API constructor. The API must know the plugin object it wraps, and the request context.

Parameters:
plugin - The wrapped plugin object.
context - Context of the request.
Method Detail

getProtectedPlugin

protected T getProtectedPlugin()
Deprecated. 
Return the inner plugin object. This method is only for the plugin API's internal use, and should not be exposed to scripting languages. It is an XWiki practice to expose all the functionality using an API, and allow access to the internal objects only to users with Programming Rights.

Returns:
The wrapped plugin object.
Since:
1.3RC1

getInternalPlugin

public T getInternalPlugin()
Deprecated. 
Return the inner plugin object, if the user has the required programming rights.

Returns:
The wrapped plugin object.
Since:
1.3RC1

setPlugin

public void setPlugin(T plugin)
Deprecated. 
Set the inner plugin object.

Parameters:
plugin - The wrapped plugin object.


Copyright © 2004-2013 XWiki. All Rights Reserved.