Sophie

Sophie

distrib > Fedora > 18 > i386 > by-pkgid > 3510c9e686d39c4057250692cfa9ddee > files > 14

python-yapsy-doc-1.10.2-3.fc18.noarch.rpm



<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">


<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    
    <title>PluginManagerDecorator &mdash; Yapsy 1.10.2 documentation</title>
    
    <link rel="stylesheet" href="_static/default.css" type="text/css" />
    <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
    
    <script type="text/javascript">
      var DOCUMENTATION_OPTIONS = {
        URL_ROOT:    '',
        VERSION:     '1.10.2',
        COLLAPSE_INDEX: false,
        FILE_SUFFIX: '.html',
        HAS_SOURCE:  true
      };
    </script>
    <script type="text/javascript" src="_static/jquery.js"></script>
    <script type="text/javascript" src="_static/underscore.js"></script>
    <script type="text/javascript" src="_static/doctools.js"></script>
    <link rel="shortcut icon" href="_static/yapsy-favicon.ico"/>
    <link rel="top" title="Yapsy 1.10.2 documentation" href="index.html" />
    <link rel="up" title="Built-in Extensions" href="Extensions.html" />
    <link rel="next" title="General advices and troubleshooting" href="Advices.html" />
    <link rel="prev" title="IPluginLocator" href="IPluginLocator.html" /> 
  </head>
  <body>
    <div class="related">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="genindex.html" title="General Index"
             accesskey="I">index</a></li>
        <li class="right" >
          <a href="py-modindex.html" title="Python Module Index"
             >modules</a> |</li>
        <li class="right" >
          <a href="Advices.html" title="General advices and troubleshooting"
             accesskey="N">next</a> |</li>
        <li class="right" >
          <a href="IPluginLocator.html" title="IPluginLocator"
             accesskey="P">previous</a> |</li>
        <li><a href="index.html">Yapsy 1.10.2 documentation</a> &raquo;</li>
          <li><a href="Extensions.html" accesskey="U">Built-in Extensions</a> &raquo;</li> 
      </ul>
    </div>  

    <div class="document">
      <div class="documentwrapper">
        <div class="bodywrapper">
          <div class="body">
            
  <div class="section" id="pluginmanagerdecorator">
<h1>PluginManagerDecorator<a class="headerlink" href="#pluginmanagerdecorator" title="Permalink to this headline">¶</a></h1>
<div class="toctree-wrapper compound">
<ul class="simple">
</ul>
</div>
<span class="target" id="module-yapsy.PluginManagerDecorator"></span><div class="section" id="role">
<h2>Role<a class="headerlink" href="#role" title="Permalink to this headline">¶</a></h2>
<p>Provide an easy way to build a chain of decorators extending the
functionalities of the default plugin manager, when it comes to
activating, deactivating or looking into loaded plugins.</p>
<p>The <tt class="docutils literal"><span class="pre">PluginManagerDecorator</span></tt> is the base class to be inherited by
each element of the chain of decorator.</p>
<div class="admonition warning">
<p class="first admonition-title">Warning</p>
<p class="last">If you want to customise the way the plugins are detected
and loaded, you should not try to do it by implementing a
new <tt class="docutils literal"><span class="pre">PluginManagerDecorator</span></tt>. Instead, you&#8217;ll have to
reimplement the <a class="reference internal" href="PluginManager.html"><em>PluginManager</em></a> itself. And if you
do so by enforcing the <tt class="docutils literal"><span class="pre">PluginManager</span></tt> interface, just
giving an instance of your new manager class to the
<tt class="docutils literal"><span class="pre">PluginManagerDecorator</span></tt> should be transparent to the
&#8220;stantard&#8221; decorators.</p>
</div>
</div>
<div class="section" id="api">
<h2>API<a class="headerlink" href="#api" title="Permalink to this headline">¶</a></h2>
<dl class="class">
<dt id="yapsy.PluginManagerDecorator.PluginManagerDecorator">
<em class="property">class </em><tt class="descclassname">yapsy.PluginManagerDecorator.</tt><tt class="descname">PluginManagerDecorator</tt><big>(</big><em>decorated_object=None, categories_filter={'Default': &lt;class 'yapsy.IPlugin.IPlugin'&gt;}, directories_list=['src2/package/yapsy'], plugin_info_ext='yapsy-plugin'</em><big>)</big><a class="headerlink" href="#yapsy.PluginManagerDecorator.PluginManagerDecorator" title="Permalink to this definition">¶</a></dt>
<dd><p>Add several responsibilities to a plugin manager object in a
more flexible way than by mere subclassing. This is indeed an
implementation of the Decorator Design Patterns.</p>
<p>There is also an additional mechanism that allows for the
automatic creation of the object to be decorated when this object
is an instance of PluginManager (and not an instance of its
subclasses). This way we can keep the plugin managers creation
simple when the user don&#8217;t want to mix a lot of &#8216;enhancements&#8217; on
the base class.</p>
<dl class="method">
<dt id="yapsy.PluginManagerDecorator.PluginManagerDecorator.collectPlugins">
<tt class="descname">collectPlugins</tt><big>(</big><big>)</big><a class="headerlink" href="#yapsy.PluginManagerDecorator.PluginManagerDecorator.collectPlugins" title="Permalink to this definition">¶</a></dt>
<dd><p>This function will usually be a shortcut to successively call
<tt class="docutils literal"><span class="pre">self.locatePlugins</span></tt> and then <tt class="docutils literal"><span class="pre">self.loadPlugins</span></tt> which are
very likely to be redefined in each new decorator.</p>
<p>So in order for this to keep on being a &#8220;shortcut&#8221; and not a
real pain, I&#8217;m redefining it here.</p>
</dd></dl>

