|
org.netbeans.modules.j2ee.dd/1 1.12.0 2 | |||||||||
| PREV NEXT | FRAMES NO FRAMES | |||||||||
See:
Description
| J2EE DD API | |
|---|---|
| org.netbeans.modules.j2ee.dd.api.application | Interfaces for working with J2EE application deployment descriptor, DDProvider class. |
| org.netbeans.modules.j2ee.dd.api.client | |
| org.netbeans.modules.j2ee.dd.api.common | Super-interfaces for deployment descriptor, common interfaces for EJB and Web module deployment descriptor, J2EE DD API exceptions. |
| org.netbeans.modules.j2ee.dd.api.ejb | Interfaces for working with ejb module deployment descriptor, DDProvider class. |
| org.netbeans.modules.j2ee.dd.api.web | Interfaces for working with web module deployment descriptor, DDProvider class. |
| org.netbeans.modules.j2ee.dd.spi | |
| org.netbeans.modules.j2ee.dd.spi.client | |
| org.netbeans.modules.j2ee.dd.spi.ejb | |
| org.netbeans.modules.j2ee.dd.spi.web | |
The DD API has been developed in order to satisfy the requirement to access the web module deployment descriptor for other Netbeans modules in a simple and servlet spec.-independant way.
The DD API is based on a bunch of interfaces based on the deployment descriptor xml structure. The names of interfaces correspond to the names of deployment descriptor elements in web.xml file.
The DD API interfaces are organized in a hierarchic tree structure where they are accassible through the root - org.netbeans.api.web.dd.WebApp - interface.
The implementation of DD API interfaces is hidden for clients. It is based on schema2beans infrastructure and is the DD version - specific. (there is always requirement to support at least two successive versions of DD specification).
The root of the deployment descriptor is accessible through the org.netbeans.api.web.dd.DDProvider class.
The DD API provides no UI for deployment descriptor editing.
org.netbeans.api.web.dd
All DD API interfaces are included to this package.
Here is the hierarchic structure of the DD API interfaces :
org.netbeans.api.web.dd.WebApp-org.netbeans.api.web.dd.Icon[*] -org.netbeans.api.web.dd.InitParam[*] -org.netbeans.api.web.dd.Filter[*] -org.netbeans.api.web.dd.Icon[*] -org.netbeans.api.web.dd.InitParam[*] -org.netbeans.api.web.dd.FilterMapping[*] -org.netbeans.api.web.dd.Listener[*] -org.netbeans.api.web.dd.Icon[*] -org.netbeans.api.web.dd.Servlet[*] -org.netbeans.api.web.dd.Icon[*] -org.netbeans.api.web.dd.InitParam[*] -org.netbeans.api.web.dd.RunAs[*] -org.netbeans.api.web.dd.SecurityRoleRef[*] -org.netbeans.api.web.dd.ServletMapping[*] -org.netbeans.api.web.dd.SessionConfig[?] -org.netbeans.api.web.dd.MimeMapping[*] -org.netbeans.api.web.dd.WelcomeFileList[?] -org.netbeans.api.web.dd.ErrorPage[*] -org.netbeans.api.web.dd.Taglib[*] -org.netbeans.api.web.dd.JspConfig[?] -org.netbeans.api.web.dd.Taglib[*] -org.netbeans.api.web.dd.JspPropertyGroup[*] -org.netbeans.api.web.dd.SecurityConstraint[*] -org.netbeans.api.web.dd.WebResourceCollection[+] -org.netbeans.api.web.dd.AuthConstraint[?] -org.netbeans.api.web.dd.UserDataConstraint[?] -org.netbeans.api.web.dd.LoginConfig[?] -org.netbeans.api.web.dd.FormLoginConfig[?] -org.netbeans.api.web.dd.SecurityRole[*] -org.netbeans.api.web.dd.EnvEntry[*] -org.netbeans.api.web.dd.EjbRef[*] -org.netbeans.api.web.dd.EjbLocalRef[*] -org.netbeans.api.web.dd.ServiceRef[*] -org.netbeans.api.web.dd.Icon[*] -org.netbeans.api.web.dd.PortComponentRef[*] -org.netbeans.api.web.dd.ServiceRefHandler[*] -org.netbeans.api.web.dd.InitParam[*] -org.netbeans.api.web.dd.ResourceRef[*] -org.netbeans.api.web.dd.ResourceEnvRef[*] -org.netbeans.api.web.dd.MessageDestinationRef[*] -org.netbeans.api.web.dd.MessageDestination[*] -org.netbeans.api.web.dd.Icon[*] -org.netbeans.api.web.dd.LocaleEncodingMappingList[?] -org.netbeans.api.web.dd.LocaleEncodingMapping[+] Comments : [*] - objects occur multiple times in parent object (0-n) [+] - objects occur multiple times in parent object (1-n) [?] - object can occur only once in parent object (0-1)
The syntax and usage of interfaces methods is very simple and straightforward.
If certain object [of XYZ interface] occurs multiple times in parent object these methods are present in parent interface :
org.netbeans.api.web.dd.WebApp interface contains these methods for getting/setting org.netbeans.api.web.dd.Servlets and org.netbeans.api.web.dd.WelcomeFileList :
org.netbeans.api.web.dd.Servlet [] getServlet ();org.netbeans.api.web.dd.Servlet getServlet (int i);org.netbeans.api.web.dd.Servlet[] servlets);org.netbeans.api.web.dd.Servlet servlet);org.netbeans.api.web.dd.Servletservlet);org.netbeans.api.web.dd.Servlet servlet);org.netbeans.api.web.dd.WelcomeFileList getSingleWelcomeFileList ();org.netbeans.api.web.dd.WelcomeFileList list);org.netbeans.api.web.dd.Taglib interface contains these additional getters/setters :
org.netbeans.api.web.dd.common package. For example if a DD element has the description property, it extends the org.netbeans.api.web.dd.common.DescriptionInterface containing the methods for description property handling.org.netbeans.api.web.dd.WebApp, org.netbeans.api.web.dd.Servlet, org.netbeans.api.web.dd.Filter, org.netbeans.api.web.dd.Listener, org.netbeans.api.web.dd.ServiceRef, org.netbeans.api.web.dd.WebResourceCollection interfaces have the additional functionality for description proprty.
org.netbeans.api.web.dd
Provides the access to the deployment descriptor root - org.netbeans.api.web.dd.WebApp - object.
The org.netbeans.api.web.dd.DDProvider class is a singleton and caches the WebApp objects in IDE.
There are following methods for accessing org.netbeans.api.web.dd.WebApp object in DDProvider :
org.netbeans.api.web.dd.DDProvider#getDDRoot(org.openide.filesystems.FileObject);org.netbeans.api.web.dd.DDProvider#getDDRoot(java.io.File);DD API enables the full modification of deployment descriptor elements including:
See the Examples of usage.
The modificated org.netbeans.api.web.dd.WebApp object can be serialized to FileObject using :
FileObject fo) throws IOException;There is also another write mathod available on any interface to serialize the fraction of deployment descriptor to OutputStream :
OutputStream os) throws IOException;See the Examples of usage.
See also :
|
org.netbeans.modules.j2ee.dd/1 1.12.0 2 | |||||||||
| PREV NEXT | FRAMES NO FRAMES | |||||||||