REST Plugins

The REST Plugins example shows how a a plugin that overrides the builtin Sheet REST api Sheet plugin while it implements missing getprotected/setprotected methods.

After installing this plugin, you should be able to make a REST call like:
http://127.0.0.1:8000/workbook/id/0/txt/sheet/getprotected/Sheet1

Installation is simple:

1. Compile the attached and put the output classfile anywhere in the Server classpath such as "<installdir>/lib/".

You will have to recreate package heirarchy in the lib folder such as "<installdir>/lib/com/extentech/ExtenXLS/plugin/"

2. Edit the "<installdir>/resources/plugins/WorkBookServlet.txt" file like so (per attached):

...
# com.extentech.ExtenXLS.plugin.builtin.PluginSheet
com.extentech.ExtenXLS.plugin.builtin.PluginStyle
com.extentech.ExtenXLS.plugin.builtin.PluginWorkBook

# TEST Custom Plugin
com.extentech.ExtenXLS.plugin.PluginSheet
...

3. Restart the server

In this case, the server will load the sparse PluginSheet.java which overrides the built-in superclass (so all the other Sheet methods are intact) but loads the additional two methods in the java file.

It is in this exact way that you can build your own inline REST plugins and add significant functionality or modify existing REST calls to taste.

  File Modified

Java Source PluginSheet.java

Oct 25, 2012 by Robert Avery

Java Source PluginWorkBook.java

Oct 25, 2012 by Robert Avery

Text File WorkBookServlet.txt

Oct 25, 2012 by Robert Avery