Class PluginApi<T extends XWikiPluginInterface>

  • 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 components
    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: c559897b350c526e2b37836af79d90fa6071c9e5 $
    • 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.