See: Description
Package | Description |
---|---|
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.api.web.model | |
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 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 - 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 api.web.dd.DDProvider
class.
The DD API provides no UI for deployment descriptor editing.
api.web.dd
All DD API interfaces are included to this package.
Here is the hierarchic structure of the DD API interfaces :
api.web.dd.WebApp
-api.web.dd.Icon
[*] -api.web.dd.InitParam
[*] -api.web.dd.Filter
[*] -api.web.dd.Icon
[*] -api.web.dd.InitParam
[*] -api.web.dd.FilterMapping
[*] -api.web.dd.Listener
[*] -api.web.dd.Icon
[*] -api.web.dd.Servlet
[*] -api.web.dd.Icon
[*] -api.web.dd.InitParam
[*] -api.web.dd.RunAs
[*] -api.web.dd.SecurityRoleRef
[*] -api.web.dd.ServletMapping
[*] -api.web.dd.SessionConfig
[?] -api.web.dd.MimeMapping
[*] -api.web.dd.WelcomeFileList
[?] -api.web.dd.ErrorPage
[*] -api.web.dd.Taglib
[*] -api.web.dd.JspConfig
[?] -api.web.dd.Taglib
[*] -api.web.dd.JspPropertyGroup
[*] -api.web.dd.SecurityConstraint
[*] -api.web.dd.WebResourceCollection
[+] -api.web.dd.AuthConstraint
[?] -api.web.dd.UserDataConstraint
[?] -api.web.dd.LoginConfig
[?] -api.web.dd.FormLoginConfig
[?] -api.web.dd.SecurityRole
[*] -api.web.dd.EnvEntry
[*] -api.web.dd.EjbRef
[*] -api.web.dd.EjbLocalRef
[*] -api.web.dd.ServiceRef
[*] -api.web.dd.Icon
[*] -api.web.dd.PortComponentRef
[*] -api.web.dd.ServiceRefHandler
[*] -api.web.dd.InitParam
[*] -api.web.dd.ResourceRef
[*] -api.web.dd.ResourceEnvRef
[*] -api.web.dd.MessageDestinationRef
[*] -api.web.dd.MessageDestination
[*] -api.web.dd.Icon
[*] -api.web.dd.LocaleEncodingMappingList
[?] -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 :
api.web.dd.WebApp
interface contains these methods for getting/setting api.web.dd.Servlet
s and api.web.dd.WelcomeFileList
:
api.web.dd.Servlet
[] getServlet ();api.web.dd.Servlet
getServlet (int i);api.web.dd.Servlet
[] servlets);api.web.dd.Servlet
servlet);api.web.dd.Servlet
servlet);api.web.dd.Servlet
servlet);api.web.dd.WelcomeFileList
getSingleWelcomeFileList ();api.web.dd.WelcomeFileList
list);api.web.dd.Taglib
interface contains these additional getters/setters :
api.web.dd.common
package. For example if a DD element has the description property, it extends the api.web.dd.common.DescriptionInterface
containing the methods for description property handling.api.web.dd.WebApp
, api.web.dd.Servlet
, api.web.dd.Filter
, api.web.dd.Listener
, api.web.dd.ServiceRef
, api.web.dd.WebResourceCollection
interfaces have the additional functionality for description proprty.
api.web.dd
Provides the access to the deployment descriptor root - api.web.dd.WebApp
- object.
The api.web.dd.DDProvider
class is a singleton and caches the WebApp objects in IDE.
There are following methods for accessing api.web.dd.WebApp
object in DDProvider :
DD API enables the full modification of deployment descriptor elements including:
See the Examples of usage.
The modificated 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 :