Tried to make some of the packages public officially (OpenIDE-Module-Public-Packages).
Fix up the getReadMethod when dealing with indexed boolean.
Added a nice message after generating talking about the root bean.
Fixed up several places in JavaBeanClass where an indexed scalar wasn't compiling.
Made the docs a little better.
1.1 --- a/schema2beans/test/unit/src/data/BaseTest.java Wed Jan 15 21:24:04 2003 +0000
1.2 +++ b/schema2beans/test/unit/src/data/BaseTest.java Thu Jan 16 19:48:29 2003 +0000
1.3 @@ -150,11 +150,11 @@
1.4
1.5 try {
1.6 rt.gc();
1.7 - Thread.sleep(2000L);
1.8 + Thread.sleep(1000L);
1.9 rt.gc();
1.10 - Thread.sleep(2000L);
1.11 + Thread.sleep(1000L);
1.12 rt.gc();
1.13 - Thread.sleep(2000L);
1.14 + Thread.sleep(1000L);
1.15 rt.gc();
1.16 } catch(Exception e) {
1.17 }
2.1 --- a/schema2beans/test/unit/src/data/TestWebAppDelegator.java Wed Jan 15 21:24:04 2003 +0000
2.2 +++ b/schema2beans/test/unit/src/data/TestWebAppDelegator.java Thu Jan 16 19:48:29 2003 +0000
2.3 @@ -52,5 +52,50 @@
2.4 webApp.setDescription(0, "Changed the description");
2.5 webApp.getFilter(0).setFilterClass("foo");
2.6 webApp.write(out);
2.7 +
2.8 + out("set some goodnesses");
2.9 + SecurityConstraintType sc = new SecurityConstraintType();
2.10 + webApp.addSecurityConstraint(sc);
2.11 + sc.setAuthConstraint(new AuthConstraintType());
2.12 + sc.getAuthConstraint().addGoodPresidentCandidate(true);
2.13 + sc.getAuthConstraint().addGoodPresidentCandidate(false);
2.14 + boolean firstCandiateGoodness = sc.getAuthConstraint().isGoodPresidentCandidate(0);
2.15 + check(firstCandiateGoodness == true, "firstCandiateGoodness is good");
2.16 + boolean[] allCandidateGoodnesses = sc.getAuthConstraint().getGoodPresidentCandidate();
2.17 + check(allCandidateGoodnesses.length == 2, "2 candidates goodness");
2.18 + check(allCandidateGoodnesses[0] == true, "candidate 0 is good");
2.19 + check(allCandidateGoodnesses[1] == false, "candidate 1 is not good");
2.20 + webApp.write(out);
2.21 +
2.22 + try {
2.23 + webApp.validate();
2.24 + check(false, "Failed to get validate exception");
2.25 + } catch (webapp.WebApp.ValidateException e) {
2.26 + check(true, "Got good validate exception: "+e.getMessage());
2.27 + }
2.28 + webApp.setVersion("2.4");
2.29 + try {
2.30 + webApp.validate();
2.31 + check(false, "Failed to get validate exception");
2.32 + } catch (webapp.WebApp.ValidateException e) {
2.33 + check(true, "Got good validate exception: "+e.getMessage());
2.34 + }
2.35 + sc.addWebResourceCollection(new WebResourceCollectionType());
2.36 + try {
2.37 + webApp.validate();
2.38 + check(false, "Failed to get validate exception");
2.39 + } catch (webapp.WebApp.ValidateException e) {
2.40 + check(true, "Got good validate exception: "+e.getMessage());
2.41 + }
2.42 + sc.getWebResourceCollection(0).setWebResourceName("blue");
2.43 + try {
2.44 + webApp.validate();
2.45 + check(false, "Failed to get validate exception");
2.46 + } catch (webapp.WebApp.ValidateException e) {
2.47 + check(true, "Got good validate exception: "+e.getMessage());
2.48 + }
2.49 + sc.getWebResourceCollection(0).addUrlPattern("*.html");
2.50 + webApp.write(out);
2.51 + webApp.validate();
2.52 }
2.53 }
3.1 --- a/schema2beans/test/unit/src/data/TestWebAppDelegator.xsd Wed Jan 15 21:24:04 2003 +0000
3.2 +++ b/schema2beans/test/unit/src/data/TestWebAppDelegator.xsd Thu Jan 16 19:48:29 2003 +0000
3.3 @@ -295,6 +295,7 @@
3.4 <xsd:element name="role-name"
3.5 type="j2ee:role-nameType"
3.6 minOccurs="0" maxOccurs="unbounded"/>
3.7 + <xsd:element name="goodPresidentCandidate" type="xsd:boolean" maxOccurs="2"/>
3.8 </xsd:sequence>
3.9
3.10 </xsd:complexType>
4.1 --- a/schema2beans/test/unit/src/data/TestWebAppDelegatorBaseBean.java Wed Jan 15 21:24:04 2003 +0000
4.2 +++ b/schema2beans/test/unit/src/data/TestWebAppDelegatorBaseBean.java Thu Jan 16 19:48:29 2003 +0000
4.3 @@ -52,5 +52,50 @@
4.4 webApp.setDescription(0, "Changed the description");
4.5 webApp.getFilter(0).setFilterClass("foo");
4.6 webApp.write(out);
4.7 +
4.8 + out("set some goodnesses");
4.9 + SecurityConstraintType sc = new SecurityConstraintType();
4.10 + webApp.addSecurityConstraint(sc);
4.11 + sc.setAuthConstraint(new AuthConstraintType());
4.12 + sc.getAuthConstraint().addGoodPresidentCandidate(true);
4.13 + sc.getAuthConstraint().addGoodPresidentCandidate(false);
4.14 + boolean firstCandiateGoodness = sc.getAuthConstraint().isGoodPresidentCandidate(0);
4.15 + check(firstCandiateGoodness == true, "firstCandiateGoodness is good");
4.16 + boolean[] allCandidateGoodnesses = sc.getAuthConstraint().getGoodPresidentCandidate();
4.17 + check(allCandidateGoodnesses.length == 2, "2 candidates goodness");
4.18 + check(allCandidateGoodnesses[0] == true, "candidate 0 is good");
4.19 + check(allCandidateGoodnesses[1] == false, "candidate 1 is not good");
4.20 + webApp.write(out);
4.21 +
4.22 + try {
4.23 + webApp.validate();
4.24 + check(false, "Failed to get validate exception");
4.25 + } catch (org.netbeans.modules.schema2beans.ValidateException e) {
4.26 + check(true, "Got good validate exception: "+e.getMessage());
4.27 + }
4.28 + webApp.setVersion("2.4");
4.29 + try {
4.30 + webApp.validate();
4.31 + check(false, "Failed to get validate exception");
4.32 + } catch (org.netbeans.modules.schema2beans.ValidateException e) {
4.33 + check(true, "Got good validate exception: "+e.getMessage());
4.34 + }
4.35 + sc.addWebResourceCollection(new WebResourceCollectionType());
4.36 + try {
4.37 + webApp.validate();
4.38 + check(false, "Failed to get validate exception");
4.39 + } catch (org.netbeans.modules.schema2beans.ValidateException e) {
4.40 + check(true, "Got good validate exception: "+e.getMessage());
4.41 + }
4.42 + sc.getWebResourceCollection(0).setWebResourceName("blue");
4.43 + try {
4.44 + webApp.validate();
4.45 + check(false, "Failed to get validate exception");
4.46 + } catch (org.netbeans.modules.schema2beans.ValidateException e) {
4.47 + check(true, "Got good validate exception: "+e.getMessage());
4.48 + }
4.49 + sc.getWebResourceCollection(0).addUrlPattern("*.html");
4.50 + webApp.write(out);
4.51 + webApp.validate();
4.52 }
4.53 }
5.1 --- a/schema2beans/test/unit/src/data/TestWebAppDelegatorBaseBean.xsd Wed Jan 15 21:24:04 2003 +0000
5.2 +++ b/schema2beans/test/unit/src/data/TestWebAppDelegatorBaseBean.xsd Thu Jan 16 19:48:29 2003 +0000
5.3 @@ -295,6 +295,7 @@
5.4 <xsd:element name="role-name"
5.5 type="j2ee:role-nameType"
5.6 minOccurs="0" maxOccurs="unbounded"/>
5.7 + <xsd:element name="goodPresidentCandidate" type="xsd:boolean" maxOccurs="2"/>
5.8 </xsd:sequence>
5.9
5.10 </xsd:complexType>
6.1 --- a/schema2beans/test/unit/src/data/goldenfiles/TestMain/testWebAppDelegator.pass Wed Jan 15 21:24:04 2003 +0000
6.2 +++ b/schema2beans/test/unit/src/data/goldenfiles/TestMain/testWebAppDelegator.pass Thu Jan 16 19:48:29 2003 +0000
6.3 @@ -23,4 +23,45 @@
6.4 out: <filter-class>foo</filter-class>
6.5 out: </filter>
6.6 out: </web-app>
6.7 +out: TestWebAppDelegator - set some goodnesses
6.8 +out: TestWebAppDelegator null firstCandiateGoodness is good -> OK
6.9 +out: TestWebAppDelegator null 2 candidates goodness -> OK
6.10 +out: TestWebAppDelegator null candidate 0 is good -> OK
6.11 +out: TestWebAppDelegator null candidate 1 is not good -> OK
6.12 +out: <?xml version='1.0' encoding='UTF-8' ?>
6.13 +out: <web-app xmlns='http://java.sun.com/xml/ns/j2ee' version='2.4'>
6.14 +out: <description>Changed the description</description>
6.15 +out: <display-name>MyWebApp</display-name>
6.16 +out: <filter>
6.17 +out: <filter-name>Bob</filter-name>
6.18 +out: <filter-class>foo</filter-class>
6.19 +out: </filter>
6.20 +out: <security-constraint>
6.21 +out: <auth-constraint>
6.22 +out: <goodPresidentCandidate/>
6.23 +out: </auth-constraint>
6.24 +out: </security-constraint>
6.25 +out: </web-app>
6.26 +out: TestWebAppDelegator null Got good validate exception: sizeWebResourceCollection() == 0 -> OK
6.27 +out: TestWebAppDelegator null Got good validate exception: sizeWebResourceCollection() == 0 -> OK
6.28 +out: TestWebAppDelegator null Got good validate exception: sizeUrlPattern() == 0 -> OK
6.29 +out: TestWebAppDelegator null Got good validate exception: sizeUrlPattern() == 0 -> OK
6.30 +out: <?xml version='1.0' encoding='UTF-8' ?>
6.31 +out: <web-app xmlns='http://java.sun.com/xml/ns/j2ee' version='2.4'>
6.32 +out: <description>Changed the description</description>
6.33 +out: <display-name>MyWebApp</display-name>
6.34 +out: <filter>
6.35 +out: <filter-name>Bob</filter-name>
6.36 +out: <filter-class>foo</filter-class>
6.37 +out: </filter>
6.38 +out: <security-constraint>
6.39 +out: <web-resource-collection>
6.40 +out: <web-resource-name>blue</web-resource-name>
6.41 +out: <url-pattern>*.html</url-pattern>
6.42 +out: </web-resource-collection>
6.43 +out: <auth-constraint>
6.44 +out: <goodPresidentCandidate/>
6.45 +out: </auth-constraint>
6.46 +out: </security-constraint>
6.47 +out: </web-app>
6.48 Finished running TestWebAppDelegator: 0
7.1 --- a/schema2beans/test/unit/src/data/goldenfiles/TestMain/testWebAppDelegatorBaseBean.pass Wed Jan 15 21:24:04 2003 +0000
7.2 +++ b/schema2beans/test/unit/src/data/goldenfiles/TestMain/testWebAppDelegatorBaseBean.pass Thu Jan 16 19:48:29 2003 +0000
7.3 @@ -22,4 +22,45 @@
7.4 out: <filter-class>foo</filter-class>
7.5 out: </filter>
7.6 out: </web-app>
7.7 +out: TestWebAppDelegatorBaseBean - set some goodnesses
7.8 +out: TestWebAppDelegatorBaseBean null firstCandiateGoodness is good -> OK
7.9 +out: TestWebAppDelegatorBaseBean null 2 candidates goodness -> OK
7.10 +out: TestWebAppDelegatorBaseBean null candidate 0 is good -> OK
7.11 +out: TestWebAppDelegatorBaseBean null candidate 1 is not good -> OK
7.12 +out: <?xml version="1.0" encoding="UTF-8"?>
7.13 +out: <web-app xmlns="http://java.sun.com/xml/ns/j2ee">
7.14 +out: <description>Changed the description</description>
7.15 +out: <display-name>MyWebApp</display-name>
7.16 +out: <filter>
7.17 +out: <filter-name>Bob</filter-name>
7.18 +out: <filter-class>foo</filter-class>
7.19 +out: </filter>
7.20 +out: <security-constraint>
7.21 +out: <auth-constraint>
7.22 +out: <goodPresidentCandidate/>
7.23 +out: </auth-constraint>
7.24 +out: </security-constraint>
7.25 +out: </web-app>
7.26 +out: TestWebAppDelegatorBaseBean null Got good validate exception: getVersion() == null -> OK
7.27 +out: TestWebAppDelegatorBaseBean null Got good validate exception: sizeWebResourceCollection() == 0 -> OK
7.28 +out: TestWebAppDelegatorBaseBean null Got good validate exception: getWebResourceName() == null -> OK
7.29 +out: TestWebAppDelegatorBaseBean null Got good validate exception: sizeUrlPattern() == 0 -> OK
7.30 +out: <?xml version="1.0" encoding="UTF-8"?>
7.31 +out: <web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee">
7.32 +out: <description>Changed the description</description>
7.33 +out: <display-name>MyWebApp</display-name>
7.34 +out: <filter>
7.35 +out: <filter-name>Bob</filter-name>
7.36 +out: <filter-class>foo</filter-class>
7.37 +out: </filter>
7.38 +out: <security-constraint>
7.39 +out: <web-resource-collection>
7.40 +out: <web-resource-name>blue</web-resource-name>
7.41 +out: <url-pattern>*.html</url-pattern>
7.42 +out: </web-resource-collection>
7.43 +out: <auth-constraint>
7.44 +out: <goodPresidentCandidate/>
7.45 +out: </auth-constraint>
7.46 +out: </security-constraint>
7.47 +out: </web-app>
7.48 Finished running TestWebAppDelegatorBaseBean: 0