Changeset 3592


Ignore:
Timestamp:
Jul 23, 2007, 2:57:39 PM (16 years ago)
Author:
Nicklas Nordborg
Message:

Fixes #687: Make it possible for other plug-ins than the FormulaFilter? to be launched by the 'Filter bioassayset' button

Location:
trunk
Files:
1 added
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/doc/src/docbook/developerdoc/plugin_developer.xml

    r3591 r3592  
    29812981     
    29822982    </sect2>
     2983   
     2984    <sect2 id="plugin_developer.analyse.filterplugin">
     2985      <title>The AnalysisFilterPlugin interface</title>
     2986     
     2987      <para>
     2988        The <interfacename>net.sf.basedb.core.plugin.AnalysisFilterPlugin</interfacename>
     2989        is a tagging interface with no methods that all analysis plug-ins that only filters
     2990        data should implement. The benefit is that they will be linked from the
     2991        <guibutton>Filter bioassay set</guibutton> button and not just
     2992        the <guibutton>Run analysis</guibutton> button. They will also get
     2993        a different icon in the experiment outline to make filtering
     2994        transformations appear different from other transformations.
     2995      </para>
     2996     
     2997      <para>
     2998        The interface exists purely for making the user interaction better. There is
     2999        no harm in not implementing it since the plug-in will always appear in
     3000        from the <guibutton>Run analysis</guibutton> button. On the other hand,
     3001        it doesn't cost anything to implement the interface since it doesn't
     3002        have any methods.
     3003      </para>
     3004   
     3005    </sect2>
    29833006
    29843007  </sect1>
  • trunk/src/core/net/sf/basedb/core/Install.java

    r3586 r3592  
    581581        "file system  first. For this to work the plugin must also be given 'immediate exection' rights",
    582582        "net.sf.basedb.core.plugin.ImmediateDownloadExporter", null);
    583 
     583      createPluginType("Analysis filter plug-in", "Analysis plug-ins that are pure filter plug-ins should " +
     584          "implement this interface. If they do they are linked with the 'Filter bioassayset' button and" +
     585          "not just the 'Run analysis plug-in' button.",
     586          "net.sf.basedb.core.plugin.AnalysisFilterPlugin", null);
     587     
    584588      createPluginDefinition("net.sf.basedb.plugins.Base1PluginExecuter", null, null, true, null, false);
    585589      createPluginDefinition("net.sf.basedb.plugins.BioAssaySetExporter", null, keyEveryoneUse, true, null, true);
  • trunk/src/plugins/core/net/sf/basedb/plugins/FormulaFilter.java

    r3583 r3592  
    4141import net.sf.basedb.core.plugin.AboutImpl;
    4242import net.sf.basedb.core.plugin.AbstractAnalysisPlugin;
     43import net.sf.basedb.core.plugin.AnalysisFilterPlugin;
    4344import net.sf.basedb.core.plugin.GuiContext;
    4445import net.sf.basedb.core.plugin.InteractivePlugin;
     
    7172public class FormulaFilter
    7273  extends AbstractAnalysisPlugin
    73   implements InteractivePlugin
     74  implements InteractivePlugin, AnalysisFilterPlugin
    7475{
    7576
  • trunk/www/common/plugin/index.jsp

    r3574 r3592  
    129129    GuiContext context = new GuiContext(itemType, contextType, subContext);
    130130    Plugin.MainType mainType = Plugin.MainType.valueOf(request.getParameter("main_type"));
    131 
    132     ItemQuery<PluginDefinition> pluginQuery = PluginDefinition.getQuery(context, null);
     131    String pluginType = request.getParameter("plugin_type");
     132
     133    ItemQuery<PluginDefinition> pluginQuery = PluginDefinition.getQuery(context, pluginType);
    133134    pluginQuery.restrict(
    134135      Restrictions.eq(
  • trunk/www/views/experiments/bioassaysets/analysis_tree.jsp

    r3580 r3592  
    179179  else if (nodeType == Item.TRANSFORMATION)
    180180  {
     181    Transformation t = (Transformation)node;
    181182    folderIcon = "Transformation";
    182     name = ((Transformation)node).getName();
     183    try
     184    {
     185      if (t.getJob().getPluginDefinition().supports("net.sf.basedb.core.plugin.AnalysisFilterPlugin"))
     186      {
     187        folderIcon = "Filter";
     188      }
     189    }
     190    catch (Throwable tt)
     191    {}
     192    name = t.getName();
    183193  }
    184194  else if (nodeType == Item.EXTRAVALUE)
  • trunk/www/views/experiments/bioassaysets/index.jsp

    r2993 r3592  
    358358    // Display the edit page for for filtering a bioassay set (should be opened in a popup)
    359359    ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, pageContext, defaultContext);
    360     redirect = "../../../common/plugin/index.jsp?ID="+ID+"&cmd=NewJob&item_type="+itemType.name()+"&context_type=ITEM&main_type=ANALYZE&title=Filter+bioassay+set&plugin_class=net.sf.basedb.plugins.FormulaFilter";
     360    redirect = "../../../common/plugin/index.jsp?ID="+ID+"&cmd=SelectPlugin&item_type="+itemType.name()+"&context_type=ITEM&main_type=ANALYZE&title=Filter+bioassay+set&plugin_type=net.sf.basedb.core.plugin.AnalysisFilterPlugin";
    361361  }
    362362  else
Note: See TracChangeset for help on using the changeset viewer.