Changeset 3175 for trunk/doc/src/docbook/developerdoc
- Timestamp:
- Mar 8, 2007, 10:57:25 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/doc/src/docbook/developerdoc/plugin_developer.xml
r3170 r3175 335 335 failed. Not setting a response is considered a failure by the core. From 336 336 the run method it is only allowed to use the 337 <methodname>setDone </methodname>338 ()or the339 <methodname>setError </methodname>340 ()methods.337 <methodname>setDone()</methodname> 338 or the 339 <methodname>setError()</methodname> 340 methods. 341 341 </para> 342 342 <example id="net.sf.basedb.core.plugin.Plugin.run"> … … 344 344 Here is a skeleton that we recommend each plugin to use in it's 345 345 implementation of the 346 <methodname>run </methodname>346 <methodname>run()</methodname> 347 347 method 348 348 </title> … … 397 397 contains an implementation of this method which simply sets the 398 398 parameters passed to the 399 <methodname>init </methodname>399 <methodname>init()</methodname> 400 400 method to null 401 401 </title> … … 459 459 <classname>net.sf.basedb.core.Item</classname> 460 460 enumeration and the type is either 461 <c lassname>Type.LIST</classname>461 <constant>Type.LIST</constant> 462 462 or 463 <c lassname>Type.ITEM</classname>463 <constant>Type.ITEM</constant> 464 464 . 465 465 </para> … … 467 467 For example, the 468 468 <varname>GuiContext</varname> 469 = (469 <literal>= (</literal> 470 470 <constant>Item.REPORTER</constant> 471 ,471 <literal>,</literal> 472 472 <constant>Type.LIST</constant> 473 ) tells a client application that this plugin can be plugged in whenever 474 a list of reporters is displayed. The 473 <literal>)</literal> 474 tells a client application that this plugin can be plugged in whenever a 475 list of reporters is displayed. The 475 476 <varname>GuiContext</varname> 476 477 = ( … … 910 911 <classname>AbstractPlugin</classname> 911 912 class it is very easy to validate the parameters using it's 912 <methodname>validateRequestParameters </methodname>913 ()method. This method takes the same list of913 <methodname>validateRequestParameters()</methodname> 914 method. This method takes the same list of 914 915 <classname>PluginParameter</classname> 915 916 's used in the … … 923 924 When the parameters have been validated they need to be stored. Once 924 925 again, it is very easy if you use one of the 925 <classname>AbstractPlugin.</classname> 926 <methodname>storeValue</methodname> 927 () or 928 <classname>AbstractPlugin.</classname> 929 <methodname>storeValues</methodname> 930 () methods. 926 <methodname>AbstractPlugin.storeValue()</methodname> 927 or 928 <methodname>AbstractPlugin.storeValues()</methodname> 929 methods. 931 930 </para> 932 931 <para> 933 932 The configure method works much like the 934 <classname>Plugin.</classname> 935 <methodname>run</methodname> 936 () method. It must return the result in the 933 <methodname>Plugin.run()</methodname> 934 method. It must return the result in the 937 935 <classname>Response</classname> 938 936 object, i.e. it shouldn't trow any exceptions. … … 982 980 <para> 983 981 Note that the 984 <methodname>setDone </methodname>985 ()has a second parameter982 <methodname>setDone()</methodname> 983 has a second parameter 986 984 <classname>Job.ExecutionTime</classname> 987 985 . It is an indication about how long time it will take to execute the … … 990 988 blocking the entire system. Please try to use this parameter wisely and 991 989 not use the 992 <constant> SHORT</constant>990 <constant>Job.ExecutionTime.SHORT</constant> 993 991 value out of old habit all the time. 994 992 </para> 995 993 <para> 996 994 The response also has a 997 <methodname>setContinue </methodname>998 ()method which tells the core that the plugin needs more parameters,995 <methodname>setContinue()</methodname> 996 method which tells the core that the plugin needs more parameters, 999 997 i.e. the core will then call 1000 <methodname>getRequestInformation </methodname>1001 ()again with the new command, let the user enter values, and the call1002 <methodname>configure </methodname>1003 ()with the new values. This process is repeated until the plugin998 <methodname>getRequestInformation()</methodname> 999 again with the new command, let the user enter values, and the call 1000 <methodname>configure()</methodname> 1001 with the new values. This process is repeated until the plugin 1004 1002 reports that it is done or an error occurs. 1005 1003 </para> … … 1008 1006 of the plugin that is used. However, no parameter values are stored in 1009 1007 the database until 1010 <methodname>setDone</methodname> 1011 () is called. Then, the plugin instance is usually discarded. The 1012 execution of the plugin happens in a new instance and maybe on a 1013 different server. 1008 <methodname>setDone()</methodname> 1009 is called. Then, the plugin instance is usually discarded. The execution 1010 of the plugin happens in a new instance and maybe on a different server. 1014 1011 </para> 1015 1012 <tip> … … 1059 1056 </sect2> 1060 1057 1061 <sect2 id="plugin_developer.organize. build">1058 <sect2 id="plugin_developer.organize.ant"> 1062 1059 <title>Ant build file</title> 1063 1060 <para> … … 1125 1122 </sect2> 1126 1123 1127 <sect2 >1124 <sect2 id="plugin_developer.organize.build"> 1128 1125 <title>Building the plugin</title> 1129 1126 <para> … … 1138 1135 files (if any). Place all files together in the same directory. Then follow the 1139 1136 instructions in chapter 1140 < link linkend="plugin_installation" endterm="plugin_installation.title"></link>1137 <xref linkend="plugin_installation" /> 1141 1138 . 1142 1139 </para> … … 1238 1235 </sect1> 1239 1236 1237 <sect1 id="plugin_developer.import_plugins"> 1238 <title id="plugin_developer.import_plugins.title">Plugins for importing data</title> 1239 <para></para> 1240 </sect1> 1241 1240 1242 </chapter>
Note: See TracChangeset
for help on using the changeset viewer.