|
org.netbeans.modules.j2ee.dd/1 1.13.0 2 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface CreateCapability
Ability to create a new CommonDDBean objects.
Important note: Do not provide an implementation of this interface unless you are a DD API provider!
| Method Summary | |
|---|---|
CommonDDBean |
addBean(String beanName)
An empty bean is created corresponding to beanName, regardless the servlet spec. |
CommonDDBean |
addBean(String beanName,
String[] propertyNames,
Object[] propertyValues,
String keyProperty)
An empty bean is created corresponding to beanName regardless the srvlet spec. |
CommonDDBean |
createBean(String beanName)
An empty (not bound to bean graph) CommonDDBean object is created corresponding to beanName, regardless the servlet spec. |
| Method Detail |
|---|
CommonDDBean createBean(String beanName)
throws ClassNotFoundException
beanName - bean name e.g. "Servlet"
ClassNotFoundException
CommonDDBean addBean(String beanName,
String[] propertyNames,
Object[] propertyValues,
String keyProperty)
throws ClassNotFoundException,
NameAlreadyUsedException
...
Servlet servlet = (Servlet)webApp.addBean("Servlet",new String[]{"ServletName","ServletClass"},
new Object[]{"TestServlet","mypackage.TestServlet"},"ServletName");
servlet.addBean("InitParam",new String[]{"ParamName","ParamValue"},
new Object[]{"car","Volvo"},"ParamName");
...
beanName - bean namepropertyNames - array of properties that should be initializedpropertyValues - array of initialization values, usually stringskeyProperty - the property name that is checked in order to evoid the duplicity, e.g. ServletName.ClassNotFoundException - thrown when the class for beanName cannot be found under the current DD element
NameAlreadyUsedException - thrown when object with keyProperty value already exists.
CommonDDBean addBean(String beanName)
throws ClassNotFoundException
...
JspConfig config = webApp.addBean("JspConfig");
jspConfig.addBean("JspPropertyGroup",new String[]{"UrlPattern","IncludePrelude","IncludeCoda"},
new String[]{"*.jsp","/jsp/prelude.html","/jsp/coda.html"},null);
...
beanName - bean name e.g. "JspConfig"
ClassNotFoundException - thrown when the class for beanName cannot be found under the current DD element
|
org.netbeans.modules.j2ee.dd/1 1.13.0 2 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||