Package com.xpn.xwiki.plugin
Class PluginApi<T extends XWikiPluginInterface>
- java.lang.Object
-
- com.xpn.xwiki.api.Api
-
- com.xpn.xwiki.plugin.PluginApi<T>
-
- Type Parameters:
T
- The type of the internal plugin.
- Direct Known Subclasses:
FileUploadPluginApi
,RightsManagerPluginApi
@Deprecated public class PluginApi<T extends XWikiPluginInterface> extends Api
Deprecated.the plugin technology is deprecated, consider rewriting as componentsBase 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: c559897b350c526e2b37836af79d90fa6071c9e5 $
-
-
Constructor Summary
Constructors Constructor Description PluginApi(T plugin, XWikiContext context)
Deprecated.API constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description 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, convert, convertAttachments, getAuthorizationManager, getContextualAuthorizationManager, getXWikiContext, hasAccess, hasAccessLevel, hasAdminRights, hasProgrammingRights, hasWikiAdminRights
-
-
-
-
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.
-
-