Changeset 3182


Ignore:
Timestamp:
Mar 12, 2007, 4:48:46 PM (15 years ago)
Author:
Johan Enell
Message:
 
Location:
trunk/doc/src/docbook
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/doc/src/docbook/admindoc/plugin_installation.xml

    r3178 r3182  
    3030  <title id="plugin_installation.title">Installing plugins</title>
    3131
    32   <para>
    33     We recommend that each plugin or group of related plugins are compiled separately. To be
    34     able to use the plugin it must be put in a JAR file. Place the JAR file on the server
    35     <emphasis>outside</emphasis>
    36     the web servers classpath, ie. not in the
    37     <filename class="directory">WEB-INF/lib</filename>
    38     . Our recommendation is to place the plugin JAR in
    39     <filename class="directory">
    40       <replaceable>&lt;base-dir&gt;</replaceable>
    41       /plugins/
    42       <replaceable>&lt;name-of-plugin&gt;</replaceable>
    43       /
    44     </filename>
    45   </para>
    46   <mediaobject>
    47     <imageobject>
    48       <imagedata align="right" fileref="figures/install_plugin.png" format="PNG"/>
    49     </imageobject>
    50     <textobject>
    51       <phrase>How to install a plugin</phrase>
    52     </textobject>
    53   </mediaobject>
    54 
    55 
    56 
    57   <para>
    58     The main benefit from placing the JAR file outside the classpath is that
    59     Base uses it's own classloader that supports unloading of the classes as well.
    60     This means that you may replace the JAR file with a new version without
    61     restarting the web server.
    62   </para>
     32 
    6333 
    6434  <para>
     
    7444    popup window.
    7545  </para>
     46
     47  <screenshot>
     48    <mediaobject>
     49      <imageobject>
     50        <imagedata align="right" fileref="figures/install_plugin.png" format="PNG"/>
     51      </imageobject>
     52      <textobject>
     53        <phrase>How to install a plugin</phrase>
     54      </textobject>
     55    </mediaobject>
     56  </screenshot>
    7657
    7758  <para>
     
    10384    chapter.
    10485  </para>
    105 
    10686
    10787  <para>
  • trunk/doc/src/docbook/developerdoc/plugin_developer.xml

    r3178 r3182  
    154154    <sect2 id="plugin_developer.organize.installing">
    155155      <title>Packaging and installing the plugin</title>
    156       <para></para>
     156      <para>
     157        We recommend that each plugin or group of related plugins are compiled separately. To be
     158        able to use the plugin it must be put in a JAR file. Place the JAR file on the server
     159        <emphasis>outside</emphasis>
     160        the web servers classpath, ie. not in the
     161        <filename class="directory">WEB-INF/lib</filename>
     162        . Our recommendation is to place the plugin JAR in
     163        <filename class="directory">
     164          <replaceable>&lt;base-dir&gt;</replaceable>
     165          /plugins/
     166          <replaceable>&lt;name-of-plugin&gt;</replaceable>
     167          /
     168        </filename>
     169      </para>
     170         
     171      <para>
     172        The main benefit from placing the JAR file outside the classpath is that
     173        Base uses it's own classloader that supports unloading of the classes as well.
     174        This means that you may replace the JAR file with a new version without
     175        restarting the web server.
     176      </para>
    157177    </sect2>
    158178  </sect1>
     
    805825                parameter has a description of their own.
    806826              </para>
    807               <example id="net.sf.basedb.core.plugin.InteractivePlugin.getRequestInformation_1">
     827              <example id="net.sf.basedb.core.plugin.InteractivePlugin.getRequestInformation">
    808828                <title>
    809829                  When running an import plugin it needs to ask for the file to import
     
    11671187    <sect2 id="plugin_developer.api.parameters">
    11681188      <title>Asking for parameters</title>
    1169       <para></para>
     1189      <para>
     1190        The webclient will ask for parameters by calling the method
     1191        <methodname>getRequestInformation</methodname> from the interface
     1192        <interfacename>InteractivePlugin</interfacename>. The
     1193        <methodname>getRequestInformation</methodname> is described in detail in this example,
     1194        <xref linkend="net.sf.basedb.core.plugin.InteractivePlugin.getRequestInformation"/>.
     1195      </para>
    11701196     
    11711197      <sect3 id="plugin_developer.api.parameters.jsp">
     
    11841210          name of your plugin and the returned values. If the plugin is located in the
    11851211          package
    1186           <classname>
    1187             <replaceable>org.company</replaceable>
    1188           </classname>
     1212          <classname>org.company</classname>
    11891213          the JSP page must be located in
    1190           <filename class="directory">
    1191             <replaceable>www-root</replaceable>
    1192             /plugins/
    1193             <replaceable>org/company</replaceable>
    1194             /
    1195           </filename>
     1214          <filename class="directory">www-root/plugins/org/company/</filename>
    11961215          . Please note that the browser still thinks that it is showing the regular page
    11971216          at the usual location:
    1198           <filename class="directory">
    1199             <replaceable>www-root</replaceable>
    1200             /common/plugin/index.jsp
    1201           </filename>
     1217          <filename class="directory">www-root/common/plugin/index.jsp</filename>
    12021218          , so all links in your JSP page should be relative to that directory.
    12031219        </para>
     
    12991315  <sect1 id="plugin_developer.analyse">
    13001316    <title>Analysis plugins</title>
    1301     <para></para>
     1317    <para>
     1318      A plugin becomes an analysis plugin simply by returning
     1319      <constant>Plugin.MainType.ANALYSIS</constant> from the
     1320      <methodname>Plugin.getMainType()</methodname> method. The information returned from
     1321      <methodname>InteractivePlugin.getGuiContexts()</methodname>
     1322      must include: [<constant>Item.BIOASSAYSET</constant>, <constant>Type.ITEM</constant>] since
     1323      this is the only place where the web client looks for analysis plugins.
     1324    </para>
     1325   
     1326    <programlisting>
     1327private static final Set&lt;GuiContext&gt; guiContexts =
     1328   Collections.singleton(new GuiContext(Item.BIOASSAYSET, GuiContext.Type.ITEM));
     1329
     1330public Set&lt;GuiContext&gt; getGuiContexts()
     1331{
     1332   return guiContexts;
     1333}
     1334</programlisting>
    13021335  </sect1>
    13031336 
Note: See TracChangeset for help on using the changeset viewer.