Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Last revision Both sides next revision
tutorial:plugins [2021/01/05 03:11]
admin [Learning Objectives]
tutorial:plugins [2021/01/10 17:53]
admin [Deploy Custom Plugin]
Line 73: Line 73:
    }    }
  
-By default, all public methods declared as well as inherited are exposed as MScript function.  To exclude certain methods from being exposed as MScript function, add annotation //@NOT_MSCRIPT_METHOD// to the method. Add annotation //@IGNORE_INHERITED_METHOD// to the plugin class to exclude inherited methods from exposed as MScript functions.+By default, all public methods declared as well as inherited are exposed as MScript function.  To exclude certain methods from being exposed as MScript function, add annotation //@NOT_MSCRIPT_METHOD// to the method. Add annotation //@IGNORE_INHERITED_METHOD// to the plugin class to exclude inherited methods from being exposed as MScript functions.
  
 Don't forget to write junit test to test the plugin functions. Don't forget to write junit test to test the plugin functions.
Line 79: Line 79:
  
 ===== Deploy Custom Plugin ===== ===== Deploy Custom Plugin =====
-Export project as jar file +  * Export project as jar file 
-Copy plugin jar file to /lib folder in //TestOptimal// server +  Copy the plugin jar file to /lib folder in //TestOptimal// server 
-Register your plugin package in config.properties:+  Register your plugin package in //config/config.properties//:
  
    plugin.packages=com.mine.plugin    plugin.packages=com.mine.plugin
Line 87: Line 87:
 Above registry tells //TestOptimal// server where to look for your custom plugins.  If you have multiple custom plugins in the same java package, they will all be found automatically. Above registry tells //TestOptimal// server where to look for your custom plugins.  If you have multiple custom plugins in the same java package, they will all be found automatically.
  
-Restart TestOptimal server to make the changes effective.+  * Restart TestOptimal server to make the changes effective.
  
 ===== Using Custom Plugin ===== ===== Using Custom Plugin =====