See: Description
Package | Description |
---|---|
org.netbeans.modules.web.api.webmodule |
API to access the properties of J2EE web modules.
|
org.netbeans.modules.web.spi.webmodule |
SPI for providers of J2EE web modules and frameworks.
|
WebModuleAPI The API part provides access to web module properties and defines constants for use web module projects (such as action commands or source types). The SPI part can be implemented by modules that provide web module "project" support. It can be implemented with project APIs but other implementations are also possible. There is also an SPI which allows implementors to provides support for web frameworks such as Struts and JSF.
WebModuleExtender.Savable
interface
Added interface WebModuleExtender.Savable
for ability to
save framework settings of already included extender after confirming
project customizer.
Adding ability to listen on changes of document base or WEB-INF folder. WebModuleImplementation2 was introduced in this release so I'm taking advantage of it and adding requested methods.
New method requiresWebXml added. Framework specifies via this method if it reqires web.xml DD or not.
Made the WebModule API public with the stability level "under development".
WebFrameworkProvider.extend()
and WebFrameworkProvider.getConfigurationPanel()
Deprecated methods WebFrameworkProvider.extend()
and WebFrameworkProvider.getConfigurationPanel()
.
Class WebConfigurationPanel
has been deprecated too.
Introduced a WebModuleExtender
class and a WebModule.createWebModuleExtender()
method returning it.
This allows for better encapsulation of the web module extending process.
WebModule.getJavaSources
Deprecated WebModule.getJavaSources
because its return value is not generic enough.
The WebModule
class, which encapsulates a web module, has methods
for retrieving the module's properties:
FileObject myServlet = ...; WebModule wm1 = WebModule.getWebModule (myServlet); String version = wm1.getJ2eePlatformVersion (); System.out.println ("Servlet is in version:" + version + " web module");
Most often the web module is implemented inside a project:
public class MyProjectType implements Project { Lookup getLookup () { return Lookups.fixed(new Object[] { new MyProvider (), ... } } private class MyProvider implements WebModuleProvider { WebModule findWebModule(FileObject file) { if (isMyFile (file)) { WebModule wm; synchronized (this) { wm = cachedWebModule (file); if (wm == null) { wm = WebModuleFactory.createWebModule (new WebModuleImpl ()); cache (file, wm); } } return wm; } } boolean isMyFile (FileObject file) {...} WebModule cachedWebModule (FileObject file) {...} cache (FileObject file, WebModule wm) {...} } private class WebModuleImpl implements WebModuleImplementation { ... } }
It is also possible to implement web modules backed by other means than
a project by implementing a WebModuleProvider
and registering
it in the default lookup.
Support for web frameworks, such as Struts and JSF, can
extend a WebModule
with framework-specific features, such as configuration files. An implementor
wanting to provide such support implements WebFrameworkProvider
and registers it in the
j2ee/webtier/framework
in the default file system.
|
The sources for the module are in the Apache Git repositories or in the GitHub repositories.
Nothing.
Read more about the implementation in the answers to architecture questions.