WebMacro JavaDoc API Documentation
Please note that the API documentation on the website reflects the most recent development version of WebMacro. The version available for download is the most recent stable version, and will not have all of the functionality described in this API.For information on the WebMacro script language from the point of view of a page designer, please see the Script page.
WebMacro Packages and Key Classes
- org.webmacro.servlet:
- This package contains the WebMacro servlet that actually accepts requests. The Reactor servlet accepts requests from the servlet runner, creates a new WebContext and posts them to and instance of Handler which you have written.
As of WebMacro 0.80, there is a new and (for some people) better way to create WebMacro servlets: subclass from WMServlet. The original Reactor/Handler combination still exists, and is implemented as a subclass of WMServlet.
- org.webmacro.resource:
- This packages contains modules which are used to locate resources at runtime in the WebMacro system. Everything from how your Handler is loaded, how Templates are located, to a reference implementation of a User database. You can either use these classes directly, or implement your own versions of them, to get the preceise behavior you want.
- org.webmacro.engine:
- This is the template rendering code. Except for the Template class itself you probably don't need ot know about the inner workings of these classes. Most of the classes here are different types of Macros--extending the WebMacro script language would involve creating a new Macro and adding it to the parse rules in Block. After Block, Variable is the next most important macro.
Reference information about the script language can be found here.
- org.webmacro.broker:
- ResourceBroker forms the backbone of a running WebMacro system. If you wanted to add a new type of resource to WebMacro, or change the way WebMacro locates handlers, stores users, etc., you would implement the ResourceProvider interface and register it with the broker. The system is intialized by the Config provider.
- org.webmacro.util:
- Many of the key componants of WebMacro are actually general purpose. WebMacro's script language makes extensive use of Property introspection. You will also find the Log class WebMacro uses to forward errors, and numerous other tools here.
api | design | faq | goals | links | othertech | quickstart | script | status