</dd></dl>

</div>
</div>


          </div>
        </div>
      </div>
      <div class="sphinxsidebar">
        <div class="sphinxsidebarwrapper">
            <p class="logo"><a href="index.html">
              <img class="logo" src="_static/yapsy-big.png" alt="Logo"/>
            </a></p>
  <h3><a href="index.html">Table Of Contents</a></h3>
  <ul>
<li><a class="reference internal" href="#">PluginManagerDecorator</a><ul>
<li><a class="reference internal" href="#role">Role</a></li>
<li><a class="reference internal" href="#api">API</a></li>
</ul>
</li>
</ul>

  <h4>Previous topic</h4>
  <p class="topless"><a href="IPluginLocator.html"
                        title="previous chapter">IPluginLocator</a></p>
  <h4>Next topic</h4>
  <p class="topless"><a href="Advices.html"
                        title="next chapter">General advices and troubleshooting</a></p>
  <h3>This Page</h3>
  <ul class="this-page-menu">
    <li><a href="_sources/PluginManagerDecorator.txt"
           rel="nofollow">Show Source</a></li>
  </ul>
<div id="searchbox" style="display: none">
  <h3>Quick search</h3>
    <form class="search" action="search.html" method="get">
      <input type="text" name="q" />
      <input type="submit" value="Go" />
      <input type="hidden" name="check_keywords" value="yes" />
      <input type="hidden" name="area" value="default" />
    </form>
    <p class="searchtip" style="font-size: 90%">
    Enter search terms or a module, class or function name.
    </p>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
        </div>
      </div>
      <div class="clearer"></div>
    </div>
    <div class="related">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="genindex.html" title="General Index"
             >index</a></li>
        <li class="right" >
          <a href="py-modindex.html" title="Python Module Index"
             >modules</a> |</li>
        <li class="right" >
          <a href="Advices.html" title="General advices and troubleshooting"
             >next</a> |</li>
        <li class="right" >
          <a href="IPluginLocator.html" title="IPluginLocator"
             >previous</a> |</li>
        <li><a href="index.html">Yapsy 1.10.2 documentation</a> &raquo;</li>
          <li><a href="Extensions.html" >Built-in Extensions</a> &raquo;</li> 
      </ul>
    </div>
    <div class="footer">
        &copy; Copyright 2010-2013, Thibauld Nion.
      Last updated on Oct 05, 2013.
      Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.1.3.
    </div>
  </body>
</html>