From portal-commits at lists.jboss.org Mon Oct 1 05:10:07 2007 Content-Type: multipart/mixed; boundary="===============5764540123138377859==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8501 - modules/test/trunk/unit/src/main/org/jboss/unit/api. Date: Mon, 01 Oct 2007 05:10:06 -0400 Message-ID: --===============5764540123138377859== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: julien(a)jboss.com Date: 2007-10-01 05:10:06 -0400 (Mon, 01 Oct 2007) New Revision: 8501 Modified: modules/test/trunk/unit/src/main/org/jboss/unit/api/Assert.java Log: make Assert class final Modified: modules/test/trunk/unit/src/main/org/jboss/unit/api/Assert.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/api/Assert.java 2007-09= -30 22:38:06 UTC (rev 8500) +++ modules/test/trunk/unit/src/main/org/jboss/unit/api/Assert.java 2007-10= -01 09:10:06 UTC (rev 8501) @@ -30,7 +30,7 @@ * @author Julien Viet * @version $Revision: 1.1 $ */ -public class Assert +public final class Assert { = public static T assertInstanceOf(Object o, Class c) --===============5764540123138377859==-- From portal-commits at lists.jboss.org Mon Oct 1 05:48:28 2007 Content-Type: multipart/mixed; boundary="===============3863782400962491661==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8502 - in modules/test/trunk/unit/src/main/org/jboss/unit/runner: results and 1 other directory. Date: Mon, 01 Oct 2007 05:48:28 -0400 Message-ID: --===============3863782400962491661== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: julien(a)jboss.com Date: 2007-10-01 05:48:27 -0400 (Mon, 01 Oct 2007) New Revision: 8502 Modified: modules/test/trunk/unit/src/main/org/jboss/unit/runner/TestResult.java modules/test/trunk/unit/src/main/org/jboss/unit/runner/results/TestFailu= re.java modules/test/trunk/unit/src/main/org/jboss/unit/runner/results/TestSucce= ss.java Log: add support for TestResult parametrization Modified: modules/test/trunk/unit/src/main/org/jboss/unit/runner/TestResult= .java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/runner/TestResult.java = 2007-10-01 09:10:06 UTC (rev 8501) +++ modules/test/trunk/unit/src/main/org/jboss/unit/runner/TestResult.java = 2007-10-01 09:48:27 UTC (rev 8502) @@ -23,6 +23,7 @@ package org.jboss.unit.runner; = import java.util.Map; +import java.util.HashMap; = /** * Base class for test results. @@ -39,11 +40,17 @@ /** . */ private Map parametrization; = - public TestResult(long durationMillis) + protected TestResult(Map parametrization, long duration= Millis) { + this.parametrization =3D parametrization; this.durationMillis =3D durationMillis; } = + public TestResult(long durationMillis) + { + this(new HashMap(), durationMillis); + } + public long getDurationMillis() { return durationMillis; Modified: modules/test/trunk/unit/src/main/org/jboss/unit/runner/results/Te= stFailure.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/runner/results/TestFail= ure.java 2007-10-01 09:10:06 UTC (rev 8501) +++ modules/test/trunk/unit/src/main/org/jboss/unit/runner/results/TestFail= ure.java 2007-10-01 09:48:27 UTC (rev 8502) @@ -25,6 +25,8 @@ import org.jboss.unit.Failure; import org.jboss.unit.runner.TestResult; = +import java.util.Map; + /** * @author Julien Viet * @version $Revision: 1.1 $ @@ -35,6 +37,22 @@ /** . */ private final Failure failure; = + public TestFailure(Failure failure, Map parametrization= , long durationMillis) + { + super(parametrization, durationMillis); + + // + this.failure =3D failure; + } + + public TestFailure(long durationMillis, Failure failure) + { + super(durationMillis); + + // + this.failure =3D failure; + } + public TestFailure(Failure failure, long durationMillis) { super(durationMillis); Modified: modules/test/trunk/unit/src/main/org/jboss/unit/runner/results/Te= stSuccess.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/runner/results/TestSucc= ess.java 2007-10-01 09:10:06 UTC (rev 8501) +++ modules/test/trunk/unit/src/main/org/jboss/unit/runner/results/TestSucc= ess.java 2007-10-01 09:48:27 UTC (rev 8502) @@ -24,12 +24,20 @@ = import org.jboss.unit.runner.TestResult; = +import java.util.Map; + /** * @author Julien Viet * @version $Revision: 1.1 $ */ public class TestSuccess extends TestResult { + + public TestSuccess(Map parametrization, long durationMi= llis) + { + super(parametrization, durationMillis); + } + public TestSuccess(long durationMillis) { super(durationMillis); --===============3863782400962491661==-- From portal-commits at lists.jboss.org Mon Oct 1 06:08:07 2007 Content-Type: multipart/mixed; boundary="===============8825126105479305836==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8503 - in modules/test/trunk/unit/src/main/org/jboss: unit and 3 other directories. Date: Mon, 01 Oct 2007 06:08:06 -0400 Message-ID: --===============8825126105479305836== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: julien(a)jboss.com Date: 2007-10-01 06:08:06 -0400 (Mon, 01 Oct 2007) New Revision: 8503 Modified: modules/test/trunk/unit/src/main/org/jboss/test/unit/PrintListener.java modules/test/trunk/unit/src/main/org/jboss/unit/Failure.java modules/test/trunk/unit/src/main/org/jboss/unit/runner/event/RunnerFailu= reEvent.java modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/driver/TestD= riverRunner.java modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/pojo/POJOTes= tRunner.java Log: make RunnerFailureEvent use the Failure object instead of having the Failur= eType + Throwable state Modified: modules/test/trunk/unit/src/main/org/jboss/test/unit/PrintListene= r.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/test/unit/PrintListener.java= 2007-10-01 09:48:27 UTC (rev 8502) +++ modules/test/trunk/unit/src/main/org/jboss/test/unit/PrintListener.java= 2007-10-01 10:08:06 UTC (rev 8503) @@ -54,7 +54,8 @@ } else if (event instanceof RunnerFailureEvent) { - RunnerFailureEvent failure =3D (RunnerFailureEvent)event; + RunnerFailureEvent failureEvent =3D (RunnerFailureEvent)event; + Failure failure =3D failureEvent.getFailure(); = System.out.println("Runner failure: " + failure.getLevel() + " " = + failure.getMessage()); } else if (event instanceof StartTestEvent) Modified: modules/test/trunk/unit/src/main/org/jboss/unit/Failure.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/Failure.java 2007-10-01= 09:48:27 UTC (rev 8502) +++ modules/test/trunk/unit/src/main/org/jboss/unit/Failure.java 2007-10-01= 10:08:06 UTC (rev 8503) @@ -54,6 +54,13 @@ this.type =3D type; } = + public Failure(String message, Throwable cause, FailureType type) + { + this.message =3D message; + this.cause =3D cause; + this.type =3D type; + } + public String getMessage() { return message; @@ -74,6 +81,11 @@ return new Failure(messge, FailureType.ERROR); } = + public static Failure createErrorFailure(String message, Throwable thro= wable) + { + return new Failure(message, throwable, FailureType.ERROR); + } + public static Failure createErrorFailure(Throwable throwable) { return new Failure(throwable, FailureType.ERROR); Modified: modules/test/trunk/unit/src/main/org/jboss/unit/runner/event/Runn= erFailureEvent.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/runner/event/RunnerFail= ureEvent.java 2007-10-01 09:48:27 UTC (rev 8502) +++ modules/test/trunk/unit/src/main/org/jboss/unit/runner/event/RunnerFail= ureEvent.java 2007-10-01 10:08:06 UTC (rev 8503) @@ -23,7 +23,7 @@ package org.jboss.unit.runner.event; = import org.jboss.unit.runner.TestRunnerEvent; -import org.jboss.unit.FailureType; +import org.jboss.unit.Failure; = /** * @author Julien Viet @@ -33,44 +33,15 @@ { = /** . */ - private String message; + private Failure failure; = - /** . */ - private Throwable throwable; - - /** . */ - private FailureType type; - - public RunnerFailureEvent(String message, FailureType type) + public RunnerFailureEvent(Failure failure) { - this.message =3D message; - this.type =3D type; + this.failure =3D failure; } = - public RunnerFailureEvent(String message, FailureType type, Throwable t= hrowable) + public Failure getFailure() { - this.message =3D message; - this.type =3D type; - this.throwable =3D throwable; + return failure; } - - public RunnerFailureEvent(Throwable throwable) - { - this.throwable =3D throwable; - } - - public FailureType getLevel() - { - return type; - } - - public String getMessage() - { - return message !=3D null ? message : throwable.getMessage(); - } - - public Throwable getThrowable() - { - return throwable; - } } Modified: modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/drive= r/TestDriverRunner.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/driver/Test= DriverRunner.java 2007-10-01 09:48:27 UTC (rev 8502) +++ modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/driver/Test= DriverRunner.java 2007-10-01 10:08:06 UTC (rev 8503) @@ -32,7 +32,6 @@ import org.jboss.unit.info.TestInfo; import org.jboss.unit.TestId; import org.jboss.unit.Failure; -import org.jboss.unit.FailureType; import org.jboss.unit.runner.results.TestSuccess; import org.jboss.unit.runner.results.TestFailure; import org.jboss.unit.runner.event.StartTestEvent; @@ -114,7 +113,7 @@ } else { - fireEvent(new RunnerFailureEvent("Cannot execute test id " + t= estId, FailureType.ERROR)); + fireEvent(new RunnerFailureEvent(Failure.createErrorFailure("C= annot execute test id " + testId))); } } } Modified: modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/pojo/= POJOTestRunner.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/pojo/POJOTe= stRunner.java 2007-10-01 09:48:27 UTC (rev 8502) +++ modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/pojo/POJOTe= stRunner.java 2007-10-01 10:08:06 UTC (rev 8503) @@ -35,6 +35,7 @@ import org.jboss.unit.runner.model.TestDef; import org.jboss.unit.FailureType; import org.jboss.unit.TestId; +import org.jboss.unit.Failure; import org.jboss.unit.info.TestSuiteInfo; import org.jboss.unit.info.TestCaseInfo; import org.jboss.unit.unit.pojo.POJOTestSuiteDriver; @@ -128,17 +129,17 @@ } catch (Exception e) { - fireEvent(new RunnerFailureEvent("Cannot execute test id= " + testDefId, FailureType.ERROR,e)); + fireEvent(new RunnerFailureEvent(Failure.createErrorFail= ure("Cannot execute test id " + testDefId,e))); } } else { - fireEvent(new RunnerFailureEvent("No test definition found = for id " + testDefId, FailureType.ERROR)); + fireEvent(new RunnerFailureEvent(Failure.createErrorFailure= ("No test definition found for id " + testDefId))); } } else { - fireEvent(new RunnerFailureEvent("No test definition found for= id " + testDefId, FailureType.ERROR)); + fireEvent(new RunnerFailureEvent(Failure.createErrorFailure("N= o test definition found for id " + testDefId))); } } } --===============8825126105479305836==-- From portal-commits at lists.jboss.org Mon Oct 1 12:34:06 2007 Content-Type: multipart/mixed; boundary="===============3443481796002602910==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8504 - in modules/test/trunk/unit: src/main/org/jboss/test/unit and 3 other directories. Date: Mon, 01 Oct 2007 12:34:06 -0400 Message-ID: --===============3443481796002602910== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: julien(a)jboss.com Date: 2007-10-01 12:34:06 -0400 (Mon, 01 Oct 2007) New Revision: 8504 Added: modules/test/trunk/unit/src/main/org/jboss/test/unit/pojo/AbstractPOJOTe= st.java modules/test/trunk/unit/src/main/org/jboss/test/unit/pojo/AbstractPOJOTe= sts.java modules/test/trunk/unit/src/main/org/jboss/test/unit/pojo/TestDriverPOJO= Test.java modules/test/trunk/unit/src/main/org/jboss/test/unit/pojo/TestDriverPOJO= Tests.java modules/test/trunk/unit/src/main/org/jboss/test/unit/pojo/TestHandlerSup= portPOJOTest.java modules/test/trunk/unit/src/main/org/jboss/test/unit/pojo/TestHandlerSup= portPOJOTests.java Removed: modules/test/trunk/unit/src/main/org/jboss/test/unit/pojo/POJOTestDriver= Tests.java Modified: modules/test/trunk/unit/build.xml modules/test/trunk/unit/src/main/org/jboss/test/unit/AllTests.java modules/test/trunk/unit/src/main/org/jboss/test/unit/pojo/MethodAnnotate= dWithCreate05.java modules/test/trunk/unit/src/main/org/jboss/test/unit/pojo/MethodAnnotate= dWithCreate06.java modules/test/trunk/unit/src/main/org/jboss/unit/api/Assert.java modules/test/trunk/unit/src/main/org/jboss/unit/api/pojo/TestHandlerSupp= ort.java Log: refactored the pojo tests to test the TestHandler in addition of the pojo t= est driver Modified: modules/test/trunk/unit/build.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/build.xml 2007-10-01 10:08:06 UTC (rev 8503) +++ modules/test/trunk/unit/build.xml 2007-10-01 16:34:06 UTC (rev 8504) @@ -181,9 +181,13 @@ = - + = + Modified: modules/test/trunk/unit/src/main/org/jboss/test/unit/AllTests.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/test/unit/AllTests.java 2007= -10-01 10:08:06 UTC (rev 8503) +++ modules/test/trunk/unit/src/main/org/jboss/test/unit/AllTests.java 2007= -10-01 16:34:06 UTC (rev 8504) @@ -24,7 +24,7 @@ = import org.jboss.test.unit.api.AssertTests; import org.jboss.test.unit.blah.BlahTests; -import org.jboss.test.unit.pojo.POJOTestDriverTests; +import org.jboss.test.unit.pojo.AbstractPOJOTests; import org.jboss.test.unit.runner.CompositeTestRunnerTests; import org.jboss.test.unit.runner.ParametrizationTests; import org.jboss.test.unit.runner.event.TestRunnerEventBroadcasterSupportT= ests; @@ -41,7 +41,9 @@ public static void main(String[] args) throws Exception { AssertTests.main(args); - POJOTestDriverTests.main(args); +// TestHandlerSupportTests.main(args); +// POJOTestDriverTests.main(args); + AbstractPOJOTests.main(args); CompositeTestRunnerTests.main(args); = // Added: modules/test/trunk/unit/src/main/org/jboss/test/unit/pojo/AbstractPO= JOTest.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/test/unit/pojo/AbstractPOJOT= est.java (rev 0) +++ modules/test/trunk/unit/src/main/org/jboss/test/unit/pojo/AbstractPOJOT= est.java 2007-10-01 16:34:06 UTC (rev 8504) @@ -0,0 +1,47 @@ +/*************************************************************************= ***** + * JBoss, a division of Red Hat = * + * Copyright 2006, Red Hat Middleware, LLC, and individual = * + * contributors as indicated by the @authors tag. See the = * + * copyright.txt in the distribution for a full listing of = * + * individual contributors. = * + * = * + * This is free software; you can redistribute it and/or modify it = * + * under the terms of the GNU Lesser General Public License as = * + * published by the Free Software Foundation; either version 2.1 of = * + * the License, or (at your option) any later version. = * + * = * + * This software is distributed in the hope that it will be useful, = * + * but WITHOUT ANY WARRANTY; without even the implied warranty of = * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU = * + * Lesser General Public License for more details. = * + * = * + * You should have received a copy of the GNU Lesser General Public = * + * License along with this software; if not, write to the Free = * + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA = * + * 02110-1301 USA, or see the FSF site: http://www.fsf.org. = * + *************************************************************************= *****/ +package org.jboss.test.unit.pojo; + +import java.util.Set; +import java.util.Map; + +/** + * @author Julien Viet + * @version $Revision: 1.1 $ + */ +public abstract class AbstractPOJOTest +{ + + public abstract Set getParameterNames(); + + public abstract Set getTestCaseNames(); + + public abstract Set getTestCaseParameterNames(String testCaseNa= me); + + public abstract InvokeResult invoke(String testName, Map= parametrization); + + public enum InvokeResult + { + PASS, FAILURE, ERROR + } +} Added: modules/test/trunk/unit/src/main/org/jboss/test/unit/pojo/AbstractPO= JOTests.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/test/unit/pojo/AbstractPOJOT= ests.java (rev 0) +++ modules/test/trunk/unit/src/main/org/jboss/test/unit/pojo/AbstractPOJOT= ests.java 2007-10-01 16:34:06 UTC (rev 8504) @@ -0,0 +1,316 @@ +/*************************************************************************= ***** + * JBoss, a division of Red Hat = * + * Copyright 2006, Red Hat Middleware, LLC, and individual = * + * contributors as indicated by the @authors tag. See the = * + * copyright.txt in the distribution for a full listing of = * + * individual contributors. = * + * = * + * This is free software; you can redistribute it and/or modify it = * + * under the terms of the GNU Lesser General Public License as = * + * published by the Free Software Foundation; either version 2.1 of = * + * the License, or (at your option) any later version. = * + * = * + * This software is distributed in the hope that it will be useful, = * + * but WITHOUT ANY WARRANTY; without even the implied warranty of = * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU = * + * Lesser General Public License for more details. = * + * = * + * You should have received a copy of the GNU Lesser General Public = * + * License along with this software; if not, write to the Free = * + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA = * + * 02110-1301 USA, or see the FSF site: http://www.fsf.org. = * + *************************************************************************= *****/ +package org.jboss.test.unit.pojo; + +import org.jboss.unit.api.Assert; + +import java.util.Map; +import java.util.Collections; +import java.util.HashMap; +import java.util.HashSet; +import java.util.Set; + +/** + * @author Julien Viet + * @version $Revision: 1.1 $ + */ +public abstract class AbstractPOJOTests +{ + + public static void main(String[] args) + { + new TestDriverPOJOTests().test(); + new TestHandlerSupportPOJOTests().test(); + } + + + public void test() + { + testAbstractClassWithoutAnnotations(); + testClassWithoutAnnotations(); + testAbstractClassAnnotatedWithTest(); + testClassAnnotatedWithTest(); + + // + testMethodAnnotatedWithTest(); + testTestMethodHavingArgumentsAnnotatedWithParameter(); + testTestMethodAnnotatedWithConflictingAnnotations(); + testMethodAnnotatedWithParameter(); + testMethodAnnotatedWithCreate(); + + // + testClassHavingSamePropertyParameterAndMethodArgumentParameter(); + + // + testClassWithoutDefaultConstructor(); + testClassWithFailingConstructor(); + + // + testLifeCycleSequence(); + } + + private void testLifeCycleSequence() + { + testLifeCycleSequence(LifeCycleSequence01.class, AbstractPOJOTest.In= vokeResult.ERROR, null, false); + testLifeCycleSequence(LifeCycleSequence02.class, AbstractPOJOTest.In= vokeResult.FAILURE, null, false); + testLifeCycleSequence(LifeCycleSequence03.class, AbstractPOJOTest.In= vokeResult.ERROR, "C", false); + testLifeCycleSequence(LifeCycleSequence04.class, AbstractPOJOTest.In= vokeResult.FAILURE, "C", false); + testLifeCycleSequence(LifeCycleSequence05.class, AbstractPOJOTest.In= vokeResult.ERROR, "CSD", false); + testLifeCycleSequence(LifeCycleSequence06.class, AbstractPOJOTest.In= vokeResult.FAILURE, "CSD", false); + testLifeCycleSequence(LifeCycleSequence07.class, AbstractPOJOTest.In= vokeResult.ERROR, "CSRD", false); + testLifeCycleSequence(LifeCycleSequence08.class, AbstractPOJOTest.In= vokeResult.FAILURE, "CSRD", false); + testLifeCycleSequence(LifeCycleSequence09.class, AbstractPOJOTest.In= vokeResult.PASS, "CSRD", true); + testLifeCycleSequence(LifeCycleSequence10.class, AbstractPOJOTest.In= vokeResult.PASS, "CSRD", true); + testLifeCycleSequence(LifeCycleSequence11.class, AbstractPOJOTest.In= vokeResult.PASS, "CSRD", true); + } + + private void testLifeCycleSequence(Class clazz, AbstractPOJOTest.Invoke= Result result, String expected, boolean invoked) + { + AbstractPOJOTest driver =3D assertCanBuildSuite(clazz); + + // + invoke(driver, clazz, "testFoo", result, invoked); + + // + Assert.assertEquals(expected, POJOAssert.buffer1); + } + + private void testMethodAnnotatedWithCreate() + { + testMethodAnnotatedWithCreate(MethodAnnotatedWithCreate01.class); + testMethodAnnotatedWithCreate(MethodAnnotatedWithCreate02.class); + testMethodAnnotatedWithCreate(MethodAnnotatedWithCreate03.class); + testMethodAnnotatedWithCreate(MethodAnnotatedWithCreate04.class); + assertCannotBuildSuite(MethodAnnotatedWithCreate05.class); + assertCannotBuildSuite(MethodAnnotatedWithCreate06.class); + assertCannotBuildSuite(MethodAnnotatedWithCreate07.class); + } + + private void testMethodAnnotatedWithCreate(Class clazz) + { + AbstractPOJOTest driver =3D assertCanBuildSuite(clazz); + + // + invoke(driver, clazz, "testFoo", AbstractPOJOTest.InvokeResult.PASS,= true); + } + + private void testClassHavingSamePropertyParameterAndMethodArgumentParam= eter() + { + AbstractPOJOTest driver =3D assertCanBuildSuite(ClassHavingSamePrope= rtyParameterAndMethodArgumentParameter.class); + + // + invoke(driver, ClassHavingSamePropertyParameterAndMethodArgumentPara= meter.class, "testFoo", AbstractPOJOTest.InvokeResult.PASS, true); + } + + private void testClassWithFailingConstructor() + { + testClassWithFailingConstructor(ClassWithFailingConstructor1.class, = AbstractPOJOTest.InvokeResult.ERROR, false); + testClassWithFailingConstructor(ClassWithFailingConstructor2.class, = AbstractPOJOTest.InvokeResult.ERROR, false); + testClassWithFailingConstructor(ClassWithFailingConstructor3.class, = AbstractPOJOTest.InvokeResult.ERROR, false); + testClassWithFailingConstructor(ClassWithFailingConstructor4.class, = AbstractPOJOTest.InvokeResult.FAILURE, false); + } + + private void testClassWithFailingConstructor(Class clazz, AbstractPOJOT= est.InvokeResult result, boolean invoked) + { + AbstractPOJOTest driver =3D assertCanBuildSuite(clazz); + + // + invoke(driver, clazz, "testFoo", result, invoked); + } + + private void testClassWithoutDefaultConstructor() + { + assertCannotBuildSuite(ClassWithoutDefaultConstructor1.class); + assertCannotBuildSuite(ClassWithoutDefaultConstructor2.class); + assertCannotBuildSuite(ClassWithoutDefaultConstructor3.class); + assertCannotBuildSuite(ClassWithoutDefaultConstructor4.class); + } + + private void testMethodAnnotatedWithParameter() + { + testMethodAnnotatedWithParameter(MethodAnnotatedWithParameter01.clas= s, false, AbstractPOJOTest.InvokeResult.PASS, true, "foo"); + testMethodAnnotatedWithParameter(MethodAnnotatedWithParameter02.clas= s, false, AbstractPOJOTest.InvokeResult.PASS, true, "bar"); + testMethodAnnotatedWithParameter(MethodAnnotatedWithParameter05.clas= s, true, AbstractPOJOTest.InvokeResult.PASS, true, "foo"); + testMethodAnnotatedWithParameter(MethodAnnotatedWithParameter06.clas= s, true, AbstractPOJOTest.InvokeResult.PASS, true, "bar"); + testMethodAnnotatedWithParameter(MethodAnnotatedWithParameter07.clas= s, true, AbstractPOJOTest.InvokeResult.PASS, true, "foo"); + testMethodAnnotatedWithParameter(MethodAnnotatedWithParameter09.clas= s, true, AbstractPOJOTest.InvokeResult.PASS, true, "foo"); + testMethodAnnotatedWithParameter(MethodAnnotatedWithParameter10.clas= s, true, AbstractPOJOTest.InvokeResult.ERROR, false, "foo"); + testMethodAnnotatedWithParameter(MethodAnnotatedWithParameter11.clas= s, true, AbstractPOJOTest.InvokeResult.ERROR, false, "foo"); + testMethodAnnotatedWithParameter(MethodAnnotatedWithParameter12.clas= s, true, AbstractPOJOTest.InvokeResult.ERROR, false, "foo"); + testMethodAnnotatedWithParameter(MethodAnnotatedWithParameter13.clas= s, true, AbstractPOJOTest.InvokeResult.FAILURE, false, "foo"); + } + + private void testMethodAnnotatedWithParameter(Class clazz, boolean invo= ke, AbstractPOJOTest.InvokeResult result, boolean invoked, String... expect= edParameterNames) + { + AbstractPOJOTest driver =3D assertCanBuildSuite(clazz); + + // + assertParametersEquals(driver.getParameterNames(), expectedParameter= Names); + + // = + if (invoke) + { + Assert.assertEquals(1, driver.getTestCaseNames().size()); + Assert.assertEquals(driver.getParameterNames(), driver.getTestCas= eParameterNames("test")); + invoke(driver, clazz, "test", result, invoked); + } + else + { + Assert.assertEquals(0, driver.getTestCaseNames().size()); + } + } + + private void testTestMethodAnnotatedWithConflictingAnnotations() + { + assertCannotBuildSuite(TestMethodAnnotatedWithConflictingAnnotations= 1.class); + assertCannotBuildSuite(TestMethodAnnotatedWithConflictingAnnotations= 2.class); + assertCannotBuildSuite(TestMethodAnnotatedWithConflictingAnnotations= 3.class); + assertCannotBuildSuite(TestMethodAnnotatedWithConflictingAnnotations= 4.class); + } + + private void testTestMethodHavingArgumentsAnnotatedWithParameter(Class = clazz, String... expectedParameterNames) + { + AbstractPOJOTest driver =3D assertCanBuildSuite(clazz); + + // + Assert.assertEquals(Collections.singleton("testFoo"), driver.getTest= CaseNames()); + + // + assertParametersEquals(driver.getTestCaseParameterNames("testFoo"), = expectedParameterNames); + + // + invoke(driver, clazz, "testFoo", AbstractPOJOTest.InvokeResult.PASS,= true); + } + + private void testTestMethodHavingArgumentsAnnotatedWithParameter() + { + testTestMethodHavingArgumentsAnnotatedWithParameter(TestMethodHaving= ArgumentsAnnotatedWithParameter1.class, "paramFoo"); + testTestMethodHavingArgumentsAnnotatedWithParameter(TestMethodHaving= ArgumentsAnnotatedWithParameter2.class, "paramFoo", "paramBar"); + assertCannotBuildSuite(TestMethodHavingArgumentsAnnotatedWithParamet= er3.class); + assertCannotBuildSuite(TestMethodHavingArgumentsAnnotatedWithParamet= er4.class); + assertCannotBuildSuite(TestMethodHavingArgumentsAnnotatedWithParamet= er5.class); + assertCannotBuildSuite(TestMethodHavingArgumentsAnnotatedWithParamet= er6.class); + assertCannotBuildSuite(TestMethodHavingArgumentsAnnotatedWithParamet= er7.class); + assertCannotBuildSuite(TestMethodHavingArgumentsAnnotatedWithParamet= er8.class); + } + + private void testMethodAnnotatedWithTest() + { + testMethodAnnotatedWithTest(MethodAnnotatedWithTest1.class, "testFoo= "); + testMethodAnnotatedWithTest(MethodAnnotatedWithTest2.class, "testBar= "); + assertCannotBuildSuite(MethodAnnotatedWithTest5.class); + assertClassHasNoTests(MethodAnnotatedWithTest6.class); + assertClassHasNoTests(MethodAnnotatedWithTest7.class); + assertClassHasNoTests(MethodAnnotatedWithTest8.class); + assertCannotBuildSuite(MethodAnnotatedWithTest9.class); + } + + private void testMethodAnnotatedWithTest(Class clazz, String testName) + { + AbstractPOJOTest driver =3D assertCanBuildSuite(clazz); + + // + Assert.assertEquals(Collections.singleton(testName), driver.getTestC= aseNames()); + Assert.assertEquals(Collections.emptySet(), driver.getTestCaseParame= terNames(testName)); + + // = + invoke(driver, clazz, testName, AbstractPOJOTest.InvokeResult.PASS, = true); + } + + private void testAbstractClassWithoutAnnotations() + { + assertCannotBuildSuite(AbstractClassWithoutAnnotations.class); + } + + private void testClassWithoutAnnotations() + { + AbstractPOJOTest driver =3D assertCanBuildSuite(ClassWithoutAnnotati= ons.class); + Assert.assertEquals(new HashSet(), driver.getParameterNames()); + Assert.assertEquals(new HashSet(), driver.getTestCaseNames()); + } + + private void testAbstractClassAnnotatedWithTest() + { + assertCannotBuildSuite(AbstractClassAnnotatedWithTest1.class); + assertCannotBuildSuite(AbstractClassAnnotatedWithTest2.class); + } + + private void testClassAnnotatedWithTest() + { + testClassAnnotatedPOJO(ClassAnnotatedWithTest1.class, ClassAnnotated= WithTest1.class.getName(), null); + testClassAnnotatedPOJO(ClassAnnotatedWithTest2.class, "foo", null); + } + + private void testClassAnnotatedPOJO(Class clazz, String name, String de= scription) + { + AbstractPOJOTest driver =3D assertCanBuildSuite(clazz); + Assert.assertEquals(new HashSet(), driver.getParameterNames()); + Assert.assertEquals(new HashSet(), driver.getTestCaseNames()); + } + + private void assertParametersEquals(Set parametersInfo, String.= .. expectedParameterNames) + { + Assert.assertEquals(expectedParameterNames.length, parametersInfo.si= ze()); + for (String expectedParameterName : expectedParameterNames) + { + Assert.assertTrue(parametersInfo.contains(expectedParameterName)); + } + } + + // ************************* + + private void invoke(AbstractPOJOTest driver, Class clazz, String testNa= me, AbstractPOJOTest.InvokeResult expectedResult, boolean invoked) + { + Map parametrization =3D new HashMap(= ); + Map expectedParameterValues =3D new HashMap(); + for (String expectedParameterName : driver.getTestCaseParameterNames= (testName)) + { + String expectedParameterValue =3D expectedParameterName + "_value= "; + parametrization.put(expectedParameterName, expectedParameterValue= ); + expectedParameterValues.put(expectedParameterName, expectedParame= terValue); + } + + // + POJOAssert.clear(); + AbstractPOJOTest.InvokeResult result =3D driver.invoke(testName, par= ametrization); + Assert.assertEquals(expectedResult, result); + if (invoked) + { + POJOAssert.assertWasCalled(clazz, expectedParameterValues); + } + else + { + POJOAssert.assertWasNotCalled(); + } + } + + private void assertClassHasNoTests(Class clazz) + { + AbstractPOJOTest driver =3D assertCanBuildSuite(clazz); + Assert.assertEquals(Collections.EMPTY_SET, driver.getTestCaseNames()= ); + } + + protected abstract void assertCannotBuildSuite(Class clazz); + + protected abstract AbstractPOJOTest assertCanBuildSuite(Class clazz); +} Modified: modules/test/trunk/unit/src/main/org/jboss/test/unit/pojo/MethodA= nnotatedWithCreate05.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/test/unit/pojo/MethodAnnotat= edWithCreate05.java 2007-10-01 10:08:06 UTC (rev 8503) +++ modules/test/trunk/unit/src/main/org/jboss/test/unit/pojo/MethodAnnotat= edWithCreate05.java 2007-10-01 16:34:06 UTC (rev 8504) @@ -34,5 +34,6 @@ @Create public static void foo() { + POJOAssert.buffer1 =3D "foo"; } } Modified: modules/test/trunk/unit/src/main/org/jboss/test/unit/pojo/MethodA= nnotatedWithCreate06.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/test/unit/pojo/MethodAnnotat= edWithCreate06.java 2007-10-01 10:08:06 UTC (rev 8503) +++ modules/test/trunk/unit/src/main/org/jboss/test/unit/pojo/MethodAnnotat= edWithCreate06.java 2007-10-01 16:34:06 UTC (rev 8504) @@ -34,5 +34,6 @@ @Create public void foo(String s) { + POJOAssert.buffer1 =3D "foo"; } } Deleted: modules/test/trunk/unit/src/main/org/jboss/test/unit/pojo/POJOTest= DriverTests.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/test/unit/pojo/POJOTestDrive= rTests.java 2007-10-01 10:08:06 UTC (rev 8503) +++ modules/test/trunk/unit/src/main/org/jboss/test/unit/pojo/POJOTestDrive= rTests.java 2007-10-01 16:34:06 UTC (rev 8504) @@ -1,406 +0,0 @@ -/*************************************************************************= ***** - * JBoss, a division of Red Hat = * - * Copyright 2006, Red Hat Middleware, LLC, and individual = * - * contributors as indicated by the @authors tag. See the = * - * copyright.txt in the distribution for a full listing of = * - * individual contributors. = * - * = * - * This is free software; you can redistribute it and/or modify it = * - * under the terms of the GNU Lesser General Public License as = * - * published by the Free Software Foundation; either version 2.1 of = * - * the License, or (at your option) any later version. = * - * = * - * This software is distributed in the hope that it will be useful, = * - * but WITHOUT ANY WARRANTY; without even the implied warranty of = * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU = * - * Lesser General Public License for more details. = * - * = * - * You should have received a copy of the GNU Lesser General Public = * - * License along with this software; if not, write to the Free = * - * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA = * - * 02110-1301 USA, or see the FSF site: http://www.fsf.org. = * - *************************************************************************= *****/ -package org.jboss.test.unit.pojo; - -import org.jboss.unit.Failure; -import org.jboss.unit.FailureType; -import org.jboss.unit.TestId; -import static org.jboss.unit.api.Assert.*; -import org.jboss.unit.driver.DriverResponse; -import org.jboss.unit.driver.TestDriver; -import org.jboss.unit.driver.command.StartTestCommand; -import org.jboss.unit.driver.response.EndTestResponse; -import org.jboss.unit.driver.response.FailureResponse; -import org.jboss.unit.info.ParameterInfo; -import org.jboss.unit.info.TestCaseInfo; -import org.jboss.unit.info.TestInfo; -import org.jboss.unit.info.TestSuiteInfo; -import org.jboss.unit.unit.pojo.POJOTestSuiteDriver; - -import java.util.Collections; -import java.util.HashMap; -import java.util.HashSet; -import java.util.Map; - -/** - * @author Julien Viet - * @version $Revision: 1.1 $ - */ -public class POJOTestDriverTests -{ - - public static void main(String[] args) - { - testAbstractClassWithoutAnnotations(); - testClassWithoutAnnotations(); - testAbstractClassAnnotatedWithTest(); - testClassAnnotatedWithTest(); - - // - testMethodAnnotatedWithTest(); - testTestMethodHavingArgumentsAnnotatedWithParameter(); - testTestMethodAnnotatedWithConflictingAnnotations(); - testMethodAnnotatedWithParameter(); - testMethodAnnotatedWithCreate(); - - // - testClassHavingSamePropertyParameterAndMethodArgumentParameter(); - - // - testClassWithoutDefaultConstructor(); - testClassWithFailingConstructor(); - - // - testLifeCycleSequence(); - } - - private static void testLifeCycleSequence() - { - testLifeCycleSequence(LifeCycleSequence01.class, InvokeResult.NOT_CA= LLED_ERROR, null); - testLifeCycleSequence(LifeCycleSequence02.class, InvokeResult.NOT_CA= LLED_FAIL, null); - testLifeCycleSequence(LifeCycleSequence03.class, InvokeResult.NOT_CA= LLED_ERROR, "C"); - testLifeCycleSequence(LifeCycleSequence04.class, InvokeResult.NOT_CA= LLED_FAIL, "C"); - testLifeCycleSequence(LifeCycleSequence05.class, InvokeResult.NOT_CA= LLED_ERROR, "CSD"); - testLifeCycleSequence(LifeCycleSequence06.class, InvokeResult.NOT_CA= LLED_FAIL, "CSD"); - testLifeCycleSequence(LifeCycleSequence07.class, InvokeResult.NOT_CA= LLED_ERROR, "CSRD"); - testLifeCycleSequence(LifeCycleSequence08.class, InvokeResult.NOT_CA= LLED_FAIL, "CSRD"); - testLifeCycleSequence(LifeCycleSequence09.class, InvokeResult.PASS, = "CSRD"); - testLifeCycleSequence(LifeCycleSequence10.class, InvokeResult.PASS, = "CSRD"); - testLifeCycleSequence(LifeCycleSequence11.class, InvokeResult.PASS, = "CSRD"); - - - - -// testMethodAnnotatedWithFailingCreate(LifeCycleSequence02_.class, I= nvokeResult.NOT_CALLED_ERROR); -// testMethodAnnotatedWithFailingCreate(LifeCycleSequence03_.class, I= nvokeResult.NOT_CALLED_ERROR); -// testMethodAnnotatedWithFailingCreate(LifeCycleSequence04_.class, I= nvokeResult.NOT_CALLED_FAIL); -// testMethodAnnotatedWithCreate(LifeCycleSequence05_.class); - } - - private static void testLifeCycleSequence(Class clazz, InvokeResult res= ult, String expected) - { - TestDriver driver =3D assertCanBuildSuite(clazz); - - // - invoke(driver, clazz, "testFoo", result); - - // - assertEquals(expected, POJOAssert.buffer1); - } - - private static void testMethodAnnotatedWithCreate() - { - testMethodAnnotatedWithCreate(MethodAnnotatedWithCreate01.class); - testMethodAnnotatedWithCreate(MethodAnnotatedWithCreate02.class); - testMethodAnnotatedWithCreate(MethodAnnotatedWithCreate03.class); - testMethodAnnotatedWithCreate(MethodAnnotatedWithCreate04.class); - assertCannotBuildSuite(MethodAnnotatedWithCreate05.class); - assertCannotBuildSuite(MethodAnnotatedWithCreate06.class); - assertCannotBuildSuite(MethodAnnotatedWithCreate07.class); - } - - private static void testMethodAnnotatedWithCreate(Class clazz) - { - TestDriver driver =3D assertCanBuildSuite(clazz); - - // - invoke(driver, clazz, "testFoo", InvokeResult.PASS); - } - - private static void testClassHavingSamePropertyParameterAndMethodArgume= ntParameter() - { - TestDriver driver =3D assertCanBuildSuite(ClassHavingSamePropertyPar= ameterAndMethodArgumentParameter.class); - - // - invoke(driver, ClassHavingSamePropertyParameterAndMethodArgumentPara= meter.class, "testFoo", InvokeResult.PASS); - } - - private static void testClassWithFailingConstructor() - { - testClassWithFailingConstructor(ClassWithFailingConstructor1.class, = InvokeResult.NOT_CALLED_ERROR); - testClassWithFailingConstructor(ClassWithFailingConstructor2.class, = InvokeResult.NOT_CALLED_ERROR); - testClassWithFailingConstructor(ClassWithFailingConstructor3.class, = InvokeResult.NOT_CALLED_ERROR); - testClassWithFailingConstructor(ClassWithFailingConstructor4.class, = InvokeResult.NOT_CALLED_FAIL); - } - - private static void testClassWithFailingConstructor(Class clazz, Invoke= Result result) - { - TestDriver driver =3D assertCanBuildSuite(clazz); - - // - invoke(driver, clazz, "testFoo", result); - } - - private static void testClassWithoutDefaultConstructor() - { - assertCannotBuildSuite(ClassWithoutDefaultConstructor1.class); - assertCannotBuildSuite(ClassWithoutDefaultConstructor2.class); - assertCannotBuildSuite(ClassWithoutDefaultConstructor3.class); - assertCannotBuildSuite(ClassWithoutDefaultConstructor4.class); - } - - private static void testMethodAnnotatedWithParameter() - { - testMethodAnnotatedWithParameter(MethodAnnotatedWithParameter01.clas= s, false, InvokeResult.PASS, "foo"); - testMethodAnnotatedWithParameter(MethodAnnotatedWithParameter02.clas= s, false, InvokeResult.PASS, "bar"); - testMethodAnnotatedWithParameter(MethodAnnotatedWithParameter05.clas= s, true, InvokeResult.PASS, "foo"); - testMethodAnnotatedWithParameter(MethodAnnotatedWithParameter06.clas= s, true, InvokeResult.PASS, "bar"); - testMethodAnnotatedWithParameter(MethodAnnotatedWithParameter07.clas= s, true, InvokeResult.PASS, "foo"); - testMethodAnnotatedWithParameter(MethodAnnotatedWithParameter09.clas= s, true, InvokeResult.PASS, "foo"); - testMethodAnnotatedWithParameter(MethodAnnotatedWithParameter10.clas= s, true, InvokeResult.NOT_CALLED_ERROR, "foo"); - testMethodAnnotatedWithParameter(MethodAnnotatedWithParameter11.clas= s, true, InvokeResult.NOT_CALLED_ERROR, "foo"); - testMethodAnnotatedWithParameter(MethodAnnotatedWithParameter12.clas= s, true, InvokeResult.NOT_CALLED_ERROR, "foo"); - testMethodAnnotatedWithParameter(MethodAnnotatedWithParameter13.clas= s, true, InvokeResult.NOT_CALLED_FAIL, "foo"); - } - - private static void testMethodAnnotatedWithParameter(Class clazz, boole= an invoke, InvokeResult result, String... expectedParameterNames) - { - TestDriver driver =3D assertCanBuildSuite(clazz); - - // - TestSuiteInfo info =3D (TestSuiteInfo)driver.getInfo(); - - // - Map parametersInfo =3D info.getPara= meters(); - assertParametersEquals(parametersInfo, expectedParameterNames); - - // - if (invoke) - { - assertEquals(1, info.getNames().size()); - TestCaseInfo caseInfo =3D (TestCaseInfo)info.getTest("test"); - assertNotNull(caseInfo); - assertParametersEquals(caseInfo.getParameters(), expectedParamete= rNames); - - // - invoke(driver, clazz, "test", result); - } - else - { - assertEquals(0, info.getNames().size()); - } - } - - private static void testTestMethodAnnotatedWithConflictingAnnotations() - { - assertCannotBuildSuite(TestMethodAnnotatedWithConflictingAnnotations= 1.class); - assertCannotBuildSuite(TestMethodAnnotatedWithConflictingAnnotations= 2.class); - assertCannotBuildSuite(TestMethodAnnotatedWithConflictingAnnotations= 3.class); - assertCannotBuildSuite(TestMethodAnnotatedWithConflictingAnnotations= 4.class); - } - - private static void testTestMethodHavingArgumentsAnnotatedWithParameter= (Class clazz, String... expectedParameterNames) - { - TestDriver driver =3D assertCanBuildSuite(clazz); - - // - TestSuiteInfo suiteInfo =3D (TestSuiteInfo)driver.getInfo(); - - // - assertEquals(Collections.singleton("testFoo"), suiteInfo.getNames()); - TestInfo testFooInfo =3D suiteInfo.getTest("testFoo"); - assertNotNull(testFooInfo); - assertInstanceOf(testFooInfo, TestCaseInfo.class); - - // - Map parametersInfo =3D testFooInfo.= getParameters(); - assertParametersEquals(parametersInfo, expectedParameterNames); - = - // - invoke(driver, clazz, "testFoo", InvokeResult.PASS); - } - - private static void testTestMethodHavingArgumentsAnnotatedWithParameter= () - { - testTestMethodHavingArgumentsAnnotatedWithParameter(TestMethodHaving= ArgumentsAnnotatedWithParameter1.class, "paramFoo"); - testTestMethodHavingArgumentsAnnotatedWithParameter(TestMethodHaving= ArgumentsAnnotatedWithParameter2.class, "paramFoo", "paramBar"); - assertCannotBuildSuite(TestMethodHavingArgumentsAnnotatedWithParamet= er3.class); - assertCannotBuildSuite(TestMethodHavingArgumentsAnnotatedWithParamet= er4.class); - assertCannotBuildSuite(TestMethodHavingArgumentsAnnotatedWithParamet= er5.class); - assertCannotBuildSuite(TestMethodHavingArgumentsAnnotatedWithParamet= er6.class); - assertCannotBuildSuite(TestMethodHavingArgumentsAnnotatedWithParamet= er7.class); - assertCannotBuildSuite(TestMethodHavingArgumentsAnnotatedWithParamet= er8.class); - } - - private static void testMethodAnnotatedWithTest() - { - testMethodAnnotatedWithTest(MethodAnnotatedWithTest1.class, "testFoo= "); - testMethodAnnotatedWithTest(MethodAnnotatedWithTest2.class, "testBar= "); - assertCannotBuildSuite(MethodAnnotatedWithTest5.class); - assertClassHasNoTests(MethodAnnotatedWithTest6.class); - assertClassHasNoTests(MethodAnnotatedWithTest7.class); - assertClassHasNoTests(MethodAnnotatedWithTest8.class); - assertCannotBuildSuite(MethodAnnotatedWithTest9.class); - } - - private static void testMethodAnnotatedWithTest(Class clazz, String tes= tName) - { - TestDriver driver =3D assertCanBuildSuite(clazz); - - // - TestSuiteInfo info =3D (TestSuiteInfo)driver.getInfo(); - assertEquals(Collections.singleton(testName), info.getNames()); - TestInfo testFooInfo =3D info.getTest(testName); - assertNotNull(testFooInfo); - assertInstanceOf(testFooInfo, TestCaseInfo.class); - assertEquals(testName, testFooInfo.getName()); - assertEquals(Collections.EMPTY_MAP, testFooInfo.getParameters()); - - // - POJOAssert.clear(); - DriverResponse response =3D driver.invoke(new TestId(testName), new = StartTestCommand()); - assertInstanceOf(response, EndTestResponse.class); - POJOAssert.assertWasCalled(clazz); - } - - private static void testAbstractClassWithoutAnnotations() - { - assertCannotBuildSuite(AbstractClassWithoutAnnotations.class); - } - - private static void testClassWithoutAnnotations() - { - TestDriver driver =3D assertCanBuildSuite(ClassWithoutAnnotations.cl= ass); - TestSuiteInfo info =3D (TestSuiteInfo)driver.getInfo(); - assertEquals(new HashMap(), info.getParameters()); - assertEquals(new HashSet(), info.getNames()); - } - - private static void testAbstractClassAnnotatedWithTest() - { - assertCannotBuildSuite(AbstractClassAnnotatedWithTest1.class); - assertCannotBuildSuite(AbstractClassAnnotatedWithTest2.class); - } - - private static void testClassAnnotatedWithTest() - { - testClassAnnotatedPOJO(ClassAnnotatedWithTest1.class, ClassAnnotated= WithTest1.class.getName(), null); - testClassAnnotatedPOJO(ClassAnnotatedWithTest2.class, "foo", null); - } - = - private static void testClassAnnotatedPOJO(Class clazz, String name, St= ring description) - { - TestDriver driver =3D assertCanBuildSuite(clazz); - TestSuiteInfo info =3D (TestSuiteInfo)driver.getInfo(); - assertEquals(new HashMap(), info.getParameters()); - assertEquals(new HashSet(), info.getNames()); - } - - private static void assertParametersEquals(Map parametersInfo, String... expectedParameterNames) - { - assertEquals(expectedParameterNames.length, parametersInfo.size()); - for (String expectedParameterName : expectedParameterNames) - { - ParameterInfo parameterInfo =3D parametersInfo.get(expectedParame= terName); - assertNotNull(parameterInfo); - assertEquals(expectedParameterName, parameterInfo.getName()); - } - } - - // ************************* - - private enum InvokeResult - { - PASS, NOT_CALLED_FAIL, NOT_CALLED_ERROR - } - - private static void invoke(TestDriver driver, Class clazz, String testN= ame, InvokeResult result) - { - TestCaseInfo testInfo =3D (TestCaseInfo)((TestSuiteInfo)driver.getIn= fo()).getTest(testName); - assertNotNull(testInfo); - - // - Map expectedParametrization =3D new HashMap(); - Map expectedParameterValues =3D new HashMap(); - for (String expectedParameterName : testInfo.getParameters().keySet(= )) - { - String expectedParameterValue =3D expectedParameterName + "_value= "; - expectedParametrization.put(expectedParameterName, expectedParame= terValue); - expectedParameterValues.put(expectedParameterName, expectedParame= terValue); - } - - // - POJOAssert.clear(); - DriverResponse response =3D driver.invoke(new TestId(testName), new = StartTestCommand(expectedParametrization)); - switch(result) - { - case PASS: - { - assertInstanceOf(response, EndTestResponse.class); - POJOAssert.assertWasCalled(clazz, expectedParameterValues); - break; - } - case NOT_CALLED_FAIL: - { - FailureResponse failureResponse =3D assertInstanceOf(response,= FailureResponse.class); - Failure failure =3D failureResponse.getFailure(); - assertEquals(FailureType.ASSERTION, failure.getLevel()); - POJOAssert.assertWasNotCalled(); - break; - } - case NOT_CALLED_ERROR: - { - FailureResponse failureResponse =3D assertInstanceOf(response,= FailureResponse.class); - Failure failure =3D failureResponse.getFailure(); - assertEquals(FailureType.ERROR, failure.getLevel()); - POJOAssert.assertWasNotCalled(); - break; - } - } - } - - private static void assertClassHasNoTests(Class clazz) - { - TestDriver driver =3D assertCanBuildSuite(clazz); - TestSuiteInfo suiteInfo =3D (TestSuiteInfo)driver.getInfo(); - assertEquals(Collections.EMPTY_SET, suiteInfo.getNames()); - } - - private static void assertCannotBuildSuite(Class clazz) - { - try - { - new POJOTestSuiteDriver(clazz); - fail(); - } - catch (IllegalArgumentException expected) - { - } - } - - private static TestDriver assertCanBuildSuite(Class clazz) - { - TestDriver driver =3D new POJOTestSuiteDriver(clazz); - - // - assertNotNull(driver); - - // - TestInfo info =3D driver.getInfo(); - assertNotNull(info); - assertInstanceOf(info, TestSuiteInfo.class); - - // - return driver; - } -} Added: modules/test/trunk/unit/src/main/org/jboss/test/unit/pojo/TestDriver= POJOTest.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/test/unit/pojo/TestDriverPOJ= OTest.java (rev 0) +++ modules/test/trunk/unit/src/main/org/jboss/test/unit/pojo/TestDriverPOJ= OTest.java 2007-10-01 16:34:06 UTC (rev 8504) @@ -0,0 +1,105 @@ +/*************************************************************************= ***** + * JBoss, a division of Red Hat = * + * Copyright 2006, Red Hat Middleware, LLC, and individual = * + * contributors as indicated by the @authors tag. See the = * + * copyright.txt in the distribution for a full listing of = * + * individual contributors. = * + * = * + * This is free software; you can redistribute it and/or modify it = * + * under the terms of the GNU Lesser General Public License as = * + * published by the Free Software Foundation; either version 2.1 of = * + * the License, or (at your option) any later version. = * + * = * + * This software is distributed in the hope that it will be useful, = * + * but WITHOUT ANY WARRANTY; without even the implied warranty of = * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU = * + * Lesser General Public License for more details. = * + * = * + * You should have received a copy of the GNU Lesser General Public = * + * License along with this software; if not, write to the Free = * + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA = * + * 02110-1301 USA, or see the FSF site: http://www.fsf.org. = * + *************************************************************************= *****/ +package org.jboss.test.unit.pojo; + +import org.jboss.unit.driver.TestDriver; +import org.jboss.unit.driver.DriverResponse; +import org.jboss.unit.driver.response.EndTestResponse; +import org.jboss.unit.driver.response.FailureResponse; +import org.jboss.unit.driver.command.StartTestCommand; +import org.jboss.unit.info.ParameterInfo; +import org.jboss.unit.info.TestSuiteInfo; +import org.jboss.unit.info.TestInfo; +import org.jboss.unit.info.TestCaseInfo; +import static org.jboss.unit.api.Assert.*; +import org.jboss.unit.TestId; + +import java.util.Set; +import java.util.Map; + +/** + * @author Julien Viet + * @version $Revision: 1.1 $ + */ +public class TestDriverPOJOTest extends AbstractPOJOTest +{ + + /** . */ + private final TestDriver testDriver; + + /** . */ + private final TestSuiteInfo suiteInfo; + + public TestDriverPOJOTest(TestDriver testDriver) + { + TestInfo info =3D testDriver.getInfo(); + assertNotNull(info); + TestSuiteInfo suiteInfo =3D assertInstanceOf(info, TestSuiteInfo.cla= ss); + + // + this.testDriver =3D testDriver; + this.suiteInfo =3D suiteInfo; + } + + public Set getParameterNames() + { + return suiteInfo.getParameters().keySet(); + } + + public Set getTestCaseNames() + { + return suiteInfo.getNames(); + } + + public Set getTestCaseParameterNames(String testCaseName) + { + TestInfo info =3D suiteInfo.getTest(testCaseName); + assertNotNull(info); + TestCaseInfo testCaseInfo =3D assertInstanceOf(info, TestCaseInfo.cl= ass); + Map testCaseParameterInfos =3D test= CaseInfo.getParameters(); + assertNotNull(testCaseParameterInfos); + return testCaseParameterInfos.keySet(); + } + + public InvokeResult invoke(String testName, Map paramet= rization) + { + DriverResponse response =3D testDriver.invoke(new TestId(testName), = new StartTestCommand(parametrization)); + assertNotNull(response); + if (response instanceof EndTestResponse) + { + return InvokeResult.PASS; + } + else if (response instanceof FailureResponse) + { + FailureResponse failureResponse =3D (FailureResponse)response; + switch (failureResponse.getFailure().getLevel()) + { + case ERROR: + return InvokeResult.ERROR; + case ASSERTION: + return InvokeResult.FAILURE; + } + } + throw createFailure(); + } +} Added: modules/test/trunk/unit/src/main/org/jboss/test/unit/pojo/TestDriver= POJOTests.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/test/unit/pojo/TestDriverPOJ= OTests.java (rev 0) +++ modules/test/trunk/unit/src/main/org/jboss/test/unit/pojo/TestDriverPOJ= OTests.java 2007-10-01 16:34:06 UTC (rev 8504) @@ -0,0 +1,55 @@ +/*************************************************************************= ***** + * JBoss, a division of Red Hat = * + * Copyright 2006, Red Hat Middleware, LLC, and individual = * + * contributors as indicated by the @authors tag. See the = * + * copyright.txt in the distribution for a full listing of = * + * individual contributors. = * + * = * + * This is free software; you can redistribute it and/or modify it = * + * under the terms of the GNU Lesser General Public License as = * + * published by the Free Software Foundation; either version 2.1 of = * + * the License, or (at your option) any later version. = * + * = * + * This software is distributed in the hope that it will be useful, = * + * but WITHOUT ANY WARRANTY; without even the implied warranty of = * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU = * + * Lesser General Public License for more details. = * + * = * + * You should have received a copy of the GNU Lesser General Public = * + * License along with this software; if not, write to the Free = * + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA = * + * 02110-1301 USA, or see the FSF site: http://www.fsf.org. = * + *************************************************************************= *****/ +package org.jboss.test.unit.pojo; + +import org.jboss.unit.driver.TestDriver; +import org.jboss.unit.unit.pojo.POJOTestSuiteDriver; +import static org.jboss.unit.api.Assert.fail; + +/** + * @author Julien Viet + * @version $Revision: 1.1 $ + */ +public class TestDriverPOJOTests extends AbstractPOJOTests +{ + + protected void assertCannotBuildSuite(Class clazz) + { + try + { + new POJOTestSuiteDriver(clazz); + fail(); + } + catch (IllegalArgumentException expected) + { + } + } + + protected AbstractPOJOTest assertCanBuildSuite(Class clazz) + { + TestDriver driver =3D new POJOTestSuiteDriver(clazz); + + // + return new TestDriverPOJOTest(driver); + } +} Added: modules/test/trunk/unit/src/main/org/jboss/test/unit/pojo/TestHandle= rSupportPOJOTest.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/test/unit/pojo/TestHandlerSu= pportPOJOTest.java (rev 0) +++ modules/test/trunk/unit/src/main/org/jboss/test/unit/pojo/TestHandlerSu= pportPOJOTest.java 2007-10-01 16:34:06 UTC (rev 8504) @@ -0,0 +1,99 @@ +/*************************************************************************= ***** + * JBoss, a division of Red Hat = * + * Copyright 2006, Red Hat Middleware, LLC, and individual = * + * contributors as indicated by the @authors tag. See the = * + * copyright.txt in the distribution for a full listing of = * + * individual contributors. = * + * = * + * This is free software; you can redistribute it and/or modify it = * + * under the terms of the GNU Lesser General Public License as = * + * published by the Free Software Foundation; either version 2.1 of = * + * the License, or (at your option) any later version. = * + * = * + * This software is distributed in the hope that it will be useful, = * + * but WITHOUT ANY WARRANTY; without even the implied warranty of = * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU = * + * Lesser General Public License for more details. = * + * = * + * You should have received a copy of the GNU Lesser General Public = * + * License along with this software; if not, write to the Free = * + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA = * + * 02110-1301 USA, or see the FSF site: http://www.fsf.org. = * + *************************************************************************= *****/ +package org.jboss.test.unit.pojo; + +import org.jboss.unit.api.pojo.TestHandler; +import org.jboss.unit.api.pojo.TestCaseLifeCycleException; +import org.jboss.unit.api.pojo.TestCaseDescriptor; + +import static org.jboss.unit.api.Assert.*; + +import java.util.Set; +import java.util.Map; + +/** + * @author Julien Viet + * @version $Revision: 1.1 $ + */ +public class TestHandlerSupportPOJOTest extends AbstractPOJOTest +{ + + /** . */ + private TestHandler handler; + + public TestHandlerSupportPOJOTest(TestHandler handler) + { + this.handler =3D handler; + } + + public Set getParameterNames() + { + return handler.getParameters().keySet(); + } + + public Set getTestCaseNames() + { + return handler.getTestCases().keySet(); + } + + public Set getTestCaseParameterNames(String testCaseName) + { + TestCaseDescriptor descriptor =3D handler.getTestCases().get(testCas= eName); + assertNotNull(descriptor); + return descriptor.getParameters().keySet(); + } + + public InvokeResult invoke(String testName, Map paramet= rization) + { + Object testCase =3D null; + boolean invokeDestroy =3D false; + try + { + testCase =3D handler.newTestCase(testName); + handler.testCaseParametrize(testCase, parametrization); + invokeDestroy =3D true; + handler.testCaseCreate(testCase); + handler.testCaseInvoke(testCase); + return InvokeResult.PASS; + } + catch (TestCaseLifeCycleException e) + { + Throwable cause =3D e.getCause(); + if (cause instanceof AssertionError) + { + return InvokeResult.FAILURE; + } + else + { + return InvokeResult.ERROR; + } + } + finally + { + if (invokeDestroy) + { + handler.testCaseDestroy(testCase); + } + } + } +} Added: modules/test/trunk/unit/src/main/org/jboss/test/unit/pojo/TestHandle= rSupportPOJOTests.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/test/unit/pojo/TestHandlerSu= pportPOJOTests.java (rev 0) +++ modules/test/trunk/unit/src/main/org/jboss/test/unit/pojo/TestHandlerSu= pportPOJOTests.java 2007-10-01 16:34:06 UTC (rev 8504) @@ -0,0 +1,52 @@ +/*************************************************************************= ***** + * JBoss, a division of Red Hat = * + * Copyright 2006, Red Hat Middleware, LLC, and individual = * + * contributors as indicated by the @authors tag. See the = * + * copyright.txt in the distribution for a full listing of = * + * individual contributors. = * + * = * + * This is free software; you can redistribute it and/or modify it = * + * under the terms of the GNU Lesser General Public License as = * + * published by the Free Software Foundation; either version 2.1 of = * + * the License, or (at your option) any later version. = * + * = * + * This software is distributed in the hope that it will be useful, = * + * but WITHOUT ANY WARRANTY; without even the implied warranty of = * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU = * + * Lesser General Public License for more details. = * + * = * + * You should have received a copy of the GNU Lesser General Public = * + * License along with this software; if not, write to the Free = * + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA = * + * 02110-1301 USA, or see the FSF site: http://www.fsf.org. = * + *************************************************************************= *****/ +package org.jboss.test.unit.pojo; + +import org.jboss.unit.api.pojo.TestHandlerSupport; +import org.jboss.unit.api.Assert; + +/** + * @author Julien Viet + * @version $Revision: 1.1 $ + */ +public class TestHandlerSupportPOJOTests extends AbstractPOJOTests +{ + + + protected void assertCannotBuildSuite(Class clazz) + { + try + { + new TestHandlerSupport(clazz); + Assert.fail(); + } + catch (IllegalArgumentException expected) + { + } + } + + protected AbstractPOJOTest assertCanBuildSuite(Class clazz) + { + return new TestHandlerSupportPOJOTest(new TestHandlerSupport(clazz)); + } +} Modified: modules/test/trunk/unit/src/main/org/jboss/unit/api/Assert.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/api/Assert.java 2007-10= -01 10:08:06 UTC (rev 8503) +++ modules/test/trunk/unit/src/main/org/jboss/unit/api/Assert.java 2007-10= -01 16:34:06 UTC (rev 8504) @@ -251,6 +251,16 @@ throw createAssertionError(cause, msg); } = + public static Error createFailure() + { + return createFailure(null); + } + + public static Error createFailure(String msg) + { + return createAssertionError(null, msg); + } + public static Error createAssertionError(Throwable cause, String msg) { if (msg =3D=3D null) Modified: modules/test/trunk/unit/src/main/org/jboss/unit/api/pojo/TestHand= lerSupport.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/api/pojo/TestHandlerSup= port.java 2007-10-01 10:08:06 UTC (rev 8503) +++ modules/test/trunk/unit/src/main/org/jboss/unit/api/pojo/TestHandlerSup= port.java 2007-10-01 16:34:06 UTC (rev 8504) @@ -443,7 +443,7 @@ // if (testCaseDef =3D=3D null) { - throw new TestCaseLifeCycleException(); + throw new TestCaseLifeCycleException("No such test case <" + name= + ">"); } = // --===============3443481796002602910==-- From portal-commits at lists.jboss.org Mon Oct 1 18:01:06 2007 Content-Type: multipart/mixed; boundary="===============1757788298387657544==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8505 - in modules/test/trunk/unit/src/main/org/jboss: test/unit/runner and 7 other directories. Date: Mon, 01 Oct 2007 18:01:06 -0400 Message-ID: --===============1757788298387657544== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: julien(a)jboss.com Date: 2007-10-01 18:01:06 -0400 (Mon, 01 Oct 2007) New Revision: 8505 Added: modules/test/trunk/unit/src/main/org/jboss/test/unit/pojo/ClassAnnotated= WithTag1.java modules/test/trunk/unit/src/main/org/jboss/test/unit/pojo/ClassAnnotated= WithTag2.java modules/test/trunk/unit/src/main/org/jboss/test/unit/pojo/ClassAnnotated= WithTag3.java modules/test/trunk/unit/src/main/org/jboss/test/unit/pojo/MethodAnnotate= dWithTag1.java modules/test/trunk/unit/src/main/org/jboss/test/unit/pojo/MethodAnnotate= dWithTag2.java modules/test/trunk/unit/src/main/org/jboss/test/unit/pojo/MethodAnnotate= dWithTag3.java Modified: modules/test/trunk/unit/src/main/org/jboss/test/unit/pojo/AbstractPOJOTe= st.java modules/test/trunk/unit/src/main/org/jboss/test/unit/pojo/AbstractPOJOTe= sts.java modules/test/trunk/unit/src/main/org/jboss/test/unit/pojo/TestDriverPOJO= Test.java modules/test/trunk/unit/src/main/org/jboss/test/unit/pojo/TestHandlerSup= portPOJOTest.java modules/test/trunk/unit/src/main/org/jboss/test/unit/runner/CompositeTes= tRunnerTests.java modules/test/trunk/unit/src/main/org/jboss/unit/api/pojo/ParameterDescri= ptor.java modules/test/trunk/unit/src/main/org/jboss/unit/api/pojo/TestCaseDef.java modules/test/trunk/unit/src/main/org/jboss/unit/api/pojo/TestCaseDescrip= tor.java modules/test/trunk/unit/src/main/org/jboss/unit/api/pojo/TestHandler.java modules/test/trunk/unit/src/main/org/jboss/unit/api/pojo/TestHandlerSupp= ort.java modules/test/trunk/unit/src/main/org/jboss/unit/api/pojo/TestParameter.j= ava modules/test/trunk/unit/src/main/org/jboss/unit/api/pojo/annotations/Tag= .java modules/test/trunk/unit/src/main/org/jboss/unit/api/pojo/junit/JUnitTest= Handler.java modules/test/trunk/unit/src/main/org/jboss/unit/info/TestInfo.java modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/composite/Co= mpositeTestRunner.java modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/failure/Fail= ureTestCaseInfo.java modules/test/trunk/unit/src/main/org/jboss/unit/unit/pojo/POJOTestCaseIn= fo.java modules/test/trunk/unit/src/main/org/jboss/unit/unit/pojo/POJOTestInfo.j= ava modules/test/trunk/unit/src/main/org/jboss/unit/unit/pojo/POJOTestSuiteI= nfo.java Log: - make TestCaseDescriptor and TestParameterDescriptor interfaces - implement and test keyword tagging of tests Modified: modules/test/trunk/unit/src/main/org/jboss/test/unit/pojo/Abstrac= tPOJOTest.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/test/unit/pojo/AbstractPOJOT= est.java 2007-10-01 16:34:06 UTC (rev 8504) +++ modules/test/trunk/unit/src/main/org/jboss/test/unit/pojo/AbstractPOJOT= est.java 2007-10-01 22:01:06 UTC (rev 8505) @@ -38,6 +38,10 @@ = public abstract Set getTestCaseParameterNames(String testCaseNa= me); = + public abstract Set getKeywords(); + + public abstract Set getTestCaseKeywords(String testCaseName); + public abstract InvokeResult invoke(String testName, Map= parametrization); = public enum InvokeResult Modified: modules/test/trunk/unit/src/main/org/jboss/test/unit/pojo/Abstrac= tPOJOTests.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/test/unit/pojo/AbstractPOJOT= ests.java 2007-10-01 16:34:06 UTC (rev 8504) +++ modules/test/trunk/unit/src/main/org/jboss/test/unit/pojo/AbstractPOJOT= ests.java 2007-10-01 22:01:06 UTC (rev 8505) @@ -24,6 +24,8 @@ = import org.jboss.unit.api.Assert; = +import static org.jboss.unit.util.CollectionTools.*; + import java.util.Map; import java.util.Collections; import java.util.HashMap; @@ -50,6 +52,7 @@ testClassWithoutAnnotations(); testAbstractClassAnnotatedWithTest(); testClassAnnotatedWithTest(); + testClassAnnotatedWithTag(); = // testMethodAnnotatedWithTest(); @@ -57,6 +60,7 @@ testTestMethodAnnotatedWithConflictingAnnotations(); testMethodAnnotatedWithParameter(); testMethodAnnotatedWithCreate(); + testMethodAnnotatedWithTag(); = // testClassHavingSamePropertyParameterAndMethodArgumentParameter(); @@ -69,6 +73,32 @@ testLifeCycleSequence(); } = + private void testClassAnnotatedWithTag() + { + testClassAnnotatedWithTag(ClassAnnotatedWithTag1.class, set("annotat= ion_foo")); + testClassAnnotatedWithTag(ClassAnnotatedWithTag2.class, set("annotat= ion_foo", "annotation_bar")); + testClassAnnotatedWithTag(ClassAnnotatedWithTag3.class, new HashSet<= String>()); + } + + private void testClassAnnotatedWithTag(Class clazz, Set keyword= s) + { + AbstractPOJOTest driver =3D assertCanBuildSuite(clazz); + Assert.assertEquals(keywords, driver.getKeywords()); + } + + private void testMethodAnnotatedWithTag() + { + testMethodAnnotatedWithTag(MethodAnnotatedWithTag1.class, "testFoo",= set("annotation_foo")); + testMethodAnnotatedWithTag(MethodAnnotatedWithTag2.class, "testFoo",= set("annotation_foo", "annotation_bar")); + testMethodAnnotatedWithTag(MethodAnnotatedWithTag3.class, "testFoo",= new HashSet()); + } + + private void testMethodAnnotatedWithTag(Class clazz, String testName, S= et keywords) + { + AbstractPOJOTest driver =3D assertCanBuildSuite(clazz); + Assert.assertEquals(keywords, driver.getTestCaseKeywords(testName)); + } + private void testLifeCycleSequence() { testLifeCycleSequence(LifeCycleSequence01.class, AbstractPOJOTest.In= vokeResult.ERROR, null, false); Added: modules/test/trunk/unit/src/main/org/jboss/test/unit/pojo/ClassAnnot= atedWithTag1.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/test/unit/pojo/ClassAnnotate= dWithTag1.java (rev 0) +++ modules/test/trunk/unit/src/main/org/jboss/test/unit/pojo/ClassAnnotate= dWithTag1.java 2007-10-01 22:01:06 UTC (rev 8505) @@ -0,0 +1,34 @@ +/*************************************************************************= ***** + * JBoss, a division of Red Hat = * + * Copyright 2006, Red Hat Middleware, LLC, and individual = * + * contributors as indicated by the @authors tag. See the = * + * copyright.txt in the distribution for a full listing of = * + * individual contributors. = * + * = * + * This is free software; you can redistribute it and/or modify it = * + * under the terms of the GNU Lesser General Public License as = * + * published by the Free Software Foundation; either version 2.1 of = * + * the License, or (at your option) any later version. = * + * = * + * This software is distributed in the hope that it will be useful, = * + * but WITHOUT ANY WARRANTY; without even the implied warranty of = * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU = * + * Lesser General Public License for more details. = * + * = * + * You should have received a copy of the GNU Lesser General Public = * + * License along with this software; if not, write to the Free = * + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA = * + * 02110-1301 USA, or see the FSF site: http://www.fsf.org. = * + *************************************************************************= *****/ +package org.jboss.test.unit.pojo; + +import org.jboss.unit.api.pojo.annotations.Tag; + +/** + * @author Julien Viet + * @version $Revision: 1.1 $ + */ +(a)Tag("annotation_foo") +public class ClassAnnotatedWithTag1 +{ +} Added: modules/test/trunk/unit/src/main/org/jboss/test/unit/pojo/ClassAnnot= atedWithTag2.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/test/unit/pojo/ClassAnnotate= dWithTag2.java (rev 0) +++ modules/test/trunk/unit/src/main/org/jboss/test/unit/pojo/ClassAnnotate= dWithTag2.java 2007-10-01 22:01:06 UTC (rev 8505) @@ -0,0 +1,34 @@ +/*************************************************************************= ***** + * JBoss, a division of Red Hat = * + * Copyright 2006, Red Hat Middleware, LLC, and individual = * + * contributors as indicated by the @authors tag. See the = * + * copyright.txt in the distribution for a full listing of = * + * individual contributors. = * + * = * + * This is free software; you can redistribute it and/or modify it = * + * under the terms of the GNU Lesser General Public License as = * + * published by the Free Software Foundation; either version 2.1 of = * + * the License, or (at your option) any later version. = * + * = * + * This software is distributed in the hope that it will be useful, = * + * but WITHOUT ANY WARRANTY; without even the implied warranty of = * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU = * + * Lesser General Public License for more details. = * + * = * + * You should have received a copy of the GNU Lesser General Public = * + * License along with this software; if not, write to the Free = * + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA = * + * 02110-1301 USA, or see the FSF site: http://www.fsf.org. = * + *************************************************************************= *****/ +package org.jboss.test.unit.pojo; + +import org.jboss.unit.api.pojo.annotations.Tag; + +/** + * @author Julien Viet + * @version $Revision: 1.1 $ + */ +(a)Tag({"annotation_foo","annotation_bar"}) +public class ClassAnnotatedWithTag2 +{ +} Added: modules/test/trunk/unit/src/main/org/jboss/test/unit/pojo/ClassAnnot= atedWithTag3.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/test/unit/pojo/ClassAnnotate= dWithTag3.java (rev 0) +++ modules/test/trunk/unit/src/main/org/jboss/test/unit/pojo/ClassAnnotate= dWithTag3.java 2007-10-01 22:01:06 UTC (rev 8505) @@ -0,0 +1,33 @@ +/*************************************************************************= ***** + * JBoss, a division of Red Hat = * + * Copyright 2006, Red Hat Middleware, LLC, and individual = * + * contributors as indicated by the @authors tag. See the = * + * copyright.txt in the distribution for a full listing of = * + * individual contributors. = * + * = * + * This is free software; you can redistribute it and/or modify it = * + * under the terms of the GNU Lesser General Public License as = * + * published by the Free Software Foundation; either version 2.1 of = * + * the License, or (at your option) any later version. = * + * = * + * This software is distributed in the hope that it will be useful, = * + * but WITHOUT ANY WARRANTY; without even the implied warranty of = * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU = * + * Lesser General Public License for more details. = * + * = * + * You should have received a copy of the GNU Lesser General Public = * + * License along with this software; if not, write to the Free = * + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA = * + * 02110-1301 USA, or see the FSF site: http://www.fsf.org. = * + *************************************************************************= *****/ +package org.jboss.test.unit.pojo; + +import org.jboss.unit.api.pojo.annotations.Tag; + +/** + * @author Julien Viet + * @version $Revision: 1.1 $ + */ +public class ClassAnnotatedWithTag3 +{ +} Added: modules/test/trunk/unit/src/main/org/jboss/test/unit/pojo/MethodAnno= tatedWithTag1.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/test/unit/pojo/MethodAnnotat= edWithTag1.java (rev 0) +++ modules/test/trunk/unit/src/main/org/jboss/test/unit/pojo/MethodAnnotat= edWithTag1.java 2007-10-01 22:01:06 UTC (rev 8505) @@ -0,0 +1,42 @@ +/*************************************************************************= ***** + * JBoss, a division of Red Hat = * + * Copyright 2006, Red Hat Middleware, LLC, and individual = * + * contributors as indicated by the @authors tag. See the = * + * copyright.txt in the distribution for a full listing of = * + * individual contributors. = * + * = * + * This is free software; you can redistribute it and/or modify it = * + * under the terms of the GNU Lesser General Public License as = * + * published by the Free Software Foundation; either version 2.1 of = * + * the License, or (at your option) any later version. = * + * = * + * This software is distributed in the hope that it will be useful, = * + * but WITHOUT ANY WARRANTY; without even the implied warranty of = * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU = * + * Lesser General Public License for more details. = * + * = * + * You should have received a copy of the GNU Lesser General Public = * + * License along with this software; if not, write to the Free = * + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA = * + * 02110-1301 USA, or see the FSF site: http://www.fsf.org. = * + *************************************************************************= *****/ +package org.jboss.test.unit.pojo; + +import org.jboss.unit.api.pojo.annotations.Test; +import org.jboss.unit.api.pojo.annotations.Tag; + +/** + * @author Julien Viet + * @version $Revision: 1.1 $ + */ +public class MethodAnnotatedWithTag1 +{ + + @Test + @Tag("annotation_foo") + public void testFoo() + { + + } + +} Added: modules/test/trunk/unit/src/main/org/jboss/test/unit/pojo/MethodAnno= tatedWithTag2.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/test/unit/pojo/MethodAnnotat= edWithTag2.java (rev 0) +++ modules/test/trunk/unit/src/main/org/jboss/test/unit/pojo/MethodAnnotat= edWithTag2.java 2007-10-01 22:01:06 UTC (rev 8505) @@ -0,0 +1,42 @@ +/*************************************************************************= ***** + * JBoss, a division of Red Hat = * + * Copyright 2006, Red Hat Middleware, LLC, and individual = * + * contributors as indicated by the @authors tag. See the = * + * copyright.txt in the distribution for a full listing of = * + * individual contributors. = * + * = * + * This is free software; you can redistribute it and/or modify it = * + * under the terms of the GNU Lesser General Public License as = * + * published by the Free Software Foundation; either version 2.1 of = * + * the License, or (at your option) any later version. = * + * = * + * This software is distributed in the hope that it will be useful, = * + * but WITHOUT ANY WARRANTY; without even the implied warranty of = * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU = * + * Lesser General Public License for more details. = * + * = * + * You should have received a copy of the GNU Lesser General Public = * + * License along with this software; if not, write to the Free = * + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA = * + * 02110-1301 USA, or see the FSF site: http://www.fsf.org. = * + *************************************************************************= *****/ +package org.jboss.test.unit.pojo; + +import org.jboss.unit.api.pojo.annotations.Test; +import org.jboss.unit.api.pojo.annotations.Tag; + +/** + * @author Julien Viet + * @version $Revision: 1.1 $ + */ +public class MethodAnnotatedWithTag2 +{ + + @Test + @Tag({"annotation_foo","annotation_bar"}) + public void testFoo() + { + + } + +} Added: modules/test/trunk/unit/src/main/org/jboss/test/unit/pojo/MethodAnno= tatedWithTag3.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/test/unit/pojo/MethodAnnotat= edWithTag3.java (rev 0) +++ modules/test/trunk/unit/src/main/org/jboss/test/unit/pojo/MethodAnnotat= edWithTag3.java 2007-10-01 22:01:06 UTC (rev 8505) @@ -0,0 +1,41 @@ +/*************************************************************************= ***** + * JBoss, a division of Red Hat = * + * Copyright 2006, Red Hat Middleware, LLC, and individual = * + * contributors as indicated by the @authors tag. See the = * + * copyright.txt in the distribution for a full listing of = * + * individual contributors. = * + * = * + * This is free software; you can redistribute it and/or modify it = * + * under the terms of the GNU Lesser General Public License as = * + * published by the Free Software Foundation; either version 2.1 of = * + * the License, or (at your option) any later version. = * + * = * + * This software is distributed in the hope that it will be useful, = * + * but WITHOUT ANY WARRANTY; without even the implied warranty of = * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU = * + * Lesser General Public License for more details. = * + * = * + * You should have received a copy of the GNU Lesser General Public = * + * License along with this software; if not, write to the Free = * + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA = * + * 02110-1301 USA, or see the FSF site: http://www.fsf.org. = * + *************************************************************************= *****/ +package org.jboss.test.unit.pojo; + +import org.jboss.unit.api.pojo.annotations.Test; +import org.jboss.unit.api.pojo.annotations.Tag; + +/** + * @author Julien Viet + * @version $Revision: 1.1 $ + */ +public class MethodAnnotatedWithTag3 +{ + + @Test + public void testFoo() + { + + } + +} Modified: modules/test/trunk/unit/src/main/org/jboss/test/unit/pojo/TestDri= verPOJOTest.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/test/unit/pojo/TestDriverPOJ= OTest.java 2007-10-01 16:34:06 UTC (rev 8504) +++ modules/test/trunk/unit/src/main/org/jboss/test/unit/pojo/TestDriverPOJ= OTest.java 2007-10-01 22:01:06 UTC (rev 8505) @@ -66,11 +66,24 @@ return suiteInfo.getParameters().keySet(); } = + public Set getKeywords() + { + return suiteInfo.getKeywords(); + } + public Set getTestCaseNames() { return suiteInfo.getNames(); } = + public Set getTestCaseKeywords(String testCaseName) + { + TestInfo info =3D suiteInfo.getTest(testCaseName); + assertNotNull(info); + TestCaseInfo testCaseInfo =3D assertInstanceOf(info, TestCaseInfo.cl= ass); + return testCaseInfo.getKeywords(); + } + public Set getTestCaseParameterNames(String testCaseName) { TestInfo info =3D suiteInfo.getTest(testCaseName); Modified: modules/test/trunk/unit/src/main/org/jboss/test/unit/pojo/TestHan= dlerSupportPOJOTest.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/test/unit/pojo/TestHandlerSu= pportPOJOTest.java 2007-10-01 16:34:06 UTC (rev 8504) +++ modules/test/trunk/unit/src/main/org/jboss/test/unit/pojo/TestHandlerSu= pportPOJOTest.java 2007-10-01 22:01:06 UTC (rev 8505) @@ -56,6 +56,18 @@ return handler.getTestCases().keySet(); } = + public Set getKeywords() + { + return handler.getKeywords(); + } + + public Set getTestCaseKeywords(String testCaseName) + { + TestCaseDescriptor descriptor =3D handler.getTestCases().get(testCas= eName); + assertNotNull(descriptor); + return descriptor.getKeywords(); + } + public Set getTestCaseParameterNames(String testCaseName) { TestCaseDescriptor descriptor =3D handler.getTestCases().get(testCas= eName); Modified: modules/test/trunk/unit/src/main/org/jboss/test/unit/runner/Compo= siteTestRunnerTests.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/test/unit/runner/CompositeTe= stRunnerTests.java 2007-10-01 16:34:06 UTC (rev 8504) +++ modules/test/trunk/unit/src/main/org/jboss/test/unit/runner/CompositeTe= stRunnerTests.java 2007-10-01 22:01:06 UTC (rev 8505) @@ -23,6 +23,9 @@ package org.jboss.test.unit.runner; = import org.jboss.unit.runner.TestRunner; +import org.jboss.unit.runner.AbstractTestRunner; +import org.jboss.unit.runner.TestFilter; +import org.jboss.unit.runner.TestRunnerEvent; import org.jboss.unit.runner.event.EndRunnerEvent; import org.jboss.unit.runner.event.StartRunnerEvent; import org.jboss.unit.runner.impl.composite.CompositeTestRunner; @@ -41,20 +44,62 @@ public static void main(String[] args) { = - EventDrivenTestRunner srunner =3D new EventDrivenTestRunner( - new StartRunnerEvent(), - new EndRunnerEvent() - ); + MyRunner1 runner1 =3D new MyRunner1(); + MyRunner1 runner2 =3D new MyRunner1(); = Collection runners =3D new ArrayList(); - runners.add(srunner); + runners.add(runner1); + runners.add(runner2); = CompositeTestRunner runner =3D new CompositeTestRunner(runners); = runner.run(); = + = = + } = + private static class MyRunner1 extends AbstractTestRunner + { + + /** . */ + final TestRunnerEvent event =3D new MyEvent(); + + boolean invoked; + + protected void internalRun(TestFilter filter) + { + invoked =3D true; + fireEvent(event); + } } = + private static class MyRunner2 extends AbstractTestRunner + { + + /** . */ + final RuntimeException exception =3D new RuntimeException(); + + protected void internalRun(TestFilter filter) + { + throw exception; + } + } + + private static class MyRunner3 extends AbstractTestRunner + { + + /** . */ + final Error error =3D new Error(); + + protected void internalRun(TestFilter filter) + { + throw error; + } + } + + private static class MyEvent extends TestRunnerEvent + { + } + } Modified: modules/test/trunk/unit/src/main/org/jboss/unit/api/pojo/Paramete= rDescriptor.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/api/pojo/ParameterDescr= iptor.java 2007-10-01 16:34:06 UTC (rev 8504) +++ modules/test/trunk/unit/src/main/org/jboss/unit/api/pojo/ParameterDescr= iptor.java 2007-10-01 22:01:06 UTC (rev 8505) @@ -30,51 +30,12 @@ * @author Julien Viet * @version $Revision: 1.1 $ */ -public class ParameterDescriptor +public interface ParameterDescriptor { = - /** . */ - private String name; + String getName(); = - /** . */ - private String description; + String getDescription(); = - /** . */ - private List defaultValues; - - public ParameterDescriptor(String name) - { - if (name =3D=3D null) - { - throw new IllegalArgumentException(); - } - - // - this.name =3D name; - } - - public String getName() - { - return name; - } - - public String getDescription() - { - return description; - } - - public void setDescription(String description) - { - this.description =3D description; - } - - public List getDefaultValues() - { - return defaultValues; - } - - public void setDefaultValues(List defaultValues) - { - this.defaultValues =3D defaultValues; - } + List getDefaultValues(); } Modified: modules/test/trunk/unit/src/main/org/jboss/unit/api/pojo/TestCase= Def.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/api/pojo/TestCaseDef.ja= va 2007-10-01 16:34:06 UTC (rev 8504) +++ modules/test/trunk/unit/src/main/org/jboss/unit/api/pojo/TestCaseDef.ja= va 2007-10-01 22:01:06 UTC (rev 8505) @@ -24,12 +24,16 @@ = import java.lang.reflect.Method; import java.util.LinkedHashMap; +import java.util.Set; +import java.util.Map; +import java.util.Collections; +import java.util.HashMap; = /** * @author Julien Viet * @version $Revision: 1.1 $ */ -class TestCaseDef +class TestCaseDef implements TestCaseDescriptor { = /** . */ @@ -45,38 +49,28 @@ final String description; = /** . */ - final LinkedHashMap parameters; + final LinkedHashMap arguments; = -// /** . */ -// private final TestCaseInfo info =3D new TestCaseInfo() -// { -// public String getName() -// { -// return name; -// } -// public String getDescription() -// { -// return description; -// } -// public Map getParameters() -// { -// Map merge =3D new HashMap(); -// merge.putAll(driver.getInfo().getParameters()); -// merge.putAll(parameters); -// return merge; -// } -// public Set getTags() -// { -// return Collections.emptySet(); -// } -// }; + /** . */ + final Map parameters; = - TestCaseDef(Method method, String name, String description, LinkedHashM= ap parameters) + /** . */ + final Set keywords; + + TestCaseDef( + Method method, + String name, + String description, + Map parameters, + LinkedHashMap arguments, + Set keywords) { this.method =3D method; this.name =3D name; this.description =3D description; + this.arguments =3D arguments; this.parameters =3D parameters; + this.keywords =3D keywords; } = public String getName() @@ -88,4 +82,14 @@ { return description; } + + public Map getParameters() + { + return Collections.unmodifiableMap(parameters); + } + + public Set getKeywords() + { + return Collections.unmodifiableSet(keywords); + } } Modified: modules/test/trunk/unit/src/main/org/jboss/unit/api/pojo/TestCase= Descriptor.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/api/pojo/TestCaseDescri= ptor.java 2007-10-01 16:34:06 UTC (rev 8504) +++ modules/test/trunk/unit/src/main/org/jboss/unit/api/pojo/TestCaseDescri= ptor.java 2007-10-01 22:01:06 UTC (rev 8505) @@ -23,54 +23,20 @@ package org.jboss.unit.api.pojo; = import java.util.Map; +import java.util.Set; = /** * @author Julien Viet * @version $Revision: 1.1 $ */ -public class TestCaseDescriptor +public interface TestCaseDescriptor { = - /** . */ - private String name; + String getName(); = - /** . */ - private String description; + String getDescription(); = - /** . */ - private Map parameters; + Map getParameters(); = - public TestCaseDescriptor(String name) - { - if (name =3D=3D null) - { - throw new IllegalArgumentException(); - } - this.name =3D name; - } - - public String getName() - { - return name; - } - - public String getDescription() - { - return description; - } - - public void setDescription(String description) - { - this.description =3D description; - } - - public Map getParameters() - { - return parameters; - } - - public void setParameters(Map parameters) - { - this.parameters =3D parameters; - } + Set getKeywords(); } Modified: modules/test/trunk/unit/src/main/org/jboss/unit/api/pojo/TestHand= ler.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/api/pojo/TestHandler.ja= va 2007-10-01 16:34:06 UTC (rev 8504) +++ modules/test/trunk/unit/src/main/org/jboss/unit/api/pojo/TestHandler.ja= va 2007-10-01 22:01:06 UTC (rev 8505) @@ -26,6 +26,7 @@ import org.jboss.unit.api.pojo.TestCaseDescriptor; = import java.util.Map; +import java.util.Set; = /** * Allow a pojo class to take care of providing its description and perfor= m test case life cycle management. @@ -51,18 +52,25 @@ String getDescription(); = /** + * Returns the keywords for the test. + * + * @return the test keywords + */ + Set getKeywords(); + + /** * Return the test parameters. * * @return the test parameters */ - Map getParameters(); + Map getParameters(); = /** * Return the test case descriptions. * * @return the test case descriptions */ - Map getTestCases(); + Map getTestCases(); = /** * Instantiate life cycle operation of a test case. Modified: modules/test/trunk/unit/src/main/org/jboss/unit/api/pojo/TestHand= lerSupport.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/api/pojo/TestHandlerSup= port.java 2007-10-01 16:34:06 UTC (rev 8504) +++ modules/test/trunk/unit/src/main/org/jboss/unit/api/pojo/TestHandlerSup= port.java 2007-10-01 22:01:06 UTC (rev 8505) @@ -22,13 +22,13 @@ *************************************************************************= *****/ package org.jboss.unit.api.pojo; = -import org.jboss.unit.api.pojo.ParameterDescriptor; -import org.jboss.unit.api.pojo.TestCaseDescriptor; import org.jboss.unit.api.pojo.annotations.Test; import org.jboss.unit.api.pojo.annotations.Parameter; import org.jboss.unit.api.pojo.annotations.Create; import org.jboss.unit.api.pojo.annotations.Destroy; import org.jboss.unit.api.pojo.annotations.Description; +import org.jboss.unit.api.pojo.annotations.Tag; +import org.jboss.unit.util.CollectionTools; = import java.util.SortedMap; import java.util.TreeMap; @@ -37,6 +37,9 @@ import java.util.LinkedHashMap; import java.util.ArrayList; import java.util.List; +import java.util.Set; +import java.util.HashSet; +import java.util.Collections; import java.lang.reflect.Modifier; import java.lang.reflect.Constructor; import java.lang.reflect.AnnotatedElement; @@ -55,32 +58,29 @@ { = /** . */ - private String suiteName; + private final String suiteName; = /** . */ - private String suiteDescription; + private final String suiteDescription; = /** . */ - private Map testCases; + private final Map testCases; = /** . */ - private Method create; + private final Method create; = /** . */ - private Method destroy; + private final Method destroy; = /** . */ - private Map parameters; + final Map suiteParameters; = /** . */ - private Map parameterDescriptors; + private final Constructor ctor; = /** . */ - private Map testCasesDescriptors; + private final Set suiteKeywords; = - /** . */ - private Constructor ctor; - public TestHandlerSupport(Class testClass) { if (testClass =3D=3D null) @@ -95,6 +95,7 @@ } = // Check constructor + Constructor ctor; try { ctor =3D testClass.getConstructor(); @@ -106,7 +107,7 @@ = // Test testAnnotation =3D ((AnnotatedElement)testClass).getAnnotation(= Test.class); - suiteName =3D testAnnotation !=3D null ? testAnnotation.name() : ""; + String suiteName =3D testAnnotation !=3D null ? testAnnotation.name(= ) : ""; if (suiteName.length() =3D=3D 0) { suiteName =3D testClass.getName(); @@ -114,12 +115,19 @@ = // Description descriptionAnnotation =3D ((AnnotatedElement)testClass).= getAnnotation(Description.class); - suiteDescription =3D descriptionAnnotation !=3D null ? descriptionAn= notation.description() : ""; + String suiteDescription =3D descriptionAnnotation !=3D null ? descri= ptionAnnotation.description() : ""; if (suiteDescription.length() =3D=3D 0) { suiteDescription =3D "Test of class " + testClass.getName(); } = + Tag tag =3D ((AnnotatedElement)testClass).getAnnotation(Tag.class); + Set suiteKeywords =3D new HashSet(); + if (tag !=3D null) + { + suiteKeywords.addAll(CollectionTools.set(tag.value())); + } + // SortedMap methods =3D new TreeMap(); for (Method method : testClass.getMethods()) @@ -129,20 +137,20 @@ } = // - parameters =3D new HashMap(); - testCases =3D new HashMap(); + Map suiteParameters =3D new HashMap(); + Map testCases =3D new HashMap(); + Method create =3D null; + Method destroy =3D null; = - // + // First pass for parameters and life cycle annotations for (Method method : methods.values()) { String methodName =3D method.getName(); int modifiers =3D method.getModifiers(); - - // Parameter parameterMethodAnnotation =3D method.getAnnotation(Para= meter.class); - - // Test testMethodAnnotation =3D method.getAnnotation(Test.class); + Create createMethodAnnotation =3D method.getAnnotation(Create.cla= ss); + Destroy destroyMethodAnnotation =3D method.getAnnotation(Destroy.= class); = // if (testMethodAnnotation !=3D null && parameterMethodAnnotation != =3D null) @@ -150,8 +158,6 @@ throw new IllegalArgumentException(); } = - Create createMethodAnnotation =3D method.getAnnotation(Create.cla= ss); - // if (createMethodAnnotation !=3D null && parameterMethodAnnotation= !=3D null) { @@ -162,8 +168,6 @@ throw new IllegalArgumentException(); } = - Destroy destroyMethodAnnotation =3D method.getAnnotation(Destroy.= class); - // if (destroyMethodAnnotation !=3D null && parameterMethodAnnotatio= n !=3D null) { @@ -226,18 +230,22 @@ } = // - PropertyTestParameter parameter =3D parameters.get(name); + PropertyTestParameter parameter =3D suiteParameters.get(name); if (parameter =3D=3D null) { parameter =3D new PropertyTestParameter(name, description); - parameters.put(name, parameter); + suiteParameters.put(name, parameter); } = // parameter.addSetter(method); } - else if (testMethodAnnotation !=3D null) + else if (createMethodAnnotation !=3D null) { + if (create !=3D null) + { + throw new IllegalArgumentException(); + } if (method.getReturnType() !=3D void.class) { throw new IllegalArgumentException(); @@ -254,9 +262,74 @@ { throw new IllegalArgumentException(); } + if (method.getParameterTypes().length > 0) + { + throw new IllegalArgumentException(); + } = // - LinkedHashMap argumentParameter= s =3D new LinkedHashMap(); + create =3D method; + } + else if (destroyMethodAnnotation !=3D null) + { + if (destroy !=3D null) + { + throw new IllegalArgumentException(); + } + if (method.getReturnType() !=3D void.class) + { + throw new IllegalArgumentException(); + } + if (Modifier.isAbstract(modifiers)) + { + throw new IllegalArgumentException(); + } + if (!Modifier.isPublic(modifiers)) + { + throw new IllegalArgumentException(); + } + if (Modifier.isStatic(modifiers)) + { + throw new IllegalArgumentException(); + } + if (method.getParameterTypes().length > 0) + { + throw new IllegalArgumentException(); + } + + // + destroy =3D method; + } + } + + // Second pass for test annotations + for (Method method : methods.values()) + { + int modifiers =3D method.getModifiers(); + Test testMethodAnnotation =3D method.getAnnotation(Test.class); + + // + if (testMethodAnnotation !=3D null) + { + if (method.getReturnType() !=3D void.class) + { + throw new IllegalArgumentException(); + } + if (Modifier.isAbstract(modifiers)) + { + throw new IllegalArgumentException(); + } + if (!Modifier.isPublic(modifiers)) + { + throw new IllegalArgumentException(); + } + if (Modifier.isStatic(modifiers)) + { + throw new IllegalArgumentException(); + } + + // + LinkedHashMap methodParameters = =3D new LinkedHashMap(); for (Annotation[] parameterAnnotations : method.getParameterAn= notations()) { Map,Annotation> parameterAnnota= tionMap =3D new HashMap, Annotation>(); @@ -278,7 +351,7 @@ { throw new IllegalArgumentException(); } - if (argumentParameters.containsKey(name)) + if (methodParameters.containsKey(name)) { throw new IllegalArgumentException(); } @@ -292,7 +365,7 @@ } = // - argumentParameters.put(name, new ArgumentTestParameter(n= ame, description)); + methodParameters.put(name, new ArgumentTestParameter(nam= e, description)); } else { @@ -316,106 +389,38 @@ } = // - TestCaseDef testCaseDef =3D new TestCaseDef(method, name, desc= ription, argumentParameters); - - // - if (testCases.put(testCaseDef.getName(), testCaseDef) !=3D nul= l) + Set keywords =3D new HashSet(); + Tag tagMethodAnnotation =3D method.getAnnotation(Tag.class); + if (tagMethodAnnotation !=3D null) { - throw new IllegalArgumentException(); + keywords.addAll(CollectionTools.set(tagMethodAnnotation.val= ue())); } - } - else if (createMethodAnnotation !=3D null) - { - if (create !=3D null) - { - throw new IllegalArgumentException(); - } - if (method.getReturnType() !=3D void.class) - { - throw new IllegalArgumentException(); - } - if (Modifier.isAbstract(modifiers)) - { - throw new IllegalArgumentException(); - } - if (!Modifier.isPublic(modifiers)) - { - throw new IllegalArgumentException(); - } - if (Modifier.isStatic(modifiers)) - { - throw new IllegalArgumentException(); - } - if (method.getParameterTypes().length > 0) - { - throw new IllegalArgumentException(); - } = + Map parameters =3D new HashMap(suiteParameters); + parameters.putAll(methodParameters); + // - create =3D method; - } - else if (destroyMethodAnnotation !=3D null) - { - if (destroy !=3D null) + TestCaseDef testCaseDef =3D new TestCaseDef(method, name, desc= ription, parameters, methodParameters, keywords); + + // + if (testCases.put(testCaseDef.getName(), testCaseDef) !=3D nul= l) { throw new IllegalArgumentException(); } - if (method.getReturnType() !=3D void.class) - { - throw new IllegalArgumentException(); - } - if (Modifier.isAbstract(modifiers)) - { - throw new IllegalArgumentException(); - } - if (!Modifier.isPublic(modifiers)) - { - throw new IllegalArgumentException(); - } - if (Modifier.isStatic(modifiers)) - { - throw new IllegalArgumentException(); - } - if (method.getParameterTypes().length > 0) - { - throw new IllegalArgumentException(); - } - - // - destroy =3D method; } } = - // Init parameter descriptors - parameterDescriptors =3D buildDescriptorMap(parameters); - // - testCasesDescriptors =3D new LinkedHashMap(); - for (TestCaseDef testCaseDef : testCases.values()) - { - TestCaseDescriptor testCaseDescriptor =3D new TestCaseDescriptor(= testCaseDef.getName()); - testCaseDescriptor.setDescription(testCaseDef.name); - Map merge =3D new LinkedHashMap(); - merge.putAll(parameterDescriptors); - merge.putAll(buildDescriptorMap(testCaseDef.parameters)); - testCaseDescriptor.setParameters(merge); - testCasesDescriptors.put(testCaseDescriptor.getName(), testCaseDe= scriptor); - } + this.suiteName =3D suiteName; + this.suiteDescription =3D suiteDescription; + this.suiteKeywords =3D suiteKeywords; + this.suiteParameters =3D suiteParameters; + this.testCases =3D testCases; + this.ctor =3D ctor; + this.create =3D create; + this.destroy =3D destroy; } = - private static Map buildDescriptorMap(Map<= String, ? extends TestParameter> parameters) - { - Map parameterDescriptors =3D new Linked= HashMap(); - for (TestParameter parameter : parameters.values()) - { - ParameterDescriptor parameterDescriptor =3D new ParameterDescript= or(parameter.getName()); - parameterDescriptor.setDescription(parameter.getDescription()); - parameterDescriptor.setDefaultValues(new ArrayList()); - parameterDescriptors.put(parameter.getName(), parameterDescriptor= ); - } - return parameterDescriptors; - } - public String getName() { return suiteName; @@ -426,16 +431,21 @@ return suiteDescription; } = - public Map getParameters() + public Set getKeywords() { - return parameterDescriptors; + return suiteKeywords; } = - public Map getTestCases() + public Map getParameters() { - return testCasesDescriptors; + return Collections.unmodifiableMap(suiteParameters); } = + public Map getTestCases() + { + return Collections.unmodifiableMap(testCases); + } + public Object newTestCase(String name) throws TestCaseLifeCycleException { TestCaseDef testCaseDef =3D testCases.get(name); @@ -473,7 +483,7 @@ testCase.parametrization =3D parametrization; = // - for (PropertyTestParameter parameter : parameters.values()) + for (PropertyTestParameter parameter : suiteParameters.values()) { if (!parametrization.containsKey(parameter.getName())) { @@ -525,7 +535,7 @@ TestCase testCase =3D (TestCase)_testCase; = List argList =3D new ArrayList(); - for (String parameterName : testCase.def.parameters.keySet()) + for (String parameterName : testCase.def.arguments.keySet()) { if (!testCase.parametrization.containsKey(parameterName)) { Modified: modules/test/trunk/unit/src/main/org/jboss/unit/api/pojo/TestPara= meter.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/api/pojo/TestParameter.= java 2007-10-01 16:34:06 UTC (rev 8504) +++ modules/test/trunk/unit/src/main/org/jboss/unit/api/pojo/TestParameter.= java 2007-10-01 22:01:06 UTC (rev 8505) @@ -29,7 +29,7 @@ * @author Julien Viet * @version $Revision: 1.1 $ */ -class TestParameter +class TestParameter implements ParameterDescriptor { = /** . */ Modified: modules/test/trunk/unit/src/main/org/jboss/unit/api/pojo/annotati= ons/Tag.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/api/pojo/annotations/Ta= g.java 2007-10-01 16:34:06 UTC (rev 8504) +++ modules/test/trunk/unit/src/main/org/jboss/unit/api/pojo/annotations/Ta= g.java 2007-10-01 22:01:06 UTC (rev 8505) @@ -28,6 +28,8 @@ import java.lang.annotation.ElementType; = /** + * Annotate something with keywords. = + * * @author Julien Viet * @version $Revision: 1.1 $ */ Modified: modules/test/trunk/unit/src/main/org/jboss/unit/api/pojo/junit/JU= nitTestHandler.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/api/pojo/junit/JUnitTes= tHandler.java 2007-10-01 16:34:06 UTC (rev 8504) +++ modules/test/trunk/unit/src/main/org/jboss/unit/api/pojo/junit/JUnitTes= tHandler.java 2007-10-01 22:01:06 UTC (rev 8505) @@ -22,64 +22,12 @@ *************************************************************************= *****/ package org.jboss.unit.api.pojo.junit; = -import org.jboss.unit.api.pojo.TestHandler; -import org.jboss.unit.api.pojo.TestCaseLifeCycleException; -import org.jboss.unit.api.pojo.ParameterDescriptor; -import org.jboss.unit.api.pojo.TestCaseDescriptor; - -import java.util.Map; - /** * @todo * * @author Julien Viet * @version $Revision: 1.1 $ */ -public class JUnitTestHandler implements TestHandler +public class JUnitTestHandler { - - public String getName() - { - return null; - } - - public String getDescription() - { - return null; - } - - public Map getParameters() - { - return null; - } - - public Map getTestCases() - { - return null; - } - - public Object newTestCase(String name) throws TestCaseLifeCycleException - { - return null; - } - - public void testCaseParametrize(Object testCase, Map pa= rametrization) throws TestCaseLifeCycleException - { - - } - - public void testCaseCreate(Object testCase) throws TestCaseLifeCycleExc= eption - { - - } - - public void testCaseInvoke(Object testCase) throws TestCaseLifeCycleExc= eption - { - - } - - public void testCaseDestroy(Object testCase) - { - - } } Modified: modules/test/trunk/unit/src/main/org/jboss/unit/info/TestInfo.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/info/TestInfo.java 2007= -10-01 16:34:06 UTC (rev 8504) +++ modules/test/trunk/unit/src/main/org/jboss/unit/info/TestInfo.java 2007= -10-01 22:01:06 UTC (rev 8505) @@ -57,9 +57,9 @@ Map getParameters(); = /** - * Returns the set of tags. + * Returns the set of keywords. * - * @return the set of tags + * @return the set of keywords */ - Set getTags(); + Set getKeywords(); } Modified: modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/compo= site/CompositeTestRunner.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/composite/C= ompositeTestRunner.java 2007-10-01 16:34:06 UTC (rev 8504) +++ modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/composite/C= ompositeTestRunner.java 2007-10-01 22:01:06 UTC (rev 8505) @@ -30,7 +30,9 @@ import java.util.Collection; = /** - * A composite test runner. + * A composite test runner that executes a suite of test runners. If a run= ner throws an unchecked throwable during + * the execution of its run method then composite runner will= not make an attempt to catch it + * and thus the execution will stop. * * @author Julien Viet * @version $Revision: 1.1 $ Modified: modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/failu= re/FailureTestCaseInfo.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/failure/Fai= lureTestCaseInfo.java 2007-10-01 16:34:06 UTC (rev 8504) +++ modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/failure/Fai= lureTestCaseInfo.java 2007-10-01 22:01:06 UTC (rev 8505) @@ -59,7 +59,7 @@ return Collections.emptyMap(); } = - public Set getTags() + public Set getKeywords() { return Collections.emptySet(); } Modified: modules/test/trunk/unit/src/main/org/jboss/unit/unit/pojo/POJOTes= tCaseInfo.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/unit/pojo/POJOTestCaseI= nfo.java 2007-10-01 16:34:06 UTC (rev 8504) +++ modules/test/trunk/unit/src/main/org/jboss/unit/unit/pojo/POJOTestCaseI= nfo.java 2007-10-01 22:01:06 UTC (rev 8505) @@ -37,7 +37,7 @@ = public POJOTestCaseInfo(TestCaseDescriptor descriptor) { - super(descriptor.getParameters()); + super(descriptor.getParameters(), descriptor.getKeywords()); = // this.descriptor =3D descriptor; Modified: modules/test/trunk/unit/src/main/org/jboss/unit/unit/pojo/POJOTes= tInfo.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/unit/pojo/POJOTestInfo.= java 2007-10-01 16:34:06 UTC (rev 8504) +++ modules/test/trunk/unit/src/main/org/jboss/unit/unit/pojo/POJOTestInfo.= java 2007-10-01 22:01:06 UTC (rev 8505) @@ -41,7 +41,10 @@ /** . */ private Map parameters; = - public POJOTestInfo(Map parameterDescriptor= s) + /** . */ + private Set keywords; + + public POJOTestInfo(Map parameter= Descriptors, Set keywords) { Map parameters =3D new HashMap(); for (ParameterDescriptor parameterDescriptor : parameterDescriptors.= values()) @@ -52,6 +55,7 @@ = // this.parameters =3D parameters; + this.keywords =3D keywords; } = public Map getParameters() @@ -59,8 +63,8 @@ return parameters; } = - public Set getTags() + public Set getKeywords() { - return Collections.emptySet(); + return keywords; } } Modified: modules/test/trunk/unit/src/main/org/jboss/unit/unit/pojo/POJOTes= tSuiteInfo.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/unit/pojo/POJOTestSuite= Info.java 2007-10-01 16:34:06 UTC (rev 8504) +++ modules/test/trunk/unit/src/main/org/jboss/unit/unit/pojo/POJOTestSuite= Info.java 2007-10-01 22:01:06 UTC (rev 8505) @@ -47,7 +47,7 @@ = public POJOTestSuiteInfo(TestHandler handler) { - super(handler.getParameters()); + super(handler.getParameters(), handler.getKeywords()); = // HashMap testCases =3D new HashMap(); --===============1757788298387657544==-- From portal-commits at lists.jboss.org Mon Oct 1 20:01:44 2007 Content-Type: multipart/mixed; boundary="===============9125783368972133108==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8506 - modules/test/trunk/unit/src/main/org/jboss/test/unit/runner. Date: Mon, 01 Oct 2007 20:01:43 -0400 Message-ID: --===============9125783368972133108== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: julien(a)jboss.com Date: 2007-10-01 20:01:43 -0400 (Mon, 01 Oct 2007) New Revision: 8506 Modified: modules/test/trunk/unit/src/main/org/jboss/test/unit/runner/CompositeTes= tRunnerTests.java Log: - add test case for composite test runner Modified: modules/test/trunk/unit/src/main/org/jboss/test/unit/runner/Compo= siteTestRunnerTests.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/test/unit/runner/CompositeTe= stRunnerTests.java 2007-10-01 22:01:06 UTC (rev 8505) +++ modules/test/trunk/unit/src/main/org/jboss/test/unit/runner/CompositeTe= stRunnerTests.java 2007-10-02 00:01:43 UTC (rev 8506) @@ -26,13 +26,15 @@ import org.jboss.unit.runner.AbstractTestRunner; import org.jboss.unit.runner.TestFilter; import org.jboss.unit.runner.TestRunnerEvent; -import org.jboss.unit.runner.event.EndRunnerEvent; -import org.jboss.unit.runner.event.StartRunnerEvent; +import org.jboss.unit.runner.TestRunnerEventListener; import org.jboss.unit.runner.impl.composite.CompositeTestRunner; -import org.jboss.unit.runner.impl.event.EventDrivenTestRunner; = +import static org.jboss.unit.api.Assert.*; +import static org.jboss.unit.util.CollectionTools.*; + import java.util.ArrayList; import java.util.Collection; +import java.util.List; = /** * @author Julien Viet @@ -41,22 +43,134 @@ public class CompositeTestRunnerTests { = + private static List events =3D new ArrayList(); + + private static TestRunnerEventListener listener =3D new TestRunnerEvent= Listener() + { + public void onEvent(TestRunnerEvent event) + { + events.add(event); + } + }; + public static void main(String[] args) { + testCompose(); + testComposeWithRuntimeException1(); + testComposeWithRuntimeException2(); + testComposeWithRuntimeError1(); + testComposeWithRuntimeError2(); + } = + private static void testCompose() + { MyRunner1 runner1 =3D new MyRunner1(); MyRunner1 runner2 =3D new MyRunner1(); + Collection runners =3D new ArrayList(); + runners.add(runner1); + runners.add(runner2); + CompositeTestRunner runner =3D new CompositeTestRunner(runners); + runner.addListener(listener); + runner.run(); + assertTrue(runner1.invoked); + assertTrue(runner2.invoked); + assertEquals(4, events.size()); + assertEquals(list(runner1.event, runner2.event), events.subList(1, 3= )); + events.clear(); + } = + private static void testComposeWithRuntimeException1() + { + MyRunner1 runner1 =3D new MyRunner1(); + MyRunner2 runner2 =3D new MyRunner2(); Collection runners =3D new ArrayList(); runners.add(runner1); runners.add(runner2); + CompositeTestRunner runner =3D new CompositeTestRunner(runners); + runner.addListener(listener); + try + { + runner.run(); + fail(); + } + catch (RuntimeException e) + { + assertSame(runner2.exception, e); + } + assertEquals(2, events.size()); + assertTrue(runner1.invoked); + assertEquals(list(runner1.event), events.subList(1, 2)); + events.clear(); + } = + private static void testComposeWithRuntimeException2() + { + MyRunner2 runner1 =3D new MyRunner2(); + MyRunner1 runner2 =3D new MyRunner1(); + Collection runners =3D new ArrayList(); + runners.add(runner1); + runners.add(runner2); CompositeTestRunner runner =3D new CompositeTestRunner(runners); + runner.addListener(listener); + try + { + runner.run(); + fail(); + } + catch (RuntimeException e) + { + assertSame(runner1.exception, e); + } + assertEquals(1, events.size()); + assertFalse(runner2.invoked); + events.clear(); + } = - runner.run(); + private static void testComposeWithRuntimeError1() + { + MyRunner1 runner1 =3D new MyRunner1(); + MyRunner3 runner2 =3D new MyRunner3(); + Collection runners =3D new ArrayList(); + runners.add(runner1); + runners.add(runner2); + CompositeTestRunner runner =3D new CompositeTestRunner(runners); + runner.addListener(listener); + try + { + runner.run(); + fail(); + } + catch (Error e) + { + assertSame(runner2.error, e); + } + assertEquals(2, events.size()); + assertTrue(runner1.invoked); + assertEquals(list(runner1.event), events.subList(1, 2)); + events.clear(); + } = - = - + private static void testComposeWithRuntimeError2() + { + MyRunner3 runner1 =3D new MyRunner3(); + MyRunner1 runner2 =3D new MyRunner1(); + Collection runners =3D new ArrayList(); + runners.add(runner1); + runners.add(runner2); + CompositeTestRunner runner =3D new CompositeTestRunner(runners); + runner.addListener(listener); + try + { + runner.run(); + fail(); + } + catch (Error e) + { + assertSame(runner1.error, e); + } + assertEquals(1, events.size()); + assertFalse(runner2.invoked); + events.clear(); } = private static class MyRunner1 extends AbstractTestRunner @@ -101,5 +215,4 @@ private static class MyEvent extends TestRunnerEvent { } - } --===============9125783368972133108==-- From portal-commits at lists.jboss.org Mon Oct 1 21:33:09 2007 Content-Type: multipart/mixed; boundary="===============7708723372372281364==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8507 - in trunk/wsrp/src/main/org/jboss/portal: test/wsrp/other and 5 other directories. Date: Mon, 01 Oct 2007 21:33:08 -0400 Message-ID: --===============7708723372372281364== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: chris.laprun(a)jboss.com Date: 2007-10-01 21:33:08 -0400 (Mon, 01 Oct 2007) New Revision: 8507 Removed: trunk/wsrp/src/main/org/jboss/portal/wsrp/services/RMIInvokerServiceFact= ory.java trunk/wsrp/src/main/org/jboss/portal/wsrp/services/SOAPInvokerServiceFac= tory.java Modified: trunk/wsrp/src/main/org/jboss/portal/test/wsrp/config/ProducerConfigurat= ionTestCase.java trunk/wsrp/src/main/org/jboss/portal/test/wsrp/other/RegistrationPropert= yDescriptionTestCase.java trunk/wsrp/src/main/org/jboss/portal/test/wsrp/v1/producer/ReleaseSessio= nTestCase.java trunk/wsrp/src/main/org/jboss/portal/test/wsrp/v1/producer/ServiceDescri= ptionTestCase.java trunk/wsrp/src/main/org/jboss/portal/test/wsrp/v1/producer/V1ProducerBas= eTest.java trunk/wsrp/src/main/org/jboss/portal/wsrp/producer/RegistrationHandler.j= ava trunk/wsrp/src/main/org/jboss/portal/wsrp/producer/ServiceDescriptionHan= dler.java trunk/wsrp/src/main/org/jboss/portal/wsrp/producer/WSRPProducerImpl.java trunk/wsrp/src/main/org/jboss/portal/wsrp/producer/config/ProducerConfig= urationFactory.java trunk/wsrp/src/main/org/jboss/portal/wsrp/producer/config/ProducerRegist= rationRequirements.java trunk/wsrp/src/main/org/jboss/portal/wsrp/producer/config/impl/ProducerR= egistrationRequirementsImpl.java Log: - Renamed ProducerRegistrationRequirements.requiresRegistration to isRegist= rationRequired to follow Java Beans conventions. - Renamed ProducerRegistrationRequirements.fullServiceDescriptionRequiresRe= gistration to isRegistrationRequiredForFullDescription to follow Java Beans= conventions. - Removed unused classes. Modified: trunk/wsrp/src/main/org/jboss/portal/test/wsrp/config/ProducerCon= figurationTestCase.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/wsrp/src/main/org/jboss/portal/test/wsrp/config/ProducerConfigura= tionTestCase.java 2007-10-02 00:01:43 UTC (rev 8506) +++ trunk/wsrp/src/main/org/jboss/portal/test/wsrp/config/ProducerConfigura= tionTestCase.java 2007-10-02 01:33:08 UTC (rev 8507) @@ -82,8 +82,8 @@ RegistrationPropertyValidator propertyValidator =3D ((DefaultRegistr= ationPolicy)policy).getValidator(); assertNotNull(propertyValidator); assertTrue(propertyValidator instanceof DefaultRegistrationPropertyV= alidator); - assertTrue(requirements.requiresRegistration()); - assertTrue(requirements.fullServiceDescriptionRequiresRegistration()= ); + assertTrue(requirements.isRegistrationRequired()); + assertTrue(requirements.isRegistrationRequiredForFullDescription()); Map properties =3D requirements.getRegistrationProperties(); assertNotNull(properties); assertEquals(2, properties.size()); @@ -97,8 +97,8 @@ ProducerConfiguration producerConfiguration =3D getProducerConfigura= tion("minimal-registration.xml"); ProducerRegistrationRequirements requirements =3D producerConfigurat= ion.getRegistrationRequirements(); assertNotNull(requirements); - assertTrue(requirements.requiresRegistration()); - assertTrue(!requirements.fullServiceDescriptionRequiresRegistration(= )); + assertTrue(requirements.isRegistrationRequired()); + assertTrue(!requirements.isRegistrationRequiredForFullDescription()); Map properties =3D requirements.getRegistrationProperties(); assertNotNull(properties); assertTrue(properties.isEmpty()); @@ -110,8 +110,8 @@ ProducerConfiguration producerConfiguration =3D getProducerConfigura= tion("minimal.xml"); ProducerRegistrationRequirements requirements =3D producerConfigurat= ion.getRegistrationRequirements(); assertNotNull(requirements); - assertFalse(requirements.requiresRegistration()); - assertFalse(requirements.fullServiceDescriptionRequiresRegistration(= )); + assertFalse(requirements.isRegistrationRequired()); + assertFalse(requirements.isRegistrationRequiredForFullDescription()); assertTrue(requirements.getRegistrationProperties().isEmpty()); assertNull(requirements.getPolicy()); } Modified: trunk/wsrp/src/main/org/jboss/portal/test/wsrp/other/Registration= PropertyDescriptionTestCase.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/wsrp/src/main/org/jboss/portal/test/wsrp/other/RegistrationProper= tyDescriptionTestCase.java 2007-10-02 00:01:43 UTC (rev 8506) +++ trunk/wsrp/src/main/org/jboss/portal/test/wsrp/other/RegistrationProper= tyDescriptionTestCase.java 2007-10-02 01:33:08 UTC (rev 8507) @@ -87,21 +87,21 @@ notifyCalled =3D false; } = - public boolean requiresRegistration() + public boolean isRegistrationRequired() { return false; } = - public void setRequiresRegistration(boolean requiresRegistration) + public void setRegistrationRequired(boolean requiresRegistration) { } = - public boolean fullServiceDescriptionRequiresRegistration() + public boolean isRegistrationRequiredForFullDescription() { return false; } = - public void setFullServiceDescriptionRequiresRegistration(boolean fu= llServiceDescriptionRequiresRegistration) + public void setRegistrationRequiredForFullDescription(boolean fullSe= rviceDescriptionRequiresRegistration) { } = @@ -171,5 +171,9 @@ { return null; } + + public void reloadPolicyFrom(String policyClassName, String validato= rClassName) + { + } } } Modified: trunk/wsrp/src/main/org/jboss/portal/test/wsrp/v1/producer/Releas= eSessionTestCase.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/wsrp/src/main/org/jboss/portal/test/wsrp/v1/producer/ReleaseSessi= onTestCase.java 2007-10-02 00:01:43 UTC (rev 8506) +++ trunk/wsrp/src/main/org/jboss/portal/test/wsrp/v1/producer/ReleaseSessi= onTestCase.java 2007-10-02 01:33:08 UTC (rev 8507) @@ -151,7 +151,7 @@ = } = - if (producer.getProducerRegistrationRequirements().requiresRegistrat= ion()) + if (producer.getProducerRegistrationRequirements().isRegistrationReq= uired()) { message.append(" | with registration required."); } Modified: trunk/wsrp/src/main/org/jboss/portal/test/wsrp/v1/producer/Servic= eDescriptionTestCase.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/wsrp/src/main/org/jboss/portal/test/wsrp/v1/producer/ServiceDescr= iptionTestCase.java 2007-10-02 00:01:43 UTC (rev 8506) +++ trunk/wsrp/src/main/org/jboss/portal/test/wsrp/v1/producer/ServiceDescr= iptionTestCase.java 2007-10-02 01:33:08 UTC (rev 8507) @@ -55,7 +55,7 @@ = public void testGetServiceDescriptionNotRequiringRegistration() throws = Throwable { - producer.getProducerRegistrationRequirements().setRequiresRegistrati= on(false); + producer.getProducerRegistrationRequirements().setRegistrationRequir= ed(false); = GetServiceDescription gs =3D getNoRegistrationServiceDescriptionRequ= est(); = Modified: trunk/wsrp/src/main/org/jboss/portal/test/wsrp/v1/producer/V1Prod= ucerBaseTest.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/wsrp/src/main/org/jboss/portal/test/wsrp/v1/producer/V1ProducerBa= seTest.java 2007-10-02 00:01:43 UTC (rev 8506) +++ trunk/wsrp/src/main/org/jboss/portal/test/wsrp/v1/producer/V1ProducerBa= seTest.java 2007-10-02 01:33:08 UTC (rev 8507) @@ -162,8 +162,8 @@ protected RegistrationPropertyDescription configureRegistrationSettings= (boolean provideUnregisteredFullDescription) { // define expected registration infos - producer.getProducerRegistrationRequirements().setRequiresRegistrati= on(true); - producer.getProducerRegistrationRequirements().setFullServiceDescrip= tionRequiresRegistration(provideUnregisteredFullDescription); + producer.getProducerRegistrationRequirements().setRegistrationRequir= ed(true); + producer.getProducerRegistrationRequirements().setRegistrationRequir= edForFullDescription(provideUnregisteredFullDescription); = // fix-me: http://jira.jboss.com/jira/browse/JBPORTAL-821 RegistrationPropertyDescription regProp =3D new RegistrationProperty= Description("regProp", @@ -176,7 +176,7 @@ = protected void resetRegistrationInfo() { - producer.getProducerRegistrationRequirements().setRequiresRegistrati= on(false); + producer.getProducerRegistrationRequirements().setRegistrationRequir= ed(false); producer.getProducerRegistrationRequirements().clearRegistrationProp= erties(); } = Modified: trunk/wsrp/src/main/org/jboss/portal/wsrp/producer/RegistrationHa= ndler.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/wsrp/src/main/org/jboss/portal/wsrp/producer/RegistrationHandler.= java 2007-10-02 00:01:43 UTC (rev 8506) +++ trunk/wsrp/src/main/org/jboss/portal/wsrp/producer/RegistrationHandler.= java 2007-10-02 01:33:08 UTC (rev 8507) @@ -227,7 +227,7 @@ { if (reg =3D=3D null) { - if (producer.getProducerRegistrationRequirements().requiresRegist= ration()) + if (producer.getProducerRegistrationRequirements().isRegistration= Required()) { log.debug("Registration is required yet no RegistrationContext= was provided: registration invalid!"); return false; @@ -257,7 +257,7 @@ */ Registration getRegistrationFrom(RegistrationContext registrationContex= t) { - if (producer.getProducerRegistrationRequirements().requiresRegistrat= ion()) + if (producer.getProducerRegistrationRequirements().isRegistrationReq= uired()) { if (registrationContext =3D=3D null) { Modified: trunk/wsrp/src/main/org/jboss/portal/wsrp/producer/ServiceDescrip= tionHandler.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/wsrp/src/main/org/jboss/portal/wsrp/producer/ServiceDescriptionHa= ndler.java 2007-10-02 00:01:43 UTC (rev 8506) +++ trunk/wsrp/src/main/org/jboss/portal/wsrp/producer/ServiceDescriptionHa= ndler.java 2007-10-02 01:33:08 UTC (rev 8507) @@ -83,11 +83,11 @@ ProducerRegistrationRequirements requirements =3D producer.getProduc= erRegistrationRequirements(); = PortletDescription[] offeredPortlets =3D null; - ServiceDescription serviceDescription =3D WSRPTypeFactory.createServ= iceDescription(requirements.requiresRegistration()); + ServiceDescription serviceDescription =3D WSRPTypeFactory.createServ= iceDescription(requirements.isRegistrationRequired()); serviceDescription.setRequiresInitCookie(BEA_8_CONSUMER_FIX); serviceDescription.setLocales(producer.getSupportedLocales()); = - if (!requirements.requiresRegistration()) + if (!requirements.isRegistrationRequired()) { offeredPortlets =3D getPortletDescriptions(gs.getDesiredLocales()= , null); } @@ -97,7 +97,7 @@ { log.debug("Unregistered consumer while registration is require= d. Sending registration information."); = - if (requirements.fullServiceDescriptionRequiresRegistration()) + if (requirements.isRegistrationRequiredForFullDescription()) { log.debug("Sending offered portlets description despite not= being registered, per Producer configuration."); offeredPortlets =3D getPortletDescriptions(gs.getDesiredLoc= ales(), null); Modified: trunk/wsrp/src/main/org/jboss/portal/wsrp/producer/WSRPProducerIm= pl.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/wsrp/src/main/org/jboss/portal/wsrp/producer/WSRPProducerImpl.jav= a 2007-10-02 00:01:43 UTC (rev 8506) +++ trunk/wsrp/src/main/org/jboss/portal/wsrp/producer/WSRPProducerImpl.jav= a 2007-10-02 01:33:08 UTC (rev 8507) @@ -273,7 +273,7 @@ super.startService(); producerConfiguration =3D configurationService.getConfiguration(); ProducerRegistrationRequirements registrationRequirements =3D getPro= ducerRegistrationRequirements(); - if (registrationRequirements.requiresRegistration()) + if (registrationRequirements.isRegistrationRequired()) { registrationManager.setPolicy(registrationRequirements.getPolicy(= )); registrationRequirements.addRegistrationPropertyChangeListeners(r= egistrationManager); @@ -283,7 +283,7 @@ protected void stopService() throws Exception { ProducerRegistrationRequirements registrationRequirements =3D getPro= ducerRegistrationRequirements(); - if (registrationRequirements.requiresRegistration()) + if (registrationRequirements.isRegistrationRequired()) { registrationRequirements.removeRegistrationPropertyChangeListener= (registrationManager); } Modified: trunk/wsrp/src/main/org/jboss/portal/wsrp/producer/config/Produce= rConfigurationFactory.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/wsrp/src/main/org/jboss/portal/wsrp/producer/config/ProducerConfi= gurationFactory.java 2007-10-02 00:01:43 UTC (rev 8506) +++ trunk/wsrp/src/main/org/jboss/portal/wsrp/producer/config/ProducerConfi= gurationFactory.java 2007-10-02 01:33:08 UTC (rev 8507) @@ -80,15 +80,15 @@ } = ProducerRegistrationRequirements registrationRequirements =3D new= ProducerRegistrationRequirementsImpl(); - registrationRequirements.setRequiresRegistration(true); + registrationRequirements.setRegistrationRequired(true); String descRequiresRegistration =3D attrs.getValue("fullServiceDe= scriptionRequiresRegistration"); if ("true".equals(descRequiresRegistration)) { - registrationRequirements.setFullServiceDescriptionRequiresRegi= stration(true); + registrationRequirements.setRegistrationRequiredForFullDescrip= tion(true); } else if (descRequiresRegistration =3D=3D null || "false".equals(d= escRequiresRegistration)) { - registrationRequirements.setFullServiceDescriptionRequiresRegi= stration(false); + registrationRequirements.setRegistrationRequiredForFullDescrip= tion(false); } else { Modified: trunk/wsrp/src/main/org/jboss/portal/wsrp/producer/config/Produce= rRegistrationRequirements.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/wsrp/src/main/org/jboss/portal/wsrp/producer/config/ProducerRegis= trationRequirements.java 2007-10-02 00:01:43 UTC (rev 8506) +++ trunk/wsrp/src/main/org/jboss/portal/wsrp/producer/config/ProducerRegis= trationRequirements.java 2007-10-02 01:33:08 UTC (rev 8507) @@ -37,14 +37,17 @@ */ public interface ProducerRegistrationRequirements { - boolean requiresRegistration(); + String DEFAULT_POLICY_CLASS_NAME =3D "org.jboss.portal.registration.pol= icies.DefaultRegistrationPolicy"; + String DEFAULT_VALIDATOR_CLASS_NAME =3D "org.jboss.portal.registration.= policies.DefaultRegistrationPropertyValidator"; = - void setRequiresRegistration(boolean requiresRegistration); + boolean isRegistrationRequired(); = - boolean fullServiceDescriptionRequiresRegistration(); + void setRegistrationRequired(boolean requiresRegistration); = - void setFullServiceDescriptionRequiresRegistration(boolean fullServiceD= escriptionRequiresRegistration); + boolean isRegistrationRequiredForFullDescription(); = + void setRegistrationRequiredForFullDescription(boolean fullServiceDescr= iptionRequiresRegistration); + Map getRegistrationProperties(); = void addRegistrationProperty(RegistrationPropertyDescription propertyDe= scription); @@ -74,4 +77,6 @@ void setPolicy(RegistrationPolicy policy); = RegistrationPolicy getPolicy(); + + void reloadPolicyFrom(String policyClassName, String validatorClassName= ); } Modified: trunk/wsrp/src/main/org/jboss/portal/wsrp/producer/config/impl/Pr= oducerRegistrationRequirementsImpl.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/wsrp/src/main/org/jboss/portal/wsrp/producer/config/impl/Producer= RegistrationRequirementsImpl.java 2007-10-02 00:01:43 UTC (rev 8506) +++ trunk/wsrp/src/main/org/jboss/portal/wsrp/producer/config/impl/Producer= RegistrationRequirementsImpl.java 2007-10-02 01:33:08 UTC (rev 8507) @@ -59,8 +59,6 @@ = /** property name (QName) -> PropertyDescription */ private Map registrationProperties; - public final static String DEFAULT_POLICY_CLASS_NAME =3D "org.jboss.por= tal.registration.policies.DefaultRegistrationPolicy"; - public final static String DEFAULT_VALIDATOR_CLASS_NAME =3D "org.jboss.= portal.registration.policies.DefaultRegistrationPropertyValidator"; = public ProducerRegistrationRequirementsImpl(boolean requiresMarshalling= , boolean requiresRegistration, boolean fullServiceDescriptionRequiresRegis= tration) { @@ -74,22 +72,22 @@ registrationProperties =3D new HashMap(7); } = - public boolean requiresRegistration() + public boolean isRegistrationRequired() { return requiresRegistration; } = - public void setRequiresRegistration(boolean requiresRegistration) + public void setRegistrationRequired(boolean requiresRegistration) { this.requiresRegistration =3D requiresRegistration; } = - public boolean fullServiceDescriptionRequiresRegistration() + public boolean isRegistrationRequiredForFullDescription() { return fullServiceDescriptionRequiresRegistration; } = - public void setFullServiceDescriptionRequiresRegistration(boolean fullS= erviceDescriptionRequiresRegistration) + public void setRegistrationRequiredForFullDescription(boolean fullServi= ceDescriptionRequiresRegistration) { this.fullServiceDescriptionRequiresRegistration =3D fullServiceDescr= iptionRequiresRegistration; } @@ -194,6 +192,10 @@ if (policy !=3D null) { policyClassName =3D policy.getClass().getName(); + if (DEFAULT_POLICY_CLASS_NAME.equals(policyClassName)) + { + validatorClassName =3D ((DefaultRegistrationPolicy)policy).get= Validator().getClass().getName(); + } } } = @@ -202,78 +204,84 @@ { if (policy =3D=3D null && requiresRegistration) { - if (policyClassName !=3D null) + reloadPolicyFrom(policyClassName, validatorClassName); + } + + return policy; + } + + public void reloadPolicyFrom(String policyClassName, String validatorCl= assName) + { + if (policyClassName !=3D null) + { + log.debug("Using registration policy: " + policyClassName); + ClassLoader loader =3D Thread.currentThread().getContextClassLoad= er(); + try { - log.debug("Using registration policy: " + policyClassName); + Class policyClass =3D loader.loadClass(policyClassName); + Class expectedInterface =3D loader.loadClass("org.jboss.portal= .registration.RegistrationPolicy"); + if (!expectedInterface.isAssignableFrom(policyClass)) + { + throw new IllegalArgumentException("Policy class does not i= mplement RegistrationPolicy!"); + } + RegistrationPolicy policy =3D (RegistrationPolicy)policyClass.= newInstance(); + setPolicy(policy); + } + catch (ClassNotFoundException e) + { + IllegalArgumentException iae =3D new IllegalArgumentException(= "Couldn't find policy class " + policyClassName + "."); + iae.initCause(e); + throw iae; + } + catch (Exception e) + { + IllegalArgumentException iae =3D new IllegalArgumentException(= "Couldn't instantiate policy class."); + iae.initCause(e); + throw iae; + } + } + else + { + log.debug("Using default registration policy: " + DEFAULT_POLICY_= CLASS_NAME); + RegistrationPropertyValidator validator; + if (validatorClassName !=3D null) + { + log.debug("Using registration property validator: " + validato= rClassName); ClassLoader loader =3D Thread.currentThread().getContextClassL= oader(); try { - Class policyClass =3D loader.loadClass(policyClassName); - Class expectedInterface =3D loader.loadClass("org.jboss.por= tal.registration.RegistrationPolicy"); - if (!expectedInterface.isAssignableFrom(policyClass)) + Class validatorClass =3D loader.loadClass(validatorClassNam= e); + Class expectedInterface =3D loader.loadClass("org.jboss.por= tal.registration.policies.RegistrationPropertyValidator"); + if (!expectedInterface.isAssignableFrom(validatorClass)) { - throw new IllegalArgumentException("Policy class does no= t implement RegistrationPolicy!"); + throw new IllegalArgumentException("Validator class does= not implement RegistrationPropertyValidator!"); } - RegistrationPolicy policy =3D (RegistrationPolicy)policyCla= ss.newInstance(); - setPolicy(policy); + validator =3D (RegistrationPropertyValidator)validatorClass= .newInstance(); } catch (ClassNotFoundException e) { - IllegalArgumentException iae =3D new IllegalArgumentExcepti= on("Couldn't find policy class " + policyClassName + "."); + IllegalArgumentException iae =3D new IllegalArgumentExcepti= on("Couldn't find validator class " + validatorClassName + "."); iae.initCause(e); throw iae; } catch (Exception e) { - IllegalArgumentException iae =3D new IllegalArgumentExcepti= on("Couldn't instantiate policy class."); + IllegalArgumentException iae =3D new IllegalArgumentExcepti= on("Couldn't instantiate validator class."); iae.initCause(e); throw iae; } } else { - log.debug("Using default registration policy: " + DEFAULT_POLI= CY_CLASS_NAME); - RegistrationPropertyValidator validator; - if (validatorClassName !=3D null) - { - log.debug("Using registration property validator: " + valid= atorClassName); - ClassLoader loader =3D Thread.currentThread().getContextCla= ssLoader(); - try - { - Class validatorClass =3D loader.loadClass(validatorClass= Name); - Class expectedInterface =3D loader.loadClass("org.jboss.= portal.registration.policies.RegistrationPropertyValidator"); - if (!expectedInterface.isAssignableFrom(validatorClass)) - { - throw new IllegalArgumentException("Validator class d= oes not implement RegistrationPropertyValidator!"); - } - validator =3D (RegistrationPropertyValidator)validatorCl= ass.newInstance(); - } - catch (ClassNotFoundException e) - { - IllegalArgumentException iae =3D new IllegalArgumentExce= ption("Couldn't find validator class " + validatorClassName + "."); - iae.initCause(e); - throw iae; - } - catch (Exception e) - { - IllegalArgumentException iae =3D new IllegalArgumentExce= ption("Couldn't instantiate validator class."); - iae.initCause(e); - throw iae; - } - } - else - { - log.debug("Using default registration property validator: "= + DEFAULT_VALIDATOR_CLASS_NAME); - validator =3D new DefaultRegistrationPropertyValidator(); - } + log.debug("Using default registration property validator: " + = DEFAULT_VALIDATOR_CLASS_NAME); + validator =3D new DefaultRegistrationPropertyValidator(); + } = = - policy =3D new DefaultRegistrationPolicy(); - ((DefaultRegistrationPolicy)policy).setValidator(validator); - } + DefaultRegistrationPolicy policy =3D new DefaultRegistrationPolic= y(); + policy.setValidator(validator); + setPolicy(policy); } - - return policy; } = = Deleted: trunk/wsrp/src/main/org/jboss/portal/wsrp/services/RMIInvokerServi= ceFactory.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/wsrp/src/main/org/jboss/portal/wsrp/services/RMIInvokerServiceFac= tory.java 2007-10-02 00:01:43 UTC (rev 8506) +++ trunk/wsrp/src/main/org/jboss/portal/wsrp/services/RMIInvokerServiceFac= tory.java 2007-10-02 01:33:08 UTC (rev 8507) @@ -1,91 +0,0 @@ -/*************************************************************************= ***** - * JBoss, a division of Red Hat = * - * Copyright 2006, Red Hat Middleware, LLC, and individual = * - * contributors as indicated by the @authors tag. See the = * - * copyright.txt in the distribution for a full listing of = * - * individual contributors. = * - * = * - * This is free software; you can redistribute it and/or modify it = * - * under the terms of the GNU Lesser General Public License as = * - * published by the Free Software Foundation; either version 2.1 of = * - * the License, or (at your option) any later version. = * - * = * - * This software is distributed in the hope that it will be useful, = * - * but WITHOUT ANY WARRANTY; without even the implied warranty of = * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU = * - * Lesser General Public License for more details. = * - * = * - * You should have received a copy of the GNU Lesser General Public = * - * License along with this software; if not, write to the Free = * - * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA = * - * 02110-1301 USA, or see the FSF site: http://www.fsf.org. = * - *************************************************************************= *****/ - -package org.jboss.portal.wsrp.services; - -import org.jboss.portal.wsrp.core.WSRP_v1_Markup_PortType; -import org.jboss.portal.wsrp.core.WSRP_v1_PortletManagement_PortType; -import org.jboss.portal.wsrp.core.WSRP_v1_Registration_PortType; -import org.jboss.portal.wsrp.core.WSRP_v1_ServiceDescription_PortType; - -import java.util.Properties; - -/** - * @author Chris Laprun - * @version $Revision$ - * @since 2.4 - */ -public class RMIInvokerServiceFactory extends AbstractJNDIServiceFactory -{ - public RMIInvokerServiceFactory() - { - portJNDIMapping =3D new Properties(); - portJNDIMapping.put(WSRP_v1_ServiceDescription_PortType.class.getNam= e(), "wsrp/invoker/ServiceDescriptionService"); - portJNDIMapping.put(WSRP_v1_Markup_PortType.class.getName(), "wsrp/i= nvoker/MarkupService"); - portJNDIMapping.put(WSRP_v1_Registration_PortType.class.getName(), "= wsrp/invoker/RegistrationService"); - portJNDIMapping.put(WSRP_v1_PortletManagement_PortType.class.getName= (), "wsrp/invoker/PortletManagementService"); - } - - - public boolean isAvailable() - { - return true; - } - - - public String getServiceDescriptionURL() - { - return null; - } - - public String getMarkupURL() - { - return null; - } - - public String getRegistrationURL() - { - return null; - } - - public String getPortletManagementURL() - { - return null; - } - - public void setServiceDescriptionURL(String serviceDescriptionURL) - { - } - - public void setMarkupURL(String markupURL) - { - } - - public void setRegistrationURL(String registrationURL) - { - } - - public void setPortletManagementURL(String portletManagementURL) - { - } -} Deleted: trunk/wsrp/src/main/org/jboss/portal/wsrp/services/SOAPInvokerServ= iceFactory.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/wsrp/src/main/org/jboss/portal/wsrp/services/SOAPInvokerServiceFa= ctory.java 2007-10-02 00:01:43 UTC (rev 8506) +++ trunk/wsrp/src/main/org/jboss/portal/wsrp/services/SOAPInvokerServiceFa= ctory.java 2007-10-02 01:33:08 UTC (rev 8507) @@ -1,132 +0,0 @@ -/*************************************************************************= ***** - * JBoss, a division of Red Hat = * - * Copyright 2006, Red Hat Middleware, LLC, and individual = * - * contributors as indicated by the @authors tag. See the = * - * copyright.txt in the distribution for a full listing of = * - * individual contributors. = * - * = * - * This is free software; you can redistribute it and/or modify it = * - * under the terms of the GNU Lesser General Public License as = * - * published by the Free Software Foundation; either version 2.1 of = * - * the License, or (at your option) any later version. = * - * = * - * This software is distributed in the hope that it will be useful, = * - * but WITHOUT ANY WARRANTY; without even the implied warranty of = * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU = * - * Lesser General Public License for more details. = * - * = * - * You should have received a copy of the GNU Lesser General Public = * - * License along with this software; if not, write to the Free = * - * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA = * - * 02110-1301 USA, or see the FSF site: http://www.fsf.org. = * - *************************************************************************= *****/ - -package org.jboss.portal.wsrp.services; - -import org.jboss.portal.common.util.ParameterValidation; -import org.jboss.portal.wsrp.core.WSRP_v1_Markup_PortType; -import org.jboss.portal.wsrp.core.WSRP_v1_PortletManagement_PortType; -import org.jboss.portal.wsrp.core.WSRP_v1_Registration_PortType; -import org.jboss.portal.wsrp.core.WSRP_v1_ServiceDescription_PortType; - -import javax.xml.rpc.Service; -import javax.xml.rpc.Stub; -import java.util.HashMap; -import java.util.Map; - -/** - * @author Chris Laprun - * @author Julien Viet - * @version $Revision$ - * @since 2.4 - */ -public class SOAPInvokerServiceFactory extends AbstractSOAPServiceFactory -{ - - /** . */ - private static final Map PORT_NAMES =3D new HashMap(); - - static - { - PORT_NAMES.put(WSRP_v1_ServiceDescription_PortType.class, "/ServiceD= escriptionService"); - PORT_NAMES.put(WSRP_v1_Markup_PortType.class, "/MarkupService"); - PORT_NAMES.put(WSRP_v1_Registration_PortType.class, "/RegistrationSe= rvice"); - PORT_NAMES.put(WSRP_v1_PortletManagement_PortType.class, "/PortletMa= nagementService"); - } - - /** . */ - private String endpointURL; - - public String getEndpointURL() - { - return endpointURL; - } - - public void setEndpointURL(String endpointURL) - { - ParameterValidation.throwIllegalArgExceptionIfNullOrEmpty(endpointUR= L, "Mandatory endpoint URL", null); - this.endpointURL =3D endpointURL; - } - - /** If retrieved object is of javax.xml.rpc.Service class, we're using = the WS stack and we need to get the port. */ - protected Object getStubFromService(Class serviceClass, Service service= ) throws Exception - { - log.debug("Unwrapping service " + service + " for class " + serviceC= lass); - Object stub =3D service.getPort(serviceClass); - - // - if (endpointURL !=3D null) - { - String portAddress =3D endpointURL + PORT_NAMES.get(serviceClass); - log.debug("Setting the end point to: " + portAddress); - ((Stub)stub)._setProperty(Stub.ENDPOINT_ADDRESS_PROPERTY, portAdd= ress); - } - return stub; - } - - - public boolean isAvailable() - { - return endpointURL !=3D null; - } - - public String getServiceDescriptionURL() - { - return endpointURL + PORT_NAMES.get(WSRP_v1_ServiceDescription_PortT= ype.class); - } - - public String getMarkupURL() - { - return endpointURL + PORT_NAMES.get(WSRP_v1_Markup_PortType.class); - } - - public String getRegistrationURL() - { - return endpointURL + PORT_NAMES.get(WSRP_v1_Registration_PortType.cl= ass); - } - - public String getPortletManagementURL() - { - return endpointURL + PORT_NAMES.get(WSRP_v1_PortletManagement_PortTy= pe.class); - } - - public void setServiceDescriptionURL(String serviceDescriptionURL) - { - throw new UnsupportedOperationException(); - } - - public void setMarkupURL(String markupURL) - { - throw new UnsupportedOperationException(); - } - - public void setRegistrationURL(String registrationURL) - { - throw new UnsupportedOperationException(); - } - - public void setPortletManagementURL(String portletManagementURL) - { - throw new UnsupportedOperationException(); - } -} --===============7708723372372281364==-- From portal-commits at lists.jboss.org Mon Oct 1 21:36:35 2007 Content-Type: multipart/mixed; boundary="===============6782504282957182806==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8508 - in branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal: test/wsrp/other and 5 other directories. Date: Mon, 01 Oct 2007 21:36:35 -0400 Message-ID: --===============6782504282957182806== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: chris.laprun(a)jboss.com Date: 2007-10-01 21:36:35 -0400 (Mon, 01 Oct 2007) New Revision: 8508 Removed: branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/wsrp/ser= vices/RMIInvokerServiceFactory.java branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/wsrp/ser= vices/SOAPInvokerServiceFactory.java Modified: branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/test/wsr= p/config/ProducerConfigurationTestCase.java branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/test/wsr= p/other/RegistrationPropertyDescriptionTestCase.java branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/test/wsr= p/v1/producer/ReleaseSessionTestCase.java branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/test/wsr= p/v1/producer/ServiceDescriptionTestCase.java branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/test/wsr= p/v1/producer/V1ProducerBaseTest.java branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/wsrp/pro= ducer/RegistrationHandler.java branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/wsrp/pro= ducer/ServiceDescriptionHandler.java branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/wsrp/pro= ducer/WSRPProducerImpl.java branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/wsrp/pro= ducer/config/ProducerConfigurationFactory.java branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/wsrp/pro= ducer/config/ProducerRegistrationRequirements.java branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/wsrp/pro= ducer/config/impl/ProducerRegistrationRequirementsImpl.java Log: - Renamed ProducerRegistrationRequirements.requiresRegistration to isRegist= rationRequired to follow Java Beans conventions. - Renamed ProducerRegistrationRequirements.fullServiceDescriptionRequiresRe= gistration to isRegistrationRequiredForFullDescription to follow Java Beans= conventions. - Removed unused classes. Modified: branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/t= est/wsrp/config/ProducerConfigurationTestCase.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/test/ws= rp/config/ProducerConfigurationTestCase.java 2007-10-02 01:33:08 UTC (rev 8= 507) +++ branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/test/ws= rp/config/ProducerConfigurationTestCase.java 2007-10-02 01:36:35 UTC (rev 8= 508) @@ -82,8 +82,8 @@ RegistrationPropertyValidator propertyValidator =3D ((DefaultRegistr= ationPolicy)policy).getValidator(); assertNotNull(propertyValidator); assertTrue(propertyValidator instanceof DefaultRegistrationPropertyV= alidator); - assertTrue(requirements.requiresRegistration()); - assertTrue(requirements.fullServiceDescriptionRequiresRegistration()= ); + assertTrue(requirements.isRegistrationRequired()); + assertTrue(requirements.isRegistrationRequiredForFullDescription()); Map properties =3D requirements.getRegistrationProperties(); assertNotNull(properties); assertEquals(2, properties.size()); @@ -97,8 +97,8 @@ ProducerConfiguration producerConfiguration =3D getProducerConfigura= tion("minimal-registration.xml"); ProducerRegistrationRequirements requirements =3D producerConfigurat= ion.getRegistrationRequirements(); assertNotNull(requirements); - assertTrue(requirements.requiresRegistration()); - assertTrue(!requirements.fullServiceDescriptionRequiresRegistration(= )); + assertTrue(requirements.isRegistrationRequired()); + assertTrue(!requirements.isRegistrationRequiredForFullDescription()); Map properties =3D requirements.getRegistrationProperties(); assertNotNull(properties); assertTrue(properties.isEmpty()); @@ -110,8 +110,8 @@ ProducerConfiguration producerConfiguration =3D getProducerConfigura= tion("minimal.xml"); ProducerRegistrationRequirements requirements =3D producerConfigurat= ion.getRegistrationRequirements(); assertNotNull(requirements); - assertFalse(requirements.requiresRegistration()); - assertFalse(requirements.fullServiceDescriptionRequiresRegistration(= )); + assertFalse(requirements.isRegistrationRequired()); + assertFalse(requirements.isRegistrationRequiredForFullDescription()); assertTrue(requirements.getRegistrationProperties().isEmpty()); assertNull(requirements.getPolicy()); } Modified: branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/t= est/wsrp/other/RegistrationPropertyDescriptionTestCase.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/test/ws= rp/other/RegistrationPropertyDescriptionTestCase.java 2007-10-02 01:33:08 U= TC (rev 8507) +++ branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/test/ws= rp/other/RegistrationPropertyDescriptionTestCase.java 2007-10-02 01:36:35 U= TC (rev 8508) @@ -87,21 +87,21 @@ notifyCalled =3D false; } = - public boolean requiresRegistration() + public boolean isRegistrationRequired() { return false; } = - public void setRequiresRegistration(boolean requiresRegistration) + public void setRegistrationRequired(boolean requiresRegistration) { } = - public boolean fullServiceDescriptionRequiresRegistration() + public boolean isRegistrationRequiredForFullDescription() { return false; } = - public void setFullServiceDescriptionRequiresRegistration(boolean fu= llServiceDescriptionRequiresRegistration) + public void setRegistrationRequiredForFullDescription(boolean fullSe= rviceDescriptionRequiresRegistration) { } = @@ -171,5 +171,9 @@ { return null; } + + public void reloadPolicyFrom(String policyClassName, String validato= rClassName) + { + } } } Modified: branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/t= est/wsrp/v1/producer/ReleaseSessionTestCase.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/test/ws= rp/v1/producer/ReleaseSessionTestCase.java 2007-10-02 01:33:08 UTC (rev 850= 7) +++ branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/test/ws= rp/v1/producer/ReleaseSessionTestCase.java 2007-10-02 01:36:35 UTC (rev 850= 8) @@ -151,7 +151,7 @@ = } = - if (producer.getProducerRegistrationRequirements().requiresRegistrat= ion()) + if (producer.getProducerRegistrationRequirements().isRegistrationReq= uired()) { message.append(" | with registration required."); } Modified: branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/t= est/wsrp/v1/producer/ServiceDescriptionTestCase.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/test/ws= rp/v1/producer/ServiceDescriptionTestCase.java 2007-10-02 01:33:08 UTC (rev= 8507) +++ branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/test/ws= rp/v1/producer/ServiceDescriptionTestCase.java 2007-10-02 01:36:35 UTC (rev= 8508) @@ -55,7 +55,7 @@ = public void testGetServiceDescriptionNotRequiringRegistration() throws = Throwable { - producer.getProducerRegistrationRequirements().setRequiresRegistrati= on(false); + producer.getProducerRegistrationRequirements().setRegistrationRequir= ed(false); = GetServiceDescription gs =3D getNoRegistrationServiceDescriptionRequ= est(); = Modified: branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/t= est/wsrp/v1/producer/V1ProducerBaseTest.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/test/ws= rp/v1/producer/V1ProducerBaseTest.java 2007-10-02 01:33:08 UTC (rev 8507) +++ branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/test/ws= rp/v1/producer/V1ProducerBaseTest.java 2007-10-02 01:36:35 UTC (rev 8508) @@ -162,8 +162,8 @@ protected RegistrationPropertyDescription configureRegistrationSettings= (boolean provideUnregisteredFullDescription) { // define expected registration infos - producer.getProducerRegistrationRequirements().setRequiresRegistrati= on(true); - producer.getProducerRegistrationRequirements().setFullServiceDescrip= tionRequiresRegistration(provideUnregisteredFullDescription); + producer.getProducerRegistrationRequirements().setRegistrationRequir= ed(true); + producer.getProducerRegistrationRequirements().setRegistrationRequir= edForFullDescription(provideUnregisteredFullDescription); = // fix-me: http://jira.jboss.com/jira/browse/JBPORTAL-821 RegistrationPropertyDescription regProp =3D new RegistrationProperty= Description("regProp", @@ -176,7 +176,7 @@ = protected void resetRegistrationInfo() { - producer.getProducerRegistrationRequirements().setRequiresRegistrati= on(false); + producer.getProducerRegistrationRequirements().setRegistrationRequir= ed(false); producer.getProducerRegistrationRequirements().clearRegistrationProp= erties(); } = Modified: branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/w= srp/producer/RegistrationHandler.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/wsrp/pr= oducer/RegistrationHandler.java 2007-10-02 01:33:08 UTC (rev 8507) +++ branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/wsrp/pr= oducer/RegistrationHandler.java 2007-10-02 01:36:35 UTC (rev 8508) @@ -227,7 +227,7 @@ { if (reg =3D=3D null) { - if (producer.getProducerRegistrationRequirements().requiresRegist= ration()) + if (producer.getProducerRegistrationRequirements().isRegistration= Required()) { log.debug("Registration is required yet no RegistrationContext= was provided: registration invalid!"); return false; @@ -257,7 +257,7 @@ */ Registration getRegistrationFrom(RegistrationContext registrationContex= t) { - if (producer.getProducerRegistrationRequirements().requiresRegistrat= ion()) + if (producer.getProducerRegistrationRequirements().isRegistrationReq= uired()) { if (registrationContext =3D=3D null) { Modified: branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/w= srp/producer/ServiceDescriptionHandler.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/wsrp/pr= oducer/ServiceDescriptionHandler.java 2007-10-02 01:33:08 UTC (rev 8507) +++ branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/wsrp/pr= oducer/ServiceDescriptionHandler.java 2007-10-02 01:36:35 UTC (rev 8508) @@ -83,11 +83,11 @@ ProducerRegistrationRequirements requirements =3D producer.getProduc= erRegistrationRequirements(); = PortletDescription[] offeredPortlets =3D null; - ServiceDescription serviceDescription =3D WSRPTypeFactory.createServ= iceDescription(requirements.requiresRegistration()); + ServiceDescription serviceDescription =3D WSRPTypeFactory.createServ= iceDescription(requirements.isRegistrationRequired()); serviceDescription.setRequiresInitCookie(BEA_8_CONSUMER_FIX); serviceDescription.setLocales(producer.getSupportedLocales()); = - if (!requirements.requiresRegistration()) + if (!requirements.isRegistrationRequired()) { offeredPortlets =3D getPortletDescriptions(gs.getDesiredLocales()= , null); } @@ -97,7 +97,7 @@ { log.debug("Unregistered consumer while registration is require= d. Sending registration information."); = - if (requirements.fullServiceDescriptionRequiresRegistration()) + if (requirements.isRegistrationRequiredForFullDescription()) { log.debug("Sending offered portlets description despite not= being registered, per Producer configuration."); offeredPortlets =3D getPortletDescriptions(gs.getDesiredLoc= ales(), null); Modified: branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/w= srp/producer/WSRPProducerImpl.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/wsrp/pr= oducer/WSRPProducerImpl.java 2007-10-02 01:33:08 UTC (rev 8507) +++ branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/wsrp/pr= oducer/WSRPProducerImpl.java 2007-10-02 01:36:35 UTC (rev 8508) @@ -273,7 +273,7 @@ super.startService(); producerConfiguration =3D configurationService.getConfiguration(); ProducerRegistrationRequirements registrationRequirements =3D getPro= ducerRegistrationRequirements(); - if (registrationRequirements.requiresRegistration()) + if (registrationRequirements.isRegistrationRequired()) { registrationManager.setPolicy(registrationRequirements.getPolicy(= )); registrationRequirements.addRegistrationPropertyChangeListeners(r= egistrationManager); @@ -283,7 +283,7 @@ protected void stopService() throws Exception { ProducerRegistrationRequirements registrationRequirements =3D getPro= ducerRegistrationRequirements(); - if (registrationRequirements.requiresRegistration()) + if (registrationRequirements.isRegistrationRequired()) { registrationRequirements.removeRegistrationPropertyChangeListener= (registrationManager); } Modified: branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/w= srp/producer/config/ProducerConfigurationFactory.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/wsrp/pr= oducer/config/ProducerConfigurationFactory.java 2007-10-02 01:33:08 UTC (re= v 8507) +++ branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/wsrp/pr= oducer/config/ProducerConfigurationFactory.java 2007-10-02 01:36:35 UTC (re= v 8508) @@ -80,15 +80,15 @@ } = ProducerRegistrationRequirements registrationRequirements =3D new= ProducerRegistrationRequirementsImpl(); - registrationRequirements.setRequiresRegistration(true); + registrationRequirements.setRegistrationRequired(true); String descRequiresRegistration =3D attrs.getValue("fullServiceDe= scriptionRequiresRegistration"); if ("true".equals(descRequiresRegistration)) { - registrationRequirements.setFullServiceDescriptionRequiresRegi= stration(true); + registrationRequirements.setRegistrationRequiredForFullDescrip= tion(true); } else if (descRequiresRegistration =3D=3D null || "false".equals(d= escRequiresRegistration)) { - registrationRequirements.setFullServiceDescriptionRequiresRegi= stration(false); + registrationRequirements.setRegistrationRequiredForFullDescrip= tion(false); } else { Modified: branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/w= srp/producer/config/ProducerRegistrationRequirements.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/wsrp/pr= oducer/config/ProducerRegistrationRequirements.java 2007-10-02 01:33:08 UTC= (rev 8507) +++ branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/wsrp/pr= oducer/config/ProducerRegistrationRequirements.java 2007-10-02 01:36:35 UTC= (rev 8508) @@ -37,14 +37,17 @@ */ public interface ProducerRegistrationRequirements { - boolean requiresRegistration(); + String DEFAULT_POLICY_CLASS_NAME =3D "org.jboss.portal.registration.pol= icies.DefaultRegistrationPolicy"; + String DEFAULT_VALIDATOR_CLASS_NAME =3D "org.jboss.portal.registration.= policies.DefaultRegistrationPropertyValidator"; = - void setRequiresRegistration(boolean requiresRegistration); + boolean isRegistrationRequired(); = - boolean fullServiceDescriptionRequiresRegistration(); + void setRegistrationRequired(boolean requiresRegistration); = - void setFullServiceDescriptionRequiresRegistration(boolean fullServiceD= escriptionRequiresRegistration); + boolean isRegistrationRequiredForFullDescription(); = + void setRegistrationRequiredForFullDescription(boolean fullServiceDescr= iptionRequiresRegistration); + Map getRegistrationProperties(); = void addRegistrationProperty(RegistrationPropertyDescription propertyDe= scription); @@ -74,4 +77,6 @@ void setPolicy(RegistrationPolicy policy); = RegistrationPolicy getPolicy(); + + void reloadPolicyFrom(String policyClassName, String validatorClassName= ); } Modified: branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/w= srp/producer/config/impl/ProducerRegistrationRequirementsImpl.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/wsrp/pr= oducer/config/impl/ProducerRegistrationRequirementsImpl.java 2007-10-02 01:= 33:08 UTC (rev 8507) +++ branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/wsrp/pr= oducer/config/impl/ProducerRegistrationRequirementsImpl.java 2007-10-02 01:= 36:35 UTC (rev 8508) @@ -59,8 +59,6 @@ = /** property name (QName) -> PropertyDescription */ private Map registrationProperties; - public final static String DEFAULT_POLICY_CLASS_NAME =3D "org.jboss.por= tal.registration.policies.DefaultRegistrationPolicy"; - public final static String DEFAULT_VALIDATOR_CLASS_NAME =3D "org.jboss.= portal.registration.policies.DefaultRegistrationPropertyValidator"; = public ProducerRegistrationRequirementsImpl(boolean requiresMarshalling= , boolean requiresRegistration, boolean fullServiceDescriptionRequiresRegis= tration) { @@ -74,22 +72,22 @@ registrationProperties =3D new HashMap(7); } = - public boolean requiresRegistration() + public boolean isRegistrationRequired() { return requiresRegistration; } = - public void setRequiresRegistration(boolean requiresRegistration) + public void setRegistrationRequired(boolean requiresRegistration) { this.requiresRegistration =3D requiresRegistration; } = - public boolean fullServiceDescriptionRequiresRegistration() + public boolean isRegistrationRequiredForFullDescription() { return fullServiceDescriptionRequiresRegistration; } = - public void setFullServiceDescriptionRequiresRegistration(boolean fullS= erviceDescriptionRequiresRegistration) + public void setRegistrationRequiredForFullDescription(boolean fullServi= ceDescriptionRequiresRegistration) { this.fullServiceDescriptionRequiresRegistration =3D fullServiceDescr= iptionRequiresRegistration; } @@ -194,6 +192,10 @@ if (policy !=3D null) { policyClassName =3D policy.getClass().getName(); + if (DEFAULT_POLICY_CLASS_NAME.equals(policyClassName)) + { + validatorClassName =3D ((DefaultRegistrationPolicy)policy).get= Validator().getClass().getName(); + } } } = @@ -202,78 +204,84 @@ { if (policy =3D=3D null && requiresRegistration) { - if (policyClassName !=3D null) + reloadPolicyFrom(policyClassName, validatorClassName); + } + + return policy; + } + + public void reloadPolicyFrom(String policyClassName, String validatorCl= assName) + { + if (policyClassName !=3D null) + { + log.debug("Using registration policy: " + policyClassName); + ClassLoader loader =3D Thread.currentThread().getContextClassLoad= er(); + try { - log.debug("Using registration policy: " + policyClassName); + Class policyClass =3D loader.loadClass(policyClassName); + Class expectedInterface =3D loader.loadClass("org.jboss.portal= .registration.RegistrationPolicy"); + if (!expectedInterface.isAssignableFrom(policyClass)) + { + throw new IllegalArgumentException("Policy class does not i= mplement RegistrationPolicy!"); + } + RegistrationPolicy policy =3D (RegistrationPolicy)policyClass.= newInstance(); + setPolicy(policy); + } + catch (ClassNotFoundException e) + { + IllegalArgumentException iae =3D new IllegalArgumentException(= "Couldn't find policy class " + policyClassName + "."); + iae.initCause(e); + throw iae; + } + catch (Exception e) + { + IllegalArgumentException iae =3D new IllegalArgumentException(= "Couldn't instantiate policy class."); + iae.initCause(e); + throw iae; + } + } + else + { + log.debug("Using default registration policy: " + DEFAULT_POLICY_= CLASS_NAME); + RegistrationPropertyValidator validator; + if (validatorClassName !=3D null) + { + log.debug("Using registration property validator: " + validato= rClassName); ClassLoader loader =3D Thread.currentThread().getContextClassL= oader(); try { - Class policyClass =3D loader.loadClass(policyClassName); - Class expectedInterface =3D loader.loadClass("org.jboss.por= tal.registration.RegistrationPolicy"); - if (!expectedInterface.isAssignableFrom(policyClass)) + Class validatorClass =3D loader.loadClass(validatorClassNam= e); + Class expectedInterface =3D loader.loadClass("org.jboss.por= tal.registration.policies.RegistrationPropertyValidator"); + if (!expectedInterface.isAssignableFrom(validatorClass)) { - throw new IllegalArgumentException("Policy class does no= t implement RegistrationPolicy!"); + throw new IllegalArgumentException("Validator class does= not implement RegistrationPropertyValidator!"); } - RegistrationPolicy policy =3D (RegistrationPolicy)policyCla= ss.newInstance(); - setPolicy(policy); + validator =3D (RegistrationPropertyValidator)validatorClass= .newInstance(); } catch (ClassNotFoundException e) { - IllegalArgumentException iae =3D new IllegalArgumentExcepti= on("Couldn't find policy class " + policyClassName + "."); + IllegalArgumentException iae =3D new IllegalArgumentExcepti= on("Couldn't find validator class " + validatorClassName + "."); iae.initCause(e); throw iae; } catch (Exception e) { - IllegalArgumentException iae =3D new IllegalArgumentExcepti= on("Couldn't instantiate policy class."); + IllegalArgumentException iae =3D new IllegalArgumentExcepti= on("Couldn't instantiate validator class."); iae.initCause(e); throw iae; } } else { - log.debug("Using default registration policy: " + DEFAULT_POLI= CY_CLASS_NAME); - RegistrationPropertyValidator validator; - if (validatorClassName !=3D null) - { - log.debug("Using registration property validator: " + valid= atorClassName); - ClassLoader loader =3D Thread.currentThread().getContextCla= ssLoader(); - try - { - Class validatorClass =3D loader.loadClass(validatorClass= Name); - Class expectedInterface =3D loader.loadClass("org.jboss.= portal.registration.policies.RegistrationPropertyValidator"); - if (!expectedInterface.isAssignableFrom(validatorClass)) - { - throw new IllegalArgumentException("Validator class d= oes not implement RegistrationPropertyValidator!"); - } - validator =3D (RegistrationPropertyValidator)validatorCl= ass.newInstance(); - } - catch (ClassNotFoundException e) - { - IllegalArgumentException iae =3D new IllegalArgumentExce= ption("Couldn't find validator class " + validatorClassName + "."); - iae.initCause(e); - throw iae; - } - catch (Exception e) - { - IllegalArgumentException iae =3D new IllegalArgumentExce= ption("Couldn't instantiate validator class."); - iae.initCause(e); - throw iae; - } - } - else - { - log.debug("Using default registration property validator: "= + DEFAULT_VALIDATOR_CLASS_NAME); - validator =3D new DefaultRegistrationPropertyValidator(); - } + log.debug("Using default registration property validator: " + = DEFAULT_VALIDATOR_CLASS_NAME); + validator =3D new DefaultRegistrationPropertyValidator(); + } = = - policy =3D new DefaultRegistrationPolicy(); - ((DefaultRegistrationPolicy)policy).setValidator(validator); - } + DefaultRegistrationPolicy policy =3D new DefaultRegistrationPolic= y(); + policy.setValidator(validator); + setPolicy(policy); } - - return policy; } = = Deleted: branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/ws= rp/services/RMIInvokerServiceFactory.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/wsrp/se= rvices/RMIInvokerServiceFactory.java 2007-10-02 01:33:08 UTC (rev 8507) +++ branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/wsrp/se= rvices/RMIInvokerServiceFactory.java 2007-10-02 01:36:35 UTC (rev 8508) @@ -1,91 +0,0 @@ -/*************************************************************************= ***** - * JBoss, a division of Red Hat = * - * Copyright 2006, Red Hat Middleware, LLC, and individual = * - * contributors as indicated by the @authors tag. See the = * - * copyright.txt in the distribution for a full listing of = * - * individual contributors. = * - * = * - * This is free software; you can redistribute it and/or modify it = * - * under the terms of the GNU Lesser General Public License as = * - * published by the Free Software Foundation; either version 2.1 of = * - * the License, or (at your option) any later version. = * - * = * - * This software is distributed in the hope that it will be useful, = * - * but WITHOUT ANY WARRANTY; without even the implied warranty of = * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU = * - * Lesser General Public License for more details. = * - * = * - * You should have received a copy of the GNU Lesser General Public = * - * License along with this software; if not, write to the Free = * - * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA = * - * 02110-1301 USA, or see the FSF site: http://www.fsf.org. = * - *************************************************************************= *****/ - -package org.jboss.portal.wsrp.services; - -import org.jboss.portal.wsrp.core.WSRP_v1_Markup_PortType; -import org.jboss.portal.wsrp.core.WSRP_v1_PortletManagement_PortType; -import org.jboss.portal.wsrp.core.WSRP_v1_Registration_PortType; -import org.jboss.portal.wsrp.core.WSRP_v1_ServiceDescription_PortType; - -import java.util.Properties; - -/** - * @author Chris Laprun - * @version $Revision$ - * @since 2.4 - */ -public class RMIInvokerServiceFactory extends AbstractJNDIServiceFactory -{ - public RMIInvokerServiceFactory() - { - portJNDIMapping =3D new Properties(); - portJNDIMapping.put(WSRP_v1_ServiceDescription_PortType.class.getNam= e(), "wsrp/invoker/ServiceDescriptionService"); - portJNDIMapping.put(WSRP_v1_Markup_PortType.class.getName(), "wsrp/i= nvoker/MarkupService"); - portJNDIMapping.put(WSRP_v1_Registration_PortType.class.getName(), "= wsrp/invoker/RegistrationService"); - portJNDIMapping.put(WSRP_v1_PortletManagement_PortType.class.getName= (), "wsrp/invoker/PortletManagementService"); - } - - - public boolean isAvailable() - { - return true; - } - - - public String getServiceDescriptionURL() - { - return null; - } - - public String getMarkupURL() - { - return null; - } - - public String getRegistrationURL() - { - return null; - } - - public String getPortletManagementURL() - { - return null; - } - - public void setServiceDescriptionURL(String serviceDescriptionURL) - { - } - - public void setMarkupURL(String markupURL) - { - } - - public void setRegistrationURL(String registrationURL) - { - } - - public void setPortletManagementURL(String portletManagementURL) - { - } -} Deleted: branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/ws= rp/services/SOAPInvokerServiceFactory.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/wsrp/se= rvices/SOAPInvokerServiceFactory.java 2007-10-02 01:33:08 UTC (rev 8507) +++ branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/wsrp/se= rvices/SOAPInvokerServiceFactory.java 2007-10-02 01:36:35 UTC (rev 8508) @@ -1,132 +0,0 @@ -/*************************************************************************= ***** - * JBoss, a division of Red Hat = * - * Copyright 2006, Red Hat Middleware, LLC, and individual = * - * contributors as indicated by the @authors tag. See the = * - * copyright.txt in the distribution for a full listing of = * - * individual contributors. = * - * = * - * This is free software; you can redistribute it and/or modify it = * - * under the terms of the GNU Lesser General Public License as = * - * published by the Free Software Foundation; either version 2.1 of = * - * the License, or (at your option) any later version. = * - * = * - * This software is distributed in the hope that it will be useful, = * - * but WITHOUT ANY WARRANTY; without even the implied warranty of = * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU = * - * Lesser General Public License for more details. = * - * = * - * You should have received a copy of the GNU Lesser General Public = * - * License along with this software; if not, write to the Free = * - * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA = * - * 02110-1301 USA, or see the FSF site: http://www.fsf.org. = * - *************************************************************************= *****/ - -package org.jboss.portal.wsrp.services; - -import org.jboss.portal.common.util.ParameterValidation; -import org.jboss.portal.wsrp.core.WSRP_v1_Markup_PortType; -import org.jboss.portal.wsrp.core.WSRP_v1_PortletManagement_PortType; -import org.jboss.portal.wsrp.core.WSRP_v1_Registration_PortType; -import org.jboss.portal.wsrp.core.WSRP_v1_ServiceDescription_PortType; - -import javax.xml.rpc.Service; -import javax.xml.rpc.Stub; -import java.util.HashMap; -import java.util.Map; - -/** - * @author Chris Laprun - * @author Julien Viet - * @version $Revision$ - * @since 2.4 - */ -public class SOAPInvokerServiceFactory extends AbstractSOAPServiceFactory -{ - - /** . */ - private static final Map PORT_NAMES =3D new HashMap(); - - static - { - PORT_NAMES.put(WSRP_v1_ServiceDescription_PortType.class, "/ServiceD= escriptionService"); - PORT_NAMES.put(WSRP_v1_Markup_PortType.class, "/MarkupService"); - PORT_NAMES.put(WSRP_v1_Registration_PortType.class, "/RegistrationSe= rvice"); - PORT_NAMES.put(WSRP_v1_PortletManagement_PortType.class, "/PortletMa= nagementService"); - } - - /** . */ - private String endpointURL; - - public String getEndpointURL() - { - return endpointURL; - } - - public void setEndpointURL(String endpointURL) - { - ParameterValidation.throwIllegalArgExceptionIfNullOrEmpty(endpointUR= L, "Mandatory endpoint URL", null); - this.endpointURL =3D endpointURL; - } - - /** If retrieved object is of javax.xml.rpc.Service class, we're using = the WS stack and we need to get the port. */ - protected Object getStubFromService(Class serviceClass, Service service= ) throws Exception - { - log.debug("Unwrapping service " + service + " for class " + serviceC= lass); - Object stub =3D service.getPort(serviceClass); - - // - if (endpointURL !=3D null) - { - String portAddress =3D endpointURL + PORT_NAMES.get(serviceClass); - log.debug("Setting the end point to: " + portAddress); - ((Stub)stub)._setProperty(Stub.ENDPOINT_ADDRESS_PROPERTY, portAdd= ress); - } - return stub; - } - - - public boolean isAvailable() - { - return endpointURL !=3D null; - } - - public String getServiceDescriptionURL() - { - return endpointURL + PORT_NAMES.get(WSRP_v1_ServiceDescription_PortT= ype.class); - } - - public String getMarkupURL() - { - return endpointURL + PORT_NAMES.get(WSRP_v1_Markup_PortType.class); - } - - public String getRegistrationURL() - { - return endpointURL + PORT_NAMES.get(WSRP_v1_Registration_PortType.cl= ass); - } - - public String getPortletManagementURL() - { - return endpointURL + PORT_NAMES.get(WSRP_v1_PortletManagement_PortTy= pe.class); - } - - public void setServiceDescriptionURL(String serviceDescriptionURL) - { - throw new UnsupportedOperationException(); - } - - public void setMarkupURL(String markupURL) - { - throw new UnsupportedOperationException(); - } - - public void setRegistrationURL(String registrationURL) - { - throw new UnsupportedOperationException(); - } - - public void setPortletManagementURL(String portletManagementURL) - { - throw new UnsupportedOperationException(); - } -} --===============6782504282957182806==-- From portal-commits at lists.jboss.org Mon Oct 1 21:40:40 2007 Content-Type: multipart/mixed; boundary="===============8781614432143615900==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8509 - in trunk/core-wsrp/src: resources/portal-wsrp-admin-war and 2 other directories. Date: Mon, 01 Oct 2007 21:40:40 -0400 Message-ID: --===============8781614432143615900== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: chris.laprun(a)jboss.com Date: 2007-10-01 21:40:39 -0400 (Mon, 01 Oct 2007) New Revision: 8509 Added: trunk/core-wsrp/src/main/org/jboss/portal/wsrp/admin/ui/LocalizedStringC= onverter.java trunk/core-wsrp/src/main/org/jboss/portal/wsrp/admin/ui/ProducerBean.java Modified: trunk/core-wsrp/src/resources/portal-wsrp-admin-war/WEB-INF/faces-config= .xml trunk/core-wsrp/src/resources/portal-wsrp-admin-war/WEB-INF/jboss-portle= t.xml trunk/core-wsrp/src/resources/portal-wsrp-admin-war/WEB-INF/jsf/producer= .xhtml trunk/core-wsrp/src/resources/portal-wsrp-admin-war/WEB-INF/portlet-inst= ances.xml trunk/core-wsrp/src/resources/portal-wsrp-admin-war/WEB-INF/portlet.xml trunk/core-wsrp/src/resources/portal-wsrp-admin-war/WEB-INF/wsrp-object.= xml trunk/core-wsrp/src/resources/portal-wsrp-admin-war/style.css Log: - JBPORTAL-1715: first pass at producer configuration, read-only for now. - Renamed WSRP admin portlet (and related objects) to WSRPConfigurationPort= let (and related) as it deals with more than just consumers now. Added: trunk/core-wsrp/src/main/org/jboss/portal/wsrp/admin/ui/LocalizedStr= ingConverter.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/core-wsrp/src/main/org/jboss/portal/wsrp/admin/ui/LocalizedString= Converter.java (rev 0) +++ trunk/core-wsrp/src/main/org/jboss/portal/wsrp/admin/ui/LocalizedString= Converter.java 2007-10-02 01:40:39 UTC (rev 8509) @@ -0,0 +1,48 @@ +/*************************************************************************= ***** + * JBoss, a division of Red Hat = * + * Copyright 2007, Red Hat Middleware, LLC, and individual = * + * contributors as indicated by the @authors tag. See the = * + * copyright.txt in the distribution for a full listing of = * + * individual contributors. = * + * = * + * This is free software; you can redistribute it and/or modify it = * + * under the terms of the GNU Lesser General Public License as = * + * published by the Free Software Foundation; either version 2.1 of = * + * the License, or (at your option) any later version. = * + * = * + * This software is distributed in the hope that it will be useful, = * + * but WITHOUT ANY WARRANTY; without even the implied warranty of = * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU = * + * Lesser General Public License for more details. = * + * = * + * You should have received a copy of the GNU Lesser General Public = * + * License along with this software; if not, write to the Free = * + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA = * + * 02110-1301 USA, or see the FSF site: http://www.fsf.org. = * + *************************************************************************= *****/ + +package org.jboss.portal.wsrp.admin.ui; + +import org.jboss.portal.wsrp.registration.LocalizedString; + +import javax.faces.component.UIComponent; +import javax.faces.context.FacesContext; +import javax.faces.convert.Converter; + +/** + * @author Chris Laprun + * @version $Revision$ + * @since 2.6.3 + */ +public class LocalizedStringConverter implements Converter +{ + public Object getAsObject(FacesContext facesContext, UIComponent uiComp= onent, String s) + { + return s =3D=3D null ? null : new LocalizedString(s); + } + + public String getAsString(FacesContext facesContext, UIComponent uiComp= onent, Object o) + { + return o =3D=3D null ? null : ((LocalizedString)o).getValue(); + } +} Property changes on: trunk/core-wsrp/src/main/org/jboss/portal/wsrp/admin/u= i/LocalizedStringConverter.java ___________________________________________________________________ Name: svn:keywords + Author Date Id Revision Name: svn:eol-style + native Added: trunk/core-wsrp/src/main/org/jboss/portal/wsrp/admin/ui/ProducerBean= .java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/core-wsrp/src/main/org/jboss/portal/wsrp/admin/ui/ProducerBean.ja= va (rev 0) +++ trunk/core-wsrp/src/main/org/jboss/portal/wsrp/admin/ui/ProducerBean.ja= va 2007-10-02 01:40:39 UTC (rev 8509) @@ -0,0 +1,142 @@ +/*************************************************************************= ***** + * JBoss, a division of Red Hat = * + * Copyright 2007, Red Hat Middleware, LLC, and individual = * + * contributors as indicated by the @authors tag. See the = * + * copyright.txt in the distribution for a full listing of = * + * individual contributors. = * + * = * + * This is free software; you can redistribute it and/or modify it = * + * under the terms of the GNU Lesser General Public License as = * + * published by the Free Software Foundation; either version 2.1 of = * + * the License, or (at your option) any later version. = * + * = * + * This software is distributed in the hope that it will be useful, = * + * but WITHOUT ANY WARRANTY; without even the implied warranty of = * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU = * + * Lesser General Public License for more details. = * + * = * + * You should have received a copy of the GNU Lesser General Public = * + * License along with this software; if not, write to the Free = * + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA = * + * 02110-1301 USA, or see the FSF site: http://www.fsf.org. = * + *************************************************************************= *****/ + +package org.jboss.portal.wsrp.admin.ui; + +import org.jboss.portal.registration.RegistrationPolicy; +import org.jboss.portal.registration.policies.DefaultRegistrationPolicy; +import org.jboss.portal.wsrp.producer.config.ProducerConfiguration; +import org.jboss.portal.wsrp.producer.config.ProducerRegistrationRequireme= nts; +import org.jboss.portal.wsrp.registration.RegistrationPropertyDescription; + +import javax.faces.model.SelectItem; +import java.util.ArrayList; +import java.util.Collections; +import java.util.Comparator; +import java.util.List; +import java.util.Map; + +/** + * @author Chris Laprun + * @version $Revision$ + * @since 2.6.3 + */ +public class ProducerBean extends ManagedBean +{ + private ProducerConfiguration configuration; + private String policyClassName; + private String validatorClassName; + + public ProducerConfiguration getConfiguration() + { + return configuration; + } + + public void setConfiguration(ProducerConfiguration configuration) + { + this.configuration =3D configuration; + } + + public boolean isRegistrationRequiredForFullDescription() + { + return getRegRequirements().isRegistrationRequiredForFullDescription= (); + } + + private ProducerRegistrationRequirements getRegRequirements() + { + return configuration.getRegistrationRequirements(); + } + + public void setRegistrationRequiredForFullDescription(boolean requireRe= gForFullDescription) + { + getRegRequirements().setRegistrationRequiredForFullDescription(requi= reRegForFullDescription); + } + + public boolean isRegistrationRequired() + { + return getRegRequirements().isRegistrationRequired(); + } + + public void setRegistrationRequired(boolean requireRegistration) + { + getRegRequirements().setRegistrationRequired(requireRegistration); + } + + public String getRegistrationPolicyClassName() + { + RegistrationPolicy policy =3D getRegRequirements().getPolicy(); + if (policy !=3D null) + { + return policy.getClass().getName(); + } + else + { + return "RegistrationPolicy unset"; + } + } + + public void setRegistrationPolicyClassName(String className) + { + policyClassName =3D className; + } + + public boolean isDefaultRegistrationPolicy() + { + return ProducerRegistrationRequirements.DEFAULT_POLICY_CLASS_NAME.eq= uals(getRegistrationPolicyClassName()); + } + + public String getValidatorClassName() + { + if (isDefaultRegistrationPolicy()) + { + return ((DefaultRegistrationPolicy)getRegRequirements().getPolicy= ()).getValidator().getClass().getName(); + } + throw new IllegalStateException("getValidatorClassName shouldn't be = called if we're not using the default registration"); + } + + public void setValidatorClassName(String className) + { + validatorClassName =3D className; + } + + public List getRegistrationProperties() + { + Map descriptions =3D getRegRequirements().getRegistrationProperties(= ); + Comparator descComparator =3D new C= omparator() + { + public int compare(RegistrationPropertyDescription o1, Registrati= onPropertyDescription o2) + { + return o1.getName().toString().compareTo(o2.getName().toString= ()); + } + }; + + List result =3D new ArrayList(descriptions.values()); + Collections.sort(result, descComparator); + return result; + } + + public List getSupportedPropertyTypes() + { + return Collections.singletonList(new SelectItem("xsd:string")); + } +} Property changes on: trunk/core-wsrp/src/main/org/jboss/portal/wsrp/admin/u= i/ProducerBean.java ___________________________________________________________________ Name: svn:keywords + Author Date Id Revision Name: svn:eol-style + native Modified: trunk/core-wsrp/src/resources/portal-wsrp-admin-war/WEB-INF/faces= -config.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/core-wsrp/src/resources/portal-wsrp-admin-war/WEB-INF/faces-confi= g.xml 2007-10-02 01:36:35 UTC (rev 8508) +++ trunk/core-wsrp/src/resources/portal-wsrp-admin-war/WEB-INF/faces-confi= g.xml 2007-10-02 01:40:39 UTC (rev 8509) @@ -32,6 +32,11 @@ com.sun.facelets.FaceletPortletViewHandler = + + org.jboss.portal.wsrp.registration.LocalizedStr= ing + org.jboss.portal.wsrp.admin.ui.LocalizedStringConve= rter + + beanContext org.jboss.portal.wsrp.admin.ui.JSFBeanContext @@ -75,6 +80,21 @@ #{beanContext} + + producer + org.jboss.portal.wsrp.admin.ui.ProducerBean + session + + configuration + org.jboss.portal.wsrp.producer.config.ProducerCon= figuration + #{applicationScope.ProducerConfigurationService.configurat= ion} + + + beanContext + org.jboss.portal.wsrp.admin.ui.BeanContext + #{beanContext} + + = Modified: trunk/core-wsrp/src/resources/portal-wsrp-admin-war/WEB-INF/jboss= -portlet.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/core-wsrp/src/resources/portal-wsrp-admin-war/WEB-INF/jboss-portl= et.xml 2007-10-02 01:36:35 UTC (rev 8508) +++ trunk/core-wsrp/src/resources/portal-wsrp-admin-war/WEB-INF/jboss-portl= et.xml 2007-10-02 01:40:39 UTC (rev 8509) @@ -20,10 +20,11 @@ ~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA = ~ ~ 02110-1301 USA, or see the FSF site: http://www.fsf.org. = ~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~= ~~~--> - + - WSRPConsumersConfigurationPortlet + WSRPConfigurationPortlet Required @@ -36,5 +37,10 @@ org.jboss.portal.wsrp.consumer.ConsumerRegistry portal.wsrp:service=3DConsumerRegistry + + ProducerConfigurationService + org.jboss.portal.wsrp.producer.config.ProducerConfigu= rationService + portal.wsrp:service=3DProducerConfiguration + = Modified: trunk/core-wsrp/src/resources/portal-wsrp-admin-war/WEB-INF/jsf/p= roducer.xhtml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/core-wsrp/src/resources/portal-wsrp-admin-war/WEB-INF/jsf/produce= r.xhtml 2007-10-02 01:36:35 UTC (rev 8508) +++ trunk/core-wsrp/src/resources/portal-wsrp-admin-war/WEB-INF/jsf/produce= r.xhtml 2007-10-02 01:40:39 UTC (rev 8509) @@ -8,24 +8,86 @@
  • -
  • Producer
  • +
  • Producer
= = +

Producer configuration

= = -

Feature not quite ready yet! Please refer to Portal's - documentation to - learn how to configure JBoss Portal's WSRP producer. -

+ + + + = + + + + + + + + + + + + + + + + + + + + + + + + Name + + + + Type + + + + + + Label + + + + Hint + + + + + + + + + + + + + + + + +
\ No newline at end of file Modified: trunk/core-wsrp/src/resources/portal-wsrp-admin-war/WEB-INF/portl= et-instances.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/core-wsrp/src/resources/portal-wsrp-admin-war/WEB-INF/portlet-ins= tances.xml 2007-10-02 01:36:35 UTC (rev 8508) +++ trunk/core-wsrp/src/resources/portal-wsrp-admin-war/WEB-INF/portlet-ins= tances.xml 2007-10-02 01:40:39 UTC (rev 8509) @@ -25,8 +25,8 @@ - WSRPConsumersConfigurationPortletInstance - WSRPConsumersConfigurationPortlet + WSRPConfigurationPortletInstance + WSRPConfigurationPortlet Admin Modified: trunk/core-wsrp/src/resources/portal-wsrp-admin-war/WEB-INF/portl= et.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/core-wsrp/src/resources/portal-wsrp-admin-war/WEB-INF/portlet.xml= 2007-10-02 01:36:35 UTC (rev 8508) +++ trunk/core-wsrp/src/resources/portal-wsrp-admin-war/WEB-INF/portlet.xml= 2007-10-02 01:40:39 UTC (rev 8509) @@ -26,9 +26,9 @@ xsi:schemaLocation=3D"http://java.sun.com/xml/ns/portlet/portlet-app_1_= 0.xsd http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd" version=3D"1.0"> - Configuration portlet for WSRP remote producers. - WSRPConsumersConfigurationPortlet - WSRP Consumers Configuration + Configuration portlet for WSRP. + WSRPConfigurationPortlet + WSRP Configuration org.jboss.portal.faces.loader.FacesPortlet default-view @@ -39,7 +39,7 @@ VIEW - WSRP Consumers Configuration + WSRP Configuration management,admin,wsrp Modified: trunk/core-wsrp/src/resources/portal-wsrp-admin-war/WEB-INF/wsrp-= object.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/core-wsrp/src/resources/portal-wsrp-admin-war/WEB-INF/wsrp-object= .xml 2007-10-02 01:36:35 UTC (rev 8508) +++ trunk/core-wsrp/src/resources/portal-wsrp-admin-war/WEB-INF/wsrp-object= .xml 2007-10-02 01:40:39 UTC (rev 8509) @@ -31,21 +31,21 @@ keep WSRP + + + layout.id + 1column + + viewrecursive Admin - - - layout.id - 1column - - - WSRPConsumersConfigurationPortletWindow - WSRPConsumersConfigurationPortletInstance + WSRPConfigurationPortletWindow + WSRPConfigurationPortletInstance center 0 Modified: trunk/core-wsrp/src/resources/portal-wsrp-admin-war/style.css =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/core-wsrp/src/resources/portal-wsrp-admin-war/style.css 2007-10-0= 2 01:36:35 UTC (rev 8508) +++ trunk/core-wsrp/src/resources/portal-wsrp-admin-war/style.css 2007-10-0= 2 01:40:39 UTC (rev 8509) @@ -265,4 +265,25 @@ = .portlet-msg-alert:before { content: "Warning: " +} + +.wsrp-consumers-ui .portlet-area-header { + border: 1px solid #54708c; + font-weight: bold; + color: #fff; + font-size: 11px; + background-color: #5986b3; + padding: 2px; + padding-left: 4px; + margin: 0; + display: block; +} + +.wsrp-consumers-ui .portlet-area-body { + border: 1px solid #d5d5d5; + border-top: 0px; + background-color: #fff; + padding: 4px; + margin: 0; + display: block; } \ No newline at end of file --===============8781614432143615900==-- From portal-commits at lists.jboss.org Mon Oct 1 21:42:52 2007 Content-Type: multipart/mixed; boundary="===============1803628253838406843==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8510 - in branches/JBoss_Portal_Branch_2_6/core-wsrp/src: resources/portal-wsrp-admin-war and 2 other directories. Date: Mon, 01 Oct 2007 21:42:51 -0400 Message-ID: --===============1803628253838406843== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: chris.laprun(a)jboss.com Date: 2007-10-01 21:42:51 -0400 (Mon, 01 Oct 2007) New Revision: 8510 Added: branches/JBoss_Portal_Branch_2_6/core-wsrp/src/main/org/jboss/portal/wsr= p/admin/ui/LocalizedStringConverter.java branches/JBoss_Portal_Branch_2_6/core-wsrp/src/main/org/jboss/portal/wsr= p/admin/ui/ProducerBean.java Modified: branches/JBoss_Portal_Branch_2_6/core-wsrp/src/resources/portal-wsrp-adm= in-war/WEB-INF/faces-config.xml branches/JBoss_Portal_Branch_2_6/core-wsrp/src/resources/portal-wsrp-adm= in-war/WEB-INF/jboss-portlet.xml branches/JBoss_Portal_Branch_2_6/core-wsrp/src/resources/portal-wsrp-adm= in-war/WEB-INF/jsf/producer.xhtml branches/JBoss_Portal_Branch_2_6/core-wsrp/src/resources/portal-wsrp-adm= in-war/WEB-INF/portlet-instances.xml branches/JBoss_Portal_Branch_2_6/core-wsrp/src/resources/portal-wsrp-adm= in-war/WEB-INF/portlet.xml branches/JBoss_Portal_Branch_2_6/core-wsrp/src/resources/portal-wsrp-adm= in-war/WEB-INF/wsrp-object.xml branches/JBoss_Portal_Branch_2_6/core-wsrp/src/resources/portal-wsrp-adm= in-war/style.css Log: - JBPORTAL-1715: first pass at producer configuration, read-only for now. - Renamed WSRP admin portlet (and related objects) to WSRPConfigurationPort= let (and related) as it deals with more than just consumers now. - NOTE: ProducerBean required Java 5 (not actually needed, just switching t= o using Java 5 now). Copied: branches/JBoss_Portal_Branch_2_6/core-wsrp/src/main/org/jboss/porta= l/wsrp/admin/ui/LocalizedStringConverter.java (from rev 8509, trunk/core-ws= rp/src/main/org/jboss/portal/wsrp/admin/ui/LocalizedStringConverter.java) =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/core-wsrp/src/main/org/jboss/portal/ws= rp/admin/ui/LocalizedStringConverter.java (rev 0) +++ branches/JBoss_Portal_Branch_2_6/core-wsrp/src/main/org/jboss/portal/ws= rp/admin/ui/LocalizedStringConverter.java 2007-10-02 01:42:51 UTC (rev 8510) @@ -0,0 +1,48 @@ +/*************************************************************************= ***** + * JBoss, a division of Red Hat = * + * Copyright 2007, Red Hat Middleware, LLC, and individual = * + * contributors as indicated by the @authors tag. See the = * + * copyright.txt in the distribution for a full listing of = * + * individual contributors. = * + * = * + * This is free software; you can redistribute it and/or modify it = * + * under the terms of the GNU Lesser General Public License as = * + * published by the Free Software Foundation; either version 2.1 of = * + * the License, or (at your option) any later version. = * + * = * + * This software is distributed in the hope that it will be useful, = * + * but WITHOUT ANY WARRANTY; without even the implied warranty of = * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU = * + * Lesser General Public License for more details. = * + * = * + * You should have received a copy of the GNU Lesser General Public = * + * License along with this software; if not, write to the Free = * + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA = * + * 02110-1301 USA, or see the FSF site: http://www.fsf.org. = * + *************************************************************************= *****/ + +package org.jboss.portal.wsrp.admin.ui; + +import org.jboss.portal.wsrp.registration.LocalizedString; + +import javax.faces.component.UIComponent; +import javax.faces.context.FacesContext; +import javax.faces.convert.Converter; + +/** + * @author Chris Laprun + * @version $Revision$ + * @since 2.6.3 + */ +public class LocalizedStringConverter implements Converter +{ + public Object getAsObject(FacesContext facesContext, UIComponent uiComp= onent, String s) + { + return s =3D=3D null ? null : new LocalizedString(s); + } + + public String getAsString(FacesContext facesContext, UIComponent uiComp= onent, Object o) + { + return o =3D=3D null ? null : ((LocalizedString)o).getValue(); + } +} Copied: branches/JBoss_Portal_Branch_2_6/core-wsrp/src/main/org/jboss/porta= l/wsrp/admin/ui/ProducerBean.java (from rev 8509, trunk/core-wsrp/src/main/= org/jboss/portal/wsrp/admin/ui/ProducerBean.java) =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/core-wsrp/src/main/org/jboss/portal/ws= rp/admin/ui/ProducerBean.java (rev 0) +++ branches/JBoss_Portal_Branch_2_6/core-wsrp/src/main/org/jboss/portal/ws= rp/admin/ui/ProducerBean.java 2007-10-02 01:42:51 UTC (rev 8510) @@ -0,0 +1,142 @@ +/*************************************************************************= ***** + * JBoss, a division of Red Hat = * + * Copyright 2007, Red Hat Middleware, LLC, and individual = * + * contributors as indicated by the @authors tag. See the = * + * copyright.txt in the distribution for a full listing of = * + * individual contributors. = * + * = * + * This is free software; you can redistribute it and/or modify it = * + * under the terms of the GNU Lesser General Public License as = * + * published by the Free Software Foundation; either version 2.1 of = * + * the License, or (at your option) any later version. = * + * = * + * This software is distributed in the hope that it will be useful, = * + * but WITHOUT ANY WARRANTY; without even the implied warranty of = * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU = * + * Lesser General Public License for more details. = * + * = * + * You should have received a copy of the GNU Lesser General Public = * + * License along with this software; if not, write to the Free = * + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA = * + * 02110-1301 USA, or see the FSF site: http://www.fsf.org. = * + *************************************************************************= *****/ + +package org.jboss.portal.wsrp.admin.ui; + +import org.jboss.portal.registration.RegistrationPolicy; +import org.jboss.portal.registration.policies.DefaultRegistrationPolicy; +import org.jboss.portal.wsrp.producer.config.ProducerConfiguration; +import org.jboss.portal.wsrp.producer.config.ProducerRegistrationRequireme= nts; +import org.jboss.portal.wsrp.registration.RegistrationPropertyDescription; + +import javax.faces.model.SelectItem; +import java.util.ArrayList; +import java.util.Collections; +import java.util.Comparator; +import java.util.List; +import java.util.Map; + +/** + * @author Chris Laprun + * @version $Revision$ + * @since 2.6.3 + */ +public class ProducerBean extends ManagedBean +{ + private ProducerConfiguration configuration; + private String policyClassName; + private String validatorClassName; + + public ProducerConfiguration getConfiguration() + { + return configuration; + } + + public void setConfiguration(ProducerConfiguration configuration) + { + this.configuration =3D configuration; + } + + public boolean isRegistrationRequiredForFullDescription() + { + return getRegRequirements().isRegistrationRequiredForFullDescription= (); + } + + private ProducerRegistrationRequirements getRegRequirements() + { + return configuration.getRegistrationRequirements(); + } + + public void setRegistrationRequiredForFullDescription(boolean requireRe= gForFullDescription) + { + getRegRequirements().setRegistrationRequiredForFullDescription(requi= reRegForFullDescription); + } + + public boolean isRegistrationRequired() + { + return getRegRequirements().isRegistrationRequired(); + } + + public void setRegistrationRequired(boolean requireRegistration) + { + getRegRequirements().setRegistrationRequired(requireRegistration); + } + + public String getRegistrationPolicyClassName() + { + RegistrationPolicy policy =3D getRegRequirements().getPolicy(); + if (policy !=3D null) + { + return policy.getClass().getName(); + } + else + { + return "RegistrationPolicy unset"; + } + } + + public void setRegistrationPolicyClassName(String className) + { + policyClassName =3D className; + } + + public boolean isDefaultRegistrationPolicy() + { + return ProducerRegistrationRequirements.DEFAULT_POLICY_CLASS_NAME.eq= uals(getRegistrationPolicyClassName()); + } + + public String getValidatorClassName() + { + if (isDefaultRegistrationPolicy()) + { + return ((DefaultRegistrationPolicy)getRegRequirements().getPolicy= ()).getValidator().getClass().getName(); + } + throw new IllegalStateException("getValidatorClassName shouldn't be = called if we're not using the default registration"); + } + + public void setValidatorClassName(String className) + { + validatorClassName =3D className; + } + + public List getRegistrationProperties() + { + Map descriptions =3D getRegRequirements().getRegistrationProperties(= ); + Comparator descComparator =3D new C= omparator() + { + public int compare(RegistrationPropertyDescription o1, Registrati= onPropertyDescription o2) + { + return o1.getName().toString().compareTo(o2.getName().toString= ()); + } + }; + + List result =3D new ArrayList(descriptions.values()); + Collections.sort(result, descComparator); + return result; + } + + public List getSupportedPropertyTypes() + { + return Collections.singletonList(new SelectItem("xsd:string")); + } +} Modified: branches/JBoss_Portal_Branch_2_6/core-wsrp/src/resources/portal-w= srp-admin-war/WEB-INF/faces-config.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/core-wsrp/src/resources/portal-wsrp-ad= min-war/WEB-INF/faces-config.xml 2007-10-02 01:40:39 UTC (rev 8509) +++ branches/JBoss_Portal_Branch_2_6/core-wsrp/src/resources/portal-wsrp-ad= min-war/WEB-INF/faces-config.xml 2007-10-02 01:42:51 UTC (rev 8510) @@ -32,6 +32,11 @@ com.sun.facelets.FaceletPortletViewHandler = + + org.jboss.portal.wsrp.registration.LocalizedStr= ing + org.jboss.portal.wsrp.admin.ui.LocalizedStringConve= rter + + beanContext org.jboss.portal.wsrp.admin.ui.JSFBeanContext @@ -75,6 +80,21 @@ #{beanContext} + + producer + org.jboss.portal.wsrp.admin.ui.ProducerBean + session + + configuration + org.jboss.portal.wsrp.producer.config.ProducerCon= figuration + #{applicationScope.ProducerConfigurationService.configurat= ion} + + + beanContext + org.jboss.portal.wsrp.admin.ui.BeanContext + #{beanContext} + + = Modified: branches/JBoss_Portal_Branch_2_6/core-wsrp/src/resources/portal-w= srp-admin-war/WEB-INF/jboss-portlet.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/core-wsrp/src/resources/portal-wsrp-ad= min-war/WEB-INF/jboss-portlet.xml 2007-10-02 01:40:39 UTC (rev 8509) +++ branches/JBoss_Portal_Branch_2_6/core-wsrp/src/resources/portal-wsrp-ad= min-war/WEB-INF/jboss-portlet.xml 2007-10-02 01:42:51 UTC (rev 8510) @@ -20,10 +20,11 @@ ~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA = ~ ~ 02110-1301 USA, or see the FSF site: http://www.fsf.org. = ~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~= ~~~--> - + - WSRPConsumersConfigurationPortlet + WSRPConfigurationPortlet Required @@ -36,5 +37,10 @@ org.jboss.portal.wsrp.consumer.ConsumerRegistry portal.wsrp:service=3DConsumerRegistry + + ProducerConfigurationService + org.jboss.portal.wsrp.producer.config.ProducerConfigu= rationService + portal.wsrp:service=3DProducerConfiguration + = Modified: branches/JBoss_Portal_Branch_2_6/core-wsrp/src/resources/portal-w= srp-admin-war/WEB-INF/jsf/producer.xhtml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/core-wsrp/src/resources/portal-wsrp-ad= min-war/WEB-INF/jsf/producer.xhtml 2007-10-02 01:40:39 UTC (rev 8509) +++ branches/JBoss_Portal_Branch_2_6/core-wsrp/src/resources/portal-wsrp-ad= min-war/WEB-INF/jsf/producer.xhtml 2007-10-02 01:42:51 UTC (rev 8510) @@ -8,24 +8,86 @@
  • -
  • Producer
  • +
  • Producer
= = +

Producer configuration

= = -

Feature not quite ready yet! Please refer to Portal's - documentation to - learn how to configure JBoss Portal's WSRP producer. -

+ + + + = + + + + + + + + + + + + + + + + + + + + + + + + Name + + + + Type + + + + + + Label + + + + Hint + + + + + + + + + + + + + + + + +
\ No newline at end of file Modified: branches/JBoss_Portal_Branch_2_6/core-wsrp/src/resources/portal-w= srp-admin-war/WEB-INF/portlet-instances.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/core-wsrp/src/resources/portal-wsrp-ad= min-war/WEB-INF/portlet-instances.xml 2007-10-02 01:40:39 UTC (rev 8509) +++ branches/JBoss_Portal_Branch_2_6/core-wsrp/src/resources/portal-wsrp-ad= min-war/WEB-INF/portlet-instances.xml 2007-10-02 01:42:51 UTC (rev 8510) @@ -25,8 +25,8 @@ - WSRPConsumersConfigurationPortletInstance - WSRPConsumersConfigurationPortlet + WSRPConfigurationPortletInstance + WSRPConfigurationPortlet Admin Modified: branches/JBoss_Portal_Branch_2_6/core-wsrp/src/resources/portal-w= srp-admin-war/WEB-INF/portlet.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/core-wsrp/src/resources/portal-wsrp-ad= min-war/WEB-INF/portlet.xml 2007-10-02 01:40:39 UTC (rev 8509) +++ branches/JBoss_Portal_Branch_2_6/core-wsrp/src/resources/portal-wsrp-ad= min-war/WEB-INF/portlet.xml 2007-10-02 01:42:51 UTC (rev 8510) @@ -26,9 +26,9 @@ xsi:schemaLocation=3D"http://java.sun.com/xml/ns/portlet/portlet-app_1_= 0.xsd http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd" version=3D"1.0"> - Configuration portlet for WSRP remote producers. - WSRPConsumersConfigurationPortlet - WSRP Consumers Configuration + Configuration portlet for WSRP. + WSRPConfigurationPortlet + WSRP Configuration org.jboss.portal.faces.loader.FacesPortlet default-view @@ -39,7 +39,7 @@ VIEW - WSRP Consumers Configuration + WSRP Configuration management,admin,wsrp Modified: branches/JBoss_Portal_Branch_2_6/core-wsrp/src/resources/portal-w= srp-admin-war/WEB-INF/wsrp-object.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/core-wsrp/src/resources/portal-wsrp-ad= min-war/WEB-INF/wsrp-object.xml 2007-10-02 01:40:39 UTC (rev 8509) +++ branches/JBoss_Portal_Branch_2_6/core-wsrp/src/resources/portal-wsrp-ad= min-war/WEB-INF/wsrp-object.xml 2007-10-02 01:42:51 UTC (rev 8510) @@ -31,21 +31,21 @@ keep WSRP + + + layout.id + 1column + + viewrecursive Admin - - - layout.id - 1column - - - WSRPConsumersConfigurationPortletWindow - WSRPConsumersConfigurationPortletInstance + WSRPConfigurationPortletWindow + WSRPConfigurationPortletInstance center 0 Modified: branches/JBoss_Portal_Branch_2_6/core-wsrp/src/resources/portal-w= srp-admin-war/style.css =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/core-wsrp/src/resources/portal-wsrp-ad= min-war/style.css 2007-10-02 01:40:39 UTC (rev 8509) +++ branches/JBoss_Portal_Branch_2_6/core-wsrp/src/resources/portal-wsrp-ad= min-war/style.css 2007-10-02 01:42:51 UTC (rev 8510) @@ -265,4 +265,25 @@ = .portlet-msg-alert:before { content: "Warning: " +} + +.wsrp-consumers-ui .portlet-area-header { + border: 1px solid #54708c; + font-weight: bold; + color: #fff; + font-size: 11px; + background-color: #5986b3; + padding: 2px; + padding-left: 4px; + margin: 0; + display: block; +} + +.wsrp-consumers-ui .portlet-area-body { + border: 1px solid #d5d5d5; + border-top: 0px; + background-color: #fff; + padding: 4px; + margin: 0; + display: block; } \ No newline at end of file --===============1803628253838406843==-- From portal-commits at lists.jboss.org Mon Oct 1 23:58:20 2007 Content-Type: multipart/mixed; boundary="===============0622464858633841352==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8511 - modules. Date: Mon, 01 Oct 2007 23:58:19 -0400 Message-ID: --===============0622464858633841352== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: wesleyhales Date: 2007-10-01 23:58:19 -0400 (Mon, 01 Oct 2007) New Revision: 8511 Removed: modules/pom.xml Log: Remove module pom.xml Deleted: modules/pom.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/pom.xml 2007-10-02 01:42:51 UTC (rev 8510) +++ modules/pom.xml 2007-10-02 03:58:19 UTC (rev 8511) @@ -1,23 +0,0 @@ - - - jbossportal - org.jboss.portal - 1.0-SNAPSHOT - - 4.0.0 - org.jboss.portal - modules - pom - Jboss Portal Modules - 1.0-SNAPSHOT - = - - - - = - - common/trunk/common - - = - \ No newline at end of file --===============0622464858633841352==-- From portal-commits at lists.jboss.org Mon Oct 1 23:59:16 2007 Content-Type: multipart/mixed; boundary="===============7307572176232919128==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8512 - /. Date: Mon, 01 Oct 2007 23:59:15 -0400 Message-ID: --===============7307572176232919128== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: wesleyhales Date: 2007-10-01 23:59:15 -0400 (Mon, 01 Oct 2007) New Revision: 8512 Modified: pom.xml Log: Maven config for snapshot deployment and added plugins Modified: pom.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- pom.xml 2007-10-02 03:58:19 UTC (rev 8511) +++ pom.xml 2007-10-02 03:59:15 UTC (rev 8512) @@ -1,155 +1,204 @@ - 4.0.0 - org.jboss.portal - jbossportal - pom - Jboss Portal - 1.0-SNAPSHOT - http://labs.jboss.com/jbossportal + 4.0.0 + org.jboss.portal + jboss-portal + pom + Jboss Portal + 1.0-SNAPSHOT + http://labs.jboss.com/jbossportal = - + = - - - repository.jboss.org - http://repository.jboss.com/maven2/ - - + + + repository.jboss.org + JBoss Repository + default + http://repository.jboss.org/maven2/ + + false + + + + snapshots.jboss.org + JBoss Snapshots Repository + default + http://snapshots.jboss.org/maven2/ + + true + + + false + + + = - - - - - true - org.apache.maven.plugins - maven-compiler-plugin - - 1.5 - 1.5 - - - = - - org.codehaus.mojo - jboss-packaging-maven-plugin - 2.0-SNAPSHOT - true - - = - - - - - - - - modules - - - - - JIRA - http://jira.jboss.com/jira/browse/JBPORTAL - - - cruisecontrol - - - - jviet - Julien Viet - jviet(a)redhat.com - Jboss a division of Red Hat - http://www.jboss.org - - Portal lead - - +1 - - - whales - Wesley Hales - whales(a)redhat.com - Jboss a division of Red Hat - http://www.jboss.org - - ui - developer - - -4 - - - - - - - LGPL 2.1 - http://www.gnu.org/licenses/lgpl.html - repo - - GNU LESSER GENERAL PUBLIC LICENSE Version 2.1 - - - - - scm:svn:http://anonsvn.jboss.org/repos/portal/trunk - scm:svn:https://svn.jboss.org/repos/portal/tr= unk - https://svn.jboss.org/repos/portal/trunk - - = - - + + + + org.apache.maven.wagon + wagon-webdav + 1.0-beta-2 + + + + - maven-changes-plugin + true + org.apache.maven.plugins + maven-compiler-plugin + + 1.5 + 1.5 + true + true + true + - maven-checkstyle-plugin + org.codehaus.mojo + jboss-packaging-maven-plugin + 2.0-SNAPSHOT + true - org.codehaus.mojo - cobertura-maven-plugin - 2.0 + maven-idea-plugin + + true + - maven-javadoc-plugin + org.jboss.maven.plugins + maven-jboss-deploy-plugin + 1.3 + + + + jboss-deploy + + + + + ${jboss.repository.root} + - - maven-jxr-plugin - - - maven-pmd-plugin - - true - 1.5 - - - - maven-surefire-report-plugin - - - + + + = + + + + + + + + snapshots.jboss.org + JBoss Snapshot Repository + dav:https://snapshots.jboss.org/maven2 + true + + + + + modules/common/trunk/common + + + + + JIRA + http://jira.jboss.com/jira/browse/JBPORTAL + + + cruisecontrol + + + + jviet + Julien Viet + jviet(a)redhat.com + Jboss a division of Red Hat + http://www.jboss.org + + Portal lead + + +1 + + + whales + Wesley Hales + whales(a)redhat.com + Jboss a division of Red Hat + http://www.jboss.org + + ui + developer + + -4 + + + + + + + LGPL 2.1 + http://www.gnu.org/licenses/lgpl.html + repo + + GNU LESSER GENERAL PUBLIC LICENSE Version 2.1 + + + + + scm:svn:http://anonsvn.jboss.org/repos/portal/trunk + scm:svn:https://svn.jboss.org/repos/portal/trun= k + https://svn.jboss.org/repos/portal/trunk + + + + + + maven-changes-plugin + + + maven-checkstyle-plugin + + + org.codehaus.mojo + cobertura-maven-plugin + 2.0 + + + maven-javadoc-plugin + + + maven-jxr-plugin + + + maven-pmd-plugin + + true + 1.5 + + + + maven-surefire-report-plugin + + + + + + \ No newline at end of file --===============7307572176232919128==-- From portal-commits at lists.jboss.org Mon Oct 1 23:59:50 2007 Content-Type: multipart/mixed; boundary="===============0053455927146590258==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8513 - modules/common/trunk/common. Date: Mon, 01 Oct 2007 23:59:50 -0400 Message-ID: --===============0053455927146590258== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: wesleyhales Date: 2007-10-01 23:59:50 -0400 (Mon, 01 Oct 2007) New Revision: 8513 Modified: modules/common/trunk/common/pom.xml Log: Changes for deploy config and new structure Modified: modules/common/trunk/common/pom.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/common/trunk/common/pom.xml 2007-10-02 03:59:15 UTC (rev 8512) +++ modules/common/trunk/common/pom.xml 2007-10-02 03:59:50 UTC (rev 8513) @@ -1,234 +1,232 @@ - - modules - org.jboss.portal - 1.0-SNAPSHOT - - 4.0.0 - org.jboss.portal - common - jar - Jboss Portal Common - 1.0-SNAPSHOT + + jboss-portal + org.jboss.portal + 1.0-SNAPSHOT + + 4.0.0 + jboss-portal-modules-common + jar + Jboss Portal Common = - + = - - apache-log4j - log4j - 1.2.14 - + + apache-log4j + log4j + 1.2.14 + = - - oswego-concurrent - concurrent - 1.3.4 - + + oswego-concurrent + concurrent + 1.3.4 + = - - javax.activation - activation - 1.1 - + + javax.activation + activation + 1.1 + = - + = - - jboss - jboss-j2ee - 4.2.0.GA - + + jboss + jboss-j2ee + 4.2.0.GA + = - - jboss - jboss-common-core - 2.2.0.GA - + + jboss + jboss-common-core + 2.2.0.GA + = - - ant - ant - 1.6.5 - + + ant + ant + 1.6.5 + = - - jboss - jboss-jmx - 4.2.0.GA - + + jboss + jboss-jmx + 4.2.0.GA + = - - jboss - jboss-system - 4.2.0.GA - + + jboss + jboss-system + 4.2.0.GA + = - - apache-httpclient - commons-httpclient - 2.0.2 - + + apache-httpclient + commons-httpclient + 2.0.2 + = - - jboss - jboss-backport-concurrent - 2.1.0.GA - + + jboss + jboss-backport-concurrent + 2.1.0.GA + = - - javax.servlet - servlet-api - 2.4 - + + javax.servlet + servlet-api + 2.4 + = - - ant - ant-junit - 1.6.5 - + + ant + ant-junit + 1.6.5 + = - - org.codehaus.cargo - cargo-core-uberjar - 0.8 - + + org.codehaus.cargo + cargo-core-uberjar + 0.8 + = - - ant - ant-launcher - 0.1 - system - ${basedir}/../tools/lib/ant-launcher.jar - + + ant + ant-launcher + 0.1 + system + ${basedir}/../tools/lib/ant-launcher.jar + = - - ant - ant-nodeps - 0.1 - system - ${basedir}/../tools/lib/ant-nodeps.jar - + + ant + ant-nodeps + 0.1 + system + ${basedir}/../tools/lib/ant-nodeps.jar + = - - junit - junit - 0.1 - system - ${basedir}/../tools/lib/junit.jar - + + junit + junit + 0.1 + system + ${basedir}/../tools/lib/junit.jar + = - + = - - - - false - src/main/resources/format/code - - *.tpl - - - - + + + + false + src/main/resources/format/code + + *.tpl + + + + = - - maven-compiler-plugin - - iso-8859-1 - - + + maven-compiler-plugin + + iso-8859-1 + + = - - org.apache.maven.plugins - maven-jar-plugin - - - - true - - - - + + org.apache.maven.plugins + maven-jar-plugin + + + + true + + + + = - - org.apache.maven.plugins - maven-surefire-plugin - - - org/jboss/portal/test/common/BundleNamePa= rserTestCase*.java - org/jboss/portal/test/common/net/URLNavig= atorTestCase.java - - - + + org.apache.maven.plugins + maven-surefire-plugin + + + org/jboss/portal/test/common/BundleNameParserTe= stCase*.java + org/jboss/portal/test/common/net/URLNavigatorTe= stCase.java + + + = - - + + = - src/test/java + src/test/java = - - - src/test/resources - false - - - + + + src/test/resources + false + + + = - - - - maven-changes-plugin - - - maven-checkstyle-plugin - - - org.codehaus.mojo - cobertura-maven-plugin - 2.0 - - - maven-javadoc-plugin - - - maven-jxr-plugin - - - maven-pmd-plugin - - true - 1.5 - - - - maven-surefire-report-plugin - - - - = - - - + + \ No newline at end of file --===============0053455927146590258==-- From portal-commits at lists.jboss.org Tue Oct 2 07:27:32 2007 Content-Type: multipart/mixed; boundary="===============5525519489917421157==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8514 - in modules/test/trunk: tools/etc/buildfragments and 1 other directories. Date: Tue, 02 Oct 2007 07:27:32 -0400 Message-ID: --===============5525519489917421157== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: julien(a)jboss.com Date: 2007-10-02 07:27:31 -0400 (Tue, 02 Oct 2007) New Revision: 8514 Modified: modules/test/trunk/build/ide/intellij/idea60/modules/unit/unit.iml modules/test/trunk/tools/etc/buildfragments/buildmagic.ent modules/test/trunk/tools/etc/buildfragments/defaults.ent modules/test/trunk/unit/build.xml Log: update to produce correct javadocs for jboss unit Modified: modules/test/trunk/build/ide/intellij/idea60/modules/unit/unit.iml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/build/ide/intellij/idea60/modules/unit/unit.iml 2007= -10-02 03:59:50 UTC (rev 8513) +++ modules/test/trunk/build/ide/intellij/idea60/modules/unit/unit.iml 2007= -10-02 11:27:31 UTC (rev 8514) @@ -10,5 +10,9 @@ + + = Modified: modules/test/trunk/tools/etc/buildfragments/buildmagic.ent =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/tools/etc/buildfragments/buildmagic.ent 2007-10-02 0= 3:59:50 UTC (rev 8513) +++ modules/test/trunk/tools/etc/buildfragments/buildmagic.ent 2007-10-02 1= 1:27:31 UTC (rev 8514) @@ -759,39 +759,9 @@ ]]> = - - - - - - - - - - - - - + = - - - - - - - - - - - - - - - - = @@ -805,7 +775,7 @@ destdir=3D"${build.api}" classpathref=3D"javadoc.classpath" windowtitle=3D"${javadoc.windowtitle}" - splitindex=3D"${javadoc.splitindex}" + splitindex=3D"${javadoc.splitindex}" author=3D"${javadoc.author}" version=3D"${javadoc.version}" public=3D"${javadoc.public}" @@ -813,7 +783,7 @@ protected=3D"${javadoc.protected}" private=3D"${javadoc.private}" use=3D"${javadoc.use}" - verbose=3D"${javadoc.verbose}"> + verbose=3D"${javadoc.verbose}"> ${module.Name} API Documentation]]> Modified: modules/test/trunk/tools/etc/buildfragments/defaults.ent =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/tools/etc/buildfragments/defaults.ent 2007-10-02 03:= 59:50 UTC (rev 8513) +++ modules/test/trunk/tools/etc/buildfragments/defaults.ent 2007-10-02 11:= 27:31 UTC (rev 8514) @@ -138,7 +138,6 @@ = = - = Modified: modules/test/trunk/unit/build.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/build.xml 2007-10-02 03:59:50 UTC (rev 8513) +++ modules/test/trunk/unit/build.xml 2007-10-02 11:27:31 UTC (rev 8514) @@ -96,16 +96,17 @@ = - - - - - + + = + + + + = --===============5525519489917421157==-- From portal-commits at lists.jboss.org Tue Oct 2 15:09:13 2007 Content-Type: multipart/mixed; boundary="===============5283389014443567841==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8516 - in modules/test/trunk/unit/src/main/org/jboss: test/unit/pojo and 6 other directories. Date: Tue, 02 Oct 2007 15:09:13 -0400 Message-ID: --===============5283389014443567841== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: julien(a)jboss.com Date: 2007-10-02 15:09:12 -0400 (Tue, 02 Oct 2007) New Revision: 8516 Added: modules/test/trunk/unit/src/main/org/jboss/test/unit/pojo/junit/ modules/test/trunk/unit/src/main/org/jboss/test/unit/pojo/junit/JUnitPOJ= OTests.java modules/test/trunk/unit/src/main/org/jboss/test/unit/pojo/junit/JUnitTes= t1.java modules/test/trunk/unit/src/main/org/jboss/test/unit/pojo/junit/JUnitTes= t2.java modules/test/trunk/unit/src/main/org/jboss/test/unit/pojo/junit/JUnitTes= t3.java modules/test/trunk/unit/src/main/org/jboss/test/unit/pojo/junit/JUnitTes= t4.java modules/test/trunk/unit/src/main/org/jboss/test/unit/pojo/junit/JUnitTes= t5.java modules/test/trunk/unit/src/main/org/jboss/test/unit/pojo/junit/JUnitTes= t6.java modules/test/trunk/unit/src/main/org/jboss/unit/api/pojo/TestLifeCycle.j= ava modules/test/trunk/unit/src/main/org/jboss/unit/api/pojo/TestSuiteDescri= ptor.java modules/test/trunk/unit/src/main/org/jboss/unit/api/pojo/junit/JUnitDesc= riptor.java modules/test/trunk/unit/src/main/org/jboss/unit/api/pojo/junit/JUnitLife= Cycle.java modules/test/trunk/unit/src/main/org/jboss/unit/api/pojo/junit/JUnitTest= Method.java modules/test/trunk/unit/src/main/org/jboss/unit/api/pojo/junit/JUnitTest= MethodLifeCycle.java modules/test/trunk/unit/src/main/org/jboss/unit/api/pojo/junit/TestCase.= java Removed: modules/test/trunk/unit/src/main/org/jboss/unit/api/pojo/junit/JUnitTest= Handler.java Modified: modules/test/trunk/unit/src/main/org/jboss/test/unit/AllTests.java modules/test/trunk/unit/src/main/org/jboss/test/unit/PrintListener.java modules/test/trunk/unit/src/main/org/jboss/test/unit/pojo/TestDriverPOJO= Test.java modules/test/trunk/unit/src/main/org/jboss/test/unit/pojo/TestDriverPOJO= Tests.java modules/test/trunk/unit/src/main/org/jboss/test/unit/pojo/TestHandlerSup= portPOJOTest.java modules/test/trunk/unit/src/main/org/jboss/unit/Failure.java modules/test/trunk/unit/src/main/org/jboss/unit/FailureType.java modules/test/trunk/unit/src/main/org/jboss/unit/api/Assert.java modules/test/trunk/unit/src/main/org/jboss/unit/api/pojo/TestHandler.java modules/test/trunk/unit/src/main/org/jboss/unit/api/pojo/TestHandlerSupp= ort.java modules/test/trunk/unit/src/main/org/jboss/unit/unit/pojo/POJOTestSuiteD= river.java modules/test/trunk/unit/src/main/org/jboss/unit/unit/pojo/POJOTestSuiteI= nfo.java Log: - split API of TestHandler to TestLifeCycle and TestSuiteDescriptor - added basic support for junit test cases pattern Modified: modules/test/trunk/unit/src/main/org/jboss/test/unit/AllTests.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/test/unit/AllTests.java 2007= -10-02 18:18:13 UTC (rev 8515) +++ modules/test/trunk/unit/src/main/org/jboss/test/unit/AllTests.java 2007= -10-02 19:09:12 UTC (rev 8516) @@ -25,6 +25,7 @@ import org.jboss.test.unit.api.AssertTests; import org.jboss.test.unit.blah.BlahTests; import org.jboss.test.unit.pojo.AbstractPOJOTests; +import org.jboss.test.unit.pojo.junit.JUnitPOJOTests; import org.jboss.test.unit.runner.CompositeTestRunnerTests; import org.jboss.test.unit.runner.ParametrizationTests; import org.jboss.test.unit.runner.event.TestRunnerEventBroadcasterSupportT= ests; @@ -41,9 +42,8 @@ public static void main(String[] args) throws Exception { AssertTests.main(args); -// TestHandlerSupportTests.main(args); -// POJOTestDriverTests.main(args); AbstractPOJOTests.main(args); + JUnitPOJOTests.main(args); CompositeTestRunnerTests.main(args); = // Modified: modules/test/trunk/unit/src/main/org/jboss/test/unit/PrintListene= r.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/test/unit/PrintListener.java= 2007-10-02 18:18:13 UTC (rev 8515) +++ modules/test/trunk/unit/src/main/org/jboss/test/unit/PrintListener.java= 2007-10-02 19:09:12 UTC (rev 8516) @@ -56,7 +56,7 @@ { RunnerFailureEvent failureEvent =3D (RunnerFailureEvent)event; Failure failure =3D failureEvent.getFailure(); = - System.out.println("Runner failure: " + failure.getLevel() + " " = + failure.getMessage()); + System.out.println("Runner failure: " + failure.getType() + " " += failure.getMessage()); } else if (event instanceof StartTestEvent) { @@ -76,7 +76,7 @@ { TestFailure testFailure =3D (TestFailure)testResult; Failure failure =3D testFailure.getFailure(); - System.out.println("Test id=3D" + testId + " " + failure.getLe= vel() + " failed " + failure.getMessage()); + System.out.println("Test id=3D" + testId + " " + failure.getTy= pe() + " failed " + failure.getMessage()); if (failure.getCause() !=3D null) { failure.getCause().printStackTrace(); Modified: modules/test/trunk/unit/src/main/org/jboss/test/unit/pojo/TestDri= verPOJOTest.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/test/unit/pojo/TestDriverPOJ= OTest.java 2007-10-02 18:18:13 UTC (rev 8515) +++ modules/test/trunk/unit/src/main/org/jboss/test/unit/pojo/TestDriverPOJ= OTest.java 2007-10-02 19:09:12 UTC (rev 8516) @@ -105,7 +105,7 @@ else if (response instanceof FailureResponse) { FailureResponse failureResponse =3D (FailureResponse)response; - switch (failureResponse.getFailure().getLevel()) + switch (failureResponse.getFailure().getType()) { case ERROR: return InvokeResult.ERROR; Modified: modules/test/trunk/unit/src/main/org/jboss/test/unit/pojo/TestDri= verPOJOTests.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/test/unit/pojo/TestDriverPOJ= OTests.java 2007-10-02 18:18:13 UTC (rev 8515) +++ modules/test/trunk/unit/src/main/org/jboss/test/unit/pojo/TestDriverPOJ= OTests.java 2007-10-02 19:09:12 UTC (rev 8516) @@ -24,7 +24,7 @@ = import org.jboss.unit.driver.TestDriver; import org.jboss.unit.unit.pojo.POJOTestSuiteDriver; -import static org.jboss.unit.api.Assert.fail; +import static org.jboss.unit.api.Assert.*; = /** * @author Julien Viet @@ -40,6 +40,14 @@ new POJOTestSuiteDriver(clazz); fail(); } + catch (InstantiationException e) + { + fail(e); + } + catch (IllegalAccessException e) + { + fail(e); + } catch (IllegalArgumentException expected) { } @@ -47,9 +55,20 @@ = protected AbstractPOJOTest assertCanBuildSuite(Class clazz) { - TestDriver driver =3D new POJOTestSuiteDriver(clazz); + try + { + TestDriver driver =3D new POJOTestSuiteDriver(clazz); = - // - return new TestDriverPOJOTest(driver); + // + return new TestDriverPOJOTest(driver); + } + catch (InstantiationException e) + { + throw createFailure(e); + } + catch (IllegalAccessException e) + { + throw createFailure(e); + } } } Modified: modules/test/trunk/unit/src/main/org/jboss/test/unit/pojo/TestHan= dlerSupportPOJOTest.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/test/unit/pojo/TestHandlerSu= pportPOJOTest.java 2007-10-02 18:18:13 UTC (rev 8515) +++ modules/test/trunk/unit/src/main/org/jboss/test/unit/pojo/TestHandlerSu= pportPOJOTest.java 2007-10-02 19:09:12 UTC (rev 8516) @@ -48,29 +48,29 @@ = public Set getParameterNames() { - return handler.getParameters().keySet(); + return handler.getDescriptor().getParameters().keySet(); } = public Set getTestCaseNames() { - return handler.getTestCases().keySet(); + return handler.getDescriptor().getTestCases().keySet(); } = public Set getKeywords() { - return handler.getKeywords(); + return handler.getDescriptor().getKeywords(); } = public Set getTestCaseKeywords(String testCaseName) { - TestCaseDescriptor descriptor =3D handler.getTestCases().get(testCas= eName); + TestCaseDescriptor descriptor =3D handler.getDescriptor().getTestCas= es().get(testCaseName); assertNotNull(descriptor); return descriptor.getKeywords(); } = public Set getTestCaseParameterNames(String testCaseName) { - TestCaseDescriptor descriptor =3D handler.getTestCases().get(testCas= eName); + TestCaseDescriptor descriptor =3D handler.getDescriptor().getTestCas= es().get(testCaseName); assertNotNull(descriptor); return descriptor.getParameters().keySet(); } @@ -81,11 +81,11 @@ boolean invokeDestroy =3D false; try { - testCase =3D handler.newTestCase(testName); - handler.testCaseParametrize(testCase, parametrization); + testCase =3D handler.getLifeCycle().newTestCase(testName); + handler.getLifeCycle().testCaseParametrize(testCase, parametrizat= ion); invokeDestroy =3D true; - handler.testCaseCreate(testCase); - handler.testCaseInvoke(testCase); + handler.getLifeCycle().testCaseCreate(testCase); + handler.getLifeCycle().testCaseInvoke(testCase); return InvokeResult.PASS; } catch (TestCaseLifeCycleException e) @@ -104,7 +104,7 @@ { if (invokeDestroy) { - handler.testCaseDestroy(testCase); + handler.getLifeCycle().testCaseDestroy(testCase); } } } Added: modules/test/trunk/unit/src/main/org/jboss/test/unit/pojo/junit/JUni= tPOJOTests.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/test/unit/pojo/junit/JUnitPO= JOTests.java (rev 0) +++ modules/test/trunk/unit/src/main/org/jboss/test/unit/pojo/junit/JUnitPO= JOTests.java 2007-10-02 19:09:12 UTC (rev 8516) @@ -0,0 +1,151 @@ +/*************************************************************************= ***** + * JBoss, a division of Red Hat = * + * Copyright 2006, Red Hat Middleware, LLC, and individual = * + * contributors as indicated by the @authors tag. See the = * + * copyright.txt in the distribution for a full listing of = * + * individual contributors. = * + * = * + * This is free software; you can redistribute it and/or modify it = * + * under the terms of the GNU Lesser General Public License as = * + * published by the Free Software Foundation; either version 2.1 of = * + * the License, or (at your option) any later version. = * + * = * + * This software is distributed in the hope that it will be useful, = * + * but WITHOUT ANY WARRANTY; without even the implied warranty of = * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU = * + * Lesser General Public License for more details. = * + * = * + * You should have received a copy of the GNU Lesser General Public = * + * License along with this software; if not, write to the Free = * + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA = * + * 02110-1301 USA, or see the FSF site: http://www.fsf.org. = * + *************************************************************************= *****/ +package org.jboss.test.unit.pojo.junit; + +import org.jboss.unit.unit.pojo.POJOTestSuiteDriver; + +import static org.jboss.unit.util.CollectionTools.*; +import static org.jboss.unit.api.Assert.*; +import org.jboss.unit.TestId; +import org.jboss.unit.Failure; +import org.jboss.unit.FailureType; +import org.jboss.unit.info.TestInfo; +import org.jboss.unit.info.TestSuiteInfo; +import org.jboss.unit.driver.command.StartTestCommand; +import org.jboss.unit.driver.DriverResponse; +import org.jboss.unit.driver.response.FailureResponse; +import org.jboss.unit.driver.response.EndTestResponse; + +import java.util.HashMap; +import java.util.HashSet; + +/** + * @author Julien Viet + * @version $Revision: 1.1 $ + */ +public class JUnitPOJOTests +{ + + public static void main(String[] args) + { + test1(); + test2(); + test3(); + test4(); + } + + private static void test1() + { + POJOTestSuiteDriver driver =3D createDriver(JUnitTest1.class); + TestInfo driverInfo =3D driver.getInfo(); + TestSuiteInfo suiteInfo =3D assertInstanceOf(driverInfo, TestSuiteIn= fo.class); + assertEquals(JUnitTest1.class.getName(), suiteInfo.getName()); + assertEquals(new HashMap(), suiteInfo.getParameters()); + assertEquals(new HashSet(), suiteInfo.getNames()); + + // Try to invoke a no op + DriverResponse response =3D driver.invoke(new TestId("foo"), new Sta= rtTestCommand()); + FailureResponse failureResponse =3D assertInstanceOf(response, Failu= reResponse.class); + Failure failure =3D failureResponse.getFailure(); + assertEquals(FailureType.ERROR, failure.getType()); + } + + private static void test2() + { + POJOTestSuiteDriver driver =3D createDriver(JUnitTest2.class); + TestInfo driverInfo =3D driver.getInfo(); + TestSuiteInfo suiteInfo =3D assertInstanceOf(driverInfo, TestSuiteIn= fo.class); + assertEquals(JUnitTest2.class.getName(), suiteInfo.getName()); + assertEquals(new HashMap(), suiteInfo.getParameters()); + assertEquals(set("testBlah"), suiteInfo.getNames()); + + // Try to invoke a no op + DriverResponse response =3D driver.invoke(new TestId("testBlah"), ne= w StartTestCommand()); + assertInstanceOf(response, EndTestResponse.class); + } + + private static void test3() + { + POJOTestSuiteDriver driver =3D createDriver(JUnitTest3.class); + TestInfo driverInfo =3D driver.getInfo(); + TestSuiteInfo suiteInfo =3D assertInstanceOf(driverInfo, TestSuiteIn= fo.class); + assertEquals(JUnitTest3.class.getName(), suiteInfo.getName()); + assertEquals(new HashMap(), suiteInfo.getParameters()); + assertEquals(set("testBlah"), suiteInfo.getNames()); + + // Try to invoke a no op + DriverResponse response =3D driver.invoke(new TestId("testBlah"), ne= w StartTestCommand()); + FailureResponse failureResponse =3D assertInstanceOf(response, Failu= reResponse.class); + Failure failure =3D failureResponse.getFailure(); + assertEquals(FailureType.ERROR, failure.getType()); + } + + private static void test4() + { + POJOTestSuiteDriver driver =3D createDriver(JUnitTest4.class); + TestInfo driverInfo =3D driver.getInfo(); + TestSuiteInfo suiteInfo =3D assertInstanceOf(driverInfo, TestSuiteIn= fo.class); + assertEquals(JUnitTest4.class.getName(), suiteInfo.getName()); + assertEquals(new HashMap(), suiteInfo.getParameters()); + assertEquals(set("testBlah"), suiteInfo.getNames()); + + // Try to invoke a no op + DriverResponse response =3D driver.invoke(new TestId("testBlah"), ne= w StartTestCommand()); + FailureResponse failureResponse =3D assertInstanceOf(response, Failu= reResponse.class); + Failure failure =3D failureResponse.getFailure(); + assertEquals(FailureType.ERROR, failure.getType()); + } + + private static void test5() + { + POJOTestSuiteDriver driver =3D createDriver(JUnitTest5.class); + TestInfo driverInfo =3D driver.getInfo(); + TestSuiteInfo suiteInfo =3D assertInstanceOf(driverInfo, TestSuiteIn= fo.class); + assertEquals(JUnitTest5.class.getName(), suiteInfo.getName()); + assertEquals(new HashMap(), suiteInfo.getParameters()); + assertEquals(set("testBlah"), suiteInfo.getNames()); + + // Try to invoke a no op + DriverResponse response =3D driver.invoke(new TestId("testBlah"), ne= w StartTestCommand()); + FailureResponse failureResponse =3D assertInstanceOf(response, Failu= reResponse.class); + Failure failure =3D failureResponse.getFailure(); + assertEquals(FailureType.ERROR, failure.getType()); + } + + private static POJOTestSuiteDriver createDriver(Class clazz) + { + try + { + return new POJOTestSuiteDriver(clazz); + } + catch (InstantiationException e) + { + throw createFailure(e); + } + catch (IllegalAccessException e) + { + throw createFailure(e); + } + } + +} Added: modules/test/trunk/unit/src/main/org/jboss/test/unit/pojo/junit/JUni= tTest1.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/test/unit/pojo/junit/JUnitTe= st1.java (rev 0) +++ modules/test/trunk/unit/src/main/org/jboss/test/unit/pojo/junit/JUnitTe= st1.java 2007-10-02 19:09:12 UTC (rev 8516) @@ -0,0 +1,33 @@ +/*************************************************************************= ***** + * JBoss, a division of Red Hat = * + * Copyright 2006, Red Hat Middleware, LLC, and individual = * + * contributors as indicated by the @authors tag. See the = * + * copyright.txt in the distribution for a full listing of = * + * individual contributors. = * + * = * + * This is free software; you can redistribute it and/or modify it = * + * under the terms of the GNU Lesser General Public License as = * + * published by the Free Software Foundation; either version 2.1 of = * + * the License, or (at your option) any later version. = * + * = * + * This software is distributed in the hope that it will be useful, = * + * but WITHOUT ANY WARRANTY; without even the implied warranty of = * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU = * + * Lesser General Public License for more details. = * + * = * + * You should have received a copy of the GNU Lesser General Public = * + * License along with this software; if not, write to the Free = * + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA = * + * 02110-1301 USA, or see the FSF site: http://www.fsf.org. = * + *************************************************************************= *****/ +package org.jboss.test.unit.pojo.junit; + +import org.jboss.unit.api.pojo.junit.TestCase; + +/** + * @author Julien Viet + * @version $Revision: 1.1 $ + */ +public class JUnitTest1 extends TestCase +{ +} Added: modules/test/trunk/unit/src/main/org/jboss/test/unit/pojo/junit/JUni= tTest2.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/test/unit/pojo/junit/JUnitTe= st2.java (rev 0) +++ modules/test/trunk/unit/src/main/org/jboss/test/unit/pojo/junit/JUnitTe= st2.java 2007-10-02 19:09:12 UTC (rev 8516) @@ -0,0 +1,39 @@ +/*************************************************************************= ***** + * JBoss, a division of Red Hat = * + * Copyright 2006, Red Hat Middleware, LLC, and individual = * + * contributors as indicated by the @authors tag. See the = * + * copyright.txt in the distribution for a full listing of = * + * individual contributors. = * + * = * + * This is free software; you can redistribute it and/or modify it = * + * under the terms of the GNU Lesser General Public License as = * + * published by the Free Software Foundation; either version 2.1 of = * + * the License, or (at your option) any later version. = * + * = * + * This software is distributed in the hope that it will be useful, = * + * but WITHOUT ANY WARRANTY; without even the implied warranty of = * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU = * + * Lesser General Public License for more details. = * + * = * + * You should have received a copy of the GNU Lesser General Public = * + * License along with this software; if not, write to the Free = * + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA = * + * 02110-1301 USA, or see the FSF site: http://www.fsf.org. = * + *************************************************************************= *****/ +package org.jboss.test.unit.pojo.junit; + +import org.jboss.unit.api.pojo.junit.TestCase; + +/** + * @author Julien Viet + * @version $Revision: 1.1 $ + */ +public class JUnitTest2 extends TestCase +{ + + public void testBlah() + { + = + } + +} Added: modules/test/trunk/unit/src/main/org/jboss/test/unit/pojo/junit/JUni= tTest3.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/test/unit/pojo/junit/JUnitTe= st3.java (rev 0) +++ modules/test/trunk/unit/src/main/org/jboss/test/unit/pojo/junit/JUnitTe= st3.java 2007-10-02 19:09:12 UTC (rev 8516) @@ -0,0 +1,39 @@ +/*************************************************************************= ***** + * JBoss, a division of Red Hat = * + * Copyright 2006, Red Hat Middleware, LLC, and individual = * + * contributors as indicated by the @authors tag. See the = * + * copyright.txt in the distribution for a full listing of = * + * individual contributors. = * + * = * + * This is free software; you can redistribute it and/or modify it = * + * under the terms of the GNU Lesser General Public License as = * + * published by the Free Software Foundation; either version 2.1 of = * + * the License, or (at your option) any later version. = * + * = * + * This software is distributed in the hope that it will be useful, = * + * but WITHOUT ANY WARRANTY; without even the implied warranty of = * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU = * + * Lesser General Public License for more details. = * + * = * + * You should have received a copy of the GNU Lesser General Public = * + * License along with this software; if not, write to the Free = * + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA = * + * 02110-1301 USA, or see the FSF site: http://www.fsf.org. = * + *************************************************************************= *****/ +package org.jboss.test.unit.pojo.junit; + +import org.jboss.unit.api.pojo.junit.TestCase; + +/** + * @author Julien Viet + * @version $Revision: 1.1 $ + */ +public class JUnitTest3 extends TestCase +{ + + public void testBlah() + { + throw new RuntimeException(); + } + +} Added: modules/test/trunk/unit/src/main/org/jboss/test/unit/pojo/junit/JUni= tTest4.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/test/unit/pojo/junit/JUnitTe= st4.java (rev 0) +++ modules/test/trunk/unit/src/main/org/jboss/test/unit/pojo/junit/JUnitTe= st4.java 2007-10-02 19:09:12 UTC (rev 8516) @@ -0,0 +1,39 @@ +/*************************************************************************= ***** + * JBoss, a division of Red Hat = * + * Copyright 2006, Red Hat Middleware, LLC, and individual = * + * contributors as indicated by the @authors tag. See the = * + * copyright.txt in the distribution for a full listing of = * + * individual contributors. = * + * = * + * This is free software; you can redistribute it and/or modify it = * + * under the terms of the GNU Lesser General Public License as = * + * published by the Free Software Foundation; either version 2.1 of = * + * the License, or (at your option) any later version. = * + * = * + * This software is distributed in the hope that it will be useful, = * + * but WITHOUT ANY WARRANTY; without even the implied warranty of = * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU = * + * Lesser General Public License for more details. = * + * = * + * You should have received a copy of the GNU Lesser General Public = * + * License along with this software; if not, write to the Free = * + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA = * + * 02110-1301 USA, or see the FSF site: http://www.fsf.org. = * + *************************************************************************= *****/ +package org.jboss.test.unit.pojo.junit; + +import org.jboss.unit.api.pojo.junit.TestCase; + +/** + * @author Julien Viet + * @version $Revision: 1.1 $ + */ +public class JUnitTest4 extends TestCase +{ + + public void testBlah() throws Exception + { + throw new Exception(); + } + +} Added: modules/test/trunk/unit/src/main/org/jboss/test/unit/pojo/junit/JUni= tTest5.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/test/unit/pojo/junit/JUnitTe= st5.java (rev 0) +++ modules/test/trunk/unit/src/main/org/jboss/test/unit/pojo/junit/JUnitTe= st5.java 2007-10-02 19:09:12 UTC (rev 8516) @@ -0,0 +1,39 @@ +/*************************************************************************= ***** + * JBoss, a division of Red Hat = * + * Copyright 2006, Red Hat Middleware, LLC, and individual = * + * contributors as indicated by the @authors tag. See the = * + * copyright.txt in the distribution for a full listing of = * + * individual contributors. = * + * = * + * This is free software; you can redistribute it and/or modify it = * + * under the terms of the GNU Lesser General Public License as = * + * published by the Free Software Foundation; either version 2.1 of = * + * the License, or (at your option) any later version. = * + * = * + * This software is distributed in the hope that it will be useful, = * + * but WITHOUT ANY WARRANTY; without even the implied warranty of = * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU = * + * Lesser General Public License for more details. = * + * = * + * You should have received a copy of the GNU Lesser General Public = * + * License along with this software; if not, write to the Free = * + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA = * + * 02110-1301 USA, or see the FSF site: http://www.fsf.org. = * + *************************************************************************= *****/ +package org.jboss.test.unit.pojo.junit; + +import org.jboss.unit.api.pojo.junit.TestCase; + +/** + * @author Julien Viet + * @version $Revision: 1.1 $ + */ +public class JUnitTest5 extends TestCase +{ + + public void testBlah() + { + throw new Error(); + } + +} Added: modules/test/trunk/unit/src/main/org/jboss/test/unit/pojo/junit/JUni= tTest6.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/test/unit/pojo/junit/JUnitTe= st6.java (rev 0) +++ modules/test/trunk/unit/src/main/org/jboss/test/unit/pojo/junit/JUnitTe= st6.java 2007-10-02 19:09:12 UTC (rev 8516) @@ -0,0 +1,32 @@ +/*************************************************************************= ***** + * JBoss, a division of Red Hat = * + * Copyright 2006, Red Hat Middleware, LLC, and individual = * + * contributors as indicated by the @authors tag. See the = * + * copyright.txt in the distribution for a full listing of = * + * individual contributors. = * + * = * + * This is free software; you can redistribute it and/or modify it = * + * under the terms of the GNU Lesser General Public License as = * + * published by the Free Software Foundation; either version 2.1 of = * + * the License, or (at your option) any later version. = * + * = * + * This software is distributed in the hope that it will be useful, = * + * but WITHOUT ANY WARRANTY; without even the implied warranty of = * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU = * + * Lesser General Public License for more details. = * + * = * + * You should have received a copy of the GNU Lesser General Public = * + * License along with this software; if not, write to the Free = * + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA = * + * 02110-1301 USA, or see the FSF site: http://www.fsf.org. = * + *************************************************************************= *****/ +package org.jboss.test.unit.pojo.junit; + +/** + * @author Julien Viet + * @version $Revision: 1.1 $ + */ +public class JUnitTest6 +{ + = +} Modified: modules/test/trunk/unit/src/main/org/jboss/unit/Failure.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/Failure.java 2007-10-02= 18:18:13 UTC (rev 8515) +++ modules/test/trunk/unit/src/main/org/jboss/unit/Failure.java 2007-10-02= 19:09:12 UTC (rev 8516) @@ -71,7 +71,7 @@ return cause; } = - public FailureType getLevel() + public FailureType getType() { return type; } Modified: modules/test/trunk/unit/src/main/org/jboss/unit/FailureType.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/FailureType.java 2007-1= 0-02 18:18:13 UTC (rev 8515) +++ modules/test/trunk/unit/src/main/org/jboss/unit/FailureType.java 2007-1= 0-02 19:09:12 UTC (rev 8516) @@ -30,9 +30,7 @@ */ public enum FailureType { - ERROR, ASSERTION, - = - + INTERNAL_ERROR } Modified: modules/test/trunk/unit/src/main/org/jboss/unit/api/Assert.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/api/Assert.java 2007-10= -02 18:18:13 UTC (rev 8515) +++ modules/test/trunk/unit/src/main/org/jboss/unit/api/Assert.java 2007-10= -02 19:09:12 UTC (rev 8516) @@ -253,7 +253,7 @@ = public static Error createFailure() { - return createFailure(null); + return createFailure((String)null); } = public static Error createFailure(String msg) @@ -261,6 +261,11 @@ return createAssertionError(null, msg); } = + public static Error createFailure(Throwable throwable) + { + return createAssertionError(throwable, null); + } + public static Error createAssertionError(Throwable cause, String msg) { if (msg =3D=3D null) Modified: modules/test/trunk/unit/src/main/org/jboss/unit/api/pojo/TestHand= ler.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/api/pojo/TestHandler.ja= va 2007-10-02 18:18:13 UTC (rev 8515) +++ modules/test/trunk/unit/src/main/org/jboss/unit/api/pojo/TestHandler.ja= va 2007-10-02 19:09:12 UTC (rev 8516) @@ -22,12 +22,6 @@ *************************************************************************= *****/ package org.jboss.unit.api.pojo; = -import org.jboss.unit.api.pojo.ParameterDescriptor; -import org.jboss.unit.api.pojo.TestCaseDescriptor; - -import java.util.Map; -import java.util.Set; - /** * Allow a pojo class to take care of providing its description and perfor= m test case life cycle management. * @@ -37,80 +31,8 @@ public interface TestHandler { = - /** - * Return the test name. - * - * @return the test name - */ - String getName(); + TestSuiteDescriptor getDescriptor(); = - /** - * Return the test description. - * - * @return the test description - */ - String getDescription(); + TestLifeCycle getLifeCycle(); = - /** - * Returns the keywords for the test. - * - * @return the test keywords - */ - Set getKeywords(); - - /** - * Return the test parameters. - * - * @return the test parameters - */ - Map getParameters(); - - /** - * Return the test case descriptions. - * - * @return the test case descriptions - */ - Map getTestCases(); - - /** - * Instantiate life cycle operation of a test case. - * - * @param name the test case name - * @return the test case object - * @throws TestCaseLifeCycleException - */ - Object newTestCase(String name) throws TestCaseLifeCycleException; - - /** - * Parametrize life cycle operation of a test case. - * - * @param testCase the test case - * @param parametrization the parametrization - * @throws TestCaseLifeCycleException - */ - void testCaseParametrize(Object testCase, Map parametriz= ation) throws TestCaseLifeCycleException; - - /** - * Create life cycle operation of a test case. - * - * @param testCase the test case - * @throws TestCaseLifeCycleException - */ - void testCaseCreate(Object testCase) throws TestCaseLifeCycleException; - - /** - * Invocation life cycle operation of a test case. - * - * @param testCase the test case - * @throws TestCaseLifeCycleException - */ - void testCaseInvoke(Object testCase) throws TestCaseLifeCycleException; - - /** - * Destroy life cycle operation of a test case. - * - * @param testCase the test case - */ - void testCaseDestroy(Object testCase); - } Modified: modules/test/trunk/unit/src/main/org/jboss/unit/api/pojo/TestHand= lerSupport.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/api/pojo/TestHandlerSup= port.java 2007-10-02 18:18:13 UTC (rev 8515) +++ modules/test/trunk/unit/src/main/org/jboss/unit/api/pojo/TestHandlerSup= port.java 2007-10-02 19:09:12 UTC (rev 8516) @@ -54,7 +54,7 @@ * @author Julien Viet * @version $Revision: 1.1 $ */ -public class TestHandlerSupport implements TestHandler +public class TestHandlerSupport implements TestHandler, TestLifeCycle, Tes= tSuiteDescriptor { = /** . */ @@ -421,6 +421,16 @@ this.destroy =3D destroy; } = + public TestSuiteDescriptor getDescriptor() + { + return this; + } + + public TestLifeCycle getLifeCycle() + { + return this; + } + public String getName() { return suiteName; Added: modules/test/trunk/unit/src/main/org/jboss/unit/api/pojo/TestLifeCyc= le.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/api/pojo/TestLifeCycle.= java (rev 0) +++ modules/test/trunk/unit/src/main/org/jboss/unit/api/pojo/TestLifeCycle.= java 2007-10-02 19:09:12 UTC (rev 8516) @@ -0,0 +1,75 @@ +/*************************************************************************= ***** + * JBoss, a division of Red Hat = * + * Copyright 2006, Red Hat Middleware, LLC, and individual = * + * contributors as indicated by the @authors tag. See the = * + * copyright.txt in the distribution for a full listing of = * + * individual contributors. = * + * = * + * This is free software; you can redistribute it and/or modify it = * + * under the terms of the GNU Lesser General Public License as = * + * published by the Free Software Foundation; either version 2.1 of = * + * the License, or (at your option) any later version. = * + * = * + * This software is distributed in the hope that it will be useful, = * + * but WITHOUT ANY WARRANTY; without even the implied warranty of = * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU = * + * Lesser General Public License for more details. = * + * = * + * You should have received a copy of the GNU Lesser General Public = * + * License along with this software; if not, write to the Free = * + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA = * + * 02110-1301 USA, or see the FSF site: http://www.fsf.org. = * + *************************************************************************= *****/ +package org.jboss.unit.api.pojo; + +import java.util.Map; + +/** + * @author Julien Viet + * @version $Revision: 1.1 $ + */ +public interface TestLifeCycle +{ + + /** + * Instantiate life cycle operation of a test case. + * + * @param name the test case name + * @return the test case object + * @throws TestCaseLifeCycleException + */ + Object newTestCase(String name) throws TestCaseLifeCycleException; + + /** + * Parametrize life cycle operation of a test case. + * + * @param testCase the test case + * @param parametrization the parametrization + * @throws TestCaseLifeCycleException + */ + void testCaseParametrize(Object testCase, Map parametriz= ation) throws TestCaseLifeCycleException; + + /** + * Create life cycle operation of a test case. + * + * @param testCase the test case + * @throws TestCaseLifeCycleException + */ + void testCaseCreate(Object testCase) throws TestCaseLifeCycleException; + + /** + * Invocation life cycle operation of a test case. + * + * @param testCase the test case + * @throws TestCaseLifeCycleException + */ + void testCaseInvoke(Object testCase) throws TestCaseLifeCycleException; + + /** + * Destroy life cycle operation of a test case. + * + * @param testCase the test case + */ + void testCaseDestroy(Object testCase); + +} Added: modules/test/trunk/unit/src/main/org/jboss/unit/api/pojo/TestSuiteDe= scriptor.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/api/pojo/TestSuiteDescr= iptor.java (rev 0) +++ modules/test/trunk/unit/src/main/org/jboss/unit/api/pojo/TestSuiteDescr= iptor.java 2007-10-02 19:09:12 UTC (rev 8516) @@ -0,0 +1,70 @@ +/*************************************************************************= ***** + * JBoss, a division of Red Hat = * + * Copyright 2006, Red Hat Middleware, LLC, and individual = * + * contributors as indicated by the @authors tag. See the = * + * copyright.txt in the distribution for a full listing of = * + * individual contributors. = * + * = * + * This is free software; you can redistribute it and/or modify it = * + * under the terms of the GNU Lesser General Public License as = * + * published by the Free Software Foundation; either version 2.1 of = * + * the License, or (at your option) any later version. = * + * = * + * This software is distributed in the hope that it will be useful, = * + * but WITHOUT ANY WARRANTY; without even the implied warranty of = * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU = * + * Lesser General Public License for more details. = * + * = * + * You should have received a copy of the GNU Lesser General Public = * + * License along with this software; if not, write to the Free = * + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA = * + * 02110-1301 USA, or see the FSF site: http://www.fsf.org. = * + *************************************************************************= *****/ +package org.jboss.unit.api.pojo; + +import java.util.Set; +import java.util.Map; + +/** + * @author Julien Viet + * @version $Revision: 1.1 $ + */ +public interface TestSuiteDescriptor +{ + + /** + * Return the test name. + * + * @return the test name + */ + String getName(); + + /** + * Return the test description. + * + * @return the test description + */ + String getDescription(); + + /** + * Returns the keywords for the test. + * + * @return the test keywords + */ + Set getKeywords(); + + /** + * Return the test parameters. + * + * @return the test parameters + */ + Map getParameters(); + + /** + * Return the test case descriptions. + * + * @return the test case descriptions + */ + Map getTestCases(); + +} Added: modules/test/trunk/unit/src/main/org/jboss/unit/api/pojo/junit/JUnit= Descriptor.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/api/pojo/junit/JUnitDes= criptor.java (rev 0) +++ modules/test/trunk/unit/src/main/org/jboss/unit/api/pojo/junit/JUnitDes= criptor.java 2007-10-02 19:09:12 UTC (rev 8516) @@ -0,0 +1,128 @@ +/*************************************************************************= ***** + * JBoss, a division of Red Hat = * + * Copyright 2006, Red Hat Middleware, LLC, and individual = * + * contributors as indicated by the @authors tag. See the = * + * copyright.txt in the distribution for a full listing of = * + * individual contributors. = * + * = * + * This is free software; you can redistribute it and/or modify it = * + * under the terms of the GNU Lesser General Public License as = * + * published by the Free Software Foundation; either version 2.1 of = * + * the License, or (at your option) any later version. = * + * = * + * This software is distributed in the hope that it will be useful, = * + * but WITHOUT ANY WARRANTY; without even the implied warranty of = * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU = * + * Lesser General Public License for more details. = * + * = * + * You should have received a copy of the GNU Lesser General Public = * + * License along with this software; if not, write to the Free = * + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA = * + * 02110-1301 USA, or see the FSF site: http://www.fsf.org. = * + *************************************************************************= *****/ +package org.jboss.unit.api.pojo.junit; + +import org.jboss.unit.api.pojo.TestSuiteDescriptor; +import org.jboss.unit.api.pojo.ParameterDescriptor; +import org.jboss.unit.api.pojo.TestCaseDescriptor; + +import java.util.Map; +import java.util.Set; +import java.util.Collections; +import java.util.Iterator; +import java.util.HashMap; +import java.lang.reflect.Method; +import java.lang.reflect.Modifier; + +/** + * @author Julien Viet + * @version $Revision: 1.1 $ + */ +class JUnitDescriptor implements TestSuiteDescriptor +{ + + /** . */ + final Class testClass; + + /** . */ + final Map testMap; + + public JUnitDescriptor(Class testClass) + { + this.testClass =3D testClass; + this.testMap =3D new HashMap(); + + // + try + { + Method[] methods =3D testClass.getMethods(); + for (int j =3D 0; j < methods.length; j++) + { + Method method =3D methods[j]; + + // + int modifiers =3D method.getModifiers(); + if (Modifier.isPublic(modifiers) && !Modifier.isAbstract(modif= iers) && !Modifier.isStatic(modifiers)) + { + String methodName =3D method.getName(); + if (methodName.startsWith("test") && + method.getParameterTypes().length =3D=3D 0) + { + JUnitTestMethod tm =3D new JUnitTestMethod(method); + testMap.put(method.getName(), tm); + } +// else if (methodName.startsWith("set") && +// methodName.endsWith("Parameter") && +// method.getParameterTypes().length =3D=3D 1) +// { +// String parameterName =3D methodName.substring(3, metho= dName.length() - 9); +// setterMap.put(parameterName, method); +// } + } + } + + // Set all parameters on children +// for (Iterator i =3D setterMap.keySet().iterator(); i.hasNext();) +// { +// String parameterName =3D (String)i.next(); +// for (Iterator j =3D testMap.keySet().iterator(); j.hasNext()= ;) +// { +// String childName =3D (String)j.next(); +// TestInfo childInfo =3D (TestInfo)containerInfo.getChild(c= hildName); +// childInfo.addParameter(new TestParameterInfo(parameterNam= e)); +// } +// } + } + catch (Exception e) + { + IllegalArgumentException iae =3D new IllegalArgumentException(); + iae.initCause(e); + throw iae; + } + } + + public String getName() + { + return testClass.getName(); + } + + public String getDescription() + { + return ""; + } + + public Set getKeywords() + { + return Collections.emptySet(); + } + + public Map getParameters() + { + return Collections.emptyMap(); + } + + public Map getTestCases() + { + return Collections.unmodifiableMap(testMap); + } +} Added: modules/test/trunk/unit/src/main/org/jboss/unit/api/pojo/junit/JUnit= LifeCycle.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/api/pojo/junit/JUnitLif= eCycle.java (rev 0) +++ modules/test/trunk/unit/src/main/org/jboss/unit/api/pojo/junit/JUnitLif= eCycle.java 2007-10-02 19:09:12 UTC (rev 8516) @@ -0,0 +1,111 @@ +/*************************************************************************= ***** + * JBoss, a division of Red Hat = * + * Copyright 2006, Red Hat Middleware, LLC, and individual = * + * contributors as indicated by the @authors tag. See the = * + * copyright.txt in the distribution for a full listing of = * + * individual contributors. = * + * = * + * This is free software; you can redistribute it and/or modify it = * + * under the terms of the GNU Lesser General Public License as = * + * published by the Free Software Foundation; either version 2.1 of = * + * the License, or (at your option) any later version. = * + * = * + * This software is distributed in the hope that it will be useful, = * + * but WITHOUT ANY WARRANTY; without even the implied warranty of = * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU = * + * Lesser General Public License for more details. = * + * = * + * You should have received a copy of the GNU Lesser General Public = * + * License along with this software; if not, write to the Free = * + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA = * + * 02110-1301 USA, or see the FSF site: http://www.fsf.org. = * + *************************************************************************= *****/ +package org.jboss.unit.api.pojo.junit; + +import org.jboss.unit.api.pojo.TestLifeCycle; +import org.jboss.unit.api.pojo.TestCaseLifeCycleException; + +import java.util.Map; +import java.lang.reflect.InvocationTargetException; + +/** + * @author Julien Viet + * @version $Revision: 1.1 $ + */ +class JUnitLifeCycle implements TestLifeCycle +{ + + /** . */ + private final TestCase testCase; + + public JUnitLifeCycle(TestCase testCase) + { + this.testCase =3D testCase; + } + + public Object newTestCase(String name) throws TestCaseLifeCycleException + { + JUnitTestMethod method =3D testCase.descriptor.testMap.get(name); + if (method =3D=3D null) + { + throw new TestCaseLifeCycleException("No test case " + name + " f= ound"); + } + return new JUnitTestMethodLifeCycle(method); + } + + public void testCaseParametrize(Object _lifeCycle, Map = parametrization) throws TestCaseLifeCycleException + { + // No op + } + + public void testCaseCreate(Object _lifeCycle) throws TestCaseLifeCycleE= xception + { + try + { + testCase.setUp(); + } + catch (Throwable e) + { + throw unwrap(e); + } + } + + public void testCaseInvoke(Object _lifeCycle) throws TestCaseLifeCycleE= xception + { + JUnitTestMethodLifeCycle lifeCycle =3D (JUnitTestMethodLifeCycle)_li= feCycle; + + // Invoke test joinpoint + try + { + lifeCycle.testMethod.method.invoke(testCase, new Object[0]); + } + catch (IllegalAccessException e) + { + throw unwrap(e); + } + catch (InvocationTargetException e) + { + throw unwrap(e.getCause()); + } + } + + private TestCaseLifeCycleException unwrap(Throwable throwable) + { + // Look if it's an assertion failure from junit API + for (Class clazz =3D throwable.getClass();clazz !=3D null;clazz =3D = clazz.getSuperclass()) + { + if ("junit.framework.AssertionFailedError".equals(clazz.getName()= )) + { + return new TestCaseLifeCycleException(new AssertionError(throw= able)); + } + } + + // + return new TestCaseLifeCycleException(throwable); + } + + public void testCaseDestroy(Object _testCase) + { + testCase.tearDown(); + } +} Deleted: modules/test/trunk/unit/src/main/org/jboss/unit/api/pojo/junit/JUn= itTestHandler.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/api/pojo/junit/JUnitTes= tHandler.java 2007-10-02 18:18:13 UTC (rev 8515) +++ modules/test/trunk/unit/src/main/org/jboss/unit/api/pojo/junit/JUnitTes= tHandler.java 2007-10-02 19:09:12 UTC (rev 8516) @@ -1,33 +0,0 @@ -/*************************************************************************= ***** - * JBoss, a division of Red Hat = * - * Copyright 2006, Red Hat Middleware, LLC, and individual = * - * contributors as indicated by the @authors tag. See the = * - * copyright.txt in the distribution for a full listing of = * - * individual contributors. = * - * = * - * This is free software; you can redistribute it and/or modify it = * - * under the terms of the GNU Lesser General Public License as = * - * published by the Free Software Foundation; either version 2.1 of = * - * the License, or (at your option) any later version. = * - * = * - * This software is distributed in the hope that it will be useful, = * - * but WITHOUT ANY WARRANTY; without even the implied warranty of = * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU = * - * Lesser General Public License for more details. = * - * = * - * You should have received a copy of the GNU Lesser General Public = * - * License along with this software; if not, write to the Free = * - * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA = * - * 02110-1301 USA, or see the FSF site: http://www.fsf.org. = * - *************************************************************************= *****/ -package org.jboss.unit.api.pojo.junit; - -/** - * @todo - * - * @author Julien Viet - * @version $Revision: 1.1 $ - */ -public class JUnitTestHandler -{ -} Added: modules/test/trunk/unit/src/main/org/jboss/unit/api/pojo/junit/JUnit= TestMethod.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/api/pojo/junit/JUnitTes= tMethod.java (rev 0) +++ modules/test/trunk/unit/src/main/org/jboss/unit/api/pojo/junit/JUnitTes= tMethod.java 2007-10-02 19:09:12 UTC (rev 8516) @@ -0,0 +1,67 @@ +/*************************************************************************= ***** + * JBoss, a division of Red Hat = * + * Copyright 2006, Red Hat Middleware, LLC, and individual = * + * contributors as indicated by the @authors tag. See the = * + * copyright.txt in the distribution for a full listing of = * + * individual contributors. = * + * = * + * This is free software; you can redistribute it and/or modify it = * + * under the terms of the GNU Lesser General Public License as = * + * published by the Free Software Foundation; either version 2.1 of = * + * the License, or (at your option) any later version. = * + * = * + * This software is distributed in the hope that it will be useful, = * + * but WITHOUT ANY WARRANTY; without even the implied warranty of = * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU = * + * Lesser General Public License for more details. = * + * = * + * You should have received a copy of the GNU Lesser General Public = * + * License along with this software; if not, write to the Free = * + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA = * + * 02110-1301 USA, or see the FSF site: http://www.fsf.org. = * + *************************************************************************= *****/ +package org.jboss.unit.api.pojo.junit; + +import org.jboss.unit.api.pojo.TestCaseDescriptor; +import org.jboss.unit.api.pojo.ParameterDescriptor; + +import java.util.Map; +import java.util.Set; +import java.util.Collections; +import java.lang.reflect.Method; + +/** + * @author Julien Viet + * @version $Revision: 1.1 $ + */ +class JUnitTestMethod implements TestCaseDescriptor +{ + + /** . */ + final Method method; + + public JUnitTestMethod(Method method) + { + this.method =3D method; + } + + public String getName() + { + return method.getName(); + } + + public String getDescription() + { + return ""; + } + + public Map getParameters() + { + return Collections.emptyMap(); + } + + public Set getKeywords() + { + return Collections.emptySet(); + } +} Added: modules/test/trunk/unit/src/main/org/jboss/unit/api/pojo/junit/JUnit= TestMethodLifeCycle.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/api/pojo/junit/JUnitTes= tMethodLifeCycle.java (rev 0) +++ modules/test/trunk/unit/src/main/org/jboss/unit/api/pojo/junit/JUnitTes= tMethodLifeCycle.java 2007-10-02 19:09:12 UTC (rev 8516) @@ -0,0 +1,39 @@ +/*************************************************************************= ***** + * JBoss, a division of Red Hat = * + * Copyright 2006, Red Hat Middleware, LLC, and individual = * + * contributors as indicated by the @authors tag. See the = * + * copyright.txt in the distribution for a full listing of = * + * individual contributors. = * + * = * + * This is free software; you can redistribute it and/or modify it = * + * under the terms of the GNU Lesser General Public License as = * + * published by the Free Software Foundation; either version 2.1 of = * + * the License, or (at your option) any later version. = * + * = * + * This software is distributed in the hope that it will be useful, = * + * but WITHOUT ANY WARRANTY; without even the implied warranty of = * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU = * + * Lesser General Public License for more details. = * + * = * + * You should have received a copy of the GNU Lesser General Public = * + * License along with this software; if not, write to the Free = * + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA = * + * 02110-1301 USA, or see the FSF site: http://www.fsf.org. = * + *************************************************************************= *****/ +package org.jboss.unit.api.pojo.junit; + +/** + * @author Julien Viet + * @version $Revision: 1.1 $ + */ +class JUnitTestMethodLifeCycle +{ + + /** . */ + final JUnitTestMethod testMethod; + + public JUnitTestMethodLifeCycle(JUnitTestMethod testMethod) + { + this.testMethod =3D testMethod; + } +} Added: modules/test/trunk/unit/src/main/org/jboss/unit/api/pojo/junit/TestC= ase.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/api/pojo/junit/TestCase= .java (rev 0) +++ modules/test/trunk/unit/src/main/org/jboss/unit/api/pojo/junit/TestCase= .java 2007-10-02 19:09:12 UTC (rev 8516) @@ -0,0 +1,67 @@ +/*************************************************************************= ***** + * JBoss, a division of Red Hat = * + * Copyright 2006, Red Hat Middleware, LLC, and individual = * + * contributors as indicated by the @authors tag. See the = * + * copyright.txt in the distribution for a full listing of = * + * individual contributors. = * + * = * + * This is free software; you can redistribute it and/or modify it = * + * under the terms of the GNU Lesser General Public License as = * + * published by the Free Software Foundation; either version 2.1 of = * + * the License, or (at your option) any later version. = * + * = * + * This software is distributed in the hope that it will be useful, = * + * but WITHOUT ANY WARRANTY; without even the implied warranty of = * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU = * + * Lesser General Public License for more details. = * + * = * + * You should have received a copy of the GNU Lesser General Public = * + * License along with this software; if not, write to the Free = * + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA = * + * 02110-1301 USA, or see the FSF site: http://www.fsf.org. = * + *************************************************************************= *****/ +package org.jboss.unit.api.pojo.junit; + +import org.jboss.unit.api.pojo.TestHandler; +import org.jboss.unit.api.pojo.TestSuiteDescriptor; +import org.jboss.unit.api.pojo.TestLifeCycle; + + +/** + * @todo + * + * @author Julien Viet + * @version $Revision: 1.1 $ + */ +public class TestCase implements TestHandler +{ + + /** . */ + final JUnitDescriptor descriptor; + + final JUnitLifeCycle lifeCycle; + + public TestCase() + { + descriptor =3D new JUnitDescriptor(getClass()); + lifeCycle =3D new JUnitLifeCycle(this); + } + + protected void setUp() + { + } + + protected void tearDown() + { + } + + public TestSuiteDescriptor getDescriptor() + { + return descriptor; + } + + public TestLifeCycle getLifeCycle() + { + return lifeCycle; + } +} Modified: modules/test/trunk/unit/src/main/org/jboss/unit/unit/pojo/POJOTes= tSuiteDriver.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/unit/pojo/POJOTestSuite= Driver.java 2007-10-02 18:18:13 UTC (rev 8515) +++ modules/test/trunk/unit/src/main/org/jboss/unit/unit/pojo/POJOTestSuite= Driver.java 2007-10-02 19:09:12 UTC (rev 8516) @@ -25,6 +25,7 @@ import org.jboss.unit.api.pojo.TestHandler; import org.jboss.unit.api.pojo.TestHandlerSupport; import org.jboss.unit.api.pojo.TestCaseLifeCycleException; +import org.jboss.unit.api.pojo.TestLifeCycle; import org.jboss.unit.driver.TestDriver; import org.jboss.unit.driver.DriverResponse; import org.jboss.unit.driver.DriverCommand; @@ -51,10 +52,18 @@ /** . */ private TestSuiteInfo info; = - public POJOTestSuiteDriver(Class testClass) + public POJOTestSuiteDriver(Class testClass) throws InstantiationExcepti= on, IllegalAccessException { - handler =3D new TestHandlerSupport(testClass); - info =3D new POJOTestSuiteInfo(handler); + if (TestHandler.class.isAssignableFrom(testClass)) + { + handler =3D (TestHandler)testClass.newInstance(); + } + else + { + handler =3D new TestHandlerSupport(testClass); + } + + info =3D new POJOTestSuiteInfo(handler.getDescriptor()); } = public TestInfo getInfo() @@ -75,13 +84,16 @@ } = // + TestLifeCycle lifeCycle =3D handler.getLifeCycle(); + + // String name =3D id.getName(0); = // Object pojo; try { - pojo =3D handler.newTestCase(name); + pojo =3D lifeCycle.newTestCase(name); } catch (Exception e) { @@ -94,7 +106,7 @@ // try { - handler.testCaseParametrize(pojo, parametrization); + lifeCycle.testCaseParametrize(pojo, parametrization); } catch (Exception e) { @@ -104,10 +116,10 @@ // try { - handler.testCaseCreate(pojo); + lifeCycle.testCaseCreate(pojo); = // - handler.testCaseInvoke(pojo); + lifeCycle.testCaseInvoke(pojo); } catch (Exception e) { @@ -115,7 +127,7 @@ } finally { - handler.testCaseDestroy(pojo); + lifeCycle.testCaseDestroy(pojo); } = // Modified: modules/test/trunk/unit/src/main/org/jboss/unit/unit/pojo/POJOTes= tSuiteInfo.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/unit/pojo/POJOTestSuite= Info.java 2007-10-02 18:18:13 UTC (rev 8515) +++ modules/test/trunk/unit/src/main/org/jboss/unit/unit/pojo/POJOTestSuite= Info.java 2007-10-02 19:09:12 UTC (rev 8516) @@ -22,8 +22,8 @@ *************************************************************************= *****/ package org.jboss.unit.unit.pojo; = -import org.jboss.unit.api.pojo.TestHandler; import org.jboss.unit.api.pojo.TestCaseDescriptor; +import org.jboss.unit.api.pojo.TestSuiteDescriptor; import org.jboss.unit.info.TestSuiteInfo; import org.jboss.unit.info.TestInfo; import org.jboss.unit.TestId; @@ -40,36 +40,36 @@ { = /** . */ - private TestHandler handler; + private TestSuiteDescriptor descriptor; = /** . */ private Map testCases; = - public POJOTestSuiteInfo(TestHandler handler) + public POJOTestSuiteInfo(TestSuiteDescriptor descriptor) { - super(handler.getParameters(), handler.getKeywords()); + super(descriptor.getParameters(), descriptor.getKeywords()); = // HashMap testCases =3D new HashMap(); - for (TestCaseDescriptor testCaseDescriptor : handler.getTestCases().= values()) + for (TestCaseDescriptor testCaseDescriptor : descriptor.getTestCases= ().values()) { POJOTestCaseInfo testCase =3D new POJOTestCaseInfo(testCaseDescri= ptor); testCases.put(testCase.getName(), testCase); } = // - this.handler =3D handler; + this.descriptor =3D descriptor; this.testCases =3D testCases; } = public String getName() { - return handler.getName(); + return descriptor.getName(); } = public String getDescription() { - return handler.getDescription(); + return descriptor.getDescription(); } = public TestInfo getTest(String name) --===============5283389014443567841==-- From portal-commits at lists.jboss.org Tue Oct 2 16:48:23 2007 Content-Type: multipart/mixed; boundary="===============0927529855155987474==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8517 - in branches/UIServer: uiserver and 3 other directories. Date: Tue, 02 Oct 2007 16:48:23 -0400 Message-ID: --===============0927529855155987474== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: sohil.shah(a)jboss.com Date: 2007-10-02 16:48:23 -0400 (Tue, 02 Oct 2007) New Revision: 8517 Added: branches/UIServer/uiserver/gwt-dev-env/src/ branches/UIServer/uiserver/gwt-dev-env/src/org.jboss.portal.uiserver.aja= x.PortalLayout/ branches/UIServer/uiserver/gwt-dev-env/src/org.jboss.portal.uiserver.aja= x.PortalLayout/cmsPortlet.html branches/UIServer/uiserver/gwt-dev-env/src/org.jboss.portal.uiserver.aja= x.PortalLayout/jspPortlet.html branches/UIServer/uiserver/gwt-dev-env/src/org.jboss.portal.uiserver.aja= x.PortalLayout/weatherPortlet.html Removed: branches/UIServer/uiserver/gwt-compile branches/UIServer/uiserver/gwt-dev-env/.gwt-cache/ branches/UIServer/uiserver/gwt-dev-env/tomcat/ branches/UIServer/uiserver/gwt-dev-env/www/ Modified: branches/UIServer/build/build-thirdparty.xml branches/UIServer/uiserver/build.xml branches/UIServer/uiserver/gwt-dev-env/PartialRefresh(uiserver).launch branches/UIServer/uiserver/gwt-dev-env/PortalLayout(uiserver).launch Log: cleanup Modified: branches/UIServer/build/build-thirdparty.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/UIServer/build/build-thirdparty.xml 2007-10-02 19:09:12 UTC (r= ev 8516) +++ branches/UIServer/build/build-thirdparty.xml 2007-10-02 20:48:23 UTC (r= ev 8517) @@ -116,6 +116,7 @@ + = Modified: branches/UIServer/uiserver/build.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/UIServer/uiserver/build.xml 2007-10-02 19:09:12 UTC (rev 8516) +++ branches/UIServer/uiserver/build.xml 2007-10-02 20:48:23 UTC (rev 8517) @@ -91,7 +91,7 @@ - + = @@ -250,7 +250,7 @@ - + @@ -260,7 +260,7 @@ = - + Deleted: branches/UIServer/uiserver/gwt-compile =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/UIServer/uiserver/gwt-compile 2007-10-02 19:09:12 UTC (rev 851= 6) +++ branches/UIServer/uiserver/gwt-compile 2007-10-02 20:48:23 UTC (rev 851= 7) @@ -1,3 +0,0 @@ -#!/bin/sh -ant clean main; -java -cp "src/main:src/resources/client/ajax/src:output/classes:gwt-dev-e= nv/gwt-user.jar:gwt-dev-env/gwt-dev-linux.jar" com.google.gwt.dev.GWTCompil= er -out "output/resources/client/ajax" "$@" org.jboss.portal.uiserver.ajax.= PortalLayout; Modified: branches/UIServer/uiserver/gwt-dev-env/PartialRefresh(uiserver).l= aunch =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/UIServer/uiserver/gwt-dev-env/PartialRefresh(uiserver).launch = 2007-10-02 19:09:12 UTC (rev 8516) +++ branches/UIServer/uiserver/gwt-dev-env/PartialRefresh(uiserver).launch = 2007-10-02 20:48:23 UTC (rev 8517) @@ -9,6 +9,7 @@ + Modified: branches/UIServer/uiserver/gwt-dev-env/PortalLayout(uiserver).lau= nch =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/UIServer/uiserver/gwt-dev-env/PortalLayout(uiserver).launch 20= 07-10-02 19:09:12 UTC (rev 8516) +++ branches/UIServer/uiserver/gwt-dev-env/PortalLayout(uiserver).launch 20= 07-10-02 20:48:23 UTC (rev 8517) @@ -9,6 +9,7 @@ + Added: branches/UIServer/uiserver/gwt-dev-env/src/org.jboss.portal.uiserver= .ajax.PortalLayout/cmsPortlet.html =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/UIServer/uiserver/gwt-dev-env/src/org.jboss.portal.uiserver.aj= ax.PortalLayout/cmsPortlet.html (rev 0) +++ branches/UIServer/uiserver/gwt-dev-env/src/org.jboss.portal.uiserver.aj= ax.PortalLayout/cmsPortlet.html 2007-10-02 20:48:23 UTC (rev 8517) @@ -0,0 +1,81 @@ + + + + + + + +

JBoss Portal provides an open source platform for ho= sting and serving a portal Web interface, + publishing and managing its content, and customizing its experience. Wh= ile most packaged Portal frameworks help + enterprises launch Portals more quickly, only JBoss Portal delivers the= benefits of a zero-cost open source license + combined with a flexible and scalable underling platform.

+ +
+ + + + + + +

Support Services

+

+ JBoss Inc. offers various support services tailored to fit yo= ur needs. Explore + support and service options for JBoss Portal. +

+

PortletSwap

+

+ Portletswap.com is= an open community sponsored by JBoss, Inc. to facilitate the exchange of p= ortlets and layouts for use in JBoss Portal. +

+

Project Informatio= n

+

Learn more about the JBoss P= ortal project, on-going development, open + issues, and our + user and developer communities. +

+
+ +
+

Thank you for downloading and deploying JBoss Portal. We hope your enjo= y working with it as much as we enjoy + developing it!

+

Baci e abbracci,
+ The JBoss Portal Team. +

+ +
+ +
+
+ Param1:
+ Param2:
+ +
+
\ No newline at end of file Added: branches/UIServer/uiserver/gwt-dev-env/src/org.jboss.portal.uiserver= .ajax.PortalLayout/jspPortlet.html =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/UIServer/uiserver/gwt-dev-env/src/org.jboss.portal.uiserver.aj= ax.PortalLayout/jspPortlet.html (rev 0) +++ branches/UIServer/uiserver/gwt-dev-env/src/org.jboss.portal.uiserver.aj= ax.PortalLayout/jspPortlet.html 2007-10-02 20:48:23 UTC (rev 8517) @@ -0,0 +1,42 @@ +
=
Greetings!
+ + + + + + + + + + + + + + + + + + + + +
3D"Try= + 3D"Download + 3D"Download
+ This is a basic installation of J= Boss Portal 2.8.0-SNAPSHOT. You may + log in at any time, using the Login link at the top-rig= ht of this page, with the following + credentials: +
+ user/user or admin/admin +
+ If you are in need of guidance with regards to navigating, config= uring, or operating the portal, please view + our online documentation. +
+
+ +
\ No newline at end of file Added: branches/UIServer/uiserver/gwt-dev-env/src/org.jboss.portal.uiserver= .ajax.PortalLayout/weatherPortlet.html =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/UIServer/uiserver/gwt-dev-env/src/org.jboss.portal.uiserver.aj= ax.PortalLayout/weatherPortlet.html (rev 0) +++ branches/UIServer/uiserver/gwt-dev-env/src/org.jboss.portal.uiserver.aj= ax.PortalLayout/weatherPortlet.html 2007-10-02 20:48:23 UTC (rev 8517) @@ -0,0 +1,76 @@ +
=
Weather Portlet  
<= /td>

+
+ +Miami, FL, US + + +
+
+ + + + + + +
+ + + + + + + + + + + + + + +
Currently
+ +
Mo= stly Cloudy
86= F
+
+ + + + + + + + + + + + + +
Thu +
+ +
Sc= attered Thunderstorms
76= F/86F
+
+ + + + + + + + + + + + + +
Fri +
+ +
Sc= attered Thunderstorms
78= F/89F
+
+ +
+Complete Forecas= t +
+
+ +
\ No newline at end of file --===============0927529855155987474==-- From portal-commits at lists.jboss.org Tue Oct 2 17:23:07 2007 Content-Type: multipart/mixed; boundary="===============3647251752310259049==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8518 - modules/test/trunk/test/src/main/org/jboss/portal/test/framework/driver/remote. Date: Tue, 02 Oct 2007 17:23:07 -0400 Message-ID: --===============3647251752310259049== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: julien(a)jboss.com Date: 2007-10-02 17:23:07 -0400 (Tue, 02 Oct 2007) New Revision: 8518 Removed: modules/test/trunk/test/src/main/org/jboss/portal/test/framework/driver/= remote/command/ Log: - remove empty dir --===============3647251752310259049==-- From portal-commits at lists.jboss.org Wed Oct 3 00:07:22 2007 Content-Type: multipart/mixed; boundary="===============2963352459863138939==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8519 - in branches/UIServer/uiserver: gwt-dev-env and 6 other directories. Date: Wed, 03 Oct 2007 00:07:22 -0400 Message-ID: --===============2963352459863138939== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: sohil.shah(a)jboss.com Date: 2007-10-03 00:07:22 -0400 (Wed, 03 Oct 2007) New Revision: 8519 Added: branches/UIServer/uiserver/gwt-dev-env/AsyncPages(uiserver).launch branches/UIServer/uiserver/src/main/org/jboss/portal/uiserver/ajax/clien= t/AsyncPages.java branches/UIServer/uiserver/src/resources/client/ajax/src/org/jboss/porta= l/uiserver/ajax/AsyncPages.gwt.xml branches/UIServer/uiserver/src/resources/client/ajax/src/org/jboss/porta= l/uiserver/ajax/public/asyncPages.html branches/UIServer/uiserver/src/resources/client/ajax/src/org/jboss/porta= l/uiserver/ajax/public/portal.css branches/UIServer/uiserver/src/resources/client/ajax/uiserver-poc.war/as= yncPages.html Modified: branches/UIServer/uiserver/build.xml branches/UIServer/uiserver/gwt-dev-env/ branches/UIServer/uiserver/src/main/org/jboss/portal/uiserver/service/Po= rtletServiceImpl.java branches/UIServer/uiserver/src/resources/client/ajax/src/org/jboss/porta= l/uiserver/ajax/public/layout.html branches/UIServer/uiserver/src/resources/client/ajax/src/org/jboss/porta= l/uiserver/ajax/public/partialRefresh.html branches/UIServer/uiserver/src/resources/client/ajax/uiserver-poc.war/WE= B-INF/web.xml Log: Proof of Concept of Asynchronous Portal Page Management Modified: branches/UIServer/uiserver/build.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/UIServer/uiserver/build.xml 2007-10-02 21:23:07 UTC (rev 8518) +++ branches/UIServer/uiserver/build.xml 2007-10-03 04:07:22 UTC (rev 8519) @@ -268,6 +268,16 @@
+ = + + + + + + + + + = Property changes on: branches/UIServer/uiserver/gwt-dev-env ___________________________________________________________________ Name: svn:ignore + .gwt-cache tomcat www Added: branches/UIServer/uiserver/gwt-dev-env/AsyncPages(uiserver).launch =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/UIServer/uiserver/gwt-dev-env/AsyncPages(uiserver).launch = (rev 0) +++ branches/UIServer/uiserver/gwt-dev-env/AsyncPages(uiserver).launch 2007= -10-03 04:07:22 UTC (rev 8519) @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + Added: branches/UIServer/uiserver/src/main/org/jboss/portal/uiserver/ajax/c= lient/AsyncPages.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/UIServer/uiserver/src/main/org/jboss/portal/uiserver/ajax/clie= nt/AsyncPages.java (rev 0) +++ branches/UIServer/uiserver/src/main/org/jboss/portal/uiserver/ajax/clie= nt/AsyncPages.java 2007-10-03 04:07:22 UTC (rev 8519) @@ -0,0 +1,429 @@ +package org.jboss.portal.uiserver.ajax.client; + + +import com.google.gwt.core.client.GWT; +import com.google.gwt.core.client.EntryPoint; + +import com.google.gwt.user.client.DOM; +import com.google.gwt.user.client.Element; +import com.google.gwt.user.client.Event; +import com.google.gwt.user.client.HTTPRequest; +import com.google.gwt.user.client.ResponseTextHandler; +import com.google.gwt.user.client.ui.HTML; +import com.google.gwt.user.client.ui.Widget; +import com.google.gwt.user.client.ui.Panel; +import com.google.gwt.user.client.ui.RootPanel; +import com.google.gwt.user.client.ui.HorizontalPanel; +import com.google.gwt.user.client.ui.VerticalPanel; +import com.google.gwt.user.client.ui.Button; +import com.google.gwt.user.client.ui.ClickListener; +import com.google.gwt.user.client.ui.TabBar; +import com.google.gwt.user.client.ui.TabListener; +import com.google.gwt.user.client.ui.SourcesTabEvents; + +import com.google.gwt.user.client.rpc.ServiceDefTarget; +import com.google.gwt.user.client.rpc.AsyncCallback; + +/** + * Entry point classes define onModuleLoad(). + */ +public class AsyncPages implements EntryPoint +{ = + /** + * This is the entry point method. + */ + public void onModuleLoad() + { = + this.loadPortal(); + } + = + /** + * = + * + */ + private void loadPortal() + { + //Load the navigation bar....use a tabbed bar + TabBar pageNavigator =3D new TabBar(); + pageNavigator.addTab("Page 1"); + pageNavigator.addTab("Page 2"); + pageNavigator.addTab("Page 3"); + pageNavigator.selectTab(0); + pageNavigator.addTabListener(new TabListenerImpl()); + RootPanel.get("pageNavigator").add(pageNavigator); = + = + //Load the main page to be displayed + HorizontalPanel page =3D new HorizontalPanel(); + RootPanel.get("currentPage").add(page); = + this.loadPartialRefreshPage("Page 1"); = + } + = + /** + * = + * + */ + private void loadPartialRefreshPage(String pageId) + { = + PortletServiceAsync portletService =3D (PortletServiceAsync)GWT.crea= te(PortletService.class); = + ((ServiceDefTarget)portletService).setServiceEntryPoint(GWT.getModul= eBaseURL()+"/portletService"); + = + AsyncCallback callback =3D new AsyncCallback() + { + public void onSuccess(Object result) + { + Page portalPage =3D (Page)result; + displayPortalPage(portalPage); + } + = + public void onFailure(Throwable caught) + { + } + }; + = + portletService.getPage(pageId, callback); = + } + = + /** + * = + * @param window + * @param newState + */ + private void handleWindowStateChanged(String window, String newState) + { + PortletServiceAsync portletService =3D (PortletServiceAsync)GWT.crea= te(PortletService.class); = + ((ServiceDefTarget)portletService).setServiceEntryPoint(GWT.getModul= eBaseURL()+"/portletService"); + = + AsyncCallback callback =3D new AsyncCallback() + { + public void onSuccess(Object result) + { = + Page portalPage =3D (Page)result; + displayPortalPage(portalPage); + } + = + public void onFailure(Throwable caught) + { + } + }; + = + portletService.setState(window, newState, callback); + } + = + /** + * = + * @param window + * @param newState + */ + private void handleWindowModeChanged(String window, String newMode) + { + PortletServiceAsync portletService =3D (PortletServiceAsync)GWT.crea= te(PortletService.class); = + ((ServiceDefTarget)portletService).setServiceEntryPoint(GWT.getModul= eBaseURL()+"/portletService"); + = + AsyncCallback callback =3D new AsyncCallback() + { + public void onSuccess(Object result) + { = + Page portalPage =3D (Page)result; + displayPortalPage(portalPage); + } + = + public void onFailure(Throwable caught) + { + } + }; + = + portletService.setMode(window, newMode, callback); + } + = + /** + * = + * @param url + * @param portletWindow + */ + private void handlePartialRefreshLink(String url, Widget windowContent) + { + HTTPRequest.asyncGet(url, new ResponseTextHandlerImpl(windowContent)= ); + } + = + /** + * = + * @param url + * @param portletWindow + */ + private void handlePartialRefreshForm(String url, String method, String= postData, Widget windowContent) + { = + if(method.equalsIgnoreCase("post")) + { + HTTPRequest.asyncPost(url, postData, new ResponseTextHandlerImpl(= windowContent)); + } + else if(method.equalsIgnoreCase("get")) + { + if(postData !=3D null && postData.trim().length() > 0) + { + url =3D url + "?" + postData; + } + HTTPRequest.asyncGet(url, new ResponseTextHandlerImpl(windowConte= nt)); + } + } + = + /** + * = + * @author soshah + * + */ + private class ResponseTextHandlerImpl implements ResponseTextHandler + { + private Widget windowContent =3D null; + = + public ResponseTextHandlerImpl(Widget windowContent) + { + this.windowContent =3D windowContent; + } = + public void onCompletion(String responseText) + { + HTML html =3D new HTML(responseText); = + Panel window =3D (Panel)this.windowContent.getParent(); + this.windowContent.removeFromParent(); + window.add(html); + } = + } + = + /** + * = + * @param url + * @return + */ + private boolean isPartialRefreshAllowed(String url) + { = + String basePortalURL =3D GWT.getModuleBaseURL(); + String portalContext =3D "org.jboss.portal.uiserver.Portal"; //This = is hard coded for now, but must be populated from the Portal deployment env= ironment + //If Portal is installed at Root context, this value will be an empt= y string + = + if(url.startsWith(basePortalURL)) + { + //This is an Absolute URL, but it points back to + //the Portal + //An Async Page Refresh call should be allowed in this case + return true; + } + = + if(url.startsWith("http://")) + { + //This is an Absolute URL and does not point back + //to the Portal + //Async Page Refresh call should not be allowed + return false; + } + else + { + //This is a relative URL. = + = + //Make sure it points back to the Portal for an Async Page Refres= h = + //If it points to some other resource like another third-party we= b application etc, the response + //has nothing to do with Portal = + //(unless ofcourse the client side processor of the Portal, wants= to + //take this response and aggregate this inside the current Portal= Page and Window being displayed. This is an exceptional usecase + //and not desired behavior for every scenario from end user stand= point) + //As standard behavior, Async Page Refresh to be done, only when = Portlet Markup is sending a request back to the Portal = + if(url.startsWith("/")) + { + if(!portalContext.equals("")) + { + String urlContext =3D null; + int index =3D url.indexOf('/', 1); + if(index !=3D -1) + { + urlContext =3D url.substring(1, index); + } + else + { + urlContext =3D url.substring(1); + } + = + if(!portalContext.equals(urlContext)) + { = + //This request is not being sent to the Portal. It is be= ing sent to some other web application + return false; + } + } + else + { + //If Portal is running on root context, there is no way to = tell from client side, if this request is actually + //to be sent to the Portal or some other web application. H= ence, in the interest of functional safety/correctness + //no Async Page Refresh here + //If Portal is running on Root context, Partial Refresh wil= l happen only for pure relative links + return false; + } + } + = + //If I get here, Async Page Refresh through the Portal should be = allowed + return true; + } + } + = + /** + * = + * @param currentForm + * @return + */ + public native String serializeForm(Element currentForm) = + /*-{ = + var formData =3D $wnd.Form.serialize(currentForm); + return formData; + }-*/; + = + /** + * = + * @param portalPage + */ + private void displayPortalPage(Page portalPage) + { = + //Event Listener for the decoration components like + //Normal, Maximized, Minimized + ClickListener listener =3D new ClickListener() + { + public void onClick(Widget sender) + { = + Button cour =3D (Button)sender; + String windowName =3D sender.getParent().getTitle(); + if(cour.getText().equals("Normal")) + { + handleWindowStateChanged(windowName, Window.NORMAL); + } + else if(cour.getText().equals("Minimized")) + { + handleWindowStateChanged(windowName, Window.MINIMIZED); + } + else if(cour.getText().equals("Maximized")) + { + handleWindowStateChanged(windowName, Window.MAXIMIZED); + } + else if(cour.getText().equals("Edit")) + { + handleWindowModeChanged(windowName, Window.EDIT); + } + } = + }; + = + //Event Listener for actions perfomed inside the portlet window cont= ent + //itself. + ClickListener contentListener =3D new ClickListener() + { + public void onClick(Widget sender) + { + Event event =3D DOM.eventGetCurrentEvent(); + Element target =3D DOM.eventGetTarget(event); + = + if(target.toString().toUpperCase().trim().indexOf("") !=3D= -1) + { = + String link =3D DOM.getElementAttribute(target, "HREF"); + = + //A link inside the portlet window was clicked + //Load its content asynchronously inside this window + boolean isPartialRefreshAllowed =3D isPartialRefreshAllowed= (link); = + if(isPartialRefreshAllowed) + { + DOM.eventPreventDefault(event); + handlePartialRefreshLink(link, sender); + } + } + else if(target.toString().toUpperCase().trim().indexOf("INPUT"= ) !=3D -1 && + target.toString().toUpperCase().trim().indexOf("SUBMIT= ") !=3D -1 + ) + { = + Element currentForm =3D DOM.getParent(target); + String enctype =3D DOM.getElementAttribute(currentForm, "en= ctype"); + String action =3D DOM.getElementAttribute(currentForm, "act= ion"); + boolean isPartialRefreshAllowed =3D isPartialRefreshAllowed= (action); + if((isPartialRefreshAllowed) && (enctype =3D=3D null || !en= ctype.equals("multipart/form-data"))) + { + DOM.eventPreventDefault(event); + = + //Call a native javascript function here = = + String method =3D DOM.getElementAttribute(currentForm, "= method"); = + String serializedForm =3D serializeForm(currentForm); = + = + handlePartialRefreshForm(action, method, serializedForm,= sender); + } + } + } = + }; + = + //Dispalying the fully aggregated page + Window[] windows =3D portalPage.windows; + HorizontalPanel page =3D (HorizontalPanel)RootPanel.get("currentPage= ").getWidget(0); + page.clear(); + for(int i=3D0; i + + + + + = = + = + + + Added: branches/UIServer/uiserver/src/resources/client/ajax/src/org/jboss/p= ortal/uiserver/ajax/public/asyncPages.html =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/UIServer/uiserver/src/resources/client/ajax/src/org/jboss/port= al/uiserver/ajax/public/asyncPages.html (rev 0) +++ branches/UIServer/uiserver/src/resources/client/ajax/src/org/jboss/port= al/uiserver/ajax/public/asyncPages.html 2007-10-03 04:07:22 UTC (rev 8519) @@ -0,0 +1,44 @@ + + + = + + + + JBoss Portal + + + + + + + + + = + = + + + + + + + + + + + = +

JBoss Portal

+ = + +

+ Asynchronous Page Management = +

= + + + + = + + + = +
= + + Modified: branches/UIServer/uiserver/src/resources/client/ajax/src/org/jbos= s/portal/uiserver/ajax/public/layout.html =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/UIServer/uiserver/src/resources/client/ajax/src/org/jboss/port= al/uiserver/ajax/public/layout.html 2007-10-02 21:23:07 UTC (rev 8518) +++ branches/UIServer/uiserver/src/resources/client/ajax/src/org/jboss/port= al/uiserver/ajax/public/layout.html 2007-10-03 04:07:22 UTC (rev 8519) @@ -6,16 +6,7 @@ JBoss Portal = - - - - + = Modified: branches/UIServer/uiserver/src/resources/client/ajax/src/org/jbos= s/portal/uiserver/ajax/public/partialRefresh.html =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/UIServer/uiserver/src/resources/client/ajax/src/org/jboss/port= al/uiserver/ajax/public/partialRefresh.html 2007-10-02 21:23:07 UTC (rev 85= 18) +++ branches/UIServer/uiserver/src/resources/client/ajax/src/org/jboss/port= al/uiserver/ajax/public/partialRefresh.html 2007-10-03 04:07:22 UTC (rev 85= 19) @@ -6,16 +6,7 @@ JBoss Portal = - - - - + = Added: branches/UIServer/uiserver/src/resources/client/ajax/src/org/jboss/p= ortal/uiserver/ajax/public/portal.css =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/UIServer/uiserver/src/resources/client/ajax/src/org/jboss/port= al/uiserver/ajax/public/portal.css (rev 0) +++ branches/UIServer/uiserver/src/resources/client/ajax/src/org/jboss/port= al/uiserver/ajax/public/portal.css 2007-10-03 04:07:22 UTC (rev 8519) @@ -0,0 +1,469 @@ +body { + background-color: white; + color: black; + font-family: Helvetica, Arial, sans-serif; + font-size: 10pt; + margin: 0px 20px 20px 20px; +} + +h2 { + font-weight: normal; +} + +table { + font-size: 100%; +} + +code { + font-size: small; +} + +a { + color: darkblue; +} + +a:visited { + color: darkblue; +} + +.gwt-BorderedPanel { +} + +.gwt-Button { + background:#f5f5f5; + border:1px solid #aaa; + border-top:1px solid #ddd; + border-left:1px solid #ddd; + padding: 2px; + width: 12em; +} + +.gwt-Button:active { + border:1px solid #aaa; + border-bottom:1px solid #ccc; + border-right:1px solid #ccc; +} + +.gwt-Button[disabled] { + background: #ccc; + border:1px solid #999; + border-top:1px solid #ccc; + border-left:1px solid #ccc; + color: #888; +} + +.gwt-Canvas { +} + +.gwt-CheckBox { +} + +.gwt-DialogBox { + border: 2px outset; + background-color: white; +} + +.gwt-DialogBox .Caption { + background-color: #C3D9FF; + padding: 3px; + margin: 2px; + font-weight: bold; + cursor: default; +} + +.gwt-FileUpload { +} + +.gwt-Frame { +} + +.gwt-HTML { +} + +.gwt-Hyperlink { +} + +.gwt-Image { +} + +.gwt-Label { +} + +.gwt-ListBox { +} + +.gwt-MenuBar { + background-color: #C3D9FF; + border: 1px solid #87B3FF; + cursor: default; +} + +.gwt-MenuBar .gwt-MenuItem { + padding: 1px 4px 1px 4px; + cursor: default; +} + +.gwt-MenuBar .gwt-MenuItem-selected { + background-color: #E8EEF7; +} + +.gwt-PasswordTextBox { +} + +.gwt-RadioButton { +} + +.gwt-TabPanel { + margin-top: 4px; +} + +.gwt-TabPanelBottom { + background-color: #E8EEF7; +} + +.gwt-TabBar { + padding-top: 2px; + border-bottom: 4px solid #87B3FF; + background-color: #fff; +} + +.gwt-TabBar .gwt-TabBarFirst { +} + +.gwt-TabBar .gwt-TabBarRest { +} + +.gwt-TabBar .gwt-TabBarItem { + padding: 4px; + cursor: pointer; + cursor: hand; + + background-color: #e8eef7; + border-bottom: 2px solid white; + margin-right: 2px; +} + +.gwt-TabBar .gwt-TabBarItem-selected { + padding: 4px; + font-weight: bold; + cursor: default; + + background-color: #87b3ff; + border-bottom: 2px solid #87b3ff; + margin-right: 2px; +} + +.gwt-TextArea { +} + +.gwt-TextBox { +} + +.gwt-TextBox-readonly { + color: #888; +} + +.gwt-Tree { + background: white; +} + +.gwt-Tree .gwt-TreeItem { +} + +.gwt-Tree .gwt-TreeItem-selected { + background-color: #C3D9FF; +} + +.gwt-StackPanel { +} + +.gwt-StackPanel .gwt-StackPanelItem { + background-color: #C3D9FF; + cursor: pointer; + cursor: hand; +} + +.gwt-StackPanel .gwt-StackPanelItem-selected { +} + +.gwt-PushButton-up { + background-color: #C3D9FF; + padding: 2px; + border: 2px solid transparent; + border-color: #E8F1FF rgb(157, 174, 205) rgb(157, 174, 205) rgb(232, 241= , 255); + cursor: pointer; + cursor: hand; +} + +.gwt-PushButton-up-hovering { + background-color: #C3D9FF; + padding: 2px; + border: 2px solid transparent; + border-color: #E8F1FF rgb(157, 174, 205) rgb(157, 174, 205) rgb(232, 241= , 255); + cursor: pointer; + cursor: hand; +} + +.gwt-PushButton-down { + background-color: #C3D9FF; + padding: 2px; + border: 2px solid transparent; + border-color: #9DAECD rgb(232, 241, 255) rgb(232, 241, 255) rgb(157, 174= , 205); + cursor: pointer; + cursor: hand; +} + +.gwt-PushButton-down-hovering { + background-color: #C3D9FF; + padding: 2px; + border: 2px solid transparent; + border-color: #9DAECD rgb(232, 241, 255) rgb(232, 241, 255) rgb(157, 174= , 205); + cursor: pointer; + cursor: hand; +} + +.gwt-ToggleButton-up { + background-color: #C3D9FF; + padding: 2px; + border: 2px solid transparent; + border-color: #E8F1FF rgb(157, 174, 205) rgb(157, 174, 205) rgb(232, 241= , 255); + cursor: pointer; + cursor: hand; +} + +.gwt-ToggleButton-up-hovering { + background-color: #C3D9FF; + padding: 2px; + border: 2px solid transparent; + border-color: #E8F1FF rgb(157, 174, 205) rgb(157, 174, 205) rgb(232, 241= , 255); + cursor: pointer; + cursor: hand; +} + +.gwt-ToggleButton-down { + background-color: #C3D9FF; + padding: 2px; + background-color: #E8F1FF; + border: 2px solid transparent; + border-color: #9DAECD rgb(232, 241, 255) rgb(232, 241, 255) rgb(157, 174= , 205); + cursor: pointer; + cursor: hand; +} + +.gwt-ToggleButton-down-hovering { + background-color: #C3D9FF; + padding: 2px; + background-color: #E8F1FF; + border: 2px solid transparent; + border-color: #9DAECD rgb(232, 241, 255) rgb(232, 241, 255) rgb(157, 174= , 205); + cursor: pointer; + cursor: hand; +} + +.gwt-RichTextArea { + border: 1px solid black; + background-color: white; +} + +.gwt-RichTextToolbar { + background-color: #C3D9FF; + padding: 2px; +} + +.gwt-RichTextToolbar .gwt-PushButton-up { + margin-right: 2px; + border: 1px solid #C3D9FF; +} + +.gwt-RichTextToolbar .gwt-PushButton-up-hovering { + margin-right: 2px; + border: 1px solid #C3D9FF; + border-color: #E8F1FF rgb(157, 174, 205) rgb(157, 174, 205) rgb(232, 241= , 255); +} + +.gwt-RichTextToolbar .gwt-PushButton-down { + margin-right: 2px; + border: 1px solid #C3D9FF; + border-color: #9DAECD rgb(232, 241, 255) rgb(232, 241, 255) rgb(157, 174= , 205); +} + +.gwt-RichTextToolbar .gwt-PushButton-down-hovering { + margin-right: 2px; + border: 1px solid #C3D9FF; + border-color: #9DAECD rgb(232, 241, 255) rgb(232, 241, 255) rgb(157, 174= , 205); +} + +.gwt-RichTextToolbar .gwt-ToggleButton-up { + margin-right: 2px; + border: 1px solid #C3D9FF; +} + +.gwt-RichTextToolbar .gwt-ToggleButton-up-hovering { + margin-right: 2px; + border: 1px solid #C3D9FF; + border-color: #E8F1FF rgb(157, 174, 205) rgb(157, 174, 205) rgb(232, 241= , 255); +} + +.gwt-RichTextToolbar .gwt-ToggleButton-down { + margin-right: 2px; + background-color: #E8F1FF; + border: 1px solid #C3D9FF; + border-color: #9DAECD rgb(232, 241, 255) rgb(232, 241, 255) rgb(157, 174= , 205); +} + +.gwt-RichTextToolbar .gwt-ToggleButton-down-hovering { + margin-right: 2px; + background-color: #E8F1FF; + border: 1px solid #C3D9FF; + border-color: #9DAECD rgb(232, 241, 255) rgb(232, 241, 255) rgb(157, 174= , 205); +} + +.gwt-HorizontalSplitPanel { + border: 8px solid #C3D9FF; +} + +.gwt-HorizontalSplitPanel .hsplitter { + background-color: #C3D9FF; + cursor: move; +} + +.gwt-HorizontalSplitPanel .left { + background-color: #E8EEF7; +} + +.gwt-VerticalSplitPanel { +} + +.gwt-VerticalSplitPanel .splitter { + background-color: #C3D9FF; + height: 8px; + cursor: move; +} + +.gwt-SuggestBoxPopup { + border: 2px solid #C3D9FF; +} + +.gwt-SuggestBoxPopup .item { + padding: 2px; +} + +.gwt-SuggestBoxPopup .item-selected { + background-color: #C3D9FF; + padding: 2px; +} + +/* -----------------------------------------------------------------------= --- */ +.ks-Sink { + width: 100%; + height: 24em; +} + +.ks-Info { + color: white; + padding: 20px 10px 20px 40px; + margin-bottom: 10px; +} + +.ks-List { +} + +.ks-List .gwt-Image { + position: relative; + top: 8px; +} + +.ks-List .ks-SinkItem a { + text-decoration: none; + color: white; +} + +.ks-List .ks-SinkItem-selected a { + text-decoration: none; + color: white; +} + +.ks-List .ks-FirstSinkItem a { + text-decoration: none; + color: white; +} + +.ks-List .ks-FirstSinkItem-selected a { + text-decoration: none; + color: white; +} + +.ks-List .ks-SinkItem { + background: #c6cab7; + padding: 4px; + padding-left: 16px; + padding-right: 16px; + margin-right: 3px; + border-bottom: 3px solid white; + cursor: pointer; + cursor: hand; +} + +.ks-List .ks-SinkItem-selected { + background: #c6cab7; + padding: 4px; + padding-left: 16px; + padding-right: 16px; + margin-right: 3px; + padding-bottom: 7px; +} + +.ks-List .ks-FirstSinkItem { + background: #c6cab7 url(images/corner.gif) no-repeat top left; + padding: 4px; + padding-left: 16px; + padding-right: 16px; + margin-right: 3px; + border-bottom: 3px solid white; + cursor: pointer; + cursor: hand; +} + +.ks-List .ks-FirstSinkItem-selected { + background: #c3d9ff url(images/corner.gif) no-repeat top left; + padding: 4px; + padding-left: 16px; + padding-right: 16px; + margin-right: 3px; + padding-bottom: 7px; +} + +.ks-images-Image { + margin: 8px; +} + +.ks-images-Button { + margin: 8px; + cursor: pointer; + cursor: hand; +} + +.ks-layouts { + margin: 8px; +} + +.ks-layouts-Label { + background-color: #C3D9FF; + font-weight: bold; + margin-top: 1em; + padding: 2px 0px 2px 0px; + width: 100%; +} + +.ks-layouts-Scroller { + height: 128px; + border: 2px solid #C3D9FF; + padding: 8px; + margin: 8px; +} + +.ks-popups-Popup { + background-color: white; + border: 1px solid #87B3FF; + padding: 4px; +} Modified: branches/UIServer/uiserver/src/resources/client/ajax/uiserver-poc= .war/WEB-INF/web.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/UIServer/uiserver/src/resources/client/ajax/uiserver-poc.war/W= EB-INF/web.xml 2007-10-02 21:23:07 UTC (rev 8518) +++ branches/UIServer/uiserver/src/resources/client/ajax/uiserver-poc.war/W= EB-INF/web.xml 2007-10-03 04:07:22 UTC (rev 8519) @@ -41,4 +41,8 @@ PortletService /org.jboss.portal.uiserver.ajax.PartialRefresh/portletS= ervice/* + + PortletService + /org.jboss.portal.uiserver.ajax.AsyncPages/portletServi= ce/* + Added: branches/UIServer/uiserver/src/resources/client/ajax/uiserver-poc.wa= r/asyncPages.html =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/UIServer/uiserver/src/resources/client/ajax/uiserver-poc.war/a= syncPages.html (rev 0) +++ branches/UIServer/uiserver/src/resources/client/ajax/uiserver-poc.war/a= syncPages.html 2007-10-03 04:07:22 UTC (rev 8519) @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file --===============2963352459863138939==-- From portal-commits at lists.jboss.org Wed Oct 3 17:17:10 2007 Content-Type: multipart/mixed; boundary="===============6989882240203129779==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8520 - in modules/test/trunk/unit/src/main/org/jboss: test/unit/info and 2 other directories. Date: Wed, 03 Oct 2007 17:17:10 -0400 Message-ID: --===============6989882240203129779== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: julien(a)jboss.com Date: 2007-10-03 17:17:10 -0400 (Wed, 03 Oct 2007) New Revision: 8520 Added: modules/test/trunk/unit/src/main/org/jboss/test/unit/info/ modules/test/trunk/unit/src/main/org/jboss/test/unit/info/InfoTests.java modules/test/trunk/unit/src/main/org/jboss/unit/info/impl/ modules/test/trunk/unit/src/main/org/jboss/unit/info/impl/SimpleParamete= rInfo.java modules/test/trunk/unit/src/main/org/jboss/unit/info/impl/SimpleTestCase= Info.java modules/test/trunk/unit/src/main/org/jboss/unit/info/impl/SimpleTestInfo= .java modules/test/trunk/unit/src/main/org/jboss/unit/info/impl/SimpleTestSuit= eInfo.java Modified: modules/test/trunk/unit/src/main/org/jboss/test/unit/AllTests.java modules/test/trunk/unit/src/main/org/jboss/unit/info/ParameterInfo.java Log: added a simple implementation of the test info interfaces Modified: modules/test/trunk/unit/src/main/org/jboss/test/unit/AllTests.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/test/unit/AllTests.java 2007= -10-03 04:07:22 UTC (rev 8519) +++ modules/test/trunk/unit/src/main/org/jboss/test/unit/AllTests.java 2007= -10-03 21:17:10 UTC (rev 8520) @@ -31,6 +31,7 @@ import org.jboss.test.unit.runner.event.TestRunnerEventBroadcasterSupportT= ests; import org.jboss.test.unit.runner.event.TestRunnerLifeCycleFilterTests; import org.jboss.test.unit.runner.model.ModelTests; +import org.jboss.test.unit.info.InfoTests; = /** * @author Julien Viet @@ -53,6 +54,9 @@ ParametrizationTests.main(args); = // + InfoTests.main(args); + + // BlahTests.main(args); } } Added: modules/test/trunk/unit/src/main/org/jboss/test/unit/info/InfoTests.= java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/test/unit/info/InfoTests.jav= a (rev 0) +++ modules/test/trunk/unit/src/main/org/jboss/test/unit/info/InfoTests.jav= a 2007-10-03 21:17:10 UTC (rev 8520) @@ -0,0 +1,294 @@ +/*************************************************************************= ***** + * JBoss, a division of Red Hat = * + * Copyright 2006, Red Hat Middleware, LLC, and individual = * + * contributors as indicated by the @authors tag. See the = * + * copyright.txt in the distribution for a full listing of = * + * individual contributors. = * + * = * + * This is free software; you can redistribute it and/or modify it = * + * under the terms of the GNU Lesser General Public License as = * + * published by the Free Software Foundation; either version 2.1 of = * + * the License, or (at your option) any later version. = * + * = * + * This software is distributed in the hope that it will be useful, = * + * but WITHOUT ANY WARRANTY; without even the implied warranty of = * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU = * + * Lesser General Public License for more details. = * + * = * + * You should have received a copy of the GNU Lesser General Public = * + * License along with this software; if not, write to the Free = * + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA = * + * 02110-1301 USA, or see the FSF site: http://www.fsf.org. = * + *************************************************************************= *****/ +package org.jboss.test.unit.info; + +import org.jboss.unit.info.impl.SimpleParameterInfo; +import org.jboss.unit.info.impl.SimpleTestCaseInfo; +import org.jboss.unit.info.impl.SimpleTestSuiteInfo; +import org.jboss.unit.info.ParameterInfo; +import org.jboss.unit.info.TestCaseInfo; +import org.jboss.unit.info.TestSuiteInfo; + +import static org.jboss.unit.api.Assert.*; +import static org.jboss.unit.util.CollectionTools.*; + +import java.util.List; +import java.util.Collections; +import java.util.Map; +import java.util.HashMap; + +/** + * @author Julien Viet + * @version $Revision: 1.1 $ + */ +public class InfoTests +{ + + public static void main(String[] args) + { + testParameterInfo(); + testTestCaseInfo(); + testSuiteInfo(); + } + + private static void testParameterInfo() + { + try + { + new SimpleParameterInfo((String)null); + fail(); + } + catch (IllegalArgumentException expected) + { + } + try + { + new SimpleParameterInfo((ParameterInfo)null); + fail(); + } + catch (IllegalArgumentException expected) + { + } + + // Test initial state + SimpleParameterInfo parameter =3D new SimpleParameterInfo("abc"); + assertEquals("abc", parameter.getName()); + assertEquals(null, parameter.getDescription()); + assertEquals(list(), parameter.getDefaultValues()); + parameter.setDescription("desc"); + assertEquals("desc", parameter.getDescription()); + + // Try corruption + try + { + parameter.setDefaultValues(null); + fail(); + } + catch (IllegalArgumentException expected) + { + } + + // Test update + List values =3D list("v1", "v2"); + parameter.setDefaultValues(values); + assertEquals(list("v1", "v2"), parameter.getDefaultValues()); + values.add("v3"); + assertEquals(list("v1", "v2"), parameter.getDefaultValues()); + + // Test cloning + SimpleParameterInfo copy =3D new SimpleParameterInfo(parameter); + assertEquals("abc", copy.getName()); + assertEquals("desc", copy.getDescription()); + assertEquals(list("v1", "v2"), copy.getDefaultValues()); + parameter.setDefaultValues(list("v4")); + parameter.setDescription(null); + assertEquals("abc", copy.getName()); + assertEquals("desc", copy.getDescription()); + assertEquals(list("v1", "v2"), copy.getDefaultValues()); + } + + private static void testTestCaseInfo() + { + try + { + new SimpleTestCaseInfo((String)null); + fail(); + } + catch (IllegalArgumentException expected) + { + } + try + { + new SimpleTestCaseInfo((TestCaseInfo)null); + fail(); + } + catch (IllegalArgumentException expected) + { + } + + // Test initial state + SimpleTestCaseInfo testCase =3D new SimpleTestCaseInfo("my_test_case= "); + assertEquals("my_test_case", testCase.getName()); + assertEquals(null, testCase.getDescription()); + assertEquals(set(), testCase.getKeywords()); + assertEquals(Collections.emptyMap(), testCase.getParameters()); + + // Test corruption + try + { + testCase.setKeywords(null); + fail(); + } + catch (IllegalArgumentException e) + { + } + try + { + testCase.getKeywords().clear(); + fail(); + } + catch (UnsupportedOperationException e) + { + } + try + { + testCase.setParameters(null); + fail(); + } + catch (IllegalArgumentException e) + { + } + try + { + testCase.getParameters().clear(); + fail(); + } + catch (UnsupportedOperationException e) + { + } + + // Test update + testCase.setDescription("desc"); + assertEquals("desc", testCase.getDescription()); + Map newParameters =3D new HashMap(); + newParameters.put("foo", new SimpleParameterInfo("foo")); + testCase.setParameters(newParameters); + newParameters.clear(); + Map parameters =3D testCase.getPara= meters(); + assertNotNull(parameters); + assertEquals(1, parameters.size()); + ParameterInfo fooParameter =3D parameters.get("foo"); + assertNotNull(fooParameter); + assertEquals("foo", fooParameter.getName()); + + // Test cloning + } + + private static void testSuiteInfo() + { + try + { + new SimpleTestSuiteInfo((String)null); + fail(); + } + catch (IllegalArgumentException expected) + { + } + try + { + new SimpleTestSuiteInfo((TestSuiteInfo)null); + fail(); + } + catch (IllegalArgumentException expected) + { + } + + // Test initial state + SimpleTestSuiteInfo testSuite =3D new SimpleTestSuiteInfo("my_test_s= uite"); + assertEquals("my_test_suite", testSuite.getName()); + assertEquals(null, testSuite.getDescription()); + assertEquals(set(), testSuite.getKeywords()); + assertEquals(Collections.emptyMap(), testSuite.getParameters()); + assertEquals(Collections.emptySet(), testSuite.getNames()); + + // Test corruption + try + { + testSuite.setKeywords(null); + fail(); + } + catch (IllegalArgumentException e) + { + } + try + { + testSuite.getKeywords().clear(); + fail(); + } + catch (UnsupportedOperationException e) + { + } + try + { + testSuite.setParameters(null); + fail(); + } + catch (IllegalArgumentException e) + { + } + try + { + testSuite.getParameters().clear(); + fail(); + } + catch (UnsupportedOperationException e) + { + } + try + { + testSuite.getNames().clear(); + fail(); + } + catch (UnsupportedOperationException e) + { + } + try + { + testSuite.addTest(null); + fail(); + } + catch (IllegalArgumentException e) + { + } + try + { + testSuite.removeTest(null); + fail(); + } + catch (IllegalArgumentException e) + { + } + + // Test update + SimpleTestCaseInfo fooTestCase =3D new SimpleTestCaseInfo("foo"); + testSuite.addTest(fooTestCase); + assertEquals(set("foo"), testSuite.getNames()); + TestCaseInfo fooTestCase2 =3D assertInstanceOf(testSuite.getTest("fo= o"), TestCaseInfo.class); + assertEquals("foo", fooTestCase2.getName()); + assertEquals(null, fooTestCase2.getDescription()); + fooTestCase.setDescription("blah"); + assertEquals(null, fooTestCase2.getDescription()); + = + + // Test cloning + TestSuiteInfo clone =3D new SimpleTestSuiteInfo(testSuite); + assertEquals("my_test_suite", clone.getName()); + assertEquals(set("foo"), testSuite.getNames()); + TestCaseInfo fooTestCase3 =3D assertInstanceOf(clone.getTest("foo"),= TestCaseInfo.class); + assertEquals("foo", fooTestCase3.getName()); + assertEquals(null, fooTestCase3.getDescription()); + testSuite.removeTest("foo"); + assertEquals(set(), testSuite.getNames()); + assertEquals(set("foo"), clone.getNames()); + } +} Modified: modules/test/trunk/unit/src/main/org/jboss/unit/info/ParameterInf= o.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/info/ParameterInfo.java= 2007-10-03 04:07:22 UTC (rev 8519) +++ modules/test/trunk/unit/src/main/org/jboss/unit/info/ParameterInfo.java= 2007-10-03 21:17:10 UTC (rev 8520) @@ -40,15 +40,17 @@ String getName(); = /** - * The parameter description. + * The parameter description or null if no description is available. * * @return the description */ String getDescription(); = /** - * Return the list of values that should be used for the test. - * @return + * Return the list of values that should be used for the test, if no de= fault values are available + * it returns an empty list. + * + * @return the list of default values */ List getDefaultValues(); = Added: modules/test/trunk/unit/src/main/org/jboss/unit/info/impl/SimplePara= meterInfo.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/info/impl/SimpleParamet= erInfo.java (rev 0) +++ modules/test/trunk/unit/src/main/org/jboss/unit/info/impl/SimpleParamet= erInfo.java 2007-10-03 21:17:10 UTC (rev 8520) @@ -0,0 +1,97 @@ +/*************************************************************************= ***** + * JBoss, a division of Red Hat = * + * Copyright 2006, Red Hat Middleware, LLC, and individual = * + * contributors as indicated by the @authors tag. See the = * + * copyright.txt in the distribution for a full listing of = * + * individual contributors. = * + * = * + * This is free software; you can redistribute it and/or modify it = * + * under the terms of the GNU Lesser General Public License as = * + * published by the Free Software Foundation; either version 2.1 of = * + * the License, or (at your option) any later version. = * + * = * + * This software is distributed in the hope that it will be useful, = * + * but WITHOUT ANY WARRANTY; without even the implied warranty of = * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU = * + * Lesser General Public License for more details. = * + * = * + * You should have received a copy of the GNU Lesser General Public = * + * License along with this software; if not, write to the Free = * + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA = * + * 02110-1301 USA, or see the FSF site: http://www.fsf.org. = * + *************************************************************************= *****/ +package org.jboss.unit.info.impl; + +import org.jboss.unit.info.ParameterInfo; + +import java.util.List; +import java.util.ArrayList; +import java.util.Collections; + +/** + * @author Julien Viet + * @version $Revision: 1.1 $ + */ +public class SimpleParameterInfo implements ParameterInfo +{ + + /** . */ + private final String name; + + /** . */ + private String description; + + /** . */ + private List defaultValues; + + public SimpleParameterInfo(String name) + { + if (name =3D=3D null) + { + throw new IllegalArgumentException("No null value accepted"); + } + this.name =3D name; + this.description =3D null; + this.defaultValues =3D new ArrayList(); + } + + public SimpleParameterInfo(ParameterInfo that) + { + if (that =3D=3D null) + { + throw new IllegalArgumentException("No null value accepted"); + } + this.name =3D that.getName(); + this.description =3D that.getDescription(); + this.defaultValues =3D new ArrayList(that.getDefaultValues()= ); + } + + public String getName() + { + return name; + } + + public String getDescription() + { + return description; + } + + public void setDescription(String description) + { + this.description =3D description; + } + + public List getDefaultValues() + { + return Collections.unmodifiableList(defaultValues); + } + + public void setDefaultValues(List defaultValues) + { + if (defaultValues =3D=3D null) + { + throw new IllegalArgumentException(); + } + this.defaultValues =3D new ArrayList(defaultValues); + } +} Added: modules/test/trunk/unit/src/main/org/jboss/unit/info/impl/SimpleTest= CaseInfo.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/info/impl/SimpleTestCas= eInfo.java (rev 0) +++ modules/test/trunk/unit/src/main/org/jboss/unit/info/impl/SimpleTestCas= eInfo.java 2007-10-03 21:17:10 UTC (rev 8520) @@ -0,0 +1,42 @@ +/*************************************************************************= ***** + * JBoss, a division of Red Hat = * + * Copyright 2006, Red Hat Middleware, LLC, and individual = * + * contributors as indicated by the @authors tag. See the = * + * copyright.txt in the distribution for a full listing of = * + * individual contributors. = * + * = * + * This is free software; you can redistribute it and/or modify it = * + * under the terms of the GNU Lesser General Public License as = * + * published by the Free Software Foundation; either version 2.1 of = * + * the License, or (at your option) any later version. = * + * = * + * This software is distributed in the hope that it will be useful, = * + * but WITHOUT ANY WARRANTY; without even the implied warranty of = * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU = * + * Lesser General Public License for more details. = * + * = * + * You should have received a copy of the GNU Lesser General Public = * + * License along with this software; if not, write to the Free = * + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA = * + * 02110-1301 USA, or see the FSF site: http://www.fsf.org. = * + *************************************************************************= *****/ +package org.jboss.unit.info.impl; + +import org.jboss.unit.info.TestCaseInfo; + +/** + * @author Julien Viet + * @version $Revision: 1.1 $ + */ +public class SimpleTestCaseInfo extends SimpleTestInfo implements TestCase= Info +{ + public SimpleTestCaseInfo(String name) + { + super(name); + } + + public SimpleTestCaseInfo(TestCaseInfo that) + { + super(that); + } +} Added: modules/test/trunk/unit/src/main/org/jboss/unit/info/impl/SimpleTest= Info.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/info/impl/SimpleTestInf= o.java (rev 0) +++ modules/test/trunk/unit/src/main/org/jboss/unit/info/impl/SimpleTestInf= o.java 2007-10-03 21:17:10 UTC (rev 8520) @@ -0,0 +1,137 @@ +/*************************************************************************= ***** + * JBoss, a division of Red Hat = * + * Copyright 2006, Red Hat Middleware, LLC, and individual = * + * contributors as indicated by the @authors tag. See the = * + * copyright.txt in the distribution for a full listing of = * + * individual contributors. = * + * = * + * This is free software; you can redistribute it and/or modify it = * + * under the terms of the GNU Lesser General Public License as = * + * published by the Free Software Foundation; either version 2.1 of = * + * the License, or (at your option) any later version. = * + * = * + * This software is distributed in the hope that it will be useful, = * + * but WITHOUT ANY WARRANTY; without even the implied warranty of = * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU = * + * Lesser General Public License for more details. = * + * = * + * You should have received a copy of the GNU Lesser General Public = * + * License along with this software; if not, write to the Free = * + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA = * + * 02110-1301 USA, or see the FSF site: http://www.fsf.org. = * + *************************************************************************= *****/ +package org.jboss.unit.info.impl; + +import org.jboss.unit.info.TestInfo; +import org.jboss.unit.info.ParameterInfo; + +import java.util.Map; +import java.util.Set; +import java.util.HashMap; +import java.util.HashSet; +import java.util.Collections; + +/** + * @author Julien Viet + * @version $Revision: 1.1 $ + */ +public abstract class SimpleTestInfo implements TestInfo +{ + + /** . */ + private final String name; + + /** . */ + private String description; + + /** . */ + private Map parameters; + + /** . */ + private Set keywords; + + public SimpleTestInfo(String name) + { + if (name =3D=3D null) + { + throw new IllegalArgumentException(); + } + + // + this.name =3D name; + this.description =3D null; + this.parameters =3D new HashMap(); + this.keywords =3D new HashSet(); + } + + public SimpleTestInfo(TestInfo that) + { + if (that =3D=3D null) + { + throw new IllegalArgumentException(); + } + + // + Map parameters =3D new HashMap(); + for (Map.Entry entry : that.getPara= meters().entrySet()) + { + parameters.put(entry.getKey(), new SimpleParameterInfo(entry.getV= alue())); + } + + // + this.name =3D that.getName(); + this.description =3D that.getDescription(); + this.keywords =3D new HashSet(that.getKeywords()); + this.parameters =3D parameters; + } + + public String getName() + { + return name; + } + + public String getDescription() + { + return description; + } + + public void setDescription(String description) + { + this.description =3D description; + } + + public Map getParameters() + { + return Collections.unmodifiableMap(parameters); + } + + public void setParameters(Map paramete= rs) + { + if (parameters =3D=3D null) + { + throw new IllegalArgumentException(); + } + + // + Map tmp =3D new HashMap(); + for (Map.Entry entry : parameters.e= ntrySet()) + { + tmp.put(entry.getKey(), new SimpleParameterInfo(entry.getValue())= ); + } + this.parameters =3D tmp; + } + + public Set getKeywords() + { + return Collections.unmodifiableSet(keywords); + } + + public void setKeywords(Set keywords) + { + if (keywords =3D=3D null) + { + throw new IllegalArgumentException(); + } + this.keywords =3D new HashSet(keywords); + } +} Added: modules/test/trunk/unit/src/main/org/jboss/unit/info/impl/SimpleTest= SuiteInfo.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/info/impl/SimpleTestSui= teInfo.java (rev 0) +++ modules/test/trunk/unit/src/main/org/jboss/unit/info/impl/SimpleTestSui= teInfo.java 2007-10-03 21:17:10 UTC (rev 8520) @@ -0,0 +1,113 @@ +/*************************************************************************= ***** + * JBoss, a division of Red Hat = * + * Copyright 2006, Red Hat Middleware, LLC, and individual = * + * contributors as indicated by the @authors tag. See the = * + * copyright.txt in the distribution for a full listing of = * + * individual contributors. = * + * = * + * This is free software; you can redistribute it and/or modify it = * + * under the terms of the GNU Lesser General Public License as = * + * published by the Free Software Foundation; either version 2.1 of = * + * the License, or (at your option) any later version. = * + * = * + * This software is distributed in the hope that it will be useful, = * + * but WITHOUT ANY WARRANTY; without even the implied warranty of = * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU = * + * Lesser General Public License for more details. = * + * = * + * You should have received a copy of the GNU Lesser General Public = * + * License along with this software; if not, write to the Free = * + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA = * + * 02110-1301 USA, or see the FSF site: http://www.fsf.org. = * + *************************************************************************= *****/ +package org.jboss.unit.info.impl; + +import org.jboss.unit.info.TestSuiteInfo; +import org.jboss.unit.info.TestInfo; +import org.jboss.unit.info.TestCaseInfo; +import org.jboss.unit.TestId; + +import java.util.Map; +import java.util.HashMap; +import java.util.Set; +import java.util.Collections; + +/** + * @author Julien Viet + * @version $Revision: 1.1 $ + */ +public class SimpleTestSuiteInfo extends SimpleTestInfo implements TestSui= teInfo +{ + + private Map tests; + + public SimpleTestSuiteInfo(String name) + { + super(name); + + // + this.tests =3D new HashMap(); + } + + public SimpleTestSuiteInfo(TestSuiteInfo that) + { + super(that); + + // + this.tests =3D new HashMap(); + + // + for (String testName : that.getNames()) + { + TestInfo test =3D that.getTest(testName); + addTest(test); + } + } + + public TestInfo getTest(String name) + { + return tests.get(name); + } + + public Set getNames() + { + return Collections.unmodifiableSet(tests.keySet()); + } + + public TestInfo findTest(TestId id) + { + return null; + } + + public void addTest(TestInfo test) + { + if (test =3D=3D null) + { + throw new IllegalArgumentException(); + } + tests.put(test.getName(), create(test)); + } + + public void removeTest(String testName) + { + if (testName =3D=3D null) + { + throw new IllegalArgumentException(); + } + tests.remove(testName); + } + + private SimpleTestInfo create(TestInfo test) + { + if (test instanceof TestSuiteInfo) + { + TestSuiteInfo testSuite =3D (TestSuiteInfo)test; + return new SimpleTestSuiteInfo(testSuite); + } + else + { + TestCaseInfo testCase =3D (TestCaseInfo)test; + return new SimpleTestCaseInfo(testCase); + } + } +} --===============6989882240203129779==-- From portal-commits at lists.jboss.org Wed Oct 3 19:38:28 2007 Content-Type: multipart/mixed; boundary="===============8607369702571074859==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8521 - in modules/common/trunk: mc and 1 other directories. Date: Wed, 03 Oct 2007 19:38:28 -0400 Message-ID: --===============8607369702571074859== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: wesleyhales Date: 2007-10-03 19:38:27 -0400 (Wed, 03 Oct 2007) New Revision: 8521 Added: modules/common/trunk/mc/pom.xml modules/common/trunk/portal/pom.xml Modified: modules/common/trunk/common/pom.xml Log: added maven builds for common mc and portal - and a little reorganization Modified: modules/common/trunk/common/pom.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/common/trunk/common/pom.xml 2007-10-03 21:17:10 UTC (rev 8520) +++ modules/common/trunk/common/pom.xml 2007-10-03 23:38:27 UTC (rev 8521) @@ -1,14 +1,14 @@ - jboss-portal - org.jboss.portal + org.jboss.portal.common + jboss-portal-common 1.0-SNAPSHOT 4.0.0 jboss-portal-modules-common jar - Jboss Portal Common + Jboss Portal Modules Common = = @@ -30,12 +30,6 @@ 1.1 = - - jboss jboss-j2ee @@ -164,23 +158,6 @@ = - = src/test/java @@ -225,8 +202,5 @@ = - - - - + \ No newline at end of file Added: modules/common/trunk/mc/pom.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/common/trunk/mc/pom.xml (rev 0) +++ modules/common/trunk/mc/pom.xml 2007-10-03 23:38:27 UTC (rev 8521) @@ -0,0 +1,39 @@ + + + org.jboss.portal.common + jboss-portal-common + 1.0-SNAPSHOT + + 4.0.0 + jboss-portal-modules-common-mc + jar + Jboss Portal Modules Common MC + + + = + + org.jboss.microcontainer + jboss-kernel + 2.0.0.Beta4 + + + + apache-log4j + log4j + 1.2.14 + + + + javax.servlet + servlet-api + 2.5 + + + + + + + + = + \ No newline at end of file Added: modules/common/trunk/portal/pom.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/common/trunk/portal/pom.xml (rev 0) +++ modules/common/trunk/portal/pom.xml 2007-10-03 23:38:27 UTC (rev 8521) @@ -0,0 +1,25 @@ + + + org.jboss.portal.common + jboss-portal-common + 1.0-SNAPSHOT + + 4.0.0 + jboss-portal-modules-common-portal + jar + Jboss Portal Modules Common Portal + + + + + + + + + + + + + + --===============8607369702571074859==-- From portal-commits at lists.jboss.org Wed Oct 3 19:40:06 2007 Content-Type: multipart/mixed; boundary="===============9035324949366221379==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8522 - modules/common. Date: Wed, 03 Oct 2007 19:40:05 -0400 Message-ID: --===============9035324949366221379== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: wesleyhales Date: 2007-10-03 19:40:05 -0400 (Wed, 03 Oct 2007) New Revision: 8522 Added: modules/common/pom.xml Log: root level pom for modules Added: modules/common/pom.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/common/pom.xml (rev 0) +++ modules/common/pom.xml 2007-10-03 23:40:05 UTC (rev 8522) @@ -0,0 +1,181 @@ + + 4.0.0 + org.jboss.portal.common + jboss-portal-common + pom + Jboss Portal Modules Common + 1.0-SNAPSHOT + http://labs.jboss.com/jbossportal + + + + + + repository.jboss.org + JBoss Repository + default + http://repository.jboss.org/maven2/ + + false + + + + snapshots.jboss.org + JBoss Snapshots Repository + default + http://snapshots.jboss.org/maven2/ + + true + + + false + + + + + + + + org.apache.maven.wagon + wagon-webdav + 1.0-beta-2 + + + + + + true + org.apache.maven.plugins + maven-compiler-plugin + + 1.5 + 1.5 + true + true + true + + + + org.apache.maven.plugins + maven-jar-plugin + + + + true + + + + + + org.codehaus.mojo + jboss-packaging-maven-plugin + 2.0-SNAPSHOT + true + + + maven-idea-plugin + + true + + + + org.jboss.maven.plugins + maven-jboss-deploy-plugin + 1.3 + + + + jboss-deploy + + + + + ${jboss.repository.root} + + + + + + + + + + + + + + snapshots.jboss.org + JBoss Snapshot Repository + dav:https://snapshots.jboss.org/maven2 + true + + + + + trunk/common + trunk/mc + trunk/portal + + + + + JIRA + http://jira.jboss.com/jira/browse/JBPORTAL + + + cruisecontrol + + + + + LGPL 2.1 + http://www.gnu.org/licenses/lgpl.html + repo + + GNU LESSER GENERAL PUBLIC LICENSE Version 2.1 + + + + + scm:svn:http://anonsvn.jboss.org/repos/portal/trunk + scm:svn:https://svn.jboss.org/repos/portal/trun= k + https://svn.jboss.org/repos/portal/trunk + + + + + + maven-changes-plugin + + + maven-checkstyle-plugin + + + org.codehaus.mojo + cobertura-maven-plugin + 2.0 + + + maven-javadoc-plugin + + + maven-jxr-plugin + + + maven-pmd-plugin + + true + 1.5 + + + + maven-surefire-report-plugin + + + + + + + \ No newline at end of file --===============9035324949366221379==-- From portal-commits at lists.jboss.org Wed Oct 3 19:46:52 2007 Content-Type: multipart/mixed; boundary="===============8294907074333213192==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8523 - /. Date: Wed, 03 Oct 2007 19:46:52 -0400 Message-ID: --===============8294907074333213192== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: wesleyhales Date: 2007-10-03 19:46:52 -0400 (Wed, 03 Oct 2007) New Revision: 8523 Modified: pom.xml Log: changes to root level pom Modified: pom.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- pom.xml 2007-10-03 23:40:05 UTC (rev 8522) +++ pom.xml 2007-10-03 23:46:52 UTC (rev 8523) @@ -102,11 +102,12 @@ = - - modules/common/trunk/common - = + = + JIRA http://jira.jboss.com/jira/browse/JBPORTAL --===============8294907074333213192==-- From portal-commits at lists.jboss.org Wed Oct 3 20:00:53 2007 Content-Type: multipart/mixed; boundary="===============3268395558826631374==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8524 - in modules/common/trunk: mc and 1 other directories. Date: Wed, 03 Oct 2007 20:00:53 -0400 Message-ID: --===============3268395558826631374== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: wesleyhales Date: 2007-10-03 20:00:53 -0400 (Wed, 03 Oct 2007) New Revision: 8524 Modified: modules/common/trunk/common/pom.xml modules/common/trunk/mc/pom.xml modules/common/trunk/portal/pom.xml Log: renames and touch up Modified: modules/common/trunk/common/pom.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/common/trunk/common/pom.xml 2007-10-03 23:46:52 UTC (rev 8523) +++ modules/common/trunk/common/pom.xml 2007-10-04 00:00:53 UTC (rev 8524) @@ -2,7 +2,7 @@ xsi:schemaLocation=3D"http://maven.apache.org/POM/4.0.0 http://ma= ven.apache.org/maven-v4_0_0.xsd"> org.jboss.portal.common - jboss-portal-common + jboss-portal-modules-common-root 1.0-SNAPSHOT 4.0.0 Modified: modules/common/trunk/mc/pom.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/common/trunk/mc/pom.xml 2007-10-03 23:46:52 UTC (rev 8523) +++ modules/common/trunk/mc/pom.xml 2007-10-04 00:00:53 UTC (rev 8524) @@ -2,7 +2,7 @@ xsi:schemaLocation=3D"http://maven.apache.org/POM/4.0.0 http://ma= ven.apache.org/maven-v4_0_0.xsd"> org.jboss.portal.common - jboss-portal-common + jboss-portal-modules-common-root 1.0-SNAPSHOT 4.0.0 Modified: modules/common/trunk/portal/pom.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/common/trunk/portal/pom.xml 2007-10-03 23:46:52 UTC (rev 8523) +++ modules/common/trunk/portal/pom.xml 2007-10-04 00:00:53 UTC (rev 8524) @@ -2,7 +2,7 @@ xsi:schemaLocation=3D"http://maven.apache.org/POM/4.0.0 http://ma= ven.apache.org/maven-v4_0_0.xsd"> org.jboss.portal.common - jboss-portal-common + jboss-portal-modules-common-root 1.0-SNAPSHOT 4.0.0 --===============3268395558826631374==-- From portal-commits at lists.jboss.org Wed Oct 3 20:01:24 2007 Content-Type: multipart/mixed; boundary="===============5926252666021918518==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8525 - modules/common. Date: Wed, 03 Oct 2007 20:01:24 -0400 Message-ID: --===============5926252666021918518== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: wesleyhales Date: 2007-10-03 20:01:24 -0400 (Wed, 03 Oct 2007) New Revision: 8525 Modified: modules/common/pom.xml Log: renames and touch up Modified: modules/common/pom.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/common/pom.xml 2007-10-04 00:00:53 UTC (rev 8524) +++ modules/common/pom.xml 2007-10-04 00:01:24 UTC (rev 8525) @@ -2,7 +2,7 @@ xsi:schemaLocation=3D"http://maven.apache.org/POM/4.0.0 http://ma= ven.apache.org/maven-v4_0_0.xsd"> 4.0.0 org.jboss.portal.common - jboss-portal-common + jboss-portal-modules-common-root pom Jboss Portal Modules Common 1.0-SNAPSHOT @@ -37,11 +37,11 @@ - org.apache.maven.wagon - wagon-webdav - 1.0-beta-2 + org.apache.maven.wagon + wagon-webdav + 1.0-beta-2 - + @@ -80,37 +80,37 @@ - org.jboss.maven.plugins - maven-jboss-deploy-plugin - 1.3 - - - - jboss-deploy - - - - - ${jboss.repository.root} - + org.jboss.maven.plugins + maven-jboss-deploy-plugin + 1.3 + + + + jboss-deploy + + + + + ${jboss.repository.root} + = - + - - - - - snapshots.jboss.org - JBoss Snapshot Repository - dav:https://snapshots.jboss.org/maven2 - true - + + + + + snapshots.jboss.org + JBoss Snapshot Repository + dav:https://snapshots.jboss.org/maven2 + true + = --===============5926252666021918518==-- From portal-commits at lists.jboss.org Wed Oct 3 20:13:00 2007 Content-Type: multipart/mixed; boundary="===============0022872101117580640==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8526 - /. Date: Wed, 03 Oct 2007 20:13:00 -0400 Message-ID: --===============0022872101117580640== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: wesleyhales Date: 2007-10-03 20:12:59 -0400 (Wed, 03 Oct 2007) New Revision: 8526 Modified: pom.xml Log: version change Modified: pom.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- pom.xml 2007-10-04 00:01:24 UTC (rev 8525) +++ pom.xml 2007-10-04 00:12:59 UTC (rev 8526) @@ -5,7 +5,7 @@ jboss-portal pom Jboss Portal - 1.0-SNAPSHOT + 1.1.0-SNAPSHOT http://labs.jboss.com/jbossportal = --===============0022872101117580640==-- From portal-commits at lists.jboss.org Wed Oct 3 20:13:14 2007 Content-Type: multipart/mixed; boundary="===============8750586960894982738==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8527 - in modules/common/trunk: mc and 1 other directories. Date: Wed, 03 Oct 2007 20:13:14 -0400 Message-ID: --===============8750586960894982738== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: wesleyhales Date: 2007-10-03 20:13:14 -0400 (Wed, 03 Oct 2007) New Revision: 8527 Modified: modules/common/trunk/common/pom.xml modules/common/trunk/mc/pom.xml modules/common/trunk/portal/pom.xml Log: version change Modified: modules/common/trunk/common/pom.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/common/trunk/common/pom.xml 2007-10-04 00:12:59 UTC (rev 8526) +++ modules/common/trunk/common/pom.xml 2007-10-04 00:13:14 UTC (rev 8527) @@ -3,7 +3,7 @@ org.jboss.portal.common jboss-portal-modules-common-root - 1.0-SNAPSHOT + 1.1.0-SNAPSHOT 4.0.0 jboss-portal-modules-common Modified: modules/common/trunk/mc/pom.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/common/trunk/mc/pom.xml 2007-10-04 00:12:59 UTC (rev 8526) +++ modules/common/trunk/mc/pom.xml 2007-10-04 00:13:14 UTC (rev 8527) @@ -3,7 +3,7 @@ org.jboss.portal.common jboss-portal-modules-common-root - 1.0-SNAPSHOT + 1.1.0-SNAPSHOT 4.0.0 jboss-portal-modules-common-mc Modified: modules/common/trunk/portal/pom.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/common/trunk/portal/pom.xml 2007-10-04 00:12:59 UTC (rev 8526) +++ modules/common/trunk/portal/pom.xml 2007-10-04 00:13:14 UTC (rev 8527) @@ -3,7 +3,7 @@ org.jboss.portal.common jboss-portal-modules-common-root - 1.0-SNAPSHOT + 1.1.0-SNAPSHOT 4.0.0 jboss-portal-modules-common-portal --===============8750586960894982738==-- From portal-commits at lists.jboss.org Thu Oct 4 05:46:25 2007 Content-Type: multipart/mixed; boundary="===============1727334839425000304==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8528 - in modules/test/trunk/unit/src/main/org/jboss: unit/report/junit and 1 other directory. Date: Thu, 04 Oct 2007 05:46:25 -0400 Message-ID: --===============1727334839425000304== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: emuckenhuber Date: 2007-10-04 05:46:25 -0400 (Thu, 04 Oct 2007) New Revision: 8528 Added: modules/test/trunk/unit/src/main/org/jboss/test/unit/blah/BlahTestTwo.ja= va modules/test/trunk/unit/src/main/org/jboss/unit/report/junit/JUnitTestRe= port.java Modified: modules/test/trunk/unit/src/main/org/jboss/unit/report/junit/JUnitReport= er.java modules/test/trunk/unit/src/main/org/jboss/unit/report/junit/XMLConstant= s.java Log: - inital junit xml reporter import Added: modules/test/trunk/unit/src/main/org/jboss/test/unit/blah/BlahTestTw= o.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/test/unit/blah/BlahTestTwo.j= ava (rev 0) +++ modules/test/trunk/unit/src/main/org/jboss/test/unit/blah/BlahTestTwo.j= ava 2007-10-04 09:46:25 UTC (rev 8528) @@ -0,0 +1,61 @@ +/*************************************************************************= ***** + * JBoss, a division of Red Hat = * + * Copyright 2006, Red Hat Middleware, LLC, and individual = * + * contributors as indicated by the @authors tag. See the = * + * copyright.txt in the distribution for a full listing of = * + * individual contributors. = * + * = * + * This is free software; you can redistribute it and/or modify it = * + * under the terms of the GNU Lesser General Public License as = * + * published by the Free Software Foundation; either version 2.1 of = * + * the License, or (at your option) any later version. = * + * = * + * This software is distributed in the hope that it will be useful, = * + * but WITHOUT ANY WARRANTY; without even the implied warranty of = * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU = * + * Lesser General Public License for more details. = * + * = * + * You should have received a copy of the GNU Lesser General Public = * + * License along with this software; if not, write to the Free = * + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA = * + * 02110-1301 USA, or see the FSF site: http://www.fsf.org. = * + *************************************************************************= *****/ +package org.jboss.test.unit.blah; + +import java.io.InputStream; + +import org.jboss.test.unit.PrintListener; +import org.jboss.unit.report.junit.JUnitReporter; +import org.jboss.unit.runner.TestRunner; +import org.jboss.unit.runner.TestRunnerEventListener; +import org.jboss.unit.runner.model.ModelBuilder; +import org.jboss.unit.runner.model.TestSuiteDef; +import org.xml.sax.InputSource; + +/** + * @author Emanuel Muckenhuber + * @version $Revision$ + */ +public class BlahTestTwo +{ + + public static void main(String[] args) throws Exception + { + + InputStream in =3D BlahTests.class.getResourceAsStream("f1.xml"); + InputSource source =3D new InputSource(in); + ModelBuilder builder =3D new ModelBuilder(source); + TestSuiteDef suite =3D builder.build(); + + TestRunner runner =3D suite.createRunner(); + + TestRunnerEventListener junitReporter =3D new JUnitReporter("output"= , BlahTestTwo.class.getName()); + // add listeners + runner.addListener(junitReporter); + runner.addListener(new PrintListener()); + + // run the test + runner.run(); + + } +} Modified: modules/test/trunk/unit/src/main/org/jboss/unit/report/junit/JUni= tReporter.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/report/junit/JUnitRepor= ter.java 2007-10-04 00:13:14 UTC (rev 8527) +++ modules/test/trunk/unit/src/main/org/jboss/unit/report/junit/JUnitRepor= ter.java 2007-10-04 09:46:25 UTC (rev 8528) @@ -22,20 +22,142 @@ *************************************************************************= *****/ package org.jboss.unit.report.junit; = +import java.io.ByteArrayOutputStream; +import java.io.IOException; +import java.io.OutputStream; +import java.io.PrintStream; + import org.jboss.unit.runner.TestRunnerEventListener; import org.jboss.unit.runner.TestRunnerEvent; +import org.jboss.unit.runner.event.EndRunnerEvent; +import org.jboss.unit.runner.event.EndTestEvent; +import org.jboss.unit.runner.event.RunnerFailureEvent; +import org.jboss.unit.runner.event.StartRunnerEvent; +import org.jboss.unit.runner.event.StartTestEvent; = /** - * @todo * * @author Julien Viet + * @author Emanuel Muckenhuber * @version $Revision: 1.1 $ */ public class JUnitReporter implements TestRunnerEventListener { - + /** The JUnit test report */ + private JUnitTestReport report; + = + /** The system error printStream */ + private ByteArrayOutputStream systemError; + = + /** The system out printStream */ + private ByteArrayOutputStream systemOut; + = + /** To dir */ + private static String toDir; = + = + public JUnitReporter(String reportToDir, + String testSuiteName) + { + this.report =3D new JUnitTestReport(testSuiteName); + toDir =3D reportToDir; + // redirecting system out and err + this.systemError =3D new ByteArrayOutputStream(); + this.systemOut =3D new ByteArrayOutputStream(); + this.setStreams(systemError, systemOut); + } + = public void onEvent(TestRunnerEvent event) { + if (event instanceof StartRunnerEvent) + { + report.startTestSuite((StartRunnerEvent) event); + } + else if (event instanceof EndRunnerEvent) + { + // append system out and system err + report.appendSystemError(systemError.toString()); + report.appendSystemOutput(systemOut.toString()); + = + // Testsuite End + report.endTestSuite((EndRunnerEvent) event); + = + // Export xml + report.exportXML(toDir); + } + else if (event instanceof RunnerFailureEvent) + { + report.runnerFailed((RunnerFailureEvent) event); + } + else if (event instanceof StartTestEvent) + { + report.startTest((StartTestEvent) event); + } + else if (event instanceof EndTestEvent) + { + report.endTest((EndTestEvent) event); + } + } + = + private void setStreams(ByteArrayOutputStream a, ByteArrayOutputStream = b) + { + PrintStream savedError =3D System.err; + PrintStream savedOut =3D System.out; + = + System.setErr(new PrintStream(new CaptureOutputStream(savedError, a)= )); + System.setOut(new PrintStream(new CaptureOutputStream(savedOut, b))); + = + } + = + private class CaptureOutputStream extends OutputStream + { + private OutputStream s1; + private OutputStream s2; + = + public CaptureOutputStream(OutputStream s1, OutputStream s2) + { + this.s1 =3D s1; + this.s2 =3D s2; + } + = + @Override + public void close() throws IOException + { + try + { + s1.close(); + } + finally + { + s2.close(); + } + } = + @Override + public void flush() throws IOException + { + s1.flush(); + s2.flush(); + } + + @Override + public void write(int b) throws IOException + { + s1.write(b); + s2.write(b); + } + = + @Override + public void write(byte[] b) throws IOException + { + s1.write(b); + s2.write(b); + } + = + @Override + public void write(byte[] b, int off, int len) throws IOException + { + s1.write(b, off, len); + s2.write(b, off, len); + } } } Added: modules/test/trunk/unit/src/main/org/jboss/unit/report/junit/JUnitTe= stReport.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/report/junit/JUnitTestR= eport.java (rev 0) +++ modules/test/trunk/unit/src/main/org/jboss/unit/report/junit/JUnitTestR= eport.java 2007-10-04 09:46:25 UTC (rev 8528) @@ -0,0 +1,292 @@ +/*************************************************************************= ***** + * JBoss, a division of Red Hat = * + * Copyright 2006, Red Hat Middleware, LLC, and individual = * + * contributors as indicated by the @authors tag. See the = * + * copyright.txt in the distribution for a full listing of = * + * individual contributors. = * + * = * + * This is free software; you can redistribute it and/or modify it = * + * under the terms of the GNU Lesser General Public License as = * + * published by the Free Software Foundation; either version 2.1 of = * + * the License, or (at your option) any later version. = * + * = * + * This software is distributed in the hope that it will be useful, = * + * but WITHOUT ANY WARRANTY; without even the implied warranty of = * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU = * + * Lesser General Public License for more details. = * + * = * + * You should have received a copy of the GNU Lesser General Public = * + * License along with this software; if not, write to the Free = * + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA = * + * 02110-1301 USA, or see the FSF site: http://www.fsf.org. = * + *************************************************************************= *****/ +package org.jboss.unit.report.junit; + +import java.io.File; +import java.io.FileNotFoundException; +import java.io.FileOutputStream; +import java.io.PrintWriter; +import java.io.StringWriter; +import java.io.Writer; +import java.net.InetAddress; +import java.net.UnknownHostException; +import java.text.SimpleDateFormat; +import java.util.Date; +import java.util.Iterator; + +import javax.xml.parsers.DocumentBuilder; +import javax.xml.parsers.DocumentBuilderFactory; +import javax.xml.parsers.ParserConfigurationException; +import javax.xml.transform.OutputKeys; +import javax.xml.transform.Result; +import javax.xml.transform.Source; +import javax.xml.transform.Transformer; +import javax.xml.transform.TransformerException; +import javax.xml.transform.TransformerFactory; +import javax.xml.transform.dom.DOMSource; +import javax.xml.transform.stream.StreamResult; + +import org.jboss.unit.Failure; +import org.jboss.unit.FailureType; +import org.jboss.unit.TestId; +import org.jboss.unit.runner.TestResult; +import org.jboss.unit.runner.event.EndRunnerEvent; +import org.jboss.unit.runner.event.EndTestEvent; +import org.jboss.unit.runner.event.RunnerFailureEvent; +import org.jboss.unit.runner.event.StartRunnerEvent; +import org.jboss.unit.runner.event.StartTestEvent; +import org.jboss.unit.runner.results.TestFailure; +import org.w3c.dom.Document; +import org.w3c.dom.Element; + +/** + * @author Emanuel Muckenhuber + * @version $Revision$ + */ +public class JUnitTestReport +{ + + /** The test suite name */ + private String testSuiteName; + = + /** The line separator */ + private final static String ls =3D System.getProperty("line.separator"); + + /** The document */ + private Document document; + = + /** The root element */ + private Element rootElement; + = + /** The system error */ + private StringBuffer systemErr =3D new StringBuffer(); + = + /** The system output */ + private StringBuffer systemOut =3D new StringBuffer(); + = + /** The test count */ + private int tests; + = + /** The error count */ + private int errors; + = + /** The failed count */ + private int failed; + + public JUnitTestReport(String testSuiteName) + { + this.testSuiteName =3D testSuiteName; + } + = + = + public void startTestSuite(StartRunnerEvent event) + { + this.document =3D getDocumentBuilder().newDocument(); + this.rootElement =3D this.document.createElement(XMLConstants.TESTSU= ITE); + this.rootElement.setAttribute(XMLConstants.TIMESTAMP, getTimestamp()= ); + this.rootElement.setAttribute(XMLConstants.HOSTNAME, getHostName()); + this.rootElement.setAttribute(XMLConstants.ATTR_NAME, this.testSuite= Name); + Element properties =3D document.createElement(XMLConstants.PROPERTIE= S); + this.rootElement.appendChild(properties); + // add properties list + + } + = + public void startTest(StartTestEvent event) + { = + this.tests++; + } + = + public void runnerFailed(RunnerFailureEvent event) + { + this.tests++; = + this.errors++; + Element e =3D document.createElement(XMLConstants.ERROR); + e.appendChild(document.createCDATASection(ls + event.getFailure().ge= tMessage() + ls + stackToString(event.getFailure().getCause()))); + rootElement.appendChild(e); + } + = + public void endTest(EndTestEvent event) + { + TestId testId =3D event.getTestId(); + TestResult result =3D event.getTestResult(); + Element test =3D document.createElement(XMLConstants.TESTCASE); + // The test name + StringBuffer nb =3D new StringBuffer(); + for(int i =3D 0; i < testId.getLength(); i ++) + { + if (i > 0) + { + nb.append("."); + } + nb.append(testId.getName(i)); + } + String testName =3D nb.toString(); + // Test parameters + StringBuffer parameters =3D new StringBuffer(); + for(Iterator i =3D result.getParametrization().values().iter= ator(); i.hasNext(); ) + { + String name =3D i.next(); + String value =3D result.getParametrization().get(name); + parameters.append(name + "=3D" + value + "?"); + } + + if ( parameters.length() > 0) + testName =3D testName + "?" + parameters.toString(); + = + test.setAttribute(XMLConstants.ATTR_NAME, testName); + // Testcase time + test.setAttribute(XMLConstants.ATTR_TIME, new Long(result.getDuratio= nMillis()).toString()); + // If test failed + if (result instanceof TestFailure) + { + TestFailure testFailure =3D (TestFailure) result; + Failure failure =3D testFailure.getFailure(); + = + String failureType; + // Check failure type (failed, error) + if(FailureType.ASSERTION =3D=3D failure.getType()) + { + this.failed++; + failureType =3D XMLConstants.FAILURE; + } + else = + { + this.errors++; + failureType =3D XMLConstants.ERROR; + } + + test.appendChild(addError(failureType, failure.getCause())); + } + this.rootElement.appendChild(test); + } + = + public void endTestSuite(EndRunnerEvent event) + { + // Testsuite counts (tests, errors, failures) + this.rootElement.setAttribute(XMLConstants.ATTR_TESTS, Integer.toStr= ing(this.tests)); + this.rootElement.setAttribute(XMLConstants.ATTR_ERRORS, Integer.toSt= ring(this.errors)); + this.rootElement.setAttribute(XMLConstants.ATTR_FAILURES, Integer.to= String(this.failed)); + = + // Testsuite system-err + Element systemError =3D document.createElement(XMLConstants.SYSTEM_E= RR); + systemError.appendChild(document.createCDATASection(systemErr.toStri= ng())); + // Testsuite system-out + Element systemOutElement =3D document.createElement(XMLConstants.SYS= TEM_OUT); + systemOutElement.appendChild(document.createCDATASection(systemOut.t= oString())); + = + this.rootElement.appendChild(systemError); + this.rootElement.appendChild(systemOutElement); + = + // System.out.println(exportXML()); + } + = + public void appendSystemOutput(String output) + { + this.systemOut.append(output); + } + = + public void appendSystemError(String error) + { + this.systemErr.append(error); + } + = + public void exportXML(String toDir) + { + try + { + File file =3D new File(toDir + "/" + "TEST-" + testSuiteName + ".= xml"); + = + Source source =3D new DOMSource(this.rootElement); + Transformer xtrans =3D TransformerFactory.newInstance().newTransf= ormer(); + xtrans.setOutputProperty(OutputKeys.INDENT, "yes"); + Result result =3D new StreamResult(new FileOutputStream(file)); + xtrans.transform(source, result); + } + catch(FileNotFoundException e) + { + e.printStackTrace(); + } + catch(TransformerException e) + { + e.printStackTrace(); + } + catch(IllegalArgumentException e) + { + e.printStackTrace(); + } + } + = + private Element addError(String type, Throwable t) + { + Element error =3D document.createElement(type); + // Testcase error message + error.setAttribute(XMLConstants.ATTR_MESSAGE, t.getMessage()); + // Testcase error type + error.setAttribute(XMLConstants.ATTR_TYPE, t.getClass().getName()); + // Testcase stacktrace + error.appendChild(document.createCDATASection(stackToString(t))); + return error; + } + = + private static String stackToString(Throwable t) + { + final Writer writer =3D new StringWriter(); + final PrintWriter printWriter =3D new PrintWriter(writer); + t.printStackTrace(printWriter); + printWriter.flush(); + printWriter.close(); + return writer.toString(); + } + = + private static String getTimestamp() + { + SimpleDateFormat date =3D new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:s= s"); + return date.format(new Date()); + } + = + private static String getHostName() + { + try + { + return InetAddress.getLocalHost().getHostName(); + } + catch(UnknownHostException e) + { + return "localhost"; + } + } + = + private static DocumentBuilder getDocumentBuilder() + { + try + { + return DocumentBuilderFactory.newInstance().newDocumentBuilder(); + } + catch(ParserConfigurationException e) + { + e.printStackTrace(); + return null; + } + } +} \ No newline at end of file Modified: modules/test/trunk/unit/src/main/org/jboss/unit/report/junit/XMLC= onstants.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/report/junit/XMLConstan= ts.java 2007-10-04 00:13:14 UTC (rev 8527) +++ modules/test/trunk/unit/src/main/org/jboss/unit/report/junit/XMLConstan= ts.java 2007-10-04 09:46:25 UTC (rev 8528) @@ -92,6 +92,13 @@ = /** id attribute */ public static final String ATTR_ID =3D "id"; + = + /** timestamp of test cases */ + public static final String TIMESTAMP =3D "timestamp"; + + /** name of host running the tests */ + public static final String HOSTNAME =3D "hostname"; + } = /* --===============1727334839425000304==-- From portal-commits at lists.jboss.org Thu Oct 4 09:46:53 2007 Content-Type: multipart/mixed; boundary="===============4556150917073877955==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8529 - modules/common. Date: Thu, 04 Oct 2007 09:46:53 -0400 Message-ID: --===============4556150917073877955== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: wesleyhales Date: 2007-10-04 09:46:53 -0400 (Thu, 04 Oct 2007) New Revision: 8529 Removed: modules/common/pom.xml Log: move to trunk Deleted: modules/common/pom.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/common/pom.xml 2007-10-04 09:46:25 UTC (rev 8528) +++ modules/common/pom.xml 2007-10-04 13:46:53 UTC (rev 8529) @@ -1,181 +0,0 @@ - - 4.0.0 - org.jboss.portal.common - jboss-portal-modules-common-root - pom - Jboss Portal Modules Common - 1.0-SNAPSHOT - http://labs.jboss.com/jbossportal - - - - - - repository.jboss.org - JBoss Repository - default - http://repository.jboss.org/maven2/ - - false - - - - snapshots.jboss.org - JBoss Snapshots Repository - default - http://snapshots.jboss.org/maven2/ - - true - - - false - - - - - - - - org.apache.maven.wagon - wagon-webdav - 1.0-beta-2 - - - - - - true - org.apache.maven.plugins - maven-compiler-plugin - - 1.5 - 1.5 - true - true - true - - - - org.apache.maven.plugins - maven-jar-plugin - - - - true - - - - - - org.codehaus.mojo - jboss-packaging-maven-plugin - 2.0-SNAPSHOT - true - - - maven-idea-plugin - - true - - - - org.jboss.maven.plugins - maven-jboss-deploy-plugin - 1.3 - - - - jboss-deploy - - - - - ${jboss.repository.root} - - - - - - - - - - - - - - snapshots.jboss.org - JBoss Snapshot Repository - dav:https://snapshots.jboss.org/maven2 - true - - - - - trunk/common - trunk/mc - trunk/portal - - - - - JIRA - http://jira.jboss.com/jira/browse/JBPORTAL - - - cruisecontrol - - - - - LGPL 2.1 - http://www.gnu.org/licenses/lgpl.html - repo - - GNU LESSER GENERAL PUBLIC LICENSE Version 2.1 - - - - - scm:svn:http://anonsvn.jboss.org/repos/portal/trunk - scm:svn:https://svn.jboss.org/repos/portal/trun= k - https://svn.jboss.org/repos/portal/trunk - - - - - - maven-changes-plugin - - - maven-checkstyle-plugin - - - org.codehaus.mojo - cobertura-maven-plugin - 2.0 - - - maven-javadoc-plugin - - - maven-jxr-plugin - - - maven-pmd-plugin - - true - 1.5 - - - - maven-surefire-report-plugin - - - - - - - \ No newline at end of file --===============4556150917073877955==-- From portal-commits at lists.jboss.org Thu Oct 4 09:49:07 2007 Content-Type: multipart/mixed; boundary="===============3864829530921924878==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8530 - modules/common/trunk. Date: Thu, 04 Oct 2007 09:49:07 -0400 Message-ID: --===============3864829530921924878== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: wesleyhales Date: 2007-10-04 09:49:07 -0400 (Thu, 04 Oct 2007) New Revision: 8530 Added: modules/common/trunk/pom.xml Log: move root pom to trunk Added: modules/common/trunk/pom.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/common/trunk/pom.xml (rev 0) +++ modules/common/trunk/pom.xml 2007-10-04 13:49:07 UTC (rev 8530) @@ -0,0 +1,181 @@ + + 4.0.0 + org.jboss.portal.common + jboss-portal-modules-common-root + pom + Jboss Portal Modules Common + 1.1.0-SNAPSHOT + http://labs.jboss.com/jbossportal + + + + + + repository.jboss.org + JBoss Repository + default + http://repository.jboss.org/maven2/ + + false + + + + snapshots.jboss.org + JBoss Snapshots Repository + default + http://snapshots.jboss.org/maven2/ + + true + + + false + + + + + + + + org.apache.maven.wagon + wagon-webdav + 1.0-beta-2 + + + + + + true + org.apache.maven.plugins + maven-compiler-plugin + + 1.5 + 1.5 + true + true + true + + + + org.apache.maven.plugins + maven-jar-plugin + + + + true + + + + + + org.codehaus.mojo + jboss-packaging-maven-plugin + 2.0-SNAPSHOT + true + + + maven-idea-plugin + + true + + + + org.jboss.maven.plugins + maven-jboss-deploy-plugin + 1.3 + + + + jboss-deploy + + + + + ${jboss.repository.root} + + + + + + + + + + + + + + snapshots.jboss.org + JBoss Snapshot Repository + dav:https://snapshots.jboss.org/maven2 + true + + + + + common + mc + portal + + + + + JIRA + http://jira.jboss.com/jira/browse/JBPORTAL + + + cruisecontrol + + + + + LGPL 2.1 + http://www.gnu.org/licenses/lgpl.html + repo + + GNU LESSER GENERAL PUBLIC LICENSE Version 2.1 + + + + + scm:svn:http://anonsvn.jboss.org/repos/portal/trunk + scm:svn:https://svn.jboss.org/repos/portal/trun= k + https://svn.jboss.org/repos/portal/trunk + + + + + + maven-changes-plugin + + + maven-checkstyle-plugin + + + org.codehaus.mojo + cobertura-maven-plugin + 2.0 + + + maven-javadoc-plugin + + + maven-jxr-plugin + + + maven-pmd-plugin + + true + 1.5 + + + + maven-surefire-report-plugin + + + + + + + \ No newline at end of file --===============3864829530921924878==-- From portal-commits at lists.jboss.org Thu Oct 4 13:57:18 2007 Content-Type: multipart/mixed; boundary="===============7094445899221761866==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8531 - modules/common/trunk/common. Date: Thu, 04 Oct 2007 13:57:17 -0400 Message-ID: --===============7094445899221761866== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: wesleyhales Date: 2007-10-04 13:57:17 -0400 (Thu, 04 Oct 2007) New Revision: 8531 Modified: modules/common/trunk/common/pom.xml Log: get rid of system dependencies Modified: modules/common/trunk/common/pom.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/common/trunk/common/pom.xml 2007-10-04 13:49:07 UTC (rev 8530) +++ modules/common/trunk/common/pom.xml 2007-10-04 17:57:17 UTC (rev 8531) @@ -92,26 +92,20 @@ = ant - ant-launcher - 0.1 - system - ${basedir}/../tools/lib/ant-launcher.jar + ant-nodeps + 1.6.5 = ant - ant-nodeps - 0.1 - system - ${basedir}/../tools/lib/ant-nodeps.jar + ant-launcher + 1.6.5 = junit junit - 0.1 - system - ${basedir}/../tools/lib/junit.jar + 3.8.1 = --===============7094445899221761866==-- From portal-commits at lists.jboss.org Thu Oct 4 13:58:23 2007 Content-Type: multipart/mixed; boundary="===============1730131271233610408==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8532 - modules/common/trunk. Date: Thu, 04 Oct 2007 13:58:23 -0400 Message-ID: --===============1730131271233610408== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: wesleyhales Date: 2007-10-04 13:58:22 -0400 (Thu, 04 Oct 2007) New Revision: 8532 Modified: modules/common/trunk/pom.xml Log: add a 3rd party repo until I get permission to upload to respository.jboss.= org/maven2 Modified: modules/common/trunk/pom.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/common/trunk/pom.xml 2007-10-04 17:57:17 UTC (rev 8531) +++ modules/common/trunk/pom.xml 2007-10-04 17:58:22 UTC (rev 8532) @@ -11,6 +11,15 @@ = + + repository.maven.org + Maven Repository + default + http://repo1.maven.org/maven2/ + + false + + repository.jboss.org JBoss Repository --===============1730131271233610408==-- From portal-commits at lists.jboss.org Thu Oct 4 17:29:55 2007 Content-Type: multipart/mixed; boundary="===============0052037403819973070==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8533 - in modules/common/trunk: build and 3 other directories. Date: Thu, 04 Oct 2007 17:29:53 -0400 Message-ID: --===============0052037403819973070== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: julien(a)jboss.com Date: 2007-10-04 17:29:53 -0400 (Thu, 04 Oct 2007) New Revision: 8533 Removed: modules/common/trunk/build/build-thirdparty.xml modules/common/trunk/build/build.sh modules/common/trunk/build/build.xml modules/common/trunk/build/distrib.xml modules/common/trunk/build/etc/ modules/common/trunk/build/licences/ modules/common/trunk/common/build.bat modules/common/trunk/common/build.sh modules/common/trunk/common/build.xml modules/common/trunk/mc/build.bat modules/common/trunk/mc/build.sh modules/common/trunk/mc/build.xml modules/common/trunk/portal/build.bat modules/common/trunk/portal/build.sh modules/common/trunk/portal/build.xml modules/common/trunk/testsuite/ modules/common/trunk/tools/ Log: getting rid of build tragic in common module Deleted: modules/common/trunk/build/build-thirdparty.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/common/trunk/build/build-thirdparty.xml 2007-10-04 17:58:22 UTC= (rev 8532) +++ modules/common/trunk/build/build-thirdparty.xml 2007-10-04 21:29:53 UTC= (rev 8533) @@ -1,100 +0,0 @@ - - - - - - - - - - - = - - - - - - - - - - - - - - - - - - - - - - - - - = - - - - - - - - - - - - - - = - - - - - - - - - = - - Deleted: modules/common/trunk/build/build.sh =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/common/trunk/build/build.sh 2007-10-04 17:58:22 UTC (rev 8532) +++ modules/common/trunk/build/build.sh 2007-10-04 21:29:53 UTC (rev 8533) @@ -1,49 +0,0 @@ -#!/bin/sh -## -## Invokes a script of the same name in the 'tools' module. -## = -## The 'tools' module is expected to be a peer directory of the directory -## in which this script lives. -## -## @author Jason Dillon -## - -# $Id: build.sh 2 2005-01-14 23:01:32Z vietj $ - -PROGNAME=3D`basename $0` -DIRNAME=3D`dirname $0` - -# Buss it yo -main() { - if [ "x$TOOLS_ROOT" =3D "x" ]; then - TOOLS_ROOT=3D`cd $DIRNAME/../tools && pwd` - fi - - MODULE_ROOT=3D`cd $DIRNAME; pwd` - export TOOLS_ROOT MODULE_ROOT DEBUG TRACE - - # Where is the target script? - target=3D"$TOOLS_ROOT/bin/$PROGNAME" - if [ ! -f "$target" ]; then - echo "${PROGNAME}: *ERROR* The target executable does not exist:" - echo "${PROGNAME}:" - echo "${PROGNAME}: $target" - echo "${PROGNAME}:" - echo "${PROGNAME}: Please make sure you have checked out the 'tools' modu= le" - echo "${PROGNAME}: and make sure it is up to date." - exit 2 - fi - - # Get busy yo! - if [ "x$DEBUG" !=3D "x" ]; then - echo "${PROGNAME}: Executing: /bin/sh $target $@" - fi - if [ "x$TRACE" =3D "x" ]; then - exec /bin/sh $target "$@" - else - exec /bin/sh -x $target "$@" - fi -} - -# Lets get ready to rumble! -main "$@" Deleted: modules/common/trunk/build/build.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/common/trunk/build/build.xml 2007-10-04 17:58:22 UTC (rev 8532) +++ modules/common/trunk/build/build.xml 2007-10-04 21:29:53 UTC (rev 8533) @@ -1,411 +0,0 @@ - - - - - - - ]> - - - - - - - - - - - - - - - - - - - - - - - &buildmagic; - &modules; - &defaults; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Deleted: modules/common/trunk/build/distrib.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/common/trunk/build/distrib.xml 2007-10-04 17:58:22 UTC (rev 853= 2) +++ modules/common/trunk/build/distrib.xml 2007-10-04 21:29:53 UTC (rev 853= 3) @@ -1,398 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - --> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - = - - - = - - - = - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - = - - - - - - - - - = - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - = - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Deleted: modules/common/trunk/common/build.bat =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/common/trunk/common/build.bat 2007-10-04 17:58:22 UTC (rev 8532) +++ modules/common/trunk/common/build.bat 2007-10-04 21:29:53 UTC (rev 8533) @@ -1,54 +0,0 @@ -(a)echo off -rem -rem Invokes a script of the same name in the 'tools' module. -rem = -rem The 'tools' module is expected to be a peer directory of the directory -rem in which this script lives. -rem -rem @author Jason Dillon -rem - -rem $Id: build.bat 2 2005-01-14 23:01:32Z vietj $ - -setlocal - -set PROGNAME=3D%~nx0 -set DIRNAME=3D%~dp0 - -rem Legacy shell support -if x%PROGNAME%=3D=3Dx set PROGNAME=3Dbuild.bat -if x%DIRNAME%=3D=3Dx set DIRNAME=3D.\ - -set MODULE_ROOT=3D%DIRNAME% -if x%TOOLS_ROOT%=3D=3Dx set TOOLS_ROOT=3D%DIRNAME%..\tools -set TARGET=3D%TOOLS_ROOT%\bin\build.bat -set ARGS=3D%* - -rem Start'er up yo -goto main - -:debug -if not x%DEBUG%=3D=3Dx echo %PROGNAME%: %* -goto :EOF - -:main -call :debug PROGNAME=3D%PROGNAME% -call :debug DIRNAME=3D%DIRNAME% -call :debug TOOLS_ROOT=3D%TOOLS_ROOT% -call :debug TARGET=3D%TARGET% - -if exist %TARGET% call :call-script & goto :EOF -rem else fail, we can not go on - -echo %PROGNAME%: *ERROR* The target executable does not exist: -echo %PROGNAME%: -echo %PROGNAME%: %TARGET% -echo %PROGNAME%: -echo %PROGNAME%: Please make sure you have checked out the 'tools' module -echo %PROGNAME%: and make sure it is up to date. -goto :EOF - -:call-script -call :debug Executing %TARGET% %ARGS% -call %TARGET% %ARGS% -goto :EOF Deleted: modules/common/trunk/common/build.sh =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/common/trunk/common/build.sh 2007-10-04 17:58:22 UTC (rev 8532) +++ modules/common/trunk/common/build.sh 2007-10-04 21:29:53 UTC (rev 8533) @@ -1,49 +0,0 @@ -#!/bin/sh -## -## Invokes a script of the same name in the 'tools' module. -## = -## The 'tools' module is expected to be a peer directory of the directory -## in which this script lives. -## -## @author Jason Dillon -## - -# $Id: build.sh 2 2005-01-14 23:01:32Z vietj $ - -PROGNAME=3D`basename $0` -DIRNAME=3D`dirname $0` - -# Buss it yo -main() { - if [ "x$TOOLS_ROOT" =3D "x" ]; then - TOOLS_ROOT=3D`cd $DIRNAME/../tools && pwd` - fi - - MODULE_ROOT=3D`cd $DIRNAME; pwd` - export TOOLS_ROOT MODULE_ROOT DEBUG TRACE - - # Where is the target script? - target=3D"$TOOLS_ROOT/bin/$PROGNAME" - if [ ! -f "$target" ]; then - echo "${PROGNAME}: *ERROR* The target executable does not exist:" - echo "${PROGNAME}:" - echo "${PROGNAME}: $target" - echo "${PROGNAME}:" - echo "${PROGNAME}: Please make sure you have checked out the 'tools' modu= le" - echo "${PROGNAME}: and make sure it is up to date." - exit 2 - fi - - # Get busy yo! - if [ "x$DEBUG" !=3D "x" ]; then - echo "${PROGNAME}: Executing: /bin/sh $target $@" - fi - if [ "x$TRACE" =3D "x" ]; then - exec /bin/sh $target "$@" - else - exec /bin/sh -x $target "$@" - fi -} - -# Lets get ready to rumble! -main "$@" Deleted: modules/common/trunk/common/build.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/common/trunk/common/build.xml 2007-10-04 17:58:22 UTC (rev 8532) +++ modules/common/trunk/common/build.xml 2007-10-04 21:29:53 UTC (rev 8533) @@ -1,261 +0,0 @@ - - - - - - - - ]> - - - - - - - - - - - - - - - - - - - - - - - - - &buildmagic; - &modules; - &defaults; - &tools; - &targets; - - - - - - - - - - - - - - - - - - - - - - - - - &libraries; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Deleted: modules/common/trunk/mc/build.bat =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/common/trunk/mc/build.bat 2007-10-04 17:58:22 UTC (rev 8532) +++ modules/common/trunk/mc/build.bat 2007-10-04 21:29:53 UTC (rev 8533) @@ -1,54 +0,0 @@ -(a)echo off -rem -rem Invokes a script of the same name in the 'tools' module. -rem = -rem The 'tools' module is expected to be a peer directory of the directory -rem in which this script lives. -rem -rem @author Jason Dillon -rem - -rem $Id: build.bat 2 2005-01-14 23:01:32Z vietj $ - -setlocal - -set PROGNAME=3D%~nx0 -set DIRNAME=3D%~dp0 - -rem Legacy shell support -if x%PROGNAME%=3D=3Dx set PROGNAME=3Dbuild.bat -if x%DIRNAME%=3D=3Dx set DIRNAME=3D.\ - -set MODULE_ROOT=3D%DIRNAME% -if x%TOOLS_ROOT%=3D=3Dx set TOOLS_ROOT=3D%DIRNAME%..\tools -set TARGET=3D%TOOLS_ROOT%\bin\build.bat -set ARGS=3D%* - -rem Start'er up yo -goto main - -:debug -if not x%DEBUG%=3D=3Dx echo %PROGNAME%: %* -goto :EOF - -:main -call :debug PROGNAME=3D%PROGNAME% -call :debug DIRNAME=3D%DIRNAME% -call :debug TOOLS_ROOT=3D%TOOLS_ROOT% -call :debug TARGET=3D%TARGET% - -if exist %TARGET% call :call-script & goto :EOF -rem else fail, we can not go on - -echo %PROGNAME%: *ERROR* The target executable does not exist: -echo %PROGNAME%: -echo %PROGNAME%: %TARGET% -echo %PROGNAME%: -echo %PROGNAME%: Please make sure you have checked out the 'tools' module -echo %PROGNAME%: and make sure it is up to date. -goto :EOF - -:call-script -call :debug Executing %TARGET% %ARGS% -call %TARGET% %ARGS% -goto :EOF Deleted: modules/common/trunk/mc/build.sh =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/common/trunk/mc/build.sh 2007-10-04 17:58:22 UTC (rev 8532) +++ modules/common/trunk/mc/build.sh 2007-10-04 21:29:53 UTC (rev 8533) @@ -1,49 +0,0 @@ -#!/bin/sh -## -## Invokes a script of the same name in the 'tools' module. -## = -## The 'tools' module is expected to be a peer directory of the directory -## in which this script lives. -## -## @author Jason Dillon -## - -# $Id: build.sh 2 2005-01-14 23:01:32Z vietj $ - -PROGNAME=3D`basename $0` -DIRNAME=3D`dirname $0` - -# Buss it yo -main() { - if [ "x$TOOLS_ROOT" =3D "x" ]; then - TOOLS_ROOT=3D`cd $DIRNAME/../tools && pwd` - fi - - MODULE_ROOT=3D`cd $DIRNAME; pwd` - export TOOLS_ROOT MODULE_ROOT DEBUG TRACE - - # Where is the target script? - target=3D"$TOOLS_ROOT/bin/$PROGNAME" - if [ ! -f "$target" ]; then - echo "${PROGNAME}: *ERROR* The target executable does not exist:" - echo "${PROGNAME}:" - echo "${PROGNAME}: $target" - echo "${PROGNAME}:" - echo "${PROGNAME}: Please make sure you have checked out the 'tools' modu= le" - echo "${PROGNAME}: and make sure it is up to date." - exit 2 - fi - - # Get busy yo! - if [ "x$DEBUG" !=3D "x" ]; then - echo "${PROGNAME}: Executing: /bin/sh $target $@" - fi - if [ "x$TRACE" =3D "x" ]; then - exec /bin/sh $target "$@" - else - exec /bin/sh -x $target "$@" - fi -} - -# Lets get ready to rumble! -main "$@" Deleted: modules/common/trunk/mc/build.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/common/trunk/mc/build.xml 2007-10-04 17:58:22 UTC (rev 8532) +++ modules/common/trunk/mc/build.xml 2007-10-04 21:29:53 UTC (rev 8533) @@ -1,185 +0,0 @@ - - - - - - - - - - ]> - - - - - - - - - - - - - - - - - - - - - - - - - &buildmagic; - - &modules; - &defaults; - &tools; - &targets; - - - - - - - - - - - - - - - - - - - - - - - - &libraries; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Deleted: modules/common/trunk/portal/build.bat =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/common/trunk/portal/build.bat 2007-10-04 17:58:22 UTC (rev 8532) +++ modules/common/trunk/portal/build.bat 2007-10-04 21:29:53 UTC (rev 8533) @@ -1,54 +0,0 @@ -(a)echo off -rem -rem Invokes a script of the same name in the 'tools' module. -rem = -rem The 'tools' module is expected to be a peer directory of the directory -rem in which this script lives. -rem -rem @author Jason Dillon -rem - -rem $Id: build.bat 2 2005-01-14 23:01:32Z vietj $ - -setlocal - -set PROGNAME=3D%~nx0 -set DIRNAME=3D%~dp0 - -rem Legacy shell support -if x%PROGNAME%=3D=3Dx set PROGNAME=3Dbuild.bat -if x%DIRNAME%=3D=3Dx set DIRNAME=3D.\ - -set MODULE_ROOT=3D%DIRNAME% -if x%TOOLS_ROOT%=3D=3Dx set TOOLS_ROOT=3D%DIRNAME%..\tools -set TARGET=3D%TOOLS_ROOT%\bin\build.bat -set ARGS=3D%* - -rem Start'er up yo -goto main - -:debug -if not x%DEBUG%=3D=3Dx echo %PROGNAME%: %* -goto :EOF - -:main -call :debug PROGNAME=3D%PROGNAME% -call :debug DIRNAME=3D%DIRNAME% -call :debug TOOLS_ROOT=3D%TOOLS_ROOT% -call :debug TARGET=3D%TARGET% - -if exist %TARGET% call :call-script & goto :EOF -rem else fail, we can not go on - -echo %PROGNAME%: *ERROR* The target executable does not exist: -echo %PROGNAME%: -echo %PROGNAME%: %TARGET% -echo %PROGNAME%: -echo %PROGNAME%: Please make sure you have checked out the 'tools' module -echo %PROGNAME%: and make sure it is up to date. -goto :EOF - -:call-script -call :debug Executing %TARGET% %ARGS% -call %TARGET% %ARGS% -goto :EOF Deleted: modules/common/trunk/portal/build.sh =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/common/trunk/portal/build.sh 2007-10-04 17:58:22 UTC (rev 8532) +++ modules/common/trunk/portal/build.sh 2007-10-04 21:29:53 UTC (rev 8533) @@ -1,49 +0,0 @@ -#!/bin/sh -## -## Invokes a script of the same name in the 'tools' module. -## = -## The 'tools' module is expected to be a peer directory of the directory -## in which this script lives. -## -## @author Jason Dillon -## - -# $Id: build.sh 2 2005-01-14 23:01:32Z vietj $ - -PROGNAME=3D`basename $0` -DIRNAME=3D`dirname $0` - -# Buss it yo -main() { - if [ "x$TOOLS_ROOT" =3D "x" ]; then - TOOLS_ROOT=3D`cd $DIRNAME/../tools && pwd` - fi - - MODULE_ROOT=3D`cd $DIRNAME; pwd` - export TOOLS_ROOT MODULE_ROOT DEBUG TRACE - - # Where is the target script? - target=3D"$TOOLS_ROOT/bin/$PROGNAME" - if [ ! -f "$target" ]; then - echo "${PROGNAME}: *ERROR* The target executable does not exist:" - echo "${PROGNAME}:" - echo "${PROGNAME}: $target" - echo "${PROGNAME}:" - echo "${PROGNAME}: Please make sure you have checked out the 'tools' modu= le" - echo "${PROGNAME}: and make sure it is up to date." - exit 2 - fi - - # Get busy yo! - if [ "x$DEBUG" !=3D "x" ]; then - echo "${PROGNAME}: Executing: /bin/sh $target $@" - fi - if [ "x$TRACE" =3D "x" ]; then - exec /bin/sh $target "$@" - else - exec /bin/sh -x $target "$@" - fi -} - -# Lets get ready to rumble! -main "$@" Deleted: modules/common/trunk/portal/build.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/common/trunk/portal/build.xml 2007-10-04 17:58:22 UTC (rev 8532) +++ modules/common/trunk/portal/build.xml 2007-10-04 21:29:53 UTC (rev 8533) @@ -1,181 +0,0 @@ - - - - - - - - - - ]> - - - - - - - - - - - - - - - - - - - - - - - - - &buildmagic; - - &modules; - &defaults; - &tools; - &targets; - - - - - - - - - - - - - - - - - - - - - - - - &libraries; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - --===============0052037403819973070==-- From portal-commits at lists.jboss.org Thu Oct 4 17:32:03 2007 Content-Type: multipart/mixed; boundary="===============7668617755632026341==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8534 - modules/common/trunk/build/ide/intellij/idea60/modules. Date: Thu, 04 Oct 2007 17:32:03 -0400 Message-ID: --===============7668617755632026341== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: julien(a)jboss.com Date: 2007-10-04 17:32:02 -0400 (Thu, 04 Oct 2007) New Revision: 8534 Removed: modules/common/trunk/build/ide/intellij/idea60/modules/testsuite/ modules/common/trunk/build/ide/intellij/idea60/modules/thirdparty/ modules/common/trunk/build/ide/intellij/idea60/modules/tools/ Log: removing intellij modules for tools, thirdparty and testsuite --===============7668617755632026341==-- From portal-commits at lists.jboss.org Thu Oct 4 18:24:46 2007 Content-Type: multipart/mixed; boundary="===============8138577641224086351==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8535 - in modules/test/trunk/unit/src/main/org/jboss: unit/api/pojo and 4 other directories. Date: Thu, 04 Oct 2007 18:24:46 -0400 Message-ID: --===============8138577641224086351== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: julien(a)jboss.com Date: 2007-10-04 18:24:45 -0400 (Thu, 04 Oct 2007) New Revision: 8535 Added: modules/test/trunk/unit/src/main/org/jboss/unit/api/pojo/TestCaseImpl.ja= va modules/test/trunk/unit/src/main/org/jboss/unit/api/pojo/annotations/Pro= vider.java modules/test/trunk/unit/src/main/org/jboss/unit/api/pojo/junit/JUnitProv= ider.java Modified: modules/test/trunk/unit/src/main/org/jboss/test/unit/pojo/TestHandlerSup= portPOJOTest.java modules/test/trunk/unit/src/main/org/jboss/unit/api/pojo/TestCase.java modules/test/trunk/unit/src/main/org/jboss/unit/api/pojo/TestHandlerSupp= ort.java modules/test/trunk/unit/src/main/org/jboss/unit/api/pojo/TestLifeCycle.j= ava modules/test/trunk/unit/src/main/org/jboss/unit/api/pojo/junit/JUnitDesc= riptor.java modules/test/trunk/unit/src/main/org/jboss/unit/api/pojo/junit/JUnitLife= Cycle.java modules/test/trunk/unit/src/main/org/jboss/unit/api/pojo/junit/JUnitTest= MethodLifeCycle.java modules/test/trunk/unit/src/main/org/jboss/unit/api/pojo/junit/TestCase.= java modules/test/trunk/unit/src/main/org/jboss/unit/info/impl/SimpleTestSuit= eInfo.java modules/test/trunk/unit/src/main/org/jboss/unit/unit/pojo/POJOTestSuiteD= river.java Log: decouple the test handler class from the tested pojo life cycle by using an= notation Modified: modules/test/trunk/unit/src/main/org/jboss/test/unit/pojo/TestHan= dlerSupportPOJOTest.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/test/unit/pojo/TestHandlerSu= pportPOJOTest.java 2007-10-04 21:32:02 UTC (rev 8534) +++ modules/test/trunk/unit/src/main/org/jboss/test/unit/pojo/TestHandlerSu= pportPOJOTest.java 2007-10-04 22:24:45 UTC (rev 8535) @@ -25,6 +25,7 @@ import org.jboss.unit.api.pojo.TestHandler; import org.jboss.unit.api.pojo.TestCaseLifeCycleException; import org.jboss.unit.api.pojo.TestCaseDescriptor; +import org.jboss.unit.api.pojo.TestCase; = import static org.jboss.unit.api.Assert.*; = @@ -77,7 +78,7 @@ = public InvokeResult invoke(String testName, Map paramet= rization) { - Object testCase =3D null; + TestCase testCase =3D null; boolean invokeDestroy =3D false; try { Modified: modules/test/trunk/unit/src/main/org/jboss/unit/api/pojo/TestCase= .java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/api/pojo/TestCase.java = 2007-10-04 21:32:02 UTC (rev 8534) +++ modules/test/trunk/unit/src/main/org/jboss/unit/api/pojo/TestCase.java = 2007-10-04 22:24:45 UTC (rev 8535) @@ -22,26 +22,11 @@ *************************************************************************= *****/ package org.jboss.unit.api.pojo; = -import java.util.Map; - /** * @author Julien Viet * @version $Revision: 1.1 $ */ -class TestCase +public interface TestCase { - - final TestCaseDef def; - - /** . */ - final Object pojo; - - /** . */ - Map parametrization; - - public TestCase(TestCaseDef def, Object pojo) - { - this.def =3D def; - this.pojo =3D pojo; - } + Object getPOJO(); } Added: modules/test/trunk/unit/src/main/org/jboss/unit/api/pojo/TestCaseImp= l.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/api/pojo/TestCaseImpl.j= ava (rev 0) +++ modules/test/trunk/unit/src/main/org/jboss/unit/api/pojo/TestCaseImpl.j= ava 2007-10-04 22:24:45 UTC (rev 8535) @@ -0,0 +1,52 @@ +/*************************************************************************= ***** + * JBoss, a division of Red Hat = * + * Copyright 2006, Red Hat Middleware, LLC, and individual = * + * contributors as indicated by the @authors tag. See the = * + * copyright.txt in the distribution for a full listing of = * + * individual contributors. = * + * = * + * This is free software; you can redistribute it and/or modify it = * + * under the terms of the GNU Lesser General Public License as = * + * published by the Free Software Foundation; either version 2.1 of = * + * the License, or (at your option) any later version. = * + * = * + * This software is distributed in the hope that it will be useful, = * + * but WITHOUT ANY WARRANTY; without even the implied warranty of = * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU = * + * Lesser General Public License for more details. = * + * = * + * You should have received a copy of the GNU Lesser General Public = * + * License along with this software; if not, write to the Free = * + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA = * + * 02110-1301 USA, or see the FSF site: http://www.fsf.org. = * + *************************************************************************= *****/ +package org.jboss.unit.api.pojo; + +import java.util.Map; + +/** + * @author Julien Viet + * @version $Revision: 1.1 $ + */ +class TestCaseImpl implements TestCase +{ + + final TestCaseDef def; + + /** . */ + final Object pojo; + + /** . */ + Map parametrization; + + public TestCaseImpl(TestCaseDef def, Object pojo) + { + this.def =3D def; + this.pojo =3D pojo; + } + + public Object getPOJO() + { + return pojo; + } +} Modified: modules/test/trunk/unit/src/main/org/jboss/unit/api/pojo/TestHand= lerSupport.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/api/pojo/TestHandlerSup= port.java 2007-10-04 21:32:02 UTC (rev 8534) +++ modules/test/trunk/unit/src/main/org/jboss/unit/api/pojo/TestHandlerSup= port.java 2007-10-04 22:24:45 UTC (rev 8535) @@ -456,7 +456,7 @@ return Collections.unmodifiableMap(testCases); } = - public Object newTestCase(String name) throws TestCaseLifeCycleException + public TestCase newTestCase(String name) throws TestCaseLifeCycleExcept= ion { TestCaseDef testCaseDef =3D testCases.get(name); = @@ -482,12 +482,12 @@ } = // - return new TestCase(testCaseDef, instance); + return new TestCaseImpl(testCaseDef, instance); } = - public void testCaseParametrize(Object _testCase, Map pa= rametrization) throws TestCaseLifeCycleException + public void testCaseParametrize(TestCase _testCase, Map = parametrization) throws TestCaseLifeCycleException { - TestCase testCase =3D (TestCase)_testCase; + TestCaseImpl testCase =3D (TestCaseImpl)_testCase; = // Save parametrization testCase.parametrization =3D parametrization; @@ -518,16 +518,16 @@ } } = - public void testCaseCreate(Object _testCase) throws TestCaseLifeCycleEx= ception + public void testCaseCreate(TestCase _testCase) throws TestCaseLifeCycle= Exception { - TestCase testCase =3D (TestCase)_testCase; + TestCaseImpl testCase =3D (TestCaseImpl)_testCase; = // if (create !=3D null) { try { - create.invoke(testCase.pojo); + create.invoke(testCase.getPOJO()); } catch (InvocationTargetException e) { @@ -540,9 +540,9 @@ } } = - public void testCaseInvoke(Object _testCase) throws TestCaseLifeCycleEx= ception + public void testCaseInvoke(TestCase _testCase) throws TestCaseLifeCycle= Exception { - TestCase testCase =3D (TestCase)_testCase; + TestCaseImpl testCase =3D (TestCaseImpl)_testCase; = List argList =3D new ArrayList(); for (String parameterName : testCase.def.arguments.keySet()) @@ -576,16 +576,16 @@ } } = - public void testCaseDestroy(Object _testCase) + public void testCaseDestroy(TestCase _testCase) { - TestCase testCase =3D (TestCase)_testCase; + TestCaseImpl testCase =3D (TestCaseImpl)_testCase; = // if (destroy !=3D null) { try { - destroy.invoke(testCase.pojo); + destroy.invoke(testCase.getPOJO()); } catch (Throwable t) { Modified: modules/test/trunk/unit/src/main/org/jboss/unit/api/pojo/TestLife= Cycle.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/api/pojo/TestLifeCycle.= java 2007-10-04 21:32:02 UTC (rev 8534) +++ modules/test/trunk/unit/src/main/org/jboss/unit/api/pojo/TestLifeCycle.= java 2007-10-04 22:24:45 UTC (rev 8535) @@ -38,7 +38,7 @@ * @return the test case object * @throws TestCaseLifeCycleException */ - Object newTestCase(String name) throws TestCaseLifeCycleException; + TestCase newTestCase(String name) throws TestCaseLifeCycleException; = /** * Parametrize life cycle operation of a test case. @@ -47,7 +47,7 @@ * @param parametrization the parametrization * @throws TestCaseLifeCycleException */ - void testCaseParametrize(Object testCase, Map parametriz= ation) throws TestCaseLifeCycleException; + void testCaseParametrize(TestCase testCase, Map parametr= ization) throws TestCaseLifeCycleException; = /** * Create life cycle operation of a test case. @@ -55,7 +55,7 @@ * @param testCase the test case * @throws TestCaseLifeCycleException */ - void testCaseCreate(Object testCase) throws TestCaseLifeCycleException; + void testCaseCreate(TestCase testCase) throws TestCaseLifeCycleExceptio= n; = /** * Invocation life cycle operation of a test case. @@ -63,13 +63,13 @@ * @param testCase the test case * @throws TestCaseLifeCycleException */ - void testCaseInvoke(Object testCase) throws TestCaseLifeCycleException; + void testCaseInvoke(TestCase testCase) throws TestCaseLifeCycleExceptio= n; = /** * Destroy life cycle operation of a test case. * * @param testCase the test case */ - void testCaseDestroy(Object testCase); + void testCaseDestroy(TestCase testCase); = } Added: modules/test/trunk/unit/src/main/org/jboss/unit/api/pojo/annotations= /Provider.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/api/pojo/annotations/Pr= ovider.java (rev 0) +++ modules/test/trunk/unit/src/main/org/jboss/unit/api/pojo/annotations/Pr= ovider.java 2007-10-04 22:24:45 UTC (rev 8535) @@ -0,0 +1,43 @@ +/*************************************************************************= ***** + * JBoss, a division of Red Hat = * + * Copyright 2006, Red Hat Middleware, LLC, and individual = * + * contributors as indicated by the @authors tag. See the = * + * copyright.txt in the distribution for a full listing of = * + * individual contributors. = * + * = * + * This is free software; you can redistribute it and/or modify it = * + * under the terms of the GNU Lesser General Public License as = * + * published by the Free Software Foundation; either version 2.1 of = * + * the License, or (at your option) any later version. = * + * = * + * This software is distributed in the hope that it will be useful, = * + * but WITHOUT ANY WARRANTY; without even the implied warranty of = * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU = * + * Lesser General Public License for more details. = * + * = * + * You should have received a copy of the GNU Lesser General Public = * + * License along with this software; if not, write to the Free = * + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA = * + * 02110-1301 USA, or see the FSF site: http://www.fsf.org. = * + *************************************************************************= *****/ +package org.jboss.unit.api.pojo.annotations; + +import org.jboss.unit.api.pojo.TestHandler; + +import java.lang.annotation.Inherited; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; +import java.lang.annotation.ElementType; + +/** + * @author Julien Viet + * @version $Revision: 1.1 $ + */ +(a)Inherited +(a)Retention(RetentionPolicy.RUNTIME) +(a)Target({ElementType.ANNOTATION_TYPE,ElementType.TYPE}) +public @interface Provider +{ + Class value(); +} Modified: modules/test/trunk/unit/src/main/org/jboss/unit/api/pojo/junit/JU= nitDescriptor.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/api/pojo/junit/JUnitDes= criptor.java 2007-10-04 21:32:02 UTC (rev 8534) +++ modules/test/trunk/unit/src/main/org/jboss/unit/api/pojo/junit/JUnitDes= criptor.java 2007-10-04 22:24:45 UTC (rev 8535) @@ -47,9 +47,9 @@ /** . */ final Map testMap; = - public JUnitDescriptor(Class testClass) + public JUnitDescriptor(JUnitProvider provider) { - this.testClass =3D testClass; + this.testClass =3D provider.testClass; this.testMap =3D new HashMap(); = // Modified: modules/test/trunk/unit/src/main/org/jboss/unit/api/pojo/junit/JU= nitLifeCycle.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/api/pojo/junit/JUnitLif= eCycle.java 2007-10-04 21:32:02 UTC (rev 8534) +++ modules/test/trunk/unit/src/main/org/jboss/unit/api/pojo/junit/JUnitLif= eCycle.java 2007-10-04 22:24:45 UTC (rev 8535) @@ -36,33 +36,47 @@ { = /** . */ - private final TestCase testCase; + private final JUnitProvider provider; = - public JUnitLifeCycle(TestCase testCase) + public JUnitLifeCycle(JUnitProvider testCase) { - this.testCase =3D testCase; + this.provider =3D testCase; } = - public Object newTestCase(String name) throws TestCaseLifeCycleException + public org.jboss.unit.api.pojo.TestCase newTestCase(String name) throws= TestCaseLifeCycleException { - JUnitTestMethod method =3D testCase.descriptor.testMap.get(name); + JUnitTestMethod method =3D provider.descriptor.testMap.get(name); if (method =3D=3D null) { throw new TestCaseLifeCycleException("No test case " + name + " f= ound"); } - return new JUnitTestMethodLifeCycle(method); + + try + { + TestCase testCase =3D (TestCase)provider.testClass.newInstance(); + return new JUnitTestMethodLifeCycle(testCase, method); + } + catch (InstantiationException e) + { + throw new TestCaseLifeCycleException(e); + } + catch (IllegalAccessException e) + { + throw new TestCaseLifeCycleException(e); + } } = - public void testCaseParametrize(Object _lifeCycle, Map = parametrization) throws TestCaseLifeCycleException + public void testCaseParametrize(org.jboss.unit.api.pojo.TestCase testCa= se, Map parametrization) throws TestCaseLifeCycleException { // No op } = - public void testCaseCreate(Object _lifeCycle) throws TestCaseLifeCycleE= xception + public void testCaseCreate(org.jboss.unit.api.pojo.TestCase testCase) t= hrows TestCaseLifeCycleException { try { - testCase.setUp(); + JUnitTestMethodLifeCycle lifeCycle =3D (JUnitTestMethodLifeCycle)= testCase; + lifeCycle.pojo.setUp(); } catch (Throwable e) { @@ -70,14 +84,14 @@ } } = - public void testCaseInvoke(Object _lifeCycle) throws TestCaseLifeCycleE= xception + public void testCaseInvoke(org.jboss.unit.api.pojo.TestCase testCase) t= hrows TestCaseLifeCycleException { - JUnitTestMethodLifeCycle lifeCycle =3D (JUnitTestMethodLifeCycle)_li= feCycle; + JUnitTestMethodLifeCycle lifeCycle =3D (JUnitTestMethodLifeCycle)tes= tCase; = // Invoke test joinpoint try { - lifeCycle.testMethod.method.invoke(testCase, new Object[0]); + lifeCycle.testMethod.method.invoke(lifeCycle.pojo); } catch (IllegalAccessException e) { @@ -104,8 +118,16 @@ return new TestCaseLifeCycleException(throwable); } = - public void testCaseDestroy(Object _testCase) + public void testCaseDestroy(org.jboss.unit.api.pojo.TestCase testCase) { - testCase.tearDown(); + try + { + JUnitTestMethodLifeCycle lifeCycle =3D (JUnitTestMethodLifeCycle)= testCase; + lifeCycle.pojo.tearDown(); + } + catch (Throwable e) + { + e.printStackTrace(); + } } } Added: modules/test/trunk/unit/src/main/org/jboss/unit/api/pojo/junit/JUnit= Provider.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/api/pojo/junit/JUnitPro= vider.java (rev 0) +++ modules/test/trunk/unit/src/main/org/jboss/unit/api/pojo/junit/JUnitPro= vider.java 2007-10-04 22:24:45 UTC (rev 8535) @@ -0,0 +1,62 @@ +/*************************************************************************= ***** + * JBoss, a division of Red Hat = * + * Copyright 2006, Red Hat Middleware, LLC, and individual = * + * contributors as indicated by the @authors tag. See the = * + * copyright.txt in the distribution for a full listing of = * + * individual contributors. = * + * = * + * This is free software; you can redistribute it and/or modify it = * + * under the terms of the GNU Lesser General Public License as = * + * published by the Free Software Foundation; either version 2.1 of = * + * the License, or (at your option) any later version. = * + * = * + * This software is distributed in the hope that it will be useful, = * + * but WITHOUT ANY WARRANTY; without even the implied warranty of = * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU = * + * Lesser General Public License for more details. = * + * = * + * You should have received a copy of the GNU Lesser General Public = * + * License along with this software; if not, write to the Free = * + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA = * + * 02110-1301 USA, or see the FSF site: http://www.fsf.org. = * + *************************************************************************= *****/ +package org.jboss.unit.api.pojo.junit; + +import org.jboss.unit.api.pojo.annotations.Provider; +import org.jboss.unit.api.pojo.TestHandler; +import org.jboss.unit.api.pojo.TestSuiteDescriptor; +import org.jboss.unit.api.pojo.TestLifeCycle; + +/** + * @todo + * + * @author Julien Viet + * @version $Revision: 1.1 $ + */ +public class JUnitProvider implements TestHandler +{ + + /** . */ + final JUnitDescriptor descriptor; + + final JUnitLifeCycle lifeCycle; + + final Class testClass; + + public JUnitProvider(Class testClass) + { + this.testClass =3D testClass; + descriptor =3D new JUnitDescriptor(this); + lifeCycle =3D new JUnitLifeCycle(this); + } + + public TestSuiteDescriptor getDescriptor() + { + return descriptor; + } + + public TestLifeCycle getLifeCycle() + { + return lifeCycle; + } +} Modified: modules/test/trunk/unit/src/main/org/jboss/unit/api/pojo/junit/JU= nitTestMethodLifeCycle.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/api/pojo/junit/JUnitTes= tMethodLifeCycle.java 2007-10-04 21:32:02 UTC (rev 8534) +++ modules/test/trunk/unit/src/main/org/jboss/unit/api/pojo/junit/JUnitTes= tMethodLifeCycle.java 2007-10-04 22:24:45 UTC (rev 8535) @@ -26,14 +26,23 @@ * @author Julien Viet * @version $Revision: 1.1 $ */ -class JUnitTestMethodLifeCycle +class JUnitTestMethodLifeCycle implements org.jboss.unit.api.pojo.TestCase { = /** . */ + final TestCase pojo; + + /** . */ final JUnitTestMethod testMethod; = - public JUnitTestMethodLifeCycle(JUnitTestMethod testMethod) + public JUnitTestMethodLifeCycle(TestCase pojo, JUnitTestMethod testMeth= od) { + this.pojo =3D pojo; this.testMethod =3D testMethod; } + + public Object getPOJO() + { + return pojo; + } } Modified: modules/test/trunk/unit/src/main/org/jboss/unit/api/pojo/junit/Te= stCase.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/api/pojo/junit/TestCase= .java 2007-10-04 21:32:02 UTC (rev 8534) +++ modules/test/trunk/unit/src/main/org/jboss/unit/api/pojo/junit/TestCase= .java 2007-10-04 22:24:45 UTC (rev 8535) @@ -22,9 +22,7 @@ *************************************************************************= *****/ package org.jboss.unit.api.pojo.junit; = -import org.jboss.unit.api.pojo.TestHandler; -import org.jboss.unit.api.pojo.TestSuiteDescriptor; -import org.jboss.unit.api.pojo.TestLifeCycle; +import org.jboss.unit.api.pojo.annotations.Provider; = = /** @@ -33,18 +31,12 @@ * @author Julien Viet * @version $Revision: 1.1 $ */ -public class TestCase implements TestHandler +(a)Provider(JUnitProvider.class) +public class TestCase = { = - /** . */ - final JUnitDescriptor descriptor; - - final JUnitLifeCycle lifeCycle; - public TestCase() { - descriptor =3D new JUnitDescriptor(getClass()); - lifeCycle =3D new JUnitLifeCycle(this); } = protected void setUp() @@ -54,14 +46,4 @@ protected void tearDown() { } - - public TestSuiteDescriptor getDescriptor() - { - return descriptor; - } - - public TestLifeCycle getLifeCycle() - { - return lifeCycle; - } } Modified: modules/test/trunk/unit/src/main/org/jboss/unit/info/impl/SimpleT= estSuiteInfo.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/info/impl/SimpleTestSui= teInfo.java 2007-10-04 21:32:02 UTC (rev 8534) +++ modules/test/trunk/unit/src/main/org/jboss/unit/info/impl/SimpleTestSui= teInfo.java 2007-10-04 22:24:45 UTC (rev 8535) @@ -76,7 +76,39 @@ = public TestInfo findTest(TestId id) { - return null; + if (id =3D=3D null) + { + throw new IllegalArgumentException("No null id accepted"); + } + + // + if (id.getLength() =3D=3D 0) + { + return this; + } + + // + TestInfo child =3D tests.get(id.getName(0)); + + // + if (child =3D=3D null) + { + return null; + } + + // + if (child instanceof TestSuiteInfo) + { + return ((TestSuiteInfo)child).findTest(id.range(1)); + } + else if (id.getLength() =3D=3D 1) + { + return child; + } + else + { + return null; + } } = public void addTest(TestInfo test) Modified: modules/test/trunk/unit/src/main/org/jboss/unit/unit/pojo/POJOTes= tSuiteDriver.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/unit/pojo/POJOTestSuite= Driver.java 2007-10-04 21:32:02 UTC (rev 8534) +++ modules/test/trunk/unit/src/main/org/jboss/unit/unit/pojo/POJOTestSuite= Driver.java 2007-10-04 22:24:45 UTC (rev 8535) @@ -26,6 +26,8 @@ import org.jboss.unit.api.pojo.TestHandlerSupport; import org.jboss.unit.api.pojo.TestCaseLifeCycleException; import org.jboss.unit.api.pojo.TestLifeCycle; +import org.jboss.unit.api.pojo.TestCase; +import org.jboss.unit.api.pojo.annotations.Provider; import org.jboss.unit.driver.TestDriver; import org.jboss.unit.driver.DriverResponse; import org.jboss.unit.driver.DriverCommand; @@ -38,6 +40,10 @@ import org.jboss.unit.Failure; = import java.util.Map; +import java.lang.reflect.AnnotatedElement; +import java.lang.reflect.Constructor; +import java.lang.reflect.InvocationTargetException; +import java.lang.annotation.Annotation; = /** * @author Julien Viet @@ -54,15 +60,50 @@ = public POJOTestSuiteDriver(Class testClass) throws InstantiationExcepti= on, IllegalAccessException { - if (TestHandler.class.isAssignableFrom(testClass)) + // Get provider annotation + Provider provider =3D ((AnnotatedElement)testClass).getAnnotation(Pr= ovider.class); + + // Scan meta annotations + if (provider =3D=3D null) { - handler =3D (TestHandler)testClass.newInstance(); + for (Annotation annotation : testClass.getAnnotations()) + { + Class blah =3D annotation.annotationType(); + provider =3D ((AnnotatedElement)blah).getAnnotation(Provider.c= lass); + if (provider !=3D null) + { + break; + } + } } + + if (provider !=3D null) + { + try + { + Class providerClass =3D provider.value(= ); + Constructor providerCtor =3D providerCl= ass.getConstructor(Class.class); + handler =3D providerCtor.newInstance(testClass); + } + catch (NoSuchMethodException e) + { + throw new IllegalArgumentException(e); + } + catch (InvocationTargetException e) + { + throw new IllegalArgumentException(e); + } + } +// else if (TestHandler.class.isAssignableFrom(testClass)) +// { +// handler =3D (TestHandler)testClass.newInstance(); +// } else { handler =3D new TestHandlerSupport(testClass); } = + // info =3D new POJOTestSuiteInfo(handler.getDescriptor()); } = @@ -90,10 +131,10 @@ String name =3D id.getName(0); = // - Object pojo; + TestCase testCase; try { - pojo =3D lifeCycle.newTestCase(name); + testCase =3D lifeCycle.newTestCase(name); } catch (Exception e) { @@ -106,7 +147,7 @@ // try { - lifeCycle.testCaseParametrize(pojo, parametrization); + lifeCycle.testCaseParametrize(testCase, parametrization); } catch (Exception e) { @@ -116,10 +157,10 @@ // try { - lifeCycle.testCaseCreate(pojo); + lifeCycle.testCaseCreate(testCase); = // - lifeCycle.testCaseInvoke(pojo); + lifeCycle.testCaseInvoke(testCase); } catch (Exception e) { @@ -127,7 +168,7 @@ } finally { - lifeCycle.testCaseDestroy(pojo); + lifeCycle.testCaseDestroy(testCase); } = // --===============8138577641224086351==-- From portal-commits at lists.jboss.org Thu Oct 4 18:40:55 2007 Content-Type: multipart/mixed; boundary="===============6875764023169703284==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8536 - in modules/test/trunk/unit/src/main/org/jboss: unit and 7 other directories. Date: Thu, 04 Oct 2007 18:40:55 -0400 Message-ID: --===============6875764023169703284== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: julien(a)jboss.com Date: 2007-10-04 18:40:54 -0400 (Thu, 04 Oct 2007) New Revision: 8536 Added: modules/test/trunk/unit/src/main/org/jboss/unit/spi/ modules/test/trunk/unit/src/main/org/jboss/unit/spi/pojo/ modules/test/trunk/unit/src/main/org/jboss/unit/spi/pojo/ArgumentTestPar= ameter.java modules/test/trunk/unit/src/main/org/jboss/unit/spi/pojo/MethodKey.java modules/test/trunk/unit/src/main/org/jboss/unit/spi/pojo/ParameterDescri= ptor.java modules/test/trunk/unit/src/main/org/jboss/unit/spi/pojo/PropertyTestPar= ameter.java modules/test/trunk/unit/src/main/org/jboss/unit/spi/pojo/TestCase.java modules/test/trunk/unit/src/main/org/jboss/unit/spi/pojo/TestCaseDef.java modules/test/trunk/unit/src/main/org/jboss/unit/spi/pojo/TestCaseDescrip= tor.java modules/test/trunk/unit/src/main/org/jboss/unit/spi/pojo/TestCaseImpl.ja= va modules/test/trunk/unit/src/main/org/jboss/unit/spi/pojo/TestCaseLifeCyc= leException.java modules/test/trunk/unit/src/main/org/jboss/unit/spi/pojo/TestHandler.java modules/test/trunk/unit/src/main/org/jboss/unit/spi/pojo/TestHandlerSupp= ort.java modules/test/trunk/unit/src/main/org/jboss/unit/spi/pojo/TestLifeCycle.j= ava modules/test/trunk/unit/src/main/org/jboss/unit/spi/pojo/TestParameter.j= ava modules/test/trunk/unit/src/main/org/jboss/unit/spi/pojo/TestSuiteDescri= ptor.java modules/test/trunk/unit/src/main/org/jboss/unit/spi/pojo/annotations/ modules/test/trunk/unit/src/main/org/jboss/unit/spi/pojo/annotations/Pro= vider.java Removed: modules/test/trunk/unit/src/main/org/jboss/unit/api/pojo/ArgumentTestPar= ameter.java modules/test/trunk/unit/src/main/org/jboss/unit/api/pojo/MethodKey.java modules/test/trunk/unit/src/main/org/jboss/unit/api/pojo/ParameterDescri= ptor.java modules/test/trunk/unit/src/main/org/jboss/unit/api/pojo/PropertyTestPar= ameter.java modules/test/trunk/unit/src/main/org/jboss/unit/api/pojo/TestCase.java modules/test/trunk/unit/src/main/org/jboss/unit/api/pojo/TestCaseDef.java modules/test/trunk/unit/src/main/org/jboss/unit/api/pojo/TestCaseDescrip= tor.java modules/test/trunk/unit/src/main/org/jboss/unit/api/pojo/TestCaseImpl.ja= va modules/test/trunk/unit/src/main/org/jboss/unit/api/pojo/TestCaseLifeCyc= leException.java modules/test/trunk/unit/src/main/org/jboss/unit/api/pojo/TestHandler.java modules/test/trunk/unit/src/main/org/jboss/unit/api/pojo/TestHandlerSupp= ort.java modules/test/trunk/unit/src/main/org/jboss/unit/api/pojo/TestLifeCycle.j= ava modules/test/trunk/unit/src/main/org/jboss/unit/api/pojo/TestParameter.j= ava modules/test/trunk/unit/src/main/org/jboss/unit/api/pojo/TestSuiteDescri= ptor.java modules/test/trunk/unit/src/main/org/jboss/unit/api/pojo/annotations/Pro= vider.java Modified: modules/test/trunk/unit/src/main/org/jboss/test/unit/pojo/TestHandlerSup= portPOJOTest.java modules/test/trunk/unit/src/main/org/jboss/test/unit/pojo/TestHandlerSup= portPOJOTests.java modules/test/trunk/unit/src/main/org/jboss/unit/api/pojo/junit/JUnitDesc= riptor.java modules/test/trunk/unit/src/main/org/jboss/unit/api/pojo/junit/JUnitLife= Cycle.java modules/test/trunk/unit/src/main/org/jboss/unit/api/pojo/junit/JUnitProv= ider.java modules/test/trunk/unit/src/main/org/jboss/unit/api/pojo/junit/JUnitTest= Method.java modules/test/trunk/unit/src/main/org/jboss/unit/api/pojo/junit/JUnitTest= MethodLifeCycle.java modules/test/trunk/unit/src/main/org/jboss/unit/api/pojo/junit/TestCase.= java modules/test/trunk/unit/src/main/org/jboss/unit/unit/pojo/POJOParameterI= nfo.java modules/test/trunk/unit/src/main/org/jboss/unit/unit/pojo/POJOTestCaseIn= fo.java modules/test/trunk/unit/src/main/org/jboss/unit/unit/pojo/POJOTestInfo.j= ava modules/test/trunk/unit/src/main/org/jboss/unit/unit/pojo/POJOTestSuiteD= river.java modules/test/trunk/unit/src/main/org/jboss/unit/unit/pojo/POJOTestSuiteI= nfo.java Log: moved integration code from api package to new spi package Modified: modules/test/trunk/unit/src/main/org/jboss/test/unit/pojo/TestHan= dlerSupportPOJOTest.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/test/unit/pojo/TestHandlerSu= pportPOJOTest.java 2007-10-04 22:24:45 UTC (rev 8535) +++ modules/test/trunk/unit/src/main/org/jboss/test/unit/pojo/TestHandlerSu= pportPOJOTest.java 2007-10-04 22:40:54 UTC (rev 8536) @@ -22,10 +22,10 @@ *************************************************************************= *****/ package org.jboss.test.unit.pojo; = -import org.jboss.unit.api.pojo.TestHandler; -import org.jboss.unit.api.pojo.TestCaseLifeCycleException; -import org.jboss.unit.api.pojo.TestCaseDescriptor; -import org.jboss.unit.api.pojo.TestCase; +import org.jboss.unit.spi.pojo.TestHandler; +import org.jboss.unit.spi.pojo.TestCaseLifeCycleException; +import org.jboss.unit.spi.pojo.TestCaseDescriptor; +import org.jboss.unit.spi.pojo.TestCase; = import static org.jboss.unit.api.Assert.*; = Modified: modules/test/trunk/unit/src/main/org/jboss/test/unit/pojo/TestHan= dlerSupportPOJOTests.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/test/unit/pojo/TestHandlerSu= pportPOJOTests.java 2007-10-04 22:24:45 UTC (rev 8535) +++ modules/test/trunk/unit/src/main/org/jboss/test/unit/pojo/TestHandlerSu= pportPOJOTests.java 2007-10-04 22:40:54 UTC (rev 8536) @@ -22,7 +22,7 @@ *************************************************************************= *****/ package org.jboss.test.unit.pojo; = -import org.jboss.unit.api.pojo.TestHandlerSupport; +import org.jboss.unit.spi.pojo.TestHandlerSupport; import org.jboss.unit.api.Assert; = /** Deleted: modules/test/trunk/unit/src/main/org/jboss/unit/api/pojo/ArgumentT= estParameter.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/api/pojo/ArgumentTestPa= rameter.java 2007-10-04 22:24:45 UTC (rev 8535) +++ modules/test/trunk/unit/src/main/org/jboss/unit/api/pojo/ArgumentTestPa= rameter.java 2007-10-04 22:40:54 UTC (rev 8536) @@ -1,35 +0,0 @@ -/*************************************************************************= ***** - * JBoss, a division of Red Hat = * - * Copyright 2006, Red Hat Middleware, LLC, and individual = * - * contributors as indicated by the @authors tag. See the = * - * copyright.txt in the distribution for a full listing of = * - * individual contributors. = * - * = * - * This is free software; you can redistribute it and/or modify it = * - * under the terms of the GNU Lesser General Public License as = * - * published by the Free Software Foundation; either version 2.1 of = * - * the License, or (at your option) any later version. = * - * = * - * This software is distributed in the hope that it will be useful, = * - * but WITHOUT ANY WARRANTY; without even the implied warranty of = * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU = * - * Lesser General Public License for more details. = * - * = * - * You should have received a copy of the GNU Lesser General Public = * - * License along with this software; if not, write to the Free = * - * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA = * - * 02110-1301 USA, or see the FSF site: http://www.fsf.org. = * - *************************************************************************= *****/ -package org.jboss.unit.api.pojo; - -/** - * @author Julien Viet - * @version $Revision: 1.1 $ - */ -class ArgumentTestParameter extends TestParameter -{ - public ArgumentTestParameter(String name, String description) - { - super(name, description); - } -} Deleted: modules/test/trunk/unit/src/main/org/jboss/unit/api/pojo/MethodKey= .java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/api/pojo/MethodKey.java= 2007-10-04 22:24:45 UTC (rev 8535) +++ modules/test/trunk/unit/src/main/org/jboss/unit/api/pojo/MethodKey.java= 2007-10-04 22:40:54 UTC (rev 8536) @@ -1,101 +0,0 @@ -/*************************************************************************= ***** - * JBoss, a division of Red Hat = * - * Copyright 2006, Red Hat Middleware, LLC, and individual = * - * contributors as indicated by the @authors tag. See the = * - * copyright.txt in the distribution for a full listing of = * - * individual contributors. = * - * = * - * This is free software; you can redistribute it and/or modify it = * - * under the terms of the GNU Lesser General Public License as = * - * published by the Free Software Foundation; either version 2.1 of = * - * the License, or (at your option) any later version. = * - * = * - * This software is distributed in the hope that it will be useful, = * - * but WITHOUT ANY WARRANTY; without even the implied warranty of = * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU = * - * Lesser General Public License for more details. = * - * = * - * You should have received a copy of the GNU Lesser General Public = * - * License along with this software; if not, write to the Free = * - * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA = * - * 02110-1301 USA, or see the FSF site: http://www.fsf.org. = * - *************************************************************************= *****/ -package org.jboss.unit.api.pojo; - -import java.util.List; -import java.util.ArrayList; -import java.lang.reflect.Method; - -/** - * @author Julien Viet - * @version $Revision: 1.1 $ - */ -class MethodKey implements Comparable -{ - - /** . */ - private String name; - - /** . */ - private List types; - - MethodKey(Method method) - { - List types =3D new ArrayList(); - for (Class type : method.getParameterTypes()) - { - types.add(type.getName()); - } - - this.name =3D method.getName(); - this.types =3D types; - } - - public int hashCode() - { - return name.hashCode() + types.hashCode(); - } - - public boolean equals(Object object) - { - if (object =3D=3D this) - { - return true; - } - if (object instanceof MethodKey) - { - MethodKey that =3D (MethodKey)object; - return that.name.equals(this.name) && that.types.equals(this.type= s); - } - return false; - } - - public int compareTo(Object o) - { - MethodKey that =3D (MethodKey)o; - - // - int sign =3D name.compareTo(that.name); - if (sign !=3D 0) - { - return sign; - } - - // - for (int index =3D 0;index < this.types.size() && index < that.types= .size();index++) - { - String thisName =3D this.types.get(index); - String thatName =3D that.types.get(index); - - // - int order =3D thisName.compareTo(thatName); - if (order !=3D 0) - { - return order; - } - } - - // - return that.types.size() - this.types.size(); - } -} Deleted: modules/test/trunk/unit/src/main/org/jboss/unit/api/pojo/Parameter= Descriptor.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/api/pojo/ParameterDescr= iptor.java 2007-10-04 22:24:45 UTC (rev 8535) +++ modules/test/trunk/unit/src/main/org/jboss/unit/api/pojo/ParameterDescr= iptor.java 2007-10-04 22:40:54 UTC (rev 8536) @@ -1,41 +0,0 @@ -/*************************************************************************= ***** - * JBoss, a division of Red Hat = * - * Copyright 2006, Red Hat Middleware, LLC, and individual = * - * contributors as indicated by the @authors tag. See the = * - * copyright.txt in the distribution for a full listing of = * - * individual contributors. = * - * = * - * This is free software; you can redistribute it and/or modify it = * - * under the terms of the GNU Lesser General Public License as = * - * published by the Free Software Foundation; either version 2.1 of = * - * the License, or (at your option) any later version. = * - * = * - * This software is distributed in the hope that it will be useful, = * - * but WITHOUT ANY WARRANTY; without even the implied warranty of = * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU = * - * Lesser General Public License for more details. = * - * = * - * You should have received a copy of the GNU Lesser General Public = * - * License along with this software; if not, write to the Free = * - * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA = * - * 02110-1301 USA, or see the FSF site: http://www.fsf.org. = * - *************************************************************************= *****/ -package org.jboss.unit.api.pojo; - -import java.util.List; - -/** - * An object describing a parameter. - * - * @author Julien Viet - * @version $Revision: 1.1 $ - */ -public interface ParameterDescriptor -{ - - String getName(); - - String getDescription(); - - List getDefaultValues(); -} Deleted: modules/test/trunk/unit/src/main/org/jboss/unit/api/pojo/PropertyT= estParameter.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/api/pojo/PropertyTestPa= rameter.java 2007-10-04 22:24:45 UTC (rev 8535) +++ modules/test/trunk/unit/src/main/org/jboss/unit/api/pojo/PropertyTestPa= rameter.java 2007-10-04 22:40:54 UTC (rev 8536) @@ -1,48 +0,0 @@ -/*************************************************************************= ***** - * JBoss, a division of Red Hat = * - * Copyright 2006, Red Hat Middleware, LLC, and individual = * - * contributors as indicated by the @authors tag. See the = * - * copyright.txt in the distribution for a full listing of = * - * individual contributors. = * - * = * - * This is free software; you can redistribute it and/or modify it = * - * under the terms of the GNU Lesser General Public License as = * - * published by the Free Software Foundation; either version 2.1 of = * - * the License, or (at your option) any later version. = * - * = * - * This software is distributed in the hope that it will be useful, = * - * but WITHOUT ANY WARRANTY; without even the implied warranty of = * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU = * - * Lesser General Public License for more details. = * - * = * - * You should have received a copy of the GNU Lesser General Public = * - * License along with this software; if not, write to the Free = * - * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA = * - * 02110-1301 USA, or see the FSF site: http://www.fsf.org. = * - *************************************************************************= *****/ -package org.jboss.unit.api.pojo; - -import java.lang.reflect.Method; -import java.util.List; -import java.util.ArrayList; - -/** - * @author Julien Viet - * @version $Revision: 1.1 $ - */ -class PropertyTestParameter extends TestParameter -{ - - /** . */ - final List setters =3D new ArrayList(); - - public PropertyTestParameter(String name, String description) - { - super(name, description); - } - - void addSetter(Method setter) - { - setters.add(setter); - } -} Deleted: modules/test/trunk/unit/src/main/org/jboss/unit/api/pojo/TestCase.= java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/api/pojo/TestCase.java = 2007-10-04 22:24:45 UTC (rev 8535) +++ modules/test/trunk/unit/src/main/org/jboss/unit/api/pojo/TestCase.java = 2007-10-04 22:40:54 UTC (rev 8536) @@ -1,32 +0,0 @@ -/*************************************************************************= ***** - * JBoss, a division of Red Hat = * - * Copyright 2006, Red Hat Middleware, LLC, and individual = * - * contributors as indicated by the @authors tag. See the = * - * copyright.txt in the distribution for a full listing of = * - * individual contributors. = * - * = * - * This is free software; you can redistribute it and/or modify it = * - * under the terms of the GNU Lesser General Public License as = * - * published by the Free Software Foundation; either version 2.1 of = * - * the License, or (at your option) any later version. = * - * = * - * This software is distributed in the hope that it will be useful, = * - * but WITHOUT ANY WARRANTY; without even the implied warranty of = * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU = * - * Lesser General Public License for more details. = * - * = * - * You should have received a copy of the GNU Lesser General Public = * - * License along with this software; if not, write to the Free = * - * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA = * - * 02110-1301 USA, or see the FSF site: http://www.fsf.org. = * - *************************************************************************= *****/ -package org.jboss.unit.api.pojo; - -/** - * @author Julien Viet - * @version $Revision: 1.1 $ - */ -public interface TestCase -{ - Object getPOJO(); -} Deleted: modules/test/trunk/unit/src/main/org/jboss/unit/api/pojo/TestCaseD= ef.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/api/pojo/TestCaseDef.ja= va 2007-10-04 22:24:45 UTC (rev 8535) +++ modules/test/trunk/unit/src/main/org/jboss/unit/api/pojo/TestCaseDef.ja= va 2007-10-04 22:40:54 UTC (rev 8536) @@ -1,95 +0,0 @@ -/*************************************************************************= ***** - * JBoss, a division of Red Hat = * - * Copyright 2006, Red Hat Middleware, LLC, and individual = * - * contributors as indicated by the @authors tag. See the = * - * copyright.txt in the distribution for a full listing of = * - * individual contributors. = * - * = * - * This is free software; you can redistribute it and/or modify it = * - * under the terms of the GNU Lesser General Public License as = * - * published by the Free Software Foundation; either version 2.1 of = * - * the License, or (at your option) any later version. = * - * = * - * This software is distributed in the hope that it will be useful, = * - * but WITHOUT ANY WARRANTY; without even the implied warranty of = * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU = * - * Lesser General Public License for more details. = * - * = * - * You should have received a copy of the GNU Lesser General Public = * - * License along with this software; if not, write to the Free = * - * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA = * - * 02110-1301 USA, or see the FSF site: http://www.fsf.org. = * - *************************************************************************= *****/ -package org.jboss.unit.api.pojo; - -import java.lang.reflect.Method; -import java.util.LinkedHashMap; -import java.util.Set; -import java.util.Map; -import java.util.Collections; -import java.util.HashMap; - -/** - * @author Julien Viet - * @version $Revision: 1.1 $ - */ -class TestCaseDef implements TestCaseDescriptor -{ - - /** . */ - TestHandlerSupport driver; - - /** . */ - final Method method; - - /** . */ - final String name; - - /** . */ - final String description; - - /** . */ - final LinkedHashMap arguments; - - /** . */ - final Map parameters; - - /** . */ - final Set keywords; - - TestCaseDef( - Method method, - String name, - String description, - Map parameters, - LinkedHashMap arguments, - Set keywords) - { - this.method =3D method; - this.name =3D name; - this.description =3D description; - this.arguments =3D arguments; - this.parameters =3D parameters; - this.keywords =3D keywords; - } - - public String getName() - { - return name; - } - - public String getDescription() - { - return description; - } - - public Map getParameters() - { - return Collections.unmodifiableMap(parameters); - } - - public Set getKeywords() - { - return Collections.unmodifiableSet(keywords); - } -} Deleted: modules/test/trunk/unit/src/main/org/jboss/unit/api/pojo/TestCaseD= escriptor.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/api/pojo/TestCaseDescri= ptor.java 2007-10-04 22:24:45 UTC (rev 8535) +++ modules/test/trunk/unit/src/main/org/jboss/unit/api/pojo/TestCaseDescri= ptor.java 2007-10-04 22:40:54 UTC (rev 8536) @@ -1,42 +0,0 @@ -/*************************************************************************= ***** - * JBoss, a division of Red Hat = * - * Copyright 2006, Red Hat Middleware, LLC, and individual = * - * contributors as indicated by the @authors tag. See the = * - * copyright.txt in the distribution for a full listing of = * - * individual contributors. = * - * = * - * This is free software; you can redistribute it and/or modify it = * - * under the terms of the GNU Lesser General Public License as = * - * published by the Free Software Foundation; either version 2.1 of = * - * the License, or (at your option) any later version. = * - * = * - * This software is distributed in the hope that it will be useful, = * - * but WITHOUT ANY WARRANTY; without even the implied warranty of = * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU = * - * Lesser General Public License for more details. = * - * = * - * You should have received a copy of the GNU Lesser General Public = * - * License along with this software; if not, write to the Free = * - * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA = * - * 02110-1301 USA, or see the FSF site: http://www.fsf.org. = * - *************************************************************************= *****/ -package org.jboss.unit.api.pojo; - -import java.util.Map; -import java.util.Set; - -/** - * @author Julien Viet - * @version $Revision: 1.1 $ - */ -public interface TestCaseDescriptor -{ - - String getName(); - - String getDescription(); - - Map getParameters(); - - Set getKeywords(); -} Deleted: modules/test/trunk/unit/src/main/org/jboss/unit/api/pojo/TestCaseI= mpl.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/api/pojo/TestCaseImpl.j= ava 2007-10-04 22:24:45 UTC (rev 8535) +++ modules/test/trunk/unit/src/main/org/jboss/unit/api/pojo/TestCaseImpl.j= ava 2007-10-04 22:40:54 UTC (rev 8536) @@ -1,52 +0,0 @@ -/*************************************************************************= ***** - * JBoss, a division of Red Hat = * - * Copyright 2006, Red Hat Middleware, LLC, and individual = * - * contributors as indicated by the @authors tag. See the = * - * copyright.txt in the distribution for a full listing of = * - * individual contributors. = * - * = * - * This is free software; you can redistribute it and/or modify it = * - * under the terms of the GNU Lesser General Public License as = * - * published by the Free Software Foundation; either version 2.1 of = * - * the License, or (at your option) any later version. = * - * = * - * This software is distributed in the hope that it will be useful, = * - * but WITHOUT ANY WARRANTY; without even the implied warranty of = * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU = * - * Lesser General Public License for more details. = * - * = * - * You should have received a copy of the GNU Lesser General Public = * - * License along with this software; if not, write to the Free = * - * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA = * - * 02110-1301 USA, or see the FSF site: http://www.fsf.org. = * - *************************************************************************= *****/ -package org.jboss.unit.api.pojo; - -import java.util.Map; - -/** - * @author Julien Viet - * @version $Revision: 1.1 $ - */ -class TestCaseImpl implements TestCase -{ - - final TestCaseDef def; - - /** . */ - final Object pojo; - - /** . */ - Map parametrization; - - public TestCaseImpl(TestCaseDef def, Object pojo) - { - this.def =3D def; - this.pojo =3D pojo; - } - - public Object getPOJO() - { - return pojo; - } -} Deleted: modules/test/trunk/unit/src/main/org/jboss/unit/api/pojo/TestCaseL= ifeCycleException.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/api/pojo/TestCaseLifeCy= cleException.java 2007-10-04 22:24:45 UTC (rev 8535) +++ modules/test/trunk/unit/src/main/org/jboss/unit/api/pojo/TestCaseLifeCy= cleException.java 2007-10-04 22:40:54 UTC (rev 8536) @@ -1,49 +0,0 @@ -/*************************************************************************= ***** - * JBoss, a division of Red Hat = * - * Copyright 2006, Red Hat Middleware, LLC, and individual = * - * contributors as indicated by the @authors tag. See the = * - * copyright.txt in the distribution for a full listing of = * - * individual contributors. = * - * = * - * This is free software; you can redistribute it and/or modify it = * - * under the terms of the GNU Lesser General Public License as = * - * published by the Free Software Foundation; either version 2.1 of = * - * the License, or (at your option) any later version. = * - * = * - * This software is distributed in the hope that it will be useful, = * - * but WITHOUT ANY WARRANTY; without even the implied warranty of = * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU = * - * Lesser General Public License for more details. = * - * = * - * You should have received a copy of the GNU Lesser General Public = * - * License along with this software; if not, write to the Free = * - * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA = * - * 02110-1301 USA, or see the FSF site: http://www.fsf.org. = * - *************************************************************************= *****/ -package org.jboss.unit.api.pojo; - -/** - * @author Julien Viet - * @version $Revision: 1.1 $ - */ -public class TestCaseLifeCycleException extends Exception -{ - public TestCaseLifeCycleException() - { - } - - public TestCaseLifeCycleException(String string) - { - super(string); - } - - public TestCaseLifeCycleException(String string, Throwable throwable) - { - super(string, throwable); - } - - public TestCaseLifeCycleException(Throwable throwable) - { - super(throwable); - } -} Deleted: modules/test/trunk/unit/src/main/org/jboss/unit/api/pojo/TestHandl= er.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/api/pojo/TestHandler.ja= va 2007-10-04 22:24:45 UTC (rev 8535) +++ modules/test/trunk/unit/src/main/org/jboss/unit/api/pojo/TestHandler.ja= va 2007-10-04 22:40:54 UTC (rev 8536) @@ -1,38 +0,0 @@ -/*************************************************************************= ***** - * JBoss, a division of Red Hat = * - * Copyright 2006, Red Hat Middleware, LLC, and individual = * - * contributors as indicated by the @authors tag. See the = * - * copyright.txt in the distribution for a full listing of = * - * individual contributors. = * - * = * - * This is free software; you can redistribute it and/or modify it = * - * under the terms of the GNU Lesser General Public License as = * - * published by the Free Software Foundation; either version 2.1 of = * - * the License, or (at your option) any later version. = * - * = * - * This software is distributed in the hope that it will be useful, = * - * but WITHOUT ANY WARRANTY; without even the implied warranty of = * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU = * - * Lesser General Public License for more details. = * - * = * - * You should have received a copy of the GNU Lesser General Public = * - * License along with this software; if not, write to the Free = * - * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA = * - * 02110-1301 USA, or see the FSF site: http://www.fsf.org. = * - *************************************************************************= *****/ -package org.jboss.unit.api.pojo; - -/** - * Allow a pojo class to take care of providing its description and perfor= m test case life cycle management. - * - * @author Julien Viet - * @version $Revision: 1.1 $ - */ -public interface TestHandler -{ - - TestSuiteDescriptor getDescriptor(); - - TestLifeCycle getLifeCycle(); - -} Deleted: modules/test/trunk/unit/src/main/org/jboss/unit/api/pojo/TestHandl= erSupport.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/api/pojo/TestHandlerSup= port.java 2007-10-04 22:24:45 UTC (rev 8535) +++ modules/test/trunk/unit/src/main/org/jboss/unit/api/pojo/TestHandlerSup= port.java 2007-10-04 22:40:54 UTC (rev 8536) @@ -1,597 +0,0 @@ -/*************************************************************************= ***** - * JBoss, a division of Red Hat = * - * Copyright 2006, Red Hat Middleware, LLC, and individual = * - * contributors as indicated by the @authors tag. See the = * - * copyright.txt in the distribution for a full listing of = * - * individual contributors. = * - * = * - * This is free software; you can redistribute it and/or modify it = * - * under the terms of the GNU Lesser General Public License as = * - * published by the Free Software Foundation; either version 2.1 of = * - * the License, or (at your option) any later version. = * - * = * - * This software is distributed in the hope that it will be useful, = * - * but WITHOUT ANY WARRANTY; without even the implied warranty of = * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU = * - * Lesser General Public License for more details. = * - * = * - * You should have received a copy of the GNU Lesser General Public = * - * License along with this software; if not, write to the Free = * - * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA = * - * 02110-1301 USA, or see the FSF site: http://www.fsf.org. = * - *************************************************************************= *****/ -package org.jboss.unit.api.pojo; - -import org.jboss.unit.api.pojo.annotations.Test; -import org.jboss.unit.api.pojo.annotations.Parameter; -import org.jboss.unit.api.pojo.annotations.Create; -import org.jboss.unit.api.pojo.annotations.Destroy; -import org.jboss.unit.api.pojo.annotations.Description; -import org.jboss.unit.api.pojo.annotations.Tag; -import org.jboss.unit.util.CollectionTools; - -import java.util.SortedMap; -import java.util.TreeMap; -import java.util.Map; -import java.util.HashMap; -import java.util.LinkedHashMap; -import java.util.ArrayList; -import java.util.List; -import java.util.Set; -import java.util.HashSet; -import java.util.Collections; -import java.lang.reflect.Modifier; -import java.lang.reflect.Constructor; -import java.lang.reflect.AnnotatedElement; -import java.lang.reflect.Method; -import java.lang.reflect.InvocationTargetException; -import java.lang.annotation.Annotation; -import java.beans.Introspector; - -/** - * Provide a default implementation that relies on the annotation defined = in the annotations package. - * - * @author Julien Viet - * @version $Revision: 1.1 $ - */ -public class TestHandlerSupport implements TestHandler, TestLifeCycle, Tes= tSuiteDescriptor -{ - - /** . */ - private final String suiteName; - - /** . */ - private final String suiteDescription; - - /** . */ - private final Map testCases; - - /** . */ - private final Method create; - - /** . */ - private final Method destroy; - - /** . */ - final Map suiteParameters; - - /** . */ - private final Constructor ctor; - - /** . */ - private final Set suiteKeywords; - - public TestHandlerSupport(Class testClass) - { - if (testClass =3D=3D null) - { - throw new IllegalArgumentException(); - } - - // - if (Modifier.isAbstract(testClass.getModifiers())) - { - throw new IllegalArgumentException("Test class is abstract"); - } - - // Check constructor - Constructor ctor; - try - { - ctor =3D testClass.getConstructor(); - } - catch (NoSuchMethodException e) - { - throw new IllegalArgumentException(e); - } - - // - Test testAnnotation =3D ((AnnotatedElement)testClass).getAnnotation(= Test.class); - String suiteName =3D testAnnotation !=3D null ? testAnnotation.name(= ) : ""; - if (suiteName.length() =3D=3D 0) - { - suiteName =3D testClass.getName(); - } - - // - Description descriptionAnnotation =3D ((AnnotatedElement)testClass).= getAnnotation(Description.class); - String suiteDescription =3D descriptionAnnotation !=3D null ? descri= ptionAnnotation.description() : ""; - if (suiteDescription.length() =3D=3D 0) - { - suiteDescription =3D "Test of class " + testClass.getName(); - } - - Tag tag =3D ((AnnotatedElement)testClass).getAnnotation(Tag.class); - Set suiteKeywords =3D new HashSet(); - if (tag !=3D null) - { - suiteKeywords.addAll(CollectionTools.set(tag.value())); - } - - // - SortedMap methods =3D new TreeMap(); - for (Method method : testClass.getMethods()) - { - MethodKey key =3D new MethodKey(method); - methods.put(key, method); - } - - // - Map suiteParameters =3D new HashMap(); - Map testCases =3D new HashMap(); - Method create =3D null; - Method destroy =3D null; - - // First pass for parameters and life cycle annotations - for (Method method : methods.values()) - { - String methodName =3D method.getName(); - int modifiers =3D method.getModifiers(); - Parameter parameterMethodAnnotation =3D method.getAnnotation(Para= meter.class); - Test testMethodAnnotation =3D method.getAnnotation(Test.class); - Create createMethodAnnotation =3D method.getAnnotation(Create.cla= ss); - Destroy destroyMethodAnnotation =3D method.getAnnotation(Destroy.= class); - - // - if (testMethodAnnotation !=3D null && parameterMethodAnnotation != =3D null) - { - throw new IllegalArgumentException(); - } - - // - if (createMethodAnnotation !=3D null && parameterMethodAnnotation= !=3D null) - { - throw new IllegalArgumentException(); - } - if (createMethodAnnotation !=3D null && testMethodAnnotation !=3D= null) - { - throw new IllegalArgumentException(); - } - - // - if (destroyMethodAnnotation !=3D null && parameterMethodAnnotatio= n !=3D null) - { - throw new IllegalArgumentException(); - } - if (destroyMethodAnnotation !=3D null && testMethodAnnotation != =3D null) - { - throw new IllegalArgumentException(); - } - if (destroyMethodAnnotation !=3D null && createMethodAnnotation != =3D null) - { - throw new IllegalArgumentException(); - } - - // - if (parameterMethodAnnotation !=3D null) - { - if (!methodName.startsWith("set")) - { - throw new IllegalArgumentException(); - } - if (methodName.length() < 4) - { - throw new IllegalArgumentException(); - } - if (method.getParameterTypes().length !=3D 1) - { - throw new IllegalArgumentException(); - } - if (method.getReturnType() !=3D void.class) - { - throw new IllegalArgumentException(); - } - if (Modifier.isAbstract(modifiers)) - { - throw new IllegalArgumentException(); - } - if (!Modifier.isPublic(modifiers)) - { - throw new IllegalArgumentException(); - } - if (Modifier.isStatic(modifiers)) - { - throw new IllegalArgumentException(); - } - - // - String name =3D parameterMethodAnnotation.name(); - if (name.length() =3D=3D 0) - { - name =3D Introspector.decapitalize(method.getName().substri= ng(3)); - } - - // - Description descriptionMethodAnnotation =3D method.getAnnotati= on(Description.class); - String description =3D descriptionMethodAnnotation !=3D null ?= descriptionMethodAnnotation.description() : ""; - if (description.length() =3D=3D 0) - { - description =3D "Parameter " + name; - } - - // - PropertyTestParameter parameter =3D suiteParameters.get(name); - if (parameter =3D=3D null) - { - parameter =3D new PropertyTestParameter(name, description); - suiteParameters.put(name, parameter); - } - - // - parameter.addSetter(method); - } - else if (createMethodAnnotation !=3D null) - { - if (create !=3D null) - { - throw new IllegalArgumentException(); - } - if (method.getReturnType() !=3D void.class) - { - throw new IllegalArgumentException(); - } - if (Modifier.isAbstract(modifiers)) - { - throw new IllegalArgumentException(); - } - if (!Modifier.isPublic(modifiers)) - { - throw new IllegalArgumentException(); - } - if (Modifier.isStatic(modifiers)) - { - throw new IllegalArgumentException(); - } - if (method.getParameterTypes().length > 0) - { - throw new IllegalArgumentException(); - } - - // - create =3D method; - } - else if (destroyMethodAnnotation !=3D null) - { - if (destroy !=3D null) - { - throw new IllegalArgumentException(); - } - if (method.getReturnType() !=3D void.class) - { - throw new IllegalArgumentException(); - } - if (Modifier.isAbstract(modifiers)) - { - throw new IllegalArgumentException(); - } - if (!Modifier.isPublic(modifiers)) - { - throw new IllegalArgumentException(); - } - if (Modifier.isStatic(modifiers)) - { - throw new IllegalArgumentException(); - } - if (method.getParameterTypes().length > 0) - { - throw new IllegalArgumentException(); - } - - // - destroy =3D method; - } - } - - // Second pass for test annotations - for (Method method : methods.values()) - { - int modifiers =3D method.getModifiers(); - Test testMethodAnnotation =3D method.getAnnotation(Test.class); - - // - if (testMethodAnnotation !=3D null) - { - if (method.getReturnType() !=3D void.class) - { - throw new IllegalArgumentException(); - } - if (Modifier.isAbstract(modifiers)) - { - throw new IllegalArgumentException(); - } - if (!Modifier.isPublic(modifiers)) - { - throw new IllegalArgumentException(); - } - if (Modifier.isStatic(modifiers)) - { - throw new IllegalArgumentException(); - } - - // - LinkedHashMap methodParameters = =3D new LinkedHashMap(); - for (Annotation[] parameterAnnotations : method.getParameterAn= notations()) - { - Map,Annotation> parameterAnnota= tionMap =3D new HashMap, Annotation>(); - for (Annotation parameterAnnotation : parameterAnnotations) - { - Class blah =3D parameterAnnotation= .annotationType(); - parameterAnnotationMap.put(blah, parameterAnnotation); - } - - // - Parameter argumentParameterAnnotation =3D (Parameter)parame= terAnnotationMap.get(Parameter.class); - - // - if (argumentParameterAnnotation !=3D null) - { - // - String name =3D argumentParameterAnnotation.name(); - if (name.length() =3D=3D 0) - { - throw new IllegalArgumentException(); - } - if (methodParameters.containsKey(name)) - { - throw new IllegalArgumentException(); - } - - // - Description descriptionArgumentParameterAnnotation =3D (= Description)parameterAnnotationMap.get(Description.class); - String description =3D descriptionArgumentParameterAnnot= ation !=3D null ? descriptionArgumentParameterAnnotation.description() : ""; - if (description.length() =3D=3D 0) - { - description =3D "Method parameter " + name; - } - - // - methodParameters.put(name, new ArgumentTestParameter(nam= e, description)); - } - else - { - throw new IllegalArgumentException(); - } - } - - // - String name =3D testMethodAnnotation.name(); - if (testMethodAnnotation.name().length() =3D=3D 0) - { - name =3D method.getName(); - } - - // - Description descriptionMethodAnnotation =3D method.getAnnotati= on(Description.class); - String description =3D descriptionMethodAnnotation !=3D null ?= descriptionMethodAnnotation.description() : ""; - if (description.length() =3D=3D 0) - { - description =3D "Test of method " + method.getName(); - } - - // - Set keywords =3D new HashSet(); - Tag tagMethodAnnotation =3D method.getAnnotation(Tag.class); - if (tagMethodAnnotation !=3D null) - { - keywords.addAll(CollectionTools.set(tagMethodAnnotation.val= ue())); - } - - Map parameters =3D new HashMap(suiteParameters); - parameters.putAll(methodParameters); - - // - TestCaseDef testCaseDef =3D new TestCaseDef(method, name, desc= ription, parameters, methodParameters, keywords); - - // - if (testCases.put(testCaseDef.getName(), testCaseDef) !=3D nul= l) - { - throw new IllegalArgumentException(); - } - } - } - - // - this.suiteName =3D suiteName; - this.suiteDescription =3D suiteDescription; - this.suiteKeywords =3D suiteKeywords; - this.suiteParameters =3D suiteParameters; - this.testCases =3D testCases; - this.ctor =3D ctor; - this.create =3D create; - this.destroy =3D destroy; - } - - public TestSuiteDescriptor getDescriptor() - { - return this; - } - - public TestLifeCycle getLifeCycle() - { - return this; - } - - public String getName() - { - return suiteName; - } - - public String getDescription() - { - return suiteDescription; - } - - public Set getKeywords() - { - return suiteKeywords; - } - - public Map getParameters() - { - return Collections.unmodifiableMap(suiteParameters); - } - - public Map getTestCases() - { - return Collections.unmodifiableMap(testCases); - } - - public TestCase newTestCase(String name) throws TestCaseLifeCycleExcept= ion - { - TestCaseDef testCaseDef =3D testCases.get(name); - - // - if (testCaseDef =3D=3D null) - { - throw new TestCaseLifeCycleException("No such test case <" + name= + ">"); - } - - // - Object instance; - try - { - instance =3D ctor.newInstance(); - } - catch (InvocationTargetException e) - { - throw new TestCaseLifeCycleException("Cannot create test case " += name, e.getCause()); - } - catch (Exception e) - { - throw new TestCaseLifeCycleException("Cannot configure parameter = " + name, e); - } - - // - return new TestCaseImpl(testCaseDef, instance); - } - - public void testCaseParametrize(TestCase _testCase, Map = parametrization) throws TestCaseLifeCycleException - { - TestCaseImpl testCase =3D (TestCaseImpl)_testCase; - - // Save parametrization - testCase.parametrization =3D parametrization; - - // - for (PropertyTestParameter parameter : suiteParameters.values()) - { - if (!parametrization.containsKey(parameter.getName())) - { - throw new TestCaseLifeCycleException("Missing parameter " + pa= rameter.getName()); - } - String parameterValue =3D parametrization.get(parameter.getName()= ); - for (Method setter : parameter.setters) - { - try - { - setter.invoke(testCase.pojo, parameterValue); - } - catch (InvocationTargetException e) - { - throw new TestCaseLifeCycleException("Cannot configure para= meter " + parameter.getName(), e.getCause()); - } - catch (Exception e) - { - throw new TestCaseLifeCycleException("Cannot configure para= meter " + parameter.getName(), e); - } - } - } - } - - public void testCaseCreate(TestCase _testCase) throws TestCaseLifeCycle= Exception - { - TestCaseImpl testCase =3D (TestCaseImpl)_testCase; - - // - if (create !=3D null) - { - try - { - create.invoke(testCase.getPOJO()); - } - catch (InvocationTargetException e) - { - throw new TestCaseLifeCycleException("Cannot create test case"= , e.getCause()); - } - catch (Exception e) - { - throw new TestCaseLifeCycleException("Cannot create test case"= , e); - } - } - } - - public void testCaseInvoke(TestCase _testCase) throws TestCaseLifeCycle= Exception - { - TestCaseImpl testCase =3D (TestCaseImpl)_testCase; - - List argList =3D new ArrayList(); - for (String parameterName : testCase.def.arguments.keySet()) - { - if (!testCase.parametrization.containsKey(parameterName)) - { - throw new TestCaseLifeCycleException("Missing parameter " + pa= rameterName); - } - String parameterValue =3D testCase.parametrization.get(parameterN= ame); - if (parameterValue =3D=3D null) - { - throw new IllegalArgumentException(); - } - - // - argList.add(parameterValue); - } - Object[] args =3D argList.toArray(); - - try - { - testCase.def.method.invoke(testCase.pojo, args); - } - catch (InvocationTargetException e) - { - throw new TestCaseLifeCycleException("Cannot invoke test case", e= .getCause()); - } - catch (Exception e) - { - throw new TestCaseLifeCycleException("Cannot invoke test case", e= ); - } - } - - public void testCaseDestroy(TestCase _testCase) - { - TestCaseImpl testCase =3D (TestCaseImpl)_testCase; - - // - if (destroy !=3D null) - { - try - { - destroy.invoke(testCase.getPOJO()); - } - catch (Throwable t) - { - // Log this as a warn - // t.printStackTrace(); - } - } - } -} Deleted: modules/test/trunk/unit/src/main/org/jboss/unit/api/pojo/TestLifeC= ycle.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/api/pojo/TestLifeCycle.= java 2007-10-04 22:24:45 UTC (rev 8535) +++ modules/test/trunk/unit/src/main/org/jboss/unit/api/pojo/TestLifeCycle.= java 2007-10-04 22:40:54 UTC (rev 8536) @@ -1,75 +0,0 @@ -/*************************************************************************= ***** - * JBoss, a division of Red Hat = * - * Copyright 2006, Red Hat Middleware, LLC, and individual = * - * contributors as indicated by the @authors tag. See the = * - * copyright.txt in the distribution for a full listing of = * - * individual contributors. = * - * = * - * This is free software; you can redistribute it and/or modify it = * - * under the terms of the GNU Lesser General Public License as = * - * published by the Free Software Foundation; either version 2.1 of = * - * the License, or (at your option) any later version. = * - * = * - * This software is distributed in the hope that it will be useful, = * - * but WITHOUT ANY WARRANTY; without even the implied warranty of = * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU = * - * Lesser General Public License for more details. = * - * = * - * You should have received a copy of the GNU Lesser General Public = * - * License along with this software; if not, write to the Free = * - * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA = * - * 02110-1301 USA, or see the FSF site: http://www.fsf.org. = * - *************************************************************************= *****/ -package org.jboss.unit.api.pojo; - -import java.util.Map; - -/** - * @author Julien Viet - * @version $Revision: 1.1 $ - */ -public interface TestLifeCycle -{ - - /** - * Instantiate life cycle operation of a test case. - * - * @param name the test case name - * @return the test case object - * @throws TestCaseLifeCycleException - */ - TestCase newTestCase(String name) throws TestCaseLifeCycleException; - - /** - * Parametrize life cycle operation of a test case. - * - * @param testCase the test case - * @param parametrization the parametrization - * @throws TestCaseLifeCycleException - */ - void testCaseParametrize(TestCase testCase, Map parametr= ization) throws TestCaseLifeCycleException; - - /** - * Create life cycle operation of a test case. - * - * @param testCase the test case - * @throws TestCaseLifeCycleException - */ - void testCaseCreate(TestCase testCase) throws TestCaseLifeCycleExceptio= n; - - /** - * Invocation life cycle operation of a test case. - * - * @param testCase the test case - * @throws TestCaseLifeCycleException - */ - void testCaseInvoke(TestCase testCase) throws TestCaseLifeCycleExceptio= n; - - /** - * Destroy life cycle operation of a test case. - * - * @param testCase the test case - */ - void testCaseDestroy(TestCase testCase); - -} Deleted: modules/test/trunk/unit/src/main/org/jboss/unit/api/pojo/TestParam= eter.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/api/pojo/TestParameter.= java 2007-10-04 22:24:45 UTC (rev 8535) +++ modules/test/trunk/unit/src/main/org/jboss/unit/api/pojo/TestParameter.= java 2007-10-04 22:40:54 UTC (rev 8536) @@ -1,61 +0,0 @@ -/*************************************************************************= ***** - * JBoss, a division of Red Hat = * - * Copyright 2006, Red Hat Middleware, LLC, and individual = * - * contributors as indicated by the @authors tag. See the = * - * copyright.txt in the distribution for a full listing of = * - * individual contributors. = * - * = * - * This is free software; you can redistribute it and/or modify it = * - * under the terms of the GNU Lesser General Public License as = * - * published by the Free Software Foundation; either version 2.1 of = * - * the License, or (at your option) any later version. = * - * = * - * This software is distributed in the hope that it will be useful, = * - * but WITHOUT ANY WARRANTY; without even the implied warranty of = * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU = * - * Lesser General Public License for more details. = * - * = * - * You should have received a copy of the GNU Lesser General Public = * - * License along with this software; if not, write to the Free = * - * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA = * - * 02110-1301 USA, or see the FSF site: http://www.fsf.org. = * - *************************************************************************= *****/ -package org.jboss.unit.api.pojo; - -import java.util.List; -import java.util.Collections; - -/** - * @author Julien Viet - * @version $Revision: 1.1 $ - */ -class TestParameter implements ParameterDescriptor -{ - - /** . */ - private final String name; - - /** . */ - private final String description; - - public TestParameter(String name, String description) - { - this.name =3D name; - this.description =3D description; - } - - public String getName() - { - return name; - } - - public String getDescription() - { - return description; - } - - public List getDefaultValues() - { - return Collections.emptyList(); - } -} Deleted: modules/test/trunk/unit/src/main/org/jboss/unit/api/pojo/TestSuite= Descriptor.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/api/pojo/TestSuiteDescr= iptor.java 2007-10-04 22:24:45 UTC (rev 8535) +++ modules/test/trunk/unit/src/main/org/jboss/unit/api/pojo/TestSuiteDescr= iptor.java 2007-10-04 22:40:54 UTC (rev 8536) @@ -1,70 +0,0 @@ -/*************************************************************************= ***** - * JBoss, a division of Red Hat = * - * Copyright 2006, Red Hat Middleware, LLC, and individual = * - * contributors as indicated by the @authors tag. See the = * - * copyright.txt in the distribution for a full listing of = * - * individual contributors. = * - * = * - * This is free software; you can redistribute it and/or modify it = * - * under the terms of the GNU Lesser General Public License as = * - * published by the Free Software Foundation; either version 2.1 of = * - * the License, or (at your option) any later version. = * - * = * - * This software is distributed in the hope that it will be useful, = * - * but WITHOUT ANY WARRANTY; without even the implied warranty of = * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU = * - * Lesser General Public License for more details. = * - * = * - * You should have received a copy of the GNU Lesser General Public = * - * License along with this software; if not, write to the Free = * - * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA = * - * 02110-1301 USA, or see the FSF site: http://www.fsf.org. = * - *************************************************************************= *****/ -package org.jboss.unit.api.pojo; - -import java.util.Set; -import java.util.Map; - -/** - * @author Julien Viet - * @version $Revision: 1.1 $ - */ -public interface TestSuiteDescriptor -{ - - /** - * Return the test name. - * - * @return the test name - */ - String getName(); - - /** - * Return the test description. - * - * @return the test description - */ - String getDescription(); - - /** - * Returns the keywords for the test. - * - * @return the test keywords - */ - Set getKeywords(); - - /** - * Return the test parameters. - * - * @return the test parameters - */ - Map getParameters(); - - /** - * Return the test case descriptions. - * - * @return the test case descriptions - */ - Map getTestCases(); - -} Deleted: modules/test/trunk/unit/src/main/org/jboss/unit/api/pojo/annotatio= ns/Provider.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/api/pojo/annotations/Pr= ovider.java 2007-10-04 22:24:45 UTC (rev 8535) +++ modules/test/trunk/unit/src/main/org/jboss/unit/api/pojo/annotations/Pr= ovider.java 2007-10-04 22:40:54 UTC (rev 8536) @@ -1,43 +0,0 @@ -/*************************************************************************= ***** - * JBoss, a division of Red Hat = * - * Copyright 2006, Red Hat Middleware, LLC, and individual = * - * contributors as indicated by the @authors tag. See the = * - * copyright.txt in the distribution for a full listing of = * - * individual contributors. = * - * = * - * This is free software; you can redistribute it and/or modify it = * - * under the terms of the GNU Lesser General Public License as = * - * published by the Free Software Foundation; either version 2.1 of = * - * the License, or (at your option) any later version. = * - * = * - * This software is distributed in the hope that it will be useful, = * - * but WITHOUT ANY WARRANTY; without even the implied warranty of = * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU = * - * Lesser General Public License for more details. = * - * = * - * You should have received a copy of the GNU Lesser General Public = * - * License along with this software; if not, write to the Free = * - * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA = * - * 02110-1301 USA, or see the FSF site: http://www.fsf.org. = * - *************************************************************************= *****/ -package org.jboss.unit.api.pojo.annotations; - -import org.jboss.unit.api.pojo.TestHandler; - -import java.lang.annotation.Inherited; -import java.lang.annotation.Retention; -import java.lang.annotation.RetentionPolicy; -import java.lang.annotation.Target; -import java.lang.annotation.ElementType; - -/** - * @author Julien Viet - * @version $Revision: 1.1 $ - */ -(a)Inherited -(a)Retention(RetentionPolicy.RUNTIME) -(a)Target({ElementType.ANNOTATION_TYPE,ElementType.TYPE}) -public @interface Provider -{ - Class value(); -} Modified: modules/test/trunk/unit/src/main/org/jboss/unit/api/pojo/junit/JU= nitDescriptor.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/api/pojo/junit/JUnitDes= criptor.java 2007-10-04 22:24:45 UTC (rev 8535) +++ modules/test/trunk/unit/src/main/org/jboss/unit/api/pojo/junit/JUnitDes= criptor.java 2007-10-04 22:40:54 UTC (rev 8536) @@ -22,14 +22,13 @@ *************************************************************************= *****/ package org.jboss.unit.api.pojo.junit; = -import org.jboss.unit.api.pojo.TestSuiteDescriptor; -import org.jboss.unit.api.pojo.ParameterDescriptor; -import org.jboss.unit.api.pojo.TestCaseDescriptor; +import org.jboss.unit.spi.pojo.TestSuiteDescriptor; +import org.jboss.unit.spi.pojo.ParameterDescriptor; +import org.jboss.unit.spi.pojo.TestCaseDescriptor; = import java.util.Map; import java.util.Set; import java.util.Collections; -import java.util.Iterator; import java.util.HashMap; import java.lang.reflect.Method; import java.lang.reflect.Modifier; Modified: modules/test/trunk/unit/src/main/org/jboss/unit/api/pojo/junit/JU= nitLifeCycle.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/api/pojo/junit/JUnitLif= eCycle.java 2007-10-04 22:24:45 UTC (rev 8535) +++ modules/test/trunk/unit/src/main/org/jboss/unit/api/pojo/junit/JUnitLif= eCycle.java 2007-10-04 22:40:54 UTC (rev 8536) @@ -22,8 +22,8 @@ *************************************************************************= *****/ package org.jboss.unit.api.pojo.junit; = -import org.jboss.unit.api.pojo.TestLifeCycle; -import org.jboss.unit.api.pojo.TestCaseLifeCycleException; +import org.jboss.unit.spi.pojo.TestLifeCycle; +import org.jboss.unit.spi.pojo.TestCaseLifeCycleException; = import java.util.Map; import java.lang.reflect.InvocationTargetException; @@ -43,7 +43,7 @@ this.provider =3D testCase; } = - public org.jboss.unit.api.pojo.TestCase newTestCase(String name) throws= TestCaseLifeCycleException + public org.jboss.unit.spi.pojo.TestCase newTestCase(String name) throws= TestCaseLifeCycleException { JUnitTestMethod method =3D provider.descriptor.testMap.get(name); if (method =3D=3D null) @@ -66,12 +66,12 @@ } } = - public void testCaseParametrize(org.jboss.unit.api.pojo.TestCase testCa= se, Map parametrization) throws TestCaseLifeCycleException + public void testCaseParametrize(org.jboss.unit.spi.pojo.TestCase testCa= se, Map parametrization) throws TestCaseLifeCycleException { // No op } = - public void testCaseCreate(org.jboss.unit.api.pojo.TestCase testCase) t= hrows TestCaseLifeCycleException + public void testCaseCreate(org.jboss.unit.spi.pojo.TestCase testCase) t= hrows TestCaseLifeCycleException { try { @@ -84,7 +84,7 @@ } } = - public void testCaseInvoke(org.jboss.unit.api.pojo.TestCase testCase) t= hrows TestCaseLifeCycleException + public void testCaseInvoke(org.jboss.unit.spi.pojo.TestCase testCase) t= hrows TestCaseLifeCycleException { JUnitTestMethodLifeCycle lifeCycle =3D (JUnitTestMethodLifeCycle)tes= tCase; = @@ -118,7 +118,7 @@ return new TestCaseLifeCycleException(throwable); } = - public void testCaseDestroy(org.jboss.unit.api.pojo.TestCase testCase) + public void testCaseDestroy(org.jboss.unit.spi.pojo.TestCase testCase) { try { Modified: modules/test/trunk/unit/src/main/org/jboss/unit/api/pojo/junit/JU= nitProvider.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/api/pojo/junit/JUnitPro= vider.java 2007-10-04 22:24:45 UTC (rev 8535) +++ modules/test/trunk/unit/src/main/org/jboss/unit/api/pojo/junit/JUnitPro= vider.java 2007-10-04 22:40:54 UTC (rev 8536) @@ -22,10 +22,9 @@ *************************************************************************= *****/ package org.jboss.unit.api.pojo.junit; = -import org.jboss.unit.api.pojo.annotations.Provider; -import org.jboss.unit.api.pojo.TestHandler; -import org.jboss.unit.api.pojo.TestSuiteDescriptor; -import org.jboss.unit.api.pojo.TestLifeCycle; +import org.jboss.unit.spi.pojo.TestHandler; +import org.jboss.unit.spi.pojo.TestSuiteDescriptor; +import org.jboss.unit.spi.pojo.TestLifeCycle; = /** * @todo Modified: modules/test/trunk/unit/src/main/org/jboss/unit/api/pojo/junit/JU= nitTestMethod.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/api/pojo/junit/JUnitTes= tMethod.java 2007-10-04 22:24:45 UTC (rev 8535) +++ modules/test/trunk/unit/src/main/org/jboss/unit/api/pojo/junit/JUnitTes= tMethod.java 2007-10-04 22:40:54 UTC (rev 8536) @@ -22,8 +22,8 @@ *************************************************************************= *****/ package org.jboss.unit.api.pojo.junit; = -import org.jboss.unit.api.pojo.TestCaseDescriptor; -import org.jboss.unit.api.pojo.ParameterDescriptor; +import org.jboss.unit.spi.pojo.TestCaseDescriptor; +import org.jboss.unit.spi.pojo.ParameterDescriptor; = import java.util.Map; import java.util.Set; Modified: modules/test/trunk/unit/src/main/org/jboss/unit/api/pojo/junit/JU= nitTestMethodLifeCycle.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/api/pojo/junit/JUnitTes= tMethodLifeCycle.java 2007-10-04 22:24:45 UTC (rev 8535) +++ modules/test/trunk/unit/src/main/org/jboss/unit/api/pojo/junit/JUnitTes= tMethodLifeCycle.java 2007-10-04 22:40:54 UTC (rev 8536) @@ -26,7 +26,7 @@ * @author Julien Viet * @version $Revision: 1.1 $ */ -class JUnitTestMethodLifeCycle implements org.jboss.unit.api.pojo.TestCase +class JUnitTestMethodLifeCycle implements org.jboss.unit.spi.pojo.TestCase { = /** . */ Modified: modules/test/trunk/unit/src/main/org/jboss/unit/api/pojo/junit/Te= stCase.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/api/pojo/junit/TestCase= .java 2007-10-04 22:24:45 UTC (rev 8535) +++ modules/test/trunk/unit/src/main/org/jboss/unit/api/pojo/junit/TestCase= .java 2007-10-04 22:40:54 UTC (rev 8536) @@ -22,7 +22,7 @@ *************************************************************************= *****/ package org.jboss.unit.api.pojo.junit; = -import org.jboss.unit.api.pojo.annotations.Provider; +import org.jboss.unit.spi.pojo.annotations.Provider; = = /** Copied: modules/test/trunk/unit/src/main/org/jboss/unit/spi/pojo/ArgumentTe= stParameter.java (from rev 8535, modules/test/trunk/unit/src/main/org/jboss= /unit/api/pojo/ArgumentTestParameter.java) =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/spi/pojo/ArgumentTestPa= rameter.java (rev 0) +++ modules/test/trunk/unit/src/main/org/jboss/unit/spi/pojo/ArgumentTestPa= rameter.java 2007-10-04 22:40:54 UTC (rev 8536) @@ -0,0 +1,35 @@ +/*************************************************************************= ***** + * JBoss, a division of Red Hat = * + * Copyright 2006, Red Hat Middleware, LLC, and individual = * + * contributors as indicated by the @authors tag. See the = * + * copyright.txt in the distribution for a full listing of = * + * individual contributors. = * + * = * + * This is free software; you can redistribute it and/or modify it = * + * under the terms of the GNU Lesser General Public License as = * + * published by the Free Software Foundation; either version 2.1 of = * + * the License, or (at your option) any later version. = * + * = * + * This software is distributed in the hope that it will be useful, = * + * but WITHOUT ANY WARRANTY; without even the implied warranty of = * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU = * + * Lesser General Public License for more details. = * + * = * + * You should have received a copy of the GNU Lesser General Public = * + * License along with this software; if not, write to the Free = * + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA = * + * 02110-1301 USA, or see the FSF site: http://www.fsf.org. = * + *************************************************************************= *****/ +package org.jboss.unit.spi.pojo; + +/** + * @author Julien Viet + * @version $Revision: 1.1 $ + */ +class ArgumentTestParameter extends TestParameter +{ + public ArgumentTestParameter(String name, String description) + { + super(name, description); + } +} Copied: modules/test/trunk/unit/src/main/org/jboss/unit/spi/pojo/MethodKey.= java (from rev 8535, modules/test/trunk/unit/src/main/org/jboss/unit/api/po= jo/MethodKey.java) =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/spi/pojo/MethodKey.java= (rev 0) +++ modules/test/trunk/unit/src/main/org/jboss/unit/spi/pojo/MethodKey.java= 2007-10-04 22:40:54 UTC (rev 8536) @@ -0,0 +1,101 @@ +/*************************************************************************= ***** + * JBoss, a division of Red Hat = * + * Copyright 2006, Red Hat Middleware, LLC, and individual = * + * contributors as indicated by the @authors tag. See the = * + * copyright.txt in the distribution for a full listing of = * + * individual contributors. = * + * = * + * This is free software; you can redistribute it and/or modify it = * + * under the terms of the GNU Lesser General Public License as = * + * published by the Free Software Foundation; either version 2.1 of = * + * the License, or (at your option) any later version. = * + * = * + * This software is distributed in the hope that it will be useful, = * + * but WITHOUT ANY WARRANTY; without even the implied warranty of = * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU = * + * Lesser General Public License for more details. = * + * = * + * You should have received a copy of the GNU Lesser General Public = * + * License along with this software; if not, write to the Free = * + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA = * + * 02110-1301 USA, or see the FSF site: http://www.fsf.org. = * + *************************************************************************= *****/ +package org.jboss.unit.spi.pojo; + +import java.util.List; +import java.util.ArrayList; +import java.lang.reflect.Method; + +/** + * @author Julien Viet + * @version $Revision: 1.1 $ + */ +class MethodKey implements Comparable +{ + + /** . */ + private String name; + + /** . */ + private List types; + + MethodKey(Method method) + { + List types =3D new ArrayList(); + for (Class type : method.getParameterTypes()) + { + types.add(type.getName()); + } + + this.name =3D method.getName(); + this.types =3D types; + } + + public int hashCode() + { + return name.hashCode() + types.hashCode(); + } + + public boolean equals(Object object) + { + if (object =3D=3D this) + { + return true; + } + if (object instanceof MethodKey) + { + MethodKey that =3D (MethodKey)object; + return that.name.equals(this.name) && that.types.equals(this.type= s); + } + return false; + } + + public int compareTo(Object o) + { + MethodKey that =3D (MethodKey)o; + + // + int sign =3D name.compareTo(that.name); + if (sign !=3D 0) + { + return sign; + } + + // + for (int index =3D 0;index < this.types.size() && index < that.types= .size();index++) + { + String thisName =3D this.types.get(index); + String thatName =3D that.types.get(index); + + // + int order =3D thisName.compareTo(thatName); + if (order !=3D 0) + { + return order; + } + } + + // + return that.types.size() - this.types.size(); + } +} Copied: modules/test/trunk/unit/src/main/org/jboss/unit/spi/pojo/ParameterD= escriptor.java (from rev 8535, modules/test/trunk/unit/src/main/org/jboss/u= nit/api/pojo/ParameterDescriptor.java) =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/spi/pojo/ParameterDescr= iptor.java (rev 0) +++ modules/test/trunk/unit/src/main/org/jboss/unit/spi/pojo/ParameterDescr= iptor.java 2007-10-04 22:40:54 UTC (rev 8536) @@ -0,0 +1,41 @@ +/*************************************************************************= ***** + * JBoss, a division of Red Hat = * + * Copyright 2006, Red Hat Middleware, LLC, and individual = * + * contributors as indicated by the @authors tag. See the = * + * copyright.txt in the distribution for a full listing of = * + * individual contributors. = * + * = * + * This is free software; you can redistribute it and/or modify it = * + * under the terms of the GNU Lesser General Public License as = * + * published by the Free Software Foundation; either version 2.1 of = * + * the License, or (at your option) any later version. = * + * = * + * This software is distributed in the hope that it will be useful, = * + * but WITHOUT ANY WARRANTY; without even the implied warranty of = * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU = * + * Lesser General Public License for more details. = * + * = * + * You should have received a copy of the GNU Lesser General Public = * + * License along with this software; if not, write to the Free = * + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA = * + * 02110-1301 USA, or see the FSF site: http://www.fsf.org. = * + *************************************************************************= *****/ +package org.jboss.unit.spi.pojo; + +import java.util.List; + +/** + * An object describing a parameter. + * + * @author Julien Viet + * @version $Revision: 1.1 $ + */ +public interface ParameterDescriptor +{ + + String getName(); + + String getDescription(); + + List getDefaultValues(); +} Copied: modules/test/trunk/unit/src/main/org/jboss/unit/spi/pojo/PropertyTe= stParameter.java (from rev 8535, modules/test/trunk/unit/src/main/org/jboss= /unit/api/pojo/PropertyTestParameter.java) =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/spi/pojo/PropertyTestPa= rameter.java (rev 0) +++ modules/test/trunk/unit/src/main/org/jboss/unit/spi/pojo/PropertyTestPa= rameter.java 2007-10-04 22:40:54 UTC (rev 8536) @@ -0,0 +1,48 @@ +/*************************************************************************= ***** + * JBoss, a division of Red Hat = * + * Copyright 2006, Red Hat Middleware, LLC, and individual = * + * contributors as indicated by the @authors tag. See the = * + * copyright.txt in the distribution for a full listing of = * + * individual contributors. = * + * = * + * This is free software; you can redistribute it and/or modify it = * + * under the terms of the GNU Lesser General Public License as = * + * published by the Free Software Foundation; either version 2.1 of = * + * the License, or (at your option) any later version. = * + * = * + * This software is distributed in the hope that it will be useful, = * + * but WITHOUT ANY WARRANTY; without even the implied warranty of = * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU = * + * Lesser General Public License for more details. = * + * = * + * You should have received a copy of the GNU Lesser General Public = * + * License along with this software; if not, write to the Free = * + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA = * + * 02110-1301 USA, or see the FSF site: http://www.fsf.org. = * + *************************************************************************= *****/ +package org.jboss.unit.spi.pojo; + +import java.lang.reflect.Method; +import java.util.List; +import java.util.ArrayList; + +/** + * @author Julien Viet + * @version $Revision: 1.1 $ + */ +class PropertyTestParameter extends TestParameter +{ + + /** . */ + final List setters =3D new ArrayList(); + + public PropertyTestParameter(String name, String description) + { + super(name, description); + } + + void addSetter(Method setter) + { + setters.add(setter); + } +} Copied: modules/test/trunk/unit/src/main/org/jboss/unit/spi/pojo/TestCase.j= ava (from rev 8535, modules/test/trunk/unit/src/main/org/jboss/unit/api/poj= o/TestCase.java) =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/spi/pojo/TestCase.java = (rev 0) +++ modules/test/trunk/unit/src/main/org/jboss/unit/spi/pojo/TestCase.java = 2007-10-04 22:40:54 UTC (rev 8536) @@ -0,0 +1,32 @@ +/*************************************************************************= ***** + * JBoss, a division of Red Hat = * + * Copyright 2006, Red Hat Middleware, LLC, and individual = * + * contributors as indicated by the @authors tag. See the = * + * copyright.txt in the distribution for a full listing of = * + * individual contributors. = * + * = * + * This is free software; you can redistribute it and/or modify it = * + * under the terms of the GNU Lesser General Public License as = * + * published by the Free Software Foundation; either version 2.1 of = * + * the License, or (at your option) any later version. = * + * = * + * This software is distributed in the hope that it will be useful, = * + * but WITHOUT ANY WARRANTY; without even the implied warranty of = * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU = * + * Lesser General Public License for more details. = * + * = * + * You should have received a copy of the GNU Lesser General Public = * + * License along with this software; if not, write to the Free = * + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA = * + * 02110-1301 USA, or see the FSF site: http://www.fsf.org. = * + *************************************************************************= *****/ +package org.jboss.unit.spi.pojo; + +/** + * @author Julien Viet + * @version $Revision: 1.1 $ + */ +public interface TestCase +{ + Object getPOJO(); +} Copied: modules/test/trunk/unit/src/main/org/jboss/unit/spi/pojo/TestCaseDe= f.java (from rev 8535, modules/test/trunk/unit/src/main/org/jboss/unit/api/= pojo/TestCaseDef.java) =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/spi/pojo/TestCaseDef.ja= va (rev 0) +++ modules/test/trunk/unit/src/main/org/jboss/unit/spi/pojo/TestCaseDef.ja= va 2007-10-04 22:40:54 UTC (rev 8536) @@ -0,0 +1,94 @@ +/*************************************************************************= ***** + * JBoss, a division of Red Hat = * + * Copyright 2006, Red Hat Middleware, LLC, and individual = * + * contributors as indicated by the @authors tag. See the = * + * copyright.txt in the distribution for a full listing of = * + * individual contributors. = * + * = * + * This is free software; you can redistribute it and/or modify it = * + * under the terms of the GNU Lesser General Public License as = * + * published by the Free Software Foundation; either version 2.1 of = * + * the License, or (at your option) any later version. = * + * = * + * This software is distributed in the hope that it will be useful, = * + * but WITHOUT ANY WARRANTY; without even the implied warranty of = * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU = * + * Lesser General Public License for more details. = * + * = * + * You should have received a copy of the GNU Lesser General Public = * + * License along with this software; if not, write to the Free = * + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA = * + * 02110-1301 USA, or see the FSF site: http://www.fsf.org. = * + *************************************************************************= *****/ +package org.jboss.unit.spi.pojo; + +import java.lang.reflect.Method; +import java.util.LinkedHashMap; +import java.util.Set; +import java.util.Map; +import java.util.Collections; + +/** + * @author Julien Viet + * @version $Revision: 1.1 $ + */ +class TestCaseDef implements TestCaseDescriptor +{ + + /** . */ + TestHandlerSupport driver; + + /** . */ + final Method method; + + /** . */ + final String name; + + /** . */ + final String description; + + /** . */ + final LinkedHashMap arguments; + + /** . */ + final Map parameters; + + /** . */ + final Set keywords; + + TestCaseDef( + Method method, + String name, + String description, + Map parameters, + LinkedHashMap arguments, + Set keywords) + { + this.method =3D method; + this.name =3D name; + this.description =3D description; + this.arguments =3D arguments; + this.parameters =3D parameters; + this.keywords =3D keywords; + } + + public String getName() + { + return name; + } + + public String getDescription() + { + return description; + } + + public Map getParameters() + { + return Collections.unmodifiableMap(parameters); + } + + public Set getKeywords() + { + return Collections.unmodifiableSet(keywords); + } +} Copied: modules/test/trunk/unit/src/main/org/jboss/unit/spi/pojo/TestCaseDe= scriptor.java (from rev 8535, modules/test/trunk/unit/src/main/org/jboss/un= it/api/pojo/TestCaseDescriptor.java) =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/spi/pojo/TestCaseDescri= ptor.java (rev 0) +++ modules/test/trunk/unit/src/main/org/jboss/unit/spi/pojo/TestCaseDescri= ptor.java 2007-10-04 22:40:54 UTC (rev 8536) @@ -0,0 +1,42 @@ +/*************************************************************************= ***** + * JBoss, a division of Red Hat = * + * Copyright 2006, Red Hat Middleware, LLC, and individual = * + * contributors as indicated by the @authors tag. See the = * + * copyright.txt in the distribution for a full listing of = * + * individual contributors. = * + * = * + * This is free software; you can redistribute it and/or modify it = * + * under the terms of the GNU Lesser General Public License as = * + * published by the Free Software Foundation; either version 2.1 of = * + * the License, or (at your option) any later version. = * + * = * + * This software is distributed in the hope that it will be useful, = * + * but WITHOUT ANY WARRANTY; without even the implied warranty of = * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU = * + * Lesser General Public License for more details. = * + * = * + * You should have received a copy of the GNU Lesser General Public = * + * License along with this software; if not, write to the Free = * + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA = * + * 02110-1301 USA, or see the FSF site: http://www.fsf.org. = * + *************************************************************************= *****/ +package org.jboss.unit.spi.pojo; + +import java.util.Map; +import java.util.Set; + +/** + * @author Julien Viet + * @version $Revision: 1.1 $ + */ +public interface TestCaseDescriptor +{ + + String getName(); + + String getDescription(); + + Map getParameters(); + + Set getKeywords(); +} Copied: modules/test/trunk/unit/src/main/org/jboss/unit/spi/pojo/TestCaseIm= pl.java (from rev 8535, modules/test/trunk/unit/src/main/org/jboss/unit/api= /pojo/TestCaseImpl.java) =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/spi/pojo/TestCaseImpl.j= ava (rev 0) +++ modules/test/trunk/unit/src/main/org/jboss/unit/spi/pojo/TestCaseImpl.j= ava 2007-10-04 22:40:54 UTC (rev 8536) @@ -0,0 +1,52 @@ +/*************************************************************************= ***** + * JBoss, a division of Red Hat = * + * Copyright 2006, Red Hat Middleware, LLC, and individual = * + * contributors as indicated by the @authors tag. See the = * + * copyright.txt in the distribution for a full listing of = * + * individual contributors. = * + * = * + * This is free software; you can redistribute it and/or modify it = * + * under the terms of the GNU Lesser General Public License as = * + * published by the Free Software Foundation; either version 2.1 of = * + * the License, or (at your option) any later version. = * + * = * + * This software is distributed in the hope that it will be useful, = * + * but WITHOUT ANY WARRANTY; without even the implied warranty of = * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU = * + * Lesser General Public License for more details. = * + * = * + * You should have received a copy of the GNU Lesser General Public = * + * License along with this software; if not, write to the Free = * + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA = * + * 02110-1301 USA, or see the FSF site: http://www.fsf.org. = * + *************************************************************************= *****/ +package org.jboss.unit.spi.pojo; + +import java.util.Map; + +/** + * @author Julien Viet + * @version $Revision: 1.1 $ + */ +class TestCaseImpl implements TestCase +{ + + final TestCaseDef def; + + /** . */ + final Object pojo; + + /** . */ + Map parametrization; + + public TestCaseImpl(TestCaseDef def, Object pojo) + { + this.def =3D def; + this.pojo =3D pojo; + } + + public Object getPOJO() + { + return pojo; + } +} Copied: modules/test/trunk/unit/src/main/org/jboss/unit/spi/pojo/TestCaseLi= feCycleException.java (from rev 8535, modules/test/trunk/unit/src/main/org/= jboss/unit/api/pojo/TestCaseLifeCycleException.java) =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/spi/pojo/TestCaseLifeCy= cleException.java (rev 0) +++ modules/test/trunk/unit/src/main/org/jboss/unit/spi/pojo/TestCaseLifeCy= cleException.java 2007-10-04 22:40:54 UTC (rev 8536) @@ -0,0 +1,49 @@ +/*************************************************************************= ***** + * JBoss, a division of Red Hat = * + * Copyright 2006, Red Hat Middleware, LLC, and individual = * + * contributors as indicated by the @authors tag. See the = * + * copyright.txt in the distribution for a full listing of = * + * individual contributors. = * + * = * + * This is free software; you can redistribute it and/or modify it = * + * under the terms of the GNU Lesser General Public License as = * + * published by the Free Software Foundation; either version 2.1 of = * + * the License, or (at your option) any later version. = * + * = * + * This software is distributed in the hope that it will be useful, = * + * but WITHOUT ANY WARRANTY; without even the implied warranty of = * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU = * + * Lesser General Public License for more details. = * + * = * + * You should have received a copy of the GNU Lesser General Public = * + * License along with this software; if not, write to the Free = * + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA = * + * 02110-1301 USA, or see the FSF site: http://www.fsf.org. = * + *************************************************************************= *****/ +package org.jboss.unit.spi.pojo; + +/** + * @author Julien Viet + * @version $Revision: 1.1 $ + */ +public class TestCaseLifeCycleException extends Exception +{ + public TestCaseLifeCycleException() + { + } + + public TestCaseLifeCycleException(String string) + { + super(string); + } + + public TestCaseLifeCycleException(String string, Throwable throwable) + { + super(string, throwable); + } + + public TestCaseLifeCycleException(Throwable throwable) + { + super(throwable); + } +} Copied: modules/test/trunk/unit/src/main/org/jboss/unit/spi/pojo/TestHandle= r.java (from rev 8535, modules/test/trunk/unit/src/main/org/jboss/unit/api/= pojo/TestHandler.java) =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/spi/pojo/TestHandler.ja= va (rev 0) +++ modules/test/trunk/unit/src/main/org/jboss/unit/spi/pojo/TestHandler.ja= va 2007-10-04 22:40:54 UTC (rev 8536) @@ -0,0 +1,38 @@ +/*************************************************************************= ***** + * JBoss, a division of Red Hat = * + * Copyright 2006, Red Hat Middleware, LLC, and individual = * + * contributors as indicated by the @authors tag. See the = * + * copyright.txt in the distribution for a full listing of = * + * individual contributors. = * + * = * + * This is free software; you can redistribute it and/or modify it = * + * under the terms of the GNU Lesser General Public License as = * + * published by the Free Software Foundation; either version 2.1 of = * + * the License, or (at your option) any later version. = * + * = * + * This software is distributed in the hope that it will be useful, = * + * but WITHOUT ANY WARRANTY; without even the implied warranty of = * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU = * + * Lesser General Public License for more details. = * + * = * + * You should have received a copy of the GNU Lesser General Public = * + * License along with this software; if not, write to the Free = * + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA = * + * 02110-1301 USA, or see the FSF site: http://www.fsf.org. = * + *************************************************************************= *****/ +package org.jboss.unit.spi.pojo; + +/** + * Allow a pojo class to take care of providing its description and perfor= m test case life cycle management. + * + * @author Julien Viet + * @version $Revision: 1.1 $ + */ +public interface TestHandler +{ + + TestSuiteDescriptor getDescriptor(); + + TestLifeCycle getLifeCycle(); + +} Copied: modules/test/trunk/unit/src/main/org/jboss/unit/spi/pojo/TestHandle= rSupport.java (from rev 8535, modules/test/trunk/unit/src/main/org/jboss/un= it/api/pojo/TestHandlerSupport.java) =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/spi/pojo/TestHandlerSup= port.java (rev 0) +++ modules/test/trunk/unit/src/main/org/jboss/unit/spi/pojo/TestHandlerSup= port.java 2007-10-04 22:40:54 UTC (rev 8536) @@ -0,0 +1,597 @@ +/*************************************************************************= ***** + * JBoss, a division of Red Hat = * + * Copyright 2006, Red Hat Middleware, LLC, and individual = * + * contributors as indicated by the @authors tag. See the = * + * copyright.txt in the distribution for a full listing of = * + * individual contributors. = * + * = * + * This is free software; you can redistribute it and/or modify it = * + * under the terms of the GNU Lesser General Public License as = * + * published by the Free Software Foundation; either version 2.1 of = * + * the License, or (at your option) any later version. = * + * = * + * This software is distributed in the hope that it will be useful, = * + * but WITHOUT ANY WARRANTY; without even the implied warranty of = * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU = * + * Lesser General Public License for more details. = * + * = * + * You should have received a copy of the GNU Lesser General Public = * + * License along with this software; if not, write to the Free = * + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA = * + * 02110-1301 USA, or see the FSF site: http://www.fsf.org. = * + *************************************************************************= *****/ +package org.jboss.unit.spi.pojo; + +import org.jboss.unit.api.pojo.annotations.Test; +import org.jboss.unit.api.pojo.annotations.Parameter; +import org.jboss.unit.api.pojo.annotations.Create; +import org.jboss.unit.api.pojo.annotations.Destroy; +import org.jboss.unit.api.pojo.annotations.Description; +import org.jboss.unit.api.pojo.annotations.Tag; +import org.jboss.unit.util.CollectionTools; + +import java.util.SortedMap; +import java.util.TreeMap; +import java.util.Map; +import java.util.HashMap; +import java.util.LinkedHashMap; +import java.util.ArrayList; +import java.util.List; +import java.util.Set; +import java.util.HashSet; +import java.util.Collections; +import java.lang.reflect.Modifier; +import java.lang.reflect.Constructor; +import java.lang.reflect.AnnotatedElement; +import java.lang.reflect.Method; +import java.lang.reflect.InvocationTargetException; +import java.lang.annotation.Annotation; +import java.beans.Introspector; + +/** + * Provide a default implementation that relies on the annotation defined = in the annotations package. + * + * @author Julien Viet + * @version $Revision: 1.1 $ + */ +public class TestHandlerSupport implements TestHandler, TestLifeCycle, Tes= tSuiteDescriptor +{ + + /** . */ + private final String suiteName; + + /** . */ + private final String suiteDescription; + + /** . */ + private final Map testCases; + + /** . */ + private final Method create; + + /** . */ + private final Method destroy; + + /** . */ + final Map suiteParameters; + + /** . */ + private final Constructor ctor; + + /** . */ + private final Set suiteKeywords; + + public TestHandlerSupport(Class testClass) + { + if (testClass =3D=3D null) + { + throw new IllegalArgumentException(); + } + + // + if (Modifier.isAbstract(testClass.getModifiers())) + { + throw new IllegalArgumentException("Test class is abstract"); + } + + // Check constructor + Constructor ctor; + try + { + ctor =3D testClass.getConstructor(); + } + catch (NoSuchMethodException e) + { + throw new IllegalArgumentException(e); + } + + // + Test testAnnotation =3D ((AnnotatedElement)testClass).getAnnotation(= Test.class); + String suiteName =3D testAnnotation !=3D null ? testAnnotation.name(= ) : ""; + if (suiteName.length() =3D=3D 0) + { + suiteName =3D testClass.getName(); + } + + // + Description descriptionAnnotation =3D ((AnnotatedElement)testClass).= getAnnotation(Description.class); + String suiteDescription =3D descriptionAnnotation !=3D null ? descri= ptionAnnotation.description() : ""; + if (suiteDescription.length() =3D=3D 0) + { + suiteDescription =3D "Test of class " + testClass.getName(); + } + + Tag tag =3D ((AnnotatedElement)testClass).getAnnotation(Tag.class); + Set suiteKeywords =3D new HashSet(); + if (tag !=3D null) + { + suiteKeywords.addAll(CollectionTools.set(tag.value())); + } + + // + SortedMap methods =3D new TreeMap(); + for (Method method : testClass.getMethods()) + { + MethodKey key =3D new MethodKey(method); + methods.put(key, method); + } + + // + Map suiteParameters =3D new HashMap(); + Map testCases =3D new HashMap(); + Method create =3D null; + Method destroy =3D null; + + // First pass for parameters and life cycle annotations + for (Method method : methods.values()) + { + String methodName =3D method.getName(); + int modifiers =3D method.getModifiers(); + Parameter parameterMethodAnnotation =3D method.getAnnotation(Para= meter.class); + Test testMethodAnnotation =3D method.getAnnotation(Test.class); + Create createMethodAnnotation =3D method.getAnnotation(Create.cla= ss); + Destroy destroyMethodAnnotation =3D method.getAnnotation(Destroy.= class); + + // + if (testMethodAnnotation !=3D null && parameterMethodAnnotation != =3D null) + { + throw new IllegalArgumentException(); + } + + // + if (createMethodAnnotation !=3D null && parameterMethodAnnotation= !=3D null) + { + throw new IllegalArgumentException(); + } + if (createMethodAnnotation !=3D null && testMethodAnnotation !=3D= null) + { + throw new IllegalArgumentException(); + } + + // + if (destroyMethodAnnotation !=3D null && parameterMethodAnnotatio= n !=3D null) + { + throw new IllegalArgumentException(); + } + if (destroyMethodAnnotation !=3D null && testMethodAnnotation != =3D null) + { + throw new IllegalArgumentException(); + } + if (destroyMethodAnnotation !=3D null && createMethodAnnotation != =3D null) + { + throw new IllegalArgumentException(); + } + + // + if (parameterMethodAnnotation !=3D null) + { + if (!methodName.startsWith("set")) + { + throw new IllegalArgumentException(); + } + if (methodName.length() < 4) + { + throw new IllegalArgumentException(); + } + if (method.getParameterTypes().length !=3D 1) + { + throw new IllegalArgumentException(); + } + if (method.getReturnType() !=3D void.class) + { + throw new IllegalArgumentException(); + } + if (Modifier.isAbstract(modifiers)) + { + throw new IllegalArgumentException(); + } + if (!Modifier.isPublic(modifiers)) + { + throw new IllegalArgumentException(); + } + if (Modifier.isStatic(modifiers)) + { + throw new IllegalArgumentException(); + } + + // + String name =3D parameterMethodAnnotation.name(); + if (name.length() =3D=3D 0) + { + name =3D Introspector.decapitalize(method.getName().substri= ng(3)); + } + + // + Description descriptionMethodAnnotation =3D method.getAnnotati= on(Description.class); + String description =3D descriptionMethodAnnotation !=3D null ?= descriptionMethodAnnotation.description() : ""; + if (description.length() =3D=3D 0) + { + description =3D "Parameter " + name; + } + + // + PropertyTestParameter parameter =3D suiteParameters.get(name); + if (parameter =3D=3D null) + { + parameter =3D new PropertyTestParameter(name, description); + suiteParameters.put(name, parameter); + } + + // + parameter.addSetter(method); + } + else if (createMethodAnnotation !=3D null) + { + if (create !=3D null) + { + throw new IllegalArgumentException(); + } + if (method.getReturnType() !=3D void.class) + { + throw new IllegalArgumentException(); + } + if (Modifier.isAbstract(modifiers)) + { + throw new IllegalArgumentException(); + } + if (!Modifier.isPublic(modifiers)) + { + throw new IllegalArgumentException(); + } + if (Modifier.isStatic(modifiers)) + { + throw new IllegalArgumentException(); + } + if (method.getParameterTypes().length > 0) + { + throw new IllegalArgumentException(); + } + + // + create =3D method; + } + else if (destroyMethodAnnotation !=3D null) + { + if (destroy !=3D null) + { + throw new IllegalArgumentException(); + } + if (method.getReturnType() !=3D void.class) + { + throw new IllegalArgumentException(); + } + if (Modifier.isAbstract(modifiers)) + { + throw new IllegalArgumentException(); + } + if (!Modifier.isPublic(modifiers)) + { + throw new IllegalArgumentException(); + } + if (Modifier.isStatic(modifiers)) + { + throw new IllegalArgumentException(); + } + if (method.getParameterTypes().length > 0) + { + throw new IllegalArgumentException(); + } + + // + destroy =3D method; + } + } + + // Second pass for test annotations + for (Method method : methods.values()) + { + int modifiers =3D method.getModifiers(); + Test testMethodAnnotation =3D method.getAnnotation(Test.class); + + // + if (testMethodAnnotation !=3D null) + { + if (method.getReturnType() !=3D void.class) + { + throw new IllegalArgumentException(); + } + if (Modifier.isAbstract(modifiers)) + { + throw new IllegalArgumentException(); + } + if (!Modifier.isPublic(modifiers)) + { + throw new IllegalArgumentException(); + } + if (Modifier.isStatic(modifiers)) + { + throw new IllegalArgumentException(); + } + + // + LinkedHashMap methodParameters = =3D new LinkedHashMap(); + for (Annotation[] parameterAnnotations : method.getParameterAn= notations()) + { + Map,Annotation> parameterAnnota= tionMap =3D new HashMap, Annotation>(); + for (Annotation parameterAnnotation : parameterAnnotations) + { + Class blah =3D parameterAnnotation= .annotationType(); + parameterAnnotationMap.put(blah, parameterAnnotation); + } + + // + Parameter argumentParameterAnnotation =3D (Parameter)parame= terAnnotationMap.get(Parameter.class); + + // + if (argumentParameterAnnotation !=3D null) + { + // + String name =3D argumentParameterAnnotation.name(); + if (name.length() =3D=3D 0) + { + throw new IllegalArgumentException(); + } + if (methodParameters.containsKey(name)) + { + throw new IllegalArgumentException(); + } + + // + Description descriptionArgumentParameterAnnotation =3D (= Description)parameterAnnotationMap.get(Description.class); + String description =3D descriptionArgumentParameterAnnot= ation !=3D null ? descriptionArgumentParameterAnnotation.description() : ""; + if (description.length() =3D=3D 0) + { + description =3D "Method parameter " + name; + } + + // + methodParameters.put(name, new ArgumentTestParameter(nam= e, description)); + } + else + { + throw new IllegalArgumentException(); + } + } + + // + String name =3D testMethodAnnotation.name(); + if (testMethodAnnotation.name().length() =3D=3D 0) + { + name =3D method.getName(); + } + + // + Description descriptionMethodAnnotation =3D method.getAnnotati= on(Description.class); + String description =3D descriptionMethodAnnotation !=3D null ?= descriptionMethodAnnotation.description() : ""; + if (description.length() =3D=3D 0) + { + description =3D "Test of method " + method.getName(); + } + + // + Set keywords =3D new HashSet(); + Tag tagMethodAnnotation =3D method.getAnnotation(Tag.class); + if (tagMethodAnnotation !=3D null) + { + keywords.addAll(CollectionTools.set(tagMethodAnnotation.val= ue())); + } + + Map parameters =3D new HashMap(suiteParameters); + parameters.putAll(methodParameters); + + // + TestCaseDef testCaseDef =3D new TestCaseDef(method, name, desc= ription, parameters, methodParameters, keywords); + + // + if (testCases.put(testCaseDef.getName(), testCaseDef) !=3D nul= l) + { + throw new IllegalArgumentException(); + } + } + } + + // + this.suiteName =3D suiteName; + this.suiteDescription =3D suiteDescription; + this.suiteKeywords =3D suiteKeywords; + this.suiteParameters =3D suiteParameters; + this.testCases =3D testCases; + this.ctor =3D ctor; + this.create =3D create; + this.destroy =3D destroy; + } + + public TestSuiteDescriptor getDescriptor() + { + return this; + } + + public TestLifeCycle getLifeCycle() + { + return this; + } + + public String getName() + { + return suiteName; + } + + public String getDescription() + { + return suiteDescription; + } + + public Set getKeywords() + { + return suiteKeywords; + } + + public Map getParameters() + { + return Collections.unmodifiableMap(suiteParameters); + } + + public Map getTestCases() + { + return Collections.unmodifiableMap(testCases); + } + + public TestCase newTestCase(String name) throws TestCaseLifeCycleExcept= ion + { + TestCaseDef testCaseDef =3D testCases.get(name); + + // + if (testCaseDef =3D=3D null) + { + throw new TestCaseLifeCycleException("No such test case <" + name= + ">"); + } + + // + Object instance; + try + { + instance =3D ctor.newInstance(); + } + catch (InvocationTargetException e) + { + throw new TestCaseLifeCycleException("Cannot create test case " += name, e.getCause()); + } + catch (Exception e) + { + throw new TestCaseLifeCycleException("Cannot configure parameter = " + name, e); + } + + // + return new TestCaseImpl(testCaseDef, instance); + } + + public void testCaseParametrize(TestCase _testCase, Map = parametrization) throws TestCaseLifeCycleException + { + TestCaseImpl testCase =3D (TestCaseImpl)_testCase; + + // Save parametrization + testCase.parametrization =3D parametrization; + + // + for (PropertyTestParameter parameter : suiteParameters.values()) + { + if (!parametrization.containsKey(parameter.getName())) + { + throw new TestCaseLifeCycleException("Missing parameter " + pa= rameter.getName()); + } + String parameterValue =3D parametrization.get(parameter.getName()= ); + for (Method setter : parameter.setters) + { + try + { + setter.invoke(testCase.pojo, parameterValue); + } + catch (InvocationTargetException e) + { + throw new TestCaseLifeCycleException("Cannot configure para= meter " + parameter.getName(), e.getCause()); + } + catch (Exception e) + { + throw new TestCaseLifeCycleException("Cannot configure para= meter " + parameter.getName(), e); + } + } + } + } + + public void testCaseCreate(TestCase _testCase) throws TestCaseLifeCycle= Exception + { + TestCaseImpl testCase =3D (TestCaseImpl)_testCase; + + // + if (create !=3D null) + { + try + { + create.invoke(testCase.getPOJO()); + } + catch (InvocationTargetException e) + { + throw new TestCaseLifeCycleException("Cannot create test case"= , e.getCause()); + } + catch (Exception e) + { + throw new TestCaseLifeCycleException("Cannot create test case"= , e); + } + } + } + + public void testCaseInvoke(TestCase _testCase) throws TestCaseLifeCycle= Exception + { + TestCaseImpl testCase =3D (TestCaseImpl)_testCase; + + List argList =3D new ArrayList(); + for (String parameterName : testCase.def.arguments.keySet()) + { + if (!testCase.parametrization.containsKey(parameterName)) + { + throw new TestCaseLifeCycleException("Missing parameter " + pa= rameterName); + } + String parameterValue =3D testCase.parametrization.get(parameterN= ame); + if (parameterValue =3D=3D null) + { + throw new IllegalArgumentException(); + } + + // + argList.add(parameterValue); + } + Object[] args =3D argList.toArray(); + + try + { + testCase.def.method.invoke(testCase.pojo, args); + } + catch (InvocationTargetException e) + { + throw new TestCaseLifeCycleException("Cannot invoke test case", e= .getCause()); + } + catch (Exception e) + { + throw new TestCaseLifeCycleException("Cannot invoke test case", e= ); + } + } + + public void testCaseDestroy(TestCase _testCase) + { + TestCaseImpl testCase =3D (TestCaseImpl)_testCase; + + // + if (destroy !=3D null) + { + try + { + destroy.invoke(testCase.getPOJO()); + } + catch (Throwable t) + { + // Log this as a warn + // t.printStackTrace(); + } + } + } +} Copied: modules/test/trunk/unit/src/main/org/jboss/unit/spi/pojo/TestLifeCy= cle.java (from rev 8535, modules/test/trunk/unit/src/main/org/jboss/unit/ap= i/pojo/TestLifeCycle.java) =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/spi/pojo/TestLifeCycle.= java (rev 0) +++ modules/test/trunk/unit/src/main/org/jboss/unit/spi/pojo/TestLifeCycle.= java 2007-10-04 22:40:54 UTC (rev 8536) @@ -0,0 +1,75 @@ +/*************************************************************************= ***** + * JBoss, a division of Red Hat = * + * Copyright 2006, Red Hat Middleware, LLC, and individual = * + * contributors as indicated by the @authors tag. See the = * + * copyright.txt in the distribution for a full listing of = * + * individual contributors. = * + * = * + * This is free software; you can redistribute it and/or modify it = * + * under the terms of the GNU Lesser General Public License as = * + * published by the Free Software Foundation; either version 2.1 of = * + * the License, or (at your option) any later version. = * + * = * + * This software is distributed in the hope that it will be useful, = * + * but WITHOUT ANY WARRANTY; without even the implied warranty of = * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU = * + * Lesser General Public License for more details. = * + * = * + * You should have received a copy of the GNU Lesser General Public = * + * License along with this software; if not, write to the Free = * + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA = * + * 02110-1301 USA, or see the FSF site: http://www.fsf.org. = * + *************************************************************************= *****/ +package org.jboss.unit.spi.pojo; + +import java.util.Map; + +/** + * @author Julien Viet + * @version $Revision: 1.1 $ + */ +public interface TestLifeCycle +{ + + /** + * Instantiate life cycle operation of a test case. + * + * @param name the test case name + * @return the test case object + * @throws TestCaseLifeCycleException + */ + TestCase newTestCase(String name) throws TestCaseLifeCycleException; + + /** + * Parametrize life cycle operation of a test case. + * + * @param testCase the test case + * @param parametrization the parametrization + * @throws TestCaseLifeCycleException + */ + void testCaseParametrize(TestCase testCase, Map parametr= ization) throws TestCaseLifeCycleException; + + /** + * Create life cycle operation of a test case. + * + * @param testCase the test case + * @throws TestCaseLifeCycleException + */ + void testCaseCreate(TestCase testCase) throws TestCaseLifeCycleExceptio= n; + + /** + * Invocation life cycle operation of a test case. + * + * @param testCase the test case + * @throws TestCaseLifeCycleException + */ + void testCaseInvoke(TestCase testCase) throws TestCaseLifeCycleExceptio= n; + + /** + * Destroy life cycle operation of a test case. + * + * @param testCase the test case + */ + void testCaseDestroy(TestCase testCase); + +} Copied: modules/test/trunk/unit/src/main/org/jboss/unit/spi/pojo/TestParame= ter.java (from rev 8535, modules/test/trunk/unit/src/main/org/jboss/unit/ap= i/pojo/TestParameter.java) =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/spi/pojo/TestParameter.= java (rev 0) +++ modules/test/trunk/unit/src/main/org/jboss/unit/spi/pojo/TestParameter.= java 2007-10-04 22:40:54 UTC (rev 8536) @@ -0,0 +1,61 @@ +/*************************************************************************= ***** + * JBoss, a division of Red Hat = * + * Copyright 2006, Red Hat Middleware, LLC, and individual = * + * contributors as indicated by the @authors tag. See the = * + * copyright.txt in the distribution for a full listing of = * + * individual contributors. = * + * = * + * This is free software; you can redistribute it and/or modify it = * + * under the terms of the GNU Lesser General Public License as = * + * published by the Free Software Foundation; either version 2.1 of = * + * the License, or (at your option) any later version. = * + * = * + * This software is distributed in the hope that it will be useful, = * + * but WITHOUT ANY WARRANTY; without even the implied warranty of = * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU = * + * Lesser General Public License for more details. = * + * = * + * You should have received a copy of the GNU Lesser General Public = * + * License along with this software; if not, write to the Free = * + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA = * + * 02110-1301 USA, or see the FSF site: http://www.fsf.org. = * + *************************************************************************= *****/ +package org.jboss.unit.spi.pojo; + +import java.util.List; +import java.util.Collections; + +/** + * @author Julien Viet + * @version $Revision: 1.1 $ + */ +class TestParameter implements ParameterDescriptor +{ + + /** . */ + private final String name; + + /** . */ + private final String description; + + public TestParameter(String name, String description) + { + this.name =3D name; + this.description =3D description; + } + + public String getName() + { + return name; + } + + public String getDescription() + { + return description; + } + + public List getDefaultValues() + { + return Collections.emptyList(); + } +} Copied: modules/test/trunk/unit/src/main/org/jboss/unit/spi/pojo/TestSuiteD= escriptor.java (from rev 8535, modules/test/trunk/unit/src/main/org/jboss/u= nit/api/pojo/TestSuiteDescriptor.java) =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/spi/pojo/TestSuiteDescr= iptor.java (rev 0) +++ modules/test/trunk/unit/src/main/org/jboss/unit/spi/pojo/TestSuiteDescr= iptor.java 2007-10-04 22:40:54 UTC (rev 8536) @@ -0,0 +1,70 @@ +/*************************************************************************= ***** + * JBoss, a division of Red Hat = * + * Copyright 2006, Red Hat Middleware, LLC, and individual = * + * contributors as indicated by the @authors tag. See the = * + * copyright.txt in the distribution for a full listing of = * + * individual contributors. = * + * = * + * This is free software; you can redistribute it and/or modify it = * + * under the terms of the GNU Lesser General Public License as = * + * published by the Free Software Foundation; either version 2.1 of = * + * the License, or (at your option) any later version. = * + * = * + * This software is distributed in the hope that it will be useful, = * + * but WITHOUT ANY WARRANTY; without even the implied warranty of = * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU = * + * Lesser General Public License for more details. = * + * = * + * You should have received a copy of the GNU Lesser General Public = * + * License along with this software; if not, write to the Free = * + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA = * + * 02110-1301 USA, or see the FSF site: http://www.fsf.org. = * + *************************************************************************= *****/ +package org.jboss.unit.spi.pojo; + +import java.util.Set; +import java.util.Map; + +/** + * @author Julien Viet + * @version $Revision: 1.1 $ + */ +public interface TestSuiteDescriptor +{ + + /** + * Return the test name. + * + * @return the test name + */ + String getName(); + + /** + * Return the test description. + * + * @return the test description + */ + String getDescription(); + + /** + * Returns the keywords for the test. + * + * @return the test keywords + */ + Set getKeywords(); + + /** + * Return the test parameters. + * + * @return the test parameters + */ + Map getParameters(); + + /** + * Return the test case descriptions. + * + * @return the test case descriptions + */ + Map getTestCases(); + +} Copied: modules/test/trunk/unit/src/main/org/jboss/unit/spi/pojo/annotation= s/Provider.java (from rev 8535, modules/test/trunk/unit/src/main/org/jboss/= unit/api/pojo/annotations/Provider.java) =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/spi/pojo/annotations/Pr= ovider.java (rev 0) +++ modules/test/trunk/unit/src/main/org/jboss/unit/spi/pojo/annotations/Pr= ovider.java 2007-10-04 22:40:54 UTC (rev 8536) @@ -0,0 +1,43 @@ +/*************************************************************************= ***** + * JBoss, a division of Red Hat = * + * Copyright 2006, Red Hat Middleware, LLC, and individual = * + * contributors as indicated by the @authors tag. See the = * + * copyright.txt in the distribution for a full listing of = * + * individual contributors. = * + * = * + * This is free software; you can redistribute it and/or modify it = * + * under the terms of the GNU Lesser General Public License as = * + * published by the Free Software Foundation; either version 2.1 of = * + * the License, or (at your option) any later version. = * + * = * + * This software is distributed in the hope that it will be useful, = * + * but WITHOUT ANY WARRANTY; without even the implied warranty of = * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU = * + * Lesser General Public License for more details. = * + * = * + * You should have received a copy of the GNU Lesser General Public = * + * License along with this software; if not, write to the Free = * + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA = * + * 02110-1301 USA, or see the FSF site: http://www.fsf.org. = * + *************************************************************************= *****/ +package org.jboss.unit.spi.pojo.annotations; + +import org.jboss.unit.spi.pojo.TestHandler; + +import java.lang.annotation.Inherited; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; +import java.lang.annotation.ElementType; + +/** + * @author Julien Viet + * @version $Revision: 1.1 $ + */ +(a)Inherited +(a)Retention(RetentionPolicy.RUNTIME) +(a)Target({ElementType.ANNOTATION_TYPE,ElementType.TYPE}) +public @interface Provider +{ + Class value(); +} Modified: modules/test/trunk/unit/src/main/org/jboss/unit/unit/pojo/POJOPar= ameterInfo.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/unit/pojo/POJOParameter= Info.java 2007-10-04 22:24:45 UTC (rev 8535) +++ modules/test/trunk/unit/src/main/org/jboss/unit/unit/pojo/POJOParameter= Info.java 2007-10-04 22:40:54 UTC (rev 8536) @@ -22,7 +22,7 @@ *************************************************************************= *****/ package org.jboss.unit.unit.pojo; = -import org.jboss.unit.api.pojo.ParameterDescriptor; +import org.jboss.unit.spi.pojo.ParameterDescriptor; import org.jboss.unit.info.ParameterInfo; = import java.util.List; Modified: modules/test/trunk/unit/src/main/org/jboss/unit/unit/pojo/POJOTes= tCaseInfo.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/unit/pojo/POJOTestCaseI= nfo.java 2007-10-04 22:24:45 UTC (rev 8535) +++ modules/test/trunk/unit/src/main/org/jboss/unit/unit/pojo/POJOTestCaseI= nfo.java 2007-10-04 22:40:54 UTC (rev 8536) @@ -22,7 +22,7 @@ *************************************************************************= *****/ package org.jboss.unit.unit.pojo; = -import org.jboss.unit.api.pojo.TestCaseDescriptor; +import org.jboss.unit.spi.pojo.TestCaseDescriptor; import org.jboss.unit.info.TestCaseInfo; = /** Modified: modules/test/trunk/unit/src/main/org/jboss/unit/unit/pojo/POJOTes= tInfo.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/unit/pojo/POJOTestInfo.= java 2007-10-04 22:24:45 UTC (rev 8535) +++ modules/test/trunk/unit/src/main/org/jboss/unit/unit/pojo/POJOTestInfo.= java 2007-10-04 22:40:54 UTC (rev 8536) @@ -24,11 +24,10 @@ = import org.jboss.unit.info.ParameterInfo; import org.jboss.unit.info.TestInfo; -import org.jboss.unit.api.pojo.ParameterDescriptor; +import org.jboss.unit.spi.pojo.ParameterDescriptor; = import java.util.Map; import java.util.Set; -import java.util.Collections; import java.util.HashMap; = /** Modified: modules/test/trunk/unit/src/main/org/jboss/unit/unit/pojo/POJOTes= tSuiteDriver.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/unit/pojo/POJOTestSuite= Driver.java 2007-10-04 22:24:45 UTC (rev 8535) +++ modules/test/trunk/unit/src/main/org/jboss/unit/unit/pojo/POJOTestSuite= Driver.java 2007-10-04 22:40:54 UTC (rev 8536) @@ -22,12 +22,12 @@ *************************************************************************= *****/ package org.jboss.unit.unit.pojo; = -import org.jboss.unit.api.pojo.TestHandler; -import org.jboss.unit.api.pojo.TestHandlerSupport; -import org.jboss.unit.api.pojo.TestCaseLifeCycleException; -import org.jboss.unit.api.pojo.TestLifeCycle; -import org.jboss.unit.api.pojo.TestCase; -import org.jboss.unit.api.pojo.annotations.Provider; +import org.jboss.unit.spi.pojo.TestHandler; +import org.jboss.unit.spi.pojo.TestHandlerSupport; +import org.jboss.unit.spi.pojo.TestCaseLifeCycleException; +import org.jboss.unit.spi.pojo.TestLifeCycle; +import org.jboss.unit.spi.pojo.TestCase; +import org.jboss.unit.spi.pojo.annotations.Provider; import org.jboss.unit.driver.TestDriver; import org.jboss.unit.driver.DriverResponse; import org.jboss.unit.driver.DriverCommand; Modified: modules/test/trunk/unit/src/main/org/jboss/unit/unit/pojo/POJOTes= tSuiteInfo.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/unit/pojo/POJOTestSuite= Info.java 2007-10-04 22:24:45 UTC (rev 8535) +++ modules/test/trunk/unit/src/main/org/jboss/unit/unit/pojo/POJOTestSuite= Info.java 2007-10-04 22:40:54 UTC (rev 8536) @@ -22,8 +22,8 @@ *************************************************************************= *****/ package org.jboss.unit.unit.pojo; = -import org.jboss.unit.api.pojo.TestCaseDescriptor; -import org.jboss.unit.api.pojo.TestSuiteDescriptor; +import org.jboss.unit.spi.pojo.TestCaseDescriptor; +import org.jboss.unit.spi.pojo.TestSuiteDescriptor; import org.jboss.unit.info.TestSuiteInfo; import org.jboss.unit.info.TestInfo; import org.jboss.unit.TestId; --===============6875764023169703284==-- From portal-commits at lists.jboss.org Thu Oct 4 18:41:52 2007 Content-Type: multipart/mixed; boundary="===============0714584885388875672==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8537 - in modules/test/trunk/unit/src/main/org/jboss: unit/api/pojo/junit and 3 other directories. Date: Thu, 04 Oct 2007 18:41:52 -0400 Message-ID: --===============0714584885388875672== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: julien(a)jboss.com Date: 2007-10-04 18:41:52 -0400 (Thu, 04 Oct 2007) New Revision: 8537 Added: modules/test/trunk/unit/src/main/org/jboss/unit/spi/pojo/TestProvider.ja= va modules/test/trunk/unit/src/main/org/jboss/unit/spi/pojo/TestProviderSup= port.java Removed: modules/test/trunk/unit/src/main/org/jboss/unit/spi/pojo/TestHandler.java modules/test/trunk/unit/src/main/org/jboss/unit/spi/pojo/TestHandlerSupp= ort.java Modified: modules/test/trunk/unit/src/main/org/jboss/test/unit/pojo/TestHandlerSup= portPOJOTest.java modules/test/trunk/unit/src/main/org/jboss/test/unit/pojo/TestHandlerSup= portPOJOTests.java modules/test/trunk/unit/src/main/org/jboss/unit/api/pojo/junit/JUnitProv= ider.java modules/test/trunk/unit/src/main/org/jboss/unit/spi/pojo/TestCaseDef.java modules/test/trunk/unit/src/main/org/jboss/unit/spi/pojo/annotations/Pro= vider.java modules/test/trunk/unit/src/main/org/jboss/unit/unit/pojo/POJOTestSuiteD= river.java Log: renamed TestHandler -> TestProvider Modified: modules/test/trunk/unit/src/main/org/jboss/test/unit/pojo/TestHan= dlerSupportPOJOTest.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/test/unit/pojo/TestHandlerSu= pportPOJOTest.java 2007-10-04 22:40:54 UTC (rev 8536) +++ modules/test/trunk/unit/src/main/org/jboss/test/unit/pojo/TestHandlerSu= pportPOJOTest.java 2007-10-04 22:41:52 UTC (rev 8537) @@ -22,7 +22,7 @@ *************************************************************************= *****/ package org.jboss.test.unit.pojo; = -import org.jboss.unit.spi.pojo.TestHandler; +import org.jboss.unit.spi.pojo.TestProvider; import org.jboss.unit.spi.pojo.TestCaseLifeCycleException; import org.jboss.unit.spi.pojo.TestCaseDescriptor; import org.jboss.unit.spi.pojo.TestCase; @@ -40,38 +40,38 @@ { = /** . */ - private TestHandler handler; + private TestProvider provider; = - public TestHandlerSupportPOJOTest(TestHandler handler) + public TestHandlerSupportPOJOTest(TestProvider provider) { - this.handler =3D handler; + this.provider =3D provider; } = public Set getParameterNames() { - return handler.getDescriptor().getParameters().keySet(); + return provider.getDescriptor().getParameters().keySet(); } = public Set getTestCaseNames() { - return handler.getDescriptor().getTestCases().keySet(); + return provider.getDescriptor().getTestCases().keySet(); } = public Set getKeywords() { - return handler.getDescriptor().getKeywords(); + return provider.getDescriptor().getKeywords(); } = public Set getTestCaseKeywords(String testCaseName) { - TestCaseDescriptor descriptor =3D handler.getDescriptor().getTestCas= es().get(testCaseName); + TestCaseDescriptor descriptor =3D provider.getDescriptor().getTestCa= ses().get(testCaseName); assertNotNull(descriptor); return descriptor.getKeywords(); } = public Set getTestCaseParameterNames(String testCaseName) { - TestCaseDescriptor descriptor =3D handler.getDescriptor().getTestCas= es().get(testCaseName); + TestCaseDescriptor descriptor =3D provider.getDescriptor().getTestCa= ses().get(testCaseName); assertNotNull(descriptor); return descriptor.getParameters().keySet(); } @@ -82,11 +82,11 @@ boolean invokeDestroy =3D false; try { - testCase =3D handler.getLifeCycle().newTestCase(testName); - handler.getLifeCycle().testCaseParametrize(testCase, parametrizat= ion); + testCase =3D provider.getLifeCycle().newTestCase(testName); + provider.getLifeCycle().testCaseParametrize(testCase, parametriza= tion); invokeDestroy =3D true; - handler.getLifeCycle().testCaseCreate(testCase); - handler.getLifeCycle().testCaseInvoke(testCase); + provider.getLifeCycle().testCaseCreate(testCase); + provider.getLifeCycle().testCaseInvoke(testCase); return InvokeResult.PASS; } catch (TestCaseLifeCycleException e) @@ -105,7 +105,7 @@ { if (invokeDestroy) { - handler.getLifeCycle().testCaseDestroy(testCase); + provider.getLifeCycle().testCaseDestroy(testCase); } } } Modified: modules/test/trunk/unit/src/main/org/jboss/test/unit/pojo/TestHan= dlerSupportPOJOTests.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/test/unit/pojo/TestHandlerSu= pportPOJOTests.java 2007-10-04 22:40:54 UTC (rev 8536) +++ modules/test/trunk/unit/src/main/org/jboss/test/unit/pojo/TestHandlerSu= pportPOJOTests.java 2007-10-04 22:41:52 UTC (rev 8537) @@ -22,7 +22,7 @@ *************************************************************************= *****/ package org.jboss.test.unit.pojo; = -import org.jboss.unit.spi.pojo.TestHandlerSupport; +import org.jboss.unit.spi.pojo.TestProviderSupport; import org.jboss.unit.api.Assert; = /** @@ -37,7 +37,7 @@ { try { - new TestHandlerSupport(clazz); + new TestProviderSupport(clazz); Assert.fail(); } catch (IllegalArgumentException expected) @@ -47,6 +47,6 @@ = protected AbstractPOJOTest assertCanBuildSuite(Class clazz) { - return new TestHandlerSupportPOJOTest(new TestHandlerSupport(clazz)); + return new TestHandlerSupportPOJOTest(new TestProviderSupport(clazz)= ); } } Modified: modules/test/trunk/unit/src/main/org/jboss/unit/api/pojo/junit/JU= nitProvider.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/api/pojo/junit/JUnitPro= vider.java 2007-10-04 22:40:54 UTC (rev 8536) +++ modules/test/trunk/unit/src/main/org/jboss/unit/api/pojo/junit/JUnitPro= vider.java 2007-10-04 22:41:52 UTC (rev 8537) @@ -22,7 +22,7 @@ *************************************************************************= *****/ package org.jboss.unit.api.pojo.junit; = -import org.jboss.unit.spi.pojo.TestHandler; +import org.jboss.unit.spi.pojo.TestProvider; import org.jboss.unit.spi.pojo.TestSuiteDescriptor; import org.jboss.unit.spi.pojo.TestLifeCycle; = @@ -32,7 +32,7 @@ * @author Julien Viet * @version $Revision: 1.1 $ */ -public class JUnitProvider implements TestHandler +public class JUnitProvider implements TestProvider { = /** . */ Modified: modules/test/trunk/unit/src/main/org/jboss/unit/spi/pojo/TestCase= Def.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/spi/pojo/TestCaseDef.ja= va 2007-10-04 22:40:54 UTC (rev 8536) +++ modules/test/trunk/unit/src/main/org/jboss/unit/spi/pojo/TestCaseDef.ja= va 2007-10-04 22:41:52 UTC (rev 8537) @@ -36,7 +36,7 @@ { = /** . */ - TestHandlerSupport driver; + TestProviderSupport driver; = /** . */ final Method method; Deleted: modules/test/trunk/unit/src/main/org/jboss/unit/spi/pojo/TestHandl= er.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/spi/pojo/TestHandler.ja= va 2007-10-04 22:40:54 UTC (rev 8536) +++ modules/test/trunk/unit/src/main/org/jboss/unit/spi/pojo/TestHandler.ja= va 2007-10-04 22:41:52 UTC (rev 8537) @@ -1,38 +0,0 @@ -/*************************************************************************= ***** - * JBoss, a division of Red Hat = * - * Copyright 2006, Red Hat Middleware, LLC, and individual = * - * contributors as indicated by the @authors tag. See the = * - * copyright.txt in the distribution for a full listing of = * - * individual contributors. = * - * = * - * This is free software; you can redistribute it and/or modify it = * - * under the terms of the GNU Lesser General Public License as = * - * published by the Free Software Foundation; either version 2.1 of = * - * the License, or (at your option) any later version. = * - * = * - * This software is distributed in the hope that it will be useful, = * - * but WITHOUT ANY WARRANTY; without even the implied warranty of = * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU = * - * Lesser General Public License for more details. = * - * = * - * You should have received a copy of the GNU Lesser General Public = * - * License along with this software; if not, write to the Free = * - * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA = * - * 02110-1301 USA, or see the FSF site: http://www.fsf.org. = * - *************************************************************************= *****/ -package org.jboss.unit.spi.pojo; - -/** - * Allow a pojo class to take care of providing its description and perfor= m test case life cycle management. - * - * @author Julien Viet - * @version $Revision: 1.1 $ - */ -public interface TestHandler -{ - - TestSuiteDescriptor getDescriptor(); - - TestLifeCycle getLifeCycle(); - -} Deleted: modules/test/trunk/unit/src/main/org/jboss/unit/spi/pojo/TestHandl= erSupport.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/spi/pojo/TestHandlerSup= port.java 2007-10-04 22:40:54 UTC (rev 8536) +++ modules/test/trunk/unit/src/main/org/jboss/unit/spi/pojo/TestHandlerSup= port.java 2007-10-04 22:41:52 UTC (rev 8537) @@ -1,597 +0,0 @@ -/*************************************************************************= ***** - * JBoss, a division of Red Hat = * - * Copyright 2006, Red Hat Middleware, LLC, and individual = * - * contributors as indicated by the @authors tag. See the = * - * copyright.txt in the distribution for a full listing of = * - * individual contributors. = * - * = * - * This is free software; you can redistribute it and/or modify it = * - * under the terms of the GNU Lesser General Public License as = * - * published by the Free Software Foundation; either version 2.1 of = * - * the License, or (at your option) any later version. = * - * = * - * This software is distributed in the hope that it will be useful, = * - * but WITHOUT ANY WARRANTY; without even the implied warranty of = * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU = * - * Lesser General Public License for more details. = * - * = * - * You should have received a copy of the GNU Lesser General Public = * - * License along with this software; if not, write to the Free = * - * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA = * - * 02110-1301 USA, or see the FSF site: http://www.fsf.org. = * - *************************************************************************= *****/ -package org.jboss.unit.spi.pojo; - -import org.jboss.unit.api.pojo.annotations.Test; -import org.jboss.unit.api.pojo.annotations.Parameter; -import org.jboss.unit.api.pojo.annotations.Create; -import org.jboss.unit.api.pojo.annotations.Destroy; -import org.jboss.unit.api.pojo.annotations.Description; -import org.jboss.unit.api.pojo.annotations.Tag; -import org.jboss.unit.util.CollectionTools; - -import java.util.SortedMap; -import java.util.TreeMap; -import java.util.Map; -import java.util.HashMap; -import java.util.LinkedHashMap; -import java.util.ArrayList; -import java.util.List; -import java.util.Set; -import java.util.HashSet; -import java.util.Collections; -import java.lang.reflect.Modifier; -import java.lang.reflect.Constructor; -import java.lang.reflect.AnnotatedElement; -import java.lang.reflect.Method; -import java.lang.reflect.InvocationTargetException; -import java.lang.annotation.Annotation; -import java.beans.Introspector; - -/** - * Provide a default implementation that relies on the annotation defined = in the annotations package. - * - * @author Julien Viet - * @version $Revision: 1.1 $ - */ -public class TestHandlerSupport implements TestHandler, TestLifeCycle, Tes= tSuiteDescriptor -{ - - /** . */ - private final String suiteName; - - /** . */ - private final String suiteDescription; - - /** . */ - private final Map testCases; - - /** . */ - private final Method create; - - /** . */ - private final Method destroy; - - /** . */ - final Map suiteParameters; - - /** . */ - private final Constructor ctor; - - /** . */ - private final Set suiteKeywords; - - public TestHandlerSupport(Class testClass) - { - if (testClass =3D=3D null) - { - throw new IllegalArgumentException(); - } - - // - if (Modifier.isAbstract(testClass.getModifiers())) - { - throw new IllegalArgumentException("Test class is abstract"); - } - - // Check constructor - Constructor ctor; - try - { - ctor =3D testClass.getConstructor(); - } - catch (NoSuchMethodException e) - { - throw new IllegalArgumentException(e); - } - - // - Test testAnnotation =3D ((AnnotatedElement)testClass).getAnnotation(= Test.class); - String suiteName =3D testAnnotation !=3D null ? testAnnotation.name(= ) : ""; - if (suiteName.length() =3D=3D 0) - { - suiteName =3D testClass.getName(); - } - - // - Description descriptionAnnotation =3D ((AnnotatedElement)testClass).= getAnnotation(Description.class); - String suiteDescription =3D descriptionAnnotation !=3D null ? descri= ptionAnnotation.description() : ""; - if (suiteDescription.length() =3D=3D 0) - { - suiteDescription =3D "Test of class " + testClass.getName(); - } - - Tag tag =3D ((AnnotatedElement)testClass).getAnnotation(Tag.class); - Set suiteKeywords =3D new HashSet(); - if (tag !=3D null) - { - suiteKeywords.addAll(CollectionTools.set(tag.value())); - } - - // - SortedMap methods =3D new TreeMap(); - for (Method method : testClass.getMethods()) - { - MethodKey key =3D new MethodKey(method); - methods.put(key, method); - } - - // - Map suiteParameters =3D new HashMap(); - Map testCases =3D new HashMap(); - Method create =3D null; - Method destroy =3D null; - - // First pass for parameters and life cycle annotations - for (Method method : methods.values()) - { - String methodName =3D method.getName(); - int modifiers =3D method.getModifiers(); - Parameter parameterMethodAnnotation =3D method.getAnnotation(Para= meter.class); - Test testMethodAnnotation =3D method.getAnnotation(Test.class); - Create createMethodAnnotation =3D method.getAnnotation(Create.cla= ss); - Destroy destroyMethodAnnotation =3D method.getAnnotation(Destroy.= class); - - // - if (testMethodAnnotation !=3D null && parameterMethodAnnotation != =3D null) - { - throw new IllegalArgumentException(); - } - - // - if (createMethodAnnotation !=3D null && parameterMethodAnnotation= !=3D null) - { - throw new IllegalArgumentException(); - } - if (createMethodAnnotation !=3D null && testMethodAnnotation !=3D= null) - { - throw new IllegalArgumentException(); - } - - // - if (destroyMethodAnnotation !=3D null && parameterMethodAnnotatio= n !=3D null) - { - throw new IllegalArgumentException(); - } - if (destroyMethodAnnotation !=3D null && testMethodAnnotation != =3D null) - { - throw new IllegalArgumentException(); - } - if (destroyMethodAnnotation !=3D null && createMethodAnnotation != =3D null) - { - throw new IllegalArgumentException(); - } - - // - if (parameterMethodAnnotation !=3D null) - { - if (!methodName.startsWith("set")) - { - throw new IllegalArgumentException(); - } - if (methodName.length() < 4) - { - throw new IllegalArgumentException(); - } - if (method.getParameterTypes().length !=3D 1) - { - throw new IllegalArgumentException(); - } - if (method.getReturnType() !=3D void.class) - { - throw new IllegalArgumentException(); - } - if (Modifier.isAbstract(modifiers)) - { - throw new IllegalArgumentException(); - } - if (!Modifier.isPublic(modifiers)) - { - throw new IllegalArgumentException(); - } - if (Modifier.isStatic(modifiers)) - { - throw new IllegalArgumentException(); - } - - // - String name =3D parameterMethodAnnotation.name(); - if (name.length() =3D=3D 0) - { - name =3D Introspector.decapitalize(method.getName().substri= ng(3)); - } - - // - Description descriptionMethodAnnotation =3D method.getAnnotati= on(Description.class); - String description =3D descriptionMethodAnnotation !=3D null ?= descriptionMethodAnnotation.description() : ""; - if (description.length() =3D=3D 0) - { - description =3D "Parameter " + name; - } - - // - PropertyTestParameter parameter =3D suiteParameters.get(name); - if (parameter =3D=3D null) - { - parameter =3D new PropertyTestParameter(name, description); - suiteParameters.put(name, parameter); - } - - // - parameter.addSetter(method); - } - else if (createMethodAnnotation !=3D null) - { - if (create !=3D null) - { - throw new IllegalArgumentException(); - } - if (method.getReturnType() !=3D void.class) - { - throw new IllegalArgumentException(); - } - if (Modifier.isAbstract(modifiers)) - { - throw new IllegalArgumentException(); - } - if (!Modifier.isPublic(modifiers)) - { - throw new IllegalArgumentException(); - } - if (Modifier.isStatic(modifiers)) - { - throw new IllegalArgumentException(); - } - if (method.getParameterTypes().length > 0) - { - throw new IllegalArgumentException(); - } - - // - create =3D method; - } - else if (destroyMethodAnnotation !=3D null) - { - if (destroy !=3D null) - { - throw new IllegalArgumentException(); - } - if (method.getReturnType() !=3D void.class) - { - throw new IllegalArgumentException(); - } - if (Modifier.isAbstract(modifiers)) - { - throw new IllegalArgumentException(); - } - if (!Modifier.isPublic(modifiers)) - { - throw new IllegalArgumentException(); - } - if (Modifier.isStatic(modifiers)) - { - throw new IllegalArgumentException(); - } - if (method.getParameterTypes().length > 0) - { - throw new IllegalArgumentException(); - } - - // - destroy =3D method; - } - } - - // Second pass for test annotations - for (Method method : methods.values()) - { - int modifiers =3D method.getModifiers(); - Test testMethodAnnotation =3D method.getAnnotation(Test.class); - - // - if (testMethodAnnotation !=3D null) - { - if (method.getReturnType() !=3D void.class) - { - throw new IllegalArgumentException(); - } - if (Modifier.isAbstract(modifiers)) - { - throw new IllegalArgumentException(); - } - if (!Modifier.isPublic(modifiers)) - { - throw new IllegalArgumentException(); - } - if (Modifier.isStatic(modifiers)) - { - throw new IllegalArgumentException(); - } - - // - LinkedHashMap methodParameters = =3D new LinkedHashMap(); - for (Annotation[] parameterAnnotations : method.getParameterAn= notations()) - { - Map,Annotation> parameterAnnota= tionMap =3D new HashMap, Annotation>(); - for (Annotation parameterAnnotation : parameterAnnotations) - { - Class blah =3D parameterAnnotation= .annotationType(); - parameterAnnotationMap.put(blah, parameterAnnotation); - } - - // - Parameter argumentParameterAnnotation =3D (Parameter)parame= terAnnotationMap.get(Parameter.class); - - // - if (argumentParameterAnnotation !=3D null) - { - // - String name =3D argumentParameterAnnotation.name(); - if (name.length() =3D=3D 0) - { - throw new IllegalArgumentException(); - } - if (methodParameters.containsKey(name)) - { - throw new IllegalArgumentException(); - } - - // - Description descriptionArgumentParameterAnnotation =3D (= Description)parameterAnnotationMap.get(Description.class); - String description =3D descriptionArgumentParameterAnnot= ation !=3D null ? descriptionArgumentParameterAnnotation.description() : ""; - if (description.length() =3D=3D 0) - { - description =3D "Method parameter " + name; - } - - // - methodParameters.put(name, new ArgumentTestParameter(nam= e, description)); - } - else - { - throw new IllegalArgumentException(); - } - } - - // - String name =3D testMethodAnnotation.name(); - if (testMethodAnnotation.name().length() =3D=3D 0) - { - name =3D method.getName(); - } - - // - Description descriptionMethodAnnotation =3D method.getAnnotati= on(Description.class); - String description =3D descriptionMethodAnnotation !=3D null ?= descriptionMethodAnnotation.description() : ""; - if (description.length() =3D=3D 0) - { - description =3D "Test of method " + method.getName(); - } - - // - Set keywords =3D new HashSet(); - Tag tagMethodAnnotation =3D method.getAnnotation(Tag.class); - if (tagMethodAnnotation !=3D null) - { - keywords.addAll(CollectionTools.set(tagMethodAnnotation.val= ue())); - } - - Map parameters =3D new HashMap(suiteParameters); - parameters.putAll(methodParameters); - - // - TestCaseDef testCaseDef =3D new TestCaseDef(method, name, desc= ription, parameters, methodParameters, keywords); - - // - if (testCases.put(testCaseDef.getName(), testCaseDef) !=3D nul= l) - { - throw new IllegalArgumentException(); - } - } - } - - // - this.suiteName =3D suiteName; - this.suiteDescription =3D suiteDescription; - this.suiteKeywords =3D suiteKeywords; - this.suiteParameters =3D suiteParameters; - this.testCases =3D testCases; - this.ctor =3D ctor; - this.create =3D create; - this.destroy =3D destroy; - } - - public TestSuiteDescriptor getDescriptor() - { - return this; - } - - public TestLifeCycle getLifeCycle() - { - return this; - } - - public String getName() - { - return suiteName; - } - - public String getDescription() - { - return suiteDescription; - } - - public Set getKeywords() - { - return suiteKeywords; - } - - public Map getParameters() - { - return Collections.unmodifiableMap(suiteParameters); - } - - public Map getTestCases() - { - return Collections.unmodifiableMap(testCases); - } - - public TestCase newTestCase(String name) throws TestCaseLifeCycleExcept= ion - { - TestCaseDef testCaseDef =3D testCases.get(name); - - // - if (testCaseDef =3D=3D null) - { - throw new TestCaseLifeCycleException("No such test case <" + name= + ">"); - } - - // - Object instance; - try - { - instance =3D ctor.newInstance(); - } - catch (InvocationTargetException e) - { - throw new TestCaseLifeCycleException("Cannot create test case " += name, e.getCause()); - } - catch (Exception e) - { - throw new TestCaseLifeCycleException("Cannot configure parameter = " + name, e); - } - - // - return new TestCaseImpl(testCaseDef, instance); - } - - public void testCaseParametrize(TestCase _testCase, Map = parametrization) throws TestCaseLifeCycleException - { - TestCaseImpl testCase =3D (TestCaseImpl)_testCase; - - // Save parametrization - testCase.parametrization =3D parametrization; - - // - for (PropertyTestParameter parameter : suiteParameters.values()) - { - if (!parametrization.containsKey(parameter.getName())) - { - throw new TestCaseLifeCycleException("Missing parameter " + pa= rameter.getName()); - } - String parameterValue =3D parametrization.get(parameter.getName()= ); - for (Method setter : parameter.setters) - { - try - { - setter.invoke(testCase.pojo, parameterValue); - } - catch (InvocationTargetException e) - { - throw new TestCaseLifeCycleException("Cannot configure para= meter " + parameter.getName(), e.getCause()); - } - catch (Exception e) - { - throw new TestCaseLifeCycleException("Cannot configure para= meter " + parameter.getName(), e); - } - } - } - } - - public void testCaseCreate(TestCase _testCase) throws TestCaseLifeCycle= Exception - { - TestCaseImpl testCase =3D (TestCaseImpl)_testCase; - - // - if (create !=3D null) - { - try - { - create.invoke(testCase.getPOJO()); - } - catch (InvocationTargetException e) - { - throw new TestCaseLifeCycleException("Cannot create test case"= , e.getCause()); - } - catch (Exception e) - { - throw new TestCaseLifeCycleException("Cannot create test case"= , e); - } - } - } - - public void testCaseInvoke(TestCase _testCase) throws TestCaseLifeCycle= Exception - { - TestCaseImpl testCase =3D (TestCaseImpl)_testCase; - - List argList =3D new ArrayList(); - for (String parameterName : testCase.def.arguments.keySet()) - { - if (!testCase.parametrization.containsKey(parameterName)) - { - throw new TestCaseLifeCycleException("Missing parameter " + pa= rameterName); - } - String parameterValue =3D testCase.parametrization.get(parameterN= ame); - if (parameterValue =3D=3D null) - { - throw new IllegalArgumentException(); - } - - // - argList.add(parameterValue); - } - Object[] args =3D argList.toArray(); - - try - { - testCase.def.method.invoke(testCase.pojo, args); - } - catch (InvocationTargetException e) - { - throw new TestCaseLifeCycleException("Cannot invoke test case", e= .getCause()); - } - catch (Exception e) - { - throw new TestCaseLifeCycleException("Cannot invoke test case", e= ); - } - } - - public void testCaseDestroy(TestCase _testCase) - { - TestCaseImpl testCase =3D (TestCaseImpl)_testCase; - - // - if (destroy !=3D null) - { - try - { - destroy.invoke(testCase.getPOJO()); - } - catch (Throwable t) - { - // Log this as a warn - // t.printStackTrace(); - } - } - } -} Copied: modules/test/trunk/unit/src/main/org/jboss/unit/spi/pojo/TestProvid= er.java (from rev 8536, modules/test/trunk/unit/src/main/org/jboss/unit/spi= /pojo/TestHandler.java) =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/spi/pojo/TestProvider.j= ava (rev 0) +++ modules/test/trunk/unit/src/main/org/jboss/unit/spi/pojo/TestProvider.j= ava 2007-10-04 22:41:52 UTC (rev 8537) @@ -0,0 +1,38 @@ +/*************************************************************************= ***** + * JBoss, a division of Red Hat = * + * Copyright 2006, Red Hat Middleware, LLC, and individual = * + * contributors as indicated by the @authors tag. See the = * + * copyright.txt in the distribution for a full listing of = * + * individual contributors. = * + * = * + * This is free software; you can redistribute it and/or modify it = * + * under the terms of the GNU Lesser General Public License as = * + * published by the Free Software Foundation; either version 2.1 of = * + * the License, or (at your option) any later version. = * + * = * + * This software is distributed in the hope that it will be useful, = * + * but WITHOUT ANY WARRANTY; without even the implied warranty of = * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU = * + * Lesser General Public License for more details. = * + * = * + * You should have received a copy of the GNU Lesser General Public = * + * License along with this software; if not, write to the Free = * + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA = * + * 02110-1301 USA, or see the FSF site: http://www.fsf.org. = * + *************************************************************************= *****/ +package org.jboss.unit.spi.pojo; + +/** + * Allow a pojo class to take care of providing its description and perfor= m test case life cycle management. + * + * @author Julien Viet + * @version $Revision: 1.1 $ + */ +public interface TestProvider +{ + + TestSuiteDescriptor getDescriptor(); + + TestLifeCycle getLifeCycle(); + +} Copied: modules/test/trunk/unit/src/main/org/jboss/unit/spi/pojo/TestProvid= erSupport.java (from rev 8536, modules/test/trunk/unit/src/main/org/jboss/u= nit/spi/pojo/TestHandlerSupport.java) =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/spi/pojo/TestProviderSu= pport.java (rev 0) +++ modules/test/trunk/unit/src/main/org/jboss/unit/spi/pojo/TestProviderSu= pport.java 2007-10-04 22:41:52 UTC (rev 8537) @@ -0,0 +1,597 @@ +/*************************************************************************= ***** + * JBoss, a division of Red Hat = * + * Copyright 2006, Red Hat Middleware, LLC, and individual = * + * contributors as indicated by the @authors tag. See the = * + * copyright.txt in the distribution for a full listing of = * + * individual contributors. = * + * = * + * This is free software; you can redistribute it and/or modify it = * + * under the terms of the GNU Lesser General Public License as = * + * published by the Free Software Foundation; either version 2.1 of = * + * the License, or (at your option) any later version. = * + * = * + * This software is distributed in the hope that it will be useful, = * + * but WITHOUT ANY WARRANTY; without even the implied warranty of = * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU = * + * Lesser General Public License for more details. = * + * = * + * You should have received a copy of the GNU Lesser General Public = * + * License along with this software; if not, write to the Free = * + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA = * + * 02110-1301 USA, or see the FSF site: http://www.fsf.org. = * + *************************************************************************= *****/ +package org.jboss.unit.spi.pojo; + +import org.jboss.unit.api.pojo.annotations.Test; +import org.jboss.unit.api.pojo.annotations.Parameter; +import org.jboss.unit.api.pojo.annotations.Create; +import org.jboss.unit.api.pojo.annotations.Destroy; +import org.jboss.unit.api.pojo.annotations.Description; +import org.jboss.unit.api.pojo.annotations.Tag; +import org.jboss.unit.util.CollectionTools; + +import java.util.SortedMap; +import java.util.TreeMap; +import java.util.Map; +import java.util.HashMap; +import java.util.LinkedHashMap; +import java.util.ArrayList; +import java.util.List; +import java.util.Set; +import java.util.HashSet; +import java.util.Collections; +import java.lang.reflect.Modifier; +import java.lang.reflect.Constructor; +import java.lang.reflect.AnnotatedElement; +import java.lang.reflect.Method; +import java.lang.reflect.InvocationTargetException; +import java.lang.annotation.Annotation; +import java.beans.Introspector; + +/** + * Provide a default implementation that relies on the annotation defined = in the annotations package. + * + * @author Julien Viet + * @version $Revision: 1.1 $ + */ +public class TestProviderSupport implements TestProvider, TestLifeCycle, T= estSuiteDescriptor +{ + + /** . */ + private final String suiteName; + + /** . */ + private final String suiteDescription; + + /** . */ + private final Map testCases; + + /** . */ + private final Method create; + + /** . */ + private final Method destroy; + + /** . */ + final Map suiteParameters; + + /** . */ + private final Constructor ctor; + + /** . */ + private final Set suiteKeywords; + + public TestProviderSupport(Class testClass) + { + if (testClass =3D=3D null) + { + throw new IllegalArgumentException(); + } + + // + if (Modifier.isAbstract(testClass.getModifiers())) + { + throw new IllegalArgumentException("Test class is abstract"); + } + + // Check constructor + Constructor ctor; + try + { + ctor =3D testClass.getConstructor(); + } + catch (NoSuchMethodException e) + { + throw new IllegalArgumentException(e); + } + + // + Test testAnnotation =3D ((AnnotatedElement)testClass).getAnnotation(= Test.class); + String suiteName =3D testAnnotation !=3D null ? testAnnotation.name(= ) : ""; + if (suiteName.length() =3D=3D 0) + { + suiteName =3D testClass.getName(); + } + + // + Description descriptionAnnotation =3D ((AnnotatedElement)testClass).= getAnnotation(Description.class); + String suiteDescription =3D descriptionAnnotation !=3D null ? descri= ptionAnnotation.description() : ""; + if (suiteDescription.length() =3D=3D 0) + { + suiteDescription =3D "Test of class " + testClass.getName(); + } + + Tag tag =3D ((AnnotatedElement)testClass).getAnnotation(Tag.class); + Set suiteKeywords =3D new HashSet(); + if (tag !=3D null) + { + suiteKeywords.addAll(CollectionTools.set(tag.value())); + } + + // + SortedMap methods =3D new TreeMap(); + for (Method method : testClass.getMethods()) + { + MethodKey key =3D new MethodKey(method); + methods.put(key, method); + } + + // + Map suiteParameters =3D new HashMap(); + Map testCases =3D new HashMap(); + Method create =3D null; + Method destroy =3D null; + + // First pass for parameters and life cycle annotations + for (Method method : methods.values()) + { + String methodName =3D method.getName(); + int modifiers =3D method.getModifiers(); + Parameter parameterMethodAnnotation =3D method.getAnnotation(Para= meter.class); + Test testMethodAnnotation =3D method.getAnnotation(Test.class); + Create createMethodAnnotation =3D method.getAnnotation(Create.cla= ss); + Destroy destroyMethodAnnotation =3D method.getAnnotation(Destroy.= class); + + // + if (testMethodAnnotation !=3D null && parameterMethodAnnotation != =3D null) + { + throw new IllegalArgumentException(); + } + + // + if (createMethodAnnotation !=3D null && parameterMethodAnnotation= !=3D null) + { + throw new IllegalArgumentException(); + } + if (createMethodAnnotation !=3D null && testMethodAnnotation !=3D= null) + { + throw new IllegalArgumentException(); + } + + // + if (destroyMethodAnnotation !=3D null && parameterMethodAnnotatio= n !=3D null) + { + throw new IllegalArgumentException(); + } + if (destroyMethodAnnotation !=3D null && testMethodAnnotation != =3D null) + { + throw new IllegalArgumentException(); + } + if (destroyMethodAnnotation !=3D null && createMethodAnnotation != =3D null) + { + throw new IllegalArgumentException(); + } + + // + if (parameterMethodAnnotation !=3D null) + { + if (!methodName.startsWith("set")) + { + throw new IllegalArgumentException(); + } + if (methodName.length() < 4) + { + throw new IllegalArgumentException(); + } + if (method.getParameterTypes().length !=3D 1) + { + throw new IllegalArgumentException(); + } + if (method.getReturnType() !=3D void.class) + { + throw new IllegalArgumentException(); + } + if (Modifier.isAbstract(modifiers)) + { + throw new IllegalArgumentException(); + } + if (!Modifier.isPublic(modifiers)) + { + throw new IllegalArgumentException(); + } + if (Modifier.isStatic(modifiers)) + { + throw new IllegalArgumentException(); + } + + // + String name =3D parameterMethodAnnotation.name(); + if (name.length() =3D=3D 0) + { + name =3D Introspector.decapitalize(method.getName().substri= ng(3)); + } + + // + Description descriptionMethodAnnotation =3D method.getAnnotati= on(Description.class); + String description =3D descriptionMethodAnnotation !=3D null ?= descriptionMethodAnnotation.description() : ""; + if (description.length() =3D=3D 0) + { + description =3D "Parameter " + name; + } + + // + PropertyTestParameter parameter =3D suiteParameters.get(name); + if (parameter =3D=3D null) + { + parameter =3D new PropertyTestParameter(name, description); + suiteParameters.put(name, parameter); + } + + // + parameter.addSetter(method); + } + else if (createMethodAnnotation !=3D null) + { + if (create !=3D null) + { + throw new IllegalArgumentException(); + } + if (method.getReturnType() !=3D void.class) + { + throw new IllegalArgumentException(); + } + if (Modifier.isAbstract(modifiers)) + { + throw new IllegalArgumentException(); + } + if (!Modifier.isPublic(modifiers)) + { + throw new IllegalArgumentException(); + } + if (Modifier.isStatic(modifiers)) + { + throw new IllegalArgumentException(); + } + if (method.getParameterTypes().length > 0) + { + throw new IllegalArgumentException(); + } + + // + create =3D method; + } + else if (destroyMethodAnnotation !=3D null) + { + if (destroy !=3D null) + { + throw new IllegalArgumentException(); + } + if (method.getReturnType() !=3D void.class) + { + throw new IllegalArgumentException(); + } + if (Modifier.isAbstract(modifiers)) + { + throw new IllegalArgumentException(); + } + if (!Modifier.isPublic(modifiers)) + { + throw new IllegalArgumentException(); + } + if (Modifier.isStatic(modifiers)) + { + throw new IllegalArgumentException(); + } + if (method.getParameterTypes().length > 0) + { + throw new IllegalArgumentException(); + } + + // + destroy =3D method; + } + } + + // Second pass for test annotations + for (Method method : methods.values()) + { + int modifiers =3D method.getModifiers(); + Test testMethodAnnotation =3D method.getAnnotation(Test.class); + + // + if (testMethodAnnotation !=3D null) + { + if (method.getReturnType() !=3D void.class) + { + throw new IllegalArgumentException(); + } + if (Modifier.isAbstract(modifiers)) + { + throw new IllegalArgumentException(); + } + if (!Modifier.isPublic(modifiers)) + { + throw new IllegalArgumentException(); + } + if (Modifier.isStatic(modifiers)) + { + throw new IllegalArgumentException(); + } + + // + LinkedHashMap methodParameters = =3D new LinkedHashMap(); + for (Annotation[] parameterAnnotations : method.getParameterAn= notations()) + { + Map,Annotation> parameterAnnota= tionMap =3D new HashMap, Annotation>(); + for (Annotation parameterAnnotation : parameterAnnotations) + { + Class blah =3D parameterAnnotation= .annotationType(); + parameterAnnotationMap.put(blah, parameterAnnotation); + } + + // + Parameter argumentParameterAnnotation =3D (Parameter)parame= terAnnotationMap.get(Parameter.class); + + // + if (argumentParameterAnnotation !=3D null) + { + // + String name =3D argumentParameterAnnotation.name(); + if (name.length() =3D=3D 0) + { + throw new IllegalArgumentException(); + } + if (methodParameters.containsKey(name)) + { + throw new IllegalArgumentException(); + } + + // + Description descriptionArgumentParameterAnnotation =3D (= Description)parameterAnnotationMap.get(Description.class); + String description =3D descriptionArgumentParameterAnnot= ation !=3D null ? descriptionArgumentParameterAnnotation.description() : ""; + if (description.length() =3D=3D 0) + { + description =3D "Method parameter " + name; + } + + // + methodParameters.put(name, new ArgumentTestParameter(nam= e, description)); + } + else + { + throw new IllegalArgumentException(); + } + } + + // + String name =3D testMethodAnnotation.name(); + if (testMethodAnnotation.name().length() =3D=3D 0) + { + name =3D method.getName(); + } + + // + Description descriptionMethodAnnotation =3D method.getAnnotati= on(Description.class); + String description =3D descriptionMethodAnnotation !=3D null ?= descriptionMethodAnnotation.description() : ""; + if (description.length() =3D=3D 0) + { + description =3D "Test of method " + method.getName(); + } + + // + Set keywords =3D new HashSet(); + Tag tagMethodAnnotation =3D method.getAnnotation(Tag.class); + if (tagMethodAnnotation !=3D null) + { + keywords.addAll(CollectionTools.set(tagMethodAnnotation.val= ue())); + } + + Map parameters =3D new HashMap(suiteParameters); + parameters.putAll(methodParameters); + + // + TestCaseDef testCaseDef =3D new TestCaseDef(method, name, desc= ription, parameters, methodParameters, keywords); + + // + if (testCases.put(testCaseDef.getName(), testCaseDef) !=3D nul= l) + { + throw new IllegalArgumentException(); + } + } + } + + // + this.suiteName =3D suiteName; + this.suiteDescription =3D suiteDescription; + this.suiteKeywords =3D suiteKeywords; + this.suiteParameters =3D suiteParameters; + this.testCases =3D testCases; + this.ctor =3D ctor; + this.create =3D create; + this.destroy =3D destroy; + } + + public TestSuiteDescriptor getDescriptor() + { + return this; + } + + public TestLifeCycle getLifeCycle() + { + return this; + } + + public String getName() + { + return suiteName; + } + + public String getDescription() + { + return suiteDescription; + } + + public Set getKeywords() + { + return suiteKeywords; + } + + public Map getParameters() + { + return Collections.unmodifiableMap(suiteParameters); + } + + public Map getTestCases() + { + return Collections.unmodifiableMap(testCases); + } + + public TestCase newTestCase(String name) throws TestCaseLifeCycleExcept= ion + { + TestCaseDef testCaseDef =3D testCases.get(name); + + // + if (testCaseDef =3D=3D null) + { + throw new TestCaseLifeCycleException("No such test case <" + name= + ">"); + } + + // + Object instance; + try + { + instance =3D ctor.newInstance(); + } + catch (InvocationTargetException e) + { + throw new TestCaseLifeCycleException("Cannot create test case " += name, e.getCause()); + } + catch (Exception e) + { + throw new TestCaseLifeCycleException("Cannot configure parameter = " + name, e); + } + + // + return new TestCaseImpl(testCaseDef, instance); + } + + public void testCaseParametrize(TestCase _testCase, Map = parametrization) throws TestCaseLifeCycleException + { + TestCaseImpl testCase =3D (TestCaseImpl)_testCase; + + // Save parametrization + testCase.parametrization =3D parametrization; + + // + for (PropertyTestParameter parameter : suiteParameters.values()) + { + if (!parametrization.containsKey(parameter.getName())) + { + throw new TestCaseLifeCycleException("Missing parameter " + pa= rameter.getName()); + } + String parameterValue =3D parametrization.get(parameter.getName()= ); + for (Method setter : parameter.setters) + { + try + { + setter.invoke(testCase.pojo, parameterValue); + } + catch (InvocationTargetException e) + { + throw new TestCaseLifeCycleException("Cannot configure para= meter " + parameter.getName(), e.getCause()); + } + catch (Exception e) + { + throw new TestCaseLifeCycleException("Cannot configure para= meter " + parameter.getName(), e); + } + } + } + } + + public void testCaseCreate(TestCase _testCase) throws TestCaseLifeCycle= Exception + { + TestCaseImpl testCase =3D (TestCaseImpl)_testCase; + + // + if (create !=3D null) + { + try + { + create.invoke(testCase.getPOJO()); + } + catch (InvocationTargetException e) + { + throw new TestCaseLifeCycleException("Cannot create test case"= , e.getCause()); + } + catch (Exception e) + { + throw new TestCaseLifeCycleException("Cannot create test case"= , e); + } + } + } + + public void testCaseInvoke(TestCase _testCase) throws TestCaseLifeCycle= Exception + { + TestCaseImpl testCase =3D (TestCaseImpl)_testCase; + + List argList =3D new ArrayList(); + for (String parameterName : testCase.def.arguments.keySet()) + { + if (!testCase.parametrization.containsKey(parameterName)) + { + throw new TestCaseLifeCycleException("Missing parameter " + pa= rameterName); + } + String parameterValue =3D testCase.parametrization.get(parameterN= ame); + if (parameterValue =3D=3D null) + { + throw new IllegalArgumentException(); + } + + // + argList.add(parameterValue); + } + Object[] args =3D argList.toArray(); + + try + { + testCase.def.method.invoke(testCase.pojo, args); + } + catch (InvocationTargetException e) + { + throw new TestCaseLifeCycleException("Cannot invoke test case", e= .getCause()); + } + catch (Exception e) + { + throw new TestCaseLifeCycleException("Cannot invoke test case", e= ); + } + } + + public void testCaseDestroy(TestCase _testCase) + { + TestCaseImpl testCase =3D (TestCaseImpl)_testCase; + + // + if (destroy !=3D null) + { + try + { + destroy.invoke(testCase.getPOJO()); + } + catch (Throwable t) + { + // Log this as a warn + // t.printStackTrace(); + } + } + } +} Modified: modules/test/trunk/unit/src/main/org/jboss/unit/spi/pojo/annotati= ons/Provider.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/spi/pojo/annotations/Pr= ovider.java 2007-10-04 22:40:54 UTC (rev 8536) +++ modules/test/trunk/unit/src/main/org/jboss/unit/spi/pojo/annotations/Pr= ovider.java 2007-10-04 22:41:52 UTC (rev 8537) @@ -22,7 +22,7 @@ *************************************************************************= *****/ package org.jboss.unit.spi.pojo.annotations; = -import org.jboss.unit.spi.pojo.TestHandler; +import org.jboss.unit.spi.pojo.TestProvider; = import java.lang.annotation.Inherited; import java.lang.annotation.Retention; @@ -39,5 +39,5 @@ @Target({ElementType.ANNOTATION_TYPE,ElementType.TYPE}) public @interface Provider { - Class value(); + Class value(); } Modified: modules/test/trunk/unit/src/main/org/jboss/unit/unit/pojo/POJOTes= tSuiteDriver.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/unit/pojo/POJOTestSuite= Driver.java 2007-10-04 22:40:54 UTC (rev 8536) +++ modules/test/trunk/unit/src/main/org/jboss/unit/unit/pojo/POJOTestSuite= Driver.java 2007-10-04 22:41:52 UTC (rev 8537) @@ -22,8 +22,8 @@ *************************************************************************= *****/ package org.jboss.unit.unit.pojo; = -import org.jboss.unit.spi.pojo.TestHandler; -import org.jboss.unit.spi.pojo.TestHandlerSupport; +import org.jboss.unit.spi.pojo.TestProvider; +import org.jboss.unit.spi.pojo.TestProviderSupport; import org.jboss.unit.spi.pojo.TestCaseLifeCycleException; import org.jboss.unit.spi.pojo.TestLifeCycle; import org.jboss.unit.spi.pojo.TestCase; @@ -53,7 +53,7 @@ { = /** . */ - private TestHandler handler; + private TestProvider provider; = /** . */ private TestSuiteInfo info; @@ -81,9 +81,9 @@ { try { - Class providerClass =3D provider.value(= ); - Constructor providerCtor =3D providerCl= ass.getConstructor(Class.class); - handler =3D providerCtor.newInstance(testClass); + Class providerClass =3D provider.value= (); + Constructor providerCtor =3D providerC= lass.getConstructor(Class.class); + this.provider =3D providerCtor.newInstance(testClass); } catch (NoSuchMethodException e) { @@ -100,11 +100,11 @@ // } else { - handler =3D new TestHandlerSupport(testClass); + this.provider =3D new TestProviderSupport(testClass); } = // - info =3D new POJOTestSuiteInfo(handler.getDescriptor()); + info =3D new POJOTestSuiteInfo(this.provider.getDescriptor()); } = public TestInfo getInfo() @@ -125,7 +125,7 @@ } = // - TestLifeCycle lifeCycle =3D handler.getLifeCycle(); + TestLifeCycle lifeCycle =3D provider.getLifeCycle(); = // String name =3D id.getName(0); --===============0714584885388875672==-- From portal-commits at lists.jboss.org Thu Oct 4 19:21:17 2007 Content-Type: multipart/mixed; boundary="===============0528646769781826371==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8538 - in modules/common/trunk: build/ide/intellij/idea60/modules/mc and 2 other directories. Date: Thu, 04 Oct 2007 19:21:17 -0400 Message-ID: --===============0528646769781826371== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: julien(a)jboss.com Date: 2007-10-04 19:21:17 -0400 (Thu, 04 Oct 2007) New Revision: 8538 Removed: modules/common/trunk/common/src/resources/ Modified: modules/common/trunk/build/ide/intellij/idea60/modules/common/common.iml modules/common/trunk/build/ide/intellij/idea60/modules/mc/mc.iml modules/common/trunk/build/ide/intellij/idea60/modules/portal/portal.iml Log: remove empty dirs Modified: modules/common/trunk/build/ide/intellij/idea60/modules/common/com= mon.iml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/common/trunk/build/ide/intellij/idea60/modules/common/common.im= l 2007-10-04 22:41:52 UTC (rev 8537) +++ modules/common/trunk/build/ide/intellij/idea60/modules/common/common.im= l 2007-10-04 23:21:17 UTC (rev 8538) @@ -225,7 +225,6 @@ - Modified: modules/common/trunk/build/ide/intellij/idea60/modules/mc/mc.iml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/common/trunk/build/ide/intellij/idea60/modules/mc/mc.iml 2007-1= 0-04 22:41:52 UTC (rev 8537) +++ modules/common/trunk/build/ide/intellij/idea60/modules/mc/mc.iml 2007-1= 0-04 23:21:17 UTC (rev 8538) @@ -5,6 +5,7 @@ + Modified: modules/common/trunk/build/ide/intellij/idea60/modules/portal/por= tal.iml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/common/trunk/build/ide/intellij/idea60/modules/portal/portal.im= l 2007-10-04 22:41:52 UTC (rev 8537) +++ modules/common/trunk/build/ide/intellij/idea60/modules/portal/portal.im= l 2007-10-04 23:21:17 UTC (rev 8538) @@ -5,6 +5,7 @@ + --===============0528646769781826371==-- From portal-commits at lists.jboss.org Fri Oct 5 11:39:15 2007 Content-Type: multipart/mixed; boundary="===============5667953091140648352==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8539 - /. Date: Fri, 05 Oct 2007 11:39:15 -0400 Message-ID: --===============5667953091140648352== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: julien(a)jboss.com Date: 2007-10-05 11:39:15 -0400 (Fri, 05 Oct 2007) New Revision: 8539 Modified: pom.xml Log: fixed a few typos Modified: pom.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- pom.xml 2007-10-04 23:21:17 UTC (rev 8538) +++ pom.xml 2007-10-05 15:39:15 UTC (rev 8539) @@ -4,7 +4,7 @@ org.jboss.portal jboss-portal pom - Jboss Portal + JBoss Portal 1.1.0-SNAPSHOT http://labs.jboss.com/jbossportal = @@ -120,10 +120,10 @@ jviet Julien Viet jviet(a)redhat.com - Jboss a division of Red Hat + JBoss a division of Red Hat http://www.jboss.org - Portal lead + lead +1 @@ -131,7 +131,7 @@ whales Wesley Hales whales(a)redhat.com - Jboss a division of Red Hat + JBoss a division of Red Hat http://www.jboss.org ui @@ -144,7 +144,7 @@ - Jboss a division of Red Hat + JBoss a division of Red Hat http://www.jboss.org @@ -202,4 +202,4 @@ = = - \ No newline at end of file + --===============5667953091140648352==-- From portal-commits at lists.jboss.org Fri Oct 5 11:42:11 2007 Content-Type: multipart/mixed; boundary="===============0644693022699604238==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8540 - maven and 1 other directory. Date: Fri, 05 Oct 2007 11:42:10 -0400 Message-ID: --===============0644693022699604238== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: julien(a)jboss.com Date: 2007-10-05 11:42:10 -0400 (Fri, 05 Oct 2007) New Revision: 8540 Added: maven/ maven/pom.xml Removed: pom.xml Log: moving default pom to /maven to avoid entire tree checkout Copied: maven/pom.xml (from rev 8539, pom.xml) =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- maven/pom.xml (rev 0) +++ maven/pom.xml 2007-10-05 15:42:10 UTC (rev 8540) @@ -0,0 +1,205 @@ + + 4.0.0 + org.jboss.portal + jboss-portal + pom + JBoss Portal + 1.1.0-SNAPSHOT + http://labs.jboss.com/jbossportal + + + + + + repository.jboss.org + JBoss Repository + default + http://repository.jboss.org/maven2/ + + false + + + + snapshots.jboss.org + JBoss Snapshots Repository + default + http://snapshots.jboss.org/maven2/ + + true + + + false + + + + + + + + org.apache.maven.wagon + wagon-webdav + 1.0-beta-2 + + + + + + true + org.apache.maven.plugins + maven-compiler-plugin + + 1.5 + 1.5 + true + true + true + + + + org.codehaus.mojo + jboss-packaging-maven-plugin + 2.0-SNAPSHOT + true + + + maven-idea-plugin + + true + + + + org.jboss.maven.plugins + maven-jboss-deploy-plugin + 1.3 + + + + jboss-deploy + + + + + ${jboss.repository.root} + + + + + + + + + + + + + + snapshots.jboss.org + JBoss Snapshot Repository + dav:https://snapshots.jboss.org/maven2 + true + + + + + + + + + JIRA + http://jira.jboss.com/jira/browse/JBPORTAL + + + cruisecontrol + + + + jviet + Julien Viet + jviet(a)redhat.com + JBoss a division of Red Hat + http://www.jboss.org + + lead + + +1 + + + whales + Wesley Hales + whales(a)redhat.com + JBoss a division of Red Hat + http://www.jboss.org + + ui + developer + + -4 + + + + + + + LGPL 2.1 + http://www.gnu.org/licenses/lgpl.html + repo + + GNU LESSER GENERAL PUBLIC LICENSE Version 2.1 + + + + + scm:svn:http://anonsvn.jboss.org/repos/portal/trunk + scm:svn:https://svn.jboss.org/repos/portal/trun= k + https://svn.jboss.org/repos/portal/trunk + + + + + + maven-changes-plugin + + + maven-checkstyle-plugin + + + org.codehaus.mojo + cobertura-maven-plugin + 2.0 + + + maven-javadoc-plugin + + + maven-jxr-plugin + + + maven-pmd-plugin + + true + 1.5 + + + + maven-surefire-report-plugin + + + + + + + Deleted: pom.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- pom.xml 2007-10-05 15:39:15 UTC (rev 8539) +++ pom.xml 2007-10-05 15:42:10 UTC (rev 8540) @@ -1,205 +0,0 @@ - - 4.0.0 - org.jboss.portal - jboss-portal - pom - JBoss Portal - 1.1.0-SNAPSHOT - http://labs.jboss.com/jbossportal - - - - - - repository.jboss.org - JBoss Repository - default - http://repository.jboss.org/maven2/ - - false - - - - snapshots.jboss.org - JBoss Snapshots Repository - default - http://snapshots.jboss.org/maven2/ - - true - - - false - - - - - - - - org.apache.maven.wagon - wagon-webdav - 1.0-beta-2 - - - - - - true - org.apache.maven.plugins - maven-compiler-plugin - - 1.5 - 1.5 - true - true - true - - - - org.codehaus.mojo - jboss-packaging-maven-plugin - 2.0-SNAPSHOT - true - - - maven-idea-plugin - - true - - - - org.jboss.maven.plugins - maven-jboss-deploy-plugin - 1.3 - - - - jboss-deploy - - - - - ${jboss.repository.root} - - - - - - - - - - - - - - snapshots.jboss.org - JBoss Snapshot Repository - dav:https://snapshots.jboss.org/maven2 - true - - - - - - - - - JIRA - http://jira.jboss.com/jira/browse/JBPORTAL - - - cruisecontrol - - - - jviet - Julien Viet - jviet(a)redhat.com - JBoss a division of Red Hat - http://www.jboss.org - - lead - - +1 - - - whales - Wesley Hales - whales(a)redhat.com - JBoss a division of Red Hat - http://www.jboss.org - - ui - developer - - -4 - - - - - - - LGPL 2.1 - http://www.gnu.org/licenses/lgpl.html - repo - - GNU LESSER GENERAL PUBLIC LICENSE Version 2.1 - - - - - scm:svn:http://anonsvn.jboss.org/repos/portal/trunk - scm:svn:https://svn.jboss.org/repos/portal/trun= k - https://svn.jboss.org/repos/portal/trunk - - - - - - maven-changes-plugin - - - maven-checkstyle-plugin - - - org.codehaus.mojo - cobertura-maven-plugin - 2.0 - - - maven-javadoc-plugin - - - maven-jxr-plugin - - - maven-pmd-plugin - - true - 1.5 - - - - maven-surefire-report-plugin - - - - - - - --===============0644693022699604238==-- From portal-commits at lists.jboss.org Fri Oct 5 11:50:22 2007 Content-Type: multipart/mixed; boundary="===============8294222517066533222==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8541 - in branches/JBoss_Portal_Branch_2_6: core-wsrp/src/resources/portal-wsrp-admin-war/WEB-INF and 5 other directories. Date: Fri, 05 Oct 2007 11:50:22 -0400 Message-ID: --===============8294222517066533222== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: chris.laprun(a)jboss.com Date: 2007-10-05 11:50:22 -0400 (Fri, 05 Oct 2007) New Revision: 8541 Added: branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/wsrp/pro= ducer/config/ProducerConfigurationProvider.java branches/JBoss_Portal_Branch_2_6/wsrp/src/resources/portal-wsrp-sar/xsd/ branches/JBoss_Portal_Branch_2_6/wsrp/src/resources/portal-wsrp-sar/xsd/= jboss-wsrp-producer_2_6.xsd Modified: branches/JBoss_Portal_Branch_2_6/core-wsrp/src/main/org/jboss/portal/wsr= p/admin/ui/ManagedBean.java branches/JBoss_Portal_Branch_2_6/core-wsrp/src/main/org/jboss/portal/wsr= p/admin/ui/ProducerBean.java branches/JBoss_Portal_Branch_2_6/core-wsrp/src/resources/portal-wsrp-adm= in-war/WEB-INF/faces-config.xml branches/JBoss_Portal_Branch_2_6/wsrp/build.xml branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/wsrp/pro= ducer/config/ProducerConfigurationService.java branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/wsrp/pro= ducer/config/impl/ProducerConfigurationServiceImpl.java branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/wsrp/pro= ducer/config/impl/ProducerRegistrationRequirementsImpl.java Log: - JBPORTAL-1715: Added support for saving producer configuration (finally f= igured out that you can't use a FileWriter directly to marshall objects wit= h XB). - Added XML Schema version of the producer configuration file format (requi= red for XB marshalling to work properly, haven't been able to use the DTD f= or that purpose). - Added logging to ManagedBean. Modified: branches/JBoss_Portal_Branch_2_6/core-wsrp/src/main/org/jboss/por= tal/wsrp/admin/ui/ManagedBean.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/core-wsrp/src/main/org/jboss/portal/ws= rp/admin/ui/ManagedBean.java 2007-10-05 15:42:10 UTC (rev 8540) +++ branches/JBoss_Portal_Branch_2_6/core-wsrp/src/main/org/jboss/portal/ws= rp/admin/ui/ManagedBean.java 2007-10-05 15:50:22 UTC (rev 8541) @@ -23,6 +23,9 @@ = package org.jboss.portal.wsrp.admin.ui; = +import org.jboss.logging.Logger; + + /** * @author Chris Laprun * @version $Revision: 7509 $ @@ -30,6 +33,8 @@ */ public class ManagedBean { + protected Logger log =3D Logger.getLogger(getClass()); + protected BeanContext beanContext; = public void setBeanContext(BeanContext beanContext) Modified: branches/JBoss_Portal_Branch_2_6/core-wsrp/src/main/org/jboss/por= tal/wsrp/admin/ui/ProducerBean.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/core-wsrp/src/main/org/jboss/portal/ws= rp/admin/ui/ProducerBean.java 2007-10-05 15:42:10 UTC (rev 8540) +++ branches/JBoss_Portal_Branch_2_6/core-wsrp/src/main/org/jboss/portal/ws= rp/admin/ui/ProducerBean.java 2007-10-05 15:50:22 UTC (rev 8541) @@ -26,6 +26,7 @@ import org.jboss.portal.registration.RegistrationPolicy; import org.jboss.portal.registration.policies.DefaultRegistrationPolicy; import org.jboss.portal.wsrp.producer.config.ProducerConfiguration; +import org.jboss.portal.wsrp.producer.config.ProducerConfigurationService; import org.jboss.portal.wsrp.producer.config.ProducerRegistrationRequireme= nts; import org.jboss.portal.wsrp.registration.RegistrationPropertyDescription; = @@ -43,20 +44,25 @@ */ public class ProducerBean extends ManagedBean { - private ProducerConfiguration configuration; + private ProducerConfigurationService configurationService; private String policyClassName; private String validatorClassName; = - public ProducerConfiguration getConfiguration() + public ProducerConfigurationService getConfigurationService() { - return configuration; + return configurationService; } = - public void setConfiguration(ProducerConfiguration configuration) + public void setConfigurationService(ProducerConfigurationService config= urationService) { - this.configuration =3D configuration; + this.configurationService =3D configurationService; } = + public ProducerConfiguration getConfiguration() + { + return configurationService.getConfiguration(); + } + public boolean isRegistrationRequiredForFullDescription() { return getRegRequirements().isRegistrationRequiredForFullDescription= (); @@ -64,7 +70,7 @@ = private ProducerRegistrationRequirements getRegRequirements() { - return configuration.getRegistrationRequirements(); + return getConfiguration().getRegistrationRequirements(); } = public void setRegistrationRequiredForFullDescription(boolean requireRe= gForFullDescription) @@ -139,4 +145,18 @@ { return Collections.singletonList(new SelectItem("xsd:string")); } + + public String save() + { + try + { + configurationService.saveConfiguration(); + } + catch (Exception e) + { + log.debug(e); + beanContext.createErrorMessage("status", "Couldn't save producer = configuration. Cause: " + e.getLocalizedMessage()); + } + return null; + } } Modified: branches/JBoss_Portal_Branch_2_6/core-wsrp/src/resources/portal-w= srp-admin-war/WEB-INF/faces-config.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/core-wsrp/src/resources/portal-wsrp-ad= min-war/WEB-INF/faces-config.xml 2007-10-05 15:42:10 UTC (rev 8540) +++ branches/JBoss_Portal_Branch_2_6/core-wsrp/src/resources/portal-wsrp-ad= min-war/WEB-INF/faces-config.xml 2007-10-05 15:50:22 UTC (rev 8541) @@ -85,9 +85,9 @@ org.jboss.portal.wsrp.admin.ui.ProducerBean session - configuration - org.jboss.portal.wsrp.producer.config.ProducerCon= figuration - #{applicationScope.ProducerConfigurationService.configurat= ion} + configurationService + org.jboss.portal.wsrp.producer.config.ProducerCon= figurationService + #{applicationScope.ProducerConfigurationService} beanContext Modified: branches/JBoss_Portal_Branch_2_6/wsrp/build.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/wsrp/build.xml 2007-10-05 15:42:10 UTC= (rev 8540) +++ branches/JBoss_Portal_Branch_2_6/wsrp/build.xml 2007-10-05 15:50:22 UTC= (rev 8541) @@ -135,7 +135,8 @@ = - = + + @@ -314,13 +315,14 @@ = - - + + - + = + Added: branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/wsrp= /producer/config/ProducerConfigurationProvider.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/wsrp/pr= oducer/config/ProducerConfigurationProvider.java (r= ev 0) +++ branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/wsrp/pr= oducer/config/ProducerConfigurationProvider.java 2007-10-05 15:50:22 UTC (r= ev 8541) @@ -0,0 +1,147 @@ +/*************************************************************************= ***** + * JBoss, a division of Red Hat = * + * Copyright 2007, Red Hat Middleware, LLC, and individual = * + * contributors as indicated by the @authors tag. See the = * + * copyright.txt in the distribution for a full listing of = * + * individual contributors. = * + * = * + * This is free software; you can redistribute it and/or modify it = * + * under the terms of the GNU Lesser General Public License as = * + * published by the Free Software Foundation; either version 2.1 of = * + * the License, or (at your option) any later version. = * + * = * + * This software is distributed in the hope that it will be useful, = * + * but WITHOUT ANY WARRANTY; without even the implied warranty of = * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU = * + * Lesser General Public License for more details. = * + * = * + * You should have received a copy of the GNU Lesser General Public = * + * License along with this software; if not, write to the Free = * + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA = * + * 02110-1301 USA, or see the FSF site: http://www.fsf.org. = * + *************************************************************************= *****/ + +package org.jboss.portal.wsrp.producer.config; + +import org.jboss.portal.registration.RegistrationPolicy; +import org.jboss.portal.registration.policies.DefaultRegistrationPolicy; +import org.jboss.portal.wsrp.producer.config.impl.ProducerConfigurationImp= l; +import org.jboss.portal.wsrp.producer.config.impl.ProducerRegistrationRequ= irementsImpl; +import org.jboss.portal.wsrp.registration.LocalizedString; +import org.jboss.portal.wsrp.registration.RegistrationPropertyDescription; +import org.jboss.xb.binding.MarshallingContext; +import org.jboss.xb.binding.ObjectModelProvider; + +/** + * @author Chris Laprun + * @version $Revision$ + * @since 2.6.3 + */ +public class ProducerConfigurationProvider implements ObjectModelProvider +{ + public Object getRoot(Object o, MarshallingContext marshallingContext, = String s, String s1) + { + return o; + } + + public Object getChildren(ProducerConfigurationImpl configuration, Stri= ng namespaceUri, String localName) + { + if ("registration-configuration".equals(localName)) + { + ProducerRegistrationRequirements registrationRequirements =3D con= figuration.getRegistrationRequirements(); + if (registrationRequirements !=3D null && registrationRequirement= s.isRegistrationRequired()) + { + return registrationRequirements; + } + } + else if ("producer-configuration".equals(localName)) + { + return configuration; + } + + return null; + } + + public Object getChildren(ProducerRegistrationRequirementsImpl regReq, = String namespaceUri, String localName) + { + if ("registration-property-description".equals(localName)) + { + return regReq.getRegistrationProperties().values(); + } + + return null; + } + + public Object getAttributeValue(ProducerConfigurationImpl configuration= , String namespaceUri, String localName) + { + if ("fullServiceDescriptionRequiresRegistration".equals(localName)) + { + return configuration.getRegistrationRequirements().isRegistration= RequiredForFullDescription(); + } + + return null; + } + + public Object getElementValue(ProducerRegistrationRequirementsImpl regR= eq, String namespaceUri, String localName) + { + Object value =3D null; + if ("registration-policy".equals(localName)) + { + RegistrationPolicy policy =3D regReq.getPolicy(); + if (policy !=3D null) + { + value =3D policy.getClass().getName(); + } + } + else if ("registration-property-validator".equals(localName)) + { + RegistrationPolicy policy =3D regReq.getPolicy(); + if (policy instanceof DefaultRegistrationPolicy) + { + DefaultRegistrationPolicy defaultRegistrationPolicy =3D (Defau= ltRegistrationPolicy)policy; + value =3D defaultRegistrationPolicy.getValidator().getClass().= getName(); + } + } + else + { + value =3D null; + } + return value; + } + + public Object getElementValue(RegistrationPropertyDescription propertyD= escription, String namespaceUri, String localName) + { + Object value =3D null; + if ("name".equals(localName)) + { + value =3D propertyDescription.getName(); + } + else if ("type".equals(localName)) + { + value =3D propertyDescription.getType(); + } + else if ("label".equals(localName)) + { + value =3D propertyDescription.getLabel(); + } + else if ("hint".equals(localName)) + { + value =3D propertyDescription.getHint(); + } + return value; + } + + public Object getAttributeValue(LocalizedString localizedString, String= namespaceUri, String localName) + { + Object value =3D null; + if ("lang".equals(localName)) + { + value =3D localizedString.getLocale().getCountry(); + } + else if ("resourceName".equals(localName)) + { + value =3D localizedString.getResourceName(); + } + return value; + } +} Property changes on: branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jbo= ss/portal/wsrp/producer/config/ProducerConfigurationProvider.java ___________________________________________________________________ Name: svn:keywords + Author Date Id Revision Name: svn:eol-style + native Modified: branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/w= srp/producer/config/ProducerConfigurationService.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/wsrp/pr= oducer/config/ProducerConfigurationService.java 2007-10-05 15:42:10 UTC (re= v 8540) +++ branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/wsrp/pr= oducer/config/ProducerConfigurationService.java 2007-10-05 15:50:22 UTC (re= v 8541) @@ -31,4 +31,20 @@ public interface ProducerConfigurationService { public ProducerConfiguration getConfiguration(); + + /** + * Reloads the producer configuration from persistent storage. + * + * @throws Exception + * @since 2.6.3 + */ + void reloadConfiguration() throws Exception; + + /** + * Saves the producer configuration to persistent storage. + * + * @throws Exception + * @since 2.6.3 + */ + void saveConfiguration() throws Exception; } Modified: branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/w= srp/producer/config/impl/ProducerConfigurationServiceImpl.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/wsrp/pr= oducer/config/impl/ProducerConfigurationServiceImpl.java 2007-10-05 15:42:1= 0 UTC (rev 8540) +++ branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/wsrp/pr= oducer/config/impl/ProducerConfigurationServiceImpl.java 2007-10-05 15:50:2= 2 UTC (rev 8541) @@ -23,15 +23,32 @@ = package org.jboss.portal.wsrp.producer.config.impl; = +import org.jboss.mx.util.MBeanServerLocator; +import org.jboss.mx.util.ObjectNameFactory; import org.jboss.portal.common.net.URLTools; import org.jboss.portal.jems.as.system.AbstractJBossService; import org.jboss.portal.wsrp.producer.config.ProducerConfiguration; import org.jboss.portal.wsrp.producer.config.ProducerConfigurationFactory; +import org.jboss.portal.wsrp.producer.config.ProducerConfigurationProvider; import org.jboss.portal.wsrp.producer.config.ProducerConfigurationService; +import org.jboss.xb.binding.JBossXBException; import org.jboss.xb.binding.ObjectModelFactory; +import org.jboss.xb.binding.ObjectModelProvider; import org.jboss.xb.binding.Unmarshaller; import org.jboss.xb.binding.UnmarshallerFactory; +import org.jboss.xb.binding.XercesXsMarshaller; = +import javax.management.MBeanServer; +import javax.management.ObjectName; +import java.io.BufferedWriter; +import java.io.File; +import java.io.FileWriter; +import java.io.IOException; +import java.io.InputStream; +import java.io.InputStreamReader; +import java.io.Reader; +import java.io.StringWriter; +import java.io.Writer; import java.net.URL; import java.util.Enumeration; = @@ -45,6 +62,10 @@ private String configLocation; private ProducerConfiguration configuration; = + + private File dataDir; + private File config; + public String getConfigLocation() { return configLocation; @@ -63,32 +84,119 @@ = protected void startService() throws Exception { - // Setup URLs - if (configLocation =3D=3D null) + MBeanServer server =3D MBeanServerLocator.locateJBoss(); + ObjectName oname =3D ObjectNameFactory.create("jboss.system:type=3DS= erverConfig"); + try { - throw new Exception("The config location is null"); + dataDir =3D (File)server.getAttribute(oname, "ServerDataDir"); } - - // make sure we pick the furthest down the path in case there's seve= ral similarly named resources in the path - Enumeration resources =3D Thread.currentThread().getContextClassLoad= er().getResources(configLocation); - URL configURL =3D null; - while (resources.hasMoreElements()) + catch (Exception e) { - configURL =3D (URL)resources.nextElement(); + throw new RuntimeException("Couldn't locate server data dir!", e); } + config =3D new File(dataDir, "portal/wsrp-producer-config.xml"); = - if (configURL =3D=3D null) + reloadConfiguration(); + } + + public void reloadConfiguration() throws Exception + { + URL configURL =3D getConfigLocationURL(); + + try { - throw new Exception("The config " + configLocation + " does not e= xist"); + loadConfigurationAt(configURL); } - if (!URLTools.exists(configURL)) + catch (Exception e) { - throw new Exception("The config " + configURL + " does not exist"= ); + if (config.exists()) + { + log.debug("Configuration saved at " + config.getCanonicalPath() + + " is not loading properly. Falling back to default config= uration."); + config.delete(); // delete improper config so that we retrieve= the default configuration + loadConfigurationAt(getConfigLocationURL()); + } } + } = + private void loadConfigurationAt(URL configURL) throws JBossXBException= , IOException + { log.debug("About to parse producer configuration " + configURL); Unmarshaller unmarshaller =3D UnmarshallerFactory.newInstance().newU= nmarshaller(); ObjectModelFactory factory =3D new ProducerConfigurationFactory(); configuration =3D (ProducerConfiguration)unmarshaller.unmarshal(conf= igURL.openStream(), factory, null); } + + private URL getConfigLocationURL() throws Exception + { + if (!config.exists()) + { + // Setup URLs + if (configLocation =3D=3D null) + { + throw new Exception("The config location is null"); + } + + // make sure we pick the furthest down the path in case there's s= everal similarly named resources in the path + Enumeration resources =3D Thread.currentThread().getContextClassL= oader().getResources(configLocation); + URL configURL =3D null; + while (resources.hasMoreElements()) + { + configURL =3D (URL)resources.nextElement(); + } + + if (configURL =3D=3D null) + { + throw new Exception("The config " + configLocation + " does no= t exist"); + } + if (!URLTools.exists(configURL)) + { + throw new Exception("The config " + configURL + " does not exi= st"); + } + return configURL; + } + else + { + return config.toURL(); + } + } + + public void saveConfiguration() throws Exception + { + // get the output writer to write the XML content + StringWriter xmlOutput =3D new StringWriter(); + + // get the XML Schema source + InputStream is =3D Thread.currentThread().getContextClassLoader().ge= tResourceAsStream("xsd/jboss-wsrp-producer_2_6.xsd"); + + Reader xsReader =3D new InputStreamReader(is); + + // create an instance of XML Schema marshaller + XercesXsMarshaller marshaller =3D new XercesXsMarshaller(); + + // we need to specify what elements are top most (roots) providing n= amespace URI, prefix and local name + marshaller.addRootElement("urn:jboss:portal:wsrp:producer:v2_6", "",= "producer-configuration"); + + // declare default namespace + marshaller.declareNamespace(null, "urn:jboss:portal:wsrp:producer:v2= _6"); + + // add schema location by declaring xsi namespace and adding xsi:sch= emaLocation attribute + marshaller.declareNamespace("xsi", "http://www.w3.org/2001/XMLSchema= -instance"); + marshaller.addAttribute("xsi", "schemaLocation", "string", "urn:jbos= s:portal:wsrp:producer:v2_6 xsd/jboss-wsrp-producer_2_6.xsd"); + + // create an instance of Object Model Provider + ObjectModelProvider provider =3D new ProducerConfigurationProvider(); + + marshaller.setProperty("org.jboss.xml.binding.marshalling.indent", "= true"); + marshaller.marshal(xsReader, provider, configuration, xmlOutput); + + // close XML Schema reader + xsReader.close(); + + config.createNewFile(); + Writer configFile =3D new BufferedWriter(new FileWriter(config)); + configFile.write(xmlOutput.toString()); + configFile.flush(); + configFile.close(); + } } Modified: branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/w= srp/producer/config/impl/ProducerRegistrationRequirementsImpl.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/wsrp/pr= oducer/config/impl/ProducerRegistrationRequirementsImpl.java 2007-10-05 15:= 42:10 UTC (rev 8540) +++ branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/wsrp/pr= oducer/config/impl/ProducerRegistrationRequirementsImpl.java 2007-10-05 15:= 50:22 UTC (rev 8541) @@ -192,9 +192,11 @@ if (policy !=3D null) { policyClassName =3D policy.getClass().getName(); - if (DEFAULT_POLICY_CLASS_NAME.equals(policyClassName)) + + if (policy instanceof DefaultRegistrationPolicy) { - validatorClassName =3D ((DefaultRegistrationPolicy)policy).get= Validator().getClass().getName(); + DefaultRegistrationPolicy registrationPolicy =3D (DefaultRegis= trationPolicy)policy; + validatorClassName =3D registrationPolicy.getValidator().getCl= ass().getName(); } } } @@ -212,7 +214,7 @@ = public void reloadPolicyFrom(String policyClassName, String validatorCl= assName) { - if (policyClassName !=3D null) + if (policyClassName !=3D null && !DEFAULT_POLICY_CLASS_NAME.equals(p= olicyClassName)) { log.debug("Using registration policy: " + policyClassName); ClassLoader loader =3D Thread.currentThread().getContextClassLoad= er(); Added: branches/JBoss_Portal_Branch_2_6/wsrp/src/resources/portal-wsrp-sar/= xsd/jboss-wsrp-producer_2_6.xsd =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/wsrp/src/resources/portal-wsrp-sar/xsd= /jboss-wsrp-producer_2_6.xsd (rev 0) +++ branches/JBoss_Portal_Branch_2_6/wsrp/src/resources/portal-wsrp-sar/xsd= /jboss-wsrp-producer_2_6.xsd 2007-10-05 15:50:22 UTC (rev 8541) @@ -0,0 +1,67 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + --===============8294222517066533222==-- From portal-commits at lists.jboss.org Fri Oct 5 12:04:07 2007 Content-Type: multipart/mixed; boundary="===============1360435529129058624==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8542 - in trunk: core-wsrp/src/resources/portal-wsrp-admin-war/WEB-INF and 5 other directories. Date: Fri, 05 Oct 2007 12:04:07 -0400 Message-ID: --===============1360435529129058624== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: chris.laprun(a)jboss.com Date: 2007-10-05 12:04:06 -0400 (Fri, 05 Oct 2007) New Revision: 8542 Added: trunk/wsrp/src/main/org/jboss/portal/wsrp/producer/config/ProducerConfig= urationProvider.java trunk/wsrp/src/resources/portal-wsrp-sar/xsd/ trunk/wsrp/src/resources/portal-wsrp-sar/xsd/jboss-wsrp-producer_2_6.xsd Removed: trunk/wsrp/src/resources/portal-wsrp-sar/xsd/jboss-wsrp-producer_2_6.xsd Modified: trunk/core-wsrp/src/main/org/jboss/portal/wsrp/admin/ui/ManagedBean.java trunk/core-wsrp/src/main/org/jboss/portal/wsrp/admin/ui/ProducerBean.java trunk/core-wsrp/src/resources/portal-wsrp-admin-war/WEB-INF/faces-config= .xml trunk/wsrp/build.xml trunk/wsrp/src/main/org/jboss/portal/wsrp/producer/config/ProducerConfig= urationService.java trunk/wsrp/src/main/org/jboss/portal/wsrp/producer/config/impl/ProducerC= onfigurationServiceImpl.java trunk/wsrp/src/main/org/jboss/portal/wsrp/producer/config/impl/ProducerR= egistrationRequirementsImpl.java Log: - JBPORTAL-1715: Added support for saving producer configuration (finally f= igured out that you can't use a FileWriter directly to marshall objects wit= h XB). - Added XML Schema version of the producer configuration file format (requi= red for XB marshalling to work properly, haven't been able to use the DTD f= or that purpose). - Added logging to ManagedBean. Modified: trunk/core-wsrp/src/main/org/jboss/portal/wsrp/admin/ui/ManagedBe= an.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/core-wsrp/src/main/org/jboss/portal/wsrp/admin/ui/ManagedBean.jav= a 2007-10-05 15:50:22 UTC (rev 8541) +++ trunk/core-wsrp/src/main/org/jboss/portal/wsrp/admin/ui/ManagedBean.jav= a 2007-10-05 16:04:06 UTC (rev 8542) @@ -23,6 +23,9 @@ = package org.jboss.portal.wsrp.admin.ui; = +import org.jboss.logging.Logger; + + /** * @author Chris Laprun * @version $Revision: 7509 $ @@ -30,6 +33,8 @@ */ public class ManagedBean { + protected Logger log =3D Logger.getLogger(getClass()); + protected BeanContext beanContext; = public void setBeanContext(BeanContext beanContext) Modified: trunk/core-wsrp/src/main/org/jboss/portal/wsrp/admin/ui/ProducerB= ean.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/core-wsrp/src/main/org/jboss/portal/wsrp/admin/ui/ProducerBean.ja= va 2007-10-05 15:50:22 UTC (rev 8541) +++ trunk/core-wsrp/src/main/org/jboss/portal/wsrp/admin/ui/ProducerBean.ja= va 2007-10-05 16:04:06 UTC (rev 8542) @@ -26,6 +26,7 @@ import org.jboss.portal.registration.RegistrationPolicy; import org.jboss.portal.registration.policies.DefaultRegistrationPolicy; import org.jboss.portal.wsrp.producer.config.ProducerConfiguration; +import org.jboss.portal.wsrp.producer.config.ProducerConfigurationService; import org.jboss.portal.wsrp.producer.config.ProducerRegistrationRequireme= nts; import org.jboss.portal.wsrp.registration.RegistrationPropertyDescription; = @@ -43,20 +44,25 @@ */ public class ProducerBean extends ManagedBean { - private ProducerConfiguration configuration; + private ProducerConfigurationService configurationService; private String policyClassName; private String validatorClassName; = - public ProducerConfiguration getConfiguration() + public ProducerConfigurationService getConfigurationService() { - return configuration; + return configurationService; } = - public void setConfiguration(ProducerConfiguration configuration) + public void setConfigurationService(ProducerConfigurationService config= urationService) { - this.configuration =3D configuration; + this.configurationService =3D configurationService; } = + public ProducerConfiguration getConfiguration() + { + return configurationService.getConfiguration(); + } + public boolean isRegistrationRequiredForFullDescription() { return getRegRequirements().isRegistrationRequiredForFullDescription= (); @@ -64,7 +70,7 @@ = private ProducerRegistrationRequirements getRegRequirements() { - return configuration.getRegistrationRequirements(); + return getConfiguration().getRegistrationRequirements(); } = public void setRegistrationRequiredForFullDescription(boolean requireRe= gForFullDescription) @@ -139,4 +145,18 @@ { return Collections.singletonList(new SelectItem("xsd:string")); } + + public String save() + { + try + { + configurationService.saveConfiguration(); + } + catch (Exception e) + { + log.debug(e); + beanContext.createErrorMessage("status", "Couldn't save producer = configuration. Cause: " + e.getLocalizedMessage()); + } + return null; + } } Modified: trunk/core-wsrp/src/resources/portal-wsrp-admin-war/WEB-INF/faces= -config.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/core-wsrp/src/resources/portal-wsrp-admin-war/WEB-INF/faces-confi= g.xml 2007-10-05 15:50:22 UTC (rev 8541) +++ trunk/core-wsrp/src/resources/portal-wsrp-admin-war/WEB-INF/faces-confi= g.xml 2007-10-05 16:04:06 UTC (rev 8542) @@ -85,9 +85,9 @@ org.jboss.portal.wsrp.admin.ui.ProducerBean session - configuration - org.jboss.portal.wsrp.producer.config.ProducerCon= figuration - #{applicationScope.ProducerConfigurationService.configurat= ion} + configurationService + org.jboss.portal.wsrp.producer.config.ProducerCon= figurationService + #{applicationScope.ProducerConfigurationService} beanContext Modified: trunk/wsrp/build.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/wsrp/build.xml 2007-10-05 15:50:22 UTC (rev 8541) +++ trunk/wsrp/build.xml 2007-10-05 16:04:06 UTC (rev 8542) @@ -133,6 +133,7 @@ = + @@ -158,12 +159,12 @@ - = + = - = + = @@ -319,13 +320,14 @@ = - - + + + @@ -860,11 +862,11 @@ - = + = - = = + Copied: trunk/wsrp/src/main/org/jboss/portal/wsrp/producer/config/ProducerC= onfigurationProvider.java (from rev 8541, branches/JBoss_Portal_Branch_2_6/= wsrp/src/main/org/jboss/portal/wsrp/producer/config/ProducerConfigurationPr= ovider.java) =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/wsrp/src/main/org/jboss/portal/wsrp/producer/config/ProducerConfi= gurationProvider.java (rev 0) +++ trunk/wsrp/src/main/org/jboss/portal/wsrp/producer/config/ProducerConfi= gurationProvider.java 2007-10-05 16:04:06 UTC (rev 8542) @@ -0,0 +1,147 @@ +/*************************************************************************= ***** + * JBoss, a division of Red Hat = * + * Copyright 2007, Red Hat Middleware, LLC, and individual = * + * contributors as indicated by the @authors tag. See the = * + * copyright.txt in the distribution for a full listing of = * + * individual contributors. = * + * = * + * This is free software; you can redistribute it and/or modify it = * + * under the terms of the GNU Lesser General Public License as = * + * published by the Free Software Foundation; either version 2.1 of = * + * the License, or (at your option) any later version. = * + * = * + * This software is distributed in the hope that it will be useful, = * + * but WITHOUT ANY WARRANTY; without even the implied warranty of = * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU = * + * Lesser General Public License for more details. = * + * = * + * You should have received a copy of the GNU Lesser General Public = * + * License along with this software; if not, write to the Free = * + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA = * + * 02110-1301 USA, or see the FSF site: http://www.fsf.org. = * + *************************************************************************= *****/ + +package org.jboss.portal.wsrp.producer.config; + +import org.jboss.portal.registration.RegistrationPolicy; +import org.jboss.portal.registration.policies.DefaultRegistrationPolicy; +import org.jboss.portal.wsrp.producer.config.impl.ProducerConfigurationImp= l; +import org.jboss.portal.wsrp.producer.config.impl.ProducerRegistrationRequ= irementsImpl; +import org.jboss.portal.wsrp.registration.LocalizedString; +import org.jboss.portal.wsrp.registration.RegistrationPropertyDescription; +import org.jboss.xb.binding.MarshallingContext; +import org.jboss.xb.binding.ObjectModelProvider; + +/** + * @author Chris Laprun + * @version $Revision$ + * @since 2.6.3 + */ +public class ProducerConfigurationProvider implements ObjectModelProvider +{ + public Object getRoot(Object o, MarshallingContext marshallingContext, = String s, String s1) + { + return o; + } + + public Object getChildren(ProducerConfigurationImpl configuration, Stri= ng namespaceUri, String localName) + { + if ("registration-configuration".equals(localName)) + { + ProducerRegistrationRequirements registrationRequirements =3D con= figuration.getRegistrationRequirements(); + if (registrationRequirements !=3D null && registrationRequirement= s.isRegistrationRequired()) + { + return registrationRequirements; + } + } + else if ("producer-configuration".equals(localName)) + { + return configuration; + } + + return null; + } + + public Object getChildren(ProducerRegistrationRequirementsImpl regReq, = String namespaceUri, String localName) + { + if ("registration-property-description".equals(localName)) + { + return regReq.getRegistrationProperties().values(); + } + + return null; + } + + public Object getAttributeValue(ProducerConfigurationImpl configuration= , String namespaceUri, String localName) + { + if ("fullServiceDescriptionRequiresRegistration".equals(localName)) + { + return configuration.getRegistrationRequirements().isRegistration= RequiredForFullDescription(); + } + + return null; + } + + public Object getElementValue(ProducerRegistrationRequirementsImpl regR= eq, String namespaceUri, String localName) + { + Object value =3D null; + if ("registration-policy".equals(localName)) + { + RegistrationPolicy policy =3D regReq.getPolicy(); + if (policy !=3D null) + { + value =3D policy.getClass().getName(); + } + } + else if ("registration-property-validator".equals(localName)) + { + RegistrationPolicy policy =3D regReq.getPolicy(); + if (policy instanceof DefaultRegistrationPolicy) + { + DefaultRegistrationPolicy defaultRegistrationPolicy =3D (Defau= ltRegistrationPolicy)policy; + value =3D defaultRegistrationPolicy.getValidator().getClass().= getName(); + } + } + else + { + value =3D null; + } + return value; + } + + public Object getElementValue(RegistrationPropertyDescription propertyD= escription, String namespaceUri, String localName) + { + Object value =3D null; + if ("name".equals(localName)) + { + value =3D propertyDescription.getName(); + } + else if ("type".equals(localName)) + { + value =3D propertyDescription.getType(); + } + else if ("label".equals(localName)) + { + value =3D propertyDescription.getLabel(); + } + else if ("hint".equals(localName)) + { + value =3D propertyDescription.getHint(); + } + return value; + } + + public Object getAttributeValue(LocalizedString localizedString, String= namespaceUri, String localName) + { + Object value =3D null; + if ("lang".equals(localName)) + { + value =3D localizedString.getLocale().getCountry(); + } + else if ("resourceName".equals(localName)) + { + value =3D localizedString.getResourceName(); + } + return value; + } +} Modified: trunk/wsrp/src/main/org/jboss/portal/wsrp/producer/config/Produce= rConfigurationService.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/wsrp/src/main/org/jboss/portal/wsrp/producer/config/ProducerConfi= gurationService.java 2007-10-05 15:50:22 UTC (rev 8541) +++ trunk/wsrp/src/main/org/jboss/portal/wsrp/producer/config/ProducerConfi= gurationService.java 2007-10-05 16:04:06 UTC (rev 8542) @@ -31,4 +31,20 @@ public interface ProducerConfigurationService { public ProducerConfiguration getConfiguration(); + + /** + * Reloads the producer configuration from persistent storage. + * + * @throws Exception + * @since 2.6.3 + */ + void reloadConfiguration() throws Exception; + + /** + * Saves the producer configuration to persistent storage. + * + * @throws Exception + * @since 2.6.3 + */ + void saveConfiguration() throws Exception; } Modified: trunk/wsrp/src/main/org/jboss/portal/wsrp/producer/config/impl/Pr= oducerConfigurationServiceImpl.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/wsrp/src/main/org/jboss/portal/wsrp/producer/config/impl/Producer= ConfigurationServiceImpl.java 2007-10-05 15:50:22 UTC (rev 8541) +++ trunk/wsrp/src/main/org/jboss/portal/wsrp/producer/config/impl/Producer= ConfigurationServiceImpl.java 2007-10-05 16:04:06 UTC (rev 8542) @@ -23,15 +23,32 @@ = package org.jboss.portal.wsrp.producer.config.impl; = +import org.jboss.mx.util.MBeanServerLocator; +import org.jboss.mx.util.ObjectNameFactory; import org.jboss.portal.common.net.URLTools; import org.jboss.portal.jems.as.system.AbstractJBossService; import org.jboss.portal.wsrp.producer.config.ProducerConfiguration; import org.jboss.portal.wsrp.producer.config.ProducerConfigurationFactory; +import org.jboss.portal.wsrp.producer.config.ProducerConfigurationProvider; import org.jboss.portal.wsrp.producer.config.ProducerConfigurationService; +import org.jboss.xb.binding.JBossXBException; import org.jboss.xb.binding.ObjectModelFactory; +import org.jboss.xb.binding.ObjectModelProvider; import org.jboss.xb.binding.Unmarshaller; import org.jboss.xb.binding.UnmarshallerFactory; +import org.jboss.xb.binding.XercesXsMarshaller; = +import javax.management.MBeanServer; +import javax.management.ObjectName; +import java.io.BufferedWriter; +import java.io.File; +import java.io.FileWriter; +import java.io.IOException; +import java.io.InputStream; +import java.io.InputStreamReader; +import java.io.Reader; +import java.io.StringWriter; +import java.io.Writer; import java.net.URL; import java.util.Enumeration; = @@ -45,6 +62,10 @@ private String configLocation; private ProducerConfiguration configuration; = + + private File dataDir; + private File config; + public String getConfigLocation() { return configLocation; @@ -63,32 +84,119 @@ = protected void startService() throws Exception { - // Setup URLs - if (configLocation =3D=3D null) + MBeanServer server =3D MBeanServerLocator.locateJBoss(); + ObjectName oname =3D ObjectNameFactory.create("jboss.system:type=3DS= erverConfig"); + try { - throw new Exception("The config location is null"); + dataDir =3D (File)server.getAttribute(oname, "ServerDataDir"); } - - // make sure we pick the furthest down the path in case there's seve= ral similarly named resources in the path - Enumeration resources =3D Thread.currentThread().getContextClassLoad= er().getResources(configLocation); - URL configURL =3D null; - while (resources.hasMoreElements()) + catch (Exception e) { - configURL =3D (URL)resources.nextElement(); + throw new RuntimeException("Couldn't locate server data dir!", e); } + config =3D new File(dataDir, "portal/wsrp-producer-config.xml"); = - if (configURL =3D=3D null) + reloadConfiguration(); + } + + public void reloadConfiguration() throws Exception + { + URL configURL =3D getConfigLocationURL(); + + try { - throw new Exception("The config " + configLocation + " does not e= xist"); + loadConfigurationAt(configURL); } - if (!URLTools.exists(configURL)) + catch (Exception e) { - throw new Exception("The config " + configURL + " does not exist"= ); + if (config.exists()) + { + log.debug("Configuration saved at " + config.getCanonicalPath() + + " is not loading properly. Falling back to default config= uration."); + config.delete(); // delete improper config so that we retrieve= the default configuration + loadConfigurationAt(getConfigLocationURL()); + } } + } = + private void loadConfigurationAt(URL configURL) throws JBossXBException= , IOException + { log.debug("About to parse producer configuration " + configURL); Unmarshaller unmarshaller =3D UnmarshallerFactory.newInstance().newU= nmarshaller(); ObjectModelFactory factory =3D new ProducerConfigurationFactory(); configuration =3D (ProducerConfiguration)unmarshaller.unmarshal(conf= igURL.openStream(), factory, null); } + + private URL getConfigLocationURL() throws Exception + { + if (!config.exists()) + { + // Setup URLs + if (configLocation =3D=3D null) + { + throw new Exception("The config location is null"); + } + + // make sure we pick the furthest down the path in case there's s= everal similarly named resources in the path + Enumeration resources =3D Thread.currentThread().getContextClassL= oader().getResources(configLocation); + URL configURL =3D null; + while (resources.hasMoreElements()) + { + configURL =3D (URL)resources.nextElement(); + } + + if (configURL =3D=3D null) + { + throw new Exception("The config " + configLocation + " does no= t exist"); + } + if (!URLTools.exists(configURL)) + { + throw new Exception("The config " + configURL + " does not exi= st"); + } + return configURL; + } + else + { + return config.toURL(); + } + } + + public void saveConfiguration() throws Exception + { + // get the output writer to write the XML content + StringWriter xmlOutput =3D new StringWriter(); + + // get the XML Schema source + InputStream is =3D Thread.currentThread().getContextClassLoader().ge= tResourceAsStream("xsd/jboss-wsrp-producer_2_6.xsd"); + + Reader xsReader =3D new InputStreamReader(is); + + // create an instance of XML Schema marshaller + XercesXsMarshaller marshaller =3D new XercesXsMarshaller(); + + // we need to specify what elements are top most (roots) providing n= amespace URI, prefix and local name + marshaller.addRootElement("urn:jboss:portal:wsrp:producer:v2_6", "",= "producer-configuration"); + + // declare default namespace + marshaller.declareNamespace(null, "urn:jboss:portal:wsrp:producer:v2= _6"); + + // add schema location by declaring xsi namespace and adding xsi:sch= emaLocation attribute + marshaller.declareNamespace("xsi", "http://www.w3.org/2001/XMLSchema= -instance"); + marshaller.addAttribute("xsi", "schemaLocation", "string", "urn:jbos= s:portal:wsrp:producer:v2_6 xsd/jboss-wsrp-producer_2_6.xsd"); + + // create an instance of Object Model Provider + ObjectModelProvider provider =3D new ProducerConfigurationProvider(); + + marshaller.setProperty("org.jboss.xml.binding.marshalling.indent", "= true"); + marshaller.marshal(xsReader, provider, configuration, xmlOutput); + + // close XML Schema reader + xsReader.close(); + + config.createNewFile(); + Writer configFile =3D new BufferedWriter(new FileWriter(config)); + configFile.write(xmlOutput.toString()); + configFile.flush(); + configFile.close(); + } } Modified: trunk/wsrp/src/main/org/jboss/portal/wsrp/producer/config/impl/Pr= oducerRegistrationRequirementsImpl.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/wsrp/src/main/org/jboss/portal/wsrp/producer/config/impl/Producer= RegistrationRequirementsImpl.java 2007-10-05 15:50:22 UTC (rev 8541) +++ trunk/wsrp/src/main/org/jboss/portal/wsrp/producer/config/impl/Producer= RegistrationRequirementsImpl.java 2007-10-05 16:04:06 UTC (rev 8542) @@ -192,9 +192,11 @@ if (policy !=3D null) { policyClassName =3D policy.getClass().getName(); - if (DEFAULT_POLICY_CLASS_NAME.equals(policyClassName)) + + if (policy instanceof DefaultRegistrationPolicy) { - validatorClassName =3D ((DefaultRegistrationPolicy)policy).get= Validator().getClass().getName(); + DefaultRegistrationPolicy registrationPolicy =3D (DefaultRegis= trationPolicy)policy; + validatorClassName =3D registrationPolicy.getValidator().getCl= ass().getName(); } } } @@ -212,7 +214,7 @@ = public void reloadPolicyFrom(String policyClassName, String validatorCl= assName) { - if (policyClassName !=3D null) + if (policyClassName !=3D null && !DEFAULT_POLICY_CLASS_NAME.equals(p= olicyClassName)) { log.debug("Using registration policy: " + policyClassName); ClassLoader loader =3D Thread.currentThread().getContextClassLoad= er(); Copied: trunk/wsrp/src/resources/portal-wsrp-sar/xsd (from rev 8541, branch= es/JBoss_Portal_Branch_2_6/wsrp/src/resources/portal-wsrp-sar/xsd) Deleted: trunk/wsrp/src/resources/portal-wsrp-sar/xsd/jboss-wsrp-producer_2= _6.xsd =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/wsrp/src/resources/portal-wsrp-sar/xsd= /jboss-wsrp-producer_2_6.xsd 2007-10-05 15:50:22 UTC (rev 8541) +++ trunk/wsrp/src/resources/portal-wsrp-sar/xsd/jboss-wsrp-producer_2_6.xs= d 2007-10-05 16:04:06 UTC (rev 8542) @@ -1,67 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Copied: trunk/wsrp/src/resources/portal-wsrp-sar/xsd/jboss-wsrp-producer_2_= 6.xsd (from rev 8541, branches/JBoss_Portal_Branch_2_6/wsrp/src/resources/p= ortal-wsrp-sar/xsd/jboss-wsrp-producer_2_6.xsd) =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/wsrp/src/resources/portal-wsrp-sar/xsd/jboss-wsrp-producer_2_6.xs= d (rev 0) +++ trunk/wsrp/src/resources/portal-wsrp-sar/xsd/jboss-wsrp-producer_2_6.xs= d 2007-10-05 16:04:06 UTC (rev 8542) @@ -0,0 +1,67 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + --===============1360435529129058624==-- From portal-commits at lists.jboss.org Fri Oct 5 12:09:22 2007 Content-Type: multipart/mixed; boundary="===============7481854405443994761==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8543 - in modules/common/trunk: common and 1 other directories. Date: Fri, 05 Oct 2007 12:09:22 -0400 Message-ID: --===============7481854405443994761== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: julien(a)jboss.com Date: 2007-10-05 12:09:21 -0400 (Fri, 05 Oct 2007) New Revision: 8543 Modified: modules/common/trunk/common/pom.xml modules/common/trunk/mc/pom.xml modules/common/trunk/pom.xml Log: fixed typo in pom Modified: modules/common/trunk/common/pom.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/common/trunk/common/pom.xml 2007-10-05 16:04:06 UTC (rev 8542) +++ modules/common/trunk/common/pom.xml 2007-10-05 16:09:21 UTC (rev 8543) @@ -8,7 +8,7 @@ 4.0.0 jboss-portal-modules-common jar - Jboss Portal Modules Common + JBoss Portal Modules Common = = Modified: modules/common/trunk/mc/pom.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/common/trunk/mc/pom.xml 2007-10-05 16:04:06 UTC (rev 8542) +++ modules/common/trunk/mc/pom.xml 2007-10-05 16:09:21 UTC (rev 8543) @@ -8,7 +8,7 @@ 4.0.0 jboss-portal-modules-common-mc jar - Jboss Portal Modules Common MC + JBoss Portal Modules Common MC = = Modified: modules/common/trunk/pom.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/common/trunk/pom.xml 2007-10-05 16:04:06 UTC (rev 8542) +++ modules/common/trunk/pom.xml 2007-10-05 16:09:21 UTC (rev 8543) @@ -4,7 +4,7 @@ org.jboss.portal.common jboss-portal-modules-common-root pom - Jboss Portal Modules Common + JBoss Portal Modules Common 1.1.0-SNAPSHOT http://labs.jboss.com/jbossportal = --===============7481854405443994761==-- From portal-commits at lists.jboss.org Fri Oct 5 12:14:25 2007 Content-Type: multipart/mixed; boundary="===============4238057141346031652==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8544 - maven. Date: Fri, 05 Oct 2007 12:14:25 -0400 Message-ID: --===============4238057141346031652== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: wesleyhales Date: 2007-10-05 12:14:25 -0400 (Fri, 05 Oct 2007) New Revision: 8544 Modified: maven/pom.xml Log: changes to parent Modified: maven/pom.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- maven/pom.xml 2007-10-05 16:09:21 UTC (rev 8543) +++ maven/pom.xml 2007-10-05 16:14:25 UTC (rev 8544) @@ -12,6 +12,15 @@ = + repository.maven.org + Maven Repository + default + http://repo1.maven.org/maven2/ + + false + + + repository.jboss.org JBoss Repository default @@ -57,6 +66,17 @@ + org.apache.maven.plugins + maven-jar-plugin + + + + true + + + + + org.codehaus.mojo jboss-packaging-maven-plugin 2.0-SNAPSHOT @@ -103,9 +123,9 @@ = = - + + ../modules/common/trunk + = = --===============4238057141346031652==-- From portal-commits at lists.jboss.org Fri Oct 5 12:16:06 2007 Content-Type: multipart/mixed; boundary="===============7345263756845362860==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8545 - in modules/common/trunk: portal and 1 other directory. Date: Fri, 05 Oct 2007 12:16:06 -0400 Message-ID: --===============7345263756845362860== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: wesleyhales Date: 2007-10-05 12:16:06 -0400 (Fri, 05 Oct 2007) New Revision: 8545 Modified: modules/common/trunk/pom.xml modules/common/trunk/portal/pom.xml Log: naming changes Modified: modules/common/trunk/pom.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/common/trunk/pom.xml 2007-10-05 16:14:25 UTC (rev 8544) +++ modules/common/trunk/pom.xml 2007-10-05 16:16:06 UTC (rev 8545) @@ -1,127 +1,23 @@ + + org.jboss.portal + jboss-portal + 1.1.0-SNAPSHOT + 4.0.0 org.jboss.portal.common jboss-portal-modules-common-root pom JBoss Portal Modules Common 1.1.0-SNAPSHOT - http://labs.jboss.com/jbossportal = = - - - repository.maven.org - Maven Repository - default - http://repo1.maven.org/maven2/ - - false - - - - repository.jboss.org - JBoss Repository - default - http://repository.jboss.org/maven2/ - - false - - - - snapshots.jboss.org - JBoss Snapshots Repository - default - http://snapshots.jboss.org/maven2/ - - true - - - false - - - + = - - - - org.apache.maven.wagon - wagon-webdav - 1.0-beta-2 - - - - - - true - org.apache.maven.plugins - maven-compiler-plugin - - 1.5 - 1.5 - true - true - true - - - - org.apache.maven.plugins - maven-jar-plugin - - - - true - - - - - - org.codehaus.mojo - jboss-packaging-maven-plugin - 2.0-SNAPSHOT - true - - - maven-idea-plugin - - true - - - - org.jboss.maven.plugins - maven-jboss-deploy-plugin - 1.3 - - - - jboss-deploy - - - - - ${jboss.repository.root} - - - - - + = - - - - - - - - snapshots.jboss.org - JBoss Snapshot Repository - dav:https://snapshots.jboss.org/maven2 - true - - - common mc @@ -129,30 +25,6 @@ = = - - JIRA - http://jira.jboss.com/jira/browse/JBPORTAL - - - cruisecontrol - - - - - LGPL 2.1 - http://www.gnu.org/licenses/lgpl.html - repo - - GNU LESSER GENERAL PUBLIC LICENSE Version 2.1 - - - - - scm:svn:http://anonsvn.jboss.org/repos/portal/trunk - scm:svn:https://svn.jboss.org/repos/portal/trun= k - https://svn.jboss.org/repos/portal/trunk - - Modified: modules/common/trunk/portal/pom.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/common/trunk/portal/pom.xml 2007-10-05 16:14:25 UTC (rev 8544) +++ modules/common/trunk/portal/pom.xml 2007-10-05 16:16:06 UTC (rev 8545) @@ -8,7 +8,7 @@ 4.0.0 jboss-portal-modules-common-portal jar - Jboss Portal Modules Common Portal + JBoss Portal Modules Common Portal = = --===============7345263756845362860==-- From portal-commits at lists.jboss.org Fri Oct 5 12:26:22 2007 Content-Type: multipart/mixed; boundary="===============1079947316968689660==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8546 - modules/common/trunk. Date: Fri, 05 Oct 2007 12:26:22 -0400 Message-ID: --===============1079947316968689660== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: julien(a)jboss.com Date: 2007-10-05 12:26:22 -0400 (Fri, 05 Oct 2007) New Revision: 8546 Modified: modules/common/trunk/pom.xml Log: had to comment the parent, it is not able to obtain it and make compilation= fail Modified: modules/common/trunk/pom.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/common/trunk/pom.xml 2007-10-05 16:16:06 UTC (rev 8545) +++ modules/common/trunk/pom.xml 2007-10-05 16:26:22 UTC (rev 8546) @@ -1,10 +1,12 @@ + 4.0.0 org.jboss.portal.common jboss-portal-modules-common-root @@ -59,4 +61,4 @@ = = - \ No newline at end of file + --===============1079947316968689660==-- From portal-commits at lists.jboss.org Fri Oct 5 12:37:24 2007 Content-Type: multipart/mixed; boundary="===============6343840688004702057==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8547 - in modules/common/trunk: portal and 1 other directory. Date: Fri, 05 Oct 2007 12:37:24 -0400 Message-ID: --===============6343840688004702057== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: julien(a)jboss.com Date: 2007-10-05 12:37:23 -0400 (Fri, 05 Oct 2007) New Revision: 8547 Modified: modules/common/trunk/pom.xml modules/common/trunk/portal/pom.xml Log: revert changes Modified: modules/common/trunk/pom.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/common/trunk/pom.xml 2007-10-05 16:26:22 UTC (rev 8546) +++ modules/common/trunk/pom.xml 2007-10-05 16:37:23 UTC (rev 8547) @@ -1,25 +1,127 @@ - 4.0.0 org.jboss.portal.common jboss-portal-modules-common-root pom JBoss Portal Modules Common 1.1.0-SNAPSHOT + http://labs.jboss.com/jbossportal = = - + + + repository.maven.org + Maven Repository + default + http://repo1.maven.org/maven2/ + + false + + + + repository.jboss.org + JBoss Repository + default + http://repository.jboss.org/maven2/ + + false + + + + snapshots.jboss.org + JBoss Snapshots Repository + default + http://snapshots.jboss.org/maven2/ + + true + + + false + + + = - + + + + org.apache.maven.wagon + wagon-webdav + 1.0-beta-2 + + + + + + true + org.apache.maven.plugins + maven-compiler-plugin + + 1.5 + 1.5 + true + true + true + + + + org.apache.maven.plugins + maven-jar-plugin + + + + true + + + + + + org.codehaus.mojo + jboss-packaging-maven-plugin + 2.0-SNAPSHOT + true + + + maven-idea-plugin + + true + + + + org.jboss.maven.plugins + maven-jboss-deploy-plugin + 1.3 + + + + jboss-deploy + + + + + ${jboss.repository.root} + + + + + = + + + + + + + + snapshots.jboss.org + JBoss Snapshot Repository + dav:https://snapshots.jboss.org/maven2 + true + + + common mc @@ -27,6 +129,30 @@ = = + + JIRA + http://jira.jboss.com/jira/browse/JBPORTAL + + + cruisecontrol + + + + + LGPL 2.1 + http://www.gnu.org/licenses/lgpl.html + repo + + GNU LESSER GENERAL PUBLIC LICENSE Version 2.1 + + + + + scm:svn:http://anonsvn.jboss.org/repos/portal/trunk + scm:svn:https://svn.jboss.org/repos/portal/trun= k + https://svn.jboss.org/repos/portal/trunk + + @@ -61,4 +187,4 @@ = = - + \ No newline at end of file Modified: modules/common/trunk/portal/pom.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/common/trunk/portal/pom.xml 2007-10-05 16:26:22 UTC (rev 8546) +++ modules/common/trunk/portal/pom.xml 2007-10-05 16:37:23 UTC (rev 8547) @@ -8,7 +8,7 @@ 4.0.0 jboss-portal-modules-common-portal jar - JBoss Portal Modules Common Portal + Jboss Portal Modules Common Portal = = --===============6343840688004702057==-- From portal-commits at lists.jboss.org Fri Oct 5 12:38:43 2007 Content-Type: multipart/mixed; boundary="===============7402566968604097585==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8548 - modules/common/trunk/portal. Date: Fri, 05 Oct 2007 12:38:43 -0400 Message-ID: --===============7402566968604097585== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: julien(a)jboss.com Date: 2007-10-05 12:38:43 -0400 (Fri, 05 Oct 2007) New Revision: 8548 Modified: modules/common/trunk/portal/pom.xml Log: typo Modified: modules/common/trunk/portal/pom.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/common/trunk/portal/pom.xml 2007-10-05 16:37:23 UTC (rev 8547) +++ modules/common/trunk/portal/pom.xml 2007-10-05 16:38:43 UTC (rev 8548) @@ -8,7 +8,7 @@ 4.0.0 jboss-portal-modules-common-portal jar - Jboss Portal Modules Common Portal + JBoss Portal Modules Common Portal = = --===============7402566968604097585==-- From portal-commits at lists.jboss.org Fri Oct 5 15:39:44 2007 Content-Type: multipart/mixed; boundary="===============8495821558780807194==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8549 - in modules/test/trunk/unit/src/main/org/jboss: test/unit/pojo/junit and 5 other directories. Date: Fri, 05 Oct 2007 15:39:44 -0400 Message-ID: --===============8495821558780807194== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: julien(a)jboss.com Date: 2007-10-05 15:39:43 -0400 (Fri, 05 Oct 2007) New Revision: 8549 Added: modules/test/trunk/unit/src/main/org/jboss/unit/driver/impl/ modules/test/trunk/unit/src/main/org/jboss/unit/driver/impl/pojo/ modules/test/trunk/unit/src/main/org/jboss/unit/driver/impl/pojo/POJOPar= ameterInfo.java modules/test/trunk/unit/src/main/org/jboss/unit/driver/impl/pojo/POJOTes= tCaseInfo.java modules/test/trunk/unit/src/main/org/jboss/unit/driver/impl/pojo/POJOTes= tInfo.java modules/test/trunk/unit/src/main/org/jboss/unit/driver/impl/pojo/POJOTes= tSuiteDriver.java modules/test/trunk/unit/src/main/org/jboss/unit/driver/impl/pojo/POJOTes= tSuiteInfo.java Removed: modules/test/trunk/unit/src/main/org/jboss/unit/unit/pojo/POJOParameterI= nfo.java modules/test/trunk/unit/src/main/org/jboss/unit/unit/pojo/POJOTestCaseIn= fo.java modules/test/trunk/unit/src/main/org/jboss/unit/unit/pojo/POJOTestInfo.j= ava modules/test/trunk/unit/src/main/org/jboss/unit/unit/pojo/POJOTestSuiteD= river.java modules/test/trunk/unit/src/main/org/jboss/unit/unit/pojo/POJOTestSuiteI= nfo.java Modified: modules/test/trunk/unit/src/main/org/jboss/test/unit/pojo/TestDriverPOJO= Tests.java modules/test/trunk/unit/src/main/org/jboss/test/unit/pojo/junit/JUnitPOJ= OTests.java modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/pojo/POJOTes= tRunner.java Log: renamed org.jboss.unit.unit.pojo -> org.jboss.unit.driver.impl.pojo Modified: modules/test/trunk/unit/src/main/org/jboss/test/unit/pojo/TestDri= verPOJOTests.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/test/unit/pojo/TestDriverPOJ= OTests.java 2007-10-05 16:38:43 UTC (rev 8548) +++ modules/test/trunk/unit/src/main/org/jboss/test/unit/pojo/TestDriverPOJ= OTests.java 2007-10-05 19:39:43 UTC (rev 8549) @@ -23,7 +23,7 @@ package org.jboss.test.unit.pojo; = import org.jboss.unit.driver.TestDriver; -import org.jboss.unit.unit.pojo.POJOTestSuiteDriver; +import org.jboss.unit.driver.impl.pojo.POJOTestSuiteDriver; import static org.jboss.unit.api.Assert.*; = /** Modified: modules/test/trunk/unit/src/main/org/jboss/test/unit/pojo/junit/J= UnitPOJOTests.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/test/unit/pojo/junit/JUnitPO= JOTests.java 2007-10-05 16:38:43 UTC (rev 8548) +++ modules/test/trunk/unit/src/main/org/jboss/test/unit/pojo/junit/JUnitPO= JOTests.java 2007-10-05 19:39:43 UTC (rev 8549) @@ -22,7 +22,7 @@ *************************************************************************= *****/ package org.jboss.test.unit.pojo.junit; = -import org.jboss.unit.unit.pojo.POJOTestSuiteDriver; +import org.jboss.unit.driver.impl.pojo.POJOTestSuiteDriver; = import static org.jboss.unit.util.CollectionTools.*; import static org.jboss.unit.api.Assert.*; Added: modules/test/trunk/unit/src/main/org/jboss/unit/driver/impl/pojo/POJ= OParameterInfo.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/driver/impl/pojo/POJOPa= rameterInfo.java (rev 0) +++ modules/test/trunk/unit/src/main/org/jboss/unit/driver/impl/pojo/POJOPa= rameterInfo.java 2007-10-05 19:39:43 UTC (rev 8549) @@ -0,0 +1,59 @@ +/*************************************************************************= ***** + * JBoss, a division of Red Hat = * + * Copyright 2006, Red Hat Middleware, LLC, and individual = * + * contributors as indicated by the @authors tag. See the = * + * copyright.txt in the distribution for a full listing of = * + * individual contributors. = * + * = * + * This is free software; you can redistribute it and/or modify it = * + * under the terms of the GNU Lesser General Public License as = * + * published by the Free Software Foundation; either version 2.1 of = * + * the License, or (at your option) any later version. = * + * = * + * This software is distributed in the hope that it will be useful, = * + * but WITHOUT ANY WARRANTY; without even the implied warranty of = * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU = * + * Lesser General Public License for more details. = * + * = * + * You should have received a copy of the GNU Lesser General Public = * + * License along with this software; if not, write to the Free = * + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA = * + * 02110-1301 USA, or see the FSF site: http://www.fsf.org. = * + *************************************************************************= *****/ +package org.jboss.unit.driver.impl.pojo; + +import org.jboss.unit.spi.pojo.ParameterDescriptor; +import org.jboss.unit.info.ParameterInfo; + +import java.util.List; + +/** + * @author Julien Viet + * @version $Revision: 1.1 $ + */ +public class POJOParameterInfo implements ParameterInfo +{ + + /** . */ + private final ParameterDescriptor descriptor; + + public POJOParameterInfo(ParameterDescriptor descriptor) + { + this.descriptor =3D descriptor; + } + + public String getName() + { + return descriptor.getName(); + } + + public String getDescription() + { + return descriptor.getDescription(); + } + + public List getDefaultValues() + { + return descriptor.getDefaultValues(); + } +} Added: modules/test/trunk/unit/src/main/org/jboss/unit/driver/impl/pojo/POJ= OTestCaseInfo.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/driver/impl/pojo/POJOTe= stCaseInfo.java (rev 0) +++ modules/test/trunk/unit/src/main/org/jboss/unit/driver/impl/pojo/POJOTe= stCaseInfo.java 2007-10-05 19:39:43 UTC (rev 8549) @@ -0,0 +1,56 @@ +/*************************************************************************= ***** + * JBoss, a division of Red Hat = * + * Copyright 2006, Red Hat Middleware, LLC, and individual = * + * contributors as indicated by the @authors tag. See the = * + * copyright.txt in the distribution for a full listing of = * + * individual contributors. = * + * = * + * This is free software; you can redistribute it and/or modify it = * + * under the terms of the GNU Lesser General Public License as = * + * published by the Free Software Foundation; either version 2.1 of = * + * the License, or (at your option) any later version. = * + * = * + * This software is distributed in the hope that it will be useful, = * + * but WITHOUT ANY WARRANTY; without even the implied warranty of = * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU = * + * Lesser General Public License for more details. = * + * = * + * You should have received a copy of the GNU Lesser General Public = * + * License along with this software; if not, write to the Free = * + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA = * + * 02110-1301 USA, or see the FSF site: http://www.fsf.org. = * + *************************************************************************= *****/ +package org.jboss.unit.driver.impl.pojo; + +import org.jboss.unit.spi.pojo.TestCaseDescriptor; +import org.jboss.unit.info.TestCaseInfo; + +/** + * @author Julien Viet + * @version $Revision: 1.1 $ + */ +public class POJOTestCaseInfo extends POJOTestInfo implements TestCaseInfo +{ + + /** . */ + private TestCaseDescriptor descriptor; + + public POJOTestCaseInfo(TestCaseDescriptor descriptor) + { + super(descriptor.getParameters(), descriptor.getKeywords()); + + // + this.descriptor =3D descriptor; + } + + public String getName() + { + return descriptor.getName(); + } + + public String getDescription() + { + return descriptor.getDescription(); + } + +} Added: modules/test/trunk/unit/src/main/org/jboss/unit/driver/impl/pojo/POJ= OTestInfo.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/driver/impl/pojo/POJOTe= stInfo.java (rev 0) +++ modules/test/trunk/unit/src/main/org/jboss/unit/driver/impl/pojo/POJOTe= stInfo.java 2007-10-05 19:39:43 UTC (rev 8549) @@ -0,0 +1,69 @@ +/*************************************************************************= ***** + * JBoss, a division of Red Hat = * + * Copyright 2006, Red Hat Middleware, LLC, and individual = * + * contributors as indicated by the @authors tag. See the = * + * copyright.txt in the distribution for a full listing of = * + * individual contributors. = * + * = * + * This is free software; you can redistribute it and/or modify it = * + * under the terms of the GNU Lesser General Public License as = * + * published by the Free Software Foundation; either version 2.1 of = * + * the License, or (at your option) any later version. = * + * = * + * This software is distributed in the hope that it will be useful, = * + * but WITHOUT ANY WARRANTY; without even the implied warranty of = * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU = * + * Lesser General Public License for more details. = * + * = * + * You should have received a copy of the GNU Lesser General Public = * + * License along with this software; if not, write to the Free = * + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA = * + * 02110-1301 USA, or see the FSF site: http://www.fsf.org. = * + *************************************************************************= *****/ +package org.jboss.unit.driver.impl.pojo; + +import org.jboss.unit.info.ParameterInfo; +import org.jboss.unit.info.TestInfo; +import org.jboss.unit.spi.pojo.ParameterDescriptor; + +import java.util.Map; +import java.util.Set; +import java.util.HashMap; + +/** + * @author Julien Viet + * @version $Revision: 1.1 $ + */ +public abstract class POJOTestInfo implements TestInfo +{ + + /** . */ + private Map parameters; + + /** . */ + private Set keywords; + + public POJOTestInfo(Map parameter= Descriptors, Set keywords) + { + Map parameters =3D new HashMap(); + for (ParameterDescriptor parameterDescriptor : parameterDescriptors.= values()) + { + POJOParameterInfo parameterInfo =3D new POJOParameterInfo(paramet= erDescriptor); + parameters.put(parameterInfo.getName(), parameterInfo); + } + + // + this.parameters =3D parameters; + this.keywords =3D keywords; + } + + public Map getParameters() + { + return parameters; + } + + public Set getKeywords() + { + return keywords; + } +} Added: modules/test/trunk/unit/src/main/org/jboss/unit/driver/impl/pojo/POJ= OTestSuiteDriver.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/driver/impl/pojo/POJOTe= stSuiteDriver.java (rev 0) +++ modules/test/trunk/unit/src/main/org/jboss/unit/driver/impl/pojo/POJOTe= stSuiteDriver.java 2007-10-05 19:39:43 UTC (rev 8549) @@ -0,0 +1,203 @@ +/*************************************************************************= ***** + * JBoss, a division of Red Hat = * + * Copyright 2006, Red Hat Middleware, LLC, and individual = * + * contributors as indicated by the @authors tag. See the = * + * copyright.txt in the distribution for a full listing of = * + * individual contributors. = * + * = * + * This is free software; you can redistribute it and/or modify it = * + * under the terms of the GNU Lesser General Public License as = * + * published by the Free Software Foundation; either version 2.1 of = * + * the License, or (at your option) any later version. = * + * = * + * This software is distributed in the hope that it will be useful, = * + * but WITHOUT ANY WARRANTY; without even the implied warranty of = * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU = * + * Lesser General Public License for more details. = * + * = * + * You should have received a copy of the GNU Lesser General Public = * + * License along with this software; if not, write to the Free = * + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA = * + * 02110-1301 USA, or see the FSF site: http://www.fsf.org. = * + *************************************************************************= *****/ +package org.jboss.unit.driver.impl.pojo; + +import org.jboss.unit.spi.pojo.TestProvider; +import org.jboss.unit.spi.pojo.TestProviderSupport; +import org.jboss.unit.spi.pojo.TestCaseLifeCycleException; +import org.jboss.unit.spi.pojo.TestLifeCycle; +import org.jboss.unit.spi.pojo.TestCase; +import org.jboss.unit.spi.pojo.annotations.Provider; +import org.jboss.unit.driver.TestDriver; +import org.jboss.unit.driver.DriverResponse; +import org.jboss.unit.driver.DriverCommand; +import org.jboss.unit.driver.response.EndTestResponse; +import org.jboss.unit.driver.response.FailureResponse; +import org.jboss.unit.driver.command.StartTestCommand; +import org.jboss.unit.info.TestInfo; +import org.jboss.unit.info.TestSuiteInfo; +import org.jboss.unit.TestId; +import org.jboss.unit.Failure; + +import java.util.Map; +import java.lang.reflect.AnnotatedElement; +import java.lang.reflect.Constructor; +import java.lang.reflect.InvocationTargetException; +import java.lang.annotation.Annotation; + +/** + * @author Julien Viet + * @version $Revision: 1.1 $ + */ +public class POJOTestSuiteDriver implements TestDriver +{ + + /** . */ + private TestProvider provider; + + /** . */ + private TestSuiteInfo info; + + public POJOTestSuiteDriver(Class testClass) throws InstantiationExcepti= on, IllegalAccessException + { + // Get provider annotation + Provider provider =3D ((AnnotatedElement)testClass).getAnnotation(Pr= ovider.class); + + // Scan meta annotations + if (provider =3D=3D null) + { + for (Annotation annotation : testClass.getAnnotations()) + { + Class blah =3D annotation.annotationType(); + provider =3D ((AnnotatedElement)blah).getAnnotation(Provider.c= lass); + if (provider !=3D null) + { + break; + } + } + } + + if (provider !=3D null) + { + try + { + Class providerClass =3D provider.value= (); + Constructor providerCtor =3D providerC= lass.getConstructor(Class.class); + this.provider =3D providerCtor.newInstance(testClass); + } + catch (NoSuchMethodException e) + { + throw new IllegalArgumentException(e); + } + catch (InvocationTargetException e) + { + throw new IllegalArgumentException(e); + } + } +// else if (TestHandler.class.isAssignableFrom(testClass)) +// { +// handler =3D (TestHandler)testClass.newInstance(); +// } + else + { + this.provider =3D new TestProviderSupport(testClass); + } + + // + info =3D new POJOTestSuiteInfo(this.provider.getDescriptor()); + } + + public TestInfo getInfo() + { + return info; + } + + public DriverResponse invoke(TestId id, DriverCommand command) + { + if (command instanceof StartTestCommand) + { + StartTestCommand start =3D (StartTestCommand)command; + + // + if (id.getLength() =3D=3D 0) + { + throw new IllegalArgumentException(); + } + + // + TestLifeCycle lifeCycle =3D provider.getLifeCycle(); + + // + String name =3D id.getName(0); + + // + TestCase testCase; + try + { + testCase =3D lifeCycle.newTestCase(name); + } + catch (Exception e) + { + return createResponse(e); + } + + // + Map parametrization =3D start.getParametrization(); + + // + try + { + lifeCycle.testCaseParametrize(testCase, parametrization); + } + catch (Exception e) + { + return createResponse(e); + } + + // + try + { + lifeCycle.testCaseCreate(testCase); + + // + lifeCycle.testCaseInvoke(testCase); + } + catch (Exception e) + { + return createResponse(e); + } + finally + { + lifeCycle.testCaseDestroy(testCase); + } + + // + return new EndTestResponse(); + } + else + { + throw new IllegalArgumentException(); // convert to response style + } + } + + private DriverResponse createResponse(Throwable t) + { + if (t instanceof TestCaseLifeCycleException) + { + if (t.getCause() !=3D null) + { + t =3D t.getCause(); + } + } + + // + if (t instanceof AssertionError) + { + return new FailureResponse(Failure.createAssertionFailure((Assert= ionError)t)); + } + else + { + return new FailureResponse(Failure.createErrorFailure(t)); + } + } +} Added: modules/test/trunk/unit/src/main/org/jboss/unit/driver/impl/pojo/POJ= OTestSuiteInfo.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/driver/impl/pojo/POJOTe= stSuiteInfo.java (rev 0) +++ modules/test/trunk/unit/src/main/org/jboss/unit/driver/impl/pojo/POJOTe= stSuiteInfo.java 2007-10-05 19:39:43 UTC (rev 8549) @@ -0,0 +1,97 @@ +/*************************************************************************= ***** + * JBoss, a division of Red Hat = * + * Copyright 2006, Red Hat Middleware, LLC, and individual = * + * contributors as indicated by the @authors tag. See the = * + * copyright.txt in the distribution for a full listing of = * + * individual contributors. = * + * = * + * This is free software; you can redistribute it and/or modify it = * + * under the terms of the GNU Lesser General Public License as = * + * published by the Free Software Foundation; either version 2.1 of = * + * the License, or (at your option) any later version. = * + * = * + * This software is distributed in the hope that it will be useful, = * + * but WITHOUT ANY WARRANTY; without even the implied warranty of = * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU = * + * Lesser General Public License for more details. = * + * = * + * You should have received a copy of the GNU Lesser General Public = * + * License along with this software; if not, write to the Free = * + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA = * + * 02110-1301 USA, or see the FSF site: http://www.fsf.org. = * + *************************************************************************= *****/ +package org.jboss.unit.driver.impl.pojo; + +import org.jboss.unit.spi.pojo.TestCaseDescriptor; +import org.jboss.unit.spi.pojo.TestSuiteDescriptor; +import org.jboss.unit.info.TestSuiteInfo; +import org.jboss.unit.info.TestInfo; +import org.jboss.unit.TestId; + +import java.util.Set; +import java.util.Map; +import java.util.HashMap; + +/** + * @author Julien Viet + * @version $Revision: 1.1 $ + */ +public class POJOTestSuiteInfo extends POJOTestInfo implements TestSuiteIn= fo +{ + + /** . */ + private TestSuiteDescriptor descriptor; + + /** . */ + private Map testCases; + + public POJOTestSuiteInfo(TestSuiteDescriptor descriptor) + { + super(descriptor.getParameters(), descriptor.getKeywords()); + + // + HashMap testCases =3D new HashMap(); + for (TestCaseDescriptor testCaseDescriptor : descriptor.getTestCases= ().values()) + { + POJOTestCaseInfo testCase =3D new POJOTestCaseInfo(testCaseDescri= ptor); + testCases.put(testCase.getName(), testCase); + } + + // + this.descriptor =3D descriptor; + this.testCases =3D testCases; + } + + public String getName() + { + return descriptor.getName(); + } + + public String getDescription() + { + return descriptor.getDescription(); + } + + public TestInfo getTest(String name) + { + return testCases.get(name); + } + + public Set getNames() + { + return testCases.keySet(); + } + + public TestInfo findTest(TestId id) + { + switch(id.getLength()) + { + case 0: + return this; + case 1: + return getTest(id.getName(0)); + default: + return null; + } + } +} Modified: modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/pojo/= POJOTestRunner.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/pojo/POJOTe= stRunner.java 2007-10-05 16:38:43 UTC (rev 8548) +++ modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/pojo/POJOTe= stRunner.java 2007-10-05 19:39:43 UTC (rev 8549) @@ -33,18 +33,16 @@ import org.jboss.unit.runner.model.pojo.TestClassDef; import org.jboss.unit.runner.model.pojo.TestCaseDef; import org.jboss.unit.runner.model.TestDef; -import org.jboss.unit.FailureType; import org.jboss.unit.TestId; import org.jboss.unit.Failure; import org.jboss.unit.info.TestSuiteInfo; import org.jboss.unit.info.TestCaseInfo; -import org.jboss.unit.unit.pojo.POJOTestSuiteDriver; +import org.jboss.unit.driver.impl.pojo.POJOTestSuiteDriver; import org.jboss.unit.driver.TestDriver; = import java.util.List; import java.util.ArrayList; import java.util.Map; -import java.util.HashMap; = /** * @author Julien Viet Deleted: modules/test/trunk/unit/src/main/org/jboss/unit/unit/pojo/POJOPara= meterInfo.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/unit/pojo/POJOParameter= Info.java 2007-10-05 16:38:43 UTC (rev 8548) +++ modules/test/trunk/unit/src/main/org/jboss/unit/unit/pojo/POJOParameter= Info.java 2007-10-05 19:39:43 UTC (rev 8549) @@ -1,59 +0,0 @@ -/*************************************************************************= ***** - * JBoss, a division of Red Hat = * - * Copyright 2006, Red Hat Middleware, LLC, and individual = * - * contributors as indicated by the @authors tag. See the = * - * copyright.txt in the distribution for a full listing of = * - * individual contributors. = * - * = * - * This is free software; you can redistribute it and/or modify it = * - * under the terms of the GNU Lesser General Public License as = * - * published by the Free Software Foundation; either version 2.1 of = * - * the License, or (at your option) any later version. = * - * = * - * This software is distributed in the hope that it will be useful, = * - * but WITHOUT ANY WARRANTY; without even the implied warranty of = * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU = * - * Lesser General Public License for more details. = * - * = * - * You should have received a copy of the GNU Lesser General Public = * - * License along with this software; if not, write to the Free = * - * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA = * - * 02110-1301 USA, or see the FSF site: http://www.fsf.org. = * - *************************************************************************= *****/ -package org.jboss.unit.unit.pojo; - -import org.jboss.unit.spi.pojo.ParameterDescriptor; -import org.jboss.unit.info.ParameterInfo; - -import java.util.List; - -/** - * @author Julien Viet - * @version $Revision: 1.1 $ - */ -public class POJOParameterInfo implements ParameterInfo -{ - - /** . */ - private final ParameterDescriptor descriptor; - - public POJOParameterInfo(ParameterDescriptor descriptor) - { - this.descriptor =3D descriptor; - } - - public String getName() - { - return descriptor.getName(); - } - - public String getDescription() - { - return descriptor.getDescription(); - } - - public List getDefaultValues() - { - return descriptor.getDefaultValues(); - } -} Deleted: modules/test/trunk/unit/src/main/org/jboss/unit/unit/pojo/POJOTest= CaseInfo.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/unit/pojo/POJOTestCaseI= nfo.java 2007-10-05 16:38:43 UTC (rev 8548) +++ modules/test/trunk/unit/src/main/org/jboss/unit/unit/pojo/POJOTestCaseI= nfo.java 2007-10-05 19:39:43 UTC (rev 8549) @@ -1,56 +0,0 @@ -/*************************************************************************= ***** - * JBoss, a division of Red Hat = * - * Copyright 2006, Red Hat Middleware, LLC, and individual = * - * contributors as indicated by the @authors tag. See the = * - * copyright.txt in the distribution for a full listing of = * - * individual contributors. = * - * = * - * This is free software; you can redistribute it and/or modify it = * - * under the terms of the GNU Lesser General Public License as = * - * published by the Free Software Foundation; either version 2.1 of = * - * the License, or (at your option) any later version. = * - * = * - * This software is distributed in the hope that it will be useful, = * - * but WITHOUT ANY WARRANTY; without even the implied warranty of = * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU = * - * Lesser General Public License for more details. = * - * = * - * You should have received a copy of the GNU Lesser General Public = * - * License along with this software; if not, write to the Free = * - * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA = * - * 02110-1301 USA, or see the FSF site: http://www.fsf.org. = * - *************************************************************************= *****/ -package org.jboss.unit.unit.pojo; - -import org.jboss.unit.spi.pojo.TestCaseDescriptor; -import org.jboss.unit.info.TestCaseInfo; - -/** - * @author Julien Viet - * @version $Revision: 1.1 $ - */ -public class POJOTestCaseInfo extends POJOTestInfo implements TestCaseInfo -{ - - /** . */ - private TestCaseDescriptor descriptor; - - public POJOTestCaseInfo(TestCaseDescriptor descriptor) - { - super(descriptor.getParameters(), descriptor.getKeywords()); - - // - this.descriptor =3D descriptor; - } - - public String getName() - { - return descriptor.getName(); - } - - public String getDescription() - { - return descriptor.getDescription(); - } - -} Deleted: modules/test/trunk/unit/src/main/org/jboss/unit/unit/pojo/POJOTest= Info.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/unit/pojo/POJOTestInfo.= java 2007-10-05 16:38:43 UTC (rev 8548) +++ modules/test/trunk/unit/src/main/org/jboss/unit/unit/pojo/POJOTestInfo.= java 2007-10-05 19:39:43 UTC (rev 8549) @@ -1,69 +0,0 @@ -/*************************************************************************= ***** - * JBoss, a division of Red Hat = * - * Copyright 2006, Red Hat Middleware, LLC, and individual = * - * contributors as indicated by the @authors tag. See the = * - * copyright.txt in the distribution for a full listing of = * - * individual contributors. = * - * = * - * This is free software; you can redistribute it and/or modify it = * - * under the terms of the GNU Lesser General Public License as = * - * published by the Free Software Foundation; either version 2.1 of = * - * the License, or (at your option) any later version. = * - * = * - * This software is distributed in the hope that it will be useful, = * - * but WITHOUT ANY WARRANTY; without even the implied warranty of = * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU = * - * Lesser General Public License for more details. = * - * = * - * You should have received a copy of the GNU Lesser General Public = * - * License along with this software; if not, write to the Free = * - * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA = * - * 02110-1301 USA, or see the FSF site: http://www.fsf.org. = * - *************************************************************************= *****/ -package org.jboss.unit.unit.pojo; - -import org.jboss.unit.info.ParameterInfo; -import org.jboss.unit.info.TestInfo; -import org.jboss.unit.spi.pojo.ParameterDescriptor; - -import java.util.Map; -import java.util.Set; -import java.util.HashMap; - -/** - * @author Julien Viet - * @version $Revision: 1.1 $ - */ -public abstract class POJOTestInfo implements TestInfo -{ - - /** . */ - private Map parameters; - - /** . */ - private Set keywords; - - public POJOTestInfo(Map parameter= Descriptors, Set keywords) - { - Map parameters =3D new HashMap(); - for (ParameterDescriptor parameterDescriptor : parameterDescriptors.= values()) - { - POJOParameterInfo parameterInfo =3D new POJOParameterInfo(paramet= erDescriptor); - parameters.put(parameterInfo.getName(), parameterInfo); - } - - // - this.parameters =3D parameters; - this.keywords =3D keywords; - } - - public Map getParameters() - { - return parameters; - } - - public Set getKeywords() - { - return keywords; - } -} Deleted: modules/test/trunk/unit/src/main/org/jboss/unit/unit/pojo/POJOTest= SuiteDriver.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/unit/pojo/POJOTestSuite= Driver.java 2007-10-05 16:38:43 UTC (rev 8548) +++ modules/test/trunk/unit/src/main/org/jboss/unit/unit/pojo/POJOTestSuite= Driver.java 2007-10-05 19:39:43 UTC (rev 8549) @@ -1,203 +0,0 @@ -/*************************************************************************= ***** - * JBoss, a division of Red Hat = * - * Copyright 2006, Red Hat Middleware, LLC, and individual = * - * contributors as indicated by the @authors tag. See the = * - * copyright.txt in the distribution for a full listing of = * - * individual contributors. = * - * = * - * This is free software; you can redistribute it and/or modify it = * - * under the terms of the GNU Lesser General Public License as = * - * published by the Free Software Foundation; either version 2.1 of = * - * the License, or (at your option) any later version. = * - * = * - * This software is distributed in the hope that it will be useful, = * - * but WITHOUT ANY WARRANTY; without even the implied warranty of = * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU = * - * Lesser General Public License for more details. = * - * = * - * You should have received a copy of the GNU Lesser General Public = * - * License along with this software; if not, write to the Free = * - * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA = * - * 02110-1301 USA, or see the FSF site: http://www.fsf.org. = * - *************************************************************************= *****/ -package org.jboss.unit.unit.pojo; - -import org.jboss.unit.spi.pojo.TestProvider; -import org.jboss.unit.spi.pojo.TestProviderSupport; -import org.jboss.unit.spi.pojo.TestCaseLifeCycleException; -import org.jboss.unit.spi.pojo.TestLifeCycle; -import org.jboss.unit.spi.pojo.TestCase; -import org.jboss.unit.spi.pojo.annotations.Provider; -import org.jboss.unit.driver.TestDriver; -import org.jboss.unit.driver.DriverResponse; -import org.jboss.unit.driver.DriverCommand; -import org.jboss.unit.driver.response.EndTestResponse; -import org.jboss.unit.driver.response.FailureResponse; -import org.jboss.unit.driver.command.StartTestCommand; -import org.jboss.unit.info.TestInfo; -import org.jboss.unit.info.TestSuiteInfo; -import org.jboss.unit.TestId; -import org.jboss.unit.Failure; - -import java.util.Map; -import java.lang.reflect.AnnotatedElement; -import java.lang.reflect.Constructor; -import java.lang.reflect.InvocationTargetException; -import java.lang.annotation.Annotation; - -/** - * @author Julien Viet - * @version $Revision: 1.1 $ - */ -public class POJOTestSuiteDriver implements TestDriver -{ - - /** . */ - private TestProvider provider; - - /** . */ - private TestSuiteInfo info; - - public POJOTestSuiteDriver(Class testClass) throws InstantiationExcepti= on, IllegalAccessException - { - // Get provider annotation - Provider provider =3D ((AnnotatedElement)testClass).getAnnotation(Pr= ovider.class); - - // Scan meta annotations - if (provider =3D=3D null) - { - for (Annotation annotation : testClass.getAnnotations()) - { - Class blah =3D annotation.annotationType(); - provider =3D ((AnnotatedElement)blah).getAnnotation(Provider.c= lass); - if (provider !=3D null) - { - break; - } - } - } - - if (provider !=3D null) - { - try - { - Class providerClass =3D provider.value= (); - Constructor providerCtor =3D providerC= lass.getConstructor(Class.class); - this.provider =3D providerCtor.newInstance(testClass); - } - catch (NoSuchMethodException e) - { - throw new IllegalArgumentException(e); - } - catch (InvocationTargetException e) - { - throw new IllegalArgumentException(e); - } - } -// else if (TestHandler.class.isAssignableFrom(testClass)) -// { -// handler =3D (TestHandler)testClass.newInstance(); -// } - else - { - this.provider =3D new TestProviderSupport(testClass); - } - - // - info =3D new POJOTestSuiteInfo(this.provider.getDescriptor()); - } - - public TestInfo getInfo() - { - return info; - } - - public DriverResponse invoke(TestId id, DriverCommand command) - { - if (command instanceof StartTestCommand) - { - StartTestCommand start =3D (StartTestCommand)command; - - // - if (id.getLength() =3D=3D 0) - { - throw new IllegalArgumentException(); - } - - // - TestLifeCycle lifeCycle =3D provider.getLifeCycle(); - - // - String name =3D id.getName(0); - - // - TestCase testCase; - try - { - testCase =3D lifeCycle.newTestCase(name); - } - catch (Exception e) - { - return createResponse(e); - } - - // - Map parametrization =3D start.getParametrization(); - - // - try - { - lifeCycle.testCaseParametrize(testCase, parametrization); - } - catch (Exception e) - { - return createResponse(e); - } - - // - try - { - lifeCycle.testCaseCreate(testCase); - - // - lifeCycle.testCaseInvoke(testCase); - } - catch (Exception e) - { - return createResponse(e); - } - finally - { - lifeCycle.testCaseDestroy(testCase); - } - - // - return new EndTestResponse(); - } - else - { - throw new IllegalArgumentException(); // convert to response style - } - } - - private DriverResponse createResponse(Throwable t) - { - if (t instanceof TestCaseLifeCycleException) - { - if (t.getCause() !=3D null) - { - t =3D t.getCause(); - } - } - - // - if (t instanceof AssertionError) - { - return new FailureResponse(Failure.createAssertionFailure((Assert= ionError)t)); - } - else - { - return new FailureResponse(Failure.createErrorFailure(t)); - } - } -} Deleted: modules/test/trunk/unit/src/main/org/jboss/unit/unit/pojo/POJOTest= SuiteInfo.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/unit/pojo/POJOTestSuite= Info.java 2007-10-05 16:38:43 UTC (rev 8548) +++ modules/test/trunk/unit/src/main/org/jboss/unit/unit/pojo/POJOTestSuite= Info.java 2007-10-05 19:39:43 UTC (rev 8549) @@ -1,97 +0,0 @@ -/*************************************************************************= ***** - * JBoss, a division of Red Hat = * - * Copyright 2006, Red Hat Middleware, LLC, and individual = * - * contributors as indicated by the @authors tag. See the = * - * copyright.txt in the distribution for a full listing of = * - * individual contributors. = * - * = * - * This is free software; you can redistribute it and/or modify it = * - * under the terms of the GNU Lesser General Public License as = * - * published by the Free Software Foundation; either version 2.1 of = * - * the License, or (at your option) any later version. = * - * = * - * This software is distributed in the hope that it will be useful, = * - * but WITHOUT ANY WARRANTY; without even the implied warranty of = * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU = * - * Lesser General Public License for more details. = * - * = * - * You should have received a copy of the GNU Lesser General Public = * - * License along with this software; if not, write to the Free = * - * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA = * - * 02110-1301 USA, or see the FSF site: http://www.fsf.org. = * - *************************************************************************= *****/ -package org.jboss.unit.unit.pojo; - -import org.jboss.unit.spi.pojo.TestCaseDescriptor; -import org.jboss.unit.spi.pojo.TestSuiteDescriptor; -import org.jboss.unit.info.TestSuiteInfo; -import org.jboss.unit.info.TestInfo; -import org.jboss.unit.TestId; - -import java.util.Set; -import java.util.Map; -import java.util.HashMap; - -/** - * @author Julien Viet - * @version $Revision: 1.1 $ - */ -public class POJOTestSuiteInfo extends POJOTestInfo implements TestSuiteIn= fo -{ - - /** . */ - private TestSuiteDescriptor descriptor; - - /** . */ - private Map testCases; - - public POJOTestSuiteInfo(TestSuiteDescriptor descriptor) - { - super(descriptor.getParameters(), descriptor.getKeywords()); - - // - HashMap testCases =3D new HashMap(); - for (TestCaseDescriptor testCaseDescriptor : descriptor.getTestCases= ().values()) - { - POJOTestCaseInfo testCase =3D new POJOTestCaseInfo(testCaseDescri= ptor); - testCases.put(testCase.getName(), testCase); - } - - // - this.descriptor =3D descriptor; - this.testCases =3D testCases; - } - - public String getName() - { - return descriptor.getName(); - } - - public String getDescription() - { - return descriptor.getDescription(); - } - - public TestInfo getTest(String name) - { - return testCases.get(name); - } - - public Set getNames() - { - return testCases.keySet(); - } - - public TestInfo findTest(TestId id) - { - switch(id.getLength()) - { - case 0: - return this; - case 1: - return getTest(id.getName(0)); - default: - return null; - } - } -} --===============8495821558780807194==-- From portal-commits at lists.jboss.org Fri Oct 5 15:40:47 2007 Content-Type: multipart/mixed; boundary="===============1190461789847945352==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8550 - modules/test/trunk/unit/src/main/org/jboss/unit. Date: Fri, 05 Oct 2007 15:40:47 -0400 Message-ID: --===============1190461789847945352== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: julien(a)jboss.com Date: 2007-10-05 15:40:47 -0400 (Fri, 05 Oct 2007) New Revision: 8550 Removed: modules/test/trunk/unit/src/main/org/jboss/unit/unit/ Log: removed empty dir --===============1190461789847945352==-- From portal-commits at lists.jboss.org Fri Oct 5 15:45:42 2007 Content-Type: multipart/mixed; boundary="===============5568084294366748072==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8551 - modules/test/trunk/unit/src/main/org/jboss/unit/spi/pojo/annotations. Date: Fri, 05 Oct 2007 15:45:41 -0400 Message-ID: --===============5568084294366748072== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: julien(a)jboss.com Date: 2007-10-05 15:45:41 -0400 (Fri, 05 Oct 2007) New Revision: 8551 Modified: modules/test/trunk/unit/src/main/org/jboss/unit/spi/pojo/annotations/Pro= vider.java Log: - minor javadoc Modified: modules/test/trunk/unit/src/main/org/jboss/unit/spi/pojo/annotati= ons/Provider.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/spi/pojo/annotations/Pr= ovider.java 2007-10-05 19:40:47 UTC (rev 8550) +++ modules/test/trunk/unit/src/main/org/jboss/unit/spi/pojo/annotations/Pr= ovider.java 2007-10-05 19:45:41 UTC (rev 8551) @@ -31,6 +31,9 @@ import java.lang.annotation.ElementType; = /** + * An annotation used to specify the test provider of a pojo. It can be us= ed either directly on a tested pojo class + * or as a meta annotation for annotating an annotation of a tested pojo c= lass. + * * @author Julien Viet * @version $Revision: 1.1 $ */ @@ -39,5 +42,10 @@ @Target({ElementType.ANNOTATION_TYPE,ElementType.TYPE}) public @interface Provider { + /** + * The test provider class to use instead of the regular one. + * + * @return the test provider class + */ Class value(); } --===============5568084294366748072==-- From portal-commits at lists.jboss.org Sun Oct 7 18:44:26 2007 Content-Type: multipart/mixed; boundary="===============5612851308949164260==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8552 - in modules/test/trunk: unit and 7 other directories. Date: Sun, 07 Oct 2007 18:44:24 -0400 Message-ID: --===============5612851308949164260== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: bdaw Date: 2007-10-07 18:44:24 -0400 (Sun, 07 Oct 2007) New Revision: 8552 Added: modules/test/trunk/unit/src/main/org/jboss/unit/report/impl/ modules/test/trunk/unit/src/main/org/jboss/unit/report/impl/console/ modules/test/trunk/unit/src/main/org/jboss/unit/report/impl/console/Prin= tListener.java modules/test/trunk/unit/src/main/org/jboss/unit/tooling/ modules/test/trunk/unit/src/main/org/jboss/unit/tooling/ExcludeTestFilte= r.java modules/test/trunk/unit/src/main/org/jboss/unit/tooling/IncludeTestFilte= r.java modules/test/trunk/unit/src/main/org/jboss/unit/tooling/InfoTestFilter.j= ava modules/test/trunk/unit/src/main/org/jboss/unit/tooling/Main.java modules/test/trunk/unit/src/main/org/jboss/unit/tooling/MainBuilder.java modules/test/trunk/unit/src/main/org/jboss/unit/tooling/MainTestFilter.j= ava Removed: modules/test/trunk/unit/src/main/org/jboss/test/unit/PrintListener.java Modified: modules/test/trunk/tools/etc/buildfragments/defaults.ent modules/test/trunk/tools/etc/buildfragments/modules.ent modules/test/trunk/unit/build.xml modules/test/trunk/unit/src/main/org/jboss/test/unit/blah/BlahTestTwo.ja= va modules/test/trunk/unit/src/main/org/jboss/test/unit/blah/BlahTests.java Log: command line part of tolling support for jboss unit test framework (initial= stuff) Modified: modules/test/trunk/tools/etc/buildfragments/defaults.ent =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/tools/etc/buildfragments/defaults.ent 2007-10-05 19:= 45:41 UTC (rev 8551) +++ modules/test/trunk/tools/etc/buildfragments/defaults.ent 2007-10-07 22:= 44:24 UTC (rev 8552) @@ -118,8 +118,8 @@ = = - - + + = + + + + + Modified: modules/test/trunk/unit/build.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/build.xml 2007-10-05 19:45:41 UTC (rev 8551) +++ modules/test/trunk/unit/build.xml 2007-10-07 22:44:24 UTC (rev 8552) @@ -85,6 +85,7 @@ &libraries; + = = Deleted: modules/test/trunk/unit/src/main/org/jboss/test/unit/PrintListener= .java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/test/unit/PrintListener.java= 2007-10-05 19:45:41 UTC (rev 8551) +++ modules/test/trunk/unit/src/main/org/jboss/test/unit/PrintListener.java= 2007-10-07 22:44:24 UTC (rev 8552) @@ -1,88 +0,0 @@ -/*************************************************************************= ***** - * JBoss, a division of Red Hat = * - * Copyright 2006, Red Hat Middleware, LLC, and individual = * - * contributors as indicated by the @authors tag. See the = * - * copyright.txt in the distribution for a full listing of = * - * individual contributors. = * - * = * - * This is free software; you can redistribute it and/or modify it = * - * under the terms of the GNU Lesser General Public License as = * - * published by the Free Software Foundation; either version 2.1 of = * - * the License, or (at your option) any later version. = * - * = * - * This software is distributed in the hope that it will be useful, = * - * but WITHOUT ANY WARRANTY; without even the implied warranty of = * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU = * - * Lesser General Public License for more details. = * - * = * - * You should have received a copy of the GNU Lesser General Public = * - * License along with this software; if not, write to the Free = * - * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA = * - * 02110-1301 USA, or see the FSF site: http://www.fsf.org. = * - *************************************************************************= *****/ -package org.jboss.test.unit; - -import org.jboss.unit.Failure; -import org.jboss.unit.TestId; -import org.jboss.unit.runner.TestResult; -import org.jboss.unit.runner.TestRunnerEvent; -import org.jboss.unit.runner.TestRunnerEventListener; -import org.jboss.unit.runner.event.EndRunnerEvent; -import org.jboss.unit.runner.event.EndTestEvent; -import org.jboss.unit.runner.event.RunnerFailureEvent; -import org.jboss.unit.runner.event.StartRunnerEvent; -import org.jboss.unit.runner.event.StartTestEvent; -import org.jboss.unit.runner.results.TestFailure; -import org.jboss.unit.runner.results.TestSuccess; - -/** - * @author Julien Viet - * @version $Revision: 1.1 $ - */ -public class PrintListener implements TestRunnerEventListener -{ - - public void onEvent(TestRunnerEvent event) - { - if (event instanceof StartRunnerEvent) - { - System.out.println("--- Start ---"); - } - else if (event instanceof EndRunnerEvent) - { - System.out.println("--- End ---"); - } - else if (event instanceof RunnerFailureEvent) - { - RunnerFailureEvent failureEvent =3D (RunnerFailureEvent)event; - Failure failure =3D failureEvent.getFailure(); = - System.out.println("Runner failure: " + failure.getType() + " " += failure.getMessage()); - } - else if (event instanceof StartTestEvent) - { - StartTestEvent startTestEvent =3D (StartTestEvent)event; - System.out.println("Starting id=3D" + startTestEvent.getTestId() = + " name=3D" + startTestEvent.getTestInfo().getName() + " description=3D" += startTestEvent.getTestInfo().getDescription()); - } - else if (event instanceof EndTestEvent) - { - EndTestEvent endTestEvent =3D (EndTestEvent)event; - TestId testId =3D endTestEvent.getTestId(); - TestResult testResult =3D endTestEvent.getTestResult(); - if (testResult instanceof TestSuccess) - { - System.out.println("Test id=3D" + testId + " is successful"); - } - else if (testResult instanceof TestFailure) - { - TestFailure testFailure =3D (TestFailure)testResult; - Failure failure =3D testFailure.getFailure(); - System.out.println("Test id=3D" + testId + " " + failure.getTy= pe() + " failed " + failure.getMessage()); - if (failure.getCause() !=3D null) - { - failure.getCause().printStackTrace(); - } - } - } - - } -} Modified: modules/test/trunk/unit/src/main/org/jboss/test/unit/blah/BlahTes= tTwo.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/test/unit/blah/BlahTestTwo.j= ava 2007-10-05 19:45:41 UTC (rev 8551) +++ modules/test/trunk/unit/src/main/org/jboss/test/unit/blah/BlahTestTwo.j= ava 2007-10-07 22:44:24 UTC (rev 8552) @@ -24,7 +24,7 @@ = import java.io.InputStream; = -import org.jboss.test.unit.PrintListener; +import org.jboss.unit.report.impl.console.PrintListener; import org.jboss.unit.report.junit.JUnitReporter; import org.jboss.unit.runner.TestRunner; import org.jboss.unit.runner.TestRunnerEventListener; Modified: modules/test/trunk/unit/src/main/org/jboss/test/unit/blah/BlahTes= ts.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/test/unit/blah/BlahTests.jav= a 2007-10-05 19:45:41 UTC (rev 8551) +++ modules/test/trunk/unit/src/main/org/jboss/test/unit/blah/BlahTests.jav= a 2007-10-07 22:44:24 UTC (rev 8552) @@ -22,7 +22,7 @@ *************************************************************************= *****/ package org.jboss.test.unit.blah; = -import org.jboss.test.unit.PrintListener; +import org.jboss.unit.report.impl.console.PrintListener; import org.jboss.unit.runner.TestRunner; import org.jboss.unit.runner.model.ModelBuilder; import org.jboss.unit.runner.model.TestSuiteDef; Added: modules/test/trunk/unit/src/main/org/jboss/unit/report/impl/console/= PrintListener.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/report/impl/console/Pri= ntListener.java (rev 0) +++ modules/test/trunk/unit/src/main/org/jboss/unit/report/impl/console/Pri= ntListener.java 2007-10-07 22:44:24 UTC (rev 8552) @@ -0,0 +1,89 @@ +/*************************************************************************= ***** + * JBoss, a division of Red Hat = * + * Copyright 2006, Red Hat Middleware, LLC, and individual = * + * contributors as indicated by the @authors tag. See the = * + * copyright.txt in the distribution for a full listing of = * + * individual contributors. = * + * = * + * This is free software; you can redistribute it and/or modify it = * + * under the terms of the GNU Lesser General Public License as = * + * published by the Free Software Foundation; either version 2.1 of = * + * the License, or (at your option) any later version. = * + * = * + * This software is distributed in the hope that it will be useful, = * + * but WITHOUT ANY WARRANTY; without even the implied warranty of = * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU = * + * Lesser General Public License for more details. = * + * = * + * You should have received a copy of the GNU Lesser General Public = * + * License along with this software; if not, write to the Free = * + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA = * + * 02110-1301 USA, or see the FSF site: http://www.fsf.org. = * + *************************************************************************= *****/ +package org.jboss.unit.report.impl.console; + +import org.jboss.unit.Failure; +import org.jboss.unit.TestId; +import org.jboss.unit.runner.TestResult; +import org.jboss.unit.runner.TestRunnerEvent; +import org.jboss.unit.runner.TestRunnerEventListener; +import org.jboss.unit.runner.event.EndRunnerEvent; +import org.jboss.unit.runner.event.EndTestEvent; +import org.jboss.unit.runner.event.RunnerFailureEvent; +import org.jboss.unit.runner.event.StartRunnerEvent; +import org.jboss.unit.runner.event.StartTestEvent; +import org.jboss.unit.runner.results.TestFailure; +import org.jboss.unit.runner.results.TestSuccess; + +/** + * @author Julien Viet + * @version $Revision: 1.1 $ + */ +public class PrintListener implements TestRunnerEventListener +{ + + public void onEvent(TestRunnerEvent event) + { + if (event instanceof StartRunnerEvent) + { + System.out.println("--- Start ---"); + } + else if (event instanceof EndRunnerEvent) + { + System.out.println("--- End ---"); + } + else if (event instanceof RunnerFailureEvent) + { + RunnerFailureEvent failureEvent =3D (RunnerFailureEvent)event; + Failure failure =3D failureEvent.getFailure(); = + System.out.println("Runner failure: " + failure.getType() + " " += failure.getMessage()); + failure.getCause().printStackTrace(); + } + else if (event instanceof StartTestEvent) + { + StartTestEvent startTestEvent =3D (StartTestEvent)event; + System.out.println("Starting id=3D" + startTestEvent.getTestId() = + " name=3D" + startTestEvent.getTestInfo().getName() + " description=3D" += startTestEvent.getTestInfo().getDescription()); + } + else if (event instanceof EndTestEvent) + { + EndTestEvent endTestEvent =3D (EndTestEvent)event; + TestId testId =3D endTestEvent.getTestId(); + TestResult testResult =3D endTestEvent.getTestResult(); + if (testResult instanceof TestSuccess) + { + System.out.println("Test id=3D" + testId + " is successful"); + } + else if (testResult instanceof TestFailure) + { + TestFailure testFailure =3D (TestFailure)testResult; + Failure failure =3D testFailure.getFailure(); + System.out.println("Test id=3D" + testId + " " + failure.getTy= pe() + " failed " + failure.getMessage()); + if (failure.getCause() !=3D null) + { + failure.getCause().printStackTrace(); + } + } + } + + } +} Added: modules/test/trunk/unit/src/main/org/jboss/unit/tooling/ExcludeTestF= ilter.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/tooling/ExcludeTestFilt= er.java (rev 0) +++ modules/test/trunk/unit/src/main/org/jboss/unit/tooling/ExcludeTestFilt= er.java 2007-10-07 22:44:24 UTC (rev 8552) @@ -0,0 +1,78 @@ +/* +* JBoss, a division of Red Hat +* Copyright 2006, Red Hat Middleware, LLC, and individual contributors as = indicated +* by the @authors tag. See the copyright.txt in the distribution for a +* full listing of individual contributors. +* +* This is free software; you can redistribute it and/or modify it +* under the terms of the GNU Lesser General Public License as +* published by the Free Software Foundation; either version 2.1 of +* the License, or (at your option) any later version. +* +* This software is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +* Lesser General Public License for more details. +* +* You should have received a copy of the GNU Lesser General Public +* License along with this software; if not, write to the Free +* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +* 02110-1301 USA, or see the FSF site: http://www.fsf.org. +*/ + +package org.jboss.unit.tooling; + +import org.jboss.unit.TestId; +import org.jboss.unit.runner.TestFilter; +import org.jboss.unit.info.TestInfo; + +import java.util.Set; +import java.util.HashSet; +import java.util.Map; + +/** + * @author Boleslaw Dawidowicz + * @version $Revision: 0.1 $ + */ +public class ExcludeTestFilter extends InfoTestFilter +{ + + + public ExcludeTestFilter() + { + } + + public ExcludeTestFilter(Set keywords, Set names, Set namePatterns) + { + super(keywords, names, namePatterns); + } + + public boolean include(TestId testId, TestInfo testInfo) + { + // First check names + + if (checkName(testInfo.getName())) + { + return false; + } + + // ... then keywords + + if (checkKeywords(testInfo.getKeywords())) + { + return false; + } + + // ... then check if name matches any of provided regex + + if (checkNamePatterns(testInfo.getName())) + { + return false; + } + + return true; + } + + = + +} Added: modules/test/trunk/unit/src/main/org/jboss/unit/tooling/IncludeTestF= ilter.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/tooling/IncludeTestFilt= er.java (rev 0) +++ modules/test/trunk/unit/src/main/org/jboss/unit/tooling/IncludeTestFilt= er.java 2007-10-07 22:44:24 UTC (rev 8552) @@ -0,0 +1,77 @@ +/* +* JBoss, a division of Red Hat +* Copyright 2006, Red Hat Middleware, LLC, and individual contributors as = indicated +* by the @authors tag. See the copyright.txt in the distribution for a +* full listing of individual contributors. +* +* This is free software; you can redistribute it and/or modify it +* under the terms of the GNU Lesser General Public License as +* published by the Free Software Foundation; either version 2.1 of +* the License, or (at your option) any later version. +* +* This software is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +* Lesser General Public License for more details. +* +* You should have received a copy of the GNU Lesser General Public +* License along with this software; if not, write to the Free +* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +* 02110-1301 USA, or see the FSF site: http://www.fsf.org. +*/ + +package org.jboss.unit.tooling; + +import org.jboss.unit.TestId; +import org.jboss.unit.runner.TestFilter; +import org.jboss.unit.info.TestInfo; + +import java.util.Set; +import java.util.HashSet; +import java.util.Map; + +/** + * @author Boleslaw Dawidowicz + * @version $Revision: 0.1 $ + */ +public class IncludeTestFilter extends InfoTestFilter +{ + + + public IncludeTestFilter() + { + } + + public IncludeTestFilter(Set keywords, Set names, Set namePatterns) + { + super(keywords, names, namePatterns); + } + + public boolean include(TestId testId, TestInfo testInfo) + { + + // First check names + + if (checkName(testInfo.getName())) + { + return true; + } + + // ... then keywords + + if (checkKeywords(testInfo.getKeywords())) + { + return true; + } + + // ... then check if name matches any of provided regex + + if (checkNamePatterns(testInfo.getName())) + { + return true; + } + + return false; + } + +} Added: modules/test/trunk/unit/src/main/org/jboss/unit/tooling/InfoTestFilt= er.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/tooling/InfoTestFilter.= java (rev 0) +++ modules/test/trunk/unit/src/main/org/jboss/unit/tooling/InfoTestFilter.= java 2007-10-07 22:44:24 UTC (rev 8552) @@ -0,0 +1,226 @@ +/* +* JBoss, a division of Red Hat +* Copyright 2006, Red Hat Middleware, LLC, and individual contributors as = indicated +* by the @authors tag. See the copyright.txt in the distribution for a +* full listing of individual contributors. +* +* This is free software; you can redistribute it and/or modify it +* under the terms of the GNU Lesser General Public License as +* published by the Free Software Foundation; either version 2.1 of +* the License, or (at your option) any later version. +* +* This software is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +* Lesser General Public License for more details. +* +* You should have received a copy of the GNU Lesser General Public +* License along with this software; if not, write to the Free +* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +* 02110-1301 USA, or see the FSF site: http://www.fsf.org. +*/ + +package org.jboss.unit.tooling; + +import org.jboss.unit.runner.TestFilter; +import org.jboss.unit.TestId; +import org.jboss.unit.info.TestInfo; + +import java.util.Set; +import java.util.HashSet; +import java.util.Map; + +/** + * @author Boleslaw Dawidowicz + * @version $Revision: 0.1 $ + */ +public abstract class InfoTestFilter implements TestFilter +{ + = + private Set keywords =3D new HashSet(); + + private Set names =3D new HashSet(); + + private Set namePatterns =3D new HashSet(); + + public InfoTestFilter() + { + } + + public InfoTestFilter(Set keywords, Set names, Set namePatterns) + { + if (keywords =3D=3D null) + { + throw new IllegalArgumentException("keywords cannot be null"); + } + if (names =3D=3D null) + { + throw new IllegalArgumentException("names cannot be null"); + } + if (namePatterns =3D=3D null) + { + throw new IllegalArgumentException("namePatterns cannot be null"); + } + + this.keywords =3D keywords; + this.names =3D names; + this.namePatterns =3D namePatterns; + } + + public InfoTestFilter addKeyword(String keyword) + { + if (keyword =3D=3D null) + { + throw new IllegalArgumentException("keyword cannot be null"); + } + + keywords.add(keyword); + + return this; + } + + + public InfoTestFilter addUnparsedKeywords(String keywordsString) + { + if (keywordsString =3D=3D null) + { + throw new IllegalArgumentException("keywordsString cannot be null= "); + } + String[] keywordValues =3D keywordsString.split(","); + for (String keyword : keywordValues) + { + this.keywords.add(keyword.trim()); + } + return this; + } + + public InfoTestFilter addName(String name) + { + if (name =3D=3D null) + { + throw new IllegalArgumentException("name cannot be null"); + } + names.add(name); + + return this; + } + + public InfoTestFilter addUnparsedNames(String namesString) + { + if (namesString =3D=3D null) + { + throw new IllegalArgumentException("namesString cannot be null"); + } + String[] namesValues =3D namesString.split(","); + for (String name : namesValues) + { + this.names.add(name.trim()); + } + return this; + } + + public InfoTestFilter addNamePattern(String pattern) + { + if (pattern =3D=3D null) + { + throw new IllegalArgumentException("pattern cannot be null"); + } + namePatterns.add(pattern); + + return this; + } + + public InfoTestFilter addUnparsedNamePatterns(String patternString) + { + if (patternString =3D=3D null) + { + throw new IllegalArgumentException("patternString cannot be null"= ); + } + String[] patternValues =3D patternString.split(","); + for (String pattern : patternValues) + { + this.namePatterns.add(pattern.trim()); + } + return this; + } + + public abstract boolean include(TestId testId, TestInfo testInfo); + + public boolean include(TestId testId, Map parametrizati= on, TestInfo testInfo) + { + // At the moment no parametrization match + + return include (testId, testInfo); + } + + boolean checkName(String name) + { + for (String s : names) + { + if (s.equals(name)) + { + return true; + } + } + return false; + } + + boolean checkKeywords(Set keywords) + { + for (String keyword : this.keywords) + { + for (String toMatch : keywords) + { + if (keyword.equals(toMatch)) + { + return true; + } + } + } + return false; + } + + boolean checkNamePatterns(String name) + { + for (String regex : this.namePatterns) + { + if (name.matches(regex)) + { + return true; + } + } + return false; + } + + + public String toString() + { + StringBuffer sb =3D new StringBuffer(); + sb.append("Filter: ") + .append(getClass().getName()) + .append("; names: ") + .append(names.toString()) + .append("; keywords: ") + .append(keywords.toString()) + .append("; namePatterns: ") + .append(namePatterns.toString()) + .append(";"); + return sb.toString(); + } + + + public Set getKeywords() + { + return keywords; + } + + public Set getNames() + { + return names; + } + + public Set getNamePatterns() + { + return namePatterns; + } +} Added: modules/test/trunk/unit/src/main/org/jboss/unit/tooling/Main.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/tooling/Main.java = (rev 0) +++ modules/test/trunk/unit/src/main/org/jboss/unit/tooling/Main.java 2007-= 10-07 22:44:24 UTC (rev 8552) @@ -0,0 +1,218 @@ +/* +* JBoss, a division of Red Hat +* Copyright 2006, Red Hat Middleware, LLC, and individual contributors as = indicated +* by the @authors tag. See the copyright.txt in the distribution for a +* full listing of individual contributors. +* +* This is free software; you can redistribute it and/or modify it +* under the terms of the GNU Lesser General Public License as +* published by the Free Software Foundation; either version 2.1 of +* the License, or (at your option) any later version. +* +* This software is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +* Lesser General Public License for more details. +* +* You should have received a copy of the GNU Lesser General Public +* License along with this software; if not, write to the Free +* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +* 02110-1301 USA, or see the FSF site: http://www.fsf.org. +*/ + +package org.jboss.unit.tooling; + +import org.jboss.unit.runner.TestRunnerEventListener; +import org.jboss.unit.runner.TestRunner; +import org.jboss.unit.runner.model.TestSuiteDef; + +import java.util.Set; +import java.util.HashSet; +import java.util.Map; +import java.util.HashMap; +import java.util.Collections; + +/** + * @author Boleslaw Dawidowicz + * @version $Revision: 0.1 $ + */ +public class Main +{ + + private final MainTestFilter mainFilter; + = + private final Set listeners; + + private final TestRunner runner; + + private final TestSuiteDef suiteDef; + +// public static final String JBOSS_UNIT_NAMES =3D "jboss.unit.names"; +// +// public static final String JBOSS_UNIT_KEYWORDS =3D "jboss.unit.keywor= ds"; +// +// public static final String JBOSS_UNIT_PATTERNS =3D "jboss.unit.patter= ns"; +// +// public static final String JBOSS_UNIT_CONFIG =3D "jboss.unit.config"; +// +// public static final String JBOSS_UNIT_SUITE_NAME =3D "jboss.unit.suit= e_name"; + + public static final String OPT_ID =3D "--id"; + + public static final String OPT_NAMES =3D "--names"; + + public static final String OPT_KEYWORDS =3D "--keywords"; + + public static final String OPT_PATTERNS =3D "--patterns"; + + public static final String OPT_EX_ID =3D "--ex_id"; + + public static final String OPT_EX_NAMES =3D "--ex_names"; + + public static final String OPT_EX_KEYWORDS =3D "--ex_keywords"; + + public static final String OPT_EX_PATTERNS =3D "--ex_patterns"; + + public static final String OPT_CONFIG =3D "--config"; + + public static final String OPT_SUITE_NAME =3D "--suite_name"; + + public static final String OPT_NO_CONSOLE =3D "--noconsole"; + + public static final String OPT_XML_REPORT_DIR =3D "--xml_report_dir"; + + public static final String OPT_HTML_REPORT_DIR =3D "--html_report_dir"; + + public static final Set options; + + static { + Set opts =3D new HashSet(); + opts.add(OPT_ID); + opts.add(OPT_NAMES); + opts.add(OPT_KEYWORDS); + opts.add(OPT_PATTERNS); + opts.add(OPT_EX_ID); + opts.add(OPT_EX_NAMES); + opts.add(OPT_EX_KEYWORDS); + opts.add(OPT_EX_PATTERNS); + opts.add(OPT_CONFIG); + opts.add(OPT_SUITE_NAME); + + options =3D Collections.unmodifiableSet(opts); + } + + private Main() + { + mainFilter =3D null; + listeners =3D null; + runner =3D null; + suiteDef =3D null; + } + + public Main(TestRunner runner, MainTestFilter mainFilter, Set listeners, TestSuiteDef suiteDef) + { + if (runner =3D=3D null) + { + throw new IllegalArgumentException("runner cannot be null"); + } + + if (mainFilter =3D=3D null) + { + throw new IllegalArgumentException("mainFilter cannot be null"); + } + + if (listeners =3D=3D null) + { + throw new IllegalArgumentException("listeners cannot be null"); + } + + if (suiteDef =3D=3D null) + { + throw new IllegalArgumentException("suiteDef cannot be null"); + } + + this.mainFilter =3D mainFilter; + this.listeners =3D listeners; + this.runner =3D runner; + this.suiteDef =3D suiteDef; + } + + public void execute() + { + runner.run(mainFilter); + } + + public static void main(String[] args) throws Exception + { + Map arguments =3D new HashMap(); + + for (String arg : args) + { + String[] params =3D arg.split("=3D",2); + if (params.length < 2) + { + throw new IllegalArgumentException("Argument '" + arg + "' doe= sn't follow the name=3Dvalue pattern"); + } + arguments.put(params[0], params[1]); + } + + if (!arguments.keySet().contains(OPT_CONFIG)) + { + throw new IllegalArgumentException("Argument '" + OPT_CONFIG + "'= is missing"); + } + + if (!arguments.keySet().contains(OPT_SUITE_NAME)) + { + throw new IllegalArgumentException("Argument '" + OPT_SUITE_NAME = + "' is missing"); + } + + MainBuilder builder =3D new MainBuilder(arguments.get(OPT_CONFIG), a= rguments.get(OPT_SUITE_NAME)); + + if (arguments.keySet().contains(OPT_NAMES)) + { + builder.addUnparsedNames(arguments.get(OPT_NAMES)); + } + + if (arguments.keySet().contains(OPT_ID)) + { + builder.addName(arguments.get(OPT_ID)); + } + + if (arguments.keySet().contains(OPT_KEYWORDS)) + { + builder.addUnparsedKeywords(arguments.get(OPT_KEYWORDS)); + } + + if (arguments.keySet().contains(OPT_PATTERNS)) + { + builder.addUnparsedNamePatterns(arguments.get(OPT_PATTERNS)); + } + + if (arguments.keySet().contains(OPT_EX_NAMES)) + { + builder.addUnparsedExcludeNames(arguments.get(OPT_EX_NAMES)); + } + + if (arguments.keySet().contains(OPT_EX_ID)) + { + builder.addExcludeName(arguments.get(OPT_EX_ID)); + } + + if (arguments.keySet().contains(OPT_EX_KEYWORDS)) + { + builder.addUnparsedExcludeKeywords(arguments.get(OPT_EX_KEYWORDS)= ); + } + + if (arguments.keySet().contains(OPT_EX_PATTERNS)) + { + builder.addUnparsedExcludeNamePatterns(arguments.get(OPT_EX_PATTE= RNS)); + } + + + Main main =3D builder.build(); + + main.execute(); + + + } +} Added: modules/test/trunk/unit/src/main/org/jboss/unit/tooling/MainBuilder.= java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/tooling/MainBuilder.jav= a (rev 0) +++ modules/test/trunk/unit/src/main/org/jboss/unit/tooling/MainBuilder.jav= a 2007-10-07 22:44:24 UTC (rev 8552) @@ -0,0 +1,308 @@ +/* +* JBoss, a division of Red Hat +* Copyright 2006, Red Hat Middleware, LLC, and individual contributors as = indicated +* by the @authors tag. See the copyright.txt in the distribution for a +* full listing of individual contributors. +* +* This is free software; you can redistribute it and/or modify it +* under the terms of the GNU Lesser General Public License as +* published by the Free Software Foundation; either version 2.1 of +* the License, or (at your option) any later version. +* +* This software is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +* Lesser General Public License for more details. +* +* You should have received a copy of the GNU Lesser General Public +* License along with this software; if not, write to the Free +* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +* 02110-1301 USA, or see the FSF site: http://www.fsf.org. +*/ + +package org.jboss.unit.tooling; + +import org.jboss.unit.runner.TestRunnerEventListener; +import org.jboss.unit.runner.TestRunner; +import org.jboss.unit.runner.filter.NullFilter; +import org.jboss.unit.runner.model.ModelBuilder; +import org.jboss.unit.runner.model.TestSuiteDef; +import org.jboss.unit.report.junit.JUnitReporter; +import org.jboss.unit.report.impl.console.PrintListener; +import org.xml.sax.InputSource; + +import java.util.Set; +import java.util.HashSet; +import java.io.InputStream; +import java.io.FileInputStream; + +/** + * @author Boleslaw Dawidowicz + * @version $Revision: 0.1 $ + */ +public class MainBuilder +{ + + private Set keywords =3D new HashSet(); + + private Set names =3D new HashSet(); + + private Set namePatterns =3D new HashSet(); + + private Set excludeKeywords =3D new HashSet(); + + private Set excludeNames =3D new HashSet(); + + private Set excludeNamePatterns =3D new HashSet(); + + private Set listeners =3D new HashSet(); + + private String name =3D "noname"; + + private String configFile; + + + private MainBuilder() + { + + } + + public MainBuilder(String configFile, String name) + { + if (configFile =3D=3D null) + { + throw new IllegalArgumentException("configFile cannot be null"); + } + + if (name =3D=3D null) + { + throw new IllegalArgumentException("name cannot be null"); + } + + this.configFile =3D configFile; + this.name =3D name; + + } + + public MainBuilder addKeyword(String keyword) + { + if (keyword =3D=3D null) + { + throw new IllegalArgumentException("keyword cannot be null"); + } + + keywords.add(keyword); + return this; + } + + public MainBuilder addExcludeKeyword(String keyword) + { + if (keyword =3D=3D null) + { + throw new IllegalArgumentException("keyword cannot be null"); + } + + excludeKeywords.add(keyword); + return this; + } + + public MainBuilder addUnparsedKeywords(String keywordsString) + { + if (keywordsString =3D=3D null) + { + throw new IllegalArgumentException("keywordsString cannot be null= "); + } + String[] keywordValues =3D keywordsString.split(","); + for (String keyword : keywordValues) + { + this.keywords.add(keyword.trim()); + } + return this; + } + + public MainBuilder addUnparsedExcludeKeywords(String keywordsString) + { + if (keywordsString =3D=3D null) + { + throw new IllegalArgumentException("keywordsString cannot be null= "); + } + String[] keywordValues =3D keywordsString.split(","); + for (String keyword : keywordValues) + { + this.excludeKeywords.add(keyword.trim()); + } + return this; + } + + public MainBuilder addName(String name) + { = + if (name =3D=3D null) + { + throw new IllegalArgumentException("name cannot be null"); + } + + names.add(name); + return this; + } + + public MainBuilder addExcludeName(String name) + { + if (name =3D=3D null) + { + throw new IllegalArgumentException("name cannot be null"); + } + + excludeNames.add(name); + return this; + } + + public MainBuilder addUnparsedNames(String namesString) + { + if (namesString =3D=3D null) + { + throw new IllegalArgumentException("namesString cannot be null"); + } + String[] namesValues =3D namesString.split(","); + for (String name : namesValues) + { + this.names.add(name.trim()); + } + return this; + } + + public MainBuilder addUnparsedExcludeNames(String namesString) + { + if (namesString =3D=3D null) + { + throw new IllegalArgumentException("namesString cannot be null"); + } + String[] namesValues =3D namesString.split(","); + for (String name : namesValues) + { + this.excludeNames.add(name.trim()); + } + return this; + } + + public MainBuilder addNamePattern(String pattern) + { + if (pattern =3D=3D null) + { + throw new IllegalArgumentException("pattern cannot be null"); + } + + namePatterns.add(pattern); + return this; + } + + public MainBuilder addExcludeNamePattern(String pattern) + { + if (pattern =3D=3D null) + { + throw new IllegalArgumentException("pattern cannot be null"); + } + + excludeNamePatterns.add(pattern); + return this; + } + + public MainBuilder addUnparsedNamePatterns(String patternString) + { + if (patternString =3D=3D null ) + { + throw new IllegalArgumentException("patternString cannot be null"= ); + } + String[] patternValues =3D patternString.split(","); + for (String pattern : patternValues) + { + this.namePatterns.add(pattern.trim()); + } + return this; + } + + public MainBuilder addUnparsedExcludeNamePatterns(String patternString) + { + if (patternString =3D=3D null) + { + throw new IllegalArgumentException("patternString cannot be null"= ); + } + String[] patternValues =3D patternString.split(","); + for (String pattern : patternValues) + { + this.excludeNamePatterns.add(pattern.trim()); + } + return this; + } + + public MainBuilder addJunitReporting(String directory) + { + if (directory =3D=3D null) + { + throw new IllegalArgumentException("directory cannot be null"); + } + + listeners.add(new JUnitReporter(directory, name)); + + return this; + } + + + public MainBuilder addXMLReporting(String directory) + { + throw new RuntimeException("NYI"); + + } + + public MainBuilder addHTMLReporting(String directory) + { + throw new RuntimeException("NYI"); + } + + public Main build() throws Exception + { + + + InputStream in;// =3D Thread.currentThread().getContextClassLoader()= .getResourceAsStream(configFile); + in =3D new FileInputStream(configFile); + InputSource source =3D new InputSource(in); + ModelBuilder builder =3D new ModelBuilder(source); + TestSuiteDef suite =3D builder.build(); + TestRunner runner =3D suite.createRunner(); + + // Add listeners + + for (TestRunnerEventListener listener : listeners) + { + runner.addListener(listener); + } + + //add PrintListener by default + runner.addListener(new PrintListener()); + + + + MainTestFilter filter =3D new MainTestFilter(); + + if (keywords.size() =3D=3D 0 && names.size() =3D=3D 0 && namePattern= s.size() =3D=3D 0) + { + // If no conditions - add filter that match all + + filter.addIncludeFilter(new NullFilter()); + } + else + { + filter.addIncludeFilter(new IncludeTestFilter(keywords, names, na= mePatterns)); + } + + // Add exclude filter only if there is a need for one... + = + if (excludeKeywords.size() !=3D 0 || excludeNames.size() !=3D 0 || e= xcludeNamePatterns.size() !=3D 0) + { + filter.addExcludeFilter(new ExcludeTestFilter(excludeKeywords, ex= cludeNames, excludeNamePatterns)); + } + + + return new Main(runner, filter, listeners, suite); + } + +} Added: modules/test/trunk/unit/src/main/org/jboss/unit/tooling/MainTestFilt= er.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/tooling/MainTestFilter.= java (rev 0) +++ modules/test/trunk/unit/src/main/org/jboss/unit/tooling/MainTestFilter.= java 2007-10-07 22:44:24 UTC (rev 8552) @@ -0,0 +1,122 @@ +/* +* JBoss, a division of Red Hat +* Copyright 2006, Red Hat Middleware, LLC, and individual contributors as = indicated +* by the @authors tag. See the copyright.txt in the distribution for a +* full listing of individual contributors. +* +* This is free software; you can redistribute it and/or modify it +* under the terms of the GNU Lesser General Public License as +* published by the Free Software Foundation; either version 2.1 of +* the License, or (at your option) any later version. +* +* This software is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +* Lesser General Public License for more details. +* +* You should have received a copy of the GNU Lesser General Public +* License along with this software; if not, write to the Free +* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +* 02110-1301 USA, or see the FSF site: http://www.fsf.org. +*/ + +package org.jboss.unit.tooling; + +import org.jboss.unit.runner.TestFilter; +import org.jboss.unit.TestId; +import org.jboss.unit.info.TestInfo; + +import java.util.Map; +import java.util.List; +import java.util.LinkedList; + +/** + * @author Boleslaw Dawidowicz + * @version $Revision: 0.1 $ + */ +public class MainTestFilter implements TestFilter +{ + + private List includeFilters =3D new LinkedList(); + + private List excludeFilters =3D new LinkedList(); + + + public MainTestFilter() + { + } + + public MainTestFilter(List matchFilters, List e= xcludeFilters) + { + if (matchFilters =3D=3D null) + { + throw new IllegalArgumentException("includeFilters cannot be null= "); + } + if (excludeFilters =3D=3D null) + { + throw new IllegalArgumentException("excludeFilters cannot be null= "); + } + + + this.includeFilters =3D matchFilters; + this.excludeFilters =3D excludeFilters; + } + + public boolean include(TestId testId, TestInfo testInfo) + { + + // First check if test isn't excluded + + // Make logic OR on all filters + + for (TestFilter ef : excludeFilters) + { + if (!ef.include(testId, testInfo)) + { + return false; + } + } + + // make logic OR on all match filters + + for (TestFilter mf : includeFilters) + { + if (mf.include(testId, testInfo)) + { + return true; + } + + } + + + return false; + } + + public boolean include(TestId testId, Map parametrizati= on, TestInfo testInfo) + { + = + // At the moment no parametrization match + + return include (testId, testInfo); + } + + public void addIncludeFilter(TestFilter filter) + { + if (filter =3D=3D null) + { + throw new IllegalArgumentException("filter cannot be null"); + } + includeFilters.add(filter); + } + + public void addExcludeFilter(TestFilter filter) + { + if (filter =3D=3D null) + { + throw new IllegalArgumentException("filter cannot be null"); + } + excludeFilters.add(filter); + } + + +} --===============5612851308949164260==-- From portal-commits at lists.jboss.org Sun Oct 7 18:45:55 2007 Content-Type: multipart/mixed; boundary="===============4339522365449683970==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8553 - modules/test/trunk/build/ide/intellij/idea60/modules/unit. Date: Sun, 07 Oct 2007 18:45:55 -0400 Message-ID: --===============4339522365449683970== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: bdaw Date: 2007-10-07 18:45:55 -0400 (Sun, 07 Oct 2007) New Revision: 8553 Added: modules/test/trunk/build/ide/intellij/idea60/modules/unit/tooling.iml Log: IDEA file for tooling module Added: modules/test/trunk/build/ide/intellij/idea60/modules/unit/tooling.iml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/build/ide/intellij/idea60/modules/unit/tooling.iml = (rev 0) +++ modules/test/trunk/build/ide/intellij/idea60/modules/unit/tooling.iml 2= 007-10-07 22:45:55 UTC (rev 8553) @@ -0,0 +1,38 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + --===============4339522365449683970==-- From portal-commits at lists.jboss.org Sun Oct 7 18:47:08 2007 Content-Type: multipart/mixed; boundary="===============5540640885293399494==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8554 - modules/test/trunk/build. Date: Sun, 07 Oct 2007 18:47:08 -0400 Message-ID: --===============5540640885293399494== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: bdaw Date: 2007-10-07 18:47:08 -0400 (Sun, 07 Oct 2007) New Revision: 8554 Modified: modules/test/trunk/build/build-thirdparty.xml Log: add ant jars to thirdparty Modified: modules/test/trunk/build/build-thirdparty.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/build/build-thirdparty.xml 2007-10-07 22:45:55 UTC (= rev 8553) +++ modules/test/trunk/build/build-thirdparty.xml 2007-10-07 22:47:08 UTC (= rev 8554) @@ -49,6 +49,8 @@ = = + + = --===============5540640885293399494==-- From portal-commits at lists.jboss.org Sun Oct 7 18:51:26 2007 Content-Type: multipart/mixed; boundary="===============2056458498753552069==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8555 - in modules/test/trunk: tooling and 13 other directories. Date: Sun, 07 Oct 2007 18:51:25 -0400 Message-ID: --===============2056458498753552069== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: bdaw Date: 2007-10-07 18:51:25 -0400 (Sun, 07 Oct 2007) New Revision: 8555 Added: modules/test/trunk/tooling/ modules/test/trunk/tooling/build.bat modules/test/trunk/tooling/build.sh modules/test/trunk/tooling/build.xml modules/test/trunk/tooling/src/ modules/test/trunk/tooling/src/main/ modules/test/trunk/tooling/src/main/org/ modules/test/trunk/tooling/src/main/org/jboss/ modules/test/trunk/tooling/src/main/org/jboss/test/ modules/test/trunk/tooling/src/main/org/jboss/test/unit/ modules/test/trunk/tooling/src/main/org/jboss/test/unit/tooling/ modules/test/trunk/tooling/src/main/org/jboss/test/unit/tooling/bobo/ modules/test/trunk/tooling/src/main/org/jboss/test/unit/tooling/bobo/Bob= oTest1.java modules/test/trunk/tooling/src/main/org/jboss/unit/ modules/test/trunk/tooling/src/main/org/jboss/unit/tooling/ modules/test/trunk/tooling/src/main/org/jboss/unit/tooling/ant/ modules/test/trunk/tooling/src/main/org/jboss/unit/tooling/ant/ExcludeTa= sk.java modules/test/trunk/tooling/src/main/org/jboss/unit/tooling/ant/IncludeTa= sk.java modules/test/trunk/tooling/src/main/org/jboss/unit/tooling/ant/JBossUnit= Task.java modules/test/trunk/tooling/src/main/org/jboss/unit/tooling/ant/TaskExecu= tingThread.java modules/test/trunk/tooling/src/main/org/jboss/unit/tooling/ant/TestsTask= .java modules/test/trunk/tooling/src/resources/ modules/test/trunk/tooling/src/resources/test/ modules/test/trunk/tooling/src/resources/test/bobo-tests.xml Log: jboss unit ant support Added: modules/test/trunk/tooling/build.bat =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/tooling/build.bat (rev 0) +++ modules/test/trunk/tooling/build.bat 2007-10-07 22:51:25 UTC (rev 8555) @@ -0,0 +1,54 @@ +(a)echo off +rem +rem Invokes a script of the same name in the 'tools' module. +rem = +rem The 'tools' module is expected to be a peer directory of the directory +rem in which this script lives. +rem +rem @author Jason Dillon +rem + +rem $Id: build.bat 1829 2006-03-05 13:20:08Z julien $ + +setlocal + +set PROGNAME=3D%~nx0 +set DIRNAME=3D%~dp0 + +rem Legacy shell support +if x%PROGNAME%=3D=3Dx set PROGNAME=3Dbuild.bat +if x%DIRNAME%=3D=3Dx set DIRNAME=3D.\ + +set MODULE_ROOT=3D%DIRNAME% +if x%TOOLS_ROOT%=3D=3Dx set TOOLS_ROOT=3D%DIRNAME%..\tools +set TARGET=3D%TOOLS_ROOT%\bin\build.bat +set ARGS=3D%* + +rem Start'er up yo +goto main + +:debug +if not x%DEBUG%=3D=3Dx echo %PROGNAME%: %* +goto :EOF + +:main +call :debug PROGNAME=3D%PROGNAME% +call :debug DIRNAME=3D%DIRNAME% +call :debug TOOLS_ROOT=3D%TOOLS_ROOT% +call :debug TARGET=3D%TARGET% + +if exist %TARGET% call :call-script & goto :EOF +rem else fail, we can not go on + +echo %PROGNAME%: *ERROR* The target executable does not exist: +echo %PROGNAME%: +echo %PROGNAME%: %TARGET% +echo %PROGNAME%: +echo %PROGNAME%: Please make sure you have checked out the 'tools' module +echo %PROGNAME%: and make sure it is up to date. +goto :EOF + +:call-script +call :debug Executing %TARGET% %ARGS% +call %TARGET% %ARGS% +goto :EOF Property changes on: modules/test/trunk/tooling/build.bat ___________________________________________________________________ Name: svn:executable + * Added: modules/test/trunk/tooling/build.sh =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/tooling/build.sh (rev 0) +++ modules/test/trunk/tooling/build.sh 2007-10-07 22:51:25 UTC (rev 8555) @@ -0,0 +1,49 @@ +#!/bin/sh +## +## Invokes a script of the same name in the 'tools' module. +## = +## The 'tools' module is expected to be a peer directory of the directory +## in which this script lives. +## +## @author Jason Dillon +## + +# $Id: build.sh 1829 2006-03-05 13:20:08Z julien $ + +PROGNAME=3D`basename $0` +DIRNAME=3D`dirname $0` + +# Buss it yo +main() { + if [ "x$TOOLS_ROOT" =3D "x" ]; then + TOOLS_ROOT=3D`cd $DIRNAME/../tools && pwd` + fi + + MODULE_ROOT=3D`cd $DIRNAME; pwd` + export TOOLS_ROOT MODULE_ROOT DEBUG TRACE + + # Where is the target script? + target=3D"$TOOLS_ROOT/bin/$PROGNAME" + if [ ! -f "$target" ]; then + echo "${PROGNAME}: *ERROR* The target executable does not exist:" + echo "${PROGNAME}:" + echo "${PROGNAME}: $target" + echo "${PROGNAME}:" + echo "${PROGNAME}: Please make sure you have checked out the 'tools' modu= le" + echo "${PROGNAME}: and make sure it is up to date." + exit 2 + fi + + # Get busy yo! + if [ "x$DEBUG" !=3D "x" ]; then + echo "${PROGNAME}: Executing: /bin/sh $target $@" + fi + if [ "x$TRACE" =3D "x" ]; then + exec /bin/sh $target "$@" + else + exec /bin/sh -x $target "$@" + fi +} + +# Lets get ready to rumble! +main "$@" Property changes on: modules/test/trunk/tooling/build.sh ___________________________________________________________________ Name: svn:executable + * Added: modules/test/trunk/tooling/build.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/tooling/build.xml (rev 0) +++ modules/test/trunk/tooling/build.xml 2007-10-07 22:51:25 UTC (rev 8555) @@ -0,0 +1,267 @@ + + + + + + + + + + ]> + + + + + + + + + + + + + + + + + + + + + + + + + &buildmagic; + &modules; + &defaults; + &tools; + &targets; + + + + + + + + + + + + + + + + + + + + + + &libraries; + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + = + + + + + + + + + + + + + + + + Property changes on: modules/test/trunk/tooling/build.xml ___________________________________________________________________ Name: svn:executable + * Added: modules/test/trunk/tooling/src/main/org/jboss/test/unit/tooling/bobo= /BoboTest1.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/tooling/src/main/org/jboss/test/unit/tooling/bobo/Bo= boTest1.java (rev 0) +++ modules/test/trunk/tooling/src/main/org/jboss/test/unit/tooling/bobo/Bo= boTest1.java 2007-10-07 22:51:25 UTC (rev 8555) @@ -0,0 +1,57 @@ +/* +* JBoss, a division of Red Hat +* Copyright 2006, Red Hat Middleware, LLC, and individual contributors as = indicated +* by the @authors tag. See the copyright.txt in the distribution for a +* full listing of individual contributors. +* +* This is free software; you can redistribute it and/or modify it +* under the terms of the GNU Lesser General Public License as +* published by the Free Software Foundation; either version 2.1 of +* the License, or (at your option) any later version. +* +* This software is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +* Lesser General Public License for more details. +* +* You should have received a copy of the GNU Lesser General Public +* License along with this software; if not, write to the Free +* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +* 02110-1301 USA, or see the FSF site: http://www.fsf.org. +*/ + +package org.jboss.test.unit.tooling.bobo; + +import org.jboss.unit.api.pojo.annotations.Test; + +/** + * @author Boleslaw Dawidowicz + * @version $Revision: 0.1 $ + */ +public class BoboTest1 +{ + @Test(name =3D "testOne") + public void test1() + { + System.out.println("Executed testOne"); + } + + @Test(name =3D "testTwo") + public void test2() + { + System.out.println("Executed testTwo"); + + } + + @Test(name =3D "otherTestOne") + public void test3() + { + System.out.println("Executed otherTestOne"); + } + + @Test(name =3D "otherTestTwo") + public void test4() + { + System.out.println("Executed otherTestTwo"); + } +} Added: modules/test/trunk/tooling/src/main/org/jboss/unit/tooling/ant/Exclu= deTask.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/tooling/src/main/org/jboss/unit/tooling/ant/ExcludeT= ask.java (rev 0) +++ modules/test/trunk/tooling/src/main/org/jboss/unit/tooling/ant/ExcludeT= ask.java 2007-10-07 22:51:25 UTC (rev 8555) @@ -0,0 +1,85 @@ +/* +* JBoss, a division of Red Hat +* Copyright 2006, Red Hat Middleware, LLC, and individual contributors as = indicated +* by the @authors tag. See the copyright.txt in the distribution for a +* full listing of individual contributors. +* +* This is free software; you can redistribute it and/or modify it +* under the terms of the GNU Lesser General Public License as +* published by the Free Software Foundation; either version 2.1 of +* the License, or (at your option) any later version. +* +* This software is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +* Lesser General Public License for more details. +* +* You should have received a copy of the GNU Lesser General Public +* License along with this software; if not, write to the Free +* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +* 02110-1301 USA, or see the FSF site: http://www.fsf.org. +*/ + +package org.jboss.unit.tooling.ant; + +import org.apache.tools.ant.Task; + +/** + * @author Boleslaw Dawidowicz + * @version $Revision: 0.1 $ + */ +public class ExcludeTask extends Task +{ + private String id; + + private String names; + + private String namePatterns; + + private String keywords; + + + public ExcludeTask() + { + } + + public String getId() + { + return id; + } + + public void setId(String id) + { + this.id =3D id; + } + + public String getNames() + { + return names; + } + + public void setNames(String names) + { + this.names =3D names; + } + + public String getNamePatterns() + { + return namePatterns; + } + + public void setNamePatterns(String namePatterns) + { + this.namePatterns =3D namePatterns; + } + + public String getKeywords() + { + return keywords; + } + + public void setKeywords(String keywords) + { + this.keywords =3D keywords; + } +} Added: modules/test/trunk/tooling/src/main/org/jboss/unit/tooling/ant/Inclu= deTask.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/tooling/src/main/org/jboss/unit/tooling/ant/IncludeT= ask.java (rev 0) +++ modules/test/trunk/tooling/src/main/org/jboss/unit/tooling/ant/IncludeT= ask.java 2007-10-07 22:51:25 UTC (rev 8555) @@ -0,0 +1,85 @@ +/* +* JBoss, a division of Red Hat +* Copyright 2006, Red Hat Middleware, LLC, and individual contributors as = indicated +* by the @authors tag. See the copyright.txt in the distribution for a +* full listing of individual contributors. +* +* This is free software; you can redistribute it and/or modify it +* under the terms of the GNU Lesser General Public License as +* published by the Free Software Foundation; either version 2.1 of +* the License, or (at your option) any later version. +* +* This software is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +* Lesser General Public License for more details. +* +* You should have received a copy of the GNU Lesser General Public +* License along with this software; if not, write to the Free +* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +* 02110-1301 USA, or see the FSF site: http://www.fsf.org. +*/ + +package org.jboss.unit.tooling.ant; + +import org.apache.tools.ant.Task; + +/** + * @author Boleslaw Dawidowicz + * @version $Revision: 0.1 $ + */ +public class IncludeTask extends Task +{ + private String id; + + private String names; + + private String namePatterns; + + private String keywords; + + + public IncludeTask() + { + } + + public String getId() + { + return id; + } + + public void setId(String id) + { + this.id =3D id; + } + + public String getNames() + { + return names; + } + + public void setNames(String names) + { + this.names =3D names; + } + + public String getNamePatterns() + { + return namePatterns; + } + + public void setNamePatterns(String namePatterns) + { + this.namePatterns =3D namePatterns; + } + + public String getKeywords() + { + return keywords; + } + + public void setKeywords(String keywords) + { + this.keywords =3D keywords; + } +} Added: modules/test/trunk/tooling/src/main/org/jboss/unit/tooling/ant/JBoss= UnitTask.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/tooling/src/main/org/jboss/unit/tooling/ant/JBossUni= tTask.java (rev 0) +++ modules/test/trunk/tooling/src/main/org/jboss/unit/tooling/ant/JBossUni= tTask.java 2007-10-07 22:51:25 UTC (rev 8555) @@ -0,0 +1,75 @@ +/* +* JBoss, a division of Red Hat +* Copyright 2006, Red Hat Middleware, LLC, and individual contributors as = indicated +* by the @authors tag. See the copyright.txt in the distribution for a +* full listing of individual contributors. +* +* This is free software; you can redistribute it and/or modify it +* under the terms of the GNU Lesser General Public License as +* published by the Free Software Foundation; either version 2.1 of +* the License, or (at your option) any later version. +* +* This software is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +* Lesser General Public License for more details. +* +* You should have received a copy of the GNU Lesser General Public +* License along with this software; if not, write to the Free +* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +* 02110-1301 USA, or see the FSF site: http://www.fsf.org. +*/ + +package org.jboss.unit.tooling.ant; + +import org.apache.tools.ant.Task; +import org.apache.tools.ant.BuildException; +import org.apache.tools.ant.types.Path; + +import java.util.List; +import java.util.LinkedList; + +/** + * @author Boleslaw Dawidowicz + * @version $Revision: 0.1 $ + */ +public class JBossUnitTask extends Task +{ + + List testsTasks =3D new LinkedList(); + + private Path path; + + public JBossUnitTask() + { + } + + public void addConfiguredTests(TestsTask tests) + { + testsTasks.add(tests); + } + + public void addConfiguredClasspath(Path path) + { + System.out.println("Adding path: " + path.toString()); + this.path =3D path; + } + + public void execute() throws BuildException + { + System.out.println("Executing JBossUnit. tests: " + testsTasks.size(= )); + for (TestsTask testsTask : testsTasks) + { + + // Local classpath for tests overide the global one + if (testsTask.getClasspath() =3D=3D null && path !=3D null) + { + testsTask.addConfiguredClasspath(path); + } + = + testsTask.execute(); + } + } + + = +} Added: modules/test/trunk/tooling/src/main/org/jboss/unit/tooling/ant/TaskE= xecutingThread.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/tooling/src/main/org/jboss/unit/tooling/ant/TaskExec= utingThread.java (rev 0) +++ modules/test/trunk/tooling/src/main/org/jboss/unit/tooling/ant/TaskExec= utingThread.java 2007-10-07 22:51:25 UTC (rev 8555) @@ -0,0 +1,50 @@ +/* +* JBoss, a division of Red Hat +* Copyright 2006, Red Hat Middleware, LLC, and individual contributors as = indicated +* by the @authors tag. See the copyright.txt in the distribution for a +* full listing of individual contributors. +* +* This is free software; you can redistribute it and/or modify it +* under the terms of the GNU Lesser General Public License as +* published by the Free Software Foundation; either version 2.1 of +* the License, or (at your option) any later version. +* +* This software is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +* Lesser General Public License for more details. +* +* You should have received a copy of the GNU Lesser General Public +* License along with this software; if not, write to the Free +* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +* 02110-1301 USA, or see the FSF site: http://www.fsf.org. +*/ + +package org.jboss.unit.tooling.ant; + +import org.apache.tools.ant.taskdefs.Java; +import org.apache.tools.ant.Task; + +/** + * @author Boleslaw Dawidowicz + * @version $Revision: 0.1 $ + */ +public class TaskExecutingThread extends Thread +{ + + private Task task; + + private TaskExecutingThread() + { + } + + public TaskExecutingThread(Task task) + { + this.task =3D task; + } + + public void run() + { + this.task.execute(); + } +} Added: modules/test/trunk/tooling/src/main/org/jboss/unit/tooling/ant/Tests= Task.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/tooling/src/main/org/jboss/unit/tooling/ant/TestsTas= k.java (rev 0) +++ modules/test/trunk/tooling/src/main/org/jboss/unit/tooling/ant/TestsTas= k.java 2007-10-07 22:51:25 UTC (rev 8555) @@ -0,0 +1,270 @@ +/* +* JBoss, a division of Red Hat +* Copyright 2006, Red Hat Middleware, LLC, and individual contributors as = indicated +* by the @authors tag. See the copyright.txt in the distribution for a +* full listing of individual contributors. +* +* This is free software; you can redistribute it and/or modify it +* under the terms of the GNU Lesser General Public License as +* published by the Free Software Foundation; either version 2.1 of +* the License, or (at your option) any later version. +* +* This software is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +* Lesser General Public License for more details. +* +* You should have received a copy of the GNU Lesser General Public +* License along with this software; if not, write to the Free +* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +* 02110-1301 USA, or see the FSF site: http://www.fsf.org. +*/ + +package org.jboss.unit.tooling.ant; + +import org.apache.tools.ant.Task; +import org.apache.tools.ant.BuildException; +import org.apache.tools.ant.types.Path; +import org.apache.tools.ant.taskdefs.Java; +import org.jboss.unit.tooling.IncludeTestFilter; +import org.jboss.unit.tooling.ExcludeTestFilter; +import org.jboss.unit.tooling.MainTestFilter; +import org.jboss.unit.tooling.MainBuilder; +import org.jboss.unit.tooling.Main; +import org.jboss.unit.tooling.InfoTestFilter; +import org.jboss.unit.runner.TestFilter; + +import java.util.List; +import java.util.LinkedList; +import java.util.Set; +import java.util.HashSet; + +/** + * @author Boleslaw Dawidowicz + * @version $Revision: 0.1 $ + */ +public class TestsTask extends Task +{ + private String config; + + private boolean fork =3D true; + + private List includes =3D new LinkedList(); + + private List excludes =3D new LinkedList(); + + private Path path; + + + public TestsTask() + { + } + + + public void execute() throws BuildException + { + System.out.println("Executing Task. Includes: " + includes.size() + = " excludes: " + excludes.size() + " config: " + config); + + //Evaluate all the include filters + + Java javaTask =3D createJava(); + + addArguments(javaTask); + + = + + javaTask.setClassname("org.jboss.unit.tooling.Main"); + + try + { + System.out.println("Invoking java: " + javaTask.getCommandLine().= toString()); + TaskExecutingThread executor =3D new TaskExecutingThread(javaTask= ); + executor.run(); + } + catch (Exception e) + { + e.printStackTrace(); = + } + + } + + private Java createJava() + { + Java javaTask =3D null; + try + { + javaTask =3D (Java)getProject().createTask("java"); + + + // Apply task classpath + if (getClasspath() !=3D null) + { + Path javaPath =3D javaTask.createClasspath(); + javaPath.add(getClasspath()); + } + + // Set fork = + if (isFork()) + { + javaTask.setFork(true); + } + + + + } + catch (BuildException e) + { + throw new IllegalStateException("Failed to create ant task= : ", e); + } + + return javaTask; + } + + private void addArguments(Java javaTask) + { + javaTask.createArg().setValue(Main.OPT_CONFIG + "=3D" + config); + + //TODO: change bilto + javaTask.createArg().setValue(Main.OPT_SUITE_NAME + "=3D" + "bilto"); + + + // Filters to aggregate all the values + IncludeTestFilter includeFilter =3D new IncludeTestFilter(); + + ExcludeTestFilter excludeFilter =3D new ExcludeTestFilter(); + + for (IncludeTask include : includes) + { + if (include.getNames() !=3D null) + { + includeFilter.addUnparsedNames(include.getNames()); + } + if (include.getKeywords() !=3D null) + { + includeFilter.addUnparsedKeywords(include.getKeywords()); + } + if (include.getNamePatterns() !=3D null) + { + includeFilter.addUnparsedNamePatterns(include.getNamePatterns(= )); + } + if (include.getId() !=3D null) + { + includeFilter.addUnparsedNames(include.getId()); + } + } + + if (includeFilter.getNames().size() !=3D 0) + { + javaTask.createArg().setValue(generateArgument(includeFilter.getN= ames(), Main.OPT_NAMES)); + } + + if (includeFilter.getNamePatterns().size() !=3D 0) + { + javaTask.createArg().setValue(generateArgument(includeFilter.getN= amePatterns(), Main.OPT_PATTERNS)); + } + + if (includeFilter.getKeywords().size() !=3D 0) + { + javaTask.createArg().setValue(generateArgument(includeFilter.getK= eywords(), Main.OPT_KEYWORDS)); + } + + +// List excludeFilters =3D new LinkedList(); + + for (ExcludeTask exclude : excludes) + { + if (exclude.getNames() !=3D null) + { + excludeFilter.addUnparsedNames(exclude.getNames()); + } + if (exclude.getKeywords() !=3D null) + { + excludeFilter.addUnparsedKeywords(exclude.getKeywords()); + } + if (exclude.getNamePatterns() !=3D null) + { + excludeFilter.addUnparsedNamePatterns(exclude.getNamePatterns(= )); + } + if (exclude.getId() !=3D null) + { + excludeFilter.addUnparsedNames(exclude.getId()); + } + } + + if (excludeFilter.getNames().size() !=3D 0) + { + javaTask.createArg().setValue(generateArgument(excludeFilter.getN= ames(), Main.OPT_EX_NAMES)); + } + + if (excludeFilter.getNamePatterns().size() !=3D 0) + { + javaTask.createArg().setValue(generateArgument(excludeFilter.getN= amePatterns(), Main.OPT_EX_PATTERNS)); + } + + if (excludeFilter.getKeywords().size() !=3D 0) + { + javaTask.createArg().setValue(generateArgument(excludeFilter.getK= eywords(), Main.OPT_EX_KEYWORDS)); + } + } + + private String generateArgument(Set values, String argumentName) + { + = + StringBuffer argument =3D new StringBuffer(argumentName).append("=3D= "); + for (String s : values) + { + argument.append(s).append(","); + } + // Remove last ',' + argument.deleteCharAt(argument.length() - 1); + return argument.toString(); + } + + + public void addConfiguredInclude(IncludeTask include) + { + includes.add(include); + } + + public void addConfiguredExclude(ExcludeTask exclude) = + { + excludes.add(exclude); + } + + public void addTask(Task task) + { + //To change body of implemented methods use File | Settings | File T= emplates. + } + + public String getConfig() + { + return config; + } + + public void setConfig(String config) + { + this.config =3D config; + } + + + public Path getClasspath() + { + return path; + } + + public void addConfiguredClasspath(Path path) + { + this.path =3D path; + } + + + public boolean isFork() + { + return fork; + } + + public void setFork(boolean fork) + { + this.fork =3D fork; + } +} Added: modules/test/trunk/tooling/src/resources/test/bobo-tests.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/tooling/src/resources/test/bobo-tests.xml = (rev 0) +++ modules/test/trunk/tooling/src/resources/test/bobo-tests.xml 2007-10-07= 22:51:25 UTC (rev 8555) @@ -0,0 +1,13 @@ + + + + + + + + + + + \ No newline at end of file --===============2056458498753552069==-- From portal-commits at lists.jboss.org Sun Oct 7 19:14:52 2007 Content-Type: multipart/mixed; boundary="===============1154573857442982919==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8556 - in modules/test/trunk/tooling: src/main/org/jboss/unit/tooling/ant and 1 other directory. Date: Sun, 07 Oct 2007 19:14:52 -0400 Message-ID: --===============1154573857442982919== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: bdaw Date: 2007-10-07 19:14:52 -0400 (Sun, 07 Oct 2007) New Revision: 8556 Modified: modules/test/trunk/tooling/build.xml modules/test/trunk/tooling/src/main/org/jboss/unit/tooling/ant/ExcludeTa= sk.java modules/test/trunk/tooling/src/main/org/jboss/unit/tooling/ant/IncludeTa= sk.java modules/test/trunk/tooling/src/main/org/jboss/unit/tooling/ant/TestsTask= .java Log: make and types instead of tasks Modified: modules/test/trunk/tooling/build.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/tooling/build.xml 2007-10-07 22:51:25 UTC (rev 8555) +++ modules/test/trunk/tooling/build.xml 2007-10-07 23:14:52 UTC (rev 8556) @@ -215,11 +215,11 @@ name=3D"tests" classname=3D"org.jboss.unit.tooling.ant.TestsTask" classpathref=3D"jboss.unit.tooling.test.classpath"/> - - Modified: modules/test/trunk/tooling/src/main/org/jboss/unit/tooling/ant/Ex= cludeTask.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/tooling/src/main/org/jboss/unit/tooling/ant/ExcludeT= ask.java 2007-10-07 22:51:25 UTC (rev 8555) +++ modules/test/trunk/tooling/src/main/org/jboss/unit/tooling/ant/ExcludeT= ask.java 2007-10-07 23:14:52 UTC (rev 8556) @@ -28,7 +28,7 @@ * @author Boleslaw Dawidowicz * @version $Revision: 0.1 $ */ -public class ExcludeTask extends Task +public class ExcludeTask { private String id; = Modified: modules/test/trunk/tooling/src/main/org/jboss/unit/tooling/ant/In= cludeTask.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/tooling/src/main/org/jboss/unit/tooling/ant/IncludeT= ask.java 2007-10-07 22:51:25 UTC (rev 8555) +++ modules/test/trunk/tooling/src/main/org/jboss/unit/tooling/ant/IncludeT= ask.java 2007-10-07 23:14:52 UTC (rev 8556) @@ -28,7 +28,7 @@ * @author Boleslaw Dawidowicz * @version $Revision: 0.1 $ */ -public class IncludeTask extends Task +public class IncludeTask = { private String id; = Modified: modules/test/trunk/tooling/src/main/org/jboss/unit/tooling/ant/Te= stsTask.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/tooling/src/main/org/jboss/unit/tooling/ant/TestsTas= k.java 2007-10-07 22:51:25 UTC (rev 8555) +++ modules/test/trunk/tooling/src/main/org/jboss/unit/tooling/ant/TestsTas= k.java 2007-10-07 23:14:52 UTC (rev 8556) @@ -43,7 +43,7 @@ * @author Boleslaw Dawidowicz * @version $Revision: 0.1 $ */ -public class TestsTask extends Task +public class TestsTask extends Task { private String config; = --===============1154573857442982919==-- From portal-commits at lists.jboss.org Mon Oct 8 08:12:53 2007 Content-Type: multipart/mixed; boundary="===============5273817019342760626==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8557 - in modules/test/trunk/tooling: src/main/org/jboss/unit/tooling/ant and 1 other directory. Date: Mon, 08 Oct 2007 08:12:52 -0400 Message-ID: --===============5273817019342760626== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: bdaw Date: 2007-10-08 08:12:52 -0400 (Mon, 08 Oct 2007) New Revision: 8557 Modified: modules/test/trunk/tooling/build.xml modules/test/trunk/tooling/src/main/org/jboss/unit/tooling/ant/JBossUnit= Task.java modules/test/trunk/tooling/src/main/org/jboss/unit/tooling/ant/TestsTask= .java Log: remove unneeded taskdef and typedef Modified: modules/test/trunk/tooling/build.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/tooling/build.xml 2007-10-07 23:14:52 UTC (rev 8556) +++ modules/test/trunk/tooling/build.xml 2007-10-08 12:12:52 UTC (rev 8557) @@ -211,19 +211,8 @@ name=3D"jboss-unit" classname=3D"org.jboss.unit.tooling.ant.JBossUnitTask" classpathref=3D"jboss.unit.tooling.test.classpath"/> - - - = + = Modified: modules/test/trunk/tooling/src/main/org/jboss/unit/tooling/ant/JB= ossUnitTask.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/tooling/src/main/org/jboss/unit/tooling/ant/JBossUni= tTask.java 2007-10-07 23:14:52 UTC (rev 8556) +++ modules/test/trunk/tooling/src/main/org/jboss/unit/tooling/ant/JBossUni= tTask.java 2007-10-08 12:12:52 UTC (rev 8557) @@ -46,6 +46,7 @@ = public void addConfiguredTests(TestsTask tests) { + tests.setProject(getProject()); testsTasks.add(tests); } = Modified: modules/test/trunk/tooling/src/main/org/jboss/unit/tooling/ant/Te= stsTask.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/tooling/src/main/org/jboss/unit/tooling/ant/TestsTas= k.java 2007-10-07 23:14:52 UTC (rev 8556) +++ modules/test/trunk/tooling/src/main/org/jboss/unit/tooling/ant/TestsTas= k.java 2007-10-08 12:12:52 UTC (rev 8557) @@ -24,6 +24,7 @@ = import org.apache.tools.ant.Task; import org.apache.tools.ant.BuildException; +import org.apache.tools.ant.Project; import org.apache.tools.ant.types.Path; import org.apache.tools.ant.taskdefs.Java; import org.jboss.unit.tooling.IncludeTestFilter; @@ -43,7 +44,7 @@ * @author Boleslaw Dawidowicz * @version $Revision: 0.1 $ */ -public class TestsTask extends Task +public class TestsTask { private String config; = @@ -53,6 +54,8 @@ = private List excludes =3D new LinkedList(); = + private Project project; + private Path path; = = @@ -93,6 +96,12 @@ Java javaTask =3D null; try { + + if (getProject() =3D=3D null) + { + throw new IllegalStateException("Current project is missing. T= ask was not setup properly"); + } + javaTask =3D (Java)getProject().createTask("java"); = = @@ -267,4 +276,15 @@ { this.fork =3D fork; } + + + public Project getProject() + { + return project; + } + + public void setProject(Project project) + { + this.project =3D project; + } } --===============5273817019342760626==-- From portal-commits at lists.jboss.org Mon Oct 8 09:03:29 2007 Content-Type: multipart/mixed; boundary="===============4078098787171323200==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8558 - in modules/test/trunk/tooling: src/main/org/jboss/test/unit/tooling/bobo and 1 other directories. Date: Mon, 08 Oct 2007 09:03:29 -0400 Message-ID: --===============4078098787171323200== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: bdaw Date: 2007-10-08 09:03:29 -0400 (Mon, 08 Oct 2007) New Revision: 8558 Modified: modules/test/trunk/tooling/build.xml modules/test/trunk/tooling/src/main/org/jboss/test/unit/tooling/bobo/Bob= oTest1.java modules/test/trunk/tooling/src/main/org/jboss/unit/tooling/ant/ExcludeTa= sk.java modules/test/trunk/tooling/src/main/org/jboss/unit/tooling/ant/IncludeTa= sk.java modules/test/trunk/tooling/src/main/org/jboss/unit/tooling/ant/TestsTask= .java Log: rename attributes and make 'id' exclusive Modified: modules/test/trunk/tooling/build.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/tooling/build.xml 2007-10-08 12:12:52 UTC (rev 8557) +++ modules/test/trunk/tooling/build.xml 2007-10-08 13:03:29 UTC (rev 8558) @@ -216,20 +216,20 @@ = - - + = - + + = - - - + + + = @@ -237,6 +237,17 @@ + + + + + + + + + + + = = Modified: modules/test/trunk/tooling/src/main/org/jboss/test/unit/tooling/b= obo/BoboTest1.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/tooling/src/main/org/jboss/test/unit/tooling/bobo/Bo= boTest1.java 2007-10-08 12:12:52 UTC (rev 8557) +++ modules/test/trunk/tooling/src/main/org/jboss/test/unit/tooling/bobo/Bo= boTest1.java 2007-10-08 13:03:29 UTC (rev 8558) @@ -23,6 +23,7 @@ package org.jboss.test.unit.tooling.bobo; = import org.jboss.unit.api.pojo.annotations.Test; +import org.jboss.unit.api.pojo.annotations.Tag; = /** * @author Boleslaw Dawidowicz @@ -31,12 +32,14 @@ public class BoboTest1 { @Test(name =3D "testOne") + @Tag("simpleTag") public void test1() { System.out.println("Executed testOne"); } = @Test(name =3D "testTwo") + @Tag("simpleTag") public void test2() { System.out.println("Executed testTwo"); @@ -44,12 +47,14 @@ } = @Test(name =3D "otherTestOne") + @Tag({"simpleTag", "anotherTag"}) public void test3() { System.out.println("Executed otherTestOne"); } = @Test(name =3D "otherTestTwo") + @Tag("simpleTag") public void test4() { System.out.println("Executed otherTestTwo"); Modified: modules/test/trunk/tooling/src/main/org/jboss/unit/tooling/ant/Ex= cludeTask.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/tooling/src/main/org/jboss/unit/tooling/ant/ExcludeT= ask.java 2007-10-08 12:12:52 UTC (rev 8557) +++ modules/test/trunk/tooling/src/main/org/jboss/unit/tooling/ant/ExcludeT= ask.java 2007-10-08 13:03:29 UTC (rev 8558) @@ -22,8 +22,6 @@ = package org.jboss.unit.tooling.ant; = -import org.apache.tools.ant.Task; - /** * @author Boleslaw Dawidowicz * @version $Revision: 0.1 $ @@ -32,9 +30,9 @@ { private String id; = - private String names; + private String ids; = - private String namePatterns; + private String idPatterns; = private String keywords; = @@ -53,25 +51,25 @@ this.id =3D id; } = - public String getNames() + public String getIds() { - return names; + return ids; } = - public void setNames(String names) + public void setIds(String ids) { - this.names =3D names; + this.ids =3D ids; } = - public String getNamePatterns() + public String getIdPatterns() { - return namePatterns; + return idPatterns; } = - public void setNamePatterns(String namePatterns) - { - this.namePatterns =3D namePatterns; - } +// public void setIdPatterns(String idPatterns) +// { +// this.idPatterns =3D idPatterns; +// } = public String getKeywords() { Modified: modules/test/trunk/tooling/src/main/org/jboss/unit/tooling/ant/In= cludeTask.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/tooling/src/main/org/jboss/unit/tooling/ant/IncludeT= ask.java 2007-10-08 12:12:52 UTC (rev 8557) +++ modules/test/trunk/tooling/src/main/org/jboss/unit/tooling/ant/IncludeT= ask.java 2007-10-08 13:03:29 UTC (rev 8558) @@ -22,8 +22,6 @@ = package org.jboss.unit.tooling.ant; = -import org.apache.tools.ant.Task; - /** * @author Boleslaw Dawidowicz * @version $Revision: 0.1 $ @@ -32,9 +30,9 @@ { private String id; = - private String names; + private String ids; = - private String namePatterns; + private String idPatterns; = private String keywords; = @@ -53,25 +51,25 @@ this.id =3D id; } = - public String getNames() + public String getIds() { - return names; + return ids; } = - public void setNames(String names) + public void setIds(String ids) { - this.names =3D names; + this.ids =3D ids; } = - public String getNamePatterns() + public String getIdPatterns() { - return namePatterns; + return idPatterns; } = - public void setNamePatterns(String namePatterns) - { - this.namePatterns =3D namePatterns; - } +// public void setIdPatterns(String idPatterns) +// { +// this.idPatterns =3D idPatterns; +// } = public String getKeywords() { Modified: modules/test/trunk/tooling/src/main/org/jboss/unit/tooling/ant/Te= stsTask.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/tooling/src/main/org/jboss/unit/tooling/ant/TestsTas= k.java 2007-10-08 12:12:52 UTC (rev 8557) +++ modules/test/trunk/tooling/src/main/org/jboss/unit/tooling/ant/TestsTas= k.java 2007-10-08 13:03:29 UTC (rev 8558) @@ -29,16 +29,11 @@ import org.apache.tools.ant.taskdefs.Java; import org.jboss.unit.tooling.IncludeTestFilter; import org.jboss.unit.tooling.ExcludeTestFilter; -import org.jboss.unit.tooling.MainTestFilter; -import org.jboss.unit.tooling.MainBuilder; import org.jboss.unit.tooling.Main; -import org.jboss.unit.tooling.InfoTestFilter; -import org.jboss.unit.runner.TestFilter; = import java.util.List; import java.util.LinkedList; import java.util.Set; -import java.util.HashSet; = /** * @author Boleslaw Dawidowicz @@ -144,17 +139,25 @@ = for (IncludeTask include : includes) { - if (include.getNames() !=3D null) + //Check attributes consistency + + if (include.getId() !=3D null && (include.getIds() !=3D null || i= nclude.getKeywords() !=3D null)) { - includeFilter.addUnparsedNames(include.getNames()); + throw new IllegalStateException("The use of attribute 'id' in = tag should be exclusive"); } + + + if (include.getIds() !=3D null) + { + includeFilter.addUnparsedNames(include.getIds()); + } if (include.getKeywords() !=3D null) { includeFilter.addUnparsedKeywords(include.getKeywords()); } - if (include.getNamePatterns() !=3D null) + if (include.getIdPatterns() !=3D null) { - includeFilter.addUnparsedNamePatterns(include.getNamePatterns(= )); + includeFilter.addUnparsedNamePatterns(include.getIdPatterns()); } if (include.getId() !=3D null) { @@ -182,17 +185,23 @@ = for (ExcludeTask exclude : excludes) { - if (exclude.getNames() !=3D null) + + if (exclude.getId() !=3D null && (exclude.getIds() !=3D null || e= xclude.getKeywords() !=3D null)) { - excludeFilter.addUnparsedNames(exclude.getNames()); + throw new IllegalStateException("The use of attribute 'id' in = tag should be exclusive"); } + + if (exclude.getIds() !=3D null) + { + excludeFilter.addUnparsedNames(exclude.getIds()); + } if (exclude.getKeywords() !=3D null) { excludeFilter.addUnparsedKeywords(exclude.getKeywords()); } - if (exclude.getNamePatterns() !=3D null) + if (exclude.getIdPatterns() !=3D null) { - excludeFilter.addUnparsedNamePatterns(exclude.getNamePatterns(= )); + excludeFilter.addUnparsedNamePatterns(exclude.getIdPatterns()); } if (exclude.getId() !=3D null) { --===============4078098787171323200==-- From portal-commits at lists.jboss.org Mon Oct 8 09:05:26 2007 Content-Type: multipart/mixed; boundary="===============5771444899108612795==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8559 - modules/test/trunk/tooling. Date: Mon, 08 Oct 2007 09:05:26 -0400 Message-ID: --===============5771444899108612795== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: bdaw Date: 2007-10-08 09:05:26 -0400 (Mon, 08 Oct 2007) New Revision: 8559 Modified: modules/test/trunk/tooling/build.xml Log: toto Modified: modules/test/trunk/tooling/build.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/tooling/build.xml 2007-10-08 13:03:29 UTC (rev 8558) +++ modules/test/trunk/tooling/build.xml 2007-10-08 13:05:26 UTC (rev 8559) @@ -226,7 +226,6 @@ = - --===============5771444899108612795==-- From portal-commits at lists.jboss.org Mon Oct 8 09:12:13 2007 Content-Type: multipart/mixed; boundary="===============1723616928289170368==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8560 - trunk/tools/etc/buildfragments. Date: Mon, 08 Oct 2007 09:12:13 -0400 Message-ID: --===============1723616928289170368== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: julien(a)jboss.com Date: 2007-10-08 09:12:13 -0400 (Mon, 08 Oct 2007) New Revision: 8560 Modified: trunk/tools/etc/buildfragments/defaults.ent Log: moved trunk to Java 5 since it does not compile with WSRP using generics an= d boxing/unboxing Modified: trunk/tools/etc/buildfragments/defaults.ent =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/tools/etc/buildfragments/defaults.ent 2007-10-08 13:05:26 UTC (re= v 8559) +++ trunk/tools/etc/buildfragments/defaults.ent 2007-10-08 13:12:13 UTC (re= v 8560) @@ -118,8 +118,8 @@ = = - - + + = + + + + + + + + + + + + + + + + + + + + = Modified: modules/test/trunk/build/ide/intellij/idea60/modules/test/test.iml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/build/ide/intellij/idea60/modules/test/test.iml 2007= -10-08 13:12:13 UTC (rev 8560) +++ modules/test/trunk/build/ide/intellij/idea60/modules/test/test.iml 2007= -10-08 13:25:09 UTC (rev 8561) @@ -247,15 +247,6 @@ - - - - - - - - - @@ -343,6 +334,24 @@ + + + + + + + + + + + + + + + + + + --===============8318235296204589614==-- From portal-commits at lists.jboss.org Mon Oct 8 09:26:58 2007 Content-Type: multipart/mixed; boundary="===============5943936876338523273==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8562 - in modules/test/trunk: mc and 14 other directories. Date: Mon, 08 Oct 2007 09:26:57 -0400 Message-ID: --===============5943936876338523273== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: julien(a)jboss.com Date: 2007-10-08 09:26:57 -0400 (Mon, 08 Oct 2007) New Revision: 8562 Added: modules/test/trunk/mc/ modules/test/trunk/mc/build.bat modules/test/trunk/mc/build.sh modules/test/trunk/mc/build.xml modules/test/trunk/mc/src/ modules/test/trunk/mc/src/main/ modules/test/trunk/mc/src/main/org/ modules/test/trunk/mc/src/main/org/jboss/ modules/test/trunk/mc/src/main/org/jboss/test/ modules/test/trunk/mc/src/main/org/jboss/test/unit/ modules/test/trunk/mc/src/main/org/jboss/test/unit/mc/ modules/test/trunk/mc/src/main/org/jboss/test/unit/mc/MCTestLifeCycleTes= ts.java modules/test/trunk/mc/src/main/org/jboss/test/unit/mc/MyService.java modules/test/trunk/mc/src/main/org/jboss/test/unit/mc/SomeTest.java modules/test/trunk/mc/src/main/org/jboss/unit/ modules/test/trunk/mc/src/main/org/jboss/unit/mc/ modules/test/trunk/mc/src/main/org/jboss/unit/mc/MCTestLifeCycle.java modules/test/trunk/mc/src/main/org/jboss/unit/mc/MCTestProvider.java modules/test/trunk/mc/src/main/org/jboss/unit/mc/TestCaseFactory.java modules/test/trunk/mc/src/main/org/jboss/unit/mc/api/ modules/test/trunk/mc/src/main/org/jboss/unit/mc/api/annotations/ modules/test/trunk/mc/src/main/org/jboss/unit/mc/api/annotations/Bootstr= ap.java modules/test/trunk/mc/src/resources/ modules/test/trunk/mc/src/resources/test/ modules/test/trunk/mc/src/resources/test/blah/ modules/test/trunk/mc/src/resources/test/blah/toto.xml Log: commited initial mc integration with jboss unit Added: modules/test/trunk/mc/build.bat =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/mc/build.bat (rev 0) +++ modules/test/trunk/mc/build.bat 2007-10-08 13:26:57 UTC (rev 8562) @@ -0,0 +1,54 @@ +(a)echo off +rem +rem Invokes a script of the same name in the 'tools' module. +rem = +rem The 'tools' module is expected to be a peer directory of the directory +rem in which this script lives. +rem +rem @author Jason Dillon +rem + +rem $Id: build.bat 1829 2006-03-05 13:20:08Z julien $ + +setlocal + +set PROGNAME=3D%~nx0 +set DIRNAME=3D%~dp0 + +rem Legacy shell support +if x%PROGNAME%=3D=3Dx set PROGNAME=3Dbuild.bat +if x%DIRNAME%=3D=3Dx set DIRNAME=3D.\ + +set MODULE_ROOT=3D%DIRNAME% +if x%TOOLS_ROOT%=3D=3Dx set TOOLS_ROOT=3D%DIRNAME%..\tools +set TARGET=3D%TOOLS_ROOT%\bin\build.bat +set ARGS=3D%* + +rem Start'er up yo +goto main + +:debug +if not x%DEBUG%=3D=3Dx echo %PROGNAME%: %* +goto :EOF + +:main +call :debug PROGNAME=3D%PROGNAME% +call :debug DIRNAME=3D%DIRNAME% +call :debug TOOLS_ROOT=3D%TOOLS_ROOT% +call :debug TARGET=3D%TARGET% + +if exist %TARGET% call :call-script & goto :EOF +rem else fail, we can not go on + +echo %PROGNAME%: *ERROR* The target executable does not exist: +echo %PROGNAME%: +echo %PROGNAME%: %TARGET% +echo %PROGNAME%: +echo %PROGNAME%: Please make sure you have checked out the 'tools' module +echo %PROGNAME%: and make sure it is up to date. +goto :EOF + +:call-script +call :debug Executing %TARGET% %ARGS% +call %TARGET% %ARGS% +goto :EOF Property changes on: modules/test/trunk/mc/build.bat ___________________________________________________________________ Name: svn:executable + * Added: modules/test/trunk/mc/build.sh =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/mc/build.sh (rev 0) +++ modules/test/trunk/mc/build.sh 2007-10-08 13:26:57 UTC (rev 8562) @@ -0,0 +1,49 @@ +#!/bin/sh +## +## Invokes a script of the same name in the 'tools' module. +## = +## The 'tools' module is expected to be a peer directory of the directory +## in which this script lives. +## +## @author Jason Dillon +## + +# $Id: build.sh 1829 2006-03-05 13:20:08Z julien $ + +PROGNAME=3D`basename $0` +DIRNAME=3D`dirname $0` + +# Buss it yo +main() { + if [ "x$TOOLS_ROOT" =3D "x" ]; then + TOOLS_ROOT=3D`cd $DIRNAME/../tools && pwd` + fi + + MODULE_ROOT=3D`cd $DIRNAME; pwd` + export TOOLS_ROOT MODULE_ROOT DEBUG TRACE + + # Where is the target script? + target=3D"$TOOLS_ROOT/bin/$PROGNAME" + if [ ! -f "$target" ]; then + echo "${PROGNAME}: *ERROR* The target executable does not exist:" + echo "${PROGNAME}:" + echo "${PROGNAME}: $target" + echo "${PROGNAME}:" + echo "${PROGNAME}: Please make sure you have checked out the 'tools' modu= le" + echo "${PROGNAME}: and make sure it is up to date." + exit 2 + fi + + # Get busy yo! + if [ "x$DEBUG" !=3D "x" ]; then + echo "${PROGNAME}: Executing: /bin/sh $target $@" + fi + if [ "x$TRACE" =3D "x" ]; then + exec /bin/sh $target "$@" + else + exec /bin/sh -x $target "$@" + fi +} + +# Lets get ready to rumble! +main "$@" Property changes on: modules/test/trunk/mc/build.sh ___________________________________________________________________ Name: svn:executable + * Added: modules/test/trunk/mc/build.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/mc/build.xml (rev 0) +++ modules/test/trunk/mc/build.xml 2007-10-08 13:26:57 UTC (rev 8562) @@ -0,0 +1,220 @@ + + + + + + + + + + ]> + + + + + + + + + + + + + + + + + + + + + + + + + &buildmagic; + &modules; + &defaults; + &tools; + &targets; + + + + + + + + + + + + + + + + + + + + + + &libraries; + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Property changes on: modules/test/trunk/mc/build.xml ___________________________________________________________________ Name: svn:executable + * Added: modules/test/trunk/mc/src/main/org/jboss/test/unit/mc/MCTestLifeCycl= eTests.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/mc/src/main/org/jboss/test/unit/mc/MCTestLifeCycleTe= sts.java (rev 0) +++ modules/test/trunk/mc/src/main/org/jboss/test/unit/mc/MCTestLifeCycleTe= sts.java 2007-10-08 13:26:57 UTC (rev 8562) @@ -0,0 +1,50 @@ +/*************************************************************************= ***** + * JBoss, a division of Red Hat = * + * Copyright 2006, Red Hat Middleware, LLC, and individual = * + * contributors as indicated by the @authors tag. See the = * + * copyright.txt in the distribution for a full listing of = * + * individual contributors. = * + * = * + * This is free software; you can redistribute it and/or modify it = * + * under the terms of the GNU Lesser General Public License as = * + * published by the Free Software Foundation; either version 2.1 of = * + * the License, or (at your option) any later version. = * + * = * + * This software is distributed in the hope that it will be useful, = * + * but WITHOUT ANY WARRANTY; without even the implied warranty of = * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU = * + * Lesser General Public License for more details. = * + * = * + * You should have received a copy of the GNU Lesser General Public = * + * License along with this software; if not, write to the Free = * + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA = * + * 02110-1301 USA, or see the FSF site: http://www.fsf.org. = * + *************************************************************************= *****/ +package org.jboss.test.unit.mc; + +import org.jboss.unit.driver.impl.pojo.POJOTestSuiteDriver; +import org.jboss.unit.TestId; +import org.jboss.unit.driver.command.StartTestCommand; + +import java.util.Map; +import java.util.HashMap; + +/** + * @author Julien Viet + * @version $Revision: 1.1 $ + */ +public class MCTestLifeCycleTests +{ + + public static void main(String[] args) throws Exception + { + + POJOTestSuiteDriver driver =3D new POJOTestSuiteDriver(SomeTest.clas= s); + + Map parametrization =3D new HashMap(); + parametrization.put("dataSourceName", "hsqldb"); + + driver.invoke(new TestId("myTest"), new StartTestCommand(parametriza= tion)); + } + +} Added: modules/test/trunk/mc/src/main/org/jboss/test/unit/mc/MyService.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/mc/src/main/org/jboss/test/unit/mc/MyService.java = (rev 0) +++ modules/test/trunk/mc/src/main/org/jboss/test/unit/mc/MyService.java 20= 07-10-08 13:26:57 UTC (rev 8562) @@ -0,0 +1,54 @@ +/*************************************************************************= ***** + * JBoss, a division of Red Hat = * + * Copyright 2006, Red Hat Middleware, LLC, and individual = * + * contributors as indicated by the @authors tag. See the = * + * copyright.txt in the distribution for a full listing of = * + * individual contributors. = * + * = * + * This is free software; you can redistribute it and/or modify it = * + * under the terms of the GNU Lesser General Public License as = * + * published by the Free Software Foundation; either version 2.1 of = * + * the License, or (at your option) any later version. = * + * = * + * This software is distributed in the hope that it will be useful, = * + * but WITHOUT ANY WARRANTY; without even the implied warranty of = * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU = * + * Lesser General Public License for more details. = * + * = * + * You should have received a copy of the GNU Lesser General Public = * + * License along with this software; if not, write to the Free = * + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA = * + * 02110-1301 USA, or see the FSF site: http://www.fsf.org. = * + *************************************************************************= *****/ +package org.jboss.test.unit.mc; + +/** + * @author Julien Viet + * @version $Revision: 1.1 $ + */ +public class MyService +{ + + private String dataSourceName; + + public String getDataSourceName() + { + return dataSourceName; + } + + public void setDataSourceName(String dataSourceName) + { + this.dataSourceName =3D dataSourceName; + } + + public void start() + { + System.out.println("MyService start for data source " + dataSourceNa= me); + } + + public void stop() + { + System.out.println("MyService stop"); + } + +} Added: modules/test/trunk/mc/src/main/org/jboss/test/unit/mc/SomeTest.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/mc/src/main/org/jboss/test/unit/mc/SomeTest.java = (rev 0) +++ modules/test/trunk/mc/src/main/org/jboss/test/unit/mc/SomeTest.java 200= 7-10-08 13:26:57 UTC (rev 8562) @@ -0,0 +1,71 @@ +/*************************************************************************= ***** + * JBoss, a division of Red Hat = * + * Copyright 2006, Red Hat Middleware, LLC, and individual = * + * contributors as indicated by the @authors tag. See the = * + * copyright.txt in the distribution for a full listing of = * + * individual contributors. = * + * = * + * This is free software; you can redistribute it and/or modify it = * + * under the terms of the GNU Lesser General Public License as = * + * published by the Free Software Foundation; either version 2.1 of = * + * the License, or (at your option) any later version. = * + * = * + * This software is distributed in the hope that it will be useful, = * + * but WITHOUT ANY WARRANTY; without even the implied warranty of = * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU = * + * Lesser General Public License for more details. = * + * = * + * You should have received a copy of the GNU Lesser General Public = * + * License along with this software; if not, write to the Free = * + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA = * + * 02110-1301 USA, or see the FSF site: http://www.fsf.org. = * + *************************************************************************= *****/ +package org.jboss.test.unit.mc; + +import org.jboss.unit.api.pojo.annotations.Test; +import org.jboss.unit.mc.api.annotations.Bootstrap; +import org.jboss.beans.metadata.plugins.annotations.Inject; + +/** + * @author Julien Viet + * @version $Revision: 1.1 $ + */ +(a)Bootstrap(id=3D"/blah/toto.xml") +public class SomeTest +{ + + /** . */ + private MyService service; + + public MyService getService() + { + return service; + } + + @Inject(bean=3D"MyService") + public void setService(MyService service) + { + this.service =3D service; + } + + public String getDataSourceName() + { + return "hsqldb"; + } + + public void start() + { + System.out.println("SomeTest start with service " + service); + System.out.println("SomeTest start with service " + service); + System.out.println("SomeTest start with service " + service); + System.out.println("SomeTest start with service " + service); + System.out.println("SomeTest start with service " + service); + System.out.println("SomeTest start with service " + service); + } + + @Test + public void myTest() + { + + } +} Added: modules/test/trunk/mc/src/main/org/jboss/unit/mc/MCTestLifeCycle.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/mc/src/main/org/jboss/unit/mc/MCTestLifeCycle.java = (rev 0) +++ modules/test/trunk/mc/src/main/org/jboss/unit/mc/MCTestLifeCycle.java 2= 007-10-08 13:26:57 UTC (rev 8562) @@ -0,0 +1,178 @@ +/*************************************************************************= ***** + * JBoss, a division of Red Hat = * + * Copyright 2006, Red Hat Middleware, LLC, and individual = * + * contributors as indicated by the @authors tag. See the = * + * copyright.txt in the distribution for a full listing of = * + * individual contributors. = * + * = * + * This is free software; you can redistribute it and/or modify it = * + * under the terms of the GNU Lesser General Public License as = * + * published by the Free Software Foundation; either version 2.1 of = * + * the License, or (at your option) any later version. = * + * = * + * This software is distributed in the hope that it will be useful, = * + * but WITHOUT ANY WARRANTY; without even the implied warranty of = * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU = * + * Lesser General Public License for more details. = * + * = * + * You should have received a copy of the GNU Lesser General Public = * + * License along with this software; if not, write to the Free = * + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA = * + * 02110-1301 USA, or see the FSF site: http://www.fsf.org. = * + *************************************************************************= *****/ +package org.jboss.unit.mc; + +import org.jboss.unit.spi.pojo.TestLifeCycle; +import org.jboss.unit.spi.pojo.TestCaseLifeCycleException; +import org.jboss.unit.spi.pojo.TestCase; +import org.jboss.unit.mc.api.annotations.Bootstrap; +import org.jboss.kernel.plugins.bootstrap.basic.BasicBootstrap; +import org.jboss.kernel.plugins.deployment.xml.BeanXMLDeployer; +import org.jboss.kernel.spi.deployment.KernelDeployment; +import org.jboss.kernel.spi.dependency.KernelControllerContext; +import org.jboss.beans.metadata.plugins.AbstractBeanMetaData; +import org.jboss.beans.metadata.plugins.AbstractConstructorMetaData; +import org.jboss.beans.metadata.plugins.AbstractValueMetaData; + +import java.util.Map; +import java.net.URL; + +/** + * @author Julien Viet + * @version $Revision: 1.1 $ + */ +public class MCTestLifeCycle extends BasicBootstrap implements TestLifeCyc= le +{ + + /** . */ + private TestLifeCycle delegate; + + /** . */ + private BeanXMLDeployer beanDeployer; + + /** . */ + private KernelDeployment deployment; + + public MCTestLifeCycle(TestLifeCycle delegate) + { + this.delegate =3D delegate; + } + + public TestCase newTestCase(String name) throws TestCaseLifeCycleExcept= ion + { + return delegate.newTestCase(name); + } + + public void testCaseParametrize(TestCase testCase, Map = parametrization) throws TestCaseLifeCycleException + { + delegate.testCaseParametrize(testCase, parametrization); + } + + public void testCaseCreate(TestCase testCase) throws TestCaseLifeCycleE= xception + { + Class testClass =3D testCase.getPOJO().getClass(); + + // + Bootstrap blah =3D testClass.getAnnotation(Bootstrap.class); + if (blah =3D=3D null) + { + throw new TestCaseLifeCycleException("No Bootstrap annotation fou= nd"); + } + + URL url =3D testClass.getResource(blah.id()); + if (url =3D=3D null) + { + throw new TestCaseLifeCycleException("No URL found for bean xml "= + blah.id()); + } + + System.out.println("url =3D " + url); + System.out.println("url =3D " + url); + System.out.println("url =3D " + url); + + // setup MC + run(); + + try + { + AbstractBeanMetaData bmd =3D new AbstractBeanMetaData("TestCase",= testClass.getName()); + AbstractConstructorMetaData cmd =3D new AbstractConstructorMetaDa= ta(); + bmd.setConstructor(cmd); + TestCaseFactory factory =3D new TestCaseFactory(testCase.getPOJO(= )); + AbstractValueMetaData vmd =3D new AbstractValueMetaData(factory); + cmd.setFactory(vmd); + cmd.setFactoryMethod("getTestCase"); + getKernel().getController().install(bmd); + } + catch (Throwable throwable) + { + // Perform some MC throwable unwrap + if (deployment !=3D null) + { + // This may be MC saying that something went wrong + if (throwable instanceof IllegalStateException) + { + // log.error("Test runtime context startup failed", throwab= le); + for (KernelControllerContext kernelControllerContext : depl= oyment.getInstalledContexts()) + { + Throwable t =3D kernelControllerContext.getError(); + if (t !=3D null) + { + throwable =3D t; + break; + } + } + } + + // Undeploy all beans + if (deployment !=3D null) + { + beanDeployer.undeploy(deployment); + } + } + + // + throw new TestCaseLifeCycleException(throwable); + } + + try + { + beanDeployer =3D new BeanXMLDeployer(getKernel()); + + // + deployment =3D beanDeployer.deploy(url); + + // + beanDeployer.validate(deployment); + } + catch (Throwable throwable) + { + throw new TestCaseLifeCycleException(throwable); + } + + // + delegate.testCaseCreate(testCase); + } + + public void testCaseInvoke(TestCase testCase) throws TestCaseLifeCycleE= xception + { + delegate.testCaseInvoke(testCase); + } + + public void testCaseDestroy(TestCase testCase) + { + try + { + delegate.testCaseDestroy(testCase); + } + catch (Throwable t) + { + t.printStackTrace(); + } + + // Clean up MC + if (deployment !=3D null) + { + beanDeployer.undeploy(deployment); + } + } +} Added: modules/test/trunk/mc/src/main/org/jboss/unit/mc/MCTestProvider.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/mc/src/main/org/jboss/unit/mc/MCTestProvider.java = (rev 0) +++ modules/test/trunk/mc/src/main/org/jboss/unit/mc/MCTestProvider.java 20= 07-10-08 13:26:57 UTC (rev 8562) @@ -0,0 +1,58 @@ +/*************************************************************************= ***** + * JBoss, a division of Red Hat = * + * Copyright 2006, Red Hat Middleware, LLC, and individual = * + * contributors as indicated by the @authors tag. See the = * + * copyright.txt in the distribution for a full listing of = * + * individual contributors. = * + * = * + * This is free software; you can redistribute it and/or modify it = * + * under the terms of the GNU Lesser General Public License as = * + * published by the Free Software Foundation; either version 2.1 of = * + * the License, or (at your option) any later version. = * + * = * + * This software is distributed in the hope that it will be useful, = * + * but WITHOUT ANY WARRANTY; without even the implied warranty of = * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU = * + * Lesser General Public License for more details. = * + * = * + * You should have received a copy of the GNU Lesser General Public = * + * License along with this software; if not, write to the Free = * + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA = * + * 02110-1301 USA, or see the FSF site: http://www.fsf.org. = * + *************************************************************************= *****/ +package org.jboss.unit.mc; + +import org.jboss.unit.spi.pojo.TestProvider; +import org.jboss.unit.spi.pojo.TestSuiteDescriptor; +import org.jboss.unit.spi.pojo.TestProviderSupport; +import org.jboss.unit.spi.pojo.TestLifeCycle; + +/** + * @author Julien Viet + * @version $Revision: 1.1 $ + */ +public class MCTestProvider implements TestProvider +{ + + /** . */ + private TestProviderSupport delegate; + + /** . */ + private MCTestLifeCycle lifeCycle; + + public MCTestProvider(Class testClass) + { + this.delegate =3D new TestProviderSupport(testClass); + this.lifeCycle =3D new MCTestLifeCycle(delegate.getLifeCycle()); + } + + public TestSuiteDescriptor getDescriptor() + { + return delegate.getDescriptor(); + } + + public TestLifeCycle getLifeCycle() + { + return lifeCycle; + } +} Added: modules/test/trunk/mc/src/main/org/jboss/unit/mc/TestCaseFactory.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/mc/src/main/org/jboss/unit/mc/TestCaseFactory.java = (rev 0) +++ modules/test/trunk/mc/src/main/org/jboss/unit/mc/TestCaseFactory.java 2= 007-10-08 13:26:57 UTC (rev 8562) @@ -0,0 +1,44 @@ +/*************************************************************************= ***** + * JBoss, a division of Red Hat = * + * Copyright 2006, Red Hat Middleware, LLC, and individual = * + * contributors as indicated by the @authors tag. See the = * + * copyright.txt in the distribution for a full listing of = * + * individual contributors. = * + * = * + * This is free software; you can redistribute it and/or modify it = * + * under the terms of the GNU Lesser General Public License as = * + * published by the Free Software Foundation; either version 2.1 of = * + * the License, or (at your option) any later version. = * + * = * + * This software is distributed in the hope that it will be useful, = * + * but WITHOUT ANY WARRANTY; without even the implied warranty of = * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU = * + * Lesser General Public License for more details. = * + * = * + * You should have received a copy of the GNU Lesser General Public = * + * License along with this software; if not, write to the Free = * + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA = * + * 02110-1301 USA, or see the FSF site: http://www.fsf.org. = * + *************************************************************************= *****/ +package org.jboss.unit.mc; + +/** + * @author Julien Viet + * @version $Revision: 1.1 $ + */ +public class TestCaseFactory +{ + + /** . */ + private final Object testCase; + + public TestCaseFactory(Object testCase) + { + this.testCase =3D testCase; + } + + public Object getTestCase() + { + return testCase; + } +} Added: modules/test/trunk/mc/src/main/org/jboss/unit/mc/api/annotations/Boo= tstrap.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/mc/src/main/org/jboss/unit/mc/api/annotations/Bootst= rap.java (rev 0) +++ modules/test/trunk/mc/src/main/org/jboss/unit/mc/api/annotations/Bootst= rap.java 2007-10-08 13:26:57 UTC (rev 8562) @@ -0,0 +1,45 @@ +/*************************************************************************= ***** + * JBoss, a division of Red Hat = * + * Copyright 2006, Red Hat Middleware, LLC, and individual = * + * contributors as indicated by the @authors tag. See the = * + * copyright.txt in the distribution for a full listing of = * + * individual contributors. = * + * = * + * This is free software; you can redistribute it and/or modify it = * + * under the terms of the GNU Lesser General Public License as = * + * published by the Free Software Foundation; either version 2.1 of = * + * the License, or (at your option) any later version. = * + * = * + * This software is distributed in the hope that it will be useful, = * + * but WITHOUT ANY WARRANTY; without even the implied warranty of = * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU = * + * Lesser General Public License for more details. = * + * = * + * You should have received a copy of the GNU Lesser General Public = * + * License along with this software; if not, write to the Free = * + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA = * + * 02110-1301 USA, or see the FSF site: http://www.fsf.org. = * + *************************************************************************= *****/ +package org.jboss.unit.mc.api.annotations; + +import org.jboss.unit.spi.pojo.annotations.Provider; +import org.jboss.unit.mc.MCTestProvider; + +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; +import java.lang.annotation.ElementType; + +/** + * Annotate + * + * @author Julien Viet + * @version $Revision: 1.1 $ + */ +(a)Retention(RetentionPolicy.RUNTIME) +(a)Target({ElementType.TYPE}) +(a)Provider(MCTestProvider.class) +public @interface Bootstrap +{ + String id(); +} Added: modules/test/trunk/mc/src/resources/test/blah/toto.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/mc/src/resources/test/blah/toto.xml = (rev 0) +++ modules/test/trunk/mc/src/resources/test/blah/toto.xml 2007-10-08 13:26= :57 UTC (rev 8562) @@ -0,0 +1,32 @@ + + + + + + + + + --===============5943936876338523273==-- From portal-commits at lists.jboss.org Mon Oct 8 12:08:33 2007 Content-Type: multipart/mixed; boundary="===============7794834668316435080==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8563 - in modules/test/trunk: test and 11 other directories. Date: Mon, 08 Oct 2007 12:08:32 -0400 Message-ID: --===============7794834668316435080== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: julien(a)jboss.com Date: 2007-10-08 12:08:32 -0400 (Mon, 08 Oct 2007) New Revision: 8563 Removed: modules/test/trunk/test/selenium-java-client-driver-backport.jar modules/test/trunk/test/selenium-java-client-driver.jar modules/test/trunk/test/src/main/org/jboss/portal/test/framework/Abstrac= tPortalTestCase.java modules/test/trunk/test/src/main/org/jboss/portal/test/framework/MonoVal= uedTestParameterValue.java modules/test/trunk/test/src/main/org/jboss/portal/test/framework/MultiVa= luedTestParameterValue.java modules/test/trunk/test/src/main/org/jboss/portal/test/framework/TestPar= ameterValue.java modules/test/trunk/test/src/main/org/jboss/portal/test/framework/TestPar= ametrization.java modules/test/trunk/test/src/main/org/jboss/portal/test/framework/driver/ modules/test/trunk/test/src/main/org/jboss/portal/test/framework/impl/jb= oss/agent/JBossTestAgent.java modules/test/trunk/test/src/main/org/jboss/portal/test/framework/impl/jb= oss/agent/JBossTestAgentMBean.java modules/test/trunk/test/src/main/org/jboss/portal/test/framework/impl/jb= oss/jmx/MBeanServerFactory.java modules/test/trunk/test/src/main/org/jboss/portal/test/framework/impl/jb= oss/jmx/RemoteMBeanProxy.java modules/test/trunk/test/src/main/org/jboss/portal/test/framework/impl/jb= oss/jmx/RemoteMBeanServerAdapter.java modules/test/trunk/test/src/main/org/jboss/portal/test/framework/impl/jb= oss/server/JBossServiceLookup.java modules/test/trunk/test/src/main/org/jboss/portal/test/framework/info/ modules/test/trunk/test/src/main/org/jboss/portal/test/framework/junit/ modules/test/trunk/test/src/main/org/jboss/portal/test/framework/mc/ modules/test/trunk/test/src/main/org/jboss/portal/test/framework/runner/= WebTestRunner.java modules/test/trunk/test/src/main/org/jboss/test/InfoTestCase.java modules/test/trunk/test/src/main/org/jboss/test/TestParameterValueTestCa= se.java modules/test/trunk/test/src/main/org/jboss/test/TestParametrizationTestC= ase.java modules/test/trunk/test/src/main/org/jboss/test/junit/ Modified: modules/test/trunk/build/build-thirdparty.xml modules/test/trunk/test/build.xml modules/test/trunk/test/src/main/org/jboss/portal/test/framework/embedde= d/DSConfig.java modules/test/trunk/test/src/main/org/jboss/portal/test/framework/embedde= d/DataSourceSupport.java modules/test/trunk/test/src/main/org/jboss/portal/test/framework/embedde= d/apacheds/ApacheDSServiceMBean.java modules/test/trunk/test/src/main/org/jboss/portal/test/framework/embedde= d/opends/OpenDSService.java modules/test/trunk/test/src/main/org/jboss/portal/test/framework/embedde= d/opends/OpenDSServiceMBean.java modules/test/trunk/test/src/main/org/jboss/portal/test/framework/embedde= d/opends/OpenDSUtil.java modules/test/trunk/test/src/main/org/jboss/portal/test/framework/impl/ge= neric/config/HTTPTestRunnerConfig.java modules/test/trunk/test/src/main/org/jboss/portal/test/framework/runner/= BaseRunner.java modules/test/trunk/test/src/main/org/jboss/portal/test/framework/runner/= HTTPTestRunner.java modules/test/trunk/tools/etc/buildfragments/modules.ent Log: remove remote stuff from test module that will be reimported based on jboss= unit Modified: modules/test/trunk/build/build-thirdparty.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/build/build-thirdparty.xml 2007-10-08 13:26:57 UTC (= rev 8562) +++ modules/test/trunk/build/build-thirdparty.xml 2007-10-08 16:08:32 UTC (= rev 8563) @@ -52,7 +52,6 @@ = - = @@ -63,6 +62,9 @@ = + + + Modified: modules/test/trunk/test/build.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/test/build.xml 2007-10-08 13:26:57 UTC (rev 8562) +++ modules/test/trunk/test/build.xml 2007-10-08 16:08:32 UTC (rev 8563) @@ -82,25 +82,26 @@ = = + + &libraries; + + - + + - - - - - + = Deleted: modules/test/trunk/test/selenium-java-client-driver-backport.jar =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D (Binary files differ) Deleted: modules/test/trunk/test/selenium-java-client-driver.jar =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D (Binary files differ) Deleted: modules/test/trunk/test/src/main/org/jboss/portal/test/framework/A= bstractPortalTestCase.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/test/src/main/org/jboss/portal/test/framework/Abstra= ctPortalTestCase.java 2007-10-08 13:26:57 UTC (rev 8562) +++ modules/test/trunk/test/src/main/org/jboss/portal/test/framework/Abstra= ctPortalTestCase.java 2007-10-08 16:08:32 UTC (rev 8563) @@ -1,144 +0,0 @@ -/*************************************************************************= ***** - * JBoss, a division of Red Hat = * - * Copyright 2007, Red Hat Middleware, LLC, and individual = * - * contributors as indicated by the @authors tag. See the = * - * copyright.txt in the distribution for a full listing of = * - * individual contributors. = * - * = * - * This is free software; you can redistribute it and/or modify it = * - * under the terms of the GNU Lesser General Public License as = * - * published by the Free Software Foundation; either version 2.1 of = * - * the License, or (at your option) any later version. = * - * = * - * This software is distributed in the hope that it will be useful, = * - * but WITHOUT ANY WARRANTY; without even the implied warranty of = * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU = * - * Lesser General Public License for more details. = * - * = * - * You should have received a copy of the GNU Lesser General Public = * - * License along with this software; if not, write to the Free = * - * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA = * - * 02110-1301 USA, or see the FSF site: http://www.fsf.org. = * - *************************************************************************= *****/ - -package org.jboss.portal.test.framework; - -import junit.framework.TestCase; -import junit.framework.TestSuite; -import org.apache.log4j.Appender; -import org.apache.log4j.ConsoleAppender; -import org.apache.log4j.Level; -import org.apache.log4j.Logger; -import org.apache.log4j.SimpleLayout; -import org.jboss.portal.common.junit.TransactionAssert; -import org.jboss.portal.test.framework.junit.JUnitAdapter; -import org.jboss.portal.test.framework.junit.POJOJUnitTest; -import org.jboss.portal.test.framework.embedded.DataSourceSupport; -import org.jboss.portal.test.framework.embedded.HibernateSupport; -import org.jboss.portal.test.framework.mc.TestRuntimeContext; - -import java.net.URL; - -/** - * @author Anil Saldhana - * @author Chris Laprun - * @version $Revision: 7954 $ - * @since 2.6 - */ -public abstract class AbstractPortalTestCase extends TestCase -{ - static - { - Appender appender =3D new ConsoleAppender(new SimpleLayout()); - Logger.getRoot().addAppender(appender); - Logger.getRoot().setLevel(Level.DEBUG); - Logger.getLogger("org.hibernate").setLevel(Level.ERROR); - } - - /** . */ - protected TestRuntimeContext runtimeContext; - /** . */ - protected DataSourceSupport.Config dataSourceConfigParameter; - /** . */ - protected HibernateSupport hibernate; - - public HibernateSupport getHibernate() - { - return hibernate; - } - - public DataSourceSupport.Config getDataSourceConfigParameter() - { - return dataSourceConfigParameter; - } - - public void setDataSourceConfigParameter(DataSourceSupport.Config dataS= ourceConfigParameter) - { - this.dataSourceConfigParameter =3D dataSourceConfigParameter; - } - - public void setHibernate(HibernateSupport hibernate) - { - this.hibernate =3D hibernate; - } - - public String getName() - { - return super.getName() + ",ds=3D" + dataSourceConfigParameter.getNam= e() + ",Config=3D" + getConfigParamValue(); - } - - protected void setUp() throws Exception - { - runtimeContext =3D new TestRuntimeContext(getConfigLocation()); - runtimeContext.addBean("TestBean", this); - runtimeContext.addBean("DataSourceConfig", dataSourceConfigParameter= ); - runtimeContext.addBean("HibernateConfig", HibernateSupport.getConfig= (dataSourceConfigParameter.getName())); - configureRuntimeContext(runtimeContext); - runtimeContext.start(); - } - - /** - * Allows sub-classes to further configure the TestRuntimeContext creat= ed in setUp. Default implementation doesn't do - * anything. - * - * @param runtimeContext - */ - protected void configureRuntimeContext(TestRuntimeContext runtimeContex= t) - { - // null implementation - } - - protected void tearDown() throws Exception - { - // clean up any pending transaction - TransactionAssert.endTransaction(); - - runtimeContext.stop(); - } - - protected String getConfigLocation() - { - return getConfigLocationPrefix() + getConfigParamValue(); - } - - protected Object getConfigParamValue() - { - TestParametrization parametrization =3D JUnitAdapter.getParametrizat= ion(); - TestParameterValue paramValue =3D parametrization.getParameterValue(= "Config"); - return paramValue.get(); - } - - public static TestSuite suite(Class testClass) throws Exception - { - TestParametrization parametrization =3D JUnitAdapter.getParametrizat= ion(); - URL configsURL =3D Thread.currentThread().getContextClassLoader().ge= tResource("datasources.xml"); - parametrization.setParameterValue("DataSourceConfig", DataSourceSupp= ort.Config.fromXML2(configsURL)); - POJOJUnitTest abc =3D new POJOJUnitTest(testClass); - JUnitAdapter adapter =3D new JUnitAdapter(abc, parametrization); - TestSuite suite =3D new TestSuite(); - suite.addTest(adapter); - return suite; - } - - protected abstract String getConfigLocationPrefix(); -} Deleted: modules/test/trunk/test/src/main/org/jboss/portal/test/framework/M= onoValuedTestParameterValue.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/test/src/main/org/jboss/portal/test/framework/MonoVa= luedTestParameterValue.java 2007-10-08 13:26:57 UTC (rev 8562) +++ modules/test/trunk/test/src/main/org/jboss/portal/test/framework/MonoVa= luedTestParameterValue.java 2007-10-08 16:08:32 UTC (rev 8563) @@ -1,46 +0,0 @@ -/*************************************************************************= ***** - * JBoss, a division of Red Hat = * - * Copyright 2006, Red Hat Middleware, LLC, and individual = * - * contributors as indicated by the @authors tag. See the = * - * copyright.txt in the distribution for a full listing of = * - * individual contributors. = * - * = * - * This is free software; you can redistribute it and/or modify it = * - * under the terms of the GNU Lesser General Public License as = * - * published by the Free Software Foundation; either version 2.1 of = * - * the License, or (at your option) any later version. = * - * = * - * This software is distributed in the hope that it will be useful, = * - * but WITHOUT ANY WARRANTY; without even the implied warranty of = * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU = * - * Lesser General Public License for more details. = * - * = * - * You should have received a copy of the GNU Lesser General Public = * - * License along with this software; if not, write to the Free = * - * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA = * - * 02110-1301 USA, or see the FSF site: http://www.fsf.org. = * - *************************************************************************= *****/ -package org.jboss.portal.test.framework; - -/** - * A mono value. - * - * @author Julien Viet - * @version $Revision: 7228 $ - */ -public class MonoValuedTestParameterValue extends TestParameterValue -{ - - /** The value. */ - protected final Object value; - - public MonoValuedTestParameterValue(Object value) - { - this.value =3D value; - } - - public Object get() - { - return value; - } -} Deleted: modules/test/trunk/test/src/main/org/jboss/portal/test/framework/M= ultiValuedTestParameterValue.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/test/src/main/org/jboss/portal/test/framework/MultiV= aluedTestParameterValue.java 2007-10-08 13:26:57 UTC (rev 8562) +++ modules/test/trunk/test/src/main/org/jboss/portal/test/framework/MultiV= aluedTestParameterValue.java 2007-10-08 16:08:32 UTC (rev 8563) @@ -1,91 +0,0 @@ -/*************************************************************************= ***** - * JBoss, a division of Red Hat = * - * Copyright 2006, Red Hat Middleware, LLC, and individual = * - * contributors as indicated by the @authors tag. See the = * - * copyright.txt in the distribution for a full listing of = * - * individual contributors. = * - * = * - * This is free software; you can redistribute it and/or modify it = * - * under the terms of the GNU Lesser General Public License as = * - * published by the Free Software Foundation; either version 2.1 of = * - * the License, or (at your option) any later version. = * - * = * - * This software is distributed in the hope that it will be useful, = * - * but WITHOUT ANY WARRANTY; without even the implied warranty of = * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU = * - * Lesser General Public License for more details. = * - * = * - * You should have received a copy of the GNU Lesser General Public = * - * License along with this software; if not, write to the Free = * - * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA = * - * 02110-1301 USA, or see the FSF site: http://www.fsf.org. = * - *************************************************************************= *****/ -package org.jboss.portal.test.framework; - -import java.util.Arrays; -import java.util.Collection; -import java.util.Iterator; - -/** - * A multi value. - * - * @author Julien Viet - * @version $Revision: 7228 $ - */ -public class MultiValuedTestParameterValue extends TestParameterValue -{ - - /** . */ - protected final Collection value; - - public MultiValuedTestParameterValue(Object[] value) throws IllegalArgu= mentException - { - if (value =3D=3D null) - { - throw new IllegalArgumentException(); - } - - // - this.value =3D Arrays.asList(value); - } - - public MultiValuedTestParameterValue(Collection value) throws IllegalAr= gumentException - { - if (value =3D=3D null) - { - throw new IllegalArgumentException(); - } - - // - this.value =3D value; - } - - public Object get() - { - return value; - } - - /** Return an iterator over the values. */ - public Iterator iterator() - { - return new Iterator() - { - Iterator i =3D value.iterator(); - - public boolean hasNext() - { - return i.hasNext(); - } - - public Object next() - { - return new MonoValuedTestParameterValue(i.next()); - } - - public void remove() - { - throw new UnsupportedOperationException(); - } - }; - } -} Deleted: modules/test/trunk/test/src/main/org/jboss/portal/test/framework/T= estParameterValue.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/test/src/main/org/jboss/portal/test/framework/TestPa= rameterValue.java 2007-10-08 13:26:57 UTC (rev 8562) +++ modules/test/trunk/test/src/main/org/jboss/portal/test/framework/TestPa= rameterValue.java 2007-10-08 16:08:32 UTC (rev 8563) @@ -1,63 +0,0 @@ -/*************************************************************************= ***** - * JBoss, a division of Red Hat = * - * Copyright 2006, Red Hat Middleware, LLC, and individual = * - * contributors as indicated by the @authors tag. See the = * - * copyright.txt in the distribution for a full listing of = * - * individual contributors. = * - * = * - * This is free software; you can redistribute it and/or modify it = * - * under the terms of the GNU Lesser General Public License as = * - * published by the Free Software Foundation; either version 2.1 of = * - * the License, or (at your option) any later version. = * - * = * - * This software is distributed in the hope that it will be useful, = * - * but WITHOUT ANY WARRANTY; without even the implied warranty of = * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU = * - * Lesser General Public License for more details. = * - * = * - * You should have received a copy of the GNU Lesser General Public = * - * License along with this software; if not, write to the Free = * - * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA = * - * 02110-1301 USA, or see the FSF site: http://www.fsf.org. = * - *************************************************************************= *****/ -package org.jboss.portal.test.framework; - -import java.io.Serializable; - -/** - * The value of a test parameter. - * - * @author Julien Viet - * @version $Revision: 7228 $ - */ -public abstract class TestParameterValue implements Serializable -{ - /** - * Return the actual value. - * - * @return - */ - public abstract Object get(); - - public int hashCode() - { - Object o =3D get(); - return o =3D=3D null ? 0 : o.hashCode(); - } - - public boolean equals(Object obj) - { - if (obj =3D=3D this) - { - return true; - } - if (obj instanceof TestParameterValue) - { - TestParameterValue that =3D (TestParameterValue)obj; - Object thisO =3D get(); - Object thatO =3D that.get(); - return thisO =3D=3D null ? thatO =3D=3D null : thisO.equals(thatO= ); - } - return false; - } -} Deleted: modules/test/trunk/test/src/main/org/jboss/portal/test/framework/T= estParametrization.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/test/src/main/org/jboss/portal/test/framework/TestPa= rametrization.java 2007-10-08 13:26:57 UTC (rev 8562) +++ modules/test/trunk/test/src/main/org/jboss/portal/test/framework/TestPa= rametrization.java 2007-10-08 16:08:32 UTC (rev 8563) @@ -1,195 +0,0 @@ -/*************************************************************************= ***** - * JBoss, a division of Red Hat = * - * Copyright 2006, Red Hat Middleware, LLC, and individual = * - * contributors as indicated by the @authors tag. See the = * - * copyright.txt in the distribution for a full listing of = * - * individual contributors. = * - * = * - * This is free software; you can redistribute it and/or modify it = * - * under the terms of the GNU Lesser General Public License as = * - * published by the Free Software Foundation; either version 2.1 of = * - * the License, or (at your option) any later version. = * - * = * - * This software is distributed in the hope that it will be useful, = * - * but WITHOUT ANY WARRANTY; without even the implied warranty of = * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU = * - * Lesser General Public License for more details. = * - * = * - * You should have received a copy of the GNU Lesser General Public = * - * License along with this software; if not, write to the Free = * - * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA = * - * 02110-1301 USA, or see the FSF site: http://www.fsf.org. = * - *************************************************************************= *****/ -package org.jboss.portal.test.framework; - -import org.jboss.portal.test.framework.info.TestInfo; - -import java.io.Serializable; -import java.util.ArrayList; -import java.util.Collection; -import java.util.HashMap; -import java.util.HashSet; -import java.util.Iterator; -import java.util.Map; -import java.util.Set; - -/** - * The parametrization of a test. - * - * @author Julien Viet - * @version $Revision: 7230 $ - */ -public class TestParametrization implements Serializable -{ - - /** . */ - private Map parameterValues; - - public TestParametrization() - { - parameterValues =3D new HashMap(); - } - - public TestParametrization(Map parameterValues) throws IllegalArgumentE= xception - { - this(); - - // - if (parameterValues =3D=3D null) - { - throw new IllegalArgumentException(); - } - - // - for (Iterator i =3D parameterValues.entrySet().iterator(); i.hasNext= ();) - { - Map.Entry entry =3D (Map.Entry)i.next(); - String parameterName =3D (String)entry.getKey(); - TestParameterValue parameterValue =3D (TestParameterValue)entry.g= etValue(); - setParameterValue(parameterName, parameterValue); - } - } - - /** - * Set a parameter value, using a null value will remove the parameter. - * - * @param parameterName the parameter name - * @param parameterValue the parameter value - * @throws IllegalArgumentException if the parameter name is null - */ - public void setParameterValue(String parameterName, TestParameterValue = parameterValue) throws IllegalArgumentException - { - if (parameterName =3D=3D null) - { - throw new IllegalArgumentException(); - } - if (parameterValue =3D=3D null) - { - parameterValues.remove(parameterName); - } - else - { - parameterValues.put(parameterName, parameterValue); - } - } - - /** - * Return a parameter value. - * - * @param parameterName the parameter name - * @return the parameter value or null if it does not exist - * @throws IllegalArgumentException if the parameter name is null - */ - public TestParameterValue getParameterValue(String parameterName) throw= s IllegalArgumentException - { - if (parameterName =3D=3D null) - { - throw new IllegalArgumentException(); - } - return (TestParameterValue)parameterValues.get(parameterName); - } - - public boolean isEmpty() - { - return parameterValues.isEmpty(); - } - - public String toString() - { - StringBuffer tmp =3D new StringBuffer(); - for (Iterator i =3D parameterValues.entrySet().iterator(); i.hasNext= ();) - { - Map.Entry entry =3D (Map.Entry)i.next(); - String parameterName =3D (String)entry.getKey(); - TestParameterValue value =3D (TestParameterValue)entry.getValue(); - tmp.append(parameterName).append('=3D').append(value.get()).appen= d(i.hasNext() ? "," : ""); - } - return tmp.toString(); - } - - /** - * Build a collection of parametrization that satisfies the parameters = exposed by the test meta information and the - * parameter provided by the map. - */ - public Collection create(TestInfo info) - { - ArrayList c =3D new ArrayList(); - c.add(new HashMap()); - - Set expectedParameters =3D new HashSet(info.getParameterNames()); - - // - for (Iterator i =3D parameterValues.entrySet().iterator(); i.hasNext= ();) - { - Map.Entry entry =3D (Map.Entry)i.next(); - String parameterName =3D (String)entry.getKey(); - TestParameterValue value =3D (TestParameterValue)entry.getValue(); - - // - if (expectedParameters.contains(parameterName)) - { - expectedParameters.remove(parameterName); - - // - if (value instanceof MultiValuedTestParameterValue) - { - MultiValuedTestParameterValue multiValue =3D (MultiValuedTe= stParameterValue)value; - ArrayList tmp =3D new ArrayList(); - for (Iterator j =3D multiValue.iterator(); j.hasNext();) - { - TestParameterValue o =3D (TestParameterValue)j.next(); - ArrayList copy =3D new ArrayList(c.size()); - for (Iterator k =3D c.iterator(); k.hasNext();) - { - Map parametrization =3D (Map)k.next(); - parametrization =3D new HashMap(parametrization); - parametrization.put(parameterName, o); - copy.add(parametrization); - } - tmp.addAll(copy); - } - c =3D tmp; - } - else - { - for (int j =3D 0; j < c.size(); j++) - { - Map parametrization =3D (Map)c.get(j); - parametrization.put(parameterName, value); - } - } - } - } - - // - for (int i =3D 0; i < c.size(); i++) - { - Map parametrization =3D (Map)c.get(i); - TestParametrization ctx =3D new TestParametrization(parametrizati= on); - c.set(i, ctx); - } - - // - return c; - } -} Modified: modules/test/trunk/test/src/main/org/jboss/portal/test/framework/= embedded/DSConfig.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/test/src/main/org/jboss/portal/test/framework/embedd= ed/DSConfig.java 2007-10-08 13:26:57 UTC (rev 8562) +++ modules/test/trunk/test/src/main/org/jboss/portal/test/framework/embedd= ed/DSConfig.java 2007-10-08 16:08:32 UTC (rev 8563) @@ -25,7 +25,6 @@ = import org.jboss.portal.common.xml.XMLTools; import org.jboss.portal.common.io.IOTools; -import org.jboss.portal.test.framework.MultiValuedTestParameterValue; import org.w3c.dom.Document; import org.w3c.dom.Element; = @@ -112,12 +111,12 @@ toString(); } = - public static MultiValuedTestParameterValue fromXML2(URL url) throws Ex= ception - { - DSConfig[] configs =3D fromXML(url); - List list =3D Arrays.asList(configs); - return new MultiValuedTestParameterValue(list); - } +// public static MultiValuedTestParameterValue fromXML2(URL url) throws = Exception +// { +// DSConfig[] configs =3D fromXML(url); +// List list =3D Arrays.asList(configs); +// return new MultiValuedTestParameterValue(list); +// } = public static DSConfig[] fromXML(URL url) throws Exception { Modified: modules/test/trunk/test/src/main/org/jboss/portal/test/framework/= embedded/DataSourceSupport.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/test/src/main/org/jboss/portal/test/framework/embedd= ed/DataSourceSupport.java 2007-10-08 13:26:57 UTC (rev 8562) +++ modules/test/trunk/test/src/main/org/jboss/portal/test/framework/embedd= ed/DataSourceSupport.java 2007-10-08 16:08:32 UTC (rev 8563) @@ -25,7 +25,6 @@ = import org.jboss.portal.common.xml.XMLTools; import org.jboss.portal.common.io.IOTools; -import org.jboss.portal.test.framework.MultiValuedTestParameterValue; import org.jboss.resource.adapter.jdbc.local.LocalTxDataSource; import org.jboss.resource.connectionmanager.CachedConnectionManagerReferen= ce; import org.w3c.dom.Document; @@ -254,12 +253,12 @@ this.password =3D password; } = - public static MultiValuedTestParameterValue fromXML2(URL url) throws= Exception - { - Config[] configs =3D fromXML(url); - List list =3D Arrays.asList(configs); - return new MultiValuedTestParameterValue(list); - } +// public static MultiValuedTestParameterValue fromXML2(URL url) thro= ws Exception +// { +// Config[] configs =3D fromXML(url); +// List list =3D Arrays.asList(configs); +// return new MultiValuedTestParameterValue(list); +// } = public static Config[] fromXML(URL url) throws Exception { Modified: modules/test/trunk/test/src/main/org/jboss/portal/test/framework/= embedded/apacheds/ApacheDSServiceMBean.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/test/src/main/org/jboss/portal/test/framework/embedd= ed/apacheds/ApacheDSServiceMBean.java 2007-10-08 13:26:57 UTC (rev 8562) +++ modules/test/trunk/test/src/main/org/jboss/portal/test/framework/embedd= ed/apacheds/ApacheDSServiceMBean.java 2007-10-08 16:08:32 UTC (rev 8563) @@ -23,13 +23,11 @@ = package org.jboss.portal.test.framework.embedded.apacheds; = -import org.jboss.system.ServiceMBean; - /** * @author Boleslaw Daw= idowicz * @version $Revision: 1.1 $ */ -public interface ApacheDSServiceMBean extends ServiceMBean +public interface ApacheDSServiceMBean { = /* public String printDiagnostics(); Modified: modules/test/trunk/test/src/main/org/jboss/portal/test/framework/= embedded/opends/OpenDSService.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/test/src/main/org/jboss/portal/test/framework/embedd= ed/opends/OpenDSService.java 2007-10-08 13:26:57 UTC (rev 8562) +++ modules/test/trunk/test/src/main/org/jboss/portal/test/framework/embedd= ed/opends/OpenDSService.java 2007-10-08 16:08:32 UTC (rev 8563) @@ -24,7 +24,7 @@ package org.jboss.portal.test.framework.embedded.opends; = import org.opends.server.core.DirectoryServer; -import org.jboss.system.ServiceMBeanSupport; +import org.apache.log4j.Logger; = import java.security.AccessController; import java.security.PrivilegedAction; @@ -41,8 +41,11 @@ * @version $Revision$ * @since Sep 13, 2006 */ -public class OpenDSService extends ServiceMBeanSupport implements OpenDSSe= rviceMBean +public class OpenDSService implements OpenDSServiceMBean { + + private static final Logger log =3D Logger.getLogger(OpenDSService.clas= s); + public static String objectName =3D "portal.test:service=3DOpenDSServic= e"; = private String newline =3D (String) @@ -70,9 +73,17 @@ DirectoryServer.restart(getClass().getName(), "DS restart"); } = + public void create() throws Exception + { + } + + public void start() throws Exception + { + startService(); + } + public void startService() throws Exception { - super.startService(); = //Get the location of the conf directory String confLoc =3D (String)AccessController.doPrivileged( @@ -94,12 +105,21 @@ = } = + public void stop() throws Exception + { + stopService(); + } + public void stopService() throws Exception { log.info("Asking DS to shutdown"); DirectoryServer.shutDown(getClass().getName(), "Shut down DS"); } = + public void destroy() throws Exception + { + } + /** * * A GetSystemPropetyAction. Modified: modules/test/trunk/test/src/main/org/jboss/portal/test/framework/= embedded/opends/OpenDSServiceMBean.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/test/src/main/org/jboss/portal/test/framework/embedd= ed/opends/OpenDSServiceMBean.java 2007-10-08 13:26:57 UTC (rev 8562) +++ modules/test/trunk/test/src/main/org/jboss/portal/test/framework/embedd= ed/opends/OpenDSServiceMBean.java 2007-10-08 16:08:32 UTC (rev 8563) @@ -23,13 +23,11 @@ = package org.jboss.portal.test.framework.embedded.opends; = -import org.jboss.system.ServiceMBean; - /** * @author Boleslaw Daw= idowicz * @version $Revision: 1.1 $ */ -public interface OpenDSServiceMBean extends ServiceMBean +public interface OpenDSServiceMBean { = /*public String printDiagnostics(); Modified: modules/test/trunk/test/src/main/org/jboss/portal/test/framework/= embedded/opends/OpenDSUtil.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/test/src/main/org/jboss/portal/test/framework/embedd= ed/opends/OpenDSUtil.java 2007-10-08 13:26:57 UTC (rev 8562) +++ modules/test/trunk/test/src/main/org/jboss/portal/test/framework/embedd= ed/opends/OpenDSUtil.java 2007-10-08 16:08:32 UTC (rev 8563) @@ -23,11 +23,11 @@ = package org.jboss.portal.test.framework.embedded.opends; = -import org.jboss.logging.Logger; import org.opends.server.tools.LDAPCompare; import org.opends.server.tools.LDAPDelete; import org.opends.server.tools.LDAPModify; import org.opends.server.tools.LDAPSearch; +import org.apache.log4j.Logger; = import java.net.URL; import java.io.File; Modified: modules/test/trunk/test/src/main/org/jboss/portal/test/framework/= impl/generic/config/HTTPTestRunnerConfig.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/test/src/main/org/jboss/portal/test/framework/impl/g= eneric/config/HTTPTestRunnerConfig.java 2007-10-08 13:26:57 UTC (rev 8562) +++ modules/test/trunk/test/src/main/org/jboss/portal/test/framework/impl/g= eneric/config/HTTPTestRunnerConfig.java 2007-10-08 16:08:32 UTC (rev 8563) @@ -22,10 +22,6 @@ *************************************************************************= *****/ package org.jboss.portal.test.framework.impl.generic.config; = -import org.jboss.portal.test.framework.TestParametrization; -import org.jboss.portal.test.framework.TestParameterValue; -import org.jboss.portal.test.framework.junit.JUnitAdapter; - /** * @author Julien Viet * @version $Revision: 1.1 $ @@ -41,17 +37,17 @@ */ public String getServerName() { - TestParametrization parametrization =3D JUnitAdapter.getParametrizat= ion(); - TestParameterValue archive =3D parametrization.getParameterValue("se= rverName"); + // TestParametrization parametrization =3D JUnitAdapter.getParametri= zation(); + // TestParameterValue archive =3D parametrization.getParameterValue(= "serverName"); = // - if (archive !=3D null) - { - return (String)archive.get(); - } - else - { +// if (archive !=3D null) +// { +// return (String)archive.get(); +// } +// else +// { return "RemoteTomcat-6.0"; - } +// } } } Deleted: modules/test/trunk/test/src/main/org/jboss/portal/test/framework/i= mpl/jboss/agent/JBossTestAgent.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/test/src/main/org/jboss/portal/test/framework/impl/j= boss/agent/JBossTestAgent.java 2007-10-08 13:26:57 UTC (rev 8562) +++ modules/test/trunk/test/src/main/org/jboss/portal/test/framework/impl/j= boss/agent/JBossTestAgent.java 2007-10-08 16:08:32 UTC (rev 8563) @@ -1,115 +0,0 @@ -/*************************************************************************= ***** - * JBoss, a division of Red Hat = * - * Copyright 2006, Red Hat Middleware, LLC, and individual = * - * contributors as indicated by the @authors tag. See the = * - * copyright.txt in the distribution for a full listing of = * - * individual contributors. = * - * = * - * This is free software; you can redistribute it and/or modify it = * - * under the terms of the GNU Lesser General Public License as = * - * published by the Free Software Foundation; either version 2.1 of = * - * the License, or (at your option) any later version. = * - * = * - * This software is distributed in the hope that it will be useful, = * - * but WITHOUT ANY WARRANTY; without even the implied warranty of = * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU = * - * Lesser General Public License for more details. = * - * = * - * You should have received a copy of the GNU Lesser General Public = * - * License along with this software; if not, write to the Free = * - * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA = * - * 02110-1301 USA, or see the FSF site: http://www.fsf.org. = * - *************************************************************************= *****/ -package org.jboss.portal.test.framework.impl.jboss.agent; - -import org.jboss.deployment.DeploymentException; -import org.jboss.deployment.MainDeployerMBean; -import org.jboss.system.ServiceMBeanSupport; - -import java.net.URL; - -/** - * @author Julien Viet - * @version $Revision: 5669 $ - */ -public class JBossTestAgent extends ServiceMBeanSupport implements JBossTe= stAgentMBean -{ - - /** Keep a thread local of sessions. */ - private static final ThreadLocal local =3D new ThreadLocal(); - - /** - * Record the exception that will be reused later by the same agent to = be aware of the recorded exception. = - * - * @param e the deployment exception to log. - */ - public static void record(DeploymentException e) - { - Session session =3D (Session)local.get(); - - // Record the exception only if we have a session otherwise we may l= eek the exception in the thread local. - if (session !=3D null && session.e =3D=3D null) - { - session.e =3D e; - } - } - - /** The main deployer delegate. */ - private MainDeployerMBean mainDeployer; - - public MainDeployerMBean getMainDeployer() - { - return mainDeployer; - } - - public void setMainDeployer(MainDeployerMBean mainDeployer) - { - this.mainDeployer =3D mainDeployer; - } - - public void deploy(URL url) throws Exception - { - perform(url, true); - } - - public void undeploy(URL url) throws Exception - { - perform(url, false); - } - - private void perform(URL url, boolean deploy) throws DeploymentException - { - try - { - Session session =3D new Session(); - local.set(session); - - // The main deployer could throw an exception but that will be an= exception not related to jboss portal - if (deploy) - { - mainDeployer.deploy(url); - } - else - { - mainDeployer.undeploy(url); - } - - // If e is not null that means an exception was thrown into jboss= portal layer and we rethrow it - // to the client - if (session.e !=3D null) - { - throw session.e; - } - } - finally - { - local.set(null); - } - } - - /** Just a place holder for the deployment exception. */ - private static class Session - { - private DeploymentException e; - } -} Deleted: modules/test/trunk/test/src/main/org/jboss/portal/test/framework/i= mpl/jboss/agent/JBossTestAgentMBean.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/test/src/main/org/jboss/portal/test/framework/impl/j= boss/agent/JBossTestAgentMBean.java 2007-10-08 13:26:57 UTC (rev 8562) +++ modules/test/trunk/test/src/main/org/jboss/portal/test/framework/impl/j= boss/agent/JBossTestAgentMBean.java 2007-10-08 16:08:32 UTC (rev 8563) @@ -1,38 +0,0 @@ -/*************************************************************************= ***** - * JBoss, a division of Red Hat = * - * Copyright 2006, Red Hat Middleware, LLC, and individual = * - * contributors as indicated by the @authors tag. See the = * - * copyright.txt in the distribution for a full listing of = * - * individual contributors. = * - * = * - * This is free software; you can redistribute it and/or modify it = * - * under the terms of the GNU Lesser General Public License as = * - * published by the Free Software Foundation; either version 2.1 of = * - * the License, or (at your option) any later version. = * - * = * - * This software is distributed in the hope that it will be useful, = * - * but WITHOUT ANY WARRANTY; without even the implied warranty of = * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU = * - * Lesser General Public License for more details. = * - * = * - * You should have received a copy of the GNU Lesser General Public = * - * License along with this software; if not, write to the Free = * - * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA = * - * 02110-1301 USA, or see the FSF site: http://www.fsf.org. = * - *************************************************************************= *****/ -package org.jboss.portal.test.framework.impl.jboss.agent; - -import org.jboss.deployment.MainDeployerMBean; -import org.jboss.system.ServiceMBean; -import org.jboss.portal.test.framework.agent.TestAgent; - -/** - * @author Julien Viet - * @version $Revision: 1.1 $ - */ -public interface JBossTestAgentMBean extends TestAgent, ServiceMBean -{ - MainDeployerMBean getMainDeployer(); - - void setMainDeployer(MainDeployerMBean mainDeployer); -} Deleted: modules/test/trunk/test/src/main/org/jboss/portal/test/framework/i= mpl/jboss/jmx/MBeanServerFactory.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/test/src/main/org/jboss/portal/test/framework/impl/j= boss/jmx/MBeanServerFactory.java 2007-10-08 13:26:57 UTC (rev 8562) +++ modules/test/trunk/test/src/main/org/jboss/portal/test/framework/impl/j= boss/jmx/MBeanServerFactory.java 2007-10-08 16:08:32 UTC (rev 8563) @@ -1,131 +0,0 @@ -/*************************************************************************= ***** - * JBoss, a division of Red Hat = * - * Copyright 2006, Red Hat Middleware, LLC, and individual = * - * contributors as indicated by the @authors tag. See the = * - * copyright.txt in the distribution for a full listing of = * - * individual contributors. = * - * = * - * This is free software; you can redistribute it and/or modify it = * - * under the terms of the GNU Lesser General Public License as = * - * published by the Free Software Foundation; either version 2.1 of = * - * the License, or (at your option) any later version. = * - * = * - * This software is distributed in the hope that it will be useful, = * - * but WITHOUT ANY WARRANTY; without even the implied warranty of = * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU = * - * Lesser General Public License for more details. = * - * = * - * You should have received a copy of the GNU Lesser General Public = * - * License along with this software; if not, write to the Free = * - * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA = * - * 02110-1301 USA, or see the FSF site: http://www.fsf.org. = * - *************************************************************************= *****/ - -package org.jboss.portal.test.framework.impl.jboss.jmx; - -import javax.management.MBeanServer; -import javax.management.MBeanServerConnection; -import javax.naming.InitialContext; -import javax.naming.NamingException; -import java.lang.reflect.InvocationHandler; -import java.lang.reflect.Method; -import java.lang.reflect.Proxy; -import java.util.Properties; - -/** - * @author Julien Viet - * @version $Revision: 5498 $ - */ -public class MBeanServerFactory -{ - - /** . */ - private MBeanServer server; - - /** . */ - private Properties env; - - public Properties getEnv() - { - return env; - } - - public void setEnv(Properties env) - { - this.env =3D env; - } - - public void create() - { - } - - public void start() throws Exception - { - LazyMBeanServer lms =3D new LazyMBeanServer(env); - server =3D lms.getProxy(); - } - - public void stop() - { - server =3D null; - } - - public void destroy() - { - } - - public MBeanServer getServer() throws Exception - { - return server; - } - - private static class LazyMBeanServer implements InvocationHandler - { - - private Properties env; - private MBeanServerConnection remoteServer; - private MBeanServer proxy; - - public LazyMBeanServer(Properties env) - { - this.env =3D env; - this.proxy =3D (MBeanServer)Proxy.newProxyInstance(Thread.current= Thread().getContextClassLoader(), new Class[]{MBeanServer.class}, this); - } - - public MBeanServer getProxy() - { - return proxy; - } - - public Object invoke(Object proxy, Method method, Object[] args) thr= ows Throwable - { - if (remoteServer =3D=3D null) - { - InitialContext ctx =3D null; - try - { - ctx =3D new InitialContext(env); - MBeanServerConnection adaptor =3D (MBeanServerConnection)ct= x.lookup("jmx/invoker/RMIAdaptor"); - remoteServer =3D new RemoteMBeanServerAdapter(adaptor).getS= erver(); - } - finally - { - if (ctx !=3D null) - { - try - { - ctx.close(); - } - catch (NamingException ignore) - { - } - } - } - } - Method adaptedMethod =3D MBeanServerConnection.class.getMethod(me= thod.getName(), method.getParameterTypes()); - return adaptedMethod.invoke(remoteServer, args); - } - } - - -} Deleted: modules/test/trunk/test/src/main/org/jboss/portal/test/framework/i= mpl/jboss/jmx/RemoteMBeanProxy.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/test/src/main/org/jboss/portal/test/framework/impl/j= boss/jmx/RemoteMBeanProxy.java 2007-10-08 13:26:57 UTC (rev 8562) +++ modules/test/trunk/test/src/main/org/jboss/portal/test/framework/impl/j= boss/jmx/RemoteMBeanProxy.java 2007-10-08 16:08:32 UTC (rev 8563) @@ -1,43 +0,0 @@ -/*************************************************************************= ***** - * JBoss, a division of Red Hat = * - * Copyright 2006, Red Hat Middleware, LLC, and individual = * - * contributors as indicated by the @authors tag. See the = * - * copyright.txt in the distribution for a full listing of = * - * individual contributors. = * - * = * - * This is free software; you can redistribute it and/or modify it = * - * under the terms of the GNU Lesser General Public License as = * - * published by the Free Software Foundation; either version 2.1 of = * - * the License, or (at your option) any later version. = * - * = * - * This software is distributed in the hope that it will be useful, = * - * but WITHOUT ANY WARRANTY; without even the implied warranty of = * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU = * - * Lesser General Public License for more details. = * - * = * - * You should have received a copy of the GNU Lesser General Public = * - * License along with this software; if not, write to the Free = * - * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA = * - * 02110-1301 USA, or see the FSF site: http://www.fsf.org. = * - *************************************************************************= *****/ - -package org.jboss.portal.test.framework.impl.jboss.jmx; - -import org.jboss.mx.util.MBeanProxy; - -import javax.management.MBeanServer; -import javax.management.MBeanServerConnection; -import javax.management.ObjectName; - -/** - * @author Julien Viet - * @version $Revision: 5498 $ - */ -public class RemoteMBeanProxy -{ - public static Object get(Class itf, ObjectName name, MBeanServerConnect= ion remoteServer) throws Exception - { - MBeanServer server =3D new RemoteMBeanServerAdapter(remoteServer).ge= tServer(); - return MBeanProxy.get(itf, name, server); - } -} Deleted: modules/test/trunk/test/src/main/org/jboss/portal/test/framework/i= mpl/jboss/jmx/RemoteMBeanServerAdapter.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/test/src/main/org/jboss/portal/test/framework/impl/j= boss/jmx/RemoteMBeanServerAdapter.java 2007-10-08 13:26:57 UTC (rev 8562) +++ modules/test/trunk/test/src/main/org/jboss/portal/test/framework/impl/j= boss/jmx/RemoteMBeanServerAdapter.java 2007-10-08 16:08:32 UTC (rev 8563) @@ -1,58 +0,0 @@ -/*************************************************************************= ***** - * JBoss, a division of Red Hat = * - * Copyright 2006, Red Hat Middleware, LLC, and individual = * - * contributors as indicated by the @authors tag. See the = * - * copyright.txt in the distribution for a full listing of = * - * individual contributors. = * - * = * - * This is free software; you can redistribute it and/or modify it = * - * under the terms of the GNU Lesser General Public License as = * - * published by the Free Software Foundation; either version 2.1 of = * - * the License, or (at your option) any later version. = * - * = * - * This software is distributed in the hope that it will be useful, = * - * but WITHOUT ANY WARRANTY; without even the implied warranty of = * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU = * - * Lesser General Public License for more details. = * - * = * - * You should have received a copy of the GNU Lesser General Public = * - * License along with this software; if not, write to the Free = * - * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA = * - * 02110-1301 USA, or see the FSF site: http://www.fsf.org. = * - *************************************************************************= *****/ - -package org.jboss.portal.test.framework.impl.jboss.jmx; - -import javax.management.MBeanServer; -import javax.management.MBeanServerConnection; -import java.lang.reflect.InvocationHandler; -import java.lang.reflect.Method; -import java.lang.reflect.Proxy; - -/** - * @author Julien Viet - * @version $Revision: 5498 $ - */ -public class RemoteMBeanServerAdapter implements InvocationHandler -{ - - private MBeanServerConnection remoteServer; - private MBeanServer adaptedServer; - - public RemoteMBeanServerAdapter(MBeanServerConnection remoteServer) - { - this.remoteServer =3D remoteServer; - this.adaptedServer =3D (MBeanServer)Proxy.newProxyInstance(Thread.cu= rrentThread().getContextClassLoader(), new Class[]{MBeanServer.class}, this= ); - } - - public MBeanServer getServer() - { - return adaptedServer; - } - - public Object invoke(Object proxy, Method method, Object[] args) throws= Throwable - { - Method adaptedMethod =3D MBeanServerConnection.class.getMethod(metho= d.getName(), method.getParameterTypes()); - return adaptedMethod.invoke(remoteServer, args); - } -} Deleted: modules/test/trunk/test/src/main/org/jboss/portal/test/framework/i= mpl/jboss/server/JBossServiceLookup.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/test/src/main/org/jboss/portal/test/framework/impl/j= boss/server/JBossServiceLookup.java 2007-10-08 13:26:57 UTC (rev 8562) +++ modules/test/trunk/test/src/main/org/jboss/portal/test/framework/impl/j= boss/server/JBossServiceLookup.java 2007-10-08 16:08:32 UTC (rev 8563) @@ -1,82 +0,0 @@ -/*************************************************************************= ***** - * JBoss, a division of Red Hat = * - * Copyright 2006, Red Hat Middleware, LLC, and individual = * - * contributors as indicated by the @authors tag. See the = * - * copyright.txt in the distribution for a full listing of = * - * individual contributors. = * - * = * - * This is free software; you can redistribute it and/or modify it = * - * under the terms of the GNU Lesser General Public License as = * - * published by the Free Software Foundation; either version 2.1 of = * - * the License, or (at your option) any later version. = * - * = * - * This software is distributed in the hope that it will be useful, = * - * but WITHOUT ANY WARRANTY; without even the implied warranty of = * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU = * - * Lesser General Public License for more details. = * - * = * - * You should have received a copy of the GNU Lesser General Public = * - * License along with this software; if not, write to the Free = * - * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA = * - * 02110-1301 USA, or see the FSF site: http://www.fsf.org. = * - *************************************************************************= *****/ -package org.jboss.portal.test.framework.impl.jboss.server; - -import org.jboss.mx.util.MBeanProxy; -import org.jboss.mx.util.MBeanProxyCreationException; -import org.jboss.portal.test.framework.server.ServiceLookup; -import org.jboss.portal.test.framework.server.ServiceLookupFailedException; - -import javax.management.ObjectName; -import javax.management.MBeanServer; - -/** - * @author Julien Viet - * @version $Revision: 1.1 $ - */ -public class JBossServiceLookup implements ServiceLookup -{ - - /** . */ - private final MBeanServer mbeanServer; - - /** . */ - private final ObjectName objectName; - - /** . */ - private final String serviceInterface; - - public JBossServiceLookup(MBeanServer mbeanServer, ObjectName objectNam= e, String serviceInterface) - { - this.mbeanServer =3D mbeanServer; - this.objectName =3D objectName; - this.serviceInterface =3D serviceInterface; - } - - public ObjectName getObjectName() - { - return objectName; - } - - public String getServiceInterface() - { - return serviceInterface; - } - - public Object lookupService() throws ServiceLookupFailedException - { - try - { - Class proxyInterface =3D Thread.currentThread().getContextClassLo= ader().loadClass(serviceInterface); - return MBeanProxy.get(proxyInterface, objectName, mbeanServer); - } - catch (ClassNotFoundException e) - { - throw new ServiceLookupFailedException(e); - } - catch (MBeanProxyCreationException e) - { - throw new ServiceLookupFailedException(e); - } - } -} Modified: modules/test/trunk/test/src/main/org/jboss/portal/test/framework/= runner/BaseRunner.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/test/src/main/org/jboss/portal/test/framework/runner= /BaseRunner.java 2007-10-08 13:26:57 UTC (rev 8562) +++ modules/test/trunk/test/src/main/org/jboss/portal/test/framework/runner= /BaseRunner.java 2007-10-08 16:08:32 UTC (rev 8563) @@ -26,9 +26,6 @@ import org.jboss.portal.test.framework.server.NodeManager; import org.jboss.portal.test.framework.server.NodeId; import org.jboss.portal.test.framework.mc.TestRuntimeContext; -import org.jboss.portal.test.framework.driver.remote.RemoteTestDriverClien= t; -import org.jboss.portal.test.framework.junit.JUnitAdapter; -import org.jboss.portal.test.framework.TestParametrization; import org.apache.log4j.Logger; import org.apache.log4j.Appender; import org.apache.log4j.SimpleLayout; @@ -36,7 +33,6 @@ import org.apache.log4j.ConsoleAppender; import junit.framework.Test; import junit.framework.TestResult; -import junit.framework.TestCase; import junit.framework.AssertionFailedError; = import java.net.URL; @@ -77,7 +73,7 @@ private String archivePath; = /** . */ - private JUnitAdapter adapter; +// private JUnitAdapter adapter; = /** . */ private int state; @@ -86,7 +82,7 @@ private Integer testCaseCount; = /** . */ - private RemoteTestDriverClient testDriverClient; +// private RemoteTestDriverClient testDriverClient; = /** The node id list used for this test suite. */ private NodeId[] nodeIds; @@ -130,16 +126,16 @@ this.nodeManager =3D nodeManager; } = - public RemoteTestDriverClient getTestDriverClient() - { - return testDriverClient; - } +// public RemoteTestDriverClient getTestDriverClient() +// { +// return testDriverClient; +// } +// +// public void setTestDriverClient(RemoteTestDriverClient testDriverClie= nt) +// { +// this.testDriverClient =3D testDriverClient; +// } = - public void setTestDriverClient(RemoteTestDriverClient testDriverClient) - { - this.testDriverClient =3D testDriverClient; - } - private void startContext() throws Exception { runtimeContext.start(); @@ -159,15 +155,15 @@ startContext(); = // Configure driver further more (todo find a way to do that i= nt the bean assembly) - testDriverClient.setInitialNodeId(nodeIds[0]); - testDriverClient.setArchivePath(archivePath); - testDriverClient.setNodeManager(nodeManager); + // testDriverClient.setInitialNodeId(nodeIds[0]); + // testDriverClient.setArchivePath(archivePath); + // testDriverClient.setNodeManager(nodeManager); = // Get optional parametrization - TestParametrization parametrization =3D JUnitAdapter.getParame= trization(); + // TestParametrization parametrization =3D JUnitAdapter.getPar= ametrization(); = // - adapter =3D new JUnitAdapter(testDriverClient, parametrization= ); + // adapter =3D new JUnitAdapter(testDriverClient, parametrizat= ion); state =3D STARTED; } finally @@ -199,7 +195,7 @@ { state =3D FAILED; } - adapter =3D null; + // adapter =3D null; } } } @@ -213,7 +209,7 @@ try { startIfNeeded(); - testCaseCount =3D new Integer(adapter.countTestCases()); + // testCaseCount =3D new Integer(adapter.countTestCases()); } catch (Exception e) { @@ -231,7 +227,7 @@ try { startIfNeeded(); - adapter.run(testResult); + // adapter.run(testResult); } catch (Exception e) { Modified: modules/test/trunk/test/src/main/org/jboss/portal/test/framework/= runner/HTTPTestRunner.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/test/src/main/org/jboss/portal/test/framework/runner= /HTTPTestRunner.java 2007-10-08 13:26:57 UTC (rev 8562) +++ modules/test/trunk/test/src/main/org/jboss/portal/test/framework/runner= /HTTPTestRunner.java 2007-10-08 16:08:32 UTC (rev 8563) @@ -23,8 +23,6 @@ package org.jboss.portal.test.framework.runner; = import org.jboss.portal.test.framework.server.NodeId; -import org.jboss.portal.test.framework.TestParametrization; -import org.jboss.portal.test.framework.junit.JUnitAdapter; = import java.io.File; import java.net.MalformedURLException; @@ -61,15 +59,15 @@ = private String getArchiveName() { - if (archiveName =3D=3D null) - { - TestParametrization parametrization =3D JUnitAdapter.getParametri= zation(); - return (String)parametrization.getParameterValue("archive").get(); - } - else - { +// if (archiveName =3D=3D null) +// { +// TestParametrization parametrization =3D JUnitAdapter.getParamet= rization(); +// return (String)parametrization.getParameterValue("archive").get= (); +// } +// else +// { return archiveName; - } +// } } = public void startRunner() throws Exception Deleted: modules/test/trunk/test/src/main/org/jboss/portal/test/framework/r= unner/WebTestRunner.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/test/src/main/org/jboss/portal/test/framework/runner= /WebTestRunner.java 2007-10-08 13:26:57 UTC (rev 8562) +++ modules/test/trunk/test/src/main/org/jboss/portal/test/framework/runner= /WebTestRunner.java 2007-10-08 16:08:32 UTC (rev 8563) @@ -1,117 +0,0 @@ -/*************************************************************************= ***** - * JBoss, a division of Red Hat = * - * Copyright 2006, Red Hat Middleware, LLC, and individual = * - * contributors as indicated by the @authors tag. See the = * - * copyright.txt in the distribution for a full listing of = * - * individual contributors. = * - * = * - * This is free software; you can redistribute it and/or modify it = * - * under the terms of the GNU Lesser General Public License as = * - * published by the Free Software Foundation; either version 2.1 of = * - * the License, or (at your option) any later version. = * - * = * - * This software is distributed in the hope that it will be useful, = * - * but WITHOUT ANY WARRANTY; without even the implied warranty of = * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU = * - * Lesser General Public License for more details. = * - * = * - * You should have received a copy of the GNU Lesser General Public = * - * License along with this software; if not, write to the Free = * - * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA = * - * 02110-1301 USA, or see the FSF site: http://www.fsf.org. = * - *************************************************************************= *****/ -package org.jboss.portal.test.framework.runner; - -import org.jboss.portal.test.framework.server.NodeId; -import org.jboss.portal.test.framework.junit.JUnitAdapter; -import org.jboss.portal.test.framework.TestParametrization; - -import java.io.File; -import java.net.MalformedURLException; - -import junit.framework.AssertionFailedError; - -/** - * @author Julien Viet - * @version $Revision: 1.1 $ - */ -public class WebTestRunner extends BaseRunner -{ - - /** . */ - public static final String JBOSS_BEANS_LOCATION =3D "org/jboss/portal/t= est/framework/container/web-runner-beans.xml"; - - /** . */ - private String archiveName; - - public WebTestRunner() - { - super(JBOSS_BEANS_LOCATION); - - // - init(null); - } - - public WebTestRunner(NodeId[] nodeIds) - { - super(JBOSS_BEANS_LOCATION, nodeIds); - - // - init(null); - } - - public WebTestRunner(String archiveName) - { - super(JBOSS_BEANS_LOCATION); - - // - init(archiveName); - } - - public WebTestRunner(String archiveName, NodeId[] nodeIds) - { - super(JBOSS_BEANS_LOCATION, nodeIds); - - // - init(archiveName); - } - - private void init(String archiveName) - { - if (archiveName =3D=3D null) - { - TestParametrization abc =3D JUnitAdapter.getParametrization(); - this.archiveName =3D (String)abc.getParameterValue("archive").get= (); - } - else - { - this.archiveName =3D archiveName; - } - } - - public void startRunner() throws Exception - { - File root =3D new File(getArchivePath()); - File f =3D new File(root, archiveName); - deploy(f.toURL()); - } - - public void stopRunner() - { - try - { - File root =3D new File(getArchivePath()); - File f =3D new File(root, archiveName); - undeploy(f.toURL()); - } - catch (MalformedURLException e) - { - e.printStackTrace(); - } - } - - public void testDummy() - { - throw new AssertionFailedError("Test dummy should not be called, it'= s a place holder so that running it from ant does not fail"); - } -} Deleted: modules/test/trunk/test/src/main/org/jboss/test/InfoTestCase.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/test/src/main/org/jboss/test/InfoTestCase.java 2007-= 10-08 13:26:57 UTC (rev 8562) +++ modules/test/trunk/test/src/main/org/jboss/test/InfoTestCase.java 2007-= 10-08 16:08:32 UTC (rev 8563) @@ -1,231 +0,0 @@ -/*************************************************************************= ***** - * JBoss, a division of Red Hat = * - * Copyright 2006, Red Hat Middleware, LLC, and individual = * - * contributors as indicated by the @authors tag. See the = * - * copyright.txt in the distribution for a full listing of = * - * individual contributors. = * - * = * - * This is free software; you can redistribute it and/or modify it = * - * under the terms of the GNU Lesser General Public License as = * - * published by the Free Software Foundation; either version 2.1 of = * - * the License, or (at your option) any later version. = * - * = * - * This software is distributed in the hope that it will be useful, = * - * but WITHOUT ANY WARRANTY; without even the implied warranty of = * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU = * - * Lesser General Public License for more details. = * - * = * - * You should have received a copy of the GNU Lesser General Public = * - * License along with this software; if not, write to the Free = * - * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA = * - * 02110-1301 USA, or see the FSF site: http://www.fsf.org. = * - *************************************************************************= *****/ -package org.jboss.test; - -import junit.framework.TestCase; -import org.jboss.portal.test.framework.info.TestContainerInfo; -import org.jboss.portal.test.framework.info.TestInfo; -import org.jboss.portal.test.framework.info.TestParameterInfo; -import org.jboss.portal.common.util.CollectionBuilder; - -import java.util.Collections; -import java.util.HashSet; - -/** - * @author Julien Viet - * @version $Revision: 1.1 $ - */ -public class InfoTestCase extends TestCase -{ - - public void testTestContainerConstructor() - { - try - { - new TestContainerInfo((String)null); - fail("Was expecting an IAE"); - } - catch (IllegalArgumentException e) - { - } - try - { - new TestContainerInfo(null, ""); - fail("Was expecting an IAE"); - } - catch (IllegalArgumentException e) - { - } - - // - TestContainerInfo c1 =3D new TestContainerInfo("foo", null); - assertEquals("foo", c1.getName()); - assertEquals(null, c1.getDescription()); - assertEquals(Collections.EMPTY_SET, c1.getChildNames()); - - // - TestContainerInfo c2 =3D new TestContainerInfo("foo", "bar"); - assertEquals("foo", c2.getName()); - assertEquals("bar", c2.getDescription()); - assertEquals(Collections.EMPTY_SET, c2.getChildNames()); - } - - public void testTestConstructor() - { - try - { - new TestInfo((String)null); - fail("Was expecting an IAE"); - } - catch (IllegalArgumentException e) - { - } - try - { - new TestInfo(null, ""); - fail("Was expecting an IAE"); - } - catch (IllegalArgumentException e) - { - } - - // - TestInfo t1 =3D new TestInfo("foo"); - assertEquals("foo", t1.getName()); - assertEquals(null, t1.getDescription()); - - // - TestInfo t2 =3D new TestInfo("foo", "bar"); - assertEquals("foo", t2.getName()); - assertEquals("bar", t2.getDescription()); - } - - public void testParameterConstructor() - { - try - { - new TestParameterInfo(null); - fail("Was expecting an IAE"); - } - catch (IllegalArgumentException e) - { - } - try - { - new TestInfo(null, ""); - fail("Was expecting an IAE"); - } - catch (IllegalArgumentException e) - { - } - - // - TestParameterInfo p1 =3D new TestParameterInfo("foo"); - assertEquals("foo", p1.getName()); - assertEquals(null, p1.getDescription()); - - // - TestParameterInfo p2 =3D new TestParameterInfo("foo", "bar"); - assertEquals("foo", p2.getName()); - assertEquals("bar", p2.getDescription()); - } - - public void testTestParameters() - { - TestInfo test =3D new TestInfo("foo"); - assertEquals(new HashSet(), new HashSet(test.getParameterNames())); - - // - TestParameterInfo p1 =3D new TestParameterInfo("p1"); - test.addParameter(p1); - assertEquals(p1, test.getParameter("p1")); - assertEquals(Collections.singleton("p1"), test.getParameterNames()); - - // - try - { - test.addParameter(new TestParameterInfo("p1")); - fail(); - } - catch (IllegalArgumentException expected) - { - } - assertEquals(p1, test.getParameter("p1")); - assertEquals(Collections.singleton("p1"), test.getParameterNames()); - - // - TestParameterInfo p2 =3D new TestParameterInfo("p2"); - test.addParameter(p2); - assertEquals(p1, test.getParameter("p1")); - assertEquals(p2, test.getParameter("p2")); - assertEquals(new CollectionBuilder().add("p1").add("p2").toHashSet()= , test.getParameterNames()); - } - - public void testId() - { - TestContainerInfo root =3D new TestContainerInfo("root"); - assertEquals("/", root.getId(null)); - assertEquals("", root.getId(root)); - try - { - root.getId(new TestContainerInfo("tmp")); - fail(); - } - catch (IllegalArgumentException expected) - { - } - - // - TestInfo a =3D new TestInfo("a"); - root.addChild(a); - assertEquals("/a", a.getId(null)); - assertEquals("a", a.getId(root)); - assertEquals("", a.getId(a)); - - // - TestContainerInfo b =3D new TestContainerInfo("b"); - root.addChild(b); - assertEquals("/b", b.getId(null)); - assertEquals("b", b.getId(root)); - assertEquals("", b.getId(b)); - - // - TestInfo c =3D new TestInfo("c"); - b.addChild(c); - assertEquals("/b/c", c.getId(null)); - assertEquals("b/c", c.getId(root)); - assertEquals("c", c.getId(b)); - assertEquals("", c.getId(c)); - } - - public void testClone() - { - - } - - public void testVisitor() - { - - } - - public void testFind() - { - TestContainerInfo root =3D new TestContainerInfo("root"); - TestInfo a =3D new TestInfo("a"); - root.addChild(a); - TestContainerInfo b =3D new TestContainerInfo("b"); - root.addChild(b); - TestInfo c =3D new TestInfo("c"); - b.addChild(c); - - // - assertEquals(root, root.findItem("")); - assertEquals(a, a.findItem("")); - assertEquals(a, root.findItem("a")); - assertEquals(b, b.findItem("")); - assertEquals(b, root.findItem("b")); - assertEquals(c, c.findItem("")); - assertEquals(c, b.findItem("c")); - assertEquals(c, root.findItem("b/c")); - } -} Deleted: modules/test/trunk/test/src/main/org/jboss/test/TestParameterValue= TestCase.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/test/src/main/org/jboss/test/TestParameterValueTestC= ase.java 2007-10-08 13:26:57 UTC (rev 8562) +++ modules/test/trunk/test/src/main/org/jboss/test/TestParameterValueTestC= ase.java 2007-10-08 16:08:32 UTC (rev 8563) @@ -1,103 +0,0 @@ -/*************************************************************************= ***** - * JBoss, a division of Red Hat = * - * Copyright 2006, Red Hat Middleware, LLC, and individual = * - * contributors as indicated by the @authors tag. See the = * - * copyright.txt in the distribution for a full listing of = * - * individual contributors. = * - * = * - * This is free software; you can redistribute it and/or modify it = * - * under the terms of the GNU Lesser General Public License as = * - * published by the Free Software Foundation; either version 2.1 of = * - * the License, or (at your option) any later version. = * - * = * - * This software is distributed in the hope that it will be useful, = * - * but WITHOUT ANY WARRANTY; without even the implied warranty of = * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU = * - * Lesser General Public License for more details. = * - * = * - * You should have received a copy of the GNU Lesser General Public = * - * License along with this software; if not, write to the Free = * - * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA = * - * 02110-1301 USA, or see the FSF site: http://www.fsf.org. = * - *************************************************************************= *****/ -package org.jboss.test; - -import org.jboss.portal.test.framework.MonoValuedTestParameterValue; -import org.jboss.portal.test.framework.MultiValuedTestParameterValue; -import junit.framework.TestCase; - -import java.util.Collection; -import java.util.ArrayList; -import java.util.Iterator; -import java.util.NoSuchElementException; - -/** - * @author Julien Viet - * @version $Revision: 1.1 $ - */ -public class TestParameterValueTestCase extends TestCase -{ - - public void testMono() - { - Object o =3D new Object(); - assertEquals(o, new MonoValuedTestParameterValue(o).get()); - assertEquals(null, new MonoValuedTestParameterValue(null).get()); - - // - assertEquals(new MonoValuedTestParameterValue("abc"), new MonoValued= TestParameterValue("abc")); - assertEquals(new MonoValuedTestParameterValue(o), new MonoValuedTest= ParameterValue(o)); - assertEquals(new MonoValuedTestParameterValue(null), new MonoValuedT= estParameterValue(null)); - - // - assertFalse(new MonoValuedTestParameterValue(o).equals(new MonoValue= dTestParameterValue(new Object()))); - assertFalse(new MonoValuedTestParameterValue(o).equals(new MonoValue= dTestParameterValue(null))); - assertFalse(new MonoValuedTestParameterValue(new Object()).equals(ne= w MonoValuedTestParameterValue(o))); - assertFalse(new MonoValuedTestParameterValue(null).equals(new MonoVa= luedTestParameterValue(o))); - } - - public void testMulti() - { - try - { - new MultiValuedTestParameterValue((Collection)null); - fail(); - } - catch (IllegalArgumentException expected) - { - } - try - { - new MultiValuedTestParameterValue((Object[])null); - fail(); - } - catch (IllegalArgumentException expected) - { - } - ArrayList toto =3D new ArrayList(); - toto.add("abc"); - toto.add("def"); - MultiValuedTestParameterValue t =3D new MultiValuedTestParameterValu= e(toto); - assertEquals(toto, t.get()); - Iterator i =3D t.iterator(); - assertNotNull(i); - assertTrue(i.hasNext()); - Object i0 =3D i.next(); - assertNotNull(i0); - assertTrue(i0 instanceof MonoValuedTestParameterValue); - assertEquals("abc", ((MonoValuedTestParameterValue)i0).get()); - assertTrue(i.hasNext()); - Object i1 =3D i.next(); - assertNotNull(i1); - assertTrue(i1 instanceof MonoValuedTestParameterValue); - assertEquals("def", ((MonoValuedTestParameterValue)i1).get()); - assertFalse(i.hasNext()); - try - { - i.next(); - } - catch (NoSuchElementException expected) - { - } - } -} Deleted: modules/test/trunk/test/src/main/org/jboss/test/TestParametrizatio= nTestCase.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/test/src/main/org/jboss/test/TestParametrizationTest= Case.java 2007-10-08 13:26:57 UTC (rev 8562) +++ modules/test/trunk/test/src/main/org/jboss/test/TestParametrizationTest= Case.java 2007-10-08 16:08:32 UTC (rev 8563) @@ -1,116 +0,0 @@ -/*************************************************************************= ***** - * JBoss, a division of Red Hat = * - * Copyright 2006, Red Hat Middleware, LLC, and individual = * - * contributors as indicated by the @authors tag. See the = * - * copyright.txt in the distribution for a full listing of = * - * individual contributors. = * - * = * - * This is free software; you can redistribute it and/or modify it = * - * under the terms of the GNU Lesser General Public License as = * - * published by the Free Software Foundation; either version 2.1 of = * - * the License, or (at your option) any later version. = * - * = * - * This software is distributed in the hope that it will be useful, = * - * but WITHOUT ANY WARRANTY; without even the implied warranty of = * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU = * - * Lesser General Public License for more details. = * - * = * - * You should have received a copy of the GNU Lesser General Public = * - * License along with this software; if not, write to the Free = * - * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA = * - * 02110-1301 USA, or see the FSF site: http://www.fsf.org. = * - *************************************************************************= *****/ -package org.jboss.test; - -import junit.framework.TestCase; -import org.jboss.portal.test.framework.info.TestInfo; -import org.jboss.portal.test.framework.info.TestParameterInfo; -import org.jboss.portal.test.framework.TestParametrization; -import org.jboss.portal.test.framework.MonoValuedTestParameterValue; -import org.jboss.portal.test.framework.MultiValuedTestParameterValue; -import org.jboss.portal.common.util.CollectionBuilder; - -import java.util.Collection; -import java.util.Iterator; - -/** - * @author Julien Viet - * @version $Revision: 1.1 $ - */ -public class TestParametrizationTestCase extends TestCase -{ - - public void testGet() - { - try - { - new TestParametrization().getParameterValue(null); - fail(); - } - catch (IllegalArgumentException expected) - { - } - } - - public void testSet() - { - try - { - new TestParametrization().setParameterValue(null, null); - fail(); - } - catch (IllegalArgumentException expected) - { - } - try - { - new TestParametrization().setParameterValue(null, new MonoValuedT= estParameterValue("abc")); - fail(); - } - catch (IllegalArgumentException expected) - { - } - TestParametrization p =3D new TestParametrization(); - MonoValuedTestParameterValue v =3D new MonoValuedTestParameterValue(= "def"); - p.setParameterValue("abc", v); - assertEquals(v, p.getParameterValue("abc")); - p.setParameterValue("abc", null); - assertEquals(null, p.getParameterValue("abc")); - } - - public void testCreate() - { - TestInfo info =3D new TestInfo("test"); - info.addParameter(new TestParameterInfo("foo")); - info.addParameter(new TestParameterInfo("bar")); - - // - TestParametrization p1 =3D new TestParametrization(); - p1.setParameterValue("foo", new MonoValuedTestParameterValue("foo1")= ); - p1.setParameterValue("abc", new MonoValuedTestParameterValue("def")); - Collection c1 =3D p1.create(info); - assertNotNull(c1); - assertEquals(1, c1.size()); - TestParametrization q1 =3D (TestParametrization)c1.iterator().next(); - assertEquals(new MonoValuedTestParameterValue("foo1"), q1.getParamet= erValue("foo")); - assertEquals(null, q1.getParameterValue("abc")); - - // - TestParametrization p2 =3D new TestParametrization(); - p2.setParameterValue("foo", new MonoValuedTestParameterValue("foo1")= ); - p2.setParameterValue("abc", new MonoValuedTestParameterValue("def")); - p2.setParameterValue("bar", new MultiValuedTestParameterValue(new Co= llectionBuilder().add("bar1").add("bar2").toArrayList())); - Collection c2 =3D p2.create(info); - assertNotNull(c2); - assertEquals(2, c2.size()); - Iterator i2 =3D c2.iterator(); - TestParametrization q2_1 =3D (TestParametrization)i2.next(); - assertEquals(new MonoValuedTestParameterValue("foo1"), q2_1.getParam= eterValue("foo")); - assertEquals(new MonoValuedTestParameterValue("bar1"), q2_1.getParam= eterValue("bar")); - assertEquals(null, q2_1.getParameterValue("abc")); - TestParametrization q2_2 =3D (TestParametrization)i2.next(); - assertEquals(new MonoValuedTestParameterValue("foo1"), q2_2.getParam= eterValue("foo")); - assertEquals(new MonoValuedTestParameterValue("bar2"), q2_2.getParam= eterValue("bar")); - assertEquals(null, q2_2.getParameterValue("abc")); - } -} Modified: modules/test/trunk/tools/etc/buildfragments/modules.ent =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/tools/etc/buildfragments/modules.ent 2007-10-08 13:2= 6:57 UTC (rev 8562) +++ modules/test/trunk/tools/etc/buildfragments/modules.ent 2007-10-08 16:0= 8:32 UTC (rev 8563) @@ -2,204 +2,21 @@ = = - - - - - + + + + + = - - - - - + + + + + = - - - - - - - = - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - --===============7794834668316435080==-- From portal-commits at lists.jboss.org Mon Oct 8 12:09:33 2007 Content-Type: multipart/mixed; boundary="===============3944308464118237694==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8564 - in modules/test/trunk: remote and 15 other directories. Date: Mon, 08 Oct 2007 12:09:32 -0400 Message-ID: --===============3944308464118237694== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: julien(a)jboss.com Date: 2007-10-08 12:09:32 -0400 (Mon, 08 Oct 2007) New Revision: 8564 Added: modules/test/trunk/remote/ modules/test/trunk/remote/build.bat modules/test/trunk/remote/build.sh modules/test/trunk/remote/build.xml modules/test/trunk/remote/src/ modules/test/trunk/remote/src/main/ modules/test/trunk/remote/src/main/org/ modules/test/trunk/remote/src/main/org/jboss/ modules/test/trunk/remote/src/main/org/jboss/test/ modules/test/trunk/remote/src/main/org/jboss/test/AllTests.java modules/test/trunk/remote/src/main/org/jboss/unit/ modules/test/trunk/remote/src/main/org/jboss/unit/remote/ modules/test/trunk/remote/src/main/org/jboss/unit/remote/RequestContext.= java modules/test/trunk/remote/src/main/org/jboss/unit/remote/ResponseContext= .java modules/test/trunk/remote/src/main/org/jboss/unit/remote/driver/ modules/test/trunk/remote/src/main/org/jboss/unit/remote/driver/Protocol= Handler.java modules/test/trunk/remote/src/main/org/jboss/unit/remote/driver/RemoteDr= iverCommandContext.java modules/test/trunk/remote/src/main/org/jboss/unit/remote/driver/RemoteDr= iverResponseContext.java modules/test/trunk/remote/src/main/org/jboss/unit/remote/driver/RemoteTe= stDriver.java modules/test/trunk/remote/src/main/org/jboss/unit/remote/driver/RemoteTe= stDriverClient.java modules/test/trunk/remote/src/main/org/jboss/unit/remote/driver/RemoteTe= stDriverServer.java modules/test/trunk/remote/src/main/org/jboss/unit/remote/driver/TestConv= ersation.java modules/test/trunk/remote/src/main/org/jboss/unit/remote/driver/handler/ modules/test/trunk/remote/src/main/org/jboss/unit/remote/driver/handler/= deployer/ modules/test/trunk/remote/src/main/org/jboss/unit/remote/driver/handler/= deployer/DeployerHandler.java modules/test/trunk/remote/src/main/org/jboss/unit/remote/driver/handler/= deployer/response/ modules/test/trunk/remote/src/main/org/jboss/unit/remote/driver/handler/= deployer/response/DeployResponse.java modules/test/trunk/remote/src/main/org/jboss/unit/remote/driver/handler/= deployer/response/DeployerResponse.java modules/test/trunk/remote/src/main/org/jboss/unit/remote/driver/handler/= deployer/response/UndeployResponse.java modules/test/trunk/remote/src/main/org/jboss/unit/remote/driver/handler/= http/ modules/test/trunk/remote/src/main/org/jboss/unit/remote/driver/handler/= http/HTTPConversation.java modules/test/trunk/remote/src/main/org/jboss/unit/remote/driver/handler/= http/HTTPHandler.java modules/test/trunk/remote/src/main/org/jboss/unit/remote/driver/handler/= http/command/ modules/test/trunk/remote/src/main/org/jboss/unit/remote/driver/handler/= http/command/DoGetCommand.java modules/test/trunk/remote/src/main/org/jboss/unit/remote/driver/handler/= http/command/DoMethodCommand.java modules/test/trunk/remote/src/main/org/jboss/unit/remote/driver/handler/= http/command/DoPostCommand.java modules/test/trunk/remote/src/main/org/jboss/unit/remote/driver/handler/= http/command/HTTPDriverCommand.java modules/test/trunk/remote/src/main/org/jboss/unit/remote/driver/handler/= http/response/ modules/test/trunk/remote/src/main/org/jboss/unit/remote/driver/handler/= http/response/HTTPDriverResponse.java modules/test/trunk/remote/src/main/org/jboss/unit/remote/driver/handler/= http/response/InvokeGetResponse.java modules/test/trunk/remote/src/main/org/jboss/unit/remote/driver/handler/= http/response/InvokeMethodResponse.java modules/test/trunk/remote/src/main/org/jboss/unit/remote/driver/handler/= http/response/InvokePostResponse.java modules/test/trunk/remote/src/main/org/jboss/unit/remote/server/ modules/test/trunk/remote/src/main/org/jboss/unit/remote/server/Node.java modules/test/trunk/remote/src/main/org/jboss/unit/remote/server/NodeId.j= ava modules/test/trunk/remote/src/main/org/jboss/unit/remote/server/NodeMana= ger.java modules/test/trunk/remote/src/main/org/jboss/unit/remote/server/ServiceL= ookup.java modules/test/trunk/remote/src/main/org/jboss/unit/remote/server/ServiceL= ookupFailedException.java modules/test/trunk/remote/src/resources/ Log: reimported remote as an extension of jboss unit Added: modules/test/trunk/remote/build.bat =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/remote/build.bat (rev 0) +++ modules/test/trunk/remote/build.bat 2007-10-08 16:09:32 UTC (rev 8564) @@ -0,0 +1,54 @@ +(a)echo off +rem +rem Invokes a script of the same name in the 'tools' module. +rem = +rem The 'tools' module is expected to be a peer directory of the directory +rem in which this script lives. +rem +rem @author Jason Dillon +rem + +rem $Id: build.bat 1829 2006-03-05 13:20:08Z julien $ + +setlocal + +set PROGNAME=3D%~nx0 +set DIRNAME=3D%~dp0 + +rem Legacy shell support +if x%PROGNAME%=3D=3Dx set PROGNAME=3Dbuild.bat +if x%DIRNAME%=3D=3Dx set DIRNAME=3D.\ + +set MODULE_ROOT=3D%DIRNAME% +if x%TOOLS_ROOT%=3D=3Dx set TOOLS_ROOT=3D%DIRNAME%..\tools +set TARGET=3D%TOOLS_ROOT%\bin\build.bat +set ARGS=3D%* + +rem Start'er up yo +goto main + +:debug +if not x%DEBUG%=3D=3Dx echo %PROGNAME%: %* +goto :EOF + +:main +call :debug PROGNAME=3D%PROGNAME% +call :debug DIRNAME=3D%DIRNAME% +call :debug TOOLS_ROOT=3D%TOOLS_ROOT% +call :debug TARGET=3D%TARGET% + +if exist %TARGET% call :call-script & goto :EOF +rem else fail, we can not go on + +echo %PROGNAME%: *ERROR* The target executable does not exist: +echo %PROGNAME%: +echo %PROGNAME%: %TARGET% +echo %PROGNAME%: +echo %PROGNAME%: Please make sure you have checked out the 'tools' module +echo %PROGNAME%: and make sure it is up to date. +goto :EOF + +:call-script +call :debug Executing %TARGET% %ARGS% +call %TARGET% %ARGS% +goto :EOF Property changes on: modules/test/trunk/remote/build.bat ___________________________________________________________________ Name: svn:executable + * Added: modules/test/trunk/remote/build.sh =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/remote/build.sh (rev 0) +++ modules/test/trunk/remote/build.sh 2007-10-08 16:09:32 UTC (rev 8564) @@ -0,0 +1,49 @@ +#!/bin/sh +## +## Invokes a script of the same name in the 'tools' module. +## = +## The 'tools' module is expected to be a peer directory of the directory +## in which this script lives. +## +## @author Jason Dillon +## + +# $Id: build.sh 1829 2006-03-05 13:20:08Z julien $ + +PROGNAME=3D`basename $0` +DIRNAME=3D`dirname $0` + +# Buss it yo +main() { + if [ "x$TOOLS_ROOT" =3D "x" ]; then + TOOLS_ROOT=3D`cd $DIRNAME/../tools && pwd` + fi + + MODULE_ROOT=3D`cd $DIRNAME; pwd` + export TOOLS_ROOT MODULE_ROOT DEBUG TRACE + + # Where is the target script? + target=3D"$TOOLS_ROOT/bin/$PROGNAME" + if [ ! -f "$target" ]; then + echo "${PROGNAME}: *ERROR* The target executable does not exist:" + echo "${PROGNAME}:" + echo "${PROGNAME}: $target" + echo "${PROGNAME}:" + echo "${PROGNAME}: Please make sure you have checked out the 'tools' modu= le" + echo "${PROGNAME}: and make sure it is up to date." + exit 2 + fi + + # Get busy yo! + if [ "x$DEBUG" !=3D "x" ]; then + echo "${PROGNAME}: Executing: /bin/sh $target $@" + fi + if [ "x$TRACE" =3D "x" ]; then + exec /bin/sh $target "$@" + else + exec /bin/sh -x $target "$@" + fi +} + +# Lets get ready to rumble! +main "$@" Property changes on: modules/test/trunk/remote/build.sh ___________________________________________________________________ Name: svn:executable + * Added: modules/test/trunk/remote/build.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/remote/build.xml (rev 0) +++ modules/test/trunk/remote/build.xml 2007-10-08 16:09:32 UTC (rev 8564) @@ -0,0 +1,210 @@ + + + + + + + + + + ]> + + + + + + + + + + + + + + + + + + + + + + + + + &buildmagic; + &modules; + &defaults; + &tools; + &targets; + + + + + + + + + + + + + + + + + + + + + + &libraries; + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Property changes on: modules/test/trunk/remote/build.xml ___________________________________________________________________ Name: svn:executable + * Added: modules/test/trunk/remote/src/main/org/jboss/test/AllTests.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/remote/src/main/org/jboss/test/AllTests.java = (rev 0) +++ modules/test/trunk/remote/src/main/org/jboss/test/AllTests.java 2007-10= -08 16:09:32 UTC (rev 8564) @@ -0,0 +1,37 @@ +/*************************************************************************= ***** + * JBoss, a division of Red Hat = * + * Copyright 2006, Red Hat Middleware, LLC, and individual = * + * contributors as indicated by the @authors tag. See the = * + * copyright.txt in the distribution for a full listing of = * + * individual contributors. = * + * = * + * This is free software; you can redistribute it and/or modify it = * + * under the terms of the GNU Lesser General Public License as = * + * published by the Free Software Foundation; either version 2.1 of = * + * the License, or (at your option) any later version. = * + * = * + * This software is distributed in the hope that it will be useful, = * + * but WITHOUT ANY WARRANTY; without even the implied warranty of = * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU = * + * Lesser General Public License for more details. = * + * = * + * You should have received a copy of the GNU Lesser General Public = * + * License along with this software; if not, write to the Free = * + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA = * + * 02110-1301 USA, or see the FSF site: http://www.fsf.org. = * + *************************************************************************= *****/ +package org.jboss.test; + +/** + * @author Julien Viet + * @version $Revision: 1.1 $ + */ +public class AllTests +{ + + public static void main(String[] args) + { + = + } + +} Added: modules/test/trunk/remote/src/main/org/jboss/unit/remote/RequestCont= ext.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/remote/src/main/org/jboss/unit/remote/RequestContext= .java (rev 0) +++ modules/test/trunk/remote/src/main/org/jboss/unit/remote/RequestContext= .java 2007-10-08 16:09:32 UTC (rev 8564) @@ -0,0 +1,50 @@ +/*************************************************************************= ***** + * JBoss, a division of Red Hat = * + * Copyright 2006, Red Hat Middleware, LLC, and individual = * + * contributors as indicated by the @authors tag. See the = * + * copyright.txt in the distribution for a full listing of = * + * individual contributors. = * + * = * + * This is free software; you can redistribute it and/or modify it = * + * under the terms of the GNU Lesser General Public License as = * + * published by the Free Software Foundation; either version 2.1 of = * + * the License, or (at your option) any later version. = * + * = * + * This software is distributed in the hope that it will be useful, = * + * but WITHOUT ANY WARRANTY; without even the implied warranty of = * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU = * + * Lesser General Public License for more details. = * + * = * + * You should have received a copy of the GNU Lesser General Public = * + * License along with this software; if not, write to the Free = * + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA = * + * 02110-1301 USA, or see the FSF site: http://www.fsf.org. = * + *************************************************************************= *****/ +package org.jboss.unit.remote; + +import java.io.Serializable; +import java.util.Map; + +/** + * @author Julien Viet + * @version $Revision: 1.1 $ + */ +public class RequestContext implements Serializable +{ + + /** The phase count. */ + protected int requestCount; // todo rename to phase count + + /** The parametrization. */ + protected Map parametrization; + + /** The payload. */ + protected Map payload; + + public RequestContext(int requestCount, Map parametriza= tion, Map payload) + { + this.requestCount =3D requestCount; + this.parametrization =3D parametrization; + this.payload =3D payload; + } +} Added: modules/test/trunk/remote/src/main/org/jboss/unit/remote/ResponseCon= text.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/remote/src/main/org/jboss/unit/remote/ResponseContex= t.java (rev 0) +++ modules/test/trunk/remote/src/main/org/jboss/unit/remote/ResponseContex= t.java 2007-10-08 16:09:32 UTC (rev 8564) @@ -0,0 +1,58 @@ +/*************************************************************************= ***** + * JBoss, a division of Red Hat = * + * Copyright 2006, Red Hat Middleware, LLC, and individual = * + * contributors as indicated by the @authors tag. See the = * + * copyright.txt in the distribution for a full listing of = * + * individual contributors. = * + * = * + * This is free software; you can redistribute it and/or modify it = * + * under the terms of the GNU Lesser General Public License as = * + * published by the Free Software Foundation; either version 2.1 of = * + * the License, or (at your option) any later version. = * + * = * + * This software is distributed in the hope that it will be useful, = * + * but WITHOUT ANY WARRANTY; without even the implied warranty of = * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU = * + * Lesser General Public License for more details. = * + * = * + * You should have received a copy of the GNU Lesser General Public = * + * License along with this software; if not, write to the Free = * + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA = * + * 02110-1301 USA, or see the FSF site: http://www.fsf.org. = * + *************************************************************************= *****/ +package org.jboss.unit.remote; + +import org.jboss.unit.driver.DriverResponse; + +import java.io.Serializable; +import java.util.Map; + +/** + * @author Julien Viet + * @version $Revision: 1.1 $ + */ +public class ResponseContext +{ + + /** The test response. */ + protected DriverResponse response; + + /** The payload. */ + protected Map payload; + + public ResponseContext(DriverResponse response, Map payload) + { + this.response =3D response; + this.payload =3D payload; + } + + public DriverResponse getResponse() + { + return response; + } + + public Map getPayload() + { + return payload; + } +} Added: modules/test/trunk/remote/src/main/org/jboss/unit/remote/driver/Prot= ocolHandler.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/remote/src/main/org/jboss/unit/remote/driver/Protoco= lHandler.java (rev 0) +++ modules/test/trunk/remote/src/main/org/jboss/unit/remote/driver/Protoco= lHandler.java 2007-10-08 16:09:32 UTC (rev 8564) @@ -0,0 +1,35 @@ +/*************************************************************************= ***** + * JBoss, a division of Red Hat = * + * Copyright 2006, Red Hat Middleware, LLC, and individual = * + * contributors as indicated by the @authors tag. See the = * + * copyright.txt in the distribution for a full listing of = * + * individual contributors. = * + * = * + * This is free software; you can redistribute it and/or modify it = * + * under the terms of the GNU Lesser General Public License as = * + * published by the Free Software Foundation; either version 2.1 of = * + * the License, or (at your option) any later version. = * + * = * + * This software is distributed in the hope that it will be useful, = * + * but WITHOUT ANY WARRANTY; without even the implied warranty of = * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU = * + * Lesser General Public License for more details. = * + * = * + * You should have received a copy of the GNU Lesser General Public = * + * License along with this software; if not, write to the Free = * + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA = * + * 02110-1301 USA, or see the FSF site: http://www.fsf.org. = * + *************************************************************************= *****/ +package org.jboss.unit.remote.driver; + +/** + * @author Julien Viet + * @version $Revision: 1.1 $ + */ +public interface ProtocolHandler +{ + + RemoteDriverCommandContext handleResponse(TestConversation testConversa= tion, RemoteDriverResponseContext responseContext); + + RemoteDriverResponseContext handleCommand(TestConversation conversation= , RemoteDriverCommandContext commandContext) throws Exception; +} Added: modules/test/trunk/remote/src/main/org/jboss/unit/remote/driver/Remo= teDriverCommandContext.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/remote/src/main/org/jboss/unit/remote/driver/RemoteD= riverCommandContext.java (rev 0) +++ modules/test/trunk/remote/src/main/org/jboss/unit/remote/driver/RemoteD= riverCommandContext.java 2007-10-08 16:09:32 UTC (rev 8564) @@ -0,0 +1,113 @@ +/*************************************************************************= ***** + * JBoss, a division of Red Hat = * + * Copyright 2006, Red Hat Middleware, LLC, and individual = * + * contributors as indicated by the @authors tag. See the = * + * copyright.txt in the distribution for a full listing of = * + * individual contributors. = * + * = * + * This is free software; you can redistribute it and/or modify it = * + * under the terms of the GNU Lesser General Public License as = * + * published by the Free Software Foundation; either version 2.1 of = * + * the License, or (at your option) any later version. = * + * = * + * This software is distributed in the hope that it will be useful, = * + * but WITHOUT ANY WARRANTY; without even the implied warranty of = * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU = * + * Lesser General Public License for more details. = * + * = * + * You should have received a copy of the GNU Lesser General Public = * + * License along with this software; if not, write to the Free = * + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA = * + * 02110-1301 USA, or see the FSF site: http://www.fsf.org. = * + *************************************************************************= *****/ +package org.jboss.unit.remote.driver; + +import org.jboss.unit.driver.DriverCommand; +import org.jboss.unit.driver.DriverResponse; + +import java.util.Map; +import java.util.HashMap; +import java.io.Serializable; + +/** + * @author Julien Viet + * @version $Revision: 1.1 $ + */ +public class RemoteDriverCommandContext +{ + + /** The previous response if not null. */ + private RemoteDriverResponseContext responseContext; + + /** . */ + private final int requestCount; + + /** The command to invoke. */ + private DriverCommand command; + + /** . */ + private final Map payload; + + public RemoteDriverCommandContext(RemoteDriverResponseContext responseC= ontext, DriverCommand command) + { + this.responseContext =3D responseContext; + this.requestCount =3D responseContext.getCommandContext().requestCou= nt + 1; + this.command =3D command; + this.payload =3D new HashMap(responseContext.g= etPayload()); + } + + public RemoteDriverCommandContext(DriverCommand command) + { + this.responseContext =3D null; + this.requestCount =3D -1; + this.command =3D command; + this.payload =3D new HashMap(); + } + + public RemoteDriverCommandContext(RemoteDriverCommandContext commandCon= text, DriverCommand command) + { + Map payload =3D commandContext.responseContext= !=3D null ? new HashMap(commandContext.responseConte= xt.getPayload()) : new HashMap(); + + // + this.responseContext =3D commandContext.responseContext; + this.requestCount =3D commandContext.requestCount + 1; + this.command =3D command; + this.payload =3D payload; + } + + public RemoteDriverCommandContext(RemoteDriverCommandContext commandCon= text) + { + Map payload =3D commandContext.responseContext= !=3D null ? new HashMap(commandContext.responseConte= xt.getPayload()) : new HashMap(); + + // + this.responseContext =3D commandContext.responseContext; + this.requestCount =3D commandContext.requestCount + 1; + this.command =3D commandContext.command; + this.payload =3D payload; + } + + public Map getPayload() + { + return payload; + } + + public int getRequestCount() + { + return requestCount; + } + + public RemoteDriverResponseContext createResponseContext(DriverResponse= response) + { + return new RemoteDriverResponseContext(this, response); + } + + public RemoteDriverResponseContext getResponseContext() + { + return responseContext; + } + + public DriverCommand getCommand() + { + return command; + } +} Added: modules/test/trunk/remote/src/main/org/jboss/unit/remote/driver/Remo= teDriverResponseContext.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/remote/src/main/org/jboss/unit/remote/driver/RemoteD= riverResponseContext.java (rev 0) +++ modules/test/trunk/remote/src/main/org/jboss/unit/remote/driver/RemoteD= riverResponseContext.java 2007-10-08 16:09:32 UTC (rev 8564) @@ -0,0 +1,98 @@ +/*************************************************************************= ***** + * JBoss, a division of Red Hat = * + * Copyright 2006, Red Hat Middleware, LLC, and individual = * + * contributors as indicated by the @authors tag. See the = * + * copyright.txt in the distribution for a full listing of = * + * individual contributors. = * + * = * + * This is free software; you can redistribute it and/or modify it = * + * under the terms of the GNU Lesser General Public License as = * + * published by the Free Software Foundation; either version 2.1 of = * + * the License, or (at your option) any later version. = * + * = * + * This software is distributed in the hope that it will be useful, = * + * but WITHOUT ANY WARRANTY; without even the implied warranty of = * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU = * + * Lesser General Public License for more details. = * + * = * + * You should have received a copy of the GNU Lesser General Public = * + * License along with this software; if not, write to the Free = * + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA = * + * 02110-1301 USA, or see the FSF site: http://www.fsf.org. = * + *************************************************************************= *****/ +package org.jboss.unit.remote.driver; + +import org.jboss.unit.driver.DriverResponse; + +import java.util.Map; +import java.util.HashMap; +import java.io.Serializable; + +/** + * @author Julien Viet + * @version $Revision: 1.1 $ + */ +public class RemoteDriverResponseContext +{ + + /** . */ + private final RemoteDriverCommandContext commandContext; + + /** . */ + private final DriverResponse response; + + /** . */ + private final Map payload; + + RemoteDriverResponseContext(RemoteDriverCommandContext commandContext, = DriverResponse response) + { + this.commandContext =3D commandContext; + this.response =3D response; + this.payload =3D new HashMap(); + } + + public RemoteDriverCommandContext getCommandContext() + { + return commandContext; + } + + public Map getPayload() + { + return payload; + } + + public Object getPayload(String name) + { + if (name =3D=3D null) + { + throw new IllegalArgumentException(); + } + return payload.get(name); + } + + public void setPayload(String name, Object value) + { + if (name =3D=3D null) + { + throw new IllegalArgumentException(); + } + if (value =3D=3D null) + { + payload.remove(name); + } + else + { + payload.put(name, (Serializable)value); + } + } + + public void removePayload(String name) + { + setPayload(name, null); + } + + public DriverResponse getResponse() + { + return response; + } +} Added: modules/test/trunk/remote/src/main/org/jboss/unit/remote/driver/Remo= teTestDriver.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/remote/src/main/org/jboss/unit/remote/driver/RemoteT= estDriver.java (rev 0) +++ modules/test/trunk/remote/src/main/org/jboss/unit/remote/driver/RemoteT= estDriver.java 2007-10-08 16:09:32 UTC (rev 8564) @@ -0,0 +1,49 @@ +/*************************************************************************= ***** + * JBoss, a division of Red Hat = * + * Copyright 2006, Red Hat Middleware, LLC, and individual = * + * contributors as indicated by the @authors tag. See the = * + * copyright.txt in the distribution for a full listing of = * + * individual contributors. = * + * = * + * This is free software; you can redistribute it and/or modify it = * + * under the terms of the GNU Lesser General Public License as = * + * published by the Free Software Foundation; either version 2.1 of = * + * the License, or (at your option) any later version. = * + * = * + * This software is distributed in the hope that it will be useful, = * + * but WITHOUT ANY WARRANTY; without even the implied warranty of = * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU = * + * Lesser General Public License for more details. = * + * = * + * You should have received a copy of the GNU Lesser General Public = * + * License along with this software; if not, write to the Free = * + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA = * + * 02110-1301 USA, or see the FSF site: http://www.fsf.org. = * + *************************************************************************= *****/ +package org.jboss.unit.remote.driver; + +import org.jboss.unit.remote.RequestContext; +import org.jboss.unit.remote.ResponseContext; +import org.jboss.unit.driver.TestDriver; +import org.jboss.unit.TestId; + +/** + * @author Julien Viet + * @version $Revision: 1.1 $ + */ +public interface RemoteTestDriver extends TestDriver +{ + + /** . */ + String SERVICE_ID =3D "TestDriverServer"; + + /** + * A client side push of the test context for a specific test. + */ + void pushContext(TestId testId, RequestContext testContext); + + /** + * A client pop of the test context for a specific test. + */ + ResponseContext popContext(TestId testId); +} Added: modules/test/trunk/remote/src/main/org/jboss/unit/remote/driver/Remo= teTestDriverClient.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/remote/src/main/org/jboss/unit/remote/driver/RemoteT= estDriverClient.java (rev 0) +++ modules/test/trunk/remote/src/main/org/jboss/unit/remote/driver/RemoteT= estDriverClient.java 2007-10-08 16:09:32 UTC (rev 8564) @@ -0,0 +1,181 @@ +/*************************************************************************= ***** + * JBoss, a division of Red Hat = * + * Copyright 2006, Red Hat Middleware, LLC, and individual = * + * contributors as indicated by the @authors tag. See the = * + * copyright.txt in the distribution for a full listing of = * + * individual contributors. = * + * = * + * This is free software; you can redistribute it and/or modify it = * + * under the terms of the GNU Lesser General Public License as = * + * published by the Free Software Foundation; either version 2.1 of = * + * the License, or (at your option) any later version. = * + * = * + * This software is distributed in the hope that it will be useful, = * + * but WITHOUT ANY WARRANTY; without even the implied warranty of = * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU = * + * Lesser General Public License for more details. = * + * = * + * You should have received a copy of the GNU Lesser General Public = * + * License along with this software; if not, write to the Free = * + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA = * + * 02110-1301 USA, or see the FSF site: http://www.fsf.org. = * + *************************************************************************= *****/ +package org.jboss.unit.remote.driver; + +import org.jboss.unit.remote.server.NodeId; +import org.jboss.unit.remote.server.NodeManager; +import org.jboss.unit.remote.server.Node; +import org.jboss.unit.driver.TestDriver; +import org.jboss.unit.driver.DriverCommand; +import org.jboss.unit.driver.DriverResponse; +import org.jboss.unit.info.TestInfo; +import org.jboss.unit.TestId; + +/** + * @author Julien Viet + * @version $Revision: 1.1 $ + */ +public class RemoteTestDriverClient implements TestDriver +{ + + // Config + + /** . */ + private NodeId initialNodeId; + + /** . */ + private String archivePath; + + // Services + + /** . */ + private NodeManager nodeManager; + + /** . */ + private ProtocolHandler protocolHandler; + + /** . */ +// private Deployer deployer; + + public NodeId getInitialNodeId() + { + return initialNodeId; + } + + public void setInitialNodeId(NodeId initialNodeId) + { + this.initialNodeId =3D initialNodeId; + } + + public String getArchivePath() + { + return archivePath; + } + + public void setArchivePath(String archivePath) + { + this.archivePath =3D archivePath; + } + + public NodeManager getNodeManager() + { + return nodeManager; + } + + public void setNodeManager(NodeManager nodeManager) + { + this.nodeManager =3D nodeManager; + } + + public ProtocolHandler getProtocolHandler() + { + return protocolHandler; + } + + public void setProtocolHandler(ProtocolHandler protocolHandler) + { + this.protocolHandler =3D protocolHandler; + } + +// public Deployer getDeployer() +// { +// return deployer; +// } +// +// public void setDeployer(Deployer deployer) +// { +// this.deployer =3D deployer; +// } + + public RemoteTestDriver getServer(Node node) + { + return (RemoteTestDriver)node.lookupService(RemoteTestDriver.SERVICE= _ID); + } + + public TestInfo getInfo() + { + Node node =3D nodeManager.getNode(initialNodeId); + TestDriver server =3D getServer(node); + return server.getInfo(); + } + + public DriverResponse invoke(TestId testId, DriverCommand command) // t= hrows TestDriverException + { + try + { + Node node =3D nodeManager.getNode(initialNodeId); + + // Create conversation + TestConversation conversation =3D createConversation(testId, node= ); + + // + return conversation.handleCommand(command); + } + catch (Exception e) + { +// throw new TestDriverException(e); + throw new Error(e); + } + } + + protected TestConversation createConversation(TestId testId, Node node) + { + return new TestConversation(protocolHandler, this, testId, node); + } + + public Node getNode(int port) + { + NodeId nodeId =3D null; + switch (port) + { + case 8080: + nodeId =3D NodeId.DEFAULT; + break; + case 8180: + nodeId =3D NodeId.PORTS_01; + break; + case 8280: + nodeId =3D NodeId.PORTS_02; + break; + } + return nodeManager.getNode(nodeId); + } + + public int getPort(Node node) + { + NodeId nodeId =3D node.getId(); + if (NodeId.DEFAULT.equals(nodeId)) + { + return 8080; + } + if (NodeId.PORTS_01.equals(nodeId)) + { + return 8180; + } + if (NodeId.PORTS_02.equals(nodeId)) + { + return 8280; + } + return -1; + } +} Added: modules/test/trunk/remote/src/main/org/jboss/unit/remote/driver/Remo= teTestDriverServer.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/remote/src/main/org/jboss/unit/remote/driver/RemoteT= estDriverServer.java (rev 0) +++ modules/test/trunk/remote/src/main/org/jboss/unit/remote/driver/RemoteT= estDriverServer.java 2007-10-08 16:09:32 UTC (rev 8564) @@ -0,0 +1,153 @@ +/*************************************************************************= ***** + * JBoss, a division of Red Hat = * + * Copyright 2006, Red Hat Middleware, LLC, and individual = * + * contributors as indicated by the @authors tag. See the = * + * copyright.txt in the distribution for a full listing of = * + * individual contributors. = * + * = * + * This is free software; you can redistribute it and/or modify it = * + * under the terms of the GNU Lesser General Public License as = * + * published by the Free Software Foundation; either version 2.1 of = * + * the License, or (at your option) any later version. = * + * = * + * This software is distributed in the hope that it will be useful, = * + * but WITHOUT ANY WARRANTY; without even the implied warranty of = * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU = * + * Lesser General Public License for more details. = * + * = * + * You should have received a copy of the GNU Lesser General Public = * + * License along with this software; if not, write to the Free = * + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA = * + * 02110-1301 USA, or see the FSF site: http://www.fsf.org. = * + *************************************************************************= *****/ +package org.jboss.unit.remote.driver; + +import org.jboss.unit.TestId; +import org.jboss.unit.Failure; +import org.jboss.unit.driver.DriverResponse; +import org.jboss.unit.driver.DriverCommand; +import org.jboss.unit.driver.TestDriver; +import org.jboss.unit.driver.response.FailureResponse; +import org.jboss.unit.info.TestInfo; +import org.jboss.unit.info.impl.SimpleTestSuiteInfo; +import org.jboss.unit.remote.RequestContext; +import org.jboss.unit.remote.ResponseContext; + +import java.util.Map; +import java.util.HashMap; + +/** + * @author Julien Viet + * @version $Revision: 5636 $ + */ +public class RemoteTestDriverServer implements RemoteTestDriver +{ + + /** . */ + private SimpleTestSuiteInfo info =3D new SimpleTestSuiteInfo("Main"); + + /** . */ + private Map drivers =3D new HashMap(); + + /** . */ + private RequestContext requestContext; + + /** . */ + private ResponseContext responseContext; + + public void pushContext(TestId testId, RequestContext testContext) + { + this.requestContext =3D testContext; + } + + public ResponseContext popContext(TestId testId) + { + return responseContext; + } + + public TestInfo getInfo() + { + return info; + } + + public DriverResponse invoke(TestId id, DriverCommand command) + { + if (id.getLength() =3D=3D 0) + { + return new FailureResponse(Failure.createErrorFailure("No null te= st id accepted")); + } + + // + String name =3D id.getName(0); + + // + TestDriver driver =3D drivers.get(name); + + // + if (driver =3D=3D null) + { + return new FailureResponse(Failure.createErrorFailure("No test dr= iver found for name " + name)); + } + + // + TestId driverId =3D id.range(1); + + // + return driver.invoke(driverId, command); + } + + public void addDriver(TestDriver driver) + { + synchronized(RemoteTestDriverServer.class) + { + info.addTest(driver.getInfo()); + + String name =3D driver.getInfo().getName(); + + drivers.put(name, driver); + } + } + + public synchronized void removeDriver(TestDriver driver) + { + synchronized(RemoteTestDriverServer.class) + { + String name =3D driver.getInfo().getName(); + + drivers.remove(name); + + info.removeTest(name); + } + } + + + + + + +// /** . */ +// private String initialPath =3D "/test"; +// +// public String getInitialPath() +// { +// return initialPath; +// } +// +// public void setInitialPath(String initialPath) +// { +// this.initialPath =3D initialPath; +// } +// +// public void pushContext(String testId, TestContext testContext) +// { +// if (testContext instanceof HTTPTestContext) +// { +// HTTPTestContext httpTestContext =3D (HTTPTestContext)testContex= t; +// httpTestContext.initialPath =3D initialPath; +// } +// +// // +// super.pushContext(testId, testContext); +// } + +} Added: modules/test/trunk/remote/src/main/org/jboss/unit/remote/driver/Test= Conversation.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/remote/src/main/org/jboss/unit/remote/driver/TestCon= versation.java (rev 0) +++ modules/test/trunk/remote/src/main/org/jboss/unit/remote/driver/TestCon= versation.java 2007-10-08 16:09:32 UTC (rev 8564) @@ -0,0 +1,209 @@ +/*************************************************************************= ***** + * JBoss, a division of Red Hat = * + * Copyright 2006, Red Hat Middleware, LLC, and individual = * + * contributors as indicated by the @authors tag. See the = * + * copyright.txt in the distribution for a full listing of = * + * individual contributors. = * + * = * + * This is free software; you can redistribute it and/or modify it = * + * under the terms of the GNU Lesser General Public License as = * + * published by the Free Software Foundation; either version 2.1 of = * + * the License, or (at your option) any later version. = * + * = * + * This software is distributed in the hope that it will be useful, = * + * but WITHOUT ANY WARRANTY; without even the implied warranty of = * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU = * + * Lesser General Public License for more details. = * + * = * + * You should have received a copy of the GNU Lesser General Public = * + * License along with this software; if not, write to the Free = * + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA = * + * 02110-1301 USA, or see the FSF site: http://www.fsf.org. = * + *************************************************************************= *****/ +package org.jboss.unit.remote.driver; + +import org.jboss.unit.driver.DriverResponse; +import org.jboss.unit.driver.DriverCommand; +import org.jboss.unit.driver.response.EndTestResponse; +import org.jboss.unit.remote.server.Node; +import org.jboss.unit.remote.RequestContext; +import org.jboss.unit.remote.ResponseContext; +import org.jboss.unit.TestId; + +import java.util.Map; +import java.util.HashMap; + +/** + * @author Julien Viet + * @version $Revision: 1.1 $ + */ +public final class TestConversation +{ + + /** . */ +// private final Logger log =3D Logger.getLogger(getClass()); + + /** The test name. */ + private final TestId testId; + + /** . */ + private final RemoteTestDriverClient driver; + + /** . */ + private final Map attributes; + + /** The node to invoke. */ + private Node node; + + /** The test parametrization. */ + private Map parametrization; + + /** . */ + private ProtocolHandler protocolHandler; + + public TestConversation(ProtocolHandler protocolHandler, RemoteTestDriv= erClient driver, TestId testId, Node node) + { + this.protocolHandler =3D protocolHandler; + this.driver =3D driver; + this.testId =3D testId; + this.node =3D node; + this.attributes =3D new HashMap(); + } + + DriverResponse handleCommand(DriverCommand command) throws Exception + { + RemoteDriverCommandContext commandContext =3D new RemoteDriverComman= dContext(command); + + // + return handleCommand(commandContext); + } + + /** + * Trigger an interaction with the server here. + * + * @param commandContext the command context + * @return the driver response + * @throws Exception for now any exception + */ + public final DriverResponse handleCommand(RemoteDriverCommandContext co= mmandContext) throws Exception + { + // +// if (command instanceof StartTestCommand) +// { +// StartTestCommand start =3D (StartTestCommand)command; +// parametrization =3D start.getParametrization(); +// pushContext(commandContext); +// DriverResponse response =3D getDriver().getServer(node).invoke(= testId, command); +// return commandContext.createResponseContext(response); +// } +// else if (command instanceof HTTPDriverCommand) +// { +// return new HTTPTestDriverHandler().invoke(this, commandContext); +// } +// else +// { +// throw new IllegalArgumentException("Not yet handled " + command= ); +// } + + RemoteDriverResponseContext respCtx =3D protocolHandler.handleComman= d(this, commandContext); + + // + DriverResponse response =3D respCtx.getResponse(); + + // + if (response instanceof EndTestResponse) + { + return response; + } + + // + commandContext =3D protocolHandler.handleResponse(this, respCtx); + + // + return handleCommand(commandContext); + } + + public Object getAttribute(String name) + { + if (name =3D=3D null) + { + throw new IllegalArgumentException(); + } + return attributes.get(name); + } + + public void setAttribute(String name, Object value) + { + if (name =3D=3D null) + { + throw new IllegalArgumentException(); + } + if (value =3D=3D null) + { + attributes.remove(name); + } + else + { + attributes.put(name, value); + } + } + + public void removeAttribute(String name) + { + setAttribute(name, null); + } + + public RemoteTestDriverClient getDriver() + { + return driver; + } + + public TestId getTestId() + { + return testId; + } + + public Node getNode() + { + return node; + } + + public void setNode(Node node) + { + this.node =3D node; + } + + public Map getParametrization() + { + return parametrization; + } + + public void setParametrization(Map parametrization) + { + this.parametrization =3D parametrization; + } + + public void pushContext(RemoteDriverCommandContext commandContext) + { + RequestContext ctx =3D new RequestContext(commandContext.getRequestC= ount(), parametrization, commandContext.getPayload()); + +// new TestContext( +// commandContext.getRequestCount(), +// driver.getArchivePath(), +// parametrization, +// commandContext.getPayload()); + + // +// log.info("# Updating test case context of : " + node + " : " + ctx= ); + RemoteTestDriver agent =3D driver.getServer(node); + agent.pushContext(testId, ctx); + } + + public ResponseContext popContext() + { + RemoteTestDriver agent =3D driver.getServer(node); + + // + return agent.popContext(testId); + } +} Added: modules/test/trunk/remote/src/main/org/jboss/unit/remote/driver/hand= ler/deployer/DeployerHandler.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/remote/src/main/org/jboss/unit/remote/driver/handler= /deployer/DeployerHandler.java (rev 0) +++ modules/test/trunk/remote/src/main/org/jboss/unit/remote/driver/handler= /deployer/DeployerHandler.java 2007-10-08 16:09:32 UTC (rev 8564) @@ -0,0 +1,113 @@ +/*************************************************************************= ***** + * JBoss, a division of Red Hat = * + * Copyright 2006, Red Hat Middleware, LLC, and individual = * + * contributors as indicated by the @authors tag. See the = * + * copyright.txt in the distribution for a full listing of = * + * individual contributors. = * + * = * + * This is free software; you can redistribute it and/or modify it = * + * under the terms of the GNU Lesser General Public License as = * + * published by the Free Software Foundation; either version 2.1 of = * + * the License, or (at your option) any later version. = * + * = * + * This software is distributed in the hope that it will be useful, = * + * but WITHOUT ANY WARRANTY; without even the implied warranty of = * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU = * + * Lesser General Public License for more details. = * + * = * + * You should have received a copy of the GNU Lesser General Public = * + * License along with this software; if not, write to the Free = * + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA = * + * 02110-1301 USA, or see the FSF site: http://www.fsf.org. = * + *************************************************************************= *****/ +package org.jboss.unit.remote.driver.handler.deployer; + +import org.jboss.unit.remote.driver.ProtocolHandler; +import org.jboss.unit.remote.driver.RemoteDriverResponseContext; +import org.jboss.unit.remote.driver.TestConversation; +import org.jboss.unit.remote.driver.RemoteDriverCommandContext; +import org.jboss.unit.remote.driver.handler.deployer.response.UndeployResp= onse; +import org.jboss.unit.remote.driver.handler.deployer.response.DeployRespon= se; +import org.jboss.unit.driver.DriverResponse; +import org.jboss.portal.test.framework.deployment.Deployer; + +/** + * @author Julien Viet + * @version $Revision: 1.1 $ + */ +public class DeployerHandler implements ProtocolHandler +{ + + /** . */ + private ProtocolHandler nextHandler; + + /** . */ + private Deployer deployer; + + /** . */ + private String archivePath; + + public ProtocolHandler getNextHandler() + { + return nextHandler; + } + + public void setNextHandler(ProtocolHandler nextHandler) + { + this.nextHandler =3D nextHandler; + } + + public Deployer getDeployer() + { + return deployer; + } + + public void setDeployer(Deployer deployer) + { + this.deployer =3D deployer; + } + + public String getArchivePath() + { + return archivePath; + } + + public void setArchivePath(String archivePath) + { + this.archivePath =3D archivePath; + } + + public RemoteDriverCommandContext handleResponse(TestConversation testC= onversation, RemoteDriverResponseContext responseContext) + { + DriverResponse response =3D responseContext.getResponse(); + + if (response instanceof DeployResponse) + { + DeployResponse deploy =3D (DeployResponse)response; + + // +// deployer.deploy(archivePath, deploy.getId(), node); + + // + return new RemoteDriverCommandContext(responseContext.getCommandC= ontext()); + } + else if (response instanceof UndeployResponse) + { + UndeployResponse undeploy =3D (UndeployResponse)response; + + // +// Deployer deployer =3D driver.getDeployer(); +// deployer.undeploy(driver.getArchivePath(), undeploy.getId()); + + // + return new RemoteDriverCommandContext(responseContext.getCommandC= ontext()); + } + + return null; //To change body of implemented methods use File | Set= tings | File Templates. + } + + public RemoteDriverResponseContext handleCommand(TestConversation conve= rsation, RemoteDriverCommandContext commandContext) throws Exception + { + return nextHandler.handleCommand(conversation, commandContext); + } +} Added: modules/test/trunk/remote/src/main/org/jboss/unit/remote/driver/hand= ler/deployer/response/DeployResponse.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/remote/src/main/org/jboss/unit/remote/driver/handler= /deployer/response/DeployResponse.java (rev 0) +++ modules/test/trunk/remote/src/main/org/jboss/unit/remote/driver/handler= /deployer/response/DeployResponse.java 2007-10-08 16:09:32 UTC (rev 8564) @@ -0,0 +1,48 @@ +/*************************************************************************= ***** + * JBoss, a division of Red Hat = * + * Copyright 2006, Red Hat Middleware, LLC, and individual = * + * contributors as indicated by the @authors tag. See the = * + * copyright.txt in the distribution for a full listing of = * + * individual contributors. = * + * = * + * This is free software; you can redistribute it and/or modify it = * + * under the terms of the GNU Lesser General Public License as = * + * published by the Free Software Foundation; either version 2.1 of = * + * the License, or (at your option) any later version. = * + * = * + * This software is distributed in the hope that it will be useful, = * + * but WITHOUT ANY WARRANTY; without even the implied warranty of = * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU = * + * Lesser General Public License for more details. = * + * = * + * You should have received a copy of the GNU Lesser General Public = * + * License along with this software; if not, write to the Free = * + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA = * + * 02110-1301 USA, or see the FSF site: http://www.fsf.org. = * + *************************************************************************= *****/ +package org.jboss.unit.remote.driver.handler.deployer.response; + +/** + * @author Julien Viet + * @version $Revision: 1.1 $ + */ +public class DeployResponse extends DeployerResponse +{ + + /** . */ + private final String id; + + public DeployResponse(String id) + { + if (id =3D=3D null) + { + throw new IllegalArgumentException(); + } + this.id =3D id; + } + + public String getId() + { + return id; + } +} Added: modules/test/trunk/remote/src/main/org/jboss/unit/remote/driver/hand= ler/deployer/response/DeployerResponse.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/remote/src/main/org/jboss/unit/remote/driver/handler= /deployer/response/DeployerResponse.java (rev 0) +++ modules/test/trunk/remote/src/main/org/jboss/unit/remote/driver/handler= /deployer/response/DeployerResponse.java 2007-10-08 16:09:32 UTC (rev 8564) @@ -0,0 +1,33 @@ +/*************************************************************************= ***** + * JBoss, a division of Red Hat = * + * Copyright 2006, Red Hat Middleware, LLC, and individual = * + * contributors as indicated by the @authors tag. See the = * + * copyright.txt in the distribution for a full listing of = * + * individual contributors. = * + * = * + * This is free software; you can redistribute it and/or modify it = * + * under the terms of the GNU Lesser General Public License as = * + * published by the Free Software Foundation; either version 2.1 of = * + * the License, or (at your option) any later version. = * + * = * + * This software is distributed in the hope that it will be useful, = * + * but WITHOUT ANY WARRANTY; without even the implied warranty of = * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU = * + * Lesser General Public License for more details. = * + * = * + * You should have received a copy of the GNU Lesser General Public = * + * License along with this software; if not, write to the Free = * + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA = * + * 02110-1301 USA, or see the FSF site: http://www.fsf.org. = * + *************************************************************************= *****/ +package org.jboss.unit.remote.driver.handler.deployer.response; + +import org.jboss.unit.driver.DriverResponse; + +/** + * @author Julien Viet + * @version $Revision: 1.1 $ + */ +public class DeployerResponse extends DriverResponse +{ +} Added: modules/test/trunk/remote/src/main/org/jboss/unit/remote/driver/hand= ler/deployer/response/UndeployResponse.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/remote/src/main/org/jboss/unit/remote/driver/handler= /deployer/response/UndeployResponse.java (rev 0) +++ modules/test/trunk/remote/src/main/org/jboss/unit/remote/driver/handler= /deployer/response/UndeployResponse.java 2007-10-08 16:09:32 UTC (rev 8564) @@ -0,0 +1,48 @@ +/*************************************************************************= ***** + * JBoss, a division of Red Hat = * + * Copyright 2006, Red Hat Middleware, LLC, and individual = * + * contributors as indicated by the @authors tag. See the = * + * copyright.txt in the distribution for a full listing of = * + * individual contributors. = * + * = * + * This is free software; you can redistribute it and/or modify it = * + * under the terms of the GNU Lesser General Public License as = * + * published by the Free Software Foundation; either version 2.1 of = * + * the License, or (at your option) any later version. = * + * = * + * This software is distributed in the hope that it will be useful, = * + * but WITHOUT ANY WARRANTY; without even the implied warranty of = * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU = * + * Lesser General Public License for more details. = * + * = * + * You should have received a copy of the GNU Lesser General Public = * + * License along with this software; if not, write to the Free = * + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA = * + * 02110-1301 USA, or see the FSF site: http://www.fsf.org. = * + *************************************************************************= *****/ +package org.jboss.unit.remote.driver.handler.deployer.response; + +/** + * @author Julien Viet + * @version $Revision: 1.1 $ + */ +public class UndeployResponse extends DeployerResponse +{ + + /** . */ + private final String id; + + public UndeployResponse(String id) + { + if (id =3D=3D null) + { + throw new IllegalArgumentException(); + } + this.id =3D id; + } + + public String getId() + { + return id; + } +} Added: modules/test/trunk/remote/src/main/org/jboss/unit/remote/driver/hand= ler/http/HTTPConversation.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/remote/src/main/org/jboss/unit/remote/driver/handler= /http/HTTPConversation.java (rev 0) +++ modules/test/trunk/remote/src/main/org/jboss/unit/remote/driver/handler= /http/HTTPConversation.java 2007-10-08 16:09:32 UTC (rev 8564) @@ -0,0 +1,313 @@ +/*************************************************************************= ***** + * JBoss, a division of Red Hat = * + * Copyright 2006, Red Hat Middleware, LLC, and individual = * + * contributors as indicated by the @authors tag. See the = * + * copyright.txt in the distribution for a full listing of = * + * individual contributors. = * + * = * + * This is free software; you can redistribute it and/or modify it = * + * under the terms of the GNU Lesser General Public License as = * + * published by the Free Software Foundation; either version 2.1 of = * + * the License, or (at your option) any later version. = * + * = * + * This software is distributed in the hope that it will be useful, = * + * but WITHOUT ANY WARRANTY; without even the implied warranty of = * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU = * + * Lesser General Public License for more details. = * + * = * + * You should have received a copy of the GNU Lesser General Public = * + * License along with this software; if not, write to the Free = * + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA = * + * 02110-1301 USA, or see the FSF site: http://www.fsf.org. = * + *************************************************************************= *****/ +package org.jboss.unit.remote.driver.handler.http; + +import org.apache.commons.httpclient.HttpClient; +import org.apache.commons.httpclient.SimpleHttpConnectionManager; +import org.apache.commons.httpclient.UsernamePasswordCredentials; +import org.apache.commons.httpclient.NameValuePair; +import org.apache.commons.httpclient.Header; +import org.apache.commons.httpclient.HttpMethod; +import org.apache.commons.httpclient.HeaderElement; +import org.apache.commons.httpclient.methods.PostMethod; +import org.apache.commons.httpclient.methods.ByteArrayRequestEntity; +import org.apache.commons.httpclient.methods.GetMethod; +import org.apache.commons.httpclient.auth.AuthScope; +import org.apache.commons.httpclient.params.HttpMethodParams; +import org.apache.log4j.Logger; +import org.jboss.portal.common.http.HttpRequest; +import org.jboss.portal.common.http.HttpHeaders; +import org.jboss.portal.common.http.HttpHeader; +import org.jboss.unit.remote.driver.handler.http.command.DoMethodCommand; +import org.jboss.unit.remote.driver.handler.http.command.DoPostCommand; +import org.jboss.unit.remote.driver.handler.http.command.DoGetCommand; +import org.jboss.unit.remote.driver.TestConversation; +import org.jboss.unit.remote.driver.RemoteDriverCommandContext; +import org.jboss.unit.remote.driver.RemoteDriverResponseContext; +import org.jboss.unit.remote.server.Node; +import org.jboss.unit.remote.ResponseContext; +import org.jboss.unit.driver.DriverCommand; +import org.jboss.unit.driver.DriverResponse; +import org.jboss.unit.driver.response.FailureResponse; +import org.jboss.unit.Failure; + +import java.net.URI; +import java.net.URL; +import java.net.URISyntaxException; +import java.net.MalformedURLException; +import java.util.Collection; +import java.util.ArrayList; +import java.util.Iterator; + +/** + * @author Julien Viet + * @version $Revision: 1.1 $ + */ +public class HTTPConversation +{ + + /** . */ + private final Logger log =3D Logger.getLogger(getClass()); + + /** . */ + private final HttpClient client; + + /** . */ + private final TestConversation conversation; + + public HTTPConversation(TestConversation conversation) + { + HttpClient client =3D new HttpClient(new SimpleHttpConnectionManager= ()); + client.getParams().setParameter(HttpMethodParams.RETRY_HANDLER, null= ); + client.getState().setCredentials(AuthScope.ANY, new UsernamePassword= Credentials("test", "test")); + + // + this.conversation =3D conversation; + this.client =3D client; + } + + public RemoteDriverResponseContext invoke(RemoteDriverCommandContext co= mmandContext) throws Exception + { + DriverCommand command =3D commandContext.getCommand(); + + // + if (command instanceof DoMethodCommand) + { + DoMethodCommand method =3D (DoMethodCommand)command; + URI uri =3D method.getURI(); + URL url =3D getURL(uri); + if (command instanceof DoPostCommand) + { + DoPostCommand doPostCmd =3D (DoPostCommand)command; + PostMethod post =3D null; + try + { + post =3D new PostMethod(url.toString()); + post.setFollowRedirects(false); + HttpRequest.Body body =3D doPostCmd.getBody(); + if (doPostCmd.getContentType() !=3D null) + { + post.addRequestHeader("Content-Type", doPostCmd.getConte= ntType()); + } + if (body instanceof HttpRequest.Raw) + { + HttpRequest.Raw rb =3D (HttpRequest.Raw)body; + ByteArrayRequestEntity entity =3D new ByteArrayRequestEn= tity(rb.getBytes()); + post.setRequestEntity(entity); + } + else if (body instanceof HttpRequest.Form) + { + HttpRequest.Form fb =3D (HttpRequest.Form)body; + Collection tmp =3D new ArrayList(); + for (Object o : fb.getParameterNames()) + { + String name =3D (String)o; + String[] values =3D fb.getParameterValues(name); + for (String value : values) + { + NameValuePair nvp =3D new NameValuePair(name, valu= e); + tmp.add(nvp); + } + } + NameValuePair[] nvps =3D tmp.toArray(new NameValuePair[t= mp.size()]); + post.setRequestBody(nvps); + } + executeHTTPMethod(commandContext, post); + return decodeHTTPResponse(commandContext, post); + } + finally + { + if (post !=3D null) + { + post.releaseConnection(); + } + } + } + else + { + DoGetCommand doGetCmd =3D (DoGetCommand)command; + GetMethod get =3D null; + try + { + get =3D new GetMethod(url.toString()); + HttpHeaders headers =3D doGetCmd.getHeaders(); + for (Iterator i =3D headers.headers();i.hasNext();) + { + HttpHeader header =3D (HttpHeader)i.next(); + Header _header =3D new Header(header.getName(), header.g= etValue()); + get.addRequestHeader(_header); + } + get.setFollowRedirects(false); + executeHTTPMethod(commandContext, get); + return decodeHTTPResponse(commandContext, get); + } + finally + { + if (get !=3D null) + { + get.releaseConnection(); + } + } + } + } + else + { + return commandContext.createResponseContext(new FailureResponse(F= ailure.createErrorFailure("Unexpected response"))); + } + } + + private URL getURL(URI uri) throws URISyntaxException, MalformedURLExce= ption + { + if (!uri.isAbsolute()) + { + Node node =3D conversation.getNode(); + int port =3D conversation.getDriver().getPort(node); + uri =3D new URI("http://localhost:" + port).resolve(uri); + } + return uri.toURL(); + } + + private RemoteDriverResponseContext decodeHTTPResponse(RemoteDriverComm= andContext commandContext, HttpMethod httpMethod) throws Exception + { + ResponseContext ctx =3D conversation.popContext(); + DriverResponse response =3D ctx.getResponse(); + int status =3D httpMethod.getStatusCode(); + switch (status) + { + case 200: + // HTTP response is ok + if (response =3D=3D null) + { + response =3D new FailureResponse(Failure.createErrorFailure= ("No result for test " + conversation.getTestId() + " in the response")); + } + + // + log.info("# Received '200' code"); + break; + case 302: + // Send redirect + if (response =3D=3D null) + { + // Satisfy the 302 code + Header locationHeader =3D httpMethod.getResponseHeader("loc= ation"); + if (locationHeader !=3D null) + { + String redirectLocation =3D locationHeader.getValue(); + log.info("# Received '302' code --> " + redirectLocation= ); + DoGetCommand cmd =3D new DoGetCommand(new URI(redirectLo= cation)); + + // We should somehow stuff the response in the next payl= oad + // but it's not yet proven it's usefull + + // For now we don't add any contextual payload as + // 302 is some kind of implicit redirect response + return invoke(new RemoteDriverCommandContext(commandCont= ext.getResponseContext(), cmd)); + } + else + { + // The response is invalid + response =3D new FailureResponse(Failure.createErrorFail= ure("302 Code with corrupted data")); + } + } + else + { + // If any result has been setup during the action it overri= des the 302 code + log.info("# Received Result object which overrides the 302"= ); + } + break; + case 500: + log.info("# Received '500' code"); + response =3D new FailureResponse(Failure.createErrorFailure("R= eceived '500' code at " + httpMethod.getURI())); + break; + case 404: + log.info("# Received '404' code"); + response =3D new FailureResponse(Failure.createErrorFailure("R= eceived '404' code at " + httpMethod.getURI())); + break; + default: + response =3D new FailureResponse(Failure.createErrorFailure("U= nexpected http code " + status + " at " + httpMethod.getURI())); + break; + } + + // + RemoteDriverResponseContext responseCtx =3D commandContext.createRes= ponseContext(response); + + // + byte[] body =3D httpMethod.getResponseBody(); + responseCtx.setPayload("http.response.body", body); + + // + HttpHeaders _headers =3D new HttpHeaders(); + Header[] headers =3D httpMethod.getResponseHeaders(); + for (Header header : headers) + { + HttpHeader _header =3D _headers.addHeader(header.getName()); + HeaderElement[] elts =3D header.getElements(); + if (elts !=3D null) + { + for (HeaderElement elt : elts) + { + HttpHeader.Element _elt =3D _header.addElement(elt.getName(= ), elt.getValue()); + NameValuePair[] params =3D elt.getParameters(); + if (params !=3D null) + { + for (NameValuePair param : params) + { + _elt.addParam(param.getName(), param.getValue()); + } + } + } + } + } + responseCtx.setPayload("http.response.headers", _headers); + + // + return responseCtx; + } + + private int executeHTTPMethod(RemoteDriverCommandContext commandContext= , HttpMethod method) throws Exception + { + int port =3D method.getURI().getPort(); + + // Update to the next node + Node node =3D conversation.getDriver().getNode(port); + if (node =3D=3D null) + { + throw new IllegalArgumentException("Wrong port " + method.getURI(= ).getPort() + " in URI " + method.getURI()); + } + conversation.setNode(node); + + // Push context to the node + conversation.pushContext(commandContext); + + // + log.info("# Invoking test case over http " + method.getURI()); + int status =3D client.executeMethod(method); + + // Force to read the response body before we close the connection + // otherwise the content will be lost + method.getResponseBody(); + + // + return status; + } +} Added: modules/test/trunk/remote/src/main/org/jboss/unit/remote/driver/hand= ler/http/HTTPHandler.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/remote/src/main/org/jboss/unit/remote/driver/handler= /http/HTTPHandler.java (rev 0) +++ modules/test/trunk/remote/src/main/org/jboss/unit/remote/driver/handler= /http/HTTPHandler.java 2007-10-08 16:09:32 UTC (rev 8564) @@ -0,0 +1,115 @@ +/*************************************************************************= ***** + * JBoss, a division of Red Hat = * + * Copyright 2006, Red Hat Middleware, LLC, and individual = * + * contributors as indicated by the @authors tag. See the = * + * copyright.txt in the distribution for a full listing of = * + * individual contributors. = * + * = * + * This is free software; you can redistribute it and/or modify it = * + * under the terms of the GNU Lesser General Public License as = * + * published by the Free Software Foundation; either version 2.1 of = * + * the License, or (at your option) any later version. = * + * = * + * This software is distributed in the hope that it will be useful, = * + * but WITHOUT ANY WARRANTY; without even the implied warranty of = * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU = * + * Lesser General Public License for more details. = * + * = * + * You should have received a copy of the GNU Lesser General Public = * + * License along with this software; if not, write to the Free = * + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA = * + * 02110-1301 USA, or see the FSF site: http://www.fsf.org. = * + *************************************************************************= *****/ +package org.jboss.unit.remote.driver.handler.http; + +import org.jboss.portal.common.http.HttpRequest; +import org.jboss.unit.remote.driver.RemoteDriverResponseContext; +import org.jboss.unit.remote.driver.RemoteDriverCommandContext; +import org.jboss.unit.remote.driver.ProtocolHandler; +import org.jboss.unit.remote.driver.TestConversation; +import org.jboss.unit.remote.driver.handler.http.response.InvokePostRespon= se; +import org.jboss.unit.remote.driver.handler.http.response.InvokeGetRespons= e; +import org.jboss.unit.remote.driver.handler.http.response.HTTPDriverRespon= se; +import org.jboss.unit.remote.driver.handler.http.response.InvokeMethodResp= onse; +import org.jboss.unit.remote.driver.handler.http.command.DoPostCommand; +import org.jboss.unit.remote.driver.handler.http.command.DoGetCommand; +import org.jboss.unit.remote.driver.handler.http.command.HTTPDriverCommand; + +/** + * @author Julien Viet + * @version $Revision: 1.1 $ + */ +public class HTTPHandler implements ProtocolHandler +{ + + /** . */ + private ProtocolHandler nextHandler; + + public ProtocolHandler getNextHandler() + { + return nextHandler; + } + + public void setNextHandler(ProtocolHandler nextHandler) + { + this.nextHandler =3D nextHandler; + } + + public RemoteDriverCommandContext handleResponse(TestConversation testC= onversation, RemoteDriverResponseContext responseContext) + { + if (responseContext.getResponse() instanceof HTTPDriverResponse) + { + HTTPDriverResponse resp =3D (HTTPDriverResponse)responseContext.g= etResponse(); + if (resp instanceof InvokeMethodResponse) + { + if (resp instanceof InvokeGetResponse) + { + InvokeGetResponse igr =3D (InvokeGetResponse)resp; + return new RemoteDriverCommandContext(responseContext, new = DoGetCommand(igr.getURI(), igr.getHeaders())); + } + else + { + InvokePostResponse ipr =3D (InvokePostResponse)resp; + HttpRequest.Body dpcb =3D ipr.getBody(); + return new RemoteDriverCommandContext(responseContext, new = DoPostCommand(ipr.getURI(), ipr.getContentType(), dpcb)); + } + } + } + + // + if (nextHandler !=3D null) + { + return nextHandler.handleResponse(testConversation, responseConte= xt); + } + + // + return null; + } + + public RemoteDriverResponseContext handleCommand(TestConversation conve= rsation, RemoteDriverCommandContext commandContext) throws Exception + { + if (commandContext.getCommand() instanceof HTTPDriverCommand) + { + HTTPConversation httpConversation =3D (HTTPConversation)conversat= ion.getAttribute("http.conversation"); + + // + if (httpConversation =3D=3D null) + { + httpConversation =3D new HTTPConversation(conversation); + conversation.setAttribute("http.conversation", httpConversatio= n); + } + + // + return httpConversation.invoke(commandContext); + } + + // + if (nextHandler !=3D null) + { + return nextHandler.handleCommand(conversation, commandContext); + } + + // + return null; + } +} Added: modules/test/trunk/remote/src/main/org/jboss/unit/remote/driver/hand= ler/http/command/DoGetCommand.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/remote/src/main/org/jboss/unit/remote/driver/handler= /http/command/DoGetCommand.java (rev 0) +++ modules/test/trunk/remote/src/main/org/jboss/unit/remote/driver/handler= /http/command/DoGetCommand.java 2007-10-08 16:09:32 UTC (rev 8564) @@ -0,0 +1,47 @@ +/*************************************************************************= ***** + * JBoss, a division of Red Hat = * + * Copyright 2006, Red Hat Middleware, LLC, and individual = * + * contributors as indicated by the @authors tag. See the = * + * copyright.txt in the distribution for a full listing of = * + * individual contributors. = * + * = * + * This is free software; you can redistribute it and/or modify it = * + * under the terms of the GNU Lesser General Public License as = * + * published by the Free Software Foundation; either version 2.1 of = * + * the License, or (at your option) any later version. = * + * = * + * This software is distributed in the hope that it will be useful, = * + * but WITHOUT ANY WARRANTY; without even the implied warranty of = * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU = * + * Lesser General Public License for more details. = * + * = * + * You should have received a copy of the GNU Lesser General Public = * + * License along with this software; if not, write to the Free = * + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA = * + * 02110-1301 USA, or see the FSF site: http://www.fsf.org. = * + *************************************************************************= *****/ +package org.jboss.unit.remote.driver.handler.http.command; + +import org.jboss.portal.common.http.HttpHeaders; + +import java.net.URI; + +/** + * Perform a get. + * + * @author Julien Viet + * @version $Revision: 5448 $ + */ +public class DoGetCommand extends DoMethodCommand +{ + + public DoGetCommand(URI uri, HttpHeaders headers) + { + super(uri, headers); + } + + public DoGetCommand(URI uri) + { + super(uri); + } +} Added: modules/test/trunk/remote/src/main/org/jboss/unit/remote/driver/hand= ler/http/command/DoMethodCommand.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/remote/src/main/org/jboss/unit/remote/driver/handler= /http/command/DoMethodCommand.java (rev 0) +++ modules/test/trunk/remote/src/main/org/jboss/unit/remote/driver/handler= /http/command/DoMethodCommand.java 2007-10-08 16:09:32 UTC (rev 8564) @@ -0,0 +1,62 @@ +/*************************************************************************= ***** + * JBoss, a division of Red Hat = * + * Copyright 2006, Red Hat Middleware, LLC, and individual = * + * contributors as indicated by the @authors tag. See the = * + * copyright.txt in the distribution for a full listing of = * + * individual contributors. = * + * = * + * This is free software; you can redistribute it and/or modify it = * + * under the terms of the GNU Lesser General Public License as = * + * published by the Free Software Foundation; either version 2.1 of = * + * the License, or (at your option) any later version. = * + * = * + * This software is distributed in the hope that it will be useful, = * + * but WITHOUT ANY WARRANTY; without even the implied warranty of = * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU = * + * Lesser General Public License for more details. = * + * = * + * You should have received a copy of the GNU Lesser General Public = * + * License along with this software; if not, write to the Free = * + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA = * + * 02110-1301 USA, or see the FSF site: http://www.fsf.org. = * + *************************************************************************= *****/ +package org.jboss.unit.remote.driver.handler.http.command; + +import org.jboss.portal.common.http.HttpHeaders; + +import java.net.URI; + +/** + * @author Julien Viet + * @version $Revision: 1.1 $ + */ +public class DoMethodCommand extends HTTPDriverCommand +{ + + /** . */ + private URI uri; + + /** . */ + private HttpHeaders headers; + + public DoMethodCommand(URI uri, HttpHeaders headers) + { + this.uri =3D uri; + this.headers =3D headers; + } + + public DoMethodCommand(URI uri) + { + this(uri, new HttpHeaders()); + } + + public URI getURI() + { + return uri; + } + + public HttpHeaders getHeaders() + { + return headers; + } +} Added: modules/test/trunk/remote/src/main/org/jboss/unit/remote/driver/hand= ler/http/command/DoPostCommand.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/remote/src/main/org/jboss/unit/remote/driver/handler= /http/command/DoPostCommand.java (rev 0) +++ modules/test/trunk/remote/src/main/org/jboss/unit/remote/driver/handler= /http/command/DoPostCommand.java 2007-10-08 16:09:32 UTC (rev 8564) @@ -0,0 +1,66 @@ +/*************************************************************************= ***** + * JBoss, a division of Red Hat = * + * Copyright 2006, Red Hat Middleware, LLC, and individual = * + * contributors as indicated by the @authors tag. See the = * + * copyright.txt in the distribution for a full listing of = * + * individual contributors. = * + * = * + * This is free software; you can redistribute it and/or modify it = * + * under the terms of the GNU Lesser General Public License as = * + * published by the Free Software Foundation; either version 2.1 of = * + * the License, or (at your option) any later version. = * + * = * + * This software is distributed in the hope that it will be useful, = * + * but WITHOUT ANY WARRANTY; without even the implied warranty of = * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU = * + * Lesser General Public License for more details. = * + * = * + * You should have received a copy of the GNU Lesser General Public = * + * License along with this software; if not, write to the Free = * + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA = * + * 02110-1301 USA, or see the FSF site: http://www.fsf.org. = * + *************************************************************************= *****/ +package org.jboss.unit.remote.driver.handler.http.command; + +import org.jboss.portal.common.http.HttpRequest; + +import java.net.URI; + +/** + * @author Julien Viet + * @version $Revision: 5448 $ + */ +public class DoPostCommand extends DoMethodCommand +{ + + /** . */ + private String contentType; + + /** . */ + private HttpRequest.Body body; + + public DoPostCommand(URI uri, String contentType, HttpRequest.Body body) + { + super(uri); + + // + if (body =3D=3D null) + { + throw new IllegalArgumentException(); + } + + // + this.contentType =3D contentType; + this.body =3D body; + } + + public String getContentType() + { + return contentType; + } + + public HttpRequest.Body getBody() + { + return body; + } +} Added: modules/test/trunk/remote/src/main/org/jboss/unit/remote/driver/hand= ler/http/command/HTTPDriverCommand.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/remote/src/main/org/jboss/unit/remote/driver/handler= /http/command/HTTPDriverCommand.java (rev 0) +++ modules/test/trunk/remote/src/main/org/jboss/unit/remote/driver/handler= /http/command/HTTPDriverCommand.java 2007-10-08 16:09:32 UTC (rev 8564) @@ -0,0 +1,33 @@ +/*************************************************************************= ***** + * JBoss, a division of Red Hat = * + * Copyright 2006, Red Hat Middleware, LLC, and individual = * + * contributors as indicated by the @authors tag. See the = * + * copyright.txt in the distribution for a full listing of = * + * individual contributors. = * + * = * + * This is free software; you can redistribute it and/or modify it = * + * under the terms of the GNU Lesser General Public License as = * + * published by the Free Software Foundation; either version 2.1 of = * + * the License, or (at your option) any later version. = * + * = * + * This software is distributed in the hope that it will be useful, = * + * but WITHOUT ANY WARRANTY; without even the implied warranty of = * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU = * + * Lesser General Public License for more details. = * + * = * + * You should have received a copy of the GNU Lesser General Public = * + * License along with this software; if not, write to the Free = * + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA = * + * 02110-1301 USA, or see the FSF site: http://www.fsf.org. = * + *************************************************************************= *****/ +package org.jboss.unit.remote.driver.handler.http.command; + +import org.jboss.unit.driver.DriverCommand; + +/** + * @author Julien Viet + * @version $Revision: 1.1 $ + */ +public class HTTPDriverCommand extends DriverCommand +{ +} Added: modules/test/trunk/remote/src/main/org/jboss/unit/remote/driver/hand= ler/http/response/HTTPDriverResponse.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/remote/src/main/org/jboss/unit/remote/driver/handler= /http/response/HTTPDriverResponse.java (rev 0) +++ modules/test/trunk/remote/src/main/org/jboss/unit/remote/driver/handler= /http/response/HTTPDriverResponse.java 2007-10-08 16:09:32 UTC (rev 8564) @@ -0,0 +1,33 @@ +/*************************************************************************= ***** + * JBoss, a division of Red Hat = * + * Copyright 2006, Red Hat Middleware, LLC, and individual = * + * contributors as indicated by the @authors tag. See the = * + * copyright.txt in the distribution for a full listing of = * + * individual contributors. = * + * = * + * This is free software; you can redistribute it and/or modify it = * + * under the terms of the GNU Lesser General Public License as = * + * published by the Free Software Foundation; either version 2.1 of = * + * the License, or (at your option) any later version. = * + * = * + * This software is distributed in the hope that it will be useful, = * + * but WITHOUT ANY WARRANTY; without even the implied warranty of = * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU = * + * Lesser General Public License for more details. = * + * = * + * You should have received a copy of the GNU Lesser General Public = * + * License along with this software; if not, write to the Free = * + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA = * + * 02110-1301 USA, or see the FSF site: http://www.fsf.org. = * + *************************************************************************= *****/ +package org.jboss.unit.remote.driver.handler.http.response; + +import org.jboss.unit.driver.DriverResponse; + +/** + * @author Julien Viet + * @version $Revision: 1.1 $ + */ +public abstract class HTTPDriverResponse extends DriverResponse +{ +} Added: modules/test/trunk/remote/src/main/org/jboss/unit/remote/driver/hand= ler/http/response/InvokeGetResponse.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/remote/src/main/org/jboss/unit/remote/driver/handler= /http/response/InvokeGetResponse.java (rev 0) +++ modules/test/trunk/remote/src/main/org/jboss/unit/remote/driver/handler= /http/response/InvokeGetResponse.java 2007-10-08 16:09:32 UTC (rev 8564) @@ -0,0 +1,49 @@ +/*************************************************************************= ***** + * JBoss, a division of Red Hat = * + * Copyright 2006, Red Hat Middleware, LLC, and individual = * + * contributors as indicated by the @authors tag. See the = * + * copyright.txt in the distribution for a full listing of = * + * individual contributors. = * + * = * + * This is free software; you can redistribute it and/or modify it = * + * under the terms of the GNU Lesser General Public License as = * + * published by the Free Software Foundation; either version 2.1 of = * + * the License, or (at your option) any later version. = * + * = * + * This software is distributed in the hope that it will be useful, = * + * but WITHOUT ANY WARRANTY; without even the implied warranty of = * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU = * + * Lesser General Public License for more details. = * + * = * + * You should have received a copy of the GNU Lesser General Public = * + * License along with this software; if not, write to the Free = * + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA = * + * 02110-1301 USA, or see the FSF site: http://www.fsf.org. = * + *************************************************************************= *****/ +package org.jboss.unit.remote.driver.handler.http.response; + +import java.net.URI; + +/** + * @author Julien Viet + * @author Boleslaw Daw= idowicz + * @version $Revision: 5448 $ + */ +public class InvokeGetResponse extends InvokeMethodResponse +{ + + public InvokeGetResponse(String url) + { + super(url); + } + + public InvokeGetResponse(URI uri) + { + super(uri); + } + + public String toString() + { + return "InvokeGet[uri=3D" + getURI() + "]"; + } +} Added: modules/test/trunk/remote/src/main/org/jboss/unit/remote/driver/hand= ler/http/response/InvokeMethodResponse.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/remote/src/main/org/jboss/unit/remote/driver/handler= /http/response/InvokeMethodResponse.java (rev 0) +++ modules/test/trunk/remote/src/main/org/jboss/unit/remote/driver/handler= /http/response/InvokeMethodResponse.java 2007-10-08 16:09:32 UTC (rev 8564) @@ -0,0 +1,103 @@ +/*************************************************************************= ***** + * JBoss, a division of Red Hat = * + * Copyright 2006, Red Hat Middleware, LLC, and individual = * + * contributors as indicated by the @authors tag. See the = * + * copyright.txt in the distribution for a full listing of = * + * individual contributors. = * + * = * + * This is free software; you can redistribute it and/or modify it = * + * under the terms of the GNU Lesser General Public License as = * + * published by the Free Software Foundation; either version 2.1 of = * + * the License, or (at your option) any later version. = * + * = * + * This software is distributed in the hope that it will be useful, = * + * but WITHOUT ANY WARRANTY; without even the implied warranty of = * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU = * + * Lesser General Public License for more details. = * + * = * + * You should have received a copy of the GNU Lesser General Public = * + * License along with this software; if not, write to the Free = * + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA = * + * 02110-1301 USA, or see the FSF site: http://www.fsf.org. = * + *************************************************************************= *****/ +package org.jboss.unit.remote.driver.handler.http.response; + +import org.jboss.portal.common.http.HttpHeaders; +import org.jboss.portal.common.http.HttpHeader; + +import java.net.URI; +import java.net.URISyntaxException; + +/** + * @author Julien Viet + * @version $Revision: 1.1 $ + */ +public abstract class InvokeMethodResponse extends HTTPDriverResponse +{ + + /** . */ + private URI uri; + + /** . */ + private HttpHeaders headers; + + public InvokeMethodResponse(String uri) throws IllegalArgumentException + { + if (uri =3D=3D null) + { + throw new IllegalArgumentException("Cannot invoke against a null = URL"); + } + + // + URI tmp; + try + { + tmp =3D new URI(uri); + } + catch (URISyntaxException e) + { + IllegalArgumentException iae =3D new IllegalArgumentException("Wr= ong URI syntax"); + iae.initCause(e); + throw iae; + } + + // + if (tmp.isOpaque()) + { + throw new IllegalArgumentException("No opaque URI accepted"); + } + + // + this.uri =3D tmp; + this.headers =3D new HttpHeaders(); + } + + public InvokeMethodResponse(URI uri) throws IllegalArgumentException + { + if (uri =3D=3D null) + { + throw new IllegalArgumentException("Cannot invoke against a null = URL"); + } + this.uri =3D uri; + this.headers =3D new HttpHeaders(); + } + + public URI getURI() + { + return uri; + } + + public HttpHeader addHeader(String headerName) + { + if (headerName =3D=3D null) + { + throw new IllegalArgumentException("No null header name accepted"= ); + } + return headers.addHeader(headerName); + } + + public HttpHeaders getHeaders() + { + return headers; + } +} Added: modules/test/trunk/remote/src/main/org/jboss/unit/remote/driver/hand= ler/http/response/InvokePostResponse.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/remote/src/main/org/jboss/unit/remote/driver/handler= /http/response/InvokePostResponse.java (rev 0) +++ modules/test/trunk/remote/src/main/org/jboss/unit/remote/driver/handler= /http/response/InvokePostResponse.java 2007-10-08 16:09:32 UTC (rev 8564) @@ -0,0 +1,84 @@ +/*************************************************************************= ***** + * JBoss, a division of Red Hat = * + * Copyright 2006, Red Hat Middleware, LLC, and individual = * + * contributors as indicated by the @authors tag. See the = * + * copyright.txt in the distribution for a full listing of = * + * individual contributors. = * + * = * + * This is free software; you can redistribute it and/or modify it = * + * under the terms of the GNU Lesser General Public License as = * + * published by the Free Software Foundation; either version 2.1 of = * + * the License, or (at your option) any later version. = * + * = * + * This software is distributed in the hope that it will be useful, = * + * but WITHOUT ANY WARRANTY; without even the implied warranty of = * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU = * + * Lesser General Public License for more details. = * + * = * + * You should have received a copy of the GNU Lesser General Public = * + * License along with this software; if not, write to the Free = * + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA = * + * 02110-1301 USA, or see the FSF site: http://www.fsf.org. = * + *************************************************************************= *****/ +package org.jboss.unit.remote.driver.handler.http.response; + +import org.jboss.portal.common.http.HttpRequest; + +import java.net.URI; + +/** + * The portlet wants to invoke a post. + * + * @author Julien Viet + * @version $Revision: 5448 $ + */ +public class InvokePostResponse extends InvokeMethodResponse +{ + + /** . */ + public static final String APPLICATION_X_WWW_FORM_URLENCODED =3D "appli= cation/x-www-form-urlencoded"; + + /** . */ + public static final String MULTIPART_FORM_DATA =3D "multipart/form-data= "; + + /** The content type. */ + private String contentType; + + /** The post body. */ + private HttpRequest.Body body; + + public InvokePostResponse(String uri) + { + super(uri); + } + + public InvokePostResponse(URI uri) + { + super(uri); + } + + public HttpRequest.Body getBody() + { + return body; + } + + public void setBody(HttpRequest.Body body) + { + this.body =3D body; + } + + public String getContentType() + { + return contentType; + } + + public void setContentType(String contentType) + { + this.contentType =3D contentType; + } + + public String toString() + { + return "InvokePost[uri=3D" + getURI() + "]"; + } +} Added: modules/test/trunk/remote/src/main/org/jboss/unit/remote/server/Node= .java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/remote/src/main/org/jboss/unit/remote/server/Node.ja= va (rev 0) +++ modules/test/trunk/remote/src/main/org/jboss/unit/remote/server/Node.ja= va 2007-10-08 16:09:32 UTC (rev 8564) @@ -0,0 +1,74 @@ +/*************************************************************************= ***** + * JBoss, a division of Red Hat = * + * Copyright 2006, Red Hat Middleware, LLC, and individual = * + * contributors as indicated by the @authors tag. See the = * + * copyright.txt in the distribution for a full listing of = * + * individual contributors. = * + * = * + * This is free software; you can redistribute it and/or modify it = * + * under the terms of the GNU Lesser General Public License as = * + * published by the Free Software Foundation; either version 2.1 of = * + * the License, or (at your option) any later version. = * + * = * + * This software is distributed in the hope that it will be useful, = * + * but WITHOUT ANY WARRANTY; without even the implied warranty of = * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU = * + * Lesser General Public License for more details. = * + * = * + * You should have received a copy of the GNU Lesser General Public = * + * License along with this software; if not, write to the Free = * + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA = * + * 02110-1301 USA, or see the FSF site: http://www.fsf.org. = * + *************************************************************************= *****/ +package org.jboss.unit.remote.server; + +import java.util.Map; + +/** + * @author Julien Viet + * @version $Revision: 6136 $ + */ +public class Node +{ + + /** . */ + protected final NodeId id; + + /** . */ + protected final Map serviceLookups; + + public Node(String id, Map serviceLookups) + { + this.id =3D new NodeId(id); + this.serviceLookups =3D serviceLookups; + } + + /** + * Returns the node id. + * + * @return the node id + */ + public NodeId getId() + { + return id; + } + + public Object lookupService(String serviceId) throws ServiceLookupFaile= dException + { + ServiceLookup lookup =3D (ServiceLookup)serviceLookups.get(serviceId= ); + + // + if (lookup =3D=3D null) + { + throw new ServiceLookupFailedException("No service lookup bound u= nder the service id " + serviceId); + } + + // + return lookup.lookupService(); + } + + public String toString() + { + return "Node[" + id + "]"; + } +} Added: modules/test/trunk/remote/src/main/org/jboss/unit/remote/server/Node= Id.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/remote/src/main/org/jboss/unit/remote/server/NodeId.= java (rev 0) +++ modules/test/trunk/remote/src/main/org/jboss/unit/remote/server/NodeId.= java 2007-10-08 16:09:32 UTC (rev 8564) @@ -0,0 +1,120 @@ +/*************************************************************************= ***** + * JBoss, a division of Red Hat = * + * Copyright 2006, Red Hat Middleware, LLC, and individual = * + * contributors as indicated by the @authors tag. See the = * + * copyright.txt in the distribution for a full listing of = * + * individual contributors. = * + * = * + * This is free software; you can redistribute it and/or modify it = * + * under the terms of the GNU Lesser General Public License as = * + * published by the Free Software Foundation; either version 2.1 of = * + * the License, or (at your option) any later version. = * + * = * + * This software is distributed in the hope that it will be useful, = * + * but WITHOUT ANY WARRANTY; without even the implied warranty of = * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU = * + * Lesser General Public License for more details. = * + * = * + * You should have received a copy of the GNU Lesser General Public = * + * License along with this software; if not, write to the Free = * + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA = * + * 02110-1301 USA, or see the FSF site: http://www.fsf.org. = * + *************************************************************************= *****/ +package org.jboss.unit.remote.server; + +import java.io.Serializable; + +/** + * @author Julien Viet + * @version $Revision: 6136 $ + */ +public class NodeId implements Serializable +{ + + /** . */ + public static final NodeId DEFAULT =3D new NodeId("default"); + + /** . */ + public static final NodeId PORTS_01 =3D new NodeId("ports-01"); + + /** . */ + public static final NodeId PORTS_02 =3D new NodeId("ports-02"); + + /** . */ + private final String value; + + public NodeId(String value) + { + if (value =3D=3D null) + { + throw new IllegalArgumentException("No null value accepted"); + } + this.value =3D value; + } + + public String toString() + { + return value; + } + + public boolean equals(Object o) + { + if (this =3D=3D o) + { + return true; + } + if (o instanceof NodeId) + { + NodeId that =3D (NodeId)o; + return value.equals(that.value); + } + return false; + } + + public int hashCode() + { + return value.hashCode(); + } + + /** + * Return the current node id. + * + * @return the current node id + * @throws IllegalStateException if not in a node context + */ + public static NodeId locate() throws IllegalStateException + { + // Legacy jboss server name + String nodeName =3D System.getProperty("jboss.server.name"); + + // Otherwise use a system property specified in the command line + if (nodeName !=3D null) + { + nodeName =3D System.getProperty("test.node.name"); + } + + // If nothing is specified we assume it is the default one + if (nodeName =3D=3D null) + { + nodeName =3D "default"; + } + + // + if ("default".equals(nodeName)) + { + return NodeId.DEFAULT; + } + else if ("ports-01".equals(nodeName)) + { + return NodeId.PORTS_01; + } + else if ("ports-02".equals(nodeName)) + { + return NodeId.PORTS_02; + } + else + { + throw new IllegalStateException("Cannot determine node id " + nod= eName); + } + } +} Added: modules/test/trunk/remote/src/main/org/jboss/unit/remote/server/Node= Manager.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/remote/src/main/org/jboss/unit/remote/server/NodeMan= ager.java (rev 0) +++ modules/test/trunk/remote/src/main/org/jboss/unit/remote/server/NodeMan= ager.java 2007-10-08 16:09:32 UTC (rev 8564) @@ -0,0 +1,81 @@ +/*************************************************************************= ***** + * JBoss, a division of Red Hat = * + * Copyright 2006, Red Hat Middleware, LLC, and individual = * + * contributors as indicated by the @authors tag. See the = * + * copyright.txt in the distribution for a full listing of = * + * individual contributors. = * + * = * + * This is free software; you can redistribute it and/or modify it = * + * under the terms of the GNU Lesser General Public License as = * + * published by the Free Software Foundation; either version 2.1 of = * + * the License, or (at your option) any later version. = * + * = * + * This software is distributed in the hope that it will be useful, = * + * but WITHOUT ANY WARRANTY; without even the implied warranty of = * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU = * + * Lesser General Public License for more details. = * + * = * + * You should have received a copy of the GNU Lesser General Public = * + * License along with this software; if not, write to the Free = * + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA = * + * 02110-1301 USA, or see the FSF site: http://www.fsf.org. = * + *************************************************************************= *****/ +package org.jboss.unit.remote.server; + +import java.util.Map; +import java.util.List; +import java.util.HashMap; +import java.util.Collection; + +/** + * @author Julien Viet + * @version $Revision: 6136 $ + */ +public class NodeManager +{ + + /** The nodes. */ + private final Map nodeMap; + + public NodeManager(List nodes) + { + this.nodeMap =3D new HashMap(); + for (Node node : nodes) + { + nodeMap.put(node.getId(), node); + } + } + + public Collection getNodes() + { + return nodeMap.values(); + } + + public Node[] getNodes(NodeId[] nodeIds) + { + if (nodeIds =3D=3D null) + { + throw new IllegalArgumentException("No null node ids accepted"); + } + Node[] nodes =3D new Node[nodeIds.length]; + for (int i =3D 0;i < nodeIds.length;i++) + { + NodeId nodeId =3D nodeIds[i]; + if (nodeId =3D=3D null) + { + throw new IllegalArgumentException("No null node id accepted"); + } + nodes[i] =3D getNode(nodeId); + } + return nodes; + } + + public Node getNode(NodeId nodeId) + { + if (nodeId =3D=3D null) + { + throw new IllegalArgumentException("No null node id accepted"); + } + return nodeMap.get(nodeId); + } +} Added: modules/test/trunk/remote/src/main/org/jboss/unit/remote/server/Serv= iceLookup.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/remote/src/main/org/jboss/unit/remote/server/Service= Lookup.java (rev 0) +++ modules/test/trunk/remote/src/main/org/jboss/unit/remote/server/Service= Lookup.java 2007-10-08 16:09:32 UTC (rev 8564) @@ -0,0 +1,40 @@ +/*************************************************************************= ***** + * JBoss, a division of Red Hat = * + * Copyright 2006, Red Hat Middleware, LLC, and individual = * + * contributors as indicated by the @authors tag. See the = * + * copyright.txt in the distribution for a full listing of = * + * individual contributors. = * + * = * + * This is free software; you can redistribute it and/or modify it = * + * under the terms of the GNU Lesser General Public License as = * + * published by the Free Software Foundation; either version 2.1 of = * + * the License, or (at your option) any later version. = * + * = * + * This software is distributed in the hope that it will be useful, = * + * but WITHOUT ANY WARRANTY; without even the implied warranty of = * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU = * + * Lesser General Public License for more details. = * + * = * + * You should have received a copy of the GNU Lesser General Public = * + * License along with this software; if not, write to the Free = * + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA = * + * 02110-1301 USA, or see the FSF site: http://www.fsf.org. = * + *************************************************************************= *****/ +package org.jboss.unit.remote.server; + +/** + * @author Julien Viet + * @version $Revision: 1.1 $ + */ +public interface ServiceLookup +{ + + /** + * Returns a proxy for the underlying service. + * + * @return the service proxy + * @throws ServiceLookupFailedException + */ + Object lookupService() throws ServiceLookupFailedException; + +} Added: modules/test/trunk/remote/src/main/org/jboss/unit/remote/server/Serv= iceLookupFailedException.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/remote/src/main/org/jboss/unit/remote/server/Service= LookupFailedException.java (rev 0) +++ modules/test/trunk/remote/src/main/org/jboss/unit/remote/server/Service= LookupFailedException.java 2007-10-08 16:09:32 UTC (rev 8564) @@ -0,0 +1,49 @@ +/*************************************************************************= ***** + * JBoss, a division of Red Hat = * + * Copyright 2006, Red Hat Middleware, LLC, and individual = * + * contributors as indicated by the @authors tag. See the = * + * copyright.txt in the distribution for a full listing of = * + * individual contributors. = * + * = * + * This is free software; you can redistribute it and/or modify it = * + * under the terms of the GNU Lesser General Public License as = * + * published by the Free Software Foundation; either version 2.1 of = * + * the License, or (at your option) any later version. = * + * = * + * This software is distributed in the hope that it will be useful, = * + * but WITHOUT ANY WARRANTY; without even the implied warranty of = * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU = * + * Lesser General Public License for more details. = * + * = * + * You should have received a copy of the GNU Lesser General Public = * + * License along with this software; if not, write to the Free = * + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA = * + * 02110-1301 USA, or see the FSF site: http://www.fsf.org. = * + *************************************************************************= *****/ +package org.jboss.unit.remote.server; + +/** + * @author Julien Viet + * @version $Revision: 1.1 $ + */ +public class ServiceLookupFailedException extends RuntimeException +{ + public ServiceLookupFailedException() + { + } + + public ServiceLookupFailedException(String message) + { + super(message); + } + + public ServiceLookupFailedException(String message, Throwable cause) + { + super(message, cause); + } + + public ServiceLookupFailedException(Throwable cause) + { + super(cause); + } +} --===============3944308464118237694==-- From portal-commits at lists.jboss.org Mon Oct 8 12:10:42 2007 Content-Type: multipart/mixed; boundary="===============6240975282811962516==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8565 - in modules/test/trunk/build/ide/intellij/idea60/modules: mc and 2 other directories. Date: Mon, 08 Oct 2007 12:10:42 -0400 Message-ID: --===============6240975282811962516== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: julien(a)jboss.com Date: 2007-10-08 12:10:42 -0400 (Mon, 08 Oct 2007) New Revision: 8565 Added: modules/test/trunk/build/ide/intellij/idea60/modules/mc/ modules/test/trunk/build/ide/intellij/idea60/modules/mc/mc.iml modules/test/trunk/build/ide/intellij/idea60/modules/remote/ modules/test/trunk/build/ide/intellij/idea60/modules/remote/remote.iml modules/test/trunk/build/ide/intellij/idea60/modules/tooling/ modules/test/trunk/build/ide/intellij/idea60/modules/tooling/tooling.iml Log: missing intellij modules Added: modules/test/trunk/build/ide/intellij/idea60/modules/mc/mc.iml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/build/ide/intellij/idea60/modules/mc/mc.iml = (rev 0) +++ modules/test/trunk/build/ide/intellij/idea60/modules/mc/mc.iml 2007-10-= 08 16:10:42 UTC (rev 8565) @@ -0,0 +1,177 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Added: modules/test/trunk/build/ide/intellij/idea60/modules/remote/remote.i= ml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/build/ide/intellij/idea60/modules/remote/remote.iml = (rev 0) +++ modules/test/trunk/build/ide/intellij/idea60/modules/remote/remote.iml = 2007-10-08 16:10:42 UTC (rev 8565) @@ -0,0 +1,43 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Added: modules/test/trunk/build/ide/intellij/idea60/modules/tooling/tooling= .iml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/build/ide/intellij/idea60/modules/tooling/tooling.im= l (rev 0) +++ modules/test/trunk/build/ide/intellij/idea60/modules/tooling/tooling.im= l 2007-10-08 16:10:42 UTC (rev 8565) @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + --===============6240975282811962516==-- From portal-commits at lists.jboss.org Mon Oct 8 12:12:52 2007 Content-Type: multipart/mixed; boundary="===============6427090552697181871==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8566 - in modules/test/trunk/test/src/main/org/jboss: portal/test/framework/impl and 1 other directory. Date: Mon, 08 Oct 2007 12:12:52 -0400 Message-ID: --===============6427090552697181871== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: julien(a)jboss.com Date: 2007-10-08 12:12:51 -0400 (Mon, 08 Oct 2007) New Revision: 8566 Removed: modules/test/trunk/test/src/main/org/jboss/portal/test/framework/impl/jb= oss/ modules/test/trunk/test/src/main/org/jboss/test/ Log: remove empty dirs --===============6427090552697181871==-- From portal-commits at lists.jboss.org Mon Oct 8 12:16:10 2007 Content-Type: multipart/mixed; boundary="===============8601850352841112640==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8567 - modules/test/trunk/build. Date: Mon, 08 Oct 2007 12:16:09 -0400 Message-ID: --===============8601850352841112640== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: julien(a)jboss.com Date: 2007-10-08 12:16:09 -0400 (Mon, 08 Oct 2007) New Revision: 8567 Modified: modules/test/trunk/build/build.xml Log: update build.xml to build all modules of test module Modified: modules/test/trunk/build/build.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/build/build.xml 2007-10-08 16:12:51 UTC (rev 8566) +++ modules/test/trunk/build/build.xml 2007-10-08 16:16:09 UTC (rev 8567) @@ -112,12 +112,15 @@ = + + + = = + modules=3D"test,unit,mc,remote"/> = --===============8601850352841112640==-- From portal-commits at lists.jboss.org Mon Oct 8 16:49:44 2007 Content-Type: multipart/mixed; boundary="===============7975685164307562694==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8568 - in modules/test/trunk: remote/src/main/org/jboss/unit/remote/driver and 10 other directories. Date: Mon, 08 Oct 2007 16:49:44 -0400 Message-ID: --===============7975685164307562694== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: julien(a)jboss.com Date: 2007-10-08 16:49:44 -0400 (Mon, 08 Oct 2007) New Revision: 8568 Added: modules/test/trunk/unit/src/main/org/jboss/unit/runner/ParametrizationSe= t.java modules/test/trunk/unit/src/resources/jboss-unit-jar/org/jboss/unit/runn= er/model/jboss-unit_1_0.xsd Removed: modules/test/trunk/unit/src/main/org/jboss/unit/runner/Parametrization.j= ava modules/test/trunk/unit/src/resources/jboss-unit-jar/org/jboss/unit/runn= er/model/jboss-unit.dtd Modified: modules/test/trunk/remote/build.xml modules/test/trunk/remote/src/main/org/jboss/unit/remote/driver/RemoteTe= stDriverClient.java modules/test/trunk/remote/src/main/org/jboss/unit/remote/driver/TestConv= ersation.java modules/test/trunk/remote/src/main/org/jboss/unit/remote/driver/handler/= deployer/DeployerHandler.java modules/test/trunk/remote/src/main/org/jboss/unit/remote/driver/handler/= http/HTTPConversation.java modules/test/trunk/tooling/src/resources/test/bobo-tests.xml modules/test/trunk/unit/src/main/org/jboss/test/unit/runner/Parametrizat= ionTests.java modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/pojo/POJOTes= tRunner.java modules/test/trunk/unit/src/main/org/jboss/unit/runner/model/Constants.j= ava modules/test/trunk/unit/src/main/org/jboss/unit/runner/model/ModelBuilde= r.java modules/test/trunk/unit/src/main/org/jboss/unit/runner/model/ParametersD= ef.java modules/test/trunk/unit/src/resources/test/org/jboss/test/unit/blah/f1.x= ml modules/test/trunk/unit/src/resources/test/org/jboss/test/unit/runner/mo= del/f1.xml Log: replaced jboss-unit dtd by an xsd Modified: modules/test/trunk/remote/build.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/remote/build.xml 2007-10-08 16:16:09 UTC (rev 8567) +++ modules/test/trunk/remote/build.xml 2007-10-08 20:49:44 UTC (rev 8568) @@ -146,21 +146,13 @@ = = - - = Modified: modules/test/trunk/remote/src/main/org/jboss/unit/remote/driver/R= emoteTestDriverClient.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/remote/src/main/org/jboss/unit/remote/driver/RemoteT= estDriverClient.java 2007-10-08 16:16:09 UTC (rev 8567) +++ modules/test/trunk/remote/src/main/org/jboss/unit/remote/driver/RemoteT= estDriverClient.java 2007-10-08 20:49:44 UTC (rev 8568) @@ -22,14 +22,14 @@ *************************************************************************= *****/ package org.jboss.unit.remote.driver; = -import org.jboss.unit.remote.server.NodeId; -import org.jboss.unit.remote.server.NodeManager; -import org.jboss.unit.remote.server.Node; import org.jboss.unit.driver.TestDriver; import org.jboss.unit.driver.DriverCommand; import org.jboss.unit.driver.DriverResponse; import org.jboss.unit.info.TestInfo; import org.jboss.unit.TestId; +import org.jboss.portal.test.framework.server.NodeId; +import org.jboss.portal.test.framework.server.Node; +import org.jboss.portal.test.framework.server.NodeManager; = /** * @author Julien Viet @@ -43,9 +43,6 @@ /** . */ private NodeId initialNodeId; = - /** . */ - private String archivePath; - // Services = /** . */ @@ -54,9 +51,6 @@ /** . */ private ProtocolHandler protocolHandler; = - /** . */ -// private Deployer deployer; - public NodeId getInitialNodeId() { return initialNodeId; @@ -67,16 +61,6 @@ this.initialNodeId =3D initialNodeId; } = - public String getArchivePath() - { - return archivePath; - } - - public void setArchivePath(String archivePath) - { - this.archivePath =3D archivePath; - } - public NodeManager getNodeManager() { return nodeManager; @@ -97,16 +81,6 @@ this.protocolHandler =3D protocolHandler; } = -// public Deployer getDeployer() -// { -// return deployer; -// } -// -// public void setDeployer(Deployer deployer) -// { -// this.deployer =3D deployer; -// } - public RemoteTestDriver getServer(Node node) { return (RemoteTestDriver)node.lookupService(RemoteTestDriver.SERVICE= _ID); @@ -119,7 +93,7 @@ return server.getInfo(); } = - public DriverResponse invoke(TestId testId, DriverCommand command) // t= hrows TestDriverException + public DriverResponse invoke(TestId testId, DriverCommand command) { try { @@ -133,7 +107,6 @@ } catch (Exception e) { -// throw new TestDriverException(e); throw new Error(e); } } Modified: modules/test/trunk/remote/src/main/org/jboss/unit/remote/driver/T= estConversation.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/remote/src/main/org/jboss/unit/remote/driver/TestCon= versation.java 2007-10-08 16:16:09 UTC (rev 8567) +++ modules/test/trunk/remote/src/main/org/jboss/unit/remote/driver/TestCon= versation.java 2007-10-08 20:49:44 UTC (rev 8568) @@ -25,10 +25,10 @@ import org.jboss.unit.driver.DriverResponse; import org.jboss.unit.driver.DriverCommand; import org.jboss.unit.driver.response.EndTestResponse; -import org.jboss.unit.remote.server.Node; import org.jboss.unit.remote.RequestContext; import org.jboss.unit.remote.ResponseContext; import org.jboss.unit.TestId; +import org.jboss.portal.test.framework.server.Node; = import java.util.Map; import java.util.HashMap; Modified: modules/test/trunk/remote/src/main/org/jboss/unit/remote/driver/h= andler/deployer/DeployerHandler.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/remote/src/main/org/jboss/unit/remote/driver/handler= /deployer/DeployerHandler.java 2007-10-08 16:16:09 UTC (rev 8567) +++ modules/test/trunk/remote/src/main/org/jboss/unit/remote/driver/handler= /deployer/DeployerHandler.java 2007-10-08 20:49:44 UTC (rev 8568) @@ -30,6 +30,7 @@ import org.jboss.unit.remote.driver.handler.deployer.response.DeployRespon= se; import org.jboss.unit.driver.DriverResponse; import org.jboss.portal.test.framework.deployment.Deployer; +import org.jboss.portal.test.framework.server.Node; = /** * @author Julien Viet @@ -85,8 +86,17 @@ { DeployResponse deploy =3D (DeployResponse)response; = + Node node =3D testConversation.getNode(); + // -// deployer.deploy(archivePath, deploy.getId(), node); + try + { + deployer.deploy(archivePath, deploy.getId(), node); + } + catch (Exception e) + { + throw new Error(e); + } = // return new RemoteDriverCommandContext(responseContext.getCommandC= ontext()); @@ -96,8 +106,14 @@ UndeployResponse undeploy =3D (UndeployResponse)response; = // -// Deployer deployer =3D driver.getDeployer(); -// deployer.undeploy(driver.getArchivePath(), undeploy.getId()); + try + { + deployer.undeploy(archivePath, undeploy.getId()); + } + catch (Exception e) + { + throw new Error(e); + } = // return new RemoteDriverCommandContext(responseContext.getCommandC= ontext()); Modified: modules/test/trunk/remote/src/main/org/jboss/unit/remote/driver/h= andler/http/HTTPConversation.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/remote/src/main/org/jboss/unit/remote/driver/handler= /http/HTTPConversation.java 2007-10-08 16:16:09 UTC (rev 8567) +++ modules/test/trunk/remote/src/main/org/jboss/unit/remote/driver/handler= /http/HTTPConversation.java 2007-10-08 20:49:44 UTC (rev 8568) @@ -38,13 +38,13 @@ import org.jboss.portal.common.http.HttpRequest; import org.jboss.portal.common.http.HttpHeaders; import org.jboss.portal.common.http.HttpHeader; +import org.jboss.portal.test.framework.server.Node; import org.jboss.unit.remote.driver.handler.http.command.DoMethodCommand; import org.jboss.unit.remote.driver.handler.http.command.DoPostCommand; import org.jboss.unit.remote.driver.handler.http.command.DoGetCommand; import org.jboss.unit.remote.driver.TestConversation; import org.jboss.unit.remote.driver.RemoteDriverCommandContext; import org.jboss.unit.remote.driver.RemoteDriverResponseContext; -import org.jboss.unit.remote.server.Node; import org.jboss.unit.remote.ResponseContext; import org.jboss.unit.driver.DriverCommand; import org.jboss.unit.driver.DriverResponse; Modified: modules/test/trunk/tooling/src/resources/test/bobo-tests.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/tooling/src/resources/test/bobo-tests.xml 2007-10-08= 16:16:09 UTC (rev 8567) +++ modules/test/trunk/tooling/src/resources/test/bobo-tests.xml 2007-10-08= 20:49:44 UTC (rev 8568) @@ -1,8 +1,8 @@ - - + Modified: modules/test/trunk/unit/src/main/org/jboss/test/unit/runner/Param= etrizationTests.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/test/unit/runner/Parametriza= tionTests.java 2007-10-08 16:16:09 UTC (rev 8567) +++ modules/test/trunk/unit/src/main/org/jboss/test/unit/runner/Parametriza= tionTests.java 2007-10-08 20:49:44 UTC (rev 8568) @@ -23,7 +23,7 @@ package org.jboss.test.unit.runner; = import static org.jboss.unit.api.Assert.assertEquals; -import org.jboss.unit.runner.Parametrization; +import org.jboss.unit.runner.ParametrizationSet; import org.jboss.unit.util.CollectionTools; = import java.util.HashMap; @@ -50,7 +50,7 @@ private static void test1() { Map map =3D new HashMap(); - Parametrization def =3D new Parametrization(map); + ParametrizationSet def =3D new ParametrizationSet(map); = // Set contraints =3D CollectionTools.set(); @@ -63,7 +63,7 @@ { Map map =3D new HashMap(); map.put("a", new String[]{"b"}); - Parametrization def =3D new Parametrization(map); + ParametrizationSet def =3D new ParametrizationSet(map); = // Set contraints1=3D CollectionTools.set(); @@ -90,7 +90,7 @@ { Map map =3D new HashMap(); map.put("a", new String[]{"b","c"}); - Parametrization def =3D new Parametrization(map); + ParametrizationSet def =3D new ParametrizationSet(map); = // Set contraints1=3D CollectionTools.set(); @@ -121,7 +121,7 @@ Map map =3D new HashMap(); map.put("a", new String[]{"b","c"}); map.put("d", new String[]{"e"}); - Parametrization def =3D new Parametrization(map); + ParametrizationSet def =3D new ParametrizationSet(map); = // Set contraints1=3D CollectionTools.set(); @@ -167,7 +167,7 @@ Map map =3D new HashMap(); map.put("a", new String[]{"b","c"}); map.put("d", new String[]{"e","f"}); - Parametrization def =3D new Parametrization(map); + ParametrizationSet def =3D new ParametrizationSet(map); = // Set contraints1=3D CollectionTools.set(); Deleted: modules/test/trunk/unit/src/main/org/jboss/unit/runner/Parametriza= tion.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/runner/Parametrization.= java 2007-10-08 16:16:09 UTC (rev 8567) +++ modules/test/trunk/unit/src/main/org/jboss/unit/runner/Parametrization.= java 2007-10-08 20:49:44 UTC (rev 8568) @@ -1,115 +0,0 @@ -/*************************************************************************= ***** - * JBoss, a division of Red Hat = * - * Copyright 2006, Red Hat Middleware, LLC, and individual = * - * contributors as indicated by the @authors tag. See the = * - * copyright.txt in the distribution for a full listing of = * - * individual contributors. = * - * = * - * This is free software; you can redistribute it and/or modify it = * - * under the terms of the GNU Lesser General Public License as = * - * published by the Free Software Foundation; either version 2.1 of = * - * the License, or (at your option) any later version. = * - * = * - * This software is distributed in the hope that it will be useful, = * - * but WITHOUT ANY WARRANTY; without even the implied warranty of = * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU = * - * Lesser General Public License for more details. = * - * = * - * You should have received a copy of the GNU Lesser General Public = * - * License along with this software; if not, write to the Free = * - * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA = * - * 02110-1301 USA, or see the FSF site: http://www.fsf.org. = * - *************************************************************************= *****/ -package org.jboss.unit.runner; - -import java.util.Map; -import java.util.HashMap; -import java.util.List; -import java.util.Set; -import java.util.HashSet; -import java.util.ArrayList; - -/** - * @author Julien Viet - * @version $Revision: 1.1 $ - */ -public class Parametrization implements Cloneable -{ - - /** . */ - private Map map; - - public Parametrization(Map map) - { - this.map =3D map; - } - - public Parametrization() - { - this.map =3D new HashMap(); - } - - public void merge(Parametrization other) - { - for (Map.Entry entry : other.map.entrySet()) - { - if (!map.containsKey(entry.getKey())) - { - map.put(entry.getKey(), entry.getValue().clone()); - } - } - } - - public Parametrization clone() - { - try - { - return (Parametrization)super.clone(); - } - catch (CloneNotSupportedException e) - { - throw new Error(e); - } - } - - public List> enumerate(Set expectedParameter= s) - { - // Clone so we can modify it safely - expectedParameters =3D expectedParameters !=3D null ? new HashSet(expectedParameters) : null; - - // - List> enumeration =3D new ArrayList>(); - - // - enumeration.add(new HashMap()); - - // - for (Map.Entry entry : map.entrySet()) - { - String parameterName =3D entry.getKey(); - - // - if (expectedParameters =3D=3D null || expectedParameters.remove(p= arameterName)) - { - - List> tmp =3D new ArrayList>(); - - for (String occurrence : entry.getValue()) - { - for (Map blah : enumeration) - { - Map copy =3D new HashMap(b= lah); - copy.put(parameterName, occurrence); - tmp.add(copy); - } - } - - enumeration =3D tmp; - } - } - - // - return enumeration; - } - -} Copied: modules/test/trunk/unit/src/main/org/jboss/unit/runner/Parametrizat= ionSet.java (from rev 8565, modules/test/trunk/unit/src/main/org/jboss/unit= /runner/Parametrization.java) =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/runner/ParametrizationS= et.java (rev 0) +++ modules/test/trunk/unit/src/main/org/jboss/unit/runner/ParametrizationS= et.java 2007-10-08 20:49:44 UTC (rev 8568) @@ -0,0 +1,121 @@ +/*************************************************************************= ***** + * JBoss, a division of Red Hat = * + * Copyright 2006, Red Hat Middleware, LLC, and individual = * + * contributors as indicated by the @authors tag. See the = * + * copyright.txt in the distribution for a full listing of = * + * individual contributors. = * + * = * + * This is free software; you can redistribute it and/or modify it = * + * under the terms of the GNU Lesser General Public License as = * + * published by the Free Software Foundation; either version 2.1 of = * + * the License, or (at your option) any later version. = * + * = * + * This software is distributed in the hope that it will be useful, = * + * but WITHOUT ANY WARRANTY; without even the implied warranty of = * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU = * + * Lesser General Public License for more details. = * + * = * + * You should have received a copy of the GNU Lesser General Public = * + * License along with this software; if not, write to the Free = * + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA = * + * 02110-1301 USA, or see the FSF site: http://www.fsf.org. = * + *************************************************************************= *****/ +package org.jboss.unit.runner; + +import java.util.Map; +import java.util.HashMap; +import java.util.List; +import java.util.Set; +import java.util.HashSet; +import java.util.ArrayList; + +/** + * @author Julien Viet + * @version $Revision: 1.1 $ + */ +public class ParametrizationSet implements Cloneable +{ + + /** . */ + private Map map; + + public ParametrizationSet(Map map) + { + this.map =3D map; + } + + public ParametrizationSet() + { + this.map =3D new HashMap(); + } + + public void merge(ParametrizationSet other) + { + for (Map.Entry entry : other.map.entrySet()) + { + if (!map.containsKey(entry.getKey())) + { + map.put(entry.getKey(), entry.getValue().clone()); + } + } + } + + public ParametrizationSet clone() + { + try + { + return (ParametrizationSet)super.clone(); + } + catch (CloneNotSupportedException e) + { + throw new Error(e); + } + } + + /** + * Enumerate the list of parametrization generated by this set. + * + * @param expectedParameters a filter to retain a sub set of the parame= ters + * @return a list of parametrizations + */ + public List> enumerate(Set expectedParameter= s) + { + // Clone so we can modify it safely + expectedParameters =3D expectedParameters !=3D null ? new HashSet(expectedParameters) : null; + + // + List> enumeration =3D new ArrayList>(); + + // + enumeration.add(new HashMap()); + + // + for (Map.Entry entry : map.entrySet()) + { + String parameterName =3D entry.getKey(); + + // + if (expectedParameters =3D=3D null || expectedParameters.remove(p= arameterName)) + { + + List> tmp =3D new ArrayList>(); + + for (String occurrence : entry.getValue()) + { + for (Map blah : enumeration) + { + Map copy =3D new HashMap(b= lah); + copy.put(parameterName, occurrence); + tmp.add(copy); + } + } + + enumeration =3D tmp; + } + } + + // + return enumeration; + } + +} Modified: modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/pojo/= POJOTestRunner.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/pojo/POJOTe= stRunner.java 2007-10-08 16:16:09 UTC (rev 8567) +++ modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/pojo/POJOTe= stRunner.java 2007-10-08 20:49:44 UTC (rev 8568) @@ -24,7 +24,7 @@ = import org.jboss.unit.runner.AbstractTestRunner; import org.jboss.unit.runner.TestFilter; -import org.jboss.unit.runner.Parametrization; +import org.jboss.unit.runner.ParametrizationSet; import org.jboss.unit.runner.impl.driver.TestDriverRunner; import org.jboss.unit.runner.event.RunnerFailureEvent; import org.jboss.unit.runner.event.TestRunnerLifeCycleFilter; @@ -105,8 +105,8 @@ // Create parametrization = = - Parametrization parametrization =3D suite.getParameters(= ).getParametrization(); - parametrization.merge(test.getParameters().getParametriz= ation()); + ParametrizationSet parametrizations =3D suite.getParamet= ers().getParametrization(); + parametrizations.merge(test.getParameters().getParametri= zation()); // Map> generator =3D new HashMap= >(); = = @@ -117,7 +117,7 @@ = TestCaseInfo testCaseInfo =3D (TestCaseInfo)testSuite= Info.findTest(testCaseId); = - for (Map blah : parametrization.enumer= ate(testCaseInfo.getParameters().keySet())) + for (Map blah : parametrizations.enume= rate(testCaseInfo.getParameters().keySet())) { TestDriverRunner runner =3D new TestDriverRunner(d= river, blah, testCaseId); runner.addListener(lifeCycleFilter); Modified: modules/test/trunk/unit/src/main/org/jboss/unit/runner/model/Cons= tants.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/runner/model/Constants.= java 2007-10-08 16:16:09 UTC (rev 8567) +++ modules/test/trunk/unit/src/main/org/jboss/unit/runner/model/Constants.= java 2007-10-08 20:49:44 UTC (rev 8568) @@ -31,7 +31,8 @@ = public static final String JBOSS_UNIT_SYSTEM_ID =3D "http://www.jboss.o= rg/portal/dtd/jboss-unit.dtd"; = - public static final String RELATIVE_RESOURCE_NAME =3D "jboss-unit.dtd"; +// public static final String RELATIVE_RESOURCE_NAME =3D "jboss-unit.dtd= "; + public static final String RELATIVE_RESOURCE_NAME =3D "jboss-unit_1_0.x= sd"; = = } Modified: modules/test/trunk/unit/src/main/org/jboss/unit/runner/model/Mode= lBuilder.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/runner/model/ModelBuild= er.java 2007-10-08 16:16:09 UTC (rev 8567) +++ modules/test/trunk/unit/src/main/org/jboss/unit/runner/model/ModelBuild= er.java 2007-10-08 20:49:44 UTC (rev 8568) @@ -32,9 +32,6 @@ import org.jboss.unit.runner.model.pojo.POJOTestSuiteDef; import org.jboss.unit.runner.model.pojo.TestClassDef; import org.jboss.unit.runner.model.pojo.TestCaseDef; -import org.jboss.unit.runner.model.TestDef; -import org.jboss.unit.runner.model.ParametersDef; -import org.jboss.unit.runner.model.TestSuiteDef; import org.jboss.unit.runner.model.composite.CompositeTestSuiteDef; import org.xml.sax.InputSource; import org.xml.sax.SAXException; @@ -44,6 +41,10 @@ import javax.xml.parsers.DocumentBuilderFactory; import javax.xml.parsers.ParserConfigurationException; import javax.xml.parsers.DocumentBuilder; +import javax.xml.validation.Schema; +import javax.xml.validation.SchemaFactory; +import javax.xml.XMLConstants; +import javax.xml.transform.stream.StreamSource; import java.util.List; import java.util.ArrayList; import java.io.IOException; @@ -89,9 +90,21 @@ try { DocumentBuilderFactory factory =3D DocumentBuilderFactory.newInst= ance(); - factory.setValidating(true); + + factory.setNamespaceAware(true); + + SchemaFactory schemaFactory =3D SchemaFactory.newInstance(XMLCons= tants.W3C_XML_SCHEMA_NS_URI); + InputStream in =3D ModelBuilder.class.getResourceAsStream(Constan= ts.RELATIVE_RESOURCE_NAME); + StreamSource ss =3D new StreamSource(in); + Schema schema =3D schemaFactory.newSchema(ss); + + + = + factory.setSchema(schema); + + DocumentBuilder builder =3D factory.newDocumentBuilder(); - builder.setEntityResolver(resolver); +// builder.setEntityResolver(resolver); Document doc =3D builder.parse(source); = // Modified: modules/test/trunk/unit/src/main/org/jboss/unit/runner/model/Para= metersDef.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/runner/model/Parameters= Def.java 2007-10-08 16:16:09 UTC (rev 8567) +++ modules/test/trunk/unit/src/main/org/jboss/unit/runner/model/Parameters= Def.java 2007-10-08 20:49:44 UTC (rev 8568) @@ -22,7 +22,7 @@ *************************************************************************= *****/ package org.jboss.unit.runner.model; = -import org.jboss.unit.runner.Parametrization; +import org.jboss.unit.runner.ParametrizationSet; = import java.util.Map; import java.util.HashMap; @@ -82,13 +82,13 @@ return map.keySet(); } = - public Parametrization getParametrization() + public ParametrizationSet getParametrization() { Map tmp =3D new HashMap(); for (Map.Entry entry : map.entrySet()) { tmp.put(entry.getKey(), entry.getValue().list().toArray(new Strin= g[0])); } - return new Parametrization(tmp); + return new ParametrizationSet(tmp); } } Deleted: modules/test/trunk/unit/src/resources/jboss-unit-jar/org/jboss/uni= t/runner/model/jboss-unit.dtd =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/resources/jboss-unit-jar/org/jboss/unit/run= ner/model/jboss-unit.dtd 2007-10-08 16:16:09 UTC (rev 8567) +++ modules/test/trunk/unit/src/resources/jboss-unit-jar/org/jboss/unit/run= ner/model/jboss-unit.dtd 2007-10-08 20:49:44 UTC (rev 8568) @@ -1,73 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Added: modules/test/trunk/unit/src/resources/jboss-unit-jar/org/jboss/unit/= runner/model/jboss-unit_1_0.xsd =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/resources/jboss-unit-jar/org/jboss/unit/run= ner/model/jboss-unit_1_0.xsd (rev 0) +++ modules/test/trunk/unit/src/resources/jboss-unit-jar/org/jboss/unit/run= ner/model/jboss-unit_1_0.xsd 2007-10-08 20:49:44 UTC (rev 8568) @@ -0,0 +1,94 @@ + + + + + A jboss-unit is the top container= element. + + + + The root type is like a suite. + + + + + + + + A suite elements define a test su= ite and contain nested suites. + + + + + + + + The pojo element defines a test s= uite for plain old java objects. It contains a global parameter set, + a set of test definitions and a set of tests to execute. + + + + + + + + + Defines a pojo test with a mandat= ory id attribute. The id attribute is used by + test elements which can refer to it. + + + + + + + + Defines a tested class. A tested = class can contain any number of case. + If the class element contains no case then all test cases returne= d by the class meta data will be executed. The + name attribute is the full qualified name of the class. + + + + + + + + + A case element specifies a partic= ular test case on a test class. The name attribute + in the name of the test case. + + + + + A test element specifies a test t= o execute. It either can contain an anonymous + nested class element or it can refer to an existing test definiti= on. The nested parameters are used to parameterize + the test configuration, they override any existing parameter defi= ned at the pojo level. + + + + + + + + + + A parameter element. + + + + + + + + + + + + + \ No newline at end of file Modified: modules/test/trunk/unit/src/resources/test/org/jboss/test/unit/bl= ah/f1.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/resources/test/org/jboss/test/unit/blah/f1.= xml 2007-10-08 16:16:09 UTC (rev 8567) +++ modules/test/trunk/unit/src/resources/test/org/jboss/test/unit/blah/f1.= xml 2007-10-08 20:49:44 UTC (rev 8568) @@ -1,8 +1,8 @@ - - + Modified: modules/test/trunk/unit/src/resources/test/org/jboss/test/unit/ru= nner/model/f1.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/resources/test/org/jboss/test/unit/runner/m= odel/f1.xml 2007-10-08 16:16:09 UTC (rev 8567) +++ modules/test/trunk/unit/src/resources/test/org/jboss/test/unit/runner/m= odel/f1.xml 2007-10-08 20:49:44 UTC (rev 8568) @@ -1,8 +1,8 @@ - - + = @@ -30,8 +30,8 @@ = + - = - + = = + + + + + + = - + = - - - + = + + + + = + = + = + = + = = = - css/html.css + css/html.css css/renaissance.css = 1 Modified: docs/trunk/docbook-support/styles/en/html_chunk.xsl =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- docs/trunk/docbook-support/styles/en/html_chunk.xsl 2007-10-09 12:36:31= UTC (rev 8573) +++ docs/trunk/docbook-support/styles/en/html_chunk.xsl 2007-10-09 14:47:42= UTC (rev 8574) @@ -31,7 +31,7 @@ = '5' '1' - css/html.css + css/html.css css/renaissance.css = 1 Added: docs/trunk/docbook-support/styles/en/renaissance.css =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- docs/trunk/docbook-support/styles/en/renaissance.css = (rev 0) +++ docs/trunk/docbook-support/styles/en/renaissance.css 2007-10-09 14:47:4= 2 UTC (rev 8574) @@ -0,0 +1,58 @@ +body { + font-family: Verdana, Arial, Helvetica, sans-serif; + margin: 0; + padding: 0; +} + +a { + color: #5078AA; +} + +hr { + line-height: 0; + height: 0; + background-color: #fff; +} + +div.book div.titlepage h1.title{ + margin: 0; + padding: 10px; + width: 100%; + height: 65px; + background-image: url('../images/renaissance/header_bg.gif'); + background-repeat: repeat-x; + color: #fff; + font-size: 15px; + font-weight: bold; +} + +div.book div.titlepage h2.subtitle, +div.toc b, +h2.title{ + margin: 0; + padding: 3px; + display: block; + width: 100%; + font-size: 15px; + font-weight: bold; + background-image: url('../images/renaissance/pathBackground.png'); + background-repeat: repeat-x; + color: #333333; + border: 1px solid #BBB; +} + +div.book div.titlepage div.author, +div.book div.titlepage h3.author, +div.book div.titlepage h3.author span, +div.book div.titlepage tt, +div.book div.titlepage tt a{ + margin: 0; + padding: 3px; + width: 100%; + font-size: 11px; + font-weight: bold; +} + +div.book div.titlepage h3.author { + +} \ No newline at end of file Copied: docs/trunk/quickstartuser/en/modules/overview.xml (from rev 8567, d= ocs/branches/JBoss_Portal_Branch_2_6/quickstartuser/en/modules/overview.xml) =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- docs/trunk/quickstartuser/en/modules/overview.xml = (rev 0) +++ docs/trunk/quickstartuser/en/modules/overview.xml 2007-10-09 14:47:42 U= TC (rev 8574) @@ -0,0 +1,106 @@ + + + JBoss Portal - Overview + + + + + + + + Many IT organizations look to achieve a competitive advantage for = the + enterprise by improving business productivity and reducing costs. Today's + top enterprises are realizing this goal by deploying enterprise portals + within their IT infrastructure. Enterprise portals simplify access to + information by providing a single source of interaction with corporate + information. Although today's packaged portal frameworks help enterprises + launch portals more quickly, only JBoss Portal can deliver the benefits = of a + zero-cost open source license combined with a flexible and scalable + underlying platform. + + JBoss Portal provides an open source and standards-based environme= nt + for hosting and serving a portal's Web interface, publishing and managing + its content, and customizing its experience. It is entirely standards-ba= sed + and supports the JSR-168 portlet specification, which allows you to easi= ly + plug-in standards-compliant portlets to meet your specific portal needs. + JBoss Portal is available through the business-friendly LGPL open source + license and is supported by Red Hat. Red Hat sup= port + services are available to assist you in designing, developing, deploying, + and ultimately managing your portal environment. JBoss Portal is current= ly + developed by Red Hat, Inc. developers, and community contributors. + + The JBoss Portal framework and architecture includes the portal + container and supports a wide range of features including standard portl= ets, + single sign-on, clustering and internationalization. Portal themes and + layouts are configurable. Users have the ability to fully customize thier + own personal portal pages. Fine-grained security administration down to + portlet permissions rounds out the security model. JBoss Portal includes= a + rich content management system with approval cycle support. + + + JBoss Portal Resources: + + + + + JBoss P= ortal + Project Home Page + + + + + + Do= wnloads + + + + + + Docume= ntation + + + + + Forums: User + | Developer + | Eclipse + Portlet Plugin + + + + + Wi= ki + + + + + + PortletSwap.com portlet + exchange + + + + + + Our + Roadmap + + + + + + The JBoss Portal team encourages you to use this guide to install = and + configure JBoss Portal. If you encounter any configuration issues or sim= ply + want to take part in our community, we would love to hear from you in our + forums. + --===============8113172366519799979==-- From portal-commits at lists.jboss.org Tue Oct 9 10:56:22 2007 Content-Type: multipart/mixed; boundary="===============9023939038101838258==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8576 - docs/trunk/userGuide/en/modules. Date: Tue, 09 Oct 2007 10:56:21 -0400 Message-ID: --===============9023939038101838258== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: thomas.heute(a)jboss.com Date: 2007-10-09 10:56:21 -0400 (Tue, 09 Oct 2007) New Revision: 8576 Modified: docs/trunk/userGuide/en/modules/intro.xml Log: Typo Modified: docs/trunk/userGuide/en/modules/intro.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- docs/trunk/userGuide/en/modules/intro.xml 2007-10-09 14:55:38 UTC (rev = 8575) +++ docs/trunk/userGuide/en/modules/intro.xml 2007-10-09 14:56:21 UTC (rev = 8576) @@ -20,7 +20,7 @@ Portal Instances - JBoss Portal supports mutliple portal instances running wit= hin one container. A portal instance can be + JBoss Portal supports multiple portal instances running wit= hin one container. A portal instance can be viewed as a 'bucket', containing portal objects such as, Porta= l Pages, Themes, Layouts, and Portlet Windows. It also manages the relationship between the user and the portal itself. The hiera= rchy of portal objects is depicted as follows: --===============9023939038101838258==-- From portal-commits at lists.jboss.org Tue Oct 9 10:57:18 2007 Content-Type: multipart/mixed; boundary="===============4805114860884798611==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8575 - docs/trunk/quickstartuser/en. Date: Tue, 09 Oct 2007 10:55:38 -0400 Message-ID: --===============4805114860884798611== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: thomas.heute(a)jboss.com Date: 2007-10-09 10:55:38 -0400 (Tue, 09 Oct 2007) New Revision: 8575 Modified: docs/trunk/quickstartuser/en/master.xml Log: Overview is part of 'common' Modified: docs/trunk/quickstartuser/en/master.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- docs/trunk/quickstartuser/en/master.xml 2007-10-09 14:47:42 UTC (rev 85= 74) +++ docs/trunk/quickstartuser/en/master.xml 2007-10-09 14:55:38 UTC (rev 85= 75) @@ -1,7 +1,7 @@ + --===============4805114860884798611==-- From portal-commits at lists.jboss.org Tue Oct 9 14:59:45 2007 Content-Type: multipart/mixed; boundary="===============6778982451177945989==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8577 - in docs/trunk: docbook-support/styles/en and 1 other directory. Date: Tue, 09 Oct 2007 14:59:45 -0400 Message-ID: --===============6778982451177945989== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: wesleyhales Date: 2007-10-09 14:59:45 -0400 (Tue, 09 Oct 2007) New Revision: 8577 Added: docs/trunk/common/en/images/forward.png docs/trunk/common/en/images/messagebox_info.png docs/trunk/common/en/images/messagebox_warning.png docs/trunk/common/en/images/previous.png Modified: docs/trunk/docbook-support/styles/en/renaissance.css Log: renaissance style for docs enhanced Added: docs/trunk/common/en/images/forward.png =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D (Binary files differ) Property changes on: docs/trunk/common/en/images/forward.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: docs/trunk/common/en/images/messagebox_info.png =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D (Binary files differ) Property changes on: docs/trunk/common/en/images/messagebox_info.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: docs/trunk/common/en/images/messagebox_warning.png =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D (Binary files differ) Property changes on: docs/trunk/common/en/images/messagebox_warning.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: docs/trunk/common/en/images/previous.png =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D (Binary files differ) Property changes on: docs/trunk/common/en/images/previous.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Modified: docs/trunk/docbook-support/styles/en/renaissance.css =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- docs/trunk/docbook-support/styles/en/renaissance.css 2007-10-09 14:56:2= 1 UTC (rev 8576) +++ docs/trunk/docbook-support/styles/en/renaissance.css 2007-10-09 18:59:4= 5 UTC (rev 8577) @@ -8,18 +8,58 @@ color: #5078AA; } = +p { + padding: 0; + margin: 5px 0 5px 0; +} + hr { line-height: 0; height: 0; background-color: #fff; } = -div.book div.titlepage h1.title{ +div.navheader table, +div.navheader table tr td{ + padding: 0; + margin:0; + vertical-align:top; +} + +div.navheader td { + padding: 0; + margin:0; + vertical-align:top; +} + +div.navheader td[align=3Dright] a, +div.navfooter td[align=3Dright] a{ + background-image: url( '../images/forward.png' ); + background-repeat: no-repeat; + background-position: center right; + padding: 8px 35px 5px 0; + margin:0; +} + +div.navheader td[align=3Dleft] a, +div.navfooter td[align=3Dleft] a{ + background-image: url( '../images/previous.png' ); + background-repeat: no-repeat; + background-position: center left; + padding: 8px 0 5px 35px; + margin:0; +} + +div.toc dl { + padding: 0 0 0 15px; +} + +div.book div.titlepage h1.title { margin: 0; padding: 10px; width: 100%; height: 65px; - background-image: url('../images/renaissance/header_bg.gif'); + background-image: url( '../images/renaissance/header_bg.gif' ); background-repeat: repeat-x; color: #fff; font-size: 15px; @@ -27,32 +67,104 @@ } = div.book div.titlepage h2.subtitle, -div.toc b, -h2.title{ - margin: 0; + div.toc b, + h2.title { + margin: 15px 0 5px 0; padding: 3px; display: block; width: 100%; font-size: 15px; font-weight: bold; - background-image: url('../images/renaissance/pathBackground.png'); + background-image: url( '../images/renaissance/pathBackground.png' ); background-repeat: repeat-x; color: #333333; border: 1px solid #BBB; } = +div.book div.titlepage div div { + clear: both; +} + div.book div.titlepage div.author, -div.book div.titlepage h3.author, -div.book div.titlepage h3.author span, -div.book div.titlepage tt, -div.book div.titlepage tt a{ + div.book div.titlepage h3.author, + div.book div.titlepage h3.author span, + div.book div.titlepage tt, + div.book div.titlepage tt .email { margin: 0; padding: 3px; - width: 100%; font-size: 11px; font-weight: bold; + float: left; } = +div.book div.titlepage div.author tt.email, + div.book div.titlepage div.author a { + font-size: 10px; +} + +div.book div.titlepage div.author tt.email { + padding: 5px 0 0 0; +} + div.book div.titlepage h3.author { = -} \ No newline at end of file +} + +div.chapter div.titlepage { + padding: 0 0 15px 0; +} + +div.chapter * div.titlepage { + padding: 0 0 0 0; +} + +div.chapter * h3.title { + background-color: #EBF2F5; + border-top: 1px solid #999; + color: #656565; + margin: 15px 0 5px 0; +} + +div.chapter * h4.title { + background-color: #5986B3; + border: 1px solid #54708C; + color: #FFFFFF; + font-size: 11px; + font-weight: bold; + margin: 0pt; + padding: 2px 2px 2px 4px; +} + +div.chapter div.note h3.title { + color: #003399; + font-weight: bold; + margin-top: 10px; + padding-top: 5px; + background-color: transparent; + border: 0; +} + +div.chapter div.note { + padding: 3px 0 3px 65px; + background-image: url( '../images/messagebox_info.png' ); + background-repeat: no-repeat; + background-position: 5 5; + margin: 10px 0 10px 0; +} + +div.chapter div.warning h3.title { + color: #003399; + font-weight: bold; + margin-top: 10px; + padding-top: 5px; + background-color: transparent; + border: 0; +} + +div.chapter div.warning { + padding: 3px 0 3px 65px; + background-image: url( '../images/messagebox_warning.png' ); + background-repeat: no-repeat; + background-position: 5 5; + margin: 10px 0 10px 0; +} --===============6778982451177945989==-- From portal-commits at lists.jboss.org Tue Oct 9 18:05:30 2007 Content-Type: multipart/mixed; boundary="===============7336217621400963231==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8578 - in modules/test/trunk/unit/src/main/org/jboss: test/unit/runner and 6 other directories. Date: Tue, 09 Oct 2007 18:05:30 -0400 Message-ID: --===============7336217621400963231== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: julien(a)jboss.com Date: 2007-10-09 18:05:30 -0400 (Tue, 09 Oct 2007) New Revision: 8578 Added: modules/test/trunk/unit/src/main/org/jboss/test/unit/runner/TestDriverRu= nnerTests.java Modified: modules/test/trunk/unit/src/main/org/jboss/test/unit/AllTests.java modules/test/trunk/unit/src/main/org/jboss/unit/FailureType.java modules/test/trunk/unit/src/main/org/jboss/unit/TestId.java modules/test/trunk/unit/src/main/org/jboss/unit/report/junit/JUnitReport= er.java modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/composite/Co= mpositeTestRunner.java modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/driver/TestD= riverRunner.java modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/event/EventD= rivenTestRunner.java modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/pojo/POJOTes= tRunner.java Log: start to write test for TestDriverRunner Modified: modules/test/trunk/unit/src/main/org/jboss/test/unit/AllTests.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/test/unit/AllTests.java 2007= -10-09 18:59:45 UTC (rev 8577) +++ modules/test/trunk/unit/src/main/org/jboss/test/unit/AllTests.java 2007= -10-09 22:05:30 UTC (rev 8578) @@ -28,6 +28,7 @@ import org.jboss.test.unit.pojo.junit.JUnitPOJOTests; import org.jboss.test.unit.runner.CompositeTestRunnerTests; import org.jboss.test.unit.runner.ParametrizationTests; +import org.jboss.test.unit.runner.TestDriverRunnerTests; import org.jboss.test.unit.runner.event.TestRunnerEventBroadcasterSupportT= ests; import org.jboss.test.unit.runner.event.TestRunnerLifeCycleFilterTests; import org.jboss.test.unit.runner.model.ModelTests; @@ -46,6 +47,7 @@ AbstractPOJOTests.main(args); JUnitPOJOTests.main(args); CompositeTestRunnerTests.main(args); + TestDriverRunnerTests.main(args); = // TestRunnerLifeCycleFilterTests.main(args); Added: modules/test/trunk/unit/src/main/org/jboss/test/unit/runner/TestDriv= erRunnerTests.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/test/unit/runner/TestDriverR= unnerTests.java (rev 0) +++ modules/test/trunk/unit/src/main/org/jboss/test/unit/runner/TestDriverR= unnerTests.java 2007-10-09 22:05:30 UTC (rev 8578) @@ -0,0 +1,162 @@ +/*************************************************************************= ***** + * JBoss, a division of Red Hat = * + * Copyright 2006, Red Hat Middleware, LLC, and individual = * + * contributors as indicated by the @authors tag. See the = * + * copyright.txt in the distribution for a full listing of = * + * individual contributors. = * + * = * + * This is free software; you can redistribute it and/or modify it = * + * under the terms of the GNU Lesser General Public License as = * + * published by the Free Software Foundation; either version 2.1 of = * + * the License, or (at your option) any later version. = * + * = * + * This software is distributed in the hope that it will be useful, = * + * but WITHOUT ANY WARRANTY; without even the implied warranty of = * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU = * + * Lesser General Public License for more details. = * + * = * + * You should have received a copy of the GNU Lesser General Public = * + * License along with this software; if not, write to the Free = * + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA = * + * 02110-1301 USA, or see the FSF site: http://www.fsf.org. = * + *************************************************************************= *****/ +package org.jboss.test.unit.runner; + +import org.jboss.unit.runner.impl.driver.TestDriverRunner; +import org.jboss.unit.runner.TestRunnerEventListener; +import org.jboss.unit.runner.TestRunnerEvent; +import org.jboss.unit.runner.results.TestFailure; +import org.jboss.unit.runner.event.EndTestEvent; +import org.jboss.unit.runner.event.StartTestEvent; +import org.jboss.unit.driver.TestDriver; +import org.jboss.unit.driver.DriverResponse; +import org.jboss.unit.driver.DriverCommand; +import org.jboss.unit.driver.response.EndTestResponse; +import org.jboss.unit.driver.response.FailureResponse; +import org.jboss.unit.info.TestInfo; +import org.jboss.unit.info.impl.SimpleTestSuiteInfo; +import org.jboss.unit.info.impl.SimpleTestCaseInfo; +import org.jboss.unit.TestId; +import org.jboss.unit.FailureType; +import org.jboss.unit.Failure; + +import java.util.List; +import java.util.ArrayList; + +import static org.jboss.unit.api.Assert.*; + +/** + * @author Julien Viet + * @version $Revision: 1.1 $ + */ +public class TestDriverRunnerTests +{ + + private static class Blah implements TestRunnerEventListener + { + + /** . */ + private final List events =3D new ArrayList(); + + public void onEvent(TestRunnerEvent event) + { + events.add(event); + } + } + + public static void main(String[] args) + { + testEmptyDriver(); + testTestDriverInvokeReturnsNull(); + testTestDriverInvokeReturnsAnEndTestResponse(); + testTestDriverInvokeReturnsAFailureResponse(); + + + } + + private static void testEmptyDriver() + { + TestDriverImpl testDriver =3D new TestDriverImpl(); + TestDriverRunner runner =3D new TestDriverRunner(testDriver, new Tes= tId()); + runner.run(); + } + + private static void testTestDriverInvokeReturnsNull() + { + TestDriverImpl testDriver =3D new TestDriverImpl(); + testDriver.info.addTest(new SimpleTestCaseInfo("Foo")); + TestDriverRunner runner =3D new TestDriverRunner(testDriver, new Tes= tId()); + + Blah listener =3D new Blah(); + runner.addListener(listener); + + // Check that we received an error + runner.run(); + + // + assertEquals(4, listener.events.size()); + + // + StartTestEvent startEvent =3D assertInstanceOf(listener.events.get(1= ), StartTestEvent.class); + assertEquals(new TestId("Foo"), startEvent.getTestId()); + + // + EndTestEvent endEvent =3D assertInstanceOf(listener.events.get(2), E= ndTestEvent.class); + assertEquals(new TestId("Foo"), endEvent.getTestId()); + TestFailure testFailure =3D assertInstanceOf(endEvent.getTestResult(= ), TestFailure.class); + Failure failure =3D testFailure.getFailure(); + assertEquals(FailureType.ERROR, failure.getType()); + } + + private static void testTestDriverInvokeReturnsAnEndTestResponse() + { + TestDriverImpl testDriver =3D new TestDriverImpl() + { + public DriverResponse invoke(TestId id, DriverCommand command) + { + return new EndTestResponse(); + } + }; + testDriver.info.addTest(new SimpleTestCaseInfo("Foo")); + TestDriverRunner runner =3D new TestDriverRunner(testDriver, new Tes= tId()); + + // Check that we received an internal error + runner.run(); + } + + private static void testTestDriverInvokeReturnsAFailureResponse() + { + TestDriverImpl testDriver =3D new TestDriverImpl() + { + public DriverResponse invoke(TestId id, DriverCommand command) + { + return new FailureResponse(FailureType.ERROR); + } + }; + testDriver.info.addTest(new SimpleTestCaseInfo("Foo")); + TestDriverRunner runner =3D new TestDriverRunner(testDriver, new Tes= tId()); + + // Check that we received an internal error + runner.run(); + } + + private static class TestDriverImpl implements TestDriver + { + + /** . */ + private SimpleTestSuiteInfo info =3D new SimpleTestSuiteInfo("blah"); + + public TestInfo getInfo() + { + return info; + } + + public DriverResponse invoke(TestId id, DriverCommand command) + { + return null; + } + } + + + +} Modified: modules/test/trunk/unit/src/main/org/jboss/unit/FailureType.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/FailureType.java 2007-1= 0-09 18:59:45 UTC (rev 8577) +++ modules/test/trunk/unit/src/main/org/jboss/unit/FailureType.java 2007-1= 0-09 22:05:30 UTC (rev 8578) @@ -30,7 +30,13 @@ */ public enum FailureType { + /** + * A failure that is not expected + */ ERROR, + + /** + * A failure that is expected. + */ ASSERTION, - INTERNAL_ERROR } Modified: modules/test/trunk/unit/src/main/org/jboss/unit/TestId.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/TestId.java 2007-10-09 = 18:59:45 UTC (rev 8577) +++ modules/test/trunk/unit/src/main/org/jboss/unit/TestId.java 2007-10-09 = 22:05:30 UTC (rev 8578) @@ -220,6 +220,9 @@ return false; } } + + // + return true; } = // Modified: modules/test/trunk/unit/src/main/org/jboss/unit/report/junit/JUni= tReporter.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/report/junit/JUnitRepor= ter.java 2007-10-09 18:59:45 UTC (rev 8577) +++ modules/test/trunk/unit/src/main/org/jboss/unit/report/junit/JUnitRepor= ter.java 2007-10-09 22:05:30 UTC (rev 8578) @@ -88,10 +88,6 @@ { report.runnerFailed((RunnerFailureEvent) event); } - else if (event instanceof StartTestEvent) - { - report.startTest((StartTestEvent) event); - } else if (event instanceof EndTestEvent) { report.endTest((EndTestEvent) event); Modified: modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/compo= site/CompositeTestRunner.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/composite/C= ompositeTestRunner.java 2007-10-09 18:59:45 UTC (rev 8577) +++ modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/composite/C= ompositeTestRunner.java 2007-10-09 22:05:30 UTC (rev 8578) @@ -52,7 +52,7 @@ this.lifeCycleFilter =3D new TestRunnerLifeCycleFilter(broadcaster); } = - public void internalRun(TestFilter filter) + protected void internalRun(TestFilter filter) { for (TestRunner runner : runners) { Modified: modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/drive= r/TestDriverRunner.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/driver/Test= DriverRunner.java 2007-10-09 18:59:45 UTC (rev 8577) +++ modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/driver/Test= DriverRunner.java 2007-10-09 22:05:30 UTC (rev 8578) @@ -32,6 +32,7 @@ import org.jboss.unit.info.TestInfo; import org.jboss.unit.TestId; import org.jboss.unit.Failure; +import org.jboss.unit.FailureType; import org.jboss.unit.runner.results.TestSuccess; import org.jboss.unit.runner.results.TestFailure; import org.jboss.unit.runner.event.StartTestEvent; @@ -40,6 +41,7 @@ import org.jboss.unit.runner.AbstractTestRunner; import org.jboss.unit.runner.TestFilter; import org.jboss.unit.runner.TestResult; +import org.jboss.unit.runner.ParametrizationSet; = import java.util.Map; import java.util.HashMap; @@ -48,6 +50,13 @@ * An implementation that uses a test driver and transform test driver * interactions into runner interactions. * + * During the invocation of a test case through the invoke me= thod of the test driver, it + * expects a non null response of type EndTestResponse or FailureResponse. For a normal + * test case invocation the runner will fire TODO + * If the test case invocation fails because an unexpected runtime excepti= on is thrown or because the returned + * value is not of the expected type then the runner will broadcast an EndTestEvent with a TestResult + * object of type TestFailure. + * * @author Julien Viet * @version $Revision: 1.1 $ */ @@ -58,24 +67,24 @@ private final TestDriver driver; = /** . */ - private final Map parametrization; + private final ParametrizationSet parametrizationSet; = /** . */ private final TestId testId; = - public TestDriverRunner(TestDriver driver, Map parametri= zation, TestId testId) + public TestDriverRunner(TestDriver driver, ParametrizationSet parametri= zationSet, TestId testId) { this.driver =3D driver; - this.parametrization =3D parametrization; + this.parametrizationSet =3D parametrizationSet; this.testId =3D testId; } = public TestDriverRunner(TestDriver driver, TestId testId) { - this(driver, new HashMap(), testId); + this(driver, new ParametrizationSet(), testId); } = - public void internalRun(TestFilter filter) + protected void internalRun(TestFilter filter) { TestSuiteInfo info =3D (TestSuiteInfo)driver.getInfo(); = @@ -83,38 +92,56 @@ TestInfo testInfo =3D info.findTest(testId); = // + internalRun(filter, testInfo, testId); + } + + private void internalRun(TestFilter filter, TestInfo testInfo, TestId t= estId) + { if (filter.include(testId, testInfo)) { + if (testInfo instanceof TestSuiteInfo) + { + TestSuiteInfo testSuiteInfo =3D (TestSuiteInfo)testInfo; = - if (testInfo instanceof TestCaseInfo) + // + for (String name : testSuiteInfo.getNames()) + { + TestInfo childTestInfo =3D testSuiteInfo.getTest(name); + internalRun(filter, childTestInfo, new TestId(testId, name)= ); + } + } + else { - TestCaseInfo testCaseInfo =3D (TestCaseInfo)testInfo; + for (Map parametrization : parametrizationSet.e= numerate(testCaseInfo.getParameters().keySet())) + { + fireEvent(new StartTestEvent(testId, testCaseInfo)); = - fireEvent(new StartTestEvent(testId, testCaseInfo)); + // + DriverResponse response =3D driver.invoke(testId, new Start= TestCommand(parametrization)); = - DriverResponse response =3D driver.invoke(testId, new StartTes= tCommand(parametrization)); + // + TestResult result; + if (response instanceof EndTestResponse) + { + result =3D new TestSuccess(0); + } + else if (response instanceof FailureResponse) + { + FailureResponse failureResponse =3D (FailureResponse)res= ponse; + Failure failure =3D failureResponse.getFailure(); + result =3D new TestFailure(failure, 0); + } + else + { + Failure failure =3D new Failure("The test driver returne= d an unexpected response " + response, FailureType.ERROR); + result =3D new TestFailure(failure, 0); + } = - TestResult result =3D null; - - if (response instanceof EndTestResponse) - { - result =3D new TestSuccess(0); + // + fireEvent(new EndTestEvent(testId, result)); } - else if (response instanceof FailureResponse) - { - FailureResponse failureResponse =3D (FailureResponse)respon= se; - Failure failure =3D failureResponse.getFailure(); - result =3D new TestFailure(failure, 0); - } - - // - fireEvent(new EndTestEvent(testId, result)); } - else - { - fireEvent(new RunnerFailureEvent(Failure.createErrorFailure("C= annot execute test id " + testId))); - } } } } Modified: modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/event= /EventDrivenTestRunner.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/event/Event= DrivenTestRunner.java 2007-10-09 18:59:45 UTC (rev 8577) +++ modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/event/Event= DrivenTestRunner.java 2007-10-09 22:05:30 UTC (rev 8578) @@ -49,7 +49,7 @@ this.events =3D events; } = - public void internalRun(TestFilter filter) + protected void internalRun(TestFilter filter) { for (TestRunnerEvent event : events) { Modified: modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/pojo/= POJOTestRunner.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/pojo/POJOTe= stRunner.java 2007-10-09 18:59:45 UTC (rev 8577) +++ modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/pojo/POJOTe= stRunner.java 2007-10-09 22:05:30 UTC (rev 8578) @@ -42,7 +42,6 @@ = import java.util.List; import java.util.ArrayList; -import java.util.Map; = /** * @author Julien Viet @@ -103,26 +102,17 @@ } = // Create parametrization - - ParametrizationSet parametrizations =3D suite.getParamet= ers().getParametrization(); parametrizations.merge(test.getParameters().getParametri= zation()); -// Map> generator =3D new HashMap= >(); = - // for (String testCaseName : testCaseNames) { TestId testCaseId =3D new TestId(testCaseName); - TestCaseInfo testCaseInfo =3D (TestCaseInfo)testSuite= Info.findTest(testCaseId); - - for (Map blah : parametrizations.enume= rate(testCaseInfo.getParameters().keySet())) - { - TestDriverRunner runner =3D new TestDriverRunner(d= river, blah, testCaseId); - runner.addListener(lifeCycleFilter); - runner.run(filter); - } + TestDriverRunner runner =3D new TestDriverRunner(driv= er, parametrizations, testCaseId); + runner.addListener(lifeCycleFilter); + runner.run(filter); } } catch (Exception e) --===============7336217621400963231==-- From portal-commits at lists.jboss.org Tue Oct 9 18:30:12 2007 Content-Type: multipart/mixed; boundary="===============0000567724465566727==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8579 - in modules/test/trunk/unit/src/main/org/jboss: unit/runner/impl/driver and 1 other directory. Date: Tue, 09 Oct 2007 18:30:12 -0400 Message-ID: --===============0000567724465566727== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: julien(a)jboss.com Date: 2007-10-09 18:30:12 -0400 (Tue, 09 Oct 2007) New Revision: 8579 Modified: modules/test/trunk/unit/src/main/org/jboss/test/unit/runner/TestDriverRu= nnerTests.java modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/driver/TestD= riverRunner.java Log: if the test driver throws a runtime exception, translate it as a test failu= re Modified: modules/test/trunk/unit/src/main/org/jboss/test/unit/runner/TestD= riverRunnerTests.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/test/unit/runner/TestDriverR= unnerTests.java 2007-10-09 22:05:30 UTC (rev 8578) +++ modules/test/trunk/unit/src/main/org/jboss/test/unit/runner/TestDriverR= unnerTests.java 2007-10-09 22:30:12 UTC (rev 8579) @@ -25,9 +25,13 @@ import org.jboss.unit.runner.impl.driver.TestDriverRunner; import org.jboss.unit.runner.TestRunnerEventListener; import org.jboss.unit.runner.TestRunnerEvent; +import org.jboss.unit.runner.TestResult; import org.jboss.unit.runner.results.TestFailure; +import org.jboss.unit.runner.results.TestSuccess; import org.jboss.unit.runner.event.EndTestEvent; import org.jboss.unit.runner.event.StartTestEvent; +import org.jboss.unit.runner.event.StartRunnerEvent; +import org.jboss.unit.runner.event.EndRunnerEvent; import org.jboss.unit.driver.TestDriver; import org.jboss.unit.driver.DriverResponse; import org.jboss.unit.driver.DriverCommand; @@ -44,6 +48,7 @@ import java.util.ArrayList; = import static org.jboss.unit.api.Assert.*; +import static org.jboss.unit.api.Assert.assertEquals; = /** * @author Julien Viet @@ -70,6 +75,7 @@ testTestDriverInvokeReturnsNull(); testTestDriverInvokeReturnsAnEndTestResponse(); testTestDriverInvokeReturnsAFailureResponse(); + testTestDriverInvokeThrowsRuntimeException(); = = } @@ -86,26 +92,18 @@ TestDriverImpl testDriver =3D new TestDriverImpl(); testDriver.info.addTest(new SimpleTestCaseInfo("Foo")); TestDriverRunner runner =3D new TestDriverRunner(testDriver, new Tes= tId()); - Blah listener =3D new Blah(); runner.addListener(listener); = - // Check that we received an error + // runner.run(); = // assertEquals(4, listener.events.size()); - - // - StartTestEvent startEvent =3D assertInstanceOf(listener.events.get(1= ), StartTestEvent.class); - assertEquals(new TestId("Foo"), startEvent.getTestId()); - - // - EndTestEvent endEvent =3D assertInstanceOf(listener.events.get(2), E= ndTestEvent.class); - assertEquals(new TestId("Foo"), endEvent.getTestId()); - TestFailure testFailure =3D assertInstanceOf(endEvent.getTestResult(= ), TestFailure.class); - Failure failure =3D testFailure.getFailure(); - assertEquals(FailureType.ERROR, failure.getType()); + assertStartRunnerEvent(listener.events.get(0)); + assertStartTestEvent(listener.events.get(1), new TestId("Foo")); + assertEndTestEvent(listener.events.get(2), new TestId("Foo"), new Te= stFailure(new Failure("", FailureType.ERROR), 0)); + assertEndRunnerEvent(listener.events.get(3)); } = private static void testTestDriverInvokeReturnsAnEndTestResponse() @@ -119,9 +117,18 @@ }; testDriver.info.addTest(new SimpleTestCaseInfo("Foo")); TestDriverRunner runner =3D new TestDriverRunner(testDriver, new Tes= tId()); + Blah listener =3D new Blah(); + runner.addListener(listener); = - // Check that we received an internal error + // = runner.run(); + + // + assertEquals(4, listener.events.size()); + assertStartRunnerEvent(listener.events.get(0)); + assertStartTestEvent(listener.events.get(1), new TestId("Foo")); + assertEndTestEvent(listener.events.get(2), new TestId("Foo"), new Te= stSuccess(0)); + assertEndRunnerEvent(listener.events.get(3)); } = private static void testTestDriverInvokeReturnsAFailureResponse() @@ -135,11 +142,45 @@ }; testDriver.info.addTest(new SimpleTestCaseInfo("Foo")); TestDriverRunner runner =3D new TestDriverRunner(testDriver, new Tes= tId()); + Blah listener =3D new Blah(); + runner.addListener(listener); = - // Check that we received an internal error + // runner.run(); + + // + assertEquals(4, listener.events.size()); + assertStartRunnerEvent(listener.events.get(0)); + assertStartTestEvent(listener.events.get(1), new TestId("Foo")); + assertEndTestEvent(listener.events.get(2), new TestId("Foo"), new Te= stFailure(new Failure("", FailureType.ERROR), 0)); + assertEndRunnerEvent(listener.events.get(3)); } = + private static void testTestDriverInvokeThrowsRuntimeException() + { + TestDriverImpl testDriver =3D new TestDriverImpl() + { + public DriverResponse invoke(TestId id, DriverCommand command) + { + throw new RuntimeException(); + } + }; + testDriver.info.addTest(new SimpleTestCaseInfo("Foo")); + TestDriverRunner runner =3D new TestDriverRunner(testDriver, new Tes= tId()); + Blah listener =3D new Blah(); + runner.addListener(listener); + + // + runner.run(); + + // + assertEquals(4, listener.events.size()); + assertStartRunnerEvent(listener.events.get(0)); + assertStartTestEvent(listener.events.get(1), new TestId("Foo")); + assertEndTestEvent(listener.events.get(2), new TestId("Foo"), new Te= stFailure(new Failure("", FailureType.ERROR), 0)); + assertEndRunnerEvent(listener.events.get(3)); + } + private static class TestDriverImpl implements TestDriver { = @@ -157,6 +198,36 @@ } } = + private static void assertStartRunnerEvent(TestRunnerEvent event) + { + assertInstanceOf(event, StartRunnerEvent.class); + } = + private static void assertStartTestEvent(TestRunnerEvent event, TestId = expectedTestId) + { + StartTestEvent startEvent =3D assertInstanceOf(event, StartTestEvent= .class); + assertEquals(expectedTestId, startEvent.getTestId()); + } = + private static void assertEndTestEvent(TestRunnerEvent event, TestId ex= pectedTestId, TestResult expectedResult) + { + EndTestEvent endEvent =3D assertInstanceOf(event, EndTestEvent.class= ); + assertEquals(expectedTestId, endEvent.getTestId()); + if (expectedResult instanceof TestFailure) + { + TestFailure expectedTestFailure =3D (TestFailure)expectedResult; + TestFailure testFailure =3D assertInstanceOf(endEvent.getTestResu= lt(), TestFailure.class); + assertEquals(expectedTestFailure.getFailure().getType(), testFail= ure.getFailure().getType()); + } + else if (expectedResult instanceof TestSuccess) + { + TestSuccess expectedTestSuccess =3D (TestSuccess)expectedResult; + TestSuccess testSuccess =3D assertInstanceOf(endEvent.getTestResu= lt(), TestSuccess.class); + } + } + + private static void assertEndRunnerEvent(TestRunnerEvent event) + { + assertInstanceOf(event, EndRunnerEvent.class); + } } Modified: modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/drive= r/TestDriverRunner.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/driver/Test= DriverRunner.java 2007-10-09 22:05:30 UTC (rev 8578) +++ modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/driver/Test= DriverRunner.java 2007-10-09 22:30:12 UTC (rev 8579) @@ -118,24 +118,27 @@ fireEvent(new StartTestEvent(testId, testCaseInfo)); = // - DriverResponse response =3D driver.invoke(testId, new Start= TestCommand(parametrization)); + StartTestCommand command =3D new StartTestCommand(parametri= zation); = // - TestResult result; - if (response instanceof EndTestResponse) + TestResult result =3D null; + + // + DriverResponse response =3D null; + try { - result =3D new TestSuccess(0); + response =3D driver.invoke(testId, command); } - else if (response instanceof FailureResponse) + catch (Exception e) { - FailureResponse failureResponse =3D (FailureResponse)res= ponse; - Failure failure =3D failureResponse.getFailure(); + Failure failure =3D new Failure("The test driver threw a= n unexpected exception ", e, FailureType.ERROR); result =3D new TestFailure(failure, 0); } - else + + // + if (result =3D=3D null) { - Failure failure =3D new Failure("The test driver returne= d an unexpected response " + response, FailureType.ERROR); - result =3D new TestFailure(failure, 0); + result =3D unwrap(response); } = // @@ -144,4 +147,23 @@ } } } + + private TestResult unwrap(DriverResponse response) + { + if (response instanceof EndTestResponse) + { + return new TestSuccess(0); + } + else if (response instanceof FailureResponse) + { + FailureResponse failureResponse =3D (FailureResponse)response; + Failure failure =3D failureResponse.getFailure(); + return new TestFailure(failure, 0); + } + else + { + Failure failure =3D new Failure("The test driver returned an unex= pected response " + response, FailureType.ERROR); + return new TestFailure(failure, 0); + } + } } --===============0000567724465566727==-- From portal-commits at lists.jboss.org Wed Oct 10 05:14:51 2007 Content-Type: multipart/mixed; boundary="===============4138163259352612556==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8580 - branches/JBoss_Portal_Branch_2_6/core/src/resources/portal-core-sar/dtd and 3 other directories. Date: Wed, 10 Oct 2007 05:14:51 -0400 Message-ID: --===============4138163259352612556== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: thomas.heute(a)jboss.com Date: 2007-10-10 05:14:51 -0400 (Wed, 10 Oct 2007) New Revision: 8580 Modified: branches/JBoss_Portal_Branch_2_6/core-admin/src/main/org/jboss/portal/co= re/admin/ui/AdminPropertyResolver.java branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/core/imp= l/portlet/info/CorePortletInfoFactory.java branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/core/imp= l/portlet/info/CorePortletInfoImpl.java branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/core/imp= l/portlet/info/PortletIconInfoImpl.java branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/core/imp= l/portlet/info/PortletInfoInfoImpl.java branches/JBoss_Portal_Branch_2_6/core/src/resources/portal-core-sar/dtd/= jboss-portlet_2_6.dtd branches/JBoss_Portal_Branch_2_6/portlet-server/src/main/org/jboss/porta= l/portlet/deployment/jboss/PortletAppDeployment.java docs/trunk/referenceGuide/en/modules/xmldescriptors.xml Log: Automatically add the correct web context to the icon relative link Modified: branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/c= ore/impl/portlet/info/CorePortletInfoFactory.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/core/im= pl/portlet/info/CorePortletInfoFactory.java 2007-10-09 22:30:12 UTC (rev 85= 79) +++ branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/core/im= pl/portlet/info/CorePortletInfoFactory.java 2007-10-10 09:14:51 UTC (rev 85= 80) @@ -22,6 +22,7 @@ *************************************************************************= *****/ package org.jboss.portal.core.impl.portlet.info; = +import org.jboss.portal.portlet.container.PortletApplicationContext; import org.jboss.portal.portlet.impl.jsr168.spi.PortletInfoFactory; import org.jboss.portal.portlet.impl.jsr168.metadata.PortletMetaData; import org.jboss.portal.portlet.info.PortletInfo; @@ -35,10 +36,11 @@ public class CorePortletInfoFactory implements PortletInfoFactory { public PortletInfo createPortletInfo( + PortletApplicationContext portletApplicationContext, PortletMetaData portletMD, JBossPortletMetaData jbossPortletMD, ResourceBundleManager resourceBundleManager) { - return new CorePortletInfoImpl(portletMD, jbossPortletMD, resourceBu= ndleManager); + return new CorePortletInfoImpl(portletApplicationContext, portletMD,= jbossPortletMD, resourceBundleManager); } } Modified: branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/c= ore/impl/portlet/info/CorePortletInfoImpl.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/core/im= pl/portlet/info/CorePortletInfoImpl.java 2007-10-09 22:30:12 UTC (rev 8579) +++ branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/core/im= pl/portlet/info/CorePortletInfoImpl.java 2007-10-10 09:14:51 UTC (rev 8580) @@ -30,6 +30,7 @@ import org.jboss.portal.core.metadata.portlet.AjaxMetaData; import org.jboss.portal.core.metadata.portlet.HeaderContentMetaData; import org.jboss.portal.core.metadata.portlet.PortletInfoMetaData; +import org.jboss.portal.portlet.container.PortletApplicationContext; import org.jboss.portal.portlet.impl.jsr168.info.ContainerPortletInfo; import org.jboss.portal.portlet.impl.jsr168.metadata.PortletMetaData; import org.jboss.portal.common.i18n.ResourceBundleManager; @@ -54,21 +55,21 @@ /** . */ private final PortletInfoInfoImpl portletInfo; = - public CorePortletInfoImpl(PortletMetaData portletMD, org.jboss.portal.= portlet.metadata.JBossPortletMetaData jbossPortletMD, ResourceBundleManager= bundleMgr) + public CorePortletInfoImpl(PortletApplicationContext portletApplication= Context, PortletMetaData portletMD, org.jboss.portal.portlet.metadata.JBoss= PortletMetaData jbossPortletMD, ResourceBundleManager bundleMgr) { - super(portletMD, jbossPortletMD, bundleMgr); + super(portletApplicationContext, portletMD, jbossPortletMD, bundleMg= r); = // AjaxMetaData ajaxMD =3D ((JBossPortletMetaData)jbossPortletMD).getAj= ax(); HeaderContentMetaData headerContentMD =3D ((JBossPortletMetaData)jbo= ssPortletMD).getHeaderContent(); PortletInfoMetaData portletInfoMD =3D ((JBossPortletMetaData)jbossPo= rtletMD).getPortletInfo(); - + = // this.txType =3D jbossPortletMD.getTxType(); this.ajax =3D ajaxMD !=3D null ? new AjaxInfoImpl(ajaxMD) : null; this.markupHeader =3D headerContentMD !=3D null ? new MarkupHeaderIn= foImpl(headerContentMD) : null; - this.portletInfo =3D portletInfoMD !=3D null ? new PortletInfoInfoIm= pl(portletInfoMD) : null; - } + this.portletInfo =3D portletInfoMD !=3D null ? new PortletInfoInfoIm= pl(portletApplicationContext, portletInfoMD) : null; + } = public Transactions.Type getTxType() { Modified: branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/c= ore/impl/portlet/info/PortletIconInfoImpl.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/core/im= pl/portlet/info/PortletIconInfoImpl.java 2007-10-09 22:30:12 UTC (rev 8579) +++ branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/core/im= pl/portlet/info/PortletIconInfoImpl.java 2007-10-10 09:14:51 UTC (rev 8580) @@ -26,7 +26,7 @@ = import org.jboss.portal.core.metadata.portlet.PortletIconMetaData; import org.jboss.portal.core.portlet.info.PortletIconInfo; -import org.jboss.portal.core.portlet.info.PortletInfoInfo; +import org.jboss.portal.portlet.container.PortletApplicationContext; = /** * @author Thomas Heute @@ -36,15 +36,19 @@ { /** . */ private Map icons; + = + /** . */ + private PortletApplicationContext portletApplicationContext; = - public PortletIconInfoImpl(PortletIconMetaData portletIconMetaData) + public PortletIconInfoImpl(PortletApplicationContext portletApplication= Context, PortletIconMetaData portletIconMetaData) { icons =3D portletIconMetaData.getIcons(); + this.portletApplicationContext =3D portletApplicationContext; } = public String getIconLocation(String size) { - return (String)icons.get(size); + return portletApplicationContext.getContextPath() + (String)icons.ge= t(size); } = } Modified: branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/c= ore/impl/portlet/info/PortletInfoInfoImpl.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/core/im= pl/portlet/info/PortletInfoInfoImpl.java 2007-10-09 22:30:12 UTC (rev 8579) +++ branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/core/im= pl/portlet/info/PortletInfoInfoImpl.java 2007-10-10 09:14:51 UTC (rev 8580) @@ -25,6 +25,7 @@ import org.jboss.portal.core.metadata.portlet.PortletInfoMetaData; import org.jboss.portal.core.portlet.info.PortletIconInfo; import org.jboss.portal.core.portlet.info.PortletInfoInfo; +import org.jboss.portal.portlet.container.PortletApplicationContext; = /** * @author Thomas Heute @@ -34,15 +35,19 @@ { /** . */ private PortletInfoMetaData portletInfoMetaData; + = + /** . */ + private PortletApplicationContext portletApplicationContext; = - public PortletInfoInfoImpl(PortletInfoMetaData portletInfoMetaData) + public PortletInfoInfoImpl(PortletApplicationContext portletApplication= Context, PortletInfoMetaData portletInfoMetaData) { + this.portletApplicationContext =3D portletApplicationContext; this.portletInfoMetaData =3D portletInfoMetaData; } = public PortletIconInfo getPortletIconInfo() { - return new PortletIconInfoImpl(portletInfoMetaData.getPortletIcon()); + return new PortletIconInfoImpl(portletApplicationContext, portletInf= oMetaData.getPortletIcon()); } = } Modified: branches/JBoss_Portal_Branch_2_6/core/src/resources/portal-core-s= ar/dtd/jboss-portlet_2_6.dtd =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/core/src/resources/portal-core-sar/dtd= /jboss-portlet_2_6.dtd 2007-10-09 22:30:12 UTC (rev 8579) +++ branches/JBoss_Portal_Branch_2_6/core/src/resources/portal-core-sar/dtd= /jboss-portlet_2_6.dtd 2007-10-10 09:14:51 UTC (rev 8580) @@ -107,17 +107,17 @@ = = = Modified: branches/JBoss_Portal_Branch_2_6/core-admin/src/main/org/jboss/po= rtal/core/admin/ui/AdminPropertyResolver.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/core-admin/src/main/org/jboss/portal/c= ore/admin/ui/AdminPropertyResolver.java 2007-10-09 22:30:12 UTC (rev 8579) +++ branches/JBoss_Portal_Branch_2_6/core-admin/src/main/org/jboss/portal/c= ore/admin/ui/AdminPropertyResolver.java 2007-10-10 09:14:51 UTC (rev 8580) @@ -32,6 +32,9 @@ import org.jboss.portal.core.model.portal.PortalObject; import org.jboss.portal.core.model.portal.PortalObjectId; import org.jboss.portal.core.model.portal.PortalObjectPath; +import org.jboss.portal.core.portlet.info.CorePortletInfo; +import org.jboss.portal.core.portlet.info.PortletIconInfo; +import org.jboss.portal.core.portlet.info.PortletInfoInfo; import org.jboss.portal.faces.el.DelegatingPropertyResolver; import org.jboss.portal.faces.el.decorator.AbstractBeanDecorator; import org.jboss.portal.faces.el.decorator.AbstractPropertyDecorator; @@ -187,6 +190,40 @@ return new ArrayList(portlet.getInfo().getCapabilities().getAl= lLocales()); } }); + portletDecorator.setProperty("smallIconLocation", new AbstractProper= tyDecorator(String.class) + { + public Object getValue(Object bean) throws IllegalArgumentExcepti= on + { + Portlet portlet =3D (Portlet)bean; + CorePortletInfo cInfo =3D (CorePortletInfo)portlet.getInfo(); + PortletInfoInfo portletInfo =3D cInfo.getPortletInfo(); + if (portletInfo !=3D null && portletInfo.getPortletIconInfo() = !=3D null && portletInfo.getPortletIconInfo().getIconLocation(PortletIconIn= fo.SMALL) !=3D null) + { + return portletInfo.getPortletIconInfo().getIconLocation(Por= tletIconInfo.SMALL); + } + else + { + return ""; + } + } + }); + portletDecorator.setProperty("largeIconLocation", new AbstractProper= tyDecorator(String.class) + { + public Object getValue(Object bean) throws IllegalArgumentExcepti= on + { + Portlet portlet =3D (Portlet)bean; + CorePortletInfo cInfo =3D (CorePortletInfo)portlet.getInfo(); + PortletInfoInfo portletInfo =3D cInfo.getPortletInfo(); + if (portletInfo !=3D null && portletInfo.getPortletIconInfo() = !=3D null && portletInfo.getPortletIconInfo().getIconLocation(PortletIconIn= fo.LARGE) !=3D null) + { + return portletInfo.getPortletIconInfo().getIconLocation(Por= tletIconInfo.LARGE); + } + else + { + return ""; + } + } + }); registerDecorator(Portlet.class, portletDecorator); = // Modified: branches/JBoss_Portal_Branch_2_6/portlet-server/src/main/org/jbos= s/portal/portlet/deployment/jboss/PortletAppDeployment.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/portlet-server/src/main/org/jboss/port= al/portlet/deployment/jboss/PortletAppDeployment.java 2007-10-09 22:30:12 U= TC (rev 8579) +++ branches/JBoss_Portal_Branch_2_6/portlet-server/src/main/org/jboss/port= al/portlet/deployment/jboss/PortletAppDeployment.java 2007-10-10 09:14:51 U= TC (rev 8580) @@ -143,7 +143,8 @@ portletAppMD, jbossAppMD, pwa.getServletContext(), - pwa.getClassLoader() + pwa.getClassLoader(), + pwa.getContextPath() ); = // Install portlet containers Modified: docs/trunk/referenceGuide/en/modules/xmldescriptors.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- docs/trunk/referenceGuide/en/modules/xmldescriptors.xml 2007-10-09 22:3= 0:12 UTC (rev 8579) +++ docs/trunk/referenceGuide/en/modules/xmldescriptors.xml 2007-10-10 09:1= 4:51 UTC (rev 8580) @@ -965,12 +965,14 @@ ManagementPortlet - /myPortetAppContext/images/smallIcon.png - /myPortetAppContext/images/largeIcon.png + /images/smallIcon.png + /images/largeIcon.png ]]> + The reference can be absolute (http://www.example.com/images/smallIc= on.png) or relative to the + webapp context if starting with a '/'. Those icons can be used by different part of the portal Use= r Interface. --===============4138163259352612556==-- From portal-commits at lists.jboss.org Wed Oct 10 06:35:24 2007 Content-Type: multipart/mixed; boundary="===============6165334694318179608==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8581 - in modules/portlet/trunk: portlet/src/main/org/jboss/portal/portlet/impl/container and 5 other directories. Date: Wed, 10 Oct 2007 06:35:19 -0400 Message-ID: --===============6165334694318179608== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: thomas.heute(a)jboss.com Date: 2007-10-10 06:35:18 -0400 (Wed, 10 Oct 2007) New Revision: 8581 Modified: modules/portlet/trunk/portlet/src/main/org/jboss/portal/portlet/containe= r/PortletApplicationContext.java modules/portlet/trunk/portlet/src/main/org/jboss/portal/portlet/impl/con= tainer/PortletApplicationContextImpl.java modules/portlet/trunk/portlet/src/main/org/jboss/portal/portlet/impl/jsr= 168/PortletContainerImpl.java modules/portlet/trunk/portlet/src/main/org/jboss/portal/portlet/impl/jsr= 168/PortletInfoFactoryImpl.java modules/portlet/trunk/portlet/src/main/org/jboss/portal/portlet/impl/jsr= 168/api/PortletRequestImpl.java modules/portlet/trunk/portlet/src/main/org/jboss/portal/portlet/impl/jsr= 168/info/ContainerPortletInfo.java modules/portlet/trunk/portlet/src/main/org/jboss/portal/portlet/impl/jsr= 168/spi/PortletInfoFactory.java modules/portlet/trunk/test/src/main/org/jboss/portal/portlet/test/Portle= tApplicationDeployment.java Log: - PortletApplicationContext gets access to the webapp context - Info Metadata gets access to the portletApplicationContext Modified: modules/portlet/trunk/portlet/src/main/org/jboss/portal/portlet/c= ontainer/PortletApplicationContext.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/portlet/trunk/portlet/src/main/org/jboss/portal/portlet/contain= er/PortletApplicationContext.java 2007-10-10 09:14:51 UTC (rev 8580) +++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/portlet/contain= er/PortletApplicationContext.java 2007-10-10 10:35:18 UTC (rev 8581) @@ -42,6 +42,13 @@ ServletContext getServletContext(); = /** + * Returns the context path of the web application + * = + * @return the context path + */ + String getContextPath(); + = + /** * Return the classloader. * * @return the classloader Modified: modules/portlet/trunk/portlet/src/main/org/jboss/portal/portlet/i= mpl/container/PortletApplicationContextImpl.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/portlet/trunk/portlet/src/main/org/jboss/portal/portlet/impl/co= ntainer/PortletApplicationContextImpl.java 2007-10-10 09:14:51 UTC (rev 858= 0) +++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/portlet/impl/co= ntainer/PortletApplicationContextImpl.java 2007-10-10 10:35:18 UTC (rev 858= 1) @@ -71,6 +71,9 @@ = /** . */ private PortletApplicationRegistrationContext registrationContext; + = + /** . */ + private String contextPath; = public PortletApplicationContextImpl( PortletApplicationRegistry registry, @@ -79,7 +82,8 @@ PortletApplicationMetaData portletAppMD, JBossApplicationMetaData jbossAppMD, ServletContext servletContext, - ClassLoader classLoader) + ClassLoader classLoader, + String contextPath) { this.registry =3D registry; this.portletAPIFactory =3D portletAPIFactory; @@ -88,6 +92,7 @@ this.jbossAppMD =3D jbossAppMD; this.servletContext =3D servletContext; this.classLoader =3D classLoader; + this.contextPath =3D contextPath; } = public PortletApplicationImpl getPortletApplication() @@ -189,6 +194,11 @@ return servletContext; } = + public String getContextPath() + { + return contextPath; + } + = public ClassLoader getClassLoader() { return classLoader; Modified: modules/portlet/trunk/portlet/src/main/org/jboss/portal/portlet/i= mpl/jsr168/PortletContainerImpl.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/portlet/trunk/portlet/src/main/org/jboss/portal/portlet/impl/js= r168/PortletContainerImpl.java 2007-10-10 09:14:51 UTC (rev 8580) +++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/portlet/impl/js= r168/PortletContainerImpl.java 2007-10-10 10:35:18 UTC (rev 8581) @@ -220,7 +220,7 @@ bundleMgr); = // Create meta data - PortletInfo info =3D application.getPortletInfoFactory().createPortl= etInfo(metaData, jbossMetaData, bundleMgr); + PortletInfo info =3D application.getPortletInfoFactory().createPortl= etInfo(application.getContext(), metaData, jbossMetaData, bundleMgr); = // Finally initialize the porlet instance try Modified: modules/portlet/trunk/portlet/src/main/org/jboss/portal/portlet/i= mpl/jsr168/PortletInfoFactoryImpl.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/portlet/trunk/portlet/src/main/org/jboss/portal/portlet/impl/js= r168/PortletInfoFactoryImpl.java 2007-10-10 09:14:51 UTC (rev 8580) +++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/portlet/impl/js= r168/PortletInfoFactoryImpl.java 2007-10-10 10:35:18 UTC (rev 8581) @@ -22,6 +22,7 @@ *************************************************************************= *****/ package org.jboss.portal.portlet.impl.jsr168; = +import org.jboss.portal.portlet.container.PortletApplicationContext; import org.jboss.portal.portlet.impl.jsr168.spi.PortletInfoFactory; import org.jboss.portal.portlet.impl.jsr168.metadata.PortletMetaData; import org.jboss.portal.portlet.impl.jsr168.info.ContainerPortletInfo; @@ -35,8 +36,8 @@ */ public class PortletInfoFactoryImpl implements PortletInfoFactory { - public PortletInfo createPortletInfo(PortletMetaData portletMD, JBossPo= rtletMetaData jbossPortletMD, ResourceBundleManager resourceBundleManager) + public PortletInfo createPortletInfo(PortletApplicationContext portletA= pplicationContext, PortletMetaData portletMD, JBossPortletMetaData jbossPor= tletMD, ResourceBundleManager resourceBundleManager) { - return new ContainerPortletInfo(portletMD, jbossPortletMD, resourceB= undleManager); + return new ContainerPortletInfo(portletApplicationContext, portletMD= , jbossPortletMD, resourceBundleManager); } } Modified: modules/portlet/trunk/portlet/src/main/org/jboss/portal/portlet/i= mpl/jsr168/api/PortletRequestImpl.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/portlet/trunk/portlet/src/main/org/jboss/portal/portlet/impl/js= r168/api/PortletRequestImpl.java 2007-10-10 09:14:51 UTC (rev 8580) +++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/portlet/impl/js= r168/api/PortletRequestImpl.java 2007-10-10 10:35:18 UTC (rev 8581) @@ -32,10 +32,10 @@ import org.jboss.portal.portlet.impl.jsr168.PortletRequestAttributes; import org.jboss.portal.portlet.impl.jsr168.info.ContainerPreferencesInfo; import org.jboss.portal.portlet.invocation.PortletInvocation; -import org.jboss.portal.portlet.spi.InstanceContext; import org.jboss.portal.portlet.spi.RequestContext; import org.jboss.portal.portlet.spi.SecurityContext; import org.jboss.portal.portlet.spi.UserContext; +import org.jboss.portal.portlet.spi.WindowContext; import org.jboss.portal.portlet.state.PropertyContext; = import javax.portlet.PortalContext; @@ -75,7 +75,7 @@ protected UserContext userContext; protected SecurityContext securityContext; protected RequestContext requestContext; - protected InstanceContext instanceContext; + protected WindowContext windowContext; protected PortletPreferences preferences; protected PortletContainerImpl container; protected HttpServletRequest dreq; @@ -96,7 +96,7 @@ this.userContext =3D invocation.getUserContext(); this.securityContext =3D invocation.getSecurityContext(); this.requestContext =3D invocation.getRequestContext(); - this.instanceContext =3D invocation.getInstanceContext(); + this.windowContext =3D invocation.getWindowContext(); this.container =3D (PortletContainerImpl)invocation.getAttribute(Por= tletInvocation.INVOCATION_SCOPE, PortletContainerInvoker.PORTLET_CONTAINER); this.dreq =3D invocation.getDispatchedRequest(); this.portalContext =3D new PortalContextImpl(invocation.getPortalCon= text()); @@ -393,7 +393,7 @@ PortletApplicationImpl portletApp =3D (PortletApplicationImpl)con= tainer.getApplication(); psession =3D new PortletSessionImpl( hsession, - instanceContext.getId(), + windowContext.getId(), portletApp.getPortletContext()); } else if (psession =3D=3D null) @@ -407,7 +407,7 @@ PortletApplicationImpl portletApp =3D (PortletApplicationImpl)= container.getApplication(); psession =3D new PortletSessionImpl( hsession, - instanceContext.getId(), + windowContext.getId(), portletApp.getPortletContext()); } } Modified: modules/portlet/trunk/portlet/src/main/org/jboss/portal/portlet/i= mpl/jsr168/info/ContainerPortletInfo.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/portlet/trunk/portlet/src/main/org/jboss/portal/portlet/impl/js= r168/info/ContainerPortletInfo.java 2007-10-10 09:14:51 UTC (rev 8580) +++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/portlet/impl/js= r168/info/ContainerPortletInfo.java 2007-10-10 10:35:18 UTC (rev 8581) @@ -23,6 +23,7 @@ package org.jboss.portal.portlet.impl.jsr168.info; = import org.jboss.portal.common.i18n.ResourceBundleManager; +import org.jboss.portal.portlet.container.PortletApplicationContext; import org.jboss.portal.portlet.impl.jsr168.metadata.PortletMetaData; import org.jboss.portal.portlet.info.CacheInfo; import org.jboss.portal.portlet.info.CapabilitiesInfo; @@ -52,6 +53,7 @@ private Boolean remotable; = public ContainerPortletInfo( + PortletApplicationContext portletApplicationContext, PortletMetaData portletMD, JBossPortletMetaData jbossPortletMD, ResourceBundleManager bundleMgr) Modified: modules/portlet/trunk/portlet/src/main/org/jboss/portal/portlet/i= mpl/jsr168/spi/PortletInfoFactory.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/portlet/trunk/portlet/src/main/org/jboss/portal/portlet/impl/js= r168/spi/PortletInfoFactory.java 2007-10-10 09:14:51 UTC (rev 8580) +++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/portlet/impl/js= r168/spi/PortletInfoFactory.java 2007-10-10 10:35:18 UTC (rev 8581) @@ -22,6 +22,7 @@ *************************************************************************= *****/ package org.jboss.portal.portlet.impl.jsr168.spi; = +import org.jboss.portal.portlet.container.PortletApplicationContext; import org.jboss.portal.portlet.info.PortletInfo; import org.jboss.portal.portlet.impl.jsr168.metadata.PortletMetaData; import org.jboss.portal.portlet.metadata.JBossPortletMetaData; @@ -45,6 +46,7 @@ * @return the runtime portlet meta data */ PortletInfo createPortletInfo( + PortletApplicationContext portletApplicationContext, PortletMetaData portletMD, JBossPortletMetaData jbossPortletMD, ResourceBundleManager resourceBundleManager); Modified: modules/portlet/trunk/test/src/main/org/jboss/portal/portlet/test= /PortletApplicationDeployment.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/portlet/trunk/test/src/main/org/jboss/portal/portlet/test/Portl= etApplicationDeployment.java 2007-10-10 09:14:51 UTC (rev 8580) +++ modules/portlet/trunk/test/src/main/org/jboss/portal/portlet/test/Portl= etApplicationDeployment.java 2007-10-10 10:35:18 UTC (rev 8581) @@ -250,4 +250,9 @@ { throw new NotYetImplemented(); } + + public String getContextPath() + { + throw new NotYetImplemented(); + } } --===============6165334694318179608==-- From portal-commits at lists.jboss.org Wed Oct 10 06:46:24 2007 Content-Type: multipart/mixed; boundary="===============7255892593838457971==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8582 - branches/JBoss_Portal_Branch_2_6/build. Date: Wed, 10 Oct 2007 06:46:19 -0400 Message-ID: --===============7255892593838457971== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: thomas.heute(a)jboss.com Date: 2007-10-10 06:46:18 -0400 (Wed, 10 Oct 2007) New Revision: 8582 Modified: branches/JBoss_Portal_Branch_2_6/build/build-thirdparty.xml Log: Use portlet 1.1.0-SNAPSHOT Use 1.0.0 version of the other modules Modified: branches/JBoss_Portal_Branch_2_6/build/build-thirdparty.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/build/build-thirdparty.xml 2007-10-10 = 10:35:18 UTC (rev 8581) +++ branches/JBoss_Portal_Branch_2_6/build/build-thirdparty.xml 2007-10-10 = 10:46:18 UTC (rev 8582) @@ -47,11 +47,11 @@ are pushed to the http://repository.jboss.com site. --> = - - - - - + + + + + --===============7255892593838457971==-- From portal-commits at lists.jboss.org Wed Oct 10 07:06:37 2007 Content-Type: multipart/mixed; boundary="===============4758911021019137562==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8583 - modules/test/trunk/remote/src/resources. Date: Wed, 10 Oct 2007 07:06:35 -0400 Message-ID: --===============4758911021019137562== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: julien(a)jboss.com Date: 2007-10-10 07:06:35 -0400 (Wed, 10 Oct 2007) New Revision: 8583 Added: modules/test/trunk/remote/src/resources/jboss-unit-remote-jar/ Log: forgot to commit a dir --===============4758911021019137562==-- From portal-commits at lists.jboss.org Wed Oct 10 09:30:22 2007 Content-Type: multipart/mixed; boundary="===============7546895096365220061==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8584 - in branches/JBoss_Portal_Branch_2_6: core-samples/src/main/org/jboss/portal/core/samples/basic and 1 other directory. Date: Wed, 10 Oct 2007 09:30:21 -0400 Message-ID: --===============7546895096365220061== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: thomas.heute(a)jboss.com Date: 2007-10-10 09:30:21 -0400 (Wed, 10 Oct 2007) New Revision: 8584 Modified: branches/JBoss_Portal_Branch_2_6/core-samples/src/main/org/jboss/portal/= core/samples/basic/TestPortlet.java branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/core/imp= l/api/node/AbstractPortalNodeURL.java Log: JBPORTAL-1741: PortalURL security not honored With test links in the TestPortlet Modified: branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/c= ore/impl/api/node/AbstractPortalNodeURL.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/core/im= pl/api/node/AbstractPortalNodeURL.java 2007-10-10 11:06:35 UTC (rev 8583) +++ branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/core/im= pl/api/node/AbstractPortalNodeURL.java 2007-10-10 13:30:21 UTC (rev 8584) @@ -53,6 +53,9 @@ /** . */ protected boolean relative; = + /** . */ + protected URLContext urlContext; + public AbstractPortalNodeURL(PortalObjectId id, ControllerContext contr= ollerContext) { this.id =3D id; @@ -74,11 +77,17 @@ public void setAuthenticated(Boolean authenticated) { this.wantAuthenticated =3D authenticated; + + // + this.urlContext =3D null; } = public void setSecure(Boolean secure) { this.wantSecure =3D secure; + + // + this.urlContext =3D null; } = public void setRelative(boolean relative) @@ -88,6 +97,41 @@ = protected URLContext getURLContext() { - return controllerContext.getServerInvocation().getServerContext().ge= tURLContext(); + if (urlContext =3D=3D null) + { + URLContext tmp =3D controllerContext.getServerInvocation().getSer= verContext().getURLContext(); + + // + if (wantSecure !=3D null) + { + if (wantSecure.booleanValue()) + { + tmp =3D tmp.asSecured(); + } + else + { + tmp =3D tmp.asNonSecured(); + } + } + + // + if (wantAuthenticated !=3D null) + { + if (wantAuthenticated.booleanValue()) + { + tmp =3D tmp.asAuthenticated(); + } + else + { + tmp =3D tmp.asNonAuthenticated(); + } + } + + // + urlContext =3D tmp; + } + + // + return urlContext; } } Modified: branches/JBoss_Portal_Branch_2_6/core-samples/src/main/org/jboss/= portal/core/samples/basic/TestPortlet.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/core-samples/src/main/org/jboss/portal= /core/samples/basic/TestPortlet.java 2007-10-10 11:06:35 UTC (rev 8583) +++ branches/JBoss_Portal_Branch_2_6/core-samples/src/main/org/jboss/portal= /core/samples/basic/TestPortlet.java 2007-10-10 13:30:21 UTC (rev 8584) @@ -22,6 +22,7 @@ *************************************************************************= *****/ package org.jboss.portal.core.samples.basic; = +import org.jboss.portal.api.node.PortalNodeURL; import org.jboss.portal.common.transaction.TransactionManagerProvider; import org.jboss.portal.core.CoreConstants; import org.jboss.portal.identity.User; @@ -147,7 +148,32 @@ writer.write(""); writer.write("

"); = + PortalNodeURL nodeURL =3D resp.createRenderURL(req.getPortalNode()); + String nothingURL =3D nodeURL.toString(); + nodeURL.setAuthenticated(Boolean.TRUE); + nodeURL.setSecure(Boolean.TRUE); + String authenticatedSecureURL =3D nodeURL.toString(); + nodeURL.setAuthenticated(Boolean.TRUE); + nodeURL.setSecure(Boolean.FALSE); + String authenticatedNotSecureURL =3D nodeURL.toString(); + nodeURL.setAuthenticated(Boolean.FALSE); + nodeURL.setSecure(Boolean.FALSE); + String notAuthenticatedNotSecureURL =3D nodeURL.toString(); + nodeURL.setAuthenticated(Boolean.FALSE); + nodeURL.setSecure(Boolean.TRUE); + String notAuthenticatedSecureURL =3D nodeURL.toString(); writer.write("

"); + writer.write("

Portal node UR= Ls
"); + writer.write(""); + writer.write("

"); + + writer.write("

"); writer.write("

Path
"); writer.write("
"); writer.write("
portal path info =3D " + req.getAttribute("PATH")= + "
"); --===============7546895096365220061==-- From portal-commits at lists.jboss.org Wed Oct 10 09:37:03 2007 Content-Type: multipart/mixed; boundary="===============5556774221469704515==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8585 - in modules/test/trunk: build/ide/intellij/idea60/modules/remote and 5 other directories. Date: Wed, 10 Oct 2007 09:37:03 -0400 Message-ID: --===============5556774221469704515== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: julien(a)jboss.com Date: 2007-10-10 09:37:03 -0400 (Wed, 10 Oct 2007) New Revision: 8585 Modified: modules/test/trunk/build/ide/intellij/idea60/modules/mc/mc.iml modules/test/trunk/build/ide/intellij/idea60/modules/remote/remote.iml modules/test/trunk/build/ide/intellij/idea60/modules/tooling/tooling.iml modules/test/trunk/unit/src/main/org/jboss/test/unit/runner/TestDriverRu= nnerTests.java modules/test/trunk/unit/src/main/org/jboss/unit/info/impl/SimpleTestInfo= .java modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/driver/TestD= riverRunner.java modules/test/trunk/unit/src/main/org/jboss/unit/util/CollectionTools.java Log: added test case for end test event containing the test parametrization Modified: modules/test/trunk/build/ide/intellij/idea60/modules/mc/mc.iml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/build/ide/intellij/idea60/modules/mc/mc.iml 2007-10-= 10 13:30:21 UTC (rev 8584) +++ modules/test/trunk/build/ide/intellij/idea60/modules/mc/mc.iml 2007-10-= 10 13:37:03 UTC (rev 8585) @@ -173,5 +173,9 @@ + + = Modified: modules/test/trunk/build/ide/intellij/idea60/modules/remote/remot= e.iml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/build/ide/intellij/idea60/modules/remote/remote.iml = 2007-10-10 13:30:21 UTC (rev 8584) +++ modules/test/trunk/build/ide/intellij/idea60/modules/remote/remote.iml = 2007-10-10 13:37:03 UTC (rev 8585) @@ -39,5 +39,9 @@ + + = Modified: modules/test/trunk/build/ide/intellij/idea60/modules/tooling/tool= ing.iml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/build/ide/intellij/idea60/modules/tooling/tooling.im= l 2007-10-10 13:30:21 UTC (rev 8584) +++ modules/test/trunk/build/ide/intellij/idea60/modules/tooling/tooling.im= l 2007-10-10 13:37:03 UTC (rev 8585) @@ -11,5 +11,9 @@ + + = Modified: modules/test/trunk/unit/src/main/org/jboss/test/unit/runner/TestD= riverRunnerTests.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/test/unit/runner/TestDriverR= unnerTests.java 2007-10-10 13:30:21 UTC (rev 8584) +++ modules/test/trunk/unit/src/main/org/jboss/test/unit/runner/TestDriverR= unnerTests.java 2007-10-10 13:37:03 UTC (rev 8585) @@ -26,6 +26,7 @@ import org.jboss.unit.runner.TestRunnerEventListener; import org.jboss.unit.runner.TestRunnerEvent; import org.jboss.unit.runner.TestResult; +import org.jboss.unit.runner.ParametrizationSet; import org.jboss.unit.runner.results.TestFailure; import org.jboss.unit.runner.results.TestSuccess; import org.jboss.unit.runner.event.EndTestEvent; @@ -40,12 +41,17 @@ import org.jboss.unit.info.TestInfo; import org.jboss.unit.info.impl.SimpleTestSuiteInfo; import org.jboss.unit.info.impl.SimpleTestCaseInfo; +import org.jboss.unit.info.impl.SimpleParameterInfo; import org.jboss.unit.TestId; import org.jboss.unit.FailureType; import org.jboss.unit.Failure; = import java.util.List; import java.util.ArrayList; +import java.util.Map; +import java.util.HashMap; +import java.util.Set; +import java.util.HashSet; = import static org.jboss.unit.api.Assert.*; import static org.jboss.unit.api.Assert.assertEquals; @@ -57,42 +63,138 @@ public class TestDriverRunnerTests { = - private static class Blah implements TestRunnerEventListener + public static void main(String[] args) { + testEmptyDriver(); = - /** . */ - private final List events =3D new ArrayList(); + // + testTestDriverInvokeTestCaseReturnsNull(); + testTestDriverInvokeTestCaseReturnsAnEndTestResponse(); + testTestDriverInvokeTestCaseReturnsAFailureResponse(); + testTestDriverInvokeTestCaseThrowsRuntimeException(); + testTestDriverInvokeTestCaseThrowsError(); = - public void onEvent(TestRunnerEvent event) + // + testInvokeTestCaseWithParameters1(); + testInvokeTestCaseWithParameters2(); + + // testInvokeTestSuiteWithParameters() + } + + private static void testInvokeTestCaseWithParameters1() + { + Map tmp =3D new HashMap(); + tmp.put("foo", new String[]{"bar"}); + ParametrizationSet parametrizationSet =3D new ParametrizationSet(tmp= ); + + // + TestDriverImpl testDriver =3D new TestDriverImpl() { - events.add(event); - } + public DriverResponse invoke(TestId id, DriverCommand command) + { + return new EndTestResponse(); + } + }; + testDriver.info.addTest(new SimpleTestCaseInfo("Foo")); + TestDriverRunner runner =3D new TestDriverRunner(testDriver, paramet= rizationSet, new TestId()); + + // + EventList listener =3D new EventList(); + runner.addListener(listener); + + // + runner.run(); + + // + assertEquals(4, listener.events.size()); + assertStartRunnerEvent(listener.events.get(0)); + assertStartTestEvent(listener.events.get(1), new TestId("Foo")); + assertEndTestEvent(listener.events.get(2), new TestId("Foo"), new Te= stSuccess(0)); + assertEndRunnerEvent(listener.events.get(3)); + + // Check parametrization + Set> s1 =3D new HashSet>(); + s1.add(new HashMap()); + Set> s2 =3D new HashSet>(); + s2.add(((EndTestEvent)listener.events.get(2)).getTestResult().getPar= ametrization()); + assertEquals(s1, s2); } = - public static void main(String[] args) + private static void testInvokeTestCaseWithParameters2() { - testEmptyDriver(); - testTestDriverInvokeReturnsNull(); - testTestDriverInvokeReturnsAnEndTestResponse(); - testTestDriverInvokeReturnsAFailureResponse(); - testTestDriverInvokeThrowsRuntimeException(); + Map tmp =3D new HashMap(); + tmp.put("foo", new String[]{"bar1","bar2"}); + ParametrizationSet parametrizationSet =3D new ParametrizationSet(tmp= ); = + // + TestDriverImpl testDriver =3D new TestDriverImpl() + { + public DriverResponse invoke(TestId id, DriverCommand command) + { + return new EndTestResponse(); + } + }; + SimpleTestCaseInfo caseInfo =3D new SimpleTestCaseInfo("Foo"); + Map blah =3D new HashMap(caseInfo.getParameters()); + blah.put("foo", new SimpleParameterInfo("foo")); + caseInfo.setParameters(blah); + testDriver.info.addTest(caseInfo); + TestDriverRunner runner =3D new TestDriverRunner(testDriver, paramet= rizationSet, new TestId()); = + // + EventList listener =3D new EventList(); + runner.addListener(listener); + + // + runner.run(); + + // + assertEquals(6, listener.events.size()); + assertStartRunnerEvent(listener.events.get(0)); + assertStartTestEvent(listener.events.get(1), new TestId("Foo")); + assertEndTestEvent(listener.events.get(2), new TestId("Foo"), new Te= stSuccess(0)); + assertStartTestEvent(listener.events.get(3), new TestId("Foo")); + assertEndTestEvent(listener.events.get(4), new TestId("Foo"), new Te= stSuccess(0)); + assertEndRunnerEvent(listener.events.get(5)); + + // Check parametrization + Set> s1 =3D new HashSet>(); + Map p1 =3D new HashMap(); + p1.put("foo", "bar1"); + Map p2 =3D new HashMap(); + p2.put("foo", "bar2"); + s1.add(p1); + s1.add(p2); + Set> s2 =3D new HashSet>(); + s2.add(((EndTestEvent)listener.events.get(2)).getTestResult().getPar= ametrization()); + s2.add(((EndTestEvent)listener.events.get(4)).getTestResult().getPar= ametrization()); + assertEquals(s1, s2); } = private static void testEmptyDriver() { TestDriverImpl testDriver =3D new TestDriverImpl(); TestDriverRunner runner =3D new TestDriverRunner(testDriver, new Tes= tId()); + + // + EventList listener =3D new EventList(); + runner.addListener(listener); + + // runner.run(); + + // + assertEquals(2, listener.events.size()); + assertStartRunnerEvent(listener.events.get(0)); + assertEndRunnerEvent(listener.events.get(1)); } = - private static void testTestDriverInvokeReturnsNull() + private static void testTestDriverInvokeTestCaseReturnsNull() { TestDriverImpl testDriver =3D new TestDriverImpl(); testDriver.info.addTest(new SimpleTestCaseInfo("Foo")); TestDriverRunner runner =3D new TestDriverRunner(testDriver, new Tes= tId()); - Blah listener =3D new Blah(); + EventList listener =3D new EventList(); runner.addListener(listener); = // @@ -106,7 +208,7 @@ assertEndRunnerEvent(listener.events.get(3)); } = - private static void testTestDriverInvokeReturnsAnEndTestResponse() + private static void testTestDriverInvokeTestCaseReturnsAnEndTestRespons= e() { TestDriverImpl testDriver =3D new TestDriverImpl() { @@ -117,7 +219,7 @@ }; testDriver.info.addTest(new SimpleTestCaseInfo("Foo")); TestDriverRunner runner =3D new TestDriverRunner(testDriver, new Tes= tId()); - Blah listener =3D new Blah(); + EventList listener =3D new EventList(); runner.addListener(listener); = // = @@ -131,7 +233,7 @@ assertEndRunnerEvent(listener.events.get(3)); } = - private static void testTestDriverInvokeReturnsAFailureResponse() + private static void testTestDriverInvokeTestCaseReturnsAFailureResponse= () { TestDriverImpl testDriver =3D new TestDriverImpl() { @@ -142,7 +244,7 @@ }; testDriver.info.addTest(new SimpleTestCaseInfo("Foo")); TestDriverRunner runner =3D new TestDriverRunner(testDriver, new Tes= tId()); - Blah listener =3D new Blah(); + EventList listener =3D new EventList(); runner.addListener(listener); = // @@ -156,7 +258,7 @@ assertEndRunnerEvent(listener.events.get(3)); } = - private static void testTestDriverInvokeThrowsRuntimeException() + private static void testTestDriverInvokeTestCaseThrowsRuntimeException() { TestDriverImpl testDriver =3D new TestDriverImpl() { @@ -167,7 +269,7 @@ }; testDriver.info.addTest(new SimpleTestCaseInfo("Foo")); TestDriverRunner runner =3D new TestDriverRunner(testDriver, new Tes= tId()); - Blah listener =3D new Blah(); + EventList listener =3D new EventList(); runner.addListener(listener); = // @@ -181,6 +283,39 @@ assertEndRunnerEvent(listener.events.get(3)); } = + private static void testTestDriverInvokeTestCaseThrowsError() + { + final Error error =3D new Error(); + + // + TestDriverImpl testDriver =3D new TestDriverImpl() + { + public DriverResponse invoke(TestId id, DriverCommand command) + { + throw error; + } + }; + testDriver.info.addTest(new SimpleTestCaseInfo("Foo")); + TestDriverRunner runner =3D new TestDriverRunner(testDriver, new Tes= tId()); + EventList listener =3D new EventList(); + runner.addListener(listener); + + // + try + { + runner.run(); + } + catch (Error e) + { + assertSame(error, e); + } + + // + assertEquals(2, listener.events.size()); + assertStartRunnerEvent(listener.events.get(0)); + assertStartTestEvent(listener.events.get(1), new TestId("Foo")); + } + private static class TestDriverImpl implements TestDriver { = @@ -209,20 +344,22 @@ assertEquals(expectedTestId, startEvent.getTestId()); } = - private static void assertEndTestEvent(TestRunnerEvent event, TestId ex= pectedTestId, TestResult expectedResult) + private static void assertEndTestEvent(TestRunnerEvent event, TestId ex= pectedTestId, TestResult expectedTestResult) { EndTestEvent endEvent =3D assertInstanceOf(event, EndTestEvent.class= ); assertEquals(expectedTestId, endEvent.getTestId()); - if (expectedResult instanceof TestFailure) + + // + TestResult testResult =3D endEvent.getTestResult(); + if (expectedTestResult instanceof TestFailure) { - TestFailure expectedTestFailure =3D (TestFailure)expectedResult; - TestFailure testFailure =3D assertInstanceOf(endEvent.getTestResu= lt(), TestFailure.class); + TestFailure expectedTestFailure =3D (TestFailure)expectedTestResu= lt; + TestFailure testFailure =3D assertInstanceOf(testResult, TestFail= ure.class); assertEquals(expectedTestFailure.getFailure().getType(), testFail= ure.getFailure().getType()); } - else if (expectedResult instanceof TestSuccess) + else if (expectedTestResult instanceof TestSuccess) { - TestSuccess expectedTestSuccess =3D (TestSuccess)expectedResult; - TestSuccess testSuccess =3D assertInstanceOf(endEvent.getTestResu= lt(), TestSuccess.class); + assertInstanceOf(testResult, TestSuccess.class); } } = @@ -230,4 +367,16 @@ { assertInstanceOf(event, EndRunnerEvent.class); } + + private static class EventList implements TestRunnerEventListener + { + + /** . */ + private final List events =3D new ArrayList(); + + public void onEvent(TestRunnerEvent event) + { + events.add(event); + } + } } Modified: modules/test/trunk/unit/src/main/org/jboss/unit/info/impl/SimpleT= estInfo.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/info/impl/SimpleTestInf= o.java 2007-10-10 13:30:21 UTC (rev 8584) +++ modules/test/trunk/unit/src/main/org/jboss/unit/info/impl/SimpleTestInf= o.java 2007-10-10 13:37:03 UTC (rev 8585) @@ -100,7 +100,7 @@ this.description =3D description; } = - public Map getParameters() + public Map getParameters() { return Collections.unmodifiableMap(parameters); } Modified: modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/drive= r/TestDriverRunner.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/driver/Test= DriverRunner.java 2007-10-10 13:30:21 UTC (rev 8584) +++ modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/driver/Test= DriverRunner.java 2007-10-10 13:37:03 UTC (rev 8585) @@ -132,13 +132,13 @@ catch (Exception e) { Failure failure =3D new Failure("The test driver threw a= n unexpected exception ", e, FailureType.ERROR); - result =3D new TestFailure(failure, 0); + result =3D new TestFailure(failure, parametrization, 0); } = // if (result =3D=3D null) { - result =3D unwrap(response); + result =3D unwrap(response, parametrization); } = // @@ -148,22 +148,22 @@ } } = - private TestResult unwrap(DriverResponse response) + private TestResult unwrap(DriverResponse response, Map p= arametrization) { if (response instanceof EndTestResponse) { - return new TestSuccess(0); + return new TestSuccess(parametrization, 0); } else if (response instanceof FailureResponse) { FailureResponse failureResponse =3D (FailureResponse)response; Failure failure =3D failureResponse.getFailure(); - return new TestFailure(failure, 0); + return new TestFailure(failure, parametrization, 0); } else { Failure failure =3D new Failure("The test driver returned an unex= pected response " + response, FailureType.ERROR); - return new TestFailure(failure, 0); + return new TestFailure(failure, parametrization, 0); } } } Modified: modules/test/trunk/unit/src/main/org/jboss/unit/util/CollectionTo= ols.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/util/CollectionTools.ja= va 2007-10-10 13:30:21 UTC (rev 8584) +++ modules/test/trunk/unit/src/main/org/jboss/unit/util/CollectionTools.ja= va 2007-10-10 13:37:03 UTC (rev 8585) @@ -102,4 +102,5 @@ } return collection; } + } --===============5556774221469704515==-- From portal-commits at lists.jboss.org Wed Oct 10 09:45:09 2007 Content-Type: multipart/mixed; boundary="===============3224461895046174530==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8586 - in modules/test/trunk/unit/src/main/org/jboss: test/unit/runner and 2 other directories. Date: Wed, 10 Oct 2007 09:45:09 -0400 Message-ID: --===============3224461895046174530== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: julien(a)jboss.com Date: 2007-10-10 09:45:09 -0400 (Wed, 10 Oct 2007) New Revision: 8586 Modified: modules/test/trunk/unit/src/main/org/jboss/test/unit/blah/TestedClass1.j= ava modules/test/trunk/unit/src/main/org/jboss/test/unit/runner/TestDriverRu= nnerTests.java modules/test/trunk/unit/src/main/org/jboss/unit/report/impl/console/Prin= tListener.java modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/driver/TestD= riverRunner.java Log: handle test duration in test runner event Modified: modules/test/trunk/unit/src/main/org/jboss/test/unit/blah/TestedC= lass1.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/test/unit/blah/TestedClass1.= java 2007-10-10 13:37:03 UTC (rev 8585) +++ modules/test/trunk/unit/src/main/org/jboss/test/unit/blah/TestedClass1.= java 2007-10-10 13:45:09 UTC (rev 8586) @@ -32,8 +32,9 @@ { = @Test - public void testFoo() + public void testFoo() throws InterruptedException { + Thread.sleep(20); } = @Test Modified: modules/test/trunk/unit/src/main/org/jboss/test/unit/runner/TestD= riverRunnerTests.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/test/unit/runner/TestDriverR= unnerTests.java 2007-10-10 13:37:03 UTC (rev 8585) +++ modules/test/trunk/unit/src/main/org/jboss/test/unit/runner/TestDriverR= unnerTests.java 2007-10-10 13:45:09 UTC (rev 8586) @@ -78,7 +78,8 @@ testInvokeTestCaseWithParameters1(); testInvokeTestCaseWithParameters2(); = - // testInvokeTestSuiteWithParameters() + // + // testInvokeTestSuiteWithParameters(); } = private static void testInvokeTestCaseWithParameters1() Modified: modules/test/trunk/unit/src/main/org/jboss/unit/report/impl/conso= le/PrintListener.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/report/impl/console/Pri= ntListener.java 2007-10-10 13:37:03 UTC (rev 8585) +++ modules/test/trunk/unit/src/main/org/jboss/unit/report/impl/console/Pri= ntListener.java 2007-10-10 13:45:09 UTC (rev 8586) @@ -71,13 +71,13 @@ TestResult testResult =3D endTestEvent.getTestResult(); if (testResult instanceof TestSuccess) { - System.out.println("Test id=3D" + testId + " is successful"); + System.out.println("Test id=3D" + testId + " is successful (" = + testResult.getDurationMillis() + "ms)"); } else if (testResult instanceof TestFailure) { TestFailure testFailure =3D (TestFailure)testResult; Failure failure =3D testFailure.getFailure(); - System.out.println("Test id=3D" + testId + " " + failure.getTy= pe() + " failed " + failure.getMessage()); + System.out.println("Test id=3D" + testId + " " + failure.getTy= pe() + " failed " + failure.getMessage() + " (" + testResult.getDurationMil= lis() + "ms)"); if (failure.getCause() !=3D null) { failure.getCause().printStackTrace(); Modified: modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/drive= r/TestDriverRunner.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/driver/Test= DriverRunner.java 2007-10-10 13:37:03 UTC (rev 8585) +++ modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/driver/Test= DriverRunner.java 2007-10-10 13:45:09 UTC (rev 8586) @@ -124,21 +124,31 @@ TestResult result =3D null; = // + long duration =3D -System.currentTimeMillis(); + + // DriverResponse response =3D null; try { - response =3D driver.invoke(testId, command); + try + { + response =3D driver.invoke(testId, command); + } + finally + { + duration +=3D System.currentTimeMillis(); + } } catch (Exception e) { Failure failure =3D new Failure("The test driver threw a= n unexpected exception ", e, FailureType.ERROR); - result =3D new TestFailure(failure, parametrization, 0); + result =3D new TestFailure(failure, parametrization, dur= ation); } = // if (result =3D=3D null) { - result =3D unwrap(response, parametrization); + result =3D unwrap(response, parametrization, duration); } = // @@ -148,22 +158,22 @@ } } = - private TestResult unwrap(DriverResponse response, Map p= arametrization) + private TestResult unwrap(DriverResponse response, Map p= arametrization, long duration) { if (response instanceof EndTestResponse) { - return new TestSuccess(parametrization, 0); + return new TestSuccess(parametrization, duration); } else if (response instanceof FailureResponse) { FailureResponse failureResponse =3D (FailureResponse)response; Failure failure =3D failureResponse.getFailure(); - return new TestFailure(failure, parametrization, 0); + return new TestFailure(failure, parametrization, duration); } else { Failure failure =3D new Failure("The test driver returned an unex= pected response " + response, FailureType.ERROR); - return new TestFailure(failure, parametrization, 0); + return new TestFailure(failure, parametrization, duration); } } } --===============3224461895046174530==-- From portal-commits at lists.jboss.org Wed Oct 10 10:07:54 2007 Content-Type: multipart/mixed; boundary="===============1207104424265287975==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8587 - modules/test/trunk/unit/src/main/org/jboss/test/unit/runner. Date: Wed, 10 Oct 2007 10:07:54 -0400 Message-ID: --===============1207104424265287975== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: julien(a)jboss.com Date: 2007-10-10 10:07:54 -0400 (Wed, 10 Oct 2007) New Revision: 8587 Modified: modules/test/trunk/unit/src/main/org/jboss/test/unit/runner/TestDriverRu= nnerTests.java Log: completed test case for test driver runner Modified: modules/test/trunk/unit/src/main/org/jboss/test/unit/runner/TestD= riverRunnerTests.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/test/unit/runner/TestDriverR= unnerTests.java 2007-10-10 13:45:09 UTC (rev 8586) +++ modules/test/trunk/unit/src/main/org/jboss/test/unit/runner/TestDriverR= unnerTests.java 2007-10-10 14:07:54 UTC (rev 8587) @@ -36,6 +36,7 @@ import org.jboss.unit.driver.TestDriver; import org.jboss.unit.driver.DriverResponse; import org.jboss.unit.driver.DriverCommand; +import org.jboss.unit.driver.command.StartTestCommand; import org.jboss.unit.driver.response.EndTestResponse; import org.jboss.unit.driver.response.FailureResponse; import org.jboss.unit.info.TestInfo; @@ -53,6 +54,7 @@ import java.util.Set; import java.util.HashSet; = +import static org.jboss.unit.util.CollectionTools.*; import static org.jboss.unit.api.Assert.*; import static org.jboss.unit.api.Assert.assertEquals; = @@ -79,9 +81,42 @@ testInvokeTestCaseWithParameters2(); = // - // testInvokeTestSuiteWithParameters(); + testInvokeTestSuite(); } = + private static void testInvokeTestSuite() + { + TestDriverImpl testDriver =3D new TestDriverImpl() + { + public DriverResponse invoke2(TestId id, DriverCommand command) + { + return new EndTestResponse(); + } + }; + testDriver.info.addTest(new SimpleTestCaseInfo("Foo")); + testDriver.info.addTest(new SimpleTestCaseInfo("Bar")); + TestDriverRunner runner =3D new TestDriverRunner(testDriver, new Tes= tId()); + + // + EventList listener =3D new EventList(); + runner.addListener(listener); + + // + runner.run(); + + // + testDriver.assertIdList(list(new TestId("Foo"), new TestId("Bar"))); + + // + assertEquals(6, listener.events.size()); + assertStartRunnerEvent(listener.events.get(0)); + assertStartTestEvent(listener.events.get(1), new TestId("Foo")); + assertEndTestEvent(listener.events.get(2), new TestId("Foo"), new Te= stSuccess(0)); + assertStartTestEvent(listener.events.get(3), new TestId("Bar")); + assertEndTestEvent(listener.events.get(4), new TestId("Bar"), new Te= stSuccess(0)); + assertEndRunnerEvent(listener.events.get(5)); + } + private static void testInvokeTestCaseWithParameters1() { Map tmp =3D new HashMap(); @@ -91,7 +126,7 @@ // TestDriverImpl testDriver =3D new TestDriverImpl() { - public DriverResponse invoke(TestId id, DriverCommand command) + public DriverResponse invoke2(TestId id, DriverCommand command) { return new EndTestResponse(); } @@ -107,6 +142,9 @@ runner.run(); = // + testDriver.assertIdList(list(new TestId("Foo"))); + + // assertEquals(4, listener.events.size()); assertStartRunnerEvent(listener.events.get(0)); assertStartTestEvent(listener.events.get(1), new TestId("Foo")); @@ -130,7 +168,7 @@ // TestDriverImpl testDriver =3D new TestDriverImpl() { - public DriverResponse invoke(TestId id, DriverCommand command) + public DriverResponse invoke2(TestId id, DriverCommand command) { return new EndTestResponse(); } @@ -150,6 +188,9 @@ runner.run(); = // + testDriver.assertIdList(list(new TestId("Foo"), new TestId("Foo"))); + + // assertEquals(6, listener.events.size()); assertStartRunnerEvent(listener.events.get(0)); assertStartTestEvent(listener.events.get(1), new TestId("Foo")); @@ -185,6 +226,9 @@ runner.run(); = // + testDriver.assertIdList(new ArrayList()); + + // assertEquals(2, listener.events.size()); assertStartRunnerEvent(listener.events.get(0)); assertEndRunnerEvent(listener.events.get(1)); @@ -202,6 +246,9 @@ runner.run(); = // + testDriver.assertIdList(list(new TestId("Foo"))); + + // assertEquals(4, listener.events.size()); assertStartRunnerEvent(listener.events.get(0)); assertStartTestEvent(listener.events.get(1), new TestId("Foo")); @@ -213,7 +260,7 @@ { TestDriverImpl testDriver =3D new TestDriverImpl() { - public DriverResponse invoke(TestId id, DriverCommand command) + public DriverResponse invoke2(TestId id, DriverCommand command) { return new EndTestResponse(); } @@ -227,6 +274,9 @@ runner.run(); = // + testDriver.assertIdList(list(new TestId("Foo"))); + + // assertEquals(4, listener.events.size()); assertStartRunnerEvent(listener.events.get(0)); assertStartTestEvent(listener.events.get(1), new TestId("Foo")); @@ -238,7 +288,7 @@ { TestDriverImpl testDriver =3D new TestDriverImpl() { - public DriverResponse invoke(TestId id, DriverCommand command) + public DriverResponse invoke2(TestId id, DriverCommand command) { return new FailureResponse(FailureType.ERROR); } @@ -252,6 +302,9 @@ runner.run(); = // + testDriver.assertIdList(list(new TestId("Foo"))); + + // assertEquals(4, listener.events.size()); assertStartRunnerEvent(listener.events.get(0)); assertStartTestEvent(listener.events.get(1), new TestId("Foo")); @@ -263,7 +316,7 @@ { TestDriverImpl testDriver =3D new TestDriverImpl() { - public DriverResponse invoke(TestId id, DriverCommand command) + public DriverResponse invoke2(TestId id, DriverCommand command) { throw new RuntimeException(); } @@ -277,6 +330,9 @@ runner.run(); = // + testDriver.assertIdList(list(new TestId("Foo"))); + + // assertEquals(4, listener.events.size()); assertStartRunnerEvent(listener.events.get(0)); assertStartTestEvent(listener.events.get(1), new TestId("Foo")); @@ -291,7 +347,7 @@ // TestDriverImpl testDriver =3D new TestDriverImpl() { - public DriverResponse invoke(TestId id, DriverCommand command) + public DriverResponse invoke2(TestId id, DriverCommand command) { throw error; } @@ -312,6 +368,9 @@ } = // + testDriver.assertIdList(list(new TestId("Foo"))); + + // assertEquals(2, listener.events.size()); assertStartRunnerEvent(listener.events.get(0)); assertStartTestEvent(listener.events.get(1), new TestId("Foo")); @@ -320,6 +379,8 @@ private static class TestDriverImpl implements TestDriver { = + List ids =3D new ArrayList(); + /** . */ private SimpleTestSuiteInfo info =3D new SimpleTestSuiteInfo("blah"); = @@ -328,10 +389,24 @@ return info; } = - public DriverResponse invoke(TestId id, DriverCommand command) + public final DriverResponse invoke(TestId id, DriverCommand command) { + if (command instanceof StartTestCommand) + { + ids.add(id); + } + return invoke2(id, command); + } + + public DriverResponse invoke2(TestId id, DriverCommand command) + { return null; } + + public void assertIdList(List ids) + { + assertEquals(ids, this.ids); + } } = private static void assertStartRunnerEvent(TestRunnerEvent event) --===============1207104424265287975==-- From portal-commits at lists.jboss.org Wed Oct 10 10:53:43 2007 Content-Type: multipart/mixed; boundary="===============7536166337553213387==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8588 - in modules/test/trunk: tooling/src/main/org/jboss/unit/tooling/ant and 7 other directories. Date: Wed, 10 Oct 2007 10:53:42 -0400 Message-ID: --===============7536166337553213387== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: bdaw Date: 2007-10-10 10:53:42 -0400 (Wed, 10 Oct 2007) New Revision: 8588 Added: modules/test/trunk/tooling/src/main/org/jboss/unit/tooling/ant/ExcludeTy= pe.java modules/test/trunk/tooling/src/main/org/jboss/unit/tooling/ant/HTMLRepor= tsType.java modules/test/trunk/tooling/src/main/org/jboss/unit/tooling/ant/IncludeTy= pe.java modules/test/trunk/tooling/src/main/org/jboss/unit/tooling/ant/ReportsTy= pe.java modules/test/trunk/tooling/src/main/org/jboss/unit/tooling/ant/TestsType= .java modules/test/trunk/tooling/src/main/org/jboss/unit/tooling/ant/XMLReport= sType.java modules/test/trunk/unit/src/main/org/jboss/unit/report/impl/junit/ modules/test/trunk/unit/src/main/org/jboss/unit/report/impl/junit/JUnitR= eporter.java modules/test/trunk/unit/src/main/org/jboss/unit/report/impl/junit/JUnitT= estReport.java modules/test/trunk/unit/src/main/org/jboss/unit/report/impl/junit/XMLCon= stants.java modules/test/trunk/unit/src/main/org/jboss/unit/tooling/filter/ modules/test/trunk/unit/src/main/org/jboss/unit/tooling/filter/ExcludeTe= stFilter.java modules/test/trunk/unit/src/main/org/jboss/unit/tooling/filter/IncludeTe= stFilter.java modules/test/trunk/unit/src/main/org/jboss/unit/tooling/filter/InfoTestF= ilter.java modules/test/trunk/unit/src/main/org/jboss/unit/tooling/filter/MainTestF= ilter.java modules/test/trunk/unit/src/main/org/jboss/unit/tooling/report/ modules/test/trunk/unit/src/main/org/jboss/unit/tooling/report/Delegatin= gReporter.java Removed: modules/test/trunk/tooling/src/main/org/jboss/unit/tooling/ant/ExcludeTa= sk.java modules/test/trunk/tooling/src/main/org/jboss/unit/tooling/ant/IncludeTa= sk.java modules/test/trunk/tooling/src/main/org/jboss/unit/tooling/ant/TestsTask= .java modules/test/trunk/unit/src/main/org/jboss/unit/report/impl/junit/JUnitR= eporter.java modules/test/trunk/unit/src/main/org/jboss/unit/report/impl/junit/JUnitT= estReport.java modules/test/trunk/unit/src/main/org/jboss/unit/report/impl/junit/XMLCon= stants.java modules/test/trunk/unit/src/main/org/jboss/unit/report/junit/ modules/test/trunk/unit/src/main/org/jboss/unit/tooling/ExcludeTestFilte= r.java modules/test/trunk/unit/src/main/org/jboss/unit/tooling/IncludeTestFilte= r.java modules/test/trunk/unit/src/main/org/jboss/unit/tooling/InfoTestFilter.j= ava modules/test/trunk/unit/src/main/org/jboss/unit/tooling/MainTestFilter.j= ava Modified: modules/test/trunk/tooling/build.xml modules/test/trunk/tooling/src/main/org/jboss/unit/tooling/ant/JBossUnit= Task.java modules/test/trunk/unit/src/main/org/jboss/test/unit/blah/BlahTestTwo.ja= va modules/test/trunk/unit/src/main/org/jboss/unit/tooling/Main.java modules/test/trunk/unit/src/main/org/jboss/unit/tooling/MainBuilder.java Log: totosome refactorings, added xml reporting Modified: modules/test/trunk/tooling/build.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/tooling/build.xml 2007-10-10 14:07:54 UTC (rev 8587) +++ modules/test/trunk/tooling/build.xml 2007-10-10 14:53:42 UTC (rev 8588) @@ -85,7 +85,8 @@ &libraries; - + + = @@ -219,7 +220,7 @@ = - + @@ -231,22 +232,32 @@ = - + = - + = = - + = + + + + + + = + + + = = Deleted: modules/test/trunk/tooling/src/main/org/jboss/unit/tooling/ant/Exc= ludeTask.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/tooling/src/main/org/jboss/unit/tooling/ant/ExcludeT= ask.java 2007-10-10 14:07:54 UTC (rev 8587) +++ modules/test/trunk/tooling/src/main/org/jboss/unit/tooling/ant/ExcludeT= ask.java 2007-10-10 14:53:42 UTC (rev 8588) @@ -1,83 +0,0 @@ -/* -* JBoss, a division of Red Hat -* Copyright 2006, Red Hat Middleware, LLC, and individual contributors as = indicated -* by the @authors tag. See the copyright.txt in the distribution for a -* full listing of individual contributors. -* -* This is free software; you can redistribute it and/or modify it -* under the terms of the GNU Lesser General Public License as -* published by the Free Software Foundation; either version 2.1 of -* the License, or (at your option) any later version. -* -* This software is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -* Lesser General Public License for more details. -* -* You should have received a copy of the GNU Lesser General Public -* License along with this software; if not, write to the Free -* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA -* 02110-1301 USA, or see the FSF site: http://www.fsf.org. -*/ - -package org.jboss.unit.tooling.ant; - -/** - * @author Boleslaw Dawidowicz - * @version $Revision: 0.1 $ - */ -public class ExcludeTask -{ - private String id; - - private String ids; - - private String idPatterns; - - private String keywords; - - - public ExcludeTask() - { - } - - public String getId() - { - return id; - } - - public void setId(String id) - { - this.id =3D id; - } - - public String getIds() - { - return ids; - } - - public void setIds(String ids) - { - this.ids =3D ids; - } - - public String getIdPatterns() - { - return idPatterns; - } - -// public void setIdPatterns(String idPatterns) -// { -// this.idPatterns =3D idPatterns; -// } - - public String getKeywords() - { - return keywords; - } - - public void setKeywords(String keywords) - { - this.keywords =3D keywords; - } -} Copied: modules/test/trunk/tooling/src/main/org/jboss/unit/tooling/ant/Excl= udeType.java (from rev 8562, modules/test/trunk/tooling/src/main/org/jboss/= unit/tooling/ant/ExcludeTask.java) =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/tooling/src/main/org/jboss/unit/tooling/ant/ExcludeT= ype.java (rev 0) +++ modules/test/trunk/tooling/src/main/org/jboss/unit/tooling/ant/ExcludeT= ype.java 2007-10-10 14:53:42 UTC (rev 8588) @@ -0,0 +1,83 @@ +/* +* JBoss, a division of Red Hat +* Copyright 2006, Red Hat Middleware, LLC, and individual contributors as = indicated +* by the @authors tag. See the copyright.txt in the distribution for a +* full listing of individual contributors. +* +* This is free software; you can redistribute it and/or modify it +* under the terms of the GNU Lesser General Public License as +* published by the Free Software Foundation; either version 2.1 of +* the License, or (at your option) any later version. +* +* This software is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +* Lesser General Public License for more details. +* +* You should have received a copy of the GNU Lesser General Public +* License along with this software; if not, write to the Free +* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +* 02110-1301 USA, or see the FSF site: http://www.fsf.org. +*/ + +package org.jboss.unit.tooling.ant; + +/** + * @author Boleslaw Dawidowicz + * @version $Revision: 0.1 $ + */ +public class ExcludeType +{ + private String id; + + private String ids; + + private String idPatterns; + + private String keywords; + + + public ExcludeType() + { + } + + public String getId() + { + return id; + } + + public void setId(String id) + { + this.id =3D id; + } + + public String getIds() + { + return ids; + } + + public void setIds(String ids) + { + this.ids =3D ids; + } + + public String getIdPatterns() + { + return idPatterns; + } + +// public void setIdPatterns(String idPatterns) +// { +// this.idPatterns =3D idPatterns; +// } + + public String getKeywords() + { + return keywords; + } + + public void setKeywords(String keywords) + { + this.keywords =3D keywords; + } +} Added: modules/test/trunk/tooling/src/main/org/jboss/unit/tooling/ant/HTMLR= eportsType.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/tooling/src/main/org/jboss/unit/tooling/ant/HTMLRepo= rtsType.java (rev 0) +++ modules/test/trunk/tooling/src/main/org/jboss/unit/tooling/ant/HTMLRepo= rtsType.java 2007-10-10 14:53:42 UTC (rev 8588) @@ -0,0 +1,47 @@ +/* +* JBoss, a division of Red Hat +* Copyright 2006, Red Hat Middleware, LLC, and individual contributors as = indicated +* by the @authors tag. See the copyright.txt in the distribution for a +* full listing of individual contributors. +* +* This is free software; you can redistribute it and/or modify it +* under the terms of the GNU Lesser General Public License as +* published by the Free Software Foundation; either version 2.1 of +* the License, or (at your option) any later version. +* +* This software is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +* Lesser General Public License for more details. +* +* You should have received a copy of the GNU Lesser General Public +* License along with this software; if not, write to the Free +* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +* 02110-1301 USA, or see the FSF site: http://www.fsf.org. +*/ + +package org.jboss.unit.tooling.ant; + +/** + * @author Boleslaw Dawidowicz + * @version $Revision: 0.1 $ + */ +public class HTMLReportsType +{ + public HTMLReportsType() + { + } + + private String toDir =3D "."; + + public String getToDir() + { + return toDir; + } + + public void setToDir(String toDir) + { + this.toDir =3D toDir; + } + +} Deleted: modules/test/trunk/tooling/src/main/org/jboss/unit/tooling/ant/Inc= ludeTask.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/tooling/src/main/org/jboss/unit/tooling/ant/IncludeT= ask.java 2007-10-10 14:07:54 UTC (rev 8587) +++ modules/test/trunk/tooling/src/main/org/jboss/unit/tooling/ant/IncludeT= ask.java 2007-10-10 14:53:42 UTC (rev 8588) @@ -1,83 +0,0 @@ -/* -* JBoss, a division of Red Hat -* Copyright 2006, Red Hat Middleware, LLC, and individual contributors as = indicated -* by the @authors tag. See the copyright.txt in the distribution for a -* full listing of individual contributors. -* -* This is free software; you can redistribute it and/or modify it -* under the terms of the GNU Lesser General Public License as -* published by the Free Software Foundation; either version 2.1 of -* the License, or (at your option) any later version. -* -* This software is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -* Lesser General Public License for more details. -* -* You should have received a copy of the GNU Lesser General Public -* License along with this software; if not, write to the Free -* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA -* 02110-1301 USA, or see the FSF site: http://www.fsf.org. -*/ - -package org.jboss.unit.tooling.ant; - -/** - * @author Boleslaw Dawidowicz - * @version $Revision: 0.1 $ - */ -public class IncludeTask = -{ - private String id; - - private String ids; - - private String idPatterns; - - private String keywords; - - - public IncludeTask() - { - } - - public String getId() - { - return id; - } - - public void setId(String id) - { - this.id =3D id; - } - - public String getIds() - { - return ids; - } - - public void setIds(String ids) - { - this.ids =3D ids; - } - - public String getIdPatterns() - { - return idPatterns; - } - -// public void setIdPatterns(String idPatterns) -// { -// this.idPatterns =3D idPatterns; -// } - - public String getKeywords() - { - return keywords; - } - - public void setKeywords(String keywords) - { - this.keywords =3D keywords; - } -} Copied: modules/test/trunk/tooling/src/main/org/jboss/unit/tooling/ant/Incl= udeType.java (from rev 8562, modules/test/trunk/tooling/src/main/org/jboss/= unit/tooling/ant/IncludeTask.java) =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/tooling/src/main/org/jboss/unit/tooling/ant/IncludeT= ype.java (rev 0) +++ modules/test/trunk/tooling/src/main/org/jboss/unit/tooling/ant/IncludeT= ype.java 2007-10-10 14:53:42 UTC (rev 8588) @@ -0,0 +1,83 @@ +/* +* JBoss, a division of Red Hat +* Copyright 2006, Red Hat Middleware, LLC, and individual contributors as = indicated +* by the @authors tag. See the copyright.txt in the distribution for a +* full listing of individual contributors. +* +* This is free software; you can redistribute it and/or modify it +* under the terms of the GNU Lesser General Public License as +* published by the Free Software Foundation; either version 2.1 of +* the License, or (at your option) any later version. +* +* This software is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +* Lesser General Public License for more details. +* +* You should have received a copy of the GNU Lesser General Public +* License along with this software; if not, write to the Free +* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +* 02110-1301 USA, or see the FSF site: http://www.fsf.org. +*/ + +package org.jboss.unit.tooling.ant; + +/** + * @author Boleslaw Dawidowicz + * @version $Revision: 0.1 $ + */ +public class IncludeType +{ + private String id; + + private String ids; + + private String idPatterns; + + private String keywords; + + + public IncludeType() + { + } + + public String getId() + { + return id; + } + + public void setId(String id) + { + this.id =3D id; + } + + public String getIds() + { + return ids; + } + + public void setIds(String ids) + { + this.ids =3D ids; + } + + public String getIdPatterns() + { + return idPatterns; + } + +// public void setIdPatterns(String idPatterns) +// { +// this.idPatterns =3D idPatterns; +// } + + public String getKeywords() + { + return keywords; + } + + public void setKeywords(String keywords) + { + this.keywords =3D keywords; + } +} Modified: modules/test/trunk/tooling/src/main/org/jboss/unit/tooling/ant/JB= ossUnitTask.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/tooling/src/main/org/jboss/unit/tooling/ant/JBossUni= tTask.java 2007-10-10 14:07:54 UTC (rev 8587) +++ modules/test/trunk/tooling/src/main/org/jboss/unit/tooling/ant/JBossUni= tTask.java 2007-10-10 14:53:42 UTC (rev 8588) @@ -24,10 +24,16 @@ = import org.apache.tools.ant.Task; import org.apache.tools.ant.BuildException; +import org.apache.tools.ant.taskdefs.optional.junit.XMLResultAggregator; +import org.apache.tools.ant.taskdefs.optional.junit.AggregateTransformer; import org.apache.tools.ant.types.Path; +import org.apache.tools.ant.types.FileSet; +import org.jboss.unit.tooling.MainBuilder; +import org.jboss.unit.report.impl.junit.JUnitTestReport; = import java.util.List; import java.util.LinkedList; +import java.io.File; = /** * @author Boleslaw Dawidowicz @@ -36,18 +42,20 @@ public class JBossUnitTask extends Task { = - List testsTasks =3D new LinkedList(); + List testsTypes =3D new LinkedList(); = + private ReportsType reports; + private Path path; = public JBossUnitTask() { } = - public void addConfiguredTests(TestsTask tests) + public void addConfiguredTests(TestsType tests) { tests.setProject(getProject()); - testsTasks.add(tests); + testsTypes.add(tests); } = public void addConfiguredClasspath(Path path) @@ -56,21 +64,123 @@ this.path =3D path; } = + public void addConfiguredReports(ReportsType reports) + { + this.reports =3D reports; + } + + public void execute() throws BuildException { - System.out.println("Executing JBossUnit. tests: " + testsTasks.size(= )); - for (TestsTask testsTask : testsTasks) + //System.out.println("Executing JBossUnit. tests: " + testsTypes.siz= e()); + for (TestsType testsType : testsTypes) { = + // Update reports + if (testsType.getReports() =3D=3D null && getReports() !=3D null) + { + testsType.setReports(getReports()); = + } + // Local classpath for tests overide the global one - if (testsTask.getClasspath() =3D=3D null && path !=3D null) + if (testsType.getClasspath() =3D=3D null && path !=3D null) { - testsTask.addConfiguredClasspath(path); + testsType.addConfiguredClasspath(path); } = - testsTask.execute(); + testsType.execute(); } + + + //Not working at the moment - issues with using dynamicly +// if (getReports() !=3D null && getReports().getXmlReports() !=3D nu= ll && getReports().getHtmlReports() !=3D null) +// { +// try +// { +// generateHTMLReports(createJunitReporter()); +// } +// catch (Exception e) +// { +// e.printStackTrace(); +// } +// } + } = + private XMLResultAggregator createJunitReporter() + { + XMLResultAggregator reporter =3D null; + try + { + + if (getProject() =3D=3D null) + { + throw new IllegalStateException("Current project is missing. T= ask was not setup properly"); + } + + reporter =3D (XMLResultAggregator)getProject().createTask("junitr= eport"); + + + return reporter; + + } + catch (BuildException e) + { + throw new IllegalStateException("Failed to create ant task= : ", e); + } + } + +// private void generateHTMLReports(XMLResultAggregator reporter) throws= Exception +// { +// +// String htmlToDir =3D getReports().getHtmlReports().getToDir(); +// +// String xmlDir =3D getReports().getXmlReports().getToDir(); +// +// MainBuilder.checkCreateOutputDirectory(htmlToDir); +// +// reporter.setTodir(new File(htmlToDir)); +// +// +// // +// AggregateTransformer report =3D reporter.createReport(); +// +// AggregateTransformer.Format format; +// format =3D new AggregateTransformer.Format(); +// format.setValue(AggregateTransformer.FRAMES); +// report.setFormat(format); +// report.setTodir(new File(htmlToDir)); +// +// //String includeFile =3D JUnitTestReport.TEST_FILE_NAME_START + "*= .xml"; +// String includeFile =3D "*.xml"; +// +// FileSet fs =3D new FileSet(); +// +// //File toDir =3D new File(xmlDir); +// +// fs.setDir(new File(xmlDir)); +// +// +// +// fs.createIncludesFile().setName(includeFile); +// +// +// +// reporter.addFileSet(fs); +// +// reporter.execute(); +// } + + + public ReportsType getReports() + { + return reports; + } + + public void setReports(ReportsType reports) + { + this.reports =3D reports; + } + = } Added: modules/test/trunk/tooling/src/main/org/jboss/unit/tooling/ant/Repor= tsType.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/tooling/src/main/org/jboss/unit/tooling/ant/ReportsT= ype.java (rev 0) +++ modules/test/trunk/tooling/src/main/org/jboss/unit/tooling/ant/ReportsT= ype.java 2007-10-10 14:53:42 UTC (rev 8588) @@ -0,0 +1,68 @@ +/* +* JBoss, a division of Red Hat +* Copyright 2006, Red Hat Middleware, LLC, and individual contributors as = indicated +* by the @authors tag. See the copyright.txt in the distribution for a +* full listing of individual contributors. +* +* This is free software; you can redistribute it and/or modify it +* under the terms of the GNU Lesser General Public License as +* published by the Free Software Foundation; either version 2.1 of +* the License, or (at your option) any later version. +* +* This software is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +* Lesser General Public License for more details. +* +* You should have received a copy of the GNU Lesser General Public +* License along with this software; if not, write to the Free +* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +* 02110-1301 USA, or see the FSF site: http://www.fsf.org. +*/ + +package org.jboss.unit.tooling.ant; + +/** + * @author Boleslaw Dawidowicz + * @version $Revision: 0.1 $ + */ +public class ReportsType +{ + + private XMLReportsType xmlReports; + + private HTMLReportsType htmlReports; + + private boolean noConsole; + + + public boolean isNoConsole() + { + return noConsole; + } + + public void setNoConsole(boolean noConsole) + { + this.noConsole =3D noConsole; + } + + public void addConfiguredXml(XMLReportsType xml) + { + xmlReports =3D xml; + } + + public void addConfiguredHtml(HTMLReportsType html) + { + htmlReports =3D html; + } + + public XMLReportsType getXmlReports() + { + return xmlReports; + } + + public HTMLReportsType getHtmlReports() + { + return htmlReports; + } +} Deleted: modules/test/trunk/tooling/src/main/org/jboss/unit/tooling/ant/Tes= tsTask.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/tooling/src/main/org/jboss/unit/tooling/ant/TestsTas= k.java 2007-10-10 14:07:54 UTC (rev 8587) +++ modules/test/trunk/tooling/src/main/org/jboss/unit/tooling/ant/TestsTas= k.java 2007-10-10 14:53:42 UTC (rev 8588) @@ -1,299 +0,0 @@ -/* -* JBoss, a division of Red Hat -* Copyright 2006, Red Hat Middleware, LLC, and individual contributors as = indicated -* by the @authors tag. See the copyright.txt in the distribution for a -* full listing of individual contributors. -* -* This is free software; you can redistribute it and/or modify it -* under the terms of the GNU Lesser General Public License as -* published by the Free Software Foundation; either version 2.1 of -* the License, or (at your option) any later version. -* -* This software is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -* Lesser General Public License for more details. -* -* You should have received a copy of the GNU Lesser General Public -* License along with this software; if not, write to the Free -* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA -* 02110-1301 USA, or see the FSF site: http://www.fsf.org. -*/ - -package org.jboss.unit.tooling.ant; - -import org.apache.tools.ant.Task; -import org.apache.tools.ant.BuildException; -import org.apache.tools.ant.Project; -import org.apache.tools.ant.types.Path; -import org.apache.tools.ant.taskdefs.Java; -import org.jboss.unit.tooling.IncludeTestFilter; -import org.jboss.unit.tooling.ExcludeTestFilter; -import org.jboss.unit.tooling.Main; - -import java.util.List; -import java.util.LinkedList; -import java.util.Set; - -/** - * @author Boleslaw Dawidowicz - * @version $Revision: 0.1 $ - */ -public class TestsTask -{ - private String config; - - private boolean fork =3D true; - - private List includes =3D new LinkedList(); - - private List excludes =3D new LinkedList(); - - private Project project; - - private Path path; - - - public TestsTask() - { - } - - - public void execute() throws BuildException - { - System.out.println("Executing Task. Includes: " + includes.size() + = " excludes: " + excludes.size() + " config: " + config); - - //Evaluate all the include filters - - Java javaTask =3D createJava(); - - addArguments(javaTask); - - = - - javaTask.setClassname("org.jboss.unit.tooling.Main"); - - try - { - System.out.println("Invoking java: " + javaTask.getCommandLine().= toString()); - TaskExecutingThread executor =3D new TaskExecutingThread(javaTask= ); - executor.run(); - } - catch (Exception e) - { - e.printStackTrace(); = - } - - } - - private Java createJava() - { - Java javaTask =3D null; - try - { - - if (getProject() =3D=3D null) - { - throw new IllegalStateException("Current project is missing. T= ask was not setup properly"); - } - - javaTask =3D (Java)getProject().createTask("java"); - - - // Apply task classpath - if (getClasspath() !=3D null) - { - Path javaPath =3D javaTask.createClasspath(); - javaPath.add(getClasspath()); - } - - // Set fork = - if (isFork()) - { - javaTask.setFork(true); - } - - - - } - catch (BuildException e) - { - throw new IllegalStateException("Failed to create ant task= : ", e); - } - - return javaTask; - } - - private void addArguments(Java javaTask) - { - javaTask.createArg().setValue(Main.OPT_CONFIG + "=3D" + config); - - //TODO: change bilto - javaTask.createArg().setValue(Main.OPT_SUITE_NAME + "=3D" + "bilto"); - - - // Filters to aggregate all the values - IncludeTestFilter includeFilter =3D new IncludeTestFilter(); - - ExcludeTestFilter excludeFilter =3D new ExcludeTestFilter(); - - for (IncludeTask include : includes) - { - //Check attributes consistency - - if (include.getId() !=3D null && (include.getIds() !=3D null || i= nclude.getKeywords() !=3D null)) - { - throw new IllegalStateException("The use of attribute 'id' in = tag should be exclusive"); - } - - - if (include.getIds() !=3D null) - { - includeFilter.addUnparsedNames(include.getIds()); - } - if (include.getKeywords() !=3D null) - { - includeFilter.addUnparsedKeywords(include.getKeywords()); - } - if (include.getIdPatterns() !=3D null) - { - includeFilter.addUnparsedNamePatterns(include.getIdPatterns()); - } - if (include.getId() !=3D null) - { - includeFilter.addUnparsedNames(include.getId()); - } - } - - if (includeFilter.getNames().size() !=3D 0) - { - javaTask.createArg().setValue(generateArgument(includeFilter.getN= ames(), Main.OPT_NAMES)); - } - - if (includeFilter.getNamePatterns().size() !=3D 0) - { - javaTask.createArg().setValue(generateArgument(includeFilter.getN= amePatterns(), Main.OPT_PATTERNS)); - } - - if (includeFilter.getKeywords().size() !=3D 0) - { - javaTask.createArg().setValue(generateArgument(includeFilter.getK= eywords(), Main.OPT_KEYWORDS)); - } - - -// List excludeFilters =3D new LinkedList(); - - for (ExcludeTask exclude : excludes) - { - - if (exclude.getId() !=3D null && (exclude.getIds() !=3D null || e= xclude.getKeywords() !=3D null)) - { - throw new IllegalStateException("The use of attribute 'id' in = tag should be exclusive"); - } - - if (exclude.getIds() !=3D null) - { - excludeFilter.addUnparsedNames(exclude.getIds()); - } - if (exclude.getKeywords() !=3D null) - { - excludeFilter.addUnparsedKeywords(exclude.getKeywords()); - } - if (exclude.getIdPatterns() !=3D null) - { - excludeFilter.addUnparsedNamePatterns(exclude.getIdPatterns()); - } - if (exclude.getId() !=3D null) - { - excludeFilter.addUnparsedNames(exclude.getId()); - } - } - - if (excludeFilter.getNames().size() !=3D 0) - { - javaTask.createArg().setValue(generateArgument(excludeFilter.getN= ames(), Main.OPT_EX_NAMES)); - } - - if (excludeFilter.getNamePatterns().size() !=3D 0) - { - javaTask.createArg().setValue(generateArgument(excludeFilter.getN= amePatterns(), Main.OPT_EX_PATTERNS)); - } - - if (excludeFilter.getKeywords().size() !=3D 0) - { - javaTask.createArg().setValue(generateArgument(excludeFilter.getK= eywords(), Main.OPT_EX_KEYWORDS)); - } - } - - private String generateArgument(Set values, String argumentName) - { - = - StringBuffer argument =3D new StringBuffer(argumentName).append("=3D= "); - for (String s : values) - { - argument.append(s).append(","); - } - // Remove last ',' - argument.deleteCharAt(argument.length() - 1); - return argument.toString(); - } - - - public void addConfiguredInclude(IncludeTask include) - { - includes.add(include); - } - - public void addConfiguredExclude(ExcludeTask exclude) = - { - excludes.add(exclude); - } - - public void addTask(Task task) - { - //To change body of implemented methods use File | Settings | File T= emplates. - } - - public String getConfig() - { - return config; - } - - public void setConfig(String config) - { - this.config =3D config; - } - - - public Path getClasspath() - { - return path; - } - - public void addConfiguredClasspath(Path path) - { - this.path =3D path; - } - - - public boolean isFork() - { - return fork; - } - - public void setFork(boolean fork) - { - this.fork =3D fork; - } - - - public Project getProject() - { - return project; - } - - public void setProject(Project project) - { - this.project =3D project; - } -} Copied: modules/test/trunk/tooling/src/main/org/jboss/unit/tooling/ant/Test= sType.java (from rev 8562, modules/test/trunk/tooling/src/main/org/jboss/un= it/tooling/ant/TestsTask.java) =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/tooling/src/main/org/jboss/unit/tooling/ant/TestsTyp= e.java (rev 0) +++ modules/test/trunk/tooling/src/main/org/jboss/unit/tooling/ant/TestsTyp= e.java 2007-10-10 14:53:42 UTC (rev 8588) @@ -0,0 +1,350 @@ +/* +* JBoss, a division of Red Hat +* Copyright 2006, Red Hat Middleware, LLC, and individual contributors as = indicated +* by the @authors tag. See the copyright.txt in the distribution for a +* full listing of individual contributors. +* +* This is free software; you can redistribute it and/or modify it +* under the terms of the GNU Lesser General Public License as +* published by the Free Software Foundation; either version 2.1 of +* the License, or (at your option) any later version. +* +* This software is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +* Lesser General Public License for more details. +* +* You should have received a copy of the GNU Lesser General Public +* License along with this software; if not, write to the Free +* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +* 02110-1301 USA, or see the FSF site: http://www.fsf.org. +*/ + +package org.jboss.unit.tooling.ant; + +import org.apache.tools.ant.Task; +import org.apache.tools.ant.BuildException; +import org.apache.tools.ant.Project; +import org.apache.tools.ant.types.Path; +import org.apache.tools.ant.types.FileSet; +import org.apache.tools.ant.taskdefs.Java; +import org.apache.tools.ant.taskdefs.optional.junit.XMLResultAggregator; +import org.apache.tools.ant.taskdefs.optional.junit.AggregateTransformer; +import org.jboss.unit.tooling.filter.IncludeTestFilter; +import org.jboss.unit.tooling.filter.ExcludeTestFilter; +import org.jboss.unit.tooling.Main; +import org.jboss.unit.tooling.MainBuilder; +import org.jboss.unit.report.impl.junit.JUnitTestReport; + +import java.util.List; +import java.util.LinkedList; +import java.util.Set; +import java.io.File; + +/** + * @author Boleslaw Dawidowicz + * @version $Revision: 0.1 $ + */ +public class TestsType +{ + private String config; + + private boolean fork =3D true; + + private List includes =3D new LinkedList(); + + private List excludes =3D new LinkedList(); + + private ReportsType reports; + + private Project project; + + private Path path; + + private String suiteName; + + + public TestsType() + { + } + + + public void execute() throws BuildException + { + //System.out.println("Executing Task. Includes: " + includes.size() = + " excludes: " + excludes.size() + " config: " + config); + + //Evaluate all the include filters + + Java javaTask =3D createJava(); + + addArguments(javaTask); + + = + + javaTask.setClassname("org.jboss.unit.tooling.Main"); + + try + { + System.out.println("Invoking java: " + javaTask.getCommandLine().= toString()); + TaskExecutingThread executor =3D new TaskExecutingThread(javaTask= ); + executor.run(); + + + } + catch (Exception e) + { + e.printStackTrace(); = + } + + } + + private Java createJava() + { + Java javaTask =3D null; + try + { + + if (getProject() =3D=3D null) + { + throw new IllegalStateException("Current project is missing. T= ask was not setup properly"); + } + + javaTask =3D (Java)getProject().createTask("java"); + + + // Apply task classpath + if (getClasspath() !=3D null) + { + Path javaPath =3D javaTask.createClasspath(); + javaPath.add(getClasspath()); + } + + // Set fork = + if (isFork()) + { + javaTask.setFork(true); + } + + + + } + catch (BuildException e) + { + throw new IllegalStateException("Failed to create ant task= : ", e); + } + + return javaTask; + } + + = + + private void addArguments(Java javaTask) + { + javaTask.createArg().setValue(Main.OPT_CONFIG + "=3D" + config); + + if (getSuiteName() !=3D null) + { + javaTask.createArg().setValue(Main.OPT_SUITE_NAME + "=3D" + getSu= iteName()); = + } + + + + if (getReports() !=3D null && getReports().getXmlReports() !=3D null) + { + javaTask.createArg().setValue(Main.OPT_XML_REPORT_DIR + "=3D" + g= etReports().getXmlReports().getToDir()); + } + + + // Filters to aggregate all the values + IncludeTestFilter includeFilter =3D new IncludeTestFilter(); + + ExcludeTestFilter excludeFilter =3D new ExcludeTestFilter(); + + for (IncludeType include : includes) + { + //Check attributes consistency + + if (include.getId() !=3D null && (include.getIds() !=3D null || i= nclude.getKeywords() !=3D null)) + { + throw new IllegalStateException("The use of attribute 'id' in = tag should be exclusive"); + } + + + if (include.getIds() !=3D null) + { + includeFilter.addUnparsedNames(include.getIds()); + } + if (include.getKeywords() !=3D null) + { + includeFilter.addUnparsedKeywords(include.getKeywords()); + } + if (include.getIdPatterns() !=3D null) + { + includeFilter.addUnparsedNamePatterns(include.getIdPatterns()); + } + if (include.getId() !=3D null) + { + includeFilter.addUnparsedNames(include.getId()); + } + } + + if (includeFilter.getNames().size() !=3D 0) + { + javaTask.createArg().setValue(generateArgument(includeFilter.getN= ames(), Main.OPT_NAMES)); + } + + if (includeFilter.getNamePatterns().size() !=3D 0) + { + javaTask.createArg().setValue(generateArgument(includeFilter.getN= amePatterns(), Main.OPT_PATTERNS)); + } + + if (includeFilter.getKeywords().size() !=3D 0) + { + javaTask.createArg().setValue(generateArgument(includeFilter.getK= eywords(), Main.OPT_KEYWORDS)); + } + + +// List excludeFilters =3D new LinkedList(); + + for (ExcludeType exclude : excludes) + { + + if (exclude.getId() !=3D null && (exclude.getIds() !=3D null || e= xclude.getKeywords() !=3D null)) + { + throw new IllegalStateException("The use of attribute 'id' in = tag should be exclusive"); + } + + if (exclude.getIds() !=3D null) + { + excludeFilter.addUnparsedNames(exclude.getIds()); + } + if (exclude.getKeywords() !=3D null) + { + excludeFilter.addUnparsedKeywords(exclude.getKeywords()); + } + if (exclude.getIdPatterns() !=3D null) + { + excludeFilter.addUnparsedNamePatterns(exclude.getIdPatterns()); + } + if (exclude.getId() !=3D null) + { + excludeFilter.addUnparsedNames(exclude.getId()); + } + } + + if (excludeFilter.getNames().size() !=3D 0) + { + javaTask.createArg().setValue(generateArgument(excludeFilter.getN= ames(), Main.OPT_EX_NAMES)); + } + + if (excludeFilter.getNamePatterns().size() !=3D 0) + { + javaTask.createArg().setValue(generateArgument(excludeFilter.getN= amePatterns(), Main.OPT_EX_PATTERNS)); + } + = + if (excludeFilter.getKeywords().size() !=3D 0) + { + javaTask.createArg().setValue(generateArgument(excludeFilter.getK= eywords(), Main.OPT_EX_KEYWORDS)); + } + } + + private String generateArgument(Set values, String argumentName) + { + = + StringBuffer argument =3D new StringBuffer(argumentName).append("=3D= "); + for (String s : values) + { + argument.append(s).append(","); + } + // Remove last ',' + argument.deleteCharAt(argument.length() - 1); + return argument.toString(); + } + + + + + public void addConfiguredInclude(IncludeType include) + { + this.includes.add(include); + } + + public void addConfiguredExclude(ExcludeType exclude) + { + this.excludes.add(exclude); + } + + public void addConfiguredReports(ReportsType reports) + { + this.reports =3D reports; + } + + public void addTask(Task task) + { + //To change body of implemented methods use File | Settings | File T= emplates. + } + + public String getConfig() + { + return config; + } + + public void setConfig(String config) + { + this.config =3D config; + } + + + public Path getClasspath() + { + return path; + } + + public void addConfiguredClasspath(Path path) + { + this.path =3D path; + } + + + public boolean isFork() + { + return fork; + } + + public void setFork(boolean fork) + { + this.fork =3D fork; + } + + + public Project getProject() + { + return project; + } + + public void setProject(Project project) + { + this.project =3D project; + } + + + public ReportsType getReports() + { + return reports; + } + + public void setReports(ReportsType reports) + { + this.reports =3D reports; + } + + public String getSuiteName() + { + return suiteName; + } + + public void setSuiteName(String suiteName) + { + this.suiteName =3D suiteName; + } +} Added: modules/test/trunk/tooling/src/main/org/jboss/unit/tooling/ant/XMLRe= portsType.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/tooling/src/main/org/jboss/unit/tooling/ant/XMLRepor= tsType.java (rev 0) +++ modules/test/trunk/tooling/src/main/org/jboss/unit/tooling/ant/XMLRepor= tsType.java 2007-10-10 14:53:42 UTC (rev 8588) @@ -0,0 +1,47 @@ +/* +* JBoss, a division of Red Hat +* Copyright 2006, Red Hat Middleware, LLC, and individual contributors as = indicated +* by the @authors tag. See the copyright.txt in the distribution for a +* full listing of individual contributors. +* +* This is free software; you can redistribute it and/or modify it +* under the terms of the GNU Lesser General Public License as +* published by the Free Software Foundation; either version 2.1 of +* the License, or (at your option) any later version. +* +* This software is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +* Lesser General Public License for more details. +* +* You should have received a copy of the GNU Lesser General Public +* License along with this software; if not, write to the Free +* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +* 02110-1301 USA, or see the FSF site: http://www.fsf.org. +*/ + +package org.jboss.unit.tooling.ant; + +/** + * @author Boleslaw Dawidowicz + * @version $Revision: 0.1 $ + */ +public class XMLReportsType +{ + + public XMLReportsType() + { + } + + private String toDir =3D "."; + + public String getToDir() + { + return toDir; + } + + public void setToDir(String toDir) + { + this.toDir =3D toDir; + } +} Modified: modules/test/trunk/unit/src/main/org/jboss/test/unit/blah/BlahTes= tTwo.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/test/unit/blah/BlahTestTwo.j= ava 2007-10-10 14:07:54 UTC (rev 8587) +++ modules/test/trunk/unit/src/main/org/jboss/test/unit/blah/BlahTestTwo.j= ava 2007-10-10 14:53:42 UTC (rev 8588) @@ -25,7 +25,7 @@ import java.io.InputStream; = import org.jboss.unit.report.impl.console.PrintListener; -import org.jboss.unit.report.junit.JUnitReporter; +import org.jboss.unit.report.impl.junit.JUnitReporter; import org.jboss.unit.runner.TestRunner; import org.jboss.unit.runner.TestRunnerEventListener; import org.jboss.unit.runner.model.ModelBuilder; Copied: modules/test/trunk/unit/src/main/org/jboss/unit/report/impl/junit (= from rev 8562, modules/test/trunk/unit/src/main/org/jboss/unit/report/junit) Deleted: modules/test/trunk/unit/src/main/org/jboss/unit/report/impl/junit/= JUnitReporter.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/report/junit/JUnitRepor= ter.java 2007-10-08 13:26:57 UTC (rev 8562) +++ modules/test/trunk/unit/src/main/org/jboss/unit/report/impl/junit/JUnit= Reporter.java 2007-10-10 14:53:42 UTC (rev 8588) @@ -1,163 +0,0 @@ -/*************************************************************************= ***** - * JBoss, a division of Red Hat = * - * Copyright 2006, Red Hat Middleware, LLC, and individual = * - * contributors as indicated by the @authors tag. See the = * - * copyright.txt in the distribution for a full listing of = * - * individual contributors. = * - * = * - * This is free software; you can redistribute it and/or modify it = * - * under the terms of the GNU Lesser General Public License as = * - * published by the Free Software Foundation; either version 2.1 of = * - * the License, or (at your option) any later version. = * - * = * - * This software is distributed in the hope that it will be useful, = * - * but WITHOUT ANY WARRANTY; without even the implied warranty of = * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU = * - * Lesser General Public License for more details. = * - * = * - * You should have received a copy of the GNU Lesser General Public = * - * License along with this software; if not, write to the Free = * - * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA = * - * 02110-1301 USA, or see the FSF site: http://www.fsf.org. = * - *************************************************************************= *****/ -package org.jboss.unit.report.junit; - -import java.io.ByteArrayOutputStream; -import java.io.IOException; -import java.io.OutputStream; -import java.io.PrintStream; - -import org.jboss.unit.runner.TestRunnerEventListener; -import org.jboss.unit.runner.TestRunnerEvent; -import org.jboss.unit.runner.event.EndRunnerEvent; -import org.jboss.unit.runner.event.EndTestEvent; -import org.jboss.unit.runner.event.RunnerFailureEvent; -import org.jboss.unit.runner.event.StartRunnerEvent; -import org.jboss.unit.runner.event.StartTestEvent; - -/** - * - * @author Julien Viet - * @author Emanuel Muckenhuber - * @version $Revision: 1.1 $ - */ -public class JUnitReporter implements TestRunnerEventListener -{ - /** The JUnit test report */ - private JUnitTestReport report; - = - /** The system error printStream */ - private ByteArrayOutputStream systemError; - = - /** The system out printStream */ - private ByteArrayOutputStream systemOut; - = - /** To dir */ - private static String toDir; = - = - public JUnitReporter(String reportToDir, - String testSuiteName) - { - this.report =3D new JUnitTestReport(testSuiteName); - toDir =3D reportToDir; - // redirecting system out and err - this.systemError =3D new ByteArrayOutputStream(); - this.systemOut =3D new ByteArrayOutputStream(); - this.setStreams(systemError, systemOut); - } - = - public void onEvent(TestRunnerEvent event) - { - if (event instanceof StartRunnerEvent) - { - report.startTestSuite((StartRunnerEvent) event); - } - else if (event instanceof EndRunnerEvent) - { - // append system out and system err - report.appendSystemError(systemError.toString()); - report.appendSystemOutput(systemOut.toString()); - = - // Testsuite End - report.endTestSuite((EndRunnerEvent) event); - = - // Export xml - report.exportXML(toDir); - } - else if (event instanceof RunnerFailureEvent) - { - report.runnerFailed((RunnerFailureEvent) event); - } - else if (event instanceof StartTestEvent) - { - report.startTest((StartTestEvent) event); - } - else if (event instanceof EndTestEvent) - { - report.endTest((EndTestEvent) event); - } - } - = - private void setStreams(ByteArrayOutputStream a, ByteArrayOutputStream = b) - { - PrintStream savedError =3D System.err; - PrintStream savedOut =3D System.out; - = - System.setErr(new PrintStream(new CaptureOutputStream(savedError, a)= )); - System.setOut(new PrintStream(new CaptureOutputStream(savedOut, b))); - = - } - = - private class CaptureOutputStream extends OutputStream - { - private OutputStream s1; - private OutputStream s2; - = - public CaptureOutputStream(OutputStream s1, OutputStream s2) - { - this.s1 =3D s1; - this.s2 =3D s2; - } - = - @Override - public void close() throws IOException - { - try - { - s1.close(); - } - finally - { - s2.close(); - } - } - - @Override - public void flush() throws IOException - { - s1.flush(); - s2.flush(); - } - - @Override - public void write(int b) throws IOException - { - s1.write(b); - s2.write(b); - } - = - @Override - public void write(byte[] b) throws IOException - { - s1.write(b); - s2.write(b); - } - = - @Override - public void write(byte[] b, int off, int len) throws IOException - { - s1.write(b, off, len); - s2.write(b, off, len); - } - } -} Copied: modules/test/trunk/unit/src/main/org/jboss/unit/report/impl/junit/J= UnitReporter.java (from rev 8587, modules/test/trunk/unit/src/main/org/jbos= s/unit/report/junit/JUnitReporter.java) =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/report/impl/junit/JUnit= Reporter.java (rev 0) +++ modules/test/trunk/unit/src/main/org/jboss/unit/report/impl/junit/JUnit= Reporter.java 2007-10-10 14:53:42 UTC (rev 8588) @@ -0,0 +1,174 @@ +/*************************************************************************= ***** + * JBoss, a division of Red Hat = * + * Copyright 2006, Red Hat Middleware, LLC, and individual = * + * contributors as indicated by the @authors tag. See the = * + * copyright.txt in the distribution for a full listing of = * + * individual contributors. = * + * = * + * This is free software; you can redistribute it and/or modify it = * + * under the terms of the GNU Lesser General Public License as = * + * published by the Free Software Foundation; either version 2.1 of = * + * the License, or (at your option) any later version. = * + * = * + * This software is distributed in the hope that it will be useful, = * + * but WITHOUT ANY WARRANTY; without even the implied warranty of = * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU = * + * Lesser General Public License for more details. = * + * = * + * You should have received a copy of the GNU Lesser General Public = * + * License along with this software; if not, write to the Free = * + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA = * + * 02110-1301 USA, or see the FSF site: http://www.fsf.org. = * + *************************************************************************= *****/ +package org.jboss.unit.report.impl.junit; + +import java.io.ByteArrayOutputStream; +import java.io.IOException; +import java.io.OutputStream; +import java.io.PrintStream; + +import org.jboss.unit.runner.TestRunnerEventListener; +import org.jboss.unit.runner.TestRunnerEvent; +import org.jboss.unit.runner.event.EndRunnerEvent; +import org.jboss.unit.runner.event.EndTestEvent; +import org.jboss.unit.runner.event.RunnerFailureEvent; +import org.jboss.unit.runner.event.StartRunnerEvent; +import org.jboss.unit.runner.event.StartTestEvent; + +/** + * + * @author Julien Viet + * @author Emanuel Muckenhuber + * @version $Revision: 1.1 $ + */ +public class JUnitReporter implements TestRunnerEventListener +{ + /** The JUnit test report */ + private JUnitTestReport report; + = + /** The system error printStream */ + private ByteArrayOutputStream systemError; + = + /** The system out printStream */ + private ByteArrayOutputStream systemOut; + = + /** To dir */ + private static String toDir; + + + public JUnitReporter(String reportToDir) + { + toDir =3D reportToDir; + // redirecting system out and err + this.systemError =3D new ByteArrayOutputStream(); + this.systemOut =3D new ByteArrayOutputStream(); + this.setStreams(systemError, systemOut); + + this.report =3D new JUnitTestReport(); + } + + public JUnitReporter(String reportToDir, + String testSuiteName) + { + this(reportToDir); + + this.report.setTestSuiteName(testSuiteName); + + + } + = + public void onEvent(TestRunnerEvent event) + { + if (event instanceof StartRunnerEvent) + { + report.startTestSuite((StartRunnerEvent) event); + } + else if (event instanceof EndRunnerEvent) + { + // append system out and system err + report.appendSystemError(systemError.toString()); + report.appendSystemOutput(systemOut.toString()); + = + // Testsuite End + report.endTestSuite((EndRunnerEvent) event); + = + // Export xml + report.exportXML(toDir); + } + else if (event instanceof RunnerFailureEvent) + { + report.runnerFailed((RunnerFailureEvent) event); + } + else if (event instanceof StartTestEvent) + { + report.startTest((StartTestEvent) event); + } + else if (event instanceof EndTestEvent) + { + report.endTest((EndTestEvent) event); + } + } + = + private void setStreams(ByteArrayOutputStream a, ByteArrayOutputStream = b) + { + PrintStream savedError =3D System.err; + PrintStream savedOut =3D System.out; + = + System.setErr(new PrintStream(new CaptureOutputStream(savedError, a)= )); + System.setOut(new PrintStream(new CaptureOutputStream(savedOut, b))); + = + } + = + private class CaptureOutputStream extends OutputStream + { + private OutputStream s1; + private OutputStream s2; + = + public CaptureOutputStream(OutputStream s1, OutputStream s2) + { + this.s1 =3D s1; + this.s2 =3D s2; + } + = + @Override + public void close() throws IOException + { + try + { + s1.close(); + } + finally + { + s2.close(); + } + } + + @Override + public void flush() throws IOException + { + s1.flush(); + s2.flush(); + } + + @Override + public void write(int b) throws IOException + { + s1.write(b); + s2.write(b); + } + = + @Override + public void write(byte[] b) throws IOException + { + s1.write(b); + s2.write(b); + } + = + @Override + public void write(byte[] b, int off, int len) throws IOException + { + s1.write(b, off, len); + s2.write(b, off, len); + } + } +} Deleted: modules/test/trunk/unit/src/main/org/jboss/unit/report/impl/junit/= JUnitTestReport.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/report/junit/JUnitTestR= eport.java 2007-10-08 13:26:57 UTC (rev 8562) +++ modules/test/trunk/unit/src/main/org/jboss/unit/report/impl/junit/JUnit= TestReport.java 2007-10-10 14:53:42 UTC (rev 8588) @@ -1,292 +0,0 @@ -/*************************************************************************= ***** - * JBoss, a division of Red Hat = * - * Copyright 2006, Red Hat Middleware, LLC, and individual = * - * contributors as indicated by the @authors tag. See the = * - * copyright.txt in the distribution for a full listing of = * - * individual contributors. = * - * = * - * This is free software; you can redistribute it and/or modify it = * - * under the terms of the GNU Lesser General Public License as = * - * published by the Free Software Foundation; either version 2.1 of = * - * the License, or (at your option) any later version. = * - * = * - * This software is distributed in the hope that it will be useful, = * - * but WITHOUT ANY WARRANTY; without even the implied warranty of = * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU = * - * Lesser General Public License for more details. = * - * = * - * You should have received a copy of the GNU Lesser General Public = * - * License along with this software; if not, write to the Free = * - * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA = * - * 02110-1301 USA, or see the FSF site: http://www.fsf.org. = * - *************************************************************************= *****/ -package org.jboss.unit.report.junit; - -import java.io.File; -import java.io.FileNotFoundException; -import java.io.FileOutputStream; -import java.io.PrintWriter; -import java.io.StringWriter; -import java.io.Writer; -import java.net.InetAddress; -import java.net.UnknownHostException; -import java.text.SimpleDateFormat; -import java.util.Date; -import java.util.Iterator; - -import javax.xml.parsers.DocumentBuilder; -import javax.xml.parsers.DocumentBuilderFactory; -import javax.xml.parsers.ParserConfigurationException; -import javax.xml.transform.OutputKeys; -import javax.xml.transform.Result; -import javax.xml.transform.Source; -import javax.xml.transform.Transformer; -import javax.xml.transform.TransformerException; -import javax.xml.transform.TransformerFactory; -import javax.xml.transform.dom.DOMSource; -import javax.xml.transform.stream.StreamResult; - -import org.jboss.unit.Failure; -import org.jboss.unit.FailureType; -import org.jboss.unit.TestId; -import org.jboss.unit.runner.TestResult; -import org.jboss.unit.runner.event.EndRunnerEvent; -import org.jboss.unit.runner.event.EndTestEvent; -import org.jboss.unit.runner.event.RunnerFailureEvent; -import org.jboss.unit.runner.event.StartRunnerEvent; -import org.jboss.unit.runner.event.StartTestEvent; -import org.jboss.unit.runner.results.TestFailure; -import org.w3c.dom.Document; -import org.w3c.dom.Element; - -/** - * @author Emanuel Muckenhuber - * @version $Revision$ - */ -public class JUnitTestReport -{ - - /** The test suite name */ - private String testSuiteName; - = - /** The line separator */ - private final static String ls =3D System.getProperty("line.separator"); - - /** The document */ - private Document document; - = - /** The root element */ - private Element rootElement; - = - /** The system error */ - private StringBuffer systemErr =3D new StringBuffer(); - = - /** The system output */ - private StringBuffer systemOut =3D new StringBuffer(); - = - /** The test count */ - private int tests; - = - /** The error count */ - private int errors; - = - /** The failed count */ - private int failed; - - public JUnitTestReport(String testSuiteName) - { - this.testSuiteName =3D testSuiteName; - } - = - = - public void startTestSuite(StartRunnerEvent event) - { - this.document =3D getDocumentBuilder().newDocument(); - this.rootElement =3D this.document.createElement(XMLConstants.TESTSU= ITE); - this.rootElement.setAttribute(XMLConstants.TIMESTAMP, getTimestamp()= ); - this.rootElement.setAttribute(XMLConstants.HOSTNAME, getHostName()); - this.rootElement.setAttribute(XMLConstants.ATTR_NAME, this.testSuite= Name); - Element properties =3D document.createElement(XMLConstants.PROPERTIE= S); - this.rootElement.appendChild(properties); - // add properties list - - } - = - public void startTest(StartTestEvent event) - { = - this.tests++; - } - = - public void runnerFailed(RunnerFailureEvent event) - { - this.tests++; = - this.errors++; - Element e =3D document.createElement(XMLConstants.ERROR); - e.appendChild(document.createCDATASection(ls + event.getFailure().ge= tMessage() + ls + stackToString(event.getFailure().getCause()))); - rootElement.appendChild(e); - } - = - public void endTest(EndTestEvent event) - { - TestId testId =3D event.getTestId(); - TestResult result =3D event.getTestResult(); - Element test =3D document.createElement(XMLConstants.TESTCASE); - // The test name - StringBuffer nb =3D new StringBuffer(); - for(int i =3D 0; i < testId.getLength(); i ++) - { - if (i > 0) - { - nb.append("."); - } - nb.append(testId.getName(i)); - } - String testName =3D nb.toString(); - // Test parameters - StringBuffer parameters =3D new StringBuffer(); - for(Iterator i =3D result.getParametrization().values().iter= ator(); i.hasNext(); ) - { - String name =3D i.next(); - String value =3D result.getParametrization().get(name); - parameters.append(name + "=3D" + value + "?"); - } - - if ( parameters.length() > 0) - testName =3D testName + "?" + parameters.toString(); - = - test.setAttribute(XMLConstants.ATTR_NAME, testName); - // Testcase time - test.setAttribute(XMLConstants.ATTR_TIME, new Long(result.getDuratio= nMillis()).toString()); - // If test failed - if (result instanceof TestFailure) - { - TestFailure testFailure =3D (TestFailure) result; - Failure failure =3D testFailure.getFailure(); - = - String failureType; - // Check failure type (failed, error) - if(FailureType.ASSERTION =3D=3D failure.getType()) - { - this.failed++; - failureType =3D XMLConstants.FAILURE; - } - else = - { - this.errors++; - failureType =3D XMLConstants.ERROR; - } - - test.appendChild(addError(failureType, failure.getCause())); - } - this.rootElement.appendChild(test); - } - = - public void endTestSuite(EndRunnerEvent event) - { - // Testsuite counts (tests, errors, failures) - this.rootElement.setAttribute(XMLConstants.ATTR_TESTS, Integer.toStr= ing(this.tests)); - this.rootElement.setAttribute(XMLConstants.ATTR_ERRORS, Integer.toSt= ring(this.errors)); - this.rootElement.setAttribute(XMLConstants.ATTR_FAILURES, Integer.to= String(this.failed)); - = - // Testsuite system-err - Element systemError =3D document.createElement(XMLConstants.SYSTEM_E= RR); - systemError.appendChild(document.createCDATASection(systemErr.toStri= ng())); - // Testsuite system-out - Element systemOutElement =3D document.createElement(XMLConstants.SYS= TEM_OUT); - systemOutElement.appendChild(document.createCDATASection(systemOut.t= oString())); - = - this.rootElement.appendChild(systemError); - this.rootElement.appendChild(systemOutElement); - = - // System.out.println(exportXML()); - } - = - public void appendSystemOutput(String output) - { - this.systemOut.append(output); - } - = - public void appendSystemError(String error) - { - this.systemErr.append(error); - } - = - public void exportXML(String toDir) - { - try - { - File file =3D new File(toDir + "/" + "TEST-" + testSuiteName + ".= xml"); - = - Source source =3D new DOMSource(this.rootElement); - Transformer xtrans =3D TransformerFactory.newInstance().newTransf= ormer(); - xtrans.setOutputProperty(OutputKeys.INDENT, "yes"); - Result result =3D new StreamResult(new FileOutputStream(file)); - xtrans.transform(source, result); - } - catch(FileNotFoundException e) - { - e.printStackTrace(); - } - catch(TransformerException e) - { - e.printStackTrace(); - } - catch(IllegalArgumentException e) - { - e.printStackTrace(); - } - } - = - private Element addError(String type, Throwable t) - { - Element error =3D document.createElement(type); - // Testcase error message - error.setAttribute(XMLConstants.ATTR_MESSAGE, t.getMessage()); - // Testcase error type - error.setAttribute(XMLConstants.ATTR_TYPE, t.getClass().getName()); - // Testcase stacktrace - error.appendChild(document.createCDATASection(stackToString(t))); - return error; - } - = - private static String stackToString(Throwable t) - { - final Writer writer =3D new StringWriter(); - final PrintWriter printWriter =3D new PrintWriter(writer); - t.printStackTrace(printWriter); - printWriter.flush(); - printWriter.close(); - return writer.toString(); - } - = - private static String getTimestamp() - { - SimpleDateFormat date =3D new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:s= s"); - return date.format(new Date()); - } - = - private static String getHostName() - { - try - { - return InetAddress.getLocalHost().getHostName(); - } - catch(UnknownHostException e) - { - return "localhost"; - } - } - = - private static DocumentBuilder getDocumentBuilder() - { - try - { - return DocumentBuilderFactory.newInstance().newDocumentBuilder(); - } - catch(ParserConfigurationException e) - { - e.printStackTrace(); - return null; - } - } -} \ No newline at end of file Copied: modules/test/trunk/unit/src/main/org/jboss/unit/report/impl/junit/J= UnitTestReport.java (from rev 8587, modules/test/trunk/unit/src/main/org/jb= oss/unit/report/junit/JUnitTestReport.java) =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/report/impl/junit/JUnit= TestReport.java (rev 0) +++ modules/test/trunk/unit/src/main/org/jboss/unit/report/impl/junit/JUnit= TestReport.java 2007-10-10 14:53:42 UTC (rev 8588) @@ -0,0 +1,335 @@ +/*************************************************************************= ***** + * JBoss, a division of Red Hat = * + * Copyright 2006, Red Hat Middleware, LLC, and individual = * + * contributors as indicated by the @authors tag. See the = * + * copyright.txt in the distribution for a full listing of = * + * individual contributors. = * + * = * + * This is free software; you can redistribute it and/or modify it = * + * under the terms of the GNU Lesser General Public License as = * + * published by the Free Software Foundation; either version 2.1 of = * + * the License, or (at your option) any later version. = * + * = * + * This software is distributed in the hope that it will be useful, = * + * but WITHOUT ANY WARRANTY; without even the implied warranty of = * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU = * + * Lesser General Public License for more details. = * + * = * + * You should have received a copy of the GNU Lesser General Public = * + * License along with this software; if not, write to the Free = * + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA = * + * 02110-1301 USA, or see the FSF site: http://www.fsf.org. = * + *************************************************************************= *****/ +package org.jboss.unit.report.impl.junit; + +import java.io.File; +import java.io.FileNotFoundException; +import java.io.FileOutputStream; +import java.io.PrintWriter; +import java.io.StringWriter; +import java.io.Writer; +import java.net.InetAddress; +import java.net.UnknownHostException; +import java.text.SimpleDateFormat; +import java.util.Date; +import java.util.Iterator; + +import javax.xml.parsers.DocumentBuilder; +import javax.xml.parsers.DocumentBuilderFactory; +import javax.xml.parsers.ParserConfigurationException; +import javax.xml.transform.OutputKeys; +import javax.xml.transform.Result; +import javax.xml.transform.Source; +import javax.xml.transform.Transformer; +import javax.xml.transform.TransformerException; +import javax.xml.transform.TransformerFactory; +import javax.xml.transform.dom.DOMSource; +import javax.xml.transform.stream.StreamResult; + +import org.jboss.unit.Failure; +import org.jboss.unit.FailureType; +import org.jboss.unit.TestId; +import org.jboss.unit.runner.TestResult; +import org.jboss.unit.runner.event.EndRunnerEvent; +import org.jboss.unit.runner.event.EndTestEvent; +import org.jboss.unit.runner.event.RunnerFailureEvent; +import org.jboss.unit.runner.event.StartRunnerEvent; +import org.jboss.unit.runner.event.StartTestEvent; +import org.jboss.unit.runner.results.TestFailure; +import org.w3c.dom.Document; +import org.w3c.dom.Element; + +/** + * @author Emanuel Muckenhuber + * @version $Revision$ + */ +public class JUnitTestReport +{ + + /** The test suite name */ + private String testSuiteName; + + public static final String DEFAULT_TEST_SUITE_NAME =3D "JBossUnitTestSu= ite"; + + public static final String TEST_FILE_NAME_START =3D "TEST-"; + = + /** The line separator */ + private final static String ls =3D System.getProperty("line.separator"); + + /** The document */ + private Document document; + = + /** The root element */ + private Element rootElement; + = + /** The system error */ + private StringBuffer systemErr =3D new StringBuffer(); + = + /** The system output */ + private StringBuffer systemOut =3D new StringBuffer(); + = + /** The test count */ + private int tests; + = + /** The error count */ + private int errors; + = + /** The failed count */ + private int failed; + + private String timeStamp; + + + public JUnitTestReport() + { + } + + public JUnitTestReport(String testSuiteName) + { + this.testSuiteName =3D testSuiteName; + } + = + = + public void startTestSuite(StartRunnerEvent event) + { + this.document =3D getDocumentBuilder().newDocument(); + this.rootElement =3D this.document.createElement(XMLConstants.TESTSU= ITE); + this.rootElement.setAttribute(XMLConstants.TIMESTAMP, getTimestamp()= ); + this.rootElement.setAttribute(XMLConstants.HOSTNAME, getHostName()); + this.rootElement.setAttribute(XMLConstants.ATTR_NAME, getTestSuiteNa= me()); + Element properties =3D document.createElement(XMLConstants.PROPERTIE= S); + this.rootElement.appendChild(properties); + // add properties list + + } + = + public void startTest(StartTestEvent event) + { = + this.tests++; + } + = + public void runnerFailed(RunnerFailureEvent event) + { + this.tests++; = + this.errors++; + Element e =3D document.createElement(XMLConstants.ERROR); + e.appendChild(document.createCDATASection(ls + event.getFailure().ge= tMessage() + ls + stackToString(event.getFailure().getCause()))); + rootElement.appendChild(e); + } + = + public void endTest(EndTestEvent event) + { + TestId testId =3D event.getTestId(); + TestResult result =3D event.getTestResult(); + Element test =3D document.createElement(XMLConstants.TESTCASE); + // The test name + StringBuffer nb =3D new StringBuffer(); + for(int i =3D 0; i < testId.getLength(); i ++) + { + if (i > 0) + { + nb.append("."); + } + nb.append(testId.getName(i)); + } + String testName =3D nb.toString(); + // Test parameters + StringBuffer parameters =3D new StringBuffer(); + for(Iterator i =3D result.getParametrization().values().iter= ator(); i.hasNext(); ) + { + String name =3D i.next(); + String value =3D result.getParametrization().get(name); + parameters.append(name + "=3D" + value + "?"); + } + + if ( parameters.length() > 0) + testName =3D testName + "?" + parameters.toString(); + = + test.setAttribute(XMLConstants.ATTR_NAME, testName); + // Testcase time + test.setAttribute(XMLConstants.ATTR_TIME, new Long(result.getDuratio= nMillis()).toString()); + // If test failed + if (result instanceof TestFailure) + { + TestFailure testFailure =3D (TestFailure) result; + Failure failure =3D testFailure.getFailure(); + = + String failureType; + // Check failure type (failed, error) + if(FailureType.ASSERTION =3D=3D failure.getType()) + { + this.failed++; + failureType =3D XMLConstants.FAILURE; + } + else = + { + this.errors++; + failureType =3D XMLConstants.ERROR; + } + + test.appendChild(addError(failureType, failure.getCause())); + } + this.rootElement.appendChild(test); + } + = + public void endTestSuite(EndRunnerEvent event) + { + // Testsuite counts (tests, errors, failures) + this.rootElement.setAttribute(XMLConstants.ATTR_TESTS, Integer.toStr= ing(this.tests)); + this.rootElement.setAttribute(XMLConstants.ATTR_ERRORS, Integer.toSt= ring(this.errors)); + this.rootElement.setAttribute(XMLConstants.ATTR_FAILURES, Integer.to= String(this.failed)); + = + // Testsuite system-err + Element systemError =3D document.createElement(XMLConstants.SYSTEM_E= RR); + systemError.appendChild(document.createCDATASection(systemErr.toStri= ng())); + // Testsuite system-out + Element systemOutElement =3D document.createElement(XMLConstants.SYS= TEM_OUT); + systemOutElement.appendChild(document.createCDATASection(systemOut.t= oString())); + = + this.rootElement.appendChild(systemError); + this.rootElement.appendChild(systemOutElement); + = + // System.out.println(exportXML()); + } + = + public void appendSystemOutput(String output) + { + this.systemOut.append(output); + } + = + public void appendSystemError(String error) + { + this.systemErr.append(error); + } + = + public void exportXML(String toDir) + { + try + { + + StringBuffer filePath =3D new StringBuffer(); + + // If no test suite name is specified use default and add timesta= mp + filePath.append(toDir) + .append("/") + .append(TEST_FILE_NAME_START) + .append(getTestSuiteName()) + .append(getTestSuiteName().equals(DEFAULT_TEST_SUITE_NAME) ? "= -" + getTimestamp() : "" ) + .append(".xml"); + + + File file =3D new File(filePath.toString()); + = + Source source =3D new DOMSource(this.rootElement); + Transformer xtrans =3D TransformerFactory.newInstance().newTransf= ormer(); + xtrans.setOutputProperty(OutputKeys.INDENT, "yes"); + Result result =3D new StreamResult(new FileOutputStream(file)); + xtrans.transform(source, result); + } + catch(FileNotFoundException e) + { + e.printStackTrace(); + } + catch(TransformerException e) + { + e.printStackTrace(); + } + catch(IllegalArgumentException e) + { + e.printStackTrace(); + } + } + = + private Element addError(String type, Throwable t) + { + Element error =3D document.createElement(type); + // Testcase error message + error.setAttribute(XMLConstants.ATTR_MESSAGE, t.getMessage()); + // Testcase error type + error.setAttribute(XMLConstants.ATTR_TYPE, t.getClass().getName()); + // Testcase stacktrace + error.appendChild(document.createCDATASection(stackToString(t))); + return error; + } + = + private static String stackToString(Throwable t) + { + final Writer writer =3D new StringWriter(); + final PrintWriter printWriter =3D new PrintWriter(writer); + t.printStackTrace(printWriter); + printWriter.flush(); + printWriter.close(); + return writer.toString(); + } + = + private String getTimestamp() + { + if (timeStamp =3D=3D null) + { + SimpleDateFormat date =3D new SimpleDateFormat("yyyy-MM-dd'T'HH:m= m:ss"); + timeStamp =3D date.format(new Date()); + + } + return timeStamp; = + } + = + private static String getHostName() + { + try + { + return InetAddress.getLocalHost().getHostName(); + } + catch(UnknownHostException e) + { + return "localhost"; + } + } + = + private static DocumentBuilder getDocumentBuilder() + { + try + { + return DocumentBuilderFactory.newInstance().newDocumentBuilder(); + } + catch(ParserConfigurationException e) + { + e.printStackTrace(); + return null; + } + } + + + public String getTestSuiteName() + { + if (testSuiteName =3D=3D null) + { + return DEFAULT_TEST_SUITE_NAME; + } + return testSuiteName; + } + + public void setTestSuiteName(String testSuiteName) + { + this.testSuiteName =3D testSuiteName; + } +} \ No newline at end of file Deleted: modules/test/trunk/unit/src/main/org/jboss/unit/report/impl/junit/= XMLConstants.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/report/junit/XMLConstan= ts.java 2007-10-08 13:26:57 UTC (rev 8562) +++ modules/test/trunk/unit/src/main/org/jboss/unit/report/impl/junit/XMLCo= nstants.java 2007-10-10 14:53:42 UTC (rev 8588) @@ -1,119 +0,0 @@ -/*************************************************************************= ***** - * JBoss, a division of Red Hat = * - * Copyright 2006, Red Hat Middleware, LLC, and individual = * - * contributors as indicated by the @authors tag. See the = * - * copyright.txt in the distribution for a full listing of = * - * individual contributors. = * - * = * - * This is free software; you can redistribute it and/or modify it = * - * under the terms of the GNU Lesser General Public License as = * - * published by the Free Software Foundation; either version 2.1 of = * - * the License, or (at your option) any later version. = * - * = * - * This software is distributed in the hope that it will be useful, = * - * but WITHOUT ANY WARRANTY; without even the implied warranty of = * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU = * - * Lesser General Public License for more details. = * - * = * - * You should have received a copy of the GNU Lesser General Public = * - * License along with this software; if not, write to the Free = * - * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA = * - * 02110-1301 USA, or see the FSF site: http://www.fsf.org. = * - *************************************************************************= *****/ -package org.jboss.unit.report.junit; - -/** - *

Interface groups XML constants. - * Interface that groups all constants used throughout the XML - * documents that are generated by the XMLJUnitResultFormatter - * As of now the DTD is: - *

- *
- * 
- */ -public class XMLConstants { - - /** the testsuites element for the aggregate document */ - public static final String TESTSUITES =3D "testsuites"; - - /** the testsuite element */ - public static final String TESTSUITE =3D "testsuite"; - - /** the testcase element */ - public static final String TESTCASE =3D "testcase"; - - /** the error element */ - public static final String ERROR =3D "error"; - - /** the failure element */ - public static final String FAILURE =3D "failure"; - - /** the system-err element */ - public static final String SYSTEM_ERR =3D "system-err"; - - /** the system-out element */ - public static final String SYSTEM_OUT =3D "system-out"; - - /** package attribute for the aggregate document */ - public static final String ATTR_PACKAGE =3D "package"; - - /** name attribute for property, testcase and testsuite elements */ - public static final String ATTR_NAME =3D "name"; - - /** time attribute for testcase and testsuite elements */ - public static final String ATTR_TIME =3D "time"; - - /** errors attribute for testsuite elements */ - public static final String ATTR_ERRORS =3D "errors"; - - /** failures attribute for testsuite elements */ - public static final String ATTR_FAILURES =3D "failures"; - - /** tests attribute for testsuite elements */ - public static final String ATTR_TESTS =3D "tests"; - - /** type attribute for failure and error elements */ - public static final String ATTR_TYPE =3D "type"; - - /** message attribute for failure elements */ - public static final String ATTR_MESSAGE =3D "message"; - - /** the properties element */ - public static final String PROPERTIES =3D "properties"; - - /** the property element */ - public static final String PROPERTY =3D "property"; - - /** value attribute for property elements */ - public static final String ATTR_VALUE =3D "value"; - - /** classname attribute for testcase elements */ - public static final String ATTR_CLASSNAME =3D "classname"; - - /** id attribute */ - public static final String ATTR_ID =3D "id"; - = - /** timestamp of test cases */ - public static final String TIMESTAMP =3D "timestamp"; - - /** name of host running the tests */ - public static final String HOSTNAME =3D "hostname"; - -} - -/* - * Copyright 2001,2004-2005 The Apache Software Foundation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implie= d. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ Copied: modules/test/trunk/unit/src/main/org/jboss/unit/report/impl/junit/X= MLConstants.java (from rev 8587, modules/test/trunk/unit/src/main/org/jboss= /unit/report/junit/XMLConstants.java) =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/report/impl/junit/XMLCo= nstants.java (rev 0) +++ modules/test/trunk/unit/src/main/org/jboss/unit/report/impl/junit/XMLCo= nstants.java 2007-10-10 14:53:42 UTC (rev 8588) @@ -0,0 +1,119 @@ +/*************************************************************************= ***** + * JBoss, a division of Red Hat = * + * Copyright 2006, Red Hat Middleware, LLC, and individual = * + * contributors as indicated by the @authors tag. See the = * + * copyright.txt in the distribution for a full listing of = * + * individual contributors. = * + * = * + * This is free software; you can redistribute it and/or modify it = * + * under the terms of the GNU Lesser General Public License as = * + * published by the Free Software Foundation; either version 2.1 of = * + * the License, or (at your option) any later version. = * + * = * + * This software is distributed in the hope that it will be useful, = * + * but WITHOUT ANY WARRANTY; without even the implied warranty of = * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU = * + * Lesser General Public License for more details. = * + * = * + * You should have received a copy of the GNU Lesser General Public = * + * License along with this software; if not, write to the Free = * + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA = * + * 02110-1301 USA, or see the FSF site: http://www.fsf.org. = * + *************************************************************************= *****/ +package org.jboss.unit.report.impl.junit; + +/** + *

Interface groups XML constants. + * Interface that groups all constants used throughout the XML + * documents that are generated by the XMLJUnitResultFormatter + * As of now the DTD is: + *

+ *
+ * 
+ */ +public class XMLConstants { + + /** the testsuites element for the aggregate document */ + public static final String TESTSUITES =3D "testsuites"; + + /** the testsuite element */ + public static final String TESTSUITE =3D "testsuite"; + + /** the testcase element */ + public static final String TESTCASE =3D "testcase"; + + /** the error element */ + public static final String ERROR =3D "error"; + + /** the failure element */ + public static final String FAILURE =3D "failure"; + + /** the system-err element */ + public static final String SYSTEM_ERR =3D "system-err"; + + /** the system-out element */ + public static final String SYSTEM_OUT =3D "system-out"; + + /** package attribute for the aggregate document */ + public static final String ATTR_PACKAGE =3D "package"; + + /** name attribute for property, testcase and testsuite elements */ + public static final String ATTR_NAME =3D "name"; + + /** time attribute for testcase and testsuite elements */ + public static final String ATTR_TIME =3D "time"; + + /** errors attribute for testsuite elements */ + public static final String ATTR_ERRORS =3D "errors"; + + /** failures attribute for testsuite elements */ + public static final String ATTR_FAILURES =3D "failures"; + + /** tests attribute for testsuite elements */ + public static final String ATTR_TESTS =3D "tests"; + + /** type attribute for failure and error elements */ + public static final String ATTR_TYPE =3D "type"; + + /** message attribute for failure elements */ + public static final String ATTR_MESSAGE =3D "message"; + + /** the properties element */ + public static final String PROPERTIES =3D "properties"; + + /** the property element */ + public static final String PROPERTY =3D "property"; + + /** value attribute for property elements */ + public static final String ATTR_VALUE =3D "value"; + + /** classname attribute for testcase elements */ + public static final String ATTR_CLASSNAME =3D "classname"; + + /** id attribute */ + public static final String ATTR_ID =3D "id"; + = + /** timestamp of test cases */ + public static final String TIMESTAMP =3D "timestamp"; + + /** name of host running the tests */ + public static final String HOSTNAME =3D "hostname"; + +} + +/* + * Copyright 2001,2004-2005 The Apache Software Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implie= d. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ Deleted: modules/test/trunk/unit/src/main/org/jboss/unit/tooling/ExcludeTes= tFilter.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/tooling/ExcludeTestFilt= er.java 2007-10-10 14:07:54 UTC (rev 8587) +++ modules/test/trunk/unit/src/main/org/jboss/unit/tooling/ExcludeTestFilt= er.java 2007-10-10 14:53:42 UTC (rev 8588) @@ -1,78 +0,0 @@ -/* -* JBoss, a division of Red Hat -* Copyright 2006, Red Hat Middleware, LLC, and individual contributors as = indicated -* by the @authors tag. See the copyright.txt in the distribution for a -* full listing of individual contributors. -* -* This is free software; you can redistribute it and/or modify it -* under the terms of the GNU Lesser General Public License as -* published by the Free Software Foundation; either version 2.1 of -* the License, or (at your option) any later version. -* -* This software is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -* Lesser General Public License for more details. -* -* You should have received a copy of the GNU Lesser General Public -* License along with this software; if not, write to the Free -* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA -* 02110-1301 USA, or see the FSF site: http://www.fsf.org. -*/ - -package org.jboss.unit.tooling; - -import org.jboss.unit.TestId; -import org.jboss.unit.runner.TestFilter; -import org.jboss.unit.info.TestInfo; - -import java.util.Set; -import java.util.HashSet; -import java.util.Map; - -/** - * @author Boleslaw Dawidowicz - * @version $Revision: 0.1 $ - */ -public class ExcludeTestFilter extends InfoTestFilter -{ - - - public ExcludeTestFilter() - { - } - - public ExcludeTestFilter(Set keywords, Set names, Set namePatterns) - { - super(keywords, names, namePatterns); - } - - public boolean include(TestId testId, TestInfo testInfo) - { - // First check names - - if (checkName(testInfo.getName())) - { - return false; - } - - // ... then keywords - - if (checkKeywords(testInfo.getKeywords())) - { - return false; - } - - // ... then check if name matches any of provided regex - - if (checkNamePatterns(testInfo.getName())) - { - return false; - } - - return true; - } - - = - -} Deleted: modules/test/trunk/unit/src/main/org/jboss/unit/tooling/IncludeTes= tFilter.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/tooling/IncludeTestFilt= er.java 2007-10-10 14:07:54 UTC (rev 8587) +++ modules/test/trunk/unit/src/main/org/jboss/unit/tooling/IncludeTestFilt= er.java 2007-10-10 14:53:42 UTC (rev 8588) @@ -1,77 +0,0 @@ -/* -* JBoss, a division of Red Hat -* Copyright 2006, Red Hat Middleware, LLC, and individual contributors as = indicated -* by the @authors tag. See the copyright.txt in the distribution for a -* full listing of individual contributors. -* -* This is free software; you can redistribute it and/or modify it -* under the terms of the GNU Lesser General Public License as -* published by the Free Software Foundation; either version 2.1 of -* the License, or (at your option) any later version. -* -* This software is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -* Lesser General Public License for more details. -* -* You should have received a copy of the GNU Lesser General Public -* License along with this software; if not, write to the Free -* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA -* 02110-1301 USA, or see the FSF site: http://www.fsf.org. -*/ - -package org.jboss.unit.tooling; - -import org.jboss.unit.TestId; -import org.jboss.unit.runner.TestFilter; -import org.jboss.unit.info.TestInfo; - -import java.util.Set; -import java.util.HashSet; -import java.util.Map; - -/** - * @author Boleslaw Dawidowicz - * @version $Revision: 0.1 $ - */ -public class IncludeTestFilter extends InfoTestFilter -{ - - - public IncludeTestFilter() - { - } - - public IncludeTestFilter(Set keywords, Set names, Set namePatterns) - { - super(keywords, names, namePatterns); - } - - public boolean include(TestId testId, TestInfo testInfo) - { - - // First check names - - if (checkName(testInfo.getName())) - { - return true; - } - - // ... then keywords - - if (checkKeywords(testInfo.getKeywords())) - { - return true; - } - - // ... then check if name matches any of provided regex - - if (checkNamePatterns(testInfo.getName())) - { - return true; - } - - return false; - } - -} Deleted: modules/test/trunk/unit/src/main/org/jboss/unit/tooling/InfoTestFi= lter.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/tooling/InfoTestFilter.= java 2007-10-10 14:07:54 UTC (rev 8587) +++ modules/test/trunk/unit/src/main/org/jboss/unit/tooling/InfoTestFilter.= java 2007-10-10 14:53:42 UTC (rev 8588) @@ -1,226 +0,0 @@ -/* -* JBoss, a division of Red Hat -* Copyright 2006, Red Hat Middleware, LLC, and individual contributors as = indicated -* by the @authors tag. See the copyright.txt in the distribution for a -* full listing of individual contributors. -* -* This is free software; you can redistribute it and/or modify it -* under the terms of the GNU Lesser General Public License as -* published by the Free Software Foundation; either version 2.1 of -* the License, or (at your option) any later version. -* -* This software is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -* Lesser General Public License for more details. -* -* You should have received a copy of the GNU Lesser General Public -* License along with this software; if not, write to the Free -* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA -* 02110-1301 USA, or see the FSF site: http://www.fsf.org. -*/ - -package org.jboss.unit.tooling; - -import org.jboss.unit.runner.TestFilter; -import org.jboss.unit.TestId; -import org.jboss.unit.info.TestInfo; - -import java.util.Set; -import java.util.HashSet; -import java.util.Map; - -/** - * @author Boleslaw Dawidowicz - * @version $Revision: 0.1 $ - */ -public abstract class InfoTestFilter implements TestFilter -{ - = - private Set keywords =3D new HashSet(); - - private Set names =3D new HashSet(); - - private Set namePatterns =3D new HashSet(); - - public InfoTestFilter() - { - } - - public InfoTestFilter(Set keywords, Set names, Set namePatterns) - { - if (keywords =3D=3D null) - { - throw new IllegalArgumentException("keywords cannot be null"); - } - if (names =3D=3D null) - { - throw new IllegalArgumentException("names cannot be null"); - } - if (namePatterns =3D=3D null) - { - throw new IllegalArgumentException("namePatterns cannot be null"); - } - - this.keywords =3D keywords; - this.names =3D names; - this.namePatterns =3D namePatterns; - } - - public InfoTestFilter addKeyword(String keyword) - { - if (keyword =3D=3D null) - { - throw new IllegalArgumentException("keyword cannot be null"); - } - - keywords.add(keyword); - - return this; - } - - - public InfoTestFilter addUnparsedKeywords(String keywordsString) - { - if (keywordsString =3D=3D null) - { - throw new IllegalArgumentException("keywordsString cannot be null= "); - } - String[] keywordValues =3D keywordsString.split(","); - for (String keyword : keywordValues) - { - this.keywords.add(keyword.trim()); - } - return this; - } - - public InfoTestFilter addName(String name) - { - if (name =3D=3D null) - { - throw new IllegalArgumentException("name cannot be null"); - } - names.add(name); - - return this; - } - - public InfoTestFilter addUnparsedNames(String namesString) - { - if (namesString =3D=3D null) - { - throw new IllegalArgumentException("namesString cannot be null"); - } - String[] namesValues =3D namesString.split(","); - for (String name : namesValues) - { - this.names.add(name.trim()); - } - return this; - } - - public InfoTestFilter addNamePattern(String pattern) - { - if (pattern =3D=3D null) - { - throw new IllegalArgumentException("pattern cannot be null"); - } - namePatterns.add(pattern); - - return this; - } - - public InfoTestFilter addUnparsedNamePatterns(String patternString) - { - if (patternString =3D=3D null) - { - throw new IllegalArgumentException("patternString cannot be null"= ); - } - String[] patternValues =3D patternString.split(","); - for (String pattern : patternValues) - { - this.namePatterns.add(pattern.trim()); - } - return this; - } - - public abstract boolean include(TestId testId, TestInfo testInfo); - - public boolean include(TestId testId, Map parametrizati= on, TestInfo testInfo) - { - // At the moment no parametrization match - - return include (testId, testInfo); - } - - boolean checkName(String name) - { - for (String s : names) - { - if (s.equals(name)) - { - return true; - } - } - return false; - } - - boolean checkKeywords(Set keywords) - { - for (String keyword : this.keywords) - { - for (String toMatch : keywords) - { - if (keyword.equals(toMatch)) - { - return true; - } - } - } - return false; - } - - boolean checkNamePatterns(String name) - { - for (String regex : this.namePatterns) - { - if (name.matches(regex)) - { - return true; - } - } - return false; - } - - - public String toString() - { - StringBuffer sb =3D new StringBuffer(); - sb.append("Filter: ") - .append(getClass().getName()) - .append("; names: ") - .append(names.toString()) - .append("; keywords: ") - .append(keywords.toString()) - .append("; namePatterns: ") - .append(namePatterns.toString()) - .append(";"); - return sb.toString(); - } - - - public Set getKeywords() - { - return keywords; - } - - public Set getNames() - { - return names; - } - - public Set getNamePatterns() - { - return namePatterns; - } -} Modified: modules/test/trunk/unit/src/main/org/jboss/unit/tooling/Main.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/tooling/Main.java 2007-= 10-10 14:07:54 UTC (rev 8587) +++ modules/test/trunk/unit/src/main/org/jboss/unit/tooling/Main.java 2007-= 10-10 14:53:42 UTC (rev 8588) @@ -25,6 +25,7 @@ import org.jboss.unit.runner.TestRunnerEventListener; import org.jboss.unit.runner.TestRunner; import org.jboss.unit.runner.model.TestSuiteDef; +import org.jboss.unit.tooling.filter.MainTestFilter; = import java.util.Set; import java.util.HashSet; @@ -85,6 +86,8 @@ = public static final Set options; = + public static final Set options_no_arg; + static { Set opts =3D new HashSet(); opts.add(OPT_ID); @@ -97,8 +100,15 @@ opts.add(OPT_EX_PATTERNS); opts.add(OPT_CONFIG); opts.add(OPT_SUITE_NAME); + opts.add(OPT_NO_CONSOLE); + opts.add(OPT_XML_REPORT_DIR); + opts.add(OPT_HTML_REPORT_DIR); = options =3D Collections.unmodifiableSet(opts); + + opts =3D new HashSet(); + opts.add(OPT_NO_CONSOLE); + options_no_arg =3D Collections.unmodifiableSet(opts); } = private Main() @@ -149,7 +159,7 @@ for (String arg : args) { String[] params =3D arg.split("=3D",2); - if (params.length < 2) + if (params.length < 2 && !options_no_arg.contains(params[0])) { throw new IllegalArgumentException("Argument '" + arg + "' doe= sn't follow the name=3Dvalue pattern"); } @@ -161,13 +171,25 @@ throw new IllegalArgumentException("Argument '" + OPT_CONFIG + "'= is missing"); } = - if (!arguments.keySet().contains(OPT_SUITE_NAME)) + + + MainBuilder builder =3D null; + + + + if (arguments.keySet().contains(OPT_SUITE_NAME)) { - throw new IllegalArgumentException("Argument '" + OPT_SUITE_NAME = + "' is missing"); + builder =3D new MainBuilder(arguments.get(OPT_CONFIG), arguments.= get(OPT_SUITE_NAME)); + + builder.setSuiteName(arguments.get(OPT_SUITE_NAME)); } + else + { + builder =3D new MainBuilder(arguments.get(OPT_CONFIG)); = - MainBuilder builder =3D new MainBuilder(arguments.get(OPT_CONFIG), a= rguments.get(OPT_SUITE_NAME)); + } = + if (arguments.keySet().contains(OPT_NAMES)) { builder.addUnparsedNames(arguments.get(OPT_NAMES)); @@ -208,7 +230,24 @@ builder.addUnparsedExcludeNamePatterns(arguments.get(OPT_EX_PATTE= RNS)); } = + if (arguments.keySet().contains(OPT_NO_CONSOLE)) + { + builder.setNoConsole(true); + } = + if (arguments.keySet().contains(OPT_XML_REPORT_DIR)) + { + builder.setXmlReportDir(arguments.get(OPT_XML_REPORT_DIR)); + } + + if (arguments.keySet().contains(OPT_HTML_REPORT_DIR)) + { + builder.setHtmlReportDir(arguments.get(OPT_HTML_REPORT_DIR)); + } + + + + Main main =3D builder.build(); = main.execute(); Modified: modules/test/trunk/unit/src/main/org/jboss/unit/tooling/MainBuild= er.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/tooling/MainBuilder.jav= a 2007-10-10 14:07:54 UTC (rev 8587) +++ modules/test/trunk/unit/src/main/org/jboss/unit/tooling/MainBuilder.jav= a 2007-10-10 14:53:42 UTC (rev 8588) @@ -27,14 +27,18 @@ import org.jboss.unit.runner.filter.NullFilter; import org.jboss.unit.runner.model.ModelBuilder; import org.jboss.unit.runner.model.TestSuiteDef; -import org.jboss.unit.report.junit.JUnitReporter; -import org.jboss.unit.report.impl.console.PrintListener; +import org.jboss.unit.report.impl.junit.JUnitReporter; +import org.jboss.unit.tooling.filter.ExcludeTestFilter; +import org.jboss.unit.tooling.filter.IncludeTestFilter; +import org.jboss.unit.tooling.filter.MainTestFilter; +import org.jboss.unit.tooling.report.DelegatingReporter; import org.xml.sax.InputSource; = import java.util.Set; import java.util.HashSet; import java.io.InputStream; import java.io.FileInputStream; +import java.io.File; = /** * @author Boleslaw Dawidowicz @@ -57,30 +61,43 @@ = private Set listeners =3D new HashSet(); = - private String name =3D "noname"; + private String suiteName; = private String configFile; = + private boolean noConsole =3D false; = + private String xmlReportDir; + + private String htmlReportDir; + + private MainBuilder() { = } = - public MainBuilder(String configFile, String name) + public MainBuilder(String configFile) { + if (configFile =3D=3D null) { throw new IllegalArgumentException("configFile cannot be null"); } = + this.configFile =3D configFile; + } + + public MainBuilder(String configFile, String name) + { + this(configFile); + if (name =3D=3D null) { throw new IllegalArgumentException("name cannot be null"); } = - this.configFile =3D configFile; - this.name =3D name; + this.suiteName =3D name; = } = @@ -241,23 +258,37 @@ throw new IllegalArgumentException("directory cannot be null"); } = - listeners.add(new JUnitReporter(directory, name)); + listeners.add(new JUnitReporter(directory, suiteName)); = return this; } = = - public MainBuilder addXMLReporting(String directory) + public String getSuiteName() { - throw new RuntimeException("NYI"); + return suiteName; + } = + public void setSuiteName(String suiteName) + { + this.suiteName =3D suiteName; } = - public MainBuilder addHTMLReporting(String directory) + public void setNoConsole(boolean noConsole) { - throw new RuntimeException("NYI"); + this.noConsole =3D noConsole; } = + public void setXmlReportDir(String xmlReportDir) + { + this.xmlReportDir =3D xmlReportDir; + } + + public void setHtmlReportDir(String htmlReportDir) + { + this.htmlReportDir =3D htmlReportDir; + } + public Main build() throws Exception { = @@ -277,10 +308,33 @@ } = //add PrintListener by default - runner.addListener(new PrintListener()); = + DelegatingReporter reporter =3D new DelegatingReporter(noConsole); = + if (xmlReportDir !=3D null) + { = + //XML Output directory must exists + checkCreateOutputDirectory(xmlReportDir); + + JUnitReporter xmlReporter =3D null; + if (getSuiteName() !=3D null) + { + xmlReporter =3D new JUnitReporter(xmlReportDir, getSuiteName()= ); + } + else + { + xmlReporter =3D new JUnitReporter(xmlReportDir); = + } + + reporter.setXmlReporter(xmlReporter); + } + + runner.addListener(reporter); + + + + MainTestFilter filter =3D new MainTestFilter(); = if (keywords.size() =3D=3D 0 && names.size() =3D=3D 0 && namePattern= s.size() =3D=3D 0) @@ -305,4 +359,35 @@ return new Main(runner, filter, listeners, suite); } = + public static void checkCreateOutputDirectory(String dir) throws Except= ion + { + File output =3D null; + = + try + { + output =3D new File(dir); + + //Check if the dir exits and if not create it + if (!output.exists()) + { + + output.mkdirs(); + } + else + { + if (!output.isDirectory()) + { + throw new IllegalStateException("Provided path points to a = file instead of directory"); + } + } + + } + catch (Exception e) + { + throw new IllegalStateException("Failed to use provided output di= rectory: '" + dir + "'", e); + } + = + } + } + Deleted: modules/test/trunk/unit/src/main/org/jboss/unit/tooling/MainTestFi= lter.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/tooling/MainTestFilter.= java 2007-10-10 14:07:54 UTC (rev 8587) +++ modules/test/trunk/unit/src/main/org/jboss/unit/tooling/MainTestFilter.= java 2007-10-10 14:53:42 UTC (rev 8588) @@ -1,122 +0,0 @@ -/* -* JBoss, a division of Red Hat -* Copyright 2006, Red Hat Middleware, LLC, and individual contributors as = indicated -* by the @authors tag. See the copyright.txt in the distribution for a -* full listing of individual contributors. -* -* This is free software; you can redistribute it and/or modify it -* under the terms of the GNU Lesser General Public License as -* published by the Free Software Foundation; either version 2.1 of -* the License, or (at your option) any later version. -* -* This software is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -* Lesser General Public License for more details. -* -* You should have received a copy of the GNU Lesser General Public -* License along with this software; if not, write to the Free -* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA -* 02110-1301 USA, or see the FSF site: http://www.fsf.org. -*/ - -package org.jboss.unit.tooling; - -import org.jboss.unit.runner.TestFilter; -import org.jboss.unit.TestId; -import org.jboss.unit.info.TestInfo; - -import java.util.Map; -import java.util.List; -import java.util.LinkedList; - -/** - * @author Boleslaw Dawidowicz - * @version $Revision: 0.1 $ - */ -public class MainTestFilter implements TestFilter -{ - - private List includeFilters =3D new LinkedList(); - - private List excludeFilters =3D new LinkedList(); - - - public MainTestFilter() - { - } - - public MainTestFilter(List matchFilters, List e= xcludeFilters) - { - if (matchFilters =3D=3D null) - { - throw new IllegalArgumentException("includeFilters cannot be null= "); - } - if (excludeFilters =3D=3D null) - { - throw new IllegalArgumentException("excludeFilters cannot be null= "); - } - - - this.includeFilters =3D matchFilters; - this.excludeFilters =3D excludeFilters; - } - - public boolean include(TestId testId, TestInfo testInfo) - { - - // First check if test isn't excluded - - // Make logic OR on all filters - - for (TestFilter ef : excludeFilters) - { - if (!ef.include(testId, testInfo)) - { - return false; - } - } - - // make logic OR on all match filters - - for (TestFilter mf : includeFilters) - { - if (mf.include(testId, testInfo)) - { - return true; - } - - } - - - return false; - } - - public boolean include(TestId testId, Map parametrizati= on, TestInfo testInfo) - { - = - // At the moment no parametrization match - - return include (testId, testInfo); - } - - public void addIncludeFilter(TestFilter filter) - { - if (filter =3D=3D null) - { - throw new IllegalArgumentException("filter cannot be null"); - } - includeFilters.add(filter); - } - - public void addExcludeFilter(TestFilter filter) - { - if (filter =3D=3D null) - { - throw new IllegalArgumentException("filter cannot be null"); - } - excludeFilters.add(filter); - } - - -} Copied: modules/test/trunk/unit/src/main/org/jboss/unit/tooling/filter/Excl= udeTestFilter.java (from rev 8562, modules/test/trunk/unit/src/main/org/jbo= ss/unit/tooling/ExcludeTestFilter.java) =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/tooling/filter/ExcludeT= estFilter.java (rev 0) +++ modules/test/trunk/unit/src/main/org/jboss/unit/tooling/filter/ExcludeT= estFilter.java 2007-10-10 14:53:42 UTC (rev 8588) @@ -0,0 +1,75 @@ +/* +* JBoss, a division of Red Hat +* Copyright 2006, Red Hat Middleware, LLC, and individual contributors as = indicated +* by the @authors tag. See the copyright.txt in the distribution for a +* full listing of individual contributors. +* +* This is free software; you can redistribute it and/or modify it +* under the terms of the GNU Lesser General Public License as +* published by the Free Software Foundation; either version 2.1 of +* the License, or (at your option) any later version. +* +* This software is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +* Lesser General Public License for more details. +* +* You should have received a copy of the GNU Lesser General Public +* License along with this software; if not, write to the Free +* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +* 02110-1301 USA, or see the FSF site: http://www.fsf.org. +*/ + +package org.jboss.unit.tooling.filter; + +import org.jboss.unit.TestId; +import org.jboss.unit.info.TestInfo; + +import java.util.Set; + +/** + * @author Boleslaw Dawidowicz + * @version $Revision: 0.1 $ + */ +public class ExcludeTestFilter extends InfoTestFilter +{ + + + public ExcludeTestFilter() + { + } + + public ExcludeTestFilter(Set keywords, Set names, Set namePatterns) + { + super(keywords, names, namePatterns); + } + + public boolean include(TestId testId, TestInfo testInfo) + { + // First check names + + if (checkName(testInfo.getName())) + { + return false; + } + + // ... then keywords + + if (checkKeywords(testInfo.getKeywords())) + { + return false; + } + + // ... then check if name matches any of provided regex + + if (checkNamePatterns(testInfo.getName())) + { + return false; + } + + return true; + } + + = + +} Copied: modules/test/trunk/unit/src/main/org/jboss/unit/tooling/filter/Incl= udeTestFilter.java (from rev 8562, modules/test/trunk/unit/src/main/org/jbo= ss/unit/tooling/IncludeTestFilter.java) =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/tooling/filter/IncludeT= estFilter.java (rev 0) +++ modules/test/trunk/unit/src/main/org/jboss/unit/tooling/filter/IncludeT= estFilter.java 2007-10-10 14:53:42 UTC (rev 8588) @@ -0,0 +1,74 @@ +/* +* JBoss, a division of Red Hat +* Copyright 2006, Red Hat Middleware, LLC, and individual contributors as = indicated +* by the @authors tag. See the copyright.txt in the distribution for a +* full listing of individual contributors. +* +* This is free software; you can redistribute it and/or modify it +* under the terms of the GNU Lesser General Public License as +* published by the Free Software Foundation; either version 2.1 of +* the License, or (at your option) any later version. +* +* This software is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +* Lesser General Public License for more details. +* +* You should have received a copy of the GNU Lesser General Public +* License along with this software; if not, write to the Free +* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +* 02110-1301 USA, or see the FSF site: http://www.fsf.org. +*/ + +package org.jboss.unit.tooling.filter; + +import org.jboss.unit.TestId; +import org.jboss.unit.info.TestInfo; + +import java.util.Set; + +/** + * @author Boleslaw Dawidowicz + * @version $Revision: 0.1 $ + */ +public class IncludeTestFilter extends InfoTestFilter +{ + + + public IncludeTestFilter() + { + } + + public IncludeTestFilter(Set keywords, Set names, Set namePatterns) + { + super(keywords, names, namePatterns); + } + + public boolean include(TestId testId, TestInfo testInfo) + { + + // First check names + + if (checkName(testInfo.getName())) + { + return true; + } + + // ... then keywords + + if (checkKeywords(testInfo.getKeywords())) + { + return true; + } + + // ... then check if name matches any of provided regex + + if (checkNamePatterns(testInfo.getName())) + { + return true; + } + + return false; + } + +} Copied: modules/test/trunk/unit/src/main/org/jboss/unit/tooling/filter/Info= TestFilter.java (from rev 8562, modules/test/trunk/unit/src/main/org/jboss/= unit/tooling/InfoTestFilter.java) =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/tooling/filter/InfoTest= Filter.java (rev 0) +++ modules/test/trunk/unit/src/main/org/jboss/unit/tooling/filter/InfoTest= Filter.java 2007-10-10 14:53:42 UTC (rev 8588) @@ -0,0 +1,226 @@ +/* +* JBoss, a division of Red Hat +* Copyright 2006, Red Hat Middleware, LLC, and individual contributors as = indicated +* by the @authors tag. See the copyright.txt in the distribution for a +* full listing of individual contributors. +* +* This is free software; you can redistribute it and/or modify it +* under the terms of the GNU Lesser General Public License as +* published by the Free Software Foundation; either version 2.1 of +* the License, or (at your option) any later version. +* +* This software is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +* Lesser General Public License for more details. +* +* You should have received a copy of the GNU Lesser General Public +* License along with this software; if not, write to the Free +* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +* 02110-1301 USA, or see the FSF site: http://www.fsf.org. +*/ + +package org.jboss.unit.tooling.filter; + +import org.jboss.unit.runner.TestFilter; +import org.jboss.unit.TestId; +import org.jboss.unit.info.TestInfo; + +import java.util.Set; +import java.util.HashSet; +import java.util.Map; + +/** + * @author Boleslaw Dawidowicz + * @version $Revision: 0.1 $ + */ +public abstract class InfoTestFilter implements TestFilter +{ + = + private Set keywords =3D new HashSet(); + + private Set names =3D new HashSet(); + + private Set namePatterns =3D new HashSet(); + + public InfoTestFilter() + { + } + + public InfoTestFilter(Set keywords, Set names, Set namePatterns) + { + if (keywords =3D=3D null) + { + throw new IllegalArgumentException("keywords cannot be null"); + } + if (names =3D=3D null) + { + throw new IllegalArgumentException("names cannot be null"); + } + if (namePatterns =3D=3D null) + { + throw new IllegalArgumentException("namePatterns cannot be null"); + } + + this.keywords =3D keywords; + this.names =3D names; + this.namePatterns =3D namePatterns; + } + + public InfoTestFilter addKeyword(String keyword) + { + if (keyword =3D=3D null) + { + throw new IllegalArgumentException("keyword cannot be null"); + } + + keywords.add(keyword); + + return this; + } + + + public InfoTestFilter addUnparsedKeywords(String keywordsString) + { + if (keywordsString =3D=3D null) + { + throw new IllegalArgumentException("keywordsString cannot be null= "); + } + String[] keywordValues =3D keywordsString.split(","); + for (String keyword : keywordValues) + { + this.keywords.add(keyword.trim()); + } + return this; + } + + public InfoTestFilter addName(String name) + { + if (name =3D=3D null) + { + throw new IllegalArgumentException("name cannot be null"); + } + names.add(name); + + return this; + } + + public InfoTestFilter addUnparsedNames(String namesString) + { + if (namesString =3D=3D null) + { + throw new IllegalArgumentException("namesString cannot be null"); + } + String[] namesValues =3D namesString.split(","); + for (String name : namesValues) + { + this.names.add(name.trim()); + } + return this; + } + + public InfoTestFilter addNamePattern(String pattern) + { + if (pattern =3D=3D null) + { + throw new IllegalArgumentException("pattern cannot be null"); + } + namePatterns.add(pattern); + + return this; + } + + public InfoTestFilter addUnparsedNamePatterns(String patternString) + { + if (patternString =3D=3D null) + { + throw new IllegalArgumentException("patternString cannot be null"= ); + } + String[] patternValues =3D patternString.split(","); + for (String pattern : patternValues) + { + this.namePatterns.add(pattern.trim()); + } + return this; + } + + public abstract boolean include(TestId testId, TestInfo testInfo); + + public boolean include(TestId testId, Map parametrizati= on, TestInfo testInfo) + { + // At the moment no parametrization match + + return include (testId, testInfo); + } + + boolean checkName(String name) + { + for (String s : names) + { + if (s.equals(name)) + { + return true; + } + } + return false; + } + + boolean checkKeywords(Set keywords) + { + for (String keyword : this.keywords) + { + for (String toMatch : keywords) + { + if (keyword.equals(toMatch)) + { + return true; + } + } + } + return false; + } + + boolean checkNamePatterns(String name) + { + for (String regex : this.namePatterns) + { + if (name.matches(regex)) + { + return true; + } + } + return false; + } + + + public String toString() + { + StringBuffer sb =3D new StringBuffer(); + sb.append("Filter: ") + .append(getClass().getName()) + .append("; names: ") + .append(names.toString()) + .append("; keywords: ") + .append(keywords.toString()) + .append("; namePatterns: ") + .append(namePatterns.toString()) + .append(";"); + return sb.toString(); + } + + + public Set getKeywords() + { + return keywords; + } + + public Set getNames() + { + return names; + } + + public Set getNamePatterns() + { + return namePatterns; + } +} Copied: modules/test/trunk/unit/src/main/org/jboss/unit/tooling/filter/Main= TestFilter.java (from rev 8562, modules/test/trunk/unit/src/main/org/jboss/= unit/tooling/MainTestFilter.java) =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/tooling/filter/MainTest= Filter.java (rev 0) +++ modules/test/trunk/unit/src/main/org/jboss/unit/tooling/filter/MainTest= Filter.java 2007-10-10 14:53:42 UTC (rev 8588) @@ -0,0 +1,122 @@ +/* +* JBoss, a division of Red Hat +* Copyright 2006, Red Hat Middleware, LLC, and individual contributors as = indicated +* by the @authors tag. See the copyright.txt in the distribution for a +* full listing of individual contributors. +* +* This is free software; you can redistribute it and/or modify it +* under the terms of the GNU Lesser General Public License as +* published by the Free Software Foundation; either version 2.1 of +* the License, or (at your option) any later version. +* +* This software is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +* Lesser General Public License for more details. +* +* You should have received a copy of the GNU Lesser General Public +* License along with this software; if not, write to the Free +* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +* 02110-1301 USA, or see the FSF site: http://www.fsf.org. +*/ + +package org.jboss.unit.tooling.filter; + +import org.jboss.unit.runner.TestFilter; +import org.jboss.unit.TestId; +import org.jboss.unit.info.TestInfo; + +import java.util.Map; +import java.util.List; +import java.util.LinkedList; + +/** + * @author Boleslaw Dawidowicz + * @version $Revision: 0.1 $ + */ +public class MainTestFilter implements TestFilter +{ + + private List includeFilters =3D new LinkedList(); + + private List excludeFilters =3D new LinkedList(); + + + public MainTestFilter() + { + } + + public MainTestFilter(List matchFilters, List e= xcludeFilters) + { + if (matchFilters =3D=3D null) + { + throw new IllegalArgumentException("includeFilters cannot be null= "); + } + if (excludeFilters =3D=3D null) + { + throw new IllegalArgumentException("excludeFilters cannot be null= "); + } + + + this.includeFilters =3D matchFilters; + this.excludeFilters =3D excludeFilters; + } + + public boolean include(TestId testId, TestInfo testInfo) + { + + // First check if test isn't excluded + + // Make logic OR on all filters + + for (TestFilter ef : excludeFilters) + { + if (!ef.include(testId, testInfo)) + { + return false; + } + } + + // make logic OR on all match filters + + for (TestFilter mf : includeFilters) + { + if (mf.include(testId, testInfo)) + { + return true; + } + + } + + + return false; + } + + public boolean include(TestId testId, Map parametrizati= on, TestInfo testInfo) + { + = + // At the moment no parametrization match + + return include (testId, testInfo); + } + + public void addIncludeFilter(TestFilter filter) + { + if (filter =3D=3D null) + { + throw new IllegalArgumentException("filter cannot be null"); + } + includeFilters.add(filter); + } + + public void addExcludeFilter(TestFilter filter) + { + if (filter =3D=3D null) + { + throw new IllegalArgumentException("filter cannot be null"); + } + excludeFilters.add(filter); + } + + +} Added: modules/test/trunk/unit/src/main/org/jboss/unit/tooling/report/Deleg= atingReporter.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/tooling/report/Delegati= ngReporter.java (rev 0) +++ modules/test/trunk/unit/src/main/org/jboss/unit/tooling/report/Delegati= ngReporter.java 2007-10-10 14:53:42 UTC (rev 8588) @@ -0,0 +1,104 @@ +/* +* JBoss, a division of Red Hat +* Copyright 2006, Red Hat Middleware, LLC, and individual contributors as = indicated +* by the @authors tag. See the copyright.txt in the distribution for a +* full listing of individual contributors. +* +* This is free software; you can redistribute it and/or modify it +* under the terms of the GNU Lesser General Public License as +* published by the Free Software Foundation; either version 2.1 of +* the License, or (at your option) any later version. +* +* This software is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +* Lesser General Public License for more details. +* +* You should have received a copy of the GNU Lesser General Public +* License along with this software; if not, write to the Free +* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +* 02110-1301 USA, or see the FSF site: http://www.fsf.org. +*/ + +package org.jboss.unit.tooling.report; + +import org.jboss.unit.runner.TestRunnerEventListener; +import org.jboss.unit.runner.TestRunnerEvent; +import org.jboss.unit.report.impl.console.PrintListener; + +/** + * @author Boleslaw Dawidowicz + * @version $Revision: 0.1 $ + */ +public class DelegatingReporter implements TestRunnerEventListener +{ + + private TestRunnerEventListener consoleReporter =3D new PrintListener(); + + private TestRunnerEventListener xmlReporter; + + private TestRunnerEventListener htmlReporter; + = + boolean noConsole =3D true; + + + public DelegatingReporter(boolean console) + { + noConsole =3D console; + } + + public void onEvent(TestRunnerEvent event) + { + //For now simple dispatch + if (!isNoConsole()) + { + consoleReporter.onEvent(event); + } + + if (getXmlReporter() !=3D null) + { + xmlReporter.onEvent(event); + } + + if (getHtmlReporter() !=3D null) + { + htmlReporter.onEvent(event); + } + } + + public TestRunnerEventListener getConsoleReporter() + { + return consoleReporter; + } + + public boolean isNoConsole() + { + return noConsole; + } + + public void setNoConsole(boolean noConsole) + { + this.noConsole =3D noConsole; + } + + + public TestRunnerEventListener getXmlReporter() + { + return xmlReporter; + } + + public void setXmlReporter(TestRunnerEventListener xmlReporter) + { + this.xmlReporter =3D xmlReporter; + } + + public TestRunnerEventListener getHtmlReporter() + { + return htmlReporter; + } + + public void setHtmlReporter(TestRunnerEventListener htmlReporter) + { + this.htmlReporter =3D htmlReporter; + } +} --===============7536166337553213387==-- From portal-commits at lists.jboss.org Wed Oct 10 11:34:37 2007 Content-Type: multipart/mixed; boundary="===============5077755618236534101==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8589 - modules/test/trunk/unit/src/main/org/jboss/unit/report/impl/junit. Date: Wed, 10 Oct 2007 11:34:37 -0400 Message-ID: --===============5077755618236534101== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: emuckenhuber Date: 2007-10-10 11:34:37 -0400 (Wed, 10 Oct 2007) New Revision: 8589 Modified: modules/test/trunk/unit/src/main/org/jboss/unit/report/impl/junit/JUnitT= estReport.java Log: - checking of TestCase Events Modified: modules/test/trunk/unit/src/main/org/jboss/unit/report/impl/junit= /JUnitTestReport.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/report/impl/junit/JUnit= TestReport.java 2007-10-10 14:53:42 UTC (rev 8588) +++ modules/test/trunk/unit/src/main/org/jboss/unit/report/impl/junit/JUnit= TestReport.java 2007-10-10 15:34:37 UTC (rev 8589) @@ -32,7 +32,9 @@ import java.net.UnknownHostException; import java.text.SimpleDateFormat; import java.util.Date; +import java.util.HashMap; import java.util.Iterator; +import java.util.Map; = import javax.xml.parsers.DocumentBuilder; import javax.xml.parsers.DocumentBuilderFactory; @@ -49,6 +51,7 @@ import org.jboss.unit.Failure; import org.jboss.unit.FailureType; import org.jboss.unit.TestId; +import org.jboss.unit.info.TestInfo; import org.jboss.unit.runner.TestResult; import org.jboss.unit.runner.event.EndRunnerEvent; import org.jboss.unit.runner.event.EndTestEvent; @@ -72,9 +75,6 @@ public static final String DEFAULT_TEST_SUITE_NAME =3D "JBossUnitTestSu= ite"; = public static final String TEST_FILE_NAME_START =3D "TEST-"; - = - /** The line separator */ - private final static String ls =3D System.getProperty("line.separator"); = /** The document */ private Document document; @@ -82,6 +82,9 @@ /** The root element */ private Element rootElement; = + /** The started Tests */ + private Map startedTests =3D new HashMap(); + = /** The system error */ private StringBuffer systemErr =3D new StringBuffer(); = @@ -112,28 +115,37 @@ = public void startTestSuite(StartRunnerEvent event) { + /** Create root element */ this.document =3D getDocumentBuilder().newDocument(); this.rootElement =3D this.document.createElement(XMLConstants.TESTSU= ITE); this.rootElement.setAttribute(XMLConstants.TIMESTAMP, getTimestamp()= ); this.rootElement.setAttribute(XMLConstants.HOSTNAME, getHostName()); - this.rootElement.setAttribute(XMLConstants.ATTR_NAME, getTestSuiteNa= me()); + this.rootElement.setAttribute(XMLConstants.ATTR_NAME, this.testSuite= Name); + /** Create properties element */ Element properties =3D document.createElement(XMLConstants.PROPERTIE= S); this.rootElement.appendChild(properties); - // add properties list - + /** + * TODO - set properties = + */ } = public void startTest(StartTestEvent event) { = + this.startedTests.put(event.getTestId(), event.getTestInfo()); this.tests++; } = public void runnerFailed(RunnerFailureEvent event) { - this.tests++; = + this.tests++; this.errors++; Element e =3D document.createElement(XMLConstants.ERROR); - e.appendChild(document.createCDATASection(ls + event.getFailure().ge= tMessage() + ls + stackToString(event.getFailure().getCause()))); + e.setAttribute(XMLConstants.ATTR_TYPE, event.getFailure().getType().= name()); + e.setAttribute(XMLConstants.ATTR_MESSAGE, event.getFailure().getMess= age()); + if ( event.getFailure().getCause() !=3D null) + { + e.appendChild(document.createCDATASection(stackToString(event.get= Failure().getCause()))); + } rootElement.appendChild(e); } = @@ -142,7 +154,7 @@ TestId testId =3D event.getTestId(); TestResult result =3D event.getTestResult(); Element test =3D document.createElement(XMLConstants.TESTCASE); - // The test name + /** The testcase name */ StringBuffer nb =3D new StringBuffer(); for(int i =3D 0; i < testId.getLength(); i ++) { @@ -153,22 +165,41 @@ nb.append(testId.getName(i)); } String testName =3D nb.toString(); - // Test parameters + /** The testcase parameters */ StringBuffer parameters =3D new StringBuffer(); - for(Iterator i =3D result.getParametrization().values().iter= ator(); i.hasNext(); ) + for(Iterator i =3D result.getParametrization().keySet().iter= ator(); i.hasNext(); ) { String name =3D i.next(); String value =3D result.getParametrization().get(name); - parameters.append(name + "=3D" + value + "?"); + parameters.append( name + "=3D" + value ); + if(i.hasNext()) + { + parameters.append("&"); + } } - + // append parameters if ( parameters.length() > 0) testName =3D testName + "?" + parameters.toString(); = + /** Test case attributes */ test.setAttribute(XMLConstants.ATTR_NAME, testName); - // Testcase time test.setAttribute(XMLConstants.ATTR_TIME, new Long(result.getDuratio= nMillis()).toString()); - // If test failed + /** Check if test was started */ + TestInfo info =3D this.startedTests.get(testId); + if ( info !=3D null) + { + // remove test from started List + this.startedTests.remove(testId); + } + else = + { + // If test is not started - add error message + Element errorNotStarted =3D document.createElement(XMLConstants.E= RROR); + errorNotStarted.setAttribute(XMLConstants.ATTR_MESSAGE, "TestCase= : " + testName + " was not started properly. (No StartTestEvent)"); + test.appendChild(errorNotStarted); + } + = + /** If testcase failed */ if (result instanceof TestFailure) { TestFailure testFailure =3D (TestFailure) result; @@ -194,6 +225,16 @@ = public void endTestSuite(EndRunnerEvent event) { + if( this.startedTests.size() > 0 ) + { + for(TestId id : this.startedTests.keySet()) + { + Element errorNotEnded =3D document.createElement(XMLConstants.= ERROR); + errorNotEnded.setAttribute(XMLConstants.ATTR_MESSAGE, "Testcas= e: " + id + " was not ended properly. (No EndTestEvent)"); + this.rootElement.appendChild(errorNotEnded); + } + } + = // Testsuite counts (tests, errors, failures) this.rootElement.setAttribute(XMLConstants.ATTR_TESTS, Integer.toStr= ing(this.tests)); this.rootElement.setAttribute(XMLConstants.ATTR_ERRORS, Integer.toSt= ring(this.errors)); @@ -208,8 +249,6 @@ = this.rootElement.appendChild(systemError); this.rootElement.appendChild(systemOutElement); - = - // System.out.println(exportXML()); } = public void appendSystemOutput(String output) @@ -231,7 +270,7 @@ = // If no test suite name is specified use default and add timesta= mp filePath.append(toDir) - .append("/") + .append(File.separator) .append(TEST_FILE_NAME_START) .append(getTestSuiteName()) .append(getTestSuiteName().equals(DEFAULT_TEST_SUITE_NAME) ? "= -" + getTimestamp() : "" ) --===============5077755618236534101==-- From portal-commits at lists.jboss.org Wed Oct 10 13:00:11 2007 Content-Type: multipart/mixed; boundary="===============8798822182477873023==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8590 - in modules/test/trunk/unit/src: main/org/jboss/unit/api and 5 other directories. Date: Wed, 10 Oct 2007 13:00:10 -0400 Message-ID: --===============8798822182477873023== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: julien(a)jboss.com Date: 2007-10-10 13:00:10 -0400 (Wed, 10 Oct 2007) New Revision: 8590 Added: modules/test/trunk/unit/src/main/org/jboss/unit/runner/model/generic/ modules/test/trunk/unit/src/main/org/jboss/unit/runner/model/generic/Gen= ericTestSuiteDef.java modules/test/trunk/unit/src/resources/test/org/jboss/test/unit/runner/mo= del/f2.xml Modified: modules/test/trunk/unit/src/main/org/jboss/test/unit/runner/model/ModelT= ests.java modules/test/trunk/unit/src/main/org/jboss/unit/api/Assert.java modules/test/trunk/unit/src/main/org/jboss/unit/runner/model/ModelBuilde= r.java modules/test/trunk/unit/src/main/org/jboss/unit/runner/model/composite/C= ompositeTestSuiteDef.java modules/test/trunk/unit/src/resources/jboss-unit-jar/org/jboss/unit/runn= er/model/jboss-unit_1_0.xsd Log: started to work on generic test suite Modified: modules/test/trunk/unit/src/main/org/jboss/test/unit/runner/model= /ModelTests.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/test/unit/runner/model/Model= Tests.java 2007-10-10 15:34:37 UTC (rev 8589) +++ modules/test/trunk/unit/src/main/org/jboss/test/unit/runner/model/Model= Tests.java 2007-10-10 17:00:10 UTC (rev 8590) @@ -28,14 +28,18 @@ import org.jboss.unit.runner.model.ParametersDef; import org.jboss.unit.runner.model.TestDef; import org.jboss.unit.runner.model.TestSuiteDef; +import org.jboss.unit.runner.model.generic.GenericTestSuiteDef; import org.jboss.unit.runner.model.composite.CompositeTestSuiteDef; import org.jboss.unit.runner.model.pojo.POJOTestSuiteDef; import org.jboss.unit.runner.model.pojo.TestDefDef; import static org.jboss.unit.util.CollectionTools.list; import static org.jboss.unit.util.CollectionTools.set; import org.xml.sax.InputSource; +import org.xml.sax.SAXException; = +import javax.xml.parsers.ParserConfigurationException; import java.io.InputStream; +import java.io.IOException; import java.util.Iterator; = /** @@ -48,87 +52,111 @@ { testParameterValueDef(); = + buildFromXML1(); + buildFromXML2(); + + + } + + private static TestSuiteDef buildTestSuite(String resourceId) + { try { - InputStream in =3D ModelTests.class.getResourceAsStream("f1.xml"); + InputStream in =3D ModelTests.class.getResourceAsStream(resourceI= d); ModelBuilder builder =3D new ModelBuilder(new InputSource(in)); - TestSuiteDef suite =3D builder.build(); + return builder.build(); + } + catch (Exception e) + { + throw createFailure(e); + } + } = - CompositeTestSuiteDef composite =3D assertInstanceOf(suite, Compo= siteTestSuiteDef.class); = + private static void buildFromXML2() + { + TestSuiteDef suite =3D buildTestSuite("f2.xml"); = - assertNotNull(composite.getSuites()); - assertFalse(composite.getSuites().isEmpty()); + CompositeTestSuiteDef composite =3D assertInstanceOf(suite, Composit= eTestSuiteDef.class); + assertNotNull(composite.getSuites()); + assertEquals(1, composite.getSuites().size()); + GenericTestSuiteDef generic =3D assertInstanceOf(composite.getSuites= ().get(0), GenericTestSuiteDef.class); + assertEquals("foo_generic", generic.getClassName()); = - POJOTestSuiteDef pojoSuite =3D assertInstanceOf(composite.getSuit= es().iterator().next(), POJOTestSuiteDef.class); + // + ParametersDef parameters =3D assertNotNull(generic.getParameters()); + assertEquals(set("red"), parameters.getNames()); + } = - TestDefDef myTestDef =3D pojoSuite.getTestDef("MyTest"); - assertNotNull(myTestDef); - assertEquals("MyTest", myTestDef.getId()); - assertNotNull(myTestDef.getTestClass()); - assertEquals("org.foo.bar.MyTest", myTestDef.getTestClass().getNa= me()); - assertNotNull(myTestDef.getTestClass().getTestCases()); - assertEquals(0, myTestDef.getTestClass().getTestCases().size()); + private static void buildFromXML1() + { + TestSuiteDef suite =3D buildTestSuite("f1.xml"); = - TestDefDef myTestDef2 =3D pojoSuite.getTestDef("MyTest2"); - assertNotNull(myTestDef2); - assertEquals("MyTest2", myTestDef2.getId()); - assertNotNull(myTestDef2.getTestClass()); - assertEquals("org.foo.bar.MyTest2", myTestDef2.getTestClass().get= Name()); - assertNotNull(myTestDef2.getTestClass().getTestCases()); - assertEquals(2, myTestDef2.getTestClass().getTestCases().size()); - assertNotNull(myTestDef2.getTestClass().getTestCase("foo")); - assertEquals("foo", myTestDef2.getTestClass().getTestCase("foo").= getName()); - assertNotNull(myTestDef2.getTestClass().getTestCase("bar")); - assertEquals("bar", myTestDef2.getTestClass().getTestCase("bar").= getName()); + CompositeTestSuiteDef composite =3D assertInstanceOf(suite, Composit= eTestSuiteDef.class); + assertNotNull(composite.getSuites()); + assertFalse(composite.getSuites().isEmpty()); = - assertEquals(2, pojoSuite.getTests().size()); + POJOTestSuiteDef pojoSuite =3D assertInstanceOf(composite.getSuites(= ).iterator().next(), POJOTestSuiteDef.class); = - // - Iterator iterator =3D pojoSuite.getTests().iterator(); - TestDef test1 =3D iterator.next(); - assertEquals("MyTest", test1.getRefId()); - ParametersDef parameters =3D test1.getParameters(); - assertNotNull(parameters); - assertEquals(set("blah", "foo"), parameters.getNames()); - ParameterValueDef blah =3D parameters.getParameter("blah"); - assertEquals(list("bluh"), blah.list()); - ParameterValueDef foo =3D parameters.getParameter("foo"); - assertEquals(list("bar1", null), foo.list()); + TestDefDef myTestDef =3D pojoSuite.getTestDef("MyTest"); + assertNotNull(myTestDef); + assertEquals("MyTest", myTestDef.getId()); + assertNotNull(myTestDef.getTestClass()); + assertEquals("org.foo.bar.MyTest", myTestDef.getTestClass().getName(= )); + assertNotNull(myTestDef.getTestClass().getTestCases()); + assertEquals(0, myTestDef.getTestClass().getTestCases().size()); = - // - TestDef test2 =3D iterator.next(); - assertNotNull(test2.getRefId()); - ParametersDef test2Parameters =3D test2.getParameters(); - assertNotNull(test2Parameters); - assertEquals(set("foo"), test2Parameters.getNames()); - ParameterValueDef fff =3D test2Parameters.getParameter("foo"); - assertEquals(list("bar"), fff.list()); + TestDefDef myTestDef2 =3D pojoSuite.getTestDef("MyTest2"); + assertNotNull(myTestDef2); + assertEquals("MyTest2", myTestDef2.getId()); + assertNotNull(myTestDef2.getTestClass()); + assertEquals("org.foo.bar.MyTest2", myTestDef2.getTestClass().getNam= e()); + assertNotNull(myTestDef2.getTestClass().getTestCases()); + assertEquals(2, myTestDef2.getTestClass().getTestCases().size()); + assertNotNull(myTestDef2.getTestClass().getTestCase("foo")); + assertEquals("foo", myTestDef2.getTestClass().getTestCase("foo").get= Name()); + assertNotNull(myTestDef2.getTestClass().getTestCase("bar")); + assertEquals("bar", myTestDef2.getTestClass().getTestCase("bar").get= Name()); = - // - TestDefDef myTestDef3 =3D pojoSuite.getTestDef(test2.getRefId()); - assertNotNull(myTestDef3); + assertEquals(2, pojoSuite.getTests().size()); = - assertEquals(test2.getRefId(), myTestDef3.getId()); - assertNotNull(myTestDef3.getTestClass()); - assertEquals("org.foo.bar.OtherTest", myTestDef3.getTestClass().g= etName()); - assertNotNull(myTestDef3.getTestClass().getTestCases()); - assertEquals(0, myTestDef3.getTestClass().getTestCases().size()); + // + Iterator iterator =3D pojoSuite.getTests().iterator(); + TestDef test1 =3D iterator.next(); + assertEquals("MyTest", test1.getRefId()); + ParametersDef parameters =3D test1.getParameters(); + assertNotNull(parameters); + assertEquals(set("blah", "foo"), parameters.getNames()); + ParameterValueDef blah =3D parameters.getParameter("blah"); + assertEquals(list("bluh"), blah.list()); + ParameterValueDef foo =3D parameters.getParameter("foo"); + assertEquals(list("bar1", null), foo.list()); = + // + TestDef test2 =3D iterator.next(); + assertNotNull(test2.getRefId()); + ParametersDef test2Parameters =3D test2.getParameters(); + assertNotNull(test2Parameters); + assertEquals(set("foo"), test2Parameters.getNames()); + ParameterValueDef fff =3D test2Parameters.getParameter("foo"); + assertEquals(list("bar"), fff.list()); = - // + // + TestDefDef myTestDef3 =3D pojoSuite.getTestDef(test2.getRefId()); + assertNotNull(myTestDef3); + + assertEquals(test2.getRefId(), myTestDef3.getId()); + assertNotNull(myTestDef3.getTestClass()); + assertEquals("org.foo.bar.OtherTest", myTestDef3.getTestClass().getN= ame()); + assertNotNull(myTestDef3.getTestClass().getTestCases()); + assertEquals(0, myTestDef3.getTestClass().getTestCases().size()); + + + // // ParametersDef suiteParams =3D pojoSuite.getParameters(); // assertNotNull(suiteParams); // assertEquals(set("red"), suiteParams.getMap().keySet()); // ParameterValueDef blue =3D suiteParams.getMap().get("red"); // assertEquals(list("blue"), blue.list()); - - } - catch (Exception e) - { - fail(e); - } - - } = private static void testParameterValueDef() Modified: modules/test/trunk/unit/src/main/org/jboss/unit/api/Assert.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/api/Assert.java 2007-10= -10 15:34:37 UTC (rev 8589) +++ modules/test/trunk/unit/src/main/org/jboss/unit/api/Assert.java 2007-10= -10 17:00:10 UTC (rev 8590) @@ -53,14 +53,22 @@ } } = - public static void assertNotNull(Object actual) + public static T assertNotNull(T actual) { - assertNotSame(null, actual); + return assertNotNull(null, actual); } = - public static void assertNotNull(String msg, Object actual) + public static T assertNotNull(String msg, T actual) { - assertNotSame(msg, null, actual); + if (actual =3D=3D null) + { + if (msg !=3D null) + { + msg =3D "Expected a non null object"; + } + fail(msg); + } + return actual; } = public static void assertNull(Object actual) Modified: modules/test/trunk/unit/src/main/org/jboss/unit/runner/model/Mode= lBuilder.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/runner/model/ModelBuild= er.java 2007-10-10 15:34:37 UTC (rev 8589) +++ modules/test/trunk/unit/src/main/org/jboss/unit/runner/model/ModelBuild= er.java 2007-10-10 17:00:10 UTC (rev 8590) @@ -32,7 +32,9 @@ import org.jboss.unit.runner.model.pojo.POJOTestSuiteDef; import org.jboss.unit.runner.model.pojo.TestClassDef; import org.jboss.unit.runner.model.pojo.TestCaseDef; +import org.jboss.unit.runner.model.pojo.TestDefDef; import org.jboss.unit.runner.model.composite.CompositeTestSuiteDef; +import org.jboss.unit.runner.model.generic.GenericTestSuiteDef; import org.xml.sax.InputSource; import org.xml.sax.SAXException; import org.xml.sax.SAXParseException; @@ -123,7 +125,10 @@ = private TestSuiteDef buildTestSuite(Element suiteElt) { - if (suiteElt.getNodeName().equals("jboss-unit") || suiteElt.getNodeN= ame().equals("suite")) + String suiteName =3D suiteElt.getNodeName(); + + // + if (suiteName.equals("jboss-unit") || suiteName.equals("suite")) { CompositeTestSuiteDef composite =3D new CompositeTestSuiteDef(); for (Element childSuiteElt : children(suiteElt)) @@ -133,39 +138,91 @@ } return composite; } - else if (suiteElt.getNodeName().equals("pojo")) + else if (suiteName.equals("pojo")) { return buildPOJOTestSuite(suiteElt); } + else if (suiteName.equals("generic")) + { + return buildGenericTestSuite(suiteElt); + } = // throw new AssertionError(); } = + private TestSuiteDef buildGenericTestSuite(Element suiteElt) + { + Element classElt =3D child(suiteElt, "class"); + if (classElt =3D=3D null) + { + throw new IllegalArgumentException(); + } + + // + Attr attr =3D classElt.getAttributeNode("name"); + if (attr =3D=3D null) + { + throw new IllegalArgumentException(); + } + + // + String className =3D attr.getValue(); + GenericTestSuiteDef suite =3D new GenericTestSuiteDef(className); + + // + for (Element testElt : children(suiteElt, "test")) + { + Attr refidAttr =3D testElt.getAttributeNode("refid"); + if (refidAttr =3D=3D null) + { + throw new IllegalArgumentException(); + } + + // + String refid =3D refidAttr.getValue(); + + // + TestDef test =3D new TestDef(refid); + + // + test.setParameters(buildParameters(testElt)); + + // + suite.addTest(test); + } + + // + suite.setParameters(buildParameters(suiteElt)); + + // + return suite; + } + private TestClassDef buildTestClassDef(Element classElt) { - Node nameAttr =3D classElt.getAttributes().getNamedItem("name"); - if (nameAttr =3D=3D null || !(nameAttr instanceof Attr)) + Attr nameAttr =3D classElt.getAttributeNode("name"); + if (nameAttr =3D=3D null) { throw new IllegalArgumentException(); } = // - String classname =3D ((Attr)nameAttr).getValue(); + String classname =3D nameAttr.getValue(); TestClassDef testClass =3D new TestClassDef(classname); = // for (Element caseElt : children(classElt, "case")) { = - Node caseNameAttr =3D caseElt.getAttributes().getNamedItem("name"= ); - if (caseNameAttr =3D=3D null || !(caseNameAttr instanceof Attr)) + Attr caseNameAttr =3D caseElt.getAttributeNode("name"); + if (caseNameAttr =3D=3D null) { throw new IllegalArgumentException(); } = // - testClass.addTestCase(new TestCaseDef(((Attr)caseNameAttr).getVal= ue())); + testClass.addTestCase(new TestCaseDef(caseNameAttr.getValue())); } = // @@ -179,14 +236,14 @@ // for (Element testDefElt : children(suiteElt, "test-def")) { - Node idAttr =3D testDefElt.getAttributes().getNamedItem("id"); - if (idAttr =3D=3D null || !(idAttr instanceof Attr)) + Attr idAttr =3D testDefElt.getAttributeNode("id"); + if (idAttr =3D=3D null) { throw new IllegalArgumentException(); } = // - String id =3D ((Attr)idAttr).getValue(); + String id =3D idAttr.getValue(); = // Element classElt =3D child(testDefElt, "class"); @@ -199,7 +256,7 @@ TestClassDef testClass =3D buildTestClassDef(classElt); = // - org.jboss.unit.runner.model.pojo.TestDefDef testDef =3D new org.j= boss.unit.runner.model.pojo.TestDefDef(id); + TestDefDef testDef =3D new TestDefDef(id); testDef.setTestClass(testClass); = // @@ -209,7 +266,7 @@ // for (Element testElt : children(suiteElt, "test")) { - Node refidAttr =3D testElt.getAttributes().getNamedItem("refid"); + Attr refidAttr =3D testElt.getAttributeNode("refid"); Element classElt =3D child(testElt, "class"); = // @@ -218,11 +275,7 @@ // if (refidAttr !=3D null) { - if (!(refidAttr instanceof Attr)) - { - throw new IllegalArgumentException(); - } - refid =3D ((Attr)refidAttr).getValue(); + refid =3D refidAttr.getValue(); } else if (classElt !=3D null) { @@ -230,7 +283,7 @@ = TestClassDef testClass =3D buildTestClassDef(classElt); = - org.jboss.unit.runner.model.pojo.TestDefDef testDef =3D new or= g.jboss.unit.runner.model.pojo.TestDefDef(id); + TestDefDef testDef =3D new TestDefDef(id); = testDef.setTestClass(testClass); = @@ -273,7 +326,7 @@ = List values =3D new ArrayList(); = - Attr attr =3D (Attr)parameterElt.getAttributes().getNamedItem("va= lue"); + Attr attr =3D parameterElt.getAttributeNode("value"); = int src =3D NO_SOURCE; = Modified: modules/test/trunk/unit/src/main/org/jboss/unit/runner/model/comp= osite/CompositeTestSuiteDef.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/runner/model/composite/= CompositeTestSuiteDef.java 2007-10-10 15:34:37 UTC (rev 8589) +++ modules/test/trunk/unit/src/main/org/jboss/unit/runner/model/composite/= CompositeTestSuiteDef.java 2007-10-10 17:00:10 UTC (rev 8590) @@ -50,7 +50,7 @@ suites.add(suite); } = - public Collection getSuites() + public List getSuites() { return suites; } Added: modules/test/trunk/unit/src/main/org/jboss/unit/runner/model/generic= /GenericTestSuiteDef.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/runner/model/generic/Ge= nericTestSuiteDef.java (rev 0) +++ modules/test/trunk/unit/src/main/org/jboss/unit/runner/model/generic/Ge= nericTestSuiteDef.java 2007-10-10 17:00:10 UTC (rev 8590) @@ -0,0 +1,54 @@ +/*************************************************************************= ***** + * JBoss, a division of Red Hat = * + * Copyright 2006, Red Hat Middleware, LLC, and individual = * + * contributors as indicated by the @authors tag. See the = * + * copyright.txt in the distribution for a full listing of = * + * individual contributors. = * + * = * + * This is free software; you can redistribute it and/or modify it = * + * under the terms of the GNU Lesser General Public License as = * + * published by the Free Software Foundation; either version 2.1 of = * + * the License, or (at your option) any later version. = * + * = * + * This software is distributed in the hope that it will be useful, = * + * but WITHOUT ANY WARRANTY; without even the implied warranty of = * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU = * + * Lesser General Public License for more details. = * + * = * + * You should have received a copy of the GNU Lesser General Public = * + * License along with this software; if not, write to the Free = * + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA = * + * 02110-1301 USA, or see the FSF site: http://www.fsf.org. = * + *************************************************************************= *****/ +package org.jboss.unit.runner.model.generic; + +import org.jboss.unit.runner.model.TestSuiteDef; +import org.jboss.unit.runner.model.BuilderException; +import org.jboss.unit.runner.TestRunner; +import org.jboss.unit.runner.impl.generic.GenericTestRunner; + +/** + * @author Julien Viet + * @version $Revision: 1.1 $ + */ +public class GenericTestSuiteDef extends TestSuiteDef +{ + + /** . */ + private String className; + + public GenericTestSuiteDef(String className) + { + this.className =3D className; + } + + public String getClassName() + { + return className; + } + + public TestRunner createRunner() throws BuilderException + { + return new GenericTestRunner(this); + } +} Modified: modules/test/trunk/unit/src/resources/jboss-unit-jar/org/jboss/un= it/runner/model/jboss-unit_1_0.xsd =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/resources/jboss-unit-jar/org/jboss/unit/run= ner/model/jboss-unit_1_0.xsd 2007-10-10 15:34:37 UTC (rev 8589) +++ modules/test/trunk/unit/src/resources/jboss-unit-jar/org/jboss/unit/run= ner/model/jboss-unit_1_0.xsd 2007-10-10 17:00:10 UTC (rev 8590) @@ -26,6 +26,7 @@ + = @@ -75,6 +76,29 @@ = + + The generic element defines a gen= eric test suite. It contains a global parameter set + and a set of tests to execute. + + + + + + + + + + + + + A test element specifies a test t= o execute. It must refer to an existing test definition. + The nested parameters are used to parameterize the test configura= tion. + + + + + + A parameter element. Added: modules/test/trunk/unit/src/resources/test/org/jboss/test/unit/runne= r/model/f2.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/resources/test/org/jboss/test/unit/runner/m= odel/f2.xml (rev 0) +++ modules/test/trunk/unit/src/resources/test/org/jboss/test/unit/runner/m= odel/f2.xml 2007-10-10 17:00:10 UTC (rev 8590) @@ -0,0 +1,10 @@ + + + + + + + --===============8798822182477873023==-- From portal-commits at lists.jboss.org Wed Oct 10 16:55:53 2007 Content-Type: multipart/mixed; boundary="===============1535209259545256317==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8591 - modules/test/trunk/build. Date: Wed, 10 Oct 2007 16:55:53 -0400 Message-ID: --===============1535209259545256317== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: bdaw Date: 2007-10-10 16:55:52 -0400 (Wed, 10 Oct 2007) New Revision: 8591 Modified: modules/test/trunk/build/build.xml Log: add tooling to main build Modified: modules/test/trunk/build/build.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/build/build.xml 2007-10-10 17:00:10 UTC (rev 8590) +++ modules/test/trunk/build/build.xml 2007-10-10 20:55:52 UTC (rev 8591) @@ -115,12 +115,13 @@ + = = + modules=3D"test,unit,mc,remote,tooling"/> = --===============1535209259545256317==-- From portal-commits at lists.jboss.org Wed Oct 10 17:56:07 2007 Content-Type: multipart/mixed; boundary="===============3049431052999668898==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8592 - in modules/test/trunk/unit/src: main/org/jboss/unit and 8 other directories. Date: Wed, 10 Oct 2007 17:56:07 -0400 Message-ID: --===============3049431052999668898== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: julien(a)jboss.com Date: 2007-10-10 17:56:06 -0400 (Wed, 10 Oct 2007) New Revision: 8592 Added: modules/test/trunk/unit/src/main/org/jboss/unit/TestIdFormat.java Removed: modules/test/trunk/unit/src/main/org/jboss/unit/runner/model/pojo/TestDe= fDef.java Modified: modules/test/trunk/unit/src/main/org/jboss/test/unit/runner/model/ModelT= ests.java modules/test/trunk/unit/src/main/org/jboss/unit/TestId.java modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/pojo/POJOTes= tRunner.java modules/test/trunk/unit/src/main/org/jboss/unit/runner/model/ModelBuilde= r.java modules/test/trunk/unit/src/main/org/jboss/unit/runner/model/TestDef.java modules/test/trunk/unit/src/main/org/jboss/unit/runner/model/TestSuiteDe= f.java modules/test/trunk/unit/src/main/org/jboss/unit/runner/model/generic/Gen= ericTestSuiteDef.java modules/test/trunk/unit/src/main/org/jboss/unit/runner/model/pojo/POJOTe= stSuiteDef.java modules/test/trunk/unit/src/main/org/jboss/unit/runner/model/pojo/TestCl= assDef.java modules/test/trunk/unit/src/main/org/jboss/unit/util/CollectionTools.java modules/test/trunk/unit/src/resources/jboss-unit-jar/org/jboss/unit/runn= er/model/jboss-unit_1_0.xsd modules/test/trunk/unit/src/resources/test/org/jboss/test/unit/blah/f1.x= ml modules/test/trunk/unit/src/resources/test/org/jboss/test/unit/runner/mo= del/f1.xml Log: simplified and consolidated pojo test test model and its underlying xml sch= ema Modified: modules/test/trunk/unit/src/main/org/jboss/test/unit/runner/model= /ModelTests.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/test/unit/runner/model/Model= Tests.java 2007-10-10 20:55:52 UTC (rev 8591) +++ modules/test/trunk/unit/src/main/org/jboss/test/unit/runner/model/Model= Tests.java 2007-10-10 21:56:06 UTC (rev 8592) @@ -26,20 +26,17 @@ import org.jboss.unit.runner.model.ModelBuilder; import org.jboss.unit.runner.model.ParameterValueDef; import org.jboss.unit.runner.model.ParametersDef; -import org.jboss.unit.runner.model.TestDef; import org.jboss.unit.runner.model.TestSuiteDef; import org.jboss.unit.runner.model.generic.GenericTestSuiteDef; import org.jboss.unit.runner.model.composite.CompositeTestSuiteDef; import org.jboss.unit.runner.model.pojo.POJOTestSuiteDef; -import org.jboss.unit.runner.model.pojo.TestDefDef; +import org.jboss.unit.runner.model.pojo.TestClassDef; +import org.jboss.unit.runner.model.pojo.TestCaseDef; import static org.jboss.unit.util.CollectionTools.list; import static org.jboss.unit.util.CollectionTools.set; import org.xml.sax.InputSource; -import org.xml.sax.SAXException; = -import javax.xml.parsers.ParserConfigurationException; import java.io.InputStream; -import java.io.IOException; import java.util.Iterator; = /** @@ -97,66 +94,32 @@ = POJOTestSuiteDef pojoSuite =3D assertInstanceOf(composite.getSuites(= ).iterator().next(), POJOTestSuiteDef.class); = - TestDefDef myTestDef =3D pojoSuite.getTestDef("MyTest"); - assertNotNull(myTestDef); - assertEquals("MyTest", myTestDef.getId()); - assertNotNull(myTestDef.getTestClass()); - assertEquals("org.foo.bar.MyTest", myTestDef.getTestClass().getName(= )); - assertNotNull(myTestDef.getTestClass().getTestCases()); - assertEquals(0, myTestDef.getTestClass().getTestCases().size()); + Iterator testClasses =3D pojoSuite.getTestClasses().it= erator(); = - TestDefDef myTestDef2 =3D pojoSuite.getTestDef("MyTest2"); - assertNotNull(myTestDef2); - assertEquals("MyTest2", myTestDef2.getId()); - assertNotNull(myTestDef2.getTestClass()); - assertEquals("org.foo.bar.MyTest2", myTestDef2.getTestClass().getNam= e()); - assertNotNull(myTestDef2.getTestClass().getTestCases()); - assertEquals(2, myTestDef2.getTestClass().getTestCases().size()); - assertNotNull(myTestDef2.getTestClass().getTestCase("foo")); - assertEquals("foo", myTestDef2.getTestClass().getTestCase("foo").get= Name()); - assertNotNull(myTestDef2.getTestClass().getTestCase("bar")); - assertEquals("bar", myTestDef2.getTestClass().getTestCase("bar").get= Name()); - - assertEquals(2, pojoSuite.getTests().size()); - // - Iterator iterator =3D pojoSuite.getTests().iterator(); - TestDef test1 =3D iterator.next(); - assertEquals("MyTest", test1.getRefId()); - ParametersDef parameters =3D test1.getParameters(); - assertNotNull(parameters); - assertEquals(set("blah", "foo"), parameters.getNames()); - ParameterValueDef blah =3D parameters.getParameter("blah"); - assertEquals(list("bluh"), blah.list()); - ParameterValueDef foo =3D parameters.getParameter("foo"); - assertEquals(list("bar1", null), foo.list()); + assertTrue(testClasses.hasNext()); + TestClassDef otherTestClass =3D assertNotNull(testClasses.next()); + assertEquals("org.foo.bar.OtherTest", otherTestClass.getName()); + assertEquals(0, otherTestClass.getTestCases().size()); + assertNotNull(otherTestClass.getParameters()); + assertEquals(set("foo"), otherTestClass.getParameters().getNames()); + ParameterValueDef fooParam =3D assertNotNull(otherTestClass.getParam= eters().getParameter("foo")); + assertEquals(list("bar"), fooParam.list()); = // - TestDef test2 =3D iterator.next(); - assertNotNull(test2.getRefId()); - ParametersDef test2Parameters =3D test2.getParameters(); - assertNotNull(test2Parameters); - assertEquals(set("foo"), test2Parameters.getNames()); - ParameterValueDef fff =3D test2Parameters.getParameter("foo"); - assertEquals(list("bar"), fff.list()); - - // - TestDefDef myTestDef3 =3D pojoSuite.getTestDef(test2.getRefId()); - assertNotNull(myTestDef3); - - assertEquals(test2.getRefId(), myTestDef3.getId()); - assertNotNull(myTestDef3.getTestClass()); - assertEquals("org.foo.bar.OtherTest", myTestDef3.getTestClass().getN= ame()); - assertNotNull(myTestDef3.getTestClass().getTestCases()); - assertEquals(0, myTestDef3.getTestClass().getTestCases().size()); - - - // -// ParametersDef suiteParams =3D pojoSuite.getParameters(); -// assertNotNull(suiteParams); -// assertEquals(set("red"), suiteParams.getMap().keySet()); -// ParameterValueDef blue =3D suiteParams.getMap().get("red"); -// assertEquals(list("blue"), blue.list()); + assertTrue(testClasses.hasNext()); + TestClassDef barClass =3D assertNotNull(testClasses.next()); + assertEquals("org.Bar", barClass.getName()); + assertEquals(2, barClass.getTestCases().size()); + TestCaseDef barFooCase =3D assertNotNull(barClass.getTestCase("foo")= ); + assertEquals("foo", barFooCase.getName()); + TestCaseDef barBarCase =3D assertNotNull(barClass.getTestCase("bar")= ); + assertEquals("bar", barBarCase.getName()); + assertEquals(set("foo", "blah"), barClass.getParameters().getNames()= ); + ParameterValueDef barClassFooParam =3D assertNotNull(barClass.getPar= ameters().getParameter("foo")); + assertEquals(list("bar1", null), barClassFooParam.list()); + ParameterValueDef barClassBlahParam =3D assertNotNull(barClass.getPa= rameters().getParameter("blah")); + assertEquals(list("bluh"), barClassBlahParam.list()); } = private static void testParameterValueDef() @@ -181,5 +144,4 @@ { } } - } Modified: modules/test/trunk/unit/src/main/org/jboss/unit/TestId.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/TestId.java 2007-10-10 = 20:55:52 UTC (rev 8591) +++ modules/test/trunk/unit/src/main/org/jboss/unit/TestId.java 2007-10-10 = 21:56:06 UTC (rev 8592) @@ -35,7 +35,7 @@ */ public final class TestId implements Serializable { - + = /** . */ private final String[] names; = Added: modules/test/trunk/unit/src/main/org/jboss/unit/TestIdFormat.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/TestIdFormat.java = (rev 0) +++ modules/test/trunk/unit/src/main/org/jboss/unit/TestIdFormat.java 2007-= 10-10 21:56:06 UTC (rev 8592) @@ -0,0 +1,111 @@ +/*************************************************************************= ***** + * JBoss, a division of Red Hat = * + * Copyright 2006, Red Hat Middleware, LLC, and individual = * + * contributors as indicated by the @authors tag. See the = * + * copyright.txt in the distribution for a full listing of = * + * individual contributors. = * + * = * + * This is free software; you can redistribute it and/or modify it = * + * under the terms of the GNU Lesser General Public License as = * + * published by the Free Software Foundation; either version 2.1 of = * + * the License, or (at your option) any later version. = * + * = * + * This software is distributed in the hope that it will be useful, = * + * but WITHOUT ANY WARRANTY; without even the implied warranty of = * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU = * + * Lesser General Public License for more details. = * + * = * + * You should have received a copy of the GNU Lesser General Public = * + * License along with this software; if not, write to the Free = * + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA = * + * 02110-1301 USA, or see the FSF site: http://www.fsf.org. = * + *************************************************************************= *****/ +package org.jboss.unit; + +import org.jboss.unit.util.CollectionTools; + +import java.util.List; +import java.util.ArrayList; + +/** + * @author Julien Viet + * @version $Revision: 1.1 $ + */ +public abstract class TestIdFormat +{ + + /** + * Parse a fqn representation of a test id. + * + * @param fqn the fqn to parse + * @return the test id value + * @throws IllegalArgumentException if the argument is not valid + */ + public abstract TestId parse(String fqn) throws IllegalArgumentExceptio= n; + + public abstract String toString(TestId testId) throws IllegalArgumentEx= ception; + + public static final TestIdFormat CLASSIC =3D new TestIdFormat() + { + public TestId parse(String fqn) + { + if (fqn =3D=3D null) + { + throw new IllegalArgumentException("No null fqn accepted"); + } + + // + int from =3D 0; + List names =3D new ArrayList(); + + // + do + { + int pos =3D fqn.indexOf('.', from); + + // + if (pos =3D=3D -1) + { + names.add(fqn.substring(from)); + break; + } + + // + names.add(fqn.substring(from, pos)); + + // + from =3D pos + 1; + } + while (true); + + // + return new TestId(names); + } + + public String toString(TestId testId) + { + if (testId =3D=3D null) + { + throw new IllegalArgumentException("No null test id accepted"); + } + + // + if (testId.getLength() =3D=3D 0) + { + return ""; + } + + // + StringBuilder builder =3D new StringBuilder(); + for (String name : CollectionTools.iterable(testId.iterator())) + { + builder.append(name); + builder.append('.'); + } + + // + return builder.substring(0, builder.length() - 1); + } + }; + +} Modified: modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/pojo/= POJOTestRunner.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/pojo/POJOTe= stRunner.java 2007-10-10 20:55:52 UTC (rev 8591) +++ modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/pojo/POJOTe= stRunner.java 2007-10-10 21:56:06 UTC (rev 8592) @@ -29,14 +29,11 @@ import org.jboss.unit.runner.event.RunnerFailureEvent; import org.jboss.unit.runner.event.TestRunnerLifeCycleFilter; import org.jboss.unit.runner.model.pojo.POJOTestSuiteDef; -import org.jboss.unit.runner.model.pojo.TestDefDef; import org.jboss.unit.runner.model.pojo.TestClassDef; import org.jboss.unit.runner.model.pojo.TestCaseDef; -import org.jboss.unit.runner.model.TestDef; import org.jboss.unit.TestId; import org.jboss.unit.Failure; import org.jboss.unit.info.TestSuiteInfo; -import org.jboss.unit.info.TestCaseInfo; import org.jboss.unit.driver.impl.pojo.POJOTestSuiteDriver; import org.jboss.unit.driver.TestDriver; = @@ -64,70 +61,46 @@ = protected void internalRun(TestFilter filter) { - for (TestDef test : suite.getTests()) + for (TestClassDef testClass : suite.getTestClasses()) { - // Get def id - String testDefId =3D test.getRefId(); + String className =3D testClass.getName(); = // - if (testDefId !=3D null) + try { - // Get related test definition - TestDefDef testDef =3D suite.getTestDef(testDefId); + Class clazz =3D Thread.currentThread().getContextClassLoader()= .loadClass(className); = // - if (testDef !=3D null) + TestDriver driver =3D new POJOTestSuiteDriver(clazz); + TestSuiteInfo testSuiteInfo =3D (TestSuiteInfo)driver.getInfo(= ); + + // + List testCaseNames =3D new ArrayList(); + for (TestCaseDef testCase : testClass.getTestCases()) { - TestClassDef testClass =3D testDef.getTestClass(); - String className =3D testClass.getName(); + testCaseNames.add(testCase.getName()); + } + if (testCaseNames.size() =3D=3D 0) + { + testCaseNames.addAll(testSuiteInfo.getNames()); + } = - // - try - { - Class clazz =3D Thread.currentThread().getContextClassLo= ader().loadClass(className); + // Create parametrization + ParametrizationSet parametrizations =3D suite.getParameters().= getParametrization(); + parametrizations.merge(testClass.getParameters().getParametriz= ation()); = - // - TestDriver driver =3D new POJOTestSuiteDriver(clazz); - TestSuiteInfo testSuiteInfo =3D (TestSuiteInfo)driver.ge= tInfo(); - - // - List testCaseNames =3D new ArrayList(); - for (TestCaseDef testCase : testClass.getTestCases()) - { - testCaseNames.add(testCase.getName()); - } - if (testCaseNames.size() =3D=3D 0) - { - testCaseNames.addAll(testSuiteInfo.getNames()); - } - - // Create parametrization - ParametrizationSet parametrizations =3D suite.getParamet= ers().getParametrization(); - parametrizations.merge(test.getParameters().getParametri= zation()); - - // - for (String testCaseName : testCaseNames) - { - TestId testCaseId =3D new TestId(testCaseName); - TestCaseInfo testCaseInfo =3D (TestCaseInfo)testSuite= Info.findTest(testCaseId); - TestDriverRunner runner =3D new TestDriverRunner(driv= er, parametrizations, testCaseId); - runner.addListener(lifeCycleFilter); - runner.run(filter); - } - } - catch (Exception e) - { - fireEvent(new RunnerFailureEvent(Failure.createErrorFail= ure("Cannot execute test id " + testDefId,e))); - } - } - else + // + for (String testCaseName : testCaseNames) { - fireEvent(new RunnerFailureEvent(Failure.createErrorFailure= ("No test definition found for id " + testDefId))); + TestId testCaseId =3D new TestId(testCaseName); + TestDriverRunner runner =3D new TestDriverRunner(driver, pa= rametrizations, testCaseId); + runner.addListener(lifeCycleFilter); + runner.run(filter); } } - else + catch (Exception e) { - fireEvent(new RunnerFailureEvent(Failure.createErrorFailure("N= o test definition found for id " + testDefId))); + fireEvent(new RunnerFailureEvent(Failure.createErrorFailure("C= annot execute test class " + className,e))); } } } Modified: modules/test/trunk/unit/src/main/org/jboss/unit/runner/model/Mode= lBuilder.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/runner/model/ModelBuild= er.java 2007-10-10 20:55:52 UTC (rev 8591) +++ modules/test/trunk/unit/src/main/org/jboss/unit/runner/model/ModelBuild= er.java 2007-10-10 21:56:06 UTC (rev 8592) @@ -32,9 +32,10 @@ import org.jboss.unit.runner.model.pojo.POJOTestSuiteDef; import org.jboss.unit.runner.model.pojo.TestClassDef; import org.jboss.unit.runner.model.pojo.TestCaseDef; -import org.jboss.unit.runner.model.pojo.TestDefDef; import org.jboss.unit.runner.model.composite.CompositeTestSuiteDef; import org.jboss.unit.runner.model.generic.GenericTestSuiteDef; +import org.jboss.unit.TestIdFormat; +import org.jboss.unit.TestId; import org.xml.sax.InputSource; import org.xml.sax.SAXException; import org.xml.sax.SAXParseException; @@ -180,12 +181,15 @@ } = // - String refid =3D refidAttr.getValue(); + String refIdLitteral =3D refidAttr.getValue(); = // - TestDef test =3D new TestDef(refid); + TestId refId =3D TestIdFormat.CLASSIC.parse(refIdLitteral); = // + TestDef test =3D new TestDef(refId); + + // test.setParameters(buildParameters(testElt)); = // @@ -199,111 +203,45 @@ return suite; } = - private TestClassDef buildTestClassDef(Element classElt) - { - Attr nameAttr =3D classElt.getAttributeNode("name"); - if (nameAttr =3D=3D null) - { - throw new IllegalArgumentException(); - } - - // - String classname =3D nameAttr.getValue(); - TestClassDef testClass =3D new TestClassDef(classname); - - // - for (Element caseElt : children(classElt, "case")) - { - - Attr caseNameAttr =3D caseElt.getAttributeNode("name"); - if (caseNameAttr =3D=3D null) - { - throw new IllegalArgumentException(); - } - - // - testClass.addTestCase(new TestCaseDef(caseNameAttr.getValue())); - } - - // - return testClass; - } - private TestSuiteDef buildPOJOTestSuite(Element suiteElt) { POJOTestSuiteDef suite =3D new POJOTestSuiteDef(); - + = // - for (Element testDefElt : children(suiteElt, "test-def")) + for (Element testElt : children(suiteElt, "test")) { - Attr idAttr =3D testDefElt.getAttributeNode("id"); - if (idAttr =3D=3D null) - { - throw new IllegalArgumentException(); - } + Element classElt =3D child(testElt, "class"); = // - String id =3D idAttr.getValue(); - - // - Element classElt =3D child(testDefElt, "class"); - if (classElt =3D=3D null) + Attr nameAttr =3D classElt.getAttributeNode("name"); + if (nameAttr =3D=3D null) { throw new IllegalArgumentException(); } = // - TestClassDef testClass =3D buildTestClassDef(classElt); + String classname =3D nameAttr.getValue(); + TestClassDef testClass =3D new TestClassDef(classname); = - // - TestDefDef testDef =3D new TestDefDef(id); - testDef.setTestClass(testClass); + testClass.setParameters(buildParameters(testElt)); = // - suite.addDef(testDef); - } - - // - for (Element testElt : children(suiteElt, "test")) - { - Attr refidAttr =3D testElt.getAttributeNode("refid"); - Element classElt =3D child(testElt, "class"); - - // - String refid; - - // - if (refidAttr !=3D null) + for (Element caseElt : children(classElt, "case")) { - refid =3D refidAttr.getValue(); - } - else if (classElt !=3D null) - { - String id =3D "blah"; + Attr caseNameAttr =3D caseElt.getAttributeNode("name"); + if (caseNameAttr =3D=3D null) + { + throw new IllegalArgumentException(); + } = - TestClassDef testClass =3D buildTestClassDef(classElt); - - TestDefDef testDef =3D new TestDefDef(id); - - testDef.setTestClass(testClass); - - suite.addDef(testDef); - - refid =3D id; + // + String testCaseName =3D caseNameAttr.getValue(); + TestCaseDef testCase =3D new TestCaseDef(testCaseName); + testClass.addTestCase(testCase); } - else - { - throw new IllegalArgumentException(); - } = // - TestDef test =3D new TestDef(refid); - - // - test.setParameters(buildParameters(testElt)); - - // - suite.addTest(test); + suite.addClass(testClass); } = // Modified: modules/test/trunk/unit/src/main/org/jboss/unit/runner/model/Test= Def.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/runner/model/TestDef.ja= va 2007-10-10 20:55:52 UTC (rev 8591) +++ modules/test/trunk/unit/src/main/org/jboss/unit/runner/model/TestDef.ja= va 2007-10-10 21:56:06 UTC (rev 8592) @@ -22,6 +22,8 @@ *************************************************************************= *****/ package org.jboss.unit.runner.model; = +import org.jboss.unit.TestId; + /** * @author Julien Viet * @version $Revision: 1.1 $ @@ -30,21 +32,21 @@ { = /** . */ - private String refId; + private TestId refId; = /** . */ private ParametersDef parameters =3D new ParametersDef(); = - public TestDef(String testId) + public TestDef(TestId refId) { - if (testId =3D=3D null) + if (refId =3D=3D null) { - throw new IllegalArgumentException("No null test id accepted"); + throw new IllegalArgumentException("No null ref id accepted"); } - this.refId =3D testId; + this.refId =3D refId; } = - public String getRefId() + public TestId getRefId() { return refId; } Modified: modules/test/trunk/unit/src/main/org/jboss/unit/runner/model/Test= SuiteDef.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/runner/model/TestSuiteD= ef.java 2007-10-10 20:55:52 UTC (rev 8591) +++ modules/test/trunk/unit/src/main/org/jboss/unit/runner/model/TestSuiteD= ef.java 2007-10-10 21:56:06 UTC (rev 8592) @@ -35,26 +35,9 @@ public abstract class TestSuiteDef { = - /** The tests. */ - protected final List tests =3D new ArrayList(); - /** . */ protected ParametersDef parameters =3D new ParametersDef(); = - public void addTest(TestDef test) - { - if (test =3D=3D null) - { - throw new IllegalArgumentException(); - } - tests.add(test); - } - - public Collection getTests() - { - return tests; - } - public ParametersDef getParameters() { return parameters; Modified: modules/test/trunk/unit/src/main/org/jboss/unit/runner/model/gene= ric/GenericTestSuiteDef.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/runner/model/generic/Ge= nericTestSuiteDef.java 2007-10-10 20:55:52 UTC (rev 8591) +++ modules/test/trunk/unit/src/main/org/jboss/unit/runner/model/generic/Ge= nericTestSuiteDef.java 2007-10-10 21:56:06 UTC (rev 8592) @@ -24,9 +24,14 @@ = import org.jboss.unit.runner.model.TestSuiteDef; import org.jboss.unit.runner.model.BuilderException; +import org.jboss.unit.runner.model.TestDef; import org.jboss.unit.runner.TestRunner; import org.jboss.unit.runner.impl.generic.GenericTestRunner; = +import java.util.List; +import java.util.ArrayList; +import java.util.Collection; + /** * @author Julien Viet * @version $Revision: 1.1 $ @@ -34,6 +39,9 @@ public class GenericTestSuiteDef extends TestSuiteDef { = + /** The tests. */ + private List tests =3D new ArrayList(); + /** . */ private String className; = @@ -51,4 +59,18 @@ { return new GenericTestRunner(this); } + + public void addTest(TestDef test) + { + if (test =3D=3D null) + { + throw new IllegalArgumentException(); + } + tests.add(test); + } + + public Collection getTests() + { + return tests; + } } Modified: modules/test/trunk/unit/src/main/org/jboss/unit/runner/model/pojo= /POJOTestSuiteDef.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/runner/model/pojo/POJOT= estSuiteDef.java 2007-10-10 20:55:52 UTC (rev 8591) +++ modules/test/trunk/unit/src/main/org/jboss/unit/runner/model/pojo/POJOT= estSuiteDef.java 2007-10-10 21:56:06 UTC (rev 8592) @@ -28,8 +28,8 @@ import org.jboss.unit.runner.impl.pojo.POJOTestRunner; = import java.util.Collection; -import java.util.Map; -import java.util.HashMap; +import java.util.List; +import java.util.ArrayList; = /** * @author Julien Viet @@ -39,31 +39,22 @@ { = /** The definitions. */ - private Map testDefs =3D new HashMap(); + private List testClasses =3D new ArrayList(= ); = - public void addDef(TestDefDef testDef) + public void addClass(TestClassDef testDef) { if (testDef =3D=3D null) { - throw new IllegalArgumentException("No null test def accepted"); + throw new IllegalArgumentException("No null test class accepted"); } - testDefs.put(testDef.getId(), testDef); + testClasses.add(testDef); } = - public Collection getTestDefs() + public Collection getTestClasses() { - return testDefs.values(); + return testClasses; } = - public TestDefDef getTestDef(String name) - { - if (name =3D=3D null) - { - throw new IllegalArgumentException("No null test def name accepte= d"); - } - return testDefs.get(name); - } - public TestRunner createRunner() throws BuilderException { return new POJOTestRunner(this); Modified: modules/test/trunk/unit/src/main/org/jboss/unit/runner/model/pojo= /TestClassDef.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/runner/model/pojo/TestC= lassDef.java 2007-10-10 20:55:52 UTC (rev 8591) +++ modules/test/trunk/unit/src/main/org/jboss/unit/runner/model/pojo/TestC= lassDef.java 2007-10-10 21:56:06 UTC (rev 8592) @@ -22,6 +22,8 @@ *************************************************************************= *****/ package org.jboss.unit.runner.model.pojo; = +import org.jboss.unit.runner.model.ParametersDef; + import java.util.Map; import java.util.HashMap; import java.util.Collection; @@ -39,6 +41,9 @@ /** . */ private Map testCases =3D new HashMap(); = + /** . */ + private ParametersDef parameters =3D new ParametersDef(); + public TestClassDef(String name) { if (name =3D=3D null) @@ -77,4 +82,14 @@ } return testCases.get(name); } + + public ParametersDef getParameters() + { + return parameters; + } + + public void setParameters(ParametersDef parameters) + { + this.parameters =3D parameters; + } } Deleted: modules/test/trunk/unit/src/main/org/jboss/unit/runner/model/pojo/= TestDefDef.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/runner/model/pojo/TestD= efDef.java 2007-10-10 20:55:52 UTC (rev 8591) +++ modules/test/trunk/unit/src/main/org/jboss/unit/runner/model/pojo/TestD= efDef.java 2007-10-10 21:56:06 UTC (rev 8592) @@ -1,65 +0,0 @@ -/*************************************************************************= ***** - * JBoss, a division of Red Hat = * - * Copyright 2006, Red Hat Middleware, LLC, and individual = * - * contributors as indicated by the @authors tag. See the = * - * copyright.txt in the distribution for a full listing of = * - * individual contributors. = * - * = * - * This is free software; you can redistribute it and/or modify it = * - * under the terms of the GNU Lesser General Public License as = * - * published by the Free Software Foundation; either version 2.1 of = * - * the License, or (at your option) any later version. = * - * = * - * This software is distributed in the hope that it will be useful, = * - * but WITHOUT ANY WARRANTY; without even the implied warranty of = * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU = * - * Lesser General Public License for more details. = * - * = * - * You should have received a copy of the GNU Lesser General Public = * - * License along with this software; if not, write to the Free = * - * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA = * - * 02110-1301 USA, or see the FSF site: http://www.fsf.org. = * - *************************************************************************= *****/ -package org.jboss.unit.runner.model.pojo; - -/** - * The definition of a tested class. - * - * @author Julien Viet - * @version $Revision: 1.1 $ - */ -public class TestDefDef -{ - - /** . */ - private final String id; - - /** . */ - private TestClassDef testClass; - - public TestDefDef(String id) - { - if (id =3D=3D null) - { - throw new IllegalArgumentException(); - } - - // - this.id =3D id; - } - - public String getId() - { - return id; - } - - public TestClassDef getTestClass() - { - return testClass; - } - - public void setTestClass(TestClassDef testClass) - { - this.testClass =3D testClass; - } -} Modified: modules/test/trunk/unit/src/main/org/jboss/unit/util/CollectionTo= ols.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/util/CollectionTools.ja= va 2007-10-10 20:55:52 UTC (rev 8591) +++ modules/test/trunk/unit/src/main/org/jboss/unit/util/CollectionTools.ja= va 2007-10-10 21:56:06 UTC (rev 8592) @@ -27,6 +27,7 @@ import java.util.HashSet; import java.util.Set; import java.util.List; +import java.util.Iterator; = /** * @author Julien Viet @@ -35,6 +36,17 @@ public class CollectionTools { = + public static Iterable iterable(final Iterator iterator) + { + return new Iterable() + { + public Iterator iterator() + { + return iterator; + } + }; + } + public static Set set() { return new HashSet(); Modified: modules/test/trunk/unit/src/resources/jboss-unit-jar/org/jboss/un= it/runner/model/jboss-unit_1_0.xsd =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/resources/jboss-unit-jar/org/jboss/unit/run= ner/model/jboss-unit_1_0.xsd 2007-10-10 20:55:52 UTC (rev 8591) +++ modules/test/trunk/unit/src/resources/jboss-unit-jar/org/jboss/unit/run= ner/model/jboss-unit_1_0.xsd 2007-10-10 21:56:06 UTC (rev 8592) @@ -70,10 +70,9 @@ nested class element or it can refer to an existing test definiti= on. The nested parameters are used to parameterize the test configuration, they override any existing parameter defi= ned at the pojo level. + - - = Modified: modules/test/trunk/unit/src/resources/test/org/jboss/test/unit/bl= ah/f1.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/resources/test/org/jboss/test/unit/blah/f1.= xml 2007-10-10 20:55:52 UTC (rev 8591) +++ modules/test/trunk/unit/src/resources/test/org/jboss/test/unit/blah/f1.= xml 2007-10-10 21:56:06 UTC (rev 8592) @@ -4,31 +4,24 @@ xmlns:xsi=3D"http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation=3D"urn:jboss:jboss-unit:1.0 jboss-unit_1_0.xsd"> - + - - + + - - - - - - - - - - - - + + foo fii + + + Modified: modules/test/trunk/unit/src/resources/test/org/jboss/test/unit/ru= nner/model/f1.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/resources/test/org/jboss/test/unit/runner/m= odel/f1.xml 2007-10-10 20:55:52 UTC (rev 8591) +++ modules/test/trunk/unit/src/resources/test/org/jboss/test/unit/runner/m= odel/f1.xml 2007-10-10 21:56:06 UTC (rev 8592) @@ -7,21 +7,16 @@ = = - - - - - - + + + + + + + - - - bar1 @@ -29,25 +24,5 @@ = - - - - - - - --===============3049431052999668898==-- From portal-commits at lists.jboss.org Wed Oct 10 18:05:10 2007 Content-Type: multipart/mixed; boundary="===============5004547575358466611==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8593 - in modules/test/trunk/unit/src: main/org/jboss/unit/runner/model and 2 other directories. Date: Wed, 10 Oct 2007 18:05:10 -0400 Message-ID: --===============5004547575358466611== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: julien(a)jboss.com Date: 2007-10-10 18:05:10 -0400 (Wed, 10 Oct 2007) New Revision: 8593 Added: modules/test/trunk/unit/src/main/org/jboss/unit/runner/model/generic/Tes= tDef.java Removed: modules/test/trunk/unit/src/main/org/jboss/unit/runner/model/TestDef.java Modified: modules/test/trunk/unit/src/main/org/jboss/test/unit/runner/model/ModelT= ests.java modules/test/trunk/unit/src/main/org/jboss/unit/runner/model/ModelBuilde= r.java modules/test/trunk/unit/src/main/org/jboss/unit/runner/model/generic/Gen= ericTestSuiteDef.java modules/test/trunk/unit/src/resources/test/org/jboss/test/unit/runner/mo= del/f2.xml Log: added test case for test ref id in generic test Modified: modules/test/trunk/unit/src/main/org/jboss/test/unit/runner/model= /ModelTests.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/test/unit/runner/model/Model= Tests.java 2007-10-10 21:56:06 UTC (rev 8592) +++ modules/test/trunk/unit/src/main/org/jboss/test/unit/runner/model/Model= Tests.java 2007-10-10 22:05:10 UTC (rev 8593) @@ -27,6 +27,7 @@ import org.jboss.unit.runner.model.ParameterValueDef; import org.jboss.unit.runner.model.ParametersDef; import org.jboss.unit.runner.model.TestSuiteDef; +import org.jboss.unit.runner.model.generic.TestDef; import org.jboss.unit.runner.model.generic.GenericTestSuiteDef; import org.jboss.unit.runner.model.composite.CompositeTestSuiteDef; import org.jboss.unit.runner.model.pojo.POJOTestSuiteDef; @@ -34,10 +35,12 @@ import org.jboss.unit.runner.model.pojo.TestCaseDef; import static org.jboss.unit.util.CollectionTools.list; import static org.jboss.unit.util.CollectionTools.set; +import org.jboss.unit.TestId; import org.xml.sax.InputSource; = import java.io.InputStream; import java.util.Iterator; +import java.util.List; = /** * @author Julien Viet @@ -82,6 +85,14 @@ // ParametersDef parameters =3D assertNotNull(generic.getParameters()); assertEquals(set("red"), parameters.getNames()); + + // + List tests =3D assertNotNull(generic.getTests()); + assertEquals(2, tests.size()); + TestDef foo =3D assertNotNull(tests.get(0)); + assertEquals(new TestId("foo"), foo.getRefId()); + TestDef fooBar =3D assertNotNull(tests.get(1)); + assertEquals(new TestId("foo", "bar"), fooBar.getRefId()); } = private static void buildFromXML1() Modified: modules/test/trunk/unit/src/main/org/jboss/unit/runner/model/Mode= lBuilder.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/runner/model/ModelBuild= er.java 2007-10-10 21:56:06 UTC (rev 8592) +++ modules/test/trunk/unit/src/main/org/jboss/unit/runner/model/ModelBuild= er.java 2007-10-10 22:05:10 UTC (rev 8593) @@ -34,6 +34,7 @@ import org.jboss.unit.runner.model.pojo.TestCaseDef; import org.jboss.unit.runner.model.composite.CompositeTestSuiteDef; import org.jboss.unit.runner.model.generic.GenericTestSuiteDef; +import org.jboss.unit.runner.model.generic.TestDef; import org.jboss.unit.TestIdFormat; import org.jboss.unit.TestId; import org.xml.sax.InputSource; Deleted: modules/test/trunk/unit/src/main/org/jboss/unit/runner/model/TestD= ef.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/runner/model/TestDef.ja= va 2007-10-10 21:56:06 UTC (rev 8592) +++ modules/test/trunk/unit/src/main/org/jboss/unit/runner/model/TestDef.ja= va 2007-10-10 22:05:10 UTC (rev 8593) @@ -1,63 +0,0 @@ -/*************************************************************************= ***** - * JBoss, a division of Red Hat = * - * Copyright 2006, Red Hat Middleware, LLC, and individual = * - * contributors as indicated by the @authors tag. See the = * - * copyright.txt in the distribution for a full listing of = * - * individual contributors. = * - * = * - * This is free software; you can redistribute it and/or modify it = * - * under the terms of the GNU Lesser General Public License as = * - * published by the Free Software Foundation; either version 2.1 of = * - * the License, or (at your option) any later version. = * - * = * - * This software is distributed in the hope that it will be useful, = * - * but WITHOUT ANY WARRANTY; without even the implied warranty of = * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU = * - * Lesser General Public License for more details. = * - * = * - * You should have received a copy of the GNU Lesser General Public = * - * License along with this software; if not, write to the Free = * - * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA = * - * 02110-1301 USA, or see the FSF site: http://www.fsf.org. = * - *************************************************************************= *****/ -package org.jboss.unit.runner.model; - -import org.jboss.unit.TestId; - -/** - * @author Julien Viet - * @version $Revision: 1.1 $ - */ -public class TestDef -{ - - /** . */ - private TestId refId; - - /** . */ - private ParametersDef parameters =3D new ParametersDef(); - - public TestDef(TestId refId) - { - if (refId =3D=3D null) - { - throw new IllegalArgumentException("No null ref id accepted"); - } - this.refId =3D refId; - } - - public TestId getRefId() - { - return refId; - } - - public ParametersDef getParameters() - { - return parameters; - } - - public void setParameters(ParametersDef parameters) - { - this.parameters =3D parameters; - } -} Modified: modules/test/trunk/unit/src/main/org/jboss/unit/runner/model/gene= ric/GenericTestSuiteDef.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/runner/model/generic/Ge= nericTestSuiteDef.java 2007-10-10 21:56:06 UTC (rev 8592) +++ modules/test/trunk/unit/src/main/org/jboss/unit/runner/model/generic/Ge= nericTestSuiteDef.java 2007-10-10 22:05:10 UTC (rev 8593) @@ -24,13 +24,12 @@ = import org.jboss.unit.runner.model.TestSuiteDef; import org.jboss.unit.runner.model.BuilderException; -import org.jboss.unit.runner.model.TestDef; +import org.jboss.unit.runner.model.generic.TestDef; import org.jboss.unit.runner.TestRunner; import org.jboss.unit.runner.impl.generic.GenericTestRunner; = import java.util.List; import java.util.ArrayList; -import java.util.Collection; = /** * @author Julien Viet @@ -69,7 +68,7 @@ tests.add(test); } = - public Collection getTests() + public List getTests() { return tests; } Copied: modules/test/trunk/unit/src/main/org/jboss/unit/runner/model/generi= c/TestDef.java (from rev 8592, modules/test/trunk/unit/src/main/org/jboss/u= nit/runner/model/TestDef.java) =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/runner/model/generic/Te= stDef.java (rev 0) +++ modules/test/trunk/unit/src/main/org/jboss/unit/runner/model/generic/Te= stDef.java 2007-10-10 22:05:10 UTC (rev 8593) @@ -0,0 +1,64 @@ +/*************************************************************************= ***** + * JBoss, a division of Red Hat = * + * Copyright 2006, Red Hat Middleware, LLC, and individual = * + * contributors as indicated by the @authors tag. See the = * + * copyright.txt in the distribution for a full listing of = * + * individual contributors. = * + * = * + * This is free software; you can redistribute it and/or modify it = * + * under the terms of the GNU Lesser General Public License as = * + * published by the Free Software Foundation; either version 2.1 of = * + * the License, or (at your option) any later version. = * + * = * + * This software is distributed in the hope that it will be useful, = * + * but WITHOUT ANY WARRANTY; without even the implied warranty of = * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU = * + * Lesser General Public License for more details. = * + * = * + * You should have received a copy of the GNU Lesser General Public = * + * License along with this software; if not, write to the Free = * + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA = * + * 02110-1301 USA, or see the FSF site: http://www.fsf.org. = * + *************************************************************************= *****/ +package org.jboss.unit.runner.model.generic; + +import org.jboss.unit.TestId; +import org.jboss.unit.runner.model.ParametersDef; + +/** + * @author Julien Viet + * @version $Revision: 1.1 $ + */ +public class TestDef +{ + + /** . */ + private TestId refId; + + /** . */ + private ParametersDef parameters =3D new ParametersDef(); + + public TestDef(TestId refId) + { + if (refId =3D=3D null) + { + throw new IllegalArgumentException("No null ref id accepted"); + } + this.refId =3D refId; + } + + public TestId getRefId() + { + return refId; + } + + public ParametersDef getParameters() + { + return parameters; + } + + public void setParameters(ParametersDef parameters) + { + this.parameters =3D parameters; + } +} Modified: modules/test/trunk/unit/src/resources/test/org/jboss/test/unit/ru= nner/model/f2.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/resources/test/org/jboss/test/unit/runner/m= odel/f2.xml 2007-10-10 21:56:06 UTC (rev 8592) +++ modules/test/trunk/unit/src/resources/test/org/jboss/test/unit/runner/m= odel/f2.xml 2007-10-10 22:05:10 UTC (rev 8593) @@ -6,5 +6,7 @@ + + --===============5004547575358466611==-- From portal-commits at lists.jboss.org Wed Oct 10 18:19:46 2007 Content-Type: multipart/mixed; boundary="===============5860349133502341070==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8594 - in docs: trunk/userGuide/en/modules and 1 other directory. Date: Wed, 10 Oct 2007 18:19:46 -0400 Message-ID: --===============5860349133502341070== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: chris.laprun(a)jboss.com Date: 2007-10-10 18:19:45 -0400 (Wed, 10 Oct 2007) New Revision: 8594 Modified: docs/branches/JBoss_Portal_Branch_2_6/userGuide/en/modules/intro.xml docs/trunk/userGuide/en/modules/intro.xml Log: - Fixed typos and grammar errors. Modified: docs/branches/JBoss_Portal_Branch_2_6/userGuide/en/modules/intro.= xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- docs/branches/JBoss_Portal_Branch_2_6/userGuide/en/modules/intro.xml 20= 07-10-10 22:05:10 UTC (rev 8593) +++ docs/branches/JBoss_Portal_Branch_2_6/userGuide/en/modules/intro.xml 20= 07-10-10 22:19:45 UTC (rev 8594) @@ -36,7 +36,7 @@ http://[domain]/[context]/portal/[portal_name] . In a default/local install, the default - portal instance can be reach by + portal instance can be reached at htt= p://localhost:8080/portal/portal/default . @@ -55,11 +55,11 @@ http://[domain]/[context]/portal/[portal_name]/[page= _name] . In a default/local install, the default - page can be reach by + page can be reached at http://localhost:8080/portal/portal/default/default - . Likewise, the News Page in a default install can be reached = by + . Likewise, the News Page in a default install can be reached = at http://localhost:8080/portal/portal/default/News @@ -96,11 +96,11 @@ Window Controls: Window controls are divided into two categories and c= ontrol different aspects of how the user can - impact the generated markup. Each window control can = be click to interact with the window in - specific way. Window State icons control how much room the window + impact the generated markup. Each window control can = be clicked on to interact with the window in + specific ways. Window State icons control how much room the window will take on the page and how much markup will be sho= wn. Portlet Mode icons= , on the other hand, control the mode in which - the portlet operate, thus impacting the type of gener= ated markup. Note that not all portlets + the portlet operates, thus impacting the type of gene= rated markup. Note that not all portlets support all defined window states and/or portlet mode= s. @@ -114,8 +114,8 @@ (Normal) - Normal window state, is the most = common state for portlets (portlets in the - above image are in the normal windo= w state). All portlet - windows occupy a similar amount of = space on the page. + above image are in the normal windo= w state). The portlet window will occupy only + enough space to show the portlet co= ntent on the page. @@ -141,7 +141,7 @@ Portlet Modes and th= eir meaning: Portlet modes are not always available (it d= epends on the portlet support for a given mode). - Moreover, the Edit mode is only available to= logged in users, as in this mode, the portlet + Moreover, the Edit mode is only available to= logged-in users, as in this mode, the portlet preferences can be modified to be individual= ly suited to a particular user's needs. @@ -320,7 +320,7 @@ + valign=3D"middle"/> @@ -330,7 +330,7 @@ View profile - The default page after login is the view profile, whic= h shows a summary of the most important properties of a user. = + The default page after login is the view profile, whic= h shows a summary of the most important properties of a user. @@ -338,7 +338,7 @@ Edit personal information<= /emphasis> A user has the ability to edit his personal inf= ormation, change his password and e-mail address at any time by clicking on= the - "Edit profile" link, when log= ged in. = + "Edit profile" link, when log= ged in. @@ -359,7 +359,8 @@ Displaying content is done by the portal using a path mappe= r. For example, if we wanted to display a zip file, located in /default/foo/bar.zip,= we would type in the URL http://localhost:8080/content/default/foo/bar.zip= . - Notice how the path to the content,= is prefixed with the '/content' term. + Notice how the path to the content, is pre= fixed with the '/content' term. Although in this example we are describing binary content r= etrieval, the same is to be said for text/html files. Keep in mind, however, that binary files are display= ed outside of the portal pages, but text/html are displayed inside the CMSPortlet Window. @@ -521,7 +522,7 @@ location, if the administrator allows this functionality. Changes= made in this fashion will also be persisted. - It is also possible to copy the content of a shared page to your = dashboard so you can customize it to your = + It is also possible to copy the content of a shared page to your = dashboard so you can customize it to your liking. Just click the 'Copy to my dashboard' link at the top right of the page. This will clone the page and add it to your personal dashboard as= a page with the same name. @@ -564,7 +565,8 @@ at the bottom of the screen. We will note that users are n= ot able to delete the default dashboard page. - + @@ -592,7 +594,7 @@ Admin Portal - You must be logged in as= an administrator, or have proper priviledges + You must be logged in as= an administrator, or have proper privileges to see this portal. @@ -600,8 +602,8 @@ - The Admin Portal's purpose is to allow an administrator to manage= all aspects of the portal (Follow the links - for in-depth reviews of these functions): + The Admin Portal's purpose is to allow an administrator to manage= all aspects of the portal. Follow the links + for in-depth reviews of these functions: Users/Roles (See: , ) Content Management System (See: ) Modified: docs/trunk/userGuide/en/modules/intro.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- docs/trunk/userGuide/en/modules/intro.xml 2007-10-10 22:05:10 UTC (rev = 8593) +++ docs/trunk/userGuide/en/modules/intro.xml 2007-10-10 22:19:45 UTC (rev = 8594) @@ -36,7 +36,7 @@ http://[domain]/[context]/portal/[portal_name] . In a default/local install, the default - portal instance can be reach by + portal instance can be reached at htt= p://localhost:8080/portal/portal/default . @@ -55,11 +55,11 @@ http://[domain]/[context]/portal/[portal_name]/[page= _name] . In a default/local install, the default - page can be reach by + page can be reached at http://localhost:8080/portal/portal/default/default - . Likewise, the News Page in a default install can be reached = by + . Likewise, the News Page in a default install can be reached = at http://localhost:8080/portal/portal/default/News @@ -96,11 +96,11 @@ Window Controls: Window controls are divided into two categories and c= ontrol different aspects of how the user can - impact the generated markup. Each window control can = be click to interact with the window in - specific way. Window State icons control how much room the window + impact the generated markup. Each window control can = be clicked on to interact with the window in + specific ways. Window State icons control how much room the window will take on the page and how much markup will be sho= wn. Portlet Mode icons= , on the other hand, control the mode in which - the portlet operate, thus impacting the type of gener= ated markup. Note that not all portlets + the portlet operates, thus impacting the type of gene= rated markup. Note that not all portlets support all defined window states and/or portlet mode= s. @@ -114,8 +114,8 @@ (Normal) - Normal window state, is the most = common state for portlets (portlets in the - above image are in the normal windo= w state). All portlet - windows occupy a similar amount of = space on the page. + above image are in the normal windo= w state). The portlet window will occupy only + enough space to show the portlet co= ntent on the page. @@ -141,7 +141,7 @@ Portlet Modes and th= eir meaning: Portlet modes are not always available (it d= epends on the portlet support for a given mode). - Moreover, the Edit mode is only available to= logged in users, as in this mode, the portlet + Moreover, the Edit mode is only available to= logged-in users, as in this mode, the portlet preferences can be modified to be individual= ly suited to a particular user's needs. @@ -320,7 +320,7 @@ + valign=3D"middle"/> @@ -359,7 +359,8 @@ Displaying content is done by the portal using a path mappe= r. For example, if we wanted to display a zip file, located in /default/foo/bar.zip,= we would type in the URL http://localhost:8080/content/default/foo/bar.zip= . - Notice how the path to the content,= is prefixed with the '/content' term. + Notice how the path to the content, is pre= fixed with the '/content' term. Although in this example we are describing binary content r= etrieval, the same is to be said for text/html files. Keep in mind, however, that binary files are display= ed outside of the portal pages, but text/html are displayed inside the CMSPortlet Window. @@ -564,7 +565,8 @@ at the bottom of the screen. We will note that users are n= ot able to delete the default dashboard page. - + @@ -592,7 +594,7 @@ Admin Portal - You must be logged in as= an administrator, or have proper priviledges + You must be logged in as= an administrator, or have proper privileges to see this portal. @@ -600,8 +602,8 @@ - The Admin Portal's purpose is to allow an administrator to manage= all aspects of the portal (Follow the links - for in-depth reviews of these functions): + The Admin Portal's purpose is to allow an administrator to manage= all aspects of the portal. Follow the links + for in-depth reviews of these functions: Users/Roles (See: , ) Content Management System (See: ) --===============5860349133502341070==-- From portal-commits at lists.jboss.org Wed Oct 10 18:23:31 2007 Content-Type: multipart/mixed; boundary="===============1312559065643482676==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8595 - in modules/test/trunk/unit/src/main/org/jboss: unit/report/impl/console and 1 other directory. Date: Wed, 10 Oct 2007 18:23:31 -0400 Message-ID: --===============1312559065643482676== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: julien(a)jboss.com Date: 2007-10-10 18:23:30 -0400 (Wed, 10 Oct 2007) New Revision: 8595 Modified: modules/test/trunk/unit/src/main/org/jboss/test/unit/AllTests.java modules/test/trunk/unit/src/main/org/jboss/unit/report/impl/console/Prin= tListener.java Log: in console reporter use exception.printStackTrace(System.out) instead of de= fault which writes to err and interleave the console output with the normal= standard output Modified: modules/test/trunk/unit/src/main/org/jboss/test/unit/AllTests.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/test/unit/AllTests.java 2007= -10-10 22:19:45 UTC (rev 8594) +++ modules/test/trunk/unit/src/main/org/jboss/test/unit/AllTests.java 2007= -10-10 22:23:30 UTC (rev 8595) @@ -29,6 +29,7 @@ import org.jboss.test.unit.runner.CompositeTestRunnerTests; import org.jboss.test.unit.runner.ParametrizationTests; import org.jboss.test.unit.runner.TestDriverRunnerTests; +import org.jboss.test.unit.runner.GenericTestRunnerTests; import org.jboss.test.unit.runner.event.TestRunnerEventBroadcasterSupportT= ests; import org.jboss.test.unit.runner.event.TestRunnerLifeCycleFilterTests; import org.jboss.test.unit.runner.model.ModelTests; @@ -48,6 +49,7 @@ JUnitPOJOTests.main(args); CompositeTestRunnerTests.main(args); TestDriverRunnerTests.main(args); + GenericTestRunnerTests.main(args); = // TestRunnerLifeCycleFilterTests.main(args); Modified: modules/test/trunk/unit/src/main/org/jboss/unit/report/impl/conso= le/PrintListener.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/report/impl/console/Pri= ntListener.java 2007-10-10 22:19:45 UTC (rev 8594) +++ modules/test/trunk/unit/src/main/org/jboss/unit/report/impl/console/Pri= ntListener.java 2007-10-10 22:23:30 UTC (rev 8595) @@ -57,7 +57,7 @@ RunnerFailureEvent failureEvent =3D (RunnerFailureEvent)event; Failure failure =3D failureEvent.getFailure(); = System.out.println("Runner failure: " + failure.getType() + " " += failure.getMessage()); - failure.getCause().printStackTrace(); + failure.getCause().printStackTrace(System.out); } else if (event instanceof StartTestEvent) { @@ -80,7 +80,7 @@ System.out.println("Test id=3D" + testId + " " + failure.getTy= pe() + " failed " + failure.getMessage() + " (" + testResult.getDurationMil= lis() + "ms)"); if (failure.getCause() !=3D null) { - failure.getCause().printStackTrace(); + failure.getCause().printStackTrace(System.out); } } } --===============1312559065643482676==-- From portal-commits at lists.jboss.org Wed Oct 10 18:51:01 2007 Content-Type: multipart/mixed; boundary="===============0554993443507966650==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8596 - in modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl: generic and 1 other directory. Date: Wed, 10 Oct 2007 18:50:59 -0400 Message-ID: --===============0554993443507966650== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: julien(a)jboss.com Date: 2007-10-10 18:50:59 -0400 (Wed, 10 Oct 2007) New Revision: 8596 Added: modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/generic/ modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/generic/Gene= ricTestRunner.java Log: - minor javadoc Added: modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/generic/= GenericTestRunner.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/generic/Gen= ericTestRunner.java (rev 0) +++ modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/generic/Gen= ericTestRunner.java 2007-10-10 22:50:59 UTC (rev 8596) @@ -0,0 +1,95 @@ +/*************************************************************************= ***** + * JBoss, a division of Red Hat = * + * Copyright 2006, Red Hat Middleware, LLC, and individual = * + * contributors as indicated by the @authors tag. See the = * + * copyright.txt in the distribution for a full listing of = * + * individual contributors. = * + * = * + * This is free software; you can redistribute it and/or modify it = * + * under the terms of the GNU Lesser General Public License as = * + * published by the Free Software Foundation; either version 2.1 of = * + * the License, or (at your option) any later version. = * + * = * + * This software is distributed in the hope that it will be useful, = * + * but WITHOUT ANY WARRANTY; without even the implied warranty of = * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU = * + * Lesser General Public License for more details. = * + * = * + * You should have received a copy of the GNU Lesser General Public = * + * License along with this software; if not, write to the Free = * + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA = * + * 02110-1301 USA, or see the FSF site: http://www.fsf.org. = * + *************************************************************************= *****/ +package org.jboss.unit.runner.impl.generic; + +import org.jboss.unit.runner.AbstractTestRunner; +import org.jboss.unit.runner.TestFilter; +import org.jboss.unit.runner.ParametrizationSet; +import org.jboss.unit.runner.event.TestRunnerLifeCycleFilter; +import org.jboss.unit.runner.event.RunnerFailureEvent; +import org.jboss.unit.runner.impl.driver.TestDriverRunner; +import org.jboss.unit.runner.model.generic.GenericTestSuiteDef; +import org.jboss.unit.runner.model.generic.TestDef; +import org.jboss.unit.driver.TestDriver; +import org.jboss.unit.TestId; +import org.jboss.unit.Failure; + +import java.util.Collection; +import java.util.Collections; + +/** + * @author Julien Viet + * @version $Revision: 1.1 $ + */ +public class GenericTestRunner extends AbstractTestRunner +{ + + /** . */ + private final GenericTestSuiteDef def; + + /** . */ + private final TestRunnerLifeCycleFilter lifeCycleFilter; + + public GenericTestRunner(GenericTestSuiteDef def) + { + this.def =3D def; + this.lifeCycleFilter =3D new TestRunnerLifeCycleFilter(broadcaster); + } + + protected void internalRun(TestFilter filter) + { + String className =3D def.getClassName(); + + // + try + { + Class clazz =3D (Class)Thread.currentThre= ad().getContextClassLoader().loadClass(className); + TestDriver driver =3D clazz.newInstance(); + + // + Collection testDefs =3D def.getTests(); + + // If nothing is provided we execute the whole suite + if (testDefs.isEmpty()) + { + testDefs =3D Collections.singleton(new TestDef(new TestId(""))= ); + } + + for (TestDef testDef : testDefs) + { + // Create parametrization + ParametrizationSet parametrizations =3D def.getParameters().ge= tParametrization(); + parametrizations.merge(testDef.getParameters().getParametrizat= ion()); + + // + TestDriverRunner runner =3D new TestDriverRunner(driver, param= etrizations, testDef.getRefId()); + runner.addListener(lifeCycleFilter); + runner.run(filter); + } + } + catch (Exception e) + { + fireEvent(new RunnerFailureEvent(Failure.createErrorFailure("Cann= ot execute test class " + className,e))); + } + } +} --===============0554993443507966650==-- From portal-commits at lists.jboss.org Thu Oct 11 01:44:45 2007 Content-Type: multipart/mixed; boundary="===============0105434393373732971==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8597 - in docs: branches/JBoss_Portal_Branch_2_6/userGuide/en/modules and 2 other directories. Date: Thu, 11 Oct 2007 01:44:45 -0400 Message-ID: --===============0105434393373732971== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: chris.laprun(a)jboss.com Date: 2007-10-11 01:44:45 -0400 (Thu, 11 Oct 2007) New Revision: 8597 Added: docs/branches/JBoss_Portal_Branch_2_6/userGuide/en/images/management/por= tlet_details.png docs/trunk/userGuide/en/images/management/portlet_details.png Modified: docs/branches/JBoss_Portal_Branch_2_6/userGuide/en/modules/dynamicity.xml docs/trunk/userGuide/en/modules/dynamicity.xml Log: - Content update (text was not in synch with usability updates). - Added portlet details screenshot. - Fixed typos and grammar. Added: docs/branches/JBoss_Portal_Branch_2_6/userGuide/en/images/management= /portlet_details.png =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D (Binary files differ) Property changes on: docs/branches/JBoss_Portal_Branch_2_6/userGuide/en/ima= ges/management/portlet_details.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Modified: docs/branches/JBoss_Portal_Branch_2_6/userGuide/en/modules/dynami= city.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- docs/branches/JBoss_Portal_Branch_2_6/userGuide/en/modules/dynamicity.x= ml 2007-10-10 22:50:59 UTC (rev 8596) +++ docs/branches/JBoss_Portal_Branch_2_6/userGuide/en/modules/dynamicity.x= ml 2007-10-11 05:44:45 UTC (rev 8597) @@ -11,10 +11,10 @@ Introduction Viewing the Management Portlet is accomplished by logging in a= s an admin (admin/admin) and navigating to the - . + Admin portal (see ). - The concept of dynamicity is that all portal objects are able to = dynamically be modified at runtime, + The concept of dynamicity refers to the fact all portal objects c= an be dynamically modified at runtime, eliminating the need to struggle with large xml files, or restart= ing the application server for changes to take effect. In the scope of dynamicity, Portal objects are defined an= d can be altered as follows: @@ -31,7 +31,7 @@ portlet, allowing for dynamic customization of any of the a= bove components. - Modified: modules/test/trunk/unit/src/main/org/jboss/test/unit/blah/BlahTes= tTwo.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/test/unit/blah/BlahTestTwo.j= ava 2007-10-11 09:56:02 UTC (rev 8600) +++ modules/test/trunk/unit/src/main/org/jboss/test/unit/blah/BlahTestTwo.j= ava 2007-10-11 13:38:02 UTC (rev 8601) @@ -24,8 +24,8 @@ = import java.io.InputStream; = -import org.jboss.unit.report.impl.console.PrintListener; import org.jboss.unit.report.impl.junit.JUnitReporter; +import org.jboss.unit.report.impl.writer.PrintListener; import org.jboss.unit.runner.TestRunner; import org.jboss.unit.runner.TestRunnerEventListener; import org.jboss.unit.runner.model.ModelBuilder; Modified: modules/test/trunk/unit/src/main/org/jboss/test/unit/blah/BlahTes= ts.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/test/unit/blah/BlahTests.jav= a 2007-10-11 09:56:02 UTC (rev 8600) +++ modules/test/trunk/unit/src/main/org/jboss/test/unit/blah/BlahTests.jav= a 2007-10-11 13:38:02 UTC (rev 8601) @@ -22,7 +22,7 @@ *************************************************************************= *****/ package org.jboss.test.unit.blah; = -import org.jboss.unit.report.impl.console.PrintListener; +import org.jboss.unit.report.impl.writer.PrintListener; import org.jboss.unit.runner.TestRunner; import org.jboss.unit.runner.model.ModelBuilder; import org.jboss.unit.runner.model.TestSuiteDef; Added: modules/test/trunk/unit/src/main/org/jboss/unit/report/impl/writer/P= rintListener.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/report/impl/writer/Prin= tListener.java (rev 0) +++ modules/test/trunk/unit/src/main/org/jboss/unit/report/impl/writer/Prin= tListener.java 2007-10-11 13:38:02 UTC (rev 8601) @@ -0,0 +1,142 @@ +/*************************************************************************= ***** + * JBoss, a division of Red Hat = * + * Copyright 2006, Red Hat Middleware, LLC, and individual = * + * contributors as indicated by the @authors tag. See the = * + * copyright.txt in the distribution for a full listing of = * + * individual contributors. = * + * = * + * This is free software; you can redistribute it and/or modify it = * + * under the terms of the GNU Lesser General Public License as = * + * published by the Free Software Foundation; either version 2.1 of = * + * the License, or (at your option) any later version. = * + * = * + * This software is distributed in the hope that it will be useful, = * + * but WITHOUT ANY WARRANTY; without even the implied warranty of = * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU = * + * Lesser General Public License for more details. = * + * = * + * You should have received a copy of the GNU Lesser General Public = * + * License along with this software; if not, write to the Free = * + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA = * + * 02110-1301 USA, or see the FSF site: http://www.fsf.org. = * + *************************************************************************= *****/ +package org.jboss.unit.report.impl.writer; + +import org.jboss.unit.Failure; +import org.jboss.unit.TestId; +import org.jboss.unit.runner.TestResult; +import org.jboss.unit.runner.TestRunnerEvent; +import org.jboss.unit.runner.TestRunnerEventListener; +import org.jboss.unit.runner.event.EndRunnerEvent; +import org.jboss.unit.runner.event.EndTestEvent; +import org.jboss.unit.runner.event.RunnerFailureEvent; +import org.jboss.unit.runner.event.StartRunnerEvent; +import org.jboss.unit.runner.event.StartTestEvent; +import org.jboss.unit.runner.results.TestFailure; +import org.jboss.unit.runner.results.TestSuccess; + +import java.io.PrintStream; +import java.io.Writer; +import java.io.PrintWriter; +import java.io.OutputStream; + +/** + * A listener which output messages on a specified stream. + * + * @author Julien Viet + * @version $Revision: 1.1 $ + */ +public class PrintListener implements TestRunnerEventListener +{ + + /** . */ + private final PrintWriter out; + + /** + * Builds with the System.out print stream. + */ + public PrintListener() + { + this(System.out); + } + + /** + * Use a writer, if the writer is an instance of PrintWriter then this object + * will be reused as is. + * + * @param writer the writer = + */ + public PrintListener(Writer writer) throws IllegalArgumentException + { + if (writer =3D=3D null) + { + throw new IllegalArgumentException(); + } + if (writer instanceof PrintWriter) + { + this.out =3D (PrintWriter)writer; + } + else + { + this.out =3D new PrintWriter(writer, true); + } + } + + /** + * Uses a provided output stream. + * + * @param stream the stream + */ + public PrintListener(OutputStream stream) throws IllegalArgumentExcepti= on + { + if (stream =3D=3D null) + { + throw new IllegalArgumentException(); + } + this.out =3D new PrintWriter(stream, true); + } + + public void onEvent(TestRunnerEvent event) + { + if (event instanceof StartRunnerEvent) + { + out.println("--- Start ---"); + } + else if (event instanceof EndRunnerEvent) + { + out.println("--- End ---"); + } + else if (event instanceof RunnerFailureEvent) + { + RunnerFailureEvent failureEvent =3D (RunnerFailureEvent)event; + Failure failure =3D failureEvent.getFailure(); = + out.println("Runner failure: " + failure.getType() + " " + failur= e.getMessage()); + failure.getCause().printStackTrace(out); + } + else if (event instanceof StartTestEvent) + { + StartTestEvent startTestEvent =3D (StartTestEvent)event; + out.println("Starting id=3D" + startTestEvent.getTestId() + " nam= e=3D" + startTestEvent.getTestInfo().getName() + " description=3D" + startT= estEvent.getTestInfo().getDescription()); + } + else if (event instanceof EndTestEvent) + { + EndTestEvent endTestEvent =3D (EndTestEvent)event; + TestId testId =3D endTestEvent.getTestId(); + TestResult testResult =3D endTestEvent.getTestResult(); + if (testResult instanceof TestSuccess) + { + out.println("Test id=3D" + testId + " is successful (" + testR= esult.getDurationMillis() + "ms)"); + } + else if (testResult instanceof TestFailure) + { + TestFailure testFailure =3D (TestFailure)testResult; + Failure failure =3D testFailure.getFailure(); + out.println("Test id=3D" + testId + " " + failure.getType() + = " failed " + failure.getMessage() + " (" + testResult.getDurationMillis() += "ms)"); + if (failure.getCause() !=3D null) + { + failure.getCause().printStackTrace(out); + } + } + } + } +} Modified: modules/test/trunk/unit/src/main/org/jboss/unit/tooling/report/De= legatingReporter.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/tooling/report/Delegati= ngReporter.java 2007-10-11 09:56:02 UTC (rev 8600) +++ modules/test/trunk/unit/src/main/org/jboss/unit/tooling/report/Delegati= ngReporter.java 2007-10-11 13:38:02 UTC (rev 8601) @@ -24,7 +24,7 @@ = import org.jboss.unit.runner.TestRunnerEventListener; import org.jboss.unit.runner.TestRunnerEvent; -import org.jboss.unit.report.impl.console.PrintListener; +import org.jboss.unit.report.impl.writer.PrintListener; = /** * @author Boleslaw Dawidowicz --===============3076417145027884417==-- From portal-commits at lists.jboss.org Thu Oct 11 11:00:57 2007 Content-Type: multipart/mixed; boundary="===============2547700106079965330==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8602 - in modules/test/trunk/unit: src/main/org/jboss/test/unit/runner and 1 other directories. Date: Thu, 11 Oct 2007 11:00:56 -0400 Message-ID: --===============2547700106079965330== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: julien(a)jboss.com Date: 2007-10-11 11:00:56 -0400 (Thu, 11 Oct 2007) New Revision: 8602 Modified: modules/test/trunk/unit/build.xml modules/test/trunk/unit/src/main/org/jboss/test/unit/runner/GenericTestR= unnerTests.java modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/generic/Gene= ricTestRunner.java Log: basic tests for generic test driver Modified: modules/test/trunk/unit/build.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/build.xml 2007-10-11 13:38:02 UTC (rev 8601) +++ modules/test/trunk/unit/build.xml 2007-10-11 15:00:56 UTC (rev 8602) @@ -186,9 +186,9 @@ = + Modified: modules/test/trunk/unit/src/main/org/jboss/test/unit/runner/Gener= icTestRunnerTests.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/test/unit/runner/GenericTest= RunnerTests.java 2007-10-11 13:38:02 UTC (rev 8601) +++ modules/test/trunk/unit/src/main/org/jboss/test/unit/runner/GenericTest= RunnerTests.java 2007-10-11 15:00:56 UTC (rev 8602) @@ -24,14 +24,25 @@ = import org.jboss.unit.runner.impl.generic.GenericTestRunner; import org.jboss.unit.runner.model.generic.GenericTestSuiteDef; +import org.jboss.unit.runner.model.generic.TestDef; import org.jboss.unit.driver.TestDriver; import org.jboss.unit.driver.DriverResponse; import org.jboss.unit.driver.DriverCommand; +import org.jboss.unit.driver.command.StartTestCommand; import org.jboss.unit.driver.response.EndTestResponse; import org.jboss.unit.info.TestInfo; import org.jboss.unit.info.impl.SimpleTestSuiteInfo; +import org.jboss.unit.info.impl.SimpleTestCaseInfo; import org.jboss.unit.TestId; = +import static org.jboss.unit.api.Assert.*; +import static org.jboss.unit.util.CollectionTools.*; + +import java.util.HashMap; +import java.util.List; +import java.util.ArrayList; +import java.util.Map; + /** * @author Julien Viet * @version $Revision: 1.1 $ @@ -41,27 +52,87 @@ = public static void main(String[] args) { + test1(); + test2(); + test3(); + test4(); + } = + private static void test1() + { + Driver1.init(); + GenericTestSuiteDef suite =3D new GenericTestSuiteDef(Driver1.class.= getName()); + GenericTestRunner runner =3D new GenericTestRunner(suite); + runner.run(); + assertEquals(list(), Driver1.ids); + assertEquals(list(), Driver1.parametrizations); + } = - GenericTestSuiteDef suite =3D new GenericTestSuiteDef(Blah.class.get= Name()); -// suite.addTest(); + private static void test2() + { + Driver1.init(); + Driver1.testSuiteInfo.addTest(new SimpleTestCaseInfo("foo")); + GenericTestSuiteDef suite =3D new GenericTestSuiteDef(Driver1.class.= getName()); + suite.addTest(new TestDef(new TestId("foo"))); + GenericTestRunner runner =3D new GenericTestRunner(suite); + runner.run(); + assertEquals(list(new TestId("foo")), Driver1.ids); + assertEquals(list(new HashMap()), Driver1.parametrizations); + } = + private static void test3() + { + Driver1.init(); + Driver1.testSuiteInfo.addTest(new SimpleTestCaseInfo("foo")); + Driver1.testSuiteInfo.addTest(new SimpleTestCaseInfo("bar")); + GenericTestSuiteDef suite =3D new GenericTestSuiteDef(Driver1.class.= getName()); + suite.addTest(new TestDef(new TestId("foo"))); GenericTestRunner runner =3D new GenericTestRunner(suite); runner.run(); + assertEquals(list(new TestId("foo")), Driver1.ids); + assertEquals(list(new HashMap()), Driver1.parametrizations); + } = + private static void test4() + { + Driver1.init(); + Driver1.testSuiteInfo.addTest(new SimpleTestCaseInfo("foo")); + Driver1.testSuiteInfo.addTest(new SimpleTestCaseInfo("bar")); + GenericTestSuiteDef suite =3D new GenericTestSuiteDef(Driver1.class.= getName()); + GenericTestRunner runner =3D new GenericTestRunner(suite); + runner.run(); + assertEquals(list(new TestId("foo"), new TestId("bar")), Driver1.ids= ); + assertEquals(list(new HashMap(), new HashMap()), Driver1.parametriza= tions); } = - - public static class Blah implements TestDriver + public static class Driver1 implements TestDriver { = + static SimpleTestSuiteInfo testSuiteInfo; + static List ids; + static List> parametrizations; + + static void init() + { + testSuiteInfo =3D new SimpleTestSuiteInfo("foo"); + ids =3D new ArrayList(); + parametrizations =3D new ArrayList>(); + } + public TestInfo getInfo() { - return new SimpleTestSuiteInfo("blah"); + return testSuiteInfo; } = public DriverResponse invoke(TestId id, DriverCommand command) { + if (command instanceof StartTestCommand) + { + ids.add(id); + parametrizations.add(((StartTestCommand)command).getParametriz= ation()); + } + + // return new EndTestResponse(); } } Modified: modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/gener= ic/GenericTestRunner.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/generic/Gen= ericTestRunner.java 2007-10-11 13:38:02 UTC (rev 8601) +++ modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/generic/Gen= ericTestRunner.java 2007-10-11 15:00:56 UTC (rev 8602) @@ -72,7 +72,7 @@ // If nothing is provided we execute the whole suite if (testDefs.isEmpty()) { - testDefs =3D Collections.singleton(new TestDef(new TestId(""))= ); + testDefs =3D Collections.singleton(new TestDef(new TestId())); } = for (TestDef testDef : testDefs) --===============2547700106079965330==-- From portal-commits at lists.jboss.org Thu Oct 11 11:12:14 2007 Content-Type: multipart/mixed; boundary="===============4968457030558084147==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8603 - modules/test/trunk/mc/src/main/org/jboss/unit/mc. Date: Thu, 11 Oct 2007 11:12:14 -0400 Message-ID: --===============4968457030558084147== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: julien(a)jboss.com Date: 2007-10-11 11:12:14 -0400 (Thu, 11 Oct 2007) New Revision: 8603 Modified: modules/test/trunk/mc/src/main/org/jboss/unit/mc/MCTestLifeCycle.java Log: remove some system.out.println Modified: modules/test/trunk/mc/src/main/org/jboss/unit/mc/MCTestLifeCycle.= java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/mc/src/main/org/jboss/unit/mc/MCTestLifeCycle.java 2= 007-10-11 15:00:56 UTC (rev 8602) +++ modules/test/trunk/mc/src/main/org/jboss/unit/mc/MCTestLifeCycle.java 2= 007-10-11 15:12:14 UTC (rev 8603) @@ -85,10 +85,6 @@ throw new TestCaseLifeCycleException("No URL found for bean xml "= + blah.id()); } = - System.out.println("url =3D " + url); - System.out.println("url =3D " + url); - System.out.println("url =3D " + url); - // setup MC run(); = --===============4968457030558084147==-- From portal-commits at lists.jboss.org Thu Oct 11 11:24:17 2007 Content-Type: multipart/mixed; boundary="===============8569524148685374159==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8604 - modules/test/trunk/unit/src/main/org/jboss/unit/spi/pojo. Date: Thu, 11 Oct 2007 11:24:17 -0400 Message-ID: --===============8569524148685374159== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: julien(a)jboss.com Date: 2007-10-11 11:24:17 -0400 (Thu, 11 Oct 2007) New Revision: 8604 Modified: modules/test/trunk/unit/src/main/org/jboss/unit/spi/pojo/TestLifeCycle.j= ava Log: add javadoc to TestLifeCycle Modified: modules/test/trunk/unit/src/main/org/jboss/unit/spi/pojo/TestLife= Cycle.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/spi/pojo/TestLifeCycle.= java 2007-10-11 15:12:14 UTC (rev 8603) +++ modules/test/trunk/unit/src/main/org/jboss/unit/spi/pojo/TestLifeCycle.= java 2007-10-11 15:24:17 UTC (rev 8604) @@ -25,6 +25,15 @@ import java.util.Map; = /** + * Breaks down the Start/End protocol of a TestDriver into a = protocol adapted to POJOs which have several phases: + *
    + *
  • instantiation : instantiate the test case
  • + *
  • parametrization : parametrize the test case with the start comma= nd parametrization
  • + *
  • create : call a create life cycle
  • + *
  • invoke : executes the test
  • + *
  • destroy : call a destroy life cycle, it is guaranteed to be alwa= ys called
  • + *
+ * * @author Julien Viet * @version $Revision: 1.1 $ */ --===============8569524148685374159==-- From portal-commits at lists.jboss.org Thu Oct 11 11:40:01 2007 Content-Type: multipart/mixed; boundary="===============9054742903097246073==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8605 - in modules/test/trunk/mc/src/main/org/jboss: unit/mc and 1 other directories. Date: Thu, 11 Oct 2007 11:40:00 -0400 Message-ID: --===============9054742903097246073== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: julien(a)jboss.com Date: 2007-10-11 11:40:00 -0400 (Thu, 11 Oct 2007) New Revision: 8605 Modified: modules/test/trunk/mc/src/main/org/jboss/test/unit/mc/SomeTest.java modules/test/trunk/mc/src/main/org/jboss/unit/mc/MCTestLifeCycle.java modules/test/trunk/mc/src/main/org/jboss/unit/mc/api/annotations/Bootstr= ap.java Log: added support on the @Bootstrap annotation to specify the name under which = the annotated bean will be available in the kernel Modified: modules/test/trunk/mc/src/main/org/jboss/test/unit/mc/SomeTest.ja= va =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/mc/src/main/org/jboss/test/unit/mc/SomeTest.java 200= 7-10-11 15:24:17 UTC (rev 8604) +++ modules/test/trunk/mc/src/main/org/jboss/test/unit/mc/SomeTest.java 200= 7-10-11 15:40:00 UTC (rev 8605) @@ -30,7 +30,7 @@ * @author Julien Viet * @version $Revision: 1.1 $ */ -(a)Bootstrap(id=3D"/blah/toto.xml") +(a)Bootstrap(resourceName =3D"/blah/toto.xml") public class SomeTest { = Modified: modules/test/trunk/mc/src/main/org/jboss/unit/mc/MCTestLifeCycle.= java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/mc/src/main/org/jboss/unit/mc/MCTestLifeCycle.java 2= 007-10-11 15:24:17 UTC (rev 8604) +++ modules/test/trunk/mc/src/main/org/jboss/unit/mc/MCTestLifeCycle.java 2= 007-10-11 15:40:00 UTC (rev 8605) @@ -73,16 +73,16 @@ Class testClass =3D testCase.getPOJO().getClass(); = // - Bootstrap blah =3D testClass.getAnnotation(Bootstrap.class); - if (blah =3D=3D null) + Bootstrap bootstrapAnnotation =3D testClass.getAnnotation(Bootstrap.= class); + if (bootstrapAnnotation =3D=3D null) { throw new TestCaseLifeCycleException("No Bootstrap annotation fou= nd"); } = - URL url =3D testClass.getResource(blah.id()); + URL url =3D testClass.getResource(bootstrapAnnotation.resourceName()= ); if (url =3D=3D null) { - throw new TestCaseLifeCycleException("No URL found for bean xml "= + blah.id()); + throw new TestCaseLifeCycleException("No URL found for bean xml "= + bootstrapAnnotation.resourceName()); } = // setup MC @@ -90,7 +90,10 @@ = try { - AbstractBeanMetaData bmd =3D new AbstractBeanMetaData("TestCase",= testClass.getName()); + String beanName =3D bootstrapAnnotation.beanName(); + + // + AbstractBeanMetaData bmd =3D new AbstractBeanMetaData(beanName, t= estClass.getName()); AbstractConstructorMetaData cmd =3D new AbstractConstructorMetaDa= ta(); bmd.setConstructor(cmd); TestCaseFactory factory =3D new TestCaseFactory(testCase.getPOJO(= )); Modified: modules/test/trunk/mc/src/main/org/jboss/unit/mc/api/annotations/= Bootstrap.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/mc/src/main/org/jboss/unit/mc/api/annotations/Bootst= rap.java 2007-10-11 15:24:17 UTC (rev 8604) +++ modules/test/trunk/mc/src/main/org/jboss/unit/mc/api/annotations/Bootst= rap.java 2007-10-11 15:40:00 UTC (rev 8605) @@ -31,7 +31,7 @@ import java.lang.annotation.ElementType; = /** - * Annotate + * Annotate a bean that will trigger the bootstrap of a micro container ke= rnel. * * @author Julien Viet * @version $Revision: 1.1 $ @@ -41,5 +41,17 @@ @Provider(MCTestProvider.class) public @interface Bootstrap { - String id(); + /** + * Returns the resource name by which the bean definition file can be l= oaded. + * + * @return the resource name + */ + String resourceName(); + + /** + * Returns the name under which the annotated bean will be available in= the kernel. The default value is TestCase. + * + * @return the bean name + */ + String beanName() default "TestCase"; } --===============9054742903097246073==-- From portal-commits at lists.jboss.org Thu Oct 11 19:15:22 2007 Content-Type: multipart/mixed; boundary="===============1286591904255143854==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8606 - in branches/JBoss_Portal_Branch_2_6: core-wsrp/src/resources/portal-wsrp-admin-war/WEB-INF and 4 other directories. Date: Thu, 11 Oct 2007 19:15:21 -0400 Message-ID: --===============1286591904255143854== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: chris.laprun(a)jboss.com Date: 2007-10-11 19:15:21 -0400 (Thu, 11 Oct 2007) New Revision: 8606 Added: branches/JBoss_Portal_Branch_2_6/core-wsrp/src/main/org/jboss/portal/wsr= p/admin/ui/QNameConverter.java branches/JBoss_Portal_Branch_2_6/wsrp/src/resources/portal-wsrp-sar/conf= /hibernate/ branches/JBoss_Portal_Branch_2_6/wsrp/src/resources/portal-wsrp-sar/conf= /hibernate/consumer/ Removed: branches/JBoss_Portal_Branch_2_6/wsrp/src/resources/portal-wsrp-sar/conf= /hibernate/domain.hbm.xml branches/JBoss_Portal_Branch_2_6/wsrp/src/resources/portal-wsrp-sar/conf= /hibernate/ehcache.xml branches/JBoss_Portal_Branch_2_6/wsrp/src/resources/portal-wsrp-sar/conf= /hibernate/hibernate.cfg.xml Modified: branches/JBoss_Portal_Branch_2_6/core-wsrp/src/main/org/jboss/portal/wsr= p/admin/ui/ProducerBean.java branches/JBoss_Portal_Branch_2_6/core-wsrp/src/resources/portal-wsrp-adm= in-war/WEB-INF/faces-config.xml branches/JBoss_Portal_Branch_2_6/core-wsrp/src/resources/portal-wsrp-adm= in-war/WEB-INF/jsf/producer.xhtml branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/wsrp/pro= ducer/config/impl/ProducerConfigurationServiceImpl.java Log: - JBPORTAL-1715: Added support for adding registration properties (does not= work properly but committing for synchronization purpose: QNameConverter w= ill probably be removed to avoid CCE with XB). Modified: branches/JBoss_Portal_Branch_2_6/core-wsrp/src/main/org/jboss/por= tal/wsrp/admin/ui/ProducerBean.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/core-wsrp/src/main/org/jboss/portal/ws= rp/admin/ui/ProducerBean.java 2007-10-11 15:40:00 UTC (rev 8605) +++ branches/JBoss_Portal_Branch_2_6/core-wsrp/src/main/org/jboss/portal/ws= rp/admin/ui/ProducerBean.java 2007-10-11 23:15:21 UTC (rev 8606) @@ -25,6 +25,7 @@ = import org.jboss.portal.registration.RegistrationPolicy; import org.jboss.portal.registration.policies.DefaultRegistrationPolicy; +import org.jboss.portal.wsrp.WSRPConstants; import org.jboss.portal.wsrp.producer.config.ProducerConfiguration; import org.jboss.portal.wsrp.producer.config.ProducerConfigurationService; import org.jboss.portal.wsrp.producer.config.ProducerRegistrationRequireme= nts; @@ -47,6 +48,9 @@ private ProducerConfigurationService configurationService; private String policyClassName; private String validatorClassName; + private static final String PROPERTY =3D "property"; + private static int counter =3D 0; + private static final String PRODUCER =3D "producer"; = public ProducerConfigurationService getConfigurationService() { @@ -157,6 +161,12 @@ log.debug(e); beanContext.createErrorMessage("status", "Couldn't save producer = configuration. Cause: " + e.getLocalizedMessage()); } - return null; + return PRODUCER; } + + public String addRegistrationProperty() + { + getRegRequirements().addRegistrationProperty(new RegistrationPropert= yDescription(PROPERTY + counter++, WSRPConstants.XSD_STRING)); + return PRODUCER; + } } Added: branches/JBoss_Portal_Branch_2_6/core-wsrp/src/main/org/jboss/portal= /wsrp/admin/ui/QNameConverter.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/core-wsrp/src/main/org/jboss/portal/ws= rp/admin/ui/QNameConverter.java (rev 0) +++ branches/JBoss_Portal_Branch_2_6/core-wsrp/src/main/org/jboss/portal/ws= rp/admin/ui/QNameConverter.java 2007-10-11 23:15:21 UTC (rev 8606) @@ -0,0 +1,47 @@ +/*************************************************************************= ***** + * JBoss, a division of Red Hat = * + * Copyright 2007, Red Hat Middleware, LLC, and individual = * + * contributors as indicated by the @authors tag. See the = * + * copyright.txt in the distribution for a full listing of = * + * individual contributors. = * + * = * + * This is free software; you can redistribute it and/or modify it = * + * under the terms of the GNU Lesser General Public License as = * + * published by the Free Software Foundation; either version 2.1 of = * + * the License, or (at your option) any later version. = * + * = * + * This software is distributed in the hope that it will be useful, = * + * but WITHOUT ANY WARRANTY; without even the implied warranty of = * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU = * + * Lesser General Public License for more details. = * + * = * + * You should have received a copy of the GNU Lesser General Public = * + * License along with this software; if not, write to the Free = * + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA = * + * 02110-1301 USA, or see the FSF site: http://www.fsf.org. = * + *************************************************************************= *****/ + +package org.jboss.portal.wsrp.admin.ui; + +import javax.faces.component.UIComponent; +import javax.faces.context.FacesContext; +import javax.faces.convert.Converter; +import javax.xml.namespace.QName; + +/** + * @author Chris Laprun + * @version $Revision$ + * @since 2.6.3 + */ +public class QNameConverter implements Converter +{ + public Object getAsObject(FacesContext facesContext, UIComponent uiComp= onent, String s) + { + return s =3D=3D null ? null : QName.valueOf(s); + } + + public String getAsString(FacesContext facesContext, UIComponent uiComp= onent, Object o) + { + return o =3D=3D null ? null : o.toString(); + } +} Property changes on: branches/JBoss_Portal_Branch_2_6/core-wsrp/src/main/or= g/jboss/portal/wsrp/admin/ui/QNameConverter.java ___________________________________________________________________ Name: svn:keywords + Author Date Id Revision Name: svn:eol-style + native Modified: branches/JBoss_Portal_Branch_2_6/core-wsrp/src/resources/portal-w= srp-admin-war/WEB-INF/faces-config.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/core-wsrp/src/resources/portal-wsrp-ad= min-war/WEB-INF/faces-config.xml 2007-10-11 15:40:00 UTC (rev 8605) +++ branches/JBoss_Portal_Branch_2_6/core-wsrp/src/resources/portal-wsrp-ad= min-war/WEB-INF/faces-config.xml 2007-10-11 23:15:21 UTC (rev 8606) @@ -36,6 +36,10 @@ org.jboss.portal.wsrp.registration.LocalizedStr= ing org.jboss.portal.wsrp.admin.ui.LocalizedStringConve= rter + + javax.xml.namespace.QName + org.jboss.portal.wsrp.admin.ui.QNameConverter + = beanContext @@ -83,7 +87,7 @@ producer org.jboss.portal.wsrp.admin.ui.ProducerBean - session + request configurationService org.jboss.portal.wsrp.producer.config.ProducerCon= figurationService Modified: branches/JBoss_Portal_Branch_2_6/core-wsrp/src/resources/portal-w= srp-admin-war/WEB-INF/jsf/producer.xhtml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/core-wsrp/src/resources/portal-wsrp-ad= min-war/WEB-INF/jsf/producer.xhtml 2007-10-11 15:40:00 UTC (rev 8605) +++ branches/JBoss_Portal_Branch_2_6/core-wsrp/src/resources/portal-wsrp-ad= min-war/WEB-INF/jsf/producer.xhtml 2007-10-11 23:15:21 UTC (rev 8606) @@ -56,7 +56,7 @@ headerClass=3D"portlet-section-hea= der"> Name - + Type @@ -66,25 +66,25 @@ Label - + Hint - + - + = - + = Modified: branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/w= srp/producer/config/impl/ProducerConfigurationServiceImpl.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/wsrp/pr= oducer/config/impl/ProducerConfigurationServiceImpl.java 2007-10-11 15:40:0= 0 UTC (rev 8605) +++ branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/wsrp/pr= oducer/config/impl/ProducerConfigurationServiceImpl.java 2007-10-11 23:15:2= 1 UTC (rev 8606) @@ -99,6 +99,11 @@ reloadConfiguration(); } = + protected void stopService() throws Exception + { + saveConfiguration(); + } + public void reloadConfiguration() throws Exception { URL configURL =3D getConfigLocationURL(); Copied: branches/JBoss_Portal_Branch_2_6/wsrp/src/resources/portal-wsrp-sar= /conf/hibernate (from rev 8577, branches/JBoss_Portal_Branch_2_6/wsrp/src/r= esources/portal-wsrp-sar/conf/consumer/hibernate) Deleted: branches/JBoss_Portal_Branch_2_6/wsrp/src/resources/portal-wsrp-sa= r/conf/hibernate/domain.hbm.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/wsrp/src/resources/portal-wsrp-sar/con= f/consumer/hibernate/domain.hbm.xml 2007-10-09 18:59:45 UTC (rev 8577) +++ branches/JBoss_Portal_Branch_2_6/wsrp/src/resources/portal-wsrp-sar/con= f/hibernate/domain.hbm.xml 2007-10-11 23:15:21 UTC (rev 8606) @@ -1,145 +0,0 @@ - - - - - - - - - - wsrpconsumer_seq - - - - - - - - - - - - - - wsrpconsumer_seq - - - - - - - - - - - - - - wsrpconsumer_seq - - - - - - - - - - - - - - - - - - wsrpconsumer_seq - - - - - - - - - - - - - portlet_seq - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Deleted: branches/JBoss_Portal_Branch_2_6/wsrp/src/resources/portal-wsrp-sa= r/conf/hibernate/ehcache.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/wsrp/src/resources/portal-wsrp-sar/con= f/consumer/hibernate/ehcache.xml 2007-10-09 18:59:45 UTC (rev 8577) +++ branches/JBoss_Portal_Branch_2_6/wsrp/src/resources/portal-wsrp-sar/con= f/hibernate/ehcache.xml 2007-10-11 23:15:21 UTC (rev 8606) @@ -1,60 +0,0 @@ - - - - - - - - - - \ No newline at end of file Deleted: branches/JBoss_Portal_Branch_2_6/wsrp/src/resources/portal-wsrp-sa= r/conf/hibernate/hibernate.cfg.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/wsrp/src/resources/portal-wsrp-sar/con= f/consumer/hibernate/hibernate.cfg.xml 2007-10-09 18:59:45 UTC (rev 8577) +++ branches/JBoss_Portal_Branch_2_6/wsrp/src/resources/portal-wsrp-sar/con= f/hibernate/hibernate.cfg.xml 2007-10-11 23:15:21 UTC (rev 8606) @@ -1,58 +0,0 @@ - - - - - - java:@portal.datasource.nam= e@ - @portal.sql.show@ - true - true - - - - - - - - - - - - \ No newline at end of file --===============1286591904255143854==-- From portal-commits at lists.jboss.org Thu Oct 11 19:40:07 2007 Content-Type: multipart/mixed; boundary="===============2420130257380969252==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8607 - in branches/JBoss_Portal_Branch_2_6/wsrp/src/resources/portal-wsrp-sar/conf: hibernate/consumer and 1 other directory. Date: Thu, 11 Oct 2007 19:40:06 -0400 Message-ID: --===============2420130257380969252== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: chris.laprun(a)jboss.com Date: 2007-10-11 19:40:06 -0400 (Thu, 11 Oct 2007) New Revision: 8607 Added: branches/JBoss_Portal_Branch_2_6/wsrp/src/resources/portal-wsrp-sar/conf= /hibernate/consumer/domain.hbm.xml branches/JBoss_Portal_Branch_2_6/wsrp/src/resources/portal-wsrp-sar/conf= /hibernate/consumer/ehcache.xml branches/JBoss_Portal_Branch_2_6/wsrp/src/resources/portal-wsrp-sar/conf= /hibernate/consumer/hibernate.cfg.xml Removed: branches/JBoss_Portal_Branch_2_6/wsrp/src/resources/portal-wsrp-sar/conf= /consumer/hibernate/domain.hbm.xml branches/JBoss_Portal_Branch_2_6/wsrp/src/resources/portal-wsrp-sar/conf= /consumer/hibernate/ehcache.xml branches/JBoss_Portal_Branch_2_6/wsrp/src/resources/portal-wsrp-sar/conf= /consumer/hibernate/hibernate.cfg.xml Log: - Moved Hibernate configuration to a location mirroring that of other modul= es. (last commit was incomplete :( ) Deleted: branches/JBoss_Portal_Branch_2_6/wsrp/src/resources/portal-wsrp-sa= r/conf/consumer/hibernate/domain.hbm.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/wsrp/src/resources/portal-wsrp-sar/con= f/consumer/hibernate/domain.hbm.xml 2007-10-11 23:15:21 UTC (rev 8606) +++ branches/JBoss_Portal_Branch_2_6/wsrp/src/resources/portal-wsrp-sar/con= f/consumer/hibernate/domain.hbm.xml 2007-10-11 23:40:06 UTC (rev 8607) @@ -1,145 +0,0 @@ - - - - - - - - - - wsrpconsumer_seq - - - - - - - - - - - - - - wsrpconsumer_seq - - - - - - - - - - - - - - wsrpconsumer_seq - - - - - - - - - - - - - - - - - - wsrpconsumer_seq - - - - - - - - - - - - - portlet_seq - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Deleted: branches/JBoss_Portal_Branch_2_6/wsrp/src/resources/portal-wsrp-sa= r/conf/consumer/hibernate/ehcache.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/wsrp/src/resources/portal-wsrp-sar/con= f/consumer/hibernate/ehcache.xml 2007-10-11 23:15:21 UTC (rev 8606) +++ branches/JBoss_Portal_Branch_2_6/wsrp/src/resources/portal-wsrp-sar/con= f/consumer/hibernate/ehcache.xml 2007-10-11 23:40:06 UTC (rev 8607) @@ -1,60 +0,0 @@ - - - - - - - - - - \ No newline at end of file Deleted: branches/JBoss_Portal_Branch_2_6/wsrp/src/resources/portal-wsrp-sa= r/conf/consumer/hibernate/hibernate.cfg.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/wsrp/src/resources/portal-wsrp-sar/con= f/consumer/hibernate/hibernate.cfg.xml 2007-10-11 23:15:21 UTC (rev 8606) +++ branches/JBoss_Portal_Branch_2_6/wsrp/src/resources/portal-wsrp-sar/con= f/consumer/hibernate/hibernate.cfg.xml 2007-10-11 23:40:06 UTC (rev 8607) @@ -1,58 +0,0 @@ - - - - - - java:@portal.datasource.nam= e@ - @portal.sql.show@ - true - true - - - - - - - - - - - - \ No newline at end of file Copied: branches/JBoss_Portal_Branch_2_6/wsrp/src/resources/portal-wsrp-sar= /conf/hibernate/consumer/domain.hbm.xml (from rev 8606, branches/JBoss_Port= al_Branch_2_6/wsrp/src/resources/portal-wsrp-sar/conf/consumer/hibernate/do= main.hbm.xml) =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/wsrp/src/resources/portal-wsrp-sar/con= f/hibernate/consumer/domain.hbm.xml (rev 0) +++ branches/JBoss_Portal_Branch_2_6/wsrp/src/resources/portal-wsrp-sar/con= f/hibernate/consumer/domain.hbm.xml 2007-10-11 23:40:06 UTC (rev 8607) @@ -0,0 +1,145 @@ + + + + + + + + + + wsrpconsumer_seq + + + + + + + + + + + + + + wsrpconsumer_seq + + + + + + + + + + + + + + wsrpconsumer_seq + + + + + + + + + + + + + + + + + + wsrpconsumer_seq + + + + + + + + + + + + + portlet_seq + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Copied: branches/JBoss_Portal_Branch_2_6/wsrp/src/resources/portal-wsrp-sar= /conf/hibernate/consumer/ehcache.xml (from rev 8606, branches/JBoss_Portal_= Branch_2_6/wsrp/src/resources/portal-wsrp-sar/conf/consumer/hibernate/ehcac= he.xml) =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/wsrp/src/resources/portal-wsrp-sar/con= f/hibernate/consumer/ehcache.xml (rev 0) +++ branches/JBoss_Portal_Branch_2_6/wsrp/src/resources/portal-wsrp-sar/con= f/hibernate/consumer/ehcache.xml 2007-10-11 23:40:06 UTC (rev 8607) @@ -0,0 +1,60 @@ + + + + + + + + + + \ No newline at end of file Copied: branches/JBoss_Portal_Branch_2_6/wsrp/src/resources/portal-wsrp-sar= /conf/hibernate/consumer/hibernate.cfg.xml (from rev 8606, branches/JBoss_P= ortal_Branch_2_6/wsrp/src/resources/portal-wsrp-sar/conf/consumer/hibernate= /hibernate.cfg.xml) =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/wsrp/src/resources/portal-wsrp-sar/con= f/hibernate/consumer/hibernate.cfg.xml (rev 0) +++ branches/JBoss_Portal_Branch_2_6/wsrp/src/resources/portal-wsrp-sar/con= f/hibernate/consumer/hibernate.cfg.xml 2007-10-11 23:40:06 UTC (rev 8607) @@ -0,0 +1,58 @@ + + + + + + java:@portal.datasource.nam= e@ + @portal.sql.show@ + true + true + + + + + + + + + + + + \ No newline at end of file --===============2420130257380969252==-- From portal-commits at lists.jboss.org Thu Oct 11 19:44:04 2007 Content-Type: multipart/mixed; boundary="===============3894710022427130374==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8608 - in branches/JBoss_Portal_Branch_2_6/wsrp/src/resources/portal-wsrp-sar: conf and 1 other directory. Date: Thu, 11 Oct 2007 19:44:03 -0400 Message-ID: --===============3894710022427130374== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: chris.laprun(a)jboss.com Date: 2007-10-11 19:44:03 -0400 (Thu, 11 Oct 2007) New Revision: 8608 Removed: branches/JBoss_Portal_Branch_2_6/wsrp/src/resources/portal-wsrp-sar/conf= /consumer/ Modified: branches/JBoss_Portal_Branch_2_6/wsrp/src/resources/portal-wsrp-sar/META= -INF/jboss-service.xml Log: - Forgot to commit service definition and to remove files (more accurately,= IDEA screwed up on the last couple of commits) :( Modified: branches/JBoss_Portal_Branch_2_6/wsrp/src/resources/portal-wsrp-s= ar/META-INF/jboss-service.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/wsrp/src/resources/portal-wsrp-sar/MET= A-INF/jboss-service.xml 2007-10-11 23:40:06 UTC (rev 8607) +++ branches/JBoss_Portal_Branch_2_6/wsrp/src/resources/portal-wsrp-sar/MET= A-INF/jboss-service.xml 2007-10-11 23:44:03 UTC (rev 8608) @@ -145,7 +145,7 @@ portal:service=3DTreeCacheProvider,type=3Dhibernate @portal.single.xml.open@ --> true - conf/consumer/hibernate/hibernate= .cfg.xml + conf/hibernate/consumer/hibernate= .cfg.xml java:/portal/WSRPConsumerSessionFactory= = --===============3894710022427130374==-- From portal-commits at lists.jboss.org Thu Oct 11 20:05:44 2007 Content-Type: multipart/mixed; boundary="===============1596250075876277159==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8609 - in trunk: core-wsrp/src/resources/portal-wsrp-admin-war/WEB-INF and 6 other directories. Date: Thu, 11 Oct 2007 20:05:43 -0400 Message-ID: --===============1596250075876277159== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: chris.laprun(a)jboss.com Date: 2007-10-11 20:05:43 -0400 (Thu, 11 Oct 2007) New Revision: 8609 Added: trunk/core-wsrp/src/main/org/jboss/portal/wsrp/admin/ui/QNameConverter.j= ava trunk/wsrp/src/resources/portal-wsrp-sar/conf/hibernate/ trunk/wsrp/src/resources/portal-wsrp-sar/conf/hibernate/consumer/ trunk/wsrp/src/resources/portal-wsrp-sar/conf/hibernate/consumer/domain.= hbm.xml trunk/wsrp/src/resources/portal-wsrp-sar/conf/hibernate/consumer/ehcache= .xml trunk/wsrp/src/resources/portal-wsrp-sar/conf/hibernate/consumer/hiberna= te.cfg.xml Removed: trunk/wsrp/src/resources/portal-wsrp-sar/conf/consumer/ trunk/wsrp/src/resources/portal-wsrp-sar/conf/hibernate/consumer/ Modified: trunk/core-wsrp/src/main/org/jboss/portal/wsrp/admin/ui/ProducerBean.java trunk/core-wsrp/src/resources/portal-wsrp-admin-war/WEB-INF/faces-config= .xml trunk/core-wsrp/src/resources/portal-wsrp-admin-war/WEB-INF/jsf/producer= .xhtml trunk/wsrp/src/main/org/jboss/portal/wsrp/producer/config/impl/ProducerC= onfigurationServiceImpl.java trunk/wsrp/src/resources/portal-wsrp-sar/META-INF/jboss-service.xml Log: - JBPORTAL-1715: Added support for adding registration properties (does not= work properly but committing for synchronization purpose: QNameConverter w= ill probably be removed to avoid CCE with XB). - Moved Hibernate configuration to a location mirroring that of other modul= es. Modified: trunk/core-wsrp/src/main/org/jboss/portal/wsrp/admin/ui/ProducerB= ean.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/core-wsrp/src/main/org/jboss/portal/wsrp/admin/ui/ProducerBean.ja= va 2007-10-11 23:44:03 UTC (rev 8608) +++ trunk/core-wsrp/src/main/org/jboss/portal/wsrp/admin/ui/ProducerBean.ja= va 2007-10-12 00:05:43 UTC (rev 8609) @@ -25,6 +25,7 @@ = import org.jboss.portal.registration.RegistrationPolicy; import org.jboss.portal.registration.policies.DefaultRegistrationPolicy; +import org.jboss.portal.wsrp.WSRPConstants; import org.jboss.portal.wsrp.producer.config.ProducerConfiguration; import org.jboss.portal.wsrp.producer.config.ProducerConfigurationService; import org.jboss.portal.wsrp.producer.config.ProducerRegistrationRequireme= nts; @@ -47,6 +48,9 @@ private ProducerConfigurationService configurationService; private String policyClassName; private String validatorClassName; + private static final String PROPERTY =3D "property"; + private static int counter =3D 0; + private static final String PRODUCER =3D "producer"; = public ProducerConfigurationService getConfigurationService() { @@ -157,6 +161,12 @@ log.debug(e); beanContext.createErrorMessage("status", "Couldn't save producer = configuration. Cause: " + e.getLocalizedMessage()); } - return null; + return PRODUCER; } + + public String addRegistrationProperty() + { + getRegRequirements().addRegistrationProperty(new RegistrationPropert= yDescription(PROPERTY + counter++, WSRPConstants.XSD_STRING)); + return PRODUCER; + } } Copied: trunk/core-wsrp/src/main/org/jboss/portal/wsrp/admin/ui/QNameConver= ter.java (from rev 8606, branches/JBoss_Portal_Branch_2_6/core-wsrp/src/mai= n/org/jboss/portal/wsrp/admin/ui/QNameConverter.java) =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/core-wsrp/src/main/org/jboss/portal/wsrp/admin/ui/QNameConverter.= java (rev 0) +++ trunk/core-wsrp/src/main/org/jboss/portal/wsrp/admin/ui/QNameConverter.= java 2007-10-12 00:05:43 UTC (rev 8609) @@ -0,0 +1,47 @@ +/*************************************************************************= ***** + * JBoss, a division of Red Hat = * + * Copyright 2007, Red Hat Middleware, LLC, and individual = * + * contributors as indicated by the @authors tag. See the = * + * copyright.txt in the distribution for a full listing of = * + * individual contributors. = * + * = * + * This is free software; you can redistribute it and/or modify it = * + * under the terms of the GNU Lesser General Public License as = * + * published by the Free Software Foundation; either version 2.1 of = * + * the License, or (at your option) any later version. = * + * = * + * This software is distributed in the hope that it will be useful, = * + * but WITHOUT ANY WARRANTY; without even the implied warranty of = * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU = * + * Lesser General Public License for more details. = * + * = * + * You should have received a copy of the GNU Lesser General Public = * + * License along with this software; if not, write to the Free = * + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA = * + * 02110-1301 USA, or see the FSF site: http://www.fsf.org. = * + *************************************************************************= *****/ + +package org.jboss.portal.wsrp.admin.ui; + +import javax.faces.component.UIComponent; +import javax.faces.context.FacesContext; +import javax.faces.convert.Converter; +import javax.xml.namespace.QName; + +/** + * @author Chris Laprun + * @version $Revision$ + * @since 2.6.3 + */ +public class QNameConverter implements Converter +{ + public Object getAsObject(FacesContext facesContext, UIComponent uiComp= onent, String s) + { + return s =3D=3D null ? null : QName.valueOf(s); + } + + public String getAsString(FacesContext facesContext, UIComponent uiComp= onent, Object o) + { + return o =3D=3D null ? null : o.toString(); + } +} Modified: trunk/core-wsrp/src/resources/portal-wsrp-admin-war/WEB-INF/faces= -config.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/core-wsrp/src/resources/portal-wsrp-admin-war/WEB-INF/faces-confi= g.xml 2007-10-11 23:44:03 UTC (rev 8608) +++ trunk/core-wsrp/src/resources/portal-wsrp-admin-war/WEB-INF/faces-confi= g.xml 2007-10-12 00:05:43 UTC (rev 8609) @@ -36,6 +36,10 @@ org.jboss.portal.wsrp.registration.LocalizedStr= ing org.jboss.portal.wsrp.admin.ui.LocalizedStringConve= rter + + javax.xml.namespace.QName + org.jboss.portal.wsrp.admin.ui.QNameConverter + = beanContext @@ -83,7 +87,7 @@ producer org.jboss.portal.wsrp.admin.ui.ProducerBean - session + request configurationService org.jboss.portal.wsrp.producer.config.ProducerCon= figurationService Modified: trunk/core-wsrp/src/resources/portal-wsrp-admin-war/WEB-INF/jsf/p= roducer.xhtml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/core-wsrp/src/resources/portal-wsrp-admin-war/WEB-INF/jsf/produce= r.xhtml 2007-10-11 23:44:03 UTC (rev 8608) +++ trunk/core-wsrp/src/resources/portal-wsrp-admin-war/WEB-INF/jsf/produce= r.xhtml 2007-10-12 00:05:43 UTC (rev 8609) @@ -56,7 +56,7 @@ headerClass=3D"portlet-section-hea= der"> Name - + Type @@ -66,25 +66,25 @@ Label - + Hint - + - + = - + = Modified: trunk/wsrp/src/main/org/jboss/portal/wsrp/producer/config/impl/Pr= oducerConfigurationServiceImpl.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/wsrp/src/main/org/jboss/portal/wsrp/producer/config/impl/Producer= ConfigurationServiceImpl.java 2007-10-11 23:44:03 UTC (rev 8608) +++ trunk/wsrp/src/main/org/jboss/portal/wsrp/producer/config/impl/Producer= ConfigurationServiceImpl.java 2007-10-12 00:05:43 UTC (rev 8609) @@ -99,6 +99,11 @@ reloadConfiguration(); } = + protected void stopService() throws Exception + { + saveConfiguration(); + } + public void reloadConfiguration() throws Exception { URL configURL =3D getConfigLocationURL(); Modified: trunk/wsrp/src/resources/portal-wsrp-sar/META-INF/jboss-service.x= ml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/wsrp/src/resources/portal-wsrp-sar/META-INF/jboss-service.xml 200= 7-10-11 23:44:03 UTC (rev 8608) +++ trunk/wsrp/src/resources/portal-wsrp-sar/META-INF/jboss-service.xml 200= 7-10-12 00:05:43 UTC (rev 8609) @@ -146,7 +146,7 @@ portal:service=3DTreeCacheProvider,type=3Dhibernate @portal.single.xml.open@ --> true - conf/consumer/hibernate/hibernate= .cfg.xml + conf/hibernate/consumer/hibernate= .cfg.xml java:/portal/WSRPConsumerSessionFactory= = Copied: trunk/wsrp/src/resources/portal-wsrp-sar/conf/hibernate (from rev 8= 606, branches/JBoss_Portal_Branch_2_6/wsrp/src/resources/portal-wsrp-sar/co= nf/hibernate) Copied: trunk/wsrp/src/resources/portal-wsrp-sar/conf/hibernate/consumer (f= rom rev 8606, branches/JBoss_Portal_Branch_2_6/wsrp/src/resources/portal-ws= rp-sar/conf/hibernate/consumer) Copied: trunk/wsrp/src/resources/portal-wsrp-sar/conf/hibernate/consumer/do= main.hbm.xml (from rev 8607, branches/JBoss_Portal_Branch_2_6/wsrp/src/reso= urces/portal-wsrp-sar/conf/hibernate/consumer/domain.hbm.xml) =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/wsrp/src/resources/portal-wsrp-sar/conf/hibernate/consumer/domain= .hbm.xml (rev 0) +++ trunk/wsrp/src/resources/portal-wsrp-sar/conf/hibernate/consumer/domain= .hbm.xml 2007-10-12 00:05:43 UTC (rev 8609) @@ -0,0 +1,145 @@ + + + + + + + + + + wsrpconsumer_seq + + + + + + + + + + + + + + wsrpconsumer_seq + + + + + + + + + + + + + + wsrpconsumer_seq + + + + + + + + + + + + + + + + + + wsrpconsumer_seq + + + + + + + + + + + + + portlet_seq + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Copied: trunk/wsrp/src/resources/portal-wsrp-sar/conf/hibernate/consumer/eh= cache.xml (from rev 8607, branches/JBoss_Portal_Branch_2_6/wsrp/src/resourc= es/portal-wsrp-sar/conf/hibernate/consumer/ehcache.xml) =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/wsrp/src/resources/portal-wsrp-sar/conf/hibernate/consumer/ehcach= e.xml (rev 0) +++ trunk/wsrp/src/resources/portal-wsrp-sar/conf/hibernate/consumer/ehcach= e.xml 2007-10-12 00:05:43 UTC (rev 8609) @@ -0,0 +1,60 @@ + + + + + + + + + + \ No newline at end of file Copied: trunk/wsrp/src/resources/portal-wsrp-sar/conf/hibernate/consumer/hi= bernate.cfg.xml (from rev 8607, branches/JBoss_Portal_Branch_2_6/wsrp/src/r= esources/portal-wsrp-sar/conf/hibernate/consumer/hibernate.cfg.xml) =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/wsrp/src/resources/portal-wsrp-sar/conf/hibernate/consumer/hibern= ate.cfg.xml (rev 0) +++ trunk/wsrp/src/resources/portal-wsrp-sar/conf/hibernate/consumer/hibern= ate.cfg.xml 2007-10-12 00:05:43 UTC (rev 8609) @@ -0,0 +1,58 @@ + + + + + + java:@portal.datasource.nam= e@ + @portal.sql.show@ + true + true + + + + + + + + + + + + \ No newline at end of file --===============1596250075876277159==-- From portal-commits at lists.jboss.org Thu Oct 11 20:33:47 2007 Content-Type: multipart/mixed; boundary="===============2741891106539562712==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8610 - in modules/test/trunk: build/ide/intellij/idea60/modules/tooling and 19 other directories. Date: Thu, 11 Oct 2007 20:33:47 -0400 Message-ID: --===============2741891106539562712== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: julien(a)jboss.com Date: 2007-10-11 20:33:46 -0400 (Thu, 11 Oct 2007) New Revision: 8610 Added: modules/test/trunk/remote/src/main/org/jboss/unit/remote/driver/TestCase= Factory.java modules/test/trunk/remote/src/resources/jboss-unit-remote-jar/org/ modules/test/trunk/remote/src/resources/jboss-unit-remote-jar/org/jboss/ modules/test/trunk/remote/src/resources/jboss-unit-remote-jar/org/jboss/= unit/ modules/test/trunk/remote/src/resources/jboss-unit-remote-jar/org/jboss/= unit/remote/ modules/test/trunk/remote/src/resources/jboss-unit-remote-jar/org/jboss/= unit/remote/driver/ modules/test/trunk/remote/src/resources/jboss-unit-remote-jar/org/jboss/= unit/remote/driver/jboss-beans.xml Modified: modules/test/trunk/build/ide/intellij/idea60/modules/remote/remote.iml modules/test/trunk/build/ide/intellij/idea60/modules/tooling/tooling.iml modules/test/trunk/build/ide/intellij/idea60/modules/unit/unit.iml modules/test/trunk/remote/build.xml modules/test/trunk/remote/src/main/org/jboss/unit/remote/RequestContext.= java modules/test/trunk/remote/src/main/org/jboss/unit/remote/driver/RemoteTe= stDriverClient.java modules/test/trunk/remote/src/main/org/jboss/unit/remote/driver/RemoteTe= stDriverServer.java modules/test/trunk/remote/src/main/org/jboss/unit/remote/driver/TestConv= ersation.java modules/test/trunk/remote/src/main/org/jboss/unit/remote/driver/handler/= deployer/DeployerHandler.java modules/test/trunk/remote/src/main/org/jboss/unit/remote/driver/handler/= deployer/response/DeployerResponse.java modules/test/trunk/remote/src/main/org/jboss/unit/remote/driver/handler/= http/command/HTTPDriverCommand.java modules/test/trunk/remote/src/main/org/jboss/unit/remote/driver/handler/= http/response/HTTPDriverResponse.java modules/test/trunk/test/src/main/org/jboss/portal/test/framework/deploym= ent/Deployer.java modules/test/trunk/tooling/build.xml modules/test/trunk/tooling/src/main/org/jboss/unit/tooling/ant/TestsType= .java modules/test/trunk/unit/src/main/org/jboss/unit/Failure.java modules/test/trunk/unit/src/main/org/jboss/unit/info/impl/SimpleTestCase= Info.java modules/test/trunk/unit/src/main/org/jboss/unit/info/impl/SimpleTestSuit= eInfo.java Log: more work on remote extension + set JVM property for jboss logging to use J= UL logging + started to implement JPDA option Modified: modules/test/trunk/build/ide/intellij/idea60/modules/remote/remot= e.iml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/build/ide/intellij/idea60/modules/remote/remote.iml = 2007-10-12 00:05:43 UTC (rev 8609) +++ modules/test/trunk/build/ide/intellij/idea60/modules/remote/remote.iml = 2007-10-12 00:33:46 UTC (rev 8610) @@ -37,6 +37,168 @@
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Modified: modules/test/trunk/build/ide/intellij/idea60/modules/tooling/tool= ing.iml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/build/ide/intellij/idea60/modules/tooling/tooling.im= l 2007-10-12 00:05:43 UTC (rev 8609) +++ modules/test/trunk/build/ide/intellij/idea60/modules/tooling/tooling.im= l 2007-10-12 00:33:46 UTC (rev 8610) @@ -9,6 +9,24 @@ + + + + + + + + + + + + + + + + + + Modified: modules/test/trunk/build/ide/intellij/idea60/modules/unit/unit.iml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/build/ide/intellij/idea60/modules/unit/unit.iml 2007= -10-12 00:05:43 UTC (rev 8609) +++ modules/test/trunk/build/ide/intellij/idea60/modules/unit/unit.iml 2007= -10-12 00:33:46 UTC (rev 8610) @@ -8,6 +8,15 @@ + + + + + + + + + Modified: modules/test/trunk/remote/build.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/remote/build.xml 2007-10-12 00:05:43 UTC (rev 8609) +++ modules/test/trunk/remote/build.xml 2007-10-12 00:33:46 UTC (rev 8610) @@ -86,10 +86,16 @@ &libraries; + + + - + + + + = Modified: modules/test/trunk/remote/src/main/org/jboss/unit/remote/RequestC= ontext.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/remote/src/main/org/jboss/unit/remote/RequestContext= .java 2007-10-12 00:05:43 UTC (rev 8609) +++ modules/test/trunk/remote/src/main/org/jboss/unit/remote/RequestContext= .java 2007-10-12 00:33:46 UTC (rev 8610) @@ -47,4 +47,24 @@ this.parametrization =3D parametrization; this.payload =3D payload; } + + public boolean isRequestCount(int requestCount) + { + return this.requestCount =3D=3D requestCount; + } + + public int getRequestCount() + { + return requestCount; + } + + public Map getParametrization() + { + return parametrization; + } + + public Map getPayload() + { + return payload; + } } Modified: modules/test/trunk/remote/src/main/org/jboss/unit/remote/driver/R= emoteTestDriverClient.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/remote/src/main/org/jboss/unit/remote/driver/RemoteT= estDriverClient.java 2007-10-12 00:05:43 UTC (rev 8609) +++ modules/test/trunk/remote/src/main/org/jboss/unit/remote/driver/RemoteT= estDriverClient.java 2007-10-12 00:33:46 UTC (rev 8610) @@ -25,23 +25,40 @@ import org.jboss.unit.driver.TestDriver; import org.jboss.unit.driver.DriverCommand; import org.jboss.unit.driver.DriverResponse; +import org.jboss.unit.driver.response.FailureResponse; +import org.jboss.unit.driver.command.StartTestCommand; import org.jboss.unit.info.TestInfo; +import org.jboss.unit.info.TestSuiteInfo; +import org.jboss.unit.info.impl.SimpleTestSuiteInfo; +import org.jboss.unit.info.impl.SimpleParameterInfo; import org.jboss.unit.TestId; +import org.jboss.unit.Failure; import org.jboss.portal.test.framework.server.NodeId; import org.jboss.portal.test.framework.server.Node; import org.jboss.portal.test.framework.server.NodeManager; +import org.jboss.kernel.plugins.bootstrap.basic.BasicBootstrap; +import org.jboss.kernel.plugins.deployment.xml.BeanXMLDeployer; +import org.jboss.kernel.spi.deployment.KernelDeployment; +import org.jboss.beans.metadata.plugins.AbstractBeanMetaData; +import org.jboss.beans.metadata.plugins.AbstractConstructorMetaData; +import org.jboss.beans.metadata.plugins.AbstractValueMetaData; +import org.jboss.beans.metadata.plugins.annotations.Inject; = +import java.net.URL; +import java.util.Map; +import java.util.HashMap; + /** * @author Julien Viet * @version $Revision: 1.1 $ */ -public class RemoteTestDriverClient implements TestDriver +public class RemoteTestDriverClient extends BasicBootstrap implements Test= Driver { = // Config = - /** . */ - private NodeId initialNodeId; + /** Need to make initial node id configurable somehow. */ +// private String initialNodeId; = // Services = @@ -51,14 +68,27 @@ /** . */ private ProtocolHandler protocolHandler; = - public NodeId getInitialNodeId() + /** . */ + private String archivePath; + +// public String getInitialNodeId() +// { +// return initialNodeId; +// } +// +// public void setInitialNodeId(String initialNodeId) +// { +// this.initialNodeId =3D initialNodeId; +// } + + public String getArchivePath() { - return initialNodeId; + return archivePath; } = - public void setInitialNodeId(NodeId initialNodeId) + public void setArchivePath(String archivePath) { - this.initialNodeId =3D initialNodeId; + this.archivePath =3D archivePath; } = public NodeManager getNodeManager() @@ -66,6 +96,7 @@ return nodeManager; } = + @Inject(bean=3D"NodeManager") public void setNodeManager(NodeManager nodeManager) { this.nodeManager =3D nodeManager; @@ -76,6 +107,7 @@ return protocolHandler; } = + @Inject(bean=3D"DeployerHandler") public void setProtocolHandler(ProtocolHandler protocolHandler) { this.protocolHandler =3D protocolHandler; @@ -86,28 +118,125 @@ return (RemoteTestDriver)node.lookupService(RemoteTestDriver.SERVICE= _ID); } = + private boolean started =3D false; + private FailureResponse failed; + private KernelDeployment deployment; + private BeanXMLDeployer beanDeployer; + + private void start() + { + if (!started && failed =3D=3D null) + { + + // + run(); + + // Install our self first + try + { + AbstractBeanMetaData bmd =3D new AbstractBeanMetaData("TestDri= ver", getClass().getName()); + AbstractConstructorMetaData cmd =3D new AbstractConstructorMet= aData(); + bmd.setConstructor(cmd); + TestCaseFactory factory =3D new TestCaseFactory(this); + AbstractValueMetaData vmd =3D new AbstractValueMetaData(factor= y); + cmd.setFactory(vmd); + cmd.setFactoryMethod("getTestCase"); + getKernel().getController().install(bmd); + } + catch (Throwable throwable) + { + throwable.printStackTrace(); + failed =3D new FailureResponse(Failure.createErrorFailure("Cou= ld not startup kernel", throwable)); + return; + } + + // Now deploy beans + try + { + URL url =3D getClass().getResource("/org/jboss/unit/remote/dri= ver/jboss-beans.xml"); + beanDeployer =3D new BeanXMLDeployer(getKernel()); + deployment =3D beanDeployer.deploy(url); + beanDeployer.validate(); + } + catch (Throwable throwable) + { + throwable.printStackTrace(); + failed =3D new FailureResponse(Failure.createErrorFailure("Cou= ld not deploy beans", throwable)); + return; + } + + // + started =3D true; + } + } + public TestInfo getInfo() { - Node node =3D nodeManager.getNode(initialNodeId); + start(); + + // Always retrieve meta data from the default node + Node node =3D nodeManager.getNode(NodeId.DEFAULT); + + // TestDriver server =3D getServer(node); - return server.getInfo(); + + // + SimpleTestSuiteInfo testInfo =3D new SimpleTestSuiteInfo((TestSuiteI= nfo)server.getInfo()); + + System.out.println("testInfo =3D " + testInfo); + + // + Map parameters =3D new HashMap(testInfo.getParameters()); + + // + parameters.put("archivePath", new SimpleParameterInfo("archivePath")= ); + + // + testInfo.setParameters(parameters); + + // + return testInfo; } = public DriverResponse invoke(TestId testId, DriverCommand command) { - try + start(); + + // + if (command instanceof StartTestCommand) { - Node node =3D nodeManager.getNode(initialNodeId); + StartTestCommand start =3D (StartTestCommand)command; + archivePath =3D start.getParametrization().get("archivePath"); = - // Create conversation - TestConversation conversation =3D createConversation(testId, node= ); + try + { + Node node =3D nodeManager.getNode(NodeId.DEFAULT); = - // - return conversation.handleCommand(command); + // Create conversation + TestConversation conversation =3D createConversation(testId, n= ode); + + // + return conversation.handleCommand(command); + } + catch (Exception e) + { + return new FailureResponse(Failure.createErrorFailure(e)); + } + finally + { + try + { + beanDeployer.undeploy(deployment); + } + catch (Throwable ignore) + { + ignore.printStackTrace(); + } + } } - catch (Exception e) + else { - throw new Error(e); + return new FailureResponse(Failure.createErrorFailure("Command " = + command + " not accepted")); } } = Modified: modules/test/trunk/remote/src/main/org/jboss/unit/remote/driver/R= emoteTestDriverServer.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/remote/src/main/org/jboss/unit/remote/driver/RemoteT= estDriverServer.java 2007-10-12 00:05:43 UTC (rev 8609) +++ modules/test/trunk/remote/src/main/org/jboss/unit/remote/driver/RemoteT= estDriverServer.java 2007-10-12 00:33:46 UTC (rev 8610) @@ -47,22 +47,28 @@ private SimpleTestSuiteInfo info =3D new SimpleTestSuiteInfo("Main"); = /** . */ - private Map drivers =3D new HashMap(); + private Map drivers =3D new HashMap(); = - /** . */ - private RequestContext requestContext; + public void pushContext(TestId testId, RequestContext requestContext) + { + String name =3D testId.getName(0); = - /** . */ - private ResponseContext responseContext; + // + RemoteTestDriver driver =3D drivers.get(name); = - public void pushContext(TestId testId, RequestContext testContext) - { - this.requestContext =3D testContext; + // + driver.pushContext(testId.range(1), requestContext); } = public ResponseContext popContext(TestId testId) { - return responseContext; + String name =3D testId.getName(0); + + // + RemoteTestDriver driver =3D drivers.get(name); + + // + return driver.popContext(testId.range(1)); } = public TestInfo getInfo() @@ -96,7 +102,7 @@ return driver.invoke(driverId, command); } = - public void addDriver(TestDriver driver) + public void mount(RemoteTestDriver driver) { synchronized(RemoteTestDriverServer.class) { @@ -108,7 +114,7 @@ } } = - public synchronized void removeDriver(TestDriver driver) + public synchronized void unmount(RemoteTestDriver driver) { synchronized(RemoteTestDriverServer.class) { @@ -120,11 +126,6 @@ } } = - - - - - // /** . */ // private String initialPath =3D "/test"; // Added: modules/test/trunk/remote/src/main/org/jboss/unit/remote/driver/Test= CaseFactory.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/remote/src/main/org/jboss/unit/remote/driver/TestCas= eFactory.java (rev 0) +++ modules/test/trunk/remote/src/main/org/jboss/unit/remote/driver/TestCas= eFactory.java 2007-10-12 00:33:46 UTC (rev 8610) @@ -0,0 +1,44 @@ +/*************************************************************************= ***** + * JBoss, a division of Red Hat = * + * Copyright 2006, Red Hat Middleware, LLC, and individual = * + * contributors as indicated by the @authors tag. See the = * + * copyright.txt in the distribution for a full listing of = * + * individual contributors. = * + * = * + * This is free software; you can redistribute it and/or modify it = * + * under the terms of the GNU Lesser General Public License as = * + * published by the Free Software Foundation; either version 2.1 of = * + * the License, or (at your option) any later version. = * + * = * + * This software is distributed in the hope that it will be useful, = * + * but WITHOUT ANY WARRANTY; without even the implied warranty of = * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU = * + * Lesser General Public License for more details. = * + * = * + * You should have received a copy of the GNU Lesser General Public = * + * License along with this software; if not, write to the Free = * + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA = * + * 02110-1301 USA, or see the FSF site: http://www.fsf.org. = * + *************************************************************************= *****/ +package org.jboss.unit.remote.driver; + +/** + * @author Julien Viet + * @version $Revision: 1.1 $ + */ +public class TestCaseFactory +{ + + /** . */ + private final Object testCase; + + public TestCaseFactory(Object testCase) + { + this.testCase =3D testCase; + } + + public Object getTestCase() + { + return testCase; + } +} Modified: modules/test/trunk/remote/src/main/org/jboss/unit/remote/driver/T= estConversation.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/remote/src/main/org/jboss/unit/remote/driver/TestCon= versation.java 2007-10-12 00:05:43 UTC (rev 8609) +++ modules/test/trunk/remote/src/main/org/jboss/unit/remote/driver/TestCon= versation.java 2007-10-12 00:33:46 UTC (rev 8610) @@ -24,6 +24,7 @@ = import org.jboss.unit.driver.DriverResponse; import org.jboss.unit.driver.DriverCommand; +import org.jboss.unit.driver.command.StartTestCommand; import org.jboss.unit.driver.response.EndTestResponse; import org.jboss.unit.remote.RequestContext; import org.jboss.unit.remote.ResponseContext; @@ -87,26 +88,23 @@ */ public final DriverResponse handleCommand(RemoteDriverCommandContext co= mmandContext) throws Exception { + DriverCommand command =3D commandContext.getCommand(); + // -// if (command instanceof StartTestCommand) -// { -// StartTestCommand start =3D (StartTestCommand)command; -// parametrization =3D start.getParametrization(); -// pushContext(commandContext); -// DriverResponse response =3D getDriver().getServer(node).invoke(= testId, command); -// return commandContext.createResponseContext(response); -// } -// else if (command instanceof HTTPDriverCommand) -// { -// return new HTTPTestDriverHandler().invoke(this, commandContext); -// } -// else -// { -// throw new IllegalArgumentException("Not yet handled " + command= ); -// } + RemoteDriverResponseContext respCtx; + if (command instanceof StartTestCommand) + { + StartTestCommand start =3D (StartTestCommand)command; + parametrization =3D start.getParametrization(); + pushContext(commandContext); + DriverResponse response =3D getDriver().getServer(node).invoke(te= stId, command); + respCtx =3D commandContext.createResponseContext(response); + } + else + { + respCtx =3D protocolHandler.handleCommand(this, commandContext); + } = - RemoteDriverResponseContext respCtx =3D protocolHandler.handleComman= d(this, commandContext); - // DriverResponse response =3D respCtx.getResponse(); = Modified: modules/test/trunk/remote/src/main/org/jboss/unit/remote/driver/h= andler/deployer/DeployerHandler.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/remote/src/main/org/jboss/unit/remote/driver/handler= /deployer/DeployerHandler.java 2007-10-12 00:05:43 UTC (rev 8609) +++ modules/test/trunk/remote/src/main/org/jboss/unit/remote/driver/handler= /deployer/DeployerHandler.java 2007-10-12 00:33:46 UTC (rev 8610) @@ -119,7 +119,7 @@ return new RemoteDriverCommandContext(responseContext.getCommandC= ontext()); } = - return null; //To change body of implemented methods use File | Set= tings | File Templates. + return null; } = public RemoteDriverResponseContext handleCommand(TestConversation conve= rsation, RemoteDriverCommandContext commandContext) throws Exception Modified: modules/test/trunk/remote/src/main/org/jboss/unit/remote/driver/h= andler/deployer/response/DeployerResponse.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/remote/src/main/org/jboss/unit/remote/driver/handler= /deployer/response/DeployerResponse.java 2007-10-12 00:05:43 UTC (rev 8609) +++ modules/test/trunk/remote/src/main/org/jboss/unit/remote/driver/handler= /deployer/response/DeployerResponse.java 2007-10-12 00:33:46 UTC (rev 8610) @@ -24,10 +24,12 @@ = import org.jboss.unit.driver.DriverResponse; = +import java.io.Serializable; + /** * @author Julien Viet * @version $Revision: 1.1 $ */ -public class DeployerResponse extends DriverResponse +public class DeployerResponse extends DriverResponse implements Serializab= le { } Modified: modules/test/trunk/remote/src/main/org/jboss/unit/remote/driver/h= andler/http/command/HTTPDriverCommand.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/remote/src/main/org/jboss/unit/remote/driver/handler= /http/command/HTTPDriverCommand.java 2007-10-12 00:05:43 UTC (rev 8609) +++ modules/test/trunk/remote/src/main/org/jboss/unit/remote/driver/handler= /http/command/HTTPDriverCommand.java 2007-10-12 00:33:46 UTC (rev 8610) @@ -24,10 +24,12 @@ = import org.jboss.unit.driver.DriverCommand; = +import java.io.Serializable; + /** * @author Julien Viet * @version $Revision: 1.1 $ */ -public class HTTPDriverCommand extends DriverCommand +public class HTTPDriverCommand extends DriverCommand implements Serializab= le { } Modified: modules/test/trunk/remote/src/main/org/jboss/unit/remote/driver/h= andler/http/response/HTTPDriverResponse.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/remote/src/main/org/jboss/unit/remote/driver/handler= /http/response/HTTPDriverResponse.java 2007-10-12 00:05:43 UTC (rev 8609) +++ modules/test/trunk/remote/src/main/org/jboss/unit/remote/driver/handler= /http/response/HTTPDriverResponse.java 2007-10-12 00:33:46 UTC (rev 8610) @@ -24,10 +24,12 @@ = import org.jboss.unit.driver.DriverResponse; = +import java.io.Serializable; + /** * @author Julien Viet * @version $Revision: 1.1 $ */ -public abstract class HTTPDriverResponse extends DriverResponse +public abstract class HTTPDriverResponse extends DriverResponse implements= Serializable { } Added: modules/test/trunk/remote/src/resources/jboss-unit-remote-jar/org/jb= oss/unit/remote/driver/jboss-beans.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/remote/src/resources/jboss-unit-remote-jar/org/jboss= /unit/remote/driver/jboss-beans.xml (rev 0) +++ modules/test/trunk/remote/src/resources/jboss-unit-remote-jar/org/jboss= /unit/remote/driver/jboss-beans.xml 2007-10-12 00:33:46 UTC (rev 8610) @@ -0,0 +1,68 @@ + + + + + + + servers.xml + RemoteTomcat_6_0 + + + + + + + default + + + + + + + + + + + + + + + + + + + + + + + + + + + Modified: modules/test/trunk/test/src/main/org/jboss/portal/test/framework/= deployment/Deployer.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/test/src/main/org/jboss/portal/test/framework/deploy= ment/Deployer.java 2007-10-12 00:05:43 UTC (rev 8609) +++ modules/test/trunk/test/src/main/org/jboss/portal/test/framework/deploy= ment/Deployer.java 2007-10-12 00:33:46 UTC (rev 8610) @@ -25,11 +25,9 @@ = import org.jboss.portal.test.framework.server.Node; = -import java.net.MalformedURLException; import java.net.URL; import java.util.ArrayList; import java.util.HashMap; -import java.util.Iterator; import java.util.Map; import java.io.File; = @@ -43,7 +41,7 @@ { = /** . */ - private Map deployments; + private Map deployments; = public void create() { @@ -52,14 +50,13 @@ public void start() { // Should check that the deployer agent is here - deployments =3D new HashMap(); + deployments =3D new HashMap(); } = public void stop() { - for (Iterator i =3D new ArrayList(deployments.keySet()).iterator(); = i.hasNext();) + for (URL url : new ArrayList(deployments.keySet())) { - URL url =3D (URL)i.next(); undeploy(url); } = @@ -110,12 +107,12 @@ = public void deploy(String url, Node[] nodes) throws Exception { - this.deploy(getArchiveURL(url), nodes); + this.deploy(new URL(url), nodes); } = public void undeploy(URL url) { - Deployment deployment =3D (Deployment)deployments.remove(url); + Deployment deployment =3D deployments.remove(url); if (deployment !=3D null) { deployment.undeploy(); @@ -134,57 +131,6 @@ = public void undeploy(String url) throws Exception { - this.undeploy(getArchiveURL(url)); + this.undeploy(new URL(url)); } - - /** - * Try to discover the URL for the deployment archive based on the arch= ive name and "standard" archive locations - * (relative to the where the test is executed): - *

- *

  • .
  • output/libs/
  • test/outputs/libs/
  • output/lib/
  • test/output/lib/
  • - *
  • ../output/lib/
  • ../test/output/lib/
- * - * @param archive the name of the archive to deploy - * @return a URL pointing to the archive to be deployed - * @throws IllegalArgumentException if no archive with the given name c= an be found to be deployed - */ - private URL getArchiveURL(String archive) - { - URL url =3D null; - try - { - url =3D new URL(archive); - } - catch (MalformedURLException ignore) - { -// // archive parameter was not a URL, try to build one from "stan= dard" locations, by considering it as a file name -// String locs[] =3D {archive, "output/libs/" + archive, "test/out= puts/libs/" + archive, "output/lib/" + archive, -// "test/output/lib/" + archive, "../output/lib/" + archive, ".= ./test/output/lib/" + archive, -// "../output/lib/tests/" + archive}; -// -// for (int i =3D 0; i < locs.length && url =3D=3D null; i++) -// { -// File file =3D new File(locs[i]); -// if (file.exists()) -// { -// try -// { -// url =3D file.toURL(); -// } -// catch (MalformedURLException e) -// { -// // shouldn't happen -// } -// } -// } - } - - // if we still don't have a URL at this point, we won't find one: de= clare failure! - if (url =3D=3D null) - { - throw new IllegalArgumentException("Cannot obtain URL for: " + ar= chive); - } - - return url; - } } Modified: modules/test/trunk/tooling/build.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/tooling/build.xml 2007-10-12 00:05:43 UTC (rev 8609) +++ modules/test/trunk/tooling/build.xml 2007-10-12 00:33:46 UTC (rev 8610) @@ -85,7 +85,7 @@ &libraries; - + Modified: modules/test/trunk/tooling/src/main/org/jboss/unit/tooling/ant/Te= stsType.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/tooling/src/main/org/jboss/unit/tooling/ant/TestsTyp= e.java 2007-10-12 00:05:43 UTC (rev 8609) +++ modules/test/trunk/tooling/src/main/org/jboss/unit/tooling/ant/TestsTyp= e.java 2007-10-12 00:33:46 UTC (rev 8610) @@ -26,20 +26,15 @@ import org.apache.tools.ant.BuildException; import org.apache.tools.ant.Project; import org.apache.tools.ant.types.Path; -import org.apache.tools.ant.types.FileSet; +import org.apache.tools.ant.types.Environment; import org.apache.tools.ant.taskdefs.Java; -import org.apache.tools.ant.taskdefs.optional.junit.XMLResultAggregator; -import org.apache.tools.ant.taskdefs.optional.junit.AggregateTransformer; import org.jboss.unit.tooling.filter.IncludeTestFilter; import org.jboss.unit.tooling.filter.ExcludeTestFilter; import org.jboss.unit.tooling.Main; -import org.jboss.unit.tooling.MainBuilder; -import org.jboss.unit.report.impl.junit.JUnitTestReport; = import java.util.List; import java.util.LinkedList; import java.util.Set; -import java.io.File; = /** * @author Boleslaw Dawidowicz @@ -63,7 +58,9 @@ = private String suiteName; = + private boolean jpda; = + public TestsType() { } @@ -79,8 +76,6 @@ = addArguments(javaTask); = - = - javaTask.setClassname("org.jboss.unit.tooling.Main"); = try @@ -111,7 +106,22 @@ = javaTask =3D (Java)getProject().createTask("java"); = + // Set jboss logging to use JUL + Environment.Variable pluginProperty =3D new Environment.Variable(= ); + pluginProperty.setKey("org.jboss.logging.Logger.pluginClass"); + pluginProperty.setValue("org.jboss.logging.jdk.JDK14LoggerPlugin"= ); + javaTask.addSysproperty(pluginProperty); = + // Beginning of jpda option implementation, need to improve it + if (jpda) + { + Environment.Variable javaDotCompilerProperty =3D new Environme= nt.Variable(); + javaDotCompilerProperty.setKey("java.compiler"); + javaDotCompilerProperty.setValue("NONE"); + javaTask.addSysproperty(javaDotCompilerProperty); + javaTask.setJvmargs("-Xdebug -Xnoagent -Xrunjdwp:transport=3Dd= t_socket,server=3Dy,suspend=3Dy,address=3D8000"); + } + // Apply task classpath if (getClasspath() !=3D null) { @@ -347,4 +357,14 @@ { this.suiteName =3D suiteName; } + + public boolean isJpda() + { + return jpda; + } + + public void setJpda(boolean jpda) + { + this.jpda =3D jpda; + } } Modified: modules/test/trunk/unit/src/main/org/jboss/unit/Failure.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/Failure.java 2007-10-12= 00:05:43 UTC (rev 8609) +++ modules/test/trunk/unit/src/main/org/jboss/unit/Failure.java 2007-10-12= 00:33:46 UTC (rev 8610) @@ -76,9 +76,9 @@ return type; } = - public static Failure createErrorFailure(String messge) + public static Failure createErrorFailure(String message) { - return new Failure(messge, FailureType.ERROR); + return new Failure(message, FailureType.ERROR); } = public static Failure createErrorFailure(String message, Throwable thro= wable) @@ -95,4 +95,9 @@ { return new Failure(throwable, FailureType.ASSERTION); } + + public static Failure createAssertionFailure(String message) + { + return new Failure(message, FailureType.ASSERTION); + } } Modified: modules/test/trunk/unit/src/main/org/jboss/unit/info/impl/SimpleT= estCaseInfo.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/info/impl/SimpleTestCas= eInfo.java 2007-10-12 00:05:43 UTC (rev 8609) +++ modules/test/trunk/unit/src/main/org/jboss/unit/info/impl/SimpleTestCas= eInfo.java 2007-10-12 00:33:46 UTC (rev 8610) @@ -39,4 +39,9 @@ { super(that); } + + public String toString() + { + return getName(); + } } Modified: modules/test/trunk/unit/src/main/org/jboss/unit/info/impl/SimpleT= estSuiteInfo.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/info/impl/SimpleTestSui= teInfo.java 2007-10-12 00:05:43 UTC (rev 8609) +++ modules/test/trunk/unit/src/main/org/jboss/unit/info/impl/SimpleTestSui= teInfo.java 2007-10-12 00:33:46 UTC (rev 8610) @@ -31,6 +31,7 @@ import java.util.HashMap; import java.util.Set; import java.util.Collections; +import java.util.Iterator; = /** * @author Julien Viet @@ -142,4 +143,21 @@ return new SimpleTestCaseInfo(testCase); } } + + public String toString() + { + StringBuilder builder =3D new StringBuilder(getName()); + builder.append('['); + for (Iterator i =3D tests.values().iterator();i.hasNext();) + { + TestInfo test =3D (TestInfo)i.next(); + builder.append(test); + if (i.hasNext()) + { + builder.append(','); + } + } + builder.append(']'); + return builder.toString(); + } } --===============2741891106539562712==-- From portal-commits at lists.jboss.org Thu Oct 11 20:33:50 2007 Content-Type: multipart/mixed; boundary="===============7107023267816732877==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8611 - in docs: trunk/referenceGuide/en/modules and 1 other directory. Date: Thu, 11 Oct 2007 20:33:50 -0400 Message-ID: --===============7107023267816732877== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: chris.laprun(a)jboss.com Date: 2007-10-11 20:33:50 -0400 (Thu, 11 Oct 2007) New Revision: 8611 Modified: docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/configur= ation.xml docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/installa= tion.xml docs/trunk/referenceGuide/en/modules/configuration.xml docs/trunk/referenceGuide/en/modules/installation.xml Log: - Minor content improvements. Modified: docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/c= onfiguration.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/configu= ration.xml 2007-10-12 00:33:46 UTC (rev 8610) +++ docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/configu= ration.xml 2007-10-12 00:33:50 UTC (rev 8611) @@ -28,31 +28,25 @@ port manually. Since port forwarding is not always possible, belo= w are the instructions to change the port number manually. - To change it, you need to edit the file - $JBOSS_HOME/server/default/deploy/jbossweb-tomcat55.sar/= server.xml - and change the port value of the HTTP Connector. You can also cha= nge the value of the SSL - port, by default it is set to 8443. Remember to uncomment the fol= lowing when you have - configured it: - - - --> - ]]> - + To change it, you need to edit the file $JBOSS_HOME/s= erver/default/deploy/jboss-web.deployer/server.xml + ($JBOSS_HOME/server/default/deploy/jbossweb-tomcat55.sar= /server.xml on JBoss AS 4.0.x) + and change the port value of the HTTP Connector. - Please refer to to update the WSRP= after having changed the port. + You can also change the value of the SSL port, by default it is s= et to 8443. To activate support for HTTPS, + please refer to the appropriate + chapter of the + JBoss AS guide. You might also want to refer to + Tomcat's SSL configuration how-to + for more details. + + Please refer to to update the WSRP= service after having changed the port. + Now you can restart JBoss and use the new port that you define= d. On systems like Linux, you need privileges to be able to run a server on a port lower th= an 1000, starting JBoss on - the port 80 as a regular user will not work, for testing you can = log as root but is not - recommended if the server is public as it could be a security bre= ach in your system. + the port 80 as a regular user will not work. For testing purposes= , you can start JBoss AS as root but this + setup is not recommended if the server is public as it could lead= to security breaches of your system. @@ -65,9 +59,16 @@ . - By default, Tomcat holds on to the root context '/'. You may need= to either remove the - $JBOSS_HOME\server\default\deploy\jbossweb-tomcat55.sar= \ROOT.war - or add a jboss-web.xml (declaring another context-root other than= '/')under its WEB-INFO directory for the below changes to take effect on r= estart. + By default, Tomcat holds on to the root context '/'. You may need= to either remove + $JBOSS_HOME/server/default/deploy/jboss-web.deployer/ROO= T.war + ($JBOSS_HOME/server/default/deploy/jbossweb-tomcat55.sar= /ROOT.war on JBoss AS 4.0.x) + or add a jboss-web.xml file (declaring another= context-root other than '/') under + ROOT.war/WEB-INF directory for the below chang= es to take effect on restart. + + + /tomcat-root +]]> You can accomplish this, with either a deployed jboss-portal.s= ar or before you build from source: @@ -134,79 +135,40 @@ Under most common circumstances, the auto-detect feature sh= ould work fine. - DB Dialect settings for the portal core - Modify - jboss-portal.sar/conf/hibernate/[module]/hibernate.c= fg.xml - . A list of supported dialects - for Hibernate3, can be found - here - - . + DB Dialect settings for Portal + You will need to modify all the hibernate.cfg.xml<= /literal> files in all the Portal modules you + intend to use by uncommenting the following line in these file= s and using the appropriate dialect (see + here + for a list of supported dialects in Hibernate 3): - - - -java:PortalDS -false -org.hibernate.cache.EhCacheProvide= r -true - - - - - - = - ]]> +-->]]> + These files are found in jboss-portal.sar/[module]= /conf/hibernate/[directory]/hibernate.cfg.xml + where [module] is a module name and [directory] is a directory that + may or may not be present. + DB Dialect settings for the CMS component - Modify - jboss-portal.sar/portal-cms.sar/conf/hibernate/cms/h= ibernate.cfg.xml - . A list of supported dialects - for Hibernate3, can be found - here - - . + Modify jboss-portal.sar/portal-cms.sar/conf/hibern= ate/cms/hibernate.cfg.xml by + uncommenting the following line in these files and using the a= ppropriate dialect (see + here + for a list of supported dialects in Hibernate 3): - - - - java:@portal.datasource.nam= e@ - @portal.sql.show@ - false - true - - - - - - - -]]> + +]]> Setting up the email service To be able to use the email service (for example to verify use= r emails when someone subscribes or for CMS - workflow notifications) it has to be configured correctly. To config= ure it, go to = + workflow notifications) it has to be configured correctly. To config= ure it, go to jboss-portal.sar/portal-core.sar/META-INF/jboss-service.xml= . In this file, the mail module is configured like this: 10000 java:portal/MailModule ]]> - Here you can specify a different SMTP server than localhost, then= precise the Smtp username and Smtp passwords to - use to send the mails. - If i wanted to use GMail smtp server, i would write: + Here you can specify a different SMTP server than localhost, then= precise the SMTP username and SMTP password to + use to send emails. + For example, to use GMail's SMTP server: If you need to install JBoss Portal on JBoss AS 4.0.x, plea= se refer to the dedicated wiki page. - = + Installing from Bundled Download - This is the easiest and fastest way to get JBoss Portal instal= led and running. The reason, is that the + This is the easiest and fastest way to get JBoss Portal instal= led and running. The reason is that the download bundle contains JBoss Application Server, and JBoss Port= al uses the embedded Hypersonic Database. @@ -104,11 +104,7 @@ subscription contract with Red Hat, can have access to the = EAP version from the s= upport portal. For the other versions you can get them - here - - . + here . Make sure to download the JBoss AS Zip version. DO NOT ATTEMPT to deploy JBoss P= ortal on the installer version of JBoss AS! @@ -155,7 +151,8 @@ contains pre-configured datasource descriptors, you can use= for most popular RDBMS under the setup directory. For more details about the datasource descriptor= or if your database server is not part - of the pre-built descriptors, please refer to: the d= edicated wiki page. + of the pre-built descriptors, please refer to + the dedicated wiki page. @@ -568,4 +565,4 @@ - = + Modified: docs/trunk/referenceGuide/en/modules/configuration.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- docs/trunk/referenceGuide/en/modules/configuration.xml 2007-10-12 00:33= :46 UTC (rev 8610) +++ docs/trunk/referenceGuide/en/modules/configuration.xml 2007-10-12 00:33= :50 UTC (rev 8611) @@ -28,31 +28,25 @@ port manually. Since port forwarding is not always possible, belo= w are the instructions to change the port number manually. - To change it, you need to edit the file - $JBOSS_HOME/server/default/deploy/jbossweb-tomcat55.sar/= server.xml - and change the port value of the HTTP Connector. You can also cha= nge the value of the SSL - port, by default it is set to 8443. Remember to uncomment the fol= lowing when you have - configured it: - - - --> - ]]> - + To change it, you need to edit the file $JBOSS_HOME/s= erver/default/deploy/jboss-web.deployer/server.xml + ($JBOSS_HOME/server/default/deploy/jbossweb-tomcat55.sar= /server.xml on JBoss AS 4.0.x) + and change the port value of the HTTP Connector. - Please refer to to update the WSRP= after having changed the port. + You can also change the value of the SSL port, by default it is s= et to 8443. To activate support for HTTPS, + please refer to the appropriate + chapter of the + JBoss AS guide. You might also want to refer to + Tomcat's SSL configuration how-to + for more details. + + Please refer to to update the WSRP= service after having changed the port. + Now you can restart JBoss and use the new port that you define= d. On systems like Linux, you need privileges to be able to run a server on a port lower th= an 1000, starting JBoss on - the port 80 as a regular user will not work, for testing you can = log as root but is not - recommended if the server is public as it could be a security bre= ach in your system. + the port 80 as a regular user will not work. For testing purposes= , you can start JBoss AS as root but this + setup is not recommended if the server is public as it could lead= to security breaches of your system. @@ -65,9 +59,16 @@ . - By default, Tomcat holds on to the root context '/'. You may need= to either remove the - $JBOSS_HOME\server\default\deploy\jbossweb-tomcat55.sar= \ROOT.war - or add a jboss-web.xml (declaring another context-root other than= '/')under its WEB-INFO directory for the below changes to take effect on r= estart. + By default, Tomcat holds on to the root context '/'. You may need= to either remove + $JBOSS_HOME/server/default/deploy/jboss-web.deployer/ROO= T.war + ($JBOSS_HOME/server/default/deploy/jbossweb-tomcat55.sar= /ROOT.war on JBoss AS 4.0.x) + or add a jboss-web.xml file (declaring another= context-root other than '/') under + ROOT.war/WEB-INF directory for the below chang= es to take effect on restart. + + + /tomcat-root = +]]> You can accomplish this, with either a deployed jboss-portal.s= ar or before you build from source: @@ -134,72 +135,33 @@ Under most common circumstances, the auto-detect feature sh= ould work fine. - DB Dialect settings for the portal core - Modify - jboss-portal.sar/conf/hibernate/[module]/hibernate.c= fg.xml - . A list of supported dialects - for Hibernate3, can be found - here - - . + DB Dialect settings for Portal + You will need to modify all the hibernate.cfg.xml<= /literal> files in all the Portal modules you + intend to use by uncommenting the following line in these file= s and using the appropriate dialect (see + here + for a list of supported dialects in Hibernate 3): - - - -java:PortalDS -false -org.hibernate.cache.EhCacheProvide= r -true - - - - - - = - ]]> +-->]]> + These files are found in jboss-portal.sar/[module]= /conf/hibernate/[directory]/hibernate.cfg.xml + where [module] is a module name and [directory] is a directory that + may or may not be present. + DB Dialect settings for the CMS component - Modify - jboss-portal.sar/portal-cms.sar/conf/hibernate/cms/h= ibernate.cfg.xml - . A list of supported dialects - for Hibernate3, can be found - here - - . + Modify jboss-portal.sar/portal-cms.sar/conf/hibern= ate/cms/hibernate.cfg.xml by + uncommenting the following line in these files and using the a= ppropriate dialect (see + here + for a list of supported dialects in Hibernate 3): - - - - java:@portal.datasource.nam= e@ - @portal.sql.show@ - false - true - - - - - - - -]]> + +]]> @@ -226,9 +188,9 @@ 10000 java:portal/MailModule ]]> - Here you can specify a different SMTP server than localhost, then= precise the Smtp username and Smtp passwords to - use to send the mails. - If i wanted to use GMail smtp server, i would write: + Here you can specify a different SMTP server than localhost, then= precise the SMTP username and SMTP password to + use to send emails. + For example, to use GMail's SMTP server: Installing from Bundled Download - This is the easiest and fastest way to get JBoss Portal instal= led and running. The reason, is that the + This is the easiest and fastest way to get JBoss Portal instal= led and running. The reason is that the download bundle contains JBoss Application Server, and JBoss Port= al uses the embedded Hypersonic Database. @@ -104,11 +104,7 @@ subscription contract with Red Hat, can have access to the = EAP version from the s= upport portal. For the other versions you can get them - here - - . + here . Make sure to download the JBoss AS Zip version. DO NOT ATTEMPT to deploy JBoss P= ortal on the installer version of JBoss AS! @@ -155,7 +151,8 @@ contains pre-configured datasource descriptors, you can use= for most popular RDBMS under the setup directory. For more details about the datasource descriptor= or if your database server is not part - of the pre-built descriptors, please refer to: the d= edicated wiki page. + of the pre-built descriptors, please refer to + the dedicated wiki page. --===============7107023267816732877==-- From portal-commits at lists.jboss.org Fri Oct 12 06:24:41 2007 Content-Type: multipart/mixed; boundary="===============7847519150750425774==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8612 - docs/trunk/referenceGuide/en/modules. Date: Fri, 12 Oct 2007 06:24:41 -0400 Message-ID: --===============7847519150750425774== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: thomas.heute(a)jboss.com Date: 2007-10-12 06:24:41 -0400 (Fri, 12 Oct 2007) New Revision: 8612 Modified: docs/trunk/referenceGuide/en/modules/identity.xml Log: Useless warning, it will only evolve in the next major release, which is ex= pected. Modified: docs/trunk/referenceGuide/en/modules/identity.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- docs/trunk/referenceGuide/en/modules/identity.xml 2007-10-12 00:33:50 U= TC (rev 8611) +++ docs/trunk/referenceGuide/en/modules/identity.xml 2007-10-12 10:24:41 U= TC (rev 8612) @@ -10,11 +10,6 @@ This chapter addresses identity management in JBoss Portal 2.6 Identity management API - - - JBoss Portal Identity API can evolve over time and is not offi= cially supported. - - Since JBoss Portal 2.6 there are 4 identity services and 2 ide= ntity related interfaces. The goal of having such a fine grained API is to enable flexible implementati= ons based on different identity storage like relational databases or LDAP servers. The M= embership service takes care of managing the relationship --===============7847519150750425774==-- From portal-commits at lists.jboss.org Fri Oct 12 09:06:00 2007 Content-Type: multipart/mixed; boundary="===============3606631075172996336==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8613 - in modules/test/trunk: remote/src/main/org/jboss/unit/remote/driver and 17 other directories. Date: Fri, 12 Oct 2007 09:04:20 -0400 Message-ID: --===============3606631075172996336== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: julien(a)jboss.com Date: 2007-10-12 09:04:19 -0400 (Fri, 12 Oct 2007) New Revision: 8613 Added: modules/test/trunk/tooling/src/main/org/jboss/unit/tooling/ant/PropertyT= ype.java modules/test/trunk/unit/src/main/org/jboss/unit/driver/AbstractTestDrive= r.java modules/test/trunk/unit/src/main/org/jboss/unit/driver/DriverContext.java modules/test/trunk/unit/src/main/org/jboss/unit/driver/impl/pojo/SimpleD= riverContext.java modules/test/trunk/unit/src/main/org/jboss/unit/runner/NullTestRunnerCon= text.java modules/test/trunk/unit/src/main/org/jboss/unit/runner/TestRunnerContext= .java modules/test/trunk/unit/src/main/org/jboss/unit/tooling/MainTestRunnerCo= ntext.java Modified: modules/test/trunk/remote/src/main/org/jboss/unit/remote/ResponseContext= .java modules/test/trunk/remote/src/main/org/jboss/unit/remote/driver/RemoteTe= stDriverClient.java modules/test/trunk/remote/src/main/org/jboss/unit/remote/driver/RemoteTe= stDriverServer.java modules/test/trunk/remote/src/main/org/jboss/unit/remote/driver/handler/= deployer/DeployerHandler.java modules/test/trunk/remote/src/main/org/jboss/unit/remote/driver/handler/= deployer/response/DeployerResponse.java modules/test/trunk/remote/src/main/org/jboss/unit/remote/driver/handler/= http/HTTPConversation.java modules/test/trunk/remote/src/main/org/jboss/unit/remote/driver/handler/= http/command/HTTPDriverCommand.java modules/test/trunk/remote/src/main/org/jboss/unit/remote/driver/handler/= http/response/HTTPDriverResponse.java modules/test/trunk/tooling/src/main/org/jboss/unit/tooling/ant/TestsType= .java modules/test/trunk/unit/src/main/org/jboss/test/unit/runner/CompositeTes= tRunnerTests.java modules/test/trunk/unit/src/main/org/jboss/test/unit/runner/GenericTestR= unnerTests.java modules/test/trunk/unit/src/main/org/jboss/test/unit/runner/TestDriverRu= nnerTests.java modules/test/trunk/unit/src/main/org/jboss/unit/driver/DriverResponse.ja= va modules/test/trunk/unit/src/main/org/jboss/unit/driver/TestDriver.java modules/test/trunk/unit/src/main/org/jboss/unit/driver/impl/pojo/POJOTes= tSuiteDriver.java modules/test/trunk/unit/src/main/org/jboss/unit/runner/AbstractTestRunne= r.java modules/test/trunk/unit/src/main/org/jboss/unit/runner/TestRunner.java modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/composite/Co= mpositeTestRunner.java modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/driver/TestD= riverRunner.java modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/event/EventD= rivenTestRunner.java modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/failure/Fail= ureTestRunner.java modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/generic/Gene= ricTestRunner.java modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/pojo/POJOTes= tRunner.java modules/test/trunk/unit/src/main/org/jboss/unit/tooling/Main.java modules/test/trunk/unit/src/main/org/jboss/unit/tooling/MainBuilder.java Log: start to add property support + introduced TestRunnerContext + introduced T= estDriver life cycle and contextualization Modified: modules/test/trunk/remote/src/main/org/jboss/unit/remote/Response= Context.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/remote/src/main/org/jboss/unit/remote/ResponseContex= t.java 2007-10-12 10:24:41 UTC (rev 8612) +++ modules/test/trunk/remote/src/main/org/jboss/unit/remote/ResponseContex= t.java 2007-10-12 13:04:19 UTC (rev 8613) @@ -31,7 +31,7 @@ * @author Julien Viet * @version $Revision: 1.1 $ */ -public class ResponseContext +public class ResponseContext implements Serializable { = /** The test response. */ Modified: modules/test/trunk/remote/src/main/org/jboss/unit/remote/driver/R= emoteTestDriverClient.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/remote/src/main/org/jboss/unit/remote/driver/RemoteT= estDriverClient.java 2007-10-12 10:24:41 UTC (rev 8612) +++ modules/test/trunk/remote/src/main/org/jboss/unit/remote/driver/RemoteT= estDriverClient.java 2007-10-12 13:04:19 UTC (rev 8613) @@ -25,12 +25,12 @@ import org.jboss.unit.driver.TestDriver; import org.jboss.unit.driver.DriverCommand; import org.jboss.unit.driver.DriverResponse; +import org.jboss.unit.driver.DriverContext; import org.jboss.unit.driver.response.FailureResponse; import org.jboss.unit.driver.command.StartTestCommand; import org.jboss.unit.info.TestInfo; import org.jboss.unit.info.TestSuiteInfo; import org.jboss.unit.info.impl.SimpleTestSuiteInfo; -import org.jboss.unit.info.impl.SimpleParameterInfo; import org.jboss.unit.TestId; import org.jboss.unit.Failure; import org.jboss.portal.test.framework.server.NodeId; @@ -45,8 +45,6 @@ import org.jboss.beans.metadata.plugins.annotations.Inject; = import java.net.URL; -import java.util.Map; -import java.util.HashMap; = /** * @author Julien Viet @@ -63,6 +61,9 @@ // Services = /** . */ + private DriverContext context; + + /** . */ private NodeManager nodeManager; = /** . */ @@ -86,11 +87,6 @@ return archivePath; } = - public void setArchivePath(String archivePath) - { - this.archivePath =3D archivePath; - } - public NodeManager getNodeManager() { return nodeManager; @@ -118,62 +114,71 @@ return (RemoteTestDriver)node.lookupService(RemoteTestDriver.SERVICE= _ID); } = - private boolean started =3D false; private FailureResponse failed; private KernelDeployment deployment; private BeanXMLDeployer beanDeployer; = - private void start() + public void initDriver(DriverContext context) { - if (!started && failed =3D=3D null) - { + this.context =3D context; = - // - run(); + // Get this property + this.archivePath =3D context.getProperty("archivePath"); = - // Install our self first - try - { - AbstractBeanMetaData bmd =3D new AbstractBeanMetaData("TestDri= ver", getClass().getName()); - AbstractConstructorMetaData cmd =3D new AbstractConstructorMet= aData(); - bmd.setConstructor(cmd); - TestCaseFactory factory =3D new TestCaseFactory(this); - AbstractValueMetaData vmd =3D new AbstractValueMetaData(factor= y); - cmd.setFactory(vmd); - cmd.setFactoryMethod("getTestCase"); - getKernel().getController().install(bmd); - } - catch (Throwable throwable) - { - throwable.printStackTrace(); - failed =3D new FailureResponse(Failure.createErrorFailure("Cou= ld not startup kernel", throwable)); - return; - } + // + run(); = - // Now deploy beans - try - { - URL url =3D getClass().getResource("/org/jboss/unit/remote/dri= ver/jboss-beans.xml"); - beanDeployer =3D new BeanXMLDeployer(getKernel()); - deployment =3D beanDeployer.deploy(url); - beanDeployer.validate(); - } - catch (Throwable throwable) - { - throwable.printStackTrace(); - failed =3D new FailureResponse(Failure.createErrorFailure("Cou= ld not deploy beans", throwable)); - return; - } + // Install our self first + try + { + AbstractBeanMetaData bmd =3D new AbstractBeanMetaData("TestDriver= ", getClass().getName()); + AbstractConstructorMetaData cmd =3D new AbstractConstructorMetaDa= ta(); + bmd.setConstructor(cmd); + TestCaseFactory factory =3D new TestCaseFactory(this); + AbstractValueMetaData vmd =3D new AbstractValueMetaData(factory); + cmd.setFactory(vmd); + cmd.setFactoryMethod("getTestCase"); + getKernel().getController().install(bmd); + } + catch (Throwable throwable) + { + throwable.printStackTrace(); + failed =3D new FailureResponse(Failure.createErrorFailure("Could = not startup kernel", throwable)); + return; + } = - // - started =3D true; + // Now deploy beans + try + { + URL url =3D getClass().getResource("/org/jboss/unit/remote/driver= /jboss-beans.xml"); + beanDeployer =3D new BeanXMLDeployer(getKernel()); + deployment =3D beanDeployer.deploy(url); + beanDeployer.validate(); } + catch (Throwable throwable) + { + throwable.printStackTrace(); + failed =3D new FailureResponse(Failure.createErrorFailure("Could = not deploy beans", throwable)); + } } = - public TestInfo getInfo() + public void destroyDriver() { - start(); + try + { + beanDeployer.undeploy(deployment); + } + catch (Throwable ignore) + { + ignore.printStackTrace(); + } = + // + this.context =3D null; + } + + public TestInfo getInfo() + { // Always retrieve meta data from the default node Node node =3D nodeManager.getNode(NodeId.DEFAULT); = @@ -181,33 +186,13 @@ TestDriver server =3D getServer(node); = // - SimpleTestSuiteInfo testInfo =3D new SimpleTestSuiteInfo((TestSuiteI= nfo)server.getInfo()); - - System.out.println("testInfo =3D " + testInfo); - - // - Map parameters =3D new HashMap(testInfo.getParameters()); - - // - parameters.put("archivePath", new SimpleParameterInfo("archivePath")= ); - - // - testInfo.setParameters(parameters); - - // - return testInfo; + return new SimpleTestSuiteInfo((TestSuiteInfo)server.getInfo()); } = public DriverResponse invoke(TestId testId, DriverCommand command) { - start(); - - // if (command instanceof StartTestCommand) { - StartTestCommand start =3D (StartTestCommand)command; - archivePath =3D start.getParametrization().get("archivePath"); - try { Node node =3D nodeManager.getNode(NodeId.DEFAULT); @@ -222,17 +207,6 @@ { return new FailureResponse(Failure.createErrorFailure(e)); } - finally - { - try - { - beanDeployer.undeploy(deployment); - } - catch (Throwable ignore) - { - ignore.printStackTrace(); - } - } } else { Modified: modules/test/trunk/remote/src/main/org/jboss/unit/remote/driver/R= emoteTestDriverServer.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/remote/src/main/org/jboss/unit/remote/driver/RemoteT= estDriverServer.java 2007-10-12 10:24:41 UTC (rev 8612) +++ modules/test/trunk/remote/src/main/org/jboss/unit/remote/driver/RemoteT= estDriverServer.java 2007-10-12 13:04:19 UTC (rev 8613) @@ -27,6 +27,7 @@ import org.jboss.unit.driver.DriverResponse; import org.jboss.unit.driver.DriverCommand; import org.jboss.unit.driver.TestDriver; +import org.jboss.unit.driver.AbstractTestDriver; import org.jboss.unit.driver.response.FailureResponse; import org.jboss.unit.info.TestInfo; import org.jboss.unit.info.impl.SimpleTestSuiteInfo; @@ -40,7 +41,7 @@ * @author Julien Viet * @version $Revision: 5636 $ */ -public class RemoteTestDriverServer implements RemoteTestDriver +public class RemoteTestDriverServer extends AbstractTestDriver implements = RemoteTestDriver { = /** . */ Modified: modules/test/trunk/remote/src/main/org/jboss/unit/remote/driver/h= andler/deployer/DeployerHandler.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/remote/src/main/org/jboss/unit/remote/driver/handler= /deployer/DeployerHandler.java 2007-10-12 10:24:41 UTC (rev 8612) +++ modules/test/trunk/remote/src/main/org/jboss/unit/remote/driver/handler= /deployer/DeployerHandler.java 2007-10-12 13:04:19 UTC (rev 8613) @@ -119,11 +119,24 @@ return new RemoteDriverCommandContext(responseContext.getCommandC= ontext()); } = + // + if (nextHandler !=3D null) + { + return nextHandler.handleResponse(testConversation, responseConte= xt); + } + + // return null; } = public RemoteDriverResponseContext handleCommand(TestConversation conve= rsation, RemoteDriverCommandContext commandContext) throws Exception { - return nextHandler.handleCommand(conversation, commandContext); + if (nextHandler !=3D null) + { + return nextHandler.handleCommand(conversation, commandContext); + } + + // + return null; } } Modified: modules/test/trunk/remote/src/main/org/jboss/unit/remote/driver/h= andler/deployer/response/DeployerResponse.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/remote/src/main/org/jboss/unit/remote/driver/handler= /deployer/response/DeployerResponse.java 2007-10-12 10:24:41 UTC (rev 8612) +++ modules/test/trunk/remote/src/main/org/jboss/unit/remote/driver/handler= /deployer/response/DeployerResponse.java 2007-10-12 13:04:19 UTC (rev 8613) @@ -24,12 +24,10 @@ = import org.jboss.unit.driver.DriverResponse; = -import java.io.Serializable; - /** * @author Julien Viet * @version $Revision: 1.1 $ */ -public class DeployerResponse extends DriverResponse implements Serializab= le +public class DeployerResponse extends DriverResponse { } Modified: modules/test/trunk/remote/src/main/org/jboss/unit/remote/driver/h= andler/http/HTTPConversation.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/remote/src/main/org/jboss/unit/remote/driver/handler= /http/HTTPConversation.java 2007-10-12 10:24:41 UTC (rev 8612) +++ modules/test/trunk/remote/src/main/org/jboss/unit/remote/driver/handler= /http/HTTPConversation.java 2007-10-12 13:04:19 UTC (rev 8613) @@ -189,8 +189,16 @@ = private RemoteDriverResponseContext decodeHTTPResponse(RemoteDriverComm= andContext commandContext, HttpMethod httpMethod) throws Exception { + DriverResponse response =3D null; + + // ResponseContext ctx =3D conversation.popContext(); - DriverResponse response =3D ctx.getResponse(); + if (ctx !=3D null) + { + response =3D ctx.getResponse(); + } + + // int status =3D httpMethod.getStatusCode(); switch (status) { Modified: modules/test/trunk/remote/src/main/org/jboss/unit/remote/driver/h= andler/http/command/HTTPDriverCommand.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/remote/src/main/org/jboss/unit/remote/driver/handler= /http/command/HTTPDriverCommand.java 2007-10-12 10:24:41 UTC (rev 8612) +++ modules/test/trunk/remote/src/main/org/jboss/unit/remote/driver/handler= /http/command/HTTPDriverCommand.java 2007-10-12 13:04:19 UTC (rev 8613) @@ -24,12 +24,10 @@ = import org.jboss.unit.driver.DriverCommand; = -import java.io.Serializable; - /** * @author Julien Viet * @version $Revision: 1.1 $ */ -public class HTTPDriverCommand extends DriverCommand implements Serializab= le +public class HTTPDriverCommand extends DriverCommand { } Modified: modules/test/trunk/remote/src/main/org/jboss/unit/remote/driver/h= andler/http/response/HTTPDriverResponse.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/remote/src/main/org/jboss/unit/remote/driver/handler= /http/response/HTTPDriverResponse.java 2007-10-12 10:24:41 UTC (rev 8612) +++ modules/test/trunk/remote/src/main/org/jboss/unit/remote/driver/handler= /http/response/HTTPDriverResponse.java 2007-10-12 13:04:19 UTC (rev 8613) @@ -24,12 +24,10 @@ = import org.jboss.unit.driver.DriverResponse; = -import java.io.Serializable; - /** * @author Julien Viet * @version $Revision: 1.1 $ */ -public abstract class HTTPDriverResponse extends DriverResponse implements= Serializable +public abstract class HTTPDriverResponse extends DriverResponse { } Added: modules/test/trunk/tooling/src/main/org/jboss/unit/tooling/ant/Prope= rtyType.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/tooling/src/main/org/jboss/unit/tooling/ant/Property= Type.java (rev 0) +++ modules/test/trunk/tooling/src/main/org/jboss/unit/tooling/ant/Property= Type.java 2007-10-12 13:04:19 UTC (rev 8613) @@ -0,0 +1,59 @@ +/*************************************************************************= ***** + * JBoss, a division of Red Hat = * + * Copyright 2006, Red Hat Middleware, LLC, and individual = * + * contributors as indicated by the @authors tag. See the = * + * copyright.txt in the distribution for a full listing of = * + * individual contributors. = * + * = * + * This is free software; you can redistribute it and/or modify it = * + * under the terms of the GNU Lesser General Public License as = * + * published by the Free Software Foundation; either version 2.1 of = * + * the License, or (at your option) any later version. = * + * = * + * This software is distributed in the hope that it will be useful, = * + * but WITHOUT ANY WARRANTY; without even the implied warranty of = * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU = * + * Lesser General Public License for more details. = * + * = * + * You should have received a copy of the GNU Lesser General Public = * + * License along with this software; if not, write to the Free = * + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA = * + * 02110-1301 USA, or see the FSF site: http://www.fsf.org. = * + *************************************************************************= *****/ +package org.jboss.unit.tooling.ant; + +/** + * A property. + * + * @author Julien Viet + * @version $Revision: 1.1 $ + */ +public class PropertyType +{ + + /** . */ + private String name; + + /** . */ + private String value; + + public String getName() + { + return name; + } + + public void setName(String name) + { + this.name =3D name; + } + + public String getValue() + { + return value; + } + + public void setValue(String value) + { + this.value =3D value; + } +} Modified: modules/test/trunk/tooling/src/main/org/jboss/unit/tooling/ant/Te= stsType.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/tooling/src/main/org/jboss/unit/tooling/ant/TestsTyp= e.java 2007-10-12 10:24:41 UTC (rev 8612) +++ modules/test/trunk/tooling/src/main/org/jboss/unit/tooling/ant/TestsTyp= e.java 2007-10-12 13:04:19 UTC (rev 8613) @@ -35,6 +35,7 @@ import java.util.List; import java.util.LinkedList; import java.util.Set; +import java.util.ArrayList; = /** * @author Boleslaw Dawidowicz @@ -46,9 +47,9 @@ = private boolean fork =3D true; = - private List includes =3D new LinkedList(); + private List includes =3D new LinkedList(); = - private List excludes =3D new LinkedList(); + private List excludes =3D new LinkedList(); = private ReportsType reports; = @@ -60,7 +61,9 @@ = private boolean jpda; = + private List properties =3D new ArrayList(); = + public TestsType() { } @@ -256,6 +259,11 @@ { javaTask.createArg().setValue(generateArgument(excludeFilter.getK= eywords(), Main.OPT_EX_KEYWORDS)); } + + for (PropertyType property : properties) + { + javaTask.createArg().setValue(Main.OPT_PROPERTY + "=3D" + propert= y.getName() + "=3D" + property.getValue()); + } } = private String generateArgument(Set values, String argumentName) @@ -289,6 +297,11 @@ this.reports =3D reports; } = + public void addConfiguredProperty(PropertyType property) + { + this.properties.add(property); + } + public void addTask(Task task) { //To change body of implemented methods use File | Settings | File T= emplates. Modified: modules/test/trunk/unit/src/main/org/jboss/test/unit/runner/Compo= siteTestRunnerTests.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/test/unit/runner/CompositeTe= stRunnerTests.java 2007-10-12 10:24:41 UTC (rev 8612) +++ modules/test/trunk/unit/src/main/org/jboss/test/unit/runner/CompositeTe= stRunnerTests.java 2007-10-12 13:04:19 UTC (rev 8613) @@ -27,6 +27,7 @@ import org.jboss.unit.runner.TestFilter; import org.jboss.unit.runner.TestRunnerEvent; import org.jboss.unit.runner.TestRunnerEventListener; +import org.jboss.unit.runner.TestRunnerContext; import org.jboss.unit.runner.impl.composite.CompositeTestRunner; = import static org.jboss.unit.api.Assert.*; @@ -181,7 +182,7 @@ = boolean invoked; = - protected void internalRun(TestFilter filter) + protected void internalRun(TestRunnerContext context) { invoked =3D true; fireEvent(event); @@ -194,7 +195,7 @@ /** . */ final RuntimeException exception =3D new RuntimeException(); = - protected void internalRun(TestFilter filter) + protected void internalRun(TestRunnerContext context) { throw exception; } @@ -206,7 +207,7 @@ /** . */ final Error error =3D new Error(); = - protected void internalRun(TestFilter filter) + protected void internalRun(TestRunnerContext context) { throw error; } Modified: modules/test/trunk/unit/src/main/org/jboss/test/unit/runner/Gener= icTestRunnerTests.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/test/unit/runner/GenericTest= RunnerTests.java 2007-10-12 10:24:41 UTC (rev 8612) +++ modules/test/trunk/unit/src/main/org/jboss/test/unit/runner/GenericTest= RunnerTests.java 2007-10-12 13:04:19 UTC (rev 8613) @@ -28,6 +28,7 @@ import org.jboss.unit.driver.TestDriver; import org.jboss.unit.driver.DriverResponse; import org.jboss.unit.driver.DriverCommand; +import org.jboss.unit.driver.AbstractTestDriver; import org.jboss.unit.driver.command.StartTestCommand; import org.jboss.unit.driver.response.EndTestResponse; import org.jboss.unit.info.TestInfo; @@ -105,7 +106,7 @@ assertEquals(list(new HashMap(), new HashMap()), Driver1.parametriza= tions); } = - public static class Driver1 implements TestDriver + public static class Driver1 extends AbstractTestDriver { = static SimpleTestSuiteInfo testSuiteInfo; Modified: modules/test/trunk/unit/src/main/org/jboss/test/unit/runner/TestD= riverRunnerTests.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/test/unit/runner/TestDriverR= unnerTests.java 2007-10-12 10:24:41 UTC (rev 8612) +++ modules/test/trunk/unit/src/main/org/jboss/test/unit/runner/TestDriverR= unnerTests.java 2007-10-12 13:04:19 UTC (rev 8613) @@ -36,6 +36,7 @@ import org.jboss.unit.driver.TestDriver; import org.jboss.unit.driver.DriverResponse; import org.jboss.unit.driver.DriverCommand; +import org.jboss.unit.driver.AbstractTestDriver; import org.jboss.unit.driver.command.StartTestCommand; import org.jboss.unit.driver.response.EndTestResponse; import org.jboss.unit.driver.response.FailureResponse; @@ -376,7 +377,7 @@ assertStartTestEvent(listener.events.get(1), new TestId("Foo")); } = - private static class TestDriverImpl implements TestDriver + private static class TestDriverImpl extends AbstractTestDriver { = List ids =3D new ArrayList(); Added: modules/test/trunk/unit/src/main/org/jboss/unit/driver/AbstractTestD= river.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/driver/AbstractTestDriv= er.java (rev 0) +++ modules/test/trunk/unit/src/main/org/jboss/unit/driver/AbstractTestDriv= er.java 2007-10-12 13:04:19 UTC (rev 8613) @@ -0,0 +1,67 @@ +/*************************************************************************= ***** + * JBoss, a division of Red Hat = * + * Copyright 2006, Red Hat Middleware, LLC, and individual = * + * contributors as indicated by the @authors tag. See the = * + * copyright.txt in the distribution for a full listing of = * + * individual contributors. = * + * = * + * This is free software; you can redistribute it and/or modify it = * + * under the terms of the GNU Lesser General Public License as = * + * published by the Free Software Foundation; either version 2.1 of = * + * the License, or (at your option) any later version. = * + * = * + * This software is distributed in the hope that it will be useful, = * + * but WITHOUT ANY WARRANTY; without even the implied warranty of = * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU = * + * Lesser General Public License for more details. = * + * = * + * You should have received a copy of the GNU Lesser General Public = * + * License along with this software; if not, write to the Free = * + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA = * + * 02110-1301 USA, or see the FSF site: http://www.fsf.org. = * + *************************************************************************= *****/ +package org.jboss.unit.driver; + +/** + * @author Julien Viet + * @version $Revision: 1.1 $ + */ +public abstract class AbstractTestDriver implements TestDriver +{ + + /** . */ + private DriverContext context; + + public void initDriver(DriverContext context) + { + this.context =3D context; + + // + doInit(); + } + + protected void doInit() + { + } + + protected void doDestroy() + { + } + + protected DriverContext getContext() + { + return context; + } + + public void destroyDriver() + { + try + { + doDestroy(); + } + finally + { + this.context =3D null; + } + } +} Added: modules/test/trunk/unit/src/main/org/jboss/unit/driver/DriverContext= .java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/driver/DriverContext.ja= va (rev 0) +++ modules/test/trunk/unit/src/main/org/jboss/unit/driver/DriverContext.ja= va 2007-10-12 13:04:19 UTC (rev 8613) @@ -0,0 +1,42 @@ +/*************************************************************************= ***** + * JBoss, a division of Red Hat = * + * Copyright 2006, Red Hat Middleware, LLC, and individual = * + * contributors as indicated by the @authors tag. See the = * + * copyright.txt in the distribution for a full listing of = * + * individual contributors. = * + * = * + * This is free software; you can redistribute it and/or modify it = * + * under the terms of the GNU Lesser General Public License as = * + * published by the Free Software Foundation; either version 2.1 of = * + * the License, or (at your option) any later version. = * + * = * + * This software is distributed in the hope that it will be useful, = * + * but WITHOUT ANY WARRANTY; without even the implied warranty of = * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU = * + * Lesser General Public License for more details. = * + * = * + * You should have received a copy of the GNU Lesser General Public = * + * License along with this software; if not, write to the Free = * + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA = * + * 02110-1301 USA, or see the FSF site: http://www.fsf.org. = * + *************************************************************************= *****/ +package org.jboss.unit.driver; + +/** + * The context in which a driver is placed. + * + * @author Julien Viet + * @version $Revision: 1.1 $ + */ +public interface DriverContext +{ + + /** + * Return a property of the context. + * = + * @param name + * @return + */ + String getProperty(String name); + +} Modified: modules/test/trunk/unit/src/main/org/jboss/unit/driver/DriverResp= onse.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/driver/DriverResponse.j= ava 2007-10-12 10:24:41 UTC (rev 8612) +++ modules/test/trunk/unit/src/main/org/jboss/unit/driver/DriverResponse.j= ava 2007-10-12 13:04:19 UTC (rev 8613) @@ -22,10 +22,12 @@ *************************************************************************= *****/ package org.jboss.unit.driver; = +import java.io.Serializable; + /** * @author Julien Viet * @version $Revision: 1.1 $ */ -public abstract class DriverResponse +public abstract class DriverResponse implements Serializable { } Modified: modules/test/trunk/unit/src/main/org/jboss/unit/driver/TestDriver= .java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/driver/TestDriver.java = 2007-10-12 10:24:41 UTC (rev 8612) +++ modules/test/trunk/unit/src/main/org/jboss/unit/driver/TestDriver.java = 2007-10-12 13:04:19 UTC (rev 8613) @@ -35,6 +35,18 @@ { = /** + * Initialize the test driver. + * + * @param context the driver context + */ + void initDriver(DriverContext context); + + /** + * Destroy the test driver. + */ + void destroyDriver(); + + /** * Return a runtime meta data about this test driver. * = * @return the description Modified: modules/test/trunk/unit/src/main/org/jboss/unit/driver/impl/pojo/= POJOTestSuiteDriver.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/driver/impl/pojo/POJOTe= stSuiteDriver.java 2007-10-12 10:24:41 UTC (rev 8612) +++ modules/test/trunk/unit/src/main/org/jboss/unit/driver/impl/pojo/POJOTe= stSuiteDriver.java 2007-10-12 13:04:19 UTC (rev 8613) @@ -31,6 +31,7 @@ import org.jboss.unit.driver.TestDriver; import org.jboss.unit.driver.DriverResponse; import org.jboss.unit.driver.DriverCommand; +import org.jboss.unit.driver.AbstractTestDriver; import org.jboss.unit.driver.response.EndTestResponse; import org.jboss.unit.driver.response.FailureResponse; import org.jboss.unit.driver.command.StartTestCommand; @@ -49,7 +50,7 @@ * @author Julien Viet * @version $Revision: 1.1 $ */ -public class POJOTestSuiteDriver implements TestDriver +public class POJOTestSuiteDriver extends AbstractTestDriver { = /** . */ Added: modules/test/trunk/unit/src/main/org/jboss/unit/driver/impl/pojo/Sim= pleDriverContext.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/driver/impl/pojo/Simple= DriverContext.java (rev 0) +++ modules/test/trunk/unit/src/main/org/jboss/unit/driver/impl/pojo/Simple= DriverContext.java 2007-10-12 13:04:19 UTC (rev 8613) @@ -0,0 +1,62 @@ +/*************************************************************************= ***** + * JBoss, a division of Red Hat = * + * Copyright 2006, Red Hat Middleware, LLC, and individual = * + * contributors as indicated by the @authors tag. See the = * + * copyright.txt in the distribution for a full listing of = * + * individual contributors. = * + * = * + * This is free software; you can redistribute it and/or modify it = * + * under the terms of the GNU Lesser General Public License as = * + * published by the Free Software Foundation; either version 2.1 of = * + * the License, or (at your option) any later version. = * + * = * + * This software is distributed in the hope that it will be useful, = * + * but WITHOUT ANY WARRANTY; without even the implied warranty of = * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU = * + * Lesser General Public License for more details. = * + * = * + * You should have received a copy of the GNU Lesser General Public = * + * License along with this software; if not, write to the Free = * + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA = * + * 02110-1301 USA, or see the FSF site: http://www.fsf.org. = * + *************************************************************************= *****/ +package org.jboss.unit.driver.impl.pojo; + +import org.jboss.unit.driver.DriverContext; + +import java.util.Map; +import java.util.HashMap; + +/** + * @author Julien Viet + * @version $Revision: 1.1 $ + */ +public class SimpleDriverContext implements DriverContext +{ + + /** . */ + private final Map properties; + + public SimpleDriverContext(Map properties) + { + if (properties =3D=3D null) + { + throw new IllegalArgumentException("No null property name accepte= d"); + } + this.properties =3D properties; + } + + public SimpleDriverContext() + { + this(new HashMap()); + } + + public String getProperty(String name) + { + if (name =3D=3D null) + { + throw new IllegalArgumentException("No null property name accepte= d"); + } + return properties.get(name); + } +} Modified: modules/test/trunk/unit/src/main/org/jboss/unit/runner/AbstractTe= stRunner.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/runner/AbstractTestRunn= er.java 2007-10-12 10:24:41 UTC (rev 8612) +++ modules/test/trunk/unit/src/main/org/jboss/unit/runner/AbstractTestRunn= er.java 2007-10-12 13:04:19 UTC (rev 8613) @@ -22,7 +22,6 @@ *************************************************************************= *****/ package org.jboss.unit.runner; = -import org.jboss.unit.runner.filter.NullFilter; import org.jboss.unit.runner.event.TestRunnerEventBroadcasterSupport; import org.jboss.unit.runner.event.EndRunnerEvent; import org.jboss.unit.runner.event.StartRunnerEvent; @@ -64,15 +63,15 @@ = public final void run() { - run(NullFilter.getInstance()); + run(NullTestRunnerContext.getInstance()); } = - public final void run(TestFilter filter) + public final void run(TestRunnerContext context) { fireEvent(new StartRunnerEvent()); - internalRun(filter); + internalRun(context); fireEvent(new EndRunnerEvent()); } = - protected abstract void internalRun(TestFilter filter); + protected abstract void internalRun(TestRunnerContext context); } Added: modules/test/trunk/unit/src/main/org/jboss/unit/runner/NullTestRunne= rContext.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/runner/NullTestRunnerCo= ntext.java (rev 0) +++ modules/test/trunk/unit/src/main/org/jboss/unit/runner/NullTestRunnerCo= ntext.java 2007-10-12 13:04:19 UTC (rev 8613) @@ -0,0 +1,54 @@ +/*************************************************************************= ***** + * JBoss, a division of Red Hat = * + * Copyright 2006, Red Hat Middleware, LLC, and individual = * + * contributors as indicated by the @authors tag. See the = * + * copyright.txt in the distribution for a full listing of = * + * individual contributors. = * + * = * + * This is free software; you can redistribute it and/or modify it = * + * under the terms of the GNU Lesser General Public License as = * + * published by the Free Software Foundation; either version 2.1 of = * + * the License, or (at your option) any later version. = * + * = * + * This software is distributed in the hope that it will be useful, = * + * but WITHOUT ANY WARRANTY; without even the implied warranty of = * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU = * + * Lesser General Public License for more details. = * + * = * + * You should have received a copy of the GNU Lesser General Public = * + * License along with this software; if not, write to the Free = * + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA = * + * 02110-1301 USA, or see the FSF site: http://www.fsf.org. = * + *************************************************************************= *****/ +package org.jboss.unit.runner; + +import org.jboss.unit.runner.filter.NullFilter; + +import java.util.Map; +import java.util.Collections; + +/** + * @author Julien Viet + * @version $Revision: 1.1 $ + */ +public class NullTestRunnerContext implements TestRunnerContext +{ + + /** . */ + private static final NullTestRunnerContext instance =3D new NullTestRun= nerContext(); + + public static NullTestRunnerContext getInstance() + { + return instance; + } + + public Map getProperties() + { + return Collections.emptyMap(); + } + + public TestFilter getFilter() + { + return NullFilter.getInstance(); + } +} Modified: modules/test/trunk/unit/src/main/org/jboss/unit/runner/TestRunner= .java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/runner/TestRunner.java = 2007-10-12 10:24:41 UTC (rev 8612) +++ modules/test/trunk/unit/src/main/org/jboss/unit/runner/TestRunner.java = 2007-10-12 13:04:19 UTC (rev 8613) @@ -37,6 +37,6 @@ = void run(); = - void run(TestFilter filter); + void run(TestRunnerContext context); = } Added: modules/test/trunk/unit/src/main/org/jboss/unit/runner/TestRunnerCon= text.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/runner/TestRunnerContex= t.java (rev 0) +++ modules/test/trunk/unit/src/main/org/jboss/unit/runner/TestRunnerContex= t.java 2007-10-12 13:04:19 UTC (rev 8613) @@ -0,0 +1,38 @@ +/*************************************************************************= ***** + * JBoss, a division of Red Hat = * + * Copyright 2006, Red Hat Middleware, LLC, and individual = * + * contributors as indicated by the @authors tag. See the = * + * copyright.txt in the distribution for a full listing of = * + * individual contributors. = * + * = * + * This is free software; you can redistribute it and/or modify it = * + * under the terms of the GNU Lesser General Public License as = * + * published by the Free Software Foundation; either version 2.1 of = * + * the License, or (at your option) any later version. = * + * = * + * This software is distributed in the hope that it will be useful, = * + * but WITHOUT ANY WARRANTY; without even the implied warranty of = * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU = * + * Lesser General Public License for more details. = * + * = * + * You should have received a copy of the GNU Lesser General Public = * + * License along with this software; if not, write to the Free = * + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA = * + * 02110-1301 USA, or see the FSF site: http://www.fsf.org. = * + *************************************************************************= *****/ +package org.jboss.unit.runner; + +import java.util.Map; + +/** + * @author Julien Viet + * @version $Revision: 1.1 $ + */ +public interface TestRunnerContext +{ + + Map getProperties(); + + TestFilter getFilter(); + +} Modified: modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/compo= site/CompositeTestRunner.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/composite/C= ompositeTestRunner.java 2007-10-12 10:24:41 UTC (rev 8612) +++ modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/composite/C= ompositeTestRunner.java 2007-10-12 13:04:19 UTC (rev 8613) @@ -25,6 +25,7 @@ import org.jboss.unit.runner.AbstractTestRunner; import org.jboss.unit.runner.TestRunner; import org.jboss.unit.runner.TestFilter; +import org.jboss.unit.runner.TestRunnerContext; import org.jboss.unit.runner.event.TestRunnerLifeCycleFilter; = import java.util.Collection; @@ -52,7 +53,7 @@ this.lifeCycleFilter =3D new TestRunnerLifeCycleFilter(broadcaster); } = - protected void internalRun(TestFilter filter) + protected void internalRun(TestRunnerContext context) { for (TestRunner runner : runners) { @@ -61,7 +62,7 @@ runner.addListener(lifeCycleFilter); = // - runner.run(filter); + runner.run(context); } finally { Modified: modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/drive= r/TestDriverRunner.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/driver/Test= DriverRunner.java 2007-10-12 10:24:41 UTC (rev 8612) +++ modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/driver/Test= DriverRunner.java 2007-10-12 13:04:19 UTC (rev 8613) @@ -24,6 +24,7 @@ = import org.jboss.unit.driver.TestDriver; import org.jboss.unit.driver.DriverResponse; +import org.jboss.unit.driver.impl.pojo.SimpleDriverContext; import org.jboss.unit.driver.response.EndTestResponse; import org.jboss.unit.driver.response.FailureResponse; import org.jboss.unit.driver.command.StartTestCommand; @@ -39,12 +40,11 @@ import org.jboss.unit.runner.event.EndTestEvent; import org.jboss.unit.runner.event.RunnerFailureEvent; import org.jboss.unit.runner.AbstractTestRunner; -import org.jboss.unit.runner.TestFilter; import org.jboss.unit.runner.TestResult; import org.jboss.unit.runner.ParametrizationSet; +import org.jboss.unit.runner.TestRunnerContext; = import java.util.Map; -import java.util.HashMap; = /** * An implementation that uses a test driver and transform test driver @@ -70,7 +70,7 @@ private final ParametrizationSet parametrizationSet; = /** . */ - private final TestId testId; + private TestId testId; = public TestDriverRunner(TestDriver driver, ParametrizationSet parametri= zationSet, TestId testId) { @@ -79,25 +79,73 @@ this.testId =3D testId; } = + public TestDriverRunner(TestDriver driver,ParametrizationSet parametriz= ationSet) + { + this(driver, parametrizationSet, null); + } + public TestDriverRunner(TestDriver driver, TestId testId) { this(driver, new ParametrizationSet(), testId); } = - protected void internalRun(TestFilter filter) + public TestId getTestId() { - TestSuiteInfo info =3D (TestSuiteInfo)driver.getInfo(); + return testId; + } = - // - TestInfo testInfo =3D info.findTest(testId); + public void setTestId(TestId testId) + { + this.testId =3D testId; + } = - // - internalRun(filter, testInfo, testId); + protected void internalRun(TestRunnerContext context) + { + if (testId =3D=3D null) + { + fireEvent(new RunnerFailureEvent(Failure.createErrorFailure("No t= est id specified"))); + } + else + { + // Init the test driver + try + { + driver.initDriver(new SimpleDriverContext(context.getPropertie= s())); + } + catch (Exception e) + { + fireEvent(new RunnerFailureEvent(Failure.createErrorFailure("W= as not able to start the test driver properly", e))); + return; + } + + // + try + { + TestSuiteInfo info =3D (TestSuiteInfo)driver.getInfo(); + + // + TestInfo testInfo =3D info.findTest(testId); + + // + internalRun(context, testInfo, testId); + } + finally + { + // Perform cleanup of life cycle + try + { + driver.destroyDriver(); + } + catch (Throwable ignore) + { + } + } + } } = - private void internalRun(TestFilter filter, TestInfo testInfo, TestId t= estId) + private void internalRun(TestRunnerContext context, TestInfo testInfo, = TestId testId) { - if (filter.include(testId, testInfo)) + if (context.getFilter().include(testId, testInfo)) { if (testInfo instanceof TestSuiteInfo) { @@ -107,7 +155,7 @@ for (String name : testSuiteInfo.getNames()) { TestInfo childTestInfo =3D testSuiteInfo.getTest(name); - internalRun(filter, childTestInfo, new TestId(testId, name)= ); + internalRun(context, childTestInfo, new TestId(testId, name= )); } } else Modified: modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/event= /EventDrivenTestRunner.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/event/Event= DrivenTestRunner.java 2007-10-12 10:24:41 UTC (rev 8612) +++ modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/event/Event= DrivenTestRunner.java 2007-10-12 13:04:19 UTC (rev 8613) @@ -25,6 +25,7 @@ import org.jboss.unit.runner.AbstractTestRunner; import org.jboss.unit.runner.TestRunnerEvent; import org.jboss.unit.runner.TestFilter; +import org.jboss.unit.runner.TestRunnerContext; = import java.util.Collection; import java.util.Arrays; @@ -49,7 +50,7 @@ this.events =3D events; } = - protected void internalRun(TestFilter filter) + protected void internalRun(TestRunnerContext context) { for (TestRunnerEvent event : events) { Modified: modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/failu= re/FailureTestRunner.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/failure/Fai= lureTestRunner.java 2007-10-12 10:24:41 UTC (rev 8612) +++ modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/failure/Fai= lureTestRunner.java 2007-10-12 13:04:19 UTC (rev 8613) @@ -25,6 +25,7 @@ import org.jboss.unit.runner.AbstractTestRunner; import org.jboss.unit.runner.TestResult; import org.jboss.unit.runner.TestFilter; +import org.jboss.unit.runner.TestRunnerContext; import org.jboss.unit.TestId; import org.jboss.unit.info.TestInfo; = @@ -49,9 +50,9 @@ this.testInfo =3D new FailureTestCaseInfo(name); } = - public void internalRun(TestFilter filter) + protected void internalRun(TestRunnerContext context) { - if (filter.include(testId, null, testInfo)) + if (context.getFilter().include(testId, null, testInfo)) { // failures.add(new StartTestEvent(tmp, new )); // failures.add(new EndTestEvent(blah, new TestError(e, 0))); Modified: modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/gener= ic/GenericTestRunner.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/generic/Gen= ericTestRunner.java 2007-10-12 10:24:41 UTC (rev 8612) +++ modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/generic/Gen= ericTestRunner.java 2007-10-12 13:04:19 UTC (rev 8613) @@ -23,8 +23,8 @@ package org.jboss.unit.runner.impl.generic; = import org.jboss.unit.runner.AbstractTestRunner; -import org.jboss.unit.runner.TestFilter; import org.jboss.unit.runner.ParametrizationSet; +import org.jboss.unit.runner.TestRunnerContext; import org.jboss.unit.runner.event.TestRunnerLifeCycleFilter; import org.jboss.unit.runner.event.RunnerFailureEvent; import org.jboss.unit.runner.impl.driver.TestDriverRunner; @@ -56,7 +56,7 @@ this.lifeCycleFilter =3D new TestRunnerLifeCycleFilter(broadcaster); } = - protected void internalRun(TestFilter filter) + protected void internalRun(TestRunnerContext context) { String className =3D def.getClassName(); = @@ -84,7 +84,7 @@ // TestDriverRunner runner =3D new TestDriverRunner(driver, param= etrizations, testDef.getRefId()); runner.addListener(lifeCycleFilter); - runner.run(filter); + runner.run(context); } } catch (Exception e) Modified: modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/pojo/= POJOTestRunner.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/pojo/POJOTe= stRunner.java 2007-10-12 10:24:41 UTC (rev 8612) +++ modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/pojo/POJOTe= stRunner.java 2007-10-12 13:04:19 UTC (rev 8613) @@ -23,8 +23,8 @@ package org.jboss.unit.runner.impl.pojo; = import org.jboss.unit.runner.AbstractTestRunner; -import org.jboss.unit.runner.TestFilter; import org.jboss.unit.runner.ParametrizationSet; +import org.jboss.unit.runner.TestRunnerContext; import org.jboss.unit.runner.impl.driver.TestDriverRunner; import org.jboss.unit.runner.event.RunnerFailureEvent; import org.jboss.unit.runner.event.TestRunnerLifeCycleFilter; @@ -59,7 +59,7 @@ this.lifeCycleFilter =3D new TestRunnerLifeCycleFilter(broadcaster); } = - protected void internalRun(TestFilter filter) + protected void internalRun(TestRunnerContext context) { for (TestClassDef testClass : suite.getTestClasses()) { @@ -90,12 +90,15 @@ parametrizations.merge(testClass.getParameters().getParametriz= ation()); = // + TestDriverRunner runner =3D new TestDriverRunner(driver, param= etrizations); + + // for (String testCaseName : testCaseNames) { TestId testCaseId =3D new TestId(testCaseName); - TestDriverRunner runner =3D new TestDriverRunner(driver, pa= rametrizations, testCaseId); + runner.setTestId(testCaseId); runner.addListener(lifeCycleFilter); - runner.run(filter); + runner.run(context); } } catch (Exception e) Modified: modules/test/trunk/unit/src/main/org/jboss/unit/tooling/Main.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/tooling/Main.java 2007-= 10-12 10:24:41 UTC (rev 8612) +++ modules/test/trunk/unit/src/main/org/jboss/unit/tooling/Main.java 2007-= 10-12 13:04:19 UTC (rev 8613) @@ -48,6 +48,8 @@ = private final TestSuiteDef suiteDef; = + private final Map properties; + // public static final String JBOSS_UNIT_NAMES =3D "jboss.unit.names"; // // public static final String JBOSS_UNIT_KEYWORDS =3D "jboss.unit.keywor= ds"; @@ -78,12 +80,19 @@ = public static final String OPT_SUITE_NAME =3D "--suite_name"; = - public static final String OPT_NO_CONSOLE =3D "--noconsole"; + public static final String OPT_NO_CONSOLE =3D "--no_console"; = public static final String OPT_XML_REPORT_DIR =3D "--xml_report_dir"; = public static final String OPT_HTML_REPORT_DIR =3D "--html_report_dir"; = + /** + * For now usage should be like + * + * --property name=3Dvalue . + */ + public static final String OPT_PROPERTY =3D "--property"; + public static final Set options; = public static final Set options_no_arg; @@ -103,6 +112,7 @@ opts.add(OPT_NO_CONSOLE); opts.add(OPT_XML_REPORT_DIR); opts.add(OPT_HTML_REPORT_DIR); + opts.add(OPT_PROPERTY); = options =3D Collections.unmodifiableSet(opts); = @@ -117,9 +127,10 @@ listeners =3D null; runner =3D null; suiteDef =3D null; + properties =3D null; } = - public Main(TestRunner runner, MainTestFilter mainFilter, Set listeners, TestSuiteDef suiteDef) + public Main(TestRunner runner, MainTestFilter mainFilter, Set listeners, TestSuiteDef suiteDef, Map proper= ties) { if (runner =3D=3D null) { @@ -141,15 +152,22 @@ throw new IllegalArgumentException("suiteDef cannot be null"); } = + if (properties =3D=3D null) + { + throw new IllegalArgumentException("properties cannot be null"); + } + this.mainFilter =3D mainFilter; this.listeners =3D listeners; this.runner =3D runner; this.suiteDef =3D suiteDef; + this.properties =3D properties; } = public void execute() { - runner.run(mainFilter); + MainTestRunnerContext runnerContext =3D new MainTestRunnerContext(pr= operties, mainFilter); + runner.run(runnerContext); } = public static void main(String[] args) throws Exception @@ -237,21 +255,21 @@ = if (arguments.keySet().contains(OPT_XML_REPORT_DIR)) { - builder.setXmlReportDir(arguments.get(OPT_XML_REPORT_DIR)); + builder.setXMLReportDir(arguments.get(OPT_XML_REPORT_DIR)); } = if (arguments.keySet().contains(OPT_HTML_REPORT_DIR)) { - builder.setHtmlReportDir(arguments.get(OPT_HTML_REPORT_DIR)); + builder.setHTMLReportDir(arguments.get(OPT_HTML_REPORT_DIR)); } = + if (arguments.keySet().contains(OPT_PROPERTY)) + { + builder.addUnparsedProperty(arguments.get(OPT_PROPERTY)); + } = - - Main main =3D builder.build(); = main.execute(); - - } } Modified: modules/test/trunk/unit/src/main/org/jboss/unit/tooling/MainBuild= er.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/tooling/MainBuilder.jav= a 2007-10-12 10:24:41 UTC (rev 8612) +++ modules/test/trunk/unit/src/main/org/jboss/unit/tooling/MainBuilder.jav= a 2007-10-12 13:04:19 UTC (rev 8613) @@ -36,6 +36,8 @@ = import java.util.Set; import java.util.HashSet; +import java.util.Map; +import java.util.HashMap; import java.io.InputStream; import java.io.FileInputStream; import java.io.File; @@ -47,19 +49,19 @@ public class MainBuilder { = - private Set keywords =3D new HashSet(); + private Set keywords =3D new HashSet(); = - private Set names =3D new HashSet(); + private Set names =3D new HashSet(); = - private Set namePatterns =3D new HashSet(); + private Set namePatterns =3D new HashSet(); = - private Set excludeKeywords =3D new HashSet(); + private Set excludeKeywords =3D new HashSet(); = - private Set excludeNames =3D new HashSet(); + private Set excludeNames =3D new HashSet(); = - private Set excludeNamePatterns =3D new HashSet(); + private Set excludeNamePatterns =3D new HashSet(); = - private Set listeners =3D new HashSet(); + private Set listeners =3D new HashSet(); = private String suiteName; = @@ -71,7 +73,9 @@ = private String htmlReportDir; = + private Map properties =3D new HashMap(); = + private MainBuilder() { = @@ -251,7 +255,7 @@ return this; } = - public MainBuilder addJunitReporting(String directory) + public MainBuilder addJUnitReporting(String directory) { if (directory =3D=3D null) { @@ -263,7 +267,44 @@ return this; } = + public MainBuilder addUnparsedProperty(String propertyString) + { + if (propertyString =3D=3D null) + { + throw new IllegalArgumentException("No null property name accepte= d"); + } = + // + String[] patternValues =3D propertyString.split("=3D"); + + // + if (patternValues.length !=3D 2) + { + throw new IllegalArgumentException("Property not accepted, it sho= uld match a=3Db and it is " + propertyString); + } + + // + properties.put(patternValues[0], patternValues[1]); + + // + return this; + } + + public MainBuilder addProperty(String propertyName, String propertyValu= e) + { + if (propertyName =3D=3D null) + { + throw new IllegalArgumentException("No null property name accepte= d"); + } + + // + properties.put(propertyName, propertyValue); + + // + return this; + } + + public String getSuiteName() { return suiteName; @@ -279,12 +320,12 @@ this.noConsole =3D noConsole; } = - public void setXmlReportDir(String xmlReportDir) + public void setXMLReportDir(String xmlReportDir) { this.xmlReportDir =3D xmlReportDir; } = - public void setHtmlReportDir(String htmlReportDir) + public void setHTMLReportDir(String htmlReportDir) { this.htmlReportDir =3D htmlReportDir; } @@ -324,7 +365,7 @@ } else { - xmlReporter =3D new JUnitReporter(xmlReportDir); = + xmlReporter =3D new JUnitReporter(xmlReportDir); } = reporter.setXmlReporter(xmlReporter); @@ -356,7 +397,7 @@ } = = - return new Main(runner, filter, listeners, suite); + return new Main(runner, filter, listeners, suite, properties); } = public static void checkCreateOutputDirectory(String dir) throws Except= ion Added: modules/test/trunk/unit/src/main/org/jboss/unit/tooling/MainTestRunn= erContext.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/tooling/MainTestRunnerC= ontext.java (rev 0) +++ modules/test/trunk/unit/src/main/org/jboss/unit/tooling/MainTestRunnerC= ontext.java 2007-10-12 13:04:19 UTC (rev 8613) @@ -0,0 +1,58 @@ +/*************************************************************************= ***** + * JBoss, a division of Red Hat = * + * Copyright 2006, Red Hat Middleware, LLC, and individual = * + * contributors as indicated by the @authors tag. See the = * + * copyright.txt in the distribution for a full listing of = * + * individual contributors. = * + * = * + * This is free software; you can redistribute it and/or modify it = * + * under the terms of the GNU Lesser General Public License as = * + * published by the Free Software Foundation; either version 2.1 of = * + * the License, or (at your option) any later version. = * + * = * + * This software is distributed in the hope that it will be useful, = * + * but WITHOUT ANY WARRANTY; without even the implied warranty of = * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU = * + * Lesser General Public License for more details. = * + * = * + * You should have received a copy of the GNU Lesser General Public = * + * License along with this software; if not, write to the Free = * + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA = * + * 02110-1301 USA, or see the FSF site: http://www.fsf.org. = * + *************************************************************************= *****/ +package org.jboss.unit.tooling; + +import org.jboss.unit.runner.TestRunnerContext; +import org.jboss.unit.runner.TestFilter; + +import java.util.Map; + +/** + * @author Julien Viet + * @version $Revision: 1.1 $ + */ +public class MainTestRunnerContext implements TestRunnerContext +{ + + /** . */ + private Map properties; + + /** . */ + private TestFilter filter; + + public MainTestRunnerContext(Map properties, TestFilter= filter) + { + this.properties =3D properties; + this.filter =3D filter; + } + + public Map getProperties() + { + return properties; + } + + public TestFilter getFilter() + { + return filter; + } +} --===============3606631075172996336==-- From portal-commits at lists.jboss.org Fri Oct 12 09:23:21 2007 Content-Type: multipart/mixed; boundary="===============8340066415942221979==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8614 - modules/portlet/trunk/bridge/src/main/org/jboss/portal/portlet/bridge. Date: Fri, 12 Oct 2007 09:23:21 -0400 Message-ID: --===============8340066415942221979== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: thomas.heute(a)jboss.com Date: 2007-10-12 09:23:21 -0400 (Fri, 12 Oct 2007) New Revision: 8614 Removed: modules/portlet/trunk/bridge/src/main/org/jboss/portal/portlet/bridge/Br= idgeRequest.java Modified: modules/portlet/trunk/bridge/src/main/org/jboss/portal/portlet/bridge/Br= idgeResponse.java modules/portlet/trunk/bridge/src/main/org/jboss/portal/portlet/bridge/JB= ossServletContextProvider.java Log: Fix the bridge (Would need more testing) Deleted: modules/portlet/trunk/bridge/src/main/org/jboss/portal/portlet/bri= dge/BridgeRequest.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/portlet/trunk/bridge/src/main/org/jboss/portal/portlet/bridge/B= ridgeRequest.java 2007-10-12 13:04:19 UTC (rev 8613) +++ modules/portlet/trunk/bridge/src/main/org/jboss/portal/portlet/bridge/B= ridgeRequest.java 2007-10-12 13:23:21 UTC (rev 8614) @@ -1,329 +0,0 @@ -/*************************************************************************= ***** - * JBoss, a division of Red Hat = * - * Copyright 2006, Red Hat Middleware, LLC, and individual = * - * contributors as indicated by the @authors tag. See the = * - * copyright.txt in the distribution for a full listing of = * - * individual contributors. = * - * = * - * This is free software; you can redistribute it and/or modify it = * - * under the terms of the GNU Lesser General Public License as = * - * published by the Free Software Foundation; either version 2.1 of = * - * the License, or (at your option) any later version. = * - * = * - * This software is distributed in the hope that it will be useful, = * - * but WITHOUT ANY WARRANTY; without even the implied warranty of = * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU = * - * Lesser General Public License for more details. = * - * = * - * You should have received a copy of the GNU Lesser General Public = * - * License along with this software; if not, write to the Free = * - * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA = * - * 02110-1301 USA, or see the FSF site: http://www.fsf.org. = * - *************************************************************************= *****/ -package org.jboss.portal.portlet.bridge; - -import org.jboss.portal.portlet.impl.spi.AbstractRequestContext; -import org.jboss.portal.portlet.invocation.PortletInvocation; - -import javax.portlet.PortletRequest; -import javax.servlet.RequestDispatcher; -import javax.servlet.ServletInputStream; -import javax.servlet.http.Cookie; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpSession; -import java.io.BufferedReader; -import java.io.IOException; -import java.io.UnsupportedEncodingException; -import java.security.Principal; -import java.util.Enumeration; -import java.util.Locale; -import java.util.Map; - -/** - * @author Julien Viet - * @version $Revision: 6862 $ - */ -public class BridgeRequest implements HttpServletRequest -{ - - protected final PortletRequest preq; - protected final HttpServletRequest hreq; - - public BridgeRequest(JBossServletContextProvider.BridgeInfo info) - { - PortletInvocation invocation =3D info.getInvocation(); - this.hreq =3D invocation.getDispatchedRequest(); - this.preq =3D (PortletRequest)hreq.getAttribute("javax.portlet.reque= st"); - } - - public String getProtocol() - { - return null; - } - - public String getRemoteAddr() - { - return null; - } - - public String getRemoteHost() - { - return null; - } - - public String getRealPath(String s) - { - return null; - } - - public StringBuffer getRequestURL() - { - return null; - } - - public String getPathInfo() - { - return hreq.getPathInfo(); - } - - public String getQueryString() - { - return hreq.getQueryString(); - } - - public String getServletPath() - { - return hreq.getServletPath(); - } - - public String getRequestURI() - { - return hreq.getRequestURI(); - } - - public String getPathTranslated() - { - return hreq.getPathTranslated(); - } - - public String getScheme() - { - return preq.getScheme(); - } - - public String getServerName() - { - return preq.getServerName(); - } - - public int getServerPort() - { - return preq.getServerPort(); - } - - public Object getAttribute(String name) - { - return preq.getAttribute(name); - } - - public Enumeration getAttributeNames() - { - return preq.getAttributeNames(); - } - - public void setAttribute(String name, Object value) - { - preq.setAttribute(name, value); - } - - public void removeAttribute(String name) - { - preq.removeAttribute(name); - } - - public Locale getLocale() - { - return preq.getLocale(); - } - - public Enumeration getLocales() - { - return preq.getLocales(); - } - - public boolean isSecure() - { - return preq.isSecure(); - } - - public String getAuthType() - { - return preq.getAuthType(); - } - - public String getContextPath() - { - return preq.getContextPath(); - } - - public String getRemoteUser() - { - return preq.getRemoteUser(); - } - - public Principal getUserPrincipal() - { - return preq.getUserPrincipal(); - } - - public String getRequestedSessionId() - { - return preq.getRequestedSessionId(); - } - - public boolean isRequestedSessionIdValid() - { - return preq.isRequestedSessionIdValid(); - } - - public String getParameter(String s) - { - return preq.getParameter(s); - } - - public Enumeration getParameterNames() - { - return preq.getParameterNames(); - } - - public String[] getParameterValues(String s) - { - return preq.getParameterValues(s); - } - - public Map getParameterMap() - { - return preq.getParameterMap(); - } - - public String getCharacterEncoding() - { - return null; - } - - public void setCharacterEncoding(String s) throws UnsupportedEncodingEx= ception - { - } - - public int getContentLength() - { - return 0; - } - - public String getContentType() - { - return null; - } - - public ServletInputStream getInputStream() throws IOException - { - return null; - } - - public BufferedReader getReader() throws IOException - { - return null; - } - - // Must be based on properties provided by the getProperties method of = the PortletRequest interface - - public String getHeader(String name) - { - return null; - } - - public Enumeration getHeaders(String names) - { - return null; - } - - public Enumeration getHeaderNames() - { - return null; - } - - public Cookie[] getCookies() - { - return new Cookie[0]; - } - - public long getDateHeader(String s) - { - return 0; - } - - public int getIntHeader(String s) - { - return 0; - } - - public String getMethod() - { - return "GET"; - } - - public RequestDispatcher getRequestDispatcher(String s) - { - return hreq.getRequestDispatcher(s); - } - - public boolean isUserInRole(String roleName) - { - return preq.isUserInRole(roleName); - } - - public HttpSession getSession(boolean create) - { - return hreq.getSession(create); - } - - public HttpSession getSession() - { - return hreq.getSession(); - } - - public boolean isRequestedSessionIdFromCookie() - { - return false; - } - - public boolean isRequestedSessionIdFromURL() - { - return false; - } - - public boolean isRequestedSessionIdFromUrl() - { - return false; - } - - public int getRemotePort() - { - throw new UnsupportedOperationException("NYI"); - } - - public String getLocalName() - { - throw new UnsupportedOperationException("NYI"); - } - - public String getLocalAddr() - { - throw new UnsupportedOperationException("NYI"); - } - - public int getLocalPort() - { - throw new UnsupportedOperationException("NYI"); - } -} Modified: modules/portlet/trunk/bridge/src/main/org/jboss/portal/portlet/br= idge/BridgeResponse.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/portlet/trunk/bridge/src/main/org/jboss/portal/portlet/bridge/B= ridgeResponse.java 2007-10-12 13:04:19 UTC (rev 8613) +++ modules/portlet/trunk/bridge/src/main/org/jboss/portal/portlet/bridge/B= ridgeResponse.java 2007-10-12 13:23:21 UTC (rev 8614) @@ -22,24 +22,25 @@ *************************************************************************= *****/ package org.jboss.portal.portlet.bridge; = -import org.jboss.portal.portlet.invocation.PortletInvocation; +import java.io.IOException; +import java.io.OutputStream; +import java.io.PrintWriter; +import java.util.Locale; = import javax.portlet.PortletResponse; import javax.portlet.RenderResponse; import javax.servlet.ServletOutputStream; import javax.servlet.http.Cookie; import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; -import java.io.IOException; -import java.io.OutputStream; -import java.io.PrintWriter; -import java.util.Locale; +import javax.servlet.http.HttpServletResponseWrapper; = +import org.jboss.portal.portlet.invocation.PortletInvocation; + /** * @author Julien Viet * @version $Revision: 6862 $ */ -public class BridgeResponse implements HttpServletResponse +public class BridgeResponse extends HttpServletResponseWrapper { = /** . */ @@ -53,6 +54,7 @@ = public BridgeResponse(JBossServletContextProvider.BridgeInfo info) { + super(info.getInvocation().getDispatchedResponse()); invocation =3D info.getInvocation(); HttpServletRequest hreq =3D invocation.getDispatchedRequest(); this.presp =3D (PortletResponse)hreq.getAttribute("javax.portlet.res= ponse"); Modified: modules/portlet/trunk/bridge/src/main/org/jboss/portal/portlet/br= idge/JBossServletContextProvider.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/portlet/trunk/bridge/src/main/org/jboss/portal/portlet/bridge/J= BossServletContextProvider.java 2007-10-12 13:04:19 UTC (rev 8613) +++ modules/portlet/trunk/bridge/src/main/org/jboss/portal/portlet/bridge/J= BossServletContextProvider.java 2007-10-12 13:23:21 UTC (rev 8614) @@ -22,11 +22,6 @@ *************************************************************************= *****/ package org.jboss.portal.portlet.bridge; = -import org.apache.portals.bridges.common.ServletContextProvider; -import org.jboss.portal.portlet.invocation.PortletInvocation; -import org.jboss.portal.portlet.container.PortletContainerInvoker; -import org.jboss.portal.portlet.container.PortletContainer; - import javax.portlet.GenericPortlet; import javax.portlet.PortletRequest; import javax.portlet.PortletResponse; @@ -34,6 +29,11 @@ import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; = +import org.apache.portals.bridges.common.ServletContextProvider; +import org.jboss.portal.portlet.container.PortletContainer; +import org.jboss.portal.portlet.container.PortletContainerInvoker; +import org.jboss.portal.portlet.invocation.PortletInvocation; + /** * The JBoss implementation of org.apache.portals.bridges.common.Ser= vletContextProvider use thread local * variables to keep the request associated with the current thread of exe= cution. @@ -102,7 +102,7 @@ /** Lazy initialisation of the bridge info. */ private void init(BridgeInfo bridgeInfo) { - bridgeInfo.breq =3D new BridgeRequest(bridgeInfo); + bridgeInfo.breq =3D bridgeInfo.getInvocation().getDispatchedRequest(= ); bridgeInfo.bresp =3D new BridgeResponse(bridgeInfo); } = @@ -115,10 +115,10 @@ private final ServletContext ctx; = /** The bridge response. */ - private BridgeRequest breq; + private HttpServletRequest breq; = /** The bridge response. */ - private BridgeResponse bresp; + private HttpServletResponse bresp; = public BridgeInfo(PortletInvocation invocation) { --===============8340066415942221979==-- From portal-commits at lists.jboss.org Fri Oct 12 10:05:44 2007 Content-Type: multipart/mixed; boundary="===============5569282749865638226==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8615 - in modules/test/trunk/unit/src/main/org/jboss: test/unit/runner and 8 other directories. Date: Fri, 12 Oct 2007 10:05:39 -0400 Message-ID: --===============5569282749865638226== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: julien(a)jboss.com Date: 2007-10-12 10:05:39 -0400 (Fri, 12 Oct 2007) New Revision: 8615 Added: modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/NullTestRunn= erContext.java modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/TestRunnerCo= ntextSupport.java Removed: modules/test/trunk/unit/src/main/org/jboss/unit/runner/NullTestRunnerCon= text.java modules/test/trunk/unit/src/main/org/jboss/unit/tooling/MainTestRunnerCo= ntext.java Modified: modules/test/trunk/unit/src/main/org/jboss/test/unit/blah/BlahTestTwo.ja= va modules/test/trunk/unit/src/main/org/jboss/test/unit/blah/BlahTests.java modules/test/trunk/unit/src/main/org/jboss/test/unit/runner/CompositeTes= tRunnerTests.java modules/test/trunk/unit/src/main/org/jboss/test/unit/runner/GenericTestR= unnerTests.java modules/test/trunk/unit/src/main/org/jboss/test/unit/runner/TestDriverRu= nnerTests.java modules/test/trunk/unit/src/main/org/jboss/unit/runner/AbstractTestRunne= r.java modules/test/trunk/unit/src/main/org/jboss/unit/runner/TestRunner.java modules/test/trunk/unit/src/main/org/jboss/unit/runner/TestRunnerContext= .java modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/composite/Co= mpositeTestRunner.java modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/driver/TestD= riverRunner.java modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/event/EventD= rivenTestRunner.java modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/generic/Gene= ricTestRunner.java modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/pojo/POJOTes= tRunner.java modules/test/trunk/unit/src/main/org/jboss/unit/tooling/Main.java modules/test/trunk/unit/src/main/org/jboss/unit/tooling/MainBuilder.java Log: moved the test runner listener as part of the test runner contet Modified: modules/test/trunk/unit/src/main/org/jboss/test/unit/blah/BlahTes= tTwo.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/test/unit/blah/BlahTestTwo.j= ava 2007-10-12 13:23:21 UTC (rev 8614) +++ modules/test/trunk/unit/src/main/org/jboss/test/unit/blah/BlahTestTwo.j= ava 2007-10-12 14:05:39 UTC (rev 8615) @@ -28,6 +28,8 @@ import org.jboss.unit.report.impl.writer.PrintListener; import org.jboss.unit.runner.TestRunner; import org.jboss.unit.runner.TestRunnerEventListener; +import org.jboss.unit.runner.event.TestRunnerEventBroadcasterSupport; +import org.jboss.unit.runner.impl.TestRunnerContextSupport; import org.jboss.unit.runner.model.ModelBuilder; import org.jboss.unit.runner.model.TestSuiteDef; import org.xml.sax.InputSource; @@ -51,11 +53,13 @@ = TestRunnerEventListener junitReporter =3D new JUnitReporter("output"= , BlahTestTwo.class.getName()); // add listeners - runner.addListener(junitReporter); - runner.addListener(new PrintListener()); = + TestRunnerEventBroadcasterSupport broadcaster =3D new TestRunnerEven= tBroadcasterSupport(); + broadcaster.addListener(junitReporter); + broadcaster.addListener(new PrintListener()); + // run the test - runner.run(); + runner.run(new TestRunnerContextSupport(broadcaster)); = } } Modified: modules/test/trunk/unit/src/main/org/jboss/test/unit/blah/BlahTes= ts.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/test/unit/blah/BlahTests.jav= a 2007-10-12 13:23:21 UTC (rev 8614) +++ modules/test/trunk/unit/src/main/org/jboss/test/unit/blah/BlahTests.jav= a 2007-10-12 14:05:39 UTC (rev 8615) @@ -24,6 +24,9 @@ = import org.jboss.unit.report.impl.writer.PrintListener; import org.jboss.unit.runner.TestRunner; +import org.jboss.unit.runner.TestRunnerEventBroadcaster; +import org.jboss.unit.runner.event.TestRunnerEventBroadcasterSupport; +import org.jboss.unit.runner.impl.TestRunnerContextSupport; import org.jboss.unit.runner.model.ModelBuilder; import org.jboss.unit.runner.model.TestSuiteDef; import org.xml.sax.InputSource; @@ -47,9 +50,10 @@ = TestRunner runner =3D suite.createRunner(); = - runner.addListener(new PrintListener()); + TestRunnerEventBroadcasterSupport broadcaster =3D new TestRunnerEven= tBroadcasterSupport(); + broadcaster.addListener(new PrintListener()); = - runner.run(); + runner.run(new TestRunnerContextSupport(broadcaster)); = } = Modified: modules/test/trunk/unit/src/main/org/jboss/test/unit/runner/Compo= siteTestRunnerTests.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/test/unit/runner/CompositeTe= stRunnerTests.java 2007-10-12 13:23:21 UTC (rev 8614) +++ modules/test/trunk/unit/src/main/org/jboss/test/unit/runner/CompositeTe= stRunnerTests.java 2007-10-12 14:05:39 UTC (rev 8615) @@ -24,11 +24,11 @@ = import org.jboss.unit.runner.TestRunner; import org.jboss.unit.runner.AbstractTestRunner; -import org.jboss.unit.runner.TestFilter; import org.jboss.unit.runner.TestRunnerEvent; -import org.jboss.unit.runner.TestRunnerEventListener; import org.jboss.unit.runner.TestRunnerContext; +import org.jboss.unit.runner.TestRunnerEventBroadcaster; import org.jboss.unit.runner.impl.composite.CompositeTestRunner; +import org.jboss.unit.runner.impl.TestRunnerContextSupport; = import static org.jboss.unit.api.Assert.*; import static org.jboss.unit.util.CollectionTools.*; @@ -46,9 +46,9 @@ = private static List events =3D new ArrayList(); = - private static TestRunnerEventListener listener =3D new TestRunnerEvent= Listener() + private static TestRunnerEventBroadcaster listener =3D new TestRunnerEv= entBroadcaster() { - public void onEvent(TestRunnerEvent event) + public void fireEvent(TestRunnerEvent event) throws IllegalArgumentE= xception { events.add(event); } @@ -71,8 +71,7 @@ runners.add(runner1); runners.add(runner2); CompositeTestRunner runner =3D new CompositeTestRunner(runners); - runner.addListener(listener); - runner.run(); + runner.run(new TestRunnerContextSupport(listener)); assertTrue(runner1.invoked); assertTrue(runner2.invoked); assertEquals(4, events.size()); @@ -88,10 +87,9 @@ runners.add(runner1); runners.add(runner2); CompositeTestRunner runner =3D new CompositeTestRunner(runners); - runner.addListener(listener); try { - runner.run(); + runner.run(new TestRunnerContextSupport(listener)); fail(); } catch (RuntimeException e) @@ -112,10 +110,9 @@ runners.add(runner1); runners.add(runner2); CompositeTestRunner runner =3D new CompositeTestRunner(runners); - runner.addListener(listener); try { - runner.run(); + runner.run(new TestRunnerContextSupport(listener)); fail(); } catch (RuntimeException e) @@ -135,10 +132,9 @@ runners.add(runner1); runners.add(runner2); CompositeTestRunner runner =3D new CompositeTestRunner(runners); - runner.addListener(listener); try { - runner.run(); + runner.run(new TestRunnerContextSupport(listener)); fail(); } catch (Error e) @@ -159,10 +155,9 @@ runners.add(runner1); runners.add(runner2); CompositeTestRunner runner =3D new CompositeTestRunner(runners); - runner.addListener(listener); try { - runner.run(); + runner.run(new TestRunnerContextSupport(listener)); fail(); } catch (Error e) @@ -185,7 +180,7 @@ protected void internalRun(TestRunnerContext context) { invoked =3D true; - fireEvent(event); + context.getEventBroadcaster().fireEvent(event); } } = Modified: modules/test/trunk/unit/src/main/org/jboss/test/unit/runner/Gener= icTestRunnerTests.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/test/unit/runner/GenericTest= RunnerTests.java 2007-10-12 13:23:21 UTC (rev 8614) +++ modules/test/trunk/unit/src/main/org/jboss/test/unit/runner/GenericTest= RunnerTests.java 2007-10-12 14:05:39 UTC (rev 8615) @@ -23,6 +23,7 @@ package org.jboss.test.unit.runner; = import org.jboss.unit.runner.impl.generic.GenericTestRunner; +import org.jboss.unit.runner.impl.TestRunnerContextSupport; import org.jboss.unit.runner.model.generic.GenericTestSuiteDef; import org.jboss.unit.runner.model.generic.TestDef; import org.jboss.unit.driver.TestDriver; @@ -64,7 +65,7 @@ Driver1.init(); GenericTestSuiteDef suite =3D new GenericTestSuiteDef(Driver1.class.= getName()); GenericTestRunner runner =3D new GenericTestRunner(suite); - runner.run(); + runner.run(new TestRunnerContextSupport()); assertEquals(list(), Driver1.ids); assertEquals(list(), Driver1.parametrizations); } @@ -76,7 +77,7 @@ GenericTestSuiteDef suite =3D new GenericTestSuiteDef(Driver1.class.= getName()); suite.addTest(new TestDef(new TestId("foo"))); GenericTestRunner runner =3D new GenericTestRunner(suite); - runner.run(); + runner.run(new TestRunnerContextSupport()); assertEquals(list(new TestId("foo")), Driver1.ids); assertEquals(list(new HashMap()), Driver1.parametrizations); } @@ -89,7 +90,7 @@ GenericTestSuiteDef suite =3D new GenericTestSuiteDef(Driver1.class.= getName()); suite.addTest(new TestDef(new TestId("foo"))); GenericTestRunner runner =3D new GenericTestRunner(suite); - runner.run(); + runner.run(new TestRunnerContextSupport()); assertEquals(list(new TestId("foo")), Driver1.ids); assertEquals(list(new HashMap()), Driver1.parametrizations); } @@ -101,7 +102,7 @@ Driver1.testSuiteInfo.addTest(new SimpleTestCaseInfo("bar")); GenericTestSuiteDef suite =3D new GenericTestSuiteDef(Driver1.class.= getName()); GenericTestRunner runner =3D new GenericTestRunner(suite); - runner.run(); + runner.run(new TestRunnerContextSupport()); assertEquals(list(new TestId("foo"), new TestId("bar")), Driver1.ids= ); assertEquals(list(new HashMap(), new HashMap()), Driver1.parametriza= tions); } Modified: modules/test/trunk/unit/src/main/org/jboss/test/unit/runner/TestD= riverRunnerTests.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/test/unit/runner/TestDriverR= unnerTests.java 2007-10-12 13:23:21 UTC (rev 8614) +++ modules/test/trunk/unit/src/main/org/jboss/test/unit/runner/TestDriverR= unnerTests.java 2007-10-12 14:05:39 UTC (rev 8615) @@ -23,10 +23,12 @@ package org.jboss.test.unit.runner; = import org.jboss.unit.runner.impl.driver.TestDriverRunner; +import org.jboss.unit.runner.impl.TestRunnerContextSupport; import org.jboss.unit.runner.TestRunnerEventListener; import org.jboss.unit.runner.TestRunnerEvent; import org.jboss.unit.runner.TestResult; import org.jboss.unit.runner.ParametrizationSet; +import org.jboss.unit.runner.TestRunnerEventBroadcaster; import org.jboss.unit.runner.results.TestFailure; import org.jboss.unit.runner.results.TestSuccess; import org.jboss.unit.runner.event.EndTestEvent; @@ -100,10 +102,9 @@ = // EventList listener =3D new EventList(); - runner.addListener(listener); = // - runner.run(); + runner.run(new TestRunnerContextSupport(listener)); = // testDriver.assertIdList(list(new TestId("Foo"), new TestId("Bar"))); @@ -137,10 +138,9 @@ = // EventList listener =3D new EventList(); - runner.addListener(listener); = // - runner.run(); + runner.run(new TestRunnerContextSupport(listener)); = // testDriver.assertIdList(list(new TestId("Foo"))); @@ -183,10 +183,9 @@ = // EventList listener =3D new EventList(); - runner.addListener(listener); = // - runner.run(); + runner.run(new TestRunnerContextSupport(listener)); = // testDriver.assertIdList(list(new TestId("Foo"), new TestId("Foo"))); @@ -221,10 +220,9 @@ = // EventList listener =3D new EventList(); - runner.addListener(listener); = // - runner.run(); + runner.run(new TestRunnerContextSupport(listener)); = // testDriver.assertIdList(new ArrayList()); @@ -241,10 +239,9 @@ testDriver.info.addTest(new SimpleTestCaseInfo("Foo")); TestDriverRunner runner =3D new TestDriverRunner(testDriver, new Tes= tId()); EventList listener =3D new EventList(); - runner.addListener(listener); = // - runner.run(); + runner.run(new TestRunnerContextSupport(listener)); = // testDriver.assertIdList(list(new TestId("Foo"))); @@ -269,10 +266,9 @@ testDriver.info.addTest(new SimpleTestCaseInfo("Foo")); TestDriverRunner runner =3D new TestDriverRunner(testDriver, new Tes= tId()); EventList listener =3D new EventList(); - runner.addListener(listener); = // = - runner.run(); + runner.run(new TestRunnerContextSupport(listener)); = // testDriver.assertIdList(list(new TestId("Foo"))); @@ -297,10 +293,9 @@ testDriver.info.addTest(new SimpleTestCaseInfo("Foo")); TestDriverRunner runner =3D new TestDriverRunner(testDriver, new Tes= tId()); EventList listener =3D new EventList(); - runner.addListener(listener); = // - runner.run(); + runner.run(new TestRunnerContextSupport(listener)); = // testDriver.assertIdList(list(new TestId("Foo"))); @@ -325,10 +320,9 @@ testDriver.info.addTest(new SimpleTestCaseInfo("Foo")); TestDriverRunner runner =3D new TestDriverRunner(testDriver, new Tes= tId()); EventList listener =3D new EventList(); - runner.addListener(listener); = // - runner.run(); + runner.run(new TestRunnerContextSupport(listener)); = // testDriver.assertIdList(list(new TestId("Foo"))); @@ -356,12 +350,11 @@ testDriver.info.addTest(new SimpleTestCaseInfo("Foo")); TestDriverRunner runner =3D new TestDriverRunner(testDriver, new Tes= tId()); EventList listener =3D new EventList(); - runner.addListener(listener); = // try { - runner.run(); + runner.run(new TestRunnerContextSupport(listener)); } catch (Error e) { @@ -445,13 +438,13 @@ assertInstanceOf(event, EndRunnerEvent.class); } = - private static class EventList implements TestRunnerEventListener + private static class EventList implements TestRunnerEventBroadcaster { = /** . */ private final List events =3D new ArrayList(); = - public void onEvent(TestRunnerEvent event) + public void fireEvent(TestRunnerEvent event) throws IllegalArgumentE= xception { events.add(event); } Modified: modules/test/trunk/unit/src/main/org/jboss/unit/runner/AbstractTe= stRunner.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/runner/AbstractTestRunn= er.java 2007-10-12 13:23:21 UTC (rev 8614) +++ modules/test/trunk/unit/src/main/org/jboss/unit/runner/AbstractTestRunn= er.java 2007-10-12 14:05:39 UTC (rev 8615) @@ -25,6 +25,7 @@ import org.jboss.unit.runner.event.TestRunnerEventBroadcasterSupport; import org.jboss.unit.runner.event.EndRunnerEvent; import org.jboss.unit.runner.event.StartRunnerEvent; +import org.jboss.unit.runner.impl.NullTestRunnerContext; = /** * @author Julien Viet @@ -33,44 +34,16 @@ public abstract class AbstractTestRunner implements TestRunner { = - /** . */ - protected final TestRunnerEventBroadcasterSupport broadcaster; - protected AbstractTestRunner() { - this(new TestRunnerEventBroadcasterSupport()); } = - protected AbstractTestRunner(TestRunnerEventBroadcasterSupport broadcas= ter) - { - this.broadcaster =3D broadcaster; - } - - public void addListener(TestRunnerEventListener listener) - { - broadcaster.addListener(listener); - } - - public void removeListener(TestRunnerEventListener listener) - { - broadcaster.removeListener(listener); - } - - protected final void fireEvent(TestRunnerEvent event) - { - broadcaster.fireEvent(event); - } - - public final void run() - { - run(NullTestRunnerContext.getInstance()); - } - public final void run(TestRunnerContext context) { - fireEvent(new StartRunnerEvent()); + TestRunnerEventBroadcaster broadcaster =3D context.getEventBroadcast= er(); + broadcaster.fireEvent(new StartRunnerEvent()); internalRun(context); - fireEvent(new EndRunnerEvent()); + broadcaster.fireEvent(new EndRunnerEvent()); } = protected abstract void internalRun(TestRunnerContext context); Deleted: modules/test/trunk/unit/src/main/org/jboss/unit/runner/NullTestRun= nerContext.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/runner/NullTestRunnerCo= ntext.java 2007-10-12 13:23:21 UTC (rev 8614) +++ modules/test/trunk/unit/src/main/org/jboss/unit/runner/NullTestRunnerCo= ntext.java 2007-10-12 14:05:39 UTC (rev 8615) @@ -1,54 +0,0 @@ -/*************************************************************************= ***** - * JBoss, a division of Red Hat = * - * Copyright 2006, Red Hat Middleware, LLC, and individual = * - * contributors as indicated by the @authors tag. See the = * - * copyright.txt in the distribution for a full listing of = * - * individual contributors. = * - * = * - * This is free software; you can redistribute it and/or modify it = * - * under the terms of the GNU Lesser General Public License as = * - * published by the Free Software Foundation; either version 2.1 of = * - * the License, or (at your option) any later version. = * - * = * - * This software is distributed in the hope that it will be useful, = * - * but WITHOUT ANY WARRANTY; without even the implied warranty of = * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU = * - * Lesser General Public License for more details. = * - * = * - * You should have received a copy of the GNU Lesser General Public = * - * License along with this software; if not, write to the Free = * - * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA = * - * 02110-1301 USA, or see the FSF site: http://www.fsf.org. = * - *************************************************************************= *****/ -package org.jboss.unit.runner; - -import org.jboss.unit.runner.filter.NullFilter; - -import java.util.Map; -import java.util.Collections; - -/** - * @author Julien Viet - * @version $Revision: 1.1 $ - */ -public class NullTestRunnerContext implements TestRunnerContext -{ - - /** . */ - private static final NullTestRunnerContext instance =3D new NullTestRun= nerContext(); - - public static NullTestRunnerContext getInstance() - { - return instance; - } - - public Map getProperties() - { - return Collections.emptyMap(); - } - - public TestFilter getFilter() - { - return NullFilter.getInstance(); - } -} Modified: modules/test/trunk/unit/src/main/org/jboss/unit/runner/TestRunner= .java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/runner/TestRunner.java = 2007-10-12 13:23:21 UTC (rev 8614) +++ modules/test/trunk/unit/src/main/org/jboss/unit/runner/TestRunner.java = 2007-10-12 14:05:39 UTC (rev 8615) @@ -31,12 +31,6 @@ public interface TestRunner { = - void addListener(TestRunnerEventListener listener); - - void removeListener(TestRunnerEventListener listener); - - void run(); - void run(TestRunnerContext context); = } Modified: modules/test/trunk/unit/src/main/org/jboss/unit/runner/TestRunner= Context.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/runner/TestRunnerContex= t.java 2007-10-12 13:23:21 UTC (rev 8614) +++ modules/test/trunk/unit/src/main/org/jboss/unit/runner/TestRunnerContex= t.java 2007-10-12 14:05:39 UTC (rev 8615) @@ -35,4 +35,6 @@ = TestFilter getFilter(); = + TestRunnerEventBroadcaster getEventBroadcaster(); + } Copied: modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/NullTes= tRunnerContext.java (from rev 8613, modules/test/trunk/unit/src/main/org/jb= oss/unit/runner/NullTestRunnerContext.java) =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/NullTestRun= nerContext.java (rev 0) +++ modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/NullTestRun= nerContext.java 2007-10-12 14:05:39 UTC (rev 8615) @@ -0,0 +1,62 @@ +/*************************************************************************= ***** + * JBoss, a division of Red Hat = * + * Copyright 2006, Red Hat Middleware, LLC, and individual = * + * contributors as indicated by the @authors tag. See the = * + * copyright.txt in the distribution for a full listing of = * + * individual contributors. = * + * = * + * This is free software; you can redistribute it and/or modify it = * + * under the terms of the GNU Lesser General Public License as = * + * published by the Free Software Foundation; either version 2.1 of = * + * the License, or (at your option) any later version. = * + * = * + * This software is distributed in the hope that it will be useful, = * + * but WITHOUT ANY WARRANTY; without even the implied warranty of = * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU = * + * Lesser General Public License for more details. = * + * = * + * You should have received a copy of the GNU Lesser General Public = * + * License along with this software; if not, write to the Free = * + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA = * + * 02110-1301 USA, or see the FSF site: http://www.fsf.org. = * + *************************************************************************= *****/ +package org.jboss.unit.runner.impl; + +import org.jboss.unit.runner.filter.NullFilter; +import org.jboss.unit.runner.TestRunnerContext; +import org.jboss.unit.runner.TestFilter; +import org.jboss.unit.runner.TestRunnerEventBroadcaster; + +import java.util.Map; +import java.util.Collections; + +/** + * @author Julien Viet + * @version $Revision: 1.1 $ + */ +public class NullTestRunnerContext implements TestRunnerContext +{ + + /** . */ + private static final NullTestRunnerContext instance =3D new NullTestRun= nerContext(); + + public static NullTestRunnerContext getInstance() + { + return instance; + } + + public Map getProperties() + { + return Collections.emptyMap(); + } + + public TestFilter getFilter() + { + return NullFilter.getInstance(); + } + + public TestRunnerEventBroadcaster getEventBroadcaster() + { + return null; + } +} Added: modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/TestRunn= erContextSupport.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/TestRunnerC= ontextSupport.java (rev 0) +++ modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/TestRunnerC= ontextSupport.java 2007-10-12 14:05:39 UTC (rev 8615) @@ -0,0 +1,82 @@ +/*************************************************************************= ***** + * JBoss, a division of Red Hat = * + * Copyright 2006, Red Hat Middleware, LLC, and individual = * + * contributors as indicated by the @authors tag. See the = * + * copyright.txt in the distribution for a full listing of = * + * individual contributors. = * + * = * + * This is free software; you can redistribute it and/or modify it = * + * under the terms of the GNU Lesser General Public License as = * + * published by the Free Software Foundation; either version 2.1 of = * + * the License, or (at your option) any later version. = * + * = * + * This software is distributed in the hope that it will be useful, = * + * but WITHOUT ANY WARRANTY; without even the implied warranty of = * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU = * + * Lesser General Public License for more details. = * + * = * + * You should have received a copy of the GNU Lesser General Public = * + * License along with this software; if not, write to the Free = * + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA = * + * 02110-1301 USA, or see the FSF site: http://www.fsf.org. = * + *************************************************************************= *****/ +package org.jboss.unit.runner.impl; + +import org.jboss.unit.runner.TestRunnerContext; +import org.jboss.unit.runner.TestFilter; +import org.jboss.unit.runner.TestRunnerEventBroadcaster; +import org.jboss.unit.runner.event.TestRunnerEventBroadcasterSupport; +import org.jboss.unit.runner.filter.NullFilter; + +import java.util.Map; +import java.util.HashMap; + +/** + * @author Julien Viet + * @version $Revision: 1.1 $ + */ +public class TestRunnerContextSupport implements TestRunnerContext +{ + + /** . */ + private Map properties; + + /** . */ + private TestFilter filter; + + /** . */ + private TestRunnerEventBroadcaster eventBroadcaster; + + + public TestRunnerContextSupport(TestRunnerEventBroadcaster eventBroadca= ster) + { + this(new HashMap(), NullFilter.getInstance(), eventB= roadcaster); + } + + public TestRunnerContextSupport() + { + this(new HashMap(), NullFilter.getInstance(), new Te= stRunnerEventBroadcasterSupport()); + } + + public TestRunnerContextSupport(Map properties, TestFil= ter filter, TestRunnerEventBroadcaster eventBroadcaster) + { + this.properties =3D properties; + this.filter =3D filter; + this.eventBroadcaster =3D eventBroadcaster; + } + + public Map getProperties() + { + return properties; + } + + public TestFilter getFilter() + { + return filter; + } + + public TestRunnerEventBroadcaster getEventBroadcaster() + { + return eventBroadcaster; + } +} Modified: modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/compo= site/CompositeTestRunner.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/composite/C= ompositeTestRunner.java 2007-10-12 13:23:21 UTC (rev 8614) +++ modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/composite/C= ompositeTestRunner.java 2007-10-12 14:05:39 UTC (rev 8615) @@ -24,9 +24,10 @@ = import org.jboss.unit.runner.AbstractTestRunner; import org.jboss.unit.runner.TestRunner; -import org.jboss.unit.runner.TestFilter; import org.jboss.unit.runner.TestRunnerContext; +import org.jboss.unit.runner.impl.TestRunnerContextSupport; import org.jboss.unit.runner.event.TestRunnerLifeCycleFilter; +import org.jboss.unit.runner.event.TestRunnerEventBroadcasterSupport; = import java.util.Collection; = @@ -44,30 +45,21 @@ /** . */ private final Collection runners; = - /** . */ - private final TestRunnerLifeCycleFilter lifeCycleFilter; - public CompositeTestRunner(Collection runners) { this.runners =3D runners; - this.lifeCycleFilter =3D new TestRunnerLifeCycleFilter(broadcaster); } = protected void internalRun(TestRunnerContext context) { + // Setup intermediate event filtering + TestRunnerEventBroadcasterSupport tmp =3D new TestRunnerEventBroadca= sterSupport(); + tmp.addListener(new TestRunnerLifeCycleFilter(context.getEventBroadc= aster())); + TestRunnerContextSupport nestedContext =3D new TestRunnerContextSupp= ort(context.getProperties(), context.getFilter(), tmp); + for (TestRunner runner : runners) { - try - { - runner.addListener(lifeCycleFilter); - - // - runner.run(context); - } - finally - { - runner.removeListener(lifeCycleFilter); - } + runner.run(nestedContext); } } } Modified: modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/drive= r/TestDriverRunner.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/driver/Test= DriverRunner.java 2007-10-12 13:23:21 UTC (rev 8614) +++ modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/driver/Test= DriverRunner.java 2007-10-12 14:05:39 UTC (rev 8615) @@ -103,7 +103,7 @@ { if (testId =3D=3D null) { - fireEvent(new RunnerFailureEvent(Failure.createErrorFailure("No t= est id specified"))); + context.getEventBroadcaster().fireEvent(new RunnerFailureEvent(Fa= ilure.createErrorFailure("No test id specified"))); } else { @@ -114,7 +114,7 @@ } catch (Exception e) { - fireEvent(new RunnerFailureEvent(Failure.createErrorFailure("W= as not able to start the test driver properly", e))); + context.getEventBroadcaster().fireEvent(new RunnerFailureEvent= (Failure.createErrorFailure("Was not able to start the test driver properly= ", e))); return; } = @@ -163,7 +163,7 @@ TestCaseInfo testCaseInfo =3D (TestCaseInfo)testInfo; for (Map parametrization : parametrizationSet.e= numerate(testCaseInfo.getParameters().keySet())) { - fireEvent(new StartTestEvent(testId, testCaseInfo)); + context.getEventBroadcaster().fireEvent(new StartTestEvent(= testId, testCaseInfo)); = // StartTestCommand command =3D new StartTestCommand(parametri= zation); @@ -200,7 +200,7 @@ } = // - fireEvent(new EndTestEvent(testId, result)); + context.getEventBroadcaster().fireEvent(new EndTestEvent(te= stId, result)); } } } Modified: modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/event= /EventDrivenTestRunner.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/event/Event= DrivenTestRunner.java 2007-10-12 13:23:21 UTC (rev 8614) +++ modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/event/Event= DrivenTestRunner.java 2007-10-12 14:05:39 UTC (rev 8615) @@ -54,7 +54,7 @@ { for (TestRunnerEvent event : events) { - fireEvent(event); + context.getEventBroadcaster().fireEvent(event); } } } Modified: modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/gener= ic/GenericTestRunner.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/generic/Gen= ericTestRunner.java 2007-10-12 13:23:21 UTC (rev 8614) +++ modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/generic/Gen= ericTestRunner.java 2007-10-12 14:05:39 UTC (rev 8615) @@ -27,7 +27,9 @@ import org.jboss.unit.runner.TestRunnerContext; import org.jboss.unit.runner.event.TestRunnerLifeCycleFilter; import org.jboss.unit.runner.event.RunnerFailureEvent; +import org.jboss.unit.runner.event.TestRunnerEventBroadcasterSupport; import org.jboss.unit.runner.impl.driver.TestDriverRunner; +import org.jboss.unit.runner.impl.TestRunnerContextSupport; import org.jboss.unit.runner.model.generic.GenericTestSuiteDef; import org.jboss.unit.runner.model.generic.TestDef; import org.jboss.unit.driver.TestDriver; @@ -47,19 +49,20 @@ /** . */ private final GenericTestSuiteDef def; = - /** . */ - private final TestRunnerLifeCycleFilter lifeCycleFilter; - public GenericTestRunner(GenericTestSuiteDef def) { this.def =3D def; - this.lifeCycleFilter =3D new TestRunnerLifeCycleFilter(broadcaster); } = protected void internalRun(TestRunnerContext context) { String className =3D def.getClassName(); = + // Setup intermediate event filtering + TestRunnerEventBroadcasterSupport tmp =3D new TestRunnerEventBroadca= sterSupport(); + tmp.addListener(new TestRunnerLifeCycleFilter(context.getEventBroadc= aster())); + TestRunnerContextSupport nestedContext =3D new TestRunnerContextSupp= ort(context.getProperties(), context.getFilter(), tmp); + // try { @@ -83,13 +86,14 @@ = // TestDriverRunner runner =3D new TestDriverRunner(driver, param= etrizations, testDef.getRefId()); - runner.addListener(lifeCycleFilter); - runner.run(context); + + // + runner.run(nestedContext); } } catch (Exception e) { - fireEvent(new RunnerFailureEvent(Failure.createErrorFailure("Cann= ot execute test class " + className,e))); + nestedContext.getEventBroadcaster().fireEvent(new RunnerFailureEv= ent(Failure.createErrorFailure("Cannot execute test class " + className,e))= ); } } } Modified: modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/pojo/= POJOTestRunner.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/pojo/POJOTe= stRunner.java 2007-10-12 13:23:21 UTC (rev 8614) +++ modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/pojo/POJOTe= stRunner.java 2007-10-12 14:05:39 UTC (rev 8615) @@ -26,8 +26,10 @@ import org.jboss.unit.runner.ParametrizationSet; import org.jboss.unit.runner.TestRunnerContext; import org.jboss.unit.runner.impl.driver.TestDriverRunner; +import org.jboss.unit.runner.impl.TestRunnerContextSupport; import org.jboss.unit.runner.event.RunnerFailureEvent; import org.jboss.unit.runner.event.TestRunnerLifeCycleFilter; +import org.jboss.unit.runner.event.TestRunnerEventBroadcasterSupport; import org.jboss.unit.runner.model.pojo.POJOTestSuiteDef; import org.jboss.unit.runner.model.pojo.TestClassDef; import org.jboss.unit.runner.model.pojo.TestCaseDef; @@ -50,17 +52,19 @@ /** . */ private final POJOTestSuiteDef suite; = - /** . */ - private final TestRunnerLifeCycleFilter lifeCycleFilter; - public POJOTestRunner(POJOTestSuiteDef suiteDef) { this.suite =3D suiteDef; - this.lifeCycleFilter =3D new TestRunnerLifeCycleFilter(broadcaster); } = protected void internalRun(TestRunnerContext context) { + // Setup intermediate event filtering + TestRunnerEventBroadcasterSupport tmp =3D new TestRunnerEventBroadca= sterSupport(); + tmp.addListener(new TestRunnerLifeCycleFilter(context.getEventBroadc= aster())); + TestRunnerContextSupport nestedContext =3D new TestRunnerContextSupp= ort(context.getProperties(), context.getFilter(), tmp); + + // for (TestClassDef testClass : suite.getTestClasses()) { String className =3D testClass.getName(); @@ -97,13 +101,12 @@ { TestId testCaseId =3D new TestId(testCaseName); runner.setTestId(testCaseId); - runner.addListener(lifeCycleFilter); - runner.run(context); + runner.run(nestedContext); } } catch (Exception e) { - fireEvent(new RunnerFailureEvent(Failure.createErrorFailure("C= annot execute test class " + className,e))); + nestedContext.getEventBroadcaster().fireEvent(new RunnerFailur= eEvent(Failure.createErrorFailure("Cannot execute test class " + className,= e))); } } } Modified: modules/test/trunk/unit/src/main/org/jboss/unit/tooling/Main.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/tooling/Main.java 2007-= 10-12 13:23:21 UTC (rev 8614) +++ modules/test/trunk/unit/src/main/org/jboss/unit/tooling/Main.java 2007-= 10-12 14:05:39 UTC (rev 8615) @@ -22,8 +22,9 @@ = package org.jboss.unit.tooling; = -import org.jboss.unit.runner.TestRunnerEventListener; import org.jboss.unit.runner.TestRunner; +import org.jboss.unit.runner.impl.TestRunnerContextSupport; +import org.jboss.unit.runner.event.TestRunnerEventBroadcasterSupport; import org.jboss.unit.runner.model.TestSuiteDef; import org.jboss.unit.tooling.filter.MainTestFilter; = @@ -42,14 +43,14 @@ = private final MainTestFilter mainFilter; = - private final Set listeners; - private final TestRunner runner; = private final TestSuiteDef suiteDef; = private final Map properties; = + private final TestRunnerEventBroadcasterSupport broadcaster; + // public static final String JBOSS_UNIT_NAMES =3D "jboss.unit.names"; // // public static final String JBOSS_UNIT_KEYWORDS =3D "jboss.unit.keywor= ds"; @@ -121,17 +122,8 @@ options_no_arg =3D Collections.unmodifiableSet(opts); } = - private Main() + public Main(TestRunner runner, MainTestFilter mainFilter, TestRunnerEve= ntBroadcasterSupport broadcaster, TestSuiteDef suiteDef, Map= properties) { - mainFilter =3D null; - listeners =3D null; - runner =3D null; - suiteDef =3D null; - properties =3D null; - } - - public Main(TestRunner runner, MainTestFilter mainFilter, Set listeners, TestSuiteDef suiteDef, Map proper= ties) - { if (runner =3D=3D null) { throw new IllegalArgumentException("runner cannot be null"); @@ -142,9 +134,9 @@ throw new IllegalArgumentException("mainFilter cannot be null"); } = - if (listeners =3D=3D null) + if (broadcaster =3D=3D null) { - throw new IllegalArgumentException("listeners cannot be null"); + throw new IllegalArgumentException("broadcaster cannot be null"); } = if (suiteDef =3D=3D null) @@ -158,15 +150,15 @@ } = this.mainFilter =3D mainFilter; - this.listeners =3D listeners; this.runner =3D runner; this.suiteDef =3D suiteDef; this.properties =3D properties; + this.broadcaster =3D broadcaster; } = public void execute() { - MainTestRunnerContext runnerContext =3D new MainTestRunnerContext(pr= operties, mainFilter); + TestRunnerContextSupport runnerContext =3D new TestRunnerContextSupp= ort(properties, mainFilter, broadcaster); runner.run(runnerContext); } = Modified: modules/test/trunk/unit/src/main/org/jboss/unit/tooling/MainBuild= er.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/tooling/MainBuilder.jav= a 2007-10-12 13:23:21 UTC (rev 8614) +++ modules/test/trunk/unit/src/main/org/jboss/unit/tooling/MainBuilder.jav= a 2007-10-12 14:05:39 UTC (rev 8615) @@ -24,6 +24,7 @@ = import org.jboss.unit.runner.TestRunnerEventListener; import org.jboss.unit.runner.TestRunner; +import org.jboss.unit.runner.event.TestRunnerEventBroadcasterSupport; import org.jboss.unit.runner.filter.NullFilter; import org.jboss.unit.runner.model.ModelBuilder; import org.jboss.unit.runner.model.TestSuiteDef; @@ -340,12 +341,13 @@ ModelBuilder builder =3D new ModelBuilder(source); TestSuiteDef suite =3D builder.build(); TestRunner runner =3D suite.createRunner(); + TestRunnerEventBroadcasterSupport broadcaster =3D new TestRunnerEven= tBroadcasterSupport(); = // Add listeners = for (TestRunnerEventListener listener : listeners) { - runner.addListener(listener); + broadcaster.addListener(listener); } = //add PrintListener by default @@ -371,7 +373,7 @@ reporter.setXmlReporter(xmlReporter); } = - runner.addListener(reporter); + broadcaster.addListener(reporter); = = = @@ -397,7 +399,7 @@ } = = - return new Main(runner, filter, listeners, suite, properties); + return new Main(runner, filter, broadcaster, suite, properties); } = public static void checkCreateOutputDirectory(String dir) throws Except= ion Deleted: modules/test/trunk/unit/src/main/org/jboss/unit/tooling/MainTestRu= nnerContext.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/tooling/MainTestRunnerC= ontext.java 2007-10-12 13:23:21 UTC (rev 8614) +++ modules/test/trunk/unit/src/main/org/jboss/unit/tooling/MainTestRunnerC= ontext.java 2007-10-12 14:05:39 UTC (rev 8615) @@ -1,58 +0,0 @@ -/*************************************************************************= ***** - * JBoss, a division of Red Hat = * - * Copyright 2006, Red Hat Middleware, LLC, and individual = * - * contributors as indicated by the @authors tag. See the = * - * copyright.txt in the distribution for a full listing of = * - * individual contributors. = * - * = * - * This is free software; you can redistribute it and/or modify it = * - * under the terms of the GNU Lesser General Public License as = * - * published by the Free Software Foundation; either version 2.1 of = * - * the License, or (at your option) any later version. = * - * = * - * This software is distributed in the hope that it will be useful, = * - * but WITHOUT ANY WARRANTY; without even the implied warranty of = * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU = * - * Lesser General Public License for more details. = * - * = * - * You should have received a copy of the GNU Lesser General Public = * - * License along with this software; if not, write to the Free = * - * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA = * - * 02110-1301 USA, or see the FSF site: http://www.fsf.org. = * - *************************************************************************= *****/ -package org.jboss.unit.tooling; - -import org.jboss.unit.runner.TestRunnerContext; -import org.jboss.unit.runner.TestFilter; - -import java.util.Map; - -/** - * @author Julien Viet - * @version $Revision: 1.1 $ - */ -public class MainTestRunnerContext implements TestRunnerContext -{ - - /** . */ - private Map properties; - - /** . */ - private TestFilter filter; - - public MainTestRunnerContext(Map properties, TestFilter= filter) - { - this.properties =3D properties; - this.filter =3D filter; - } - - public Map getProperties() - { - return properties; - } - - public TestFilter getFilter() - { - return filter; - } -} --===============5569282749865638226==-- From portal-commits at lists.jboss.org Fri Oct 12 10:06:36 2007 Content-Type: multipart/mixed; boundary="===============6796240044668707337==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8616 - in modules/test/trunk/unit/src/main/org/jboss/unit/runner: impl and 1 other directory. Date: Fri, 12 Oct 2007 10:06:35 -0400 Message-ID: --===============6796240044668707337== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: julien(a)jboss.com Date: 2007-10-12 10:06:35 -0400 (Fri, 12 Oct 2007) New Revision: 8616 Removed: modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/NullTestRunn= erContext.java Modified: modules/test/trunk/unit/src/main/org/jboss/unit/runner/AbstractTestRunne= r.java Log: removed useless class Modified: modules/test/trunk/unit/src/main/org/jboss/unit/runner/AbstractTe= stRunner.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/runner/AbstractTestRunn= er.java 2007-10-12 14:05:39 UTC (rev 8615) +++ modules/test/trunk/unit/src/main/org/jboss/unit/runner/AbstractTestRunn= er.java 2007-10-12 14:06:35 UTC (rev 8616) @@ -22,10 +22,8 @@ *************************************************************************= *****/ package org.jboss.unit.runner; = -import org.jboss.unit.runner.event.TestRunnerEventBroadcasterSupport; import org.jboss.unit.runner.event.EndRunnerEvent; import org.jboss.unit.runner.event.StartRunnerEvent; -import org.jboss.unit.runner.impl.NullTestRunnerContext; = /** * @author Julien Viet Deleted: modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/NullTe= stRunnerContext.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/NullTestRun= nerContext.java 2007-10-12 14:05:39 UTC (rev 8615) +++ modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/NullTestRun= nerContext.java 2007-10-12 14:06:35 UTC (rev 8616) @@ -1,62 +0,0 @@ -/*************************************************************************= ***** - * JBoss, a division of Red Hat = * - * Copyright 2006, Red Hat Middleware, LLC, and individual = * - * contributors as indicated by the @authors tag. See the = * - * copyright.txt in the distribution for a full listing of = * - * individual contributors. = * - * = * - * This is free software; you can redistribute it and/or modify it = * - * under the terms of the GNU Lesser General Public License as = * - * published by the Free Software Foundation; either version 2.1 of = * - * the License, or (at your option) any later version. = * - * = * - * This software is distributed in the hope that it will be useful, = * - * but WITHOUT ANY WARRANTY; without even the implied warranty of = * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU = * - * Lesser General Public License for more details. = * - * = * - * You should have received a copy of the GNU Lesser General Public = * - * License along with this software; if not, write to the Free = * - * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA = * - * 02110-1301 USA, or see the FSF site: http://www.fsf.org. = * - *************************************************************************= *****/ -package org.jboss.unit.runner.impl; - -import org.jboss.unit.runner.filter.NullFilter; -import org.jboss.unit.runner.TestRunnerContext; -import org.jboss.unit.runner.TestFilter; -import org.jboss.unit.runner.TestRunnerEventBroadcaster; - -import java.util.Map; -import java.util.Collections; - -/** - * @author Julien Viet - * @version $Revision: 1.1 $ - */ -public class NullTestRunnerContext implements TestRunnerContext -{ - - /** . */ - private static final NullTestRunnerContext instance =3D new NullTestRun= nerContext(); - - public static NullTestRunnerContext getInstance() - { - return instance; - } - - public Map getProperties() - { - return Collections.emptyMap(); - } - - public TestFilter getFilter() - { - return NullFilter.getInstance(); - } - - public TestRunnerEventBroadcaster getEventBroadcaster() - { - return null; - } -} --===============6796240044668707337==-- From portal-commits at lists.jboss.org Fri Oct 12 10:10:24 2007 Content-Type: multipart/mixed; boundary="===============7196394875975812723==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8617 - in modules/test/trunk/unit/src/main/org/jboss: test/unit/runner/event and 7 other directories. Date: Fri, 12 Oct 2007 10:10:24 -0400 Message-ID: --===============7196394875975812723== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: julien(a)jboss.com Date: 2007-10-12 10:10:24 -0400 (Fri, 12 Oct 2007) New Revision: 8617 Added: modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/NullFilter.j= ava modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/TestRunnerEv= entBroadcasterSupport.java modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/TestRunnerLi= feCycleFilter.java Removed: modules/test/trunk/unit/src/main/org/jboss/unit/runner/event/TestRunnerE= ventBroadcasterSupport.java modules/test/trunk/unit/src/main/org/jboss/unit/runner/event/TestRunnerL= ifeCycleFilter.java modules/test/trunk/unit/src/main/org/jboss/unit/runner/filter/NullFilter= .java Modified: modules/test/trunk/unit/src/main/org/jboss/test/unit/blah/BlahTestTwo.ja= va modules/test/trunk/unit/src/main/org/jboss/test/unit/blah/BlahTests.java modules/test/trunk/unit/src/main/org/jboss/test/unit/runner/event/TestRu= nnerEventBroadcasterSupportTests.java modules/test/trunk/unit/src/main/org/jboss/test/unit/runner/event/TestRu= nnerLifeCycleFilterTests.java modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/TestRunnerCo= ntextSupport.java modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/composite/Co= mpositeTestRunner.java modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/generic/Gene= ricTestRunner.java modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/pojo/POJOTes= tRunner.java modules/test/trunk/unit/src/main/org/jboss/unit/tooling/Main.java modules/test/trunk/unit/src/main/org/jboss/unit/tooling/MainBuilder.java Log: moved classes to correct locations Modified: modules/test/trunk/unit/src/main/org/jboss/test/unit/blah/BlahTes= tTwo.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/test/unit/blah/BlahTestTwo.j= ava 2007-10-12 14:06:35 UTC (rev 8616) +++ modules/test/trunk/unit/src/main/org/jboss/test/unit/blah/BlahTestTwo.j= ava 2007-10-12 14:10:24 UTC (rev 8617) @@ -28,7 +28,7 @@ import org.jboss.unit.report.impl.writer.PrintListener; import org.jboss.unit.runner.TestRunner; import org.jboss.unit.runner.TestRunnerEventListener; -import org.jboss.unit.runner.event.TestRunnerEventBroadcasterSupport; +import org.jboss.unit.runner.impl.TestRunnerEventBroadcasterSupport; import org.jboss.unit.runner.impl.TestRunnerContextSupport; import org.jboss.unit.runner.model.ModelBuilder; import org.jboss.unit.runner.model.TestSuiteDef; Modified: modules/test/trunk/unit/src/main/org/jboss/test/unit/blah/BlahTes= ts.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/test/unit/blah/BlahTests.jav= a 2007-10-12 14:06:35 UTC (rev 8616) +++ modules/test/trunk/unit/src/main/org/jboss/test/unit/blah/BlahTests.jav= a 2007-10-12 14:10:24 UTC (rev 8617) @@ -24,8 +24,7 @@ = import org.jboss.unit.report.impl.writer.PrintListener; import org.jboss.unit.runner.TestRunner; -import org.jboss.unit.runner.TestRunnerEventBroadcaster; -import org.jboss.unit.runner.event.TestRunnerEventBroadcasterSupport; +import org.jboss.unit.runner.impl.TestRunnerEventBroadcasterSupport; import org.jboss.unit.runner.impl.TestRunnerContextSupport; import org.jboss.unit.runner.model.ModelBuilder; import org.jboss.unit.runner.model.TestSuiteDef; Modified: modules/test/trunk/unit/src/main/org/jboss/test/unit/runner/event= /TestRunnerEventBroadcasterSupportTests.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/test/unit/runner/event/TestR= unnerEventBroadcasterSupportTests.java 2007-10-12 14:06:35 UTC (rev 8616) +++ modules/test/trunk/unit/src/main/org/jboss/test/unit/runner/event/TestR= unnerEventBroadcasterSupportTests.java 2007-10-12 14:10:24 UTC (rev 8617) @@ -25,7 +25,7 @@ import static org.jboss.unit.api.Assert.*; import org.jboss.unit.runner.TestRunnerEvent; import org.jboss.unit.runner.TestRunnerEventListener; -import org.jboss.unit.runner.event.TestRunnerEventBroadcasterSupport; +import org.jboss.unit.runner.impl.TestRunnerEventBroadcasterSupport; import static org.jboss.unit.util.CollectionTools.list; = import java.util.ArrayList; Modified: modules/test/trunk/unit/src/main/org/jboss/test/unit/runner/event= /TestRunnerLifeCycleFilterTests.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/test/unit/runner/event/TestR= unnerLifeCycleFilterTests.java 2007-10-12 14:06:35 UTC (rev 8616) +++ modules/test/trunk/unit/src/main/org/jboss/test/unit/runner/event/TestR= unnerLifeCycleFilterTests.java 2007-10-12 14:10:24 UTC (rev 8617) @@ -26,9 +26,9 @@ import static org.jboss.unit.api.Assert.assertSame; import org.jboss.unit.runner.TestRunnerEvent; import org.jboss.unit.runner.TestRunnerEventBroadcaster; +import org.jboss.unit.runner.impl.TestRunnerLifeCycleFilter; import org.jboss.unit.runner.event.EndRunnerEvent; import org.jboss.unit.runner.event.StartRunnerEvent; -import org.jboss.unit.runner.event.TestRunnerLifeCycleFilter; = /** * @author Julien Viet Deleted: modules/test/trunk/unit/src/main/org/jboss/unit/runner/event/TestR= unnerEventBroadcasterSupport.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/runner/event/TestRunner= EventBroadcasterSupport.java 2007-10-12 14:06:35 UTC (rev 8616) +++ modules/test/trunk/unit/src/main/org/jboss/unit/runner/event/TestRunner= EventBroadcasterSupport.java 2007-10-12 14:10:24 UTC (rev 8617) @@ -1,100 +0,0 @@ -/*************************************************************************= ***** - * JBoss, a division of Red Hat = * - * Copyright 2006, Red Hat Middleware, LLC, and individual = * - * contributors as indicated by the @authors tag. See the = * - * copyright.txt in the distribution for a full listing of = * - * individual contributors. = * - * = * - * This is free software; you can redistribute it and/or modify it = * - * under the terms of the GNU Lesser General Public License as = * - * published by the Free Software Foundation; either version 2.1 of = * - * the License, or (at your option) any later version. = * - * = * - * This software is distributed in the hope that it will be useful, = * - * but WITHOUT ANY WARRANTY; without even the implied warranty of = * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU = * - * Lesser General Public License for more details. = * - * = * - * You should have received a copy of the GNU Lesser General Public = * - * License along with this software; if not, write to the Free = * - * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA = * - * 02110-1301 USA, or see the FSF site: http://www.fsf.org. = * - *************************************************************************= *****/ -package org.jboss.unit.runner.event; - -import org.jboss.unit.runner.TestRunnerEventListener; -import org.jboss.unit.runner.TestRunnerEvent; -import org.jboss.unit.runner.TestRunnerEventBroadcaster; - -import java.util.List; -import java.util.ArrayList; - -/** - * Maintains a set of listeners that will receive events when the fi= reEvent(TestRunnerEvent event) method - * is invoked. When a listener method is invoked, any exception is caught = and logged, this include checked and unchecked - * exception. Any other kind of unchecked throwable will not be handled. - * - * @author Julien Viet - * @version $Revision: 1.1 $ - */ -public class TestRunnerEventBroadcasterSupport implements TestRunnerEventB= roadcaster -{ - - /** . */ - private List listeners =3D new ArrayList(); - - /** - * Add a listener to the set of listeners. - * - * @param listener the listener to add - * @throws IllegalArgumentException if the listener is null - */ - public void addListener(TestRunnerEventListener listener) throws Illega= lArgumentException - { - if (listener =3D=3D null) - { - throw new IllegalArgumentException("No null listener accepted"); - } - if (!listeners.contains(listener)) - { - listeners.add(listener); - } - } - - /** - * Remove a listener from the set of listeners. - * - * @param listener the listener to remove - * @throws IllegalArgumentException if the listener is null - */ - public void removeListener(TestRunnerEventListener listener) - { - if (listener =3D=3D null) - { - throw new IllegalArgumentException("No null listener accepted"); - } - if (listeners.contains(listener)) - { - listeners.remove(listener); - } - } - - public void fireEvent(TestRunnerEvent event) - { - if (event =3D=3D null) - { - throw new IllegalArgumentException(); - } - for (TestRunnerEventListener listener : listeners) - { - try - { - listener.onEvent(event); - } - catch (Exception e) - { -// e.printStackTrace(); - } - } - } -} Deleted: modules/test/trunk/unit/src/main/org/jboss/unit/runner/event/TestR= unnerLifeCycleFilter.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/runner/event/TestRunner= LifeCycleFilter.java 2007-10-12 14:06:35 UTC (rev 8616) +++ modules/test/trunk/unit/src/main/org/jboss/unit/runner/event/TestRunner= LifeCycleFilter.java 2007-10-12 14:10:24 UTC (rev 8617) @@ -1,52 +0,0 @@ -/*************************************************************************= ***** - * JBoss, a division of Red Hat = * - * Copyright 2006, Red Hat Middleware, LLC, and individual = * - * contributors as indicated by the @authors tag. See the = * - * copyright.txt in the distribution for a full listing of = * - * individual contributors. = * - * = * - * This is free software; you can redistribute it and/or modify it = * - * under the terms of the GNU Lesser General Public License as = * - * published by the Free Software Foundation; either version 2.1 of = * - * the License, or (at your option) any later version. = * - * = * - * This software is distributed in the hope that it will be useful, = * - * but WITHOUT ANY WARRANTY; without even the implied warranty of = * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU = * - * Lesser General Public License for more details. = * - * = * - * You should have received a copy of the GNU Lesser General Public = * - * License along with this software; if not, write to the Free = * - * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA = * - * 02110-1301 USA, or see the FSF site: http://www.fsf.org. = * - *************************************************************************= *****/ -package org.jboss.unit.runner.event; - -import org.jboss.unit.runner.TestRunnerEventBroadcaster; -import org.jboss.unit.runner.TestRunnerEvent; -import org.jboss.unit.runner.TestRunnerEventListener; - -/** - * @author Julien Viet - * @version $Revision: 1.1 $ - */ -public class TestRunnerLifeCycleFilter implements TestRunnerEventListener -{ - - /** . */ - private final TestRunnerEventBroadcaster broadcaster; - - public TestRunnerLifeCycleFilter(TestRunnerEventBroadcaster broadcaster) - { - this.broadcaster =3D broadcaster; - } - - public void onEvent(TestRunnerEvent event) - { - if (event instanceof StartRunnerEvent || event instanceof EndRunnerE= vent) - { - return; - } - broadcaster.fireEvent(event); - } -} Deleted: modules/test/trunk/unit/src/main/org/jboss/unit/runner/filter/Null= Filter.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/runner/filter/NullFilte= r.java 2007-10-12 14:06:35 UTC (rev 8616) +++ modules/test/trunk/unit/src/main/org/jboss/unit/runner/filter/NullFilte= r.java 2007-10-12 14:10:24 UTC (rev 8617) @@ -1,55 +0,0 @@ -/*************************************************************************= ***** - * JBoss, a division of Red Hat = * - * Copyright 2006, Red Hat Middleware, LLC, and individual = * - * contributors as indicated by the @authors tag. See the = * - * copyright.txt in the distribution for a full listing of = * - * individual contributors. = * - * = * - * This is free software; you can redistribute it and/or modify it = * - * under the terms of the GNU Lesser General Public License as = * - * published by the Free Software Foundation; either version 2.1 of = * - * the License, or (at your option) any later version. = * - * = * - * This software is distributed in the hope that it will be useful, = * - * but WITHOUT ANY WARRANTY; without even the implied warranty of = * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU = * - * Lesser General Public License for more details. = * - * = * - * You should have received a copy of the GNU Lesser General Public = * - * License along with this software; if not, write to the Free = * - * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA = * - * 02110-1301 USA, or see the FSF site: http://www.fsf.org. = * - *************************************************************************= *****/ -package org.jboss.unit.runner.filter; - -import org.jboss.unit.runner.TestFilter; -import org.jboss.unit.TestId; -import org.jboss.unit.info.TestInfo; - -import java.util.Map; - -/** - * @author Julien Viet - * @version $Revision: 1.1 $ - */ -public class NullFilter implements TestFilter -{ - - /** . */ - private static final NullFilter instance =3D new NullFilter(); - - public static NullFilter getInstance() - { - return instance; - } - - public boolean include(TestId testId, TestInfo testInfo) - { - return true; - } - - public boolean include(TestId testId, Map parametrizati= on, TestInfo testInfo) - { - return true; - } -} Copied: modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/NullFil= ter.java (from rev 8600, modules/test/trunk/unit/src/main/org/jboss/unit/ru= nner/filter/NullFilter.java) =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/NullFilter.= java (rev 0) +++ modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/NullFilter.= java 2007-10-12 14:10:24 UTC (rev 8617) @@ -0,0 +1,55 @@ +/*************************************************************************= ***** + * JBoss, a division of Red Hat = * + * Copyright 2006, Red Hat Middleware, LLC, and individual = * + * contributors as indicated by the @authors tag. See the = * + * copyright.txt in the distribution for a full listing of = * + * individual contributors. = * + * = * + * This is free software; you can redistribute it and/or modify it = * + * under the terms of the GNU Lesser General Public License as = * + * published by the Free Software Foundation; either version 2.1 of = * + * the License, or (at your option) any later version. = * + * = * + * This software is distributed in the hope that it will be useful, = * + * but WITHOUT ANY WARRANTY; without even the implied warranty of = * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU = * + * Lesser General Public License for more details. = * + * = * + * You should have received a copy of the GNU Lesser General Public = * + * License along with this software; if not, write to the Free = * + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA = * + * 02110-1301 USA, or see the FSF site: http://www.fsf.org. = * + *************************************************************************= *****/ +package org.jboss.unit.runner.impl; + +import org.jboss.unit.runner.TestFilter; +import org.jboss.unit.TestId; +import org.jboss.unit.info.TestInfo; + +import java.util.Map; + +/** + * @author Julien Viet + * @version $Revision: 1.1 $ + */ +public class NullFilter implements TestFilter +{ + + /** . */ + private static final NullFilter instance =3D new NullFilter(); + + public static NullFilter getInstance() + { + return instance; + } + + public boolean include(TestId testId, TestInfo testInfo) + { + return true; + } + + public boolean include(TestId testId, Map parametrizati= on, TestInfo testInfo) + { + return true; + } +} Modified: modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/TestR= unnerContextSupport.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/TestRunnerC= ontextSupport.java 2007-10-12 14:06:35 UTC (rev 8616) +++ modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/TestRunnerC= ontextSupport.java 2007-10-12 14:10:24 UTC (rev 8617) @@ -25,8 +25,8 @@ import org.jboss.unit.runner.TestRunnerContext; import org.jboss.unit.runner.TestFilter; import org.jboss.unit.runner.TestRunnerEventBroadcaster; -import org.jboss.unit.runner.event.TestRunnerEventBroadcasterSupport; -import org.jboss.unit.runner.filter.NullFilter; +import org.jboss.unit.runner.impl.TestRunnerEventBroadcasterSupport; +import org.jboss.unit.runner.impl.NullFilter; = import java.util.Map; import java.util.HashMap; Copied: modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/TestRun= nerEventBroadcasterSupport.java (from rev 8600, modules/test/trunk/unit/src= /main/org/jboss/unit/runner/event/TestRunnerEventBroadcasterSupport.java) =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/TestRunnerE= ventBroadcasterSupport.java (rev 0) +++ modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/TestRunnerE= ventBroadcasterSupport.java 2007-10-12 14:10:24 UTC (rev 8617) @@ -0,0 +1,100 @@ +/*************************************************************************= ***** + * JBoss, a division of Red Hat = * + * Copyright 2006, Red Hat Middleware, LLC, and individual = * + * contributors as indicated by the @authors tag. See the = * + * copyright.txt in the distribution for a full listing of = * + * individual contributors. = * + * = * + * This is free software; you can redistribute it and/or modify it = * + * under the terms of the GNU Lesser General Public License as = * + * published by the Free Software Foundation; either version 2.1 of = * + * the License, or (at your option) any later version. = * + * = * + * This software is distributed in the hope that it will be useful, = * + * but WITHOUT ANY WARRANTY; without even the implied warranty of = * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU = * + * Lesser General Public License for more details. = * + * = * + * You should have received a copy of the GNU Lesser General Public = * + * License along with this software; if not, write to the Free = * + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA = * + * 02110-1301 USA, or see the FSF site: http://www.fsf.org. = * + *************************************************************************= *****/ +package org.jboss.unit.runner.impl; + +import org.jboss.unit.runner.TestRunnerEventListener; +import org.jboss.unit.runner.TestRunnerEvent; +import org.jboss.unit.runner.TestRunnerEventBroadcaster; + +import java.util.List; +import java.util.ArrayList; + +/** + * Maintains a set of listeners that will receive events when the fi= reEvent(TestRunnerEvent event) method + * is invoked. When a listener method is invoked, any exception is caught = and logged, this include checked and unchecked + * exception. Any other kind of unchecked throwable will not be handled. + * + * @author Julien Viet + * @version $Revision: 1.1 $ + */ +public class TestRunnerEventBroadcasterSupport implements TestRunnerEventB= roadcaster +{ + + /** . */ + private List listeners =3D new ArrayList(); + + /** + * Add a listener to the set of listeners. + * + * @param listener the listener to add + * @throws IllegalArgumentException if the listener is null + */ + public void addListener(TestRunnerEventListener listener) throws Illega= lArgumentException + { + if (listener =3D=3D null) + { + throw new IllegalArgumentException("No null listener accepted"); + } + if (!listeners.contains(listener)) + { + listeners.add(listener); + } + } + + /** + * Remove a listener from the set of listeners. + * + * @param listener the listener to remove + * @throws IllegalArgumentException if the listener is null + */ + public void removeListener(TestRunnerEventListener listener) + { + if (listener =3D=3D null) + { + throw new IllegalArgumentException("No null listener accepted"); + } + if (listeners.contains(listener)) + { + listeners.remove(listener); + } + } + + public void fireEvent(TestRunnerEvent event) + { + if (event =3D=3D null) + { + throw new IllegalArgumentException(); + } + for (TestRunnerEventListener listener : listeners) + { + try + { + listener.onEvent(event); + } + catch (Exception e) + { +// e.printStackTrace(); + } + } + } +} Copied: modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/TestRun= nerLifeCycleFilter.java (from rev 8600, modules/test/trunk/unit/src/main/or= g/jboss/unit/runner/event/TestRunnerLifeCycleFilter.java) =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/TestRunnerL= ifeCycleFilter.java (rev 0) +++ modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/TestRunnerL= ifeCycleFilter.java 2007-10-12 14:10:24 UTC (rev 8617) @@ -0,0 +1,54 @@ +/*************************************************************************= ***** + * JBoss, a division of Red Hat = * + * Copyright 2006, Red Hat Middleware, LLC, and individual = * + * contributors as indicated by the @authors tag. See the = * + * copyright.txt in the distribution for a full listing of = * + * individual contributors. = * + * = * + * This is free software; you can redistribute it and/or modify it = * + * under the terms of the GNU Lesser General Public License as = * + * published by the Free Software Foundation; either version 2.1 of = * + * the License, or (at your option) any later version. = * + * = * + * This software is distributed in the hope that it will be useful, = * + * but WITHOUT ANY WARRANTY; without even the implied warranty of = * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU = * + * Lesser General Public License for more details. = * + * = * + * You should have received a copy of the GNU Lesser General Public = * + * License along with this software; if not, write to the Free = * + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA = * + * 02110-1301 USA, or see the FSF site: http://www.fsf.org. = * + *************************************************************************= *****/ +package org.jboss.unit.runner.impl; + +import org.jboss.unit.runner.TestRunnerEventBroadcaster; +import org.jboss.unit.runner.TestRunnerEvent; +import org.jboss.unit.runner.TestRunnerEventListener; +import org.jboss.unit.runner.event.StartRunnerEvent; +import org.jboss.unit.runner.event.EndRunnerEvent; + +/** + * @author Julien Viet + * @version $Revision: 1.1 $ + */ +public class TestRunnerLifeCycleFilter implements TestRunnerEventListener +{ + + /** . */ + private final TestRunnerEventBroadcaster broadcaster; + + public TestRunnerLifeCycleFilter(TestRunnerEventBroadcaster broadcaster) + { + this.broadcaster =3D broadcaster; + } + + public void onEvent(TestRunnerEvent event) + { + if (event instanceof StartRunnerEvent || event instanceof EndRunnerE= vent) + { + return; + } + broadcaster.fireEvent(event); + } +} Modified: modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/compo= site/CompositeTestRunner.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/composite/C= ompositeTestRunner.java 2007-10-12 14:06:35 UTC (rev 8616) +++ modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/composite/C= ompositeTestRunner.java 2007-10-12 14:10:24 UTC (rev 8617) @@ -26,8 +26,8 @@ import org.jboss.unit.runner.TestRunner; import org.jboss.unit.runner.TestRunnerContext; import org.jboss.unit.runner.impl.TestRunnerContextSupport; -import org.jboss.unit.runner.event.TestRunnerLifeCycleFilter; -import org.jboss.unit.runner.event.TestRunnerEventBroadcasterSupport; +import org.jboss.unit.runner.impl.TestRunnerEventBroadcasterSupport; +import org.jboss.unit.runner.impl.TestRunnerLifeCycleFilter; = import java.util.Collection; = Modified: modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/gener= ic/GenericTestRunner.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/generic/Gen= ericTestRunner.java 2007-10-12 14:06:35 UTC (rev 8616) +++ modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/generic/Gen= ericTestRunner.java 2007-10-12 14:10:24 UTC (rev 8617) @@ -25,9 +25,9 @@ import org.jboss.unit.runner.AbstractTestRunner; import org.jboss.unit.runner.ParametrizationSet; import org.jboss.unit.runner.TestRunnerContext; -import org.jboss.unit.runner.event.TestRunnerLifeCycleFilter; +import org.jboss.unit.runner.impl.TestRunnerLifeCycleFilter; import org.jboss.unit.runner.event.RunnerFailureEvent; -import org.jboss.unit.runner.event.TestRunnerEventBroadcasterSupport; +import org.jboss.unit.runner.impl.TestRunnerEventBroadcasterSupport; import org.jboss.unit.runner.impl.driver.TestDriverRunner; import org.jboss.unit.runner.impl.TestRunnerContextSupport; import org.jboss.unit.runner.model.generic.GenericTestSuiteDef; Modified: modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/pojo/= POJOTestRunner.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/pojo/POJOTe= stRunner.java 2007-10-12 14:06:35 UTC (rev 8616) +++ modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/pojo/POJOTe= stRunner.java 2007-10-12 14:10:24 UTC (rev 8617) @@ -27,9 +27,9 @@ import org.jboss.unit.runner.TestRunnerContext; import org.jboss.unit.runner.impl.driver.TestDriverRunner; import org.jboss.unit.runner.impl.TestRunnerContextSupport; +import org.jboss.unit.runner.impl.TestRunnerEventBroadcasterSupport; +import org.jboss.unit.runner.impl.TestRunnerLifeCycleFilter; import org.jboss.unit.runner.event.RunnerFailureEvent; -import org.jboss.unit.runner.event.TestRunnerLifeCycleFilter; -import org.jboss.unit.runner.event.TestRunnerEventBroadcasterSupport; import org.jboss.unit.runner.model.pojo.POJOTestSuiteDef; import org.jboss.unit.runner.model.pojo.TestClassDef; import org.jboss.unit.runner.model.pojo.TestCaseDef; Modified: modules/test/trunk/unit/src/main/org/jboss/unit/tooling/Main.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/tooling/Main.java 2007-= 10-12 14:06:35 UTC (rev 8616) +++ modules/test/trunk/unit/src/main/org/jboss/unit/tooling/Main.java 2007-= 10-12 14:10:24 UTC (rev 8617) @@ -24,7 +24,7 @@ = import org.jboss.unit.runner.TestRunner; import org.jboss.unit.runner.impl.TestRunnerContextSupport; -import org.jboss.unit.runner.event.TestRunnerEventBroadcasterSupport; +import org.jboss.unit.runner.impl.TestRunnerEventBroadcasterSupport; import org.jboss.unit.runner.model.TestSuiteDef; import org.jboss.unit.tooling.filter.MainTestFilter; = Modified: modules/test/trunk/unit/src/main/org/jboss/unit/tooling/MainBuild= er.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/tooling/MainBuilder.jav= a 2007-10-12 14:06:35 UTC (rev 8616) +++ modules/test/trunk/unit/src/main/org/jboss/unit/tooling/MainBuilder.jav= a 2007-10-12 14:10:24 UTC (rev 8617) @@ -24,8 +24,8 @@ = import org.jboss.unit.runner.TestRunnerEventListener; import org.jboss.unit.runner.TestRunner; -import org.jboss.unit.runner.event.TestRunnerEventBroadcasterSupport; -import org.jboss.unit.runner.filter.NullFilter; +import org.jboss.unit.runner.impl.TestRunnerEventBroadcasterSupport; +import org.jboss.unit.runner.impl.NullFilter; import org.jboss.unit.runner.model.ModelBuilder; import org.jboss.unit.runner.model.TestSuiteDef; import org.jboss.unit.report.impl.junit.JUnitReporter; --===============7196394875975812723==-- From portal-commits at lists.jboss.org Fri Oct 12 10:11:01 2007 Content-Type: multipart/mixed; boundary="===============9005725773077706820==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8618 - modules/test/trunk/unit/src/main/org/jboss/unit/runner. Date: Fri, 12 Oct 2007 10:11:01 -0400 Message-ID: --===============9005725773077706820== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: julien(a)jboss.com Date: 2007-10-12 10:11:01 -0400 (Fri, 12 Oct 2007) New Revision: 8618 Removed: modules/test/trunk/unit/src/main/org/jboss/unit/runner/filter/ Log: remove empty dir --===============9005725773077706820==-- From portal-commits at lists.jboss.org Fri Oct 12 10:28:31 2007 Content-Type: multipart/mixed; boundary="===============2130037826014247712==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8619 - in modules/test/trunk/unit/src/main/org/jboss: test/unit/runner/event and 7 other directories. Date: Fri, 12 Oct 2007 10:28:31 -0400 Message-ID: --===============2130037826014247712== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: julien(a)jboss.com Date: 2007-10-12 10:28:31 -0400 (Fri, 12 Oct 2007) New Revision: 8619 Added: modules/test/trunk/unit/src/main/org/jboss/unit/runner/TestRunnerEventFi= lter.java Removed: modules/test/trunk/unit/src/main/org/jboss/unit/runner/TestRunnerEventBr= oadcaster.java Modified: modules/test/trunk/unit/src/main/org/jboss/test/unit/runner/CompositeTes= tRunnerTests.java modules/test/trunk/unit/src/main/org/jboss/test/unit/runner/TestDriverRu= nnerTests.java modules/test/trunk/unit/src/main/org/jboss/test/unit/runner/event/TestRu= nnerEventBroadcasterSupportTests.java modules/test/trunk/unit/src/main/org/jboss/test/unit/runner/event/TestRu= nnerLifeCycleFilterTests.java modules/test/trunk/unit/src/main/org/jboss/unit/runner/AbstractTestRunne= r.java modules/test/trunk/unit/src/main/org/jboss/unit/runner/TestRunnerContext= .java modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/TestRunnerCo= ntextSupport.java modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/TestRunnerEv= entBroadcasterSupport.java modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/TestRunnerLi= feCycleFilter.java modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/composite/Co= mpositeTestRunner.java modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/driver/TestD= riverRunner.java modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/event/EventD= rivenTestRunner.java modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/generic/Gene= ricTestRunner.java modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/pojo/POJOTes= tRunner.java Log: simplified a bit and removed TestRunnerEventBroadcaster interface Modified: modules/test/trunk/unit/src/main/org/jboss/test/unit/runner/Compo= siteTestRunnerTests.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/test/unit/runner/CompositeTe= stRunnerTests.java 2007-10-12 14:11:01 UTC (rev 8618) +++ modules/test/trunk/unit/src/main/org/jboss/test/unit/runner/CompositeTe= stRunnerTests.java 2007-10-12 14:28:31 UTC (rev 8619) @@ -26,7 +26,7 @@ import org.jboss.unit.runner.AbstractTestRunner; import org.jboss.unit.runner.TestRunnerEvent; import org.jboss.unit.runner.TestRunnerContext; -import org.jboss.unit.runner.TestRunnerEventBroadcaster; +import org.jboss.unit.runner.TestRunnerEventListener; import org.jboss.unit.runner.impl.composite.CompositeTestRunner; import org.jboss.unit.runner.impl.TestRunnerContextSupport; = @@ -46,9 +46,9 @@ = private static List events =3D new ArrayList(); = - private static TestRunnerEventBroadcaster listener =3D new TestRunnerEv= entBroadcaster() + private static TestRunnerEventListener listener =3D new TestRunnerEvent= Listener() { - public void fireEvent(TestRunnerEvent event) throws IllegalArgumentE= xception + public void onEvent(TestRunnerEvent event) { events.add(event); } @@ -180,7 +180,7 @@ protected void internalRun(TestRunnerContext context) { invoked =3D true; - context.getEventBroadcaster().fireEvent(event); + context.getEventListener().onEvent(event); } } = Modified: modules/test/trunk/unit/src/main/org/jboss/test/unit/runner/TestD= riverRunnerTests.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/test/unit/runner/TestDriverR= unnerTests.java 2007-10-12 14:11:01 UTC (rev 8618) +++ modules/test/trunk/unit/src/main/org/jboss/test/unit/runner/TestDriverR= unnerTests.java 2007-10-12 14:28:31 UTC (rev 8619) @@ -24,18 +24,16 @@ = import org.jboss.unit.runner.impl.driver.TestDriverRunner; import org.jboss.unit.runner.impl.TestRunnerContextSupport; -import org.jboss.unit.runner.TestRunnerEventListener; import org.jboss.unit.runner.TestRunnerEvent; import org.jboss.unit.runner.TestResult; import org.jboss.unit.runner.ParametrizationSet; -import org.jboss.unit.runner.TestRunnerEventBroadcaster; +import org.jboss.unit.runner.TestRunnerEventListener; import org.jboss.unit.runner.results.TestFailure; import org.jboss.unit.runner.results.TestSuccess; import org.jboss.unit.runner.event.EndTestEvent; import org.jboss.unit.runner.event.StartTestEvent; import org.jboss.unit.runner.event.StartRunnerEvent; import org.jboss.unit.runner.event.EndRunnerEvent; -import org.jboss.unit.driver.TestDriver; import org.jboss.unit.driver.DriverResponse; import org.jboss.unit.driver.DriverCommand; import org.jboss.unit.driver.AbstractTestDriver; @@ -438,13 +436,13 @@ assertInstanceOf(event, EndRunnerEvent.class); } = - private static class EventList implements TestRunnerEventBroadcaster + private static class EventList implements TestRunnerEventListener { = /** . */ private final List events =3D new ArrayList(); = - public void fireEvent(TestRunnerEvent event) throws IllegalArgumentE= xception + public void onEvent(TestRunnerEvent event) { events.add(event); } Modified: modules/test/trunk/unit/src/main/org/jboss/test/unit/runner/event= /TestRunnerEventBroadcasterSupportTests.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/test/unit/runner/event/TestR= unnerEventBroadcasterSupportTests.java 2007-10-12 14:11:01 UTC (rev 8618) +++ modules/test/trunk/unit/src/main/org/jboss/test/unit/runner/event/TestR= unnerEventBroadcasterSupportTests.java 2007-10-12 14:28:31 UTC (rev 8619) @@ -87,7 +87,7 @@ { try { - support.fireEvent(null); + support.onEvent(null); fail("Was expecting an IAE"); } catch (IllegalArgumentException expected) @@ -100,7 +100,7 @@ MyEvent event =3D new MyEvent(); support.addListener(listener1); support.addListener(listener1); - support.fireEvent(event); + support.onEvent(event); assertEquals(list(event), listener1.events); } = @@ -108,7 +108,7 @@ { MyEvent event =3D new MyEvent(); support.addListener(listener1); - support.fireEvent(event); + support.onEvent(event); assertEquals(list(event), listener1.events); } = @@ -117,7 +117,7 @@ MyEvent event =3D new MyEvent(); support.addListener(listener1); support.removeListener(listener1); - support.fireEvent(event); + support.onEvent(event); assertEquals(0, listener1.events.size()); } = @@ -126,7 +126,7 @@ MyEvent event =3D new MyEvent(); support.addListener(listener1); support.addListener(listener2); - support.fireEvent(event); + support.onEvent(event); assertEquals(list(event), listener1.events); assertEquals(list(event), listener2.events); } @@ -139,7 +139,7 @@ = // listener1.throwable =3D new RuntimeException(); - support.fireEvent(event); + support.onEvent(event); assertEquals(list(event), listener2.events); = // @@ -147,7 +147,7 @@ listener2.events.clear(); listener1.throwable =3D null; listener2.throwable =3D new RuntimeException(); - support.fireEvent(event); + support.onEvent(event); assertEquals(list(event), listener1.events); = // @@ -160,7 +160,7 @@ listener2.throwable =3D null; try { - support.fireEvent(event); + support.onEvent(event); fail("Was expecting an error"); } catch (Error expected) @@ -176,7 +176,7 @@ listener2.throwable =3D new Error(); try { - support.fireEvent(event); + support.onEvent(event); fail("Was expecting an error"); } catch (Error expected) Modified: modules/test/trunk/unit/src/main/org/jboss/test/unit/runner/event= /TestRunnerLifeCycleFilterTests.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/test/unit/runner/event/TestR= unnerLifeCycleFilterTests.java 2007-10-12 14:11:01 UTC (rev 8618) +++ modules/test/trunk/unit/src/main/org/jboss/test/unit/runner/event/TestR= unnerLifeCycleFilterTests.java 2007-10-12 14:28:31 UTC (rev 8619) @@ -25,7 +25,7 @@ import static org.jboss.unit.api.Assert.assertNull; import static org.jboss.unit.api.Assert.assertSame; import org.jboss.unit.runner.TestRunnerEvent; -import org.jboss.unit.runner.TestRunnerEventBroadcaster; +import org.jboss.unit.runner.TestRunnerEventListener; import org.jboss.unit.runner.impl.TestRunnerLifeCycleFilter; import org.jboss.unit.runner.event.EndRunnerEvent; import org.jboss.unit.runner.event.StartRunnerEvent; @@ -42,9 +42,9 @@ = public static void main(String[] args) { - TestRunnerEventBroadcaster broadcaster =3D new TestRunnerEventBroadc= aster() + TestRunnerEventListener broadcaster =3D new TestRunnerEventListener() { - public void fireEvent(TestRunnerEvent event) + public void onEvent(TestRunnerEvent event) { TestRunnerLifeCycleFilterTests.event =3D event; } Modified: modules/test/trunk/unit/src/main/org/jboss/unit/runner/AbstractTe= stRunner.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/runner/AbstractTestRunn= er.java 2007-10-12 14:11:01 UTC (rev 8618) +++ modules/test/trunk/unit/src/main/org/jboss/unit/runner/AbstractTestRunn= er.java 2007-10-12 14:28:31 UTC (rev 8619) @@ -38,10 +38,10 @@ = public final void run(TestRunnerContext context) { - TestRunnerEventBroadcaster broadcaster =3D context.getEventBroadcast= er(); - broadcaster.fireEvent(new StartRunnerEvent()); + TestRunnerEventListener broadcaster =3D context.getEventListener(); + broadcaster.onEvent(new StartRunnerEvent()); internalRun(context); - broadcaster.fireEvent(new EndRunnerEvent()); + broadcaster.onEvent(new EndRunnerEvent()); } = protected abstract void internalRun(TestRunnerContext context); Modified: modules/test/trunk/unit/src/main/org/jboss/unit/runner/TestRunner= Context.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/runner/TestRunnerContex= t.java 2007-10-12 14:11:01 UTC (rev 8618) +++ modules/test/trunk/unit/src/main/org/jboss/unit/runner/TestRunnerContex= t.java 2007-10-12 14:28:31 UTC (rev 8619) @@ -35,6 +35,6 @@ = TestFilter getFilter(); = - TestRunnerEventBroadcaster getEventBroadcaster(); + TestRunnerEventListener getEventListener(); = } Deleted: modules/test/trunk/unit/src/main/org/jboss/unit/runner/TestRunnerE= ventBroadcaster.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/runner/TestRunnerEventB= roadcaster.java 2007-10-12 14:11:01 UTC (rev 8618) +++ modules/test/trunk/unit/src/main/org/jboss/unit/runner/TestRunnerEventB= roadcaster.java 2007-10-12 14:28:31 UTC (rev 8619) @@ -1,40 +0,0 @@ -/*************************************************************************= ***** - * JBoss, a division of Red Hat = * - * Copyright 2006, Red Hat Middleware, LLC, and individual = * - * contributors as indicated by the @authors tag. See the = * - * copyright.txt in the distribution for a full listing of = * - * individual contributors. = * - * = * - * This is free software; you can redistribute it and/or modify it = * - * under the terms of the GNU Lesser General Public License as = * - * published by the Free Software Foundation; either version 2.1 of = * - * the License, or (at your option) any later version. = * - * = * - * This software is distributed in the hope that it will be useful, = * - * but WITHOUT ANY WARRANTY; without even the implied warranty of = * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU = * - * Lesser General Public License for more details. = * - * = * - * You should have received a copy of the GNU Lesser General Public = * - * License along with this software; if not, write to the Free = * - * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA = * - * 02110-1301 USA, or see the FSF site: http://www.fsf.org. = * - *************************************************************************= *****/ -package org.jboss.unit.runner; - -/** - * A test runner event broadcaster. = - * - * @author Julien Viet - * @version $Revision: 1.1 $ - */ -public interface TestRunnerEventBroadcaster -{ - /** - * Fire an event through the broadcaster. - * - * @param event the event to fire - * @throws IllegalArgumentException if the event object is null - */ - void fireEvent(TestRunnerEvent event) throws IllegalArgumentException; -} Added: modules/test/trunk/unit/src/main/org/jboss/unit/runner/TestRunnerEve= ntFilter.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/runner/TestRunnerEventF= ilter.java (rev 0) +++ modules/test/trunk/unit/src/main/org/jboss/unit/runner/TestRunnerEventF= ilter.java 2007-10-12 14:28:31 UTC (rev 8619) @@ -0,0 +1,54 @@ +/*************************************************************************= ***** + * JBoss, a division of Red Hat = * + * Copyright 2006, Red Hat Middleware, LLC, and individual = * + * contributors as indicated by the @authors tag. See the = * + * copyright.txt in the distribution for a full listing of = * + * individual contributors. = * + * = * + * This is free software; you can redistribute it and/or modify it = * + * under the terms of the GNU Lesser General Public License as = * + * published by the Free Software Foundation; either version 2.1 of = * + * the License, or (at your option) any later version. = * + * = * + * This software is distributed in the hope that it will be useful, = * + * but WITHOUT ANY WARRANTY; without even the implied warranty of = * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU = * + * Lesser General Public License for more details. = * + * = * + * You should have received a copy of the GNU Lesser General Public = * + * License along with this software; if not, write to the Free = * + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA = * + * 02110-1301 USA, or see the FSF site: http://www.fsf.org. = * + *************************************************************************= *****/ +package org.jboss.unit.runner; + +/** + * + * @author Julien Viet + * @version $Revision: 1.1 $ + */ +public abstract class TestRunnerEventFilter implements TestRunnerEventList= ener +{ + + /** . */ + private final TestRunnerEventListener broadcaster; + + protected TestRunnerEventFilter(TestRunnerEventListener broadcaster) + { + if (broadcaster =3D=3D null) + { + throw new IllegalArgumentException(); + } + this.broadcaster =3D broadcaster; + } + + public void onEvent(TestRunnerEvent event) + { + if (!filter(event)) + { + broadcaster.onEvent(event); + } + } + + protected abstract boolean filter(TestRunnerEvent event); +} Modified: modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/TestR= unnerContextSupport.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/TestRunnerC= ontextSupport.java 2007-10-12 14:11:01 UTC (rev 8618) +++ modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/TestRunnerC= ontextSupport.java 2007-10-12 14:28:31 UTC (rev 8619) @@ -24,9 +24,7 @@ = import org.jboss.unit.runner.TestRunnerContext; import org.jboss.unit.runner.TestFilter; -import org.jboss.unit.runner.TestRunnerEventBroadcaster; -import org.jboss.unit.runner.impl.TestRunnerEventBroadcasterSupport; -import org.jboss.unit.runner.impl.NullFilter; +import org.jboss.unit.runner.TestRunnerEventListener; = import java.util.Map; import java.util.HashMap; @@ -45,12 +43,12 @@ private TestFilter filter; = /** . */ - private TestRunnerEventBroadcaster eventBroadcaster; + private TestRunnerEventListener eventListener; = = - public TestRunnerContextSupport(TestRunnerEventBroadcaster eventBroadca= ster) + public TestRunnerContextSupport(TestRunnerEventListener eventListener) { - this(new HashMap(), NullFilter.getInstance(), eventB= roadcaster); + this(new HashMap(), NullFilter.getInstance(), eventL= istener); } = public TestRunnerContextSupport() @@ -58,11 +56,11 @@ this(new HashMap(), NullFilter.getInstance(), new Te= stRunnerEventBroadcasterSupport()); } = - public TestRunnerContextSupport(Map properties, TestFil= ter filter, TestRunnerEventBroadcaster eventBroadcaster) + public TestRunnerContextSupport(Map properties, TestFil= ter filter, TestRunnerEventListener eventListener) { this.properties =3D properties; this.filter =3D filter; - this.eventBroadcaster =3D eventBroadcaster; + this.eventListener =3D eventListener; } = public Map getProperties() @@ -75,8 +73,8 @@ return filter; } = - public TestRunnerEventBroadcaster getEventBroadcaster() + public TestRunnerEventListener getEventListener() { - return eventBroadcaster; + return eventListener; } } Modified: modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/TestR= unnerEventBroadcasterSupport.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/TestRunnerE= ventBroadcasterSupport.java 2007-10-12 14:11:01 UTC (rev 8618) +++ modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/TestRunnerE= ventBroadcasterSupport.java 2007-10-12 14:28:31 UTC (rev 8619) @@ -24,7 +24,6 @@ = import org.jboss.unit.runner.TestRunnerEventListener; import org.jboss.unit.runner.TestRunnerEvent; -import org.jboss.unit.runner.TestRunnerEventBroadcaster; = import java.util.List; import java.util.ArrayList; @@ -37,7 +36,7 @@ * @author Julien Viet * @version $Revision: 1.1 $ */ -public class TestRunnerEventBroadcasterSupport implements TestRunnerEventB= roadcaster +public class TestRunnerEventBroadcasterSupport implements TestRunnerEventL= istener { = /** . */ @@ -79,7 +78,7 @@ } } = - public void fireEvent(TestRunnerEvent event) + public void onEvent(TestRunnerEvent event) { if (event =3D=3D null) { Modified: modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/TestR= unnerLifeCycleFilter.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/TestRunnerL= ifeCycleFilter.java 2007-10-12 14:11:01 UTC (rev 8618) +++ modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/TestRunnerL= ifeCycleFilter.java 2007-10-12 14:28:31 UTC (rev 8619) @@ -22,8 +22,8 @@ *************************************************************************= *****/ package org.jboss.unit.runner.impl; = -import org.jboss.unit.runner.TestRunnerEventBroadcaster; import org.jboss.unit.runner.TestRunnerEvent; +import org.jboss.unit.runner.TestRunnerEventFilter; import org.jboss.unit.runner.TestRunnerEventListener; import org.jboss.unit.runner.event.StartRunnerEvent; import org.jboss.unit.runner.event.EndRunnerEvent; @@ -32,23 +32,16 @@ * @author Julien Viet * @version $Revision: 1.1 $ */ -public class TestRunnerLifeCycleFilter implements TestRunnerEventListener +public class TestRunnerLifeCycleFilter extends TestRunnerEventFilter { = - /** . */ - private final TestRunnerEventBroadcaster broadcaster; - - public TestRunnerLifeCycleFilter(TestRunnerEventBroadcaster broadcaster) + public TestRunnerLifeCycleFilter(TestRunnerEventListener listener) { - this.broadcaster =3D broadcaster; + super(listener); } = - public void onEvent(TestRunnerEvent event) + protected boolean filter(TestRunnerEvent event) { - if (event instanceof StartRunnerEvent || event instanceof EndRunnerE= vent) - { - return; - } - broadcaster.fireEvent(event); + return event instanceof StartRunnerEvent || event instanceof EndRunn= erEvent; = } } Modified: modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/compo= site/CompositeTestRunner.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/composite/C= ompositeTestRunner.java 2007-10-12 14:11:01 UTC (rev 8618) +++ modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/composite/C= ompositeTestRunner.java 2007-10-12 14:28:31 UTC (rev 8619) @@ -54,7 +54,7 @@ { // Setup intermediate event filtering TestRunnerEventBroadcasterSupport tmp =3D new TestRunnerEventBroadca= sterSupport(); - tmp.addListener(new TestRunnerLifeCycleFilter(context.getEventBroadc= aster())); + tmp.addListener(new TestRunnerLifeCycleFilter(context.getEventListen= er())); TestRunnerContextSupport nestedContext =3D new TestRunnerContextSupp= ort(context.getProperties(), context.getFilter(), tmp); = for (TestRunner runner : runners) Modified: modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/drive= r/TestDriverRunner.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/driver/Test= DriverRunner.java 2007-10-12 14:11:01 UTC (rev 8618) +++ modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/driver/Test= DriverRunner.java 2007-10-12 14:28:31 UTC (rev 8619) @@ -103,7 +103,7 @@ { if (testId =3D=3D null) { - context.getEventBroadcaster().fireEvent(new RunnerFailureEvent(Fa= ilure.createErrorFailure("No test id specified"))); + context.getEventListener().onEvent(new RunnerFailureEvent(Failure= .createErrorFailure("No test id specified"))); } else { @@ -114,7 +114,7 @@ } catch (Exception e) { - context.getEventBroadcaster().fireEvent(new RunnerFailureEvent= (Failure.createErrorFailure("Was not able to start the test driver properly= ", e))); + context.getEventListener().onEvent(new RunnerFailureEvent(Fail= ure.createErrorFailure("Was not able to start the test driver properly", e)= )); return; } = @@ -163,7 +163,7 @@ TestCaseInfo testCaseInfo =3D (TestCaseInfo)testInfo; for (Map parametrization : parametrizationSet.e= numerate(testCaseInfo.getParameters().keySet())) { - context.getEventBroadcaster().fireEvent(new StartTestEvent(= testId, testCaseInfo)); + context.getEventListener().onEvent(new StartTestEvent(testI= d, testCaseInfo)); = // StartTestCommand command =3D new StartTestCommand(parametri= zation); @@ -200,7 +200,7 @@ } = // - context.getEventBroadcaster().fireEvent(new EndTestEvent(te= stId, result)); + context.getEventListener().onEvent(new EndTestEvent(testId,= result)); } } } Modified: modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/event= /EventDrivenTestRunner.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/event/Event= DrivenTestRunner.java 2007-10-12 14:11:01 UTC (rev 8618) +++ modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/event/Event= DrivenTestRunner.java 2007-10-12 14:28:31 UTC (rev 8619) @@ -24,7 +24,6 @@ = import org.jboss.unit.runner.AbstractTestRunner; import org.jboss.unit.runner.TestRunnerEvent; -import org.jboss.unit.runner.TestFilter; import org.jboss.unit.runner.TestRunnerContext; = import java.util.Collection; @@ -54,7 +53,7 @@ { for (TestRunnerEvent event : events) { - context.getEventBroadcaster().fireEvent(event); + context.getEventListener().onEvent(event); } } } Modified: modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/gener= ic/GenericTestRunner.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/generic/Gen= ericTestRunner.java 2007-10-12 14:11:01 UTC (rev 8618) +++ modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/generic/Gen= ericTestRunner.java 2007-10-12 14:28:31 UTC (rev 8619) @@ -60,7 +60,7 @@ = // Setup intermediate event filtering TestRunnerEventBroadcasterSupport tmp =3D new TestRunnerEventBroadca= sterSupport(); - tmp.addListener(new TestRunnerLifeCycleFilter(context.getEventBroadc= aster())); + tmp.addListener(new TestRunnerLifeCycleFilter(context.getEventListen= er())); TestRunnerContextSupport nestedContext =3D new TestRunnerContextSupp= ort(context.getProperties(), context.getFilter(), tmp); = // @@ -93,7 +93,7 @@ } catch (Exception e) { - nestedContext.getEventBroadcaster().fireEvent(new RunnerFailureEv= ent(Failure.createErrorFailure("Cannot execute test class " + className,e))= ); + nestedContext.getEventListener().onEvent(new RunnerFailureEvent(F= ailure.createErrorFailure("Cannot execute test class " + className,e))); } } } Modified: modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/pojo/= POJOTestRunner.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/pojo/POJOTe= stRunner.java 2007-10-12 14:11:01 UTC (rev 8618) +++ modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/pojo/POJOTe= stRunner.java 2007-10-12 14:28:31 UTC (rev 8619) @@ -61,7 +61,7 @@ { // Setup intermediate event filtering TestRunnerEventBroadcasterSupport tmp =3D new TestRunnerEventBroadca= sterSupport(); - tmp.addListener(new TestRunnerLifeCycleFilter(context.getEventBroadc= aster())); + tmp.addListener(new TestRunnerLifeCycleFilter(context.getEventListen= er())); TestRunnerContextSupport nestedContext =3D new TestRunnerContextSupp= ort(context.getProperties(), context.getFilter(), tmp); = // @@ -106,7 +106,7 @@ } catch (Exception e) { - nestedContext.getEventBroadcaster().fireEvent(new RunnerFailur= eEvent(Failure.createErrorFailure("Cannot execute test class " + className,= e))); + nestedContext.getEventListener().onEvent(new RunnerFailureEven= t(Failure.createErrorFailure("Cannot execute test class " + className,e))); } } } --===============2130037826014247712==-- From portal-commits at lists.jboss.org Fri Oct 12 10:29:27 2007 Content-Type: multipart/mixed; boundary="===============8963133479651737277==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8620 - in modules/test/trunk/unit/src/main/org/jboss: test/unit/runner/event and 5 other directories. Date: Fri, 12 Oct 2007 10:29:27 -0400 Message-ID: --===============8963133479651737277== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: julien(a)jboss.com Date: 2007-10-12 10:29:27 -0400 (Fri, 12 Oct 2007) New Revision: 8620 Added: modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/TestRunnerEv= entBroadcaster.java Removed: modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/TestRunnerEv= entBroadcasterSupport.java Modified: modules/test/trunk/unit/src/main/org/jboss/test/unit/blah/BlahTestTwo.ja= va modules/test/trunk/unit/src/main/org/jboss/test/unit/blah/BlahTests.java modules/test/trunk/unit/src/main/org/jboss/test/unit/runner/event/TestRu= nnerEventBroadcasterSupportTests.java modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/TestRunnerCo= ntextSupport.java modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/composite/Co= mpositeTestRunner.java modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/generic/Gene= ricTestRunner.java modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/pojo/POJOTes= tRunner.java modules/test/trunk/unit/src/main/org/jboss/unit/tooling/Main.java modules/test/trunk/unit/src/main/org/jboss/unit/tooling/MainBuilder.java Log: renamed TestEventBroadcasterSupport to TestEventBroadcaster Modified: modules/test/trunk/unit/src/main/org/jboss/test/unit/blah/BlahTes= tTwo.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/test/unit/blah/BlahTestTwo.j= ava 2007-10-12 14:28:31 UTC (rev 8619) +++ modules/test/trunk/unit/src/main/org/jboss/test/unit/blah/BlahTestTwo.j= ava 2007-10-12 14:29:27 UTC (rev 8620) @@ -28,7 +28,7 @@ import org.jboss.unit.report.impl.writer.PrintListener; import org.jboss.unit.runner.TestRunner; import org.jboss.unit.runner.TestRunnerEventListener; -import org.jboss.unit.runner.impl.TestRunnerEventBroadcasterSupport; +import org.jboss.unit.runner.impl.TestRunnerEventBroadcaster; import org.jboss.unit.runner.impl.TestRunnerContextSupport; import org.jboss.unit.runner.model.ModelBuilder; import org.jboss.unit.runner.model.TestSuiteDef; @@ -54,7 +54,7 @@ TestRunnerEventListener junitReporter =3D new JUnitReporter("output"= , BlahTestTwo.class.getName()); // add listeners = - TestRunnerEventBroadcasterSupport broadcaster =3D new TestRunnerEven= tBroadcasterSupport(); + TestRunnerEventBroadcaster broadcaster =3D new TestRunnerEventBroadc= aster(); broadcaster.addListener(junitReporter); broadcaster.addListener(new PrintListener()); = Modified: modules/test/trunk/unit/src/main/org/jboss/test/unit/blah/BlahTes= ts.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/test/unit/blah/BlahTests.jav= a 2007-10-12 14:28:31 UTC (rev 8619) +++ modules/test/trunk/unit/src/main/org/jboss/test/unit/blah/BlahTests.jav= a 2007-10-12 14:29:27 UTC (rev 8620) @@ -24,7 +24,7 @@ = import org.jboss.unit.report.impl.writer.PrintListener; import org.jboss.unit.runner.TestRunner; -import org.jboss.unit.runner.impl.TestRunnerEventBroadcasterSupport; +import org.jboss.unit.runner.impl.TestRunnerEventBroadcaster; import org.jboss.unit.runner.impl.TestRunnerContextSupport; import org.jboss.unit.runner.model.ModelBuilder; import org.jboss.unit.runner.model.TestSuiteDef; @@ -49,7 +49,7 @@ = TestRunner runner =3D suite.createRunner(); = - TestRunnerEventBroadcasterSupport broadcaster =3D new TestRunnerEven= tBroadcasterSupport(); + TestRunnerEventBroadcaster broadcaster =3D new TestRunnerEventBroadc= aster(); broadcaster.addListener(new PrintListener()); = runner.run(new TestRunnerContextSupport(broadcaster)); Modified: modules/test/trunk/unit/src/main/org/jboss/test/unit/runner/event= /TestRunnerEventBroadcasterSupportTests.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/test/unit/runner/event/TestR= unnerEventBroadcasterSupportTests.java 2007-10-12 14:28:31 UTC (rev 8619) +++ modules/test/trunk/unit/src/main/org/jboss/test/unit/runner/event/TestR= unnerEventBroadcasterSupportTests.java 2007-10-12 14:29:27 UTC (rev 8620) @@ -25,7 +25,7 @@ import static org.jboss.unit.api.Assert.*; import org.jboss.unit.runner.TestRunnerEvent; import org.jboss.unit.runner.TestRunnerEventListener; -import org.jboss.unit.runner.impl.TestRunnerEventBroadcasterSupport; +import org.jboss.unit.runner.impl.TestRunnerEventBroadcaster; import static org.jboss.unit.util.CollectionTools.list; = import java.util.ArrayList; @@ -39,7 +39,7 @@ { = /** . */ - private TestRunnerEventBroadcasterSupport support =3D new TestRunnerEve= ntBroadcasterSupport(); + private TestRunnerEventBroadcaster support =3D new TestRunnerEventBroad= caster(); = /** . */ private MyListener listener1 =3D new MyListener(); Modified: modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/TestR= unnerContextSupport.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/TestRunnerC= ontextSupport.java 2007-10-12 14:28:31 UTC (rev 8619) +++ modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/TestRunnerC= ontextSupport.java 2007-10-12 14:29:27 UTC (rev 8620) @@ -53,7 +53,7 @@ = public TestRunnerContextSupport() { - this(new HashMap(), NullFilter.getInstance(), new Te= stRunnerEventBroadcasterSupport()); + this(new HashMap(), NullFilter.getInstance(), new Te= stRunnerEventBroadcaster()); } = public TestRunnerContextSupport(Map properties, TestFil= ter filter, TestRunnerEventListener eventListener) Copied: modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/TestRun= nerEventBroadcaster.java (from rev 8619, modules/test/trunk/unit/src/main/o= rg/jboss/unit/runner/impl/TestRunnerEventBroadcasterSupport.java) =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/TestRunnerE= ventBroadcaster.java (rev 0) +++ modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/TestRunnerE= ventBroadcaster.java 2007-10-12 14:29:27 UTC (rev 8620) @@ -0,0 +1,99 @@ +/*************************************************************************= ***** + * JBoss, a division of Red Hat = * + * Copyright 2006, Red Hat Middleware, LLC, and individual = * + * contributors as indicated by the @authors tag. See the = * + * copyright.txt in the distribution for a full listing of = * + * individual contributors. = * + * = * + * This is free software; you can redistribute it and/or modify it = * + * under the terms of the GNU Lesser General Public License as = * + * published by the Free Software Foundation; either version 2.1 of = * + * the License, or (at your option) any later version. = * + * = * + * This software is distributed in the hope that it will be useful, = * + * but WITHOUT ANY WARRANTY; without even the implied warranty of = * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU = * + * Lesser General Public License for more details. = * + * = * + * You should have received a copy of the GNU Lesser General Public = * + * License along with this software; if not, write to the Free = * + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA = * + * 02110-1301 USA, or see the FSF site: http://www.fsf.org. = * + *************************************************************************= *****/ +package org.jboss.unit.runner.impl; + +import org.jboss.unit.runner.TestRunnerEventListener; +import org.jboss.unit.runner.TestRunnerEvent; + +import java.util.List; +import java.util.ArrayList; + +/** + * Maintains a set of listeners that will receive events when the fi= reEvent(TestRunnerEvent event) method + * is invoked. When a listener method is invoked, any exception is caught = and logged, this include checked and unchecked + * exception. Any other kind of unchecked throwable will not be handled. + * + * @author Julien Viet + * @version $Revision: 1.1 $ + */ +public class TestRunnerEventBroadcaster implements TestRunnerEventListener +{ + + /** . */ + private List listeners =3D new ArrayList(); + + /** + * Add a listener to the set of listeners. + * + * @param listener the listener to add + * @throws IllegalArgumentException if the listener is null + */ + public void addListener(TestRunnerEventListener listener) throws Illega= lArgumentException + { + if (listener =3D=3D null) + { + throw new IllegalArgumentException("No null listener accepted"); + } + if (!listeners.contains(listener)) + { + listeners.add(listener); + } + } + + /** + * Remove a listener from the set of listeners. + * + * @param listener the listener to remove + * @throws IllegalArgumentException if the listener is null + */ + public void removeListener(TestRunnerEventListener listener) + { + if (listener =3D=3D null) + { + throw new IllegalArgumentException("No null listener accepted"); + } + if (listeners.contains(listener)) + { + listeners.remove(listener); + } + } + + public void onEvent(TestRunnerEvent event) + { + if (event =3D=3D null) + { + throw new IllegalArgumentException(); + } + for (TestRunnerEventListener listener : listeners) + { + try + { + listener.onEvent(event); + } + catch (Exception e) + { +// e.printStackTrace(); + } + } + } +} Deleted: modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/TestRu= nnerEventBroadcasterSupport.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/TestRunnerE= ventBroadcasterSupport.java 2007-10-12 14:28:31 UTC (rev 8619) +++ modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/TestRunnerE= ventBroadcasterSupport.java 2007-10-12 14:29:27 UTC (rev 8620) @@ -1,99 +0,0 @@ -/*************************************************************************= ***** - * JBoss, a division of Red Hat = * - * Copyright 2006, Red Hat Middleware, LLC, and individual = * - * contributors as indicated by the @authors tag. See the = * - * copyright.txt in the distribution for a full listing of = * - * individual contributors. = * - * = * - * This is free software; you can redistribute it and/or modify it = * - * under the terms of the GNU Lesser General Public License as = * - * published by the Free Software Foundation; either version 2.1 of = * - * the License, or (at your option) any later version. = * - * = * - * This software is distributed in the hope that it will be useful, = * - * but WITHOUT ANY WARRANTY; without even the implied warranty of = * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU = * - * Lesser General Public License for more details. = * - * = * - * You should have received a copy of the GNU Lesser General Public = * - * License along with this software; if not, write to the Free = * - * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA = * - * 02110-1301 USA, or see the FSF site: http://www.fsf.org. = * - *************************************************************************= *****/ -package org.jboss.unit.runner.impl; - -import org.jboss.unit.runner.TestRunnerEventListener; -import org.jboss.unit.runner.TestRunnerEvent; - -import java.util.List; -import java.util.ArrayList; - -/** - * Maintains a set of listeners that will receive events when the fi= reEvent(TestRunnerEvent event) method - * is invoked. When a listener method is invoked, any exception is caught = and logged, this include checked and unchecked - * exception. Any other kind of unchecked throwable will not be handled. - * - * @author Julien Viet - * @version $Revision: 1.1 $ - */ -public class TestRunnerEventBroadcasterSupport implements TestRunnerEventL= istener -{ - - /** . */ - private List listeners =3D new ArrayList(); - - /** - * Add a listener to the set of listeners. - * - * @param listener the listener to add - * @throws IllegalArgumentException if the listener is null - */ - public void addListener(TestRunnerEventListener listener) throws Illega= lArgumentException - { - if (listener =3D=3D null) - { - throw new IllegalArgumentException("No null listener accepted"); - } - if (!listeners.contains(listener)) - { - listeners.add(listener); - } - } - - /** - * Remove a listener from the set of listeners. - * - * @param listener the listener to remove - * @throws IllegalArgumentException if the listener is null - */ - public void removeListener(TestRunnerEventListener listener) - { - if (listener =3D=3D null) - { - throw new IllegalArgumentException("No null listener accepted"); - } - if (listeners.contains(listener)) - { - listeners.remove(listener); - } - } - - public void onEvent(TestRunnerEvent event) - { - if (event =3D=3D null) - { - throw new IllegalArgumentException(); - } - for (TestRunnerEventListener listener : listeners) - { - try - { - listener.onEvent(event); - } - catch (Exception e) - { -// e.printStackTrace(); - } - } - } -} Modified: modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/compo= site/CompositeTestRunner.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/composite/C= ompositeTestRunner.java 2007-10-12 14:28:31 UTC (rev 8619) +++ modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/composite/C= ompositeTestRunner.java 2007-10-12 14:29:27 UTC (rev 8620) @@ -26,7 +26,7 @@ import org.jboss.unit.runner.TestRunner; import org.jboss.unit.runner.TestRunnerContext; import org.jboss.unit.runner.impl.TestRunnerContextSupport; -import org.jboss.unit.runner.impl.TestRunnerEventBroadcasterSupport; +import org.jboss.unit.runner.impl.TestRunnerEventBroadcaster; import org.jboss.unit.runner.impl.TestRunnerLifeCycleFilter; = import java.util.Collection; @@ -53,7 +53,7 @@ protected void internalRun(TestRunnerContext context) { // Setup intermediate event filtering - TestRunnerEventBroadcasterSupport tmp =3D new TestRunnerEventBroadca= sterSupport(); + TestRunnerEventBroadcaster tmp =3D new TestRunnerEventBroadcaster(); tmp.addListener(new TestRunnerLifeCycleFilter(context.getEventListen= er())); TestRunnerContextSupport nestedContext =3D new TestRunnerContextSupp= ort(context.getProperties(), context.getFilter(), tmp); = Modified: modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/gener= ic/GenericTestRunner.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/generic/Gen= ericTestRunner.java 2007-10-12 14:28:31 UTC (rev 8619) +++ modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/generic/Gen= ericTestRunner.java 2007-10-12 14:29:27 UTC (rev 8620) @@ -27,7 +27,7 @@ import org.jboss.unit.runner.TestRunnerContext; import org.jboss.unit.runner.impl.TestRunnerLifeCycleFilter; import org.jboss.unit.runner.event.RunnerFailureEvent; -import org.jboss.unit.runner.impl.TestRunnerEventBroadcasterSupport; +import org.jboss.unit.runner.impl.TestRunnerEventBroadcaster; import org.jboss.unit.runner.impl.driver.TestDriverRunner; import org.jboss.unit.runner.impl.TestRunnerContextSupport; import org.jboss.unit.runner.model.generic.GenericTestSuiteDef; @@ -59,7 +59,7 @@ String className =3D def.getClassName(); = // Setup intermediate event filtering - TestRunnerEventBroadcasterSupport tmp =3D new TestRunnerEventBroadca= sterSupport(); + TestRunnerEventBroadcaster tmp =3D new TestRunnerEventBroadcaster(); tmp.addListener(new TestRunnerLifeCycleFilter(context.getEventListen= er())); TestRunnerContextSupport nestedContext =3D new TestRunnerContextSupp= ort(context.getProperties(), context.getFilter(), tmp); = Modified: modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/pojo/= POJOTestRunner.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/pojo/POJOTe= stRunner.java 2007-10-12 14:28:31 UTC (rev 8619) +++ modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/pojo/POJOTe= stRunner.java 2007-10-12 14:29:27 UTC (rev 8620) @@ -27,7 +27,7 @@ import org.jboss.unit.runner.TestRunnerContext; import org.jboss.unit.runner.impl.driver.TestDriverRunner; import org.jboss.unit.runner.impl.TestRunnerContextSupport; -import org.jboss.unit.runner.impl.TestRunnerEventBroadcasterSupport; +import org.jboss.unit.runner.impl.TestRunnerEventBroadcaster; import org.jboss.unit.runner.impl.TestRunnerLifeCycleFilter; import org.jboss.unit.runner.event.RunnerFailureEvent; import org.jboss.unit.runner.model.pojo.POJOTestSuiteDef; @@ -60,7 +60,7 @@ protected void internalRun(TestRunnerContext context) { // Setup intermediate event filtering - TestRunnerEventBroadcasterSupport tmp =3D new TestRunnerEventBroadca= sterSupport(); + TestRunnerEventBroadcaster tmp =3D new TestRunnerEventBroadcaster(); tmp.addListener(new TestRunnerLifeCycleFilter(context.getEventListen= er())); TestRunnerContextSupport nestedContext =3D new TestRunnerContextSupp= ort(context.getProperties(), context.getFilter(), tmp); = Modified: modules/test/trunk/unit/src/main/org/jboss/unit/tooling/Main.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/tooling/Main.java 2007-= 10-12 14:28:31 UTC (rev 8619) +++ modules/test/trunk/unit/src/main/org/jboss/unit/tooling/Main.java 2007-= 10-12 14:29:27 UTC (rev 8620) @@ -24,7 +24,7 @@ = import org.jboss.unit.runner.TestRunner; import org.jboss.unit.runner.impl.TestRunnerContextSupport; -import org.jboss.unit.runner.impl.TestRunnerEventBroadcasterSupport; +import org.jboss.unit.runner.impl.TestRunnerEventBroadcaster; import org.jboss.unit.runner.model.TestSuiteDef; import org.jboss.unit.tooling.filter.MainTestFilter; = @@ -49,7 +49,7 @@ = private final Map properties; = - private final TestRunnerEventBroadcasterSupport broadcaster; + private final TestRunnerEventBroadcaster broadcaster; = // public static final String JBOSS_UNIT_NAMES =3D "jboss.unit.names"; // @@ -122,7 +122,7 @@ options_no_arg =3D Collections.unmodifiableSet(opts); } = - public Main(TestRunner runner, MainTestFilter mainFilter, TestRunnerEve= ntBroadcasterSupport broadcaster, TestSuiteDef suiteDef, Map= properties) + public Main(TestRunner runner, MainTestFilter mainFilter, TestRunnerEve= ntBroadcaster broadcaster, TestSuiteDef suiteDef, Map proper= ties) { if (runner =3D=3D null) { Modified: modules/test/trunk/unit/src/main/org/jboss/unit/tooling/MainBuild= er.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/tooling/MainBuilder.jav= a 2007-10-12 14:28:31 UTC (rev 8619) +++ modules/test/trunk/unit/src/main/org/jboss/unit/tooling/MainBuilder.jav= a 2007-10-12 14:29:27 UTC (rev 8620) @@ -24,7 +24,7 @@ = import org.jboss.unit.runner.TestRunnerEventListener; import org.jboss.unit.runner.TestRunner; -import org.jboss.unit.runner.impl.TestRunnerEventBroadcasterSupport; +import org.jboss.unit.runner.impl.TestRunnerEventBroadcaster; import org.jboss.unit.runner.impl.NullFilter; import org.jboss.unit.runner.model.ModelBuilder; import org.jboss.unit.runner.model.TestSuiteDef; @@ -341,7 +341,7 @@ ModelBuilder builder =3D new ModelBuilder(source); TestSuiteDef suite =3D builder.build(); TestRunner runner =3D suite.createRunner(); - TestRunnerEventBroadcasterSupport broadcaster =3D new TestRunnerEven= tBroadcasterSupport(); + TestRunnerEventBroadcaster broadcaster =3D new TestRunnerEventBroadc= aster(); = // Add listeners = --===============8963133479651737277==-- From portal-commits at lists.jboss.org Fri Oct 12 10:54:20 2007 Content-Type: multipart/mixed; boundary="===============3918925654141198817==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8621 - branches/JBoss_Portal_Branch_2_6/wsrp/src/resources/portal-wsrp-sar/conf/hibernate/consumer. Date: Fri, 12 Oct 2007 10:54:20 -0400 Message-ID: --===============3918925654141198817== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: chris.laprun(a)jboss.com Date: 2007-10-12 10:54:19 -0400 (Fri, 12 Oct 2007) New Revision: 8621 Modified: branches/JBoss_Portal_Branch_2_6/wsrp/src/resources/portal-wsrp-sar/conf= /hibernate/consumer/hibernate.cfg.xml Log: - Point to the appropriate domain.hbm.xml. I thought I had committed this a= lready (IDEA is really not handling directory moves/renames properly as far= as SVN goes). Modified: branches/JBoss_Portal_Branch_2_6/wsrp/src/resources/portal-wsrp-s= ar/conf/hibernate/consumer/hibernate.cfg.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/wsrp/src/resources/portal-wsrp-sar/con= f/hibernate/consumer/hibernate.cfg.xml 2007-10-12 14:29:27 UTC (rev 8620) +++ branches/JBoss_Portal_Branch_2_6/wsrp/src/resources/portal-wsrp-sar/con= f/hibernate/consumer/hibernate.cfg.xml 2007-10-12 14:54:19 UTC (rev 8621) @@ -53,6 +53,6 @@ --> = - + \ No newline at end of file --===============3918925654141198817==-- From portal-commits at lists.jboss.org Fri Oct 12 10:55:57 2007 Content-Type: multipart/mixed; boundary="===============7792411982767352600==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8622 - trunk/wsrp/src/resources/portal-wsrp-sar/conf/hibernate/consumer. Date: Fri, 12 Oct 2007 10:55:57 -0400 Message-ID: --===============7792411982767352600== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: chris.laprun(a)jboss.com Date: 2007-10-12 10:55:57 -0400 (Fri, 12 Oct 2007) New Revision: 8622 Modified: trunk/wsrp/src/resources/portal-wsrp-sar/conf/hibernate/consumer/hiberna= te.cfg.xml Log: - Point to the appropriate domain.hbm.xml. I thought I had committed this a= lready (IDEA is really not handling directory moves/renames properly as far= as SVN goes). Modified: trunk/wsrp/src/resources/portal-wsrp-sar/conf/hibernate/consumer/= hibernate.cfg.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/wsrp/src/resources/portal-wsrp-sar/conf/hibernate/consumer/hibern= ate.cfg.xml 2007-10-12 14:54:19 UTC (rev 8621) +++ trunk/wsrp/src/resources/portal-wsrp-sar/conf/hibernate/consumer/hibern= ate.cfg.xml 2007-10-12 14:55:57 UTC (rev 8622) @@ -53,6 +53,6 @@ --> = - + \ No newline at end of file --===============7792411982767352600==-- From portal-commits at lists.jboss.org Fri Oct 12 17:06:39 2007 Content-Type: multipart/mixed; boundary="===============4592198474841454492==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8623 - in docs: trunk/referenceGuide/en/modules and 1 other directory. Date: Fri, 12 Oct 2007 17:06:39 -0400 Message-ID: --===============4592198474841454492== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: chris.laprun(a)jboss.com Date: 2007-10-12 17:06:39 -0400 (Fri, 12 Oct 2007) New Revision: 8623 Modified: docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/tutorial= s.xml docs/trunk/referenceGuide/en/modules/tutorials.xml Log: - Minor content improvements. Modified: docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/t= utorials.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/tutoria= ls.xml 2007-10-12 14:55:57 UTC (rev 8622) +++ docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/tutoria= ls.xml 2007-10-12 21:06:39 UTC (rev 8623) @@ -282,11 +282,11 @@ ]]> - This is a JBoss Portal specific descriptor that al= lows you create an instance of a portlet. The + This is a JBoss Portal specific descriptor that al= lows you to create instances of portlets. The portlet-ref value must match th= e portlet-name value given in the packaged portlet.xml. The instance-id - value can be named anything, but it must match the= instance-ref value given - in the *-object.xml file we wil= l explore below. + value can be named anything, but it must match instance-ref values given + in *-object.xml files as we sha= ll below. @@ -309,7 +309,7 @@ ]]> = *-object.xml files are JBoss Po= rtal specific descriptors and allow users to - define the structure of their portal instances as = well as create/configure thier windows and + define the structure of their portal instances as = well as create/configure their windows and pages. In our example, we create a portlet window,= specify that it will display the markup generated by the HelloWorldPortletInstanc= e portlet instance, assign it to the = default.default page, and speci= fy where it should appear on that page. @@ -343,8 +343,8 @@ He= lloWorldPortletInstance]]> - The value of instance-ref must match the value of - instance-id found in t= he portlet-instances.xml. + The value of instance-ref must match the value of one of the + instance-id found in <= literal>portlet-instances.xml. Modified: docs/trunk/referenceGuide/en/modules/tutorials.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- docs/trunk/referenceGuide/en/modules/tutorials.xml 2007-10-12 14:55:57 = UTC (rev 8622) +++ docs/trunk/referenceGuide/en/modules/tutorials.xml 2007-10-12 21:06:39 = UTC (rev 8623) @@ -246,7 +246,7 @@ portlet supports in the render method. This is accomplish via the mime-type element, whi= ch is required for every portlet. Of course, the declared MIME typ= es must match the capability of the portlet. - = + It also allows you to pair which modes and window states are support= ed for each markup type. In out case, as all portlets must support the VIEW portlet mo= de, we didn't have to declare it. We did need @@ -282,11 +282,11 @@ ]]> - This is a JBoss Portal specific descriptor that al= lows you create an instance of a portlet. The + This is a JBoss Portal specific descriptor that al= lows you to create instances of portlets. The portlet-ref value must match th= e portlet-name value given in the packaged portlet.xml. The instance-id - value can be named anything, but it must match the= instance-ref value given - in the *-object.xml file we wil= l explore below. + value can be named anything, but it must match instance-ref values given + in *-object.xml files as we sha= ll below. @@ -309,11 +309,11 @@ ]]> = *-object.xml files are JBoss Po= rtal specific descriptors and allow users to - define the structure of their portal instances as = well as create/configure thier windows and + define the structure of their portal instances as = well as create/configure their windows and pages. In our example, we create a portlet window,= specify that it will display the markup - generated by the HelloWorldPortletInstanc= e portlet instance, assign it to the = + generated by the HelloWorldPortletInstanc= e portlet instance, assign it to the default.default page, and speci= fy where it should appear on that page. - = + @@ -343,8 +343,8 @@ He= lloWorldPortletInstance]]> - The value of instance-ref must match the value of - instance-id found in t= he portlet-instances.xml. + The value of instance-ref must match the value of one of the + instance-id found in <= literal>portlet-instances.xml. @@ -368,7 +368,7 @@ - = + Portal 2.6 introduces the notion of content type<= /emphasis>, which is a generic mechanism to specify which content will be displayed by a given portlet = window. The window section @@ -438,7 +438,7 @@ easily modify the XML descriptors, resources files, JSF/JSP= pages. A simple touch operation (or equivalent) on the web.xml= file will let any live JBoss Application Server instance know that it needs to hot-redeploy your web= application. - = + Deploying your portlet @@ -612,7 +612,7 @@ - = + JSP files and the portlet taglib @@ -709,7 +709,7 @@ - = + A simple Sun's JSF Reference Implementation (RI) portlet o= n JBoss AS 4.2.x @@ -720,7 +720,7 @@ from PortletSwap.com, using this link: http://anonsvn.jboss.org/= repos/portletswap/portlets/2_6/bundles/HelloWorldJSFSunRIPortlet.zip. - = + Package Content @@ -847,7 +847,7 @@ - jsf-portlet.jar This library= that can be downloaded here: https://jsfportletbridge.dev.java.net/= servlets/ProjectDocumentList = + jsf-portlet.jar This library= that can be downloaded here: https://jsfportletbridge.dev.java.net/= servlets/ProjectDocumentList contains the classes for the JSF-Portlet bridge. Sinc= e they are not included with the JSF implementation (unlike myfaces) neither in JBoss AS, = it is required to have this library available in the package. @@ -855,7 +855,7 @@ - + Modified: docs/trunk/referenceGuide/en/modules/urls.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- docs/trunk/referenceGuide/en/modules/urls.xml 2007-10-12 23:40:19 UTC (= rev 8624) +++ docs/trunk/referenceGuide/en/modules/urls.xml 2007-10-13 00:08:20 UTC (= rev 8625) @@ -31,71 +31,74 @@ Accessing a portal Each portal container can contains multiple portals, also th= ere is one special portal - which is the default portal, i.e the one used when no portal i= s specified in particular. - The following examples show you how the sel= ection is done. - "/", will point to the default page of the d= efault portal. - "/portal/portalname/" will point to the default = page of the portal - portalname - - + which is the default portal, i.e the one used when no portal is= specified in particular. + The following examples show you how the selectio= n is done. + "/portal", will point to the default page of the d= efault portal. + "/portal/portalname/" will point to the default pa= ge of the portal + portalname + + Accessing a page It is possible to have multiple pages per portal. As for por= tal there is a default - page for a given portal. Once the portal has been selected, th= en a page must be used and - all the windows present in that page will be rendered. The pag= e selection mechanism is - the following. - "/portal/default/pageName" will render the pageName - page. - + page for a given portal. Once the portal has been selected, the= n a page must be used and + all the windows present in that page will be rendered. The page= selection mechanism is + the following. + + "/portal/default/pageName" will render the pageName + page. + Accessing CMS Content The CMSPortlet delivers content transparently, without modif= ying the url displayed. - However, if you wish to deliver binary content (gif, jpeg, pdf= , zip, etc...), it is - desirable to display this content outside of the confines of t= he portal. - - - "/content/default/images/jboss_logo.gif" will display the - jboss_logo.gif outside of the porta= l. This is accomplished as - the portal interprets any path beginning with /co= ntent as a - request for CMS content. As long as the mime-type is not t= ext/html or text/text, it - will be rendered independant of the portal. - + However, if you wish to deliver binary content (gif, jpeg, pdf,= zip, etc...), it is + desirable to display this content outside of the confines of th= e portal. + + + "/content/default/images/jboss_logo.gif" will display the + jboss_logo.gif outside of the portal. = This is accomplished as + the portal interprets any path beginning with /c= ontent as a + request for CMS content. As long as the mime-type is not = text/html + or text/text, it will be rendered inde= pendently of the portal. + + + - + --===============0659988843808490430==-- From portal-commits at lists.jboss.org Fri Oct 12 21:34:15 2007 Content-Type: multipart/mixed; boundary="===============9207558581556798969==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8626 - in docs: branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules and 2 other directories. Date: Fri, 12 Oct 2007 21:34:14 -0400 Message-ID: --===============9207558581556798969== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: chris.laprun(a)jboss.com Date: 2007-10-12 21:34:14 -0400 (Fri, 12 Oct 2007) New Revision: 8626 Modified: docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/images/errorhand= ling/errorHandlingUI.png docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/errorhan= dling.xml docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/wsrp.xml docs/trunk/referenceGuide/en/images/errorhandling/errorHandlingUI.png docs/trunk/referenceGuide/en/modules/errorhandling.xml docs/trunk/referenceGuide/en/modules/wsrp.xml Log: - Minor content improvements. - Updated error handling screenshot to be less wide. Modified: docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/images/er= rorhandling/errorHandlingUI.png =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D (Binary files differ) Modified: docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/e= rrorhandling.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/errorha= ndling.xml 2007-10-13 00:08:20 UTC (rev 8625) +++ docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/errorha= ndling.xml 2007-10-13 01:34:14 UTC (rev 8626) @@ -8,18 +8,19 @@ Error handling configuration - JBoss Portal request pipeline provides configuring of the error h= andling policy. At runtime when an error - occurs it is possible to configure how the portal behaves in a fine gra= ined and dynamic manner. + JBoss Portal's request pipeline allows for fine-grained, dynamic = configuration of how Portal will behave when + an error occurs at runtime. Error types - There are several kind of errors that can be happen during a r= equest. - - Access denied: the user does not have the security righ= ts to access a resource - Error: an expected error, like a portlet threw an excep= tion - Internal error: an unexpected error - Resource not found: a resource is not found - Resource not available: a resource is found but is not = serviceable - + There are several kind of errors that can happen during a requ= est: + + Access denied: the user does not have the security r= ights to access a resource + Error: an anticipated error as when a portlet throws= an exception + Internal error: an unexpected error + Resource not found: a resource is not found + Resource not available: a resource is found but is n= ot serviceable + + Control policies @@ -28,29 +29,30 @@ Policy delegation and cascading Whenever a control policy is invoked it is given the opport= unity to change the response sent - by the control flow. If the control policy ignores the error then= the next policy will handle the error - at this turn. However if the control policy decides to provide a = new response then the next policy - will not be invoked since the new response will not be of type er= ror. For instance, if a portlet part of a page - produces an exception, the following reactions are possible: - - The error is displayed in the window - The window is removed from the aggregation - An portal error page is displayed - An HTTP 500 error response is sent to the browser - + by the control flow. If the control policy ignores the error t= hen the next policy will handle the error + at this turn. However if the control policy decides to provide= a new response then the next policy + will not be invoked since the new response will not be of type= error. For instance, if a portlet part of a + page produces an exception, the following reactions are possib= le: + + The error is displayed in the window + The window is removed from the aggregation + An portal error page is displayed + An HTTP 500 error response is sent to the browser= + + Default policy The default policy applies when error are not handled at ot= her level. By default errors are translated into the most appropriate HTTP response: + + Access denied: HTTP 403 Forbidden response + Error: HTTP 500 Internal Server Error response + Internal error: HTTP 500 Internal Server Error re= sponse + Resource not found: HTTP 404 Not Found response + Resource not available: HTTP 404 Not Found respon= se + - - Access denied: HTTP 403 Forbidden response - Error: HTTP 500 Internal Server Error response - Internal error: HTTP 500 Internal Server Error respo= nse - Resource not found: HTTP 404 Not Found response - Resource not available: HTTP 404 Not Found response<= /listitem> - Portal policy @@ -61,14 +63,15 @@ Page policy - Window error policy controls how the page reacts to aggrega= tion errors. Indeed the page is most of the time - an aggregation of several portlet windows and the action to take = when an error occurs is different than the other - policies. Whenever an error occurs, the policy can either handle = it or ignore it. If the error is ignored then - it will be treated by the portal policy. The different actions th= at are possible upon an error are: - - Remove the window from the aggregation - Replace the markup of the window by a redirection to= a JSP page - + Window error policy controls how the page reacts to aggrega= tion errors. Indeed the page is most of the + time an aggregation of several portlet windows and the action = to take when an error occurs is different than + the other policies. Whenever an error occurs, the policy can e= ither handle it or ignore it. If the error is + ignored then it will be treated by the portal policy. The diff= erent actions that are possible upon an error are: + + Remove the window from the aggregation + Replace the markup of the window by a redirection= to a JSP page + + @@ -310,11 +313,10 @@ clicking on the Properties link on each of these pages. You can a= lso specify how dashboards should behave with respect to error handling by clicking on the Dashboards tab of th= e Portal management application. - Screenshot: - - - - + Screenshot: + + + \ No newline at end of file Modified: docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/w= srp.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/wsrp.xm= l 2007-10-13 00:08:20 UTC (rev 8625) +++ docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/wsrp.xm= l 2007-10-13 01:34:14 UTC (rev 8626) @@ -70,7 +70,7 @@ JBoss Portal provides a complete support of WSRP 1.0 standard int= erfaces and offers both consumer and producer services. WSRP support is provided by = the portal-wsrp.sar - service archive, included in the main jboss-portal.sar<= /emphasis> service archive, if you've = + service archive, included in the main jboss-portal.sar<= /emphasis> service archive, if you've obtained JBoss Portal from a binary distribution. If you don't in= tend on using WSRP, we recommend that you remove the portal-wspr.sar from the main jboss-portal.sar service archive. @@ -337,35 +337,35 @@ Let's now look at the Admin page and the Management portlet= . Click on the "Portlet definitions" tab at the top. Once this is done, look at the list of available portl= et providers. If all went well, you should see something similar to this: - - - - - - - - We have 3 available portlet providers: local, self and bea. The - "local" portlet provider exposes all the portlets deployed in = this particular instance of Portal. As - explained above, the "self" provider refers to the default WSR= P consumer bundled with Portal that consumes - the portlets exposed by the default WSRP producer. The "bea" p= rovider corresponds to BEA's public producer - we just configured. Select it and click on "Change". You shoul= d now see something similar to: - - - - - - - - From there on out, you should be able to configure WSRP portle= ts just as any other. In particular, you - can create an instance of one of the remote portlets offered by BEA's p= ublic producer just like you would - create an instance of a local portlet and then assign it to a window in= a page. If you go to that page, you - should see something similar to below for this portlet: - - - - - - + + + + + + + + We have 3 available portlet providers: local, sel= f and bea. The + "local" portlet provider exposes all the portlets deployed = in this particular instance of Portal. As + explained above, the "self" provider refers to the default = WSRP consumer bundled with Portal that consumes + the portlets exposed by the default WSRP producer. The "bea= " provider corresponds to BEA's public producer + we just configured. Select it and click on "Change". You sh= ould now see something similar to: + + + + + + + + From there on out, you should be able to configure WSRP por= tlets just as any other. In particular, you + can create an instance of one of the remote portlets offere= d by BEA's public producer just like you would + create an instance of a local portlet and then assign it to= a window in a page. If you go to that page, you + should see something similar to below for this portlet: + + + + + + = @@ -487,7 +487,7 @@ = = + = @@ -526,7 +526,7 @@ - = + @@ -557,7 +557,7 @@ - = + @@ -702,7 +702,7 @@ - = + com.example.portal.SomeCustomRegistrationPolicy Modified: docs/trunk/referenceGuide/en/images/errorhandling/errorHandlingUI= .png =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D (Binary files differ) Modified: docs/trunk/referenceGuide/en/modules/errorhandling.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- docs/trunk/referenceGuide/en/modules/errorhandling.xml 2007-10-13 00:08= :20 UTC (rev 8625) +++ docs/trunk/referenceGuide/en/modules/errorhandling.xml 2007-10-13 01:34= :14 UTC (rev 8626) @@ -8,18 +8,19 @@ Error handling configuration - JBoss Portal request pipeline provides configuring of the error h= andling policy. At runtime when an error - occurs it is possible to configure how the portal behaves in a fine gra= ined and dynamic manner. + JBoss Portal's request pipeline allows for fine-grained, dynamic = configuration of how Portal will behave when + an error occurs at runtime. Error types - There are several kind of errors that can be happen during a r= equest. - - Access denied: the user does not have the security righ= ts to access a resource - Error: an expected error, like a portlet threw an excep= tion - Internal error: an unexpected error - Resource not found: a resource is not found - Resource not available: a resource is found but is not = serviceable - + There are several kind of errors that can happen during a requ= est: + + Access denied: the user does not have the security r= ights to access a resource + Error: an anticipated error as when a portlet throws= an exception + Internal error: an unexpected error + Resource not found: a resource is not found + Resource not available: a resource is found but is n= ot serviceable + + Control policies @@ -28,29 +29,30 @@ Policy delegation and cascading Whenever a control policy is invoked it is given the opport= unity to change the response sent - by the control flow. If the control policy ignores the error then= the next policy will handle the error - at this turn. However if the control policy decides to provide a = new response then the next policy - will not be invoked since the new response will not be of type er= ror. For instance, if a portlet part of a page - produces an exception, the following reactions are possible: - - The error is displayed in the window - The window is removed from the aggregation - An portal error page is displayed - An HTTP 500 error response is sent to the browser - + by the control flow. If the control policy ignores the error t= hen the next policy will handle the error + at this turn. However if the control policy decides to provide= a new response then the next policy + will not be invoked since the new response will not be of type= error. For instance, if a portlet part of a + page produces an exception, the following reactions are possib= le: + + The error is displayed in the window + The window is removed from the aggregation + An portal error page is displayed + An HTTP 500 error response is sent to the browser= + + Default policy The default policy applies when error are not handled at ot= her level. By default errors are translated into the most appropriate HTTP response: + + Access denied: HTTP 403 Forbidden response + Error: HTTP 500 Internal Server Error response + Internal error: HTTP 500 Internal Server Error re= sponse + Resource not found: HTTP 404 Not Found response + Resource not available: HTTP 404 Not Found respon= se + - - Access denied: HTTP 403 Forbidden response - Error: HTTP 500 Internal Server Error response - Internal error: HTTP 500 Internal Server Error respo= nse - Resource not found: HTTP 404 Not Found response - Resource not available: HTTP 404 Not Found response<= /listitem> - Portal policy @@ -61,14 +63,15 @@ Page policy - Window error policy controls how the page reacts to aggrega= tion errors. Indeed the page is most of the time - an aggregation of several portlet windows and the action to take = when an error occurs is different than the other - policies. Whenever an error occurs, the policy can either handle = it or ignore it. If the error is ignored then - it will be treated by the portal policy. The different actions th= at are possible upon an error are: - - Remove the window from the aggregation - Replace the markup of the window by a redirection to= a JSP page - + Window error policy controls how the page reacts to aggrega= tion errors. Indeed the page is most of the + time an aggregation of several portlet windows and the action = to take when an error occurs is different than + the other policies. Whenever an error occurs, the policy can e= ither handle it or ignore it. If the error is + ignored then it will be treated by the portal policy. The diff= erent actions that are possible upon an error are: + + Remove the window from the aggregation + Replace the markup of the window by a redirection= to a JSP page + + @@ -310,11 +313,10 @@ clicking on the Properties link on each of these pages. You can a= lso specify how dashboards should behave with respect to error handling by clicking on the Dashboards tab of th= e Portal management application. - Screenshot: - - - - - + Screenshot: + + + + = \ No newline at end of file Modified: docs/trunk/referenceGuide/en/modules/wsrp.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- docs/trunk/referenceGuide/en/modules/wsrp.xml 2007-10-13 00:08:20 UTC (= rev 8625) +++ docs/trunk/referenceGuide/en/modules/wsrp.xml 2007-10-13 01:34:14 UTC (= rev 8626) @@ -337,35 +337,35 @@ Let's now look at the Admin page and the Management portlet= . Click on the "Portlet definitions" tab at the top. Once this is done, look at the list of available portl= et providers. If all went well, you should see something similar to this: - - - - - - - - We have 3 available portlet providers: local, self and bea. The - "local" portlet provider exposes all the portlets deployed in = this particular instance of Portal. As - explained above, the "self" provider refers to the default WSR= P consumer bundled with Portal that consumes - the portlets exposed by the default WSRP producer. The "bea" p= rovider corresponds to BEA's public producer - we just configured. Select it and click on "Change". You shoul= d now see something similar to: - - - - - - - - From there on out, you should be able to configure WSRP portle= ts just as any other. In particular, you - can create an instance of one of the remote portlets offered by BEA's p= ublic producer just like you would - create an instance of a local portlet and then assign it to a window in= a page. If you go to that page, you - should see something similar to below for this portlet: - - - - - - + + + + + + + + We have 3 available portlet providers: local, sel= f and bea. The + "local" portlet provider exposes all the portlets deployed = in this particular instance of Portal. As + explained above, the "self" provider refers to the default = WSRP consumer bundled with Portal that consumes + the portlets exposed by the default WSRP producer. The "bea= " provider corresponds to BEA's public producer + we just configured. Select it and click on "Change". You sh= ould now see something similar to: + + + + + + + + From there on out, you should be able to configure WSRP por= tlets just as any other. In particular, you + can create an instance of one of the remote portlets offere= d by BEA's public producer just like you would + create an instance of a local portlet and then assign it to= a window in a page. If you go to that page, you + should see something similar to below for this portlet: + + + + + + = --===============9207558581556798969==-- From portal-commits at lists.jboss.org Sat Oct 13 08:13:10 2007 Content-Type: multipart/mixed; boundary="===============5612059169301369491==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8627 - in modules/test/trunk/unit/src/main/org/jboss/unit: runner/impl and 4 other directories. Date: Sat, 13 Oct 2007 08:13:10 -0400 Message-ID: --===============5612059169301369491== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: julien(a)jboss.com Date: 2007-10-13 08:13:10 -0400 (Sat, 13 Oct 2007) New Revision: 8627 Modified: modules/test/trunk/unit/src/main/org/jboss/unit/runner/TestRunnerContext= .java modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/TestRunnerCo= ntextSupport.java modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/composite/Co= mpositeTestRunner.java modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/generic/Gene= ricTestRunner.java modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/pojo/POJOTes= tRunner.java modules/test/trunk/unit/src/main/org/jboss/unit/tooling/Main.java Log: preliminary support for runtime parameter override Modified: modules/test/trunk/unit/src/main/org/jboss/unit/runner/TestRunner= Context.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/runner/TestRunnerContex= t.java 2007-10-13 01:34:14 UTC (rev 8626) +++ modules/test/trunk/unit/src/main/org/jboss/unit/runner/TestRunnerContex= t.java 2007-10-13 12:13:10 UTC (rev 8627) @@ -33,6 +33,8 @@ = Map getProperties(); = + Map getParameters(); + TestFilter getFilter(); = TestRunnerEventListener getEventListener(); Modified: modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/TestR= unnerContextSupport.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/TestRunnerC= ontextSupport.java 2007-10-13 01:34:14 UTC (rev 8626) +++ modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/TestRunnerC= ontextSupport.java 2007-10-13 12:13:10 UTC (rev 8627) @@ -40,6 +40,9 @@ private Map properties; = /** . */ + private Map parameters; + + /** . */ private TestFilter filter; = /** . */ @@ -48,17 +51,18 @@ = public TestRunnerContextSupport(TestRunnerEventListener eventListener) { - this(new HashMap(), NullFilter.getInstance(), eventL= istener); + this(new HashMap(), new HashMap(), N= ullFilter.getInstance(), eventListener); } = public TestRunnerContextSupport() { - this(new HashMap(), NullFilter.getInstance(), new Te= stRunnerEventBroadcaster()); + this(new HashMap(), new HashMap(), N= ullFilter.getInstance(), new TestRunnerEventBroadcaster()); } = - public TestRunnerContextSupport(Map properties, TestFil= ter filter, TestRunnerEventListener eventListener) + public TestRunnerContextSupport(Map properties, Map parameters, TestFilter filter, TestRunnerEventListener eventLi= stener) { this.properties =3D properties; + this.parameters =3D parameters; this.filter =3D filter; this.eventListener =3D eventListener; } @@ -68,6 +72,11 @@ return properties; } = + public Map getParameters() + { + return parameters; + } + public TestFilter getFilter() { return filter; Modified: modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/compo= site/CompositeTestRunner.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/composite/C= ompositeTestRunner.java 2007-10-13 01:34:14 UTC (rev 8626) +++ modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/composite/C= ompositeTestRunner.java 2007-10-13 12:13:10 UTC (rev 8627) @@ -55,7 +55,7 @@ // Setup intermediate event filtering TestRunnerEventBroadcaster tmp =3D new TestRunnerEventBroadcaster(); tmp.addListener(new TestRunnerLifeCycleFilter(context.getEventListen= er())); - TestRunnerContextSupport nestedContext =3D new TestRunnerContextSupp= ort(context.getProperties(), context.getFilter(), tmp); + TestRunnerContextSupport nestedContext =3D new TestRunnerContextSupp= ort(context.getProperties(), context.getParameters(), context.getFilter(), = tmp); = for (TestRunner runner : runners) { Modified: modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/gener= ic/GenericTestRunner.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/generic/Gen= ericTestRunner.java 2007-10-13 01:34:14 UTC (rev 8626) +++ modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/generic/Gen= ericTestRunner.java 2007-10-13 12:13:10 UTC (rev 8627) @@ -61,7 +61,7 @@ // Setup intermediate event filtering TestRunnerEventBroadcaster tmp =3D new TestRunnerEventBroadcaster(); tmp.addListener(new TestRunnerLifeCycleFilter(context.getEventListen= er())); - TestRunnerContextSupport nestedContext =3D new TestRunnerContextSupp= ort(context.getProperties(), context.getFilter(), tmp); + TestRunnerContextSupport nestedContext =3D new TestRunnerContextSupp= ort(context.getProperties(), context.getParameters(), context.getFilter(), = tmp); = // try Modified: modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/pojo/= POJOTestRunner.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/pojo/POJOTe= stRunner.java 2007-10-13 01:34:14 UTC (rev 8626) +++ modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/pojo/POJOTe= stRunner.java 2007-10-13 12:13:10 UTC (rev 8627) @@ -62,7 +62,7 @@ // Setup intermediate event filtering TestRunnerEventBroadcaster tmp =3D new TestRunnerEventBroadcaster(); tmp.addListener(new TestRunnerLifeCycleFilter(context.getEventListen= er())); - TestRunnerContextSupport nestedContext =3D new TestRunnerContextSupp= ort(context.getProperties(), context.getFilter(), tmp); + TestRunnerContextSupport nestedContext =3D new TestRunnerContextSupp= ort(context.getProperties(), context.getParameters(), context.getFilter(), = tmp); = // for (TestClassDef testClass : suite.getTestClasses()) Modified: modules/test/trunk/unit/src/main/org/jboss/unit/tooling/Main.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/tooling/Main.java 2007-= 10-13 01:34:14 UTC (rev 8626) +++ modules/test/trunk/unit/src/main/org/jboss/unit/tooling/Main.java 2007-= 10-13 12:13:10 UTC (rev 8627) @@ -158,7 +158,7 @@ = public void execute() { - TestRunnerContextSupport runnerContext =3D new TestRunnerContextSupp= ort(properties, mainFilter, broadcaster); + TestRunnerContextSupport runnerContext =3D new TestRunnerContextSupp= ort(properties, new HashMap(), mainFilter, broadcaster); runner.run(runnerContext); } = --===============5612059169301369491==-- From portal-commits at lists.jboss.org Sat Oct 13 08:28:00 2007 Content-Type: multipart/mixed; boundary="===============2385655982748196274==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8628 - in modules/test/trunk/unit/src/main/org/jboss: unit/runner and 6 other directories. Date: Sat, 13 Oct 2007 08:27:59 -0400 Message-ID: --===============2385655982748196274== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: julien(a)jboss.com Date: 2007-10-13 08:27:59 -0400 (Sat, 13 Oct 2007) New Revision: 8628 Modified: modules/test/trunk/unit/src/main/org/jboss/test/unit/runner/TestDriverRu= nnerTests.java modules/test/trunk/unit/src/main/org/jboss/unit/runner/TestRunnerContext= .java modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/TestRunnerCo= ntextSupport.java modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/composite/Co= mpositeTestRunner.java modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/driver/TestD= riverRunner.java modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/generic/Gene= ricTestRunner.java modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/pojo/POJOTes= tRunner.java modules/test/trunk/unit/src/main/org/jboss/unit/tooling/Main.java Log: preliminary support for runtime parameter override Modified: modules/test/trunk/unit/src/main/org/jboss/test/unit/runner/TestD= riverRunnerTests.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/test/unit/runner/TestDriverR= unnerTests.java 2007-10-13 12:13:10 UTC (rev 8627) +++ modules/test/trunk/unit/src/main/org/jboss/test/unit/runner/TestDriverR= unnerTests.java 2007-10-13 12:27:59 UTC (rev 8628) @@ -132,13 +132,13 @@ } }; testDriver.info.addTest(new SimpleTestCaseInfo("Foo")); - TestDriverRunner runner =3D new TestDriverRunner(testDriver, paramet= rizationSet, new TestId()); + TestDriverRunner runner =3D new TestDriverRunner(testDriver, new Tes= tId()); = // EventList listener =3D new EventList(); = // - runner.run(new TestRunnerContextSupport(listener)); + runner.run(new TestRunnerContextSupport(parametrizationSet, listener= )); = // testDriver.assertIdList(list(new TestId("Foo"))); @@ -162,7 +162,7 @@ { Map tmp =3D new HashMap(); tmp.put("foo", new String[]{"bar1","bar2"}); - ParametrizationSet parametrizationSet =3D new ParametrizationSet(tmp= ); + ParametrizationSet parametrizations =3D new ParametrizationSet(tmp); = // TestDriverImpl testDriver =3D new TestDriverImpl() @@ -177,13 +177,13 @@ blah.put("foo", new SimpleParameterInfo("foo")); caseInfo.setParameters(blah); testDriver.info.addTest(caseInfo); - TestDriverRunner runner =3D new TestDriverRunner(testDriver, paramet= rizationSet, new TestId()); + TestDriverRunner runner =3D new TestDriverRunner(testDriver, new Tes= tId()); = // EventList listener =3D new EventList(); = // - runner.run(new TestRunnerContextSupport(listener)); + runner.run(new TestRunnerContextSupport(parametrizations, listener)); = // testDriver.assertIdList(list(new TestId("Foo"), new TestId("Foo"))); Modified: modules/test/trunk/unit/src/main/org/jboss/unit/runner/TestRunner= Context.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/runner/TestRunnerContex= t.java 2007-10-13 12:13:10 UTC (rev 8627) +++ modules/test/trunk/unit/src/main/org/jboss/unit/runner/TestRunnerContex= t.java 2007-10-13 12:27:59 UTC (rev 8628) @@ -33,7 +33,7 @@ = Map getProperties(); = - Map getParameters(); + ParametrizationSet getParametrizations(); = TestFilter getFilter(); = Modified: modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/TestR= unnerContextSupport.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/TestRunnerC= ontextSupport.java 2007-10-13 12:13:10 UTC (rev 8627) +++ modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/TestRunnerC= ontextSupport.java 2007-10-13 12:27:59 UTC (rev 8628) @@ -25,6 +25,7 @@ import org.jboss.unit.runner.TestRunnerContext; import org.jboss.unit.runner.TestFilter; import org.jboss.unit.runner.TestRunnerEventListener; +import org.jboss.unit.runner.ParametrizationSet; = import java.util.Map; import java.util.HashMap; @@ -40,7 +41,7 @@ private Map properties; = /** . */ - private Map parameters; + private ParametrizationSet parameters; = /** . */ private TestFilter filter; @@ -51,18 +52,23 @@ = public TestRunnerContextSupport(TestRunnerEventListener eventListener) { - this(new HashMap(), new HashMap(), N= ullFilter.getInstance(), eventListener); + this(new HashMap(), new ParametrizationSet(), NullFi= lter.getInstance(), eventListener); } = + public TestRunnerContextSupport(ParametrizationSet parametrizations, Te= stRunnerEventListener eventListener) + { + this(new HashMap(), parametrizations, NullFilter.get= Instance(), eventListener); + } + public TestRunnerContextSupport() { - this(new HashMap(), new HashMap(), N= ullFilter.getInstance(), new TestRunnerEventBroadcaster()); + this(new HashMap(), new ParametrizationSet(), NullFi= lter.getInstance(), new TestRunnerEventBroadcaster()); } = - public TestRunnerContextSupport(Map properties, Map parameters, TestFilter filter, TestRunnerEventListener eventLi= stener) + public TestRunnerContextSupport(Map properties, Paramet= rizationSet parametrizations, TestFilter filter, TestRunnerEventListener ev= entListener) { this.properties =3D properties; - this.parameters =3D parameters; + this.parameters =3D parametrizations; this.filter =3D filter; this.eventListener =3D eventListener; } @@ -72,7 +78,7 @@ return properties; } = - public Map getParameters() + public ParametrizationSet getParametrizations() { return parameters; } Modified: modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/compo= site/CompositeTestRunner.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/composite/C= ompositeTestRunner.java 2007-10-13 12:13:10 UTC (rev 8627) +++ modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/composite/C= ompositeTestRunner.java 2007-10-13 12:27:59 UTC (rev 8628) @@ -55,7 +55,7 @@ // Setup intermediate event filtering TestRunnerEventBroadcaster tmp =3D new TestRunnerEventBroadcaster(); tmp.addListener(new TestRunnerLifeCycleFilter(context.getEventListen= er())); - TestRunnerContextSupport nestedContext =3D new TestRunnerContextSupp= ort(context.getProperties(), context.getParameters(), context.getFilter(), = tmp); + TestRunnerContextSupport nestedContext =3D new TestRunnerContextSupp= ort(context.getProperties(), context.getParametrizations(), context.getFilt= er(), tmp); = for (TestRunner runner : runners) { Modified: modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/drive= r/TestDriverRunner.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/driver/Test= DriverRunner.java 2007-10-13 12:13:10 UTC (rev 8627) +++ modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/driver/Test= DriverRunner.java 2007-10-13 12:27:59 UTC (rev 8628) @@ -41,7 +41,6 @@ import org.jboss.unit.runner.event.RunnerFailureEvent; import org.jboss.unit.runner.AbstractTestRunner; import org.jboss.unit.runner.TestResult; -import org.jboss.unit.runner.ParametrizationSet; import org.jboss.unit.runner.TestRunnerContext; = import java.util.Map; @@ -67,28 +66,19 @@ private final TestDriver driver; = /** . */ - private final ParametrizationSet parametrizationSet; - - /** . */ private TestId testId; = - public TestDriverRunner(TestDriver driver, ParametrizationSet parametri= zationSet, TestId testId) + public TestDriverRunner(TestDriver driver, TestId testId) { this.driver =3D driver; - this.parametrizationSet =3D parametrizationSet; this.testId =3D testId; } = - public TestDriverRunner(TestDriver driver,ParametrizationSet parametriz= ationSet) + public TestDriverRunner(TestDriver driver) { - this(driver, parametrizationSet, null); + this(driver, null); } = - public TestDriverRunner(TestDriver driver, TestId testId) - { - this(driver, new ParametrizationSet(), testId); - } - public TestId getTestId() { return testId; @@ -161,7 +151,9 @@ else { TestCaseInfo testCaseInfo =3D (TestCaseInfo)testInfo; - for (Map parametrization : parametrizationSet.e= numerate(testCaseInfo.getParameters().keySet())) + + // + for (Map parametrization : context.getParametri= zations().enumerate(testCaseInfo.getParameters().keySet())) { context.getEventListener().onEvent(new StartTestEvent(testI= d, testCaseInfo)); = Modified: modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/gener= ic/GenericTestRunner.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/generic/Gen= ericTestRunner.java 2007-10-13 12:13:10 UTC (rev 8627) +++ modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/generic/Gen= ericTestRunner.java 2007-10-13 12:27:59 UTC (rev 8628) @@ -61,7 +61,6 @@ // Setup intermediate event filtering TestRunnerEventBroadcaster tmp =3D new TestRunnerEventBroadcaster(); tmp.addListener(new TestRunnerLifeCycleFilter(context.getEventListen= er())); - TestRunnerContextSupport nestedContext =3D new TestRunnerContextSupp= ort(context.getProperties(), context.getParameters(), context.getFilter(), = tmp); = // try @@ -84,16 +83,18 @@ ParametrizationSet parametrizations =3D def.getParameters().ge= tParametrization(); parametrizations.merge(testDef.getParameters().getParametrizat= ion()); = + TestRunnerContextSupport genericContext =3D new TestRunnerCont= extSupport(context.getProperties(), parametrizations, context.getFilter(), = tmp); + // - TestDriverRunner runner =3D new TestDriverRunner(driver, param= etrizations, testDef.getRefId()); + TestDriverRunner runner =3D new TestDriverRunner(driver, testD= ef.getRefId()); = // - runner.run(nestedContext); + runner.run(genericContext); } } catch (Exception e) { - nestedContext.getEventListener().onEvent(new RunnerFailureEvent(F= ailure.createErrorFailure("Cannot execute test class " + className,e))); + context.getEventListener().onEvent(new RunnerFailureEvent(Failure= .createErrorFailure("Cannot execute test class " + className,e))); } } } Modified: modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/pojo/= POJOTestRunner.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/pojo/POJOTe= stRunner.java 2007-10-13 12:13:10 UTC (rev 8627) +++ modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/pojo/POJOTe= stRunner.java 2007-10-13 12:27:59 UTC (rev 8628) @@ -62,7 +62,6 @@ // Setup intermediate event filtering TestRunnerEventBroadcaster tmp =3D new TestRunnerEventBroadcaster(); tmp.addListener(new TestRunnerLifeCycleFilter(context.getEventListen= er())); - TestRunnerContextSupport nestedContext =3D new TestRunnerContextSupp= ort(context.getProperties(), context.getParameters(), context.getFilter(), = tmp); = // for (TestClassDef testClass : suite.getTestClasses()) @@ -94,19 +93,22 @@ parametrizations.merge(testClass.getParameters().getParametriz= ation()); = // - TestDriverRunner runner =3D new TestDriverRunner(driver, param= etrizations); + TestRunnerContextSupport pojoContext =3D new TestRunnerContext= Support(context.getProperties(), parametrizations, context.getFilter(), tmp= ); = // + TestDriverRunner runner =3D new TestDriverRunner(driver); + + // for (String testCaseName : testCaseNames) { TestId testCaseId =3D new TestId(testCaseName); runner.setTestId(testCaseId); - runner.run(nestedContext); + runner.run(pojoContext); } } catch (Exception e) { - nestedContext.getEventListener().onEvent(new RunnerFailureEven= t(Failure.createErrorFailure("Cannot execute test class " + className,e))); + context.getEventListener().onEvent(new RunnerFailureEvent(Fail= ure.createErrorFailure("Cannot execute test class " + className,e))); } } } Modified: modules/test/trunk/unit/src/main/org/jboss/unit/tooling/Main.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/tooling/Main.java 2007-= 10-13 12:13:10 UTC (rev 8627) +++ modules/test/trunk/unit/src/main/org/jboss/unit/tooling/Main.java 2007-= 10-13 12:27:59 UTC (rev 8628) @@ -23,6 +23,7 @@ package org.jboss.unit.tooling; = import org.jboss.unit.runner.TestRunner; +import org.jboss.unit.runner.ParametrizationSet; import org.jboss.unit.runner.impl.TestRunnerContextSupport; import org.jboss.unit.runner.impl.TestRunnerEventBroadcaster; import org.jboss.unit.runner.model.TestSuiteDef; @@ -158,7 +159,7 @@ = public void execute() { - TestRunnerContextSupport runnerContext =3D new TestRunnerContextSupp= ort(properties, new HashMap(), mainFilter, broadcaster); + TestRunnerContextSupport runnerContext =3D new TestRunnerContextSupp= ort(properties, new ParametrizationSet(), mainFilter, broadcaster); runner.run(runnerContext); } = --===============2385655982748196274==-- From portal-commits at lists.jboss.org Sat Oct 13 08:38:42 2007 Content-Type: multipart/mixed; boundary="===============0586792894407072213==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8629 - in modules/test/trunk: tooling and 3 other directories. Date: Sat, 13 Oct 2007 08:38:42 -0400 Message-ID: --===============0586792894407072213== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: bdaw Date: 2007-10-13 08:38:42 -0400 (Sat, 13 Oct 2007) New Revision: 8629 Added: modules/test/trunk/tooling/src/main/org/jboss/unit/tooling/ant/ToolingCo= nstants.java Modified: modules/test/trunk/test/src/main/org/jboss/portal/test/framework/embedde= d/DataSourceSupport.java modules/test/trunk/tooling/build.xml modules/test/trunk/tooling/src/main/org/jboss/unit/tooling/ant/JBossUnit= Task.java modules/test/trunk/tooling/src/main/org/jboss/unit/tooling/ant/TestsType= .java modules/test/trunk/tooling/src/resources/test/bobo-tests.xml modules/test/trunk/unit/src/main/org/jboss/unit/tooling/Main.java modules/test/trunk/unit/src/main/org/jboss/unit/tooling/MainBuilder.java Log: - add properties support for tooling - remove tooling dependency on unit module Modified: modules/test/trunk/test/src/main/org/jboss/portal/test/framework/= embedded/DataSourceSupport.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/test/src/main/org/jboss/portal/test/framework/embedd= ed/DataSourceSupport.java 2007-10-13 12:27:59 UTC (rev 8628) +++ modules/test/trunk/test/src/main/org/jboss/portal/test/framework/embedd= ed/DataSourceSupport.java 2007-10-13 12:38:42 UTC (rev 8629) @@ -304,6 +304,27 @@ { IOTools.safeClose(in); } + } = + + public static Config obtainConfig(String datasources, String dataSou= rceName) throws Exception + { + URL url =3D Thread.currentThread().getContextClassLoader().getRes= ource(datasources); + + Config[] configs =3D fromXML(url); + + for (Config config : configs) + { + if (config.getName().equals(dataSourceName)) + { + return config; + } + } + + throw new IllegalStateException("Could not obtain Config for {dat= asourceName:datasources} - {" + dataSourceName + ":" + datasources + "}" ); + } } + + + } Modified: modules/test/trunk/tooling/build.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/tooling/build.xml 2007-10-13 12:27:59 UTC (rev 8628) +++ modules/test/trunk/tooling/build.xml 2007-10-13 12:38:42 UTC (rev 8629) @@ -216,17 +216,15 @@ = = - - - - + = + = - + = = - + - + = Modified: modules/test/trunk/tooling/src/main/org/jboss/unit/tooling/ant/JB= ossUnitTask.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/tooling/src/main/org/jboss/unit/tooling/ant/JBossUni= tTask.java 2007-10-13 12:27:59 UTC (rev 8628) +++ modules/test/trunk/tooling/src/main/org/jboss/unit/tooling/ant/JBossUni= tTask.java 2007-10-13 12:38:42 UTC (rev 8629) @@ -28,8 +28,6 @@ import org.apache.tools.ant.taskdefs.optional.junit.AggregateTransformer; import org.apache.tools.ant.types.Path; import org.apache.tools.ant.types.FileSet; -import org.jboss.unit.tooling.MainBuilder; -import org.jboss.unit.report.impl.junit.JUnitTestReport; = import java.util.List; import java.util.LinkedList; Modified: modules/test/trunk/tooling/src/main/org/jboss/unit/tooling/ant/Te= stsType.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/tooling/src/main/org/jboss/unit/tooling/ant/TestsTyp= e.java 2007-10-13 12:27:59 UTC (rev 8628) +++ modules/test/trunk/tooling/src/main/org/jboss/unit/tooling/ant/TestsTyp= e.java 2007-10-13 12:38:42 UTC (rev 8629) @@ -28,14 +28,18 @@ import org.apache.tools.ant.types.Path; import org.apache.tools.ant.types.Environment; import org.apache.tools.ant.taskdefs.Java; -import org.jboss.unit.tooling.filter.IncludeTestFilter; -import org.jboss.unit.tooling.filter.ExcludeTestFilter; -import org.jboss.unit.tooling.Main; = +import static org.jboss.unit.tooling.ant.ToolingConstants.*; + import java.util.List; import java.util.LinkedList; import java.util.Set; import java.util.ArrayList; +import java.util.Iterator; +import java.util.Map; +import java.util.HashMap; +import java.util.Hashtable; +import java.util.HashSet; = /** * @author Boleslaw Dawidowicz @@ -71,8 +75,6 @@ = public void execute() throws BuildException { - //System.out.println("Executing Task. Includes: " + includes.size() = + " excludes: " + excludes.size() + " config: " + config); - //Evaluate all the include filters = Java javaTask =3D createJava(); @@ -153,26 +155,32 @@ = private void addArguments(Java javaTask) { - javaTask.createArg().setValue(Main.OPT_CONFIG + "=3D" + config); + javaTask.createArg().setValue(OPT_CONFIG + "=3D" + config); = if (getSuiteName() !=3D null) { - javaTask.createArg().setValue(Main.OPT_SUITE_NAME + "=3D" + getSu= iteName()); = + javaTask.createArg().setValue(OPT_SUITE_NAME + "=3D" + getSuiteNa= me()); } = = = if (getReports() !=3D null && getReports().getXmlReports() !=3D null) { - javaTask.createArg().setValue(Main.OPT_XML_REPORT_DIR + "=3D" + g= etReports().getXmlReports().getToDir()); + javaTask.createArg().setValue(OPT_XML_REPORT_DIR + "=3D" + getRep= orts().getXmlReports().getToDir()); } = = - // Filters to aggregate all the values - IncludeTestFilter includeFilter =3D new IncludeTestFilter(); + Set includeIds =3D new HashSet(); = - ExcludeTestFilter excludeFilter =3D new ExcludeTestFilter(); + Set includeKeywords =3D new HashSet(); = + Set excludeIds =3D new HashSet(); + + Set excludeKeywords =3D new HashSet(); + + + + for (IncludeType include : includes) { //Check attributes consistency @@ -185,38 +193,29 @@ = if (include.getIds() !=3D null) { - includeFilter.addUnparsedNames(include.getIds()); + addUnparsedString(includeIds, include.getIds()); } if (include.getKeywords() !=3D null) { - includeFilter.addUnparsedKeywords(include.getKeywords()); + addUnparsedString(includeKeywords, include.getKeywords()); } - if (include.getIdPatterns() !=3D null) - { - includeFilter.addUnparsedNamePatterns(include.getIdPatterns()); - } if (include.getId() !=3D null) { - includeFilter.addUnparsedNames(include.getId()); + addUnparsedString(includeIds, include.getId()); } } = - if (includeFilter.getNames().size() !=3D 0) + if (includeIds.size() !=3D 0) { - javaTask.createArg().setValue(generateArgument(includeFilter.getN= ames(), Main.OPT_NAMES)); + javaTask.createArg().setValue(generateArgument(includeIds, OPT_ID= S)); } = - if (includeFilter.getNamePatterns().size() !=3D 0) + if (includeKeywords.size() !=3D 0) { - javaTask.createArg().setValue(generateArgument(includeFilter.getN= amePatterns(), Main.OPT_PATTERNS)); + javaTask.createArg().setValue(generateArgument(includeKeywords, O= PT_KEYWORDS)); } = - if (includeFilter.getKeywords().size() !=3D 0) - { - javaTask.createArg().setValue(generateArgument(includeFilter.getK= eywords(), Main.OPT_KEYWORDS)); - } = - // List excludeFilters =3D new LinkedList(); = for (ExcludeType exclude : excludes) @@ -229,41 +228,78 @@ = if (exclude.getIds() !=3D null) { - excludeFilter.addUnparsedNames(exclude.getIds()); + addUnparsedString(excludeIds, exclude.getIds()); } if (exclude.getKeywords() !=3D null) { - excludeFilter.addUnparsedKeywords(exclude.getKeywords()); + addUnparsedString(excludeKeywords, exclude.getKeywords()); } - if (exclude.getIdPatterns() !=3D null) - { - excludeFilter.addUnparsedNamePatterns(exclude.getIdPatterns()); - } if (exclude.getId() !=3D null) { - excludeFilter.addUnparsedNames(exclude.getId()); + addUnparsedString(excludeIds, exclude.getId()); } } = - if (excludeFilter.getNames().size() !=3D 0) + if (excludeIds.size() !=3D 0) { - javaTask.createArg().setValue(generateArgument(excludeFilter.getN= ames(), Main.OPT_EX_NAMES)); + javaTask.createArg().setValue(generateArgument(excludeIds, OPT_EX= _IDS)); } = - if (excludeFilter.getNamePatterns().size() !=3D 0) + if (excludeKeywords.size() !=3D 0) { - javaTask.createArg().setValue(generateArgument(excludeFilter.getN= amePatterns(), Main.OPT_EX_PATTERNS)); + javaTask.createArg().setValue(generateArgument(excludeKeywords, O= PT_EX_KEYWORDS)); } - = - if (excludeFilter.getKeywords().size() !=3D 0) + + + if (properties.size() > 0) { - javaTask.createArg().setValue(generateArgument(excludeFilter.getK= eywords(), Main.OPT_EX_KEYWORDS)); + + Map taskProperties =3D new HashMap(= ); + + for (PropertyType property : properties) + { + taskProperties.put(property.getName(),property.getValue()); + } + + updateProperties(taskProperties); + + + StringBuilder props =3D new StringBuilder("["); + + for (Iterator iterator =3D taskProperties.keySet().iterat= or(); iterator.hasNext();) + { + String propertyKey =3D iterator.next(); + + String propertyValue =3D taskProperties.get(propertyKey); + + props.append(propertyKey + "=3D" + propertyValue); + + if (iterator.hasNext()) + { + props.append(","); + } + else + { + props.append("]"); + } + } + + javaTask.createArg().setValue(OPT_PROPERTIES + "=3D" + props); + } + } = - for (PropertyType property : properties) + private void addUnparsedString(Set set, String valueString) + { + if (valueString =3D=3D null) { - javaTask.createArg().setValue(Main.OPT_PROPERTY + "=3D" + propert= y.getName() + "=3D" + property.getValue()); + throw new IllegalArgumentException("valueString cannot be null"); } + String[] parsedValues =3D valueString.split(","); + for (String keyword : parsedValues) + { + set.add(keyword.trim()); + } } = private String generateArgument(Set values, String argumentName) @@ -280,8 +316,82 @@ } = = + private void updateProperties(Map propMap) + { + Hashtable sysProps =3D (Hashtable)get= Project().getProperties(); + = + = + = + String sysProperties =3D (String)sysProps.get(JBOSS_UNIT_PROPERTIES); + = + if (sysProperties !=3D null && sysProperties.length() > 0) + { = + Map parsedProps =3D parseProperties(sysProperties); = + propMap.putAll(parsedProps); + } + + for (String sysPropKey : sysProps.keySet()) + { + + if (sysPropKey.startsWith(JBOSS_UNIT_PROPERTY)) + { + String propertyString =3D sysPropKey + "=3D" + sysProps.get(sy= sPropKey); + + propertyString =3D propertyString.replaceFirst(JBOSS_UNIT_PROP= ERTY + "\\.", ""); + + // + String[] patternValues =3D propertyString.split("=3D"); + + // + if (patternValues.length !=3D 2) + { + throw new IllegalArgumentException("Property not accepted, = it should match a=3Db and it is " + propertyString); + } + + propMap.put(patternValues[0],patternValues[1]); + + } + + + } + = + } + + public static Map parseProperties(String propertiesStrin= g) + { + if (!propertiesString.matches("\\[.+=3D.+(,.+=3D.+)*\\]")) + { + throw new IllegalArgumentException("Parameters don't follow prope= r format: [a=3Db,c=3Dd,e=3Df]"); + } + + Map parsedProps =3D new HashMap(); + + propertiesString =3D propertiesString.replaceAll("\\[","").replaceAl= l("\\]",""); + + String propertyGroups[] =3D propertiesString.split(","); + + for (String propertyGroup : propertyGroups) + { + + String property[] =3D propertyGroup.split("=3D"); + + // + if (property.length !=3D 2) + { + throw new IllegalArgumentException("Property not accepted, it = should match a=3Db and it is " + property); + } + + parsedProps.put(property[0],property[1]); + } + return parsedProps; + } + + = + + + public void addConfiguredInclude(IncludeType include) { this.includes.add(include); @@ -302,11 +412,6 @@ this.properties.add(property); } = - public void addTask(Task task) - { - //To change body of implemented methods use File | Settings | File T= emplates. - } - public String getConfig() { return config; Added: modules/test/trunk/tooling/src/main/org/jboss/unit/tooling/ant/Tooli= ngConstants.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/tooling/src/main/org/jboss/unit/tooling/ant/ToolingC= onstants.java (rev 0) +++ modules/test/trunk/tooling/src/main/org/jboss/unit/tooling/ant/ToolingC= onstants.java 2007-10-13 12:38:42 UTC (rev 8629) @@ -0,0 +1,63 @@ +/* +* JBoss, a division of Red Hat +* Copyright 2006, Red Hat Middleware, LLC, and individual contributors as = indicated +* by the @authors tag. See the copyright.txt in the distribution for a +* full listing of individual contributors. +* +* This is free software; you can redistribute it and/or modify it +* under the terms of the GNU Lesser General Public License as +* published by the Free Software Foundation; either version 2.1 of +* the License, or (at your option) any later version. +* +* This software is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +* Lesser General Public License for more details. +* +* You should have received a copy of the GNU Lesser General Public +* License along with this software; if not, write to the Free +* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +* 02110-1301 USA, or see the FSF site: http://www.fsf.org. +*/ + +package org.jboss.unit.tooling.ant; + +/** + * @author Boleslaw Dawidowicz + * @version $Revision: 0.1 $ + */ +public final class ToolingConstants +{ + + public static final String JBOSS_UNIT_PROPERTIES =3D "jboss.unit.proper= ties"; + + public static final String JBOSS_UNIT_PROPERTY =3D "jboss.unit.property= "; + + public static final String OPT_ID =3D "--id"; + + public static final String OPT_IDS =3D "--ids"; + + public static final String OPT_KEYWORDS =3D "--keywords"; + + public static final String OPT_EX_ID =3D "--ex_id"; + + public static final String OPT_EX_IDS =3D "--ex_ids"; + + public static final String OPT_EX_KEYWORDS =3D "--ex_keywords"; + + public static final String OPT_CONFIG =3D "--config"; + + public static final String OPT_SUITE_NAME =3D "--suite_name"; + + public static final String OPT_NO_CONSOLE =3D "--no_console"; + + public static final String OPT_XML_REPORT_DIR =3D "--xml_report_dir"; + + public static final String OPT_HTML_REPORT_DIR =3D "--html_report_dir"; + + public static final String OPT_PROPERTY =3D "--property"; + + public static final String OPT_PROPERTIES =3D "--properties"; + + +} Modified: modules/test/trunk/tooling/src/resources/test/bobo-tests.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/tooling/src/resources/test/bobo-tests.xml 2007-10-13= 12:27:59 UTC (rev 8628) +++ modules/test/trunk/tooling/src/resources/test/bobo-tests.xml 2007-10-13= 12:38:42 UTC (rev 8629) @@ -4,10 +4,8 @@ xmlns:xsi=3D"http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation=3D"urn:jboss:jboss-unit:1.0 jboss-unit_1_0.xsd"> - + - - \ No newline at end of file Modified: modules/test/trunk/unit/src/main/org/jboss/unit/tooling/Main.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/tooling/Main.java 2007-= 10-13 12:27:59 UTC (rev 8628) +++ modules/test/trunk/unit/src/main/org/jboss/unit/tooling/Main.java 2007-= 10-13 12:38:42 UTC (rev 8629) @@ -52,32 +52,22 @@ = private final TestRunnerEventBroadcaster broadcaster; = -// public static final String JBOSS_UNIT_NAMES =3D "jboss.unit.names"; -// -// public static final String JBOSS_UNIT_KEYWORDS =3D "jboss.unit.keywor= ds"; -// -// public static final String JBOSS_UNIT_PATTERNS =3D "jboss.unit.patter= ns"; -// -// public static final String JBOSS_UNIT_CONFIG =3D "jboss.unit.config"; -// -// public static final String JBOSS_UNIT_SUITE_NAME =3D "jboss.unit.suit= e_name"; + public static final String JBOSS_UNIT_PROPERTIES =3D "jboss.unit.proper= ties"; = + public static final String JBOSS_UNIT_PROPERTY =3D "jboss.unit.property= "; = + public static final String OPT_ID =3D "--id"; = - public static final String OPT_NAMES =3D "--names"; + public static final String OPT_IDS =3D "--ids"; = public static final String OPT_KEYWORDS =3D "--keywords"; = - public static final String OPT_PATTERNS =3D "--patterns"; - public static final String OPT_EX_ID =3D "--ex_id"; = - public static final String OPT_EX_NAMES =3D "--ex_names"; + public static final String OPT_EX_IDS =3D "--ex_ids"; = public static final String OPT_EX_KEYWORDS =3D "--ex_keywords"; = - public static final String OPT_EX_PATTERNS =3D "--ex_patterns"; - public static final String OPT_CONFIG =3D "--config"; = public static final String OPT_SUITE_NAME =3D "--suite_name"; @@ -95,6 +85,8 @@ */ public static final String OPT_PROPERTY =3D "--property"; = + public static final String OPT_PROPERTIES =3D "--properties"; + public static final Set options; = public static final Set options_no_arg; @@ -102,13 +94,11 @@ static { Set opts =3D new HashSet(); opts.add(OPT_ID); - opts.add(OPT_NAMES); + opts.add(OPT_IDS); opts.add(OPT_KEYWORDS); - opts.add(OPT_PATTERNS); opts.add(OPT_EX_ID); - opts.add(OPT_EX_NAMES); + opts.add(OPT_EX_IDS); opts.add(OPT_EX_KEYWORDS); - opts.add(OPT_EX_PATTERNS); opts.add(OPT_CONFIG); opts.add(OPT_SUITE_NAME); opts.add(OPT_NO_CONSOLE); @@ -159,6 +149,11 @@ = public void execute() { + // For now lets just be verbose. Later we need some real logging + '= debug' switch + System.out.println("TestRunnerContext contains: "); + System.out.println("Properties: " + properties.toString()); + + = TestRunnerContextSupport runnerContext =3D new TestRunnerContextSupp= ort(properties, new ParametrizationSet(), mainFilter, broadcaster); runner.run(runnerContext); } @@ -186,8 +181,6 @@ = MainBuilder builder =3D null; = - - if (arguments.keySet().contains(OPT_SUITE_NAME)) { builder =3D new MainBuilder(arguments.get(OPT_CONFIG), arguments.= get(OPT_SUITE_NAME)); @@ -200,67 +193,72 @@ = } = - - if (arguments.keySet().contains(OPT_NAMES)) + for (String argument : arguments.keySet()) { - builder.addUnparsedNames(arguments.get(OPT_NAMES)); - } = - if (arguments.keySet().contains(OPT_ID)) - { - builder.addName(arguments.get(OPT_ID)); - } + if (argument.equals(OPT_IDS)) + { + builder.addUnparsedNames(arguments.get(OPT_IDS)); + } = - if (arguments.keySet().contains(OPT_KEYWORDS)) - { - builder.addUnparsedKeywords(arguments.get(OPT_KEYWORDS)); - } + if (argument.equals(OPT_ID)) + { + builder.addName(arguments.get(OPT_ID)); + } = - if (arguments.keySet().contains(OPT_PATTERNS)) - { - builder.addUnparsedNamePatterns(arguments.get(OPT_PATTERNS)); - } + if (argument.equals(OPT_KEYWORDS)) + { + builder.addUnparsedKeywords(arguments.get(OPT_KEYWORDS)); + } = - if (arguments.keySet().contains(OPT_EX_NAMES)) - { - builder.addUnparsedExcludeNames(arguments.get(OPT_EX_NAMES)); - } + if (argument.equals(OPT_EX_IDS)) + { + builder.addUnparsedExcludeNames(arguments.get(OPT_EX_IDS)); + } = - if (arguments.keySet().contains(OPT_EX_ID)) - { - builder.addExcludeName(arguments.get(OPT_EX_ID)); - } + if (argument.equals(OPT_EX_ID)) + { + builder.addExcludeName(arguments.get(OPT_EX_ID)); + } = - if (arguments.keySet().contains(OPT_EX_KEYWORDS)) - { - builder.addUnparsedExcludeKeywords(arguments.get(OPT_EX_KEYWORDS)= ); - } + if (argument.equals(OPT_EX_KEYWORDS)) + { + builder.addUnparsedExcludeKeywords(arguments.get(OPT_EX_KEYWOR= DS)); + } = - if (arguments.keySet().contains(OPT_EX_PATTERNS)) - { - builder.addUnparsedExcludeNamePatterns(arguments.get(OPT_EX_PATTE= RNS)); - } + if (argument.equals(OPT_NO_CONSOLE)) + { + builder.setNoConsole(true); + } = - if (arguments.keySet().contains(OPT_NO_CONSOLE)) - { - builder.setNoConsole(true); - } + if (argument.equals(OPT_XML_REPORT_DIR)) + { + builder.setXMLReportDir(arguments.get(OPT_XML_REPORT_DIR)); + } = - if (arguments.keySet().contains(OPT_XML_REPORT_DIR)) - { - builder.setXMLReportDir(arguments.get(OPT_XML_REPORT_DIR)); - } + if (argument.equals(OPT_HTML_REPORT_DIR)) + { + builder.setHTMLReportDir(arguments.get(OPT_HTML_REPORT_DIR)); + } = - if (arguments.keySet().contains(OPT_HTML_REPORT_DIR)) - { - builder.setHTMLReportDir(arguments.get(OPT_HTML_REPORT_DIR)); - } + if (argument.startsWith(OPT_PROPERTY)) + { = - if (arguments.keySet().contains(OPT_PROPERTY)) - { - builder.addUnparsedProperty(arguments.get(OPT_PROPERTY)); + //pass whole --properties.name=3Dvalue to be parsed + builder.addUnparsedProperty(argument + arguments.get(OPT_PROPE= RTY)); + } + + if (argument.equals(OPT_PROPERTIES)) + { + builder.addUnparsedProperties(arguments.get(OPT_PROPERTIES)); + } + = } = + + + + Main main =3D builder.build(); = main.execute(); Modified: modules/test/trunk/unit/src/main/org/jboss/unit/tooling/MainBuild= er.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/tooling/MainBuilder.jav= a 2007-10-13 12:27:59 UTC (rev 8628) +++ modules/test/trunk/unit/src/main/org/jboss/unit/tooling/MainBuilder.jav= a 2007-10-13 12:38:42 UTC (rev 8629) @@ -275,6 +275,8 @@ throw new IllegalArgumentException("No null property name accepte= d"); } = + propertyString =3D propertyString.replaceFirst(Main.OPT_PROPERTY + "= \\.", ""); + // String[] patternValues =3D propertyString.split("=3D"); = @@ -305,7 +307,53 @@ return this; } = + public void addUnparsedProperties(String propertiesString) + { + if (propertiesString =3D=3D null) + { + throw new IllegalArgumentException("Properties cannot be null"); + } = + Map props =3D parseProperties(propertiesString); + + for (String key : props.keySet()) + { + addProperty(key, props.get(key)); + } + + + } + + public static Map parseProperties(String propertiesStrin= g) + { + if (!propertiesString.matches("\\[.+=3D.+(,.+=3D.+)*\\]")) + { + throw new IllegalArgumentException("Parameters don't follow prope= r format: [a=3Db,c=3Dd,e=3Df]"); + } + + Map parsedProps =3D new HashMap(); + + propertiesString =3D propertiesString.replaceAll("\\[","").replaceAl= l("\\]",""); + + String propertyGroups[] =3D propertiesString.split(","); + + for (String propertyGroup : propertyGroups) + { + String property[] =3D propertyGroup.split("=3D"); + + // + if (property.length !=3D 2) + { + throw new IllegalArgumentException("Property not accepted, it = should match a=3Db and it is " + property); + } + + parsedProps.put(property[0],property[1]); + } + return parsedProps; + } + + + public String getSuiteName() { return suiteName; @@ -432,5 +480,6 @@ = } = + } = --===============0586792894407072213==-- From portal-commits at lists.jboss.org Sat Oct 13 11:22:07 2007 Content-Type: multipart/mixed; boundary="===============5525142676261798862==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8630 - in modules/test/trunk/unit/src/main/org/jboss: unit/info/impl and 4 other directories. Date: Sat, 13 Oct 2007 11:22:07 -0400 Message-ID: --===============5525142676261798862== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: julien(a)jboss.com Date: 2007-10-13 11:22:07 -0400 (Sat, 13 Oct 2007) New Revision: 8630 Modified: modules/test/trunk/unit/src/main/org/jboss/test/unit/runner/GenericTestR= unnerTests.java modules/test/trunk/unit/src/main/org/jboss/unit/info/impl/SimpleTestInfo= .java modules/test/trunk/unit/src/main/org/jboss/unit/runner/ParametrizationSe= t.java modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/TestRunnerCo= ntextSupport.java modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/generic/Gene= ricTestRunner.java modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/pojo/POJOTes= tRunner.java Log: test runtime parameters combination with generic test runner Modified: modules/test/trunk/unit/src/main/org/jboss/test/unit/runner/Gener= icTestRunnerTests.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/test/unit/runner/GenericTest= RunnerTests.java 2007-10-13 12:38:42 UTC (rev 8629) +++ modules/test/trunk/unit/src/main/org/jboss/test/unit/runner/GenericTest= RunnerTests.java 2007-10-13 15:22:07 UTC (rev 8630) @@ -26,7 +26,9 @@ import org.jboss.unit.runner.impl.TestRunnerContextSupport; import org.jboss.unit.runner.model.generic.GenericTestSuiteDef; import org.jboss.unit.runner.model.generic.TestDef; -import org.jboss.unit.driver.TestDriver; +import org.jboss.unit.runner.model.ParametersDef; +import org.jboss.unit.runner.model.ParameterValueDef; +import org.jboss.unit.runner.ParametrizationSet; import org.jboss.unit.driver.DriverResponse; import org.jboss.unit.driver.DriverCommand; import org.jboss.unit.driver.AbstractTestDriver; @@ -35,6 +37,7 @@ import org.jboss.unit.info.TestInfo; import org.jboss.unit.info.impl.SimpleTestSuiteInfo; import org.jboss.unit.info.impl.SimpleTestCaseInfo; +import org.jboss.unit.info.impl.SimpleParameterInfo; import org.jboss.unit.TestId; = import static org.jboss.unit.api.Assert.*; @@ -54,23 +57,69 @@ = public static void main(String[] args) { - test1(); - test2(); - test3(); - test4(); + testNoTestCase(); + testOneTestCase(); + testTwoTestCases1(); + testTwoTestCases2(); + testParametrization(); + testParametrizationOverride(); } = - private static void test1() + private static void testParametrization() { Driver1.init(); + SimpleTestCaseInfo fooInfo =3D new SimpleTestCaseInfo("foo"); + fooInfo.addParameter(new SimpleParameterInfo("abc")); + Driver1.testSuiteInfo.addTest(fooInfo); GenericTestSuiteDef suite =3D new GenericTestSuiteDef(Driver1.class.= getName()); + TestDef foo =3D new TestDef(new TestId("foo")); + suite.addTest(foo); + ParametersDef fooParameters =3D new ParametersDef(); + fooParameters.setParameter("abc", new ParameterValueDef("def", "ghi"= )); + foo.setParameters(fooParameters); GenericTestRunner runner =3D new GenericTestRunner(suite); runner.run(new TestRunnerContextSupport()); + assertEquals(list(new TestId("foo"), new TestId("foo")), Driver1.ids= ); + HashMap expectedParametrization1 =3D new HashMap(); + HashMap expectedParametrization2 =3D new HashMap(); + expectedParametrization1.put("abc", "def"); + expectedParametrization2.put("abc", "ghi"); + assertEquals(list(expectedParametrization1, expectedParametrization2= ), Driver1.parametrizations); + } + + private static void testParametrizationOverride() + { + Driver1.init(); + SimpleTestCaseInfo fooInfo =3D new SimpleTestCaseInfo("foo"); + fooInfo.addParameter(new SimpleParameterInfo("abc")); + Driver1.testSuiteInfo.addTest(fooInfo); + GenericTestSuiteDef suite =3D new GenericTestSuiteDef(Driver1.class.= getName()); + TestDef foo =3D new TestDef(new TestId("foo")); + suite.addTest(foo); + ParametersDef fooParameters =3D new ParametersDef(); + fooParameters.setParameter("abc", new ParameterValueDef("def", "ghi"= )); + foo.setParameters(fooParameters); + GenericTestRunner runner =3D new GenericTestRunner(suite); + Map parametrizations =3D new HashMap(); + parametrizations.put("abc", new String[]{"def"}); + runner.run(new TestRunnerContextSupport(new ParametrizationSet(param= etrizations))); + assertEquals(list(new TestId("foo")), Driver1.ids); + HashMap expectedParametrization1 =3D new HashMap(); + expectedParametrization1.put("abc", "def"); + assertEquals(list(expectedParametrization1), Driver1.parametrization= s); + } + + private static void testNoTestCase() + { + Driver1.init(); + GenericTestSuiteDef suite =3D new GenericTestSuiteDef(Driver1.class.= getName()); + GenericTestRunner runner =3D new GenericTestRunner(suite); + runner.run(new TestRunnerContextSupport()); assertEquals(list(), Driver1.ids); assertEquals(list(), Driver1.parametrizations); } = - private static void test2() + private static void testOneTestCase() { Driver1.init(); Driver1.testSuiteInfo.addTest(new SimpleTestCaseInfo("foo")); @@ -82,7 +131,7 @@ assertEquals(list(new HashMap()), Driver1.parametrizations); } = - private static void test3() + private static void testTwoTestCases1() { Driver1.init(); Driver1.testSuiteInfo.addTest(new SimpleTestCaseInfo("foo")); @@ -95,7 +144,7 @@ assertEquals(list(new HashMap()), Driver1.parametrizations); } = - private static void test4() + private static void testTwoTestCases2() { Driver1.init(); Driver1.testSuiteInfo.addTest(new SimpleTestCaseInfo("foo")); Modified: modules/test/trunk/unit/src/main/org/jboss/unit/info/impl/SimpleT= estInfo.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/info/impl/SimpleTestInf= o.java 2007-10-13 12:38:42 UTC (rev 8629) +++ modules/test/trunk/unit/src/main/org/jboss/unit/info/impl/SimpleTestInf= o.java 2007-10-13 15:22:07 UTC (rev 8630) @@ -121,6 +121,25 @@ this.parameters =3D tmp; } = + public void addParameter(ParameterInfo parameter) + { + if (parameter =3D=3D null) + { + throw new IllegalArgumentException(); + } + SimpleParameterInfo tmp =3D new SimpleParameterInfo(parameter); + parameters.put(tmp.getName(), tmp); + } + + public void removeParameter(String name) + { + if (name =3D=3D null) + { + throw new IllegalArgumentException(); + } + parameters.remove(name); + } + public Set getKeywords() { return Collections.unmodifiableSet(keywords); Modified: modules/test/trunk/unit/src/main/org/jboss/unit/runner/Parametriz= ationSet.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/runner/ParametrizationS= et.java 2007-10-13 12:38:42 UTC (rev 8629) +++ modules/test/trunk/unit/src/main/org/jboss/unit/runner/ParametrizationS= et.java 2007-10-13 15:22:07 UTC (rev 8630) @@ -49,14 +49,18 @@ this.map =3D new HashMap(); } = - public void merge(ParametrizationSet other) + public void combine(ParametrizationSet other) throws IllegalArgumentExc= eption { + if (other =3D=3D null) + { + throw new IllegalArgumentException(); + } for (Map.Entry entry : other.map.entrySet()) { - if (!map.containsKey(entry.getKey())) - { - map.put(entry.getKey(), entry.getValue().clone()); - } + String key =3D entry.getKey(); + + // + map.put(key, entry.getValue().clone()); } } = Modified: modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/TestR= unnerContextSupport.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/TestRunnerC= ontextSupport.java 2007-10-13 12:38:42 UTC (rev 8629) +++ modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/TestRunnerC= ontextSupport.java 2007-10-13 15:22:07 UTC (rev 8630) @@ -55,6 +55,11 @@ this(new HashMap(), new ParametrizationSet(), NullFi= lter.getInstance(), eventListener); } = + public TestRunnerContextSupport(ParametrizationSet parametrizations) + { + this(new HashMap(), parametrizations, NullFilter.get= Instance(), new TestRunnerEventBroadcaster()); + } + public TestRunnerContextSupport(ParametrizationSet parametrizations, Te= stRunnerEventListener eventListener) { this(new HashMap(), parametrizations, NullFilter.get= Instance(), eventListener); Modified: modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/gener= ic/GenericTestRunner.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/generic/Gen= ericTestRunner.java 2007-10-13 12:38:42 UTC (rev 8629) +++ modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/generic/Gen= ericTestRunner.java 2007-10-13 15:22:07 UTC (rev 8630) @@ -80,9 +80,11 @@ for (TestDef testDef : testDefs) { // Create parametrization - ParametrizationSet parametrizations =3D def.getParameters().ge= tParametrization(); - parametrizations.merge(testDef.getParameters().getParametrizat= ion()); + ParametrizationSet parametrizations =3D def.getParameters().ge= tParametrization().clone(); + parametrizations.combine(testDef.getParameters().getParametriz= ation()); + parametrizations.combine(context.getParametrizations()); = + // TestRunnerContextSupport genericContext =3D new TestRunnerCont= extSupport(context.getProperties(), parametrizations, context.getFilter(), = tmp); = // Modified: modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/pojo/= POJOTestRunner.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/pojo/POJOTe= stRunner.java 2007-10-13 12:38:42 UTC (rev 8629) +++ modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/pojo/POJOTe= stRunner.java 2007-10-13 15:22:07 UTC (rev 8630) @@ -89,8 +89,9 @@ } = // Create parametrization - ParametrizationSet parametrizations =3D suite.getParameters().= getParametrization(); - parametrizations.merge(testClass.getParameters().getParametriz= ation()); + ParametrizationSet parametrizations =3D suite.getParameters().= getParametrization().clone(); + parametrizations.combine(testClass.getParameters().getParametr= ization()); + parametrizations.combine(context.getParametrizations()); = // TestRunnerContextSupport pojoContext =3D new TestRunnerContext= Support(context.getProperties(), parametrizations, context.getFilter(), tmp= ); --===============5525142676261798862==-- From portal-commits at lists.jboss.org Sat Oct 13 13:12:02 2007 Content-Type: multipart/mixed; boundary="===============9134476230846449277==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8631 - in docs: trunk/referenceGuide/en/modules and 1 other directory. Date: Sat, 13 Oct 2007 13:12:01 -0400 Message-ID: --===============9134476230846449277== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: chris.laprun(a)jboss.com Date: 2007-10-13 13:12:01 -0400 (Sat, 13 Oct 2007) New Revision: 8631 Modified: docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/portalap= i.xml docs/trunk/referenceGuide/en/modules/portalapi.xml Log: - Fixed typo. Modified: docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/p= ortalapi.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/portala= pi.xml 2007-10-13 15:22:07 UTC (rev 8630) +++ docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/portala= pi.xml 2007-10-13 17:12:01 UTC (rev 8631) @@ -375,8 +375,8 @@ it works. UserAuthenticationEvent example - In this example, we will create a simple counter of the num= ber of logged-in registered users. In ordder to do that we just need to kee= p track - of Sign-in and Sign-out events. + In this example, we will create a simple counter of the num= ber of logged-in registered users. In order to + do that we just need to keep track of Sign-in and Sign-out eve= nts. First, let's write our listener. It just a class that will = implement org.jboss.portal.api.event.PortalEventListener and its unique method void onEvent(PortalEventContext event= Context, PortalEvent event). Here is such an example: UserAuthenticationEvent example - In this example, we will create a simple counter of the num= ber of logged-in registered users. In ordder to do that we just need to kee= p track - of Sign-in and Sign-out events. + In this example, we will create a simple counter of the num= ber of logged-in registered users. In order to + do that we just need to keep track of Sign-in and Sign-out eve= nts. First, let's write our listener. It just a class that will = implement org.jboss.portal.api.event.PortalEventListener and its unique method void onEvent(PortalEventContext event= Context, PortalEvent event). Here is such an example: --===============5522264485019283907== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: chris.laprun(a)jboss.com Date: 2007-10-13 13:31:51 -0400 (Sat, 13 Oct 2007) New Revision: 8632 Modified: docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/clusteri= ng.xml docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/sso.xml docs/trunk/referenceGuide/en/modules/clustering.xml docs/trunk/referenceGuide/en/modules/sso.xml Log: - Updated to use 4.2.x information. Modified: docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/c= lustering.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/cluster= ing.xml 2007-10-13 17:12:01 UTC (rev 8631) +++ docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/cluster= ing.xml 2007-10-13 17:31:51 UTC (rev 8632) @@ -163,22 +163,29 @@ ]]> - More information can be found here. + More information can be found here. = Identity clustering - JBoss Portal leverages the servlet container authentication= for its own authentication mechanism. When the user - is authenticated on one particular node he will have to reauthent= icate again if he use another node of the cluster (during - a failover for instance). This is valid only for the FO= RM based authentication which is the default - form of authentication that JBoss Portal uses. Fortunately JBoss = provides transparent reauthentication of the user called - JBoss clustered SSO. Its configuration is in the file $= JBOSS_HOME/server/all/deploy/jbossweb-tomcat55.sar/server.xml - and the clustered sso valve shall be uncommented - -]]> - More information can be found here. + JBoss Portal leverages the servlet container authentication= for its own authentication mechanism. When + the user is authenticated on one particular node he will have = to reauthenticate again if he use another + node of the cluster (during a failover for instance). This is = valid only for the FORM + based authentication which is the default form of authenticati= on that JBoss Portal uses. Fortunately JBoss + provides transparent reauthentication of the user called JBoss= clustered SSO. Its configuration can be found + in $JBOSS_HOME/server/all/deploy/jboss-web.deployer/s= erver.xml and you will need to + uncomment the following valve: + ]]> + + + If you use JBoss 4.0.x, the files and valve are respectivel= y: + $JBOSS_HOME/server/all/deploy/jbossweb-tomcat55.sa= r/server.xml + ]]> + + + More information can be found here. = @@ -202,10 +209,12 @@ Setup We are going to outline how to setup a two node cluster on the= same machine in order to test JBoss Portal HA. The only missing part from the full fledged setup is the addition of a load b= alancer in front of Tomcat. However a lot of documentation - exist on the subject. A detailed step by step setup of Apache and mo= d_jk is available from the JBoss Wiki. + exist on the subject. A detailed step by step setup of Apache and mo= d_jk is available from the JBoss Wiki. As we need two application servers running at the same time, w= e must avoid any conflict. For instance we will need Tomcat to bind its socket on two different ports otherwise a ne= twork conflict will occur. We will leverage - the service binding manager this chapter of + the service binding manager this chapter of the JBoss AS documentation. The first step is to copy the all configu= ration of JBoss into two separate configurations that we name ports-01 and ports-02 : @@ -244,9 +253,9 @@ into $JBOSS_HOME/server/ports-01/deploy and $JBOSS_HOME/server/ports-02/deploy. Copy JBoss Portal HA to the deploy directory of the two config= urations. - = + - + JBoss Cache Configuration Note : To i= mprove CMS performance JBoss Cache is leveraged to cache the content cluste= r wide. We recommend that you use the following version of JBoss C= ache for best performance: Modified: docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/s= so.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/sso.xml= 2007-10-13 17:12:01 UTC (rev 8631) +++ docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/sso.xml= 2007-10-13 17:31:51 UTC (rev 8632) @@ -19,7 +19,8 @@ the portal you gain access to many systems through portlets using a= single identity. Still in many cases you need to integrate the portal infrastructure with other SSO enabled = systems. There are many different Identity Management solutions on the market. In most cases each SSO framework provides = its own way to plug into Java EE application. For custom configurations - you need to have a good understanding of JBoss Portal Identity management and authentication + you need to have a good understanding of JBoss Portal Identity management and authentication mechanisms. @@ -32,12 +33,14 @@ Enabling Tomcat SSO Valve - To enable SSO valve in Tomcat you should edit $JBOSS= _HOME/server/default/deploy/jbossweb-tomcat55.sar/server.xml fil= e and uncomment - following line: - - ]]> - + To enable SSO valve in Tomcat you should uncomment the followi= ng line + ]]> + in the $JBOSS_HOME/server/default/deploy/jboss-web.de= ployer/server.xml file. + + On JBoss 4.0.x the configuration file is + $JBOSS_HOME/server/default/deploy/jbossweb-tomcat5= 5.sar/server.xml + + More information can be found here. @@ -45,7 +48,8 @@ Lets look a little bit closer and configure SSO between portal= and other web application. As an example we'll use jmx-console web-app that comes = with every JBoss Application Server installation. - You can find more information on how to secure jmx-c= onsole in JBoss AS wiki. + You can find more information on how to secure jmx-c= onsole in JBoss AS wiki. @@ -127,12 +131,15 @@ - Edit $JBOSS_HOME/server/default/deploy/jbosswe= b-tomcat55.sar/server.xml file and uncomment - following line: - - ]]> - + Uncomment the following line + ]]> + in the $JBOSS_HOME/server/default/deploy/jboss-= web.deployer/server.xml file. + + On JBoss 4.0.x the configuration file is + $JBOSS_HOME/server/default/deploy/jbossweb-t= omcat55.sar/server.xml + + More information can be found here. Run JBoss Application Server. Modified: docs/trunk/referenceGuide/en/modules/clustering.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- docs/trunk/referenceGuide/en/modules/clustering.xml 2007-10-13 17:12:01= UTC (rev 8631) +++ docs/trunk/referenceGuide/en/modules/clustering.xml 2007-10-13 17:31:51= UTC (rev 8632) @@ -163,22 +163,29 @@ ]]> - More information can be found here. + More information can be found here. = Identity clustering - JBoss Portal leverages the servlet container authentication= for its own authentication mechanism. When the user - is authenticated on one particular node he will have to reauthent= icate again if he use another node of the cluster (during - a failover for instance). This is valid only for the FO= RM based authentication which is the default - form of authentication that JBoss Portal uses. Fortunately JBoss = provides transparent reauthentication of the user called - JBoss clustered SSO. Its configuration is in the file $= JBOSS_HOME/server/all/deploy/jbossweb-tomcat55.sar/server.xml - and the clustered sso valve shall be uncommented - -]]> - More information can be found here. + JBoss Portal leverages the servlet container authentication= for its own authentication mechanism. When + the user is authenticated on one particular node he will have = to reauthenticate again if he use another + node of the cluster (during a failover for instance). This is = valid only for the FORM + based authentication which is the default form of authenticati= on that JBoss Portal uses. Fortunately JBoss + provides transparent reauthentication of the user called JBoss= clustered SSO. Its configuration can be found + in $JBOSS_HOME/server/all/deploy/jboss-web.deployer/s= erver.xml and you will need to + uncomment the following valve: + ]]> + + + If you use JBoss 4.0.x, the files and valve are respectivel= y: + $JBOSS_HOME/server/all/deploy/jbossweb-tomcat55.sa= r/server.xml + ]]> + + + More information can be found here. = @@ -202,10 +209,12 @@ Setup We are going to outline how to setup a two node cluster on the= same machine in order to test JBoss Portal HA. The only missing part from the full fledged setup is the addition of a load b= alancer in front of Tomcat. However a lot of documentation - exist on the subject. A detailed step by step setup of Apache and mo= d_jk is available from the JBoss Wiki. + exist on the subject. A detailed step by step setup of Apache and mo= d_jk is available from the JBoss Wiki. As we need two application servers running at the same time, w= e must avoid any conflict. For instance we will need Tomcat to bind its socket on two different ports otherwise a ne= twork conflict will occur. We will leverage - the service binding manager this chapter of + the service binding manager this chapter of the JBoss AS documentation. The first step is to copy the all configu= ration of JBoss into two separate configurations that we name ports-01 and ports-02 : @@ -244,17 +253,17 @@ into $JBOSS_HOME/server/ports-01/deploy and $JBOSS_HOME/server/ports-02/deploy. Copy JBoss Portal HA to the deploy directory of the two config= urations. - = + - + JBoss Cache Configuration Note : To i= mprove CMS performance JBoss Cache is leveraged to cache the content cluste= r wide. We recommend that you use the following version of JBoss C= ache for best performance: JBoss Cache 1.4.0.SP1 and above - JGroups 2.2.7 or 2.2.8= = - = + JGroups 2.2.7 or 2.2.8= + When building from source the following command: {core}/= build.xml deploy-ha automatically upgrades your JBoss - Cache version. = + Cache version. Alternative: If upgrading your JBoss= Cache version is not an option, the following configuration @@ -295,10 +304,10 @@ false false false ]]> - = + - = - = + + Finally we can start both servers, open two shells and execute= : cd $JBOSS_HOME/bin @@ -310,9 +319,9 @@ ]]> - = - = = + + Portlet Session Replication Web containers offer the capability to replicate sessions of w= eb applications. In the context of a portal using portlets the use case is = different. The portal itself is a web application Modified: docs/trunk/referenceGuide/en/modules/sso.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- docs/trunk/referenceGuide/en/modules/sso.xml 2007-10-13 17:12:01 UTC (r= ev 8631) +++ docs/trunk/referenceGuide/en/modules/sso.xml 2007-10-13 17:31:51 UTC (r= ev 8632) @@ -19,7 +19,8 @@ the portal you gain access to many systems through portlets using a= single identity. Still in many cases you need to integrate the portal infrastructure with other SSO enabled = systems. There are many different Identity Management solutions on the market. In most cases each SSO framework provides = its own way to plug into Java EE application. For custom configurations - you need to have a good understanding of JBoss Portal Identity management and authentication + you need to have a good understanding of JBoss Portal Identity management and authentication mechanisms. @@ -32,12 +33,14 @@ Enabling Tomcat SSO Valve - To enable SSO valve in Tomcat you should edit $JBOSS= _HOME/server/default/deploy/jbossweb-tomcat55.sar/server.xml fil= e and uncomment - following line: - - ]]> - + To enable SSO valve in Tomcat you should uncomment the followi= ng line + ]]> + in the $JBOSS_HOME/server/default/deploy/jboss-web.de= ployer/server.xml file. + + On JBoss 4.0.x the configuration file is + $JBOSS_HOME/server/default/deploy/jbossweb-tomcat5= 5.sar/server.xml + + More information can be found here. @@ -45,7 +48,8 @@ Lets look a little bit closer and configure SSO between portal= and other web application. As an example we'll use jmx-console web-app that comes = with every JBoss Application Server installation. - You can find more information on how to secure jmx-c= onsole in JBoss AS wiki. + You can find more information on how to secure jmx-c= onsole in JBoss AS wiki. @@ -127,12 +131,15 @@ - Edit $JBOSS_HOME/server/default/deploy/jbosswe= b-tomcat55.sar/server.xml file and uncomment - following line: - - ]]> - + Uncomment the following line + ]]> + in the $JBOSS_HOME/server/default/deploy/jboss-= web.deployer/server.xml file. + + On JBoss 4.0.x the configuration file is + $JBOSS_HOME/server/default/deploy/jbossweb-t= omcat55.sar/server.xml + + More information can be found here. Run JBoss Application Server. @@ -369,7 +376,7 @@ ]]> This will expose special service in JBoss Portal that can b= e leveraged by JOSSO Credential and Identity Stores if the server is deploy= ed on the same - application server instance. = + application server instance. Edit $JBOSS_HOME/server/default/deploy/josso.e= ar/josso.war/WEB-INF/classes/josso-gateway-config.xml and config= ure following elements: --===============5522264485019283907==-- From portal-commits at lists.jboss.org Sat Oct 13 14:07:52 2007 Content-Type: multipart/mixed; boundary="===============2389452873603900872==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8633 - in docs: trunk/referenceGuide/en/modules and 1 other directory. Date: Sat, 13 Oct 2007 14:07:52 -0400 Message-ID: --===============2389452873603900872== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: chris.laprun(a)jboss.com Date: 2007-10-13 14:07:51 -0400 (Sat, 13 Oct 2007) New Revision: 8633 Modified: docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/clusteri= ng.xml docs/trunk/referenceGuide/en/modules/clustering.xml Log: - Fixed typo. Modified: docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/c= lustering.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/cluster= ing.xml 2007-10-13 17:31:51 UTC (rev 8632) +++ docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/cluster= ing.xml 2007-10-13 18:07:51 UTC (rev 8633) @@ -192,7 +192,7 @@ CMS clustering The CMS backend storage relies on the Apache Jackrabbit pro= ject. Jackrabbit does not support clustering out of the box. - So the portal run the Jackrabbit servicey on one node of the clus= ter using the + So the portal run the Jackrabbit service on one node of the clust= er using the HA-Singleton technology. The file jboss-portal.sar/portal-cms.sar/META-INF/jboss= -service.xml contains the configuration. We will not reproduce it in this documentation as the changes are quite c= omplex and numerous. Access from all nodes of the cluster @@ -260,10 +260,10 @@ We recommend that you use the following version of JBoss C= ache for best performance: JBoss Cache 1.4.0.SP1 and above - JGroups 2.2.7 or 2.2.8= = - = + JGroups 2.2.7 or 2.2.8= + When building from source the following command: {core}/= build.xml deploy-ha automatically upgrades your JBoss - Cache version. = + Cache version. Alternative: If upgrading your JBoss= Cache version is not an option, the following configuration @@ -304,10 +304,10 @@ false false false ]]> - = + - = - = + + Finally we can start both servers, open two shells and execute= : cd $JBOSS_HOME/bin @@ -319,9 +319,9 @@ ]]> - = - = = + + Portlet Session Replication Web containers offer the capability to replicate sessions of w= eb applications. In the context of a portal using portlets the use case is = different. The portal itself is a web application Modified: docs/trunk/referenceGuide/en/modules/clustering.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- docs/trunk/referenceGuide/en/modules/clustering.xml 2007-10-13 17:31:51= UTC (rev 8632) +++ docs/trunk/referenceGuide/en/modules/clustering.xml 2007-10-13 18:07:51= UTC (rev 8633) @@ -192,7 +192,7 @@ CMS clustering The CMS backend storage relies on the Apache Jackrabbit pro= ject. Jackrabbit does not support clustering out of the box. - So the portal run the Jackrabbit servicey on one node of the clus= ter using the + So the portal run the Jackrabbit service on one node of the clust= er using the HA-Singleton technology. The file jboss-portal.sar/portal-cms.sar/META-INF/jboss= -service.xml contains the configuration. We will not reproduce it in this documentation as the changes are quite c= omplex and numerous. Access from all nodes of the cluster --===============2389452873603900872==-- From portal-commits at lists.jboss.org Sat Oct 13 15:26:26 2007 Content-Type: multipart/mixed; boundary="===============8509311244637421041==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8634 - in modules/test/trunk/unit/src/main/org/jboss/test/unit: runner and 1 other directory. Date: Sat, 13 Oct 2007 15:26:25 -0400 Message-ID: --===============8509311244637421041== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: julien(a)jboss.com Date: 2007-10-13 15:26:25 -0400 (Sat, 13 Oct 2007) New Revision: 8634 Added: modules/test/trunk/unit/src/main/org/jboss/test/unit/runner/AbstractTest= RunnerTests.java modules/test/trunk/unit/src/main/org/jboss/test/unit/runner/POJOTestRunn= erTests.java Modified: modules/test/trunk/unit/src/main/org/jboss/test/unit/AllTests.java modules/test/trunk/unit/src/main/org/jboss/test/unit/runner/TestDriverRu= nnerTests.java Log: added tests for POJO test runner integration with runtime parameter override Modified: modules/test/trunk/unit/src/main/org/jboss/test/unit/AllTests.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/test/unit/AllTests.java 2007= -10-13 18:07:51 UTC (rev 8633) +++ modules/test/trunk/unit/src/main/org/jboss/test/unit/AllTests.java 2007= -10-13 19:26:25 UTC (rev 8634) @@ -32,6 +32,7 @@ import org.jboss.test.unit.runner.ParametrizationTests; import org.jboss.test.unit.runner.TestDriverRunnerTests; import org.jboss.test.unit.runner.GenericTestRunnerTests; +import org.jboss.test.unit.runner.POJOTestRunnerTests; import org.jboss.test.unit.runner.event.TestRunnerEventBroadcasterSupportT= ests; import org.jboss.test.unit.runner.event.TestRunnerLifeCycleFilterTests; import org.jboss.test.unit.runner.model.ModelTests; @@ -52,6 +53,7 @@ CompositeTestRunnerTests.main(args); TestDriverRunnerTests.main(args); GenericTestRunnerTests.main(args); + POJOTestRunnerTests.main(args); = // TestRunnerLifeCycleFilterTests.main(args); Added: modules/test/trunk/unit/src/main/org/jboss/test/unit/runner/Abstract= TestRunnerTests.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/test/unit/runner/AbstractTes= tRunnerTests.java (rev 0) +++ modules/test/trunk/unit/src/main/org/jboss/test/unit/runner/AbstractTes= tRunnerTests.java 2007-10-13 19:26:25 UTC (rev 8634) @@ -0,0 +1,133 @@ +/*************************************************************************= ***** + * JBoss, a division of Red Hat = * + * Copyright 2006, Red Hat Middleware, LLC, and individual = * + * contributors as indicated by the @authors tag. See the = * + * copyright.txt in the distribution for a full listing of = * + * individual contributors. = * + * = * + * This is free software; you can redistribute it and/or modify it = * + * under the terms of the GNU Lesser General Public License as = * + * published by the Free Software Foundation; either version 2.1 of = * + * the License, or (at your option) any later version. = * + * = * + * This software is distributed in the hope that it will be useful, = * + * but WITHOUT ANY WARRANTY; without even the implied warranty of = * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU = * + * Lesser General Public License for more details. = * + * = * + * You should have received a copy of the GNU Lesser General Public = * + * License along with this software; if not, write to the Free = * + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA = * + * 02110-1301 USA, or see the FSF site: http://www.fsf.org. = * + *************************************************************************= *****/ +package org.jboss.test.unit.runner; + +import org.jboss.unit.driver.AbstractTestDriver; +import org.jboss.unit.driver.DriverResponse; +import org.jboss.unit.driver.DriverCommand; +import org.jboss.unit.driver.command.StartTestCommand; +import org.jboss.unit.TestId; +import org.jboss.unit.runner.TestRunnerEvent; +import org.jboss.unit.runner.TestResult; +import org.jboss.unit.runner.TestRunnerEventListener; +import org.jboss.unit.runner.results.TestFailure; +import org.jboss.unit.runner.results.TestSuccess; +import org.jboss.unit.runner.event.StartRunnerEvent; +import org.jboss.unit.runner.event.StartTestEvent; +import org.jboss.unit.runner.event.EndTestEvent; +import org.jboss.unit.runner.event.EndRunnerEvent; +import static org.jboss.unit.api.Assert.assertEquals; +import static org.jboss.unit.api.Assert.assertInstanceOf; +import org.jboss.unit.info.impl.SimpleTestSuiteInfo; +import org.jboss.unit.info.TestInfo; + +import java.util.List; +import java.util.ArrayList; + +/** + * @author Julien Viet + * @version $Revision: 1.1 $ + */ +public class AbstractTestRunnerTests +{ + + protected static class EventList implements TestRunnerEventListener + { + + /** . */ + protected final List events =3D new ArrayList(); + + public void onEvent(TestRunnerEvent event) + { + events.add(event); + } + } + + protected static class TestDriverImpl extends AbstractTestDriver + { + + protected List ids =3D new ArrayList(); + + /** . */ + protected SimpleTestSuiteInfo info =3D new SimpleTestSuiteInfo("blah= "); + + public TestInfo getInfo() + { + return info; + } + + public final DriverResponse invoke(TestId id, DriverCommand command) + { + if (command instanceof StartTestCommand) + { + ids.add(id); + } + return invoke2(id, command); + } + + public DriverResponse invoke2(TestId id, DriverCommand command) + { + return null; + } + + public void assertIdList(List ids) + { + assertEquals(ids, this.ids); + } + } + + protected static void assertStartRunnerEvent(TestRunnerEvent event) + { + assertInstanceOf(event, StartRunnerEvent.class); + } + + protected static void assertStartTestEvent(TestRunnerEvent event, TestI= d expectedTestId) + { + StartTestEvent startEvent =3D assertInstanceOf(event, StartTestEvent= .class); + assertEquals(expectedTestId, startEvent.getTestId()); + } + + protected static void assertEndTestEvent(TestRunnerEvent event, TestId = expectedTestId, TestResult expectedTestResult) + { + EndTestEvent endEvent =3D assertInstanceOf(event, EndTestEvent.class= ); + assertEquals(expectedTestId, endEvent.getTestId()); + + // + TestResult testResult =3D endEvent.getTestResult(); + if (expectedTestResult instanceof TestFailure) + { + TestFailure expectedTestFailure =3D (TestFailure)expectedTestResu= lt; + TestFailure testFailure =3D assertInstanceOf(testResult, TestFail= ure.class); + assertEquals(expectedTestFailure.getFailure().getType(), testFail= ure.getFailure().getType()); + } + else if (expectedTestResult instanceof TestSuccess) + { + assertInstanceOf(testResult, TestSuccess.class); + } + } + + protected static void assertEndRunnerEvent(TestRunnerEvent event) + { + assertInstanceOf(event, EndRunnerEvent.class); + } +} Added: modules/test/trunk/unit/src/main/org/jboss/test/unit/runner/POJOTest= RunnerTests.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/test/unit/runner/POJOTestRun= nerTests.java (rev 0) +++ modules/test/trunk/unit/src/main/org/jboss/test/unit/runner/POJOTestRun= nerTests.java 2007-10-13 19:26:25 UTC (rev 8634) @@ -0,0 +1,139 @@ +/*************************************************************************= ***** + * JBoss, a division of Red Hat = * + * Copyright 2006, Red Hat Middleware, LLC, and individual = * + * contributors as indicated by the @authors tag. See the = * + * copyright.txt in the distribution for a full listing of = * + * individual contributors. = * + * = * + * This is free software; you can redistribute it and/or modify it = * + * under the terms of the GNU Lesser General Public License as = * + * published by the Free Software Foundation; either version 2.1 of = * + * the License, or (at your option) any later version. = * + * = * + * This software is distributed in the hope that it will be useful, = * + * but WITHOUT ANY WARRANTY; without even the implied warranty of = * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU = * + * Lesser General Public License for more details. = * + * = * + * You should have received a copy of the GNU Lesser General Public = * + * License along with this software; if not, write to the Free = * + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA = * + * 02110-1301 USA, or see the FSF site: http://www.fsf.org. = * + *************************************************************************= *****/ +package org.jboss.test.unit.runner; + +import org.jboss.unit.runner.impl.pojo.POJOTestRunner; +import org.jboss.unit.runner.impl.TestRunnerContextSupport; +import org.jboss.unit.runner.model.pojo.POJOTestSuiteDef; +import org.jboss.unit.runner.model.pojo.TestClassDef; +import org.jboss.unit.runner.TestRunnerContext; +import org.jboss.unit.runner.ParametrizationSet; +import org.jboss.unit.runner.results.TestSuccess; +import org.jboss.unit.api.pojo.annotations.Test; +import org.jboss.unit.api.pojo.annotations.Parameter; +import static org.jboss.unit.api.Assert.assertEquals; +import org.jboss.unit.TestId; + +import java.util.List; +import java.util.ArrayList; +import java.util.Map; +import java.util.HashMap; + +import static org.jboss.unit.api.Assert.*; + +/** + * @author Julien Viet + * @version $Revision: 1.1 $ + */ +public class POJOTestRunnerTests extends AbstractTestRunnerTests +{ + public static void main(String[] args) + { + testPOJO1_1(); + testPOJO1_2(); + } + + private static void testPOJO1_1() + { + POJO1.instances.clear(); + + // + TestClassDef testClass =3D new TestClassDef(POJO1.class.getName()); + testClass.getParameters().setParameter("foo", "bar_def"); + POJOTestSuiteDef suite =3D new POJOTestSuiteDef(); + suite.addClass(testClass); + + // + EventList listener =3D new EventList(); + TestRunnerContext ctx =3D new TestRunnerContextSupport(new Parametri= zationSet(), listener); + POJOTestRunner runner =3D new POJOTestRunner(suite); + runner.run(ctx); + + // + assertEquals(1, POJO1.instances.size()); + POJO1 pojo1_1 =3D assertNotNull(POJO1.instances.get(0)); + assertEquals("bar_def", pojo1_1.foo); + + // + assertEquals(4, listener.events.size()); + assertStartRunnerEvent(listener.events.get(0)); + assertStartTestEvent(listener.events.get(1), new TestId("test")); + assertEndTestEvent(listener.events.get(2), new TestId("test"), new T= estSuccess(0)); + assertEndRunnerEvent(listener.events.get(3)); + } + + private static void testPOJO1_2() + { + POJO1.instances.clear(); + + // + TestClassDef testClass =3D new TestClassDef(POJO1.class.getName()); + testClass.getParameters().setParameter("foo", "bar_def"); + POJOTestSuiteDef suite =3D new POJOTestSuiteDef(); + suite.addClass(testClass); + + // + Map parametrizations =3D new HashMap(); + parametrizations.put("foo", new String[]{"bar_runtime_1","bar_runtim= e_2"}); + + // + EventList listener =3D new EventList(); + TestRunnerContext ctx =3D new TestRunnerContextSupport(new Parametri= zationSet(parametrizations), listener); + POJOTestRunner runner =3D new POJOTestRunner(suite); + runner.run(ctx); + + // + assertEquals(2, POJO1.instances.size()); + POJO1 pojo1_1 =3D assertNotNull(POJO1.instances.get(0)); + assertEquals("bar_runtime_1", pojo1_1.foo); + POJO1 pojo1_2 =3D assertNotNull(POJO1.instances.get(1)); + assertEquals("bar_runtime_2", pojo1_2.foo); + + // + assertEquals(6, listener.events.size()); + assertStartRunnerEvent(listener.events.get(0)); + assertStartTestEvent(listener.events.get(1), new TestId("test")); + assertEndTestEvent(listener.events.get(2), new TestId("test"), new T= estSuccess(0)); + assertStartTestEvent(listener.events.get(3), new TestId("test")); + assertEndTestEvent(listener.events.get(4), new TestId("test"), new T= estSuccess(0)); + assertEndRunnerEvent(listener.events.get(5)); + } + + public static class POJO1 + { + + static List instances =3D new ArrayList(); + + String foo; + @Parameter + public void setFoo(String foo) + { + this.foo =3D foo; + } + @Test + public void test() + { + instances.add(this); + } + } +} Modified: modules/test/trunk/unit/src/main/org/jboss/test/unit/runner/TestD= riverRunnerTests.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/test/unit/runner/TestDriverR= unnerTests.java 2007-10-13 18:07:51 UTC (rev 8633) +++ modules/test/trunk/unit/src/main/org/jboss/test/unit/runner/TestDriverR= unnerTests.java 2007-10-13 19:26:25 UTC (rev 8634) @@ -24,31 +24,20 @@ = import org.jboss.unit.runner.impl.driver.TestDriverRunner; import org.jboss.unit.runner.impl.TestRunnerContextSupport; -import org.jboss.unit.runner.TestRunnerEvent; -import org.jboss.unit.runner.TestResult; import org.jboss.unit.runner.ParametrizationSet; -import org.jboss.unit.runner.TestRunnerEventListener; import org.jboss.unit.runner.results.TestFailure; import org.jboss.unit.runner.results.TestSuccess; import org.jboss.unit.runner.event.EndTestEvent; -import org.jboss.unit.runner.event.StartTestEvent; -import org.jboss.unit.runner.event.StartRunnerEvent; -import org.jboss.unit.runner.event.EndRunnerEvent; import org.jboss.unit.driver.DriverResponse; import org.jboss.unit.driver.DriverCommand; -import org.jboss.unit.driver.AbstractTestDriver; -import org.jboss.unit.driver.command.StartTestCommand; import org.jboss.unit.driver.response.EndTestResponse; import org.jboss.unit.driver.response.FailureResponse; -import org.jboss.unit.info.TestInfo; -import org.jboss.unit.info.impl.SimpleTestSuiteInfo; import org.jboss.unit.info.impl.SimpleTestCaseInfo; import org.jboss.unit.info.impl.SimpleParameterInfo; import org.jboss.unit.TestId; import org.jboss.unit.FailureType; import org.jboss.unit.Failure; = -import java.util.List; import java.util.ArrayList; import java.util.Map; import java.util.HashMap; @@ -57,13 +46,12 @@ = import static org.jboss.unit.util.CollectionTools.*; import static org.jboss.unit.api.Assert.*; -import static org.jboss.unit.api.Assert.assertEquals; = /** * @author Julien Viet * @version $Revision: 1.1 $ */ -public class TestDriverRunnerTests +public class TestDriverRunnerTests extends AbstractTestRunnerTests { = public static void main(String[] args) @@ -368,83 +356,4 @@ assertStartTestEvent(listener.events.get(1), new TestId("Foo")); } = - private static class TestDriverImpl extends AbstractTestDriver - { - - List ids =3D new ArrayList(); - - /** . */ - private SimpleTestSuiteInfo info =3D new SimpleTestSuiteInfo("blah"); - - public TestInfo getInfo() - { - return info; - } - - public final DriverResponse invoke(TestId id, DriverCommand command) - { - if (command instanceof StartTestCommand) - { - ids.add(id); - } - return invoke2(id, command); - } - - public DriverResponse invoke2(TestId id, DriverCommand command) - { - return null; - } - - public void assertIdList(List ids) - { - assertEquals(ids, this.ids); - } - } - - private static void assertStartRunnerEvent(TestRunnerEvent event) - { - assertInstanceOf(event, StartRunnerEvent.class); - } - - private static void assertStartTestEvent(TestRunnerEvent event, TestId = expectedTestId) - { - StartTestEvent startEvent =3D assertInstanceOf(event, StartTestEvent= .class); - assertEquals(expectedTestId, startEvent.getTestId()); - } - - private static void assertEndTestEvent(TestRunnerEvent event, TestId ex= pectedTestId, TestResult expectedTestResult) - { - EndTestEvent endEvent =3D assertInstanceOf(event, EndTestEvent.class= ); - assertEquals(expectedTestId, endEvent.getTestId()); - - // - TestResult testResult =3D endEvent.getTestResult(); - if (expectedTestResult instanceof TestFailure) - { - TestFailure expectedTestFailure =3D (TestFailure)expectedTestResu= lt; - TestFailure testFailure =3D assertInstanceOf(testResult, TestFail= ure.class); - assertEquals(expectedTestFailure.getFailure().getType(), testFail= ure.getFailure().getType()); - } - else if (expectedTestResult instanceof TestSuccess) - { - assertInstanceOf(testResult, TestSuccess.class); - } - } - - private static void assertEndRunnerEvent(TestRunnerEvent event) - { - assertInstanceOf(event, EndRunnerEvent.class); - } - - private static class EventList implements TestRunnerEventListener - { - - /** . */ - private final List events =3D new ArrayList(); - - public void onEvent(TestRunnerEvent event) - { - events.add(event); - } - } } --===============8509311244637421041==-- From portal-commits at lists.jboss.org Sat Oct 13 16:33:24 2007 Content-Type: multipart/mixed; boundary="===============2656394202259549355==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8635 - in modules/test/trunk/unit/src/main/org/jboss: unit and 3 other directories. Date: Sat, 13 Oct 2007 16:33:24 -0400 Message-ID: --===============2656394202259549355== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: julien(a)jboss.com Date: 2007-10-13 16:33:24 -0400 (Sat, 13 Oct 2007) New Revision: 8635 Added: modules/test/trunk/unit/src/main/org/jboss/test/unit/runner/EventList.ja= va modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/DelegateRunn= erEventFilter.java Modified: modules/test/trunk/unit/src/main/org/jboss/test/unit/runner/AbstractTest= RunnerTests.java modules/test/trunk/unit/src/main/org/jboss/test/unit/runner/GenericTestR= unnerTests.java modules/test/trunk/unit/src/main/org/jboss/test/unit/runner/POJOTestRunn= erTests.java modules/test/trunk/unit/src/main/org/jboss/test/unit/runner/TestDriverRu= nnerTests.java modules/test/trunk/unit/src/main/org/jboss/unit/TestId.java modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/generic/Gene= ricTestRunner.java modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/pojo/POJOTes= tRunner.java Log: implement the modification of test ids when a runner delegates to another r= unner. Previously test event did not have correct test ids when they were b= roadcasted to the top level listeners such as reporters Modified: modules/test/trunk/unit/src/main/org/jboss/test/unit/runner/Abstr= actTestRunnerTests.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/test/unit/runner/AbstractTes= tRunnerTests.java 2007-10-13 19:26:25 UTC (rev 8634) +++ modules/test/trunk/unit/src/main/org/jboss/test/unit/runner/AbstractTes= tRunnerTests.java 2007-10-13 20:33:24 UTC (rev 8635) @@ -51,18 +51,6 @@ public class AbstractTestRunnerTests { = - protected static class EventList implements TestRunnerEventListener - { - - /** . */ - protected final List events =3D new ArrayList(); - - public void onEvent(TestRunnerEvent event) - { - events.add(event); - } - } - protected static class TestDriverImpl extends AbstractTestDriver { = @@ -95,39 +83,4 @@ assertEquals(ids, this.ids); } } - - protected static void assertStartRunnerEvent(TestRunnerEvent event) - { - assertInstanceOf(event, StartRunnerEvent.class); - } - - protected static void assertStartTestEvent(TestRunnerEvent event, TestI= d expectedTestId) - { - StartTestEvent startEvent =3D assertInstanceOf(event, StartTestEvent= .class); - assertEquals(expectedTestId, startEvent.getTestId()); - } - - protected static void assertEndTestEvent(TestRunnerEvent event, TestId = expectedTestId, TestResult expectedTestResult) - { - EndTestEvent endEvent =3D assertInstanceOf(event, EndTestEvent.class= ); - assertEquals(expectedTestId, endEvent.getTestId()); - - // - TestResult testResult =3D endEvent.getTestResult(); - if (expectedTestResult instanceof TestFailure) - { - TestFailure expectedTestFailure =3D (TestFailure)expectedTestResu= lt; - TestFailure testFailure =3D assertInstanceOf(testResult, TestFail= ure.class); - assertEquals(expectedTestFailure.getFailure().getType(), testFail= ure.getFailure().getType()); - } - else if (expectedTestResult instanceof TestSuccess) - { - assertInstanceOf(testResult, TestSuccess.class); - } - } - - protected static void assertEndRunnerEvent(TestRunnerEvent event) - { - assertInstanceOf(event, EndRunnerEvent.class); - } } Added: modules/test/trunk/unit/src/main/org/jboss/test/unit/runner/EventLis= t.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/test/unit/runner/EventList.j= ava (rev 0) +++ modules/test/trunk/unit/src/main/org/jboss/test/unit/runner/EventList.j= ava 2007-10-13 20:33:24 UTC (rev 8635) @@ -0,0 +1,117 @@ +/*************************************************************************= ***** + * JBoss, a division of Red Hat = * + * Copyright 2006, Red Hat Middleware, LLC, and individual = * + * contributors as indicated by the @authors tag. See the = * + * copyright.txt in the distribution for a full listing of = * + * individual contributors. = * + * = * + * This is free software; you can redistribute it and/or modify it = * + * under the terms of the GNU Lesser General Public License as = * + * published by the Free Software Foundation; either version 2.1 of = * + * the License, or (at your option) any later version. = * + * = * + * This software is distributed in the hope that it will be useful, = * + * but WITHOUT ANY WARRANTY; without even the implied warranty of = * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU = * + * Lesser General Public License for more details. = * + * = * + * You should have received a copy of the GNU Lesser General Public = * + * License along with this software; if not, write to the Free = * + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA = * + * 02110-1301 USA, or see the FSF site: http://www.fsf.org. = * + *************************************************************************= *****/ +package org.jboss.test.unit.runner; + +import org.jboss.unit.runner.TestRunnerEvent; +import org.jboss.unit.runner.TestRunnerEventListener; +import org.jboss.unit.runner.TestResult; +import org.jboss.unit.runner.results.TestFailure; +import org.jboss.unit.runner.results.TestSuccess; +import org.jboss.unit.runner.event.StartRunnerEvent; +import org.jboss.unit.runner.event.StartTestEvent; +import org.jboss.unit.runner.event.EndTestEvent; +import org.jboss.unit.runner.event.EndRunnerEvent; +import static org.jboss.unit.api.Assert.*; +import org.jboss.unit.TestId; + +import java.util.List; +import java.util.ArrayList; + +/** + * @author Julien Viet + * @version $Revision: 1.1 $ + */ +public class EventList implements TestRunnerEventListener +{ + + /** . */ + protected final List events =3D new ArrayList(); + + public void onEvent(TestRunnerEvent event) + { + events.add(event); + } + + protected StartRunnerEvent assertStartRunnerEvent(int index) + { + assertTrue(events.size() > index); + TestRunnerEvent event =3D assertNotNull(events.get(index)); + return assertStartRunnerEvent(event); + } + + protected StartTestEvent assertStartTestEvent(int index, TestId expecte= dTestId) + { + assertTrue(events.size() > index); + TestRunnerEvent event =3D assertNotNull(events.get(index)); + return assertStartTestEvent(event, expectedTestId); + } + + protected EndTestEvent assertEndTestEvent(int index, TestId expectedTes= tId, TestResult expectedTestResult) + { + assertTrue(events.size() > index); + TestRunnerEvent event =3D assertNotNull(events.get(index)); + return assertEndTestEvent(event, expectedTestId, expectedTestResult); + } + + protected EndRunnerEvent assertEndRunnerEvent(int index) + { + assertTrue(events.size() > index); + TestRunnerEvent event =3D assertNotNull(events.get(index)); + return assertEndRunnerEvent(event); + } + + protected static StartRunnerEvent assertStartRunnerEvent(TestRunnerEven= t event) + { + return assertInstanceOf(event, StartRunnerEvent.class); + } + + protected static StartTestEvent assertStartTestEvent(TestRunnerEvent ev= ent, TestId expectedTestId) + { + StartTestEvent startEvent =3D assertInstanceOf(event, StartTestEvent= .class); + assertEquals(expectedTestId, startEvent.getTestId()); + return startEvent; + } + + protected static EndTestEvent assertEndTestEvent(TestRunnerEvent event,= TestId expectedTestId, TestResult expectedTestResult) + { + EndTestEvent endEvent =3D assertInstanceOf(event, EndTestEvent.class= ); + assertEquals(expectedTestId, endEvent.getTestId()); + TestResult testResult =3D endEvent.getTestResult(); + if (expectedTestResult instanceof TestFailure) + { + TestFailure expectedTestFailure =3D (TestFailure)expectedTestResu= lt; + TestFailure testFailure =3D assertInstanceOf(testResult, TestFail= ure.class); + assertEquals(expectedTestFailure.getFailure().getType(), testFail= ure.getFailure().getType()); + } + else if (expectedTestResult instanceof TestSuccess) + { + assertInstanceOf(testResult, TestSuccess.class); + } + return endEvent; + } + + protected static EndRunnerEvent assertEndRunnerEvent(TestRunnerEvent ev= ent) + { + return assertInstanceOf(event, EndRunnerEvent.class); + } +} Modified: modules/test/trunk/unit/src/main/org/jboss/test/unit/runner/Gener= icTestRunnerTests.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/test/unit/runner/GenericTest= RunnerTests.java 2007-10-13 19:26:25 UTC (rev 8634) +++ modules/test/trunk/unit/src/main/org/jboss/test/unit/runner/GenericTest= RunnerTests.java 2007-10-13 20:33:24 UTC (rev 8635) @@ -29,6 +29,7 @@ import org.jboss.unit.runner.model.ParametersDef; import org.jboss.unit.runner.model.ParameterValueDef; import org.jboss.unit.runner.ParametrizationSet; +import org.jboss.unit.runner.results.TestSuccess; import org.jboss.unit.driver.DriverResponse; import org.jboss.unit.driver.DriverCommand; import org.jboss.unit.driver.AbstractTestDriver; @@ -77,8 +78,16 @@ ParametersDef fooParameters =3D new ParametersDef(); fooParameters.setParameter("abc", new ParameterValueDef("def", "ghi"= )); foo.setParameters(fooParameters); + EventList events =3D new EventList(); GenericTestRunner runner =3D new GenericTestRunner(suite); - runner.run(new TestRunnerContextSupport()); + runner.run(new TestRunnerContextSupport(events)); + assertEquals(6, events.events.size()); + events.assertStartRunnerEvent(0); + events.assertStartTestEvent(1, new TestId(Driver1.class.getName(), "= foo")); + events.assertEndTestEvent(2, new TestId(Driver1.class.getName(), "fo= o"), new TestSuccess(0)); + events.assertStartTestEvent(3, new TestId(Driver1.class.getName(), "= foo")); + events.assertEndTestEvent(4, new TestId(Driver1.class.getName(), "fo= o"), new TestSuccess(0)); + events.assertEndRunnerEvent(5); assertEquals(list(new TestId("foo"), new TestId("foo")), Driver1.ids= ); HashMap expectedParametrization1 =3D new HashMap(); HashMap expectedParametrization2 =3D new HashMap(); @@ -99,10 +108,16 @@ ParametersDef fooParameters =3D new ParametersDef(); fooParameters.setParameter("abc", new ParameterValueDef("def", "ghi"= )); foo.setParameters(fooParameters); - GenericTestRunner runner =3D new GenericTestRunner(suite); Map parametrizations =3D new HashMap(); parametrizations.put("abc", new String[]{"def"}); - runner.run(new TestRunnerContextSupport(new ParametrizationSet(param= etrizations))); + EventList events =3D new EventList(); + GenericTestRunner runner =3D new GenericTestRunner(suite); + runner.run(new TestRunnerContextSupport(new ParametrizationSet(param= etrizations), events)); + assertEquals(4, events.events.size()); + events.assertStartRunnerEvent(0); + events.assertStartTestEvent(1, new TestId(Driver1.class.getName(), "= foo")); + events.assertEndTestEvent(2, new TestId(Driver1.class.getName(), "fo= o"), new TestSuccess(0)); + events.assertEndRunnerEvent(3); assertEquals(list(new TestId("foo")), Driver1.ids); HashMap expectedParametrization1 =3D new HashMap(); expectedParametrization1.put("abc", "def"); @@ -113,8 +128,12 @@ { Driver1.init(); GenericTestSuiteDef suite =3D new GenericTestSuiteDef(Driver1.class.= getName()); + EventList events =3D new EventList(); GenericTestRunner runner =3D new GenericTestRunner(suite); - runner.run(new TestRunnerContextSupport()); + runner.run(new TestRunnerContextSupport(events)); + assertEquals(2, events.events.size()); + events.assertStartRunnerEvent(0); + events.assertEndRunnerEvent(1); assertEquals(list(), Driver1.ids); assertEquals(list(), Driver1.parametrizations); } @@ -125,8 +144,14 @@ Driver1.testSuiteInfo.addTest(new SimpleTestCaseInfo("foo")); GenericTestSuiteDef suite =3D new GenericTestSuiteDef(Driver1.class.= getName()); suite.addTest(new TestDef(new TestId("foo"))); + EventList events =3D new EventList(); GenericTestRunner runner =3D new GenericTestRunner(suite); - runner.run(new TestRunnerContextSupport()); + runner.run(new TestRunnerContextSupport(events)); + assertEquals(4, events.events.size()); + events.assertStartRunnerEvent(0); + events.assertStartTestEvent(1, new TestId(Driver1.class.getName(), "= foo")); + events.assertEndTestEvent(2, new TestId(Driver1.class.getName(), "fo= o"), new TestSuccess(0)); + events.assertEndRunnerEvent(3); assertEquals(list(new TestId("foo")), Driver1.ids); assertEquals(list(new HashMap()), Driver1.parametrizations); } @@ -138,8 +163,14 @@ Driver1.testSuiteInfo.addTest(new SimpleTestCaseInfo("bar")); GenericTestSuiteDef suite =3D new GenericTestSuiteDef(Driver1.class.= getName()); suite.addTest(new TestDef(new TestId("foo"))); + EventList events =3D new EventList(); GenericTestRunner runner =3D new GenericTestRunner(suite); - runner.run(new TestRunnerContextSupport()); + runner.run(new TestRunnerContextSupport(events)); + assertEquals(4, events.events.size()); + events.assertStartRunnerEvent(0); + events.assertStartTestEvent(1, new TestId(Driver1.class.getName(), "= foo")); + events.assertEndTestEvent(2, new TestId(Driver1.class.getName(), "fo= o"), new TestSuccess(0)); + events.assertEndRunnerEvent(3); assertEquals(list(new TestId("foo")), Driver1.ids); assertEquals(list(new HashMap()), Driver1.parametrizations); } @@ -150,8 +181,16 @@ Driver1.testSuiteInfo.addTest(new SimpleTestCaseInfo("foo")); Driver1.testSuiteInfo.addTest(new SimpleTestCaseInfo("bar")); GenericTestSuiteDef suite =3D new GenericTestSuiteDef(Driver1.class.= getName()); + EventList events =3D new EventList(); GenericTestRunner runner =3D new GenericTestRunner(suite); - runner.run(new TestRunnerContextSupport()); + runner.run(new TestRunnerContextSupport(events)); + assertEquals(6, events.events.size()); + events.assertStartRunnerEvent(0); + events.assertStartTestEvent(1, new TestId(Driver1.class.getName(), "= foo")); + events.assertEndTestEvent(2, new TestId(Driver1.class.getName(), "fo= o"), new TestSuccess(0)); + events.assertStartTestEvent(3, new TestId(Driver1.class.getName(), "= bar")); + events.assertEndTestEvent(4, new TestId(Driver1.class.getName(), "ba= r"), new TestSuccess(0)); + events.assertEndRunnerEvent(5); assertEquals(list(new TestId("foo"), new TestId("bar")), Driver1.ids= ); assertEquals(list(new HashMap(), new HashMap()), Driver1.parametriza= tions); } Modified: modules/test/trunk/unit/src/main/org/jboss/test/unit/runner/POJOT= estRunnerTests.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/test/unit/runner/POJOTestRun= nerTests.java 2007-10-13 19:26:25 UTC (rev 8634) +++ modules/test/trunk/unit/src/main/org/jboss/test/unit/runner/POJOTestRun= nerTests.java 2007-10-13 20:33:24 UTC (rev 8635) @@ -76,10 +76,10 @@ = // assertEquals(4, listener.events.size()); - assertStartRunnerEvent(listener.events.get(0)); - assertStartTestEvent(listener.events.get(1), new TestId("test")); - assertEndTestEvent(listener.events.get(2), new TestId("test"), new T= estSuccess(0)); - assertEndRunnerEvent(listener.events.get(3)); + listener.assertStartRunnerEvent(0); + listener.assertStartTestEvent(1, new TestId(POJO1.class.getName(), "= test")); + listener.assertEndTestEvent(2, new TestId(POJO1.class.getName(), "te= st"), new TestSuccess(0)); + listener.assertEndRunnerEvent(3); } = private static void testPOJO1_2() @@ -111,12 +111,12 @@ = // assertEquals(6, listener.events.size()); - assertStartRunnerEvent(listener.events.get(0)); - assertStartTestEvent(listener.events.get(1), new TestId("test")); - assertEndTestEvent(listener.events.get(2), new TestId("test"), new T= estSuccess(0)); - assertStartTestEvent(listener.events.get(3), new TestId("test")); - assertEndTestEvent(listener.events.get(4), new TestId("test"), new T= estSuccess(0)); - assertEndRunnerEvent(listener.events.get(5)); + listener.assertStartRunnerEvent(0); + listener.assertStartTestEvent(1, new TestId(POJO1.class.getName(), "= test")); + listener.assertEndTestEvent(2, new TestId(POJO1.class.getName(), "te= st"), new TestSuccess(0)); + listener.assertStartTestEvent(3, new TestId(POJO1.class.getName(), "= test")); + listener.assertEndTestEvent(4, new TestId(POJO1.class.getName(), "te= st"), new TestSuccess(0)); + listener.assertEndRunnerEvent(5); } = public static class POJO1 Modified: modules/test/trunk/unit/src/main/org/jboss/test/unit/runner/TestD= riverRunnerTests.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/test/unit/runner/TestDriverR= unnerTests.java 2007-10-13 19:26:25 UTC (rev 8634) +++ modules/test/trunk/unit/src/main/org/jboss/test/unit/runner/TestDriverR= unnerTests.java 2007-10-13 20:33:24 UTC (rev 8635) @@ -97,12 +97,12 @@ = // assertEquals(6, listener.events.size()); - assertStartRunnerEvent(listener.events.get(0)); - assertStartTestEvent(listener.events.get(1), new TestId("Foo")); - assertEndTestEvent(listener.events.get(2), new TestId("Foo"), new Te= stSuccess(0)); - assertStartTestEvent(listener.events.get(3), new TestId("Bar")); - assertEndTestEvent(listener.events.get(4), new TestId("Bar"), new Te= stSuccess(0)); - assertEndRunnerEvent(listener.events.get(5)); + listener.assertStartRunnerEvent(0); + listener.assertStartTestEvent(1, new TestId("Foo")); + listener.assertEndTestEvent(2, new TestId("Foo"), new TestSuccess(0)= ); + listener.assertStartTestEvent(3, new TestId("Bar")); + listener.assertEndTestEvent(4, new TestId("Bar"), new TestSuccess(0)= ); + listener.assertEndRunnerEvent(5); } = private static void testInvokeTestCaseWithParameters1() @@ -133,10 +133,10 @@ = // assertEquals(4, listener.events.size()); - assertStartRunnerEvent(listener.events.get(0)); - assertStartTestEvent(listener.events.get(1), new TestId("Foo")); - assertEndTestEvent(listener.events.get(2), new TestId("Foo"), new Te= stSuccess(0)); - assertEndRunnerEvent(listener.events.get(3)); + listener.assertStartRunnerEvent(0); + listener.assertStartTestEvent(1, new TestId("Foo")); + listener.assertEndTestEvent(2, new TestId("Foo"), new TestSuccess(0)= ); + listener.assertEndRunnerEvent(3); = // Check parametrization Set> s1 =3D new HashSet>(); @@ -178,12 +178,12 @@ = // assertEquals(6, listener.events.size()); - assertStartRunnerEvent(listener.events.get(0)); - assertStartTestEvent(listener.events.get(1), new TestId("Foo")); - assertEndTestEvent(listener.events.get(2), new TestId("Foo"), new Te= stSuccess(0)); - assertStartTestEvent(listener.events.get(3), new TestId("Foo")); - assertEndTestEvent(listener.events.get(4), new TestId("Foo"), new Te= stSuccess(0)); - assertEndRunnerEvent(listener.events.get(5)); + listener.assertStartRunnerEvent(0); + listener.assertStartTestEvent(1, new TestId("Foo")); + listener.assertEndTestEvent(2, new TestId("Foo"), new TestSuccess(0)= ); + listener.assertStartTestEvent(3, new TestId("Foo")); + listener.assertEndTestEvent(4, new TestId("Foo"), new TestSuccess(0)= ); + listener.assertEndRunnerEvent(5); = // Check parametrization Set> s1 =3D new HashSet>(); @@ -215,8 +215,8 @@ = // assertEquals(2, listener.events.size()); - assertStartRunnerEvent(listener.events.get(0)); - assertEndRunnerEvent(listener.events.get(1)); + listener.assertStartRunnerEvent(0); + listener.assertEndRunnerEvent(1); } = private static void testTestDriverInvokeTestCaseReturnsNull() @@ -234,10 +234,10 @@ = // assertEquals(4, listener.events.size()); - assertStartRunnerEvent(listener.events.get(0)); - assertStartTestEvent(listener.events.get(1), new TestId("Foo")); - assertEndTestEvent(listener.events.get(2), new TestId("Foo"), new Te= stFailure(new Failure("", FailureType.ERROR), 0)); - assertEndRunnerEvent(listener.events.get(3)); + listener.assertStartRunnerEvent(0); + listener.assertStartTestEvent(1, new TestId("Foo")); + listener.assertEndTestEvent(2, new TestId("Foo"), new TestFailure(ne= w Failure("", FailureType.ERROR), 0)); + listener.assertEndRunnerEvent(3); } = private static void testTestDriverInvokeTestCaseReturnsAnEndTestRespons= e() @@ -261,10 +261,10 @@ = // assertEquals(4, listener.events.size()); - assertStartRunnerEvent(listener.events.get(0)); - assertStartTestEvent(listener.events.get(1), new TestId("Foo")); - assertEndTestEvent(listener.events.get(2), new TestId("Foo"), new Te= stSuccess(0)); - assertEndRunnerEvent(listener.events.get(3)); + listener.assertStartRunnerEvent(0); + listener.assertStartTestEvent(1, new TestId("Foo")); + listener.assertEndTestEvent(2, new TestId("Foo"), new TestSuccess(0)= ); + listener.assertEndRunnerEvent(3); } = private static void testTestDriverInvokeTestCaseReturnsAFailureResponse= () @@ -288,10 +288,10 @@ = // assertEquals(4, listener.events.size()); - assertStartRunnerEvent(listener.events.get(0)); - assertStartTestEvent(listener.events.get(1), new TestId("Foo")); - assertEndTestEvent(listener.events.get(2), new TestId("Foo"), new Te= stFailure(new Failure("", FailureType.ERROR), 0)); - assertEndRunnerEvent(listener.events.get(3)); + listener.assertStartRunnerEvent(0); + listener.assertStartTestEvent(1, new TestId("Foo")); + listener.assertEndTestEvent(2, new TestId("Foo"), new TestFailure(ne= w Failure("", FailureType.ERROR), 0)); + listener.assertEndRunnerEvent(3); } = private static void testTestDriverInvokeTestCaseThrowsRuntimeException() @@ -315,10 +315,10 @@ = // assertEquals(4, listener.events.size()); - assertStartRunnerEvent(listener.events.get(0)); - assertStartTestEvent(listener.events.get(1), new TestId("Foo")); - assertEndTestEvent(listener.events.get(2), new TestId("Foo"), new Te= stFailure(new Failure("", FailureType.ERROR), 0)); - assertEndRunnerEvent(listener.events.get(3)); + listener.assertStartRunnerEvent(0); + listener.assertStartTestEvent(1, new TestId("Foo")); + listener.assertEndTestEvent(2, new TestId("Foo"), new TestFailure(ne= w Failure("", FailureType.ERROR), 0)); + listener.assertEndRunnerEvent(3); } = private static void testTestDriverInvokeTestCaseThrowsError() @@ -352,8 +352,8 @@ = // assertEquals(2, listener.events.size()); - assertStartRunnerEvent(listener.events.get(0)); - assertStartTestEvent(listener.events.get(1), new TestId("Foo")); + listener.assertStartRunnerEvent(0); + listener.assertStartTestEvent(1, new TestId("Foo")); } = } Modified: modules/test/trunk/unit/src/main/org/jboss/unit/TestId.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/TestId.java 2007-10-13 = 19:26:25 UTC (rev 8634) +++ modules/test/trunk/unit/src/main/org/jboss/unit/TestId.java 2007-10-13 = 20:33:24 UTC (rev 8635) @@ -64,6 +64,26 @@ this.names =3D names; } = + public TestId(String name, TestId suffix) + { + if (suffix =3D=3D null) + { + throw new IllegalArgumentException(); + } + if (name =3D=3D null) + { + throw new IllegalArgumentException(); + } + + // + String[] names =3D new String[1 + suffix.names.length]; + names[0] =3D name; + System.arraycopy(suffix.names, 0, names, 1, suffix.names.length); + + // + this.names =3D names; + } + public TestId(String name) { if (name =3D=3D null) Added: modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/Delegate= RunnerEventFilter.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/DelegateRun= nerEventFilter.java (rev 0) +++ modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/DelegateRun= nerEventFilter.java 2007-10-13 20:33:24 UTC (rev 8635) @@ -0,0 +1,86 @@ +/*************************************************************************= ***** + * JBoss, a division of Red Hat = * + * Copyright 2006, Red Hat Middleware, LLC, and individual = * + * contributors as indicated by the @authors tag. See the = * + * copyright.txt in the distribution for a full listing of = * + * individual contributors. = * + * = * + * This is free software; you can redistribute it and/or modify it = * + * under the terms of the GNU Lesser General Public License as = * + * published by the Free Software Foundation; either version 2.1 of = * + * the License, or (at your option) any later version. = * + * = * + * This software is distributed in the hope that it will be useful, = * + * but WITHOUT ANY WARRANTY; without even the implied warranty of = * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU = * + * Lesser General Public License for more details. = * + * = * + * You should have received a copy of the GNU Lesser General Public = * + * License along with this software; if not, write to the Free = * + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA = * + * 02110-1301 USA, or see the FSF site: http://www.fsf.org. = * + *************************************************************************= *****/ +package org.jboss.unit.runner.impl; + +import org.jboss.unit.runner.TestRunnerEventListener; +import org.jboss.unit.runner.TestRunnerEvent; +import org.jboss.unit.runner.event.StartRunnerEvent; +import org.jboss.unit.runner.event.EndRunnerEvent; +import org.jboss.unit.runner.event.StartTestEvent; +import org.jboss.unit.runner.event.EndTestEvent; +import org.jboss.unit.TestId; + +/** + *

The goal of this listener class is to route events to a target liste= ner and operate on the events + * with the following manner:

+ *

+ *

    + *
  • Absorb any event of type StartRunnerEvent or End= RunnerEvent
  • + *
  • Event of type StartTestEvent or EndTestEvent have their test id transformed + * by adding the testName field as prefix of the id
  • + *
+ *

+ *

The use case of this class is a test runner which delegates to anoth= er test runner and wants to absorb the + * life cycle events emitted by the runner and apply a transformation of t= he test id of the test life cycle events + * emitted by the runner. + *

+ * + * @author Julien Viet + * @version $Revision: 1.1 $ + */ +public class DelegateRunnerEventFilter implements TestRunnerEventListener +{ + + /** . */ + private String testName; + + /** . */ + private TestRunnerEventListener listener; + + public DelegateRunnerEventFilter(String testName, TestRunnerEventListen= er listener) + { + this.testName =3D testName; + this.listener =3D listener; + } + + public void onEvent(TestRunnerEvent event) + { + if (event instanceof StartRunnerEvent || event instanceof EndRunnerE= vent) + { + return; + } + if (event instanceof StartTestEvent) + { + StartTestEvent ste =3D (StartTestEvent)event; + TestId newId =3D new TestId(testName, ste.getTestId()); + event =3D new StartTestEvent(newId, ste.getTestInfo()); + } + else if (event instanceof EndTestEvent) + { + EndTestEvent ste =3D (EndTestEvent)event; + TestId newId =3D new TestId(testName, ste.getTestId()); + event =3D new EndTestEvent(newId, ste.getTestResult()); + } + listener.onEvent(event); + } +} Modified: modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/gener= ic/GenericTestRunner.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/generic/Gen= ericTestRunner.java 2007-10-13 19:26:25 UTC (rev 8634) +++ modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/generic/Gen= ericTestRunner.java 2007-10-13 20:33:24 UTC (rev 8635) @@ -25,11 +25,10 @@ import org.jboss.unit.runner.AbstractTestRunner; import org.jboss.unit.runner.ParametrizationSet; import org.jboss.unit.runner.TestRunnerContext; -import org.jboss.unit.runner.impl.TestRunnerLifeCycleFilter; import org.jboss.unit.runner.event.RunnerFailureEvent; -import org.jboss.unit.runner.impl.TestRunnerEventBroadcaster; import org.jboss.unit.runner.impl.driver.TestDriverRunner; import org.jboss.unit.runner.impl.TestRunnerContextSupport; +import org.jboss.unit.runner.impl.DelegateRunnerEventFilter; import org.jboss.unit.runner.model.generic.GenericTestSuiteDef; import org.jboss.unit.runner.model.generic.TestDef; import org.jboss.unit.driver.TestDriver; @@ -54,13 +53,12 @@ this.def =3D def; } = - protected void internalRun(TestRunnerContext context) + protected void internalRun(final TestRunnerContext context) { String className =3D def.getClassName(); = - // Setup intermediate event filtering - TestRunnerEventBroadcaster tmp =3D new TestRunnerEventBroadcaster(); - tmp.addListener(new TestRunnerLifeCycleFilter(context.getEventListen= er())); + // + DelegateRunnerEventFilter filter =3D new DelegateRunnerEventFilter(c= lassName, context.getEventListener()); = // try @@ -85,7 +83,7 @@ parametrizations.combine(context.getParametrizations()); = // - TestRunnerContextSupport genericContext =3D new TestRunnerCont= extSupport(context.getProperties(), parametrizations, context.getFilter(), = tmp); + TestRunnerContextSupport genericContext =3D new TestRunnerCont= extSupport(context.getProperties(), parametrizations, context.getFilter(), = filter); = // TestDriverRunner runner =3D new TestDriverRunner(driver, testD= ef.getRefId()); Modified: modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/pojo/= POJOTestRunner.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/pojo/POJOTe= stRunner.java 2007-10-13 19:26:25 UTC (rev 8634) +++ modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/pojo/POJOTe= stRunner.java 2007-10-13 20:33:24 UTC (rev 8635) @@ -27,8 +27,7 @@ import org.jboss.unit.runner.TestRunnerContext; import org.jboss.unit.runner.impl.driver.TestDriverRunner; import org.jboss.unit.runner.impl.TestRunnerContextSupport; -import org.jboss.unit.runner.impl.TestRunnerEventBroadcaster; -import org.jboss.unit.runner.impl.TestRunnerLifeCycleFilter; +import org.jboss.unit.runner.impl.DelegateRunnerEventFilter; import org.jboss.unit.runner.event.RunnerFailureEvent; import org.jboss.unit.runner.model.pojo.POJOTestSuiteDef; import org.jboss.unit.runner.model.pojo.TestClassDef; @@ -59,16 +58,14 @@ = protected void internalRun(TestRunnerContext context) { - // Setup intermediate event filtering - TestRunnerEventBroadcaster tmp =3D new TestRunnerEventBroadcaster(); - tmp.addListener(new TestRunnerLifeCycleFilter(context.getEventListen= er())); - - // for (TestClassDef testClass : suite.getTestClasses()) { String className =3D testClass.getName(); = // + DelegateRunnerEventFilter filter =3D new DelegateRunnerEventFilte= r(className, context.getEventListener()); + + // try { Class clazz =3D Thread.currentThread().getContextClassLoader()= .loadClass(className); @@ -94,7 +91,7 @@ parametrizations.combine(context.getParametrizations()); = // - TestRunnerContextSupport pojoContext =3D new TestRunnerContext= Support(context.getProperties(), parametrizations, context.getFilter(), tmp= ); + TestRunnerContextSupport pojoContext =3D new TestRunnerContext= Support(context.getProperties(), parametrizations, context.getFilter(), fil= ter); = // TestDriverRunner runner =3D new TestDriverRunner(driver); --===============2656394202259549355==-- From portal-commits at lists.jboss.org Sat Oct 13 17:21:14 2007 Content-Type: multipart/mixed; boundary="===============1727252977267311951==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8636 - in modules/test/trunk: tooling/src/main/org/jboss/unit/tooling/ant and 1 other directory. Date: Sat, 13 Oct 2007 17:21:14 -0400 Message-ID: --===============1727252977267311951== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: julien(a)jboss.com Date: 2007-10-13 17:21:14 -0400 (Sat, 13 Oct 2007) New Revision: 8636 Modified: modules/test/trunk/mc/build.xml modules/test/trunk/tooling/src/main/org/jboss/unit/tooling/ant/TestsType= .java Log: added some JUL pre default config to limit the instance amount of jboss aop= in MC Modified: modules/test/trunk/mc/build.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/mc/build.xml 2007-10-13 20:33:24 UTC (rev 8635) +++ modules/test/trunk/mc/build.xml 2007-10-13 21:21:14 UTC (rev 8636) @@ -189,6 +189,11 @@ = + + + + + + Modified: modules/test/trunk/unit/src/main/org/jboss/unit/tooling/Main.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/tooling/Main.java 2007-= 10-13 21:55:45 UTC (rev 8638) +++ modules/test/trunk/unit/src/main/org/jboss/unit/tooling/Main.java 2007-= 10-13 22:06:52 UTC (rev 8639) @@ -153,6 +153,12 @@ System.out.println("TestRunnerContext contains: "); System.out.println("Properties: " + properties.toString()); = +// System.out.println("System properties:"); +// for (Object key : System.getProperties().keySet()) +// { +// +// System.out.println(key + "=3D" + System.getProperty((String)key= )); +// } = TestRunnerContextSupport runnerContext =3D new TestRunnerContextSupp= ort(properties, new ParametrizationSet(), mainFilter, broadcaster); runner.run(runnerContext); --===============7596483991382386642==-- From portal-commits at lists.jboss.org Sat Oct 13 23:23:50 2007 Content-Type: multipart/mixed; boundary="===============8905593198343406482==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8640 - in docs: trunk/referenceGuide/en/modules and 1 other directory. Date: Sat, 13 Oct 2007 23:23:50 -0400 Message-ID: --===============8905593198343406482== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: chris.laprun(a)jboss.com Date: 2007-10-13 23:23:50 -0400 (Sat, 13 Oct 2007) New Revision: 8640 Modified: docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/clusteri= ng.xml docs/trunk/referenceGuide/en/modules/clustering.xml Log: - Minor content improvements. Modified: docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/c= lustering.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/cluster= ing.xml 2007-10-13 22:06:52 UTC (rev 8639) +++ docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/cluster= ing.xml 2007-10-14 03:23:50 UTC (rev 8640) @@ -163,8 +163,7 @@ ]]> - More information can be found here. + More information can be found here.
= @@ -192,7 +191,7 @@ CMS clustering The CMS backend storage relies on the Apache Jackrabbit pro= ject. Jackrabbit does not support clustering out of the box. - So the portal run the Jackrabbit service on one node of the clust= er using the + So the portal run the Jackrabbit servicey on one node of the clus= ter using the HA-Singleton technology. The file jboss-portal.sar/portal-cms.sar/META-INF/jboss= -service.xml contains the configuration. We will not reproduce it in this documentation as the changes are quite c= omplex and numerous. Access from all nodes of the cluster @@ -209,12 +208,11 @@ Setup We are going to outline how to setup a two node cluster on the= same machine in order to test JBoss Portal HA. The only missing part from the full fledged setup is the addition of a load b= alancer in front of Tomcat. However a lot of documentation - exist on the subject. A detailed step by step setup of Apache and mo= d_jk is available from the JBoss Wiki. + exist on the subject. A detailed step by step setup of Apache and mo= d_jk is available from the + JBoss Wiki. As we need two application servers running at the same time, w= e must avoid any conflict. For instance we will need Tomcat to bind its socket on two different ports otherwise a ne= twork conflict will occur. We will leverage - the service binding manager this chapter of + the service binding manager this chapter of the JBoss AS documentation. The first step is to copy the all configu= ration of JBoss into two separate configurations that we name ports-01 and ports-02 : @@ -255,21 +253,30 @@ Copy JBoss Portal HA to the deploy directory of the two config= urations. = - - JBoss Cache Configuration Note : To i= mprove CMS performance JBoss Cache is leveraged to cache the content cluste= r wide. - We recommend that you use the following version of JBoss C= ache for best performance: - - JBoss Cache 1.4.0.SP1 and above - JGroups 2.2.7 or 2.2.8= - - When building from source the following command: {core}/= build.xml deploy-ha automatically upgrades your JBoss - Cache version. - - - Alternative: If upgrading your JBoss= Cache version is not an option, the following configuration - change is needed in the jboss-portal-ha.sar/portal-cms.sar= /META-INF/jboss-service.xml. - Replace the following configuration in the cms.p= m.cache:service=3DTreeCache Mbean: - + + To improve CMS performance JBoss Cache is leveraged to cach= e the content cluster wide. + We recommend that you use the following version of JBoss Ca= che for best performance: + + + JBoss Cache 1.4.0.SP1 and above + + + JGroups 2.2.7 or 2.2.8 + + + When building from source the following command: + {core}/build.xml deploy-ha automatically= upgrades your JBoss Cache version. + + + Alternative: + If upgrading your JBoss Cache version is not an option, the= following configuration + change is needed in the + jboss-portal-ha.sar/portal-cms.sar/META-INF/jboss-= service.xml. + Replace the following configuration in the + cms.pm.cache:service=3DTreeCache + Mbean: + ]]> - + with the following configuration: false false ]]> = - + + = = - Finally we can start both servers, open two shells and execute= : + Finally we can start both servers, open two shells and execut= e : cd $JBOSS_HOME/bin >./run.sh -c ports-01 @@ -320,8 +328,6 @@
= - - Portlet Session Replication Web containers offer the capability to replicate sessions of w= eb applications. In the context of a portal using portlets the use case is = different. The portal itself is a web application @@ -341,19 +347,20 @@ Replicate only the portlet that requires it. Portal session replication is just web application repl= ication and is very standard. - There are also some limitation such has you can only replicate= portlet scoped attributes of a portlet - session. It means that any attribute scoped using application sco= pe are not replicated. + There are, however, some limitations. For example, you can onl= y replicate portlet-scoped attributes of a portlet + session. This means that any application-scoped attribute are not= replicated. JBoss Portal configuration The mandatory step to make JBoss Portal able to replicate p= ortlet sessions is to configure - the portal web application to be distributed which is explained i= n + the portal web application to be distributed as explained in
Portlet configuration - In order to activate portlet session replication you need t= o + In order to activate portlet session replication you need t= o: - Add a specific listener class to the /WEB-= INF/web.xml file of your web application - Configure your portlet to be distributed in the /WEB-INF/jboss-portlet.xml file. + Add a Portal-specific listener class to the /WEB-INF/web.xml file of your + portlet web application + Configure your portlet to be distributed in the /WEB-INF/jboss-portlet.xml file + would not necessarily be the same depending on the order in wh= ich the portlets on this page are rendered. Mutable objects need an explicit call to s= etAttribute(String name, Object value) on the portlet session object in order to trigger replicati= on by the container. Modified: docs/trunk/referenceGuide/en/modules/clustering.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- docs/trunk/referenceGuide/en/modules/clustering.xml 2007-10-13 22:06:52= UTC (rev 8639) +++ docs/trunk/referenceGuide/en/modules/clustering.xml 2007-10-14 03:23:50= UTC (rev 8640) @@ -163,8 +163,7 @@ ]]> - More information can be found here. + More information can be found here. = @@ -192,7 +191,7 @@ CMS clustering The CMS backend storage relies on the Apache Jackrabbit pro= ject. Jackrabbit does not support clustering out of the box. - So the portal run the Jackrabbit service on one node of the clust= er using the + So the portal run the Jackrabbit servicey on one node of the clus= ter using the HA-Singleton technology. The file jboss-portal.sar/portal-cms.sar/META-INF/jboss= -service.xml contains the configuration. We will not reproduce it in this documentation as the changes are quite c= omplex and numerous. Access from all nodes of the cluster @@ -209,12 +208,11 @@ Setup We are going to outline how to setup a two node cluster on the= same machine in order to test JBoss Portal HA. The only missing part from the full fledged setup is the addition of a load b= alancer in front of Tomcat. However a lot of documentation - exist on the subject. A detailed step by step setup of Apache and mo= d_jk is available from the JBoss Wiki. + exist on the subject. A detailed step by step setup of Apache and mo= d_jk is available from the + JBoss Wiki. As we need two application servers running at the same time, w= e must avoid any conflict. For instance we will need Tomcat to bind its socket on two different ports otherwise a ne= twork conflict will occur. We will leverage - the service binding manager this chapter of + the service binding manager this chapter of the JBoss AS documentation. The first step is to copy the all configu= ration of JBoss into two separate configurations that we name ports-01 and ports-02 : @@ -255,21 +253,30 @@ Copy JBoss Portal HA to the deploy directory of the two config= urations. = - - JBoss Cache Configuration Note : To i= mprove CMS performance JBoss Cache is leveraged to cache the content cluste= r wide. - We recommend that you use the following version of JBoss C= ache for best performance: - - JBoss Cache 1.4.0.SP1 and above - JGroups 2.2.7 or 2.2.8= - - When building from source the following command: {core}/= build.xml deploy-ha automatically upgrades your JBoss - Cache version. - - - Alternative: If upgrading your JBoss= Cache version is not an option, the following configuration - change is needed in the jboss-portal-ha.sar/portal-cms.sar= /META-INF/jboss-service.xml. - Replace the following configuration in the cms.p= m.cache:service=3DTreeCache Mbean: - + + To improve CMS performance JBoss Cache is leveraged to cach= e the content cluster wide. + We recommend that you use the following version of JBoss Ca= che for best performance: + + + JBoss Cache 1.4.0.SP1 and above + + + JGroups 2.2.7 or 2.2.8 + + + When building from source the following command: + {core}/build.xml deploy-ha automatically= upgrades your JBoss Cache version. + + + Alternative: + If upgrading your JBoss Cache version is not an option, the= following configuration + change is needed in the + jboss-portal-ha.sar/portal-cms.sar/META-INF/jboss-= service.xml. + Replace the following configuration in the + cms.pm.cache:service=3DTreeCache + Mbean: + ]]> - + with the following configuration: false false ]]> = - + + = = - Finally we can start both servers, open two shells and execute= : + Finally we can start both servers, open two shells and execut= e : cd $JBOSS_HOME/bin >./run.sh -c ports-01 @@ -320,8 +328,6 @@ = - - Portlet Session Replication Web containers offer the capability to replicate sessions of w= eb applications. In the context of a portal using portlets the use case is = different. The portal itself is a web application @@ -341,19 +347,20 @@ Replicate only the portlet that requires it. Portal session replication is just web application repl= ication and is very standard. - There are also some limitation such has you can only replicate= portlet scoped attributes of a portlet - session. It means that any attribute scoped using application sco= pe are not replicated. + There are, however, some limitations. For example, you can onl= y replicate portlet-scoped attributes of a portlet + session. This means that any application-scoped attribute are not= replicated. JBoss Portal configuration The mandatory step to make JBoss Portal able to replicate p= ortlet sessions is to configure - the portal web application to be distributed which is explained i= n + the portal web application to be distributed as explained in Portlet configuration - In order to activate portlet session replication you need t= o + In order to activate portlet session replication you need t= o: - Add a specific listener class to the /WEB-= INF/web.xml file of your web application - Configure your portlet to be distributed in the /WEB-INF/jboss-portlet.xml file. + Add a Portal-specific listener class to the /WEB-INF/web.xml file of your + portlet web application + Configure your portlet to be distributed in the /WEB-INF/jboss-portlet.xml file + would not necessarily be the same depending on the order in wh= ich the portlets on this page are rendered. Mutable objects need an explicit call to s= etAttribute(String name, Object value) on the portlet session object in order to trigger replicati= on by the container. --===============8905593198343406482==-- From portal-commits at lists.jboss.org Sun Oct 14 01:44:05 2007 Content-Type: multipart/mixed; boundary="===============2708501731052801639==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8641 - in docs: trunk/referenceGuide/en/modules and 1 other directory. Date: Sun, 14 Oct 2007 01:44:04 -0400 Message-ID: --===============2708501731052801639== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: chris.laprun(a)jboss.com Date: 2007-10-14 01:44:03 -0400 (Sun, 14 Oct 2007) New Revision: 8641 Modified: docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/security= .xml docs/trunk/referenceGuide/en/modules/security.xml Log: - Fixed typos. Modified: docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/s= ecurity.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/securit= y.xml 2007-10-14 03:23:50 UTC (rev 8640) +++ docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/securit= y.xml 2007-10-14 05:44:03 UTC (rev 8641) @@ -56,7 +56,7 @@ ]]> - The based principle of the security mechanism is that everythi= ng is restricted unless you grant privileges. + The basic principle of the security mechanism is that everythi= ng is restricted unless you grant privileges. You grant privilege on a portal node by adding a security constra= int as explained here: @@ -120,12 +120,12 @@ - = + Securing the Content Management System The JBoss Portal CMS system consists of a directory structure of Fil= es organized unto their respective Folders. Both Files and Folders are - considered to be CMS resources that can be secured based on portal R= oles and/or Users. = + considered to be CMS resources that can be secured based on portal R= oles and/or Users. The following features are supported by the fine grained security s= ystem of Portal CMS: @@ -155,7 +155,7 @@ Permissions Allowed Actions - Implies = + Implies @@ -179,10 +179,11 @@ - CMS Security Configuration - - The configuration for the CMS Security service is specified in the= jboss-portal.sar/portal-cms.sar/META-INF/jboss-service.xml file. The porti= on of - the configuration relevant for securing the CMS service is listed = as follows: + CMS Security Configuration + + The configuration for the CMS Security service is specified = in the + jboss-portal.sar/portal-cms.sar/META-INF/jboss-serv= ice.xml + file. The portion of the configuration relevant for securing= the CMS service is listed as follows: + framework and how it is used. No specific knowledge is expected abou= t JACC although it is a recommended read. The portal permission The org.jboss.portal.security.PortalPermission object is used to describe a permission for the portal. It extends= the java.security.Permission @@ -389,7 +390,7 @@ Making a programmatic security check - Making a security check is an easy thing as it consists in = created a permission of the appropriate type and + Making a security check is an easy thing as it consists in = creating a permission of the appropriate type and make a check against the org.jboss.portal.spi.auth.Port= alAuthorizationManager service. That service is used by the portal to make security checks. It is conn= ected to the different authorization providers in order to take decisions at runtime based on the type of the pe= rmission. Access to that service is done @@ -408,7 +409,7 @@ ... ]]> - It be injected in the servlet context of a war file in the = file WEB-INF/jboss-portlet.xml + It can be injected in the servlet context of a war file in = the file WEB-INF/jboss-portlet.xml Modified: docs/trunk/referenceGuide/en/modules/security.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- docs/trunk/referenceGuide/en/modules/security.xml 2007-10-14 03:23:50 U= TC (rev 8640) +++ docs/trunk/referenceGuide/en/modules/security.xml 2007-10-14 05:44:03 U= TC (rev 8641) @@ -56,7 +56,7 @@ ]]> - The based principle of the security mechanism is that everythi= ng is restricted unless you grant privileges. + The basic principle of the security mechanism is that everythi= ng is restricted unless you grant privileges. You grant privilege on a portal node by adding a security constra= int as explained here: @@ -179,10 +179,11 @@ - CMS Security Configuration - - The configuration for the CMS Security service is specified in the= jboss-portal.sar/portal-cms.sar/META-INF/jboss-service.xml file. The porti= on of - the configuration relevant for securing the CMS service is listed = as follows: + CMS Security Configuration + + The configuration for the CMS Security service is specified = in the + jboss-portal.sar/portal-cms.sar/META-INF/jboss-serv= ice.xml + file. The portion of the configuration relevant for securing= the CMS service is listed as follows: + framework and how it is used. No specific knowledge is expected abou= t JACC although it is a recommended read. The portal permission The org.jboss.portal.security.PortalPermission object is used to describe a permission for the portal. It extends= the java.security.Permission @@ -389,7 +390,7 @@ Making a programmatic security check - Making a security check is an easy thing as it consists in = created a permission of the appropriate type and + Making a security check is an easy thing as it consists in = creating a permission of the appropriate type and make a check against the org.jboss.portal.spi.auth.Port= alAuthorizationManager service. That service is used by the portal to make security checks. It is conn= ected to the different authorization providers in order to take decisions at runtime based on the type of the pe= rmission. Access to that service is done @@ -408,7 +409,7 @@ ... ]]> - It be injected in the servlet context of a war file in the = file WEB-INF/jboss-portlet.xml + It can be injected in the servlet context of a war file in = the file WEB-INF/jboss-portlet.xml --===============2708501731052801639==-- From portal-commits at lists.jboss.org Sun Oct 14 08:06:05 2007 Content-Type: multipart/mixed; boundary="===============9086524665811570784==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8642 - in modules/test/trunk: unit/src/main/org/jboss/test/unit/runner and 13 other directories. Date: Sun, 14 Oct 2007 08:05:59 -0400 Message-ID: --===============9086524665811570784== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: julien(a)jboss.com Date: 2007-10-14 08:05:55 -0400 (Sun, 14 Oct 2007) New Revision: 8642 Added: modules/test/trunk/unit/src/main/org/jboss/unit/driver/impl/composite/ modules/test/trunk/unit/src/main/org/jboss/unit/driver/impl/composite/Co= mpositeTestDriver.java Modified: modules/test/trunk/remote/src/main/org/jboss/unit/remote/driver/RemoteTe= stDriverClient.java modules/test/trunk/remote/src/main/org/jboss/unit/remote/driver/RemoteTe= stDriverServer.java modules/test/trunk/unit/src/main/org/jboss/test/unit/runner/GenericTestR= unnerTests.java modules/test/trunk/unit/src/main/org/jboss/unit/Failure.java modules/test/trunk/unit/src/main/org/jboss/unit/driver/DriverContext.java modules/test/trunk/unit/src/main/org/jboss/unit/driver/impl/pojo/POJOTes= tSuiteDriver.java modules/test/trunk/unit/src/main/org/jboss/unit/driver/impl/pojo/SimpleD= riverContext.java modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/TestRunnerCo= ntextSupport.java modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/driver/TestD= riverRunner.java modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/generic/Gene= ricTestRunner.java modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/pojo/POJOTes= tRunner.java modules/test/trunk/unit/src/main/org/jboss/unit/runner/model/ModelBuilde= r.java modules/test/trunk/unit/src/main/org/jboss/unit/runner/model/TestSuiteDe= f.java modules/test/trunk/unit/src/main/org/jboss/unit/runner/model/generic/Gen= ericTestSuiteDef.java modules/test/trunk/unit/src/resources/jboss-unit-jar/org/jboss/unit/runn= er/model/jboss-unit_1_0.xsd modules/test/trunk/unit/src/resources/test/org/jboss/test/unit/runner/mo= del/f2.xml Log: add support for property definition at generic test suite level Modified: modules/test/trunk/remote/src/main/org/jboss/unit/remote/driver/R= emoteTestDriverClient.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/remote/src/main/org/jboss/unit/remote/driver/RemoteT= estDriverClient.java 2007-10-14 05:44:03 UTC (rev 8641) +++ modules/test/trunk/remote/src/main/org/jboss/unit/remote/driver/RemoteT= estDriverClient.java 2007-10-14 12:05:55 UTC (rev 8642) @@ -143,7 +143,7 @@ catch (Throwable throwable) { throwable.printStackTrace(); - failed =3D new FailureResponse(Failure.createErrorFailure("Could = not startup kernel", throwable)); + failed =3D new FailureResponse(Failure.createFailure("Could not s= tartup kernel", throwable)); return; } = @@ -158,7 +158,7 @@ catch (Throwable throwable) { throwable.printStackTrace(); - failed =3D new FailureResponse(Failure.createErrorFailure("Could = not deploy beans", throwable)); + failed =3D new FailureResponse(Failure.createFailure("Could not d= eploy beans", throwable)); } } = @@ -205,7 +205,7 @@ } catch (Exception e) { - return new FailureResponse(Failure.createErrorFailure(e)); + return new FailureResponse(Failure.createFailure(e)); } } else Modified: modules/test/trunk/remote/src/main/org/jboss/unit/remote/driver/R= emoteTestDriverServer.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/remote/src/main/org/jboss/unit/remote/driver/RemoteT= estDriverServer.java 2007-10-14 05:44:03 UTC (rev 8641) +++ modules/test/trunk/remote/src/main/org/jboss/unit/remote/driver/RemoteT= estDriverServer.java 2007-10-14 12:05:55 UTC (rev 8642) @@ -23,42 +23,33 @@ package org.jboss.unit.remote.driver; = import org.jboss.unit.TestId; -import org.jboss.unit.Failure; -import org.jboss.unit.driver.DriverResponse; -import org.jboss.unit.driver.DriverCommand; import org.jboss.unit.driver.TestDriver; -import org.jboss.unit.driver.AbstractTestDriver; -import org.jboss.unit.driver.response.FailureResponse; -import org.jboss.unit.info.TestInfo; -import org.jboss.unit.info.impl.SimpleTestSuiteInfo; +import org.jboss.unit.driver.impl.composite.CompositeTestDriver; import org.jboss.unit.remote.RequestContext; import org.jboss.unit.remote.ResponseContext; = -import java.util.Map; -import java.util.HashMap; - /** * @author Julien Viet * @version $Revision: 5636 $ */ -public class RemoteTestDriverServer extends AbstractTestDriver implements = RemoteTestDriver +public class RemoteTestDriverServer extends CompositeTestDriver implements= RemoteTestDriver { = - /** . */ - private SimpleTestSuiteInfo info =3D new SimpleTestSuiteInfo("Main"); - - /** . */ - private Map drivers =3D new HashMap(); - public void pushContext(TestId testId, RequestContext requestContext) { String name =3D testId.getName(0); = // - RemoteTestDriver driver =3D drivers.get(name); + TestDriver driver =3D drivers.get(name); = // - driver.pushContext(testId.range(1), requestContext); + if (driver instanceof RemoteTestDriver) + { + RemoteTestDriver remoteDriver =3D (RemoteTestDriver)driver; + + // + remoteDriver.pushContext(testId.range(1), requestContext); + } } = public ResponseContext popContext(TestId testId) @@ -66,67 +57,24 @@ String name =3D testId.getName(0); = // - RemoteTestDriver driver =3D drivers.get(name); - - // - return driver.popContext(testId.range(1)); - } - - public TestInfo getInfo() - { - return info; - } - - public DriverResponse invoke(TestId id, DriverCommand command) - { - if (id.getLength() =3D=3D 0) - { - return new FailureResponse(Failure.createErrorFailure("No null te= st id accepted")); - } - - // - String name =3D id.getName(0); - - // TestDriver driver =3D drivers.get(name); = // - if (driver =3D=3D null) - { - return new FailureResponse(Failure.createErrorFailure("No test dr= iver found for name " + name)); - } - // - TestId driverId =3D id.range(1); - - // - return driver.invoke(driverId, command); - } - - public void mount(RemoteTestDriver driver) - { - synchronized(RemoteTestDriverServer.class) + if (driver instanceof RemoteTestDriver) { - info.addTest(driver.getInfo()); + RemoteTestDriver remoteDriver =3D (RemoteTestDriver)driver; = - String name =3D driver.getInfo().getName(); - - drivers.put(name, driver); + // + return remoteDriver.popContext(testId.range(1)); } - } - - public synchronized void unmount(RemoteTestDriver driver) - { - synchronized(RemoteTestDriverServer.class) + else { - String name =3D driver.getInfo().getName(); - - drivers.remove(name); - - info.removeTest(name); + return null; } } = + // /** . */ // private String initialPath =3D "/test"; // Modified: modules/test/trunk/unit/src/main/org/jboss/test/unit/runner/Gener= icTestRunnerTests.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/test/unit/runner/GenericTest= RunnerTests.java 2007-10-14 05:44:03 UTC (rev 8641) +++ modules/test/trunk/unit/src/main/org/jboss/test/unit/runner/GenericTest= RunnerTests.java 2007-10-14 12:05:55 UTC (rev 8642) @@ -32,7 +32,8 @@ import org.jboss.unit.runner.results.TestSuccess; import org.jboss.unit.driver.DriverResponse; import org.jboss.unit.driver.DriverCommand; -import org.jboss.unit.driver.AbstractTestDriver; +import org.jboss.unit.driver.DriverContext; +import org.jboss.unit.driver.TestDriver; import org.jboss.unit.driver.command.StartTestCommand; import org.jboss.unit.driver.response.EndTestResponse; import org.jboss.unit.info.TestInfo; @@ -64,15 +65,67 @@ testTwoTestCases2(); testParametrization(); testParametrizationOverride(); + testProperties1(); + testProperties2(); + testProperties3(); } = + private static void testProperties1() + { + Driver1.init(); + SimpleTestCaseInfo fooInfo =3D new SimpleTestCaseInfo("foo"); + Driver1.testSuiteInfo.addTest(fooInfo); + GenericTestSuiteDef suite =3D new GenericTestSuiteDef("generic", Dri= ver1.class.getName()); + suite.setProperty("foo_def", "foo_def_value"); + GenericTestRunner runner =3D new GenericTestRunner(suite); + runner.run(new TestRunnerContextSupport()); + Map expectedProperties =3D new HashMap(); + expectedProperties.put("foo_def", "foo_def_value"); + assertEquals(expectedProperties, Driver1.properties); + } + + private static void testProperties2() + { + Driver1.init(); + SimpleTestCaseInfo fooInfo =3D new SimpleTestCaseInfo("foo"); + Driver1.testSuiteInfo.addTest(fooInfo); + GenericTestSuiteDef suite =3D new GenericTestSuiteDef("generic", Dri= ver1.class.getName()); + GenericTestRunner runner =3D new GenericTestRunner(suite); + Map properties =3D new HashMap(); + properties.put("foo_runner", "foo_runner_value"); + runner.run(new TestRunnerContextSupport(properties)); + Map expectedProperties =3D new HashMap(); + expectedProperties.put("foo_runner", "foo_runner_value"); + assertEquals(expectedProperties, Driver1.properties); + } + + private static void testProperties3() + { + Driver1.init(); + SimpleTestCaseInfo fooInfo =3D new SimpleTestCaseInfo("foo"); + Driver1.testSuiteInfo.addTest(fooInfo); + GenericTestSuiteDef suite =3D new GenericTestSuiteDef("generic", Dri= ver1.class.getName()); + suite.setProperty("foo_def", "foo_def_value"); + suite.setProperty("bar", "bar_def_value"); + GenericTestRunner runner =3D new GenericTestRunner(suite); + Map properties =3D new HashMap(); + properties.put("foo_runner", "foo_runner_value"); + properties.put("bar", "bar_runner_value"); + runner.run(new TestRunnerContextSupport(properties)); + Map expectedProperties =3D new HashMap(); + expectedProperties.put("foo_def", "foo_def_value"); + expectedProperties.put("foo_runner", "foo_runner_value"); + expectedProperties.put("bar", "bar_runner_value"); + assertEquals(expectedProperties, Driver1.properties); + } + private static void testParametrization() { Driver1.init(); SimpleTestCaseInfo fooInfo =3D new SimpleTestCaseInfo("foo"); fooInfo.addParameter(new SimpleParameterInfo("abc")); Driver1.testSuiteInfo.addTest(fooInfo); - GenericTestSuiteDef suite =3D new GenericTestSuiteDef(Driver1.class.= getName()); + GenericTestSuiteDef suite =3D new GenericTestSuiteDef("generic", Dri= ver1.class.getName()); TestDef foo =3D new TestDef(new TestId("foo")); suite.addTest(foo); ParametersDef fooParameters =3D new ParametersDef(); @@ -102,7 +155,7 @@ SimpleTestCaseInfo fooInfo =3D new SimpleTestCaseInfo("foo"); fooInfo.addParameter(new SimpleParameterInfo("abc")); Driver1.testSuiteInfo.addTest(fooInfo); - GenericTestSuiteDef suite =3D new GenericTestSuiteDef(Driver1.class.= getName()); + GenericTestSuiteDef suite =3D new GenericTestSuiteDef("generic", Dri= ver1.class.getName()); TestDef foo =3D new TestDef(new TestId("foo")); suite.addTest(foo); ParametersDef fooParameters =3D new ParametersDef(); @@ -127,7 +180,7 @@ private static void testNoTestCase() { Driver1.init(); - GenericTestSuiteDef suite =3D new GenericTestSuiteDef(Driver1.class.= getName()); + GenericTestSuiteDef suite =3D new GenericTestSuiteDef("generic", Dri= ver1.class.getName()); EventList events =3D new EventList(); GenericTestRunner runner =3D new GenericTestRunner(suite); runner.run(new TestRunnerContextSupport(events)); @@ -142,7 +195,7 @@ { Driver1.init(); Driver1.testSuiteInfo.addTest(new SimpleTestCaseInfo("foo")); - GenericTestSuiteDef suite =3D new GenericTestSuiteDef(Driver1.class.= getName()); + GenericTestSuiteDef suite =3D new GenericTestSuiteDef("generic", Dri= ver1.class.getName()); suite.addTest(new TestDef(new TestId("foo"))); EventList events =3D new EventList(); GenericTestRunner runner =3D new GenericTestRunner(suite); @@ -161,7 +214,7 @@ Driver1.init(); Driver1.testSuiteInfo.addTest(new SimpleTestCaseInfo("foo")); Driver1.testSuiteInfo.addTest(new SimpleTestCaseInfo("bar")); - GenericTestSuiteDef suite =3D new GenericTestSuiteDef(Driver1.class.= getName()); + GenericTestSuiteDef suite =3D new GenericTestSuiteDef("generic", Dri= ver1.class.getName()); suite.addTest(new TestDef(new TestId("foo"))); EventList events =3D new EventList(); GenericTestRunner runner =3D new GenericTestRunner(suite); @@ -180,7 +233,7 @@ Driver1.init(); Driver1.testSuiteInfo.addTest(new SimpleTestCaseInfo("foo")); Driver1.testSuiteInfo.addTest(new SimpleTestCaseInfo("bar")); - GenericTestSuiteDef suite =3D new GenericTestSuiteDef(Driver1.class.= getName()); + GenericTestSuiteDef suite =3D new GenericTestSuiteDef("generic", Dri= ver1.class.getName()); EventList events =3D new EventList(); GenericTestRunner runner =3D new GenericTestRunner(suite); runner.run(new TestRunnerContextSupport(events)); @@ -195,20 +248,35 @@ assertEquals(list(new HashMap(), new HashMap()), Driver1.parametriza= tions); } = - public static class Driver1 extends AbstractTestDriver + public static class Driver1 implements TestDriver { = static SimpleTestSuiteInfo testSuiteInfo; static List ids; static List> parametrizations; + static Map properties; = static void init() { testSuiteInfo =3D new SimpleTestSuiteInfo("foo"); ids =3D new ArrayList(); parametrizations =3D new ArrayList>(); + properties =3D new HashMap(); } = + public void initDriver(DriverContext context) + { + for (String name : context.getPropertyNames()) + { + properties.put(name, context.getProperty(name)); + } + } + + public void destroyDriver() + { + + } + public TestInfo getInfo() { return testSuiteInfo; Modified: modules/test/trunk/unit/src/main/org/jboss/unit/Failure.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/Failure.java 2007-10-14= 05:44:03 UTC (rev 8641) +++ modules/test/trunk/unit/src/main/org/jboss/unit/Failure.java 2007-10-14= 12:05:55 UTC (rev 8642) @@ -76,24 +76,48 @@ return type; } = + public static Failure createFailure(Throwable cause) + { + if (cause instanceof AssertionError) + { + return new Failure(cause, FailureType.ASSERTION); + } + else + { + return new Failure(cause, FailureType.ERROR); + } + } + + public static Failure createFailure(String message, Throwable cause) + { + if (cause instanceof AssertionError) + { + return new Failure(message, cause, FailureType.ASSERTION); + } + else + { + return new Failure(message, cause, FailureType.ERROR); + } + } + public static Failure createErrorFailure(String message) { return new Failure(message, FailureType.ERROR); } = - public static Failure createErrorFailure(String message, Throwable thro= wable) + public static Failure createErrorFailure(String message, Throwable caus= e) { - return new Failure(message, throwable, FailureType.ERROR); + return new Failure(message, cause, FailureType.ERROR); } = - public static Failure createErrorFailure(Throwable throwable) + public static Failure createErrorFailure(Throwable cause) { - return new Failure(throwable, FailureType.ERROR); + return new Failure(cause, FailureType.ERROR); } = - public static Failure createAssertionFailure(AssertionError throwable) + public static Failure createAssertionFailure(Throwable cause) { - return new Failure(throwable, FailureType.ASSERTION); + return new Failure(cause, FailureType.ASSERTION); } = public static Failure createAssertionFailure(String message) Modified: modules/test/trunk/unit/src/main/org/jboss/unit/driver/DriverCont= ext.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/driver/DriverContext.ja= va 2007-10-14 05:44:03 UTC (rev 8641) +++ modules/test/trunk/unit/src/main/org/jboss/unit/driver/DriverContext.ja= va 2007-10-14 12:05:55 UTC (rev 8642) @@ -22,6 +22,8 @@ *************************************************************************= *****/ package org.jboss.unit.driver; = +import java.util.Set; + /** * The context in which a driver is placed. * @@ -32,10 +34,17 @@ { = /** - * Return a property of the context. + * Returns the set of names available properties. + * + * @return the set of property names + */ + Set getPropertyNames(); + + /** + * Return a property of the context or null if it does not exist. * = - * @param name - * @return + * @param name the property name + * @return the property value */ String getProperty(String name); = Added: modules/test/trunk/unit/src/main/org/jboss/unit/driver/impl/composit= e/CompositeTestDriver.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/driver/impl/composite/C= ompositeTestDriver.java (rev 0) +++ modules/test/trunk/unit/src/main/org/jboss/unit/driver/impl/composite/C= ompositeTestDriver.java 2007-10-14 12:05:55 UTC (rev 8642) @@ -0,0 +1,115 @@ +/*************************************************************************= ***** + * JBoss, a division of Red Hat = * + * Copyright 2006, Red Hat Middleware, LLC, and individual = * + * contributors as indicated by the @authors tag. See the = * + * copyright.txt in the distribution for a full listing of = * + * individual contributors. = * + * = * + * This is free software; you can redistribute it and/or modify it = * + * under the terms of the GNU Lesser General Public License as = * + * published by the Free Software Foundation; either version 2.1 of = * + * the License, or (at your option) any later version. = * + * = * + * This software is distributed in the hope that it will be useful, = * + * but WITHOUT ANY WARRANTY; without even the implied warranty of = * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU = * + * Lesser General Public License for more details. = * + * = * + * You should have received a copy of the GNU Lesser General Public = * + * License along with this software; if not, write to the Free = * + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA = * + * 02110-1301 USA, or see the FSF site: http://www.fsf.org. = * + *************************************************************************= *****/ +package org.jboss.unit.driver.impl.composite; + +import org.jboss.unit.driver.TestDriver; +import org.jboss.unit.driver.DriverResponse; +import org.jboss.unit.driver.DriverCommand; +import org.jboss.unit.driver.AbstractTestDriver; +import org.jboss.unit.driver.response.FailureResponse; +import org.jboss.unit.info.impl.SimpleTestSuiteInfo; +import org.jboss.unit.info.TestInfo; +import org.jboss.unit.TestId; +import org.jboss.unit.Failure; + +import java.util.Map; +import java.util.HashMap; + +/** + * @author Julien Viet + * @version $Revision: 1.1 $ + */ +public class CompositeTestDriver extends AbstractTestDriver +{ + + /** . */ + private final SimpleTestSuiteInfo info =3D new SimpleTestSuiteInfo("Mai= n"); + + /** . */ + protected final Map drivers =3D new HashMap(); + + public TestInfo getInfo() + { + return info; + } + + public DriverResponse invoke(TestId id, DriverCommand command) + { + if (id.getLength() =3D=3D 0) + { + return new FailureResponse(Failure.createErrorFailure("No null te= st id accepted")); + } + + // + String name =3D id.getName(0); + + // + TestDriver driver =3D drivers.get(name); + + // + if (driver =3D=3D null) + { + return new FailureResponse(Failure.createErrorFailure("No test dr= iver found for name " + name)); + } + + // + TestId driverId =3D id.range(1); + + // + return driver.invoke(driverId, command); + } + + public void mount(TestDriver driver) + { + synchronized(TestDriver.class) + { + driver.initDriver(getContext()); + + // + info.addTest(driver.getInfo()); + + // + String name =3D driver.getInfo().getName(); + + // + drivers.put(name, driver); + } + } + + public synchronized void unmount(TestDriver driver) + { + synchronized(TestDriver.class) + { + String name =3D driver.getInfo().getName(); + + // + drivers.remove(name); + + // + info.removeTest(name); + + // + driver.destroyDriver(); + } + } +} Modified: modules/test/trunk/unit/src/main/org/jboss/unit/driver/impl/pojo/= POJOTestSuiteDriver.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/driver/impl/pojo/POJOTe= stSuiteDriver.java 2007-10-14 05:44:03 UTC (rev 8641) +++ modules/test/trunk/unit/src/main/org/jboss/unit/driver/impl/pojo/POJOTe= stSuiteDriver.java 2007-10-14 12:05:55 UTC (rev 8642) @@ -28,7 +28,6 @@ import org.jboss.unit.spi.pojo.TestLifeCycle; import org.jboss.unit.spi.pojo.TestCase; import org.jboss.unit.spi.pojo.annotations.Provider; -import org.jboss.unit.driver.TestDriver; import org.jboss.unit.driver.DriverResponse; import org.jboss.unit.driver.DriverCommand; import org.jboss.unit.driver.AbstractTestDriver; @@ -192,13 +191,6 @@ } = // - if (t instanceof AssertionError) - { - return new FailureResponse(Failure.createAssertionFailure((Assert= ionError)t)); - } - else - { - return new FailureResponse(Failure.createErrorFailure(t)); - } + return new FailureResponse(Failure.createFailure(t)); } } Modified: modules/test/trunk/unit/src/main/org/jboss/unit/driver/impl/pojo/= SimpleDriverContext.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/driver/impl/pojo/Simple= DriverContext.java 2007-10-14 05:44:03 UTC (rev 8641) +++ modules/test/trunk/unit/src/main/org/jboss/unit/driver/impl/pojo/Simple= DriverContext.java 2007-10-14 12:05:55 UTC (rev 8642) @@ -26,6 +26,8 @@ = import java.util.Map; import java.util.HashMap; +import java.util.Set; +import java.util.Collections; = /** * @author Julien Viet @@ -43,7 +45,7 @@ { throw new IllegalArgumentException("No null property name accepte= d"); } - this.properties =3D properties; + this.properties =3D Collections.unmodifiableMap(properties); } = public SimpleDriverContext() @@ -51,6 +53,11 @@ this(new HashMap()); } = + public Set getPropertyNames() + { + return properties.keySet(); + } + public String getProperty(String name) { if (name =3D=3D null) Modified: modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/TestR= unnerContextSupport.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/TestRunnerC= ontextSupport.java 2007-10-14 05:44:03 UTC (rev 8641) +++ modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/TestRunnerC= ontextSupport.java 2007-10-14 12:05:55 UTC (rev 8642) @@ -60,6 +60,11 @@ this(new HashMap(), parametrizations, NullFilter.get= Instance(), new TestRunnerEventBroadcaster()); } = + public TestRunnerContextSupport(Map properties) + { + this(properties, new ParametrizationSet(), NullFilter.getInstance(),= new TestRunnerEventBroadcaster()); + } + public TestRunnerContextSupport(ParametrizationSet parametrizations, Te= stRunnerEventListener eventListener) { this(new HashMap(), parametrizations, NullFilter.get= Instance(), eventListener); Modified: modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/drive= r/TestDriverRunner.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/driver/Test= DriverRunner.java 2007-10-14 05:44:03 UTC (rev 8641) +++ modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/driver/Test= DriverRunner.java 2007-10-14 12:05:55 UTC (rev 8642) @@ -104,7 +104,7 @@ } catch (Exception e) { - context.getEventListener().onEvent(new RunnerFailureEvent(Fail= ure.createErrorFailure("Was not able to start the test driver properly", e)= )); + context.getEventListener().onEvent(new RunnerFailureEvent(Fail= ure.createFailure("Was not able to start the test driver properly", e))); return; } = Modified: modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/gener= ic/GenericTestRunner.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/generic/Gen= ericTestRunner.java 2007-10-14 05:44:03 UTC (rev 8641) +++ modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/generic/Gen= ericTestRunner.java 2007-10-14 12:05:55 UTC (rev 8642) @@ -37,6 +37,8 @@ = import java.util.Collection; import java.util.Collections; +import java.util.Map; +import java.util.HashMap; = /** * @author Julien Viet @@ -75,6 +77,10 @@ testDefs =3D Collections.singleton(new TestDef(new TestId())); } = + // Compute properties + Map properties =3D new HashMap(de= f.getProperties()); + properties.putAll(context.getProperties()); + for (TestDef testDef : testDefs) { // Create parametrization @@ -83,7 +89,7 @@ parametrizations.combine(context.getParametrizations()); = // - TestRunnerContextSupport genericContext =3D new TestRunnerCont= extSupport(context.getProperties(), parametrizations, context.getFilter(), = filter); + TestRunnerContextSupport genericContext =3D new TestRunnerCont= extSupport(properties, parametrizations, context.getFilter(), filter); = // TestDriverRunner runner =3D new TestDriverRunner(driver, testD= ef.getRefId()); @@ -94,7 +100,7 @@ } catch (Exception e) { - context.getEventListener().onEvent(new RunnerFailureEvent(Failure= .createErrorFailure("Cannot execute test class " + className,e))); + context.getEventListener().onEvent(new RunnerFailureEvent(Failure= .createFailure("Cannot execute test class " + className,e))); } } } Modified: modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/pojo/= POJOTestRunner.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/pojo/POJOTe= stRunner.java 2007-10-14 05:44:03 UTC (rev 8641) +++ modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/pojo/POJOTe= stRunner.java 2007-10-14 12:05:55 UTC (rev 8642) @@ -40,6 +40,8 @@ = import java.util.List; import java.util.ArrayList; +import java.util.Map; +import java.util.HashMap; = /** * @author Julien Viet @@ -49,16 +51,16 @@ { = /** . */ - private final POJOTestSuiteDef suite; + private final POJOTestSuiteDef def; = public POJOTestRunner(POJOTestSuiteDef suiteDef) { - this.suite =3D suiteDef; + this.def =3D suiteDef; } = protected void internalRun(TestRunnerContext context) { - for (TestClassDef testClass : suite.getTestClasses()) + for (TestClassDef testClass : def.getTestClasses()) { String className =3D testClass.getName(); = @@ -86,12 +88,16 @@ } = // Create parametrization - ParametrizationSet parametrizations =3D suite.getParameters().= getParametrization().clone(); + ParametrizationSet parametrizations =3D def.getParameters().ge= tParametrization().clone(); parametrizations.combine(testClass.getParameters().getParametr= ization()); parametrizations.combine(context.getParametrizations()); = + // Compute properties + Map properties =3D new HashMap= (def.getProperties()); + properties.putAll(context.getProperties()); + // - TestRunnerContextSupport pojoContext =3D new TestRunnerContext= Support(context.getProperties(), parametrizations, context.getFilter(), fil= ter); + TestRunnerContextSupport pojoContext =3D new TestRunnerContext= Support(properties, parametrizations, context.getFilter(), filter); = // TestDriverRunner runner =3D new TestDriverRunner(driver); @@ -106,7 +112,7 @@ } catch (Exception e) { - context.getEventListener().onEvent(new RunnerFailureEvent(Fail= ure.createErrorFailure("Cannot execute test class " + className,e))); + context.getEventListener().onEvent(new RunnerFailureEvent(Fail= ure.createFailure("Cannot execute test class " + className,e))); } } } Modified: modules/test/trunk/unit/src/main/org/jboss/unit/runner/model/Mode= lBuilder.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/runner/model/ModelBuild= er.java 2007-10-14 05:44:03 UTC (rev 8641) +++ modules/test/trunk/unit/src/main/org/jboss/unit/runner/model/ModelBuild= er.java 2007-10-14 12:05:55 UTC (rev 8642) @@ -50,6 +50,8 @@ import javax.xml.transform.stream.StreamSource; import java.util.List; import java.util.ArrayList; +import java.util.Map; +import java.util.HashMap; import java.io.IOException; import java.io.InputStream; = @@ -162,17 +164,23 @@ } = // - Attr attr =3D classElt.getAttributeNode("name"); - if (attr =3D=3D null) + Attr nameAttrOfClassElt =3D classElt.getAttributeNode("name"); + if (nameAttrOfClassElt =3D=3D null) { throw new IllegalArgumentException(); } = // - String className =3D attr.getValue(); - GenericTestSuiteDef suite =3D new GenericTestSuiteDef(className); + Attr nameAttr =3D suiteElt.getAttributeNode("name"); + if (nameAttr =3D=3D null) + { + throw new IllegalArgumentException(); + } = // + GenericTestSuiteDef suite =3D new GenericTestSuiteDef(nameAttr.getVa= lue(), nameAttrOfClassElt.getValue()); + + // for (Element testElt : children(suiteElt, "test")) { Attr refidAttr =3D testElt.getAttributeNode("refid"); @@ -198,6 +206,9 @@ } = // + suite.setProperties(buildProperties(suiteElt)); + + // suite.setParameters(buildParameters(suiteElt)); = // @@ -246,6 +257,9 @@ } = // + suite.setProperties(buildProperties(suiteElt)); + + // suite.setParameters(buildParameters(suiteElt)); = // @@ -256,6 +270,18 @@ private static final int ELEMENT_SOURCE =3D 1; private static final int ATTRIBUTE_SOURCE =3D 2; = + private Map buildProperties(Element propertyEltContaine= r) + { + Map properties =3D new HashMap(); + for (Element propertyElt : children(propertyEltContainer, "property"= )) + { + String propertyName =3D propertyElt.getAttribute("name"); + String propertyValue =3D propertyElt.getAttribute("value"); + properties.put(propertyName, propertyValue); + } + return properties; + } + private ParametersDef buildParameters(Element parameterEltContainer) { ParametersDef parameters =3D new ParametersDef(); Modified: modules/test/trunk/unit/src/main/org/jboss/unit/runner/model/Test= SuiteDef.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/runner/model/TestSuiteD= ef.java 2007-10-14 05:44:03 UTC (rev 8641) +++ modules/test/trunk/unit/src/main/org/jboss/unit/runner/model/TestSuiteD= ef.java 2007-10-14 12:05:55 UTC (rev 8642) @@ -27,6 +27,8 @@ import java.util.List; import java.util.ArrayList; import java.util.Collection; +import java.util.Map; +import java.util.HashMap; = /** * @author Julien Viet @@ -38,6 +40,9 @@ /** . */ protected ParametersDef parameters =3D new ParametersDef(); = + /** . */ + protected Map properties =3D new HashMap(); + public ParametersDef getParameters() { return parameters; @@ -48,6 +53,32 @@ this.parameters =3D parameters; } = + public Map getProperties() + { + return properties; + } + + public void setProperties(Map properties) + { + this.properties =3D properties; + } + + public void setProperty(String name, String value) + { + if (name =3D=3D null) + { + throw new IllegalArgumentException(); + } + if (value =3D=3D null) + { + properties.remove(name); + } + else + { + properties.put(name, value); + } + } + public abstract TestRunner createRunner() throws BuilderException; = } Modified: modules/test/trunk/unit/src/main/org/jboss/unit/runner/model/gene= ric/GenericTestSuiteDef.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/runner/model/generic/Ge= nericTestSuiteDef.java 2007-10-14 05:44:03 UTC (rev 8641) +++ modules/test/trunk/unit/src/main/org/jboss/unit/runner/model/generic/Ge= nericTestSuiteDef.java 2007-10-14 12:05:55 UTC (rev 8642) @@ -24,7 +24,6 @@ = import org.jboss.unit.runner.model.TestSuiteDef; import org.jboss.unit.runner.model.BuilderException; -import org.jboss.unit.runner.model.generic.TestDef; import org.jboss.unit.runner.TestRunner; import org.jboss.unit.runner.impl.generic.GenericTestRunner; = @@ -39,16 +38,25 @@ { = /** The tests. */ - private List tests =3D new ArrayList(); + private final List tests =3D new ArrayList(); = /** . */ - private String className; + private final String name; = - public GenericTestSuiteDef(String className) + /** . */ + private final String className; + + public GenericTestSuiteDef(String name, String className) { + this.name =3D name; this.className =3D className; } = + public String getName() + { + return name; + } + public String getClassName() { return className; Modified: modules/test/trunk/unit/src/resources/jboss-unit-jar/org/jboss/un= it/runner/model/jboss-unit_1_0.xsd =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/resources/jboss-unit-jar/org/jboss/unit/run= ner/model/jboss-unit_1_0.xsd 2007-10-14 05:44:03 UTC (rev 8641) +++ modules/test/trunk/unit/src/resources/jboss-unit-jar/org/jboss/unit/run= ner/model/jboss-unit_1_0.xsd 2007-10-14 12:05:55 UTC (rev 8642) @@ -35,20 +35,10 @@ a set of test definitions and a set of tests to execute. - = - - Defines a pojo test with a mandat= ory id attribute. The id attribute is used by - test elements which can refer to it. - - - - - - Defines a tested class. A tested = class can contain any number of case. If the class element contains no case then all test cases returne= d by the class meta data will be executed. The @@ -71,6 +61,7 @@ the test configuration, they override any existing parameter defi= ned at the pojo level. + @@ -84,9 +75,11 @@ + + = @@ -112,4 +105,10 @@ = + + A property element. + + + + Modified: modules/test/trunk/unit/src/resources/test/org/jboss/test/unit/ru= nner/model/f2.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/resources/test/org/jboss/test/unit/runner/m= odel/f2.xml 2007-10-14 05:44:03 UTC (rev 8641) +++ modules/test/trunk/unit/src/resources/test/org/jboss/test/unit/runner/m= odel/f2.xml 2007-10-14 12:05:55 UTC (rev 8642) @@ -3,7 +3,7 @@ xmlns=3D"urn:jboss:jboss-unit:1.0" xmlns:xsi=3D"http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation=3D"urn:jboss:jboss-unit:1.0 jboss-unit_1_0.xsd"> - + --===============9086524665811570784==-- From portal-commits at lists.jboss.org Mon Oct 15 04:42:58 2007 Content-Type: multipart/mixed; boundary="===============7384878183152538523==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8643 - modules/common/tags. Date: Mon, 15 Oct 2007 04:42:58 -0400 Message-ID: --===============7384878183152538523== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: thomas.heute(a)jboss.com Date: 2007-10-15 04:42:58 -0400 (Mon, 15 Oct 2007) New Revision: 8643 Added: modules/common/tags/JBP_Common_1_0_0/ Removed: modules/common/tags/1_0_0/ Log: Renaming modules tags Copied: modules/common/tags/JBP_Common_1_0_0 (from rev 8642, modules/common= /tags/1_0_0) --===============7384878183152538523==-- From portal-commits at lists.jboss.org Mon Oct 15 04:45:04 2007 Content-Type: multipart/mixed; boundary="===============1383475773875407500==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8644 - modules/identity/tags. Date: Mon, 15 Oct 2007 04:45:04 -0400 Message-ID: --===============1383475773875407500== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: thomas.heute(a)jboss.com Date: 2007-10-15 04:45:03 -0400 (Mon, 15 Oct 2007) New Revision: 8644 Added: modules/identity/tags/JBP_Identity_1_0_0/ Removed: modules/identity/tags/1_0_0/ Log: Renaming module tags Copied: modules/identity/tags/JBP_Identity_1_0_0 (from rev 8643, modules/id= entity/tags/1_0_0) --===============1383475773875407500==-- From portal-commits at lists.jboss.org Mon Oct 15 04:45:39 2007 Content-Type: multipart/mixed; boundary="===============4903842731359985556==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8645 - modules/portlet/tags. Date: Mon, 15 Oct 2007 04:45:38 -0400 Message-ID: --===============4903842731359985556== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: thomas.heute(a)jboss.com Date: 2007-10-15 04:45:38 -0400 (Mon, 15 Oct 2007) New Revision: 8645 Added: modules/portlet/tags/JBP_Portlet_1_0_0/ Removed: modules/portlet/tags/1_0_0/ Log: Renaming module tags Copied: modules/portlet/tags/JBP_Portlet_1_0_0 (from rev 8644, modules/port= let/tags/1_0_0) --===============4903842731359985556==-- From portal-commits at lists.jboss.org Mon Oct 15 04:46:00 2007 Content-Type: multipart/mixed; boundary="===============5497246863703267425==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8646 - modules/test/tags. Date: Mon, 15 Oct 2007 04:46:00 -0400 Message-ID: --===============5497246863703267425== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: thomas.heute(a)jboss.com Date: 2007-10-15 04:46:00 -0400 (Mon, 15 Oct 2007) New Revision: 8646 Added: modules/test/tags/JBP_Test_1_0_0/ Removed: modules/test/tags/1_0_0/ Log: Renaming module tags Copied: modules/test/tags/JBP_Test_1_0_0 (from rev 8645, modules/test/tags/= 1_0_0) --===============5497246863703267425==-- From portal-commits at lists.jboss.org Mon Oct 15 04:46:34 2007 Content-Type: multipart/mixed; boundary="===============6941652627066349667==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8647 - modules/web/tags. Date: Mon, 15 Oct 2007 04:46:34 -0400 Message-ID: --===============6941652627066349667== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: thomas.heute(a)jboss.com Date: 2007-10-15 04:46:34 -0400 (Mon, 15 Oct 2007) New Revision: 8647 Added: modules/web/tags/JBP_Web_1_0_0/ Removed: modules/web/tags/1_0_0/ Log: Renaming module tags Copied: modules/web/tags/JBP_Web_1_0_0 (from rev 8646, modules/web/tags/1_0= _0) --===============6941652627066349667==-- From portal-commits at lists.jboss.org Mon Oct 15 04:56:47 2007 Content-Type: multipart/mixed; boundary="===============8632645888252980942==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8648 - modules/common/tags. Date: Mon, 15 Oct 2007 04:56:46 -0400 Message-ID: --===============8632645888252980942== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: thomas.heute(a)jboss.com Date: 2007-10-15 04:56:45 -0400 (Mon, 15 Oct 2007) New Revision: 8648 Added: modules/common/tags/JBP_COMMON__1_0_0/ Removed: modules/common/tags/JBP_Common_1_0_0/ Log: Renaming again Copied: modules/common/tags/JBP_COMMON__1_0_0 (from rev 8647, modules/commo= n/tags/JBP_Common_1_0_0) --===============8632645888252980942==-- From portal-commits at lists.jboss.org Mon Oct 15 04:57:18 2007 Content-Type: multipart/mixed; boundary="===============5169818236555181619==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8649 - modules/identity/tags. Date: Mon, 15 Oct 2007 04:57:18 -0400 Message-ID: --===============5169818236555181619== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: thomas.heute(a)jboss.com Date: 2007-10-15 04:57:18 -0400 (Mon, 15 Oct 2007) New Revision: 8649 Added: modules/identity/tags/JBP_IDENTITY__1_0_0/ Removed: modules/identity/tags/JBP_Identity_1_0_0/ Log: Renaming again Copied: modules/identity/tags/JBP_IDENTITY__1_0_0 (from rev 8648, modules/i= dentity/tags/JBP_Identity_1_0_0) --===============5169818236555181619==-- From portal-commits at lists.jboss.org Mon Oct 15 04:57:54 2007 Content-Type: multipart/mixed; boundary="===============1673178632641373763==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8650 - modules/common/tags. Date: Mon, 15 Oct 2007 04:57:54 -0400 Message-ID: --===============1673178632641373763== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: thomas.heute(a)jboss.com Date: 2007-10-15 04:57:54 -0400 (Mon, 15 Oct 2007) New Revision: 8650 Added: modules/common/tags/JBP_COMMON_1_0_0/ Removed: modules/common/tags/JBP_COMMON__1_0_0/ Log: oups Copied: modules/common/tags/JBP_COMMON_1_0_0 (from rev 8649, modules/common= /tags/JBP_COMMON__1_0_0) --===============1673178632641373763==-- From portal-commits at lists.jboss.org Mon Oct 15 04:59:42 2007 Content-Type: multipart/mixed; boundary="===============3237262748015225315==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8651 - modules/identity/tags. Date: Mon, 15 Oct 2007 04:59:42 -0400 Message-ID: --===============3237262748015225315== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: thomas.heute(a)jboss.com Date: 2007-10-15 04:59:42 -0400 (Mon, 15 Oct 2007) New Revision: 8651 Added: modules/identity/tags/JBP_IDENTITY_1_0_0/ Removed: modules/identity/tags/JBP_IDENTITY__1_0_0/ Log: oups Copied: modules/identity/tags/JBP_IDENTITY_1_0_0 (from rev 8650, modules/id= entity/tags/JBP_IDENTITY__1_0_0) --===============3237262748015225315==-- From portal-commits at lists.jboss.org Mon Oct 15 05:00:50 2007 Content-Type: multipart/mixed; boundary="===============4916681263378620808==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8652 - modules/portlet/tags. Date: Mon, 15 Oct 2007 05:00:49 -0400 Message-ID: --===============4916681263378620808== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: thomas.heute(a)jboss.com Date: 2007-10-15 05:00:49 -0400 (Mon, 15 Oct 2007) New Revision: 8652 Added: modules/portlet/tags/JBP_PORTLET_1_0_0/ Removed: modules/portlet/tags/JBP_Portlet_1_0_0/ Log: Renaming again Copied: modules/portlet/tags/JBP_PORTLET_1_0_0 (from rev 8651, modules/port= let/tags/JBP_Portlet_1_0_0) --===============4916681263378620808==-- From portal-commits at lists.jboss.org Mon Oct 15 05:01:25 2007 Content-Type: multipart/mixed; boundary="===============1545727617168317373==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8653 - modules/test/tags. Date: Mon, 15 Oct 2007 05:01:24 -0400 Message-ID: --===============1545727617168317373== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: thomas.heute(a)jboss.com Date: 2007-10-15 05:01:24 -0400 (Mon, 15 Oct 2007) New Revision: 8653 Added: modules/test/tags/JBP_TEST_1_0_0/ Removed: modules/test/tags/JBP_Test_1_0_0/ Log: Renaming again Copied: modules/test/tags/JBP_TEST_1_0_0 (from rev 8652, modules/test/tags/= JBP_Test_1_0_0) --===============1545727617168317373==-- From portal-commits at lists.jboss.org Mon Oct 15 05:01:58 2007 Content-Type: multipart/mixed; boundary="===============1303606068926812323==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8654 - modules/web/tags. Date: Mon, 15 Oct 2007 05:01:58 -0400 Message-ID: --===============1303606068926812323== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: thomas.heute(a)jboss.com Date: 2007-10-15 05:01:58 -0400 (Mon, 15 Oct 2007) New Revision: 8654 Added: modules/web/tags/JBP_WEB_1_0_0/ Removed: modules/web/tags/JBP_Web_1_0_0/ Log: Renaming again Copied: modules/web/tags/JBP_WEB_1_0_0 (from rev 8653, modules/web/tags/JBP= _Web_1_0_0) --===============1303606068926812323==-- From portal-commits at lists.jboss.org Mon Oct 15 05:04:12 2007 Content-Type: multipart/mixed; boundary="===============5866568741617977637==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8655 - modules/portlet/branches. Date: Mon, 15 Oct 2007 05:04:12 -0400 Message-ID: --===============5866568741617977637== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: thomas.heute(a)jboss.com Date: 2007-10-15 05:04:12 -0400 (Mon, 15 Oct 2007) New Revision: 8655 Added: modules/portlet/branches/JBP_PORTLET_BRANCH_1_1/ Log: Branching the portlet module Copied: modules/portlet/branches/JBP_PORTLET_BRANCH_1_1 (from rev 8654, mod= ules/portlet/trunk) --===============5866568741617977637==-- From portal-commits at lists.jboss.org Mon Oct 15 05:49:51 2007 Content-Type: multipart/mixed; boundary="===============0176645075042670829==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8656 - branches/JBoss_Portal_Branch_2_6/build. Date: Mon, 15 Oct 2007 05:49:50 -0400 Message-ID: --===============0176645075042670829== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: thomas.heute(a)jboss.com Date: 2007-10-15 05:49:50 -0400 (Mon, 15 Oct 2007) New Revision: 8656 Modified: branches/JBoss_Portal_Branch_2_6/build/build-thirdparty.xml Log: Portlet module's version has changed Modified: branches/JBoss_Portal_Branch_2_6/build/build-thirdparty.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/build/build-thirdparty.xml 2007-10-15 = 09:04:12 UTC (rev 8655) +++ branches/JBoss_Portal_Branch_2_6/build/build-thirdparty.xml 2007-10-15 = 09:49:50 UTC (rev 8656) @@ -50,7 +50,7 @@ - + --===============0176645075042670829==-- From portal-commits at lists.jboss.org Mon Oct 15 06:24:06 2007 Content-Type: multipart/mixed; boundary="===============2826170303704587333==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8657 - branches/JBoss_Portal_Branch_2_6/build. Date: Mon, 15 Oct 2007 06:22:26 -0400 Message-ID: --===============2826170303704587333== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: thomas.heute(a)jboss.com Date: 2007-10-15 06:22:26 -0400 (Mon, 15 Oct 2007) New Revision: 8657 Modified: branches/JBoss_Portal_Branch_2_6/build/build-thirdparty.xml Log: Use trunk instead Modified: branches/JBoss_Portal_Branch_2_6/build/build-thirdparty.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/build/build-thirdparty.xml 2007-10-15 = 09:49:50 UTC (rev 8656) +++ branches/JBoss_Portal_Branch_2_6/build/build-thirdparty.xml 2007-10-15 = 10:22:26 UTC (rev 8657) @@ -50,7 +50,7 @@ - + --===============2826170303704587333==-- From portal-commits at lists.jboss.org Mon Oct 15 06:24:28 2007 Content-Type: multipart/mixed; boundary="===============5315873077118824203==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8658 - modules/portlet/branches. Date: Mon, 15 Oct 2007 06:24:27 -0400 Message-ID: --===============5315873077118824203== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: thomas.heute(a)jboss.com Date: 2007-10-15 06:24:27 -0400 (Mon, 15 Oct 2007) New Revision: 8658 Removed: modules/portlet/branches/JBP_PORTLET_BRANCH_1_1/ Log: Delete branch (premature) --===============5315873077118824203==-- From portal-commits at lists.jboss.org Mon Oct 15 11:21:41 2007 Content-Type: multipart/mixed; boundary="===============3076594681226514583==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8659 - in modules: portlet/trunk/build and 2 other directories. Date: Mon, 15 Oct 2007 11:21:40 -0400 Message-ID: --===============3076594681226514583== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: thomas.heute(a)jboss.com Date: 2007-10-15 11:21:39 -0400 (Mon, 15 Oct 2007) New Revision: 8659 Modified: modules/identity/trunk/build/build-thirdparty.xml modules/portlet/trunk/build/build-thirdparty.xml modules/test/trunk/build/build-thirdparty.xml modules/web/trunk/build/build-thirdparty.xml Log: Using trunk versions of the modules Modified: modules/identity/trunk/build/build-thirdparty.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/identity/trunk/build/build-thirdparty.xml 2007-10-15 10:24:27 U= TC (rev 8658) +++ modules/identity/trunk/build/build-thirdparty.xml 2007-10-15 15:21:39 U= TC (rev 8659) @@ -47,8 +47,8 @@ are pushed to the http://repository.jboss.com site. --> = - - + + = Modified: modules/portlet/trunk/build/build-thirdparty.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/portlet/trunk/build/build-thirdparty.xml 2007-10-15 10:24:27 UT= C (rev 8658) +++ modules/portlet/trunk/build/build-thirdparty.xml 2007-10-15 15:21:39 UT= C (rev 8659) @@ -46,9 +46,9 @@ are pushed to the http://repository.jboss.com site. --> = - - - + + + = Modified: modules/test/trunk/build/build-thirdparty.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/build/build-thirdparty.xml 2007-10-15 10:24:27 UTC (= rev 8658) +++ modules/test/trunk/build/build-thirdparty.xml 2007-10-15 15:21:39 UTC (= rev 8659) @@ -47,7 +47,7 @@ are pushed to the http://repository.jboss.com site. --> = - + = = Modified: modules/web/trunk/build/build-thirdparty.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/web/trunk/build/build-thirdparty.xml 2007-10-15 10:24:27 UTC (r= ev 8658) +++ modules/web/trunk/build/build-thirdparty.xml 2007-10-15 15:21:39 UTC (r= ev 8659) @@ -47,8 +47,8 @@ are pushed to the http://repository.jboss.com site. --> = - - + + --===============3076594681226514583==-- From portal-commits at lists.jboss.org Mon Oct 15 15:28:24 2007 Content-Type: multipart/mixed; boundary="===============2428428492640803324==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8660 - in branches/UIServer: core/src/main/org/jboss/portal/core/controller/classic and 12 other directories. Date: Mon, 15 Oct 2007 15:28:22 -0400 Message-ID: --===============2428428492640803324== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: sohil.shah(a)jboss.com Date: 2007-10-15 15:28:21 -0400 (Mon, 15 Oct 2007) New Revision: 8660 Added: branches/UIServer/core-uiserver/src/main/org/jboss/portal/uiserver/proce= ssor/ProcessorResponse.java branches/UIServer/core-uiserver/src/main/org/jboss/portal/uiserver/proto= col/Component.java branches/UIServer/core-uiserver/src/main/org/jboss/portal/uiserver/proto= col/Container.java Removed: branches/UIServer/uiserver/src/main/org/jboss/portal/uiserver/layout/Com= ponent.java branches/UIServer/uiserver/src/main/org/jboss/portal/uiserver/layout/Con= tainer.java branches/UIServer/uiserver/src/main/org/jboss/portal/uiserver/layout/Pag= e.java branches/UIServer/uiserver/src/main/org/jboss/portal/uiserver/layout/Win= dow.java branches/UIServer/uiserver/src/main/org/jboss/portal/uiserver/protocol/ Modified: branches/UIServer/core-uiserver/build.xml branches/UIServer/core-uiserver/src/main/org/jboss/portal/uiserver/proce= ssor/Processor.java branches/UIServer/core-uiserver/src/main/org/jboss/portal/uiserver/proto= col/Page.java branches/UIServer/core-uiserver/src/main/org/jboss/portal/uiserver/proto= col/PortalObject.java branches/UIServer/core-uiserver/src/main/org/jboss/portal/uiserver/proto= col/Window.java branches/UIServer/core/src/main/org/jboss/portal/core/controller/Control= ler.java branches/UIServer/core/src/main/org/jboss/portal/core/controller/classic= /ClassicResponseHandler.java branches/UIServer/core/src/main/org/jboss/portal/core/controller/classic= /OtherResponseHandler.java branches/UIServer/core/src/main/org/jboss/portal/core/model/instance/Por= tletInstanceResponseHandler.java branches/UIServer/core/src/main/org/jboss/portal/core/model/portal/Porta= lObjectResponseHandler.java branches/UIServer/core/src/main/org/jboss/portal/core/processor/MainProc= essor.java branches/UIServer/core/src/resources/portal-core-sar/META-INF/jboss-serv= ice.xml branches/UIServer/uiserver/src/main/org/jboss/portal/test/uiserver/layou= t/TestFlexibleGrid.java branches/UIServer/uiserver/src/main/org/jboss/portal/test/uiserver/layou= t/TestRegionLayoutManager.java branches/UIServer/uiserver/src/main/org/jboss/portal/uiserver/layout/Lay= outManager.java branches/UIServer/uiserver/src/main/org/jboss/portal/uiserver/layout/Lay= outService.java branches/UIServer/uiserver/src/main/org/jboss/portal/uiserver/layout/cla= ssic/FlexibleGrid.java branches/UIServer/uiserver/src/main/org/jboss/portal/uiserver/layout/cla= ssic/FlexibleGridLayoutManager.java branches/UIServer/uiserver/src/main/org/jboss/portal/uiserver/layout/cla= ssic/RegionLayoutManager.java branches/UIServer/uiserver/src/main/org/jboss/portal/uiserver/service/UI= Server.java Log: (Core Portal-Presentation Framework-HTTP layer)- architecture for interacti= on during sending response back from Portal Modified: branches/UIServer/core/src/main/org/jboss/portal/core/controller/= Controller.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/UIServer/core/src/main/org/jboss/portal/core/controller/Contro= ller.java 2007-10-15 15:21:39 UTC (rev 8659) +++ branches/UIServer/core/src/main/org/jboss/portal/core/controller/Contro= ller.java 2007-10-15 19:28:21 UTC (rev 8660) @@ -39,11 +39,13 @@ import org.jboss.portal.core.model.instance.InstanceContainer; import org.jboss.portal.core.model.CustomizationManager; import org.jboss.portal.common.invocation.InterceptorStackFactory; +import org.jboss.portal.common.util.MarkupInfo; import org.jboss.portal.security.spi.auth.PortalAuthorizationManagerFactor= y; import org.jboss.portal.jems.as.system.AbstractJBossService; import org.jboss.portal.server.RequestController; import org.jboss.portal.server.ServerInvocation; import org.jboss.portal.server.ServerException; +import org.jboss.portal.web.ServletContextDispatcher; import org.jboss.portal.web.spi.ServletContainerContext; = import javax.servlet.ServletException; @@ -307,7 +309,7 @@ ControllerResponse response =3D forward.getResponse(); processCommandResponse(controllerContext, command, response); } - else if (handlerResponse instanceof HTTPResponse) + /*else if (handlerResponse instanceof HTTPResponse) { HTTPResponse hr =3D (HTTPResponse)handlerResponse; sendResponse(controllerContext, hr); @@ -316,13 +318,13 @@ { AjaxResponse ar =3D (AjaxResponse)handlerResponse; sendResponse(controllerContext, ar); - } + }*/ } = /** * All http responses in the stack should be handled here. */ - protected void sendResponse(ControllerContext ctx, HTTPResponse resp) + /*protected void sendResponse(ControllerContext ctx, HTTPResponse resp) { try { @@ -335,13 +337,13 @@ catch (ServletException e) { log.error("Cound not send http response", e); - } - } + } = + }*/ = /** * All http responses in the stack should be handled here. */ - protected void sendResponse(ControllerContext ctx, AjaxResponse resp) + /*protected void sendResponse(ControllerContext ctx, AjaxResponse resp) { try { @@ -355,5 +357,5 @@ { log.error("Cound not send http response", e); } - } -} + }*/ +} \ No newline at end of file Modified: branches/UIServer/core/src/main/org/jboss/portal/core/controller/= classic/ClassicResponseHandler.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/UIServer/core/src/main/org/jboss/portal/core/controller/classi= c/ClassicResponseHandler.java 2007-10-15 15:21:39 UTC (rev 8659) +++ branches/UIServer/core/src/main/org/jboss/portal/core/controller/classi= c/ClassicResponseHandler.java 2007-10-15 19:28:21 UTC (rev 8660) @@ -60,7 +60,15 @@ if (requiresRedirect(controllerCommand, urlContext, forward)) { String url =3D controllerContext.renderURL(forward.getCommand(= ), forward.getURLContext(), null); - return HTTPResponse.sendRedirect(url); + = + /** + * Used for integration with the new Presentation Framework + */ + controllerContext.getServerInvocation().getServerContext().get= ClientRequest().setAttribute("pfTask", "redirect"); + controllerContext.getServerInvocation().getServerContext().get= ClientRequest().setAttribute("url", url); + = + //return HTTPResponse.sendRedirect(url); + return null; } } = Modified: branches/UIServer/core/src/main/org/jboss/portal/core/controller/= classic/OtherResponseHandler.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/UIServer/core/src/main/org/jboss/portal/core/controller/classi= c/OtherResponseHandler.java 2007-10-15 15:21:39 UTC (rev 8659) +++ branches/UIServer/core/src/main/org/jboss/portal/core/controller/classi= c/OtherResponseHandler.java 2007-10-15 19:28:21 UTC (rev 8660) @@ -49,6 +49,8 @@ import org.apache.log4j.Logger; = import javax.servlet.ServletException; +import javax.servlet.http.HttpServletResponse; + import java.io.IOException; = /** @@ -72,9 +74,15 @@ if (controllerResponse instanceof PageRendition) { final PageRendition rendition =3D (PageRendition)controllerRespon= se; + = + /** + * Used for integration with the new Presentation Framework + */ + invocation.getServerContext().getClientRequest().setAttribute("pf= Task", "aggregate"); + invocation.getServerContext().getClientRequest().setAttribute("pa= geResult", rendition.getPageResult()); = // Defer execution of rendition to the right place which is in th= e classic controller send response - return new HTTPResponse() + /*return new HTTPResponse() { public void sendResponse(ServerInvocationContext ctx) throws I= OException, ServletException { @@ -82,7 +90,8 @@ MarkupInfo markupInfo =3D (MarkupInfo)invocation.getRespons= e().getContentInfo(); rendition.render(markupInfo, dispatcher); } - }; + };*/ + return null; } else if (controllerResponse instanceof SignOutResponse) { @@ -101,14 +110,30 @@ URLContext urlContext =3D invocation.getServerContext().getURL= Context(); location =3D controllerContext.renderURL(renderCmd, urlContext= .asNonAuthenticated(), null); } + = + /** + * Used for integration with the new Presentation Framework + */ + invocation.getServerContext().getClientRequest().setAttribute("pf= Task", "redirect"); + invocation.getServerContext().getClientRequest().setAttribute("ur= l", location); = // - return HTTPResponse.sendRedirect(location); + //return HTTPResponse.sendRedirect(location); + return null; } else if (controllerResponse instanceof StreamContentResponse) { StreamContentResponse scr =3D (StreamContentResponse)controllerRe= sponse; - return HTTPResponse.sendBinary(scr.getContentType(), scr.getInput= Stream()); + = + /** + * Used for integration with the new Presentation Framework + */ + invocation.getServerContext().getClientRequest().setAttribute("pf= Task", "stream"); + invocation.getServerContext().getClientRequest().setAttribute("co= ntentType", scr.getContentType()); + invocation.getServerContext().getClientRequest().setAttribute("in= putStream", scr.getInputStream()); + = + //return HTTPResponse.sendBinary(scr.getContentType(), scr.getInp= utStream()); + return null; } else if (controllerResponse instanceof SecurityErrorResponse) { @@ -118,14 +143,29 @@ { if (controllerContext.getUser() !=3D null) { - return HTTPResponse.sendForbidden(); + /** + * Used for integration with the new Presentation Framework + */ + invocation.getServerContext().getClientRequest().setAttribu= te("pfTask", "error"); + invocation.getServerContext().getClientRequest().setAttribu= te("errorCode", new Integer(HttpServletResponse.SC_FORBIDDEN)); + = + //return HTTPResponse.sendForbidden(); + return null; } else { urlContext =3D URLContext.newInstance(urlContext.isSecure()= , true); ServerURL serverURL =3D controllerContext.getController().g= etURLFactory().doMapping(controllerContext, controllerContext.getServerInvo= cation(), controllerCommand); String url =3D controllerContext.getServerInvocation().getR= esponse().renderURL(serverURL, urlContext, null); - return HTTPResponse.sendRedirect(url); + = + /** + * Used for integration with the new Presentation Framework + */ + invocation.getServerContext().getClientRequest().setAttribu= te("pfTask", "redirect"); + invocation.getServerContext().getClientRequest().setAttribu= te("url", url); + = + //return HTTPResponse.sendRedirect(url); + return null; } } else @@ -133,7 +173,15 @@ urlContext =3D URLContext.newInstance(true, urlContext.isAuthe= nticated()); ServerURL serverURL =3D controllerContext.getController().getU= RLFactory().doMapping(controllerContext, controllerContext.getServerInvocat= ion(), controllerCommand); String url =3D controllerContext.getServerInvocation().getResp= onse().renderURL(serverURL, urlContext, null); - return HTTPResponse.sendRedirect(url); + = + /** + * Used for integration with the new Presentation Framework + */ + invocation.getServerContext().getClientRequest().setAttribute(= "pfTask", "redirect"); + invocation.getServerContext().getClientRequest().setAttribute(= "url", url); + = + //return HTTPResponse.sendRedirect(url); + return null; } } else if (controllerResponse instanceof ErrorResponse) @@ -148,15 +196,29 @@ { log.error("An error occured", cause); } - - return HTTPResponse.sendError(); + = + /** + * Used for integration with the new Presentation Framework + */ + invocation.getServerContext().getClientRequest().setAttribute("pf= Task", "error"); + invocation.getServerContext().getClientRequest().setAttribute("er= rorCode", new Integer(HttpServletResponse.SC_INTERNAL_SERVER_ERROR)); + = + //return HTTPResponse.sendError(); + return null; } else if (controllerResponse instanceof UnavailableResourceResponse) { UnavailableResourceResponse unavailable =3D (UnavailableResourceR= esponse)controllerResponse; + = + /** + * Used for integration with the new Presentation Framework + */ + invocation.getServerContext().getClientRequest().setAttribute("pf= Task", "error"); + invocation.getServerContext().getClientRequest().setAttribute("er= rorCode", new Integer(HttpServletResponse.SC_NOT_FOUND)); = // - return HTTPResponse.sendNotFound(); + //return HTTPResponse.sendNotFound(); + return null; } else { Modified: branches/UIServer/core/src/main/org/jboss/portal/core/model/insta= nce/PortletInstanceResponseHandler.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/UIServer/core/src/main/org/jboss/portal/core/model/instance/Po= rtletInstanceResponseHandler.java 2007-10-15 15:21:39 UTC (rev 8659) +++ branches/UIServer/core/src/main/org/jboss/portal/core/model/instance/Po= rtletInstanceResponseHandler.java 2007-10-15 19:28:21 UTC (rev 8660) @@ -57,7 +57,14 @@ RenderPortletInstanceCommand render=3D new RenderPortletInstan= ceCommand(upir.getInstanceId(), upir.getNavigationalState()); final PageRendition rendition =3D (PageRendition)controllerCon= text.execute(render); final ServerInvocation invocation =3D controllerContext.getSer= verInvocation(); - return new HTTPResponse() + = + /** + * Used for integration with the new Presentation Framework + */ + invocation.getServerContext().getClientRequest().setAttribute(= "pfTask", "aggregate"); + invocation.getServerContext().getClientRequest().setAttribute(= "pageResult", rendition.getPageResult()); + = + /*return new HTTPResponse() { public void sendResponse(ServerInvocationContext ctx) throw= s IOException, ServletException { @@ -65,7 +72,8 @@ MarkupInfo markupInfo =3D (MarkupInfo)invocation.getResp= onse().getContentInfo(); rendition.render(markupInfo, dispatcher); } - }; + };*/ + return null; } catch (ControllerException e) { Modified: branches/UIServer/core/src/main/org/jboss/portal/core/model/porta= l/PortalObjectResponseHandler.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/UIServer/core/src/main/org/jboss/portal/core/model/portal/Port= alObjectResponseHandler.java 2007-10-15 15:21:39 UTC (rev 8659) +++ branches/UIServer/core/src/main/org/jboss/portal/core/model/portal/Port= alObjectResponseHandler.java 2007-10-15 19:28:21 UTC (rev 8660) @@ -78,7 +78,14 @@ { final PageRendition rendition =3D (PageRendition)resp; final ServerInvocation invocation =3D controllerContext.get= ServerInvocation(); - return new HTTPResponse() + = + /** + * Used for integration with the new Presentation Framework + */ + invocation.getServerContext().getClientRequest().setAttribu= te("pfTask", "aggregate"); + invocation.getServerContext().getClientRequest().setAttribu= te("pageResult", rendition.getPageResult()); + = + /*return new HTTPResponse() { public void sendResponse(ServerInvocationContext ctx) th= rows IOException, ServletException { @@ -86,7 +93,8 @@ MarkupInfo markupInfo =3D (MarkupInfo)invocation.getR= esponse().getContentInfo(); rendition.render(markupInfo, dispatcher); } - }; + };*/ + return null; } else { Modified: branches/UIServer/core/src/main/org/jboss/portal/core/processor/M= ainProcessor.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/UIServer/core/src/main/org/jboss/portal/core/processor/MainPro= cessor.java 2007-10-15 15:21:39 UTC (rev 8659) +++ branches/UIServer/core/src/main/org/jboss/portal/core/processor/MainPro= cessor.java 2007-10-15 19:28:21 UTC (rev 8660) @@ -22,15 +22,34 @@ *************************************************************************= *****/ package org.jboss.portal.core.processor; = +import java.io.InputStream; +import java.util.Map; +import java.util.List; +import java.util.Iterator; +import java.util.ArrayList; + import org.apache.log4j.Logger; = +import javax.servlet.http.HttpServletResponse; +import javax.servlet.ServletOutputStream; + +import org.jboss.portal.common.util.MarkupInfo; +import org.jboss.portal.common.io.IOTools; import org.jboss.portal.jems.as.system.AbstractJBossService; +import org.jboss.portal.web.ServletContextDispatcher; import org.jboss.portal.server.RequestControllerDispatcher; import org.jboss.portal.server.ServerException; import org.jboss.portal.server.RequestController; +import org.jboss.portal.server.ServerInvocation; +import org.jboss.portal.theme.page.PageResult; +import org.jboss.portal.theme.page.WindowContext; +import org.jboss.portal.theme.page.WindowResult; = import org.jboss.portal.uiserver.processor.Processor; import org.jboss.portal.uiserver.processor.ProcessorRequest; +import org.jboss.portal.uiserver.processor.ProcessorResponse; +import org.jboss.portal.uiserver.protocol.Page; +import org.jboss.portal.uiserver.protocol.Window; = /** * @author Sohil Shah @@ -46,55 +65,160 @@ /** * = */ - private RequestController temp =3D null; + private RequestController requestController =3D null; = - = /** * = + * @return + */ = + public RequestController getRequestController() + { + return requestController; + } + + /** + * = + * @param requestController */ - public void process(ProcessorRequest request) throws ServerException + public void setRequestController(RequestController requestController) + { + this.requestController =3D requestController; + } + + /** + * = + */ + public ProcessorResponse process(ProcessorRequest request) throws Serve= rException { = try { - //This should process the request sent in from the UIServer using= whatever framework the core Portal implements - //Basically based on the information sent in by the ProcessorRequ= est this component should have all the information - //it needs to perform necessary action inside the Portal - = + /* + This should process the request sent in from the UIServer using w= hatever framework the core Portal implements + Basically based on the information sent in by the ProcessorReques= t this component should have all the information + it needs to perform necessary action inside the Portal = = + the Processor should use the values sent in the ProcessorRequest = object to perform + the appropriate action and then send its Response back to the UIS= erver which should process + the Response and sent a Response back to the client + */ = + ProcessorResponse response =3D null; = - //the Processor should use the values sent in the ProcessorReques= t object to perform - //the appropriate action and then send its Response back to the U= IServer which should process - //the Response and sent a Response back to the client + //For now, just for prototype sake just use the existing Controll= er to produce the outcome + request.getServerInvocation().setHandler(new RequestControllerDis= patcher(this.requestController)); + request.getServerInvocation().invokeNext(); + = + //Get access to the core Portal objects to be used after the exec= ution of the incoming Portal request + //by the Portal Controller + ServerInvocation invocation =3D request.getServerInvocation(); + ServletContextDispatcher dispatcher =3D new ServletContextDispatc= her(invocation.getServerContext().getClientRequest(), = + invocation.getServerContext().getClientResponse(), invocation.get= Request().getServer().getServletContainerContext()); = + String task =3D (String)invocation.getServerContext().getClientRe= quest().getAttribute("pfTask"); + if(task.equals("aggregate")) + { + //Handle page aggregation and sending result back to the client + MarkupInfo markupInfo =3D (MarkupInfo)invocation.getResponse()= .getContentInfo(); + PageResult pageResult =3D (PageResult)invocation.getServerCont= ext().getClientRequest().getAttribute("pageResult"); + = + //Now generate a ProcessorResponse by mapping the data produce= d during the execution of + //the Portal Request + String contentType =3D markupInfo.getContentType() + "; charse= t=3D" + markupInfo.getCharset(); + Page pageToBeDisplayed =3D new Page(); + pageToBeDisplayed.setCurrentlyDisplayed(true); + = + //Setup information inside the page object + pageToBeDisplayed.setName(pageResult.getPageName()); + List windows =3D this.getWindows(pageResult.getWindowContextMa= p()); + if(windows !=3D null) + { + pageToBeDisplayed.getChildren().addAll(windows); + } + = + // + List updatedPages =3D new ArrayList(); + updatedPages.add(pageToBeDisplayed); + = + //Generate the response to be sent back for processing by the = Presentation Framework + response =3D new ProcessorResponse(dispatcher, contentType, ma= rkupInfo.getCharset(), updatedPages); + } + else if(task.equals("stream")) + { + //Handle sending back binary content back to the client + String contentType =3D (String)invocation.getServerContext().g= etClientRequest().getAttribute("contentType"); + InputStream in =3D (InputStream)invocation.getServerContext().= getClientRequest().getAttribute("inputStream"); + = + //Process and see if binary content needs to be sent back... + //In this case write the response to the OutputStream directly + //There is no need for any Presentation Framework processing = = + if(contentType !=3D null && in !=3D null) + { + HttpServletResponse resp =3D invocation.getServerContext().= getClientResponse(); + resp.setContentType(contentType); + ServletOutputStream sout =3D null; + try + { + sout =3D resp.getOutputStream(); + byte[] buf =3D new byte[2048]; + int len; + while ((len =3D in.read(buf)) > 0) + { + sout.write(buf, 0, len); + } + sout.flush(); + } + finally + { + IOTools.safeClose(in); + IOTools.safeClose(sout); + } + } + } + else if(task.equals("redirect")) + { + //Handle sendRedirect back to the client + String url =3D (String)invocation.getServerContext().getClient= Request().getAttribute("url"); + invocation.getServerContext().getClientResponse().sendRedirect= (url); = + } + else if(task.equals("error")) + { + //Handle sendingErrror back to the client + Integer errorCode =3D (Integer)invocation.getServerContext().g= etClientRequest().getAttribute("errorCode"); + invocation.getServerContext().getClientResponse().sendError(er= rorCode.intValue()); + } = - //Just outputting values coming in on ProcessorRequest.....Just f= or testing = - log.info("Action=3D"+request.getActionType()); - log.info("Portal=3D"+request.getPortal()); - log.info("Target=3D"+request.getTarget()); = - //For now, just for prototype sake just use the existing Controll= er to produce the outcome - request.getServerInvocation().setHandler(new RequestControllerDis= patcher(this.temp)); - request.getServerInvocation().invokeNext(); + return response; } catch(Exception e) { throw new ServerException(e); } } - + = /** * = + * @param windowContexts * @return */ - public RequestController getTemp() + private List getWindows(Map windowContexts) { - return temp; + List windows =3D null; + = + if(windowContexts !=3D null) + { + windows =3D new ArrayList(); + for(Iterator itr=3DwindowContexts.keySet().iterator(); itr.hasNex= t();) + { + String windowId =3D (String)itr.next(); + WindowContext windowContext =3D (WindowContext)windowContexts.= get(windowId); + WindowResult windowResult =3D windowContext.getResult(); + = + Window window =3D new Window(windowId, windowResult.getTitle()= , = + windowResult.getContent(), windowResult.getHeaderContent(), = + windowResult.getWindowState(), windowResult.getMode()); + = + windows.add(window); + } + } + = + return windows; } - - /** - * = - * @param temp - */ - public void setTemp(RequestController temp) - { - this.temp =3D temp; - } } Modified: branches/UIServer/core/src/resources/portal-core-sar/META-INF/jbo= ss-service.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/UIServer/core/src/resources/portal-core-sar/META-INF/jboss-ser= vice.xml 2007-10-15 15:21:39 UTC (rev 8659) +++ branches/UIServer/core/src/resources/portal-core-sar/META-INF/jboss-ser= vice.xml 2007-10-15 19:28:21 UTC (rev 8660) @@ -1053,7 +1053,7 @@ @@ -1097,7 +1097,7 @@ xmbean-dd=3D"" xmbean-code=3D"org.jboss.portal.jems.as.system.JBossServiceModelMBea= n"> - p= ortal:service=3DTemp + portal:service=3DRequestController portal:container=3DPortalObject portal:service=3DPageService portal:commandFactory=3DDefaultPortal Modified: branches/UIServer/core-uiserver/build.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/UIServer/core-uiserver/build.xml 2007-10-15 15:21:39 UTC (rev = 8659) +++ branches/UIServer/core-uiserver/build.xml 2007-10-15 19:28:21 UTC (rev = 8660) @@ -96,7 +96,9 @@ + = = + = = Modified: branches/UIServer/core-uiserver/src/main/org/jboss/portal/uiserve= r/processor/Processor.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/UIServer/core-uiserver/src/main/org/jboss/portal/uiserver/proc= essor/Processor.java 2007-10-15 15:21:39 UTC (rev 8659) +++ branches/UIServer/core-uiserver/src/main/org/jboss/portal/uiserver/proc= essor/Processor.java 2007-10-15 19:28:21 UTC (rev 8660) @@ -39,5 +39,5 @@ * @param request * @throws ServerException */ - public void process(ProcessorRequest request) throws ServerException; + public ProcessorResponse process(ProcessorRequest request) throws Serve= rException; } Added: branches/UIServer/core-uiserver/src/main/org/jboss/portal/uiserver/p= rocessor/ProcessorResponse.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/UIServer/core-uiserver/src/main/org/jboss/portal/uiserver/proc= essor/ProcessorResponse.java (rev 0) +++ branches/UIServer/core-uiserver/src/main/org/jboss/portal/uiserver/proc= essor/ProcessorResponse.java 2007-10-15 19:28:21 UTC (rev 8660) @@ -0,0 +1,171 @@ +/*************************************************************************= ***** + * JBoss, a division of Red Hat = * + * Copyright 2006, Red Hat Middleware, LLC, and individual = * + * contributors as indicated by the @authors tag. See the = * + * copyright.txt in the distribution for a full listing of = * + * individual contributors. = * + * = * + * This is free software; you can redistribute it and/or modify it = * + * under the terms of the GNU Lesser General Public License as = * + * published by the Free Software Foundation; either version 2.1 of = * + * the License, or (at your option) any later version. = * + * = * + * This software is distributed in the hope that it will be useful, = * + * but WITHOUT ANY WARRANTY; without even the implied warranty of = * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU = * + * Lesser General Public License for more details. = * + * = * + * You should have received a copy of the GNU Lesser General Public = * + * License along with this software; if not, write to the Free = * + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA = * + * 02110-1301 USA, or see the FSF site: http://www.fsf.org. = * + *************************************************************************= *****/ +package org.jboss.portal.uiserver.processor; + +import java.io.Serializable; +import java.util.List; + +import org.jboss.portal.web.ServletContextDispatcher; + +import org.jboss.portal.uiserver.protocol.Page; + +/** + * @author Sohil Shah + * = + */ +public class ProcessorResponse implements Serializable +{ + /** + * = + */ + private ServletContextDispatcher dispatcher =3D null; + = + /** + * Contains a list of pages that need to be updated on the client. Thes= e pages may not necessarily + * be the currently displayed page, but nevertheless, these are pages w= hose window content changed + * as a result of this particular Portal request processing. + * = + * For most usecases this probably only consist of the Page that is cur= rently being displayed on the client + */ + private List updatedPages =3D null; + = + /** + * Content Type of the response being sent back to the client + */ + private String contentType =3D null; + = + /** + * Character Set of the response being sent back to the client + */ + private String charSet =3D null; + = + = + /** + * = + * @param dispatcher + * @param updatedPages + */ + public ProcessorResponse(ServletContextDispatcher dispatcher, String co= ntentType, String charSet, List updatedPages) + { + this.dispatcher =3D dispatcher; + this.contentType =3D contentType; + this.charSet =3D charSet; + this.updatedPages =3D updatedPages; = + } + = + /** + * = + * @return + */ + public ServletContextDispatcher getDispatcher() + { + return dispatcher; + } + + /** + * = + * @param dispatcher + */ + public void setDispatcher(ServletContextDispatcher dispatcher) + { + this.dispatcher =3D dispatcher; + } + + /** + * = + * @return + */ + public List getUpdatedPages() + { + return updatedPages; + } + + /** + * = + * @param updatedPages + */ + public void setUpdatedPages(List updatedPages) + { + this.updatedPages =3D updatedPages; + } + + /** + * = + * @return + */ + public String getCharSet() + { + return charSet; + } + + /** + * = + * @param charSet + */ + public void setCharSet(String charSet) + { + this.charSet =3D charSet; + } + + /** + * = + * @return + */ + public String getContentType() + { + return contentType; + } + + /** + * = + * @param contentType + */ + public void setContentType(String contentType) + { + this.contentType =3D contentType; + } + = + /** + * = + * @return + */ + public Page findDisplayedPage() + { + Page displayedPage =3D null; + = + if(this.updatedPages !=3D null) + { + for(int i=3D0; iSohil Shah + * + */ +public interface Component extends Serializable +{ = + /** + * = + * @return + */ + public String getId(); + = + /** + * = + * @param id + */ + public void setId(String id); + = + = + /** + * = + * @return + */ + public String getMarkup(); = +} Added: branches/UIServer/core-uiserver/src/main/org/jboss/portal/uiserver/p= rotocol/Container.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/UIServer/core-uiserver/src/main/org/jboss/portal/uiserver/prot= ocol/Container.java (rev 0) +++ branches/UIServer/core-uiserver/src/main/org/jboss/portal/uiserver/prot= ocol/Container.java 2007-10-15 19:28:21 UTC (rev 8660) @@ -0,0 +1,134 @@ +/*************************************************************************= ***** + * JBoss, a division of Red Hat = * + * Copyright 2006, Red Hat Middleware, LLC, and individual = * + * contributors as indicated by the @authors tag. See the = * + * copyright.txt in the distribution for a full listing of = * + * individual contributors. = * + * = * + * This is free software; you can redistribute it and/or modify it = * + * under the terms of the GNU Lesser General Public License as = * + * published by the Free Software Foundation; either version 2.1 of = * + * the License, or (at your option) any later version. = * + * = * + * This software is distributed in the hope that it will be useful, = * + * but WITHOUT ANY WARRANTY; without even the implied warranty of = * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU = * + * Lesser General Public License for more details. = * + * = * + * You should have received a copy of the GNU Lesser General Public = * + * License along with this software; if not, write to the Free = * + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA = * + * 02110-1301 USA, or see the FSF site: http://www.fsf.org. = * + *************************************************************************= *****/ +package org.jboss.portal.uiserver.protocol; + +import java.io.Serializable; +import java.util.List; +import java.util.ArrayList; + +/** + * Container is an organizational entity which aggregates the Components t= hat will be rendered on the client + * = + * @author Sohil Shah + * + */ +public class Container implements Serializable +{ + /** + * required unique id of the container. uniqueness in relation to + * other containers added to the same instance of the page + */ + protected String id =3D null; + = + = + /** + * = + */ + private List components =3D null; + = + /** + * = + * + */ + public Container(String id) + { + this.id =3D id; + this.components =3D new ArrayList(); + } + = + /** + * = + * @return + */ + public String getId() + { + return id; + } + + /** + * = + * @param id + */ + public void setId(String id) + { + this.id =3D id; + } + + = + /** + * = + * @return + */ + public List getComponents() + { + return components; + } + + /** + * = + * @param components + */ + public void setComponents(List components) + { + this.components =3D components; + } = + = + /** + * = + * @param componentId + * @return + */ + public Component getComponent(String componentId) + { + Component component =3D null; + = + if(this.components !=3D null) + { + for(int i=3D0;iSohil Shah * @@ -29,10 +33,100 @@ public class Page extends PortalObject { /** + * A page consists of multiple containers that are to be displayed/aggr= egated along with their corresponding + * UI components + */ + private List containers =3D null; + = + /** + * Signifies if this page is currently being displayed on the client + */ + private boolean currentlyDisplayed =3D false; + = + /** * = + * */ + public Page() + { + super(); + this.containers =3D new ArrayList(); + } + = + /** + * = + */ public String toString() { return "Page: "+super.toString(); } + = + /** + * = + * @return + */ + public List getWindows() + { + List windows =3D new ArrayList(); + = + if(this.children !=3D null) + { + for(Iterator itr=3Dthis.children.iterator(); itr.hasNext();) + { + Object child =3D itr.next(); + = + if(child instanceof Window) + { + windows.add(child); + } + } + } + = + return windows; + } + = + /** + * = + * @return + */ + public List getContainers() + { + return containers; + } + + /** + * = + * @param containers + */ + public void setContainers(List containers) + { + this.containers =3D containers; + } + = + /** + * = + * @param container + */ + public void addContainer(Container container) + { + this.getContainers().add(container); + } + + /** + * = + * @return + */ + public boolean isCurrentlyDisplayed() + { + return currentlyDisplayed; + } + + /** + * = + * @param currentlyDisplayed + */ + public void setCurrentlyDisplayed(boolean currentlyDisplayed) + { + this.currentlyDisplayed =3D currentlyDisplayed; + } } Modified: branches/UIServer/core-uiserver/src/main/org/jboss/portal/uiserve= r/protocol/PortalObject.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/UIServer/core-uiserver/src/main/org/jboss/portal/uiserver/prot= ocol/PortalObject.java 2007-10-15 15:21:39 UTC (rev 8659) +++ branches/UIServer/core-uiserver/src/main/org/jboss/portal/uiserver/prot= ocol/PortalObject.java 2007-10-15 19:28:21 UTC (rev 8660) @@ -23,9 +23,11 @@ package org.jboss.portal.uiserver.protocol; = import java.io.Serializable; +import java.util.Map; import java.util.Collection; import java.util.ArrayList; import java.util.Iterator; +import java.util.HashMap; = /** * @author Sohil Shah @@ -37,6 +39,7 @@ protected String name =3D null; protected PortalObject parent =3D null; protected Collection children =3D null; + protected Map properties =3D null; = /** * = @@ -45,6 +48,7 @@ public PortalObject() { this.children =3D new ArrayList(); + this.properties =3D new HashMap(5); } = /** @@ -172,7 +176,25 @@ = /** * = + * @return + */ = + public Map getProperties() + { + return properties; + } + + /** + * = + * @param properties */ + public void setProperties(Map properties) + { + this.properties =3D properties; + } + + /** + * = + */ public String toString() { String rep =3D null; Modified: branches/UIServer/core-uiserver/src/main/org/jboss/portal/uiserve= r/protocol/Window.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/UIServer/core-uiserver/src/main/org/jboss/portal/uiserver/prot= ocol/Window.java 2007-10-15 15:21:39 UTC (rev 8659) +++ branches/UIServer/core-uiserver/src/main/org/jboss/portal/uiserver/prot= ocol/Window.java 2007-10-15 19:28:21 UTC (rev 8660) @@ -22,18 +22,219 @@ *************************************************************************= *****/ package org.jboss.portal.uiserver.protocol; = +import java.util.Map; +import java.util.HashMap; = +import org.jboss.portal.Mode; +import org.jboss.portal.WindowState; + + /** * @author Sohil Shah * */ -public class Window extends PortalObject +public class Window extends PortalObject implements Component { /** + * Title for this Window + */ + private String title =3D null; + + /** + * Content/Markup to be displayed inside this Window + */ + private String content =3D null; + + /** + * Content/Markup related to the header of this Window + */ + private final String headerContent; + + /** + * The State of this Window such as Normal, Maximized, Minimized etc + */ + private final WindowState windowState; + + /** + * The Mode of this Window such as View, Edit, Help etc + */ + private final Mode mode; + = + /** + * Runtime View related meta data associated with this particular windo= w. * = + * The meta data is provided in the form of Name/Value pairs with Name = being the key of the and Value being the Value + * of a Map entry */ + private Map viewMetaData =3D null; + = + = + /** + * = + * + */ + public Window() + { + super(); + this.viewMetaData =3D new HashMap(5); + this.headerContent =3D null; + this.windowState =3D null; + this.mode =3D null; + } + = + /** + * = + * + */ + public Window(String id,String title, String content, String headerCont= ent, WindowState windowState, Mode mode) + { + super(); + this.viewMetaData =3D new HashMap(5); + this.id =3D id; + this.title =3D title; + this.content =3D content; + this.headerContent =3D headerContent; + this.windowState =3D windowState; + this.mode =3D mode; + } + = + /** + * = + * @param id + * @param content + */ + public Window(String id, String content) + { + super(); + this.viewMetaData =3D new HashMap(5); + this.id =3D id; + this.content =3D content; + this.headerContent =3D null; + this.windowState =3D null; + this.mode =3D null; + } + = + /** + * = + * @param id + * @param content + */ + public Window(String id) + { + super(); + this.viewMetaData =3D new HashMap(5); + this.id =3D id; = + this.headerContent =3D null; + this.windowState =3D null; + this.mode =3D null; + } + = + = + /** + * = + * @return + */ + public String getContent() + { + return content; + } + + = + /** + * = + * @param content + */ + public void setContent(String content) + { + this.content =3D content; + } + + + /** + * = + * @return + */ + public String getHeaderContent() + { + return headerContent; + } + + + /** + * = + * @return + */ + public Mode getMode() + { + return mode; + } + + + /** + * = + * @return + */ + public String getTitle() + { + return title; + } + + + /** + * = + * @param title + */ + public void setTitle(String title) + { + this.title =3D title; + } + + + /** + * = + * @return + */ + public WindowState getWindowState() + { + return windowState; + } + + + /** + * = + */ public String toString() { return "Window: "+super.toString(); } + = + /** + * = + */ + public String getMarkup() + { + String markup =3D ""; + = + markup =3D this.content; + = + return markup; + } + + /** + * = + * @return + */ + public Map getViewMetaData() + { + return viewMetaData; + } + + /** + * = + * @param viewMetaData + */ + public void setViewMetaData(Map viewMetaData) + { + this.viewMetaData =3D viewMetaData; + } } Modified: branches/UIServer/uiserver/src/main/org/jboss/portal/test/uiserve= r/layout/TestFlexibleGrid.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/UIServer/uiserver/src/main/org/jboss/portal/test/uiserver/layo= ut/TestFlexibleGrid.java 2007-10-15 15:21:39 UTC (rev 8659) +++ branches/UIServer/uiserver/src/main/org/jboss/portal/test/uiserver/layo= ut/TestFlexibleGrid.java 2007-10-15 19:28:21 UTC (rev 8660) @@ -28,9 +28,9 @@ = import java.io.FileOutputStream; = -import org.jboss.portal.uiserver.layout.Container; -import org.jboss.portal.uiserver.layout.Window; -import org.jboss.portal.uiserver.layout.Page; +import org.jboss.portal.uiserver.protocol.Container; +import org.jboss.portal.uiserver.protocol.Window; +import org.jboss.portal.uiserver.protocol.Page; import org.jboss.portal.uiserver.layout.classic.FlexibleGrid; import org.jboss.portal.uiserver.layout.classic.FlexibleGridConstraints; import org.jboss.portal.uiserver.layout.classic.FlexibleGridLayoutManager; Modified: branches/UIServer/uiserver/src/main/org/jboss/portal/test/uiserve= r/layout/TestRegionLayoutManager.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/UIServer/uiserver/src/main/org/jboss/portal/test/uiserver/layo= ut/TestRegionLayoutManager.java 2007-10-15 15:21:39 UTC (rev 8659) +++ branches/UIServer/uiserver/src/main/org/jboss/portal/test/uiserver/layo= ut/TestRegionLayoutManager.java 2007-10-15 19:28:21 UTC (rev 8660) @@ -28,9 +28,9 @@ = import java.io.FileOutputStream; = -import org.jboss.portal.uiserver.layout.Container; -import org.jboss.portal.uiserver.layout.Window; -import org.jboss.portal.uiserver.layout.Page; +import org.jboss.portal.uiserver.protocol.Container; +import org.jboss.portal.uiserver.protocol.Window; +import org.jboss.portal.uiserver.protocol.Page; import org.jboss.portal.uiserver.layout.classic.RegionConstraints; import org.jboss.portal.uiserver.layout.classic.RegionLayoutManager; = Deleted: branches/UIServer/uiserver/src/main/org/jboss/portal/uiserver/layo= ut/Component.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/UIServer/uiserver/src/main/org/jboss/portal/uiserver/layout/Co= mponent.java 2007-10-15 15:21:39 UTC (rev 8659) +++ branches/UIServer/uiserver/src/main/org/jboss/portal/uiserver/layout/Co= mponent.java 2007-10-15 19:28:21 UTC (rev 8660) @@ -1,73 +0,0 @@ -/*************************************************************************= ***** - * JBoss, a division of Red Hat = * - * Copyright 2006, Red Hat Middleware, LLC, and individual = * - * contributors as indicated by the @authors tag. See the = * - * copyright.txt in the distribution for a full listing of = * - * individual contributors. = * - * = * - * This is free software; you can redistribute it and/or modify it = * - * under the terms of the GNU Lesser General Public License as = * - * published by the Free Software Foundation; either version 2.1 of = * - * the License, or (at your option) any later version. = * - * = * - * This software is distributed in the hope that it will be useful, = * - * but WITHOUT ANY WARRANTY; without even the implied warranty of = * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU = * - * Lesser General Public License for more details. = * - * = * - * You should have received a copy of the GNU Lesser General Public = * - * License along with this software; if not, write to the Free = * - * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA = * - * 02110-1301 USA, or see the FSF site: http://www.fsf.org. = * - *************************************************************************= *****/ -package org.jboss.portal.uiserver.layout; - -import java.io.Serializable; - -/** - * Component represents a UI entity that will be rendered eventually on th= e client - * = - * @author Sohil Shah - * - */ -public abstract class Component implements Serializable -{ - /** - * required unique id of the component. uniqueness in relation to - * other components added to the same instance of the container - */ - protected String id =3D null; - = - /** - * = - * @param id - */ - public Component(String id) - { - this.id =3D id; - } - - /** - * = - * @return - */ - public String getId() - { - return id; - } - - /** - * = - * @param id - */ - public void setId(String id) - { - this.id =3D id; - } - = - /** - * = - * @return - */ - public abstract String getMarkup(); = -} Deleted: branches/UIServer/uiserver/src/main/org/jboss/portal/uiserver/layo= ut/Container.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/UIServer/uiserver/src/main/org/jboss/portal/uiserver/layout/Co= ntainer.java 2007-10-15 15:21:39 UTC (rev 8659) +++ branches/UIServer/uiserver/src/main/org/jboss/portal/uiserver/layout/Co= ntainer.java 2007-10-15 19:28:21 UTC (rev 8660) @@ -1,134 +0,0 @@ -/*************************************************************************= ***** - * JBoss, a division of Red Hat = * - * Copyright 2006, Red Hat Middleware, LLC, and individual = * - * contributors as indicated by the @authors tag. See the = * - * copyright.txt in the distribution for a full listing of = * - * individual contributors. = * - * = * - * This is free software; you can redistribute it and/or modify it = * - * under the terms of the GNU Lesser General Public License as = * - * published by the Free Software Foundation; either version 2.1 of = * - * the License, or (at your option) any later version. = * - * = * - * This software is distributed in the hope that it will be useful, = * - * but WITHOUT ANY WARRANTY; without even the implied warranty of = * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU = * - * Lesser General Public License for more details. = * - * = * - * You should have received a copy of the GNU Lesser General Public = * - * License along with this software; if not, write to the Free = * - * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA = * - * 02110-1301 USA, or see the FSF site: http://www.fsf.org. = * - *************************************************************************= *****/ -package org.jboss.portal.uiserver.layout; - -import java.io.Serializable; -import java.util.List; -import java.util.ArrayList; - -/** - * Container is an organizational entity which aggregates the Components t= hat will be rendered on the client - * = - * @author Sohil Shah - * - */ -public class Container implements Serializable -{ - /** - * required unique id of the container. uniqueness in relation to - * other containers added to the same instance of the page - */ - protected String id =3D null; - = - = - /** - * = - */ - private List components =3D null; - = - /** - * = - * - */ - public Container(String id) - { - this.id =3D id; - this.components =3D new ArrayList(); - } - = - /** - * = - * @return - */ - public String getId() - { - return id; - } - - /** - * = - * @param id - */ - public void setId(String id) - { - this.id =3D id; - } - - = - /** - * = - * @return - */ - public List getComponents() - { - return components; - } - - /** - * = - * @param components - */ - public void setComponents(List components) - { - this.components =3D components; - } = - = - /** - * = - * @param componentId - * @return - */ - public Component getComponent(String componentId) - { - Component component =3D null; - = - if(this.components !=3D null) - { - for(int i=3D0;iSohil Shah * Modified: branches/UIServer/uiserver/src/main/org/jboss/portal/uiserver/lay= out/LayoutService.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/UIServer/uiserver/src/main/org/jboss/portal/uiserver/layout/La= youtService.java 2007-10-15 15:21:39 UTC (rev 8659) +++ branches/UIServer/uiserver/src/main/org/jboss/portal/uiserver/layout/La= youtService.java 2007-10-15 19:28:21 UTC (rev 8660) @@ -22,6 +22,8 @@ *************************************************************************= *****/ package org.jboss.portal.uiserver.layout; = +import org.jboss.portal.uiserver.protocol.Page; + /** * @author Sohil Shah * Deleted: branches/UIServer/uiserver/src/main/org/jboss/portal/uiserver/layo= ut/Page.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/UIServer/uiserver/src/main/org/jboss/portal/uiserver/layout/Pa= ge.java 2007-10-15 15:21:39 UTC (rev 8659) +++ branches/UIServer/uiserver/src/main/org/jboss/portal/uiserver/layout/Pa= ge.java 2007-10-15 19:28:21 UTC (rev 8660) @@ -1,83 +0,0 @@ -/*************************************************************************= ***** - * JBoss, a division of Red Hat = * - * Copyright 2006, Red Hat Middleware, LLC, and individual = * - * contributors as indicated by the @authors tag. See the = * - * copyright.txt in the distribution for a full listing of = * - * individual contributors. = * - * = * - * This is free software; you can redistribute it and/or modify it = * - * under the terms of the GNU Lesser General Public License as = * - * published by the Free Software Foundation; either version 2.1 of = * - * the License, or (at your option) any later version. = * - * = * - * This software is distributed in the hope that it will be useful, = * - * but WITHOUT ANY WARRANTY; without even the implied warranty of = * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU = * - * Lesser General Public License for more details. = * - * = * - * You should have received a copy of the GNU Lesser General Public = * - * License along with this software; if not, write to the Free = * - * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA = * - * 02110-1301 USA, or see the FSF site: http://www.fsf.org. = * - *************************************************************************= *****/ -package org.jboss.portal.uiserver.layout; - -import java.io.Serializable; -import java.util.List; -import java.util.ArrayList; - -/** - * A Page is a domain level representation of the final output produced by= the Portal. - * = - * It aggregates the output of multiple containers. It is decoupled from a= ny particular LayoutManager - * = - * Eventually the LayoutService processes an instance of a Page to properl= y layout the containers depending on - * the layout strategy of the LayoutManager - * = - * @author Sohil Shah - * - */ -public class Page implements Serializable -{ - /** - * A page consists of multiple containers that are to be displayed/aggr= egated along with their corresponding - * UI components - */ - private List containers =3D null; - = - /** - * = - * - */ - public Page() - { - this.containers =3D new ArrayList(); - } - - /** - * = - * @return - */ - public List getContainers() - { - return containers; - } - - /** - * = - * @param containers - */ - public void setContainers(List containers) - { - this.containers =3D containers; - } - = - /** - * = - * @param container - */ - public void addContainer(Container container) - { - this.getContainers().add(container); - } -} Deleted: branches/UIServer/uiserver/src/main/org/jboss/portal/uiserver/layo= ut/Window.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/UIServer/uiserver/src/main/org/jboss/portal/uiserver/layout/Wi= ndow.java 2007-10-15 15:21:39 UTC (rev 8659) +++ branches/UIServer/uiserver/src/main/org/jboss/portal/uiserver/layout/Wi= ndow.java 2007-10-15 19:28:21 UTC (rev 8660) @@ -1,87 +0,0 @@ -/*************************************************************************= ***** - * JBoss, a division of Red Hat = * - * Copyright 2006, Red Hat Middleware, LLC, and individual = * - * contributors as indicated by the @authors tag. See the = * - * copyright.txt in the distribution for a full listing of = * - * individual contributors. = * - * = * - * This is free software; you can redistribute it and/or modify it = * - * under the terms of the GNU Lesser General Public License as = * - * published by the Free Software Foundation; either version 2.1 of = * - * the License, or (at your option) any later version. = * - * = * - * This software is distributed in the hope that it will be useful, = * - * but WITHOUT ANY WARRANTY; without even the implied warranty of = * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU = * - * Lesser General Public License for more details. = * - * = * - * You should have received a copy of the GNU Lesser General Public = * - * License along with this software; if not, write to the Free = * - * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA = * - * 02110-1301 USA, or see the FSF site: http://www.fsf.org. = * - *************************************************************************= *****/ -package org.jboss.portal.uiserver.layout; - -/** - * Window is a UI component which represents a Portlet Window and its corr= esponding markup which will be eventually rendered on the client - * = - * @author Sohil Shah - * - */ -public class Window extends Component -{ - /** - * = - */ - private String content =3D null; - = - /** - * = - * @param id - */ - public Window(String id) - { - super(id); - } - = - /** - * = - * @param id - * @param content markup content produced by a portlet to be display= ed inside this window = - */ - public Window(String id,String content) - { - this(id); - this.content =3D content; - } - = - /** - * = - * @return - */ - public String getContent() - { - return content; - } - - /** - * = - * @param content - */ - public void setContent(String content) - { - this.content =3D content; - } - - /** - * = - */ - public String getMarkup() - { - String markup =3D ""; - = - markup =3D this.content; - = - return markup; - } = -} Modified: branches/UIServer/uiserver/src/main/org/jboss/portal/uiserver/lay= out/classic/FlexibleGrid.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/UIServer/uiserver/src/main/org/jboss/portal/uiserver/layout/cl= assic/FlexibleGrid.java 2007-10-15 15:21:39 UTC (rev 8659) +++ branches/UIServer/uiserver/src/main/org/jboss/portal/uiserver/layout/cl= assic/FlexibleGrid.java 2007-10-15 19:28:21 UTC (rev 8660) @@ -24,8 +24,8 @@ = import org.apache.log4j.Logger; = -import org.jboss.portal.uiserver.layout.Container; -import org.jboss.portal.uiserver.layout.Window; +import org.jboss.portal.uiserver.protocol.Container; +import org.jboss.portal.uiserver.protocol.Window; = import java.io.Serializable; = Modified: branches/UIServer/uiserver/src/main/org/jboss/portal/uiserver/lay= out/classic/FlexibleGridLayoutManager.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/UIServer/uiserver/src/main/org/jboss/portal/uiserver/layout/cl= assic/FlexibleGridLayoutManager.java 2007-10-15 15:21:39 UTC (rev 8659) +++ branches/UIServer/uiserver/src/main/org/jboss/portal/uiserver/layout/cl= assic/FlexibleGridLayoutManager.java 2007-10-15 19:28:21 UTC (rev 8660) @@ -22,10 +22,11 @@ *************************************************************************= *****/ package org.jboss.portal.uiserver.layout.classic; = -import org.jboss.portal.uiserver.layout.Container; +import org.jboss.portal.uiserver.protocol.Container; +import org.jboss.portal.uiserver.protocol.Page; import org.jboss.portal.uiserver.layout.LayoutManager; -import org.jboss.portal.uiserver.layout.Page; = + import java.util.List; import java.util.ArrayList; = Modified: branches/UIServer/uiserver/src/main/org/jboss/portal/uiserver/lay= out/classic/RegionLayoutManager.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/UIServer/uiserver/src/main/org/jboss/portal/uiserver/layout/cl= assic/RegionLayoutManager.java 2007-10-15 15:21:39 UTC (rev 8659) +++ branches/UIServer/uiserver/src/main/org/jboss/portal/uiserver/layout/cl= assic/RegionLayoutManager.java 2007-10-15 19:28:21 UTC (rev 8660) @@ -26,9 +26,9 @@ import java.util.ArrayList; = import org.jboss.portal.uiserver.layout.LayoutManager; -import org.jboss.portal.uiserver.layout.Page; -import org.jboss.portal.uiserver.layout.Container; -import org.jboss.portal.uiserver.layout.Window; +import org.jboss.portal.uiserver.protocol.Page; +import org.jboss.portal.uiserver.protocol.Container; +import org.jboss.portal.uiserver.protocol.Window; = /** * This layout manager splits the page up into Regions. Containers which c= ontain the Portlet Windows Modified: branches/UIServer/uiserver/src/main/org/jboss/portal/uiserver/ser= vice/UIServer.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/UIServer/uiserver/src/main/org/jboss/portal/uiserver/service/U= IServer.java 2007-10-15 15:21:39 UTC (rev 8659) +++ branches/UIServer/uiserver/src/main/org/jboss/portal/uiserver/service/U= IServer.java 2007-10-15 19:28:21 UTC (rev 8660) @@ -32,9 +32,11 @@ import org.jboss.mx.util.MBeanProxy; import org.jboss.mx.util.MBeanServerLocator; = -import org.jboss.portal.uiserver.layout.Container; -import org.jboss.portal.uiserver.layout.Page; -import org.jboss.portal.uiserver.layout.Window; +import org.jboss.portal.uiserver.protocol.Container; +import org.jboss.portal.uiserver.protocol.Page; +import org.jboss.portal.uiserver.protocol.Window; +import org.jboss.portal.uiserver.protocol.PortalObject; +import org.jboss.portal.uiserver.protocol.Portal; import org.jboss.portal.uiserver.layout.LayoutManager; import org.jboss.portal.uiserver.layout.classic.FlexibleGrid; import org.jboss.portal.uiserver.layout.classic.FlexibleGridConstraints; @@ -42,13 +44,10 @@ import org.jboss.portal.uiserver.layout.classic.RegionLayoutManager; import org.jboss.portal.uiserver.layout.classic.RegionConstraints; = -import org.jboss.portal.uiserver.protocol.PageResult; -import org.jboss.portal.uiserver.protocol.WindowResult; -import org.jboss.portal.uiserver.protocol.PortalObject; -import org.jboss.portal.uiserver.protocol.Portal; = import org.jboss.portal.uiserver.processor.Processor; import org.jboss.portal.uiserver.processor.ProcessorRequest; +import org.jboss.portal.uiserver.processor.ProcessorResponse; import org.jboss.portal.uiserver.spi.PortalObjectReader; = import org.jboss.portal.jems.as.system.AbstractJBossService; @@ -94,74 +93,128 @@ * */ = public void handle(ServerInvocation invocation) throws ServerException - { = - String portalRequestPath =3D invocation.getServerContext().getPortal= RequestPath(); - = - //Process the incoming request and produce a proper ProcessorRequest= to be - //processed by the core Portal component = - Portal portal =3D null; - PortalObject target =3D null; - String actionType =3D "render"; - StringTokenizer st =3D new StringTokenizer(portalRequestPath, "/"); - StringBuffer buffer =3D new StringBuffer("/"); - while(st.hasMoreTokens()) + { = + try { - String token =3D st.nextToken(); = - if(portal =3D=3D null) + String portalRequestPath =3D invocation.getServerContext().getPor= talRequestPath(); + = + //Process the incoming request and produce a proper ProcessorRequ= est to be + //processed by the core Portal component = + Portal portal =3D null; + PortalObject target =3D null; + String actionType =3D "render"; + StringTokenizer st =3D new StringTokenizer(portalRequestPath, "/"= ); + StringBuffer buffer =3D new StringBuffer("/"); + while(st.hasMoreTokens()) { - portal =3D this.portalObjectReader.findPortal(token); - if(portal !=3D null) + String token =3D st.nextToken(); = + if(portal =3D=3D null) { + portal =3D this.portalObjectReader.findPortal(token); + if(portal !=3D null) + { + buffer.append(token); + if(st.hasMoreTokens()) + { + buffer.append("/"); + } + } + } + else + { buffer.append(token); + String id =3D buffer.toString(); if(st.hasMoreTokens()) { buffer.append("/"); } - } - } - else - { - buffer.append(token); - String id =3D buffer.toString(); - if(st.hasMoreTokens()) - { - buffer.append("/"); - } - = - if(target =3D=3D null) - { - target =3D portal.findChild(id); + = if(target =3D=3D null) { - target =3D this.portalObjectReader.findPortalObject(port= al, id); + target =3D portal.findChild(id); + if(target =3D=3D null) + { + target =3D this.portalObjectReader.findPortalObject(p= ortal, id); + } } - } - else - { - PortalObject cour =3D target.findChild(id); - if(cour =3D=3D null) - { - target =3D this.portalObjectReader.findPortalObject(targ= et, id); - } else { - target =3D cour; + PortalObject cour =3D target.findChild(id); + if(cour =3D=3D null) + { + target =3D this.portalObjectReader.findPortalObject(t= arget, id); + } + else + { + target =3D cour; + } } + } = + } = + = + String actionParam =3D invocation.getServerContext().getClientReq= uest().getParameter("action"); + if(actionParam !=3D null && actionParam.trim().length()>0 && acti= onParam.equals("1")) + { + actionType =3D "action"; + } + = + ProcessorRequest processorRequest =3D new ProcessorRequest(action= Type, invocation, portal, target); + ProcessorResponse processorResponse =3D this.processor.process(pr= ocessorRequest); + = + //Go ahead and render to the client based on ProcessorResponse re= ceived from the core Portal = + if(processorResponse !=3D null) + { + Page displayedPage =3D processorResponse.findDisplayedPage(); + if(displayedPage !=3D null) + { + this.render(invocation.getServerContext().getClientResponse= ().getWriter(), = + displayedPage); } - } = - } = - = - String actionParam =3D invocation.getServerContext().getClientReques= t().getParameter("action"); - if(actionParam !=3D null && actionParam.trim().length()>0 && actionP= aram.equals("1")) + } + } + catch(Exception e) { - actionType =3D "action"; + throw new ServerException(e); } - = - ProcessorRequest processorRequest =3D new ProcessorRequest(actionTyp= e, invocation, portal, target); - this.processor.process(processorRequest); + } = + //---------------------------------------------------------------------= ---------------------------------------------------------------------------= ----------- + /** + * = + */ + public PortalObjectReader getPortalObjectReader() + { + return portalObjectReader; } = /** + * = + * @param portalObjectReader + */ + public void setPortalObjectReader(PortalObjectReader portalObjectReader) + { + this.portalObjectReader =3D portalObjectReader; + } + + /** + * = + * @return + */ + public Processor getProcessor() + { + return processor; + } + + /** + * = + * @param processor + */ + public void setProcessor(Processor processor) + { + this.processor =3D processor; + } + //---------All these are just helper methods for the prototype---------= ---------------------------------------------------------------------------= ----------- + //----It containts mostly hard coded logic for the prototype-----------= ---------------------------------------------------------------------------= ----------- + /** * Based on the latest design discussion, this method is not needed. * = * This will be an implementation detail of the UIServer processing the= Response that is sent back to it @@ -170,7 +223,7 @@ * @param clientConnection * @param page */ - public void render(PrintWriter clientConnection, PageResult pageResult) + private void render(PrintWriter clientConnection, Page pageResult) { /** * Special Note: Currently this prototype code and layout configurat= ion including page result creation is hard coded for the purpose @@ -183,20 +236,19 @@ * = */ = - = /** * Some flexible grid layout testing code */ - //Object[] gridData =3D this.getFlexibleGridLayoutManager(pageResult= ); - //Page page =3D (Page)gridData[0]; - //LayoutManager layoutManager =3D (LayoutManager)gridData[1]; = + Object[] gridData =3D this.getFlexibleGridLayoutManager(pageResult); + Page page =3D (Page)gridData[0]; + LayoutManager layoutManager =3D (LayoutManager)gridData[1]; = = /** * Some region layout testing code */ - Object[] regionData =3D this.getRegionBasedLayoutManager(pageResult); - Page page =3D (Page)regionData[0]; - LayoutManager layoutManager =3D (LayoutManager)regionData[1]; + //Object[] regionData =3D this.getRegionBasedLayoutManager(pageResul= t); + //Page page =3D (Page)regionData[0]; + //LayoutManager layoutManager =3D (LayoutManager)regionData[1]; = //Peform Page Layout String output =3D layoutManager.doLayout(page); @@ -212,49 +264,13 @@ //Sending the results back to the Client clientConnection.write(buffer.toString()); clientConnection.flush(); - } = - //---------------------------------------------------------------------= ---------------------------------------------------------------------------= ----------- - /** - * = - */ - public PortalObjectReader getPortalObjectReader() - { - return portalObjectReader; } - + = /** * = - * @param portalObjectReader */ - public void setPortalObjectReader(PortalObjectReader portalObjectReader) + private Object[] getFlexibleGridLayoutManager(Page pageResult) { - this.portalObjectReader =3D portalObjectReader; - } - - /** - * = - * @return - */ - public Processor getProcessor() - { - return processor; - } - - /** - * = - * @param processor - */ - public void setProcessor(Processor processor) - { - this.processor =3D processor; - } - //---------All these are just helper methods for the prototype---------= ---------------------------------------------------------------------------= ----------- - //----It containts mostly hard coded logic for the prototype-----------= ---------------------------------------------------------------------------= ----------- - /** - * = - */ - private Object[] getFlexibleGridLayoutManager(PageResult pageResult) - { /** * Hard coding the FlexibleGridLayout Management here */ @@ -305,7 +321,7 @@ int counter =3D 0; for(Iterator itr=3Dwindows.iterator();itr.hasNext();) { - WindowResult result =3D (WindowResult)itr.next(); + Window result =3D (Window)itr.next(); = switch(counter) { @@ -380,7 +396,7 @@ * @param pageResult * @return */ - private Object[] getRegionBasedLayoutManager(PageResult pageResult) + private Object[] getRegionBasedLayoutManager(Page pageResult) { Page page =3D new Page(); Container left =3D new Container("left"); @@ -393,7 +409,7 @@ int counter =3D 0; for(Iterator itr=3Dwindows.iterator();itr.hasNext();) { - WindowResult result =3D (WindowResult)itr.next(); + Window result =3D (Window)itr.next(); Window uiWindow =3D new Window(result.getId()); uiWindow.setContent(result.getContent()); switch(counter) --===============2428428492640803324==-- From portal-commits at lists.jboss.org Mon Oct 15 16:06:38 2007 Content-Type: multipart/mixed; boundary="===============1685180440891525877==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8661 - in modules/test/trunk: unit/src/main/org/jboss/test/unit and 11 other directories. Date: Mon, 15 Oct 2007 16:06:37 -0400 Message-ID: --===============1685180440891525877== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: julien(a)jboss.com Date: 2007-10-15 16:06:37 -0400 (Mon, 15 Oct 2007) New Revision: 8661 Added: modules/test/trunk/unit/src/main/org/jboss/unit/runner/event/EndTestSuit= eEvent.java modules/test/trunk/unit/src/main/org/jboss/unit/runner/event/StartTestSu= iteEvent.java Modified: modules/test/trunk/remote/src/main/org/jboss/unit/remote/driver/RemoteTe= stDriverClient.java modules/test/trunk/remote/src/main/org/jboss/unit/remote/driver/TestConv= ersation.java modules/test/trunk/unit/src/main/org/jboss/test/unit/AllTests.java modules/test/trunk/unit/src/main/org/jboss/test/unit/runner/EventList.ja= va modules/test/trunk/unit/src/main/org/jboss/test/unit/runner/GenericTestR= unnerTests.java modules/test/trunk/unit/src/main/org/jboss/test/unit/runner/POJOTestRunn= erTests.java modules/test/trunk/unit/src/main/org/jboss/test/unit/runner/TestDriverRu= nnerTests.java modules/test/trunk/unit/src/main/org/jboss/unit/report/impl/writer/Print= Listener.java modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/DelegateRunn= erEventFilter.java modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/driver/TestD= riverRunner.java modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/generic/Gene= ricTestRunner.java modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/pojo/POJOTes= tRunner.java modules/test/trunk/unit/src/main/org/jboss/unit/runner/model/ModelBuilde= r.java modules/test/trunk/unit/src/main/org/jboss/unit/runner/model/generic/Gen= ericTestSuiteDef.java modules/test/trunk/unit/src/resources/jboss-unit-jar/org/jboss/unit/runn= er/model/jboss-unit_1_0.xsd modules/test/trunk/unit/src/resources/test/org/jboss/test/unit/runner/mo= del/f2.xml Log: - introduced test suite events - improve the console formatter to look like junit console report Modified: modules/test/trunk/remote/src/main/org/jboss/unit/remote/driver/R= emoteTestDriverClient.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/remote/src/main/org/jboss/unit/remote/driver/RemoteT= estDriverClient.java 2007-10-15 19:28:21 UTC (rev 8660) +++ modules/test/trunk/remote/src/main/org/jboss/unit/remote/driver/RemoteT= estDriverClient.java 2007-10-15 20:06:37 UTC (rev 8661) @@ -36,6 +36,7 @@ import org.jboss.portal.test.framework.server.NodeId; import org.jboss.portal.test.framework.server.Node; import org.jboss.portal.test.framework.server.NodeManager; +import org.jboss.portal.test.framework.deployment.Deployer; import org.jboss.kernel.plugins.bootstrap.basic.BasicBootstrap; import org.jboss.kernel.plugins.deployment.xml.BeanXMLDeployer; import org.jboss.kernel.spi.deployment.KernelDeployment; @@ -72,6 +73,9 @@ /** . */ private String archivePath; = + /** . */ + private Deployer deployer; + // public String getInitialNodeId() // { // return initialNodeId; @@ -109,6 +113,17 @@ this.protocolHandler =3D protocolHandler; } = + public Deployer getDeployer() + { + return deployer; + } + + @Inject(bean=3D"Deployer") + public void setDeployer(Deployer deployer) + { + this.deployer =3D deployer; + } + public RemoteTestDriver getServer(Node node) { return (RemoteTestDriver)node.lookupService(RemoteTestDriver.SERVICE= _ID); @@ -154,6 +169,14 @@ beanDeployer =3D new BeanXMLDeployer(getKernel()); deployment =3D beanDeployer.deploy(url); beanDeployer.validate(); + + // Perform the remote deployment if necessary + String archiveId =3D context.getProperty("archiveId"); + if (archiveId !=3D null) + { + Node node =3D nodeManager.getNode(NodeId.DEFAULT); + deployer.deploy(archivePath, archiveId, node); + } } catch (Throwable throwable) { Modified: modules/test/trunk/remote/src/main/org/jboss/unit/remote/driver/T= estConversation.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/remote/src/main/org/jboss/unit/remote/driver/TestCon= versation.java 2007-10-15 19:28:21 UTC (rev 8660) +++ modules/test/trunk/remote/src/main/org/jboss/unit/remote/driver/TestCon= versation.java 2007-10-15 20:06:37 UTC (rev 8661) @@ -26,9 +26,11 @@ import org.jboss.unit.driver.DriverCommand; import org.jboss.unit.driver.command.StartTestCommand; import org.jboss.unit.driver.response.EndTestResponse; +import org.jboss.unit.driver.response.FailureResponse; import org.jboss.unit.remote.RequestContext; import org.jboss.unit.remote.ResponseContext; import org.jboss.unit.TestId; +import org.jboss.unit.Failure; import org.jboss.portal.test.framework.server.Node; = import java.util.Map; @@ -109,7 +111,7 @@ DriverResponse response =3D respCtx.getResponse(); = // - if (response instanceof EndTestResponse) + if (response instanceof EndTestResponse || response instanceof Failu= reResponse) { return response; } @@ -118,6 +120,12 @@ commandContext =3D protocolHandler.handleResponse(this, respCtx); = // + if (commandContext =3D=3D null) + { + return new FailureResponse(Failure.createErrorFailure("Response "= + response + " was not handled")); + } + + // return handleCommand(commandContext); } = Modified: modules/test/trunk/unit/src/main/org/jboss/test/unit/AllTests.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/test/unit/AllTests.java 2007= -10-15 19:28:21 UTC (rev 8660) +++ modules/test/trunk/unit/src/main/org/jboss/test/unit/AllTests.java 2007= -10-15 20:06:37 UTC (rev 8661) @@ -66,11 +66,11 @@ = // BlahTests.main(args); - = + // BlahTestTwo.main(args); - = - // = + + // JUnitReporterTests.main(args); } } Modified: modules/test/trunk/unit/src/main/org/jboss/test/unit/runner/Event= List.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/test/unit/runner/EventList.j= ava 2007-10-15 19:28:21 UTC (rev 8660) +++ modules/test/trunk/unit/src/main/org/jboss/test/unit/runner/EventList.j= ava 2007-10-15 20:06:37 UTC (rev 8661) @@ -31,6 +31,8 @@ import org.jboss.unit.runner.event.StartTestEvent; import org.jboss.unit.runner.event.EndTestEvent; import org.jboss.unit.runner.event.EndRunnerEvent; +import org.jboss.unit.runner.event.StartTestSuiteEvent; +import org.jboss.unit.runner.event.EndTestSuiteEvent; import static org.jboss.unit.api.Assert.*; import org.jboss.unit.TestId; = @@ -59,6 +61,34 @@ return assertStartRunnerEvent(event); } = + protected StartTestSuiteEvent assertStartTestSuiteEvent(int index, Test= Id expectedTestId) + { + assertTrue(events.size() > index); + TestRunnerEvent event =3D assertNotNull(events.get(index)); + return assertStartTestSuiteEvent(event, expectedTestId); + } + + protected StartTestSuiteEvent assertStartTestSuiteEvent(TestRunnerEvent= event, TestId expectedTestId) + { + StartTestSuiteEvent startEvent =3D assertInstanceOf(event, StartTest= SuiteEvent.class); + assertEquals(expectedTestId, startEvent.getTestId()); + return startEvent; + } + + protected EndTestSuiteEvent assertEndTestSuiteEvent(int index, TestId e= xpectedTestId) + { + assertTrue(events.size() > index); + TestRunnerEvent event =3D assertNotNull(events.get(index)); + return assertEndTestSuiteEvent(event, expectedTestId); + } + + protected EndTestSuiteEvent assertEndTestSuiteEvent(TestRunnerEvent eve= nt, TestId expectedTestId) + { + EndTestSuiteEvent endEvent =3D assertInstanceOf(event, EndTestSuiteE= vent.class); + assertEquals(expectedTestId, endEvent.getTestId()); + return endEvent; + } + protected StartTestEvent assertStartTestEvent(int index, TestId expecte= dTestId) { assertTrue(events.size() > index); Modified: modules/test/trunk/unit/src/main/org/jboss/test/unit/runner/Gener= icTestRunnerTests.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/test/unit/runner/GenericTest= RunnerTests.java 2007-10-15 19:28:21 UTC (rev 8660) +++ modules/test/trunk/unit/src/main/org/jboss/test/unit/runner/GenericTest= RunnerTests.java 2007-10-15 20:06:37 UTC (rev 8661) @@ -75,7 +75,7 @@ Driver1.init(); SimpleTestCaseInfo fooInfo =3D new SimpleTestCaseInfo("foo"); Driver1.testSuiteInfo.addTest(fooInfo); - GenericTestSuiteDef suite =3D new GenericTestSuiteDef("generic", Dri= ver1.class.getName()); + GenericTestSuiteDef suite =3D new GenericTestSuiteDef(Driver1.class.= getName()); suite.setProperty("foo_def", "foo_def_value"); GenericTestRunner runner =3D new GenericTestRunner(suite); runner.run(new TestRunnerContextSupport()); @@ -89,7 +89,7 @@ Driver1.init(); SimpleTestCaseInfo fooInfo =3D new SimpleTestCaseInfo("foo"); Driver1.testSuiteInfo.addTest(fooInfo); - GenericTestSuiteDef suite =3D new GenericTestSuiteDef("generic", Dri= ver1.class.getName()); + GenericTestSuiteDef suite =3D new GenericTestSuiteDef(Driver1.class.= getName()); GenericTestRunner runner =3D new GenericTestRunner(suite); Map properties =3D new HashMap(); properties.put("foo_runner", "foo_runner_value"); @@ -104,7 +104,7 @@ Driver1.init(); SimpleTestCaseInfo fooInfo =3D new SimpleTestCaseInfo("foo"); Driver1.testSuiteInfo.addTest(fooInfo); - GenericTestSuiteDef suite =3D new GenericTestSuiteDef("generic", Dri= ver1.class.getName()); + GenericTestSuiteDef suite =3D new GenericTestSuiteDef(Driver1.class.= getName()); suite.setProperty("foo_def", "foo_def_value"); suite.setProperty("bar", "bar_def_value"); GenericTestRunner runner =3D new GenericTestRunner(suite); @@ -125,7 +125,7 @@ SimpleTestCaseInfo fooInfo =3D new SimpleTestCaseInfo("foo"); fooInfo.addParameter(new SimpleParameterInfo("abc")); Driver1.testSuiteInfo.addTest(fooInfo); - GenericTestSuiteDef suite =3D new GenericTestSuiteDef("generic", Dri= ver1.class.getName()); + GenericTestSuiteDef suite =3D new GenericTestSuiteDef(Driver1.class.= getName()); TestDef foo =3D new TestDef(new TestId("foo")); suite.addTest(foo); ParametersDef fooParameters =3D new ParametersDef(); @@ -134,13 +134,14 @@ EventList events =3D new EventList(); GenericTestRunner runner =3D new GenericTestRunner(suite); runner.run(new TestRunnerContextSupport(events)); - assertEquals(6, events.events.size()); + assertEquals(8, events.events.size()); events.assertStartRunnerEvent(0); - events.assertStartTestEvent(1, new TestId(Driver1.class.getName(), "= foo")); - events.assertEndTestEvent(2, new TestId(Driver1.class.getName(), "fo= o"), new TestSuccess(0)); - events.assertStartTestEvent(3, new TestId(Driver1.class.getName(), "= foo")); - events.assertEndTestEvent(4, new TestId(Driver1.class.getName(), "fo= o"), new TestSuccess(0)); - events.assertEndRunnerEvent(5); + events.assertStartTestSuiteEvent(1, new TestId()); + events.assertStartTestEvent(2, new TestId("foo")); + events.assertEndTestEvent(3, new TestId("foo"), new TestSuccess(0)); + events.assertStartTestEvent(4, new TestId("foo")); + events.assertEndTestEvent(5, new TestId("foo"), new TestSuccess(0)); + events.assertEndRunnerEvent(7); assertEquals(list(new TestId("foo"), new TestId("foo")), Driver1.ids= ); HashMap expectedParametrization1 =3D new HashMap(); HashMap expectedParametrization2 =3D new HashMap(); @@ -155,7 +156,7 @@ SimpleTestCaseInfo fooInfo =3D new SimpleTestCaseInfo("foo"); fooInfo.addParameter(new SimpleParameterInfo("abc")); Driver1.testSuiteInfo.addTest(fooInfo); - GenericTestSuiteDef suite =3D new GenericTestSuiteDef("generic", Dri= ver1.class.getName()); + GenericTestSuiteDef suite =3D new GenericTestSuiteDef(Driver1.class.= getName()); TestDef foo =3D new TestDef(new TestId("foo")); suite.addTest(foo); ParametersDef fooParameters =3D new ParametersDef(); @@ -166,11 +167,11 @@ EventList events =3D new EventList(); GenericTestRunner runner =3D new GenericTestRunner(suite); runner.run(new TestRunnerContextSupport(new ParametrizationSet(param= etrizations), events)); - assertEquals(4, events.events.size()); + assertEquals(6, events.events.size()); events.assertStartRunnerEvent(0); - events.assertStartTestEvent(1, new TestId(Driver1.class.getName(), "= foo")); - events.assertEndTestEvent(2, new TestId(Driver1.class.getName(), "fo= o"), new TestSuccess(0)); - events.assertEndRunnerEvent(3); + events.assertStartTestEvent(2, new TestId("foo")); + events.assertEndTestEvent(3, new TestId("foo"), new TestSuccess(0)); + events.assertEndRunnerEvent(5); assertEquals(list(new TestId("foo")), Driver1.ids); HashMap expectedParametrization1 =3D new HashMap(); expectedParametrization1.put("abc", "def"); @@ -180,13 +181,13 @@ private static void testNoTestCase() { Driver1.init(); - GenericTestSuiteDef suite =3D new GenericTestSuiteDef("generic", Dri= ver1.class.getName()); + GenericTestSuiteDef suite =3D new GenericTestSuiteDef(Driver1.class.= getName()); EventList events =3D new EventList(); GenericTestRunner runner =3D new GenericTestRunner(suite); runner.run(new TestRunnerContextSupport(events)); - assertEquals(2, events.events.size()); + assertEquals(4, events.events.size()); events.assertStartRunnerEvent(0); - events.assertEndRunnerEvent(1); + events.assertEndRunnerEvent(3); assertEquals(list(), Driver1.ids); assertEquals(list(), Driver1.parametrizations); } @@ -195,16 +196,16 @@ { Driver1.init(); Driver1.testSuiteInfo.addTest(new SimpleTestCaseInfo("foo")); - GenericTestSuiteDef suite =3D new GenericTestSuiteDef("generic", Dri= ver1.class.getName()); + GenericTestSuiteDef suite =3D new GenericTestSuiteDef(Driver1.class.= getName()); suite.addTest(new TestDef(new TestId("foo"))); EventList events =3D new EventList(); GenericTestRunner runner =3D new GenericTestRunner(suite); runner.run(new TestRunnerContextSupport(events)); - assertEquals(4, events.events.size()); + assertEquals(6, events.events.size()); events.assertStartRunnerEvent(0); - events.assertStartTestEvent(1, new TestId(Driver1.class.getName(), "= foo")); - events.assertEndTestEvent(2, new TestId(Driver1.class.getName(), "fo= o"), new TestSuccess(0)); - events.assertEndRunnerEvent(3); + events.assertStartTestEvent(2, new TestId("foo")); + events.assertEndTestEvent(3, new TestId("foo"), new TestSuccess(0)); + events.assertEndRunnerEvent(5); assertEquals(list(new TestId("foo")), Driver1.ids); assertEquals(list(new HashMap()), Driver1.parametrizations); } @@ -214,16 +215,16 @@ Driver1.init(); Driver1.testSuiteInfo.addTest(new SimpleTestCaseInfo("foo")); Driver1.testSuiteInfo.addTest(new SimpleTestCaseInfo("bar")); - GenericTestSuiteDef suite =3D new GenericTestSuiteDef("generic", Dri= ver1.class.getName()); + GenericTestSuiteDef suite =3D new GenericTestSuiteDef(Driver1.class.= getName()); suite.addTest(new TestDef(new TestId("foo"))); EventList events =3D new EventList(); GenericTestRunner runner =3D new GenericTestRunner(suite); runner.run(new TestRunnerContextSupport(events)); - assertEquals(4, events.events.size()); + assertEquals(6, events.events.size()); events.assertStartRunnerEvent(0); - events.assertStartTestEvent(1, new TestId(Driver1.class.getName(), "= foo")); - events.assertEndTestEvent(2, new TestId(Driver1.class.getName(), "fo= o"), new TestSuccess(0)); - events.assertEndRunnerEvent(3); + events.assertStartTestEvent(2, new TestId("foo")); + events.assertEndTestEvent(3, new TestId("foo"), new TestSuccess(0)); + events.assertEndRunnerEvent(5); assertEquals(list(new TestId("foo")), Driver1.ids); assertEquals(list(new HashMap()), Driver1.parametrizations); } @@ -233,17 +234,17 @@ Driver1.init(); Driver1.testSuiteInfo.addTest(new SimpleTestCaseInfo("foo")); Driver1.testSuiteInfo.addTest(new SimpleTestCaseInfo("bar")); - GenericTestSuiteDef suite =3D new GenericTestSuiteDef("generic", Dri= ver1.class.getName()); + GenericTestSuiteDef suite =3D new GenericTestSuiteDef(Driver1.class.= getName()); EventList events =3D new EventList(); GenericTestRunner runner =3D new GenericTestRunner(suite); runner.run(new TestRunnerContextSupport(events)); - assertEquals(6, events.events.size()); + assertEquals(8, events.events.size()); events.assertStartRunnerEvent(0); - events.assertStartTestEvent(1, new TestId(Driver1.class.getName(), "= foo")); - events.assertEndTestEvent(2, new TestId(Driver1.class.getName(), "fo= o"), new TestSuccess(0)); - events.assertStartTestEvent(3, new TestId(Driver1.class.getName(), "= bar")); - events.assertEndTestEvent(4, new TestId(Driver1.class.getName(), "ba= r"), new TestSuccess(0)); - events.assertEndRunnerEvent(5); + events.assertStartTestEvent(2, new TestId("foo")); + events.assertEndTestEvent(3, new TestId("foo"), new TestSuccess(0)); + events.assertStartTestEvent(4, new TestId("bar")); + events.assertEndTestEvent(5, new TestId("bar"), new TestSuccess(0)); + events.assertEndRunnerEvent(7); assertEquals(list(new TestId("foo"), new TestId("bar")), Driver1.ids= ); assertEquals(list(new HashMap(), new HashMap()), Driver1.parametriza= tions); } Modified: modules/test/trunk/unit/src/main/org/jboss/test/unit/runner/POJOT= estRunnerTests.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/test/unit/runner/POJOTestRun= nerTests.java 2007-10-15 19:28:21 UTC (rev 8660) +++ modules/test/trunk/unit/src/main/org/jboss/test/unit/runner/POJOTestRun= nerTests.java 2007-10-15 20:06:37 UTC (rev 8661) @@ -75,11 +75,11 @@ assertEquals("bar_def", pojo1_1.foo); = // - assertEquals(4, listener.events.size()); + assertEquals(6, listener.events.size()); listener.assertStartRunnerEvent(0); - listener.assertStartTestEvent(1, new TestId(POJO1.class.getName(), "= test")); - listener.assertEndTestEvent(2, new TestId(POJO1.class.getName(), "te= st"), new TestSuccess(0)); - listener.assertEndRunnerEvent(3); + listener.assertStartTestEvent(2, new TestId("test")); + listener.assertEndTestEvent(3, new TestId("test"), new TestSuccess(0= )); + listener.assertEndRunnerEvent(5); } = private static void testPOJO1_2() @@ -110,13 +110,13 @@ assertEquals("bar_runtime_2", pojo1_2.foo); = // - assertEquals(6, listener.events.size()); + assertEquals(8, listener.events.size()); listener.assertStartRunnerEvent(0); - listener.assertStartTestEvent(1, new TestId(POJO1.class.getName(), "= test")); - listener.assertEndTestEvent(2, new TestId(POJO1.class.getName(), "te= st"), new TestSuccess(0)); - listener.assertStartTestEvent(3, new TestId(POJO1.class.getName(), "= test")); - listener.assertEndTestEvent(4, new TestId(POJO1.class.getName(), "te= st"), new TestSuccess(0)); - listener.assertEndRunnerEvent(5); + listener.assertStartTestEvent(2, new TestId("test")); + listener.assertEndTestEvent(3, new TestId("test"), new TestSuccess(0= )); + listener.assertStartTestEvent(4, new TestId("test")); + listener.assertEndTestEvent(5, new TestId("test"), new TestSuccess(0= )); + listener.assertEndRunnerEvent(7); } = public static class POJO1 Modified: modules/test/trunk/unit/src/main/org/jboss/test/unit/runner/TestD= riverRunnerTests.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/test/unit/runner/TestDriverR= unnerTests.java 2007-10-15 19:28:21 UTC (rev 8660) +++ modules/test/trunk/unit/src/main/org/jboss/test/unit/runner/TestDriverR= unnerTests.java 2007-10-15 20:06:37 UTC (rev 8661) @@ -34,6 +34,7 @@ import org.jboss.unit.driver.response.FailureResponse; import org.jboss.unit.info.impl.SimpleTestCaseInfo; import org.jboss.unit.info.impl.SimpleParameterInfo; +import org.jboss.unit.info.impl.SimpleTestSuiteInfo; import org.jboss.unit.TestId; import org.jboss.unit.FailureType; import org.jboss.unit.Failure; @@ -71,8 +72,43 @@ = // testInvokeTestSuite(); + + // + testEvents1(); } = + private static void testEvents1() + { + TestDriverImpl testDriver =3D new TestDriverImpl() + { + public DriverResponse invoke2(TestId id, DriverCommand command) + { + return new EndTestResponse(); + } + }; + SimpleTestSuiteInfo fooSuite =3D new SimpleTestSuiteInfo("Foo"); + fooSuite.addTest(new SimpleTestCaseInfo("Bar")); + testDriver.info.addTest(fooSuite); + TestDriverRunner runner =3D new TestDriverRunner(testDriver, new Tes= tId("Foo","Bar")); + EventList listener =3D new EventList(); + + // + runner.run(new TestRunnerContextSupport(listener)); + + // + testDriver.assertIdList(list(new TestId("Foo", "Bar"))); + + // + assertEquals(8, listener.events.size()); + listener.assertStartRunnerEvent(0); + listener.assertStartTestSuiteEvent(1, new TestId()); + listener.assertStartTestSuiteEvent(2, new TestId("Foo")); + listener.assertEndTestEvent(4, new TestId("Foo", "Bar"), new TestSuc= cess(0)); + listener.assertEndTestSuiteEvent(5, new TestId("Foo")); + listener.assertEndTestSuiteEvent(6, new TestId()); + listener.assertEndRunnerEvent(7); + } + private static void testInvokeTestSuite() { TestDriverImpl testDriver =3D new TestDriverImpl() @@ -96,13 +132,15 @@ testDriver.assertIdList(list(new TestId("Foo"), new TestId("Bar"))); = // - assertEquals(6, listener.events.size()); + assertEquals(8, listener.events.size()); listener.assertStartRunnerEvent(0); - listener.assertStartTestEvent(1, new TestId("Foo")); - listener.assertEndTestEvent(2, new TestId("Foo"), new TestSuccess(0)= ); - listener.assertStartTestEvent(3, new TestId("Bar")); - listener.assertEndTestEvent(4, new TestId("Bar"), new TestSuccess(0)= ); - listener.assertEndRunnerEvent(5); + listener.assertStartTestSuiteEvent(1, new TestId()); + listener.assertStartTestEvent(2, new TestId("Foo")); + listener.assertEndTestEvent(3, new TestId("Foo"), new TestSuccess(0)= ); + listener.assertStartTestEvent(4, new TestId("Bar")); + listener.assertEndTestEvent(5, new TestId("Bar"), new TestSuccess(0)= ); + listener.assertEndTestSuiteEvent(6, new TestId()); + listener.assertEndRunnerEvent(7); } = private static void testInvokeTestCaseWithParameters1() @@ -132,17 +170,19 @@ testDriver.assertIdList(list(new TestId("Foo"))); = // - assertEquals(4, listener.events.size()); + assertEquals(6, listener.events.size()); listener.assertStartRunnerEvent(0); - listener.assertStartTestEvent(1, new TestId("Foo")); - listener.assertEndTestEvent(2, new TestId("Foo"), new TestSuccess(0)= ); - listener.assertEndRunnerEvent(3); + listener.assertStartTestSuiteEvent(1, new TestId()); + listener.assertStartTestEvent(2, new TestId("Foo")); + listener.assertEndTestEvent(3, new TestId("Foo"), new TestSuccess(0)= ); + listener.assertEndTestSuiteEvent(4, new TestId()); + listener.assertEndRunnerEvent(5); = // Check parametrization Set> s1 =3D new HashSet>(); s1.add(new HashMap()); Set> s2 =3D new HashSet>(); - s2.add(((EndTestEvent)listener.events.get(2)).getTestResult().getPar= ametrization()); + s2.add(((EndTestEvent)listener.events.get(3)).getTestResult().getPar= ametrization()); assertEquals(s1, s2); } = @@ -177,13 +217,15 @@ testDriver.assertIdList(list(new TestId("Foo"), new TestId("Foo"))); = // - assertEquals(6, listener.events.size()); + assertEquals(8, listener.events.size()); listener.assertStartRunnerEvent(0); - listener.assertStartTestEvent(1, new TestId("Foo")); - listener.assertEndTestEvent(2, new TestId("Foo"), new TestSuccess(0)= ); - listener.assertStartTestEvent(3, new TestId("Foo")); - listener.assertEndTestEvent(4, new TestId("Foo"), new TestSuccess(0)= ); - listener.assertEndRunnerEvent(5); + listener.assertStartTestSuiteEvent(1, new TestId()); + listener.assertStartTestEvent(2, new TestId("Foo")); + listener.assertEndTestEvent(3, new TestId("Foo"), new TestSuccess(0)= ); + listener.assertStartTestEvent(4, new TestId("Foo")); + listener.assertEndTestEvent(5, new TestId("Foo"), new TestSuccess(0)= ); + listener.assertEndTestSuiteEvent(6, new TestId()); + listener.assertEndRunnerEvent(7); = // Check parametrization Set> s1 =3D new HashSet>(); @@ -194,8 +236,8 @@ s1.add(p1); s1.add(p2); Set> s2 =3D new HashSet>(); - s2.add(((EndTestEvent)listener.events.get(2)).getTestResult().getPar= ametrization()); - s2.add(((EndTestEvent)listener.events.get(4)).getTestResult().getPar= ametrization()); + s2.add(((EndTestEvent)listener.events.get(3)).getTestResult().getPar= ametrization()); + s2.add(((EndTestEvent)listener.events.get(5)).getTestResult().getPar= ametrization()); assertEquals(s1, s2); } = @@ -214,9 +256,9 @@ testDriver.assertIdList(new ArrayList()); = // - assertEquals(2, listener.events.size()); + assertEquals(4, listener.events.size()); listener.assertStartRunnerEvent(0); - listener.assertEndRunnerEvent(1); + listener.assertEndRunnerEvent(3); } = private static void testTestDriverInvokeTestCaseReturnsNull() @@ -233,11 +275,13 @@ testDriver.assertIdList(list(new TestId("Foo"))); = // - assertEquals(4, listener.events.size()); + assertEquals(6, listener.events.size()); listener.assertStartRunnerEvent(0); - listener.assertStartTestEvent(1, new TestId("Foo")); - listener.assertEndTestEvent(2, new TestId("Foo"), new TestFailure(ne= w Failure("", FailureType.ERROR), 0)); - listener.assertEndRunnerEvent(3); + listener.assertStartTestSuiteEvent(1, new TestId()); + listener.assertStartTestEvent(2, new TestId("Foo")); + listener.assertEndTestEvent(3, new TestId("Foo"), new TestFailure(ne= w Failure("", FailureType.ERROR), 0)); + listener.assertEndTestSuiteEvent(4, new TestId()); + listener.assertEndRunnerEvent(5); } = private static void testTestDriverInvokeTestCaseReturnsAnEndTestRespons= e() @@ -260,11 +304,13 @@ testDriver.assertIdList(list(new TestId("Foo"))); = // - assertEquals(4, listener.events.size()); + assertEquals(6, listener.events.size()); listener.assertStartRunnerEvent(0); - listener.assertStartTestEvent(1, new TestId("Foo")); - listener.assertEndTestEvent(2, new TestId("Foo"), new TestSuccess(0)= ); - listener.assertEndRunnerEvent(3); + listener.assertStartTestSuiteEvent(1, new TestId()); + listener.assertStartTestEvent(2, new TestId("Foo")); + listener.assertEndTestEvent(3, new TestId("Foo"), new TestSuccess(0)= ); + listener.assertEndTestSuiteEvent(4, new TestId()); + listener.assertEndRunnerEvent(5); } = private static void testTestDriverInvokeTestCaseReturnsAFailureResponse= () @@ -287,11 +333,13 @@ testDriver.assertIdList(list(new TestId("Foo"))); = // - assertEquals(4, listener.events.size()); + assertEquals(6, listener.events.size()); listener.assertStartRunnerEvent(0); - listener.assertStartTestEvent(1, new TestId("Foo")); - listener.assertEndTestEvent(2, new TestId("Foo"), new TestFailure(ne= w Failure("", FailureType.ERROR), 0)); - listener.assertEndRunnerEvent(3); + listener.assertStartTestSuiteEvent(1, new TestId()); + listener.assertStartTestEvent(2, new TestId("Foo")); + listener.assertEndTestEvent(3, new TestId("Foo"), new TestFailure(ne= w Failure("", FailureType.ERROR), 0)); + listener.assertEndTestSuiteEvent(4, new TestId()); + listener.assertEndRunnerEvent(5); } = private static void testTestDriverInvokeTestCaseThrowsRuntimeException() @@ -314,11 +362,13 @@ testDriver.assertIdList(list(new TestId("Foo"))); = // - assertEquals(4, listener.events.size()); + assertEquals(6, listener.events.size()); listener.assertStartRunnerEvent(0); - listener.assertStartTestEvent(1, new TestId("Foo")); - listener.assertEndTestEvent(2, new TestId("Foo"), new TestFailure(ne= w Failure("", FailureType.ERROR), 0)); - listener.assertEndRunnerEvent(3); + listener.assertStartTestSuiteEvent(1, new TestId()); + listener.assertStartTestEvent(2, new TestId("Foo")); + listener.assertEndTestEvent(3, new TestId("Foo"), new TestFailure(ne= w Failure("", FailureType.ERROR), 0)); + listener.assertEndTestSuiteEvent(4, new TestId()); + listener.assertEndRunnerEvent(5); } = private static void testTestDriverInvokeTestCaseThrowsError() @@ -351,9 +401,10 @@ testDriver.assertIdList(list(new TestId("Foo"))); = // - assertEquals(2, listener.events.size()); + assertEquals(3, listener.events.size()); listener.assertStartRunnerEvent(0); - listener.assertStartTestEvent(1, new TestId("Foo")); + listener.assertStartTestSuiteEvent(1, new TestId()); + listener.assertStartTestEvent(2, new TestId("Foo")); } = } Modified: modules/test/trunk/unit/src/main/org/jboss/unit/report/impl/write= r/PrintListener.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/report/impl/writer/Prin= tListener.java 2007-10-15 19:28:21 UTC (rev 8660) +++ modules/test/trunk/unit/src/main/org/jboss/unit/report/impl/writer/Prin= tListener.java 2007-10-15 20:06:37 UTC (rev 8661) @@ -32,13 +32,18 @@ import org.jboss.unit.runner.event.RunnerFailureEvent; import org.jboss.unit.runner.event.StartRunnerEvent; import org.jboss.unit.runner.event.StartTestEvent; +import org.jboss.unit.runner.event.StartTestSuiteEvent; +import org.jboss.unit.runner.event.EndTestSuiteEvent; import org.jboss.unit.runner.results.TestFailure; import org.jboss.unit.runner.results.TestSuccess; = -import java.io.PrintStream; import java.io.Writer; import java.io.PrintWriter; import java.io.OutputStream; +import java.text.NumberFormat; +import java.util.LinkedList; +import java.util.Iterator; +import java.util.Map; = /** * A listener which output messages on a specified stream. @@ -50,8 +55,20 @@ { = /** . */ + private final static String NEW_LINE =3D System.getProperty("line.separ= ator"); + + /** . */ + private NumberFormat FORMAT =3D NumberFormat.getInstance(); + + /** . */ private final PrintWriter out; = + /** The test suite stats. */ + private LinkedList stack =3D new LinkedList(); + + /** The current test case name. */ + private String currentTestCaseName; + /** * Builds with the System.out print stream. */ @@ -113,30 +130,127 @@ out.println("Runner failure: " + failure.getType() + " " + failur= e.getMessage()); failure.getCause().printStackTrace(out); } + else if (event instanceof StartTestSuiteEvent) + { + StartTestSuiteEvent stse =3D (StartTestSuiteEvent)event; + stack.add(new SuiteStat(stse.getTestInfo().getName())); + } else if (event instanceof StartTestEvent) { - StartTestEvent startTestEvent =3D (StartTestEvent)event; - out.println("Starting id=3D" + startTestEvent.getTestId() + " nam= e=3D" + startTestEvent.getTestInfo().getName() + " description=3D" + startT= estEvent.getTestInfo().getDescription()); + StartTestEvent ste =3D (StartTestEvent)event; + currentTestCaseName =3D ste.getTestInfo().getName(); } + else if (event instanceof EndTestSuiteEvent) + { + StringBuffer tmp =3D new StringBuffer(); + for (Iterator i =3D stack.iterator();i.hasNext();) + { + SuiteStat stat =3D i.next(); + tmp.append(stat.name); + if (i.hasNext()) + { + tmp.append('.'); + } + } + + // + SuiteStat stat =3D stack.removeLast(); + + StringBuffer sb =3D new StringBuffer("Testsuite: "); + sb.append(tmp); + sb.append(NEW_LINE); + sb.append("Tests run: "); + sb.append(stat.count); + sb.append(", Failures: "); + sb.append(stat.failures); + sb.append(", Errors: "); + sb.append(stat.errors); + sb.append(", Time elapsed: "); + sb.append(FORMAT.format((System.currentTimeMillis() - stat.timest= amp) / 1000.0)); + sb.append(" sec"); + sb.append(NEW_LINE); + out.print(sb); + + } else if (event instanceof EndTestEvent) { + stack.getLast().count++; + + // EndTestEvent endTestEvent =3D (EndTestEvent)event; - TestId testId =3D endTestEvent.getTestId(); TestResult testResult =3D endTestEvent.getTestResult(); + + StringBuffer name =3D new StringBuffer(currentTestCaseName); + Map parametrization =3D testResult.getParametriza= tion(); + if (!parametrization.isEmpty()) + { + name.append('?'); + for (Iterator> i =3D parametrization= .entrySet().iterator();i.hasNext();) + { + Map.Entry entry =3D i.next(); + name.append(entry.getKey()).append('=3D').append(entry.getV= alue()); + if (i.hasNext()) + { + name.append('&'); + } + } + } + + // + out.println("Testcase: " + name + " took " + FORMAT.format(testR= esult.getDurationMillis() / 1000.0) + " sec"); + if (testResult instanceof TestSuccess) { - out.println("Test id=3D" + testId + " is successful (" + testR= esult.getDurationMillis() + "ms)"); } else if (testResult instanceof TestFailure) { TestFailure testFailure =3D (TestFailure)testResult; Failure failure =3D testFailure.getFailure(); - out.println("Test id=3D" + testId + " " + failure.getType() + = " failed " + failure.getMessage() + " (" + testResult.getDurationMillis() += "ms)"); + + // + switch(failure.getType()) + { + case ASSERTION: + out.println("\tFAILED"); + stack.getLast().failures++; + break; + case ERROR: + out.println("\tCaused an ERROR"); + stack.getLast().errors++; + break; + } + + // + out.print(failure.getMessage()); if (failure.getCause() !=3D null) { failure.getCause().printStackTrace(out); } + out.println(); } } } + + private static class SuiteStat + { + /** . */ + private final String name; + + /** . */ + private int failures =3D 0; + + /** . */ + private int errors =3D 0; + + /** . */ + private int count =3D 0; + + /** . */ + private long timestamp =3D System.currentTimeMillis(); + + private SuiteStat(String name) + { + this.name =3D name; + } + } } Added: modules/test/trunk/unit/src/main/org/jboss/unit/runner/event/EndTest= SuiteEvent.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/runner/event/EndTestSui= teEvent.java (rev 0) +++ modules/test/trunk/unit/src/main/org/jboss/unit/runner/event/EndTestSui= teEvent.java 2007-10-15 20:06:37 UTC (rev 8661) @@ -0,0 +1,47 @@ +/*************************************************************************= ***** + * JBoss, a division of Red Hat = * + * Copyright 2006, Red Hat Middleware, LLC, and individual = * + * contributors as indicated by the @authors tag. See the = * + * copyright.txt in the distribution for a full listing of = * + * individual contributors. = * + * = * + * This is free software; you can redistribute it and/or modify it = * + * under the terms of the GNU Lesser General Public License as = * + * published by the Free Software Foundation; either version 2.1 of = * + * the License, or (at your option) any later version. = * + * = * + * This software is distributed in the hope that it will be useful, = * + * but WITHOUT ANY WARRANTY; without even the implied warranty of = * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU = * + * Lesser General Public License for more details. = * + * = * + * You should have received a copy of the GNU Lesser General Public = * + * License along with this software; if not, write to the Free = * + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA = * + * 02110-1301 USA, or see the FSF site: http://www.fsf.org. = * + *************************************************************************= *****/ +package org.jboss.unit.runner.event; + +import org.jboss.unit.TestId; +import org.jboss.unit.runner.TestRunnerEvent; + +/** + * @author Julien Viet + * @version $Revision: 1.1 $ + */ +public class EndTestSuiteEvent extends TestRunnerEvent +{ + + /** . */ + private final TestId testId; + + public EndTestSuiteEvent(TestId testId) + { + this.testId =3D testId; + } + + public TestId getTestId() + { + return testId; + } +} Added: modules/test/trunk/unit/src/main/org/jboss/unit/runner/event/StartTe= stSuiteEvent.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/runner/event/StartTestS= uiteEvent.java (rev 0) +++ modules/test/trunk/unit/src/main/org/jboss/unit/runner/event/StartTestS= uiteEvent.java 2007-10-15 20:06:37 UTC (rev 8661) @@ -0,0 +1,57 @@ +/*************************************************************************= ***** + * JBoss, a division of Red Hat = * + * Copyright 2006, Red Hat Middleware, LLC, and individual = * + * contributors as indicated by the @authors tag. See the = * + * copyright.txt in the distribution for a full listing of = * + * individual contributors. = * + * = * + * This is free software; you can redistribute it and/or modify it = * + * under the terms of the GNU Lesser General Public License as = * + * published by the Free Software Foundation; either version 2.1 of = * + * the License, or (at your option) any later version. = * + * = * + * This software is distributed in the hope that it will be useful, = * + * but WITHOUT ANY WARRANTY; without even the implied warranty of = * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU = * + * Lesser General Public License for more details. = * + * = * + * You should have received a copy of the GNU Lesser General Public = * + * License along with this software; if not, write to the Free = * + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA = * + * 02110-1301 USA, or see the FSF site: http://www.fsf.org. = * + *************************************************************************= *****/ +package org.jboss.unit.runner.event; + +import org.jboss.unit.runner.TestRunnerEvent; +import org.jboss.unit.TestId; +import org.jboss.unit.info.TestSuiteInfo; + +/** + * @author Julien Viet + * @version $Revision: 1.1 $ + */ +public class StartTestSuiteEvent extends TestRunnerEvent +{ + + /** . */ + private final TestId testId; + + /** . */ + private final TestSuiteInfo testInfo; + + public StartTestSuiteEvent(TestId testId, TestSuiteInfo testInfo) + { + this.testId =3D testId; + this.testInfo =3D testInfo; + } + + public TestId getTestId() + { + return testId; + } + + public TestSuiteInfo getTestInfo() + { + return testInfo; + } +} Modified: modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/Deleg= ateRunnerEventFilter.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/DelegateRun= nerEventFilter.java 2007-10-15 19:28:21 UTC (rev 8660) +++ modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/DelegateRun= nerEventFilter.java 2007-10-15 20:06:37 UTC (rev 8661) @@ -26,9 +26,6 @@ import org.jboss.unit.runner.TestRunnerEvent; import org.jboss.unit.runner.event.StartRunnerEvent; import org.jboss.unit.runner.event.EndRunnerEvent; -import org.jboss.unit.runner.event.StartTestEvent; -import org.jboss.unit.runner.event.EndTestEvent; -import org.jboss.unit.TestId; = /** *

The goal of this listener class is to route events to a target liste= ner and operate on the events @@ -52,14 +49,10 @@ { = /** . */ - private String testName; - - /** . */ private TestRunnerEventListener listener; = - public DelegateRunnerEventFilter(String testName, TestRunnerEventListen= er listener) + public DelegateRunnerEventFilter(TestRunnerEventListener listener) { - this.testName =3D testName; this.listener =3D listener; } = @@ -69,18 +62,6 @@ { return; } - if (event instanceof StartTestEvent) - { - StartTestEvent ste =3D (StartTestEvent)event; - TestId newId =3D new TestId(testName, ste.getTestId()); - event =3D new StartTestEvent(newId, ste.getTestInfo()); - } - else if (event instanceof EndTestEvent) - { - EndTestEvent ste =3D (EndTestEvent)event; - TestId newId =3D new TestId(testName, ste.getTestId()); - event =3D new EndTestEvent(newId, ste.getTestResult()); - } listener.onEvent(event); } } Modified: modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/drive= r/TestDriverRunner.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/driver/Test= DriverRunner.java 2007-10-15 19:28:21 UTC (rev 8660) +++ modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/driver/Test= DriverRunner.java 2007-10-15 20:06:37 UTC (rev 8661) @@ -39,6 +39,8 @@ import org.jboss.unit.runner.event.StartTestEvent; import org.jboss.unit.runner.event.EndTestEvent; import org.jboss.unit.runner.event.RunnerFailureEvent; +import org.jboss.unit.runner.event.StartTestSuiteEvent; +import org.jboss.unit.runner.event.EndTestSuiteEvent; import org.jboss.unit.runner.AbstractTestRunner; import org.jboss.unit.runner.TestResult; import org.jboss.unit.runner.TestRunnerContext; @@ -114,10 +116,7 @@ TestSuiteInfo info =3D (TestSuiteInfo)driver.getInfo(); = // - TestInfo testInfo =3D info.findTest(testId); - - // - internalRun(context, testInfo, testId); + internalRun(context, info, testId, new TestId()); } finally { @@ -133,68 +132,119 @@ } } = - private void internalRun(TestRunnerContext context, TestInfo testInfo, = TestId testId) + private void internalRun(final TestRunnerContext context, final TestInf= o currentInfo, final TestId targetId, final TestId currentId) { - if (context.getFilter().include(testId, testInfo)) + if (currentId.equals(targetId)) { - if (testInfo instanceof TestSuiteInfo) - { - TestSuiteInfo testSuiteInfo =3D (TestSuiteInfo)testInfo; - - // - for (String name : testSuiteInfo.getNames()) +// if (context.getFilter().include(currentId, currentInfo)) +// { + if (currentInfo instanceof TestSuiteInfo) { - TestInfo childTestInfo =3D testSuiteInfo.getTest(name); - internalRun(context, childTestInfo, new TestId(testId, name= )); - } - } - else - { - TestCaseInfo testCaseInfo =3D (TestCaseInfo)testInfo; + TestSuiteInfo testSuiteInfo =3D (TestSuiteInfo)currentInfo; = - // - for (Map parametrization : context.getParametri= zations().enumerate(testCaseInfo.getParameters().keySet())) - { - context.getEventListener().onEvent(new StartTestEvent(testI= d, testCaseInfo)); - // - StartTestCommand command =3D new StartTestCommand(parametri= zation); + context.getEventListener().onEvent(new StartTestSuiteEvent(= currentId, testSuiteInfo)); = // - TestResult result =3D null; + for (String name : testSuiteInfo.getNames()) + { + TestInfo childInfo =3D testSuiteInfo.getTest(name); = + // + TestId childId =3D new TestId(currentId, name); + + // + internalRun(context, childInfo, childId, childId); + } + // - long duration =3D -System.currentTimeMillis(); + context.getEventListener().onEvent(new EndTestSuiteEvent(te= stId)); + } + else + { + TestCaseInfo testCaseInfo =3D (TestCaseInfo)currentInfo; = // - DriverResponse response =3D null; - try + for (Map parametrization : context.getParame= trizations().enumerate(testCaseInfo.getParameters().keySet())) { + context.getEventListener().onEvent(new StartTestEvent(cu= rrentId, testCaseInfo)); + + // + StartTestCommand command =3D new StartTestCommand(parame= trization); + + // + TestResult result =3D null; + + // + long duration =3D -System.currentTimeMillis(); + + // + DriverResponse response =3D null; try { - response =3D driver.invoke(testId, command); + try + { + response =3D driver.invoke(currentId, command); + } + finally + { + duration +=3D System.currentTimeMillis(); + } } - finally + catch (Exception e) { - duration +=3D System.currentTimeMillis(); + Failure failure =3D new Failure("The test driver thre= w an unexpected exception ", e, FailureType.ERROR); + result =3D new TestFailure(failure, parametrization, = duration); } + + // + if (result =3D=3D null) + { + result =3D unwrap(response, parametrization, duration= ); + } + + // + context.getEventListener().onEvent(new EndTestEvent(curr= entId, result)); } - catch (Exception e) - { - Failure failure =3D new Failure("The test driver threw a= n unexpected exception ", e, FailureType.ERROR); - result =3D new TestFailure(failure, parametrization, dur= ation); - } + } +// } + } + else + { + String name =3D targetId.getName(currentId.getLength()); = + // + if (currentInfo instanceof TestSuiteInfo) + { + // + TestSuiteInfo currentSuiteInfo =3D (TestSuiteInfo)currentInfo; + + // + TestInfo nextInfo =3D currentSuiteInfo.getTest(name); + + // + if (nextInfo !=3D null) + { + TestId nextId =3D new TestId(currentId, name); + // - if (result =3D=3D null) - { - result =3D unwrap(response, parametrization, duration); - } + context.getEventListener().onEvent(new StartTestSuiteEvent(= currentId, currentSuiteInfo)); = // - context.getEventListener().onEvent(new EndTestEvent(testId,= result)); + internalRun(context, nextInfo, targetId, nextId); + + // + context.getEventListener().onEvent(new EndTestSuiteEvent(cu= rrentId)); } + else + { + + } } + else + { + + } } } = Modified: modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/gener= ic/GenericTestRunner.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/generic/Gen= ericTestRunner.java 2007-10-15 19:28:21 UTC (rev 8660) +++ modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/generic/Gen= ericTestRunner.java 2007-10-15 20:06:37 UTC (rev 8661) @@ -60,7 +60,7 @@ String className =3D def.getClassName(); = // - DelegateRunnerEventFilter filter =3D new DelegateRunnerEventFilter(c= lassName, context.getEventListener()); + DelegateRunnerEventFilter filter =3D new DelegateRunnerEventFilter(c= ontext.getEventListener()); = // try Modified: modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/pojo/= POJOTestRunner.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/pojo/POJOTe= stRunner.java 2007-10-15 19:28:21 UTC (rev 8660) +++ modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/pojo/POJOTe= stRunner.java 2007-10-15 20:06:37 UTC (rev 8661) @@ -65,7 +65,7 @@ String className =3D testClass.getName(); = // - DelegateRunnerEventFilter filter =3D new DelegateRunnerEventFilte= r(className, context.getEventListener()); + DelegateRunnerEventFilter filter =3D new DelegateRunnerEventFilte= r(context.getEventListener()); = // try Modified: modules/test/trunk/unit/src/main/org/jboss/unit/runner/model/Mode= lBuilder.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/runner/model/ModelBuild= er.java 2007-10-15 19:28:21 UTC (rev 8660) +++ modules/test/trunk/unit/src/main/org/jboss/unit/runner/model/ModelBuild= er.java 2007-10-15 20:06:37 UTC (rev 8661) @@ -171,16 +171,9 @@ } = // - Attr nameAttr =3D suiteElt.getAttributeNode("name"); - if (nameAttr =3D=3D null) - { - throw new IllegalArgumentException(); - } + GenericTestSuiteDef suite =3D new GenericTestSuiteDef(nameAttrOfClas= sElt.getValue()); = // - GenericTestSuiteDef suite =3D new GenericTestSuiteDef(nameAttr.getVa= lue(), nameAttrOfClassElt.getValue()); - - // for (Element testElt : children(suiteElt, "test")) { Attr refidAttr =3D testElt.getAttributeNode("refid"); Modified: modules/test/trunk/unit/src/main/org/jboss/unit/runner/model/gene= ric/GenericTestSuiteDef.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/runner/model/generic/Ge= nericTestSuiteDef.java 2007-10-15 19:28:21 UTC (rev 8660) +++ modules/test/trunk/unit/src/main/org/jboss/unit/runner/model/generic/Ge= nericTestSuiteDef.java 2007-10-15 20:06:37 UTC (rev 8661) @@ -41,22 +41,13 @@ private final List tests =3D new ArrayList(); = /** . */ - private final String name; - - /** . */ private final String className; = - public GenericTestSuiteDef(String name, String className) + public GenericTestSuiteDef(String className) { - this.name =3D name; this.className =3D className; } = - public String getName() - { - return name; - } - public String getClassName() { return className; Modified: modules/test/trunk/unit/src/resources/jboss-unit-jar/org/jboss/un= it/runner/model/jboss-unit_1_0.xsd =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/resources/jboss-unit-jar/org/jboss/unit/run= ner/model/jboss-unit_1_0.xsd 2007-10-15 19:28:21 UTC (rev 8660) +++ modules/test/trunk/unit/src/resources/jboss-unit-jar/org/jboss/unit/run= ner/model/jboss-unit_1_0.xsd 2007-10-15 20:06:37 UTC (rev 8661) @@ -79,7 +79,6 @@ - = Modified: modules/test/trunk/unit/src/resources/test/org/jboss/test/unit/ru= nner/model/f2.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/resources/test/org/jboss/test/unit/runner/m= odel/f2.xml 2007-10-15 19:28:21 UTC (rev 8660) +++ modules/test/trunk/unit/src/resources/test/org/jboss/test/unit/runner/m= odel/f2.xml 2007-10-15 20:06:37 UTC (rev 8661) @@ -3,7 +3,7 @@ xmlns=3D"urn:jboss:jboss-unit:1.0" xmlns:xsi=3D"http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation=3D"urn:jboss:jboss-unit:1.0 jboss-unit_1_0.xsd"> - + --===============1685180440891525877==-- From portal-commits at lists.jboss.org Mon Oct 15 16:09:05 2007 Content-Type: multipart/mixed; boundary="===============4906813230364822450==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8662 - in modules/test/trunk/unit/src/main/org/jboss: test/unit/runner and 4 other directories. Date: Mon, 15 Oct 2007 16:09:05 -0400 Message-ID: --===============4906813230364822450== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: julien(a)jboss.com Date: 2007-10-15 16:09:04 -0400 (Mon, 15 Oct 2007) New Revision: 8662 Added: modules/test/trunk/unit/src/main/org/jboss/unit/runner/event/EndTestCase= Event.java modules/test/trunk/unit/src/main/org/jboss/unit/runner/event/StartTestCa= seEvent.java Removed: modules/test/trunk/unit/src/main/org/jboss/unit/runner/event/EndTestEven= t.java modules/test/trunk/unit/src/main/org/jboss/unit/runner/event/StartTestEv= ent.java Modified: modules/test/trunk/unit/src/main/org/jboss/test/unit/report/junit/JUnitR= eporterTests.java modules/test/trunk/unit/src/main/org/jboss/test/unit/runner/AbstractTest= RunnerTests.java modules/test/trunk/unit/src/main/org/jboss/test/unit/runner/EventList.ja= va modules/test/trunk/unit/src/main/org/jboss/test/unit/runner/TestDriverRu= nnerTests.java modules/test/trunk/unit/src/main/org/jboss/unit/report/impl/junit/JUnitR= eporter.java modules/test/trunk/unit/src/main/org/jboss/unit/report/impl/junit/JUnitT= estReport.java modules/test/trunk/unit/src/main/org/jboss/unit/report/impl/writer/Print= Listener.java modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/driver/TestD= riverRunner.java Log: renamed StartTestEvent and EndTestEvent to StartTestCaseEvent and EndTestCa= seEvent Modified: modules/test/trunk/unit/src/main/org/jboss/test/unit/report/junit= /JUnitReporterTests.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/test/unit/report/junit/JUnit= ReporterTests.java 2007-10-15 20:06:37 UTC (rev 8661) +++ modules/test/trunk/unit/src/main/org/jboss/test/unit/report/junit/JUnit= ReporterTests.java 2007-10-15 20:09:04 UTC (rev 8662) @@ -28,10 +28,10 @@ import org.jboss.unit.api.Assert; import org.jboss.unit.runner.TestResult; import org.jboss.unit.runner.event.EndRunnerEvent; -import org.jboss.unit.runner.event.EndTestEvent; +import org.jboss.unit.runner.event.EndTestCaseEvent; import org.jboss.unit.runner.event.RunnerFailureEvent; import org.jboss.unit.runner.event.StartRunnerEvent; -import org.jboss.unit.runner.event.StartTestEvent; +import org.jboss.unit.runner.event.StartTestCaseEvent; import org.jboss.unit.runner.results.TestFailure; import org.jboss.unit.runner.results.TestSuccess; import org.w3c.dom.Element; @@ -96,11 +96,11 @@ report.startTestSuite(new StartRunnerEvent()); = TestId testId =3D new TestId("foo"); - StartTestEvent startTestEvent =3D new StartTestEvent(testId, new MyT= estInfo()); + StartTestCaseEvent startTestEvent =3D new StartTestCaseEvent(testId,= new MyTestInfo()); report.startTest(startTestEvent); = TestResult testResult =3D new TestSuccess(20); - EndTestEvent endTestEvent =3D new EndTestEvent(testId, testResult); + EndTestCaseEvent endTestEvent =3D new EndTestCaseEvent(testId, testR= esult); report.endTest(endTestEvent); // end report report.endTestSuite(new EndRunnerEvent()); @@ -125,12 +125,12 @@ report.startTestSuite(new StartRunnerEvent()); = TestId testId =3D new TestId("foo"); - StartTestEvent startTestEvent =3D new StartTestEvent(testId, new MyT= estInfo()); + StartTestCaseEvent startTestEvent =3D new StartTestCaseEvent(testId,= new MyTestInfo()); report.startTest(startTestEvent); = Failure f =3D new Failure("foo", new AssertionError("expecting somet= hing different."), FailureType.ASSERTION); TestResult testResult =3D new TestFailure(f, 20); - EndTestEvent endTestEvent =3D new EndTestEvent(testId, testResult); + EndTestCaseEvent endTestEvent =3D new EndTestCaseEvent(testId, testR= esult); report.endTest(endTestEvent); // end report report.endTestSuite(new EndRunnerEvent()); Modified: modules/test/trunk/unit/src/main/org/jboss/test/unit/runner/Abstr= actTestRunnerTests.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/test/unit/runner/AbstractTes= tRunnerTests.java 2007-10-15 20:06:37 UTC (rev 8661) +++ modules/test/trunk/unit/src/main/org/jboss/test/unit/runner/AbstractTes= tRunnerTests.java 2007-10-15 20:09:04 UTC (rev 8662) @@ -27,17 +27,7 @@ import org.jboss.unit.driver.DriverCommand; import org.jboss.unit.driver.command.StartTestCommand; import org.jboss.unit.TestId; -import org.jboss.unit.runner.TestRunnerEvent; -import org.jboss.unit.runner.TestResult; -import org.jboss.unit.runner.TestRunnerEventListener; -import org.jboss.unit.runner.results.TestFailure; -import org.jboss.unit.runner.results.TestSuccess; -import org.jboss.unit.runner.event.StartRunnerEvent; -import org.jboss.unit.runner.event.StartTestEvent; -import org.jboss.unit.runner.event.EndTestEvent; -import org.jboss.unit.runner.event.EndRunnerEvent; import static org.jboss.unit.api.Assert.assertEquals; -import static org.jboss.unit.api.Assert.assertInstanceOf; import org.jboss.unit.info.impl.SimpleTestSuiteInfo; import org.jboss.unit.info.TestInfo; = Modified: modules/test/trunk/unit/src/main/org/jboss/test/unit/runner/Event= List.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/test/unit/runner/EventList.j= ava 2007-10-15 20:06:37 UTC (rev 8661) +++ modules/test/trunk/unit/src/main/org/jboss/test/unit/runner/EventList.j= ava 2007-10-15 20:09:04 UTC (rev 8662) @@ -28,8 +28,8 @@ import org.jboss.unit.runner.results.TestFailure; import org.jboss.unit.runner.results.TestSuccess; import org.jboss.unit.runner.event.StartRunnerEvent; -import org.jboss.unit.runner.event.StartTestEvent; -import org.jboss.unit.runner.event.EndTestEvent; +import org.jboss.unit.runner.event.StartTestCaseEvent; +import org.jboss.unit.runner.event.EndTestCaseEvent; import org.jboss.unit.runner.event.EndRunnerEvent; import org.jboss.unit.runner.event.StartTestSuiteEvent; import org.jboss.unit.runner.event.EndTestSuiteEvent; @@ -89,14 +89,14 @@ return endEvent; } = - protected StartTestEvent assertStartTestEvent(int index, TestId expecte= dTestId) + protected StartTestCaseEvent assertStartTestEvent(int index, TestId exp= ectedTestId) { assertTrue(events.size() > index); TestRunnerEvent event =3D assertNotNull(events.get(index)); return assertStartTestEvent(event, expectedTestId); } = - protected EndTestEvent assertEndTestEvent(int index, TestId expectedTes= tId, TestResult expectedTestResult) + protected EndTestCaseEvent assertEndTestEvent(int index, TestId expecte= dTestId, TestResult expectedTestResult) { assertTrue(events.size() > index); TestRunnerEvent event =3D assertNotNull(events.get(index)); @@ -115,16 +115,16 @@ return assertInstanceOf(event, StartRunnerEvent.class); } = - protected static StartTestEvent assertStartTestEvent(TestRunnerEvent ev= ent, TestId expectedTestId) + protected static StartTestCaseEvent assertStartTestEvent(TestRunnerEven= t event, TestId expectedTestId) { - StartTestEvent startEvent =3D assertInstanceOf(event, StartTestEvent= .class); + StartTestCaseEvent startEvent =3D assertInstanceOf(event, StartTestC= aseEvent.class); assertEquals(expectedTestId, startEvent.getTestId()); return startEvent; } = - protected static EndTestEvent assertEndTestEvent(TestRunnerEvent event,= TestId expectedTestId, TestResult expectedTestResult) + protected static EndTestCaseEvent assertEndTestEvent(TestRunnerEvent ev= ent, TestId expectedTestId, TestResult expectedTestResult) { - EndTestEvent endEvent =3D assertInstanceOf(event, EndTestEvent.class= ); + EndTestCaseEvent endEvent =3D assertInstanceOf(event, EndTestCaseEve= nt.class); assertEquals(expectedTestId, endEvent.getTestId()); TestResult testResult =3D endEvent.getTestResult(); if (expectedTestResult instanceof TestFailure) Modified: modules/test/trunk/unit/src/main/org/jboss/test/unit/runner/TestD= riverRunnerTests.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/test/unit/runner/TestDriverR= unnerTests.java 2007-10-15 20:06:37 UTC (rev 8661) +++ modules/test/trunk/unit/src/main/org/jboss/test/unit/runner/TestDriverR= unnerTests.java 2007-10-15 20:09:04 UTC (rev 8662) @@ -27,7 +27,7 @@ import org.jboss.unit.runner.ParametrizationSet; import org.jboss.unit.runner.results.TestFailure; import org.jboss.unit.runner.results.TestSuccess; -import org.jboss.unit.runner.event.EndTestEvent; +import org.jboss.unit.runner.event.EndTestCaseEvent; import org.jboss.unit.driver.DriverResponse; import org.jboss.unit.driver.DriverCommand; import org.jboss.unit.driver.response.EndTestResponse; @@ -182,7 +182,7 @@ Set> s1 =3D new HashSet>(); s1.add(new HashMap()); Set> s2 =3D new HashSet>(); - s2.add(((EndTestEvent)listener.events.get(3)).getTestResult().getPar= ametrization()); + s2.add(((EndTestCaseEvent)listener.events.get(3)).getTestResult().ge= tParametrization()); assertEquals(s1, s2); } = @@ -236,8 +236,8 @@ s1.add(p1); s1.add(p2); Set> s2 =3D new HashSet>(); - s2.add(((EndTestEvent)listener.events.get(3)).getTestResult().getPar= ametrization()); - s2.add(((EndTestEvent)listener.events.get(5)).getTestResult().getPar= ametrization()); + s2.add(((EndTestCaseEvent)listener.events.get(3)).getTestResult().ge= tParametrization()); + s2.add(((EndTestCaseEvent)listener.events.get(5)).getTestResult().ge= tParametrization()); assertEquals(s1, s2); } = Modified: modules/test/trunk/unit/src/main/org/jboss/unit/report/impl/junit= /JUnitReporter.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/report/impl/junit/JUnit= Reporter.java 2007-10-15 20:06:37 UTC (rev 8661) +++ modules/test/trunk/unit/src/main/org/jboss/unit/report/impl/junit/JUnit= Reporter.java 2007-10-15 20:09:04 UTC (rev 8662) @@ -30,10 +30,10 @@ import org.jboss.unit.runner.TestRunnerEventListener; import org.jboss.unit.runner.TestRunnerEvent; import org.jboss.unit.runner.event.EndRunnerEvent; -import org.jboss.unit.runner.event.EndTestEvent; +import org.jboss.unit.runner.event.EndTestCaseEvent; import org.jboss.unit.runner.event.RunnerFailureEvent; import org.jboss.unit.runner.event.StartRunnerEvent; -import org.jboss.unit.runner.event.StartTestEvent; +import org.jboss.unit.runner.event.StartTestCaseEvent; = /** * @@ -99,13 +99,13 @@ { report.runnerFailed((RunnerFailureEvent) event); } - else if (event instanceof StartTestEvent) + else if (event instanceof StartTestCaseEvent) { - report.startTest((StartTestEvent) event); + report.startTest((StartTestCaseEvent) event); } - else if (event instanceof EndTestEvent) + else if (event instanceof EndTestCaseEvent) { - report.endTest((EndTestEvent) event); + report.endTest((EndTestCaseEvent) event); } } = Modified: modules/test/trunk/unit/src/main/org/jboss/unit/report/impl/junit= /JUnitTestReport.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/report/impl/junit/JUnit= TestReport.java 2007-10-15 20:06:37 UTC (rev 8661) +++ modules/test/trunk/unit/src/main/org/jboss/unit/report/impl/junit/JUnit= TestReport.java 2007-10-15 20:09:04 UTC (rev 8662) @@ -54,10 +54,10 @@ import org.jboss.unit.info.TestInfo; import org.jboss.unit.runner.TestResult; import org.jboss.unit.runner.event.EndRunnerEvent; -import org.jboss.unit.runner.event.EndTestEvent; +import org.jboss.unit.runner.event.EndTestCaseEvent; import org.jboss.unit.runner.event.RunnerFailureEvent; import org.jboss.unit.runner.event.StartRunnerEvent; -import org.jboss.unit.runner.event.StartTestEvent; +import org.jboss.unit.runner.event.StartTestCaseEvent; import org.jboss.unit.runner.results.TestFailure; import org.w3c.dom.Document; import org.w3c.dom.Element; @@ -129,7 +129,7 @@ */ } = - public void startTest(StartTestEvent event) + public void startTest(StartTestCaseEvent event) { = this.startedTests.put(event.getTestId(), event.getTestInfo()); this.tests++; @@ -149,7 +149,7 @@ rootElement.appendChild(e); } = - public void endTest(EndTestEvent event) + public void endTest(EndTestCaseEvent event) { TestId testId =3D event.getTestId(); TestResult result =3D event.getTestResult(); Modified: modules/test/trunk/unit/src/main/org/jboss/unit/report/impl/write= r/PrintListener.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/report/impl/writer/Prin= tListener.java 2007-10-15 20:06:37 UTC (rev 8661) +++ modules/test/trunk/unit/src/main/org/jboss/unit/report/impl/writer/Prin= tListener.java 2007-10-15 20:09:04 UTC (rev 8662) @@ -23,15 +23,14 @@ package org.jboss.unit.report.impl.writer; = import org.jboss.unit.Failure; -import org.jboss.unit.TestId; import org.jboss.unit.runner.TestResult; import org.jboss.unit.runner.TestRunnerEvent; import org.jboss.unit.runner.TestRunnerEventListener; import org.jboss.unit.runner.event.EndRunnerEvent; -import org.jboss.unit.runner.event.EndTestEvent; +import org.jboss.unit.runner.event.EndTestCaseEvent; import org.jboss.unit.runner.event.RunnerFailureEvent; import org.jboss.unit.runner.event.StartRunnerEvent; -import org.jboss.unit.runner.event.StartTestEvent; +import org.jboss.unit.runner.event.StartTestCaseEvent; import org.jboss.unit.runner.event.StartTestSuiteEvent; import org.jboss.unit.runner.event.EndTestSuiteEvent; import org.jboss.unit.runner.results.TestFailure; @@ -135,9 +134,9 @@ StartTestSuiteEvent stse =3D (StartTestSuiteEvent)event; stack.add(new SuiteStat(stse.getTestInfo().getName())); } - else if (event instanceof StartTestEvent) + else if (event instanceof StartTestCaseEvent) { - StartTestEvent ste =3D (StartTestEvent)event; + StartTestCaseEvent ste =3D (StartTestCaseEvent)event; currentTestCaseName =3D ste.getTestInfo().getName(); } else if (event instanceof EndTestSuiteEvent) @@ -172,12 +171,12 @@ out.print(sb); = } - else if (event instanceof EndTestEvent) + else if (event instanceof EndTestCaseEvent) { stack.getLast().count++; = // - EndTestEvent endTestEvent =3D (EndTestEvent)event; + EndTestCaseEvent endTestEvent =3D (EndTestCaseEvent)event; TestResult testResult =3D endTestEvent.getTestResult(); = StringBuffer name =3D new StringBuffer(currentTestCaseName); Copied: modules/test/trunk/unit/src/main/org/jboss/unit/runner/event/EndTes= tCaseEvent.java (from rev 8634, modules/test/trunk/unit/src/main/org/jboss/= unit/runner/event/EndTestEvent.java) =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/runner/event/EndTestCas= eEvent.java (rev 0) +++ modules/test/trunk/unit/src/main/org/jboss/unit/runner/event/EndTestCas= eEvent.java 2007-10-15 20:09:04 UTC (rev 8662) @@ -0,0 +1,57 @@ +/*************************************************************************= ***** + * JBoss, a division of Red Hat = * + * Copyright 2006, Red Hat Middleware, LLC, and individual = * + * contributors as indicated by the @authors tag. See the = * + * copyright.txt in the distribution for a full listing of = * + * individual contributors. = * + * = * + * This is free software; you can redistribute it and/or modify it = * + * under the terms of the GNU Lesser General Public License as = * + * published by the Free Software Foundation; either version 2.1 of = * + * the License, or (at your option) any later version. = * + * = * + * This software is distributed in the hope that it will be useful, = * + * but WITHOUT ANY WARRANTY; without even the implied warranty of = * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU = * + * Lesser General Public License for more details. = * + * = * + * You should have received a copy of the GNU Lesser General Public = * + * License along with this software; if not, write to the Free = * + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA = * + * 02110-1301 USA, or see the FSF site: http://www.fsf.org. = * + *************************************************************************= *****/ +package org.jboss.unit.runner.event; + +import org.jboss.unit.runner.TestRunnerEvent; +import org.jboss.unit.runner.TestResult; +import org.jboss.unit.TestId; + +/** + * @author Julien Viet + * @version $Revision: 1.1 $ + */ +public class EndTestCaseEvent extends TestRunnerEvent +{ + + /** . */ + private final TestId testId; + + /** . */ + private final TestResult testResult; + + public EndTestCaseEvent(TestId testId, TestResult testResult) + { + this.testId =3D testId; + this.testResult =3D testResult; + } + + public TestId getTestId() + { + return testId; + } + + public TestResult getTestResult() + { + return testResult; + } +} Deleted: modules/test/trunk/unit/src/main/org/jboss/unit/runner/event/EndTe= stEvent.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/runner/event/EndTestEve= nt.java 2007-10-15 20:06:37 UTC (rev 8661) +++ modules/test/trunk/unit/src/main/org/jboss/unit/runner/event/EndTestEve= nt.java 2007-10-15 20:09:04 UTC (rev 8662) @@ -1,57 +0,0 @@ -/*************************************************************************= ***** - * JBoss, a division of Red Hat = * - * Copyright 2006, Red Hat Middleware, LLC, and individual = * - * contributors as indicated by the @authors tag. See the = * - * copyright.txt in the distribution for a full listing of = * - * individual contributors. = * - * = * - * This is free software; you can redistribute it and/or modify it = * - * under the terms of the GNU Lesser General Public License as = * - * published by the Free Software Foundation; either version 2.1 of = * - * the License, or (at your option) any later version. = * - * = * - * This software is distributed in the hope that it will be useful, = * - * but WITHOUT ANY WARRANTY; without even the implied warranty of = * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU = * - * Lesser General Public License for more details. = * - * = * - * You should have received a copy of the GNU Lesser General Public = * - * License along with this software; if not, write to the Free = * - * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA = * - * 02110-1301 USA, or see the FSF site: http://www.fsf.org. = * - *************************************************************************= *****/ -package org.jboss.unit.runner.event; - -import org.jboss.unit.runner.TestRunnerEvent; -import org.jboss.unit.runner.TestResult; -import org.jboss.unit.TestId; - -/** - * @author Julien Viet - * @version $Revision: 1.1 $ - */ -public class EndTestEvent extends TestRunnerEvent -{ - - /** . */ - private final TestId testId; - - /** . */ - private final TestResult testResult; - - public EndTestEvent(TestId testId, TestResult testResult) - { - this.testId =3D testId; - this.testResult =3D testResult; - } - - public TestId getTestId() - { - return testId; - } - - public TestResult getTestResult() - { - return testResult; - } -} Copied: modules/test/trunk/unit/src/main/org/jboss/unit/runner/event/StartT= estCaseEvent.java (from rev 8634, modules/test/trunk/unit/src/main/org/jbos= s/unit/runner/event/StartTestEvent.java) =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/runner/event/StartTestC= aseEvent.java (rev 0) +++ modules/test/trunk/unit/src/main/org/jboss/unit/runner/event/StartTestC= aseEvent.java 2007-10-15 20:09:04 UTC (rev 8662) @@ -0,0 +1,57 @@ +/*************************************************************************= ***** + * JBoss, a division of Red Hat = * + * Copyright 2006, Red Hat Middleware, LLC, and individual = * + * contributors as indicated by the @authors tag. See the = * + * copyright.txt in the distribution for a full listing of = * + * individual contributors. = * + * = * + * This is free software; you can redistribute it and/or modify it = * + * under the terms of the GNU Lesser General Public License as = * + * published by the Free Software Foundation; either version 2.1 of = * + * the License, or (at your option) any later version. = * + * = * + * This software is distributed in the hope that it will be useful, = * + * but WITHOUT ANY WARRANTY; without even the implied warranty of = * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU = * + * Lesser General Public License for more details. = * + * = * + * You should have received a copy of the GNU Lesser General Public = * + * License along with this software; if not, write to the Free = * + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA = * + * 02110-1301 USA, or see the FSF site: http://www.fsf.org. = * + *************************************************************************= *****/ +package org.jboss.unit.runner.event; + +import org.jboss.unit.runner.TestRunnerEvent; +import org.jboss.unit.TestId; +import org.jboss.unit.info.TestInfo; + +/** + * @author Julien Viet + * @version $Revision: 1.1 $ + */ +public class StartTestCaseEvent extends TestRunnerEvent +{ + + /** . */ + private final TestId testId; + + /** . */ + private final TestInfo testInfo; + + public StartTestCaseEvent(TestId testId, TestInfo testInfo) + { + this.testId =3D testId; + this.testInfo =3D testInfo; + } + + public TestId getTestId() + { + return testId; + } + + public TestInfo getTestInfo() + { + return testInfo; + } +} Deleted: modules/test/trunk/unit/src/main/org/jboss/unit/runner/event/Start= TestEvent.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/runner/event/StartTestE= vent.java 2007-10-15 20:06:37 UTC (rev 8661) +++ modules/test/trunk/unit/src/main/org/jboss/unit/runner/event/StartTestE= vent.java 2007-10-15 20:09:04 UTC (rev 8662) @@ -1,57 +0,0 @@ -/*************************************************************************= ***** - * JBoss, a division of Red Hat = * - * Copyright 2006, Red Hat Middleware, LLC, and individual = * - * contributors as indicated by the @authors tag. See the = * - * copyright.txt in the distribution for a full listing of = * - * individual contributors. = * - * = * - * This is free software; you can redistribute it and/or modify it = * - * under the terms of the GNU Lesser General Public License as = * - * published by the Free Software Foundation; either version 2.1 of = * - * the License, or (at your option) any later version. = * - * = * - * This software is distributed in the hope that it will be useful, = * - * but WITHOUT ANY WARRANTY; without even the implied warranty of = * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU = * - * Lesser General Public License for more details. = * - * = * - * You should have received a copy of the GNU Lesser General Public = * - * License along with this software; if not, write to the Free = * - * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA = * - * 02110-1301 USA, or see the FSF site: http://www.fsf.org. = * - *************************************************************************= *****/ -package org.jboss.unit.runner.event; - -import org.jboss.unit.runner.TestRunnerEvent; -import org.jboss.unit.TestId; -import org.jboss.unit.info.TestInfo; - -/** - * @author Julien Viet - * @version $Revision: 1.1 $ - */ -public class StartTestEvent extends TestRunnerEvent -{ - - /** . */ - private final TestId testId; - - /** . */ - private final TestInfo testInfo; - - public StartTestEvent(TestId testId, TestInfo testInfo) - { - this.testId =3D testId; - this.testInfo =3D testInfo; - } - - public TestId getTestId() - { - return testId; - } - - public TestInfo getTestInfo() - { - return testInfo; - } -} Modified: modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/drive= r/TestDriverRunner.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/driver/Test= DriverRunner.java 2007-10-15 20:06:37 UTC (rev 8661) +++ modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/driver/Test= DriverRunner.java 2007-10-15 20:09:04 UTC (rev 8662) @@ -36,8 +36,8 @@ import org.jboss.unit.FailureType; import org.jboss.unit.runner.results.TestSuccess; import org.jboss.unit.runner.results.TestFailure; -import org.jboss.unit.runner.event.StartTestEvent; -import org.jboss.unit.runner.event.EndTestEvent; +import org.jboss.unit.runner.event.StartTestCaseEvent; +import org.jboss.unit.runner.event.EndTestCaseEvent; import org.jboss.unit.runner.event.RunnerFailureEvent; import org.jboss.unit.runner.event.StartTestSuiteEvent; import org.jboss.unit.runner.event.EndTestSuiteEvent; @@ -167,7 +167,7 @@ // for (Map parametrization : context.getParame= trizations().enumerate(testCaseInfo.getParameters().keySet())) { - context.getEventListener().onEvent(new StartTestEvent(cu= rrentId, testCaseInfo)); + context.getEventListener().onEvent(new StartTestCaseEven= t(currentId, testCaseInfo)); = // StartTestCommand command =3D new StartTestCommand(parame= trization); @@ -204,7 +204,7 @@ } = // - context.getEventListener().onEvent(new EndTestEvent(curr= entId, result)); + context.getEventListener().onEvent(new EndTestCaseEvent(= currentId, result)); } } // } --===============4906813230364822450==-- From portal-commits at lists.jboss.org Mon Oct 15 16:11:36 2007 Content-Type: multipart/mixed; boundary="===============2512300743303806273==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8663 - modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/driver. Date: Mon, 15 Oct 2007 16:11:36 -0400 Message-ID: --===============2512300743303806273== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: julien(a)jboss.com Date: 2007-10-15 16:11:35 -0400 (Mon, 15 Oct 2007) New Revision: 8663 Modified: modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/driver/TestD= riverRunner.java Log: re enable test case filtering Modified: modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/drive= r/TestDriverRunner.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/driver/Test= DriverRunner.java 2007-10-15 20:09:04 UTC (rev 8662) +++ modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/driver/Test= DriverRunner.java 2007-10-15 20:11:35 UTC (rev 8663) @@ -136,8 +136,8 @@ { if (currentId.equals(targetId)) { -// if (context.getFilter().include(currentId, currentInfo)) -// { + if (context.getFilter().include(currentId, currentInfo)) + { if (currentInfo instanceof TestSuiteInfo) { TestSuiteInfo testSuiteInfo =3D (TestSuiteInfo)currentInfo; @@ -207,7 +207,7 @@ context.getEventListener().onEvent(new EndTestCaseEvent(= currentId, result)); } } -// } + } } else { --===============2512300743303806273==-- From portal-commits at lists.jboss.org Mon Oct 15 16:14:01 2007 Content-Type: multipart/mixed; boundary="===============5668610817265017677==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8664 - modules/test/trunk/remote/src/main/org/jboss/unit/remote/driver. Date: Mon, 15 Oct 2007 16:14:01 -0400 Message-ID: --===============5668610817265017677== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: julien(a)jboss.com Date: 2007-10-15 16:14:01 -0400 (Mon, 15 Oct 2007) New Revision: 8664 Modified: modules/test/trunk/remote/src/main/org/jboss/unit/remote/driver/RemoteTe= stDriverClient.java Log: retrieve test info in the init method of the remote test driver client Modified: modules/test/trunk/remote/src/main/org/jboss/unit/remote/driver/R= emoteTestDriverClient.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/remote/src/main/org/jboss/unit/remote/driver/RemoteT= estDriverClient.java 2007-10-15 20:11:35 UTC (rev 8663) +++ modules/test/trunk/remote/src/main/org/jboss/unit/remote/driver/RemoteT= estDriverClient.java 2007-10-15 20:14:01 UTC (rev 8664) @@ -62,6 +62,9 @@ // Services = /** . */ + private SimpleTestSuiteInfo info; + + /** . */ private DriverContext context; = /** . */ @@ -183,6 +186,15 @@ throwable.printStackTrace(); failed =3D new FailureResponse(Failure.createFailure("Could not d= eploy beans", throwable)); } + + // Always retrieve meta data from the default node + Node node =3D nodeManager.getNode(NodeId.DEFAULT); + + // + TestDriver server =3D getServer(node); + + // + info =3D new SimpleTestSuiteInfo((TestSuiteInfo)server.getInfo()); } = public void destroyDriver() @@ -202,14 +214,7 @@ = public TestInfo getInfo() { - // Always retrieve meta data from the default node - Node node =3D nodeManager.getNode(NodeId.DEFAULT); - - // - TestDriver server =3D getServer(node); - - // - return new SimpleTestSuiteInfo((TestSuiteInfo)server.getInfo()); + return info; } = public DriverResponse invoke(TestId testId, DriverCommand command) --===============5668610817265017677==-- From portal-commits at lists.jboss.org Mon Oct 15 16:58:30 2007 Content-Type: multipart/mixed; boundary="===============1612274212624087056==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8665 - in modules/test/trunk: unit/src/main/org/jboss/unit/driver/impl/composite and 1 other directories. Date: Mon, 15 Oct 2007 16:58:30 -0400 Message-ID: --===============1612274212624087056== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: julien(a)jboss.com Date: 2007-10-15 16:58:30 -0400 (Mon, 15 Oct 2007) New Revision: 8665 Modified: modules/test/trunk/remote/src/main/org/jboss/unit/remote/driver/RemoteTe= stDriverServer.java modules/test/trunk/unit/src/main/org/jboss/unit/driver/impl/composite/Co= mpositeTestDriver.java modules/test/trunk/unit/src/main/org/jboss/unit/report/impl/writer/Print= Listener.java Log: - allow the composite test driver to have a name - reworked the remote test driver server to use delegation instead of inher= itence which allow to decouple the life cycle of the server and the life cy= cle of the support for the tests Modified: modules/test/trunk/remote/src/main/org/jboss/unit/remote/driver/R= emoteTestDriverServer.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/remote/src/main/org/jboss/unit/remote/driver/RemoteT= estDriverServer.java 2007-10-15 20:14:01 UTC (rev 8664) +++ modules/test/trunk/remote/src/main/org/jboss/unit/remote/driver/RemoteT= estDriverServer.java 2007-10-15 20:58:30 UTC (rev 8665) @@ -23,7 +23,14 @@ package org.jboss.unit.remote.driver; = import org.jboss.unit.TestId; +import org.jboss.unit.Failure; +import org.jboss.unit.info.TestInfo; +import org.jboss.unit.info.impl.SimpleTestSuiteInfo; import org.jboss.unit.driver.TestDriver; +import org.jboss.unit.driver.DriverContext; +import org.jboss.unit.driver.DriverResponse; +import org.jboss.unit.driver.DriverCommand; +import org.jboss.unit.driver.response.FailureResponse; import org.jboss.unit.driver.impl.composite.CompositeTestDriver; import org.jboss.unit.remote.RequestContext; import org.jboss.unit.remote.ResponseContext; @@ -32,46 +39,93 @@ * @author Julien Viet * @version $Revision: 5636 $ */ -public class RemoteTestDriverServer extends CompositeTestDriver implements= RemoteTestDriver +public class RemoteTestDriverServer implements RemoteTestDriver { = - public void pushContext(TestId testId, RequestContext requestContext) + /** . */ + private CompositeTestDriver drivers =3D new CompositeTestDriver(); + + public CompositeTestDriver getDrivers() { - String name =3D testId.getName(0); + return drivers; + } = + public void setDrivers(CompositeTestDriver drivers) + { + this.drivers =3D drivers; + } + + public void initDriver(DriverContext context) + { + } + + public void destroyDriver() + { + } + + public TestInfo getInfo() + { + if (drivers =3D=3D null) + { + return new SimpleTestSuiteInfo("Empty"); + } + // - TestDriver driver =3D drivers.get(name); + return drivers.getInfo(); + } = + public DriverResponse invoke(TestId id, DriverCommand command) + { + if (drivers =3D=3D null) + { + return new FailureResponse(Failure.createErrorFailure("No such te= st with id " + id)); + } + // - if (driver instanceof RemoteTestDriver) + return drivers.invoke(id, command); + } + + public void pushContext(TestId testId, RequestContext requestContext) + { + if (drivers !=3D null) { - RemoteTestDriver remoteDriver =3D (RemoteTestDriver)driver; + String name =3D testId.getName(0); = // - remoteDriver.pushContext(testId.range(1), requestContext); + TestDriver driver =3D drivers.get(name); + + // + if (driver instanceof RemoteTestDriver) + { + RemoteTestDriver remoteDriver =3D (RemoteTestDriver)driver; + + // + remoteDriver.pushContext(testId.range(1), requestContext); + } } } = public ResponseContext popContext(TestId testId) { - String name =3D testId.getName(0); + if (drivers !=3D null) + { + String name =3D testId.getName(0); = - // - TestDriver driver =3D drivers.get(name); + // + TestDriver driver =3D drivers.get(name); = - // - // - if (driver instanceof RemoteTestDriver) - { - RemoteTestDriver remoteDriver =3D (RemoteTestDriver)driver; + // + if (driver instanceof RemoteTestDriver) + { + RemoteTestDriver remoteDriver =3D (RemoteTestDriver)driver; = - // - return remoteDriver.popContext(testId.range(1)); + // + return remoteDriver.popContext(testId.range(1)); + } } - else - { - return null; - } + + // + return null; } = = Modified: modules/test/trunk/unit/src/main/org/jboss/unit/driver/impl/compo= site/CompositeTestDriver.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/driver/impl/composite/C= ompositeTestDriver.java 2007-10-15 20:14:01 UTC (rev 8664) +++ modules/test/trunk/unit/src/main/org/jboss/unit/driver/impl/composite/C= ompositeTestDriver.java 2007-10-15 20:58:30 UTC (rev 8665) @@ -43,11 +43,22 @@ { = /** . */ - private final SimpleTestSuiteInfo info =3D new SimpleTestSuiteInfo("Mai= n"); + private final SimpleTestSuiteInfo info; = /** . */ protected final Map drivers =3D new HashMap(); = + + public CompositeTestDriver() + { + this("Main"); + } + + public CompositeTestDriver(String name) + { + info =3D new SimpleTestSuiteInfo(name); + } + public TestInfo getInfo() { return info; @@ -79,6 +90,11 @@ return driver.invoke(driverId, command); } = + public TestDriver get(String name) + { + return drivers.get(name); + } + public void mount(TestDriver driver) { synchronized(TestDriver.class) Modified: modules/test/trunk/unit/src/main/org/jboss/unit/report/impl/write= r/PrintListener.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/report/impl/writer/Prin= tListener.java 2007-10-15 20:14:01 UTC (rev 8664) +++ modules/test/trunk/unit/src/main/org/jboss/unit/report/impl/writer/Prin= tListener.java 2007-10-15 20:58:30 UTC (rev 8665) @@ -168,6 +168,7 @@ sb.append(FORMAT.format((System.currentTimeMillis() - stat.timest= amp) / 1000.0)); sb.append(" sec"); sb.append(NEW_LINE); + sb.append(NEW_LINE); out.print(sb); = } --===============1612274212624087056==-- From portal-commits at lists.jboss.org Mon Oct 15 18:05:47 2007 Content-Type: multipart/mixed; boundary="===============4906605972071576533==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8666 - in modules/test/trunk/unit/src/main/org/jboss: unit and 1 other directory. Date: Mon, 15 Oct 2007 18:04:06 -0400 Message-ID: --===============4906605972071576533== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: julien(a)jboss.com Date: 2007-10-15 18:04:06 -0400 (Mon, 15 Oct 2007) New Revision: 8666 Added: modules/test/trunk/unit/src/main/org/jboss/test/unit/TestIdTests.java Modified: modules/test/trunk/unit/src/main/org/jboss/test/unit/AllTests.java modules/test/trunk/unit/src/main/org/jboss/unit/TestId.java Log: more meta tests Modified: modules/test/trunk/unit/src/main/org/jboss/test/unit/AllTests.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/test/unit/AllTests.java 2007= -10-15 20:58:30 UTC (rev 8665) +++ modules/test/trunk/unit/src/main/org/jboss/test/unit/AllTests.java 2007= -10-15 22:04:06 UTC (rev 8666) @@ -48,6 +48,9 @@ public static void main(String[] args) throws Exception { AssertTests.main(args); + TestIdTests.main(args); + + // AbstractPOJOTests.main(args); JUnitPOJOTests.main(args); CompositeTestRunnerTests.main(args); Added: modules/test/trunk/unit/src/main/org/jboss/test/unit/TestIdTests.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/test/unit/TestIdTests.java = (rev 0) +++ modules/test/trunk/unit/src/main/org/jboss/test/unit/TestIdTests.java 2= 007-10-15 22:04:06 UTC (rev 8666) @@ -0,0 +1,185 @@ +/*************************************************************************= ***** + * JBoss, a division of Red Hat = * + * Copyright 2006, Red Hat Middleware, LLC, and individual = * + * contributors as indicated by the @authors tag. See the = * + * copyright.txt in the distribution for a full listing of = * + * individual contributors. = * + * = * + * This is free software; you can redistribute it and/or modify it = * + * under the terms of the GNU Lesser General Public License as = * + * published by the Free Software Foundation; either version 2.1 of = * + * the License, or (at your option) any later version. = * + * = * + * This software is distributed in the hope that it will be useful, = * + * but WITHOUT ANY WARRANTY; without even the implied warranty of = * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU = * + * Lesser General Public License for more details. = * + * = * + * You should have received a copy of the GNU Lesser General Public = * + * License along with this software; if not, write to the Free = * + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA = * + * 02110-1301 USA, or see the FSF site: http://www.fsf.org. = * + *************************************************************************= *****/ +package org.jboss.test.unit; + +import org.jboss.unit.TestId; + +import static org.jboss.unit.api.Assert.*; +import static org.jboss.unit.util.CollectionTools.*; + +import java.util.Collection; +import java.util.Collections; +import java.util.Iterator; +import java.util.ArrayList; + +/** + * @author Julien Viet + * @version $Revision: 1.1 $ + */ +public class TestIdTests +{ + + public static void main(String[] args) + { + testEquals(); + testCtor(); + testCtorThrowsIAE(); + testRange(); + } + + private static void testRange() + { + assertValue(new TestId().range(0)); + assertValue(new TestId("abc").range(1)); + assertValue(new TestId("abc", "def").range(1), "def"); + assertValue(new TestId("abc", "def").range(2)); + assertValue(new TestId("abc", "def", "ghi").range(1), "def", "ghi"); + assertValue(new TestId("abc", "def", "ghi").range(2), "ghi"); + + // + try + { + new TestId().range(-1); + fail(); + } + catch (IllegalArgumentException e) + { + } + try + { + new TestId().range(1); + fail(); + } + catch (IllegalArgumentException e) + { + } + try + { + new TestId("abc").range(-1); + fail(); + } + catch (IllegalArgumentException e) + { + } + try + { + new TestId("abc").range(2); + fail(); + } + catch (IllegalArgumentException e) + { + } + } + + private static void testEquals() + { + assertEquals(new TestId(), new TestId()); + assertNotEquals(new TestId(), new TestId("abc")); + assertNotEquals(new TestId(), new TestId("abc", "def")); + assertNotEquals(new TestId("abc"), new TestId()); + assertEquals(new TestId("abc"), new TestId("abc")); + assertNotEquals(new TestId("abc"), new TestId("abc", "def")); + assertNotEquals(new TestId("abc", "def"), new TestId()); + assertNotEquals(new TestId("abc", "def"), new TestId("abc")); + assertEquals(new TestId("abc", "def"), new TestId("abc", "def")); + } + + private static void testCtor() + { + assertValue(new TestId()); + assertValue(new TestId("abc"), "abc"); + assertValue(new TestId("abc", "def"), "abc", "def"); + assertValue(new TestId("abc", new TestId("def", "ghi")), "abc", "def= ", "ghi"); + assertValue(new TestId(new TestId("abc", "def"), "ghi"), "abc", "def= ", "ghi"); + assertValue(new TestId(list("abc", "def")), "abc", "def"); + } + + private static void testCtorThrowsIAE() + { + try + { + new TestId((String[])null); + fail(); + } + catch (IllegalArgumentException expected) + { + } + try + { + new TestId((String)null); + fail(); + } + catch (IllegalArgumentException expected) + { + } + try + { + new TestId((TestId)null, "abc"); + fail(); + } + catch (IllegalArgumentException expected) + { + } + try + { + new TestId("abc", (TestId)null); + fail(); + } + catch (IllegalArgumentException expected) + { + } + try + { + new TestId((Collection)null); + fail(); + } + catch (IllegalArgumentException expected) + { + } + try + { + new TestId(Collections.singletonList((String)null)); + fail(); + } + catch (IllegalArgumentException expected) + { + } + } + + private static void assertValue(TestId id, String... names) + { + assertEquals(names.length, id.getLength()); + for (int i =3D 0;i < id.getLength();i++) + { + String name =3D id.getName(i); + assertEquals(names[i], name); + } + ArrayList tmp =3D new ArrayList(); + for (Iterator i =3D id.iterator();i.hasNext();) + { + tmp.add(i.next()); + } + assertEquals(names, tmp.toArray(new String[tmp.size()])); + + } +} Modified: modules/test/trunk/unit/src/main/org/jboss/unit/TestId.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/TestId.java 2007-10-15 = 20:58:30 UTC (rev 8665) +++ modules/test/trunk/unit/src/main/org/jboss/unit/TestId.java 2007-10-15 = 22:04:06 UTC (rev 8666) @@ -44,7 +44,12 @@ this.names =3D new String[0]; } = - public TestId(TestId prefix, String name) + /** + * @param prefix the prefix + * @param name the name + * @throws IllegalArgumentException if any argument is null + */ + public TestId(TestId prefix, String name) throws IllegalArgumentExcepti= on { if (prefix =3D=3D null) { @@ -64,7 +69,13 @@ this.names =3D names; } = - public TestId(String name, TestId suffix) + /** + * + * @param name the name + * @param suffix the suffix + * @throws IllegalArgumentException if any argument is null + */ + public TestId(String name, TestId suffix) throws IllegalArgumentExcepti= on { if (suffix =3D=3D null) { @@ -84,18 +95,11 @@ this.names =3D names; } = - public TestId(String name) - { - if (name =3D=3D null) - { - throw new IllegalArgumentException(); - } = - // - this.names =3D new String[]{name}; - } - - public TestId(String... names) + /** + * @param names if the names array is null or any composite of this nam= e is null + */ + public TestId(String... names) throws IllegalArgumentException { if (names =3D=3D null) { @@ -118,7 +122,11 @@ this.names =3D tmp; } = - public TestId(Collection names) + /** + * @param names the collection of names + * @throws IllegalArgumentException if the collection argument is null = or any value in the collection is null + */ + public TestId(Collection names) throws IllegalArgumentException { if (names =3D=3D null) { @@ -169,7 +177,14 @@ }; } = - public String getName(int index) + /** + * Return a name in the id. + * + * @param index the name index to return + * @return the specified name + * @throws ArrayIndexOutOfBoundsException if the index is lower than ze= ro or greater than the value returned by getLength() + */ + public String getName(int index) throws ArrayIndexOutOfBoundsException { return names[index]; } --===============4906605972071576533==-- From portal-commits at lists.jboss.org Mon Oct 15 18:09:36 2007 Content-Type: multipart/mixed; boundary="===============0158831607182727005==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8667 - in modules/test/trunk/unit/src/main/org/jboss: unit and 1 other directory. Date: Mon, 15 Oct 2007 18:09:36 -0400 Message-ID: --===============0158831607182727005== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: julien(a)jboss.com Date: 2007-10-15 18:09:35 -0400 (Mon, 15 Oct 2007) New Revision: 8667 Modified: modules/test/trunk/unit/src/main/org/jboss/test/unit/TestIdTests.java modules/test/trunk/unit/src/main/org/jboss/unit/TestId.java Log: more meta tests Modified: modules/test/trunk/unit/src/main/org/jboss/test/unit/TestIdTests.= java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/test/unit/TestIdTests.java 2= 007-10-15 22:04:06 UTC (rev 8666) +++ modules/test/trunk/unit/src/main/org/jboss/test/unit/TestIdTests.java 2= 007-10-15 22:09:35 UTC (rev 8667) @@ -45,18 +45,40 @@ testCtor(); testCtorThrowsIAE(); testRange(); + testRangeThrowsIAE(); + testGetNameThrowsIAE(); } = - private static void testRange() + private static void testGetNameThrowsIAE() { - assertValue(new TestId().range(0)); - assertValue(new TestId("abc").range(1)); - assertValue(new TestId("abc", "def").range(1), "def"); - assertValue(new TestId("abc", "def").range(2)); - assertValue(new TestId("abc", "def", "ghi").range(1), "def", "ghi"); - assertValue(new TestId("abc", "def", "ghi").range(2), "ghi"); + try + { + new TestId().getName(-1); + fail(); + } + catch (IllegalArgumentException e) + { + } + try + { + new TestId("abc").getName(-1); + fail(); + } + catch (IllegalArgumentException e) + { + } + try + { + new TestId("abc").getName(1); + fail(); + } + catch (IllegalArgumentException e) + { + } + } = - // + private static void testRangeThrowsIAE() + { try { new TestId().range(-1); @@ -91,6 +113,16 @@ } } = + private static void testRange() + { + assertValue(new TestId().range(0)); + assertValue(new TestId("abc").range(1)); + assertValue(new TestId("abc", "def").range(1), "def"); + assertValue(new TestId("abc", "def").range(2)); + assertValue(new TestId("abc", "def", "ghi").range(1), "def", "ghi"); + assertValue(new TestId("abc", "def", "ghi").range(2), "ghi"); + } + private static void testEquals() { assertEquals(new TestId(), new TestId()); Modified: modules/test/trunk/unit/src/main/org/jboss/unit/TestId.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/TestId.java 2007-10-15 = 22:04:06 UTC (rev 8666) +++ modules/test/trunk/unit/src/main/org/jboss/unit/TestId.java 2007-10-15 = 22:09:35 UTC (rev 8667) @@ -149,6 +149,11 @@ this.names =3D tmp; } = + /** + * Returns an iterator over the names composing this id. + * + * @return the name iterator + */ public Iterator iterator() { return new Iterator() @@ -182,19 +187,38 @@ * * @param index the name index to return * @return the specified name - * @throws ArrayIndexOutOfBoundsException if the index is lower than ze= ro or greater than the value returned by getLength() + * @throws IllegalArgumentException if the index is lower than zero or = greater than the value returned by getLength() */ - public String getName(int index) throws ArrayIndexOutOfBoundsException + public String getName(int index) throws IllegalArgumentException { + if (index < 0) + { + throw new IllegalArgumentException("Index cannot be negative"); + } + if (index >=3D names.length) + { + throw new IllegalArgumentException("Index cannot be greater than = the length " + names.length); + } return names[index]; } = + /** + * Return the number of names composing this id. + * + * @return the length + */ public int getLength() { return names.length; } = - public TestId range(int from) + /** + * Create a new id by using the names from the specified index up to th= e last one. + * @param from the specified index + * @return a new id + * throws IllegalArgumentException if the specified index is negative o= r greater than the length + */ + public TestId range(int from) throws IllegalArgumentException { if (from < 0) { --===============0158831607182727005==-- From portal-commits at lists.jboss.org Mon Oct 15 18:45:01 2007 Content-Type: multipart/mixed; boundary="===============6272630575952221503==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8668 - in modules/test/trunk: unit/src/main/org/jboss/test/unit/runner and 3 other directories. Date: Mon, 15 Oct 2007 18:45:01 -0400 Message-ID: --===============6272630575952221503== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: julien(a)jboss.com Date: 2007-10-15 18:45:01 -0400 (Mon, 15 Oct 2007) New Revision: 8668 Added: modules/test/trunk/unit/src/main/org/jboss/unit/driver/DriverException.j= ava Modified: modules/test/trunk/remote/src/main/org/jboss/unit/remote/driver/RemoteTe= stDriverClient.java modules/test/trunk/unit/src/main/org/jboss/test/unit/runner/EventList.ja= va modules/test/trunk/unit/src/main/org/jboss/test/unit/runner/TestDriverRu= nnerTests.java modules/test/trunk/unit/src/main/org/jboss/unit/driver/TestDriver.java modules/test/trunk/unit/src/main/org/jboss/unit/driver/impl/composite/Co= mpositeTestDriver.java modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/driver/TestD= riverRunner.java Log: added support for failure during test driver init by throwing an exception = + the test cases for testing failures behavior during init/destroy phases Modified: modules/test/trunk/remote/src/main/org/jboss/unit/remote/driver/R= emoteTestDriverClient.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/remote/src/main/org/jboss/unit/remote/driver/RemoteT= estDriverClient.java 2007-10-15 22:09:35 UTC (rev 8667) +++ modules/test/trunk/remote/src/main/org/jboss/unit/remote/driver/RemoteT= estDriverClient.java 2007-10-15 22:45:01 UTC (rev 8668) @@ -26,6 +26,7 @@ import org.jboss.unit.driver.DriverCommand; import org.jboss.unit.driver.DriverResponse; import org.jboss.unit.driver.DriverContext; +import org.jboss.unit.driver.DriverException; import org.jboss.unit.driver.response.FailureResponse; import org.jboss.unit.driver.command.StartTestCommand; import org.jboss.unit.info.TestInfo; @@ -132,11 +133,10 @@ return (RemoteTestDriver)node.lookupService(RemoteTestDriver.SERVICE= _ID); } = - private FailureResponse failed; private KernelDeployment deployment; private BeanXMLDeployer beanDeployer; = - public void initDriver(DriverContext context) + public void initDriver(DriverContext context) throws DriverException { this.context =3D context; = @@ -160,9 +160,7 @@ } catch (Throwable throwable) { - throwable.printStackTrace(); - failed =3D new FailureResponse(Failure.createFailure("Could not s= tartup kernel", throwable)); - return; + throw new DriverException("Could not start the kernel", throwable= ); } = // Now deploy beans @@ -183,8 +181,7 @@ } catch (Throwable throwable) { - throwable.printStackTrace(); - failed =3D new FailureResponse(Failure.createFailure("Could not d= eploy beans", throwable)); + throw new DriverException("Could not deploy the beans", throwable= ); } = // Always retrieve meta data from the default node Modified: modules/test/trunk/unit/src/main/org/jboss/test/unit/runner/Event= List.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/test/unit/runner/EventList.j= ava 2007-10-15 22:09:35 UTC (rev 8667) +++ modules/test/trunk/unit/src/main/org/jboss/test/unit/runner/EventList.j= ava 2007-10-15 22:45:01 UTC (rev 8668) @@ -33,6 +33,7 @@ import org.jboss.unit.runner.event.EndRunnerEvent; import org.jboss.unit.runner.event.StartTestSuiteEvent; import org.jboss.unit.runner.event.EndTestSuiteEvent; +import org.jboss.unit.runner.event.RunnerFailureEvent; import static org.jboss.unit.api.Assert.*; import org.jboss.unit.TestId; = @@ -54,6 +55,18 @@ events.add(event); } = + protected RunnerFailureEvent assertRunnerFailureEvent(int index) + { + assertTrue(events.size() > index); + TestRunnerEvent event =3D assertNotNull(events.get(index)); + return assertRunnerFailureEvent(event); + } + + protected RunnerFailureEvent assertRunnerFailureEvent(TestRunnerEvent e= vent) + { + return assertInstanceOf(event, RunnerFailureEvent.class); + } + protected StartRunnerEvent assertStartRunnerEvent(int index) { assertTrue(events.size() > index); Modified: modules/test/trunk/unit/src/main/org/jboss/test/unit/runner/TestD= riverRunnerTests.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/test/unit/runner/TestDriverR= unnerTests.java 2007-10-15 22:09:35 UTC (rev 8667) +++ modules/test/trunk/unit/src/main/org/jboss/test/unit/runner/TestDriverR= unnerTests.java 2007-10-15 22:45:01 UTC (rev 8668) @@ -30,11 +30,15 @@ import org.jboss.unit.runner.event.EndTestCaseEvent; import org.jboss.unit.driver.DriverResponse; import org.jboss.unit.driver.DriverCommand; +import org.jboss.unit.driver.TestDriver; +import org.jboss.unit.driver.DriverContext; +import org.jboss.unit.driver.DriverException; import org.jboss.unit.driver.response.EndTestResponse; import org.jboss.unit.driver.response.FailureResponse; import org.jboss.unit.info.impl.SimpleTestCaseInfo; import org.jboss.unit.info.impl.SimpleParameterInfo; import org.jboss.unit.info.impl.SimpleTestSuiteInfo; +import org.jboss.unit.info.TestInfo; import org.jboss.unit.TestId; import org.jboss.unit.FailureType; import org.jboss.unit.Failure; @@ -75,8 +79,188 @@ = // testEvents1(); + + // + testInit(); + testInitThrowsDriverException(); + testInitThrowsRuntimeException(); + testInitThrowsError(); + + // + testDestroyThrowsRuntimeException(); + testDestroyThrowsError(); } = + private static void testDestroyThrowsError() + { + final Error error =3D new Error(); + FailureTestDriver testDriver =3D new FailureTestDriver() + { + public void destroyDriver() + { + throw error; + } + }; + + // + TestDriverRunner runner =3D new TestDriverRunner(testDriver, new Tes= tId()); + EventList listener =3D new EventList(); + try + { + runner.run(new TestRunnerContextSupport(listener)); + fail(); + } + catch (Error e) + { + assertSame(error, e); + } + + // + assertEquals(3, listener.events.size()); + listener.assertStartRunnerEvent(0); + listener.assertStartTestEvent(1, new TestId()); + listener.assertEndTestEvent(2, new TestId(), new TestSuccess(0)); + } + + private static void testDestroyThrowsRuntimeException() + { + FailureTestDriver testDriver =3D new FailureTestDriver() + { + public void destroyDriver() + { + throw new RuntimeException(); + } + }; + + // + TestDriverRunner runner =3D new TestDriverRunner(testDriver, new Tes= tId()); + EventList listener =3D new EventList(); + runner.run(new TestRunnerContextSupport(listener)); + + // + assertEquals(4, listener.events.size()); + listener.assertStartRunnerEvent(0); + listener.assertStartTestEvent(1, new TestId()); + listener.assertEndTestEvent(2, new TestId(), new TestSuccess(0)); + listener.assertEndRunnerEvent(3); + } + + private static void testInit() + { + FailureTestDriver testDriver =3D new FailureTestDriver() + { + public void initDriver(DriverContext context) throws DriverExcept= ion + { + } + }; + + // + TestDriverRunner runner =3D new TestDriverRunner(testDriver, new Tes= tId()); + EventList listener =3D new EventList(); + runner.run(new TestRunnerContextSupport(listener)); + + // + assertTrue(testDriver.invoked1); + assertTrue(testDriver.invoked2); + assertTrue(testDriver.invoked3); + + // + assertEquals(4, listener.events.size()); + listener.assertStartRunnerEvent(0); + listener.assertStartTestEvent(1, new TestId()); + listener.assertEndTestEvent(2, new TestId(), new TestSuccess(0)); + listener.assertEndRunnerEvent(3); + } + + private static void testInitThrowsDriverException() + { + FailureTestDriver testDriver =3D new FailureTestDriver() + { + public void initDriver(DriverContext context) throws DriverExcept= ion + { + throw new DriverException(); + } + }; + + // + TestDriverRunner runner =3D new TestDriverRunner(testDriver, new Tes= tId()); + EventList listener =3D new EventList(); + runner.run(new TestRunnerContextSupport(listener)); + + // + assertFalse(testDriver.invoked1); + assertFalse(testDriver.invoked2); + assertFalse(testDriver.invoked3); + + // + assertEquals(3, listener.events.size()); + listener.assertStartRunnerEvent(0); + listener.assertRunnerFailureEvent(1); + listener.assertEndRunnerEvent(2); + } + + private static void testInitThrowsRuntimeException() + { + FailureTestDriver testDriver =3D new FailureTestDriver() + { + public void initDriver(DriverContext context) throws DriverExcept= ion + { + throw new RuntimeException(); + } + }; + + // + TestDriverRunner runner =3D new TestDriverRunner(testDriver, new Tes= tId()); + EventList listener =3D new EventList(); + runner.run(new TestRunnerContextSupport(listener)); + + // + assertFalse(testDriver.invoked1); + assertFalse(testDriver.invoked2); + assertFalse(testDriver.invoked3); + + // + assertEquals(3, listener.events.size()); + listener.assertStartRunnerEvent(0); + listener.assertRunnerFailureEvent(1); + listener.assertEndRunnerEvent(2); + } + + private static void testInitThrowsError() + { + final Error error =3D new Error(); + FailureTestDriver testDriver =3D new FailureTestDriver() + { + public void initDriver(DriverContext context) throws DriverExcept= ion + { + throw error; + } + }; + + // + TestDriverRunner runner =3D new TestDriverRunner(testDriver, new Tes= tId()); + EventList listener =3D new EventList(); + + try + { + runner.run(new TestRunnerContextSupport(listener)); + fail(); + } + catch (Error e) + { + assertSame(error, e); + } + + // + assertFalse(testDriver.invoked1); + assertFalse(testDriver.invoked2); + assertFalse(testDriver.invoked3); + + // + assertEquals(1, listener.events.size()); + listener.assertStartRunnerEvent(0); + } + private static void testEvents1() { TestDriverImpl testDriver =3D new TestDriverImpl() @@ -407,4 +591,29 @@ listener.assertStartTestEvent(2, new TestId("Foo")); } = + private abstract static class FailureTestDriver implements TestDriver + { + boolean invoked0 =3D false; + boolean invoked1 =3D false; + boolean invoked2 =3D false; + boolean invoked3 =3D false; + public void initDriver(DriverContext context) throws DriverException + { + invoked0 =3D true; + } + public TestInfo getInfo() + { + invoked1 =3D true; + return new SimpleTestCaseInfo("Foo"); + } + public DriverResponse invoke(TestId id, DriverCommand command) + { + invoked2 =3D true; + return new EndTestResponse(); + } + public void destroyDriver() + { + invoked3 =3D true; + } + } } Added: modules/test/trunk/unit/src/main/org/jboss/unit/driver/DriverExcepti= on.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/driver/DriverException.= java (rev 0) +++ modules/test/trunk/unit/src/main/org/jboss/unit/driver/DriverException.= java 2007-10-15 22:45:01 UTC (rev 8668) @@ -0,0 +1,49 @@ +/*************************************************************************= ***** + * JBoss, a division of Red Hat = * + * Copyright 2006, Red Hat Middleware, LLC, and individual = * + * contributors as indicated by the @authors tag. See the = * + * copyright.txt in the distribution for a full listing of = * + * individual contributors. = * + * = * + * This is free software; you can redistribute it and/or modify it = * + * under the terms of the GNU Lesser General Public License as = * + * published by the Free Software Foundation; either version 2.1 of = * + * the License, or (at your option) any later version. = * + * = * + * This software is distributed in the hope that it will be useful, = * + * but WITHOUT ANY WARRANTY; without even the implied warranty of = * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU = * + * Lesser General Public License for more details. = * + * = * + * You should have received a copy of the GNU Lesser General Public = * + * License along with this software; if not, write to the Free = * + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA = * + * 02110-1301 USA, or see the FSF site: http://www.fsf.org. = * + *************************************************************************= *****/ +package org.jboss.unit.driver; + +/** + * @author Julien Viet + * @version $Revision: 1.1 $ + */ +public class DriverException extends Exception +{ + public DriverException() + { + } + + public DriverException(String string) + { + super(string); + } + + public DriverException(String string, Throwable throwable) + { + super(string, throwable); + } + + public DriverException(Throwable throwable) + { + super(throwable); + } +} Modified: modules/test/trunk/unit/src/main/org/jboss/unit/driver/TestDriver= .java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/driver/TestDriver.java = 2007-10-15 22:09:35 UTC (rev 8667) +++ modules/test/trunk/unit/src/main/org/jboss/unit/driver/TestDriver.java = 2007-10-15 22:45:01 UTC (rev 8668) @@ -38,8 +38,9 @@ * Initialize the test driver. * * @param context the driver context + * @throws DriverException if anything occurs that would prevent the in= itialization of the driver */ - void initDriver(DriverContext context); + void initDriver(DriverContext context) throws DriverException; = /** * Destroy the test driver. Modified: modules/test/trunk/unit/src/main/org/jboss/unit/driver/impl/compo= site/CompositeTestDriver.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/driver/impl/composite/C= ompositeTestDriver.java 2007-10-15 22:09:35 UTC (rev 8667) +++ modules/test/trunk/unit/src/main/org/jboss/unit/driver/impl/composite/C= ompositeTestDriver.java 2007-10-15 22:45:01 UTC (rev 8668) @@ -26,6 +26,7 @@ import org.jboss.unit.driver.DriverResponse; import org.jboss.unit.driver.DriverCommand; import org.jboss.unit.driver.AbstractTestDriver; +import org.jboss.unit.driver.DriverException; import org.jboss.unit.driver.response.FailureResponse; import org.jboss.unit.info.impl.SimpleTestSuiteInfo; import org.jboss.unit.info.TestInfo; @@ -95,7 +96,7 @@ return drivers.get(name); } = - public void mount(TestDriver driver) + public void mount(TestDriver driver) throws DriverException { synchronized(TestDriver.class) { Modified: modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/drive= r/TestDriverRunner.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/driver/Test= DriverRunner.java 2007-10-15 22:09:35 UTC (rev 8667) +++ modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/driver/Test= DriverRunner.java 2007-10-15 22:45:01 UTC (rev 8668) @@ -113,7 +113,7 @@ // try { - TestSuiteInfo info =3D (TestSuiteInfo)driver.getInfo(); + TestInfo info =3D driver.getInfo(); = // internalRun(context, info, testId, new TestId()); @@ -125,7 +125,7 @@ { driver.destroyDriver(); } - catch (Throwable ignore) + catch (RuntimeException ignore) { } } --===============6272630575952221503==-- From portal-commits at lists.jboss.org Tue Oct 16 08:18:12 2007 Content-Type: multipart/mixed; boundary="===============8959309760774177462==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8669 - modules/test/trunk/build/ide/intellij/idea60/modules/unit. Date: Tue, 16 Oct 2007 08:16:33 -0400 Message-ID: --===============8959309760774177462== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: julien(a)jboss.com Date: 2007-10-16 08:16:32 -0400 (Tue, 16 Oct 2007) New Revision: 8669 Removed: modules/test/trunk/build/ide/intellij/idea60/modules/unit/tooling.iml Log: removed misplaced tooling iml Deleted: modules/test/trunk/build/ide/intellij/idea60/modules/unit/tooling.= iml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/build/ide/intellij/idea60/modules/unit/tooling.iml 2= 007-10-15 22:45:01 UTC (rev 8668) +++ modules/test/trunk/build/ide/intellij/idea60/modules/unit/tooling.iml 2= 007-10-16 12:16:32 UTC (rev 8669) @@ -1,38 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - --===============8959309760774177462==-- From portal-commits at lists.jboss.org Tue Oct 16 11:05:25 2007 Content-Type: multipart/mixed; boundary="===============6873190971229219780==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8670 - in modules/test/trunk: tooling/src/main/org/jboss/unit/tooling/ant and 1 other directories. Date: Tue, 16 Oct 2007 11:05:25 -0400 Message-ID: --===============6873190971229219780== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: bdaw Date: 2007-10-16 11:05:25 -0400 (Tue, 16 Oct 2007) New Revision: 8670 Modified: modules/test/trunk/test/src/main/org/jboss/portal/test/framework/embedde= d/DSConfig.java modules/test/trunk/tooling/src/main/org/jboss/unit/tooling/ant/ToolingCo= nstants.java modules/test/trunk/unit/src/main/org/jboss/unit/tooling/Main.java Log: - improve LDAP config support for tests - make Main print whole test output at the end of the run. Modified: modules/test/trunk/test/src/main/org/jboss/portal/test/framework/= embedded/DSConfig.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/test/src/main/org/jboss/portal/test/framework/embedd= ed/DSConfig.java 2007-10-16 12:16:32 UTC (rev 8669) +++ modules/test/trunk/test/src/main/org/jboss/portal/test/framework/embedd= ed/DSConfig.java 2007-10-16 15:05:25 UTC (rev 8670) @@ -31,9 +31,7 @@ import java.io.InputStream; import java.net.URL; import java.util.ArrayList; -import java.util.Arrays; import java.util.Iterator; -import java.util.List; = /** * Configuration of LDAP Directory Server used for tests. Corresponds with= directories.xml file @@ -118,6 +116,30 @@ // return new MultiValuedTestParameterValue(list); // } = + public static DSConfig obtainConfig(String directories, String director= yName) throws Exception + { + if (directoryName !=3D null && directoryName.length() > 0) + { + URL url =3D Thread.currentThread().getContextClassLoader().getRes= ource(directories); + + DSConfig[] configs =3D fromXML(url); + + for (DSConfig config : configs) + { + if (config.getName().equals(directoryName)) + { + return config; + } + } + + throw new IllegalStateException("Could not obtain Config for {dir= ectoryName:directories} - {" + directoryName + ":" + directories + "}" ); + } + else + { + return null; + } + } + public static DSConfig[] fromXML(URL url) throws Exception { ArrayList configs =3D new ArrayList(); Modified: modules/test/trunk/tooling/src/main/org/jboss/unit/tooling/ant/To= olingConstants.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/tooling/src/main/org/jboss/unit/tooling/ant/ToolingC= onstants.java 2007-10-16 12:16:32 UTC (rev 8669) +++ modules/test/trunk/tooling/src/main/org/jboss/unit/tooling/ant/ToolingC= onstants.java 2007-10-16 15:05:25 UTC (rev 8670) @@ -33,6 +33,10 @@ = public static final String JBOSS_UNIT_PROPERTY =3D "jboss.unit.property= "; = + public static final String JBOSS_UNIT_PARAMETER =3D "jboss.unit.paramet= er"; + + public static final String JBOSS_UNIT_PARAMETERS =3D "jboss.unit.parame= ters"; = + public static final String OPT_ID =3D "--id"; = public static final String OPT_IDS =3D "--ids"; Modified: modules/test/trunk/unit/src/main/org/jboss/unit/tooling/Main.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/tooling/Main.java 2007-= 10-16 12:16:32 UTC (rev 8669) +++ modules/test/trunk/unit/src/main/org/jboss/unit/tooling/Main.java 2007-= 10-16 15:05:25 UTC (rev 8670) @@ -28,12 +28,14 @@ import org.jboss.unit.runner.impl.TestRunnerEventBroadcaster; import org.jboss.unit.runner.model.TestSuiteDef; import org.jboss.unit.tooling.filter.MainTestFilter; +import org.jboss.unit.report.impl.writer.PrintListener; = import java.util.Set; import java.util.HashSet; import java.util.Map; import java.util.HashMap; import java.util.Collections; +import java.io.StringWriter; = /** * @author Boleslaw Dawidowicz @@ -54,8 +56,12 @@ = public static final String JBOSS_UNIT_PROPERTIES =3D "jboss.unit.proper= ties"; = - public static final String JBOSS_UNIT_PROPERTY =3D "jboss.unit.property= "; = + public static final String JBOSS_UNIT_PROPERTY =3D "jboss.unit.property= "; = + public static final String JBOSS_UNIT_PARAMETER =3D "jboss.unit.paramet= er"; + + public static final String JBOSS_UNIT_PARAMETERS =3D "jboss.unit.parame= ters"; = + public static final String OPT_ID =3D "--id"; = public static final String OPT_IDS =3D "--ids"; @@ -147,7 +153,7 @@ this.broadcaster =3D broadcaster; } = - public void execute() + public void execute() throws Exception { // For now lets just be verbose. Later we need some real logging + '= debug' switch System.out.println("TestRunnerContext contains: "); @@ -159,9 +165,16 @@ // // System.out.println(key + "=3D" + System.getProperty((String)key= )); // } - = + + StringWriter sw =3D new StringWriter(); + broadcaster.addListener(new PrintListener(sw)); + TestRunnerContextSupport runnerContext =3D new TestRunnerContextSupp= ort(properties, new ParametrizationSet(), mainFilter, broadcaster); runner.run(runnerContext); + + sw.close(); + + System.out.println(sw.toString()); } = public static void main(String[] args) throws Exception --===============6873190971229219780==-- From portal-commits at lists.jboss.org Tue Oct 16 15:43:31 2007 Content-Type: multipart/mixed; boundary="===============2503981647351313781==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8671 - in modules/test/trunk/build/ide/intellij: idea70 and 14 other directories. Date: Tue, 16 Oct 2007 15:43:31 -0400 Message-ID: --===============2503981647351313781== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: julien(a)jboss.com Date: 2007-10-16 15:43:30 -0400 (Tue, 16 Oct 2007) New Revision: 8671 Added: modules/test/trunk/build/ide/intellij/idea70/ modules/test/trunk/build/ide/intellij/idea70/config/ modules/test/trunk/build/ide/intellij/idea70/config/codestyles/ modules/test/trunk/build/ide/intellij/idea70/config/codestyles/jboss.xml modules/test/trunk/build/ide/intellij/idea70/config/fileTemplates/ modules/test/trunk/build/ide/intellij/idea70/config/fileTemplates/Standa= rtTestCasePortlet.java modules/test/trunk/build/ide/intellij/idea70/config/fileTemplates/includ= es/ modules/test/trunk/build/ide/intellij/idea70/config/fileTemplates/includ= es/Body Header.java modules/test/trunk/build/ide/intellij/idea70/config/fileTemplates/includ= es/File Header.java modules/test/trunk/build/ide/intellij/idea70/config/fileTemplates/intern= al/ modules/test/trunk/build/ide/intellij/idea70/config/fileTemplates/intern= al/AnnotationType.java modules/test/trunk/build/ide/intellij/idea70/config/fileTemplates/intern= al/Class.java modules/test/trunk/build/ide/intellij/idea70/config/fileTemplates/intern= al/Enum.java modules/test/trunk/build/ide/intellij/idea70/config/fileTemplates/intern= al/Interface.java modules/test/trunk/build/ide/intellij/idea70/jboss-portal-test.ipr modules/test/trunk/build/ide/intellij/idea70/modules/ modules/test/trunk/build/ide/intellij/idea70/modules/mc/ modules/test/trunk/build/ide/intellij/idea70/modules/mc/mc.iml modules/test/trunk/build/ide/intellij/idea70/modules/remote/ modules/test/trunk/build/ide/intellij/idea70/modules/remote/remote.iml modules/test/trunk/build/ide/intellij/idea70/modules/test/ modules/test/trunk/build/ide/intellij/idea70/modules/test/test.iml modules/test/trunk/build/ide/intellij/idea70/modules/testsuite/ modules/test/trunk/build/ide/intellij/idea70/modules/testsuite/testsuite= .iml modules/test/trunk/build/ide/intellij/idea70/modules/thirdparty/ modules/test/trunk/build/ide/intellij/idea70/modules/thirdparty/thirdpar= ty.iml modules/test/trunk/build/ide/intellij/idea70/modules/tooling/ modules/test/trunk/build/ide/intellij/idea70/modules/tooling/tooling.iml modules/test/trunk/build/ide/intellij/idea70/modules/tools/ modules/test/trunk/build/ide/intellij/idea70/modules/tools/tools.iml modules/test/trunk/build/ide/intellij/idea70/modules/unit/ modules/test/trunk/build/ide/intellij/idea70/modules/unit/unit.iml modules/test/trunk/build/ide/intellij/idea70/readme.txt Log: adding files for idea 7.0 in module test Added: modules/test/trunk/build/ide/intellij/idea70/config/codestyles/jboss= .xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/build/ide/intellij/idea70/config/codestyles/jboss.xm= l (rev 0) +++ modules/test/trunk/build/ide/intellij/idea70/config/codestyles/jboss.xm= l 2007-10-16 19:43:30 UTC (rev 8671) @@ -0,0 +1,31 @@ + + + + + Property changes on: modules/test/trunk/build/ide/intellij/idea70/config/co= destyles/jboss.xml ___________________________________________________________________ Name: svn:executable + * Added: modules/test/trunk/build/ide/intellij/idea70/config/fileTemplates/St= andartTestCasePortlet.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/build/ide/intellij/idea70/config/fileTemplates/Stand= artTestCasePortlet.java (rev 0) +++ modules/test/trunk/build/ide/intellij/idea70/config/fileTemplates/Stand= artTestCasePortlet.java 2007-10-16 19:43:30 UTC (rev 8671) @@ -0,0 +1,128 @@ +/*************************************************************************= ***** + * JBoss, a division of Red Hat = * + * Copyright 2006, Red Hat Middleware, LLC, and individual = * + * contributors as indicated by the @authors tag. See the = * + * copyright.txt in the distribution for a full listing of = * + * individual contributors. = * + * = * + * This is free software; you can redistribute it and/or modify it = * + * under the terms of the GNU Lesser General Public License as = * + * published by the Free Software Foundation; either version 2.1 of = * + * the License, or (at your option) any later version. = * + * = * + * This software is distributed in the hope that it will be useful, = * + * but WITHOUT ANY WARRANTY; without even the implied warranty of = * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU = * + * Lesser General Public License for more details. = * + * = * + * You should have received a copy of the GNU Lesser General Public = * + * License along with this software; if not, write to the Free = * + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA = * + * 02110-1301 USA, or see the FSF site: http://www.fsf.org. = * + *************************************************************************= *****/ +package ${PACKAGE_NAME}; + +import org.jboss.portal.test.framework.container.server.result.AssertResul= t; +import org.jboss.portal.test.framework.container.server.result.InvokeGetRe= sult; +import org.jboss.portal.test.framework.container.server.result.FailureResu= lt; +import org.jboss.portal.test.framework.container.server.result.ServerResul= t; +import org.jboss.portal.test.framework.container.server.TestContext; +import org.jboss.portal.test.portlet.AbstractTestPortlet; + + +import javax.portlet.ActionRequest; +import javax.portlet.ActionResponse; +import javax.portlet.PortletException; +import javax.portlet.PortletSecurityException; +import javax.portlet.RenderRequest; +import javax.portlet.RenderResponse; +import javax.portlet.PortletPreferences; +import javax.portlet.ValidatorException; +import javax.portlet.PortletURL; +import java.io.IOException; + +/** + * @author Boleslaw Daw= idowicz + * @version $Revision: 1951 $ + + */ +public class ${NAME} extends AbstractTestPortlet +{ + + + private AssertResult ares; + + public void doProcessAction(final ActionRequest request, ActionResponse= response) throws PortletException, PortletSecurityException, IOException + { + int requestCount =3D TestContext.getCurrentRequestCount(); + if (ares =3D=3D null) + { + if (requestCount =3D=3D 1) + { + ares =3D new AssertResult(); + ares.execute(new AssertResult.Test() + { + public void run() throws Exception + { + + } + }); + } + } + else if (!ares.isFailed()) + { + if (requestCount =3D=3D 2) + { + ares.execute(new AssertResult.Test() + { + public void run() throws Exception + { + + } + }); + } + } + } + + public void doRender(final RenderRequest request, RenderResponse respon= se) throws PortletException, PortletSecurityException, IOException + { + ServerResult result =3D null; + + int requestCount =3D TestContext.getCurrentRequestCount(); + if (ares =3D=3D null) + { + if (requestCount =3D=3D 0) + { + PortletURL url =3D response.createActionURL(); + result =3D new InvokeGetResult(url.toString()); + AbstractTestPortlet.marshall(result, response, TestContext.get= CurrentTestCaseId()); + } + else + { + AbstractTestPortlet.marshall(new FailureResult("The assert res= ult was expected to be not null"), response, TestContext.getCurrentTestCase= Id()); + } + } + else if (ares.isFailed()) + { + AbstractTestPortlet.marshall(ares, response, TestContext.getCurre= ntTestCaseId()); + } + else + { + if (requestCount =3D=3D 0) + { + AbstractTestPortlet.marshall(new FailureResult("The assert res= ult was expected to be not null"), response, TestContext.getCurrentTestCase= Id()); + } + else if (requestCount =3D=3D 1) + { + PortletURL url =3D response.createActionURL(); + result =3D new InvokeGetResult(url.toString()); + AbstractTestPortlet.marshall(result, response, TestContext.get= CurrentTestCaseId()); + } + else if (requestCount =3D=3D 2) + { + AbstractTestPortlet.marshall(ares, response, TestContext.getCu= rrentTestCaseId()); + } + } + } + +} Property changes on: modules/test/trunk/build/ide/intellij/idea70/config/fi= leTemplates/StandartTestCasePortlet.java ___________________________________________________________________ Name: svn:executable + * Added: modules/test/trunk/build/ide/intellij/idea70/config/fileTemplates/in= cludes/Body Header.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/build/ide/intellij/idea70/config/fileTemplates/inclu= des/Body Header.java (rev 0) +++ modules/test/trunk/build/ide/intellij/idea70/config/fileTemplates/inclu= des/Body Header.java 2007-10-16 19:43:30 UTC (rev 8671) @@ -0,0 +1,4 @@ +/** + * @author Julien Viet + * @version $Revision: 630 $ + */ Property changes on: modules/test/trunk/build/ide/intellij/idea70/config/fi= leTemplates/includes/Body Header.java ___________________________________________________________________ Name: svn:executable + * Added: modules/test/trunk/build/ide/intellij/idea70/config/fileTemplates/in= cludes/File Header.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/build/ide/intellij/idea70/config/fileTemplates/inclu= des/File Header.java (rev 0) +++ modules/test/trunk/build/ide/intellij/idea70/config/fileTemplates/inclu= des/File Header.java 2007-10-16 19:43:30 UTC (rev 8671) @@ -0,0 +1,22 @@ +/*************************************************************************= ***** + * JBoss, a division of Red Hat = * + * Copyright 2006, Red Hat Middleware, LLC, and individual = * + * contributors as indicated by the @authors tag. See the = * + * copyright.txt in the distribution for a full listing of = * + * individual contributors. = * + * = * + * This is free software; you can redistribute it and/or modify it = * + * under the terms of the GNU Lesser General Public License as = * + * published by the Free Software Foundation; either version 2.1 of = * + * the License, or (at your option) any later version. = * + * = * + * This software is distributed in the hope that it will be useful, = * + * but WITHOUT ANY WARRANTY; without even the implied warranty of = * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU = * + * Lesser General Public License for more details. = * + * = * + * You should have received a copy of the GNU Lesser General Public = * + * License along with this software; if not, write to the Free = * + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA = * + * 02110-1301 USA, or see the FSF site: http://www.fsf.org. = * + *************************************************************************= *****/ \ No newline at end of file Property changes on: modules/test/trunk/build/ide/intellij/idea70/config/fi= leTemplates/includes/File Header.java ___________________________________________________________________ Name: svn:executable + * Added: modules/test/trunk/build/ide/intellij/idea70/config/fileTemplates/in= ternal/AnnotationType.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/build/ide/intellij/idea70/config/fileTemplates/inter= nal/AnnotationType.java (rev 0) +++ modules/test/trunk/build/ide/intellij/idea70/config/fileTemplates/inter= nal/AnnotationType.java 2007-10-16 19:43:30 UTC (rev 8671) @@ -0,0 +1,5 @@ +#parse("File Header.java") +package ${PACKAGE_NAME}; +#parse("Body Header.java") +public @interface ${NAME} { +} Property changes on: modules/test/trunk/build/ide/intellij/idea70/config/fi= leTemplates/internal/AnnotationType.java ___________________________________________________________________ Name: svn:executable + * Added: modules/test/trunk/build/ide/intellij/idea70/config/fileTemplates/in= ternal/Class.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/build/ide/intellij/idea70/config/fileTemplates/inter= nal/Class.java (rev 0) +++ modules/test/trunk/build/ide/intellij/idea70/config/fileTemplates/inter= nal/Class.java 2007-10-16 19:43:30 UTC (rev 8671) @@ -0,0 +1,5 @@ +#parse("File Header.java") +package ${PACKAGE_NAME}; +#parse("Body Header.java") +public class ${NAME} { +} Property changes on: modules/test/trunk/build/ide/intellij/idea70/config/fi= leTemplates/internal/Class.java ___________________________________________________________________ Name: svn:executable + * Added: modules/test/trunk/build/ide/intellij/idea70/config/fileTemplates/in= ternal/Enum.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/build/ide/intellij/idea70/config/fileTemplates/inter= nal/Enum.java (rev 0) +++ modules/test/trunk/build/ide/intellij/idea70/config/fileTemplates/inter= nal/Enum.java 2007-10-16 19:43:30 UTC (rev 8671) @@ -0,0 +1,5 @@ +#parse("File Header.java") +package ${PACKAGE_NAME}; +#parse("Body Header.java") +public enum ${NAME} { +} Property changes on: modules/test/trunk/build/ide/intellij/idea70/config/fi= leTemplates/internal/Enum.java ___________________________________________________________________ Name: svn:executable + * Added: modules/test/trunk/build/ide/intellij/idea70/config/fileTemplates/in= ternal/Interface.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/build/ide/intellij/idea70/config/fileTemplates/inter= nal/Interface.java (rev 0) +++ modules/test/trunk/build/ide/intellij/idea70/config/fileTemplates/inter= nal/Interface.java 2007-10-16 19:43:30 UTC (rev 8671) @@ -0,0 +1,5 @@ +#parse("File Header.java") +package ${PACKAGE_NAME}; +#parse("Body Header.java") +public interface ${NAME} { +} Property changes on: modules/test/trunk/build/ide/intellij/idea70/config/fi= leTemplates/internal/Interface.java ___________________________________________________________________ Name: svn:executable + * Added: modules/test/trunk/build/ide/intellij/idea70/jboss-portal-test.ipr =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/build/ide/intellij/idea70/jboss-portal-test.ipr = (rev 0) +++ modules/test/trunk/build/ide/intellij/idea70/jboss-portal-test.ipr 2007= -10-16 19:43:30 UTC (rev 8671) @@ -0,0 +1,464 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + $PROJECT_DIR$/wsrp/src/resources/t= est + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Added: modules/test/trunk/build/ide/intellij/idea70/modules/mc/mc.iml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/build/ide/intellij/idea70/modules/mc/mc.iml = (rev 0) +++ modules/test/trunk/build/ide/intellij/idea70/modules/mc/mc.iml 2007-10-= 16 19:43:30 UTC (rev 8671) @@ -0,0 +1,181 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Added: modules/test/trunk/build/ide/intellij/idea70/modules/remote/remote.i= ml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/build/ide/intellij/idea70/modules/remote/remote.iml = (rev 0) +++ modules/test/trunk/build/ide/intellij/idea70/modules/remote/remote.iml = 2007-10-16 19:43:30 UTC (rev 8671) @@ -0,0 +1,209 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Added: modules/test/trunk/build/ide/intellij/idea70/modules/test/test.iml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/build/ide/intellij/idea70/modules/test/test.iml = (rev 0) +++ modules/test/trunk/build/ide/intellij/idea70/modules/test/test.iml 2007= -10-16 19:43:30 UTC (rev 8671) @@ -0,0 +1,535 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Added: modules/test/trunk/build/ide/intellij/idea70/modules/testsuite/tests= uite.iml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/build/ide/intellij/idea70/modules/testsuite/testsuit= e.iml (rev 0) +++ modules/test/trunk/build/ide/intellij/idea70/modules/testsuite/testsuit= e.iml 2007-10-16 19:43:30 UTC (rev 8671) @@ -0,0 +1,192 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Added: modules/test/trunk/build/ide/intellij/idea70/modules/thirdparty/thir= dparty.iml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/build/ide/intellij/idea70/modules/thirdparty/thirdpa= rty.iml (rev 0) +++ modules/test/trunk/build/ide/intellij/idea70/modules/thirdparty/thirdpa= rty.iml 2007-10-16 19:43:30 UTC (rev 8671) @@ -0,0 +1,245 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Added: modules/test/trunk/build/ide/intellij/idea70/modules/tooling/tooling= .iml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/build/ide/intellij/idea70/modules/tooling/tooling.im= l (rev 0) +++ modules/test/trunk/build/ide/intellij/idea70/modules/tooling/tooling.im= l 2007-10-16 19:43:30 UTC (rev 8671) @@ -0,0 +1,37 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Added: modules/test/trunk/build/ide/intellij/idea70/modules/tools/tools.iml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/build/ide/intellij/idea70/modules/tools/tools.iml = (rev 0) +++ modules/test/trunk/build/ide/intellij/idea70/modules/tools/tools.iml 20= 07-10-16 19:43:30 UTC (rev 8671) @@ -0,0 +1,201 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Added: modules/test/trunk/build/ide/intellij/idea70/modules/unit/unit.iml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/build/ide/intellij/idea70/modules/unit/unit.iml = (rev 0) +++ modules/test/trunk/build/ide/intellij/idea70/modules/unit/unit.iml 2007= -10-16 19:43:30 UTC (rev 8671) @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + + + + + Added: modules/test/trunk/build/ide/intellij/idea70/readme.txt =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/build/ide/intellij/idea70/readme.txt = (rev 0) +++ modules/test/trunk/build/ide/intellij/idea70/readme.txt 2007-10-16 19:4= 3:30 UTC (rev 8671) @@ -0,0 +1,10 @@ +- Main project file and modules: +Copy jboss-portal.ipr to the root of the Portal source directory. You migh= t need to change the JDK to use but +it should otherwise work out the box. Alternatively, you can create a new = project file at the root of your Portal +installation and import the module files (*.iml) found in the modules dire= ctory manually. + +- Codestyles and headers: = +The config directory contains standard settings for the JBoss Portal proje= ct regarding headers and code style. If +you intend to commit code to JBoss Portal, you need to update your IDEA in= stallation to use these files. Please +refer to the IDEA manual on how to precisely do it, the short version bein= g that you can replace the files found +in your IDEA preference directory by the ones found in the config director= y. Property changes on: modules/test/trunk/build/ide/intellij/idea70/readme.txt ___________________________________________________________________ Name: svn:executable + * --===============2503981647351313781==-- From portal-commits at lists.jboss.org Tue Oct 16 15:46:35 2007 Content-Type: multipart/mixed; boundary="===============0891127975345456720==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8672 - in modules/test/trunk/build/ide/intellij/idea70: modules/mc and 7 other directories. Date: Tue, 16 Oct 2007 15:46:34 -0400 Message-ID: --===============0891127975345456720== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: julien(a)jboss.com Date: 2007-10-16 15:46:34 -0400 (Tue, 16 Oct 2007) New Revision: 8672 Modified: modules/test/trunk/build/ide/intellij/idea70/jboss-portal-test.ipr modules/test/trunk/build/ide/intellij/idea70/modules/mc/mc.iml modules/test/trunk/build/ide/intellij/idea70/modules/remote/remote.iml modules/test/trunk/build/ide/intellij/idea70/modules/test/test.iml modules/test/trunk/build/ide/intellij/idea70/modules/testsuite/testsuite= .iml modules/test/trunk/build/ide/intellij/idea70/modules/thirdparty/thirdpar= ty.iml modules/test/trunk/build/ide/intellij/idea70/modules/tooling/tooling.iml modules/test/trunk/build/ide/intellij/idea70/modules/tools/tools.iml modules/test/trunk/build/ide/intellij/idea70/modules/unit/unit.iml Log: update project file for idea70 Modified: modules/test/trunk/build/ide/intellij/idea70/jboss-portal-test.ipr =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/build/ide/intellij/idea70/jboss-portal-test.ipr 2007= -10-16 19:43:30 UTC (rev 8671) +++ modules/test/trunk/build/ide/intellij/idea70/jboss-portal-test.ipr 2007= -10-16 19:46:34 UTC (rev 8672) @@ -1,5 +1,5 @@ - + @@ -33,11 +33,12 @@ - - + + - + - + + + + + - + + + - - - $PROJECT_DIR$/wsrp/src/resources/t= est + + + + + + + + + + - - = Modified: modules/test/trunk/build/ide/intellij/idea70/modules/mc/mc.iml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/build/ide/intellij/idea70/modules/mc/mc.iml 2007-10-= 16 19:43:30 UTC (rev 8671) +++ modules/test/trunk/build/ide/intellij/idea70/modules/mc/mc.iml 2007-10-= 16 19:46:34 UTC (rev 8672) @@ -1,6 +1,5 @@ - - + Modified: modules/test/trunk/build/ide/intellij/idea70/modules/remote/remot= e.iml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/build/ide/intellij/idea70/modules/remote/remote.iml = 2007-10-16 19:43:30 UTC (rev 8671) +++ modules/test/trunk/build/ide/intellij/idea70/modules/remote/remote.iml = 2007-10-16 19:46:34 UTC (rev 8672) @@ -1,6 +1,5 @@ - - + Modified: modules/test/trunk/build/ide/intellij/idea70/modules/test/test.iml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/build/ide/intellij/idea70/modules/test/test.iml 2007= -10-16 19:43:30 UTC (rev 8671) +++ modules/test/trunk/build/ide/intellij/idea70/modules/test/test.iml 2007= -10-16 19:46:34 UTC (rev 8672) @@ -1,6 +1,5 @@ - - + Modified: modules/test/trunk/build/ide/intellij/idea70/modules/testsuite/te= stsuite.iml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/build/ide/intellij/idea70/modules/testsuite/testsuit= e.iml 2007-10-16 19:43:30 UTC (rev 8671) +++ modules/test/trunk/build/ide/intellij/idea70/modules/testsuite/testsuit= e.iml 2007-10-16 19:46:34 UTC (rev 8672) @@ -1,6 +1,5 @@ - - + Modified: modules/test/trunk/build/ide/intellij/idea70/modules/thirdparty/t= hirdparty.iml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/build/ide/intellij/idea70/modules/thirdparty/thirdpa= rty.iml 2007-10-16 19:43:30 UTC (rev 8671) +++ modules/test/trunk/build/ide/intellij/idea70/modules/thirdparty/thirdpa= rty.iml 2007-10-16 19:46:34 UTC (rev 8672) @@ -1,6 +1,5 @@ - - + Modified: modules/test/trunk/build/ide/intellij/idea70/modules/tooling/tool= ing.iml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/build/ide/intellij/idea70/modules/tooling/tooling.im= l 2007-10-16 19:43:30 UTC (rev 8671) +++ modules/test/trunk/build/ide/intellij/idea70/modules/tooling/tooling.im= l 2007-10-16 19:46:34 UTC (rev 8672) @@ -1,6 +1,5 @@ - - + Modified: modules/test/trunk/build/ide/intellij/idea70/modules/tools/tools.= iml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/build/ide/intellij/idea70/modules/tools/tools.iml 20= 07-10-16 19:43:30 UTC (rev 8671) +++ modules/test/trunk/build/ide/intellij/idea70/modules/tools/tools.iml 20= 07-10-16 19:46:34 UTC (rev 8672) @@ -1,6 +1,5 @@ - - + Modified: modules/test/trunk/build/ide/intellij/idea70/modules/unit/unit.iml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/build/ide/intellij/idea70/modules/unit/unit.iml 2007= -10-16 19:43:30 UTC (rev 8671) +++ modules/test/trunk/build/ide/intellij/idea70/modules/unit/unit.iml 2007= -10-16 19:46:34 UTC (rev 8672) @@ -1,6 +1,5 @@ - - + --===============0891127975345456720==-- From portal-commits at lists.jboss.org Wed Oct 17 06:48:42 2007 Content-Type: multipart/mixed; boundary="===============4731557215943669220==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8673 - modules/portlet/trunk/build. Date: Wed, 17 Oct 2007 06:48:42 -0400 Message-ID: --===============4731557215943669220== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: bdaw Date: 2007-10-17 06:48:42 -0400 (Wed, 17 Oct 2007) New Revision: 8673 Modified: modules/portlet/trunk/build/build-thirdparty.xml Log: make portlet module use test module 1.0.0 jars Modified: modules/portlet/trunk/build/build-thirdparty.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/portlet/trunk/build/build-thirdparty.xml 2007-10-16 19:46:34 UT= C (rev 8672) +++ modules/portlet/trunk/build/build-thirdparty.xml 2007-10-17 10:48:42 UT= C (rev 8673) @@ -48,7 +48,7 @@ = - + = --===============4731557215943669220==-- From portal-commits at lists.jboss.org Wed Oct 17 07:11:12 2007 Content-Type: multipart/mixed; boundary="===============9124537320063951164==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8674 - modules/web/trunk/build. Date: Wed, 17 Oct 2007 07:11:10 -0400 Message-ID: --===============9124537320063951164== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: bdaw Date: 2007-10-17 07:11:09 -0400 (Wed, 17 Oct 2007) New Revision: 8674 Modified: modules/web/trunk/build/build-thirdparty.xml Log: make web module use test module 1.0.0 jars Modified: modules/web/trunk/build/build-thirdparty.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/web/trunk/build/build-thirdparty.xml 2007-10-17 10:48:42 UTC (r= ev 8673) +++ modules/web/trunk/build/build-thirdparty.xml 2007-10-17 11:11:09 UTC (r= ev 8674) @@ -48,7 +48,7 @@ --> = - + --===============9124537320063951164==-- From portal-commits at lists.jboss.org Wed Oct 17 09:05:07 2007 Content-Type: multipart/mixed; boundary="===============6976038336295701108==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8675 - in modules/identity/trunk: build/ide/intellij/idea60/modules/identity and 13 other directories. Date: Wed, 17 Oct 2007 09:05:04 -0400 Message-ID: --===============6976038336295701108== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: bdaw Date: 2007-10-17 09:05:03 -0400 (Wed, 17 Oct 2007) New Revision: 8675 Added: modules/identity/trunk/identity/src/main/org/jboss/portal/test/identity/= GenericTest.java modules/identity/trunk/identity/src/main/org/jboss/portal/test/identity/= GenericTestPOJO.java modules/identity/trunk/identity/src/main/org/jboss/portal/test/identity/= IdentityTestPOJO.java modules/identity/trunk/identity/src/main/org/jboss/portal/test/identity/= db/DBGenericTest.java modules/identity/trunk/identity/src/main/org/jboss/portal/test/identity/= ldap/LDAPExtRoleModuleTest.java modules/identity/trunk/identity/src/main/org/jboss/portal/test/identity/= ldap/LDAPExtUserModuleTest.java modules/identity/trunk/identity/src/main/org/jboss/portal/test/identity/= ldap/LDAPGenericTest.java modules/identity/trunk/identity/src/main/org/jboss/portal/test/identity/= ldap/LDAPSimpleRoleModuleTest.java modules/identity/trunk/identity/src/main/org/jboss/portal/test/identity/= ldap/LDAPSimpleUserModuleTest.java modules/identity/trunk/identity/src/main/org/jboss/portal/test/identity/= ldap/LDAPStaticGroupMembershipModuleTest.java modules/identity/trunk/identity/src/main/org/jboss/portal/test/identity/= ldap/LDAPStaticRoleMembershipModuleTest.java modules/identity/trunk/identity/src/main/org/jboss/portal/test/identity/= ldap/LDAPTestPOJO.java modules/identity/trunk/identity/src/resources/log4j.properties modules/identity/trunk/identity/src/resources/test/jboss-unit.xml Removed: modules/identity/trunk/identity/src/main/org/jboss/portal/test/identity/= IdentityTest.java modules/identity/trunk/identity/src/main/org/jboss/portal/test/identity/= db/DBIdentityTestCase.java modules/identity/trunk/identity/src/main/org/jboss/portal/test/identity/= db/DBTestCase.java modules/identity/trunk/identity/src/main/org/jboss/portal/test/identity/= ldap/LDAPExtRoleModuleTestCase.java modules/identity/trunk/identity/src/main/org/jboss/portal/test/identity/= ldap/LDAPExtUserModuleTestCase.java modules/identity/trunk/identity/src/main/org/jboss/portal/test/identity/= ldap/LDAPIdentityTestCase.java modules/identity/trunk/identity/src/main/org/jboss/portal/test/identity/= ldap/LDAPMembershipModuleTestCase.java modules/identity/trunk/identity/src/main/org/jboss/portal/test/identity/= ldap/LDAPSimpleRoleModuleTestCase.java modules/identity/trunk/identity/src/main/org/jboss/portal/test/identity/= ldap/LDAPSimpleUserModuleTestCase.java modules/identity/trunk/identity/src/main/org/jboss/portal/test/identity/= ldap/LDAPStaticGroupMembershipModuleTestCase.java modules/identity/trunk/identity/src/main/org/jboss/portal/test/identity/= ldap/LDAPStaticRoleMembershipModuleTestCase.java modules/identity/trunk/identity/src/main/org/jboss/portal/test/identity/= ldap/LDAPTestCase.java Modified: modules/identity/trunk/build/build-thirdparty.xml modules/identity/trunk/build/ide/intellij/idea60/modules/identity/identi= ty.iml modules/identity/trunk/identity/build.xml modules/identity/trunk/identity/src/main/org/jboss/portal/test/identity/= TestServiceLoader.java modules/identity/trunk/identity/src/main/org/jboss/portal/test/identity/= ldap/LDAPUserProfileModuleTestCase.java modules/identity/trunk/identity/src/resources/portal-identity-test-jar/o= rg/jboss/portal/test/identity/db-beans.xml modules/identity/trunk/identity/src/resources/portal-identity-test-jar/o= rg/jboss/portal/test/identity/ldap-beans.xml modules/identity/trunk/identity/src/resources/test/config/standardidenti= ty-config.xml modules/identity/trunk/sso/build.xml modules/identity/trunk/sso/src/main/org/jboss/portal/identity/sso/cas/CA= SAuthenticationHandler.java modules/identity/trunk/sso/src/main/org/jboss/portal/test/identity/sso/C= ASTestCase.java modules/identity/trunk/sso/src/main/org/jboss/portal/test/identity/sso/E= asySSLProtocolSocketFactory.java modules/identity/trunk/sso/src/main/org/jboss/portal/test/identity/sso/E= asyX509TrustManager.java modules/identity/trunk/sso/src/main/org/jboss/portal/test/identity/sso/J= OSSOTestCase.java modules/identity/trunk/testsuite/build.xml modules/identity/trunk/tools/etc/buildfragments/defaults.ent Log: - migrate identity testsuite to jboss unit - sso tests temporarily commented out Modified: modules/identity/trunk/build/build-thirdparty.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/identity/trunk/build/build-thirdparty.xml 2007-10-17 11:11:09 U= TC (rev 8674) +++ modules/identity/trunk/build/build-thirdparty.xml 2007-10-17 13:05:03 U= TC (rev 8675) @@ -47,18 +47,42 @@ are pushed to the http://repository.jboss.com site. --> = + + + + + + + - = + - = - + + + + + + + + + + + + = + + + + + + + + - + - Modified: modules/identity/trunk/build/ide/intellij/idea60/modules/identity= /identity.iml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/identity/trunk/build/ide/intellij/idea60/modules/identity/ident= ity.iml 2007-10-17 11:11:09 UTC (rev 8674) +++ modules/identity/trunk/build/ide/intellij/idea60/modules/identity/ident= ity.iml 2007-10-17 13:05:03 UTC (rev 8675) @@ -163,6 +163,348 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Modified: modules/identity/trunk/identity/build.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/identity/trunk/identity/build.xml 2007-10-17 11:11:09 UTC (rev = 8674) +++ modules/identity/trunk/identity/build.xml 2007-10-17 13:05:03 UTC (rev = 8675) @@ -95,18 +95,66 @@ - + + + + + + + + + + + + + + + + + = + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + = @@ -142,14 +190,13 @@ description=3D"Compile all source files." depends=3D"generate-parsers, compile-classes, - compile-classes15, _default:compile-etc, _default:compile-resources"> = = - + = @@ -181,47 +228,11 @@ = - = = - - - - - - - - - - - - - - - - - - - - - - - + = = @@ -256,36 +267,22 @@ = - + = - - - - + = = - - @@ -315,20 +312,6 @@ = = - - - - - @@ -343,187 +326,43 @@ = - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + = + = + + + + + + = - - - - + + + = - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + = + + + + + + + + + Copied: modules/identity/trunk/identity/src/main/org/jboss/portal/test/iden= tity/GenericTest.java (from rev 8668, modules/identity/trunk/identity/src/m= ain/org/jboss/portal/test/identity/IdentityTest.java) =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/identity/trunk/identity/src/main/org/jboss/portal/test/identity= /GenericTest.java (rev 0) +++ modules/identity/trunk/identity/src/main/org/jboss/portal/test/identity= /GenericTest.java 2007-10-17 13:05:03 UTC (rev 8675) @@ -0,0 +1,747 @@ +package org.jboss.portal.test.identity; + +import org.jboss.unit.api.Assert; + + +import org.jboss.portal.identity.UserModule; +import org.jboss.portal.identity.RoleModule; +import org.jboss.portal.identity.MembershipModule; +import org.jboss.portal.identity.UserProfileModule; +import org.jboss.portal.identity.User; +import org.jboss.portal.identity.Role; +import org.jboss.portal.identity.IdentityException; +import org.jboss.portal.identity.CachedUserImpl; +import org.jboss.portal.common.util.CollectionBuilder; +import org.jboss.portal.common.p3p.P3PConstants; + +import java.util.Set; +import java.util.HashSet; +import java.util.Iterator; +import java.util.Arrays; +import java.util.Collections; +import java.util.Map; +import java.util.Date; + +/** + * @author Julien Viet + * @version $Revision$ + */ +public class GenericTest +{ + + /** . */ + private GenericTest.Context ctx; + + + public GenericTest(Context ctx) + { + this.ctx =3D ctx; + } + + public void setContext(GenericTest.Context ctx) + { + this.ctx =3D ctx; + } + + public void testFindUsersUsingFilter() throws Exception + { + populate(); + ctx.begin(); + Set set1 =3D ctx.getUserModule().findUsersFilteredByUserName("user",= 0, 10); + + + Set userNames =3D new HashSet(); + + for (Iterator iterator =3D set1.iterator(); iterator.hasNext();) + { + User u =3D (User)iterator.next(); + userNames.add(u.getUserName()); + } + + + Assert.assertTrue(userNames.contains("user1")); + Assert.assertTrue(userNames.contains("user2")); + + + // + Set set2 =3D ctx.getUserModule().findUsersFilteredByUserName("blah",= 0, 10); + Assert.assertEquals(0, set2.size()); + + // + Set set3 =3D ctx.getUserModule().findUsersFilteredByUserName("", 0, = 10); + + userNames =3D new HashSet(); + + for (Iterator iterator =3D set3.iterator(); iterator.hasNext();) + { + User u =3D (User)iterator.next(); + userNames.add(u.getUserName()); + } + + Assert.assertTrue(userNames.contains("admin")); + Assert.assertTrue(userNames.contains("user1")); + Assert.assertTrue(userNames.contains("user2")); + + // + Set set4 =3D ctx.getUserModule().findUsersFilteredByUserName("user1"= , 0, 10); + + + Iterator it =3D set4.iterator(); + User user =3D (User)it.next(); + Assert.assertEquals("user1", user.getUserName()); + ctx.commit(); + } + + public void testFindUser1() throws Exception + { + populate(); + ctx.begin(); + User u1 =3D ctx.getUserModule().findUserByUserName("user1"); + Assert.assertNotNull(u1); + Assert.assertEquals("user1", u1.getUserName()); + Assert.assertNotNull(ctx.getMembershipModule().getRoles(u1)); + Assert.assertEquals(1, ctx.getMembershipModule().getRoles(u1).size()= ); + Assert.assertEquals("role1", ((Role)ctx.getMembershipModule().getRol= es(u1).iterator().next()).getName()); + Assert.assertEquals(u1.getId(), ctx.getUserModule().findUserById(u1.= getId()).getId()); + ctx.commit(); + } + + public void testFindUser2() throws Exception + { + populate(); + ctx.begin(); + Set roleNames =3D new HashSet(Arrays.asList(new Object[]{"role1", "r= ole2"})); + User u2 =3D ctx.getUserModule().findUserByUserName("user2"); + Assert.assertNotNull(u2); + Assert.assertEquals("user2", u2.getUserName()); + Assert.assertNotNull(ctx.getMembershipModule().getRoles(u2)); + Assert.assertEquals(2, ctx.getMembershipModule().getRoles(u2).size()= ); + Iterator iterator =3D ctx.getMembershipModule().getRoles(u2).iterato= r(); + Assert.assertTrue(roleNames.contains(((Role)iterator.next()).getName= ())); + Assert.assertTrue(roleNames.contains(((Role)iterator.next()).getName= ())); + Assert.assertEquals(u2.getId(), ctx.getUserModule().findUserById(u2.= getId()).getId()); + ctx.commit(); + } + + public void testFindUsers() throws Exception + { + populate(); + ctx.begin(); + Set c1 =3D ctx.getUserModule().findUsers(0, 1); + Assert.assertNotNull(c1); + Assert.assertEquals(1, c1.size()); + + Set c2 =3D ctx.getUserModule().findUsers(1, 1); + Assert.assertNotNull(c2); + Assert.assertEquals(1, c2.size()); + + Set c3 =3D ctx.getUserModule().findUsers(0, 2); + Assert.assertNotNull(c3); + Assert.assertEquals(2, c3.size()); + + Set s1 =3D new HashSet(); + s1.add(((User)c1.iterator().next()).getUserName()); + s1.add(((User)c2.iterator().next()).getUserName()); + Set s2 =3D new HashSet(); + Iterator iterator =3D c3.iterator(); + s2.add(((User)iterator.next()).getUserName()); + s2.add(((User)iterator.next()).getUserName()); + Assert.assertEquals(s1, s2); + ctx.commit(); + } + + public void testCreateUser() throws Exception + { + populate(); + ctx.begin(); + User u3 =3D ctx.getUserModule().createUser("user3", "password"); + Role g1 =3D ctx.getRoleModule().findRoleByName("role1"); + ctx.getMembershipModule().assignRoles(u3, Collections.singleton(g1)); + Assert.assertEquals("user3", u3.getUserName()); + Assert.assertNotNull(ctx.getMembershipModule().getRoles(u3)); + Assert.assertEquals(1, ctx.getMembershipModule().getRoles(u3).size()= ); + Assert.assertEquals("role1", ((Role)ctx.getMembershipModule().getRol= es(u3).iterator().next()).getName()); + ctx.commit(); + + ctx.begin(); + u3 =3D ctx.getUserModule().findUserByUserName("user3"); + Assert.assertNotNull(u3); + Assert.assertEquals("user3", u3.getUserName()); + + //test if CachedUserImpl will be handled properly + u3 =3D new CachedUserImpl(u3.getId(), u3.getUserName()); + + Assert.assertNotNull(ctx.getMembershipModule().getRoles(u3)); + Assert.assertEquals(1, ctx.getMembershipModule().getRoles(u3).size()= ); + Assert.assertEquals("role1", ((Role)ctx.getMembershipModule().getRol= es(u3).iterator().next()).getName()); + ctx.commit(); + } + + // public void testCreateDuplicateUser() throws Exception + // { + // try + // { + // ctx.getUserModule().createUser("user1"); + // fail("Expected exception on duplicate user"); + // } + // catch (ModuleException expected) + // { + // } + // } + + public void testCreateRole() throws Exception + { + populate(); + ctx.begin(); + Role g3 =3D ctx.getRoleModule().createRole("role3", "roleName"); + Assert.assertEquals("role3", g3.getName()); + ctx.commit(); + + ctx.begin(); + g3 =3D ctx.getRoleModule().findRoleByName("role3"); + Assert.assertNotNull(g3); + Assert.assertEquals("role3", g3.getName()); + ctx.commit(); + } + + // public void testCreateDuplicateRole() throws Exception + // { + // try + // { + // ctx.getRoleModule().createRole("user1"); + // fail("Expected exception on duplicate role"); + // } + // catch (ModuleException expected) + // { + // } + // } + + public void testCountUser() throws Exception + { + populate(); + ctx.begin(); + Assert.assertEquals(3, ctx.getUserModule().getUserCount()); + ctx.commit(); + } + + public void testRemoveNonExistingRole() throws Exception + { + populate(); + ctx.begin(); + try + { + ctx.getRoleModule().removeRole(new Long(Long.MAX_VALUE)); + Assert.fail("Expected exception"); + } + catch (IdentityException expected) + { + } + ctx.commit(); + } + + public void testRemoveRole() throws Exception + { + populate(); + ctx.begin(); + Role g1 =3D ctx.getRoleModule().findRoleByName("role1"); + Object id =3D g1.getId(); + ctx.getRoleModule().removeRole(id); + try + { + ctx.getRoleModule().findRoleById(id); + Assert.fail("Expected exception"); + } + catch (IdentityException expected) + { + } + ctx.commit(); + + ctx.begin(); + try + { + ctx.getRoleModule().findRoleById(id); + Assert.fail("Expected exception"); + } + catch (IdentityException expected) + { + } + User u1 =3D ctx.getUserModule().findUserByUserName("user1"); + Assert.assertNotNull(u1); + Assert.assertEquals("user1", u1.getUserName()); + ctx.commit(); + } + + public void testRemoveUser() throws Exception + { + populate(); + ctx.begin(); + User u1 =3D ctx.getUserModule().findUserByUserName("user1"); + Object id =3D u1.getId(); + ctx.getUserModule().removeUser(id); + try + { + ctx.getUserModule().findUserById(id); + Assert.fail("Expected exception"); + } + catch (IdentityException expected) + { + } + ctx.commit(); + + ctx.begin(); + try + { + ctx.getUserModule().findUserById(id); + Assert.fail("Expected exception"); + } + catch (IdentityException expected) + { + } + Role g1 =3D ctx.getRoleModule().findRoleByName("role1"); + Assert.assertNotNull(g1); + Assert.assertEquals("role1", g1.getName()); + Role g2 =3D ctx.getRoleModule().findRoleByName("role2"); + Assert.assertNotNull(g2); + Assert.assertEquals("role2", g2.getName()); + ctx.commit(); + + ctx.begin(); + + try + { + ctx.getUserModule().removeUser(new Long(9999999)); + Assert.fail(); + } + catch (IdentityException e) + { + //expected + } + + ctx.commit(); + } + + public void testFindRoles() throws Exception + { + populate(); + ctx.begin(); + Set roleNames =3D new HashSet(Arrays.asList(new Object[]{"role1", "r= ole2"})); + Set roles =3D ctx.getRoleModule().findRoles(); + = + Assert.assertEquals(2, roles.size()); + Iterator iterator =3D roles.iterator(); + Assert.assertTrue(roleNames.contains(((Role)iterator.next()).getName= ())); + Assert.assertTrue(roleNames.contains(((Role)iterator.next()).getName= ())); + ctx.commit(); + } + + public void testFindRoleMembers() throws Exception + { + populate(); + ctx.begin(); + Set set1 =3D ctx.getMembershipModule().findRoleMembers("role1", 0, 1= 0, "user"); + + Set userNames =3D new HashSet(); + + for (Iterator iterator =3D set1.iterator(); iterator.hasNext();) + { + User u =3D (User)iterator.next(); + userNames.add(u.getUserName()); + } + + Assert.assertTrue(userNames.contains("user1")); + Assert.assertTrue(userNames.contains("user2")); + + + + // + Set set2 =3D ctx.getMembershipModule().findRoleMembers("role1", 0, 1= 0, "blah"); + Assert.assertEquals(0, set2.size()); + + // + Set set3 =3D ctx.getMembershipModule().findRoleMembers("role1", 0, 1= 0, ""); + + userNames =3D new HashSet(); + + for (Iterator iterator =3D set3.iterator(); iterator.hasNext();) + { + User u =3D (User)iterator.next(); + userNames.add(u.getUserName()); + } + + Assert.assertTrue(userNames.contains("user1")); + Assert.assertTrue(userNames.contains("user2")); + Assert.assertTrue(userNames.contains("admin")); + + + // + Set set4 =3D ctx.getMembershipModule().findRoleMembers("role1", 0, 1= 0, "user1"); + Iterator i =3D set4.iterator(); + User user =3D (User)i.next(); + Assert.assertEquals("user1", user.getUserName()); + + ctx.commit(); + } + + public void testNonStandardUserNames() throws Exception + { + populate(); + ctx.begin(); + + Role role =3D ctx.getRoleModule().createRole("TestRole", "DisplayNam= e"); + + Set users =3D new HashSet(); + + User user =3D ctx.getUserModule().createUser("user, Test", "password= "); + users.add(user); + user =3D ctx.getUserModule().createUser("user1, Test", "password"); + users.add(user); + user =3D ctx.getUserModule().createUser("user2, Test", "password"); + users.add(user); + + // + + //create names with RFC 2253 exceptions + user =3D ctx.getUserModule().createUser("test ++", "password"); + users.add(user); + //user =3D ctx.getUserModule().createUser("test \"", "password"); + users.add(user); + //ctx.getUserModule().createUser("test \\", "password"); + //users.add(user); + user =3D ctx.getUserModule().createUser("test <", "password"); + users.add(user); + user =3D ctx.getUserModule().createUser("test >", "password"); + users.add(user); + user =3D ctx.getUserModule().createUser("test ;", "password"); + users.add(user); + + ctx.getMembershipModule().assignUsers(role, users); + + ctx.commit(); + + ctx.begin(); + + role =3D ctx.getRoleModule().findRoleByName("TestRole"); + + users =3D ctx.getMembershipModule().getUsers(role); + + Assert.assertEquals(7, users.size()); + + Assert.assertNotNull(ctx.getUserModule().findUserByUserName("user, T= est")); + Assert.assertNotNull(ctx.getUserModule().findUserByUserName("user1, = Test")); + Assert.assertNotNull(ctx.getUserModule().findUserByUserName("user2, = Test")); + + Assert.assertNotNull(ctx.getUserModule().findUserByUserName("test ++= ")); + //assertNotNull(ctx.getUserModule().findUserByUserName("test \"")); + //assertNotNull(ctx.getUserModule().findUserByUserName("test \\")); + Assert.assertNotNull(ctx.getUserModule().findUserByUserName("test <"= )); + Assert.assertNotNull(ctx.getUserModule().findUserByUserName("test >"= )); + Assert.assertNotNull(ctx.getUserModule().findUserByUserName("test ;"= )); + + ctx.commit(); + } + + public void testDynamicProperty() throws Exception + { + populate(); + ctx.begin(); + /*User user =3D ctx.getUserModule().createUser("testname", "testpass= word"); + Map map =3D ctx.getUserProfileModule().getProperties(user); + assertNull(map.get("foo")); + //assertFalse(map.isReadOnly("foo")); + map.put("foo", "value"); + assertEquals("value", map.get("foo")); + //assertFalse(map.isReadOnly("foo")); + ctx.commit(); + + ctx.begin(); + user =3D ctx.getUserModule().findUserByUserName("testname"); + map =3D ctx.getUserProfileModule().getProperties(user); + assertEquals("value", map.get("foo")); + //assertFalse(map.isReadOnly("foo"));*/ + ctx.commit(); + } + + public void testStaticProperty() throws Exception + { + populate(); + ctx.begin(); + + // + User user =3D ctx.getUserModule().createUser("testname", "testpasswo= rd"); + + //test if CachedUserImpl is handled properly + user =3D new CachedUserImpl(user.getId(), user.getUserName()); + = + Map map =3D ctx.getUserProfileModule().getProperties(user); + //assertEquals("testname", map.get(P3PConstants.INFO_USER_NAME_NICKN= AME)); + + // Test cannot remove property + try + { + map.remove(P3PConstants.INFO_USER_NAME_GIVEN); + Assert.fail("Should not be able to remove property from a map"); + } + catch (Exception expected) + { + } + + /*// Test read only property + //assertTrue(map.isReadOnly(P3PConstants.INFO_USER_NAME_NICKNAME)); + try + { + .put(P3PConstants.INFO_USER_NAME_NICKNAME, "anothername"); + fail("Should not be capable to modify a read only static property= "); + } + catch (IllegalArgumentException expected) + { + }*/ + + // Test non nullable and writable property + /*try + { + map.put(User.INFO_USER_VIEW_EMAIL_VIEW_REAL, null); + fail("Should not be capable to nullify a non nullable static prop= erty"); + } + catch (NullPointerException expected) + { + }*/ + //map.put(User.INFO_USER_VIEW_EMAIL_VIEW_REAL, "true"); + ctx.getUserProfileModule().setProperty(user, User.INFO_USER_VIEW_EMA= IL_VIEW_REAL, Boolean.TRUE); + Assert.assertEquals(Boolean.TRUE.toString(), ctx.getUserProfileModul= e().getProperty(user, User.INFO_USER_VIEW_EMAIL_VIEW_REAL).toString()); + + // Test boolean property + ctx.getUserProfileModule().setProperty(user, User.INFO_USER_VIEW_EMA= IL_VIEW_REAL, Boolean.FALSE); + //assertEquals(Boolean.FALSE.toString(), map.get(User.INFO_USER_VIEW= _EMAIL_VIEW_REAL).toString()); + Assert.assertEquals(Boolean.FALSE.toString(), ctx.getUserProfileModu= le().getProperty(user, User.INFO_USER_VIEW_EMAIL_VIEW_REAL).toString()); + + ctx.getUserProfileModule().setProperty(user, User.INFO_USER_VIEW_EMA= IL_VIEW_REAL, Boolean.TRUE); + //assertEquals(Boolean.TRUE.toString(), map.get(User.INFO_USER_VIEW_= EMAIL_VIEW_REAL).toString()); + Assert.assertEquals(Boolean.TRUE.toString(), ctx.getUserProfileModul= e().getProperty(user, User.INFO_USER_VIEW_EMAIL_VIEW_REAL).toString()); + + ctx.getUserProfileModule().setProperty(user, User.INFO_USER_VIEW_EMA= IL_VIEW_REAL, Boolean.FALSE); + //assertEquals(Boolean.FALSE.toString(), map.get(User.INFO_USER_VIEW= _EMAIL_VIEW_REAL).toString()); + Assert.assertEquals(Boolean.FALSE.toString(), ctx.getUserProfileModu= le().getProperty(user, User.INFO_USER_VIEW_EMAIL_VIEW_REAL).toString()); + + ctx.getUserProfileModule().setProperty(user, User.INFO_USER_VIEW_EMA= IL_VIEW_REAL, Boolean.TRUE); + //assertEquals(Boolean.TRUE.toString(), map.get(User.INFO_USER_VIEW_= EMAIL_VIEW_REAL).toString()); + Assert.assertEquals(Boolean.TRUE.toString(), ctx.getUserProfileModul= e().getProperty(user, User.INFO_USER_VIEW_EMAIL_VIEW_REAL).toString()); + try + { + ctx.getUserProfileModule().setProperty(user, User.INFO_USER_VIEW_= EMAIL_VIEW_REAL, "true"); + Assert.fail("Should not be capable to set a bad value to boolean = property"); + } + catch (Exception expected) + { + } + + // Test date + //Date date =3D ((HibernateUserImpl)user.getRegistrationDate(); + Date date =3D (Date)ctx.getUserProfileModule().getProperty(user, Use= r.INFO_USER_REGISTRATION_DATE); + = + // property mapped as java.util.Date = \ + try + { + ctx.getUserProfileModule().setProperty(user, User.INFO_USER_REGIS= TRATION_DATE, new Date()); + Assert.fail(); + } + catch (IdentityException e) + { + // should fail on read-only property + } + + //just to check the cast... + date =3D (Date)ctx.getUserProfileModule().getProperty(user, User.INF= O_USER_REGISTRATION_DATE); + + // properties mapped in ldap (if ldap module present and delegated) + ctx.getUserProfileModule().setProperty(user, User.INFO_USER_OCCUPATI= ON, "portal developer"); + String occup =3D (String)ctx.getUserProfileModule().getProperty(user= , User.INFO_USER_OCCUPATION); + Assert.assertEquals("portal developer", occup); + + ctx.getUserProfileModule().setProperty(user, User.INFO_USER_EMAIL_RE= AL, "dev(a)portal.com"); + String email =3D (String)ctx.getUserProfileModule().getProperty(user= , User.INFO_USER_EMAIL_REAL); + Assert.assertEquals("dev(a)portal.com", email); + + //property mapped as java.lang.Boolean + ctx.getUserProfileModule().setProperty(user, User.INFO_USER_VIEW_EMA= IL_VIEW_REAL, Boolean.TRUE); + + Boolean view =3D (Boolean)ctx.getUserProfileModule().getProperty(use= r, User.INFO_USER_VIEW_EMAIL_VIEW_REAL); + Assert.assertEquals(Boolean.TRUE.toString(),view.toString()); + + ctx.commit(); + } + + public void testNullProperty() throws Exception + { + populate(); + ctx.begin(); + + User user =3D ctx.getUserModule().createUser("testname", "testpasswo= rd"); + + ctx.getUserProfileModule().setProperty(user, User.INFO_USER_THEME, "= some theme value"); + + Object o =3D ctx.getUserProfileModule().getProperty(user, User.INFO_= USER_THEME); + + Assert.assertNotNull(o); + Assert.assertEquals(o.toString(), "some theme value"); + + ctx.getUserProfileModule().setProperty(user, User.INFO_USER_THEME, n= ull); + + o =3D ctx.getUserProfileModule().getProperty(user, User.INFO_USER_TH= EME); + + Assert.assertNull(o); + + ctx.commit(); + + } + + public void testFindUserRoles() throws Exception + { + populate(); + ctx.begin(); + + + ctx.commit(); + } + + public void testGetProperties() throws Exception + { + populate(); + ctx.begin(); + + User user =3D ctx.getUserModule().createUser("testname", "testpasswo= rd"); + + // Set few properties for both LDAP and DB mappings + //ctx.getUserProfileModule().setProperty(user, "user.name.nickName",= "blah"); + ctx.getUserProfileModule().setProperty(user, "user.name.family", "bl= ah"); + ctx.getUserProfileModule().setProperty(user, "user.name.given", "bla= h"); + + //LDAP + ctx.getUserProfileModule().setProperty(user, "user.business-info.onl= ine.email", "blah"); + ctx.getUserProfileModule().setProperty(user, "portal.user.occupation= ", "blah"); + + // Check if they exist - should be merged + Map props =3D ctx.getUserProfileModule().getProperties(user); + + + //assertTrue(props.containsKey("user.name.nickName")); + Assert.assertTrue(props.containsKey("user.name.family")); + Assert.assertTrue(props.containsKey("user.name.given")); + Assert.assertTrue(props.containsKey("user.business-info.online.email= ")); + Assert.assertTrue(props.containsKey("portal.user.occupation")); + + + ctx.commit(); + } + + + public void testFindUsers2() throws Exception + { + populate(); + ctx.begin(); + + ctx.getUserModule().createUser("test1", "test1"); + ctx.getUserModule().createUser("test2", "test2"); + ctx.getUserModule().createUser("test3", "test3"); + ctx.getUserModule().createUser("test4", "test4"); + ctx.getUserModule().createUser("test5", "test5"); + ctx.getUserModule().createUser("test6", "test6"); + ctx.getUserModule().createUser("test7", "testx"); + ctx.getUserModule().createUser("test8", "testx"); + + + Assert.assertEquals(11, ctx.getUserModule().getUserCount()); + + Set users =3D ctx.getUserModule().findUsers(0, 4); + + Assert.assertEquals(4, users.size()); + + users =3D ctx.getUserModule().findUsers(0, 10); + + Assert.assertEquals(10, users.size()); + + users =3D ctx.getUserModule().findUsers(10,1); + + Assert.assertEquals(1, users.size()); + + users =3D ctx.getUserModule().findUsers(10,10); + + Assert.assertEquals(1, users.size()); + + users =3D ctx.getUserModule().findUsers(10,20); + + Assert.assertEquals(1, users.size()); + + ctx.getUserModule().createUser("test9", "testx"); + ctx.getUserModule().createUser("test10", "testx"); + ctx.getUserModule().createUser("test11", "testx"); + ctx.getUserModule().createUser("test12", "testx"); + ctx.getUserModule().createUser("test13", "testx"); + ctx.getUserModule().createUser("test14", "testx"); + ctx.getUserModule().createUser("test15", "testx"); + ctx.getUserModule().createUser("test16", "testx"); + ctx.getUserModule().createUser("test17", "testx"); + ctx.getUserModule().createUser("test18", "testx"); + ctx.getUserModule().createUser("test19", "testx"); + ctx.getUserModule().createUser("test20", "testx"); + ctx.getUserModule().createUser("test21", "testx"); + ctx.getUserModule().createUser("test22", "testx"); + ctx.getUserModule().createUser("test23", "testx"); + + Assert.assertEquals(26, ctx.getUserModule().getUserCount()); + + users =3D ctx.getUserModule().findUsers(10, 10); + + Assert.assertEquals(10, users.size()); + + users =3D ctx.getUserModule().findUsers(20, 1); + + Assert.assertEquals(1, users.size()); + + users =3D ctx.getUserModule().findUsers(20, 6); + + Assert.assertEquals(6, users.size()); + + users =3D ctx.getUserModule().findUsers(20, 10); + + Assert.assertEquals(6, users.size()); + ctx.commit(); + } + + = + + + +// + public void populate() throws Exception + { + ctx.begin(); + User admin =3D ctx.getUserModule().createUser("admin", ""); + User u1 =3D ctx.getUserModule().createUser("user1", ""); + User u2 =3D ctx.getUserModule().createUser("user2", ""); + Role g1 =3D ctx.getRoleModule().createRole("role1", "role1"); + Role g2 =3D ctx.getRoleModule().createRole("role2", "role2"); + ctx.getMembershipModule().assignRoles(u1, Collections.singleton(g1)); + ctx.getMembershipModule().assignRoles(u2, new CollectionBuilder().ad= d(g1).add(g2).toHashSet()); + ctx.getMembershipModule().assignRoles(admin, new CollectionBuilder()= .add(g1).add(g2).toHashSet()); + ctx.commit(); + } + + + + + + public interface Context + { + void begin(); + + void commit(); + + public UserModule getUserModule(); + + public RoleModule getRoleModule(); + + public MembershipModule getMembershipModule(); + + public UserProfileModule getUserProfileModule(); + } +} Added: modules/identity/trunk/identity/src/main/org/jboss/portal/test/ident= ity/GenericTestPOJO.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/identity/trunk/identity/src/main/org/jboss/portal/test/identity= /GenericTestPOJO.java (rev 0) +++ modules/identity/trunk/identity/src/main/org/jboss/portal/test/identity= /GenericTestPOJO.java 2007-10-17 13:05:03 UTC (rev 8675) @@ -0,0 +1,48 @@ +/* +* JBoss, a division of Red Hat +* Copyright 2006, Red Hat Middleware, LLC, and individual contributors as = indicated +* by the @authors tag. See the copyright.txt in the distribution for a +* full listing of individual contributors. +* +* This is free software; you can redistribute it and/or modify it +* under the terms of the GNU Lesser General Public License as +* published by the Free Software Foundation; either version 2.1 of +* the License, or (at your option) any later version. +* +* This software is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +* Lesser General Public License for more details. +* +* You should have received a copy of the GNU Lesser General Public +* License along with this software; if not, write to the Free +* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +* 02110-1301 USA, or see the FSF site: http://www.fsf.org. +*/ + +package org.jboss.portal.test.identity; + +import static org.jboss.unit.api.Assert.*; +import org.jboss.unit.api.pojo.annotations.Test; + +/** + * @author Boleslaw Dawidowicz + * @version : 0.1 $ + */ +public class GenericTestPOJO extends IdentityTestPOJO implements GenericTe= st.Context +{ + protected GenericTest genericTest =3D new GenericTest(this); + + public void begin() + { + getHibernateSupport().openSession(); + } + + public void commit() + { + assertTrue(getHibernateSupport().commitTransaction()); + } + + + +} Deleted: modules/identity/trunk/identity/src/main/org/jboss/portal/test/ide= ntity/IdentityTest.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/identity/trunk/identity/src/main/org/jboss/portal/test/identity= /IdentityTest.java 2007-10-17 11:11:09 UTC (rev 8674) +++ modules/identity/trunk/identity/src/main/org/jboss/portal/test/identity= /IdentityTest.java 2007-10-17 13:05:03 UTC (rev 8675) @@ -1,747 +0,0 @@ -package org.jboss.portal.test.identity; - -import junit.framework.Assert; -import org.jboss.portal.identity.UserModule; -import org.jboss.portal.identity.RoleModule; -import org.jboss.portal.identity.MembershipModule; -import org.jboss.portal.identity.UserProfileModule; -import org.jboss.portal.identity.User; -import org.jboss.portal.identity.Role; -import org.jboss.portal.identity.IdentityException; -import org.jboss.portal.identity.ProfileMap; -import org.jboss.portal.identity.NoSuchUserException; -import org.jboss.portal.identity.CachedUserImpl; -import org.jboss.portal.common.util.CollectionBuilder; -import org.jboss.portal.common.p3p.P3PConstants; - -import java.util.Set; -import java.util.HashSet; -import java.util.Iterator; -import java.util.Arrays; -import java.util.Collections; -import java.util.Map; -import java.util.Date; -import java.text.SimpleDateFormat; - -/** - * @author Julien Viet - * @version $Revision$ - */ -public class IdentityTest extends Assert -{ - - /** . */ - private UserModule userModule; - - /** . */ - private RoleModule roleModule; - - /** . */ - private MembershipModule membershipModule; - - /** . */ - private UserProfileModule userProfileModule; - - - /** . */ - private IdentityTest.Context ctx; - - public void setUserModule(UserModule userModule) - { - this.userModule =3D userModule; - } - - public void setRoleModule(RoleModule roleModule) - { - this.roleModule =3D roleModule; - } - - public void setMembershipModule(MembershipModule membershipModule) - { - this.membershipModule =3D membershipModule; - } - - public void setUserProfileModule(UserProfileModule userProfileModule) - { - this.userProfileModule =3D userProfileModule; - } - - public void setContext(IdentityTest.Context ctx) - { - this.ctx =3D ctx; - } - - public void testFindUsersUsingFilter() throws Exception - { - ctx.begin(); - Set set1 =3D userModule.findUsersFilteredByUserName("user", 0, 10); - - - Set userNames =3D new HashSet(); - - for (Iterator iterator =3D set1.iterator(); iterator.hasNext();) - { - User u =3D (User)iterator.next(); - userNames.add(u.getUserName()); - } - - assertTrue(userNames.contains("user1")); - assertTrue(userNames.contains("user2")); - - - // - Set set2 =3D userModule.findUsersFilteredByUserName("blah", 0, 10); - assertEquals(0, set2.size()); - - // - Set set3 =3D userModule.findUsersFilteredByUserName("", 0, 10); - - userNames =3D new HashSet(); - - for (Iterator iterator =3D set3.iterator(); iterator.hasNext();) - { - User u =3D (User)iterator.next(); - userNames.add(u.getUserName()); - } - - assertTrue(userNames.contains("admin")); - assertTrue(userNames.contains("user1")); - assertTrue(userNames.contains("user2")); - - // - Set set4 =3D userModule.findUsersFilteredByUserName("user1", 0, 10); - - - Iterator it =3D set4.iterator(); - User user =3D (User)it.next(); - assertEquals("user1", user.getUserName()); - ctx.commit(); - } - - public void testFindUser1() throws Exception - { - ctx.begin(); - User u1 =3D userModule.findUserByUserName("user1"); - assertNotNull(u1); - Assert.assertEquals("user1", u1.getUserName()); - assertNotNull(membershipModule.getRoles(u1)); - Assert.assertEquals(1, membershipModule.getRoles(u1).size()); - Assert.assertEquals("role1", ((Role)membershipModule.getRoles(u1).it= erator().next()).getName()); - Assert.assertEquals(u1.getId(), userModule.findUserById(u1.getId()).= getId()); - ctx.commit(); - } - - public void testFindUser2() throws Exception - { - ctx.begin(); - Set roleNames =3D new HashSet(Arrays.asList(new Object[]{"role1", "r= ole2"})); - User u2 =3D userModule.findUserByUserName("user2"); - assertNotNull(u2); - Assert.assertEquals("user2", u2.getUserName()); - assertNotNull(membershipModule.getRoles(u2)); - Assert.assertEquals(2, membershipModule.getRoles(u2).size()); - Iterator iterator =3D membershipModule.getRoles(u2).iterator(); - assertTrue(roleNames.contains(((Role)iterator.next()).getName())); - assertTrue(roleNames.contains(((Role)iterator.next()).getName())); - Assert.assertEquals(u2.getId(), userModule.findUserById(u2.getId()).= getId()); - ctx.commit(); - } - - public void testFindUsers() throws Exception - { - ctx.begin(); - Set c1 =3D userModule.findUsers(0, 1); - assertNotNull(c1); - assertEquals(1, c1.size()); - - Set c2 =3D userModule.findUsers(1, 1); - assertNotNull(c2); - assertEquals(1, c2.size()); - - Set c3 =3D userModule.findUsers(0, 2); - assertNotNull(c3); - assertEquals(2, c3.size()); - - Set s1 =3D new HashSet(); - s1.add(((User)c1.iterator().next()).getUserName()); - s1.add(((User)c2.iterator().next()).getUserName()); - Set s2 =3D new HashSet(); - Iterator iterator =3D c3.iterator(); - s2.add(((User)iterator.next()).getUserName()); - s2.add(((User)iterator.next()).getUserName()); - assertEquals(s1, s2); - ctx.commit(); - } - - public void testCreateUser() throws Exception - { - ctx.begin(); - User u3 =3D userModule.createUser("user3", "password"); - Role g1 =3D roleModule.findRoleByName("role1"); - membershipModule.assignRoles(u3, Collections.singleton(g1)); - Assert.assertEquals("user3", u3.getUserName()); - assertNotNull(membershipModule.getRoles(u3)); - Assert.assertEquals(1, membershipModule.getRoles(u3).size()); - Assert.assertEquals("role1", ((Role)membershipModule.getRoles(u3).it= erator().next()).getName()); - ctx.commit(); - - ctx.begin(); - u3 =3D userModule.findUserByUserName("user3"); - assertNotNull(u3); - Assert.assertEquals("user3", u3.getUserName()); - - //test if CachedUserImpl will be handled properly - u3 =3D new CachedUserImpl(u3.getId(), u3.getUserName()); - - assertNotNull(membershipModule.getRoles(u3)); - Assert.assertEquals(1, membershipModule.getRoles(u3).size()); - Assert.assertEquals("role1", ((Role)membershipModule.getRoles(u3).it= erator().next()).getName()); - ctx.commit(); - } - - // public void testCreateDuplicateUser() throws Exception - // { - // try - // { - // userModule.createUser("user1"); - // fail("Expected exception on duplicate user"); - // } - // catch (ModuleException expected) - // { - // } - // } - - public void testCreateRole() throws Exception - { - ctx.begin(); - Role g3 =3D roleModule.createRole("role3", "roleName"); - Assert.assertEquals("role3", g3.getName()); - ctx.commit(); - - ctx.begin(); - g3 =3D roleModule.findRoleByName("role3"); - assertNotNull(g3); - Assert.assertEquals("role3", g3.getName()); - ctx.commit(); - } - - // public void testCreateDuplicateRole() throws Exception - // { - // try - // { - // roleModule.createRole("user1"); - // fail("Expected exception on duplicate role"); - // } - // catch (ModuleException expected) - // { - // } - // } - - public void testCountUser() throws Exception - { - ctx.begin(); - Assert.assertEquals(3, userModule.getUserCount()); - ctx.commit(); - } - - public void testRemoveNonExistingRole() throws Exception - { - ctx.begin(); - try - { - roleModule.removeRole(new Long(Long.MAX_VALUE)); - fail("Expected exception"); - } - catch (IdentityException expected) - { - } - ctx.commit(); - } - - public void testRemoveRole() throws Exception - { - ctx.begin(); - Role g1 =3D roleModule.findRoleByName("role1"); - Object id =3D g1.getId(); - roleModule.removeRole(id); - try - { - roleModule.findRoleById(id); - fail("Expected exception"); - } - catch (IdentityException expected) - { - } - ctx.commit(); - - ctx.begin(); - try - { - roleModule.findRoleById(id); - fail("Expected exception"); - } - catch (IdentityException expected) - { - } - User u1 =3D userModule.findUserByUserName("user1"); - assertNotNull(u1); - Assert.assertEquals("user1", u1.getUserName()); - ctx.commit(); - } - - public void testRemoveUser() throws Exception - { - ctx.begin(); - User u1 =3D userModule.findUserByUserName("user1"); - Object id =3D u1.getId(); - userModule.removeUser(id); - try - { - userModule.findUserById(id); - fail("Expected exception"); - } - catch (IdentityException expected) - { - } - ctx.commit(); - - ctx.begin(); - try - { - userModule.findUserById(id); - fail("Expected exception"); - } - catch (IdentityException expected) - { - } - Role g1 =3D roleModule.findRoleByName("role1"); - assertNotNull(g1); - Assert.assertEquals("role1", g1.getName()); - Role g2 =3D roleModule.findRoleByName("role2"); - assertNotNull(g2); - Assert.assertEquals("role2", g2.getName()); - ctx.commit(); - - ctx.begin(); - - try - { - userModule.removeUser(new Long(9999999)); - fail(); - } - catch (IdentityException e) - { - //expected - } - - ctx.commit(); - } - - public void testFindRoles() throws Exception - { - ctx.begin(); - Set roleNames =3D new HashSet(Arrays.asList(new Object[]{"role1", "r= ole2"})); - Set roles =3D roleModule.findRoles(); - = - assertEquals(2, roles.size()); - Iterator iterator =3D roles.iterator(); - assertTrue(roleNames.contains(((Role)iterator.next()).getName())); - assertTrue(roleNames.contains(((Role)iterator.next()).getName())); - ctx.commit(); - } - - public void testFindRoleMembers() throws Exception - { - ctx.begin(); - Set set1 =3D membershipModule.findRoleMembers("role1", 0, 10, "user"= ); - - Set userNames =3D new HashSet(); - - for (Iterator iterator =3D set1.iterator(); iterator.hasNext();) - { - User u =3D (User)iterator.next(); - userNames.add(u.getUserName()); - } - - assertTrue(userNames.contains("user1")); - assertTrue(userNames.contains("user2")); - - - - // - Set set2 =3D membershipModule.findRoleMembers("role1", 0, 10, "blah"= ); - assertEquals(0, set2.size()); - - // - Set set3 =3D membershipModule.findRoleMembers("role1", 0, 10, ""); - - userNames =3D new HashSet(); - - for (Iterator iterator =3D set3.iterator(); iterator.hasNext();) - { - User u =3D (User)iterator.next(); - userNames.add(u.getUserName()); - } - - assertTrue(userNames.contains("user1")); - assertTrue(userNames.contains("user2")); - assertTrue(userNames.contains("admin")); - - - // - Set set4 =3D membershipModule.findRoleMembers("role1", 0, 10, "user1= "); - Iterator i =3D set4.iterator(); - User user =3D (User)i.next(); - assertEquals("user1", user.getUserName()); - - ctx.commit(); - } - - public void testNonStandardUserNames() throws Exception - { - ctx.begin(); - - Role role =3D roleModule.createRole("TestRole", "DisplayName"); - - Set users =3D new HashSet(); - - User user =3D userModule.createUser("user, Test", "password"); - users.add(user); - user =3D userModule.createUser("user1, Test", "password"); - users.add(user); - user =3D userModule.createUser("user2, Test", "password"); - users.add(user); - - // - - //create names with RFC 2253 exceptions - user =3D userModule.createUser("test ++", "password"); - users.add(user); - //user =3D userModule.createUser("test \"", "password"); - users.add(user); - //userModule.createUser("test \\", "password"); - //users.add(user); - user =3D userModule.createUser("test <", "password"); - users.add(user); - user =3D userModule.createUser("test >", "password"); - users.add(user); - user =3D userModule.createUser("test ;", "password"); - users.add(user); - - membershipModule.assignUsers(role, users); - - ctx.commit(); - - ctx.begin(); - - role =3D roleModule.findRoleByName("TestRole"); - - users =3D membershipModule.getUsers(role); - - assertEquals(7, users.size()); - - assertNotNull(userModule.findUserByUserName("user, Test")); - assertNotNull(userModule.findUserByUserName("user1, Test")); - assertNotNull(userModule.findUserByUserName("user2, Test")); - - assertNotNull(userModule.findUserByUserName("test ++")); - //assertNotNull(userModule.findUserByUserName("test \"")); - //assertNotNull(userModule.findUserByUserName("test \\")); - assertNotNull(userModule.findUserByUserName("test <")); - assertNotNull(userModule.findUserByUserName("test >")); - assertNotNull(userModule.findUserByUserName("test ;")); - - ctx.commit(); - } - - public void testDynamicProperty() throws Exception - { - ctx.begin(); - /*User user =3D userModule.createUser("testname", "testpassword"); - Map map =3D userProfileModule.getProperties(user); - assertNull(map.get("foo")); - //assertFalse(map.isReadOnly("foo")); - map.put("foo", "value"); - assertEquals("value", map.get("foo")); - //assertFalse(map.isReadOnly("foo")); - ctx.commit(); - - ctx.begin(); - user =3D userModule.findUserByUserName("testname"); - map =3D userProfileModule.getProperties(user); - assertEquals("value", map.get("foo")); - //assertFalse(map.isReadOnly("foo"));*/ - ctx.commit(); - } - - public void testStaticProperty() throws Exception - { - ctx.begin(); - - // - User user =3D userModule.createUser("testname", "testpassword"); - - //test if CachedUserImpl is handled properly - user =3D new CachedUserImpl(user.getId(), user.getUserName()); - = - Map map =3D userProfileModule.getProperties(user); - //assertEquals("testname", map.get(P3PConstants.INFO_USER_NAME_NICKN= AME)); - - // Test cannot remove property - try - { - map.remove(P3PConstants.INFO_USER_NAME_GIVEN); - fail("Should not be able to remove property from a map"); - } - catch (Exception expected) - { - } - - /*// Test read only property - //assertTrue(map.isReadOnly(P3PConstants.INFO_USER_NAME_NICKNAME)); - try - { - .put(P3PConstants.INFO_USER_NAME_NICKNAME, "anothername"); - fail("Should not be capable to modify a read only static property= "); - } - catch (IllegalArgumentException expected) - { - }*/ - - // Test non nullable and writable property - /*try - { - map.put(User.INFO_USER_VIEW_EMAIL_VIEW_REAL, null); - fail("Should not be capable to nullify a non nullable static prop= erty"); - } - catch (NullPointerException expected) - { - }*/ - //map.put(User.INFO_USER_VIEW_EMAIL_VIEW_REAL, "true"); - userProfileModule.setProperty(user, User.INFO_USER_VIEW_EMAIL_VIEW_R= EAL, Boolean.TRUE); - assertEquals(Boolean.TRUE.toString(), userProfileModule.getProperty(= user, User.INFO_USER_VIEW_EMAIL_VIEW_REAL).toString()); - - // Test boolean property - userProfileModule.setProperty(user, User.INFO_USER_VIEW_EMAIL_VIEW_R= EAL, Boolean.FALSE); - //assertEquals(Boolean.FALSE.toString(), map.get(User.INFO_USER_VIEW= _EMAIL_VIEW_REAL).toString()); - assertEquals(Boolean.FALSE.toString(), userProfileModule.getProperty= (user, User.INFO_USER_VIEW_EMAIL_VIEW_REAL).toString()); - - userProfileModule.setProperty(user, User.INFO_USER_VIEW_EMAIL_VIEW_R= EAL, Boolean.TRUE); - //assertEquals(Boolean.TRUE.toString(), map.get(User.INFO_USER_VIEW_= EMAIL_VIEW_REAL).toString()); - assertEquals(Boolean.TRUE.toString(), userProfileModule.getProperty(= user, User.INFO_USER_VIEW_EMAIL_VIEW_REAL).toString()); - - userProfileModule.setProperty(user, User.INFO_USER_VIEW_EMAIL_VIEW_R= EAL, Boolean.FALSE); - //assertEquals(Boolean.FALSE.toString(), map.get(User.INFO_USER_VIEW= _EMAIL_VIEW_REAL).toString()); - assertEquals(Boolean.FALSE.toString(), userProfileModule.getProperty= (user, User.INFO_USER_VIEW_EMAIL_VIEW_REAL).toString()); - - userProfileModule.setProperty(user, User.INFO_USER_VIEW_EMAIL_VIEW_R= EAL, Boolean.TRUE); - //assertEquals(Boolean.TRUE.toString(), map.get(User.INFO_USER_VIEW_= EMAIL_VIEW_REAL).toString()); - assertEquals(Boolean.TRUE.toString(), userProfileModule.getProperty(= user, User.INFO_USER_VIEW_EMAIL_VIEW_REAL).toString()); - try - { - userProfileModule.setProperty(user, User.INFO_USER_VIEW_EMAIL_VIE= W_REAL, "true"); - fail("Should not be capable to set a bad value to boolean propert= y"); - } - catch (Exception expected) - { - } - - // Test date - //Date date =3D ((HibernateUserImpl)user.getRegistrationDate(); - Date date =3D (Date)userProfileModule.getProperty(user, User.INFO_US= ER_REGISTRATION_DATE); - = - // property mapped as java.util.Date = \ - try - { - userProfileModule.setProperty(user, User.INFO_USER_REGISTRATION_D= ATE, new Date()); - fail(); - } - catch (IdentityException e) - { - // should fail on read-only property - } - - //just to check the cast... - date =3D (Date)userProfileModule.getProperty(user, User.INFO_USER_RE= GISTRATION_DATE); - - // properties mapped in ldap (if ldap module present and delegated) - userProfileModule.setProperty(user, User.INFO_USER_OCCUPATION, "port= al developer"); - String occup =3D (String)userProfileModule.getProperty(user, User.IN= FO_USER_OCCUPATION); - assertEquals("portal developer", occup); - - userProfileModule.setProperty(user, User.INFO_USER_EMAIL_REAL, "dev(= a)portal.com"); - String email =3D (String)userProfileModule.getProperty(user, User.IN= FO_USER_EMAIL_REAL); - assertEquals("dev(a)portal.com", email); - - //property mapped as java.lang.Boolean - userProfileModule.setProperty(user, User.INFO_USER_VIEW_EMAIL_VIEW_R= EAL, Boolean.TRUE); - - Boolean view =3D (Boolean)userProfileModule.getProperty(user, User.I= NFO_USER_VIEW_EMAIL_VIEW_REAL); - assertEquals(Boolean.TRUE.toString(),view.toString()); - - ctx.commit(); - } - - public void testNullProperty() throws Exception - { - ctx.begin(); - - User user =3D userModule.createUser("testname", "testpassword"); - - userProfileModule.setProperty(user, User.INFO_USER_THEME, "some them= e value"); - - Object o =3D userProfileModule.getProperty(user, User.INFO_USER_THEM= E); - - assertNotNull(o); - assertEquals(o.toString(), "some theme value"); - - userProfileModule.setProperty(user, User.INFO_USER_THEME, null); - - o =3D userProfileModule.getProperty(user, User.INFO_USER_THEME); - - assertNull(o); - - ctx.commit(); - - } - - public void testFindUserRoles() throws Exception - { - ctx.begin(); - - - ctx.commit(); - } - - public void testGetProperties() throws Exception - { - ctx.begin(); - - User user =3D userModule.createUser("testname", "testpassword"); - - // Set few properties for both LDAP and DB mappings - //userProfileModule.setProperty(user, "user.name.nickName", "blah"); - userProfileModule.setProperty(user, "user.name.family", "blah"); - userProfileModule.setProperty(user, "user.name.given", "blah"); - - //LDAP - userProfileModule.setProperty(user, "user.business-info.online.email= ", "blah"); - userProfileModule.setProperty(user, "portal.user.occupation", "blah"= ); - - // Check if they exist - should be merged - Map props =3D userProfileModule.getProperties(user); - - - //assertTrue(props.containsKey("user.name.nickName")); - assertTrue(props.containsKey("user.name.family")); - assertTrue(props.containsKey("user.name.given")); - assertTrue(props.containsKey("user.business-info.online.email")); - assertTrue(props.containsKey("portal.user.occupation")); - - - ctx.commit(); - } - - - public void testFindUsers2() throws Exception - { - ctx.begin(); - - userModule.createUser("test1", "test1"); - userModule.createUser("test2", "test2"); - userModule.createUser("test3", "test3"); - userModule.createUser("test4", "test4"); - userModule.createUser("test5", "test5"); - userModule.createUser("test6", "test6"); - userModule.createUser("test7", "testx"); - userModule.createUser("test8", "testx"); - - - assertEquals(11, userModule.getUserCount()); - - Set users =3D userModule.findUsers(0, 4); - - assertEquals(4, users.size()); - - users =3D userModule.findUsers(0, 10); - - assertEquals(10, users.size()); - - users =3D userModule.findUsers(10,1); - - assertEquals(1, users.size()); - - users =3D userModule.findUsers(10,10); - - assertEquals(1, users.size()); - - users =3D userModule.findUsers(10,20); - - assertEquals(1, users.size()); - - userModule.createUser("test9", "testx"); - userModule.createUser("test10", "testx"); - userModule.createUser("test11", "testx"); - userModule.createUser("test12", "testx"); - userModule.createUser("test13", "testx"); - userModule.createUser("test14", "testx"); - userModule.createUser("test15", "testx"); - userModule.createUser("test16", "testx"); - userModule.createUser("test17", "testx"); - userModule.createUser("test18", "testx"); - userModule.createUser("test19", "testx"); - userModule.createUser("test20", "testx"); - userModule.createUser("test21", "testx"); - userModule.createUser("test22", "testx"); - userModule.createUser("test23", "testx"); - - assertEquals(26, userModule.getUserCount()); - - users =3D userModule.findUsers(10, 10); - - assertEquals(10, users.size()); - - users =3D userModule.findUsers(20, 1); - - assertEquals(1, users.size()); - - users =3D userModule.findUsers(20, 6); - - assertEquals(6, users.size()); - - users =3D userModule.findUsers(20, 10); - - assertEquals(6, users.size()); - ctx.commit(); - } - - = - - - -// - public void populate() throws Exception - { - ctx.begin(); - User admin =3D userModule.createUser("admin", ""); - User u1 =3D userModule.createUser("user1", ""); - User u2 =3D userModule.createUser("user2", ""); - Role g1 =3D roleModule.createRole("role1", "role1"); - Role g2 =3D roleModule.createRole("role2", "role2"); - membershipModule.assignRoles(u1, Collections.singleton(g1)); - membershipModule.assignRoles(u2, new CollectionBuilder().add(g1).add= (g2).toHashSet()); - membershipModule.assignRoles(admin, new CollectionBuilder().add(g1).= add(g2).toHashSet()); - ctx.commit(); - } - - - - - - public interface Context - { - void begin(); - - void commit(); - } -} Added: modules/identity/trunk/identity/src/main/org/jboss/portal/test/ident= ity/IdentityTestPOJO.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/identity/trunk/identity/src/main/org/jboss/portal/test/identity= /IdentityTestPOJO.java (rev 0) +++ modules/identity/trunk/identity/src/main/org/jboss/portal/test/identity= /IdentityTestPOJO.java 2007-10-17 13:05:03 UTC (rev 8675) @@ -0,0 +1,185 @@ +/* +* JBoss, a division of Red Hat +* Copyright 2006, Red Hat Middleware, LLC, and individual contributors as = indicated +* by the @authors tag. See the copyright.txt in the distribution for a +* full listing of individual contributors. +* +* This is free software; you can redistribute it and/or modify it +* under the terms of the GNU Lesser General Public License as +* published by the Free Software Foundation; either version 2.1 of +* the License, or (at your option) any later version. +* +* This software is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +* Lesser General Public License for more details. +* +* You should have received a copy of the GNU Lesser General Public +* License along with this software; if not, write to the Free +* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +* 02110-1301 USA, or see the FSF site: http://www.fsf.org. +*/ + +package org.jboss.portal.test.identity; + +import org.jboss.portal.test.framework.embedded.HibernateSupport; +import org.jboss.portal.identity.IdentityContext; +import org.jboss.portal.identity.UserModule; +import org.jboss.portal.identity.RoleModule; +import org.jboss.portal.identity.MembershipModule; +import org.jboss.portal.identity.UserProfileModule; +import org.jboss.unit.api.pojo.annotations.Parameter; +import org.jboss.beans.metadata.plugins.annotations.Inject; +import org.apache.log4j.Appender; +import org.apache.log4j.ConsoleAppender; +import org.apache.log4j.Logger; +import org.apache.log4j.SimpleLayout; +import org.apache.log4j.Level; + +/** + * @author Boleslaw Dawidowicz + * @version $Revision: 0.1 $ + */ + +public class IdentityTestPOJO +{ + +// static +// { +// Appender appender =3D new ConsoleAppender(new SimpleLayout()); +// Logger.getRoot().addAppender(appender); +// Logger.getRoot().setLevel(Level.INFO); +// Logger.getLogger("org.jboss.portal.identity").setLevel(Level.DEBUG= ); +// } + + private String dataSourceName; + + private HibernateSupport hibernateSupport; + + private IdentityContext identityContext; + + private UserModule userModule; + + private RoleModule roleModule; + + private MembershipModule membershipModule; + + private UserProfileModule userProfileModule; + + private String standardIdentityConfig; + + private String identityConfig; + + private String datasources =3D "datasources.xml"; + + + @Parameter(name=3D"dataSourceName") + public void setDataSourceName(String dataSourceName) + { + this.dataSourceName =3D dataSourceName; + } + + @Parameter(name=3D"standardIdentityConfig") + public void setStandardIdentityConfig(String standardIdentityConfig) + { + this.standardIdentityConfig =3D standardIdentityConfig; + } + + @Parameter(name=3D"identityConfig") + public void setIdentityConfig(String customIdentityConfig) + { + this.identityConfig =3D customIdentityConfig; + } + + @Parameter(name=3D"datasources") + public void setDatasources(String datasources) + { + this.datasources =3D datasources; + } + + @Inject(bean=3D"HibernateSupport") + public void setHibernateSupport(HibernateSupport support) + { + hibernateSupport =3D support; + } + + @Inject(bean=3D"IdentityContext") + public void setIdentityContext(IdentityContext identityContext) + { + this.identityContext =3D identityContext; + } + + @Inject(bean=3D"UserModule") + public void setUserModule(UserModule userModule) + { + this.userModule =3D userModule; + } + + @Inject(bean=3D"RoleModule") + public void setRoleModule(RoleModule roleModule) + { + this.roleModule =3D roleModule; + } + + @Inject(bean=3D"MembershipModule") + public void setMembershipModule(MembershipModule membershipModule) + { + this.membershipModule =3D membershipModule; + } + + @Inject(bean=3D"UserProfileModule") + public void setUserProfileModule(UserProfileModule userProfileModule) + { + this.userProfileModule =3D userProfileModule; + } + + public String getDataSourceName() + { + return dataSourceName; + } + + public String getDatasources() + { + return datasources; + } + + public HibernateSupport getHibernateSupport() + { + return hibernateSupport; + } + + public UserModule getUserModule() + { + return userModule; + } + + public RoleModule getRoleModule() + { + return roleModule; + } + + public MembershipModule getMembershipModule() + { + return membershipModule; + } + + public UserProfileModule getUserProfileModule() + { + return userProfileModule; + } + + public String getStandardIdentityConfig() + { + return standardIdentityConfig; + } + + public String getIdentityConfig() + { + return identityConfig; + } + + public IdentityContext getIdentityContext() + { + return identityContext; + } +} Modified: modules/identity/trunk/identity/src/main/org/jboss/portal/test/id= entity/TestServiceLoader.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/identity/trunk/identity/src/main/org/jboss/portal/test/identity= /TestServiceLoader.java 2007-10-17 11:11:09 UTC (rev 8674) +++ modules/identity/trunk/identity/src/main/org/jboss/portal/test/identity= /TestServiceLoader.java 2007-10-17 13:05:03 UTC (rev 8675) @@ -43,6 +43,8 @@ import org.jboss.portal.identity.service.RoleModuleService; import org.jboss.portal.identity.service.MembershipModuleService; import org.jboss.portal.identity.metadata.service.IdentityServicesMetaData; +import org.jboss.portal.test.framework.embedded.DataSourceSupport; +import org.jboss.portal.test.framework.embedded.DSConfig; import org.jboss.kernel.plugins.bootstrap.basic.BasicBootstrap; import org.jboss.kernel.spi.dependency.KernelControllerContext; import org.jboss.kernel.Kernel; @@ -55,17 +57,25 @@ public class TestServiceLoader { = - public IdentityContext loadServices(String defaultConfigFile, String co= nfigFile) throws Exception + public IdentityContext loadServices(String defaultConfigFile, DSConfig = directoryConfig) throws Exception { + return loadServices(defaultConfigFile, directoryConfig.getConfigFile= ()); + } + = + + public IdentityContext loadServices(String defaultConfigFile, String id= entityConfig) throws Exception + { //initialize microcontainer stuff try { + + BasicBootstrap bootstrap =3D new BasicBootstrap(); bootstrap.run(); Kernel kernel =3D bootstrap.getKernel(); = = - IdentityServicesMetaData servicesMetaData =3D new IdentityService= sMetaData(defaultConfigFile, configFile); + IdentityServicesMetaData servicesMetaData =3D new IdentityService= sMetaData(defaultConfigFile, identityConfig); = IdentityContext identityContext =3D bootstrapIdentityContext(kern= el); = Copied: modules/identity/trunk/identity/src/main/org/jboss/portal/test/iden= tity/db/DBGenericTest.java (from rev 8656, modules/identity/trunk/identity/= src/main/org/jboss/portal/test/identity/db/DBIdentityTestCase.java) =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/identity/trunk/identity/src/main/org/jboss/portal/test/identity= /db/DBGenericTest.java (rev 0) +++ modules/identity/trunk/identity/src/main/org/jboss/portal/test/identity= /db/DBGenericTest.java 2007-10-17 13:05:03 UTC (rev 8675) @@ -0,0 +1,191 @@ +/* +* JBoss, a division of Red Hat +* Copyright 2006, Red Hat Middleware, LLC, and individual contributors as = indicated +* by the @authors tag. See the copyright.txt in the distribution for a +* full listing of individual contributors. +* +* This is free software; you can redistribute it and/or modify it +* under the terms of the GNU Lesser General Public License as +* published by the Free Software Foundation; either version 2.1 of +* the License, or (at your option) any later version. +* +* This software is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +* Lesser General Public License for more details. +* +* You should have received a copy of the GNU Lesser General Public +* License along with this software; if not, write to the Free +* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +* 02110-1301 USA, or see the FSF site: http://www.fsf.org. +*/ +package org.jboss.portal.test.identity.db; + +import org.jboss.portal.identity.ProfileMap; +import org.jboss.portal.identity.User; +import org.jboss.portal.identity.db.HibernateUserImpl; +import org.jboss.portal.test.identity.GenericTestPOJO; +import static org.jboss.unit.api.Assert.*; +import org.jboss.unit.api.pojo.annotations.Test; +import org.jboss.unit.api.pojo.annotations.Tag; +import org.jboss.unit.mc.api.annotations.Bootstrap; + +/** + * @author Julien Viet + * @version $Revision: 5748 $ + */ + +(a)Bootstrap(resourceName =3D "/org/jboss/portal/test/identity/db-beans.xm= l") +(a)Tag(value =3D {"DB","generic"}) +public class DBGenericTest extends GenericTestPOJO +{ + private static final org.jboss.logging.Logger log =3D org.jboss.logging= .Logger.getLogger(DBGenericTest.class); + + @Test + @Tag(value =3D {"DB","generic"}) + public void testWorking() throws Exception + { + + } + + @Test + @Tag(value =3D {"DB","generic"}) + public void testDynamicProperty() throws Exception + { + begin(); + User user =3D getUserModule().createUser("testname", "testpassword"); + ProfileMap map =3D ((HibernateUserImpl)user).getProfileMap(); + assertNull(map.get("foo")); + assertFalse(map.isReadOnly("foo")); + map.put("foo", "value"); + assertEquals("value", map.get("foo")); + assertFalse(map.isReadOnly("foo")); + commit(); + + begin(); + user =3D getUserModule().findUserByUserName("testname"); + map =3D ((HibernateUserImpl)user).getProfileMap(); + assertEquals("value", map.get("foo")); + assertFalse(map.isReadOnly("foo")); + commit(); + } + + @Test + @Tag(value =3D {"DB","generic"}) + public void testFindUsersUsingFilter() throws Exception + { + genericTest.testFindUsersUsingFilter(); + } + + @Test + @Tag(value =3D {"DB","generic"}) + public void testFindUser1() throws Exception + { + genericTest.testFindUser1(); + } + + @Test + @Tag(value =3D {"DB","generic"}) + public void testFindUser2() throws Exception + { + genericTest.testFindUser2(); + } + + @Test + @Tag(value =3D {"DB","generic"}) + public void testFindUsers() throws Exception + { + genericTest.testFindUsers(); + } + + @Test + @Tag(value =3D {"DB","generic"}) + public void testFindUsers2() throws Exception + { + genericTest.testFindUsers2(); + } + + @Test + @Tag(value =3D {"DB","generic"}) + public void testNonStandardUserNames() throws Exception + { + genericTest.testNonStandardUserNames(); + } + + @Test + @Tag(value =3D {"DB","generic"}) + public void testCreateUser() throws Exception + { + genericTest.testCreateUser(); + } + + @Test + @Tag(value =3D {"DB","generic"}) + public void testCreateRole() throws Exception + { + genericTest.testCreateRole(); + } + + @Test + @Tag(value =3D {"DB","generic"}) + public void testCountUser() throws Exception + { + genericTest.testCountUser(); + } + + @Test + @Tag(value =3D {"DB","generic"}) + public void testRemoveNonExistingRole() throws Exception + { + genericTest.testRemoveNonExistingRole(); + } + + @Test + @Tag(value =3D {"DB","generic"}) + public void testRemoveRole() throws Exception + { + genericTest.testRemoveRole(); + } + + @Test + @Tag(value =3D {"DB","generic"}) + public void testRemoveUser() throws Exception + { + genericTest.testRemoveUser(); + } + + @Test + @Tag(value =3D {"DB","generic"}) + public void testFindRoles() throws Exception + { + genericTest.testFindRoles(); + } + + @Test + @Tag(value =3D {"DB","generic"}) + public void testFindRoleMembers() throws Exception + { + genericTest.testFindRoleMembers(); + } + + @Test + @Tag(value =3D {"DB","generic"}) + public void testNullProperty() throws Exception + { + genericTest.testNullProperty(); + } + + @Test + @Tag(value =3D {"DB","generic"}) + public void testGetProperties() throws Exception + { + genericTest.testGetProperties(); + } + + @Test + @Tag(value =3D {"DB","generic"}) + public void testStaticProperty() throws Exception + { + genericTest.testStaticProperty(); + } +} Deleted: modules/identity/trunk/identity/src/main/org/jboss/portal/test/ide= ntity/db/DBIdentityTestCase.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/identity/trunk/identity/src/main/org/jboss/portal/test/identity= /db/DBIdentityTestCase.java 2007-10-17 11:11:09 UTC (rev 8674) +++ modules/identity/trunk/identity/src/main/org/jboss/portal/test/identity= /db/DBIdentityTestCase.java 2007-10-17 13:05:03 UTC (rev 8675) @@ -1,206 +0,0 @@ -/* -* JBoss, a division of Red Hat -* Copyright 2006, Red Hat Middleware, LLC, and individual contributors as = indicated -* by the @authors tag. See the copyright.txt in the distribution for a -* full listing of individual contributors. -* -* This is free software; you can redistribute it and/or modify it -* under the terms of the GNU Lesser General Public License as -* published by the Free Software Foundation; either version 2.1 of -* the License, or (at your option) any later version. -* -* This software is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -* Lesser General Public License for more details. -* -* You should have received a copy of the GNU Lesser General Public -* License along with this software; if not, write to the Free -* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA -* 02110-1301 USA, or see the FSF site: http://www.fsf.org. -*/ -package org.jboss.portal.test.identity.db; - -import org.jboss.portal.identity.db.HibernateUserImpl; -import org.jboss.portal.identity.*; -import org.jboss.portal.identity.service.UserModuleService; -import org.jboss.portal.identity.service.UserProfileModuleService; -import org.jboss.portal.identity.service.MembershipModuleService; -import org.jboss.portal.identity.service.RoleModuleService; -import org.jboss.portal.test.identity.IdentityTest; -import org.jboss.portal.test.identity.TestServiceLoader; -import junit.framework.TestSuite; - -/** - * @author Julien Viet - * @version $Revision: 5748 $ - */ -public class DBIdentityTestCase extends DBTestCase -{ - private static final org.jboss.logging.Logger log =3D org.jboss.logging= .Logger.getLogger(DBTestCase.class); - - public static TestSuite suite() throws Exception - { - System.out.println("###"); - return createTestSuite(DBIdentityTestCase.class); - } - - public void setUp() throws Exception - { - - //generate hibernate mappings based on the profile file -// ProfileInfo info =3D new ProfileInfoSupport(ConfigurationParser.pa= rseProfileConfiguration("test/config/profile-config.xml")); -// String pattern =3D ""; -// HibernateHelper.generateProfileMappings("hibernate/domain-template= -single.hbm.xml", -// "resources/hibernate/domai= n-identity.hbm.xml", -// pattern, -// info, -// Thread.currentThread().get= ContextClassLoader()); - - = - - //initialize microcontainer stuff - super.setUp(); - = - - //bootstrap identity modules -// IdentityServiceControllerImpl controller =3D new IdentityServiceCo= ntrollerImpl(); -// controller.setConfigFile("test/config/db-config.xml"); -// controller.setDefaultConfigFile("test/config/standardidentity-conf= ig.xml"); -// controller.setRegisterMBeans(false); -// controller.start(); -// identityContext =3D controller.getIdentityContext(); - identityContext =3D new TestServiceLoader().loadServices("test/confi= g/standardidentity-config.xml", "test/config/db-config.xml"); - - this.userModule =3D (UserModuleService)identityContext.getObject(Ide= ntityContext.TYPE_USER_MODULE); - this.roleModule =3D (RoleModuleService)identityContext.getObject(Ide= ntityContext.TYPE_ROLE_MODULE); - this.membershipModule =3D (MembershipModuleService)identityContext.g= etObject(IdentityContext.TYPE_MEMBERSHIP_MODULE); - this.userProfileModule =3D (UserProfileModuleService)identityContext= .getObject(IdentityContext.TYPE_USER_PROFILE_MODULE); - - // - utc =3D new IdentityTest(); - utc.setUserModule(userModule); - utc.setRoleModule(roleModule); - utc.setMembershipModule(membershipModule); - utc.setUserProfileModule(userProfileModule); - utc.setContext(this); - utc.populate(); - } - - - - - - - public void testWorking() throws Exception - { - = - } - - // - - public void testFindUsersUsingFilter() throws Exception - { - utc.testFindUsersUsingFilter(); - } - - public void testFindUser1() throws Exception - { - utc.testFindUser1(); - } - - public void testFindUser2() throws Exception - { - utc.testFindUser2(); - } - - public void testFindUsers() throws Exception - { - utc.testFindUsers(); - } - - public void testFindUsers2() throws Exception - { - utc.testFindUsers2(); - } - - public void testNonStandardUserNames() throws Exception - { - utc.testNonStandardUserNames(); - } - - public void testCreateUser() throws Exception - { - utc.testCreateUser(); - } - - public void testCreateRole() throws Exception - { - utc.testCreateRole(); - } - - public void testCountUser() throws Exception - { - utc.testCountUser(); - } - - public void testRemoveNonExistingRole() throws Exception - { - utc.testRemoveNonExistingRole(); - } - - public void testRemoveRole() throws Exception - { - utc.testRemoveRole(); - } - - public void testRemoveUser() throws Exception - { - utc.testRemoveUser(); - } - - public void testFindRoles() throws Exception - { - utc.testFindRoles(); - } - - public void testFindRoleMembers() throws Exception - { - utc.testFindRoleMembers(); - } - - public void testDynamicProperty() throws Exception - { - begin(); - User user =3D userModule.createUser("testname", "testpassword"); - ProfileMap map =3D ((HibernateUserImpl)user).getProfileMap(); - assertNull(map.get("foo")); - assertFalse(map.isReadOnly("foo")); - map.put("foo", "value"); - assertEquals("value", map.get("foo")); - assertFalse(map.isReadOnly("foo")); - commit(); - - begin(); - user =3D userModule.findUserByUserName("testname"); - map =3D ((HibernateUserImpl)user).getProfileMap(); - assertEquals("value", map.get("foo")); - assertFalse(map.isReadOnly("foo")); - commit(); - } - - public void testNullProperty() throws Exception - { - utc.testNullProperty(); - } - - public void testGetProperties() throws Exception - { - utc.testGetProperties(); = - } - - public void testStaticProperty() throws Exception - { - utc.testStaticProperty(); - } -} Deleted: modules/identity/trunk/identity/src/main/org/jboss/portal/test/ide= ntity/db/DBTestCase.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/identity/trunk/identity/src/main/org/jboss/portal/test/identity= /db/DBTestCase.java 2007-10-17 11:11:09 UTC (rev 8674) +++ modules/identity/trunk/identity/src/main/org/jboss/portal/test/identity= /db/DBTestCase.java 2007-10-17 13:05:03 UTC (rev 8675) @@ -1,201 +0,0 @@ -/* -* JBoss, a division of Red Hat -* Copyright 2006, Red Hat Middleware, LLC, and individual contributors as = indicated -* by the @authors tag. See the copyright.txt in the distribution for a -* full listing of individual contributors. -* -* This is free software; you can redistribute it and/or modify it -* under the terms of the GNU Lesser General Public License as -* published by the Free Software Foundation; either version 2.1 of -* the License, or (at your option) any later version. -* -* This software is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -* Lesser General Public License for more details. -* -* You should have received a copy of the GNU Lesser General Public -* License along with this software; if not, write to the Free -* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA -* 02110-1301 USA, or see the FSF site: http://www.fsf.org. -*/ -package org.jboss.portal.test.identity.db; - -import org.jboss.portal.test.framework.embedded.DataSourceSupport; -import org.jboss.portal.test.framework.embedded.HibernateSupport; -import org.jboss.portal.test.framework.mc.TestRuntimeContext; -import org.jboss.portal.test.identity.IdentityTest; -import org.jboss.portal.test.framework.junit.POJOJUnitTest; -import org.jboss.portal.test.framework.junit.JUnitAdapter; -import org.jboss.portal.identity.IdentityContext; -import org.jboss.portal.identity.service.UserProfileModuleService; -import org.jboss.portal.identity.service.MembershipModuleService; -import org.jboss.portal.identity.service.RoleModuleService; -import org.jboss.portal.identity.service.UserModuleService; -import org.apache.log4j.Appender; -import org.apache.log4j.ConsoleAppender; -import org.apache.log4j.SimpleLayout; -import org.apache.log4j.Logger; -import org.apache.log4j.Level; -import junit.framework.TestSuite; - -import java.net.URL; -import java.util.Map; -import java.util.HashMap; - -/** - * @author Bolesla= w Dawidowicz - * @version $Revision: 1.1 $ - */ -public abstract class DBTestCase extends junit.framework.TestCase implemen= ts IdentityTest.Context -{ - - static - { - Appender appender =3D new ConsoleAppender(new SimpleLayout()); - Logger.getRoot().addAppender(appender); - Logger.getRoot().setLevel(Level.DEBUG); - Logger.getLogger("org.hibernate").setLevel(Level.ERROR); - Logger.getLogger("org.jboss.portal.identity").setLevel(Level.DEBUG); - } - - public static TestSuite createTestSuite(Class clazz) throws Exception - { - URL configsURL =3D Thread.currentThread().getContextClassLoader().ge= tResource("datasources.xml"); - Map parameterMap =3D new HashMap(); - parameterMap.put("DataSourceConfig", DataSourceSupport.Config.fromXM= L2(configsURL)); - POJOJUnitTest abc =3D new POJOJUnitTest(clazz); - JUnitAdapter adapter =3D new JUnitAdapter(abc, parameterMap); - TestSuite suite =3D new TestSuite(); - suite.addTest(adapter); - return suite; - } - - - /** - * . - */ - protected DataSourceSupport.Config dataSourceConfigParameter; - - /** - * . - */ - protected TestRuntimeContext runtimeContext; - - /** - * . - */ - protected HibernateSupport hibernate; - - /** - * . - */ - protected IdentityContext identityContext; - - /** . */ - protected IdentityTest utc; - - /** - * . - */ - protected UserModuleService userModule; - - /** - * . - */ - protected RoleModuleService roleModule; - - /** - * . - */ - protected MembershipModuleService membershipModule; - - /** - * . - */ - protected UserProfileModuleService userProfileModule; - - public DataSourceSupport.Config getDataSourceConfigParameter() - { - return dataSourceConfigParameter; - } - - public void setDataSourceConfigParameter(DataSourceSupport.Config dataS= ourceConfig) - { - this.dataSourceConfigParameter =3D dataSourceConfig; - } - - public HibernateSupport getHibernate() - { - return hibernate; - } - - public void setHibernate(HibernateSupport hibernate) - { - this.hibernate =3D hibernate; - } - - - public String getName() - { - return super.getName() + "," + dataSourceConfigParameter.getName(); - } - - - protected void setUp() throws Exception - { = = - hibernate =3D new HibernateSupport(); - - - runtimeContext =3D new TestRuntimeContext("org/jboss/portal/test/ide= ntity/db-beans.xml"); - runtimeContext.addBean("DBTestBean", this); - runtimeContext.addBean("HibernateSupport", hibernate); - runtimeContext.addBean("DataSourceConfig", dataSourceConfigParameter= ); - - HibernateSupport.Config config =3D HibernateSupport.getConfig(dataSo= urceConfigParameter.getName()); - //add hibernate properties for dynamic entities - //config.getProperties().put("hibernate.default_entity_mode","dynami= c-map"); - - runtimeContext.addBean("HibernateConfig", config); - runtimeContext.start(); - } - - - - public void tearDown() throws Exception - { - utc.setUserModule(null); - utc.setRoleModule(null); - utc.setMembershipModule(null); - utc.setUserProfileModule(null); - utc.setContext(null); - utc =3D null; - - // -// roleModule.destroy(); -// userModule.destroy(); -// membershipModule.destroy(); -// userProfileModule.destroy(); - = - roleModule =3D null; - userModule =3D null; - membershipModule =3D null; - userProfileModule =3D null; - - // - runtimeContext.stop(); - } - - - public void begin() - { - hibernate.openSession(); - } - - public void commit() - { - assertTrue(hibernate.commitTransaction()); - } - - -} Copied: modules/identity/trunk/identity/src/main/org/jboss/portal/test/iden= tity/ldap/LDAPExtRoleModuleTest.java (from rev 8668, modules/identity/trunk= /identity/src/main/org/jboss/portal/test/identity/ldap/LDAPExtRoleModuleTes= tCase.java) =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/identity/trunk/identity/src/main/org/jboss/portal/test/identity= /ldap/LDAPExtRoleModuleTest.java (rev 0) +++ modules/identity/trunk/identity/src/main/org/jboss/portal/test/identity= /ldap/LDAPExtRoleModuleTest.java 2007-10-17 13:05:03 UTC (rev 8675) @@ -0,0 +1,201 @@ +package org.jboss.portal.test.identity.ldap; + +//import org.jboss.portal.identity.IdentityServiceControllerImpl; +import org.jboss.portal.identity.IdentityException; + import org.jboss.portal.identity.User; +import org.jboss.portal.identity.Role; +import org.jboss.portal.identity.ldap.LDAPRoleImpl; +import org.jboss.unit.mc.api.annotations.Bootstrap; +import static org.jboss.unit.api.Assert.*; +import org.jboss.unit.api.pojo.annotations.Test; +import org.jboss.unit.api.pojo.annotations.Tag; + + +import java.util.Set; +import java.util.List; +import java.util.LinkedList; +import java.util.Iterator; +import java.util.HashSet; + +/** + * @author Boleslaw Daw= idowicz + * @version $Revision: 1.1 $ + */ +(a)Bootstrap(resourceName =3D "/org/jboss/portal/test/identity/ldap-beans.= xml") +(a)Tag(value =3D {"LDAP","RoleModule","ExtRoleModule"}) +public class LDAPExtRoleModuleTest extends LDAPTestPOJO +{ + private static final org.jboss.logging.Logger log =3D org.jboss.logging= .Logger.getLogger(LDAPExtRoleModuleTest.class); + + + @Test + public void testFindRoleByName() throws Exception + { + LDAPRoleImpl ldapr =3D (LDAPRoleImpl)getRoleModule().findRoleByName(= "Echo"); + assertEquals(ldapr.getDn().toLowerCase(), ("cn=3DEcho,ou=3DRoles," += suffix).toLowerCase()); + assertEquals(ldapr.getName(), "Echo"); + } + + /*public void testRemoveRole() throws Exception + { + LDAPRoleImpl ldapr =3D (LDAPRoleImpl)getRoleModule().findRoleByName(= "Echo"); + assertEquals(ldapr.getDn().toLowerCase(), ("cn=3DEcho,ou=3DRoles," += suffix).toLowerCase()); + assertEquals(ldapr.getName(), "Echo"); + getRoleModule().removeRole(ldapr.getId()); + try + { + ldapr =3D (LDAPRoleImpl)getRoleModule().findRoleByName("Echo"); + fail(); + } + catch (IdentityException e) + { + //expected + } + //assertNull(ldapr); + } + + public void testCreateRole() throws Exception + { + LDAPRoleImpl ldapr =3D (LDAPRoleImpl)getRoleModule().createRole("tes= tRole", "testDisplayName"); + assertNotNull(ldapr); + assertEquals("testRole", ldapr.getName()); + //assertEquals("testDisplayName",ldapr.getDisplayName()); + + ldapr =3D (LDAPRoleImpl)getRoleModule().findRoleByName("testRole"); + assertNotNull(ldapr); + getRoleModule().removeRole(ldapr.getId()); + + + try + { + getRoleModule().findRoleByName("testRole"); + fail("shouldn reach this"); + } + catch (Exception e) + { + //expected + } + //assertNull(ldapr); + + }*/ + + @Test + public void testgetRoleCount() throws Exception + { + LDAPRoleImpl ldapr =3D (LDAPRoleImpl)getRoleModule().findRoleByName(= "Echo"); + assertEquals(ldapr.getDn().toLowerCase(), ("cn=3DEcho,ou=3DRoles," += suffix).toLowerCase()); + assertEquals(ldapr.getName(), "Echo"); + + int count =3D getRoleModule().getRolesCount(); + assertEquals(4, count); + } + + @Test + public void testFindRolesByNames() throws Exception + { + Set roles =3D getRoleModule().findRolesByNames(new String[] {"Echo"}= ); + + assertEquals(1, roles.size()); + + List roleNames =3D new LinkedList(); + + for (Iterator iterator =3D roles.iterator(); iterator.hasNext();) + { + LDAPRoleImpl role =3D (LDAPRoleImpl)iterator.next(); + roleNames.add(role.getDn().toLowerCase()); + } + assertTrue(roleNames.contains(("cn=3DEcho,ou=3DRoles," + suffix).toL= owerCase())); + + + // + roles =3D getRoleModule().findRolesByNames(new String[] {"Echo", "Ec= ho1"}); + + assertEquals(2, roles.size()); + + roleNames =3D new LinkedList(); + + for (Iterator iterator =3D roles.iterator(); iterator.hasNext();) + { + LDAPRoleImpl role =3D (LDAPRoleImpl)iterator.next(); + roleNames.add(role.getDn().toLowerCase()); + } + assertTrue(roleNames.contains(("cn=3DEcho,ou=3DRoles," + suffix).toL= owerCase())); + assertTrue(roleNames.contains(("cn=3DEcho1,ou=3DRoles," + suffix).to= LowerCase())); + + // + roles =3D getRoleModule().findRolesByNames(new String[] {"Echo", "Ec= ho1", "TheDuke"}); + + assertEquals(3, roles.size()); + + roleNames =3D new LinkedList(); + + for (Iterator iterator =3D roles.iterator(); iterator.hasNext();) + { + LDAPRoleImpl role =3D (LDAPRoleImpl)iterator.next(); + roleNames.add(role.getDn().toLowerCase()); + } + assertTrue(roleNames.contains(("cn=3DEcho,ou=3DRoles," + suffix).toL= owerCase())); + assertTrue(roleNames.contains(("cn=3DEcho1,ou=3DRoles," + suffix).to= LowerCase())); + assertTrue(roleNames.contains(("cn=3DTheDuke,ou=3DRoles," + suffix).= toLowerCase())); + } + + @Test + public void testSearchCtx() throws Exception + { + LDAPRoleImpl ldapr =3D (LDAPRoleImpl)getRoleModule().findRoleByName(= "User11"); + assertEquals(ldapr.getDn().toLowerCase(), ("cn=3DUser11,ou=3DRoles1,= " + suffix).toLowerCase()); + assertEquals(ldapr.getName(), "User11"); + + try + { + ldapr =3D (LDAPRoleImpl)getRoleModule().findRoleByName("User21"); + fail(); + } + catch (IdentityException e) + { + //expected + } + + } + + @Test + public void testNonStandardName() throws Exception + { + User u =3D getUserModule().findUserByUserName("jduke1"); + assertNotNull(u); + + Set roles =3D getMembershipModule().getRoles(u); + + assertEquals(2, roles.size()); + + Set roleNames =3D new HashSet(); + for (Iterator iterator =3D roles.iterator(); iterator.hasNext();) + { + Role role =3D (Role)iterator.next(); + roleNames.add(role.getName()); + System.out.println("ROlE NAME: " + role.getName()); + } + + + assertTrue(roleNames.contains("Echo")); + assertTrue(roleNames.contains("User11")); + + + u =3D getUserModule().findUserByUserName("jduke4, Duke"); + assertNotNull(u); + + roles =3D getMembershipModule().getRoles(u); + + roleNames =3D new HashSet(); + for (Iterator iterator =3D roles.iterator(); iterator.hasNext();) + { + Role role =3D (Role)iterator.next(); + roleNames.add(role.getName()); + } + + assertTrue(roleNames.contains("Echo")); + assertTrue(roleNames.contains("User11")); + + + } +} Deleted: modules/identity/trunk/identity/src/main/org/jboss/portal/test/ide= ntity/ldap/LDAPExtRoleModuleTestCase.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/identity/trunk/identity/src/main/org/jboss/portal/test/identity= /ldap/LDAPExtRoleModuleTestCase.java 2007-10-17 11:11:09 UTC (rev 8674) +++ modules/identity/trunk/identity/src/main/org/jboss/portal/test/identity= /ldap/LDAPExtRoleModuleTestCase.java 2007-10-17 13:05:03 UTC (rev 8675) @@ -1,262 +0,0 @@ -package org.jboss.portal.test.identity.ldap; - -import junit.framework.TestSuite; -import org.jboss.portal.identity.RoleModule; -//import org.jboss.portal.identity.IdentityServiceControllerImpl; -import org.jboss.portal.identity.IdentityContext; -import org.jboss.portal.identity.IdentityException; -import org.jboss.portal.identity.UserModule; -import org.jboss.portal.identity.MembershipModule; -import org.jboss.portal.identity.UserProfileModule; -import org.jboss.portal.identity.User; -import org.jboss.portal.identity.Role; -import org.jboss.portal.identity.ldap.LDAPRoleImpl; -import org.jboss.portal.test.identity.TestServiceLoader; - -import java.util.Set; -import java.util.List; -import java.util.LinkedList; -import java.util.Iterator; -import java.util.HashSet; - -/** - * @author Boleslaw Daw= idowicz - * @version $Revision: 1.1 $ - */ -public class LDAPExtRoleModuleTestCase extends LDAPTestCase -{ - private static final org.jboss.logging.Logger log =3D org.jboss.logging= .Logger.getLogger(LDAPExtRoleModuleTestCase.class); - - public static TestSuite suite() throws Exception - { - return createTestSuite(LDAPExtRoleModuleTestCase.class, "directories= -extrolemodule.xml", "datasources.xml"); - } - - UserModule userModule; - - RoleModule roleModule; - - MembershipModule membershipModule; - - UserProfileModule userProfileModule; - - - private String suffix; - - public void setUp() throws Exception - { - - super.setUp(); - - /*IdentityContextImpl context =3D new IdentityContextImpl(); - context.start(); - identityContext =3D context; - - SimpleConfigurationImpl configuration =3D new SimpleConfigurationImp= l(); - configuration.setIdentityContext(identityContext); - configuration.setConfigFile(getDirectoryServerConfigParameter().getC= onfigFile()); - configuration.start(); - - LDAPConnectionContext connection =3D new LDAPConnectionContext(); - connection.setIdentityContext(identityContext); - connection.start(); - - LDAPRoleModuleImpl roleModule =3D new LDAPRoleModuleImpl(); - roleModule.setIdentityContext(identityContext); - //roleModule.setContainerDN("ou=3DRoles,dc=3Djboss,dc=3Dorg"); - //roleModule.setRidAttributeID("cn"); - roleModule.start(); - this.roleModule =3D roleModule;*/ - -// IdentityServiceControllerImpl controller =3D new IdentityServiceCo= ntrollerImpl(); -// controller.setConfigFile(getDirectoryServerConfigParameter().getCo= nfigFile()); -// controller.setDefaultConfigFile("test/config/standardidentity-conf= ig.xml"); -// controller.setRegisterMBeans(false); -// controller.start(); -// identityContext =3D controller.getIdentityContext(); - identityContext =3D new TestServiceLoader().loadServices("test/confi= g/standardidentity-config.xml", getDirectoryServerConfigParameter().getConf= igFile()); - - userModule =3D (UserModule)identityContext.getObject(IdentityContext= .TYPE_USER_MODULE); - userModule =3D (UserModule)identityContext.getObject(IdentityContext= .TYPE_USER_MODULE); - roleModule =3D (RoleModule)identityContext.getObject(IdentityContext= .TYPE_ROLE_MODULE); - membershipModule =3D (MembershipModule)identityContext.getObject(Ide= ntityContext.TYPE_MEMBERSHIP_MODULE); - userProfileModule =3D (UserProfileModule)identityContext.getObject(I= dentityContext.TYPE_USER_PROFILE_MODULE); - - suffix =3D getDirectoryServerConfigParameter().getCleanUpDN(); - - populate(); - - } - - - /*public void testFirstSimple() throws Exception - { - log.info("test framework works ;]"); - }*/ - - public void testFindRoleByName() throws Exception - { - LDAPRoleImpl ldapr =3D (LDAPRoleImpl)roleModule.findRoleByName("Echo= "); - assertEquals(ldapr.getDn().toLowerCase(), ("cn=3DEcho,ou=3DRoles," += suffix).toLowerCase()); - assertEquals(ldapr.getName(), "Echo"); - } - - /*public void testRemoveRole() throws Exception - { - LDAPRoleImpl ldapr =3D (LDAPRoleImpl)roleModule.findRoleByName("Echo= "); - assertEquals(ldapr.getDn().toLowerCase(), ("cn=3DEcho,ou=3DRoles," += suffix).toLowerCase()); - assertEquals(ldapr.getName(), "Echo"); - roleModule.removeRole(ldapr.getId()); - try - { - ldapr =3D (LDAPRoleImpl)roleModule.findRoleByName("Echo"); - fail(); - } - catch (IdentityException e) - { - //expected - } - //assertNull(ldapr); - } - - public void testCreateRole() throws Exception - { - LDAPRoleImpl ldapr =3D (LDAPRoleImpl)roleModule.createRole("testRole= ", "testDisplayName"); - assertNotNull(ldapr); - assertEquals("testRole", ldapr.getName()); - //assertEquals("testDisplayName",ldapr.getDisplayName()); - - ldapr =3D (LDAPRoleImpl)roleModule.findRoleByName("testRole"); - assertNotNull(ldapr); - roleModule.removeRole(ldapr.getId()); - - - try - { - roleModule.findRoleByName("testRole"); - fail("shouldn reach this"); - } - catch (Exception e) - { - //expected - } - //assertNull(ldapr); - - }*/ - - public void testgetRoleCount() throws Exception - { - LDAPRoleImpl ldapr =3D (LDAPRoleImpl)roleModule.findRoleByName("Echo= "); - assertEquals(ldapr.getDn().toLowerCase(), ("cn=3DEcho,ou=3DRoles," += suffix).toLowerCase()); - assertEquals(ldapr.getName(), "Echo"); - - int count =3D roleModule.getRolesCount(); - assertEquals(4, count); - } - - public void testFindRolesByNames() throws Exception - { - Set roles =3D roleModule.findRolesByNames(new String[] {"Echo"}); - - assertEquals(1, roles.size()); - - List roleNames =3D new LinkedList(); - - for (Iterator iterator =3D roles.iterator(); iterator.hasNext();) - { - LDAPRoleImpl role =3D (LDAPRoleImpl)iterator.next(); - roleNames.add(role.getDn().toLowerCase()); - } - assertTrue(roleNames.contains(("cn=3DEcho,ou=3DRoles," + suffix).toL= owerCase())); - - - // - roles =3D roleModule.findRolesByNames(new String[] {"Echo", "Echo1"}= ); - - assertEquals(2, roles.size()); - - roleNames =3D new LinkedList(); - - for (Iterator iterator =3D roles.iterator(); iterator.hasNext();) - { - LDAPRoleImpl role =3D (LDAPRoleImpl)iterator.next(); - roleNames.add(role.getDn().toLowerCase()); - } - assertTrue(roleNames.contains(("cn=3DEcho,ou=3DRoles," + suffix).toL= owerCase())); - assertTrue(roleNames.contains(("cn=3DEcho1,ou=3DRoles," + suffix).to= LowerCase())); - - // - roles =3D roleModule.findRolesByNames(new String[] {"Echo", "Echo1",= "TheDuke"}); - - assertEquals(3, roles.size()); - - roleNames =3D new LinkedList(); - - for (Iterator iterator =3D roles.iterator(); iterator.hasNext();) - { - LDAPRoleImpl role =3D (LDAPRoleImpl)iterator.next(); - roleNames.add(role.getDn().toLowerCase()); - } - assertTrue(roleNames.contains(("cn=3DEcho,ou=3DRoles," + suffix).toL= owerCase())); - assertTrue(roleNames.contains(("cn=3DEcho1,ou=3DRoles," + suffix).to= LowerCase())); - assertTrue(roleNames.contains(("cn=3DTheDuke,ou=3DRoles," + suffix).= toLowerCase())); - } - - public void testSearchCtx() throws Exception - { - LDAPRoleImpl ldapr =3D (LDAPRoleImpl)roleModule.findRoleByName("User= 11"); - assertEquals(ldapr.getDn().toLowerCase(), ("cn=3DUser11,ou=3DRoles1,= " + suffix).toLowerCase()); - assertEquals(ldapr.getName(), "User11"); - - try - { - ldapr =3D (LDAPRoleImpl)roleModule.findRoleByName("User21"); - fail(); - } - catch (IdentityException e) - { - //expected - } - - } - - public void testNonStandardName() throws Exception - { - User u =3D userModule.findUserByUserName("jduke1"); - assertNotNull(u); - - Set roles =3D membershipModule.getRoles(u); - - assertEquals(2, roles.size()); - - Set roleNames =3D new HashSet(); - for (Iterator iterator =3D roles.iterator(); iterator.hasNext();) - { - Role role =3D (Role)iterator.next(); - roleNames.add(role.getName()); - System.out.println("ROlE NAME: " + role.getName()); - } - - - assertTrue(roleNames.contains("Echo")); - assertTrue(roleNames.contains("User11")); - - - u =3D userModule.findUserByUserName("jduke4, Duke"); - assertNotNull(u); - - roles =3D membershipModule.getRoles(u); - - roleNames =3D new HashSet(); - for (Iterator iterator =3D roles.iterator(); iterator.hasNext();) - { - Role role =3D (Role)iterator.next(); - roleNames.add(role.getName()); - } - - assertTrue(roleNames.contains("Echo")); - assertTrue(roleNames.contains("User11")); - - - } -} Copied: modules/identity/trunk/identity/src/main/org/jboss/portal/test/iden= tity/ldap/LDAPExtUserModuleTest.java (from rev 8668, modules/identity/trunk= /identity/src/main/org/jboss/portal/test/identity/ldap/LDAPExtUserModuleTes= tCase.java) =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/identity/trunk/identity/src/main/org/jboss/portal/test/identity= /ldap/LDAPExtUserModuleTest.java (rev 0) +++ modules/identity/trunk/identity/src/main/org/jboss/portal/test/identity= /ldap/LDAPExtUserModuleTest.java 2007-10-17 13:05:03 UTC (rev 8675) @@ -0,0 +1,141 @@ +package org.jboss.portal.test.identity.ldap; + +//import org.jboss.portal.identity.IdentityServiceControllerImpl; +import org.jboss.portal.identity.User; +import org.jboss.portal.identity.Role; +import org.jboss.portal.identity.NoSuchUserException; +import org.jboss.portal.identity.ldap.LDAPUserImpl; + import org.jboss.unit.mc.api.annotations.Bootstrap; +import static org.jboss.unit.api.Assert.*; +import org.jboss.unit.api.pojo.annotations.Test; +import org.jboss.unit.api.pojo.annotations.Tag; + +import java.util.Set; +import java.util.HashSet; +import java.util.Iterator; + +/** + * @author Boleslaw Daw= idowicz + * @version $Revision: 1.1 $ + */ +(a)Bootstrap(resourceName =3D "/org/jboss/portal/test/identity/ldap-beans.= xml") +(a)Tag(value =3D {"LDAP","UserModule","ExtUserModule"}) +public class LDAPExtUserModuleTest extends LDAPTestPOJO +{ + private static final org.jboss.logging.Logger log =3D org.jboss.logging= .Logger.getLogger(LDAPExtUserModuleTest.class); + + @Test + public void testFirstSimple() throws Exception + { + log.info("test framework works ;]"); + } + + @Test + public void testFindUserByName() throws Exception + { + LDAPUserImpl ldapu =3D (LDAPUserImpl)getUserModule().findUserByUserN= ame("jduke"); + assertEquals(ldapu.getDn().toLowerCase(), (userPrefix + "=3Djduke,ou= =3DPeople," + suffix).toLowerCase()); + assertEquals(ldapu.getUserName(), "jduke"); + } + + @Test + public void testgetUserCount() throws Exception + { + LDAPUserImpl ldapu =3D (LDAPUserImpl)getUserModule().findUserByUserN= ame("jduke"); + assertEquals(ldapu.getDn().toLowerCase(),(userPrefix + "=3Djduke,ou= =3DPeople," + suffix).toLowerCase()); + assertEquals(ldapu.getUserName(), "jduke"); + + int count =3D getUserModule().getUserCount(); + assertEquals(7, count); + } + + //TODO: test findUsers + + @Test + public void testFindUsersFilteredByName() throws Exception + { + getUserModule().findUsersFilteredByUserName("jduke",0,1); + //assertEquals(ldapu.getUserName(), "jduke"); + + } + + @Test + public void testPassword() throws Exception + { + //getUserModule().createUser("testUser", "testPassword"); + User u =3D getUserModule().findUserByUserName("jduke"); + assertNotNull(u); + assertEquals("jduke", u.getUserName()); + assertTrue(u.validatePassword("theduke")); + + getUserProfileModule().setProperty(u, User.INFO_USER_EMAIL_REAL, "te= stRealEmail"); + assertTrue(u.validatePassword("theduke")); + + + assertTrue(!u.validatePassword("dodo")); + u.updatePassword("dodo"); + assertTrue(u.validatePassword("dodo")); + + } + + @Test + public void testSearchCtx() throws Exception + { + //users should be visable in both configured search contexts + User u =3D getUserModule().findUserByUserName("user11"); + assertNotNull(u); + assertEquals("user11", u.getUserName()); + assertTrue(u.validatePassword("theduke")); + + //and not in not configured context + try + { + u =3D getUserModule().findUserByUserName("user21"); + fail(); + } + catch (NoSuchUserException e) + { + //expected + } + + + } + + @Test + public void testNonStandardName() throws Exception + { + User u =3D getUserModule().findUserByUserName("jduke1"); + assertNotNull(u); + + Set roles =3D getMembershipModule().getRoles(u); + + assertEquals(1, roles.size()); + + Set roleNames =3D new HashSet(); + for (Iterator iterator =3D roles.iterator(); iterator.hasNext();) + { + Role role =3D (Role)iterator.next(); + roleNames.add(role.getName()); + System.out.println("ROlE NAME: " + role.getName()); + } + + + assertTrue(roleNames.contains("Echo")); + + + u =3D getUserModule().findUserByUserName("jduke4, Duke"); + assertNotNull(u); + + roles =3D getMembershipModule().getRoles(u); + + roleNames =3D new HashSet(); + for (Iterator iterator =3D roles.iterator(); iterator.hasNext();) + { + Role role =3D (Role)iterator.next(); + roleNames.add(role.getName()); + } + + assertTrue(roleNames.contains("Echo")); + + } +} Deleted: modules/identity/trunk/identity/src/main/org/jboss/portal/test/ide= ntity/ldap/LDAPExtUserModuleTestCase.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/identity/trunk/identity/src/main/org/jboss/portal/test/identity= /ldap/LDAPExtUserModuleTestCase.java 2007-10-17 11:11:09 UTC (rev 8674) +++ modules/identity/trunk/identity/src/main/org/jboss/portal/test/identity= /ldap/LDAPExtUserModuleTestCase.java 2007-10-17 13:05:03 UTC (rev 8675) @@ -1,197 +0,0 @@ -package org.jboss.portal.test.identity.ldap; - -import junit.framework.TestSuite; -import org.jboss.portal.identity.UserModule; -import org.jboss.portal.identity.RoleModule; -import org.jboss.portal.identity.MembershipModule; -import org.jboss.portal.identity.UserProfileModule; -//import org.jboss.portal.identity.IdentityServiceControllerImpl; -import org.jboss.portal.identity.IdentityContext; -import org.jboss.portal.identity.IdentityConfiguration; -import org.jboss.portal.identity.User; -import org.jboss.portal.identity.Role; -import org.jboss.portal.identity.NoSuchUserException; -import org.jboss.portal.identity.ldap.LDAPUserImpl; -import org.jboss.portal.test.identity.TestServiceLoader; -import org.apache.log4j.Appender; -import org.apache.log4j.ConsoleAppender; -import org.apache.log4j.SimpleLayout; -import org.apache.log4j.Logger; -import org.apache.log4j.Level; - -import java.util.Set; -import java.util.HashSet; -import java.util.Iterator; - -/** - * @author Boleslaw Daw= idowicz - * @version $Revision: 1.1 $ - */ -public class LDAPExtUserModuleTestCase extends LDAPTestCase -{ - private static final org.jboss.logging.Logger log =3D org.jboss.logging= .Logger.getLogger(LDAPExtUserModuleTestCase.class); - - public static TestSuite suite() throws Exception - { - System.out.println("###"); - return createTestSuite(LDAPExtUserModuleTestCase.class, "directories= -extusermodule.xml", "datasources.xml"); - } - - static - { - Appender appender =3D new ConsoleAppender(new SimpleLayout()); - Logger.getRoot().addAppender(appender); - Logger.getRoot().setLevel(Level.INFO); - Logger.getLogger("org.jboss.portal.identity").setLevel(Level.DEBUG); - } - - UserModule userModule; - - RoleModule roleModule; - - MembershipModule membershipModule; - - UserProfileModule userProfileModule; - - - - private String suffix; - - private String userPrefix; - - public void setUp() throws Exception - { - super.setUp(); - -// IdentityServiceControllerImpl controller =3D new IdentityServiceCo= ntrollerImpl(); -// controller.setConfigFile(getDirectoryServerConfigParameter().getCo= nfigFile()); -// controller.setDefaultConfigFile("test/config/standardidentity-conf= ig.xml"); -// controller.setRegisterMBeans(false); -// controller.start(); -// identityContext =3D controller.getIdentityContext(); - - identityContext =3D new TestServiceLoader().loadServices("test/confi= g/standardidentity-config.xml", getDirectoryServerConfigParameter().getConf= igFile()); - - userModule =3D (UserModule)identityContext.getObject(IdentityContext= .TYPE_USER_MODULE); - userModule =3D (UserModule)identityContext.getObject(IdentityContext= .TYPE_USER_MODULE); - roleModule =3D (RoleModule)identityContext.getObject(IdentityContext= .TYPE_ROLE_MODULE); - membershipModule =3D (MembershipModule)identityContext.getObject(Ide= ntityContext.TYPE_MEMBERSHIP_MODULE); - userProfileModule =3D (UserProfileModule)identityContext.getObject(I= dentityContext.TYPE_USER_PROFILE_MODULE); - - - suffix =3D getDirectoryServerConfigParameter().getCleanUpDN(); - userPrefix =3D ((IdentityConfiguration)identityContext.getObject(Ide= ntityContext.TYPE_IDENTITY_CONFIGURATION)).getValue(IdentityConfiguration.U= SER_UID_ATTRIBUTE_ID); - - populate(); - } - - - public void testFirstSimple() throws Exception - { - log.info("test framework works ;]"); - } - - public void testFindUserByName() throws Exception - { - LDAPUserImpl ldapu =3D (LDAPUserImpl)userModule.findUserByUserName("= jduke"); - assertEquals(ldapu.getDn().toLowerCase(), (userPrefix + "=3Djduke,ou= =3DPeople," + suffix).toLowerCase()); - assertEquals(ldapu.getUserName(), "jduke"); - } - - public void testgetUserCount() throws Exception - { - LDAPUserImpl ldapu =3D (LDAPUserImpl)userModule.findUserByUserName("= jduke"); - assertEquals(ldapu.getDn().toLowerCase(),(userPrefix + "=3Djduke,ou= =3DPeople," + suffix).toLowerCase()); - assertEquals(ldapu.getUserName(), "jduke"); - - int count =3D userModule.getUserCount(); - assertEquals(7, count); - } - - //TODO: test findUsers - - public void testFindUsersFilteredByName() throws Exception - { - userModule.findUsersFilteredByUserName("jduke",0,1); - //assertEquals(ldapu.getUserName(), "jduke"); - - } - - public void testPassword() throws Exception - { - //userModule.createUser("testUser", "testPassword"); - User u =3D userModule.findUserByUserName("jduke"); - assertNotNull(u); - assertEquals("jduke", u.getUserName()); - assertTrue(u.validatePassword("theduke")); - - userProfileModule.setProperty(u, User.INFO_USER_EMAIL_REAL, "testRea= lEmail"); - assertTrue(u.validatePassword("theduke")); - - - assertTrue(!u.validatePassword("dodo")); - u.updatePassword("dodo"); - assertTrue(u.validatePassword("dodo")); - - } - - public void testSearchCtx() throws Exception - { - //users should be visable in both configured search contexts - User u =3D userModule.findUserByUserName("user11"); - assertNotNull(u); - assertEquals("user11", u.getUserName()); - assertTrue(u.validatePassword("theduke")); - - //and not in not configured context - try - { - u =3D userModule.findUserByUserName("user21"); - fail(); - } - catch (NoSuchUserException e) - { - //expected - } - - - } - - public void testNonStandardName() throws Exception - { - User u =3D userModule.findUserByUserName("jduke1"); - assertNotNull(u); - - Set roles =3D membershipModule.getRoles(u); - - assertEquals(1, roles.size()); - - Set roleNames =3D new HashSet(); - for (Iterator iterator =3D roles.iterator(); iterator.hasNext();) - { - Role role =3D (Role)iterator.next(); - roleNames.add(role.getName()); - System.out.println("ROlE NAME: " + role.getName()); - } - - - assertTrue(roleNames.contains("Echo")); - = - = - u =3D userModule.findUserByUserName("jduke4, Duke"); - assertNotNull(u); - - roles =3D membershipModule.getRoles(u); - - roleNames =3D new HashSet(); - for (Iterator iterator =3D roles.iterator(); iterator.hasNext();) - { - Role role =3D (Role)iterator.next(); - roleNames.add(role.getName()); - } - - assertTrue(roleNames.contains("Echo")); - - - } -} Added: modules/identity/trunk/identity/src/main/org/jboss/portal/test/ident= ity/ldap/LDAPGenericTest.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/identity/trunk/identity/src/main/org/jboss/portal/test/identity= /ldap/LDAPGenericTest.java (rev 0) +++ modules/identity/trunk/identity/src/main/org/jboss/portal/test/identity= /ldap/LDAPGenericTest.java 2007-10-17 13:05:03 UTC (rev 8675) @@ -0,0 +1,172 @@ +/* +* JBoss, a division of Red Hat +* Copyright 2006, Red Hat Middleware, LLC, and individual contributors as = indicated +* by the @authors tag. See the copyright.txt in the distribution for a +* full listing of individual contributors. +* +* This is free software; you can redistribute it and/or modify it +* under the terms of the GNU Lesser General Public License as +* published by the Free Software Foundation; either version 2.1 of +* the License, or (at your option) any later version. +* +* This software is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +* Lesser General Public License for more details. +* +* You should have received a copy of the GNU Lesser General Public +* License along with this software; if not, write to the Free +* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +* 02110-1301 USA, or see the FSF site: http://www.fsf.org. +*/ + +package org.jboss.portal.test.identity.ldap; + +import org.jboss.portal.test.identity.GenericTestPOJO; +import org.jboss.portal.test.identity.GenericTest; +import org.jboss.unit.api.pojo.annotations.Parameter; +import org.jboss.unit.api.pojo.annotations.Test; +import org.jboss.unit.api.pojo.annotations.Destroy; +import org.jboss.unit.api.pojo.annotations.Create; +import org.jboss.unit.api.pojo.annotations.Tag; +import static org.jboss.unit.api.Assert.assertTrue; +import org.jboss.unit.mc.api.annotations.Bootstrap; + +/** + * @author Boleslaw Dawidowicz + * @version : 0.1 $ + */ +(a)Bootstrap(resourceName =3D "/org/jboss/portal/test/identity/ldap-beans.= xml") +(a)Tag(value =3D {"LDAP","generic"}) +public class LDAPGenericTest extends LDAPTestPOJO implements GenericTest.C= ontext +{ + + private static final org.jboss.logging.Logger log =3D org.jboss.logging= .Logger.getLogger(LDAPGenericTest.class); + + protected GenericTest genericTest =3D new GenericTest(this); + + public void begin() + { + getHibernateSupport().openSession(); + } + + public void commit() + { + assertTrue(getHibernateSupport().commitTransaction()); + } + + @Create + public void create() + { + populate(); + } + + @Destroy + public void cleanup() + { + cleanUp(); + } + + @Test + public void testFindUsersUsingFilter() throws Exception + { + genericTest.testFindUsersUsingFilter(); + } + + @Test + public void testFindUser1() throws Exception + { + genericTest.testFindUser1(); + } + + @Test + public void testFindUser2() throws Exception + { + genericTest.testFindUser2(); + } + + @Test + public void testFindUsers() throws Exception + { + genericTest.testFindUsers(); + } + + @Test + public void testFindUsers2() throws Exception + { + genericTest.testFindUsers2(); + } + + @Test + public void testNonStandardUserNames() throws Exception + { + genericTest.testNonStandardUserNames(); + } + + @Test + public void testCreateUser() throws Exception + { + genericTest.testCreateUser(); + } + + @Test + public void testCreateRole() throws Exception + { + genericTest.testCreateRole(); + } + + @Test + public void testCountUser() throws Exception + { + genericTest.testCountUser(); + } + + @Test + public void testRemoveNonExistingRole() throws Exception + { + genericTest.testRemoveNonExistingRole(); + } + + @Test + public void testRemoveRole() throws Exception + { + genericTest.testRemoveRole(); + } + + @Test + public void testRemoveUser() throws Exception + { + genericTest.testRemoveUser(); + } + + @Test + public void testFindRoles() throws Exception + { + genericTest.testFindRoles(); + } + + @Test + public void testFindRoleMembers() throws Exception + { + genericTest.testFindRoleMembers(); + } + + @Test + public void testNullProperty() throws Exception + { + genericTest.testNullProperty(); + } + + @Test + public void testGetProperties() throws Exception + { + genericTest.testGetProperties(); + } + + @Test + public void testStaticProperty() throws Exception + { + genericTest.testStaticProperty(); + } +} + = \ No newline at end of file Deleted: modules/identity/trunk/identity/src/main/org/jboss/portal/test/ide= ntity/ldap/LDAPIdentityTestCase.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/identity/trunk/identity/src/main/org/jboss/portal/test/identity= /ldap/LDAPIdentityTestCase.java 2007-10-17 11:11:09 UTC (rev 8674) +++ modules/identity/trunk/identity/src/main/org/jboss/portal/test/identity= /ldap/LDAPIdentityTestCase.java 2007-10-17 13:05:03 UTC (rev 8675) @@ -1,190 +0,0 @@ -package org.jboss.portal.test.identity.ldap; - -import org.jboss.portal.test.identity.IdentityTest; -import org.jboss.portal.test.identity.TestServiceLoader; -//import org.jboss.portal.identity.IdentityServiceControllerImpl; -import org.jboss.portal.identity.IdentityContext; -import org.jboss.portal.identity.UserModule; -import org.jboss.portal.identity.RoleModule; -import org.jboss.portal.identity.MembershipModule; -import org.jboss.portal.identity.UserProfileModule; -import org.jboss.portal.identity.service.UserModuleService; -import org.jboss.portal.identity.service.RoleModuleService; -import org.jboss.portal.identity.service.MembershipModuleService; -import org.jboss.portal.identity.service.UserProfileModuleService; -import org.apache.log4j.Appender; -import org.apache.log4j.ConsoleAppender; -import org.apache.log4j.SimpleLayout; -import org.apache.log4j.Logger; -import org.apache.log4j.Level; -import junit.framework.TestSuite; - -/** - * @author Julien Viet - * @version $Revision: 5748 $ - */ -public class LDAPIdentityTestCase extends LDAPTestCase implements Identity= Test.Context -{ - private static final org.jboss.logging.Logger log =3D org.jboss.logging= .Logger.getLogger(LDAPIdentityTestCase.class); - - static - { - Appender appender =3D new ConsoleAppender(new SimpleLayout()); - Logger.getRoot().addAppender(appender); - Logger.getRoot().setLevel(Level.INFO); - Logger.getLogger("org.jboss.portal.identity").setLevel(Level.INFO); - } - - public static TestSuite suite() throws Exception - { - System.out.println("###"); - return createTestSuite(LDAPIdentityTestCase.class, "directories-iden= tity.xml", "datasources.xml"); - } - - private UserModule userModule; - - private RoleModule roleModule; - - private MembershipModule membershipModule; - - private UserProfileModule userProfileModule; - - private IdentityTest utc; - - - - public void setUp() throws Exception - { - super.setUp(); - - //bootstrap identity modules -// IdentityServiceControllerImpl controller =3D new IdentityServiceCo= ntrollerImpl(); -// controller.setConfigFile(getDirectoryServerConfigParameter().getCo= nfigFile()); -// controller.setDefaultConfigFile("test/config/standardidentity-conf= ig.xml"); -// controller.setRegisterMBeans(false); -// controller.start(); -// -// identityContext =3D controller.getIdentityContext(); - - identityContext =3D new TestServiceLoader().loadServices("test/confi= g/standardidentity-config.xml", getDirectoryServerConfigParameter().getConf= igFile()); - = - - this.userModule =3D (UserModuleService)identityContext.getObject(Ide= ntityContext.TYPE_USER_MODULE); - this.roleModule =3D (RoleModuleService)identityContext.getObject(Ide= ntityContext.TYPE_ROLE_MODULE); - this.membershipModule =3D (MembershipModuleService)identityContext.g= etObject(IdentityContext.TYPE_MEMBERSHIP_MODULE); - this.userProfileModule =3D (UserProfileModuleService)identityContext= .getObject(IdentityContext.TYPE_USER_PROFILE_MODULE); - - populate(); - // - utc =3D new IdentityTest(); - utc.setUserModule(userModule); - utc.setRoleModule(roleModule); - utc.setMembershipModule(membershipModule); - utc.setUserProfileModule(userProfileModule); - utc.setContext(this); - utc.populate(); - } - - - - - - - public void testWorking() throws Exception - { - - } - - // - - public void testFindUsersUsingFilter() throws Exception - { - utc.testFindUsersUsingFilter(); - } - - public void testFindUser1() throws Exception - { - utc.testFindUser1(); - } - - public void testFindUser2() throws Exception - { - utc.testFindUser2(); - } - - public void testFindUsers() throws Exception - { - utc.testFindUsers(); - } - - public void testFindUsers2() throws Exception - { - utc.testFindUsers2(); - } - - public void testNonStandardUserNames() throws Exception - { - utc.testNonStandardUserNames(); - } - - public void testCreateUser() throws Exception - { - utc.testCreateUser(); - } - - public void testCreateRole() throws Exception - { - utc.testCreateRole(); - } - - public void testCountUser() throws Exception - { - utc.testCountUser(); - } - - public void testRemoveNonExistingRole() throws Exception - { - utc.testRemoveNonExistingRole(); - } - - public void testRemoveRole() throws Exception - { - utc.testRemoveRole(); - } - - public void testRemoveUser() throws Exception - { - utc.testRemoveUser(); - } - - public void testFindRoles() throws Exception - { - utc.testFindRoles(); - } - - public void testFindRoleMembers() throws Exception - { - utc.testFindRoleMembers(); - } - - public void testDynamicProperty() throws Exception - { - utc.testDynamicProperty(); - } - - public void testGetProperties() throws Exception - { - utc.testGetProperties(); - } - - public void testStaticProperty() throws Exception - { - utc.testStaticProperty(); - } - - public void testNullProperty() throws Exception - { - utc.testNullProperty(); - } - = -} Deleted: modules/identity/trunk/identity/src/main/org/jboss/portal/test/ide= ntity/ldap/LDAPMembershipModuleTestCase.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/identity/trunk/identity/src/main/org/jboss/portal/test/identity= /ldap/LDAPMembershipModuleTestCase.java 2007-10-17 11:11:09 UTC (rev 8674) +++ modules/identity/trunk/identity/src/main/org/jboss/portal/test/identity= /ldap/LDAPMembershipModuleTestCase.java 2007-10-17 13:05:03 UTC (rev 8675) @@ -1,40 +0,0 @@ -/*************************************************************************= ***** - * JBoss, a division of Red Hat = * - * Copyright 2006, Red Hat Middleware, LLC, and individual = * - * contributors as indicated by the @authors tag. See the = * - * copyright.txt in the distribution for a full listing of = * - * individual contributors. = * - * = * - * This is free software; you can redistribute it and/or modify it = * - * under the terms of the GNU Lesser General Public License as = * - * published by the Free Software Foundation; either version 2.1 of = * - * the License, or (at your option) any later version. = * - * = * - * This software is distributed in the hope that it will be useful, = * - * but WITHOUT ANY WARRANTY; without even the implied warranty of = * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU = * - * Lesser General Public License for more details. = * - * = * - * You should have received a copy of the GNU Lesser General Public = * - * License along with this software; if not, write to the Free = * - * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA = * - * 02110-1301 USA, or see the FSF site: http://www.fsf.org. = * - *************************************************************************= *****/ -package org.jboss.portal.test.identity.ldap; - -import org.jboss.portal.test.identity.ldap.LDAPTestCase; -//import org.jboss.portal.test.identity.MembershipStrategyTest; - -/** - * @author Boleslaw Daw= idowicz - * @version $Revision: 1.1 $ - */ -public abstract class LDAPMembershipModuleTestCase extends LDAPTestCase -{ - - public void setUp() throws Exception - { - super.setUp(); - } - -} Copied: modules/identity/trunk/identity/src/main/org/jboss/portal/test/iden= tity/ldap/LDAPSimpleRoleModuleTest.java (from rev 8668, modules/identity/tr= unk/identity/src/main/org/jboss/portal/test/identity/ldap/LDAPSimpleRoleMod= uleTestCase.java) =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/identity/trunk/identity/src/main/org/jboss/portal/test/identity= /ldap/LDAPSimpleRoleModuleTest.java (rev 0) +++ modules/identity/trunk/identity/src/main/org/jboss/portal/test/identity= /ldap/LDAPSimpleRoleModuleTest.java 2007-10-17 13:05:03 UTC (rev 8675) @@ -0,0 +1,159 @@ +/*************************************************************************= ***** + * JBoss, a division of Red Hat = * + * Copyright 2006, Red Hat Middleware, LLC, and individual = * + * contributors as indicated by the @authors tag. See the = * + * copyright.txt in the distribution for a full listing of = * + * individual contributors. = * + * = * + * This is free software; you can redistribute it and/or modify it = * + * under the terms of the GNU Lesser General Public License as = * + * published by the Free Software Foundation; either version 2.1 of = * + * the License, or (at your option) any later version. = * + * = * + * This software is distributed in the hope that it will be useful, = * + * but WITHOUT ANY WARRANTY; without even the implied warranty of = * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU = * + * Lesser General Public License for more details. = * + * = * + * You should have received a copy of the GNU Lesser General Public = * + * License along with this software; if not, write to the Free = * + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA = * + * 02110-1301 USA, or see the FSF site: http://www.fsf.org. = * + *************************************************************************= *****/ +package org.jboss.portal.test.identity.ldap; + +import org.jboss.portal.identity.ldap.LDAPRoleImpl; +import org.jboss.portal.identity.IdentityException; +import org.jboss.unit.api.pojo.annotations.Test; +import org.jboss.unit.api.pojo.annotations.Tag; +import static org.jboss.unit.api.Assert.*; +import org.jboss.unit.mc.api.annotations.Bootstrap; + +import java.util.Set; +import java.util.LinkedList; +import java.util.Iterator; +import java.util.List; + +/** + * @author Boleslaw Daw= idowicz + * @version $Revision: 1.1 $ + */ +(a)Bootstrap(resourceName =3D "/org/jboss/portal/test/identity/ldap-beans.= xml") +(a)Tag(value =3D {"LDAP","RoleModule","SimpleRoleModule"}) +public class LDAPSimpleRoleModuleTest extends LDAPTestPOJO +{ + private static final org.jboss.logging.Logger log =3D org.jboss.logging= .Logger.getLogger(LDAPSimpleRoleModuleTest.class); + + @Test + public void testFindRoleByName() throws Exception + { + LDAPRoleImpl ldapr =3D (LDAPRoleImpl)getRoleModule().findRoleByName(= "Echo"); + assertEquals(ldapr.getDn().toLowerCase(), ("cn=3DEcho,ou=3DRoles," += suffix).toLowerCase()); + assertEquals(ldapr.getName(), "Echo"); + } + + @Test + public void testRemoveRole() throws Exception + { + LDAPRoleImpl ldapr =3D (LDAPRoleImpl)getRoleModule().findRoleByName(= "Echo"); + assertEquals(ldapr.getDn().toLowerCase(), ("cn=3DEcho,ou=3DRoles," += suffix).toLowerCase()); + assertEquals(ldapr.getName(), "Echo"); + getRoleModule().removeRole(ldapr.getId()); + try + { + ldapr =3D (LDAPRoleImpl)getRoleModule().findRoleByName("Echo"); + fail(); + } + catch (IdentityException e) + { + //expected + } + //assertNull(ldapr); + } + + @Test + public void testCreateRole() throws Exception + { + LDAPRoleImpl ldapr =3D (LDAPRoleImpl)getRoleModule().createRole("tes= tRole", "testDisplayName"); + assertNotNull(ldapr); + assertEquals("testRole", ldapr.getName()); + //assertEquals("testDisplayName",ldapr.getDisplayName()); + + ldapr =3D (LDAPRoleImpl)getRoleModule().findRoleByName("testRole"); + assertNotNull(ldapr); + getRoleModule().removeRole(ldapr.getId()); + + + try + { + getRoleModule().findRoleByName("testRole"); + fail("shouldn reach this"); + } + catch (Exception e) + { + //expected + } + //assertNull(ldapr); + + } + + @Test + public void testgetRoleCount() throws Exception + { + LDAPRoleImpl ldapr =3D (LDAPRoleImpl)getRoleModule().findRoleByName(= "Echo"); + assertEquals(ldapr.getDn().toLowerCase(), ("cn=3DEcho,ou=3DRoles," += suffix).toLowerCase()); + assertEquals(ldapr.getName(), "Echo"); + + int count =3D getRoleModule().getRolesCount(); + assertEquals(3, count); + } + + @Test + public void testFindRolesByNames() throws Exception + { + Set roles =3D getRoleModule().findRolesByNames(new String[] {"Echo"}= ); + + assertEquals(1, roles.size()); + + List roleNames =3D new LinkedList(); + + for (Iterator iterator =3D roles.iterator(); iterator.hasNext();) + { + LDAPRoleImpl role =3D (LDAPRoleImpl)iterator.next(); + roleNames.add(role.getDn().toLowerCase()); + } + assertTrue(roleNames.contains(("cn=3DEcho,ou=3DRoles," + suffix).toL= owerCase())); + + + // + roles =3D getRoleModule().findRolesByNames(new String[] {"Echo", "Ec= ho1"}); + + assertEquals(2, roles.size()); + + roleNames =3D new LinkedList(); + + for (Iterator iterator =3D roles.iterator(); iterator.hasNext();) + { + LDAPRoleImpl role =3D (LDAPRoleImpl)iterator.next(); + roleNames.add(role.getDn().toLowerCase()); + } + assertTrue(roleNames.contains(("cn=3DEcho,ou=3DRoles," + suffix).toL= owerCase())); + assertTrue(roleNames.contains(("cn=3DEcho1,ou=3DRoles," + suffix).to= LowerCase())); + + // + roles =3D getRoleModule().findRolesByNames(new String[] {"Echo", "Ec= ho1", "TheDuke"}); + + assertEquals(3, roles.size()); + + roleNames =3D new LinkedList(); + + for (Iterator iterator =3D roles.iterator(); iterator.hasNext();) + { + LDAPRoleImpl role =3D (LDAPRoleImpl)iterator.next(); + roleNames.add(role.getDn().toLowerCase()); + } + assertTrue(roleNames.contains(("cn=3DEcho,ou=3DRoles," + suffix).toL= owerCase())); + assertTrue(roleNames.contains(("cn=3DEcho1,ou=3DRoles," + suffix).to= LowerCase())); + assertTrue(roleNames.contains(("cn=3DTheDuke,ou=3DRoles," + suffix).= toLowerCase())); + } +} Deleted: modules/identity/trunk/identity/src/main/org/jboss/portal/test/ide= ntity/ldap/LDAPSimpleRoleModuleTestCase.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/identity/trunk/identity/src/main/org/jboss/portal/test/identity= /ldap/LDAPSimpleRoleModuleTestCase.java 2007-10-17 11:11:09 UTC (rev 8674) +++ modules/identity/trunk/identity/src/main/org/jboss/portal/test/identity= /ldap/LDAPSimpleRoleModuleTestCase.java 2007-10-17 13:05:03 UTC (rev 8675) @@ -1,211 +0,0 @@ -/*************************************************************************= ***** - * JBoss, a division of Red Hat = * - * Copyright 2006, Red Hat Middleware, LLC, and individual = * - * contributors as indicated by the @authors tag. See the = * - * copyright.txt in the distribution for a full listing of = * - * individual contributors. = * - * = * - * This is free software; you can redistribute it and/or modify it = * - * under the terms of the GNU Lesser General Public License as = * - * published by the Free Software Foundation; either version 2.1 of = * - * the License, or (at your option) any later version. = * - * = * - * This software is distributed in the hope that it will be useful, = * - * but WITHOUT ANY WARRANTY; without even the implied warranty of = * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU = * - * Lesser General Public License for more details. = * - * = * - * You should have received a copy of the GNU Lesser General Public = * - * License along with this software; if not, write to the Free = * - * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA = * - * 02110-1301 USA, or see the FSF site: http://www.fsf.org. = * - *************************************************************************= *****/ -package org.jboss.portal.test.identity.ldap; - -import junit.framework.TestSuite; -import org.jboss.portal.identity.RoleModule; -import org.jboss.portal.identity.ldap.LDAPRoleImpl; -import org.jboss.portal.identity.IdentityContext; -//import org.jboss.portal.identity.IdentityServiceControllerImpl; -import org.jboss.portal.identity.IdentityException; -import org.jboss.portal.test.identity.ldap.LDAPTestCase; -import org.jboss.portal.test.identity.TestServiceLoader; - -import java.util.Set; -import java.util.LinkedList; -import java.util.Iterator; -import java.util.List; - -/** - * @author Boleslaw Daw= idowicz - * @version $Revision: 1.1 $ - */ -public class LDAPSimpleRoleModuleTestCase extends LDAPTestCase -{ - private static final org.jboss.logging.Logger log =3D org.jboss.logging= .Logger.getLogger(LDAPSimpleRoleModuleTestCase.class); - - public static TestSuite suite() throws Exception - { - return createTestSuite(LDAPSimpleRoleModuleTestCase.class, "director= ies-simplerolemodule.xml", "datasources.xml"); - } - - RoleModule roleModule; - - private String suffix; - - public void setUp() throws Exception - { - - super.setUp(); - - /*IdentityContextImpl context =3D new IdentityContextImpl(); - context.start(); - identityContext =3D context; - - SimpleConfigurationImpl configuration =3D new SimpleConfigurationImp= l(); - configuration.setIdentityContext(identityContext); - configuration.setConfigFile(getDirectoryServerConfigParameter().getC= onfigFile()); - configuration.start(); - - LDAPConnectionContext connection =3D new LDAPConnectionContext(); - connection.setIdentityContext(identityContext); - connection.start(); - - LDAPRoleModuleImpl roleModule =3D new LDAPRoleModuleImpl(); - roleModule.setIdentityContext(identityContext); - //roleModule.setContainerDN("ou=3DRoles,dc=3Djboss,dc=3Dorg"); - //roleModule.setRidAttributeID("cn"); - roleModule.start(); - this.roleModule =3D roleModule;*/ - -// IdentityServiceControllerImpl controller =3D new IdentityServiceCo= ntrollerImpl(); -// controller.setConfigFile(getDirectoryServerConfigParameter().getCo= nfigFile()); -// controller.setDefaultConfigFile("test/config/standardidentity-conf= ig.xml"); -// controller.setRegisterMBeans(false); -// controller.start(); -// identityContext =3D controller.getIdentityContext(); - - identityContext =3D new TestServiceLoader().loadServices("test/confi= g/standardidentity-config.xml", getDirectoryServerConfigParameter().getConf= igFile()); - = - this.roleModule =3D (RoleModule)identityContext.getObject(IdentityCo= ntext.TYPE_ROLE_MODULE); - - suffix =3D getDirectoryServerConfigParameter().getCleanUpDN(); - - populate(); - - } - - - /*public void testFirstSimple() throws Exception - { - log.info("test framework works ;]"); - }*/ - - public void testFindRoleByName() throws Exception - { - LDAPRoleImpl ldapr =3D (LDAPRoleImpl)roleModule.findRoleByName("Echo= "); - assertEquals(ldapr.getDn().toLowerCase(), ("cn=3DEcho,ou=3DRoles," += suffix).toLowerCase()); - assertEquals(ldapr.getName(), "Echo"); - } - - public void testRemoveRole() throws Exception - { - LDAPRoleImpl ldapr =3D (LDAPRoleImpl)roleModule.findRoleByName("Echo= "); - assertEquals(ldapr.getDn().toLowerCase(), ("cn=3DEcho,ou=3DRoles," += suffix).toLowerCase()); - assertEquals(ldapr.getName(), "Echo"); - roleModule.removeRole(ldapr.getId()); - try - { - ldapr =3D (LDAPRoleImpl)roleModule.findRoleByName("Echo"); - fail(); - } - catch (IdentityException e) - { - //expected - } - //assertNull(ldapr); - } - - public void testCreateRole() throws Exception - { - LDAPRoleImpl ldapr =3D (LDAPRoleImpl)roleModule.createRole("testRole= ", "testDisplayName"); - assertNotNull(ldapr); - assertEquals("testRole", ldapr.getName()); - //assertEquals("testDisplayName",ldapr.getDisplayName()); - - ldapr =3D (LDAPRoleImpl)roleModule.findRoleByName("testRole"); - assertNotNull(ldapr); - roleModule.removeRole(ldapr.getId()); - - - try - { - roleModule.findRoleByName("testRole"); - fail("shouldn reach this"); - } - catch (Exception e) - { - //expected - } - //assertNull(ldapr); - - } - - public void testgetRoleCount() throws Exception - { - LDAPRoleImpl ldapr =3D (LDAPRoleImpl)roleModule.findRoleByName("Echo= "); - assertEquals(ldapr.getDn().toLowerCase(), ("cn=3DEcho,ou=3DRoles," += suffix).toLowerCase()); - assertEquals(ldapr.getName(), "Echo"); - - int count =3D roleModule.getRolesCount(); - assertEquals(3, count); - } - - public void testFindRolesByNames() throws Exception - { - Set roles =3D roleModule.findRolesByNames(new String[] {"Echo"}); - - assertEquals(1, roles.size()); - - List roleNames =3D new LinkedList(); - - for (Iterator iterator =3D roles.iterator(); iterator.hasNext();) - { - LDAPRoleImpl role =3D (LDAPRoleImpl)iterator.next(); - roleNames.add(role.getDn().toLowerCase()); - } - assertTrue(roleNames.contains(("cn=3DEcho,ou=3DRoles," + suffix).toL= owerCase())); - - - // - roles =3D roleModule.findRolesByNames(new String[] {"Echo", "Echo1"}= ); - - assertEquals(2, roles.size()); - - roleNames =3D new LinkedList(); - - for (Iterator iterator =3D roles.iterator(); iterator.hasNext();) - { - LDAPRoleImpl role =3D (LDAPRoleImpl)iterator.next(); - roleNames.add(role.getDn().toLowerCase()); - } - assertTrue(roleNames.contains(("cn=3DEcho,ou=3DRoles," + suffix).toL= owerCase())); - assertTrue(roleNames.contains(("cn=3DEcho1,ou=3DRoles," + suffix).to= LowerCase())); - - // - roles =3D roleModule.findRolesByNames(new String[] {"Echo", "Echo1",= "TheDuke"}); - - assertEquals(3, roles.size()); - - roleNames =3D new LinkedList(); - - for (Iterator iterator =3D roles.iterator(); iterator.hasNext();) - { - LDAPRoleImpl role =3D (LDAPRoleImpl)iterator.next(); - roleNames.add(role.getDn().toLowerCase()); - } - assertTrue(roleNames.contains(("cn=3DEcho,ou=3DRoles," + suffix).toL= owerCase())); - assertTrue(roleNames.contains(("cn=3DEcho1,ou=3DRoles," + suffix).to= LowerCase())); - assertTrue(roleNames.contains(("cn=3DTheDuke,ou=3DRoles," + suffix).= toLowerCase())); - } -} Copied: modules/identity/trunk/identity/src/main/org/jboss/portal/test/iden= tity/ldap/LDAPSimpleUserModuleTest.java (from rev 8668, modules/identity/tr= unk/identity/src/main/org/jboss/portal/test/identity/ldap/LDAPSimpleUserMod= uleTestCase.java) =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/identity/trunk/identity/src/main/org/jboss/portal/test/identity= /ldap/LDAPSimpleUserModuleTest.java (rev 0) +++ modules/identity/trunk/identity/src/main/org/jboss/portal/test/identity= /ldap/LDAPSimpleUserModuleTest.java 2007-10-17 13:05:03 UTC (rev 8675) @@ -0,0 +1,143 @@ +/*************************************************************************= ***** + * JBoss, a division of Red Hat = * + * Copyright 2006, Red Hat Middleware, LLC, and individual = * + * contributors as indicated by the @authors tag. See the = * + * copyright.txt in the distribution for a full listing of = * + * individual contributors. = * + * = * + * This is free software; you can redistribute it and/or modify it = * + * under the terms of the GNU Lesser General Public License as = * + * published by the Free Software Foundation; either version 2.1 of = * + * the License, or (at your option) any later version. = * + * = * + * This software is distributed in the hope that it will be useful, = * + * but WITHOUT ANY WARRANTY; without even the implied warranty of = * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU = * + * Lesser General Public License for more details. = * + * = * + * You should have received a copy of the GNU Lesser General Public = * + * License along with this software; if not, write to the Free = * + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA = * + * 02110-1301 USA, or see the FSF site: http://www.fsf.org. = * + *************************************************************************= *****/ +package org.jboss.portal.test.identity.ldap; + +import org.jboss.portal.identity.ldap.LDAPUserImpl; +import org.jboss.portal.identity.User; +import org.jboss.portal.identity.Role; +import org.jboss.portal.identity.IdentityException; +import org.jboss.unit.api.pojo.annotations.Test; +import org.jboss.unit.api.pojo.annotations.Tag; +import static org.jboss.unit.api.Assert.*; +import org.jboss.unit.mc.api.annotations.Bootstrap; + +import java.util.Set; +import java.util.HashSet; + +/** + * @author Boleslaw Daw= idowicz + * @version $Revision: 1.1 $ + */ +(a)Bootstrap(resourceName =3D "/org/jboss/portal/test/identity/ldap-beans.= xml") +(a)Tag(value =3D {"LDAP","UserModule","SimpleUserModule"}) +public class LDAPSimpleUserModuleTest extends LDAPTestPOJO +{ + private static final org.jboss.logging.Logger log =3D org.jboss.logging= .Logger.getLogger(LDAPSimpleUserModuleTest.class); + + @Test + public void testFirstSimple() throws Exception + { + + log.info("test framework works ;]"); + } + + @Test + public void testFindUserByName() throws Exception + { + LDAPUserImpl ldapu =3D (LDAPUserImpl)getUserModule().findUserByUserN= ame("jduke"); + assertEquals(ldapu.getDn().toLowerCase(), (userPrefix + "=3Djduke,ou= =3DPeople," + suffix).toLowerCase()); + assertEquals(ldapu.getUserName(), "jduke"); + } + + @Test + public void testRemoveUser() throws Exception + { + LDAPUserImpl ldapu =3D (LDAPUserImpl)getUserModule().findUserByUserN= ame("jduke"); + assertNotNull(ldapu); + assertEquals(ldapu.getDn().toLowerCase(), (userPrefix + "=3Djduke,ou= =3DPeople," + suffix).toLowerCase()); + getUserModule().removeUser(ldapu.getId()); + try + { + getUserModule().findUserByUserName("jduke"); + fail(); + } + catch (IdentityException e) + { + //expected + } + //assertNull(ldapu); + } + + @Test + public void testCreateUser() throws Exception + { + LDAPUserImpl ldapu =3D (LDAPUserImpl)getUserModule().createUser("tes= tUser", "testPassword"); + assertNotNull(ldapu); + assertEquals("testUser", ldapu.getUserName()); + + ldapu =3D (LDAPUserImpl)getUserModule().findUserByUserName("testUser= "); + assertNotNull(ldapu); + getUserModule().removeUser(ldapu.getId()); + + try + { + ldapu =3D (LDAPUserImpl)getUserModule().findUserByUserName("testU= ser"); + fail(); + } + catch (IdentityException e) + { + //expected + } + //assertNull(ldapu); + + } + + @Test + public void testgetUserCount() throws Exception + { + LDAPUserImpl ldapu =3D (LDAPUserImpl)getUserModule().findUserByUserN= ame("jduke"); + assertEquals(ldapu.getDn().toLowerCase(),(userPrefix + "=3Djduke,ou= =3DPeople," + suffix).toLowerCase()); + assertEquals(ldapu.getUserName(), "jduke"); + + int count =3D getUserModule().getUserCount(); + assertEquals(5, count); + } + + @Test + public void testPassword() throws Exception + { + getUserModule().createUser("testUser", "testPassword"); + User u =3D getUserModule().findUserByUserName("testUser"); + assertNotNull(u); + assertEquals("testUser", u.getUserName()); + assertTrue(u.validatePassword("testPassword")); + + Role r =3D getRoleModule().createRole("testRole", "testDisplayName"); + Set a =3D new HashSet(); + a.add(r); + getMembershipModule().assignRoles(u, a); + assertTrue(u.validatePassword("testPassword")); + + getUserProfileModule().setProperty(u, User.INFO_USER_EMAIL_REAL, "te= stRealEmail"); + assertTrue(u.validatePassword("testPassword")); + + + assertTrue(!u.validatePassword("1testPassword1")); + u.updatePassword("1testPassword1"); + assertTrue(u.validatePassword("1testPassword1")); + + } + + + +} Deleted: modules/identity/trunk/identity/src/main/org/jboss/portal/test/ide= ntity/ldap/LDAPSimpleUserModuleTestCase.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/identity/trunk/identity/src/main/org/jboss/portal/test/identity= /ldap/LDAPSimpleUserModuleTestCase.java 2007-10-17 11:11:09 UTC (rev 8674) +++ modules/identity/trunk/identity/src/main/org/jboss/portal/test/identity= /ldap/LDAPSimpleUserModuleTestCase.java 2007-10-17 13:05:03 UTC (rev 8675) @@ -1,187 +0,0 @@ -/*************************************************************************= ***** - * JBoss, a division of Red Hat = * - * Copyright 2006, Red Hat Middleware, LLC, and individual = * - * contributors as indicated by the @authors tag. See the = * - * copyright.txt in the distribution for a full listing of = * - * individual contributors. = * - * = * - * This is free software; you can redistribute it and/or modify it = * - * under the terms of the GNU Lesser General Public License as = * - * published by the Free Software Foundation; either version 2.1 of = * - * the License, or (at your option) any later version. = * - * = * - * This software is distributed in the hope that it will be useful, = * - * but WITHOUT ANY WARRANTY; without even the implied warranty of = * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU = * - * Lesser General Public License for more details. = * - * = * - * You should have received a copy of the GNU Lesser General Public = * - * License along with this software; if not, write to the Free = * - * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA = * - * 02110-1301 USA, or see the FSF site: http://www.fsf.org. = * - *************************************************************************= *****/ -package org.jboss.portal.test.identity.ldap; - -import junit.framework.TestSuite; -import org.jboss.portal.identity.UserModule; -import org.jboss.portal.identity.ldap.LDAPUserImpl; -//import org.jboss.portal.identity.IdentityServiceControllerImpl; -import org.jboss.portal.identity.IdentityContext; -import org.jboss.portal.identity.User; -import org.jboss.portal.identity.RoleModule; -import org.jboss.portal.identity.MembershipModule; -import org.jboss.portal.identity.UserProfileModule; -import org.jboss.portal.identity.Role; -import org.jboss.portal.identity.IdentityException; -import org.jboss.portal.identity.IdentityConfiguration; -import org.jboss.portal.test.identity.ldap.LDAPTestCase; -import org.jboss.portal.test.identity.TestServiceLoader; - -import java.util.Set; -import java.util.HashSet; - -/** - * @author Boleslaw Daw= idowicz - * @version $Revision: 1.1 $ - */ -public class LDAPSimpleUserModuleTestCase extends LDAPTestCase -{ - private static final org.jboss.logging.Logger log =3D org.jboss.logging= .Logger.getLogger(LDAPSimpleUserModuleTestCase.class); - - public static TestSuite suite() throws Exception - { - System.out.println("###"); - return createTestSuite(LDAPSimpleUserModuleTestCase.class, "director= ies-simpleusermodule.xml", "datasources.xml"); - } - - UserModule userModule; - - RoleModule roleModule; - - MembershipModule membershipModule; - - UserProfileModule userProfileModule; - - = - - private String suffix; - - private String userPrefix; - - public void setUp() throws Exception - { - super.setUp(); - -// IdentityServiceControllerImpl controller =3D new IdentityServiceCo= ntrollerImpl(); -// controller.setConfigFile(getDirectoryServerConfigParameter().getCo= nfigFile()); -// controller.setDefaultConfigFile("test/config/standardidentity-conf= ig.xml"); -// controller.setRegisterMBeans(false); -// controller.start(); -// identityContext =3D controller.getIdentityContext(); - - identityContext =3D new TestServiceLoader().loadServices("test/confi= g/standardidentity-config.xml", getDirectoryServerConfigParameter().getConf= igFile()); - - userModule =3D (UserModule)identityContext.getObject(IdentityContext= .TYPE_USER_MODULE); - userModule =3D (UserModule)identityContext.getObject(IdentityContext= .TYPE_USER_MODULE); - roleModule =3D (RoleModule)identityContext.getObject(IdentityContext= .TYPE_ROLE_MODULE); - membershipModule =3D (MembershipModule)identityContext.getObject(Ide= ntityContext.TYPE_MEMBERSHIP_MODULE); - userProfileModule =3D (UserProfileModule)identityContext.getObject(I= dentityContext.TYPE_USER_PROFILE_MODULE); - - - suffix =3D getDirectoryServerConfigParameter().getCleanUpDN(); - userPrefix =3D ((IdentityConfiguration)identityContext.getObject(Ide= ntityContext.TYPE_IDENTITY_CONFIGURATION)).getValue(IdentityConfiguration.U= SER_UID_ATTRIBUTE_ID); - - populate(); - } - - - public void testFirstSimple() throws Exception - { - log.info("test framework works ;]"); - } - - public void testFindUserByName() throws Exception - { - LDAPUserImpl ldapu =3D (LDAPUserImpl)userModule.findUserByUserName("= jduke"); - assertEquals(ldapu.getDn().toLowerCase(), (userPrefix + "=3Djduke,ou= =3DPeople," + suffix).toLowerCase()); - assertEquals(ldapu.getUserName(), "jduke"); - } - - public void testRemoveUser() throws Exception - { - LDAPUserImpl ldapu =3D (LDAPUserImpl)userModule.findUserByUserName("= jduke"); - assertNotNull(ldapu); - assertEquals(ldapu.getDn().toLowerCase(), (userPrefix + "=3Djduke,ou= =3DPeople," + suffix).toLowerCase()); - userModule.removeUser(ldapu.getId()); - try - { - userModule.findUserByUserName("jduke"); - fail(); - } - catch (IdentityException e) - { - //expected - } - //assertNull(ldapu); - } - - public void testCreateUser() throws Exception - { - LDAPUserImpl ldapu =3D (LDAPUserImpl)userModule.createUser("testUser= ", "testPassword"); - assertNotNull(ldapu); - assertEquals("testUser", ldapu.getUserName()); - - ldapu =3D (LDAPUserImpl)userModule.findUserByUserName("testUser"); - assertNotNull(ldapu); - userModule.removeUser(ldapu.getId()); - - try - { - ldapu =3D (LDAPUserImpl)userModule.findUserByUserName("testUser"); - fail(); - } - catch (IdentityException e) - { - //expected - } - //assertNull(ldapu); - - } - - public void testgetUserCount() throws Exception - { - LDAPUserImpl ldapu =3D (LDAPUserImpl)userModule.findUserByUserName("= jduke"); - assertEquals(ldapu.getDn().toLowerCase(),(userPrefix + "=3Djduke,ou= =3DPeople," + suffix).toLowerCase()); - assertEquals(ldapu.getUserName(), "jduke"); - - int count =3D userModule.getUserCount(); - assertEquals(5, count); - } - - public void testPassword() throws Exception - { - userModule.createUser("testUser", "testPassword"); - User u =3D userModule.findUserByUserName("testUser"); - assertNotNull(u); - assertEquals("testUser", u.getUserName()); - assertTrue(u.validatePassword("testPassword")); - - Role r =3D roleModule.createRole("testRole", "testDisplayName"); - Set a =3D new HashSet(); - a.add(r); - membershipModule.assignRoles(u, a); - assertTrue(u.validatePassword("testPassword")); - - userProfileModule.setProperty(u, User.INFO_USER_EMAIL_REAL, "testRea= lEmail"); - assertTrue(u.validatePassword("testPassword")); - - - assertTrue(!u.validatePassword("1testPassword1")); - u.updatePassword("1testPassword1"); - assertTrue(u.validatePassword("1testPassword1")); - - } - - - -} Copied: modules/identity/trunk/identity/src/main/org/jboss/portal/test/iden= tity/ldap/LDAPStaticGroupMembershipModuleTest.java (from rev 8668, modules/= identity/trunk/identity/src/main/org/jboss/portal/test/identity/ldap/LDAPSt= aticGroupMembershipModuleTestCase.java) =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/identity/trunk/identity/src/main/org/jboss/portal/test/identity= /ldap/LDAPStaticGroupMembershipModuleTest.java (rev= 0) +++ modules/identity/trunk/identity/src/main/org/jboss/portal/test/identity= /ldap/LDAPStaticGroupMembershipModuleTest.java 2007-10-17 13:05:03 UTC (rev= 8675) @@ -0,0 +1,158 @@ +/*************************************************************************= ***** + * JBoss, a division of Red Hat = * + * Copyright 2006, Red Hat Middleware, LLC, and individual = * + * contributors as indicated by the @authors tag. See the = * + * copyright.txt in the distribution for a full listing of = * + * individual contributors. = * + * = * + * This is free software; you can redistribute it and/or modify it = * + * under the terms of the GNU Lesser General Public License as = * + * published by the Free Software Foundation; either version 2.1 of = * + * the License, or (at your option) any later version. = * + * = * + * This software is distributed in the hope that it will be useful, = * + * but WITHOUT ANY WARRANTY; without even the implied warranty of = * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU = * + * Lesser General Public License for more details. = * + * = * + * You should have received a copy of the GNU Lesser General Public = * + * License along with this software; if not, write to the Free = * + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA = * + * 02110-1301 USA, or see the FSF site: http://www.fsf.org. = * + *************************************************************************= *****/ +package org.jboss.portal.test.identity.ldap; + +import org.jboss.portal.identity.ldap.LDAPRoleImpl; +import org.jboss.portal.identity.ldap.LDAPUserImpl; +import static org.jboss.unit.api.Assert.*; +import org.jboss.unit.api.pojo.annotations.Test; +import org.jboss.unit.api.pojo.annotations.Tag; +import org.jboss.unit.mc.api.annotations.Bootstrap; + + +import java.util.Set; +import java.util.Iterator; +import java.util.HashSet; +import java.util.List; +import java.util.LinkedList; + +/** + * @author Boleslaw Daw= idowicz + * @version $Revision: 1.1 $ + */ +(a)Bootstrap(resourceName =3D "/org/jboss/portal/test/identity/ldap-beans.= xml") +(a)Tag(value =3D {"LDAP","MembershipModule","StaticGroupMembershipModule"}) +public class LDAPStaticGroupMembershipModuleTest extends LDAPTestPOJO +{ + + private static final org.jboss.logging.Logger log =3D org.jboss.logging= .Logger.getLogger(LDAPStaticGroupMembershipModuleTest.class); + + + @Test + public void testGetUsers() throws Exception + { + LDAPRoleImpl role =3D (LDAPRoleImpl)getRoleModule().findRoleByName("= Echo"); + Set users =3D getMembershipModule().getUsers(role); + assertEquals(3, users.size()); + + List names =3D new LinkedList(); + + for (Iterator iterator =3D users.iterator(); iterator.hasNext();) + { + LDAPUserImpl user =3D (LDAPUserImpl)iterator.next(); + // fix assert for OpenLDAP (\2C --> \,) + names.add(user.getDn().replaceAll("\\\\2C", "\\\\,").toLowerCase(= )); + } + assertTrue(names.contains((userPrefix + "=3Djduke1,ou=3DPeople," + s= uffix).toLowerCase())); + assertTrue(names.contains((userPrefix + "=3Djduke3,ou=3DPeople," + s= uffix).toLowerCase())); + assertTrue(names.contains((userPrefix + "=3Djduke4\\, Duke,ou=3DPeop= le," + suffix).toLowerCase())); + } + + @Test + public void testGetRoles() throws Exception + { + LDAPUserImpl user =3D (LDAPUserImpl)getUserModule().findUserByUserNa= me("jduke1"); + Set roles =3D getMembershipModule().getRoles(user); + assertEquals(1, roles.size()); + + List roleNames =3D new LinkedList(); + + for (Iterator iterator =3D roles.iterator(); iterator.hasNext();) + { + LDAPRoleImpl role =3D (LDAPRoleImpl)iterator.next(); + roleNames.add(role.getDn().toLowerCase()); + } + assertTrue(roleNames.contains(("cn=3DEcho,ou=3DRoles," + suffix).toL= owerCase())); + + user =3D (LDAPUserImpl)getUserModule().findUserByUserName("jduke3"); + roles =3D getMembershipModule().getRoles(user); + assertEquals(2, roles.size()); + + roleNames =3D new LinkedList(); + + for (Iterator iterator =3D roles.iterator(); iterator.hasNext();) + { + LDAPRoleImpl role =3D (LDAPRoleImpl)iterator.next(); + roleNames.add(role.getDn().toLowerCase()); + } + assertTrue(roleNames.contains(("cn=3DEcho,ou=3DRoles," + suffix).toL= owerCase())); + assertTrue(roleNames.contains(("cn=3DEcho1,ou=3DRoles," + suffix).to= LowerCase())); + + } + + @Test + public void testAssignRoles() throws Exception + { + Set users =3D new HashSet(); + users.add((LDAPUserImpl)getUserModule().findUserByUserName("jduke1")= ); + users.add((LDAPUserImpl)getUserModule().findUserByUserName("jduke4, = Duke")); + LDAPRoleImpl role =3D (LDAPRoleImpl)getRoleModule().findRoleByName("= Echo1"); + getMembershipModule().assignUsers(role,users); + + users =3D getMembershipModule().getUsers(role); + + assertEquals(2, users.size()); + + List names =3D new LinkedList(); + + for (Iterator iterator =3D users.iterator(); iterator.hasNext();) + { + LDAPUserImpl user =3D (LDAPUserImpl)iterator.next(); + // fix assert for OpenLDAP (\2C --> \,) + names.add(user.getDn().replaceAll("\\\\2C", "\\\\,").toLowerCase(= )); + } + + assertTrue(names.contains((userPrefix + "=3Djduke1,ou=3DPeople," + s= uffix).toLowerCase())); + assertTrue(names.contains((userPrefix + "=3Djduke4\\, Duke,ou=3DPeop= le," + suffix).toLowerCase())); + } + + @Test + public void testAssignUsers() throws Exception + { + Set users =3D new HashSet(); + users.add(getUserModule().findUserByUserName("jduke3")); + users.add(getUserModule().findUserByUserName("jduke4, Duke")); + LDAPRoleImpl role =3D (LDAPRoleImpl)getRoleModule().findRoleByName("= Echo1"); + getMembershipModule().assignUsers(role,users); + + users =3D getMembershipModule().getUsers(role); + + assertEquals(2, users.size()); + + List names =3D new LinkedList(); + + for (Iterator iterator =3D users.iterator(); iterator.hasNext();) + { + LDAPUserImpl user =3D (LDAPUserImpl)iterator.next(); + // fix assert for OpenLDAP (\2C --> \,) + names.add(user.getDn().replaceAll("\\\\2C", "\\\\,").toLowerCase(= )); + } + + assertTrue(names.contains((userPrefix + "=3Djduke3,ou=3DPeople," + s= uffix).toLowerCase())); + assertTrue(names.contains((userPrefix + "=3Djduke4\\, Duke,ou=3DPeop= le," + suffix).toLowerCase())); + + } + + + +} Deleted: modules/identity/trunk/identity/src/main/org/jboss/portal/test/ide= ntity/ldap/LDAPStaticGroupMembershipModuleTestCase.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/identity/trunk/identity/src/main/org/jboss/portal/test/identity= /ldap/LDAPStaticGroupMembershipModuleTestCase.java 2007-10-17 11:11:09 UTC = (rev 8674) +++ modules/identity/trunk/identity/src/main/org/jboss/portal/test/identity= /ldap/LDAPStaticGroupMembershipModuleTestCase.java 2007-10-17 13:05:03 UTC = (rev 8675) @@ -1,202 +0,0 @@ -/*************************************************************************= ***** - * JBoss, a division of Red Hat = * - * Copyright 2006, Red Hat Middleware, LLC, and individual = * - * contributors as indicated by the @authors tag. See the = * - * copyright.txt in the distribution for a full listing of = * - * individual contributors. = * - * = * - * This is free software; you can redistribute it and/or modify it = * - * under the terms of the GNU Lesser General Public License as = * - * published by the Free Software Foundation; either version 2.1 of = * - * the License, or (at your option) any later version. = * - * = * - * This software is distributed in the hope that it will be useful, = * - * but WITHOUT ANY WARRANTY; without even the implied warranty of = * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU = * - * Lesser General Public License for more details. = * - * = * - * You should have received a copy of the GNU Lesser General Public = * - * License along with this software; if not, write to the Free = * - * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA = * - * 02110-1301 USA, or see the FSF site: http://www.fsf.org. = * - *************************************************************************= *****/ -package org.jboss.portal.test.identity.ldap; - -import junit.framework.TestSuite; -import org.jboss.portal.test.identity.ldap.LDAPMembershipModuleTestCase; -import org.jboss.portal.test.identity.TestServiceLoader; -import org.jboss.portal.identity.MembershipModule; -import org.jboss.portal.identity.ldap.LDAPRoleImpl; -import org.jboss.portal.identity.ldap.LDAPUserImpl; -import org.jboss.portal.identity.IdentityContext; -import org.jboss.portal.identity.UserModule; -import org.jboss.portal.identity.RoleModule; -//import org.jboss.portal.identity.IdentityServiceControllerImpl; -import org.jboss.portal.identity.IdentityConfiguration; - - -import java.util.Set; -import java.util.Iterator; -import java.util.HashSet; -import java.util.List; -import java.util.LinkedList; - -/** - * @author Boleslaw Daw= idowicz - * @version $Revision: 1.1 $ - */ -public class LDAPStaticGroupMembershipModuleTestCase extends LDAPMembershi= pModuleTestCase -{ - - private static final org.jboss.logging.Logger log =3D org.jboss.logging= .Logger.getLogger(LDAPStaticGroupMembershipModuleTestCase.class); - - public static TestSuite suite() throws Exception - { - return createTestSuite(LDAPStaticGroupMembershipModuleTestCase.class= , "directories-staticgroupmembership.xml", "datasources.xml"); - } - - private UserModule userModule; - - private RoleModule roleModule; - - private MembershipModule membershipModule; - - private String suffix; - - private String prefix; - - public void setUp() throws Exception - { - super.setUp(); - -// IdentityServiceControllerImpl controller =3D new IdentityServiceCo= ntrollerImpl(); -// controller.setConfigFile(getDirectoryServerConfigParameter().getCo= nfigFile()); -// controller.setDefaultConfigFile("test/config/standardidentity-conf= ig.xml"); -// controller.setRegisterMBeans(false); -// controller.start(); -// identityContext =3D controller.getIdentityContext(); - - identityContext =3D new TestServiceLoader().loadServices("test/confi= g/standardidentity-config.xml", getDirectoryServerConfigParameter().getConf= igFile()); - - userModule =3D (UserModule)identityContext.getObject(IdentityContext= .TYPE_USER_MODULE); - roleModule =3D (RoleModule)identityContext.getObject(IdentityContext= .TYPE_ROLE_MODULE); - membershipModule =3D (MembershipModule)identityContext.getObject(Ide= ntityContext.TYPE_MEMBERSHIP_MODULE); - - suffix =3D getDirectoryServerConfigParameter().getCleanUpDN(); - - prefix =3D ((IdentityConfiguration)identityContext.getObject(Identit= yContext.TYPE_IDENTITY_CONFIGURATION)).getValue(IdentityConfiguration.USER_= UID_ATTRIBUTE_ID); - - - populate(); - } - - //TODO:extend this - public void testGetUsers() throws Exception - { - LDAPRoleImpl role =3D (LDAPRoleImpl)roleModule.findRoleByName("Echo"= ); - Set users =3D membershipModule.getUsers(role); - assertEquals(3, users.size()); - - List names =3D new LinkedList(); - - for (Iterator iterator =3D users.iterator(); iterator.hasNext();) - { - LDAPUserImpl user =3D (LDAPUserImpl)iterator.next(); - // fix assert for OpenLDAP (\2C --> \,) - names.add(user.getDn().replaceAll("\\\\2C", "\\\\,").toLowerCase(= )); - } - assertTrue(names.contains((prefix + "=3Djduke1,ou=3DPeople," + suffi= x).toLowerCase())); - assertTrue(names.contains((prefix + "=3Djduke3,ou=3DPeople," + suffi= x).toLowerCase())); - assertTrue(names.contains((prefix + "=3Djduke4\\, Duke,ou=3DPeople,"= + suffix).toLowerCase())); - } - - //TODO:extend this - public void testGetRoles() throws Exception - { - LDAPUserImpl user =3D (LDAPUserImpl)userModule.findUserByUserName("j= duke1"); - Set roles =3D membershipModule.getRoles(user); - assertEquals(1, roles.size()); - - List roleNames =3D new LinkedList(); - - for (Iterator iterator =3D roles.iterator(); iterator.hasNext();) - { - LDAPRoleImpl role =3D (LDAPRoleImpl)iterator.next(); - roleNames.add(role.getDn().toLowerCase()); - } - assertTrue(roleNames.contains(("cn=3DEcho,ou=3DRoles," + suffix).toL= owerCase())); - - user =3D (LDAPUserImpl)userModule.findUserByUserName("jduke3"); - roles =3D membershipModule.getRoles(user); - assertEquals(2, roles.size()); - - roleNames =3D new LinkedList(); - - for (Iterator iterator =3D roles.iterator(); iterator.hasNext();) - { - LDAPRoleImpl role =3D (LDAPRoleImpl)iterator.next(); - roleNames.add(role.getDn().toLowerCase()); - } - assertTrue(roleNames.contains(("cn=3DEcho,ou=3DRoles," + suffix).toL= owerCase())); - assertTrue(roleNames.contains(("cn=3DEcho1,ou=3DRoles," + suffix).to= LowerCase())); - - } - - - //TODO:extend this - public void testAssignRoles() throws Exception - { - Set users =3D new HashSet(); - users.add((LDAPUserImpl)userModule.findUserByUserName("jduke1")); - users.add((LDAPUserImpl)userModule.findUserByUserName("jduke4, Duke"= )); - LDAPRoleImpl role =3D (LDAPRoleImpl)roleModule.findRoleByName("Echo1= "); - membershipModule.assignUsers(role,users); - - users =3D membershipModule.getUsers(role); - - assertEquals(2, users.size()); - - List names =3D new LinkedList(); - - for (Iterator iterator =3D users.iterator(); iterator.hasNext();) - { - LDAPUserImpl user =3D (LDAPUserImpl)iterator.next(); - // fix assert for OpenLDAP (\2C --> \,) - names.add(user.getDn().replaceAll("\\\\2C", "\\\\,").toLowerCase(= )); - } - - assertTrue(names.contains((prefix + "=3Djduke1,ou=3DPeople," + suffi= x).toLowerCase())); - assertTrue(names.contains((prefix + "=3Djduke4\\, Duke,ou=3DPeople,"= + suffix).toLowerCase())); - } - - - //TODO:extend this - public void testAssignUsers() throws Exception - { - Set users =3D new HashSet(); - users.add(userModule.findUserByUserName("jduke3")); - users.add(userModule.findUserByUserName("jduke4, Duke")); - LDAPRoleImpl role =3D (LDAPRoleImpl)roleModule.findRoleByName("Echo1= "); - membershipModule.assignUsers(role,users); - - users =3D membershipModule.getUsers(role); - - assertEquals(2, users.size()); - - List names =3D new LinkedList(); - - for (Iterator iterator =3D users.iterator(); iterator.hasNext();) - { - LDAPUserImpl user =3D (LDAPUserImpl)iterator.next(); - // fix assert for OpenLDAP (\2C --> \,) - names.add(user.getDn().replaceAll("\\\\2C", "\\\\,").toLowerCase(= )); - } - - assertTrue(names.contains((prefix + "=3Djduke3,ou=3DPeople," + suffi= x).toLowerCase())); - assertTrue(names.contains((prefix + "=3Djduke4\\, Duke,ou=3DPeople,"= + suffix).toLowerCase())); - - } - - - -} Copied: modules/identity/trunk/identity/src/main/org/jboss/portal/test/iden= tity/ldap/LDAPStaticRoleMembershipModuleTest.java (from rev 8668, modules/i= dentity/trunk/identity/src/main/org/jboss/portal/test/identity/ldap/LDAPSta= ticRoleMembershipModuleTestCase.java) =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/identity/trunk/identity/src/main/org/jboss/portal/test/identity= /ldap/LDAPStaticRoleMembershipModuleTest.java (rev = 0) +++ modules/identity/trunk/identity/src/main/org/jboss/portal/test/identity= /ldap/LDAPStaticRoleMembershipModuleTest.java 2007-10-17 13:05:03 UTC (rev = 8675) @@ -0,0 +1,228 @@ +/* +* JBoss, a division of Red Hat +* Copyright 2006, Red Hat Middleware, LLC, and individual contributors as = indicated +* by the @authors tag. See the copyright.txt in the distribution for a +* full listing of individual contributors. +* +* This is free software; you can redistribute it and/or modify it +* under the terms of the GNU Lesser General Public License as +* published by the Free Software Foundation; either version 2.1 of +* the License, or (at your option) any later version. +* +* This software is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +* Lesser General Public License for more details. +* +* You should have received a copy of the GNU Lesser General Public +* License along with this software; if not, write to the Free +* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +* 02110-1301 USA, or see the FSF site: http://www.fsf.org. +*/ +package org.jboss.portal.test.identity.ldap; + +import org.jboss.portal.identity.ldap.LDAPRoleImpl; +import org.jboss.portal.identity.ldap.LDAPUserImpl; +import org.jboss.unit.mc.api.annotations.Bootstrap; +import static org.jboss.unit.api.Assert.*; +import org.jboss.unit.api.pojo.annotations.Test; +import org.jboss.unit.api.pojo.annotations.Tag; + + +import java.util.Set; +import java.util.List; +import java.util.LinkedList; +import java.util.Iterator; +import java.util.HashSet; + +/** + * @author Boleslaw Daw= idowicz + * @version $Revision: 1.1 $ + */ +(a)Bootstrap(resourceName =3D "/org/jboss/portal/test/identity/ldap-beans.= xml") +(a)Tag(value =3D {"LDAP","MembershipModule","StaticRoleMembershipModule"}) +public class LDAPStaticRoleMembershipModuleTest extends LDAPTestPOJO +{ + + private static final org.jboss.logging.Logger log =3D org.jboss.logging= .Logger.getLogger(LDAPStaticRoleMembershipModuleTest.class); + + @Test + public void testGetUsers() throws Exception + { + LDAPRoleImpl role =3D (LDAPRoleImpl)getRoleModule().findRoleByName("= Echo"); + Set users =3D getMembershipModule().getUsers(role); + assertEquals(3, users.size()); + + List names =3D new LinkedList(); + + for (Iterator iterator =3D users.iterator(); iterator.hasNext();) + { + LDAPUserImpl user =3D (LDAPUserImpl)iterator.next(); + names.add(user.getDn().toLowerCase()); + } + assertTrue(names.contains((userPrefix + "=3Djduke,ou=3DPeople,o=3Dex= ample2," + suffix).toLowerCase())); + assertTrue(names.contains((userPrefix + "=3Djduke1,ou=3DPeople,o=3De= xample2," + suffix).toLowerCase())); + assertTrue(names.contains((userPrefix + "=3Djduke2,ou=3DPeople,o=3De= xample2," + suffix).toLowerCase())); + + role =3D (LDAPRoleImpl)getRoleModule().findRoleByName("Echo1"); + users =3D getMembershipModule().getUsers(role); + assertEquals(2, users.size()); + + names =3D new LinkedList(); + + for (Iterator iterator =3D users.iterator(); iterator.hasNext();) + { + LDAPUserImpl user =3D (LDAPUserImpl)iterator.next(); + names.add(user.getDn().toLowerCase()); + } + assertTrue(names.contains((userPrefix + "=3Djduke1,ou=3DPeople,o=3De= xample2," + suffix).toLowerCase())); + assertTrue(names.contains((userPrefix + "=3Djduke2,ou=3DPeople,o=3De= xample2," + suffix).toLowerCase())); + + role =3D (LDAPRoleImpl)getRoleModule().findRoleByName("TheDuke"); + users =3D getMembershipModule().getUsers(role); + assertEquals(1, users.size()); + + names =3D new LinkedList(); + + for (Iterator iterator =3D users.iterator(); iterator.hasNext();) + { + LDAPUserImpl user =3D (LDAPUserImpl)iterator.next(); + names.add(user.getDn().toLowerCase()); + } + assertTrue(names.contains((userPrefix + "=3Djduke2,ou=3DPeople,o=3De= xample2," + suffix).toLowerCase())); + + role =3D (LDAPRoleImpl)getRoleModule().findRoleByName("EmptyRole"); + users =3D getMembershipModule().getUsers(role); + assertEquals(0, users.size()); + + } + + @Test + public void testGetRoles() throws Exception + { + LDAPUserImpl user =3D (LDAPUserImpl)getUserModule().findUserByUserNa= me("jduke"); + Set roles =3D getMembershipModule().getRoles(user); + assertEquals(1, roles.size()); + + List roleNames =3D new LinkedList(); + + for (Iterator iterator =3D roles.iterator(); iterator.hasNext();) + { + LDAPRoleImpl role =3D (LDAPRoleImpl)iterator.next(); + roleNames.add(role.getDn().toLowerCase()); + } + assertTrue(roleNames.contains(("cn=3DEcho,ou=3DRoles,o=3Dexample2," = + suffix).toLowerCase())); + + user =3D (LDAPUserImpl)getUserModule().findUserByUserName("jduke1"); + roles =3D getMembershipModule().getRoles(user); + assertEquals(2, roles.size()); + + roleNames =3D new LinkedList(); + + for (Iterator iterator =3D roles.iterator(); iterator.hasNext();) + { + LDAPRoleImpl role =3D (LDAPRoleImpl)iterator.next(); + roleNames.add(role.getDn().toLowerCase()); + } + assertTrue(roleNames.contains(("cn=3DEcho,ou=3DRoles,o=3Dexample2," = + suffix).toLowerCase())); + assertTrue(roleNames.contains(("cn=3DEcho1,ou=3DRoles,o=3Dexample2,"= + suffix).toLowerCase())); + + user =3D (LDAPUserImpl)getUserModule().findUserByUserName("jduke2"); + roles =3D getMembershipModule().getRoles(user); + assertEquals(3, roles.size()); + + roleNames =3D new LinkedList(); + + for (Iterator iterator =3D roles.iterator(); iterator.hasNext();) + { + LDAPRoleImpl role =3D (LDAPRoleImpl)iterator.next(); + roleNames.add(role.getDn().toLowerCase()); + } + assertTrue(roleNames.contains(("cn=3DEcho,ou=3DRoles,o=3Dexample2," = + suffix).toLowerCase())); + assertTrue(roleNames.contains(("cn=3DEcho1,ou=3DRoles,o=3Dexample2,"= + suffix).toLowerCase())); + assertTrue(roleNames.contains(("cn=3DTheDuke,ou=3DRoles,o=3Dexample2= ," + suffix).toLowerCase())); + + user =3D (LDAPUserImpl)getUserModule().findUserByUserName("jduke3"); + roles =3D getMembershipModule().getRoles(user); + assertEquals(0, roles.size()); + + } + + @Test + public void testAssignRoles() throws Exception + { + Set roles =3D new HashSet(); + roles.add(getRoleModule().findRoleByName("Echo")); + roles.add(getRoleModule().findRoleByName("TheDuke")); + LDAPUserImpl user =3D (LDAPUserImpl)getUserModule().findUserByUserNa= me("jduke"); + LDAPUserImpl user1 =3D (LDAPUserImpl)getUserModule().findUserByUserN= ame("jduke4"); + getMembershipModule().assignRoles(user,roles); + getMembershipModule().assignRoles(user1,roles); + + roles =3D getMembershipModule().getRoles(user); + + assertEquals(2, roles.size()); + + List names =3D new LinkedList(); + + for (Iterator iterator =3D roles.iterator(); iterator.hasNext();) + { + LDAPRoleImpl role =3D (LDAPRoleImpl)iterator.next(); + names.add(role.getDn().toLowerCase()); + } + + assertTrue(names.contains(("cn=3DEcho,ou=3DRoles,o=3Dexample2," + su= ffix).toLowerCase())); + assertTrue(names.contains(("cn=3DTheDuke,ou=3DRoles,o=3Dexample2," += suffix).toLowerCase())); + + roles =3D getMembershipModule().getRoles(user1); + + assertEquals(2, roles.size()); + + names =3D new LinkedList(); + + for (Iterator iterator =3D roles.iterator(); iterator.hasNext();) + { + LDAPRoleImpl role =3D (LDAPRoleImpl)iterator.next(); + names.add(role.getDn().toLowerCase()); + } + + assertTrue(names.contains(("cn=3DEcho,ou=3DRoles,o=3Dexample2," + su= ffix).toLowerCase())); + assertTrue(names.contains(("cn=3DTheDuke,ou=3DRoles,o=3Dexample2," += suffix).toLowerCase())); + + getMembershipModule().assignRoles(user1,new HashSet()); + roles =3D getMembershipModule().getRoles(user1); + + assertEquals(0, roles.size()); + + } + + @Test + public void testAssignUsers() throws Exception + { + Set users =3D new HashSet(); + users.add(getUserModule().findUserByUserName("jduke3")); + users.add(getUserModule().findUserByUserName("jduke4")); + LDAPRoleImpl role =3D (LDAPRoleImpl)getRoleModule().findRoleByName("= Echo1"); + getMembershipModule().assignUsers(role,users); + + users =3D getMembershipModule().getUsers(role); + + assertEquals(2, users.size()); + + List names =3D new LinkedList(); + + for (Iterator iterator =3D users.iterator(); iterator.hasNext();) + { + LDAPUserImpl user =3D (LDAPUserImpl)iterator.next(); + names.add(user.getDn().toLowerCase()); + } + + assertTrue(names.contains((userPrefix + "=3Djduke3,ou=3DPeople,o=3De= xample2," + suffix).toLowerCase())); + assertTrue(names.contains((userPrefix + "=3Djduke4,ou=3DPeople,o=3De= xample2," + suffix).toLowerCase())); + + getMembershipModule().assignUsers(role,new HashSet()); + users =3D getMembershipModule().getUsers(role); + + assertEquals(0, users.size()); + } +} Deleted: modules/identity/trunk/identity/src/main/org/jboss/portal/test/ide= ntity/ldap/LDAPStaticRoleMembershipModuleTestCase.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/identity/trunk/identity/src/main/org/jboss/portal/test/identity= /ldap/LDAPStaticRoleMembershipModuleTestCase.java 2007-10-17 11:11:09 UTC (= rev 8674) +++ modules/identity/trunk/identity/src/main/org/jboss/portal/test/identity= /ldap/LDAPStaticRoleMembershipModuleTestCase.java 2007-10-17 13:05:03 UTC (= rev 8675) @@ -1,295 +0,0 @@ -/* -* JBoss, a division of Red Hat -* Copyright 2006, Red Hat Middleware, LLC, and individual contributors as = indicated -* by the @authors tag. See the copyright.txt in the distribution for a -* full listing of individual contributors. -* -* This is free software; you can redistribute it and/or modify it -* under the terms of the GNU Lesser General Public License as -* published by the Free Software Foundation; either version 2.1 of -* the License, or (at your option) any later version. -* -* This software is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -* Lesser General Public License for more details. -* -* You should have received a copy of the GNU Lesser General Public -* License along with this software; if not, write to the Free -* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA -* 02110-1301 USA, or see the FSF site: http://www.fsf.org. -*/ -package org.jboss.portal.test.identity.ldap; - -import junit.framework.TestSuite; -import org.jboss.portal.identity.UserModule; -import org.jboss.portal.identity.RoleModule; -import org.jboss.portal.identity.MembershipModule; -import org.jboss.portal.identity.IdentityConfiguration; -import org.jboss.portal.identity.IdentityContext; -//import org.jboss.portal.identity.IdentityServiceControllerImpl; -import org.jboss.portal.identity.service.MembershipModuleService; -import org.jboss.portal.identity.ldap.LDAPRoleImpl; -import org.jboss.portal.identity.ldap.LDAPUserImpl; -import org.jboss.portal.identity.ldap.LDAPStaticRoleMembershipModuleImpl; -import org.jboss.portal.test.identity.TestServiceLoader; - - -import java.util.Set; -import java.util.List; -import java.util.LinkedList; -import java.util.Iterator; -import java.util.HashSet; - -/** - * @author Boleslaw Daw= idowicz - * @version $Revision: 1.1 $ - */ -public class LDAPStaticRoleMembershipModuleTestCase extends LDAPMembership= ModuleTestCase -{ - - private static final org.jboss.logging.Logger log =3D org.jboss.logging= .Logger.getLogger(LDAPStaticRoleMembershipModuleTestCase.class); - - public static TestSuite suite() throws Exception - { - return createTestSuite(LDAPStaticRoleMembershipModuleTestCase.class,= "directories-staticrolemembership.xml", "datasources.xml"); - } - - private UserModule userModule; - - private RoleModule roleModule; - - private MembershipModule membershipModule; - - private String suffix; - - private String prefix; - - public void setUp() throws Exception - { - super.setUp(); - -// IdentityServiceControllerImpl controller =3D new IdentityServiceCo= ntrollerImpl(); -// controller.setConfigFile(getDirectoryServerConfigParameter().getCo= nfigFile()); -// controller.setDefaultConfigFile("test/config/standardidentity-conf= ig.xml"); -// controller.setRegisterMBeans(false); -// controller.start(); -// identityContext =3D controller.getIdentityContext(); - - identityContext =3D new TestServiceLoader().loadServices("test/confi= g/standardidentity-config.xml", getDirectoryServerConfigParameter().getConf= igFile()); - = - - //swap the module for the proper one for this test - //identityContext.unregister(IdentityContext.TYPE_MEMBERSHIP_MODULE); - ((MembershipModuleService)identityContext.getObject(IdentityContext.= TYPE_MEMBERSHIP_MODULE)).stop(); - MembershipModuleService membership =3D new LDAPStaticRoleMembershipM= oduleImpl(); - membership.setIdentityContext(identityContext); - membership.setConnectionJNDIName("java:/portal/LDAPConnectionContext= "); - membership.start(); - - userModule =3D (UserModule)identityContext.getObject(IdentityContext= .TYPE_USER_MODULE); - roleModule =3D (RoleModule)identityContext.getObject(IdentityContext= .TYPE_ROLE_MODULE); - membershipModule =3D (MembershipModule)identityContext.getObject(Ide= ntityContext.TYPE_MEMBERSHIP_MODULE); - - suffix =3D getDirectoryServerConfigParameter().getCleanUpDN(); - - /*IdentityConfiguration configuration =3D (IdentityConfiguration)ide= ntityContext.getObject(IdentityContext.TYPE_IDENTITY_CONFIGURATION); - Set values =3D new HashSet(); - values.add("ou=3DRoles,o=3Dexample2," + suffix); - configuration.setValues(IdentityConfiguration.GROUP_COMMON,IdentityC= onfiguration.ROLE_CONTAINER_DN, values); - values =3D new HashSet(); - values.add("ou=3DPeople,o=3Dexample2," + suffix); - configuration.setValues(IdentityConfiguration.GROUP_COMMON, Identity= Configuration.USER_CONTAINER_DN, values); - values =3D new HashSet(); - values.add("memberOf"); - configuration.setValues(IdentityConfiguration.GROUP_COMMON,IdentityC= onfiguration.MEMBERSHIP_ATTRIBUTE_ID, values);*/ - - prefix =3D ((IdentityConfiguration)identityContext.getObject(Identit= yContext.TYPE_IDENTITY_CONFIGURATION)).getValue(IdentityConfiguration.USER_= UID_ATTRIBUTE_ID); - - - - populate(); - } - - //TODO:extend this - public void testGetUsers() throws Exception - { - LDAPRoleImpl role =3D (LDAPRoleImpl)roleModule.findRoleByName("Echo"= ); - Set users =3D membershipModule.getUsers(role); - assertEquals(3, users.size()); - - List names =3D new LinkedList(); - - for (Iterator iterator =3D users.iterator(); iterator.hasNext();) - { - LDAPUserImpl user =3D (LDAPUserImpl)iterator.next(); - names.add(user.getDn().toLowerCase()); - } - assertTrue(names.contains((prefix + "=3Djduke,ou=3DPeople,o=3Dexampl= e2," + suffix).toLowerCase())); - assertTrue(names.contains((prefix + "=3Djduke1,ou=3DPeople,o=3Dexamp= le2," + suffix).toLowerCase())); - assertTrue(names.contains((prefix + "=3Djduke2,ou=3DPeople,o=3Dexamp= le2," + suffix).toLowerCase())); - - role =3D (LDAPRoleImpl)roleModule.findRoleByName("Echo1"); - users =3D membershipModule.getUsers(role); - assertEquals(2, users.size()); - - names =3D new LinkedList(); - - for (Iterator iterator =3D users.iterator(); iterator.hasNext();) - { - LDAPUserImpl user =3D (LDAPUserImpl)iterator.next(); - names.add(user.getDn().toLowerCase()); - } - assertTrue(names.contains((prefix + "=3Djduke1,ou=3DPeople,o=3Dexamp= le2," + suffix).toLowerCase())); - assertTrue(names.contains((prefix + "=3Djduke2,ou=3DPeople,o=3Dexamp= le2," + suffix).toLowerCase())); - - role =3D (LDAPRoleImpl)roleModule.findRoleByName("TheDuke"); - users =3D membershipModule.getUsers(role); - assertEquals(1, users.size()); - - names =3D new LinkedList(); - - for (Iterator iterator =3D users.iterator(); iterator.hasNext();) - { - LDAPUserImpl user =3D (LDAPUserImpl)iterator.next(); - names.add(user.getDn().toLowerCase()); - } - assertTrue(names.contains((prefix + "=3Djduke2,ou=3DPeople,o=3Dexamp= le2," + suffix).toLowerCase())); - - role =3D (LDAPRoleImpl)roleModule.findRoleByName("EmptyRole"); - users =3D membershipModule.getUsers(role); - assertEquals(0, users.size()); - - } - - //TODO:extend this - public void testGetRoles() throws Exception - { - LDAPUserImpl user =3D (LDAPUserImpl)userModule.findUserByUserName("j= duke"); - Set roles =3D membershipModule.getRoles(user); - assertEquals(1, roles.size()); - - List roleNames =3D new LinkedList(); - - for (Iterator iterator =3D roles.iterator(); iterator.hasNext();) - { - LDAPRoleImpl role =3D (LDAPRoleImpl)iterator.next(); - roleNames.add(role.getDn().toLowerCase()); - } - assertTrue(roleNames.contains(("cn=3DEcho,ou=3DRoles,o=3Dexample2," = + suffix).toLowerCase())); - - user =3D (LDAPUserImpl)userModule.findUserByUserName("jduke1"); - roles =3D membershipModule.getRoles(user); - assertEquals(2, roles.size()); - - roleNames =3D new LinkedList(); - - for (Iterator iterator =3D roles.iterator(); iterator.hasNext();) - { - LDAPRoleImpl role =3D (LDAPRoleImpl)iterator.next(); - roleNames.add(role.getDn().toLowerCase()); - } - assertTrue(roleNames.contains(("cn=3DEcho,ou=3DRoles,o=3Dexample2," = + suffix).toLowerCase())); - assertTrue(roleNames.contains(("cn=3DEcho1,ou=3DRoles,o=3Dexample2,"= + suffix).toLowerCase())); - - user =3D (LDAPUserImpl)userModule.findUserByUserName("jduke2"); - roles =3D membershipModule.getRoles(user); - assertEquals(3, roles.size()); - - roleNames =3D new LinkedList(); - - for (Iterator iterator =3D roles.iterator(); iterator.hasNext();) - { - LDAPRoleImpl role =3D (LDAPRoleImpl)iterator.next(); - roleNames.add(role.getDn().toLowerCase()); - } - assertTrue(roleNames.contains(("cn=3DEcho,ou=3DRoles,o=3Dexample2," = + suffix).toLowerCase())); - assertTrue(roleNames.contains(("cn=3DEcho1,ou=3DRoles,o=3Dexample2,"= + suffix).toLowerCase())); - assertTrue(roleNames.contains(("cn=3DTheDuke,ou=3DRoles,o=3Dexample2= ," + suffix).toLowerCase())); - - user =3D (LDAPUserImpl)userModule.findUserByUserName("jduke3"); - roles =3D membershipModule.getRoles(user); - assertEquals(0, roles.size()); - - } - - - //TODO:extend this - public void testAssignRoles() throws Exception - { - Set roles =3D new HashSet(); - roles.add(roleModule.findRoleByName("Echo")); - roles.add(roleModule.findRoleByName("TheDuke")); - LDAPUserImpl user =3D (LDAPUserImpl)userModule.findUserByUserName("j= duke"); - LDAPUserImpl user1 =3D (LDAPUserImpl)userModule.findUserByUserName("= jduke4"); - membershipModule.assignRoles(user,roles); - membershipModule.assignRoles(user1,roles); - - roles =3D membershipModule.getRoles(user); - - assertEquals(2, roles.size()); - - List names =3D new LinkedList(); - - for (Iterator iterator =3D roles.iterator(); iterator.hasNext();) - { - LDAPRoleImpl role =3D (LDAPRoleImpl)iterator.next(); - names.add(role.getDn().toLowerCase()); - } - - assertTrue(names.contains(("cn=3DEcho,ou=3DRoles,o=3Dexample2," + su= ffix).toLowerCase())); - assertTrue(names.contains(("cn=3DTheDuke,ou=3DRoles,o=3Dexample2," += suffix).toLowerCase())); - - roles =3D membershipModule.getRoles(user1); - - assertEquals(2, roles.size()); - - names =3D new LinkedList(); - - for (Iterator iterator =3D roles.iterator(); iterator.hasNext();) - { - LDAPRoleImpl role =3D (LDAPRoleImpl)iterator.next(); - names.add(role.getDn().toLowerCase()); - } - - assertTrue(names.contains(("cn=3DEcho,ou=3DRoles,o=3Dexample2," + su= ffix).toLowerCase())); - assertTrue(names.contains(("cn=3DTheDuke,ou=3DRoles,o=3Dexample2," += suffix).toLowerCase())); - - membershipModule.assignRoles(user1,new HashSet()); - roles =3D membershipModule.getRoles(user1); - - assertEquals(0, roles.size()); - - } - - - //TODO:extend this - public void testAssignUsers() throws Exception - { - Set users =3D new HashSet(); - users.add(userModule.findUserByUserName("jduke3")); - users.add(userModule.findUserByUserName("jduke4")); - LDAPRoleImpl role =3D (LDAPRoleImpl)roleModule.findRoleByName("Echo1= "); - membershipModule.assignUsers(role,users); - - users =3D membershipModule.getUsers(role); - - assertEquals(2, users.size()); - - List names =3D new LinkedList(); - - for (Iterator iterator =3D users.iterator(); iterator.hasNext();) - { - LDAPUserImpl user =3D (LDAPUserImpl)iterator.next(); - names.add(user.getDn().toLowerCase()); - } - - assertTrue(names.contains((prefix + "=3Djduke3,ou=3DPeople,o=3Dexamp= le2," + suffix).toLowerCase())); - assertTrue(names.contains((prefix + "=3Djduke4,ou=3DPeople,o=3Dexamp= le2," + suffix).toLowerCase())); - - membershipModule.assignUsers(role,new HashSet()); - users =3D membershipModule.getUsers(role); - - assertEquals(0, users.size()); - } -} Deleted: modules/identity/trunk/identity/src/main/org/jboss/portal/test/ide= ntity/ldap/LDAPTestCase.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/identity/trunk/identity/src/main/org/jboss/portal/test/identity= /ldap/LDAPTestCase.java 2007-10-17 11:11:09 UTC (rev 8674) +++ modules/identity/trunk/identity/src/main/org/jboss/portal/test/identity= /ldap/LDAPTestCase.java 2007-10-17 13:05:03 UTC (rev 8675) @@ -1,294 +0,0 @@ -/*************************************************************************= ***** - * JBoss, a division of Red Hat = * - * Copyright 2006, Red Hat Middleware, LLC, and individual = * - * contributors as indicated by the @authors tag. See the = * - * copyright.txt in the distribution for a full listing of = * - * individual contributors. = * - * = * - * This is free software; you can redistribute it and/or modify it = * - * under the terms of the GNU Lesser General Public License as = * - * published by the Free Software Foundation; either version 2.1 of = * - * the License, or (at your option) any later version. = * - * = * - * This software is distributed in the hope that it will be useful, = * - * but WITHOUT ANY WARRANTY; without even the implied warranty of = * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU = * - * Lesser General Public License for more details. = * - * = * - * You should have received a copy of the GNU Lesser General Public = * - * License along with this software; if not, write to the Free = * - * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA = * - * 02110-1301 USA, or see the FSF site: http://www.fsf.org. = * - *************************************************************************= *****/ -package org.jboss.portal.test.identity.ldap; - -//import org.apache.directory.server.protocol.shared.store.LdifFileLoader; -import org.apache.log4j.Appender; -import org.apache.log4j.ConsoleAppender; -import org.apache.log4j.Level; -import org.apache.log4j.Logger; -import org.apache.log4j.SimpleLayout; -import org.jboss.portal.identity.IdentityContext; -import org.jboss.portal.test.framework.mc.TestRuntimeContext; -import org.jboss.portal.test.framework.embedded.DSConfig; -import org.jboss.portal.test.framework.embedded.DataSourceSupport; -import org.jboss.portal.test.framework.embedded.HibernateSupport; -import org.jboss.portal.test.framework.junit.JUnitAdapter; -import org.jboss.portal.test.framework.junit.POJOJUnitTest; -import org.opends.server.tools.LDAPModify; -//import org.jboss.portal.test.framework.embedded.apacheds.ApacheDSService; - -import javax.naming.Binding; -import javax.naming.Context; -import javax.naming.NamingEnumeration; -import javax.naming.directory.DirContext; -import javax.naming.directory.InitialDirContext; -import java.net.URL; -import java.util.Hashtable; -import java.util.Map; -import java.util.HashMap; -import java.io.File; - -import junit.framework.TestSuite; - -/** - * @author Julien Viet - * @author Bol= eslaw Dawidowicz - * @version $Revision: 5247 $ - */ -public abstract class LDAPTestCase extends junit.framework.TestCase -{ - - private static final org.jboss.logging.Logger log =3D org.jboss.logging= .Logger.getLogger(LDAPTestCase.class); - - static - { - Appender appender =3D new ConsoleAppender(new SimpleLayout()); - Logger.getRoot().addAppender(appender); - Logger.getRoot().setLevel(Level.INFO); - Logger.getLogger("org.jboss.portal.identity").setLevel(Level.DEBUG); - } - - public static TestSuite createTestSuite(Class clazz, String directories= , String datasources) throws Exception - { - URL directoriesURL =3D Thread.currentThread().getContextClassLoader(= ).getResource(directories); - URL datasourcesURL =3D Thread.currentThread().getContextClassLoader(= ).getResource(datasources); - Map parameterMap =3D new HashMap(); - parameterMap.put("DirectoryServerConfig", DSConfig.fromXML2(director= iesURL)); - parameterMap.put("DataSourceConfig", DataSourceSupport.Config.fromXM= L2(datasourcesURL)); - POJOJUnitTest abc =3D new POJOJUnitTest(clazz); - JUnitAdapter adapter =3D new JUnitAdapter(abc, parameterMap); - TestSuite suite =3D new TestSuite(); - suite.addTest(adapter); - return suite; - } - - public static TestSuite createTestSuite(Class clazz) throws Exception - { - return createTestSuite(clazz, "directories.xml", "datasources.xml"); - } - - public LDAPTestCase() - { - - } - - public LDAPTestCase(DSConfig dsConfig) - { - this.directoryServerConfigParameter =3D dsConfig; - } - - protected TestRuntimeContext runtimeContext; - - protected IdentityContext identityContext; - - private DSConfig directoryServerConfigParameter; - - protected DataSourceSupport.Config dataSourceConfigParameter; - //protected OpenDSService embeddedDSService; - - protected HibernateSupport hibernate; - - public String getName() - { - return super.getName() + "," + directoryServerConfigParameter.getNam= e() + "," + directoryServerConfigParameter.getDescription(); - } - - public DSConfig getDirectoryServerConfigParameter() - { - return directoryServerConfigParameter; - } - - public void setDirectoryServerConfigParameter(DSConfig directoryServerC= onfigParameter) - { - this.directoryServerConfigParameter =3D directoryServerConfigParamet= er; - } - - public DataSourceSupport.Config getDataSourceConfigParameter() - { - return dataSourceConfigParameter; - } - - public void setDataSourceConfigParameter(DataSourceSupport.Config dataS= ourceConfig) - { - this.dataSourceConfigParameter =3D dataSourceConfig; - } - - public void setUp() throws Exception - { - hibernate =3D new HibernateSupport(); - - runtimeContext =3D new TestRuntimeContext("org/jboss/portal/test/ide= ntity/ldap-beans.xml"); - runtimeContext.addBean("LDAPTestBean", this); - - runtimeContext.addBean("HibernateSupport", hibernate); - runtimeContext.addBean("DataSourceConfig", dataSourceConfigParameter= ); - HibernateSupport.Config config =3D HibernateSupport.getConfig(dataSo= urceConfigParameter.getName()); - runtimeContext.addBean("HibernateConfig", config); - runtimeContext.start(); - - runtimeContext.start(); - - //populate(); - } - - public void tearDown() throws Exception - { - - //on exit remove dc=3Djboss,dc=3Dorg - cleanUp(); - - runtimeContext.stop(); - - /*if (embeddedDSService !=3D null && directoryServerConfigParameter.= isUseEmbedded()) - { - embeddedDSService.stop(); - }*/ - } - - - public void begin() - { - hibernate.openSession(); - } - - - public void commit() - { - assertTrue(hibernate.commitTransaction()); - } - - protected void populate() - { - try - { - //on start load the content into ldap - log.info("Populate directory..."); - - DirContext ctx =3D getDirContext(); - ClassLoader tcl =3D Thread.currentThread().getContextClassLoader(= ); - - //URL ldif =3D tcl.getResource("ldap/ldif/example1.ldif"); - URL ldif =3D tcl.getResource(directoryServerConfigParameter.getPo= pulateLdif()); - - if (ldif =3D=3D null) - { - log.error("ldif not found: " + directoryServerConfigParameter.= getPopulateLdif()); - } - log.info("ldif to load by loader: " + ldif.getPath()); - - /* LdifFileLoader loader =3D new LdifFileLoader(ctx, ldi+f.getPat= h()); - loader.execute();*/ - - //String fileurl =3D this.getResourceURL("security/opends/ldif/ex= ample1.ldif"); - //URL url =3D this.getDeployURL(fileurl); - log.debug("ldap add ldif url=3D"+ldif); - File file =3D new File(ldif.getPath()); - String[] cmd =3D new String[] {"-h", directoryServerConfigParamet= er.getHost(), - "-p", directoryServerConfigParameter.getPort(), - "-D", directoryServerConfigParameter.getAdminDN(), - "-w", directoryServerConfigParameter.getAdminPassword(), - "-a", "-f",file.getPath()}; - - System.out.println("Populate success: :" + (LDAPModify.mainModify= (cmd) =3D=3D 0)); - } - catch (Exception e) - { - log.info("fail to import initial ldif for tests", e); - } - } - - protected void cleanUp() - { - try - { - log.info("Cleanup directory..."); - DirContext ctx =3D getDirContext(); - String fullDN =3D directoryServerConfigParameter.getCleanUpDN(); - //String[] parts =3D fullDN.split(","); - - String removeContext =3D fullDN; - - String suffix =3D fullDN.substring(fullDN.indexOf(",")+1,fullDN.l= ength()); - - log.debug("Clean up: \'" + removeContext + "\' from \'" + suffix = + "\'"); - - - DirContext org =3D ctx; - - - removeContext(org, removeContext); - } - catch (Exception e) - { - log.info("fail to unbind content from tests", e); - } - } - - - protected DirContext getDirContext() throws Exception - { - Hashtable env =3D new Hashtable(); - env.put(Context.INITIAL_CONTEXT_FACTORY, directoryServerConfigParame= ter.getContextFactory()); - - env.put(Context.PROVIDER_URL, directoryServerConfigParameter.getURL(= )); - //env.put(Context.SECURITY_AUTHENTICATION, "simple"); - env.put(Context.SECURITY_PRINCIPAL, directoryServerConfigParameter.g= etAdminDN()); - env.put(Context.SECURITY_CREDENTIALS, directoryServerConfigParameter= .getAdminPassword()); - return new InitialDirContext(env); - } - - //subsequent remove of javax.naming.Context - protected void removeContext(Context mainCtx, String name) throws Excep= tion - { - Context deleteCtx =3D (Context)mainCtx.lookup(name); - NamingEnumeration subDirs =3D mainCtx.listBindings(name); - - while (subDirs.hasMoreElements()) - { - Binding binding =3D (Binding)subDirs.nextElement(); - String subName =3D binding.getName(); - - removeContext(deleteCtx, subName); - } - - mainCtx.unbind(name); - } - - /*public LDAPConnectionContext createConnectionContext() - { - *//*return new LDAPConnectionContext(directoryServerConfigParameter.= getName(), - directoryServerConfigParameter.getURL(), - directoryServerConfigParameter.getContextFactory(), - directoryServerConfigParameter.getAdminDN(), - directoryServerConfigParameter.getAdminPassword(), - null, - "simple");*//* - LDAPConnectionContext conn =3D new LDAPConnectionContext(); - conn.setIdentityContext(identityContext); - - = - }*/ - - -} Copied: modules/identity/trunk/identity/src/main/org/jboss/portal/test/iden= tity/ldap/LDAPTestPOJO.java (from rev 8668, modules/identity/trunk/identity= /src/main/org/jboss/portal/test/identity/ldap/LDAPTestCase.java) =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/identity/trunk/identity/src/main/org/jboss/portal/test/identity= /ldap/LDAPTestPOJO.java (rev 0) +++ modules/identity/trunk/identity/src/main/org/jboss/portal/test/identity= /ldap/LDAPTestPOJO.java 2007-10-17 13:05:03 UTC (rev 8675) @@ -0,0 +1,231 @@ +/*************************************************************************= ***** + * JBoss, a division of Red Hat = * + * Copyright 2006, Red Hat Middleware, LLC, and individual = * + * contributors as indicated by the @authors tag. See the = * + * copyright.txt in the distribution for a full listing of = * + * individual contributors. = * + * = * + * This is free software; you can redistribute it and/or modify it = * + * under the terms of the GNU Lesser General Public License as = * + * published by the Free Software Foundation; either version 2.1 of = * + * the License, or (at your option) any later version. = * + * = * + * This software is distributed in the hope that it will be useful, = * + * but WITHOUT ANY WARRANTY; without even the implied warranty of = * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU = * + * Lesser General Public License for more details. = * + * = * + * You should have received a copy of the GNU Lesser General Public = * + * License along with this software; if not, write to the Free = * + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA = * + * 02110-1301 USA, or see the FSF site: http://www.fsf.org. = * + *************************************************************************= *****/ +package org.jboss.portal.test.identity.ldap; + +import org.jboss.beans.metadata.plugins.annotations.Inject; +import org.jboss.portal.test.framework.embedded.DSConfig; +import org.jboss.portal.test.identity.IdentityTestPOJO; +import org.jboss.portal.identity.IdentityConfiguration; +import org.jboss.portal.identity.IdentityContext; +import org.jboss.unit.api.pojo.annotations.Parameter; +import org.jboss.unit.api.pojo.annotations.Create; +import org.jboss.unit.api.pojo.annotations.Destroy; +import org.opends.server.tools.LDAPModify; + +import javax.naming.Binding; +import javax.naming.Context; +import javax.naming.NamingEnumeration; +import javax.naming.directory.DirContext; +import javax.naming.directory.InitialDirContext; +import java.io.File; +import java.net.URL; +import java.util.Hashtable; + +/** + * @author Julien Viet + * @author Bol= eslaw Dawidowicz + * @version $Revision: 5247 $ + */ + +public abstract class LDAPTestPOJO extends IdentityTestPOJO +{ + + private static final org.jboss.logging.Logger log =3D org.jboss.logging= .Logger.getLogger(LDAPTestPOJO.class); + + protected DSConfig directoryConfig; + + private String directories; + + private String directoryName; + + protected String suffix; + + protected String userPrefix; + + + + + @Create + public void create() throws Exception + { + suffix =3D getDirectoryConfig().getCleanUpDN(); + userPrefix =3D ((IdentityConfiguration)getIdentityContext().getObjec= t(IdentityContext.TYPE_IDENTITY_CONFIGURATION)).getValue(IdentityConfigurat= ion.USER_UID_ATTRIBUTE_ID); + + populate(); + } + + @Destroy + public void cleanup() + { + cleanUp(); + } + + @Parameter(name =3D "directories") + public void setDirectories(String directories) + { + this.directories =3D directories; + } + + @Parameter(name=3D"directoryName") + public void setDirectoryName(String directoryName) + { + this.directoryName =3D directoryName; + } + + @Inject(bean =3D "DirectoryConfig") + public void setDirectoryConfig(DSConfig directoryConfig) + { + this.directoryConfig =3D directoryConfig; + } + + public DSConfig getDirectoryConfig() + { + return directoryConfig; + } + + public String getDirectories() + { + return directories; + } + + public String getDirectoryName() + { + return directoryName; + } + + + protected void populate() + { + try + { + //on start load the content into ldap + log.info("Populate directory..."); + + DirContext ctx =3D getDirContext(); + ClassLoader tcl =3D Thread.currentThread().getContextClassLoader(= ); + + //URL ldif =3D tcl.getResource("ldap/ldif/example1.ldif"); + + URL ldif =3D tcl.getResource(getDirectoryConfig().getPopulateLdif= ()); + + if (ldif =3D=3D null) + { + log.error("ldif not found: " + getDirectoryConfig().getPopulat= eLdif()); + } + System.out.println("ldif to load by loader: " + ldif.getPath()); + + /* LdifFileLoader loader =3D new LdifFileLoader(ctx, ldi+f.getPat= h()); + loader.execute();*/ + + //String fileurl =3D this.getResourceURL("security/opends/ldif/ex= ample1.ldif"); + //URL url =3D this.getDeployURL(fileurl); + log.debug("ldap add ldif url=3D"+ldif); + File file =3D new File(ldif.getPath()); + String[] cmd =3D new String[] {"-h", getDirectoryConfig().getHost= (), + "-p", getDirectoryConfig().getPort(), + "-D", getDirectoryConfig().getAdminDN(), + "-w", getDirectoryConfig().getAdminPassword(), + "-a", "-f",file.getPath()}; + + System.out.println("Populate success: :" + (LDAPModify.mainModify= (cmd) =3D=3D 0)); + } + catch (Exception e) + { + log.info("fail to import initial ldif for tests", e); + } + } + + protected void cleanUp() + { + try + { + log.info("Cleanup directory..."); + DirContext ctx =3D getDirContext(); + String fullDN =3D getDirectoryConfig().getCleanUpDN(); + //String[] parts =3D fullDN.split(","); + + String removeContext =3D fullDN; + + String suffix =3D fullDN.substring(fullDN.indexOf(",")+1,fullDN.l= ength()); + + log.debug("Clean up: \'" + removeContext + "\' from \'" + suffix = + "\'"); + + + DirContext org =3D ctx; + + + removeContext(org, removeContext); + } + catch (Exception e) + { + log.info("fail to unbind content from tests", e); + } + } + + + protected DirContext getDirContext() throws Exception + { + Hashtable env =3D new Hashtable(); + env.put(Context.INITIAL_CONTEXT_FACTORY, getDirectoryConfig().getCon= textFactory()); + + env.put(Context.PROVIDER_URL, getDirectoryConfig().getURL()); + //env.put(Context.SECURITY_AUTHENTICATION, "simple"); + env.put(Context.SECURITY_PRINCIPAL, getDirectoryConfig().getAdminDN(= )); + env.put(Context.SECURITY_CREDENTIALS, getDirectoryConfig().getAdminP= assword()); + return new InitialDirContext(env); + } + + //subsequent remove of javax.naming.Context + protected void removeContext(Context mainCtx, String name) throws Excep= tion + { + Context deleteCtx =3D (Context)mainCtx.lookup(name); + NamingEnumeration subDirs =3D mainCtx.listBindings(name); + + while (subDirs.hasMoreElements()) + { + Binding binding =3D (Binding)subDirs.nextElement(); + String subName =3D binding.getName(); + + removeContext(deleteCtx, subName); + } + + mainCtx.unbind(name); + } + + /*public LDAPConnectionContext createConnectionContext() + { + *//*return new LDAPConnectionContext(getDirectoryConfig().getName(), + getDirectoryConfig().getURL(), + getDirectoryConfig().getContextFactory(), + getDirectoryConfig().getAdminDN(), + getDirectoryConfig().getAdminPassword(), + null, + "simple");*//* + LDAPConnectionContext conn =3D new LDAPConnectionContext(); + conn.setIdentityContext(identityContext); + + + }*/ + + +} Modified: modules/identity/trunk/identity/src/main/org/jboss/portal/test/id= entity/ldap/LDAPUserProfileModuleTestCase.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/identity/trunk/identity/src/main/org/jboss/portal/test/identity= /ldap/LDAPUserProfileModuleTestCase.java 2007-10-17 11:11:09 UTC (rev 8674) +++ modules/identity/trunk/identity/src/main/org/jboss/portal/test/identity= /ldap/LDAPUserProfileModuleTestCase.java 2007-10-17 13:05:03 UTC (rev 8675) @@ -21,81 +21,56 @@ */ package org.jboss.portal.test.identity.ldap; = -import junit.framework.TestSuite; import org.jboss.portal.identity.UserModule; import org.jboss.portal.identity.RoleModule; import org.jboss.portal.identity.MembershipModule; -//import org.jboss.portal.identity.IdentityServiceControllerImpl; -import org.jboss.portal.identity.IdentityContext; import org.jboss.portal.identity.UserProfileModule; import org.jboss.portal.identity.User; import org.jboss.portal.identity.ldap.LDAPUserImpl; -import org.jboss.portal.test.identity.TestServiceLoader; +import static org.jboss.unit.api.Assert.*; +import org.jboss.unit.api.pojo.annotations.Test; +import org.jboss.unit.api.pojo.annotations.Tag; +import org.jboss.unit.mc.api.annotations.Bootstrap; = + /** * @author Boleslaw Daw= idowicz * @version $Revision: 1.1 $ */ -public class LDAPUserProfileModuleTestCase extends LDAPTestCase +(a)Bootstrap(resourceName =3D "/org/jboss/portal/test/identity/ldap-beans.= xml") +(a)Tag(value =3D {"LDAP","UserProfileModule"}) +public class LDAPUserProfileModuleTestCase extends LDAPTestPOJO { = private static final org.jboss.logging.Logger log =3D org.jboss.logging= .Logger.getLogger(LDAPUserProfileModuleTestCase.class); = - public static TestSuite suite() throws Exception + public void begin() { - return createTestSuite(LDAPUserProfileModuleTestCase.class, "directo= ries-userprofilemodule.xml", "datasources.xml"); + getHibernateSupport().openSession(); } = - private UserModule userModule; - - private RoleModule roleModule; - - private MembershipModule membershipModule; - - private UserProfileModule userProfileModule; - - private String suffix; - - public void setUp() throws Exception + public void commit() { - super.setUp(); - -// IdentityServiceControllerImpl controller =3D new IdentityServiceCo= ntrollerImpl(); -// controller.setConfigFile(getDirectoryServerConfigParameter().getCo= nfigFile()); -// controller.setDefaultConfigFile("test/config/standardidentity-conf= ig.xml"); -// controller.setRegisterMBeans(false); -// controller.start(); -// identityContext =3D controller.getIdentityContext(); - - identityContext =3D new TestServiceLoader().loadServices("test/confi= g/standardidentity-config.xml", getDirectoryServerConfigParameter().getConf= igFile()); - = - userModule =3D (UserModule)identityContext.getObject(IdentityContext= .TYPE_USER_MODULE); - roleModule =3D (RoleModule)identityContext.getObject(IdentityContext= .TYPE_ROLE_MODULE); - membershipModule =3D (MembershipModule)identityContext.getObject(Ide= ntityContext.TYPE_MEMBERSHIP_MODULE); - userProfileModule =3D (UserProfileModule)identityContext.getObject(I= dentityContext.TYPE_USER_PROFILE_MODULE); - - suffix =3D getDirectoryServerConfigParameter().getCleanUpDN(); - - - populate(); + assertTrue(getHibernateSupport().commitTransaction()); } = + @Test public void testSetPropertyWithDB() throws Exception { begin(); - LDAPUserImpl ldapu =3D (LDAPUserImpl)userModule.findUserByUserName("= jduke"); - assertEquals("email(a)email.com", userProfileModule.getProperty(ldap= u, User.INFO_USER_EMAIL_REAL)); - userProfileModule.setProperty(ldapu, User.INFO_USER_EMAIL_REAL, "tot= o(a)toto.com"); - assertEquals("toto(a)toto.com", userProfileModule.getProperty(ldapu,= User.INFO_USER_EMAIL_REAL)); + LDAPUserImpl ldapu =3D (LDAPUserImpl)getUserModule().findUserByUserN= ame("jduke"); + assertEquals("email(a)email.com", getUserProfileModule().getProperty= (ldapu, User.INFO_USER_EMAIL_REAL)); + getUserProfileModule().setProperty(ldapu, User.INFO_USER_EMAIL_REAL,= "toto(a)toto.com"); + assertEquals("toto(a)toto.com", getUserProfileModule().getProperty(l= dapu, User.INFO_USER_EMAIL_REAL)); = -// userProfileModule.setProperty(ldapu, User.INFO_USER_SIGNATURE, "si= g sig"); -// assertEquals("sig sig", userProfileModule.getProperty(ldapu, User.= INFO_USER_SIGNATURE)); +// ctx.getUserProfileModule().setProperty(ldapu, User.INFO_USER_SIGNA= TURE, "sig sig"); +// assertEquals("sig sig", ctx.getUserProfileModule().getProperty(lda= pu, User.INFO_USER_SIGNATURE)); = - userProfileModule.setProperty(ldapu, User.INFO_USER_IM_SKYPE, "skype= me"); - assertEquals("skype me", userProfileModule.getProperty(ldapu, User.I= NFO_USER_IM_SKYPE)); + getUserProfileModule().setProperty(ldapu, User.INFO_USER_IM_SKYPE, "= skype me"); + assertEquals("skype me", getUserProfileModule().getProperty(ldapu, U= ser.INFO_USER_IM_SKYPE)); = - userProfileModule.setProperty(ldapu, User.INFO_USER_OCCUPATION, "kra= wiec"); - assertEquals("krawiec", userProfileModule.getProperty(ldapu, User.IN= FO_USER_OCCUPATION)); + getUserProfileModule().setProperty(ldapu, User.INFO_USER_OCCUPATION,= "krawiec"); + assertEquals("krawiec", getUserProfileModule().getProperty(ldapu, Us= er.INFO_USER_OCCUPATION)); commit(); } = Added: modules/identity/trunk/identity/src/resources/log4j.properties =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/identity/trunk/identity/src/resources/log4j.properties = (rev 0) +++ modules/identity/trunk/identity/src/resources/log4j.properties 2007-10-= 17 13:05:03 UTC (rev 8675) @@ -0,0 +1,10 @@ +# Set root category priority to INFO and its only appender to CONSOLE. +log4j.rootCategory=3DINFO +#log4j.rootCategory=3DINFO, CONSOLE, LOGFILE + +# CONSOLE is set to be a ConsoleAppender using a PatternLayout. +log4j.appender.CONSOLE=3Dorg.apache.log4j.ConsoleAppender +log4j.appender.CONSOLE.Threshold=3DINFO +log4j.appender.CONSOLE.layout=3Dorg.apache.log4j.PatternLayout +log4j.appender.CONSOLE.layout.ConversionPattern=3D- %m%n + Modified: modules/identity/trunk/identity/src/resources/portal-identity-tes= t-jar/org/jboss/portal/test/identity/db-beans.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/identity/trunk/identity/src/resources/portal-identity-test-jar/= org/jboss/portal/test/identity/db-beans.xml 2007-10-17 11:11:09 UTC (rev 86= 74) +++ modules/identity/trunk/identity/src/resources/portal-identity-test-jar/= org/jboss/portal/test/identity/db-beans.xml 2007-10-17 13:05:03 UTC (rev 86= 75) @@ -27,17 +27,18 @@ xsi:schemaLocation=3D"urn:jboss:bean-deployer bean-deployer_1_= 0.xsd" xmlns=3D"urn:jboss:bean-deployer"> = + + - - - DataSourceConfig + + + = - - - HibernateConfig + + = @@ -58,26 +59,56 @@ = - - - HibernateSupport - - java:/portal/IdentitySessionFactory + java:/portal/IdentitySessionFactory domain-identity.hbm.xml - = - - - - DBTestBean + + JNDISupport + HibernateSupport + DataSourceSupport + + + + + + + - = + + + + User + + + + + + + Role + + + + + + + Membership + + + + + + + UserProfile + + + + Modified: modules/identity/trunk/identity/src/resources/portal-identity-tes= t-jar/org/jboss/portal/test/identity/ldap-beans.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/identity/trunk/identity/src/resources/portal-identity-test-jar/= org/jboss/portal/test/identity/ldap-beans.xml 2007-10-17 11:11:09 UTC (rev = 8674) +++ modules/identity/trunk/identity/src/resources/portal-identity-test-jar/= org/jboss/portal/test/identity/ldap-beans.xml 2007-10-17 13:05:03 UTC (rev = 8675) @@ -27,17 +27,25 @@ xsi:schemaLocation=3D"urn:jboss:bean-deployer bean-deployer_1_= 0.xsd" xmlns=3D"urn:jboss:bean-deployer"> = + + - - - DataSourceConfig + + + = + + + + + + + - - - HibernateConfig + + = @@ -58,26 +66,56 @@ = - - - HibernateSupport - - java:/portal/IdentitySessionFactory + java:/portal/IdentitySessionFactory domain-identity.hbm.xml - = + + JNDISupport + HibernateSupport + DataSourceSupport + = - - - - LDAPTestBean + + + + + = + + + + User + + + + + + + Role + + + + + + + Membership + + + + + + + UserProfile + + + + Modified: modules/identity/trunk/identity/src/resources/test/config/standar= didentity-config.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/identity/trunk/identity/src/resources/test/config/standardident= ity-config.xml 2007-10-17 11:11:09 UTC (rev 8674) +++ modules/identity/trunk/identity/src/resources/test/config/standardident= ity-config.xml 2007-10-17 13:05:03 UTC (rev 8675) @@ -56,7 +56,7 @@ password @@ -75,7 +75,7 @@ @@ -129,7 +129,7 @@ java:/portal/IdentitySessionFactory @@ -151,7 +151,7 @@ java:/portal/IdentitySessionFactory @@ -173,7 +173,7 @@ java:/portal/IdentitySessionFactory = @@ -192,7 +192,7 @@

- * EasySSLProtocolSocketFactory can be used to creats SSL {@link Socket}s = that - * accept self-signed certificates. - *

- *

- * This socket factory SHOULD NOT be used for productive systems due to se= curity - * reasons, unless it is a concious decision and you are perfectly aware of - * security implications of accepting self-signed certificates - *

- * = - *

- * Example of using custom protocol socket factory for a specific host: - * = - *

- * Protocol easyhttps =3D new Protocol("https", new EasySSLProto=
colSocketFactory(),
- *       443);
- * HttpClient client =3D new HttpClient();
- * client.getHostConfiguration().setHost("localhost", 443, easyh=
ttps);
- * // use relative url only
- * GetMethod httpget =3D new GetMethod("/");
- * client.executeMethod(httpget);
- * 
- * = - *

- *

- * Example of using custom protocol socket factory per default instead of = the - * standard one: - * = - *

- * Protocol easyhttps =3D new Protocol("https", new EasySSLProto=
colSocketFactory(),
- *       443);
- * Protocol.registerProtocol("https", easyhttps);
- * HttpClient client =3D new HttpClient();
- * GetMethod httpget =3D new GetMethod("https://localhost/");
- * client.executeMethod(httpget);
- * 
- * = - *

- * = - * @author Oleg Kalnichevski - * = - *

- * DISCLAIMER: HttpClient developers DO NOT actively support this componen= t. The - * component is provided as a reference material, which may be inappropria= te for - * use without additional customization. - *

- */ - -public class EasySSLProtocolSocketFactory implements - SecureProtocolSocketFactory -{ - - private SSLContext sslcontext =3D null; - - /** - * Constructor for EasySSLProtocolSocketFactory. - */ - public EasySSLProtocolSocketFactory() - { - super(); - } - - private static SSLContext createEasySSLContext() - { - try - { - SSLContext context =3D SSLContext.getInstance("SSL"); - context.init(null, new TrustManager[] - { new EasyX509TrustManager(null) }, null); - return context; - } - catch (Exception e) - { - throw new HttpClientError(e.toString()); - } - } - - private SSLContext getSSLContext() - { - if (this.sslcontext =3D=3D null) - { - this.sslcontext =3D createEasySSLContext(); - } - return this.sslcontext; - } - - /** - * @see SecureProtocolSocketFactory#createSocket(java.lang.String,int,j= ava.net.InetAddress,int) - */ - public Socket createSocket(String host, int port, InetAddress clientHos= t, - int clientPort) throws IOException, UnknownHostException - { - - return getSSLContext().getSocketFactory().createSocket(host, port, - clientHost, clientPort); - } - - /** - * Attempts to get a new socket connection to the given host within the= given - * time limit. - *

- * To circumvent the limitations of older JREs that do not support conn= ect - * timeout a controller thread is executed. The controller thread attem= pts to - * create a new socket within the given limit of time. If socket constr= uctor - * does not return until the timeout expires, the controller terminates= and - * throws an {@link ConnectTimeoutException} - *

- * = - * @param host - * the host name/IP - * @param port - * the port on the host - * @param clientHost - * the local host name/IP to bind the socket to - * @param clientPort - * the port on the local machine - * @param params - * {@link HttpConnectionParams Http connection parameters} - * = - * @return Socket a new socket - * = - * @throws IOException - * if an I/O error occurs while creating the socket - * @throws UnknownHostException - * if the IP address of the host cannot be determined - */ - public Socket createSocket(final String host, final int port, - final InetAddress localAddress, final int localPort, - final HttpConnectionParams params) throws IOException, - UnknownHostException, ConnectTimeoutException - { - if (params =3D=3D null) - { - throw new IllegalArgumentException("Parameters may not be null"); - } - int timeout =3D params.getConnectionTimeout(); - SocketFactory socketfactory =3D getSSLContext().getSocketFactory(); - if (timeout =3D=3D 0) - { - return socketfactory.createSocket(host, port, localAddress, local= Port); - } - else - { - Socket socket =3D socketfactory.createSocket(); - SocketAddress localaddr =3D new InetSocketAddress(localAddress, - localPort); - SocketAddress remoteaddr =3D new InetSocketAddress(host, port); - socket.bind(localaddr); - socket.connect(remoteaddr, timeout); - return socket; - } - } - - /** - * @see SecureProtocolSocketFactory#createSocket(java.lang.String,int) - */ - public Socket createSocket(String host, int port) throws IOException, - UnknownHostException - { - return getSSLContext().getSocketFactory().createSocket(host, port); - } - - /** - * @see SecureProtocolSocketFactory#createSocket(java.net.Socket,java.l= ang.String,int,boolean) - */ - public Socket createSocket(Socket socket, String host, int port, - boolean autoClose) throws IOException, UnknownHostException - { - return getSSLContext().getSocketFactory().createSocket(socket, host, - port, autoClose); - } - - public boolean equals(Object obj) - { - return ((obj !=3D null) && obj.getClass().equals( - EasySSLProtocolSocketFactory.class)); - } - - public int hashCode() - { - return EasySSLProtocolSocketFactory.class.hashCode(); - } - -} +///* +// * $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/j= akarta-commons//httpclient/src/contrib/org/apache/commons/httpclient/contri= b/ssl/EasySSLProtocolSocketFactory.java,v 1.7 2004/06/11 19:26:27 olegk Exp= $ +// * $Revision$ +// * $Date$ +// * +// * =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D +// * +// * Licensed to the Apache Software Foundation (ASF) under one or more +// * contributor license agreements. See the NOTICE file distributed with +// * this work for additional information regarding copyright ownership. +// * The ASF licenses this file to You under the Apache License, Version = 2.0 +// * (the "License"); you may not use this file except in compliance with +// * the License. You may obtain a copy of the License at +// * +// * http://www.apache.org/licenses/LICENSE-2.0 +// * +// * Unless required by applicable law or agreed to in writing, software +// * distributed under the License is distributed on an "AS IS" BASIS, +// * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or impl= ied. +// * See the License for the specific language governing permissions and +// * limitations under the License. +// * =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D +// * +// * This software consists of voluntary contributions made by many +// * individuals on behalf of the Apache Software Foundation. For more +// * information on the Apache Software Foundation, please see +// * . +// * +// */ +// +//package org.jboss.portal.test.identity.sso; +// +//import java.io.IOException; +//import java.net.InetAddress; +//import java.net.InetSocketAddress; +//import java.net.Socket; +//import java.net.SocketAddress; +//import java.net.UnknownHostException; +// +//import org.apache.commons.httpclient.ConnectTimeoutException; +//import org.apache.commons.httpclient.HttpClientError; +//import org.apache.commons.httpclient.params.HttpConnectionParams; +//import org.apache.commons.httpclient.protocol.SecureProtocolSocketFactor= y; +// +//import javax.net.SocketFactory; +//import javax.net.ssl.SSLContext; +//import javax.net.ssl.TrustManager; +// +///** +// *

+// * EasySSLProtocolSocketFactory can be used to creats SSL {@link Socket}= s that +// * accept self-signed certificates. +// *

+// *

+// * This socket factory SHOULD NOT be used for productive systems due to = security +// * reasons, unless it is a concious decision and you are perfectly aware= of +// * security implications of accepting self-signed certificates +// *

+// * +// *

+// * Example of using custom protocol socket factory for a specific host: +// * +// *

+// * Protocol easyhttps =3D new Protocol("https", new EasySSLPro=
tocolSocketFactory(),
+// *       443);
+// * HttpClient client =3D new HttpClient();
+// * client.getHostConfiguration().setHost("localhost", 443, eas=
yhttps);
+// * // use relative url only
+// * GetMethod httpget =3D new GetMethod("/");
+// * client.executeMethod(httpget);
+// * 
+// * +// *

+// *

+// * Example of using custom protocol socket factory per default instead o= f the +// * standard one: +// * +// *

+// * Protocol easyhttps =3D new Protocol("https", new EasySSLPro=
tocolSocketFactory(),
+// *       443);
+// * Protocol.registerProtocol("https", easyhttps);
+// * HttpClient client =3D new HttpClient();
+// * GetMethod httpget =3D new GetMethod("https://localhost/");
+// * client.executeMethod(httpget);
+// * 
+// * +// *

+// * +// * @author Oleg Kalnichevski +// * +// *

+// * DISCLAIMER: HttpClient developers DO NOT actively support this compon= ent. The +// * component is provided as a reference material, which may be inappropr= iate for +// * use without additional customization. +// *

+// */ +// +//public class EasySSLProtocolSocketFactory implements +// SecureProtocolSocketFactory +//{ +// +// private SSLContext sslcontext =3D null; +// +// /** +// * Constructor for EasySSLProtocolSocketFactory. +// */ +// public EasySSLProtocolSocketFactory() +// { +// super(); +// } +// +// private static SSLContext createEasySSLContext() +// { +// try +// { +// SSLContext context =3D SSLContext.getInstance("SSL"); +// context.init(null, new TrustManager[] +// { new EasyX509TrustManager(null) }, null); +// return context; +// } +// catch (Exception e) +// { +// throw new HttpClientError(e.toString()); +// } +// } +// +// private SSLContext getSSLContext() +// { +// if (this.sslcontext =3D=3D null) +// { +// this.sslcontext =3D createEasySSLContext(); +// } +// return this.sslcontext; +// } +// +// /** +// * @see SecureProtocolSocketFactory#createSocket(java.lang.String,int= ,java.net.InetAddress,int) +// */ +// public Socket createSocket(String host, int port, InetAddress clientH= ost, +// int clientPort) throws IOException, UnknownHostException +// { +// +// return getSSLContext().getSocketFactory().createSocket(host, port, +// clientHost, clientPort); +// } +// +// /** +// * Attempts to get a new socket connection to the given host within t= he given +// * time limit. +// *

+// * To circumvent the limitations of older JREs that do not support co= nnect +// * timeout a controller thread is executed. The controller thread att= empts to +// * create a new socket within the given limit of time. If socket cons= tructor +// * does not return until the timeout expires, the controller terminat= es and +// * throws an {@link ConnectTimeoutException} +// *

+// * +// * @param host +// * the host name/IP +// * @param port +// * the port on the host +// * @param clientHost +// * the local host name/IP to bind the socket to +// * @param clientPort +// * the port on the local machine +// * @param params +// * {@link HttpConnectionParams Http connection parameters} +// * +// * @return Socket a new socket +// * +// * @throws IOException +// * if an I/O error occurs while creating the socket +// * @throws UnknownHostException +// * if the IP address of the host cannot be determined +// */ +// public Socket createSocket(final String host, final int port, +// final InetAddress localAddress, final int localPort, +// final HttpConnectionParams params) throws IOException, +// UnknownHostException, ConnectTimeoutException +// { +// if (params =3D=3D null) +// { +// throw new IllegalArgumentException("Parameters may not be null"= ); +// } +// int timeout =3D params.getConnectionTimeout(); +// SocketFactory socketfactory =3D getSSLContext().getSocketFactory(); +// if (timeout =3D=3D 0) +// { +// return socketfactory.createSocket(host, port, localAddress, loc= alPort); +// } +// else +// { +// Socket socket =3D socketfactory.createSocket(); +// SocketAddress localaddr =3D new InetSocketAddress(localAddress, +// localPort); +// SocketAddress remoteaddr =3D new InetSocketAddress(host, port); +// socket.bind(localaddr); +// socket.connect(remoteaddr, timeout); +// return socket; +// } +// } +// +// /** +// * @see SecureProtocolSocketFactory#createSocket(java.lang.String,int) +// */ +// public Socket createSocket(String host, int port) throws IOException, +// UnknownHostException +// { +// return getSSLContext().getSocketFactory().createSocket(host, port); +// } +// +// /** +// * @see SecureProtocolSocketFactory#createSocket(java.net.Socket,java= .lang.String,int,boolean) +// */ +// public Socket createSocket(Socket socket, String host, int port, +// boolean autoClose) throws IOException, UnknownHostException +// { +// return getSSLContext().getSocketFactory().createSocket(socket, hos= t, +// port, autoClose); +// } +// +// public boolean equals(Object obj) +// { +// return ((obj !=3D null) && obj.getClass().equals( +// EasySSLProtocolSocketFactory.class)); +// } +// +// public int hashCode() +// { +// return EasySSLProtocolSocketFactory.class.hashCode(); +// } +// +//} Modified: modules/identity/trunk/sso/src/main/org/jboss/portal/test/identit= y/sso/EasyX509TrustManager.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/identity/trunk/sso/src/main/org/jboss/portal/test/identity/sso/= EasyX509TrustManager.java 2007-10-17 11:11:09 UTC (rev 8674) +++ modules/identity/trunk/sso/src/main/org/jboss/portal/test/identity/sso/= EasyX509TrustManager.java 2007-10-17 13:05:03 UTC (rev 8675) @@ -1,109 +1,109 @@ -/* -* =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D -* -* Licensed to the Apache Software Foundation (ASF) under one or more -* contributor license agreements. See the NOTICE file distributed with -* this work for additional information regarding copyright ownership. -* The ASF licenses this file to You under the Apache License, Version 2.0 -* (the "License"); you may not use this file except in compliance with -* the License. You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -* =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D -* -* This software consists of voluntary contributions made by many -* individuals on behalf of the Apache Software Foundation. For more -* information on the Apache Software Foundation, please see -* . -* -*/ - -package org.jboss.portal.test.identity.sso; - -import java.security.KeyStore; -import java.security.KeyStoreException; -import java.security.NoSuchAlgorithmException; -import java.security.cert.CertificateException; -import java.security.cert.X509Certificate; - -import javax.net.ssl.TrustManagerFactory; -import javax.net.ssl.TrustManager; -import javax.net.ssl.X509TrustManager; - -/** -*

-* EasyX509TrustManager unlike default {@link X509TrustManager} accepts = -* self-signed certificates. = -*

-*

-* This trust manager SHOULD NOT be used for productive systems = -* due to security reasons, unless it is a concious decision and = -* you are perfectly aware of security implications of accepting = -* self-signed certificates -*

-* = -* @author Adrian Sutton -* @author Oleg Kalnichevski -* = -*

-* DISCLAIMER: HttpClient developers DO NOT actively support this component. -* The component is provided as a reference material, which may be inapprop= riate -* for use without additional customization. -*

-*/ - -public class EasyX509TrustManager implements X509TrustManager -{ - private X509TrustManager standardTrustManager =3D null; - - /** - * Constructor for EasyX509TrustManager. - */ - public EasyX509TrustManager(KeyStore keystore) throws NoSuchAlgorithmEx= ception, KeyStoreException { - super(); - TrustManagerFactory factory =3D TrustManagerFactory.getInstance(Tru= stManagerFactory.getDefaultAlgorithm()); - factory.init(keystore); - TrustManager[] trustmanagers =3D factory.getTrustManagers(); - if (trustmanagers.length =3D=3D 0) { - throw new NoSuchAlgorithmException("no trust manager found"); - } - this.standardTrustManager =3D (X509TrustManager)trustmanagers[0]; - } - - /** - * @see javax.net.ssl.X509TrustManager#checkClientTrusted(X509Certifica= te[],String authType) - */ - public void checkClientTrusted(X509Certificate[] certificates,String au= thType) throws CertificateException { - standardTrustManager.checkClientTrusted(certificates,authType); - } - - /** - * @see javax.net.ssl.X509TrustManager#checkServerTrusted(X509Certifica= te[],String authType) - */ - public void checkServerTrusted(X509Certificate[] certificates,String au= thType) throws CertificateException { - /*if ((certificates !=3D null) && LOG.isDebugEnabled()) { - LOG.debug("Server certificate chain:"); - for (int i =3D 0; i < certificates.length; i++) { - LOG.debug("X509Certificate[" + i + "]=3D" + certificates[i]= ); - } - }*/ - if ((certificates !=3D null) && (certificates.length =3D=3D 1)) { - certificates[0].checkValidity(); - } else { - standardTrustManager.checkServerTrusted(certificates,authType); - } - } - - /** - * @see javax.net.ssl.X509TrustManager#getAcceptedIssuers() - */ - public X509Certificate[] getAcceptedIssuers() { - return this.standardTrustManager.getAcceptedIssuers(); - } -} \ No newline at end of file +///* +//* =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D +//* +//* Licensed to the Apache Software Foundation (ASF) under one or more +//* contributor license agreements. See the NOTICE file distributed with +//* this work for additional information regarding copyright ownership. +//* The ASF licenses this file to You under the Apache License, Version 2= .0 +//* (the "License"); you may not use this file except in compliance with +//* the License. You may obtain a copy of the License at +//* +//* http://www.apache.org/licenses/LICENSE-2.0 +//* +//* Unless required by applicable law or agreed to in writing, software +//* distributed under the License is distributed on an "AS IS" BASIS, +//* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or impli= ed. +//* See the License for the specific language governing permissions and +//* limitations under the License. +//* =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D +//* +//* This software consists of voluntary contributions made by many +//* individuals on behalf of the Apache Software Foundation. For more +//* information on the Apache Software Foundation, please see +//* . +//* +//*/ +// +//package org.jboss.portal.test.identity.sso; +// +//import java.security.KeyStore; +//import java.security.KeyStoreException; +//import java.security.NoSuchAlgorithmException; +//import java.security.cert.CertificateException; +//import java.security.cert.X509Certificate; +// +//import javax.net.ssl.TrustManagerFactory; +//import javax.net.ssl.TrustManager; +//import javax.net.ssl.X509TrustManager; +// +///** +//*

+//* EasyX509TrustManager unlike default {@link X509TrustManager} accepts +//* self-signed certificates. +//*

+//*

+//* This trust manager SHOULD NOT be used for productive systems +//* due to security reasons, unless it is a concious decision and +//* you are perfectly aware of security implications of accepting +//* self-signed certificates +//*

+//* +//* @author Adrian Sutton +//* @author Oleg Kalnichevski +//* +//*

+//* DISCLAIMER: HttpClient developers DO NOT actively support this compone= nt. +//* The component is provided as a reference material, which may be inappr= opriate +//* for use without additional customization. +//*

+//*/ +// +//public class EasyX509TrustManager implements X509TrustManager +//{ +// private X509TrustManager standardTrustManager =3D null; +// +// /** +// * Constructor for EasyX509TrustManager. +// */ +// public EasyX509TrustManager(KeyStore keystore) throws NoSuchAlgorithm= Exception, KeyStoreException { +// super(); +// TrustManagerFactory factory =3D TrustManagerFactory.getInstance(T= rustManagerFactory.getDefaultAlgorithm()); +// factory.init(keystore); +// TrustManager[] trustmanagers =3D factory.getTrustManagers(); +// if (trustmanagers.length =3D=3D 0) { +// throw new NoSuchAlgorithmException("no trust manager found"); +// } +// this.standardTrustManager =3D (X509TrustManager)trustmanagers[0]; +// } +// +// /** +// * @see javax.net.ssl.X509TrustManager#checkClientTrusted(X509Certifi= cate[],String authType) +// */ +// public void checkClientTrusted(X509Certificate[] certificates,String = authType) throws CertificateException { +// standardTrustManager.checkClientTrusted(certificates,authType); +// } +// +// /** +// * @see javax.net.ssl.X509TrustManager#checkServerTrusted(X509Certifi= cate[],String authType) +// */ +// public void checkServerTrusted(X509Certificate[] certificates,String = authType) throws CertificateException { +// /*if ((certificates !=3D null) && LOG.isDebugEnabled()) { +// LOG.debug("Server certificate chain:"); +// for (int i =3D 0; i < certificates.length; i++) { +// LOG.debug("X509Certificate[" + i + "]=3D" + certificates[= i]); +// } +// }*/ +// if ((certificates !=3D null) && (certificates.length =3D=3D 1)) { +// certificates[0].checkValidity(); +// } else { +// standardTrustManager.checkServerTrusted(certificates,authType= ); +// } +// } +// +// /** +// * @see javax.net.ssl.X509TrustManager#getAcceptedIssuers() +// */ +// public X509Certificate[] getAcceptedIssuers() { +// return this.standardTrustManager.getAcceptedIssuers(); +// } +//} \ No newline at end of file Modified: modules/identity/trunk/sso/src/main/org/jboss/portal/test/identit= y/sso/JOSSOTestCase.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/identity/trunk/sso/src/main/org/jboss/portal/test/identity/sso/= JOSSOTestCase.java 2007-10-17 11:11:09 UTC (rev 8674) +++ modules/identity/trunk/sso/src/main/org/jboss/portal/test/identity/sso/= JOSSOTestCase.java 2007-10-17 13:05:03 UTC (rev 8675) @@ -1,726 +1,726 @@ -/*************************************************************************= ***** - * JBoss, a division of Red Hat = * - * Copyright 2006, Red Hat Middleware, LLC, and individual = * - * contributors as indicated by the @authors tag. See the = * - * copyright.txt in the distribution for a full listing of = * - * individual contributors. = * - * = * - * This is free software; you can redistribute it and/or modify it = * - * under the terms of the GNU Lesser General Public License as = * - * published by the Free Software Foundation; either version 2.1 of = * - * the License, or (at your option) any later version. = * - * = * - * This software is distributed in the hope that it will be useful, = * - * but WITHOUT ANY WARRANTY; without even the implied warranty of = * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU = * - * Lesser General Public License for more details. = * - * = * - * You should have received a copy of the GNU Lesser General Public = * - * License along with this software; if not, write to the Free = * - * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA = * - * 02110-1301 USA, or see the FSF site: http://www.fsf.org. = * - *************************************************************************= *****/ -package org.jboss.portal.test.identity.sso; - -import java.util.Map; -import java.util.Set; -import java.util.Iterator; -import java.util.HashMap; - -import org.jboss.portal.test.framework.mc.TestRuntimeContext; - -import org.apache.commons.httpclient.HttpClient; -import org.apache.commons.httpclient.Cookie; -import org.apache.commons.httpclient.NameValuePair; -import org.apache.commons.httpclient.methods.GetMethod; -import org.apache.commons.httpclient.methods.PostMethod; -import org.apache.commons.httpclient.protocol.Protocol; - -import junit.framework.TestCase; - -/** - * @author Sohil Shah - * = - */ -public class JOSSOTestCase extends TestCase -{ - /** - * = - */ - private String firstPortal =3D null; - private String secondPortal =3D null; - private String sameHostSecondPortal =3D null; - private String jossoServer =3D null; - private String userLoggedInIndicator =3D null; - private String username =3D null; - private String password =3D null; - = - /** - * = - */ - protected TestRuntimeContext runtimeContext =3D null; - = - /** - * = - */ - protected void setUp() throws Exception - { - super.setUp(); - = - this.runtimeContext =3D new TestRuntimeContext("org/jboss/portal/tes= t/identity/sso-beans.xml"); - = - this.runtimeContext.addBean("JOSSOConfig", this); - this.runtimeContext.addBean("CASConfig", new CASTestCase()); - = - this.runtimeContext.start(); - = - //SSL setup - Protocol.registerProtocol("https",new Protocol("https", new EasySSLP= rotocolSocketFactory(), 443)); - } - - /** - * = - */ - protected void tearDown() throws Exception - { - super.tearDown(); - = - //Service stoppage - this.runtimeContext.stop(); - = - //Data cleanup - this.runtimeContext =3D null; = - } - = - /** - * = - * @return - */ = - public String getUserLoggedInIndicator() - { - return userLoggedInIndicator; - } - - /** - * = - * @param userLoggedInIndicator - */ - public void setUserLoggedInIndicator(String userLoggedInIndicator) - { - this.userLoggedInIndicator =3D userLoggedInIndicator; - } - = - /** - * = - * @return - */ - public String getPassword() - { - return password; - } - - /** - * = - * @param password - */ - public void setPassword(String password) - { - this.password =3D password; - } - - /** - * = - * @return - */ - public String getUsername() - { - return username; - } - - /** - * = - * @param username - */ - public void setUsername(String username) - { - this.username =3D username; - } - = - /** - * = - * @return - */ - public String getFirstPortal() - { - return firstPortal; - } - - /** - * = - * @param firstPortal - */ - public void setFirstPortal(String firstPortal) - { - this.firstPortal =3D firstPortal; - } - - /** - * = - * @return - */ - public String getSecondPortal() - { - return secondPortal; - } - - /** - * = - * @param secondPortal - */ - public void setSecondPortal(String secondPortal) - { - this.secondPortal =3D secondPortal; - } - = - /** - * = - * @return - */ - public String getJossoServer() - { - return jossoServer; - } - - /** - * = - * @param jossoServer - */ - public void setJossoServer(String jossoServer) - { - this.jossoServer =3D jossoServer; - } - = - /** - * = - * @return - */ - public String getSameHostSecondPortal() - { - return sameHostSecondPortal; - } - - /** - * = - * @param sameHostSecondPortal - */ - public void setSameHostSecondPortal(String sameHostSecondPortal) - { - this.sameHostSecondPortal =3D sameHostSecondPortal; - } - - /** - * This tests the scenario when the two portals are deployed on separat= e hosts/servers - * = - * @throws Exception - */ - public void testMultiHostDeployment() throws Exception - { = - Cookie ssoCookie =3D null; - String firstPortalFinalResponse =3D null; - String secondPortalFinalResponse =3D null; - = - //Load the main portal page on firstPortalContext - String firstContextPortalUrl =3D this.firstPortal; - WebConversation portalConversation =3D this.startConversation(firstC= ontextPortalUrl); = - TestCase.assertFalse(this.isUserLoggedIn(portalConversation.getRespo= nse())); - = - //Click the Login link on the firstPortalContext - String firstContextLoginUrl =3D firstContextPortalUrl + "/auth/porta= l/default/default"; - this.sendGet(firstContextLoginUrl, portalConversation); = - = - //Navigate to a secured resource on the portal - TestCase.assertNotNull(portalConversation.getRedirectLocation()); - TestCase.assertEquals(portalConversation.getStatusCode(), 302); - String portalToJOSSO =3D portalConversation.getRedirectLocation(); - this.sendGet(portalToJOSSO, portalConversation); = - = - //When authentication is triggered, move over to the JOSSO server es= tablishing an SSO session with JOSSO - String jossoLocation =3D portalConversation.getRedirectLocation(); - WebConversation ssoConversation =3D this.startConversation(jossoLoca= tion); - String response =3D ssoConversation.getResponse(); - = - //Extract the josso post action value - int searchIndex =3D response.indexOf("action=3D\"")+9; - int endIndex =3D response.indexOf('"', searchIndex); - String action =3D response.substring(searchIndex,endIndex); - = - //Perform HTTP Post based authentication with the JOSSO Server - Map postParams =3D new HashMap(); - postParams.put("josso_username", this.username); - postParams.put("josso_password", this.password); - postParams.put("josso_cmd", "login"); - this.sendPost("http://"+ this.jossoServer +"/"+action,postParams, ss= oConversation); - = - //Go back to the Portal since login has succeeded, starting with ass= ertion on the JOSSO Agent installed on the Portal - String assertUrl =3D ssoConversation.getRedirectLocation(); - this.sendGet(assertUrl, portalConversation); - = - //Now go back to the original Portal resource requested. This time u= ser should have an authenticated session established - TestCase.assertNotNull(portalConversation.getRedirectLocation()); - TestCase.assertEquals(portalConversation.getStatusCode(), 302); - TestCase.assertTrue(portalConversation.getRedirectLocation().indexOf= (firstContextLoginUrl) !=3D -1); - TestCase.assertNotNull(portalConversation.getSSOCookie()); - String goBack =3D portalConversation.getRedirectLocation(); - ssoCookie =3D ssoConversation.getSSOCookie(); - this.sendGet(goBack, portalConversation); = - firstPortalFinalResponse =3D portalConversation.getResponse(); - TestCase.assertTrue(this.isUserLoggedIn(firstPortalFinalResponse)); - = - //Load the main portal page on secondPortalContext - String secondContextPortalUrl =3D this.secondPortal; - portalConversation =3D this.startConversation(secondContextPortalUrl= ); - = - //Click the Login Link on the secondPortalContext - String secondContextLoginUrl =3D secondContextPortalUrl + "/auth/por= tal/default/default"; - this.sendGet(secondContextLoginUrl, portalConversation); - = - //Perform re-direct to the JOSSO Server but this time sending in the= JOSSO cookie - TestCase.assertNotNull(portalConversation.getRedirectLocation()); - TestCase.assertEquals(portalConversation.getStatusCode(), 302); - portalToJOSSO =3D portalConversation.getRedirectLocation(); - this.sendGet(portalToJOSSO, portalConversation); - = - = - //Assert the redirect and it should be to the JOSSO Server, but this= time - //It should end up with an Authenticated session back to the secondP= ortalContext - jossoLocation =3D portalConversation.getRedirectLocation(); - ssoConversation =3D this.startConversation(jossoLocation,ssoCookie); - secondPortalFinalResponse =3D ssoConversation.getResponse(); - TestCase.assertTrue(this.isUserLoggedIn(secondPortalFinalResponse)); - = - //Assert and make sure its the same user logged into both Portals = - String firstPortalUser =3D this.extractLoggedInUser(firstPortalFinal= Response); - String secondPortalUser =3D this.extractLoggedInUser(secondPortalFin= alResponse); = - TestCase.assertEquals(firstPortalUser, this.username); - TestCase.assertEquals(secondPortalUser, this.username); - TestCase.assertEquals(firstPortalUser, secondPortalUser); = - } - = - /** - * This tests the scenario where the two portals are deployed within th= e same host/server but under - * different web contexts - * = - * @throws Exception - */ - public void testSameHostDeployment() throws Exception - { = - Cookie ssoCookie =3D null; - String firstPortalFinalResponse =3D null; - String secondPortalFinalResponse =3D null; - = - //Load the main portal page on firstPortalContext - String firstContextPortalUrl =3D this.firstPortal; - WebConversation portalConversation =3D this.startConversation(firstC= ontextPortalUrl); = - TestCase.assertFalse(this.isUserLoggedIn(portalConversation.getRespo= nse())); - = - //Click the Login link on the firstPortalContext - String firstContextLoginUrl =3D firstContextPortalUrl + "/auth/porta= l/default/default"; - this.sendGet(firstContextLoginUrl, portalConversation); = - = - //Navigate to a secured resource on the portal - TestCase.assertNotNull(portalConversation.getRedirectLocation()); - TestCase.assertEquals(portalConversation.getStatusCode(), 302); - String portalToJOSSO =3D portalConversation.getRedirectLocation(); - this.sendGet(portalToJOSSO, portalConversation); = - = - //When authentication is triggered, move over to the JOSSO server es= tablishing an SSO session with JOSSO - String jossoLocation =3D portalConversation.getRedirectLocation(); - WebConversation ssoConversation =3D this.startConversation(jossoLoca= tion); - String response =3D ssoConversation.getResponse(); - = - //Extract the josso post action value - int searchIndex =3D response.indexOf("action=3D\"")+9; - int endIndex =3D response.indexOf('"', searchIndex); - String action =3D response.substring(searchIndex,endIndex); - = - //Perform HTTP Post based authentication with the JOSSO Server - Map postParams =3D new HashMap(); - postParams.put("josso_username", this.username); - postParams.put("josso_password", this.password); - postParams.put("josso_cmd", "login"); - this.sendPost("http://"+ this.jossoServer +"/"+action,postParams, ss= oConversation); - = - //Go back to the Portal since login has succeeded, starting with ass= ertion on the JOSSO Agent installed on the Portal - String assertUrl =3D ssoConversation.getRedirectLocation(); - this.sendGet(assertUrl, portalConversation); - = - //Now go back to the original Portal resource requested. This time u= ser should have an authenticated session established - TestCase.assertNotNull(portalConversation.getRedirectLocation()); - TestCase.assertEquals(portalConversation.getStatusCode(), 302); - TestCase.assertTrue(portalConversation.getRedirectLocation().indexOf= (firstContextLoginUrl) !=3D -1); - TestCase.assertNotNull(portalConversation.getSSOCookie()); - String goBack =3D portalConversation.getRedirectLocation(); - ssoCookie =3D ssoConversation.getSSOCookie(); - this.sendGet(goBack, portalConversation); = - firstPortalFinalResponse =3D portalConversation.getResponse(); - TestCase.assertTrue(this.isUserLoggedIn(firstPortalFinalResponse)); - = - //Load the main portal page on secondPortalContext - String secondContextPortalUrl =3D this.sameHostSecondPortal; - portalConversation =3D this.startConversation(secondContextPortalUrl= ); - = - //Click the Login Link on the secondPortalContext - String secondContextLoginUrl =3D secondContextPortalUrl + "/auth/por= tal/default/default"; - this.sendGet(secondContextLoginUrl, portalConversation); - = - //Perform re-direct to the JOSSO Server but this time sending in the= JOSSO cookie - TestCase.assertNotNull(portalConversation.getRedirectLocation()); - TestCase.assertEquals(portalConversation.getStatusCode(), 302); - portalToJOSSO =3D portalConversation.getRedirectLocation(); - this.sendGet(portalToJOSSO, portalConversation); - = - = - //Assert the redirect and it should be to the JOSSO Server, but this= time - //It should end up with an Authenticated session back to the secondP= ortalContext - jossoLocation =3D portalConversation.getRedirectLocation(); - ssoConversation =3D this.startConversation(jossoLocation,ssoCookie); - secondPortalFinalResponse =3D ssoConversation.getResponse(); - TestCase.assertTrue(this.isUserLoggedIn(secondPortalFinalResponse)); - = - //Assert and make sure its the same user logged into both Portals = - String firstPortalUser =3D this.extractLoggedInUser(firstPortalFinal= Response); - String secondPortalUser =3D this.extractLoggedInUser(secondPortalFin= alResponse); = - TestCase.assertEquals(firstPortalUser, this.username); - TestCase.assertEquals(secondPortalUser, this.username); - TestCase.assertEquals(firstPortalUser, secondPortalUser); = - } - = - /** - * = - * @param portalUrl - * @return - * @throws Exception - */ - private WebConversation startConversation(String portalUrl) throws Exce= ption - { - WebConversation conversation =3D null; - = - HttpClient httpClient =3D new HttpClient(); - GetMethod getMethod =3D new GetMethod(portalUrl); - try - { - conversation =3D new WebConversation(); - = - int statusCode =3D httpClient.executeMethod(getMethod); - String response =3D getMethod.getResponseBodyAsString(); - = - Cookie[] cookies =3D httpClient.getState().getCookies(); = - for(int i=3D0;iSohil Shah - * - */ - private static class WebConversation - { - /** - * = - */ - private HttpClient client =3D null; - private String sessionId =3D null; - private int statusCode =3D 0; - private String response =3D null; - private String redirectLocation =3D null; - private Cookie ssoCookie =3D null; - = - /** - * = - * - */ - public WebConversation() - { - = - } - = - /** - * = - * @return - */ - public HttpClient getClient() - { - return this.client; - } - = - /** - * = - * @param client - */ - public void setClient(HttpClient client) - { - this.client =3D client; - } - - public String getResponse() - { - return response; - } - - public void setResponse(String response) - { - this.response =3D response; - } - - public int getStatusCode() - { - return statusCode; - } - - public void setStatusCode(int statusCode) - { - this.statusCode =3D statusCode; - } - - public String getSessionId() - { - return sessionId; - } - - public void setSessionId(String sessionId) - { - this.sessionId =3D sessionId; - } - - public String getRedirectLocation() - { - return redirectLocation; - } - - public void setRedirectLocation(String redirectLocation) - { - this.redirectLocation =3D redirectLocation; - } - - public Cookie getSSOCookie() - { - return ssoCookie; - } - - public void setSSOCookie(Cookie ssoCookie) - { - this.ssoCookie =3D ssoCookie; - } = - } -} +///***********************************************************************= ******* +// * JBoss, a division of Red Hat = * +// * Copyright 2006, Red Hat Middleware, LLC, and individual = * +// * contributors as indicated by the @authors tag. See the = * +// * copyright.txt in the distribution for a full listing of = * +// * individual contributors. = * +// * = * +// * This is free software; you can redistribute it and/or modify it = * +// * under the terms of the GNU Lesser General Public License as = * +// * published by the Free Software Foundation; either version 2.1 of = * +// * the License, or (at your option) any later version. = * +// * = * +// * This software is distributed in the hope that it will be useful, = * +// * but WITHOUT ANY WARRANTY; without even the implied warranty of = * +// * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU = * +// * Lesser General Public License for more details. = * +// * = * +// * You should have received a copy of the GNU Lesser General Public = * +// * License along with this software; if not, write to the Free = * +// * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA = * +// * 02110-1301 USA, or see the FSF site: http://www.fsf.org. = * +// ***********************************************************************= *******/ +//package org.jboss.portal.test.identity.sso; +// +//import java.util.Map; +//import java.util.Set; +//import java.util.Iterator; +//import java.util.HashMap; +// +//import org.jboss.portal.test.framework.mc.TestRuntimeContext; +// +//import org.apache.commons.httpclient.HttpClient; +//import org.apache.commons.httpclient.Cookie; +//import org.apache.commons.httpclient.NameValuePair; +//import org.apache.commons.httpclient.methods.GetMethod; +//import org.apache.commons.httpclient.methods.PostMethod; +//import org.apache.commons.httpclient.protocol.Protocol; +// +//import junit.framework.TestCase; +// +///** +// * @author Sohil Shah +// * +// */ +//public class JOSSOTestCase extends TestCase +//{ +// /** +// * +// */ +// private String firstPortal =3D null; +// private String secondPortal =3D null; +// private String sameHostSecondPortal =3D null; +// private String jossoServer =3D null; +// private String userLoggedInIndicator =3D null; +// private String username =3D null; +// private String password =3D null; +// +// /** +// * +// */ +// protected TestRuntimeContext runtimeContext =3D null; +// +// /** +// * +// */ +// protected void setUp() throws Exception +// { +// super.setUp(); +// +// this.runtimeContext =3D new TestRuntimeContext("org/jboss/portal/t= est/identity/sso-beans.xml"); +// +// this.runtimeContext.addBean("JOSSOConfig", this); +// this.runtimeContext.addBean("CASConfig", new CASTestCase()); +// +// this.runtimeContext.start(); +// +// //SSL setup +// Protocol.registerProtocol("https",new Protocol("https", new EasySS= LProtocolSocketFactory(), 443)); +// } +// +// /** +// * +// */ +// protected void tearDown() throws Exception +// { +// super.tearDown(); +// +// //Service stoppage +// this.runtimeContext.stop(); +// +// //Data cleanup +// this.runtimeContext =3D null; +// } +// +// /** +// * +// * @return +// */ +// public String getUserLoggedInIndicator() +// { +// return userLoggedInIndicator; +// } +// +// /** +// * +// * @param userLoggedInIndicator +// */ +// public void setUserLoggedInIndicator(String userLoggedInIndicator) +// { +// this.userLoggedInIndicator =3D userLoggedInIndicator; +// } +// +// /** +// * +// * @return +// */ +// public String getPassword() +// { +// return password; +// } +// +// /** +// * +// * @param password +// */ +// public void setPassword(String password) +// { +// this.password =3D password; +// } +// +// /** +// * +// * @return +// */ +// public String getUsername() +// { +// return username; +// } +// +// /** +// * +// * @param username +// */ +// public void setUsername(String username) +// { +// this.username =3D username; +// } +// +// /** +// * +// * @return +// */ +// public String getFirstPortal() +// { +// return firstPortal; +// } +// +// /** +// * +// * @param firstPortal +// */ +// public void setFirstPortal(String firstPortal) +// { +// this.firstPortal =3D firstPortal; +// } +// +// /** +// * +// * @return +// */ +// public String getSecondPortal() +// { +// return secondPortal; +// } +// +// /** +// * +// * @param secondPortal +// */ +// public void setSecondPortal(String secondPortal) +// { +// this.secondPortal =3D secondPortal; +// } +// +// /** +// * +// * @return +// */ +// public String getJossoServer() +// { +// return jossoServer; +// } +// +// /** +// * +// * @param jossoServer +// */ +// public void setJossoServer(String jossoServer) +// { +// this.jossoServer =3D jossoServer; +// } +// +// /** +// * +// * @return +// */ +// public String getSameHostSecondPortal() +// { +// return sameHostSecondPortal; +// } +// +// /** +// * +// * @param sameHostSecondPortal +// */ +// public void setSameHostSecondPortal(String sameHostSecondPortal) +// { +// this.sameHostSecondPortal =3D sameHostSecondPortal; +// } +// +// /** +// * This tests the scenario when the two portals are deployed on separ= ate hosts/servers +// * +// * @throws Exception +// */ +// public void testMultiHostDeployment() throws Exception +// { +// Cookie ssoCookie =3D null; +// String firstPortalFinalResponse =3D null; +// String secondPortalFinalResponse =3D null; +// +// //Load the main portal page on firstPortalContext +// String firstContextPortalUrl =3D this.firstPortal; +// WebConversation portalConversation =3D this.startConversation(firs= tContextPortalUrl); +// TestCase.assertFalse(this.isUserLoggedIn(portalConversation.getRes= ponse())); +// +// //Click the Login link on the firstPortalContext +// String firstContextLoginUrl =3D firstContextPortalUrl + "/auth/por= tal/default/default"; +// this.sendGet(firstContextLoginUrl, portalConversation); +// +// //Navigate to a secured resource on the portal +// TestCase.assertNotNull(portalConversation.getRedirectLocation()); +// TestCase.assertEquals(portalConversation.getStatusCode(), 302); +// String portalToJOSSO =3D portalConversation.getRedirectLocation(); +// this.sendGet(portalToJOSSO, portalConversation); +// +// //When authentication is triggered, move over to the JOSSO server = establishing an SSO session with JOSSO +// String jossoLocation =3D portalConversation.getRedirectLocation(); +// WebConversation ssoConversation =3D this.startConversation(jossoLo= cation); +// String response =3D ssoConversation.getResponse(); +// +// //Extract the josso post action value +// int searchIndex =3D response.indexOf("action=3D\"")+9; +// int endIndex =3D response.indexOf('"', searchIndex); +// String action =3D response.substring(searchIndex,endIndex); +// +// //Perform HTTP Post based authentication with the JOSSO Server +// Map postParams =3D new HashMap(); +// postParams.put("josso_username", this.username); +// postParams.put("josso_password", this.password); +// postParams.put("josso_cmd", "login"); +// this.sendPost("http://"+ this.jossoServer +"/"+action,postParams, = ssoConversation); +// +// //Go back to the Portal since login has succeeded, starting with a= ssertion on the JOSSO Agent installed on the Portal +// String assertUrl =3D ssoConversation.getRedirectLocation(); +// this.sendGet(assertUrl, portalConversation); +// +// //Now go back to the original Portal resource requested. This time= user should have an authenticated session established +// TestCase.assertNotNull(portalConversation.getRedirectLocation()); +// TestCase.assertEquals(portalConversation.getStatusCode(), 302); +// TestCase.assertTrue(portalConversation.getRedirectLocation().index= Of(firstContextLoginUrl) !=3D -1); +// TestCase.assertNotNull(portalConversation.getSSOCookie()); +// String goBack =3D portalConversation.getRedirectLocation(); +// ssoCookie =3D ssoConversation.getSSOCookie(); +// this.sendGet(goBack, portalConversation); +// firstPortalFinalResponse =3D portalConversation.getResponse(); +// TestCase.assertTrue(this.isUserLoggedIn(firstPortalFinalResponse)); +// +// //Load the main portal page on secondPortalContext +// String secondContextPortalUrl =3D this.secondPortal; +// portalConversation =3D this.startConversation(secondContextPortalU= rl); +// +// //Click the Login Link on the secondPortalContext +// String secondContextLoginUrl =3D secondContextPortalUrl + "/auth/p= ortal/default/default"; +// this.sendGet(secondContextLoginUrl, portalConversation); +// +// //Perform re-direct to the JOSSO Server but this time sending in t= he JOSSO cookie +// TestCase.assertNotNull(portalConversation.getRedirectLocation()); +// TestCase.assertEquals(portalConversation.getStatusCode(), 302); +// portalToJOSSO =3D portalConversation.getRedirectLocation(); +// this.sendGet(portalToJOSSO, portalConversation); +// +// +// //Assert the redirect and it should be to the JOSSO Server, but th= is time +// //It should end up with an Authenticated session back to the secon= dPortalContext +// jossoLocation =3D portalConversation.getRedirectLocation(); +// ssoConversation =3D this.startConversation(jossoLocation,ssoCookie= ); +// secondPortalFinalResponse =3D ssoConversation.getResponse(); +// TestCase.assertTrue(this.isUserLoggedIn(secondPortalFinalResponse)= ); +// +// //Assert and make sure its the same user logged into both Portals +// String firstPortalUser =3D this.extractLoggedInUser(firstPortalFin= alResponse); +// String secondPortalUser =3D this.extractLoggedInUser(secondPortalF= inalResponse); +// TestCase.assertEquals(firstPortalUser, this.username); +// TestCase.assertEquals(secondPortalUser, this.username); +// TestCase.assertEquals(firstPortalUser, secondPortalUser); +// } +// +// /** +// * This tests the scenario where the two portals are deployed within = the same host/server but under +// * different web contexts +// * +// * @throws Exception +// */ +// public void testSameHostDeployment() throws Exception +// { +// Cookie ssoCookie =3D null; +// String firstPortalFinalResponse =3D null; +// String secondPortalFinalResponse =3D null; +// +// //Load the main portal page on firstPortalContext +// String firstContextPortalUrl =3D this.firstPortal; +// WebConversation portalConversation =3D this.startConversation(firs= tContextPortalUrl); +// TestCase.assertFalse(this.isUserLoggedIn(portalConversation.getRes= ponse())); +// +// //Click the Login link on the firstPortalContext +// String firstContextLoginUrl =3D firstContextPortalUrl + "/auth/por= tal/default/default"; +// this.sendGet(firstContextLoginUrl, portalConversation); +// +// //Navigate to a secured resource on the portal +// TestCase.assertNotNull(portalConversation.getRedirectLocation()); +// TestCase.assertEquals(portalConversation.getStatusCode(), 302); +// String portalToJOSSO =3D portalConversation.getRedirectLocation(); +// this.sendGet(portalToJOSSO, portalConversation); +// +// //When authentication is triggered, move over to the JOSSO server = establishing an SSO session with JOSSO +// String jossoLocation =3D portalConversation.getRedirectLocation(); +// WebConversation ssoConversation =3D this.startConversation(jossoLo= cation); +// String response =3D ssoConversation.getResponse(); +// +// //Extract the josso post action value +// int searchIndex =3D response.indexOf("action=3D\"")+9; +// int endIndex =3D response.indexOf('"', searchIndex); +// String action =3D response.substring(searchIndex,endIndex); +// +// //Perform HTTP Post based authentication with the JOSSO Server +// Map postParams =3D new HashMap(); +// postParams.put("josso_username", this.username); +// postParams.put("josso_password", this.password); +// postParams.put("josso_cmd", "login"); +// this.sendPost("http://"+ this.jossoServer +"/"+action,postParams, = ssoConversation); +// +// //Go back to the Portal since login has succeeded, starting with a= ssertion on the JOSSO Agent installed on the Portal +// String assertUrl =3D ssoConversation.getRedirectLocation(); +// this.sendGet(assertUrl, portalConversation); +// +// //Now go back to the original Portal resource requested. This time= user should have an authenticated session established +// TestCase.assertNotNull(portalConversation.getRedirectLocation()); +// TestCase.assertEquals(portalConversation.getStatusCode(), 302); +// TestCase.assertTrue(portalConversation.getRedirectLocation().index= Of(firstContextLoginUrl) !=3D -1); +// TestCase.assertNotNull(portalConversation.getSSOCookie()); +// String goBack =3D portalConversation.getRedirectLocation(); +// ssoCookie =3D ssoConversation.getSSOCookie(); +// this.sendGet(goBack, portalConversation); +// firstPortalFinalResponse =3D portalConversation.getResponse(); +// TestCase.assertTrue(this.isUserLoggedIn(firstPortalFinalResponse)); +// +// //Load the main portal page on secondPortalContext +// String secondContextPortalUrl =3D this.sameHostSecondPortal; +// portalConversation =3D this.startConversation(secondContextPortalU= rl); +// +// //Click the Login Link on the secondPortalContext +// String secondContextLoginUrl =3D secondContextPortalUrl + "/auth/p= ortal/default/default"; +// this.sendGet(secondContextLoginUrl, portalConversation); +// +// //Perform re-direct to the JOSSO Server but this time sending in t= he JOSSO cookie +// TestCase.assertNotNull(portalConversation.getRedirectLocation()); +// TestCase.assertEquals(portalConversation.getStatusCode(), 302); +// portalToJOSSO =3D portalConversation.getRedirectLocation(); +// this.sendGet(portalToJOSSO, portalConversation); +// +// +// //Assert the redirect and it should be to the JOSSO Server, but th= is time +// //It should end up with an Authenticated session back to the secon= dPortalContext +// jossoLocation =3D portalConversation.getRedirectLocation(); +// ssoConversation =3D this.startConversation(jossoLocation,ssoCookie= ); +// secondPortalFinalResponse =3D ssoConversation.getResponse(); +// TestCase.assertTrue(this.isUserLoggedIn(secondPortalFinalResponse)= ); +// +// //Assert and make sure its the same user logged into both Portals +// String firstPortalUser =3D this.extractLoggedInUser(firstPortalFin= alResponse); +// String secondPortalUser =3D this.extractLoggedInUser(secondPortalF= inalResponse); +// TestCase.assertEquals(firstPortalUser, this.username); +// TestCase.assertEquals(secondPortalUser, this.username); +// TestCase.assertEquals(firstPortalUser, secondPortalUser); +// } +// +// /** +// * +// * @param portalUrl +// * @return +// * @throws Exception +// */ +// private WebConversation startConversation(String portalUrl) throws Ex= ception +// { +// WebConversation conversation =3D null; +// +// HttpClient httpClient =3D new HttpClient(); +// GetMethod getMethod =3D new GetMethod(portalUrl); +// try +// { +// conversation =3D new WebConversation(); +// +// int statusCode =3D httpClient.executeMethod(getMethod); +// String response =3D getMethod.getResponseBodyAsString(); +// +// Cookie[] cookies =3D httpClient.getState().getCookies(); +// for(int i=3D0;iSohil Shah +// * +// */ +// private static class WebConversation +// { +// /** +// * +// */ +// private HttpClient client =3D null; +// private String sessionId =3D null; +// private int statusCode =3D 0; +// private String response =3D null; +// private String redirectLocation =3D null; +// private Cookie ssoCookie =3D null; +// +// /** +// * +// * +// */ +// public WebConversation() +// { +// +// } +// +// /** +// * +// * @return +// */ +// public HttpClient getClient() +// { +// return this.client; +// } +// +// /** +// * +// * @param client +// */ +// public void setClient(HttpClient client) +// { +// this.client =3D client; +// } +// +// public String getResponse() +// { +// return response; +// } +// +// public void setResponse(String response) +// { +// this.response =3D response; +// } +// +// public int getStatusCode() +// { +// return statusCode; +// } +// +// public void setStatusCode(int statusCode) +// { +// this.statusCode =3D statusCode; +// } +// +// public String getSessionId() +// { +// return sessionId; +// } +// +// public void setSessionId(String sessionId) +// { +// this.sessionId =3D sessionId; +// } +// +// public String getRedirectLocation() +// { +// return redirectLocation; +// } +// +// public void setRedirectLocation(String redirectLocation) +// { +// this.redirectLocation =3D redirectLocation; +// } +// +// public Cookie getSSOCookie() +// { +// return ssoCookie; +// } +// +// public void setSSOCookie(Cookie ssoCookie) +// { +// this.ssoCookie =3D ssoCookie; +// } +// } +//} Modified: modules/identity/trunk/testsuite/build.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/identity/trunk/testsuite/build.xml 2007-10-17 11:11:09 UTC (rev= 8674) +++ modules/identity/trunk/testsuite/build.xml 2007-10-17 13:05:03 UTC (rev= 8675) @@ -117,11 +117,11 @@ - + - + @@ -140,32 +140,8 @@ - - - - - - - - - - - - - - - - - - - - - @@ -174,14 +150,14 @@ = - - - + + + = - - - + + + = = = - - + + = = --===============3245466204675061523==-- From portal-commits at lists.jboss.org Wed Oct 17 09:16:16 2007 Content-Type: multipart/mixed; boundary="===============8002207629692083803==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8677 - in modules/test/trunk/unit/src/main/org/jboss: unit/info and 1 other directories. Date: Wed, 17 Oct 2007 09:16:16 -0400 Message-ID: --===============8002207629692083803== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: julien(a)jboss.com Date: 2007-10-17 09:16:16 -0400 (Wed, 17 Oct 2007) New Revision: 8677 Added: modules/test/trunk/unit/src/main/org/jboss/test/unit/pojo/MethodAndMetho= dArgumentAnnotatedWithParameter1.java modules/test/trunk/unit/src/main/org/jboss/test/unit/pojo/MethodAndMetho= dArgumentAnnotatedWithParameter2.java Removed: modules/test/trunk/unit/src/main/org/jboss/test/unit/pojo/ClassHavingSam= ePropertyParameterAndMethodArgumentParameter.java Modified: modules/test/trunk/unit/src/main/org/jboss/test/unit/pojo/AbstractPOJOTe= sts.java modules/test/trunk/unit/src/main/org/jboss/unit/info/TestInfo.java modules/test/trunk/unit/src/main/org/jboss/unit/spi/pojo/TestCaseDef.java modules/test/trunk/unit/src/main/org/jboss/unit/spi/pojo/TestProviderSup= port.java Log: specify the contract for getParameters() on TestInfo and implemented test c= ase for it Modified: modules/test/trunk/unit/src/main/org/jboss/test/unit/pojo/Abstrac= tPOJOTests.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/test/unit/pojo/AbstractPOJOT= ests.java 2007-10-17 13:07:31 UTC (rev 8676) +++ modules/test/trunk/unit/src/main/org/jboss/test/unit/pojo/AbstractPOJOT= ests.java 2007-10-17 13:16:16 UTC (rev 8677) @@ -25,6 +25,7 @@ import org.jboss.unit.api.Assert; = import static org.jboss.unit.util.CollectionTools.*; +import static org.jboss.unit.api.Assert.*; = import java.util.Map; import java.util.Collections; @@ -63,7 +64,7 @@ testMethodAnnotatedWithTag(); = // - testClassHavingSamePropertyParameterAndMethodArgumentParameter(); + testMethodAndMethodArgumentAnnotatedWithParameter(); = // testClassWithoutDefaultConstructor(); @@ -144,12 +145,15 @@ invoke(driver, clazz, "testFoo", AbstractPOJOTest.InvokeResult.PASS,= true); } = - private void testClassHavingSamePropertyParameterAndMethodArgumentParam= eter() + private void testMethodAndMethodArgumentAnnotatedWithParameter() { - AbstractPOJOTest driver =3D assertCanBuildSuite(ClassHavingSamePrope= rtyParameterAndMethodArgumentParameter.class); + AbstractPOJOTest driver1 =3D assertCanBuildSuite(MethodAndMethodArgu= mentAnnotatedWithParameter1.class); + invoke(driver1, MethodAndMethodArgumentAnnotatedWithParameter1.class= , "testFoo", AbstractPOJOTest.InvokeResult.PASS, true); + assertTrue(driver1.getParameterNames().containsAll(driver1.getTestCa= seParameterNames("testFoo"))); = - // - invoke(driver, ClassHavingSamePropertyParameterAndMethodArgumentPara= meter.class, "testFoo", AbstractPOJOTest.InvokeResult.PASS, true); + AbstractPOJOTest driver2 =3D assertCanBuildSuite(MethodAndMethodArgu= mentAnnotatedWithParameter2.class); + invoke(driver2, MethodAndMethodArgumentAnnotatedWithParameter2.class= , "testFoo", AbstractPOJOTest.InvokeResult.PASS, true); + assertTrue(driver2.getParameterNames().containsAll(driver2.getTestCa= seParameterNames("testFoo"))); } = private void testClassWithFailingConstructor() Deleted: modules/test/trunk/unit/src/main/org/jboss/test/unit/pojo/ClassHav= ingSamePropertyParameterAndMethodArgumentParameter.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/test/unit/pojo/ClassHavingSa= mePropertyParameterAndMethodArgumentParameter.java 2007-10-17 13:07:31 UTC = (rev 8676) +++ modules/test/trunk/unit/src/main/org/jboss/test/unit/pojo/ClassHavingSa= mePropertyParameterAndMethodArgumentParameter.java 2007-10-17 13:16:16 UTC = (rev 8677) @@ -1,51 +0,0 @@ -/*************************************************************************= ***** - * JBoss, a division of Red Hat = * - * Copyright 2006, Red Hat Middleware, LLC, and individual = * - * contributors as indicated by the @authors tag. See the = * - * copyright.txt in the distribution for a full listing of = * - * individual contributors. = * - * = * - * This is free software; you can redistribute it and/or modify it = * - * under the terms of the GNU Lesser General Public License as = * - * published by the Free Software Foundation; either version 2.1 of = * - * the License, or (at your option) any later version. = * - * = * - * This software is distributed in the hope that it will be useful, = * - * but WITHOUT ANY WARRANTY; without even the implied warranty of = * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU = * - * Lesser General Public License for more details. = * - * = * - * You should have received a copy of the GNU Lesser General Public = * - * License along with this software; if not, write to the Free = * - * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA = * - * 02110-1301 USA, or see the FSF site: http://www.fsf.org. = * - *************************************************************************= *****/ -package org.jboss.test.unit.pojo; - -import org.jboss.unit.api.pojo.annotations.Parameter; -import org.jboss.unit.api.pojo.annotations.Test; - -import java.util.Collections; - -/** - * @author Julien Viet - * @version $Revision: 1.1 $ - */ -public class ClassHavingSamePropertyParameterAndMethodArgumentParameter -{ - - @Parameter - public void setFoo(String foo) - { - POJOAssert.buffer1 =3D foo; - } - - @Test - public void testFoo(@Parameter(name=3D"foo") String foo) - { - if (POJOAssert.buffer1 !=3D null && POJOAssert.buffer1.equals(foo)) - { - POJOAssert.call(ClassHavingSamePropertyParameterAndMethodArgument= Parameter.class, Collections.singletonMap("foo", POJOAssert.buffer1)); - } - } -} Copied: modules/test/trunk/unit/src/main/org/jboss/test/unit/pojo/MethodAnd= MethodArgumentAnnotatedWithParameter1.java (from rev 8670, modules/test/tru= nk/unit/src/main/org/jboss/test/unit/pojo/ClassHavingSamePropertyParameterA= ndMethodArgumentParameter.java) =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/test/unit/pojo/MethodAndMeth= odArgumentAnnotatedWithParameter1.java (rev 0) +++ modules/test/trunk/unit/src/main/org/jboss/test/unit/pojo/MethodAndMeth= odArgumentAnnotatedWithParameter1.java 2007-10-17 13:16:16 UTC (rev 8677) @@ -0,0 +1,48 @@ +/*************************************************************************= ***** + * JBoss, a division of Red Hat = * + * Copyright 2006, Red Hat Middleware, LLC, and individual = * + * contributors as indicated by the @authors tag. See the = * + * copyright.txt in the distribution for a full listing of = * + * individual contributors. = * + * = * + * This is free software; you can redistribute it and/or modify it = * + * under the terms of the GNU Lesser General Public License as = * + * published by the Free Software Foundation; either version 2.1 of = * + * the License, or (at your option) any later version. = * + * = * + * This software is distributed in the hope that it will be useful, = * + * but WITHOUT ANY WARRANTY; without even the implied warranty of = * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU = * + * Lesser General Public License for more details. = * + * = * + * You should have received a copy of the GNU Lesser General Public = * + * License along with this software; if not, write to the Free = * + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA = * + * 02110-1301 USA, or see the FSF site: http://www.fsf.org. = * + *************************************************************************= *****/ +package org.jboss.test.unit.pojo; + +import org.jboss.unit.api.pojo.annotations.Parameter; +import org.jboss.unit.api.pojo.annotations.Test; + +import java.util.Collections; + +/** + * @author Julien Viet + * @version $Revision: 1.1 $ + */ +public class MethodAndMethodArgumentAnnotatedWithParameter1 +{ + + @Parameter + public void setFoo(String foo) + { + POJOAssert.buffer1 =3D foo; + } + + @Test + public void testFoo(@Parameter(name=3D"foo") String foo) + { + POJOAssert.call(MethodAndMethodArgumentAnnotatedWithParameter1.class= , Collections.singletonMap("foo", POJOAssert.buffer1)); + } +} Added: modules/test/trunk/unit/src/main/org/jboss/test/unit/pojo/MethodAndM= ethodArgumentAnnotatedWithParameter2.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/test/unit/pojo/MethodAndMeth= odArgumentAnnotatedWithParameter2.java (rev 0) +++ modules/test/trunk/unit/src/main/org/jboss/test/unit/pojo/MethodAndMeth= odArgumentAnnotatedWithParameter2.java 2007-10-17 13:16:16 UTC (rev 8677) @@ -0,0 +1,52 @@ +/*************************************************************************= ***** + * JBoss, a division of Red Hat = * + * Copyright 2006, Red Hat Middleware, LLC, and individual = * + * contributors as indicated by the @authors tag. See the = * + * copyright.txt in the distribution for a full listing of = * + * individual contributors. = * + * = * + * This is free software; you can redistribute it and/or modify it = * + * under the terms of the GNU Lesser General Public License as = * + * published by the Free Software Foundation; either version 2.1 of = * + * the License, or (at your option) any later version. = * + * = * + * This software is distributed in the hope that it will be useful, = * + * but WITHOUT ANY WARRANTY; without even the implied warranty of = * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU = * + * Lesser General Public License for more details. = * + * = * + * You should have received a copy of the GNU Lesser General Public = * + * License along with this software; if not, write to the Free = * + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA = * + * 02110-1301 USA, or see the FSF site: http://www.fsf.org. = * + *************************************************************************= *****/ +package org.jboss.test.unit.pojo; + +import org.jboss.unit.api.pojo.annotations.Parameter; +import org.jboss.unit.api.pojo.annotations.Test; + +import java.util.Map; +import java.util.HashMap; + +/** + * @author Julien Viet + * @version $Revision: 1.1 $ + */ +public class MethodAndMethodArgumentAnnotatedWithParameter2 +{ + + @Parameter + public void setBar(String bar) + { + POJOAssert.buffer1 =3D bar; + } + + @Test + public void testFoo(@Parameter(name=3D"foo") String foo) + { + Map map =3D new HashMap(); + map.put("bar", POJOAssert.buffer1); + map.put("foo", foo); + POJOAssert.call(MethodAndMethodArgumentAnnotatedWithParameter2.class= , map); + } +} \ No newline at end of file Modified: modules/test/trunk/unit/src/main/org/jboss/unit/info/TestInfo.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/info/TestInfo.java 2007= -10-17 13:07:31 UTC (rev 8676) +++ modules/test/trunk/unit/src/main/org/jboss/unit/info/TestInfo.java 2007= -10-17 13:16:16 UTC (rev 8677) @@ -50,7 +50,9 @@ String getDescription(); = /** - * Return a map of parameters. + * Returns a map of parameters required to execute the test related to = this description. For a test case + * it returns a map of parameters to execute this test case. For a test= suite it returns a map + * formed by the union of the maps returned by the children of the test= suite. * * @return the parameters */ Modified: modules/test/trunk/unit/src/main/org/jboss/unit/spi/pojo/TestCase= Def.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/spi/pojo/TestCaseDef.ja= va 2007-10-17 13:07:31 UTC (rev 8676) +++ modules/test/trunk/unit/src/main/org/jboss/unit/spi/pojo/TestCaseDef.ja= va 2007-10-17 13:16:16 UTC (rev 8677) @@ -48,10 +48,10 @@ final String description; = /** . */ - final LinkedHashMap arguments; + final LinkedHashMap arguments; = /** . */ - final Map parameters; + final Map parameters; = /** . */ final Set keywords; Modified: modules/test/trunk/unit/src/main/org/jboss/unit/spi/pojo/TestProv= iderSupport.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/spi/pojo/TestProviderSu= pport.java 2007-10-17 13:07:31 UTC (rev 8676) +++ modules/test/trunk/unit/src/main/org/jboss/unit/spi/pojo/TestProviderSu= pport.java 2007-10-17 13:16:16 UTC (rev 8677) @@ -73,7 +73,7 @@ private final Method destroy; = /** . */ - final Map suiteParameters; + final Map propertyParameters; = /** . */ private final Constructor ctor; @@ -81,6 +81,9 @@ /** . */ private final Set suiteKeywords; = + /** . */ + final Map suiteParameters; + public TestProviderSupport(Class testClass) { if (testClass =3D=3D null) @@ -137,7 +140,7 @@ } = // - Map suiteParameters =3D new HashMap(); + Map propertyParameters =3D new HashMa= p(); Map testCases =3D new HashMap(); Method create =3D null; Method destroy =3D null; @@ -230,11 +233,11 @@ } = // - PropertyTestParameter parameter =3D suiteParameters.get(name); + PropertyTestParameter parameter =3D propertyParameters.get(nam= e); if (parameter =3D=3D null) { parameter =3D new PropertyTestParameter(name, description); - suiteParameters.put(name, parameter); + propertyParameters.put(name, parameter); } = // @@ -396,7 +399,8 @@ keywords.addAll(CollectionTools.set(tagMethodAnnotation.val= ue())); } = - Map parameters =3D new HashMap(suiteParameters); + // + Map parameters =3D new HashMap(propertyParameters); parameters.putAll(methodParameters); = // @@ -410,15 +414,26 @@ } } = - // + // Set the state computed from the annotations this.suiteName =3D suiteName; this.suiteDescription =3D suiteDescription; this.suiteKeywords =3D suiteKeywords; - this.suiteParameters =3D suiteParameters; + this.propertyParameters =3D propertyParameters; this.testCases =3D testCases; this.ctor =3D ctor; this.create =3D create; this.destroy =3D destroy; + + // Compute the suite parameters + Map suiteParameters =3D new HashMap(); + for (TestCaseDef testCase : testCases.values()) + { + suiteParameters.putAll(testCase.arguments); + } + suiteParameters.putAll(propertyParameters); + + // Set the state computed from the existing state + this.suiteParameters =3D suiteParameters; } = public TestSuiteDescriptor getDescriptor() @@ -493,7 +508,7 @@ testCase.parametrization =3D parametrization; = // - for (PropertyTestParameter parameter : suiteParameters.values()) + for (PropertyTestParameter parameter : propertyParameters.values()) { if (!parametrization.containsKey(parameter.getName())) { --===============8002207629692083803==-- From portal-commits at lists.jboss.org Wed Oct 17 09:35:21 2007 Content-Type: multipart/mixed; boundary="===============1252116027369324777==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8678 - in modules/test/trunk/unit/src/main/org/jboss: unit/info/impl and 1 other directory. Date: Wed, 17 Oct 2007 09:35:21 -0400 Message-ID: --===============1252116027369324777== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: julien(a)jboss.com Date: 2007-10-17 09:35:21 -0400 (Wed, 17 Oct 2007) New Revision: 8678 Modified: modules/test/trunk/unit/src/main/org/jboss/test/unit/info/InfoTests.java modules/test/trunk/unit/src/main/org/jboss/unit/info/impl/SimpleTestCase= Info.java modules/test/trunk/unit/src/main/org/jboss/unit/info/impl/SimpleTestInfo= .java modules/test/trunk/unit/src/main/org/jboss/unit/info/impl/SimpleTestSuit= eInfo.java Log: honor the contract defined by TestInfo.getParameters() for the SimpleTestSu= iteInfo implementation Modified: modules/test/trunk/unit/src/main/org/jboss/test/unit/info/InfoTes= ts.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/test/unit/info/InfoTests.jav= a 2007-10-17 13:16:16 UTC (rev 8677) +++ modules/test/trunk/unit/src/main/org/jboss/test/unit/info/InfoTests.jav= a 2007-10-17 13:35:21 UTC (rev 8678) @@ -49,8 +49,41 @@ testParameterInfo(); testTestCaseInfo(); testSuiteInfo(); + testSuiteParameterInfo(); } = + private static void testSuiteParameterInfo() + { + SimpleTestSuiteInfo testSuite =3D new SimpleTestSuiteInfo("my_test_s= uite"); + + // + SimpleTestCaseInfo fooTestCase =3D new SimpleTestCaseInfo("foo_test_= case"); + fooTestCase.addParameter(new SimpleParameterInfo("foo_param")); + testSuite.addTest(fooTestCase); + assertEquals(set("foo_param"), testSuite.getParameters().keySet()); + + // + SimpleTestCaseInfo barTestCase =3D new SimpleTestCaseInfo("bar_test_= case"); + barTestCase.addParameter(new SimpleParameterInfo("bar_param")); + testSuite.addTest(barTestCase); + assertEquals(set("foo_param", "bar_param"), testSuite.getParameters(= ).keySet()); + + // + barTestCase.addParameter(new SimpleParameterInfo("bar_param2")); + barTestCase.removeParameter("bar_param"); + barTestCase.addParameter(new SimpleParameterInfo("bar_param2")); + testSuite.addTest(barTestCase); + assertEquals(set("foo_param", "bar_param2"), testSuite.getParameters= ().keySet()); + + // + testSuite.removeTest("foo_test_case"); + assertEquals(set("bar_param2"), testSuite.getParameters().keySet()); + + // + testSuite.removeTest("bar_test_case"); + assertEquals(set(), testSuite.getParameters().keySet()); + } + private static void testParameterInfo() { try @@ -230,14 +263,6 @@ } try { - testSuite.setParameters(null); - fail(); - } - catch (IllegalArgumentException e) - { - } - try - { testSuite.getParameters().clear(); fail(); } Modified: modules/test/trunk/unit/src/main/org/jboss/unit/info/impl/SimpleT= estCaseInfo.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/info/impl/SimpleTestCas= eInfo.java 2007-10-17 13:16:16 UTC (rev 8677) +++ modules/test/trunk/unit/src/main/org/jboss/unit/info/impl/SimpleTestCas= eInfo.java 2007-10-17 13:35:21 UTC (rev 8678) @@ -23,7 +23,11 @@ package org.jboss.unit.info.impl; = import org.jboss.unit.info.TestCaseInfo; +import org.jboss.unit.info.ParameterInfo; = +import java.util.Map; +import java.util.HashMap; + /** * @author Julien Viet * @version $Revision: 1.1 $ @@ -44,4 +48,39 @@ { return getName(); } + + public void setParameters(Map paramete= rs) + { + if (parameters =3D=3D null) + { + throw new IllegalArgumentException(); + } + + // + Map tmp =3D new HashMap(); + for (Map.Entry entry : parameters.e= ntrySet()) + { + tmp.put(entry.getKey(), new SimpleParameterInfo(entry.getValue())= ); + } + this.parameters =3D tmp; + } + + public void addParameter(ParameterInfo parameter) + { + if (parameter =3D=3D null) + { + throw new IllegalArgumentException(); + } + SimpleParameterInfo tmp =3D new SimpleParameterInfo(parameter); + parameters.put(tmp.getName(), tmp); + } + + public void removeParameter(String name) + { + if (name =3D=3D null) + { + throw new IllegalArgumentException(); + } + parameters.remove(name); + } } Modified: modules/test/trunk/unit/src/main/org/jboss/unit/info/impl/SimpleT= estInfo.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/info/impl/SimpleTestInf= o.java 2007-10-17 13:16:16 UTC (rev 8677) +++ modules/test/trunk/unit/src/main/org/jboss/unit/info/impl/SimpleTestInf= o.java 2007-10-17 13:35:21 UTC (rev 8678) @@ -39,16 +39,16 @@ { = /** . */ - private final String name; + protected final String name; = /** . */ - private String description; + protected String description; = /** . */ - private Map parameters; + protected Map parameters; = /** . */ - private Set keywords; + protected Set keywords; = public SimpleTestInfo(String name) { @@ -105,41 +105,6 @@ return Collections.unmodifiableMap(parameters); } = - public void setParameters(Map paramete= rs) - { - if (parameters =3D=3D null) - { - throw new IllegalArgumentException(); - } - - // - Map tmp =3D new HashMap(); - for (Map.Entry entry : parameters.e= ntrySet()) - { - tmp.put(entry.getKey(), new SimpleParameterInfo(entry.getValue())= ); - } - this.parameters =3D tmp; - } - - public void addParameter(ParameterInfo parameter) - { - if (parameter =3D=3D null) - { - throw new IllegalArgumentException(); - } - SimpleParameterInfo tmp =3D new SimpleParameterInfo(parameter); - parameters.put(tmp.getName(), tmp); - } - - public void removeParameter(String name) - { - if (name =3D=3D null) - { - throw new IllegalArgumentException(); - } - parameters.remove(name); - } - public Set getKeywords() { return Collections.unmodifiableSet(keywords); Modified: modules/test/trunk/unit/src/main/org/jboss/unit/info/impl/SimpleT= estSuiteInfo.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/info/impl/SimpleTestSui= teInfo.java 2007-10-17 13:16:16 UTC (rev 8677) +++ modules/test/trunk/unit/src/main/org/jboss/unit/info/impl/SimpleTestSui= teInfo.java 2007-10-17 13:35:21 UTC (rev 8678) @@ -119,6 +119,9 @@ throw new IllegalArgumentException(); } tests.put(test.getName(), create(test)); + + // Update parameter map + updateParameters(); } = public void removeTest(String testName) @@ -128,8 +131,24 @@ throw new IllegalArgumentException(); } tests.remove(testName); + + // Update parameter map + updateParameters(); } = + /** + * Rebuild the suite parameters from the children parameters. + */ + private void updateParameters() + { + Map parameters =3D new HashMap(); + for (SimpleTestInfo child : tests.values()) + { + parameters.putAll(child.parameters); + } + this.parameters =3D parameters; + } + private SimpleTestInfo create(TestInfo test) { if (test instanceof TestSuiteInfo) --===============1252116027369324777==-- From portal-commits at lists.jboss.org Wed Oct 17 09:38:34 2007 Content-Type: multipart/mixed; boundary="===============0094120429613709370==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8679 - modules/identity/trunk/sso. Date: Wed, 17 Oct 2007 09:38:34 -0400 Message-ID: --===============0094120429613709370== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: bdaw Date: 2007-10-17 09:38:34 -0400 (Wed, 17 Oct 2007) New Revision: 8679 Modified: modules/identity/trunk/sso/build.xml Log: - missing classpath Modified: modules/identity/trunk/sso/build.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/identity/trunk/sso/build.xml 2007-10-17 13:35:21 UTC (rev 8678) +++ modules/identity/trunk/sso/build.xml 2007-10-17 13:38:34 UTC (rev 8679) @@ -95,7 +95,7 @@ - + = = --===============0094120429613709370==-- From portal-commits at lists.jboss.org Wed Oct 17 09:54:40 2007 Content-Type: multipart/mixed; boundary="===============2538413488489323156==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8680 - in modules/test/trunk/unit/src: main/org/jboss/test/unit/sample and 2 other directories. Date: Wed, 17 Oct 2007 09:54:40 -0400 Message-ID: --===============2538413488489323156== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: julien(a)jboss.com Date: 2007-10-17 09:54:39 -0400 (Wed, 17 Oct 2007) New Revision: 8680 Added: modules/test/trunk/unit/src/main/org/jboss/test/unit/sample/ modules/test/trunk/unit/src/main/org/jboss/test/unit/sample/SampleTests.= java modules/test/trunk/unit/src/resources/test/org/jboss/test/unit/sample/ Removed: modules/test/trunk/unit/src/main/org/jboss/test/unit/sample/BlahTestTwo.= java modules/test/trunk/unit/src/main/org/jboss/test/unit/sample/BlahTests.ja= va modules/test/trunk/unit/src/resources/test/org/jboss/test/unit/blah/ Modified: modules/test/trunk/unit/src/main/org/jboss/test/unit/AllTests.java modules/test/trunk/unit/src/main/org/jboss/test/unit/sample/TestedClass1= .java modules/test/trunk/unit/src/main/org/jboss/test/unit/sample/TestedClass2= .java modules/test/trunk/unit/src/resources/test/org/jboss/test/unit/sample/f1= .xml Log: renamed the "blah" to "sample" Modified: modules/test/trunk/unit/src/main/org/jboss/test/unit/AllTests.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/test/unit/AllTests.java 2007= -10-17 13:38:34 UTC (rev 8679) +++ modules/test/trunk/unit/src/main/org/jboss/test/unit/AllTests.java 2007= -10-17 13:54:39 UTC (rev 8680) @@ -23,8 +23,7 @@ package org.jboss.test.unit; = import org.jboss.test.unit.api.AssertTests; -import org.jboss.test.unit.blah.BlahTestTwo; -import org.jboss.test.unit.blah.BlahTests; +import org.jboss.test.unit.sample.SampleTests; import org.jboss.test.unit.pojo.AbstractPOJOTests; import org.jboss.test.unit.pojo.junit.JUnitPOJOTests; import org.jboss.test.unit.report.junit.JUnitReporterTests; @@ -68,12 +67,9 @@ InfoTests.main(args); = // - BlahTests.main(args); + SampleTests.main(args); = // - BlahTestTwo.main(args); - - // JUnitReporterTests.main(args); } } Copied: modules/test/trunk/unit/src/main/org/jboss/test/unit/sample (from r= ev 8670, modules/test/trunk/unit/src/main/org/jboss/test/unit/blah) Deleted: modules/test/trunk/unit/src/main/org/jboss/test/unit/sample/BlahTe= stTwo.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/test/unit/blah/BlahTestTwo.j= ava 2007-10-16 15:05:25 UTC (rev 8670) +++ modules/test/trunk/unit/src/main/org/jboss/test/unit/sample/BlahTestTwo= .java 2007-10-17 13:54:39 UTC (rev 8680) @@ -1,65 +0,0 @@ -/*************************************************************************= ***** - * JBoss, a division of Red Hat = * - * Copyright 2006, Red Hat Middleware, LLC, and individual = * - * contributors as indicated by the @authors tag. See the = * - * copyright.txt in the distribution for a full listing of = * - * individual contributors. = * - * = * - * This is free software; you can redistribute it and/or modify it = * - * under the terms of the GNU Lesser General Public License as = * - * published by the Free Software Foundation; either version 2.1 of = * - * the License, or (at your option) any later version. = * - * = * - * This software is distributed in the hope that it will be useful, = * - * but WITHOUT ANY WARRANTY; without even the implied warranty of = * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU = * - * Lesser General Public License for more details. = * - * = * - * You should have received a copy of the GNU Lesser General Public = * - * License along with this software; if not, write to the Free = * - * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA = * - * 02110-1301 USA, or see the FSF site: http://www.fsf.org. = * - *************************************************************************= *****/ -package org.jboss.test.unit.blah; - -import java.io.InputStream; - -import org.jboss.unit.report.impl.junit.JUnitReporter; -import org.jboss.unit.report.impl.writer.PrintListener; -import org.jboss.unit.runner.TestRunner; -import org.jboss.unit.runner.TestRunnerEventListener; -import org.jboss.unit.runner.impl.TestRunnerEventBroadcaster; -import org.jboss.unit.runner.impl.TestRunnerContextSupport; -import org.jboss.unit.runner.model.ModelBuilder; -import org.jboss.unit.runner.model.TestSuiteDef; -import org.xml.sax.InputSource; - -/** - * @author Emanuel Muckenhuber - * @version $Revision$ - */ -public class BlahTestTwo -{ - - public static void main(String[] args) throws Exception - { - - InputStream in =3D BlahTests.class.getResourceAsStream("f1.xml"); - InputSource source =3D new InputSource(in); - ModelBuilder builder =3D new ModelBuilder(source); - TestSuiteDef suite =3D builder.build(); - - TestRunner runner =3D suite.createRunner(); - - TestRunnerEventListener junitReporter =3D new JUnitReporter("output"= , BlahTestTwo.class.getName()); - // add listeners - - TestRunnerEventBroadcaster broadcaster =3D new TestRunnerEventBroadc= aster(); - broadcaster.addListener(junitReporter); - broadcaster.addListener(new PrintListener()); - - // run the test - runner.run(new TestRunnerContextSupport(broadcaster)); - - } -} Deleted: modules/test/trunk/unit/src/main/org/jboss/test/unit/sample/BlahTe= sts.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/test/unit/blah/BlahTests.jav= a 2007-10-16 15:05:25 UTC (rev 8670) +++ modules/test/trunk/unit/src/main/org/jboss/test/unit/sample/BlahTests.j= ava 2007-10-17 13:54:39 UTC (rev 8680) @@ -1,59 +0,0 @@ -/*************************************************************************= ***** - * JBoss, a division of Red Hat = * - * Copyright 2006, Red Hat Middleware, LLC, and individual = * - * contributors as indicated by the @authors tag. See the = * - * copyright.txt in the distribution for a full listing of = * - * individual contributors. = * - * = * - * This is free software; you can redistribute it and/or modify it = * - * under the terms of the GNU Lesser General Public License as = * - * published by the Free Software Foundation; either version 2.1 of = * - * the License, or (at your option) any later version. = * - * = * - * This software is distributed in the hope that it will be useful, = * - * but WITHOUT ANY WARRANTY; without even the implied warranty of = * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU = * - * Lesser General Public License for more details. = * - * = * - * You should have received a copy of the GNU Lesser General Public = * - * License along with this software; if not, write to the Free = * - * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA = * - * 02110-1301 USA, or see the FSF site: http://www.fsf.org. = * - *************************************************************************= *****/ -package org.jboss.test.unit.blah; - -import org.jboss.unit.report.impl.writer.PrintListener; -import org.jboss.unit.runner.TestRunner; -import org.jboss.unit.runner.impl.TestRunnerEventBroadcaster; -import org.jboss.unit.runner.impl.TestRunnerContextSupport; -import org.jboss.unit.runner.model.ModelBuilder; -import org.jboss.unit.runner.model.TestSuiteDef; -import org.xml.sax.InputSource; - -import java.io.InputStream; - -/** - * @author Julien Viet - * @version $Revision: 1.1 $ - */ -public class BlahTests -{ - - public static void main(String[] args) throws Exception - { - - InputStream in =3D BlahTests.class.getResourceAsStream("f1.xml"); - InputSource source =3D new InputSource(in); - ModelBuilder builder =3D new ModelBuilder(source); - TestSuiteDef suite =3D builder.build(); - - TestRunner runner =3D suite.createRunner(); - - TestRunnerEventBroadcaster broadcaster =3D new TestRunnerEventBroadc= aster(); - broadcaster.addListener(new PrintListener()); - - runner.run(new TestRunnerContextSupport(broadcaster)); - - } - -} Added: modules/test/trunk/unit/src/main/org/jboss/test/unit/sample/SampleTe= sts.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/test/unit/sample/SampleTests= .java (rev 0) +++ modules/test/trunk/unit/src/main/org/jboss/test/unit/sample/SampleTests= .java 2007-10-17 13:54:39 UTC (rev 8680) @@ -0,0 +1,92 @@ +/*************************************************************************= ***** + * JBoss, a division of Red Hat = * + * Copyright 2006, Red Hat Middleware, LLC, and individual = * + * contributors as indicated by the @authors tag. See the = * + * copyright.txt in the distribution for a full listing of = * + * individual contributors. = * + * = * + * This is free software; you can redistribute it and/or modify it = * + * under the terms of the GNU Lesser General Public License as = * + * published by the Free Software Foundation; either version 2.1 of = * + * the License, or (at your option) any later version. = * + * = * + * This software is distributed in the hope that it will be useful, = * + * but WITHOUT ANY WARRANTY; without even the implied warranty of = * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU = * + * Lesser General Public License for more details. = * + * = * + * You should have received a copy of the GNU Lesser General Public = * + * License along with this software; if not, write to the Free = * + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA = * + * 02110-1301 USA, or see the FSF site: http://www.fsf.org. = * + *************************************************************************= *****/ +package org.jboss.test.unit.sample; + +import org.jboss.unit.report.impl.writer.PrintListener; +import org.jboss.unit.report.impl.junit.JUnitReporter; +import org.jboss.unit.runner.TestRunner; +import org.jboss.unit.runner.TestRunnerEventListener; +import org.jboss.unit.runner.impl.TestRunnerEventBroadcaster; +import org.jboss.unit.runner.impl.TestRunnerContextSupport; +import org.jboss.unit.runner.model.ModelBuilder; +import org.jboss.unit.runner.model.TestSuiteDef; +import org.jboss.unit.runner.model.BuilderException; +import org.xml.sax.InputSource; +import org.xml.sax.SAXException; + +import javax.xml.parsers.ParserConfigurationException; +import java.io.InputStream; +import java.io.IOException; + +/** + * @author Julien Viet + * @version $Revision: 1.1 $ + */ +public class SampleTests +{ + + public static void main(String[] args) throws Exception + { + + test1(); + test2(); + + } + + private static void test1() + throws ParserConfigurationException, IOException, SAXException, Buil= derException + { + InputStream in =3D SampleTests.class.getResourceAsStream("f1.xml"); + InputSource source =3D new InputSource(in); + ModelBuilder builder =3D new ModelBuilder(source); + TestSuiteDef suite =3D builder.build(); + + TestRunner runner =3D suite.createRunner(); + + TestRunnerEventBroadcaster broadcaster =3D new TestRunnerEventBroadc= aster(); + broadcaster.addListener(new PrintListener()); + + runner.run(new TestRunnerContextSupport(broadcaster)); + } + + private static void test2() + throws ParserConfigurationException, IOException, SAXException, Buil= derException + { + InputStream in =3D SampleTests.class.getResourceAsStream("f1.xml"); + InputSource source =3D new InputSource(in); + ModelBuilder builder =3D new ModelBuilder(source); + TestSuiteDef suite =3D builder.build(); + + TestRunner runner =3D suite.createRunner(); + + TestRunnerEventListener junitReporter =3D new JUnitReporter("output"= , SampleTests.class.getName()); + // add listeners + + TestRunnerEventBroadcaster broadcaster =3D new TestRunnerEventBroadc= aster(); + broadcaster.addListener(junitReporter); + broadcaster.addListener(new PrintListener()); + + // run the test + runner.run(new TestRunnerContextSupport(broadcaster)); + } +} Modified: modules/test/trunk/unit/src/main/org/jboss/test/unit/sample/Teste= dClass1.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/test/unit/blah/TestedClass1.= java 2007-10-16 15:05:25 UTC (rev 8670) +++ modules/test/trunk/unit/src/main/org/jboss/test/unit/sample/TestedClass= 1.java 2007-10-17 13:54:39 UTC (rev 8680) @@ -20,7 +20,7 @@ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA = * * 02110-1301 USA, or see the FSF site: http://www.fsf.org. = * *************************************************************************= *****/ -package org.jboss.test.unit.blah; +package org.jboss.test.unit.sample; = import org.jboss.unit.api.pojo.annotations.Test; = Modified: modules/test/trunk/unit/src/main/org/jboss/test/unit/sample/Teste= dClass2.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/test/unit/blah/TestedClass2.= java 2007-10-16 15:05:25 UTC (rev 8670) +++ modules/test/trunk/unit/src/main/org/jboss/test/unit/sample/TestedClass= 2.java 2007-10-17 13:54:39 UTC (rev 8680) @@ -20,7 +20,7 @@ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA = * * 02110-1301 USA, or see the FSF site: http://www.fsf.org. = * *************************************************************************= *****/ -package org.jboss.test.unit.blah; +package org.jboss.test.unit.sample; = import static org.jboss.unit.api.Assert.assertEquals; import org.jboss.unit.api.pojo.annotations.Parameter; Copied: modules/test/trunk/unit/src/resources/test/org/jboss/test/unit/samp= le (from rev 8670, modules/test/trunk/unit/src/resources/test/org/jboss/tes= t/unit/blah) Modified: modules/test/trunk/unit/src/resources/test/org/jboss/test/unit/sa= mple/f1.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/resources/test/org/jboss/test/unit/blah/f1.= xml 2007-10-16 15:05:25 UTC (rev 8670) +++ modules/test/trunk/unit/src/resources/test/org/jboss/test/unit/sample/f= 1.xml 2007-10-17 13:54:39 UTC (rev 8680) @@ -5,15 +5,15 @@ xsi:schemaLocation=3D"urn:jboss:jboss-unit:1.0 jboss-unit_1_0.xsd"> - + - + - + foo --===============2538413488489323156==-- From portal-commits at lists.jboss.org Wed Oct 17 09:57:21 2007 Content-Type: multipart/mixed; boundary="===============0429445275138842607==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8681 - modules/test/trunk/unit/src/main/org/jboss/unit/api/pojo/annotations. Date: Wed, 17 Oct 2007 09:57:21 -0400 Message-ID: --===============0429445275138842607== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: julien(a)jboss.com Date: 2007-10-17 09:57:21 -0400 (Wed, 17 Oct 2007) New Revision: 8681 Removed: modules/test/trunk/unit/src/main/org/jboss/unit/api/pojo/annotations/Def= aultValues.java Log: for now removed the @DefaultValues annodations as it is not implemented Deleted: modules/test/trunk/unit/src/main/org/jboss/unit/api/pojo/annotatio= ns/DefaultValues.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/api/pojo/annotations/De= faultValues.java 2007-10-17 13:54:39 UTC (rev 8680) +++ modules/test/trunk/unit/src/main/org/jboss/unit/api/pojo/annotations/De= faultValues.java 2007-10-17 13:57:21 UTC (rev 8681) @@ -1,34 +0,0 @@ -/*************************************************************************= ***** - * JBoss, a division of Red Hat = * - * Copyright 2006, Red Hat Middleware, LLC, and individual = * - * contributors as indicated by the @authors tag. See the = * - * copyright.txt in the distribution for a full listing of = * - * individual contributors. = * - * = * - * This is free software; you can redistribute it and/or modify it = * - * under the terms of the GNU Lesser General Public License as = * - * published by the Free Software Foundation; either version 2.1 of = * - * the License, or (at your option) any later version. = * - * = * - * This software is distributed in the hope that it will be useful, = * - * but WITHOUT ANY WARRANTY; without even the implied warranty of = * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU = * - * Lesser General Public License for more details. = * - * = * - * You should have received a copy of the GNU Lesser General Public = * - * License along with this software; if not, write to the Free = * - * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA = * - * 02110-1301 USA, or see the FSF site: http://www.fsf.org. = * - *************************************************************************= *****/ -package org.jboss.unit.api.pojo.annotations; - -/** - * Not used yet. - * - * @author Julien Viet - * @version $Revision: 1.1 $ - */ -public @interface DefaultValues -{ - String[] values() default {}; -} --===============0429445275138842607==-- From portal-commits at lists.jboss.org Wed Oct 17 09:58:54 2007 Content-Type: multipart/mixed; boundary="===============7737462818006889979==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8682 - modules/test/trunk/unit/src/main/org/jboss/test/unit. Date: Wed, 17 Oct 2007 09:58:54 -0400 Message-ID: --===============7737462818006889979== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: julien(a)jboss.com Date: 2007-10-17 09:58:54 -0400 (Wed, 17 Oct 2007) New Revision: 8682 Removed: modules/test/trunk/unit/src/main/org/jboss/test/unit/blah/ Log: doing some cleanup not done by idea --===============7737462818006889979==-- From portal-commits at lists.jboss.org Wed Oct 17 11:08:55 2007 Content-Type: multipart/mixed; boundary="===============2827859513803956016==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8683 - in modules/test/trunk/unit/src/main/org/jboss: unit/report/impl/junit and 1 other directory. Date: Wed, 17 Oct 2007 11:08:55 -0400 Message-ID: --===============2827859513803956016== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: emuckenhuber Date: 2007-10-17 11:08:55 -0400 (Wed, 17 Oct 2007) New Revision: 8683 Modified: modules/test/trunk/unit/src/main/org/jboss/test/unit/report/junit/JUnitR= eporterTests.java modules/test/trunk/unit/src/main/org/jboss/unit/report/impl/junit/JUnitR= eporter.java modules/test/trunk/unit/src/main/org/jboss/unit/report/impl/junit/JUnitT= estReport.java Log: - display also the class name in the testcase name - fixed the testcase time (now in seconds instead of milliseconds) Modified: modules/test/trunk/unit/src/main/org/jboss/test/unit/report/junit= /JUnitReporterTests.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/test/unit/report/junit/JUnit= ReporterTests.java 2007-10-17 13:58:54 UTC (rev 8682) +++ modules/test/trunk/unit/src/main/org/jboss/test/unit/report/junit/JUnit= ReporterTests.java 2007-10-17 15:08:55 UTC (rev 8683) @@ -53,6 +53,7 @@ testTestSuite(); testTestCase(); testTestCaseFailure(); + testTestCaseClass(); } = private static void testTestSuite() @@ -89,7 +90,10 @@ Assert.assertEquals("fehler", error.getAttribute(ATTR_MESSAGE)); } = - = + /** + * Successful testCase + * + */ private static void testTestCase() { MyTestReport report =3D new MyTestReport(testSuiteName); @@ -114,11 +118,48 @@ Element testCase =3D child(e, TESTCASE); Assert.assertEquals(TESTCASE, testCase.getNodeName()); Assert.assertEquals("foo", testCase.getAttribute(ATTR_NAME)); - Assert.assertEquals("20", testCase.getAttribute(ATTR_TIME)); + Assert.assertEquals("0.02", testCase.getAttribute(ATTR_TIME)); = Assert.assertNull(child(e, ERROR)); } = + /** + * Successful testCase with class info + * + */ + private static void testTestCaseClass() + { + MyTestReport report =3D new MyTestReport(testSuiteName); + report.startTestSuite(new StartRunnerEvent()); + = + // Set current tested class name + report.setCurrentTestedClassName("org.jboss.portal.test.testedClass1= "); + = + TestId testId =3D new TestId("foo"); + StartTestCaseEvent startTestEvent =3D new StartTestCaseEvent(testId,= new MyTestInfo()); + report.startTest(startTestEvent); + = + TestResult testResult =3D new TestSuccess(20); + EndTestCaseEvent endTestEvent =3D new EndTestCaseEvent(testId, testR= esult); + report.endTest(endTestEvent); + // end report + report.endTestSuite(new EndRunnerEvent()); + Element e =3D report.getRootElement(); + = + Assert.assertEquals(TESTSUITE, e.getNodeName()); + Assert.assertEquals("1", e.getAttribute(ATTR_TESTS)); + Assert.assertEquals("0", e.getAttribute(ATTR_ERRORS)); + Assert.assertEquals("0", e.getAttribute(ATTR_FAILURES)); + = + Element testCase =3D child(e, TESTCASE); + Assert.assertEquals(TESTCASE, testCase.getNodeName()); + Assert.assertEquals("org.jboss.portal.test.testedClass1.foo", testCa= se.getAttribute(ATTR_NAME)); + Assert.assertEquals("0.02", testCase.getAttribute(ATTR_TIME)); + = + Assert.assertNull(child(e, ERROR)); + } + = + = private static void testTestCaseFailure() { MyTestReport report =3D new MyTestReport(testSuiteName); @@ -144,7 +185,7 @@ Element testCase =3D child(e, TESTCASE); Assert.assertEquals(TESTCASE, testCase.getNodeName()); Assert.assertEquals("foo", testCase.getAttribute(ATTR_NAME)); - Assert.assertEquals("20", testCase.getAttribute(ATTR_TIME)); + Assert.assertEquals("0.02", testCase.getAttribute(ATTR_TIME)); = Element error =3D child(testCase, FAILURE); Assert.assertEquals("expecting something different.", error.getAttri= bute(ATTR_MESSAGE)); Modified: modules/test/trunk/unit/src/main/org/jboss/unit/report/impl/junit= /JUnitReporter.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/report/impl/junit/JUnit= Reporter.java 2007-10-17 13:58:54 UTC (rev 8682) +++ modules/test/trunk/unit/src/main/org/jboss/unit/report/impl/junit/JUnit= Reporter.java 2007-10-17 15:08:55 UTC (rev 8683) @@ -34,6 +34,7 @@ import org.jboss.unit.runner.event.RunnerFailureEvent; import org.jboss.unit.runner.event.StartRunnerEvent; import org.jboss.unit.runner.event.StartTestCaseEvent; +import org.jboss.unit.runner.event.StartTestSuiteEvent; = /** * @@ -99,6 +100,10 @@ { report.runnerFailed((RunnerFailureEvent) event); } + else if (event instanceof StartTestSuiteEvent) + { + report.setCurrentTestedClassName(((StartTestSuiteEvent) event).ge= tTestInfo().getName()); + } else if (event instanceof StartTestCaseEvent) { report.startTest((StartTestCaseEvent) event); Modified: modules/test/trunk/unit/src/main/org/jboss/unit/report/impl/junit= /JUnitTestReport.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/report/impl/junit/JUnit= TestReport.java 2007-10-17 13:58:54 UTC (rev 8682) +++ modules/test/trunk/unit/src/main/org/jboss/unit/report/impl/junit/JUnit= TestReport.java 2007-10-17 15:08:55 UTC (rev 8683) @@ -30,6 +30,7 @@ import java.io.Writer; import java.net.InetAddress; import java.net.UnknownHostException; +import java.text.NumberFormat; import java.text.SimpleDateFormat; import java.util.Date; import java.util.HashMap; @@ -58,6 +59,7 @@ import org.jboss.unit.runner.event.RunnerFailureEvent; import org.jboss.unit.runner.event.StartRunnerEvent; import org.jboss.unit.runner.event.StartTestCaseEvent; +import org.jboss.unit.runner.event.StartTestSuiteEvent; import org.jboss.unit.runner.results.TestFailure; import org.w3c.dom.Document; import org.w3c.dom.Element; @@ -100,8 +102,14 @@ /** The failed count */ private int failed; = + /** The timeStamp */ private String timeStamp; + = + /** The current testSuiteName */ + private String currentTestedClassName; = + /** .*/ + private NumberFormat FORMAT =3D NumberFormat.getInstance(); = public JUnitTestReport() { @@ -129,6 +137,11 @@ */ } = + public void setCurrentTestedClassName(String testedClassName) + { + this.currentTestedClassName =3D testedClassName; + } + = public void startTest(StartTestCaseEvent event) { = this.startedTests.put(event.getTestId(), event.getTestInfo()); @@ -156,6 +169,13 @@ Element test =3D document.createElement(XMLConstants.TESTCASE); /** The testcase name */ StringBuffer nb =3D new StringBuffer(); + /** The current tested Class */ + if (this.currentTestedClassName !=3D null) + { + nb.append(this.currentTestedClassName); + nb.append("."); = + } + /** TestId */ for(int i =3D 0; i < testId.getLength(); i ++) { if (i > 0) @@ -165,6 +185,7 @@ nb.append(testId.getName(i)); } String testName =3D nb.toString(); + = /** The testcase parameters */ StringBuffer parameters =3D new StringBuffer(); for(Iterator i =3D result.getParametrization().keySet().iter= ator(); i.hasNext(); ) @@ -181,9 +202,10 @@ if ( parameters.length() > 0) testName =3D testName + "?" + parameters.toString(); = + = /** Test case attributes */ test.setAttribute(XMLConstants.ATTR_NAME, testName); - test.setAttribute(XMLConstants.ATTR_TIME, new Long(result.getDuratio= nMillis()).toString()); + test.setAttribute(XMLConstants.ATTR_TIME, FORMAT.format(result.getDu= rationMillis() / 1000.0)); /** Check if test was started */ TestInfo info =3D this.startedTests.get(testId); if ( info !=3D null) --===============2827859513803956016==-- From portal-commits at lists.jboss.org Wed Oct 17 12:42:22 2007 Content-Type: multipart/mixed; boundary="===============1019248992408568113==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8684 - modules/test/trunk/unit/src/main/org/jboss/unit/report/impl/writer. Date: Wed, 17 Oct 2007 12:38:22 -0400 Message-ID: --===============1019248992408568113== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: julien(a)jboss.com Date: 2007-10-17 12:38:22 -0400 (Wed, 17 Oct 2007) New Revision: 8684 Modified: modules/test/trunk/unit/src/main/org/jboss/unit/report/impl/writer/Print= Listener.java Log: correct minor bug in PrintListener Modified: modules/test/trunk/unit/src/main/org/jboss/unit/report/impl/write= r/PrintListener.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/report/impl/writer/Prin= tListener.java 2007-10-17 15:08:55 UTC (rev 8683) +++ modules/test/trunk/unit/src/main/org/jboss/unit/report/impl/writer/Prin= tListener.java 2007-10-17 16:38:22 UTC (rev 8684) @@ -134,6 +134,10 @@ StartTestSuiteEvent stse =3D (StartTestSuiteEvent)event; stack.add(new SuiteStat(stse.getTestInfo().getName())); } + else if (event instanceof EndTestSuiteEvent) + { + stack.removeLast(); + } else if (event instanceof StartTestCaseEvent) { StartTestCaseEvent ste =3D (StartTestCaseEvent)event; --===============1019248992408568113==-- From portal-commits at lists.jboss.org Wed Oct 17 12:52:31 2007 Content-Type: multipart/mixed; boundary="===============1812672913727175354==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8685 - modules/test/trunk/unit/src/main/org/jboss/unit/report/impl/writer. Date: Wed, 17 Oct 2007 12:48:31 -0400 Message-ID: --===============1812672913727175354== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: julien(a)jboss.com Date: 2007-10-17 12:48:30 -0400 (Wed, 17 Oct 2007) New Revision: 8685 Modified: modules/test/trunk/unit/src/main/org/jboss/unit/report/impl/writer/Print= Listener.java Log: rollback my previous commit Modified: modules/test/trunk/unit/src/main/org/jboss/unit/report/impl/write= r/PrintListener.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/report/impl/writer/Prin= tListener.java 2007-10-17 16:38:22 UTC (rev 8684) +++ modules/test/trunk/unit/src/main/org/jboss/unit/report/impl/writer/Prin= tListener.java 2007-10-17 16:48:30 UTC (rev 8685) @@ -134,10 +134,6 @@ StartTestSuiteEvent stse =3D (StartTestSuiteEvent)event; stack.add(new SuiteStat(stse.getTestInfo().getName())); } - else if (event instanceof EndTestSuiteEvent) - { - stack.removeLast(); - } else if (event instanceof StartTestCaseEvent) { StartTestCaseEvent ste =3D (StartTestCaseEvent)event; --===============1812672913727175354==-- From portal-commits at lists.jboss.org Thu Oct 18 02:17:02 2007 Content-Type: multipart/mixed; boundary="===============1626462017227291674==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8686 - in branches/UIServer: core/src/resources/portal-core-sar/META-INF and 11 other directories. Date: Thu, 18 Oct 2007 02:17:02 -0400 Message-ID: --===============1626462017227291674== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: sohil.shah(a)jboss.com Date: 2007-10-18 02:17:01 -0400 (Thu, 18 Oct 2007) New Revision: 8686 Added: branches/UIServer/uiserver/src/main/org/jboss/portal/uiserver/ajax/clien= t/Portal.java branches/UIServer/uiserver/src/main/org/jboss/portal/uiserver/service/GW= TClientFilter.java branches/UIServer/uiserver/src/main/org/jboss/portal/uiserver/service/Po= rtalEntryPoint.java branches/UIServer/uiserver/src/resources/client/ajax/src/org/jboss/porta= l/uiserver/ajax/Portal.gwt.xml branches/UIServer/uiserver/src/resources/client/ajax/src/org/jboss/porta= l/uiserver/ajax/public/index.html branches/UIServer/uiserver/src/resources/portal-uiserver.sar/ branches/UIServer/uiserver/src/resources/portal-uiserver.sar/META-INF/ branches/UIServer/uiserver/src/resources/portal-uiserver.sar/META-INF/jb= oss-service.xml branches/UIServer/uiserver/src/resources/portal-uiserver.war/ branches/UIServer/uiserver/src/resources/portal-uiserver.war/WEB-INF/ branches/UIServer/uiserver/src/resources/portal-uiserver.war/WEB-INF/jbo= ss-web.xml branches/UIServer/uiserver/src/resources/portal-uiserver.war/WEB-INF/web= .xml branches/UIServer/uiserver/src/resources/portal-uiserver.war/asyncPages.= html branches/UIServer/uiserver/src/resources/portal-uiserver.war/layout.html branches/UIServer/uiserver/src/resources/portal-uiserver.war/partialRefr= esh.html Removed: branches/UIServer/uiserver/src/resources/client/ajax/uiserver-poc.war/ Modified: branches/UIServer/core/build.xml branches/UIServer/core/src/resources/portal-core-sar/META-INF/jboss-serv= ice.xml branches/UIServer/uiserver/build.xml branches/UIServer/uiserver/src/main/org/jboss/portal/uiserver/service/Po= rtletServiceImpl.java branches/UIServer/uiserver/src/main/org/jboss/portal/uiserver/service/UI= Server.java Log: First pass of integrating a GWT-based AJAX client with PF (PF=3DPresentatio= n Framework). Code still raw. Mainly trying to backup code before leaving t= own. Modified: branches/UIServer/core/build.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/UIServer/core/build.xml 2007-10-17 16:48:30 UTC (rev 8685) +++ branches/UIServer/core/build.xml 2007-10-18 06:17:01 UTC (rev 8686) @@ -348,7 +348,7 @@ - + = = = @@ -380,19 +380,16 @@ = - - - - - - - - - - - - - + = + + + + + + + + + = @@ -745,6 +742,7 @@ --> = + Modified: branches/UIServer/core/src/resources/portal-core-sar/META-INF/jbo= ss-service.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/UIServer/core/src/resources/portal-core-sar/META-INF/jboss-ser= vice.xml 2007-10-17 16:48:30 UTC (rev 8685) +++ branches/UIServer/core/src/resources/portal-core-sar/META-INF/jboss-ser= vice.xml 2007-10-18 06:17:01 UTC (rev 8686) @@ -1128,26 +1128,7 @@ portal:service=3DContentProviderRegistry portal:service=3DResponseHandler,type=3DSelector portal:service=3DControlPolicy,type=3DPage -
- - - portal:container=3DPortalObjectReader - portal:service=3DProcessor - portal:service=3DPageService - portal:commandFactory=3DDefaultPortal - portal:urlFactory=3DDelegating - portal:service=3DInterceptorStackFactory,type=3DCommand = - portal:container=3DInstance - portal:service=3DPortalAuthorizationManagerFactory - portal:service=3DCustomizationManager - portal:service=3DContentProviderRegistry - portal:service=3DResponseHandler,type=3DSelector - portal:service=3DControlPolicy,type=3DPage - + = = = Modified: branches/UIServer/uiserver/build.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/UIServer/uiserver/build.xml 2007-10-17 16:48:30 UTC (rev 8685) +++ branches/UIServer/uiserver/build.xml 2007-10-18 06:17:01 UTC (rev 8686) @@ -210,7 +210,60 @@ = - = + = + = + + + + = + + + + + + + + + = + + + + + + + + = + = + + + + + + + + = = + = @@ -246,47 +299,5 @@ = - = - - - - - - - - - - - - = - - - - - - - - - - = - - - - - - - - - - = - - - = - - - - = - - = - + = Added: branches/UIServer/uiserver/src/main/org/jboss/portal/uiserver/ajax/c= lient/Portal.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/UIServer/uiserver/src/main/org/jboss/portal/uiserver/ajax/clie= nt/Portal.java (rev 0) +++ branches/UIServer/uiserver/src/main/org/jboss/portal/uiserver/ajax/clie= nt/Portal.java 2007-10-18 06:17:01 UTC (rev 8686) @@ -0,0 +1,429 @@ +package org.jboss.portal.uiserver.ajax.client; + + +import com.google.gwt.core.client.GWT; +import com.google.gwt.core.client.EntryPoint; + +import com.google.gwt.user.client.DOM; +import com.google.gwt.user.client.Element; +import com.google.gwt.user.client.Event; +import com.google.gwt.user.client.HTTPRequest; +import com.google.gwt.user.client.ResponseTextHandler; +import com.google.gwt.user.client.ui.HTML; +import com.google.gwt.user.client.ui.Widget; +import com.google.gwt.user.client.ui.Panel; +import com.google.gwt.user.client.ui.RootPanel; +import com.google.gwt.user.client.ui.HorizontalPanel; +import com.google.gwt.user.client.ui.VerticalPanel; +import com.google.gwt.user.client.ui.Button; +import com.google.gwt.user.client.ui.ClickListener; +import com.google.gwt.user.client.ui.TabBar; +import com.google.gwt.user.client.ui.TabListener; +import com.google.gwt.user.client.ui.SourcesTabEvents; + +import com.google.gwt.user.client.rpc.ServiceDefTarget; +import com.google.gwt.user.client.rpc.AsyncCallback; + +/** + * Entry point classes define onModuleLoad(). + */ +public class Portal implements EntryPoint +{ = + /** + * This is the entry point method. + */ + public void onModuleLoad() + { = + this.loadPortal(); + } + = + /** + * = + * + */ + private void loadPortal() + { + //Load the navigation bar....use a tabbed bar + TabBar pageNavigator =3D new TabBar(); + pageNavigator.addTab("Page 1"); + pageNavigator.addTab("Page 2"); + pageNavigator.addTab("Page 3"); + pageNavigator.selectTab(0); + pageNavigator.addTabListener(new TabListenerImpl()); + RootPanel.get("pageNavigator").add(pageNavigator); = + = + //Load the main page to be displayed + HorizontalPanel page =3D new HorizontalPanel(); + RootPanel.get("currentPage").add(page); = + this.loadPartialRefreshPage("Page 1"); = + } + = + /** + * = + * + */ + private void loadPartialRefreshPage(String pageId) + { = + PortletServiceAsync portletService =3D (PortletServiceAsync)GWT.crea= te(PortletService.class); = + ((ServiceDefTarget)portletService).setServiceEntryPoint(GWT.getModul= eBaseURL()+"/portletService"); + = + AsyncCallback callback =3D new AsyncCallback() + { + public void onSuccess(Object result) + { + Page portalPage =3D (Page)result; + displayPortalPage(portalPage); + } + = + public void onFailure(Throwable caught) + { + } + }; + = + portletService.getPage(pageId, callback); = + } + = + /** + * = + * @param window + * @param newState + */ + private void handleWindowStateChanged(String window, String newState) + { + PortletServiceAsync portletService =3D (PortletServiceAsync)GWT.crea= te(PortletService.class); = + ((ServiceDefTarget)portletService).setServiceEntryPoint(GWT.getModul= eBaseURL()+"/portletService"); + = + AsyncCallback callback =3D new AsyncCallback() + { + public void onSuccess(Object result) + { = + Page portalPage =3D (Page)result; + displayPortalPage(portalPage); + } + = + public void onFailure(Throwable caught) + { + } + }; + = + portletService.setState(window, newState, callback); + } + = + /** + * = + * @param window + * @param newState + */ + private void handleWindowModeChanged(String window, String newMode) + { + PortletServiceAsync portletService =3D (PortletServiceAsync)GWT.crea= te(PortletService.class); = + ((ServiceDefTarget)portletService).setServiceEntryPoint(GWT.getModul= eBaseURL()+"/portletService"); + = + AsyncCallback callback =3D new AsyncCallback() + { + public void onSuccess(Object result) + { = + Page portalPage =3D (Page)result; + displayPortalPage(portalPage); + } + = + public void onFailure(Throwable caught) + { + } + }; + = + portletService.setMode(window, newMode, callback); + } + = + /** + * = + * @param url + * @param portletWindow + */ + private void handlePartialRefreshLink(String url, Widget windowContent) + { + HTTPRequest.asyncGet(url, new ResponseTextHandlerImpl(windowContent)= ); + } + = + /** + * = + * @param url + * @param portletWindow + */ + private void handlePartialRefreshForm(String url, String method, String= postData, Widget windowContent) + { = + if(method.equalsIgnoreCase("post")) + { + HTTPRequest.asyncPost(url, postData, new ResponseTextHandlerImpl(= windowContent)); + } + else if(method.equalsIgnoreCase("get")) + { + if(postData !=3D null && postData.trim().length() > 0) + { + url =3D url + "?" + postData; + } + HTTPRequest.asyncGet(url, new ResponseTextHandlerImpl(windowConte= nt)); + } + } + = + /** + * = + * @author soshah + * + */ + private class ResponseTextHandlerImpl implements ResponseTextHandler + { + private Widget windowContent =3D null; + = + public ResponseTextHandlerImpl(Widget windowContent) + { + this.windowContent =3D windowContent; + } = + public void onCompletion(String responseText) + { + HTML html =3D new HTML(responseText); = + Panel window =3D (Panel)this.windowContent.getParent(); + this.windowContent.removeFromParent(); + window.add(html); + } = + } + = + /** + * = + * @param url + * @return + */ + private boolean isPartialRefreshAllowed(String url) + { = + String basePortalURL =3D GWT.getModuleBaseURL(); + String portalContext =3D "org.jboss.portal.uiserver.Portal"; //This = is hard coded for now, but must be populated from the Portal deployment env= ironment + //If Portal is installed at Root context, this value will be an empt= y string + = + if(url.startsWith(basePortalURL)) + { + //This is an Absolute URL, but it points back to + //the Portal + //An Async Page Refresh call should be allowed in this case + return true; + } + = + if(url.startsWith("http://")) + { + //This is an Absolute URL and does not point back + //to the Portal + //Async Page Refresh call should not be allowed + return false; + } + else + { + //This is a relative URL. = + = + //Make sure it points back to the Portal for an Async Page Refres= h = + //If it points to some other resource like another third-party we= b application etc, the response + //has nothing to do with Portal = + //(unless ofcourse the client side processor of the Portal, wants= to + //take this response and aggregate this inside the current Portal= Page and Window being displayed. This is an exceptional usecase + //and not desired behavior for every scenario from end user stand= point) + //As standard behavior, Async Page Refresh to be done, only when = Portlet Markup is sending a request back to the Portal = + if(url.startsWith("/")) + { + if(!portalContext.equals("")) + { + String urlContext =3D null; + int index =3D url.indexOf('/', 1); + if(index !=3D -1) + { + urlContext =3D url.substring(1, index); + } + else + { + urlContext =3D url.substring(1); + } + = + if(!portalContext.equals(urlContext)) + { = + //This request is not being sent to the Portal. It is be= ing sent to some other web application + return false; + } + } + else + { + //If Portal is running on root context, there is no way to = tell from client side, if this request is actually + //to be sent to the Portal or some other web application. H= ence, in the interest of functional safety/correctness + //no Async Page Refresh here + //If Portal is running on Root context, Partial Refresh wil= l happen only for pure relative links + return false; + } + } + = + //If I get here, Async Page Refresh through the Portal should be = allowed + return true; + } + } + = + /** + * = + * @param currentForm + * @return + */ + public native String serializeForm(Element currentForm) = + /*-{ = + var formData =3D $wnd.Form.serialize(currentForm); + return formData; + }-*/; + = + /** + * = + * @param portalPage + */ + private void displayPortalPage(Page portalPage) + { = + //Event Listener for the decoration components like + //Normal, Maximized, Minimized + ClickListener listener =3D new ClickListener() + { + public void onClick(Widget sender) + { = + Button cour =3D (Button)sender; + String windowName =3D sender.getParent().getTitle(); + if(cour.getText().equals("Normal")) + { + handleWindowStateChanged(windowName, Window.NORMAL); + } + else if(cour.getText().equals("Minimized")) + { + handleWindowStateChanged(windowName, Window.MINIMIZED); + } + else if(cour.getText().equals("Maximized")) + { + handleWindowStateChanged(windowName, Window.MAXIMIZED); + } + else if(cour.getText().equals("Edit")) + { + handleWindowModeChanged(windowName, Window.EDIT); + } + } = + }; + = + //Event Listener for actions perfomed inside the portlet window cont= ent + //itself. + ClickListener contentListener =3D new ClickListener() + { + public void onClick(Widget sender) + { + Event event =3D DOM.eventGetCurrentEvent(); + Element target =3D DOM.eventGetTarget(event); + = + if(target.toString().toUpperCase().trim().indexOf("") !=3D= -1) + { = + String link =3D DOM.getElementAttribute(target, "HREF"); + = + //A link inside the portlet window was clicked + //Load its content asynchronously inside this window + boolean isPartialRefreshAllowed =3D isPartialRefreshAllowed= (link); = + if(isPartialRefreshAllowed) + { + DOM.eventPreventDefault(event); + handlePartialRefreshLink(link, sender); + } + } + else if(target.toString().toUpperCase().trim().indexOf("INPUT"= ) !=3D -1 && + target.toString().toUpperCase().trim().indexOf("SUBMIT= ") !=3D -1 + ) + { = + Element currentForm =3D DOM.getParent(target); + String enctype =3D DOM.getElementAttribute(currentForm, "en= ctype"); + String action =3D DOM.getElementAttribute(currentForm, "act= ion"); + boolean isPartialRefreshAllowed =3D isPartialRefreshAllowed= (action); + if((isPartialRefreshAllowed) && (enctype =3D=3D null || !en= ctype.equals("multipart/form-data"))) + { + DOM.eventPreventDefault(event); + = + //Call a native javascript function here = = + String method =3D DOM.getElementAttribute(currentForm, "= method"); = + String serializedForm =3D serializeForm(currentForm); = + = + handlePartialRefreshForm(action, method, serializedForm,= sender); + } + } + } = + }; + = + //Dispalying the fully aggregated page + Window[] windows =3D portalPage.windows; + HorizontalPanel page =3D (HorizontalPanel)RootPanel.get("currentPage= ").getWidget(0); + page.clear(); + for(int i=3D0; iSohil Shah + * + */ +public class GWTClientFilter implements Filter +{ + /** + * = + */ + public void destroy() + { = + } + + /** + * = + */ + public void doFilter(ServletRequest servletRequest, ServletResponse ser= vletResponse, FilterChain filterChain) throws IOException, ServletException + { = + HttpServletRequest request =3D (HttpServletRequest)servletRequest; + HttpServletResponse response =3D (HttpServletResponse)servletRespons= e; + String contextPath =3D request.getContextPath(); + String resource =3D request.getRequestURI().replaceFirst(contextPath= , ""); + while(resource.startsWith("/")) + { + if(resource.length() > 1) + { + resource =3D resource.substring(1); + } + else + { + resource =3D ""; + } + } + = + if(resource =3D=3D null || resource.trim().length() =3D=3D 0) + { + response.sendRedirect("index.html"); + return; + } + = + //Now make sure the resource requested is a GWT resource + if( resource.equals("index.html") || + resource.equals("portal.css") || + resource.equals("gwt.js") || + resource.equals("prototype.js") || + resource.contains(".cache.") || + resource.contains(".nocache.") || + resource.contains(".gwt.rpc") + ) + { + String gwtResource =3D this.readContent(resource); + response.getOutputStream().write(gwtResource.getBytes()); + response.getOutputStream().flush(); + return; + } + = + //Propagate the request further + filterChain.doFilter(servletRequest, servletResponse); + } + + /** + * = + */ + public void init(FilterConfig arg0) throws ServletException + { = + } + = + /** + * = + * @param path + * @return + */ + private String readContent(String path) + { + String content =3D null; + = + InputStream is =3D null; + try + { + is =3D Thread.currentThread().getContextClassLoader().getResource= AsStream(path); + StringBuffer contentBuffer =3D new StringBuffer(); + int bytesRead =3D 0; + byte[] data =3D new byte[1024]; + while((bytesRead=3Dis.read(data)) !=3D -1) + { + byte[] cour =3D new byte[bytesRead]; + System.arraycopy(data, 0, cour, 0, bytesRead); + contentBuffer.append(new String(cour)); + } = + content =3D contentBuffer.toString(); + } + catch(Exception e) + { + throw new RuntimeException(e); + } + finally + { + if(is !=3D null) + { + try{is.close();}catch(Exception e){} + } + } + = + return content; + } +} Added: branches/UIServer/uiserver/src/main/org/jboss/portal/uiserver/servic= e/PortalEntryPoint.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/UIServer/uiserver/src/main/org/jboss/portal/uiserver/service/P= ortalEntryPoint.java (rev 0) +++ branches/UIServer/uiserver/src/main/org/jboss/portal/uiserver/service/P= ortalEntryPoint.java 2007-10-18 06:17:01 UTC (rev 8686) @@ -0,0 +1,452 @@ +/*************************************************************************= ***** + * JBoss, a division of Red Hat = * + * Copyright 2006, Red Hat Middleware, LLC, and individual = * + * contributors as indicated by the @authors tag. See the = * + * copyright.txt in the distribution for a full listing of = * + * individual contributors. = * + * = * + * This is free software; you can redistribute it and/or modify it = * + * under the terms of the GNU Lesser General Public License as = * + * published by the Free Software Foundation; either version 2.1 of = * + * the License, or (at your option) any later version. = * + * = * + * This software is distributed in the hope that it will be useful, = * + * but WITHOUT ANY WARRANTY; without even the implied warranty of = * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU = * + * Lesser General Public License for more details. = * + * = * + * You should have received a copy of the GNU Lesser General Public = * + * License along with this software; if not, write to the Free = * + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA = * + * 02110-1301 USA, or see the FSF site: http://www.fsf.org. = * + *************************************************************************= *****/ +package org.jboss.portal.uiserver.service; + +import java.io.IOException; +import java.io.InputStream; +import java.nio.charset.Charset; +import java.util.Collections; +import java.util.HashMap; +import java.util.Iterator; +import java.util.Map; + +import javax.management.MBeanServer; +import javax.management.ObjectName; +import javax.servlet.ServletConfig; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import org.apache.log4j.Logger; +import org.jboss.mx.util.MBeanProxy; +import org.jboss.mx.util.MBeanServerLocator; +import org.jboss.portal.common.http.QueryStringParser; +import org.jboss.portal.common.invocation.InterceptorStackFactory; +import org.jboss.portal.common.invocation.InvocationException; +import org.jboss.portal.common.net.URLTools; +import org.jboss.portal.common.util.Exceptions; +import org.jboss.portal.server.PortalConstants; +import org.jboss.portal.server.RequestController; +import org.jboss.portal.server.RequestControllerDispatcher; +import org.jboss.portal.server.RequestControllerFactory; +import org.jboss.portal.server.Server; +import org.jboss.portal.server.ServerException; +import org.jboss.portal.server.ServerInvocation; +import org.jboss.portal.server.ServerInvocationContext; +import org.jboss.portal.server.ServerRequest; +import org.jboss.portal.server.ServerResponse; +import org.jboss.portal.server.impl.ServerInvocationContextImpl; +import org.jboss.portal.server.request.URLContext; + +/** + * @author Sohil Shah + * + */ +public class PortalEntryPoint extends HttpServlet +{ + /** . */ + private static final int GET_METHOD =3D 0; + + /** . */ + private static final int POST_METHOD =3D 1; + + /** Describes a default servlet mapping. */ + private static final int DEFAULT_SERVLET_MAPPING =3D 0; + + /** Describes a root path mapping. */ + private static final int ROOT_PATH_MAPPING =3D 1; + + /** Describes a path mapping. */ + private static final int PATH_MAPPING =3D 2; + + /** The logger. */ + protected Logger log =3D Logger.getLogger(getClass()); + + /** The server. */ + private Server server; + + /** The interceptor stack. */ + private InterceptorStackFactory interceptorStack; + + /** Are we or not the default servlet ? */ + private boolean asDefaultServlet; + + /** The controller for this servlet. */ + private RequestControllerFactory controllerFactory; + + /** The controller name. */ + private String controllerFactoryName; + + /** Configure the as default servlet. */ + public void init() throws ServletException + { + asDefaultServlet =3D getAsDefaultServletInitValue(); + controllerFactoryName =3D getServletConfig().getInitParameter("contr= ollerFactoryName"); + } + + /** + * + */ + protected final Server getServer() + { + if (server =3D=3D null) + { + try + { + MBeanServer mbeanServer =3D MBeanServerLocator.locateJBoss(); + server =3D (Server)MBeanProxy.get(Server.class, new ObjectName= ("portal:service=3DServer"), mbeanServer); + } + catch (Exception e) + { + String msg =3D "Cannot get portal server"; + log.error(msg, e); + throw new IllegalStateException(msg); + } + } + return server; + } + + protected final InterceptorStackFactory getInterceptorStackFactory() + { + if (interceptorStack =3D=3D null) + { + try + { + MBeanServer mbeanServer =3D MBeanServerLocator.locateJBoss(); + interceptorStack =3D (InterceptorStackFactory)MBeanProxy.get(I= nterceptorStackFactory.class, new ObjectName("portal:service=3DInterceptorS= tackFactory,type=3DServer"), mbeanServer); + } + catch (Exception e) + { + String msg =3D "Cannot get interceptor stack"; + log.error(msg, e); + throw new IllegalStateException(msg); + } + } + return interceptorStack; + } + + protected final RequestControllerFactory getControllerFactory() + { + if (controllerFactory =3D=3D null) + { + try + { + MBeanServer mbeanServer =3D MBeanServerLocator.locateJBoss(); + controllerFactory =3D (RequestControllerFactory)MBeanProxy.get= (RequestControllerFactory.class, new ObjectName(controllerFactoryName), mbe= anServer); + } + catch (Exception e) + { + String msg =3D "Cannot get controller " + controllerFactoryNam= e; + log.error(msg, e); + throw new IllegalStateException(msg); + } + } + return controllerFactory; + } + + private String retrieveMediaType(String contentType) + { + String mediaType =3D contentType; + + // + if (mediaType !=3D null) + { + // Remove any parameters + int index =3D mediaType.indexOf(';'); + if (index !=3D -1) + { + mediaType =3D contentType.substring(0, index); + } + + // Trim + mediaType =3D mediaType.trim(); + + // Media type matching is case insensitive, so we convert to lowe= r case + mediaType =3D mediaType.toLowerCase(); + } + return mediaType; + } + + protected void service(HttpServletRequest req, HttpServletResponse resp= ) throws ServletException, IOException + { + // + String servletPath =3D req.getServletPath(); + String requestURI =3D req.getRequestURI(); + String contextPath =3D req.getContextPath(); + = + String resource =3D req.getRequestURI().replaceFirst(contextPath, ""= ); + while(resource.startsWith("/")) + { + if(resource.length() > 1) + { + resource =3D resource.substring(1); + } + else + { + resource =3D ""; + } + } + = + if(resource =3D=3D null || resource.trim().length() =3D=3D 0) + { + resp.sendRedirect("index.html"); + return; + } + = + int method; + if ("GET".equals(req.getMethod())) + { + method =3D GET_METHOD; + } + else if ("POST".equals(req.getMethod())) + { + method =3D POST_METHOD; + } + else + { + throw new ServletException(); + } + + // Compute the media type in the content type + String mediaType =3D retrieveMediaType(req.getContentType()); + + // Only affect the charset encoding if the servlet container will de= code the request + if (method =3D=3D POST_METHOD && PortalConstants.APPLICATION_X_WWW_F= ORM_URLENCODED.equals(mediaType)) + { + // Now we must ensure that we have either an equals or a trailing= space after the media-type + String characterEncoding =3D req.getCharacterEncoding(); + if (characterEncoding =3D=3D null) + { + // Set out charset for the portal request + req.setCharacterEncoding(PortalConstants.UTF_8.name()); + } + else + { + Charset charset =3D Charset.forName(characterEncoding); + if (!PortalConstants.UTF_8.equals(charset)) + { + throw new ServletException("Unaccepted charset " + characte= rEncoding); + } + } + } + + // Determine the mapping we have + int mapping =3D DEFAULT_SERVLET_MAPPING; + if (!asDefaultServlet) + { + if (servletPath.length() =3D=3D 0) + { + mapping =3D ROOT_PATH_MAPPING; + } + else + { + mapping =3D PATH_MAPPING; + } + } + + // Determine the host for this request + String portalHost =3D req.getServerName(); + + // Determine the request path + String portalRequestPath =3D null; + String portalContextPath =3D null; + switch (mapping) + { + case DEFAULT_SERVLET_MAPPING: + portalRequestPath =3D requestURI.substring(contextPath.length(= )); + portalContextPath =3D requestURI.substring(0, contextPath.leng= th()); + break; + case ROOT_PATH_MAPPING: + portalRequestPath =3D requestURI.substring(contextPath.length(= )); + portalContextPath =3D requestURI.substring(0, contextPath.leng= th()); + break; + case PATH_MAPPING: + portalRequestPath =3D requestURI.substring(contextPath.length(= ) + servletPath.length()); + portalContextPath =3D requestURI.substring(0, contextPath.leng= th() + servletPath.length()); + break; + } + + // Apply the url decoding + portalRequestPath =3D URLTools.decodeXWWWFormURL(portalRequestPath); + portalContextPath =3D URLTools.decodeXWWWFormURL(portalContextPath); + + // + URLContext urlContext =3D URLContext.newInstance(req.isSecure(), req= .getRemoteUser() !=3D null); + + // *************** + // *************** + // *************** + // *************** + + // Parse the query string to have the get parameters + // The resulting map has its parameters decoded from the x-www-form-= url encoding + Map queryParameterMap =3D Collections.EMPTY_MAP; + String queryString =3D req.getQueryString(); + if (queryString !=3D null) + { + queryParameterMap =3D QueryStringParser.parseQueryString(queryStr= ing); + } + + // + Map bodyParameterMap =3D null; + if (method =3D=3D POST_METHOD && PortalConstants.APPLICATION_X_WWW_F= ORM_URLENCODED.equals(mediaType)) + { + bodyParameterMap =3D Collections.EMPTY_MAP; + for (Iterator i =3D req.getParameterMap().entrySet().iterator(); = i.hasNext();) + { + Map.Entry entry =3D (Map.Entry)i.next(); + + // Get param name + String paramName =3D (String)entry.getKey(); + + // Values that are aggregated from the query string and the bo= dy + String[] paramValues =3D (String[])entry.getValue(); + + // Values decoded from the query string + String[] queryValues =3D (String[])queryParameterMap.get(param= Name); + if (queryValues !=3D null) + { + int bodyValuesLength =3D paramValues.length - queryValues.l= ength; + if (bodyValuesLength > 0) + { + String[] bodyValues =3D new String[bodyValuesLength]; + System.arraycopy(paramValues, queryValues.length, bodyVa= lues, 0, bodyValuesLength); + if (bodyParameterMap.isEmpty()) + { + bodyParameterMap =3D new HashMap(); + } + bodyParameterMap.put(paramName, bodyValues); + } + } + else + { + if (bodyParameterMap.isEmpty()) + { + bodyParameterMap =3D new HashMap(); + } + bodyParameterMap.put(paramName, paramValues); + } + } + + // Make the map unmodifiable + bodyParameterMap =3D bodyParameterMap.isEmpty() ? bodyParameterMa= p : Collections.unmodifiableMap(bodyParameterMap); + } + + // *************** + // *************** + // *************** + // *************** + + // + Server server =3D getServer(); + + // + ServerInvocationContext invocationCtx =3D new ServerInvocationContex= tImpl( + req, + resp, + portalHost, + portalRequestPath, + portalContextPath, + queryParameterMap, + bodyParameterMap, + urlContext, + mediaType); + + // + ServerRequest request =3D new ServerRequest(invocationCtx); + request.setServer(server); + + // + ServerResponse response =3D new ServerResponse(request, invocationCt= x); + + // + ServerInvocation invocation =3D new ServerInvocation(invocationCtx); + invocation.setRequest(request); + invocation.setResponse(response); + + // + RequestControllerFactory controllerFactory =3D getControllerFactory(= ); + RequestController controller =3D controllerFactory.createRequestCont= roller(invocation); + invocation.setHandler(new RequestControllerDispatcher(controller)); + + // + try + { + InterceptorStackFactory stack =3D getInterceptorStackFactory(); + invocation.invoke(stack.getInterceptorStack()); + } + catch (ServerException e) + { + log.error("Server exception", e); + Throwable nested =3D Exceptions.unwrap(e); + throw new ServletException(nested); + } + catch (InvocationException e) + { + log.error("Invocation exception", e); + Throwable nested =3D Exceptions.unwrap(e); + throw new ServletException(nested); + } + catch (ServletException e) + { + throw e; + } + catch (IOException e) + { + throw e; + } + catch (Exception e) + { + log.error("Unexpected exception", e); + Throwable nested =3D Exceptions.unwrap(e); + throw new ServletException(nested); + } + } + = + = + /** + * Return the value for the servlet mapping. This implementation get th= e value from an init parameter of the servlet + * called asDefaultServlet + */ + protected boolean getAsDefaultServletInitValue() + { + ServletConfig config =3D getServletConfig(); + String value =3D config.getInitParameter("asDefaultServlet"); + if ("true".equalsIgnoreCase(value)) + { + log.debug("Servlet loaded as default servlet mapping"); + return true; + } + else if ("false".equalsIgnoreCase(value)) + { + log.debug("Servlet loaded as path mapping servlet"); + return false; + } + else + { + log.warn("Servlet mapping cannot be determined with init paramete= r value=3D" + value); + return false; + } + } +} Modified: branches/UIServer/uiserver/src/main/org/jboss/portal/uiserver/ser= vice/PortletServiceImpl.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/UIServer/uiserver/src/main/org/jboss/portal/uiserver/service/P= ortletServiceImpl.java 2007-10-17 16:48:30 UTC (rev 8685) +++ branches/UIServer/uiserver/src/main/org/jboss/portal/uiserver/service/P= ortletServiceImpl.java 2007-10-18 06:17:01 UTC (rev 8686) @@ -27,9 +27,8 @@ public String getPortlet(String portletId) { = String portletContent =3D null; - String basePath =3D "org.jboss.portal.uiserver.ajax.PortalLayout"; = - String contentPath =3D basePath + "/" + portletId; = + String contentPath =3D portletId; = InputStream is =3D null; try { Modified: branches/UIServer/uiserver/src/main/org/jboss/portal/uiserver/ser= vice/UIServer.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/UIServer/uiserver/src/main/org/jboss/portal/uiserver/service/U= IServer.java 2007-10-17 16:48:30 UTC (rev 8685) +++ branches/UIServer/uiserver/src/main/org/jboss/portal/uiserver/service/U= IServer.java 2007-10-18 06:17:01 UTC (rev 8686) @@ -27,11 +27,6 @@ import java.util.List; import java.util.StringTokenizer; = -import javax.management.MBeanServer; -import javax.management.ObjectName; -import org.jboss.mx.util.MBeanProxy; -import org.jboss.mx.util.MBeanServerLocator; - import org.jboss.portal.uiserver.protocol.Container; import org.jboss.portal.uiserver.protocol.Page; import org.jboss.portal.uiserver.protocol.Window; @@ -160,7 +155,7 @@ = ProcessorRequest processorRequest =3D new ProcessorRequest(action= Type, invocation, portal, target); ProcessorResponse processorResponse =3D this.processor.process(pr= ocessorRequest); - = + = //Go ahead and render to the client based on ProcessorResponse re= ceived from the core Portal = if(processorResponse !=3D null) { @@ -170,7 +165,7 @@ this.render(invocation.getServerContext().getClientResponse= ().getWriter(), = displayedPage); } - } + } = } catch(Exception e) { @@ -234,18 +229,13 @@ * = * Basically the UIServer would delegate functions to its various co= mponents and then send back the result to the client * = - */ - = - /** - * Some flexible grid layout testing code - */ + */ = + //Some flexible grid layout testing code Object[] gridData =3D this.getFlexibleGridLayoutManager(pageResult); Page page =3D (Page)gridData[0]; LayoutManager layoutManager =3D (LayoutManager)gridData[1]; = = - /** - * Some region layout testing code - */ + //Some region layout testing code //Object[] regionData =3D this.getRegionBasedLayoutManager(pageResul= t); //Page page =3D (Page)regionData[0]; //LayoutManager layoutManager =3D (LayoutManager)regionData[1]; Added: branches/UIServer/uiserver/src/resources/client/ajax/src/org/jboss/p= ortal/uiserver/ajax/Portal.gwt.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/UIServer/uiserver/src/resources/client/ajax/src/org/jboss/port= al/uiserver/ajax/Portal.gwt.xml (rev 0) +++ branches/UIServer/uiserver/src/resources/client/ajax/src/org/jboss/port= al/uiserver/ajax/Portal.gwt.xml 2007-10-18 06:17:01 UTC (rev 8686) @@ -0,0 +1,10 @@ + + + + + + = + = + + + Added: branches/UIServer/uiserver/src/resources/client/ajax/src/org/jboss/p= ortal/uiserver/ajax/public/index.html =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/UIServer/uiserver/src/resources/client/ajax/src/org/jboss/port= al/uiserver/ajax/public/index.html (rev 0) +++ branches/UIServer/uiserver/src/resources/client/ajax/src/org/jboss/port= al/uiserver/ajax/public/index.html 2007-10-18 06:17:01 UTC (rev 8686) @@ -0,0 +1,44 @@ + + + = + + + + JBoss Portal + + + + + + + + + = + = + + + + + + + + + + + = +

JBoss Portal

+ = + +

+ Asynchronous Page Management = +

= + + + + = + + + = +
= + + Added: branches/UIServer/uiserver/src/resources/portal-uiserver.sar/META-IN= F/jboss-service.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/UIServer/uiserver/src/resources/portal-uiserver.sar/META-INF/j= boss-service.xml (rev 0) +++ branches/UIServer/uiserver/src/resources/portal-uiserver.sar/META-INF/j= boss-service.xml 2007-10-18 06:17:01 UTC (rev 8686) @@ -0,0 +1,45 @@ + + + + + + + portal:container=3DPortalObjectReader + portal:service=3DProcessor + portal:service=3DPageService + portal:commandFactory=3DDefaultPortal + portal:urlFactory=3DDelegating + portal:service=3DInterceptorStackFactory,type=3DCommand = + portal:container=3DInstance + portal:service=3DPortalAuthorizationManagerFactory + portal:service=3DCustomizationManager + portal:service=3DContentProviderRegistry + portal:service=3DResponseHandler,type=3DSelector + portal:service=3DControlPolicy,type=3DPage + + Added: branches/UIServer/uiserver/src/resources/portal-uiserver.war/WEB-INF= /jboss-web.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/UIServer/uiserver/src/resources/portal-uiserver.war/WEB-INF/jb= oss-web.xml (rev 0) +++ branches/UIServer/uiserver/src/resources/portal-uiserver.war/WEB-INF/jb= oss-web.xml 2007-10-18 06:17:01 UTC (rev 8686) @@ -0,0 +1,26 @@ + + + + + \ No newline at end of file Added: branches/UIServer/uiserver/src/resources/portal-uiserver.war/WEB-INF= /web.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/UIServer/uiserver/src/resources/portal-uiserver.war/WEB-INF/we= b.xml (rev 0) +++ branches/UIServer/uiserver/src/resources/portal-uiserver.war/WEB-INF/we= b.xml 2007-10-18 06:17:01 UTC (rev 8686) @@ -0,0 +1,110 @@ + + + + + = + + + GWTClientFilter + org.jboss.portal.uiserver.service.GWTClientFilter + = + + GWTClientFilter + PortalEntryPoint + + = + + + + PortalEntryPoint + org.jboss.portal.uiserver.service.PortalEntryPoint + + asDefaultServlet + false + The servlet needs to know wether it is set as a defa= ult servlet or not + + + controllerFactoryName + portal:service=3DControllerFactory + The request controller factory for the portal servle= t + + 0 + + Authenticated + Authenticated + + + = + + PortalEntryPoint + /* + + + + PortalEntryPoint + /sec/* + + + + PortalEntryPoint + /auth/* + + + + PortalEntryPoint + /authsec/* + + = + + + PortletService + org.jboss.portal.uiserver.service.PortletServiceImpl<= /servlet-class> + 0 + + = + + PortletService + /portletService/* + + = + + + Added: branches/UIServer/uiserver/src/resources/portal-uiserver.war/asyncPa= ges.html =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/UIServer/uiserver/src/resources/portal-uiserver.war/asyncPages= .html (rev 0) +++ branches/UIServer/uiserver/src/resources/portal-uiserver.war/asyncPages= .html 2007-10-18 06:17:01 UTC (rev 8686) @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file Added: branches/UIServer/uiserver/src/resources/portal-uiserver.war/layout.= html =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/UIServer/uiserver/src/resources/portal-uiserver.war/layout.htm= l (rev 0) +++ branches/UIServer/uiserver/src/resources/portal-uiserver.war/layout.htm= l 2007-10-18 06:17:01 UTC (rev 8686) @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file Added: branches/UIServer/uiserver/src/resources/portal-uiserver.war/partial= Refresh.html =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/UIServer/uiserver/src/resources/portal-uiserver.war/partialRef= resh.html (rev 0) +++ branches/UIServer/uiserver/src/resources/portal-uiserver.war/partialRef= resh.html 2007-10-18 06:17:01 UTC (rev 8686) @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file --===============1626462017227291674==-- From portal-commits at lists.jboss.org Thu Oct 18 06:10:11 2007 Content-Type: multipart/mixed; boundary="===============1703548759459319780==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8687 - in modules/test/trunk/unit/src/main/org/jboss: unit/report and 1 other directories. Date: Thu, 18 Oct 2007 06:10:11 -0400 Message-ID: --===============1703548759459319780== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: emuckenhuber Date: 2007-10-18 06:10:11 -0400 (Thu, 18 Oct 2007) New Revision: 8687 Modified: modules/test/trunk/unit/src/main/org/jboss/test/unit/report/junit/JUnitR= eporterTests.java modules/test/trunk/unit/src/main/org/jboss/unit/report/ modules/test/trunk/unit/src/main/org/jboss/unit/report/impl/junit/JUnitR= eporter.java modules/test/trunk/unit/src/main/org/jboss/unit/report/impl/junit/JUnitT= estReport.java Log: - generating testcase name based on TestInfo names Modified: modules/test/trunk/unit/src/main/org/jboss/test/unit/report/junit= /JUnitReporterTests.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/test/unit/report/junit/JUnit= ReporterTests.java 2007-10-18 06:17:01 UTC (rev 8686) +++ modules/test/trunk/unit/src/main/org/jboss/test/unit/report/junit/JUnit= ReporterTests.java 2007-10-18 10:10:11 UTC (rev 8687) @@ -60,7 +60,7 @@ { MyTestReport report =3D new MyTestReport(testSuiteName); // add StartRunnerEvent - report.startTestSuite(new StartRunnerEvent()); + report.startJUnitTestSuite(new StartRunnerEvent()); // add RunnerFailureEvent Failure f =3D new Failure("fehler", FailureType.ERROR); RunnerFailureEvent rfe =3D new RunnerFailureEvent(f); @@ -97,7 +97,7 @@ private static void testTestCase() { MyTestReport report =3D new MyTestReport(testSuiteName); - report.startTestSuite(new StartRunnerEvent()); + report.startJUnitTestSuite(new StartRunnerEvent()); = TestId testId =3D new TestId("foo"); StartTestCaseEvent startTestEvent =3D new StartTestCaseEvent(testId,= new MyTestInfo()); @@ -130,10 +130,11 @@ private static void testTestCaseClass() { MyTestReport report =3D new MyTestReport(testSuiteName); - report.startTestSuite(new StartRunnerEvent()); + report.startJUnitTestSuite(new StartRunnerEvent()); = // Set current tested class name - report.setCurrentTestedClassName("org.jboss.portal.test.testedClass1= "); + report.addTestedSuiteName("org.jboss.portal.test.testedClass1"); + report.addTestedSuiteName("blah"); = TestId testId =3D new TestId("foo"); StartTestCaseEvent startTestEvent =3D new StartTestCaseEvent(testId,= new MyTestInfo()); @@ -153,17 +154,17 @@ = Element testCase =3D child(e, TESTCASE); Assert.assertEquals(TESTCASE, testCase.getNodeName()); - Assert.assertEquals("org.jboss.portal.test.testedClass1.foo", testCa= se.getAttribute(ATTR_NAME)); + Assert.assertEquals("org.jboss.portal.test.testedClass1.blah.foo", t= estCase.getAttribute(ATTR_NAME)); Assert.assertEquals("0.02", testCase.getAttribute(ATTR_TIME)); - = - Assert.assertNull(child(e, ERROR)); + + Assert.assertNull(child(e, ERROR)); = } = = private static void testTestCaseFailure() { MyTestReport report =3D new MyTestReport(testSuiteName); - report.startTestSuite(new StartRunnerEvent()); + report.startJUnitTestSuite(new StartRunnerEvent()); = TestId testId =3D new TestId("foo"); StartTestCaseEvent startTestEvent =3D new StartTestCaseEvent(testId,= new MyTestInfo()); Property changes on: modules/test/trunk/unit/src/main/org/jboss/unit/report ___________________________________________________________________ Name: svn:ignore + junit Modified: modules/test/trunk/unit/src/main/org/jboss/unit/report/impl/junit= /JUnitReporter.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/report/impl/junit/JUnit= Reporter.java 2007-10-18 06:17:01 UTC (rev 8686) +++ modules/test/trunk/unit/src/main/org/jboss/unit/report/impl/junit/JUnit= Reporter.java 2007-10-18 10:10:11 UTC (rev 8687) @@ -31,6 +31,7 @@ import org.jboss.unit.runner.TestRunnerEvent; import org.jboss.unit.runner.event.EndRunnerEvent; import org.jboss.unit.runner.event.EndTestCaseEvent; +import org.jboss.unit.runner.event.EndTestSuiteEvent; import org.jboss.unit.runner.event.RunnerFailureEvent; import org.jboss.unit.runner.event.StartRunnerEvent; import org.jboss.unit.runner.event.StartTestCaseEvent; @@ -82,7 +83,7 @@ { if (event instanceof StartRunnerEvent) { - report.startTestSuite((StartRunnerEvent) event); + report.startJUnitTestSuite((StartRunnerEvent) event); } else if (event instanceof EndRunnerEvent) { @@ -102,8 +103,12 @@ } else if (event instanceof StartTestSuiteEvent) { - report.setCurrentTestedClassName(((StartTestSuiteEvent) event).ge= tTestInfo().getName()); + report.addTestedSuiteName(((StartTestSuiteEvent) event).getTestIn= fo().getName()); } + else if (event instanceof EndTestSuiteEvent) + { + report.removeLastTestedSuite(); + } else if (event instanceof StartTestCaseEvent) { report.startTest((StartTestCaseEvent) event); Modified: modules/test/trunk/unit/src/main/org/jboss/unit/report/impl/junit= /JUnitTestReport.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/report/impl/junit/JUnit= TestReport.java 2007-10-18 06:17:01 UTC (rev 8686) +++ modules/test/trunk/unit/src/main/org/jboss/unit/report/impl/junit/JUnit= TestReport.java 2007-10-18 10:10:11 UTC (rev 8687) @@ -35,6 +35,8 @@ import java.util.Date; import java.util.HashMap; import java.util.Iterator; +import java.util.LinkedList; +import java.util.List; import java.util.Map; = import javax.xml.parsers.DocumentBuilder; @@ -105,8 +107,8 @@ /** The timeStamp */ private String timeStamp; = - /** The current testSuiteName */ - private String currentTestedClassName; + /** The tested classes Stack */ + private LinkedList testSuiteNames =3D new LinkedList(); = /** .*/ private NumberFormat FORMAT =3D NumberFormat.getInstance(); @@ -121,7 +123,7 @@ } = = - public void startTestSuite(StartRunnerEvent event) + public void startJUnitTestSuite(StartRunnerEvent event) { /** Create root element */ this.document =3D getDocumentBuilder().newDocument(); @@ -137,11 +139,18 @@ */ } = - public void setCurrentTestedClassName(String testedClassName) + // add tested class to stack (starttestsuiteevent) + public void addTestedSuiteName(String testedClassName) { - this.currentTestedClassName =3D testedClassName; + this.testSuiteNames.add(testedClassName); } = + // remove last from stack (endtestsuiteevent) + public void removeLastTestedSuite() + { + this.testSuiteNames.removeLast(); + } + = public void startTest(StartTestCaseEvent event) { = this.startedTests.put(event.getTestId(), event.getTestInfo()); @@ -170,10 +179,10 @@ /** The testcase name */ StringBuffer nb =3D new StringBuffer(); /** The current tested Class */ - if (this.currentTestedClassName !=3D null) + for(String testSuiteName : this.testSuiteNames) { - nb.append(this.currentTestedClassName); - nb.append("."); = + nb.append(testSuiteName); + nb.append("."); } /** TestId */ for(int i =3D 0; i < testId.getLength(); i ++) --===============1703548759459319780==-- From portal-commits at lists.jboss.org Thu Oct 18 06:31:55 2007 Content-Type: multipart/mixed; boundary="===============2075768130632379209==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8688 - modules/test/trunk/test/src/main/org/jboss/portal/test/framework/embedded/opends. Date: Thu, 18 Oct 2007 06:31:51 -0400 Message-ID: --===============2075768130632379209== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: bdaw Date: 2007-10-18 06:31:49 -0400 (Thu, 18 Oct 2007) New Revision: 8688 Modified: modules/test/trunk/test/src/main/org/jboss/portal/test/framework/embedde= d/opends/OpenDSServiceMBean.java Log: - fix OpenDS support Modified: modules/test/trunk/test/src/main/org/jboss/portal/test/framework/= embedded/opends/OpenDSServiceMBean.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/test/src/main/org/jboss/portal/test/framework/embedd= ed/opends/OpenDSServiceMBean.java 2007-10-18 10:10:11 UTC (rev 8687) +++ modules/test/trunk/test/src/main/org/jboss/portal/test/framework/embedd= ed/opends/OpenDSServiceMBean.java 2007-10-18 10:31:49 UTC (rev 8688) @@ -30,6 +30,14 @@ public interface OpenDSServiceMBean { = + public void create() throws Exception; + + public void start() throws Exception; + + public void stop() throws Exception; + + public void destroy() throws Exception; + /*public String printDiagnostics(); = public void restart(); --===============2075768130632379209==-- From portal-commits at lists.jboss.org Thu Oct 18 11:05:32 2007 Content-Type: multipart/mixed; boundary="===============8275620089103378997==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8689 - modules/test/trunk/remote/src/main/org/jboss/unit/remote/driver. Date: Thu, 18 Oct 2007 11:05:32 -0400 Message-ID: --===============8275620089103378997== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: julien(a)jboss.com Date: 2007-10-18 11:05:31 -0400 (Thu, 18 Oct 2007) New Revision: 8689 Added: modules/test/trunk/remote/src/main/org/jboss/unit/remote/driver/Composit= eRemoteTestDriver.java Modified: modules/test/trunk/remote/src/main/org/jboss/unit/remote/driver/RemoteTe= stDriverServer.java Log: improve the remote test driver server by using a more flexible delegation m= odel Added: modules/test/trunk/remote/src/main/org/jboss/unit/remote/driver/Comp= ositeRemoteTestDriver.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/remote/src/main/org/jboss/unit/remote/driver/Composi= teRemoteTestDriver.java (rev 0) +++ modules/test/trunk/remote/src/main/org/jboss/unit/remote/driver/Composi= teRemoteTestDriver.java 2007-10-18 15:05:31 UTC (rev 8689) @@ -0,0 +1,79 @@ +/*************************************************************************= ***** + * JBoss, a division of Red Hat = * + * Copyright 2006, Red Hat Middleware, LLC, and individual = * + * contributors as indicated by the @authors tag. See the = * + * copyright.txt in the distribution for a full listing of = * + * individual contributors. = * + * = * + * This is free software; you can redistribute it and/or modify it = * + * under the terms of the GNU Lesser General Public License as = * + * published by the Free Software Foundation; either version 2.1 of = * + * the License, or (at your option) any later version. = * + * = * + * This software is distributed in the hope that it will be useful, = * + * but WITHOUT ANY WARRANTY; without even the implied warranty of = * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU = * + * Lesser General Public License for more details. = * + * = * + * You should have received a copy of the GNU Lesser General Public = * + * License along with this software; if not, write to the Free = * + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA = * + * 02110-1301 USA, or see the FSF site: http://www.fsf.org. = * + *************************************************************************= *****/ +package org.jboss.unit.remote.driver; + +import org.jboss.unit.Failure; +import org.jboss.unit.TestId; +import org.jboss.unit.driver.TestDriver; +import org.jboss.unit.driver.response.FailureResponse; +import org.jboss.unit.driver.impl.composite.CompositeTestDriver; +import org.jboss.unit.remote.RequestContext; +import org.jboss.unit.remote.ResponseContext; + +import java.io.Serializable; +import java.util.HashMap; + +/** + * @author Julien Viet + * @version $Revision: 1.1 $ + */ +public class CompositeRemoteTestDriver extends CompositeTestDriver impleme= nts RemoteTestDriver +{ + + public void pushContext(TestId testId, RequestContext requestContext) + { + String name =3D testId.getName(0); + + // + TestDriver driver =3D drivers.get(name); + + // + if (driver instanceof RemoteTestDriver) + { + RemoteTestDriver remoteDriver =3D (RemoteTestDriver)driver; + + // + remoteDriver.pushContext(testId.range(1), requestContext); + } + } + + public ResponseContext popContext(TestId testId) + { + String name =3D testId.getName(0); + + // + TestDriver driver =3D drivers.get(name); + + // + if (driver instanceof RemoteTestDriver) + { + RemoteTestDriver remoteDriver =3D (RemoteTestDriver)driver; + + // + return remoteDriver.popContext(testId.range(1)); + } + + // + return new ResponseContext(new FailureResponse(Failure.createErrorFa= ilure("No test found for " + testId)), new HashMap()); + } +} Modified: modules/test/trunk/remote/src/main/org/jboss/unit/remote/driver/R= emoteTestDriverServer.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/remote/src/main/org/jboss/unit/remote/driver/RemoteT= estDriverServer.java 2007-10-18 10:31:49 UTC (rev 8688) +++ modules/test/trunk/remote/src/main/org/jboss/unit/remote/driver/RemoteT= estDriverServer.java 2007-10-18 15:05:31 UTC (rev 8689) @@ -31,10 +31,12 @@ import org.jboss.unit.driver.DriverResponse; import org.jboss.unit.driver.DriverCommand; import org.jboss.unit.driver.response.FailureResponse; -import org.jboss.unit.driver.impl.composite.CompositeTestDriver; import org.jboss.unit.remote.RequestContext; import org.jboss.unit.remote.ResponseContext; = +import java.io.Serializable; +import java.util.HashMap; + /** * @author Julien Viet * @version $Revision: 5636 $ @@ -43,14 +45,14 @@ { = /** . */ - private CompositeTestDriver drivers =3D new CompositeTestDriver(); + private RemoteTestDriver drivers; = - public CompositeTestDriver getDrivers() + public TestDriver getDrivers() { return drivers; } = - public void setDrivers(CompositeTestDriver drivers) + public void setDrivers(RemoteTestDriver drivers) { this.drivers =3D drivers; } @@ -89,19 +91,7 @@ { if (drivers !=3D null) { - String name =3D testId.getName(0); - - // - TestDriver driver =3D drivers.get(name); - - // - if (driver instanceof RemoteTestDriver) - { - RemoteTestDriver remoteDriver =3D (RemoteTestDriver)driver; - - // - remoteDriver.pushContext(testId.range(1), requestContext); - } + drivers.pushContext(testId, requestContext); } } = @@ -109,49 +99,10 @@ { if (drivers !=3D null) { - String name =3D testId.getName(0); - - // - TestDriver driver =3D drivers.get(name); - - // - if (driver instanceof RemoteTestDriver) - { - RemoteTestDriver remoteDriver =3D (RemoteTestDriver)driver; - - // - return remoteDriver.popContext(testId.range(1)); - } + return drivers.popContext(testId); } = // - return null; + return new ResponseContext(new FailureResponse(Failure.createErrorFa= ilure("No test found for " + testId)), new HashMap()); } - - -// /** . */ -// private String initialPath =3D "/test"; -// -// public String getInitialPath() -// { -// return initialPath; -// } -// -// public void setInitialPath(String initialPath) -// { -// this.initialPath =3D initialPath; -// } -// -// public void pushContext(String testId, TestContext testContext) -// { -// if (testContext instanceof HTTPTestContext) -// { -// HTTPTestContext httpTestContext =3D (HTTPTestContext)testContex= t; -// httpTestContext.initialPath =3D initialPath; -// } -// -// // -// super.pushContext(testId, testContext); -// } - } --===============8275620089103378997==-- From portal-commits at lists.jboss.org Thu Oct 18 11:09:20 2007 Content-Type: multipart/mixed; boundary="===============2571642171015113209==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8690 - modules/test/trunk/remote/src/main/org/jboss/unit/remote/driver. Date: Thu, 18 Oct 2007 11:09:20 -0400 Message-ID: --===============2571642171015113209== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: julien(a)jboss.com Date: 2007-10-18 11:09:20 -0400 (Thu, 18 Oct 2007) New Revision: 8690 Modified: modules/test/trunk/remote/src/main/org/jboss/unit/remote/driver/RemoteTe= stDriverServer.java Log: improve the remote test driver server by using a more flexible delegation m= odel Modified: modules/test/trunk/remote/src/main/org/jboss/unit/remote/driver/R= emoteTestDriverServer.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/remote/src/main/org/jboss/unit/remote/driver/RemoteT= estDriverServer.java 2007-10-18 15:05:31 UTC (rev 8689) +++ modules/test/trunk/remote/src/main/org/jboss/unit/remote/driver/RemoteT= estDriverServer.java 2007-10-18 15:09:20 UTC (rev 8690) @@ -30,6 +30,7 @@ import org.jboss.unit.driver.DriverContext; import org.jboss.unit.driver.DriverResponse; import org.jboss.unit.driver.DriverCommand; +import org.jboss.unit.driver.DriverException; import org.jboss.unit.driver.response.FailureResponse; import org.jboss.unit.remote.RequestContext; import org.jboss.unit.remote.ResponseContext; @@ -45,61 +46,63 @@ { = /** . */ - private RemoteTestDriver drivers; + private RemoteTestDriver delegate; = - public TestDriver getDrivers() + public TestDriver getDelegate() { - return drivers; + return delegate; } = - public void setDrivers(RemoteTestDriver drivers) + public void setDelegate(RemoteTestDriver delegate) { - this.drivers =3D drivers; + this.delegate =3D delegate; } = - public void initDriver(DriverContext context) + public void initDriver(DriverContext context) throws DriverException { + delegate.initDriver(context); } = public void destroyDriver() { + delegate.destroyDriver(); } = public TestInfo getInfo() { - if (drivers =3D=3D null) + if (delegate =3D=3D null) { return new SimpleTestSuiteInfo("Empty"); } = // - return drivers.getInfo(); + return delegate.getInfo(); } = public DriverResponse invoke(TestId id, DriverCommand command) { - if (drivers =3D=3D null) + if (delegate =3D=3D null) { return new FailureResponse(Failure.createErrorFailure("No such te= st with id " + id)); } = // - return drivers.invoke(id, command); + return delegate.invoke(id, command); } = public void pushContext(TestId testId, RequestContext requestContext) { - if (drivers !=3D null) + if (delegate !=3D null) { - drivers.pushContext(testId, requestContext); + delegate.pushContext(testId, requestContext); } } = public ResponseContext popContext(TestId testId) { - if (drivers !=3D null) + if (delegate !=3D null) { - return drivers.popContext(testId); + return delegate.popContext(testId); } = // --===============2571642171015113209==-- From portal-commits at lists.jboss.org Thu Oct 18 11:38:26 2007 Content-Type: multipart/mixed; boundary="===============5824426935170574841==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8691 - in modules/test/trunk: unit/src/main/org/jboss/unit/info/impl and 1 other directory. Date: Thu, 18 Oct 2007 11:34:26 -0400 Message-ID: --===============5824426935170574841== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: julien(a)jboss.com Date: 2007-10-18 11:34:25 -0400 (Thu, 18 Oct 2007) New Revision: 8691 Modified: modules/test/trunk/remote/src/main/org/jboss/unit/remote/driver/RemoteTe= stDriverClient.java modules/test/trunk/unit/src/main/org/jboss/unit/info/impl/SimpleTestInfo= .java modules/test/trunk/unit/src/main/org/jboss/unit/info/impl/SimpleTestSuit= eInfo.java Log: improve the remote test driver server by using a more flexible delegation m= odel Modified: modules/test/trunk/remote/src/main/org/jboss/unit/remote/driver/R= emoteTestDriverClient.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/remote/src/main/org/jboss/unit/remote/driver/RemoteT= estDriverClient.java 2007-10-18 15:09:20 UTC (rev 8690) +++ modules/test/trunk/remote/src/main/org/jboss/unit/remote/driver/RemoteT= estDriverClient.java 2007-10-18 15:34:25 UTC (rev 8691) @@ -22,29 +22,28 @@ *************************************************************************= *****/ package org.jboss.unit.remote.driver; = -import org.jboss.unit.driver.TestDriver; +import org.jboss.beans.metadata.plugins.AbstractBeanMetaData; +import org.jboss.beans.metadata.plugins.AbstractConstructorMetaData; +import org.jboss.beans.metadata.plugins.AbstractValueMetaData; +import org.jboss.beans.metadata.plugins.annotations.Inject; +import org.jboss.kernel.plugins.bootstrap.basic.BasicBootstrap; +import org.jboss.kernel.plugins.deployment.xml.BeanXMLDeployer; +import org.jboss.kernel.spi.deployment.KernelDeployment; +import org.jboss.portal.test.framework.deployment.Deployer; +import org.jboss.portal.test.framework.server.Node; +import org.jboss.portal.test.framework.server.NodeId; +import org.jboss.portal.test.framework.server.NodeManager; +import org.jboss.unit.Failure; +import org.jboss.unit.TestId; import org.jboss.unit.driver.DriverCommand; -import org.jboss.unit.driver.DriverResponse; import org.jboss.unit.driver.DriverContext; import org.jboss.unit.driver.DriverException; -import org.jboss.unit.driver.response.FailureResponse; +import org.jboss.unit.driver.DriverResponse; +import org.jboss.unit.driver.TestDriver; import org.jboss.unit.driver.command.StartTestCommand; +import org.jboss.unit.driver.response.FailureResponse; import org.jboss.unit.info.TestInfo; -import org.jboss.unit.info.TestSuiteInfo; -import org.jboss.unit.info.impl.SimpleTestSuiteInfo; -import org.jboss.unit.TestId; -import org.jboss.unit.Failure; -import org.jboss.portal.test.framework.server.NodeId; -import org.jboss.portal.test.framework.server.Node; -import org.jboss.portal.test.framework.server.NodeManager; -import org.jboss.portal.test.framework.deployment.Deployer; -import org.jboss.kernel.plugins.bootstrap.basic.BasicBootstrap; -import org.jboss.kernel.plugins.deployment.xml.BeanXMLDeployer; -import org.jboss.kernel.spi.deployment.KernelDeployment; -import org.jboss.beans.metadata.plugins.AbstractBeanMetaData; -import org.jboss.beans.metadata.plugins.AbstractConstructorMetaData; -import org.jboss.beans.metadata.plugins.AbstractValueMetaData; -import org.jboss.beans.metadata.plugins.annotations.Inject; +import org.jboss.unit.info.impl.SimpleTestInfo; = import java.net.URL; = @@ -63,7 +62,7 @@ // Services = /** . */ - private SimpleTestSuiteInfo info; + private SimpleTestInfo info; = /** . */ private DriverContext context; @@ -191,7 +190,7 @@ TestDriver server =3D getServer(node); = // - info =3D new SimpleTestSuiteInfo((TestSuiteInfo)server.getInfo()); + info =3D SimpleTestInfo.create(server.getInfo()); } = public void destroyDriver() Modified: modules/test/trunk/unit/src/main/org/jboss/unit/info/impl/SimpleT= estInfo.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/info/impl/SimpleTestInf= o.java 2007-10-18 15:09:20 UTC (rev 8690) +++ modules/test/trunk/unit/src/main/org/jboss/unit/info/impl/SimpleTestInf= o.java 2007-10-18 15:34:25 UTC (rev 8691) @@ -24,6 +24,8 @@ = import org.jboss.unit.info.TestInfo; import org.jboss.unit.info.ParameterInfo; +import org.jboss.unit.info.TestSuiteInfo; +import org.jboss.unit.info.TestCaseInfo; = import java.util.Map; import java.util.Set; @@ -118,4 +120,29 @@ } this.keywords =3D new HashSet(keywords); } + + /** + * Factory method for cloning the state of an existing test info. + * + * @param testInfo the inf oto clone + * @return the clone + * @throws IllegalArgumentException if the test info is null or has an = incorrect state + */ + public static SimpleTestInfo create(TestInfo testInfo) throws IllegalAr= gumentException + { + if (testInfo =3D=3D null) + { + throw new IllegalArgumentException(); + } + if (testInfo instanceof TestSuiteInfo) + { + TestSuiteInfo testSuite =3D (TestSuiteInfo)testInfo; + return new SimpleTestSuiteInfo(testSuite); + } + else + { + TestCaseInfo testCase =3D (TestCaseInfo)testInfo; + return new SimpleTestCaseInfo(testCase); + } + } } Modified: modules/test/trunk/unit/src/main/org/jboss/unit/info/impl/SimpleT= estSuiteInfo.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/info/impl/SimpleTestSui= teInfo.java 2007-10-18 15:09:20 UTC (rev 8690) +++ modules/test/trunk/unit/src/main/org/jboss/unit/info/impl/SimpleTestSui= teInfo.java 2007-10-18 15:34:25 UTC (rev 8691) @@ -24,7 +24,6 @@ = import org.jboss.unit.info.TestSuiteInfo; import org.jboss.unit.info.TestInfo; -import org.jboss.unit.info.TestCaseInfo; import org.jboss.unit.TestId; = import java.util.Map; @@ -149,20 +148,6 @@ this.parameters =3D parameters; } = - private SimpleTestInfo create(TestInfo test) - { - if (test instanceof TestSuiteInfo) - { - TestSuiteInfo testSuite =3D (TestSuiteInfo)test; - return new SimpleTestSuiteInfo(testSuite); - } - else - { - TestCaseInfo testCase =3D (TestCaseInfo)test; - return new SimpleTestCaseInfo(testCase); - } - } - public String toString() { StringBuilder builder =3D new StringBuilder(getName()); @@ -179,4 +164,5 @@ builder.append(']'); return builder.toString(); } + } --===============5824426935170574841==-- From portal-commits at lists.jboss.org Thu Oct 18 11:59:04 2007 Content-Type: multipart/mixed; boundary="===============2061875887298891486==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8693 - docs/trunk. Date: Thu, 18 Oct 2007 11:55:04 -0400 Message-ID: --===============2061875887298891486== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: thomas.heute(a)jboss.com Date: 2007-10-18 11:55:04 -0400 (Thu, 18 Oct 2007) New Revision: 8693 Removed: docs/trunk/docbook-support/ Log: Removing docbook-support from trunk --===============2061875887298891486==-- From portal-commits at lists.jboss.org Thu Oct 18 12:06:19 2007 Content-Type: multipart/mixed; boundary="===============8686378560922719701==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8694 - /. Date: Thu, 18 Oct 2007 12:02:19 -0400 Message-ID: --===============8686378560922719701== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: thomas.heute(a)jboss.com Date: 2007-10-18 12:02:19 -0400 (Thu, 18 Oct 2007) New Revision: 8694 Added: tools/ Log: Mkdir --===============8686378560922719701==-- From portal-commits at lists.jboss.org Thu Oct 18 12:06:41 2007 Content-Type: multipart/mixed; boundary="===============1669524660250458178==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8695 - tools and 1 other directory. Date: Thu, 18 Oct 2007 12:02:40 -0400 Message-ID: --===============1669524660250458178== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: thomas.heute(a)jboss.com Date: 2007-10-18 12:02:40 -0400 (Thu, 18 Oct 2007) New Revision: 8695 Added: tools/docbook/ Removed: docbook/ Log: Oups Copied: tools/docbook (from rev 8694, docbook) --===============1669524660250458178==-- From portal-commits at lists.jboss.org Thu Oct 18 12:31:47 2007 Content-Type: multipart/mixed; boundary="===============7210672395675225825==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8696 - in branches/UIServer: uiserver and 1 other directory. Date: Thu, 18 Oct 2007 12:31:46 -0400 Message-ID: --===============7210672395675225825== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: sohil.shah(a)jboss.com Date: 2007-10-18 12:31:46 -0400 (Thu, 18 Oct 2007) New Revision: 8696 Modified: branches/UIServer/core-uiserver/build.xml branches/UIServer/uiserver/build.xml Log: cleaning up build to clear up module dependencies Modified: branches/UIServer/core-uiserver/build.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/UIServer/core-uiserver/build.xml 2007-10-18 16:02:40 UTC (rev = 8695) +++ branches/UIServer/core-uiserver/build.xml 2007-10-18 16:31:46 UTC (rev = 8696) @@ -96,9 +96,9 @@ - = + = = - = + = = Modified: branches/UIServer/uiserver/build.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/UIServer/uiserver/build.xml 2007-10-18 16:02:40 UTC (rev 8695) +++ branches/UIServer/uiserver/build.xml 2007-10-18 16:31:46 UTC (rev 8696) @@ -96,13 +96,10 @@ = - - = + = + - - - - = + = = --===============7210672395675225825==-- From portal-commits at lists.jboss.org Thu Oct 18 12:37:17 2007 Content-Type: multipart/mixed; boundary="===============2181102923630621734==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8697 - branches. Date: Thu, 18 Oct 2007 12:37:16 -0400 Message-ID: --===============2181102923630621734== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: sohil.shah(a)jboss.com Date: 2007-10-18 12:37:16 -0400 (Thu, 18 Oct 2007) New Revision: 8697 Added: branches/JBoss_Portal_2_6_2_SecurityPatch/ Log: Creating a branch to test porting of security patch Copied: branches/JBoss_Portal_2_6_2_SecurityPatch (from rev 8696, tags/JBos= s_Portal_2_6_2) --===============2181102923630621734==-- From portal-commits at lists.jboss.org Thu Oct 18 15:04:44 2007 Content-Type: multipart/mixed; boundary="===============1379053438912034625==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8698 - docs/trunk. Date: Thu, 18 Oct 2007 15:04:44 -0400 Message-ID: --===============1379053438912034625== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: thomas.heute(a)jboss.com Date: 2007-10-18 15:04:44 -0400 (Thu, 18 Oct 2007) New Revision: 8698 Modified: docs/trunk/ Log: Try again Property changes on: docs/trunk ___________________________________________________________________ Name: svn:externals + docbook-support http://anonsvn.jboss.org/repos/portal/tools/docbook/su= pport/ --===============1379053438912034625==-- From portal-commits at lists.jboss.org Thu Oct 18 15:10:46 2007 Content-Type: multipart/mixed; boundary="===============5348258153268680839==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8699 - docs/trunk. Date: Thu, 18 Oct 2007 15:10:46 -0400 Message-ID: --===============5348258153268680839== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: thomas.heute(a)jboss.com Date: 2007-10-18 15:10:46 -0400 (Thu, 18 Oct 2007) New Revision: 8699 Modified: docs/trunk/ Log: Adding styles Property changes on: docs/trunk ___________________________________________________________________ Name: svn:externals - docbook-support http://anonsvn.jboss.org/repos/portal/tools/docbook/su= pport/ + docbook-support http://anonsvn.jboss.org/repos/portal/tools/docbook/su= pport/ docbook-support/styles http://anonsvn.jboss.org/repos/portal/tools/docbook/= styles/renaissance/ --===============5348258153268680839==-- From portal-commits at lists.jboss.org Thu Oct 18 16:26:35 2007 Content-Type: multipart/mixed; boundary="===============7002508774974100761==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8700 - in docs: template and 5 other directories. Date: Thu, 18 Oct 2007 16:26:35 -0400 Message-ID: --===============7002508774974100761== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: thomas.heute(a)jboss.com Date: 2007-10-18 16:26:35 -0400 (Thu, 18 Oct 2007) New Revision: 8700 Added: docs/template/ docs/template/svn-commit.tmp docs/template/user-guide/ docs/template/user-guide/build.xml docs/template/user-guide/en/ docs/template/user-guide/en/ajax.xml docs/template/user-guide/en/images/ docs/template/user-guide/en/images/sample/ docs/template/user-guide/en/images/sample/partial-refresh.png docs/template/user-guide/en/master.xml docs/template/user-guide/en/modules/ docs/template/user-guide/en/modules/sample.xml Log: Initial import Added: docs/template/svn-commit.tmp =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- docs/template/svn-commit.tmp (rev 0) +++ docs/template/svn-commit.tmp 2007-10-18 20:26:35 UTC (rev 8700) @@ -0,0 +1,4 @@ +Initial import +--This line, and those below, will be ignored-- + +A . Added: docs/template/user-guide/build.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- docs/template/user-guide/build.xml (rev 0) +++ docs/template/user-guide/build.xml 2007-10-18 20:26:35 UTC (rev 8700) @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + = + + + Property changes on: docs/template/user-guide/build.xml ___________________________________________________________________ Name: svn:executable + = Added: docs/template/user-guide/en/ajax.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- docs/template/user-guide/en/ajax.xml (rev 0) +++ docs/template/user-guide/en/ajax.xml 2007-10-18 20:26:35 UTC (rev 8700) @@ -0,0 +1,273 @@ + + + + + Julien + Viet + julien.viet(a)jboss.com + + + Ajax + This section covers the ajax features provided by the portal. + + Introduction + Todo + + + Ajaxified markup + + Ajaxified layouts + Part of the Ajax capabilities are implemented in the layout= framework which provide the structure for + generating portal pages. The good news is that the existing layou= t only requires a few modifications in + order to be ajaxified. + We will use as example an simplified version of the layout = JSP provided in JBoss Portal 2.6 and outline + what are the required changes that makes it an ajaxified layout: + + + + + + + + + + + + + +
+
+
+
+ + + + +
+ + + + + + +
+
+
+ + + + +
+
+
+
+
+ + + + + +]]>
+ + ]]> = should be already present as it exists since 2.4 but is even more + necessary as it will inject in the page the reference to= the ajax stylesheet. + ]]> should be added before any other region + in the markup of the layout. + ]]> should be added after any other region + in the markup of the layout. + +
+
+ + Ajaxified renderers + At runtime the portal combines the layout and the renderers= in order create the markup returned to the + web browser. The most used render set is the divRenderer. Rendere= rs only need a modification in the deployment + descriptor to indicate that they support ajax. Here is the declar= ation of the default divRenderer now in 2.6: + + + true + org.jboss.portal.theme.impl.render.div.DivRegionRen= derer + + org.jboss.portal.theme.impl.render.div.DivWindowRen= derer + + org.jboss.portal.theme.impl.render.div.DivPortletR= enderer + + org.jboss.portal.theme.impl.render.div.DivDecor= ationRenderer + + + +]]> + You should notice the true]]> which indicates that the render set + supports ajaxification. + +
+ + Ajaxified pages + The ajaxification of the portal pages can be configured in a f= ine grained manner. Thanks to the portal + object properties it is possible to control which pages support ajax= and which page do not support ajax. The + administrator must pay attention to the fact that property values ar= e inherited in the object hierarchy. + + Drag and Drop + That feature is only effective in dashboards as it requires= the offer personalization of the page + layout per user. By default the feature is enabled thanks to a pr= operty set on the dashboard object. + It is possible to turn off that property if the administrator doe= s not want to expose that feature + to its user. + In the file jboss-portal.sar/conf/data/default-ob= ject.xml is declared and configured the + creation of the dashboard portal: + + + keep + + dashboard + + ... + + theme.dyna.dnd_enabled + true + + ... + + ... + + +]]> + The property theme.dyna.dnd_enabled is= set to the value true + which means that the dashboard object will provide the drag and d= rop feature. + + + + Partial refresh + Partial refresh is a very powerful feature which allows the= portal to optimize the refreshing + of portlets on a page. When one portlet is invoked, instead of re= drawing the full page, the portal is able + to detect which portlets needs to be refreshed and will update on= ly these portlets. + + + + + + The portal providing partial refresh + + + + Portal objects configuration + Like with the drag and drop feature, partial page refres= h is controlled via properties on portal objects. + The name of the property is theme.dyna.partial_re= fresh_enabled and its values can + be true or false.= When this property is set on an object + it is automatically inherited by the sub hierarchy located = under that object. By default the drag + and drop feature is positionned on the dashboard object and= not on the rest of the portal objects. + + + + keep + + dashboard + + ... + + theme.dyna.partial_refresh_enabled + true + + ... + + ... + + +]]> + + The partial page refresh feature is compatible with the Por= tal API. The Portal API allows programmatic + update of the state of portlets at runtime. For instance it= is possible to modify the window state or + the mode of several portlets on a given page. When such eve= nt occurs, the portal detects the changes + which occured and will update the portlet fragments in the = page. + + It is possible to change that behavior at runtime using = the property editor of the management portlet. + If you want to enable partial refreshing on the default portal= you should set the property to true + directly on the portal and all the pages in that portal will a= utomatically inherit those properties. + + + + + + The default portal configured for partial page ref= resh + + + + + Portlet configuration + + By default any portlet will support partial refreshing. Whe= n does the portal performs partial page + refreshing ? By default it is enabled for action and render= links with the following exceptions. In those + situations, the portal will prefer to perform a full page r= efresh: + + + Form GET are not handled, however it should not= be an issue as this situation is discouraged + by the Portlet specification. It however taken in acc= ount, just in case of. Here is an example + of a Java Server Page that would do one: + " method=3D"get"> + ... + +]]> + + + Form uploads are not handled. + + Having an interaction that deals with the MAXIMIZED window state. + When a window is entering a maximized state or leaving a= maximized window state, the portal will + perform a full page refresh. + + + It can happen that a portlet does not want to support pa= rtial refreshing, in those situations + the jboss-portlet.xml can be used to cont= rol that behavior. Since 2.6 an ajax + section has been added in order to configure ajax features rel= ated to the portlet. + + MyPortletNoAjax + + false + + +]]> + The usage of the partial-refresh se= t to the value false means that + the portlet will not be subject of a partial page refresh when= it is invoked. However the portlet + markup can still be subject to a partial rendering. + + + Limitations + Partial refreshing of portlets has limitations both on t= he server side (portal) and on the client side (browser). + + Application scoped session attributes + When partial refresh is activated, the state of a pag= e can potentially become inconsistent. for + example, if some objects are shared in the application scop= e of the session between portlets. When one + portlet update a session object, the other portlet won't be= refreshed and will still display content based + on the previous value of the object in the session. To avoi= d that, partial refresh can be desactivated + for certain portlets by adding <portlet-refresh>false= <portlet-refresh> in the jboss-portlet.xml file. + + + Non ajax interactions + The solution developped by JBoss Portal on the client= side is built on top of DOM events emitted + by the web browser when the user interracts with the pag= e. If an interaction is done without an + emission of an event then JBoss Portal will not be able = to transform it into a partial refresh and + it will result instead of a full refresh. This can happe= n with programmatic submission of forms. + + " action=3D"<%=3D renderResponse.createActionUR= L() %>" method=3D"post"> + ... + + ... + +]]> + + + + +
\ No newline at end of file Added: docs/template/user-guide/en/images/sample/partial-refresh.png =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D (Binary files differ) Property changes on: docs/template/user-guide/en/images/sample/partial-refr= esh.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: docs/template/user-guide/en/master.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- docs/template/user-guide/en/master.xml (rev 0) +++ docs/template/user-guide/en/master.xml 2007-10-18 20:26:35 UTC (rev 870= 0) @@ -0,0 +1,21 @@ + + + ]> + + + Change Title in master.xml + Change SubTitle in master.xml + Change Release Info in master.xml + Change Release Info Date in master.xml + + Thomas + Heute + theute(a)jboss.org + + + + &sample; + + Property changes on: docs/template/user-guide/en/master.xml ___________________________________________________________________ Name: svn:executable + = Added: docs/template/user-guide/en/modules/sample.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- docs/template/user-guide/en/modules/sample.xml = (rev 0) +++ docs/template/user-guide/en/modules/sample.xml 2007-10-18 20:26:35 UTC = (rev 8700) @@ -0,0 +1,58 @@ + + + + + Julien + Viet + julien.viet(a)jboss.com + + + My title + This section covers the ajax features provided by the portal. + + Introduction + Todo + + + Ajaxified markup + + Ajaxified layouts + Part of the Ajax capabilities are implemented in the layout= framework which provide the structure for + generating portal pages. The good news is that the existing layou= t only requires a few modifications in + order to be ajaxified. + We will use as example an simplified version of the layout = JSP provided in JBoss Portal 2.6 and outline + what are the required changes that makes it an ajaxified layout: + + + + + + + + + + +]]> + + ]]> = should be already present as it exists since 2.4 but is even more + necessary as it will inject in the page the reference to= the ajax stylesheet. + ]]> should be added before any other region + in the markup of the layout. + ]]> should be added after any other region + in the markup of the layout. + + + + + + + + The portal providing partial refresh + + + + + --===============7002508774974100761==-- From portal-commits at lists.jboss.org Thu Oct 18 16:27:18 2007 Content-Type: multipart/mixed; boundary="===============2504840466686871888==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8701 - docs/template. Date: Thu, 18 Oct 2007 16:27:18 -0400 Message-ID: --===============2504840466686871888== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: thomas.heute(a)jboss.com Date: 2007-10-18 16:27:18 -0400 (Thu, 18 Oct 2007) New Revision: 8701 Removed: docs/template/svn-commit.tmp Log: Oups Deleted: docs/template/svn-commit.tmp =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- docs/template/svn-commit.tmp 2007-10-18 20:26:35 UTC (rev 8700) +++ docs/template/svn-commit.tmp 2007-10-18 20:27:18 UTC (rev 8701) @@ -1,4 +0,0 @@ -Initial import ---This line, and those below, will be ignored-- - -A . --===============2504840466686871888==-- From portal-commits at lists.jboss.org Thu Oct 18 16:30:46 2007 Content-Type: multipart/mixed; boundary="===============8660610195710337686==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8702 - in docs/template: user-guide and 1 other directories. Date: Thu, 18 Oct 2007 16:30:46 -0400 Message-ID: --===============8660610195710337686== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: thomas.heute(a)jboss.com Date: 2007-10-18 16:30:45 -0400 (Thu, 18 Oct 2007) New Revision: 8702 Modified: docs/template/ docs/template/user-guide/build.xml docs/template/user-guide/en/master.xml Log: Fixing Property changes on: docs/template ___________________________________________________________________ Name: svn:externals + docbook-support http://anonsvn.jboss.org/repos/portal/tools/docbook/su= pport/ docbook-support/styles http://anonsvn.jboss.org/repos/portal/tools/docbook/= styles/renaissance/ Modified: docs/template/user-guide/build.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- docs/template/user-guide/build.xml 2007-10-18 20:27:18 UTC (rev 8701) +++ docs/template/user-guide/build.xml 2007-10-18 20:30:45 UTC (rev 8702) @@ -4,7 +4,7 @@ = - + = Modified: docs/template/user-guide/en/master.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- docs/template/user-guide/en/master.xml 2007-10-18 20:27:18 UTC (rev 870= 1) +++ docs/template/user-guide/en/master.xml 2007-10-18 20:30:45 UTC (rev 870= 2) @@ -1,6 +1,6 @@ ]> --===============8660610195710337686==-- From portal-commits at lists.jboss.org Thu Oct 18 16:41:25 2007 Content-Type: multipart/mixed; boundary="===============0751126267330413929==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8703 - tools/docbook/support. Date: Thu, 18 Oct 2007 16:41:25 -0400 Message-ID: --===============0751126267330413929== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: thomas.heute(a)jboss.com Date: 2007-10-18 16:41:25 -0400 (Thu, 18 Oct 2007) New Revision: 8703 Modified: tools/docbook/support/support.xml Log: Don't fail if common directory doesn't exist Modified: tools/docbook/support/support.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- tools/docbook/support/support.xml 2007-10-18 20:30:45 UTC (rev 8702) +++ tools/docbook/support/support.xml 2007-10-18 20:41:25 UTC (rev 8703) @@ -104,7 +104,7 @@ will be removed later. --> = - + @@ -158,7 +158,7 @@ = - + @@ -188,7 +188,7 @@ = - + --===============0751126267330413929==-- From portal-commits at lists.jboss.org Thu Oct 18 16:42:34 2007 Content-Type: multipart/mixed; boundary="===============4104629655754489746==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8704 - modules/test/trunk. Date: Thu, 18 Oct 2007 16:42:34 -0400 Message-ID: --===============4104629655754489746== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: thomas.heute(a)jboss.com Date: 2007-10-18 16:42:33 -0400 (Thu, 18 Oct 2007) New Revision: 8704 Added: modules/test/trunk/docs/ Log: Copying the template into the test module Copied: modules/test/trunk/docs (from rev 8703, docs/template) --===============4104629655754489746==-- From portal-commits at lists.jboss.org Thu Oct 18 18:08:06 2007 Content-Type: multipart/mixed; boundary="===============6850919151212548384==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8705 - in modules/common/trunk/common: src/main/java/org/jboss/portal/common/text and 2 other directories. Date: Thu, 18 Oct 2007 18:08:06 -0400 Message-ID: --===============6850919151212548384== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: julien(a)jboss.com Date: 2007-10-18 18:08:06 -0400 (Thu, 18 Oct 2007) New Revision: 8705 Modified: modules/common/trunk/common/pom.xml modules/common/trunk/common/src/main/java/org/jboss/portal/common/text/F= astURLDecoder.java modules/common/trunk/common/src/test/java/org/jboss/portal/test/common/t= ext/FastURLDecoderTestCase.java modules/common/trunk/common/src/test/resources/implode/foo.sar/bar.war/i= ndex.jsp Log: JBPORTAL-1759 : FastURLDecoder with malformed input %FC throws an ArrayInde= xOutOfBoundsException instead of throwing MalformedInputException Modified: modules/common/trunk/common/pom.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/common/trunk/common/pom.xml 2007-10-18 20:42:33 UTC (rev 8704) +++ modules/common/trunk/common/pom.xml 2007-10-18 22:08:06 UTC (rev 8705) @@ -145,6 +145,10 @@ org.apache.maven.plugins maven-surefire-plugin + org/jboss/portal/test/common/BundleNameParserTe= stCase*.java org/jboss/portal/test/common/net/URLNavigatorTe= stCase.java Modified: modules/common/trunk/common/src/main/java/org/jboss/portal/common= /text/FastURLDecoder.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/common/trunk/common/src/main/java/org/jboss/portal/common/text/= FastURLDecoder.java 2007-10-18 20:42:33 UTC (rev 8704) +++ modules/common/trunk/common/src/main/java/org/jboss/portal/common/text/= FastURLDecoder.java 2007-10-18 22:08:06 UTC (rev 8705) @@ -252,19 +252,19 @@ tmp.append(' '); break; case ESCAPE: - if (i + 2 > length) - { - throw new MalformedInputException("Not enough chars to d= ecode an escaped value length should have been" + - (i + 2) + " but is " + length); - } - - // int j =3D i; = // LookupNonTerm current =3D root; while (true) { + if (j + 2 > length) + { + throw new MalformedInputException("Not enough chars t= o decode an escaped value length should have been" + + (j + 2) + " but is " + length); + } + + // char c1 =3D chars[j++]; char c2 =3D chars[j++]; = Modified: modules/common/trunk/common/src/test/java/org/jboss/portal/test/c= ommon/text/FastURLDecoderTestCase.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/common/trunk/common/src/test/java/org/jboss/portal/test/common/= text/FastURLDecoderTestCase.java 2007-10-18 20:42:33 UTC (rev 8704) +++ modules/common/trunk/common/src/test/java/org/jboss/portal/test/common/= text/FastURLDecoderTestCase.java 2007-10-18 22:08:06 UTC (rev 8705) @@ -203,6 +203,14 @@ catch (MalformedInputException expected) { } + try + { + encoder.encode("%FC", new CharBuffer()); + fail(); + } + catch (MalformedInputException expected) + { + } = // if (strict) Modified: modules/common/trunk/common/src/test/resources/implode/foo.sar/ba= r.war/index.jsp =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/common/trunk/common/src/test/resources/implode/foo.sar/bar.war/= index.jsp 2007-10-18 20:42:33 UTC (rev 8704) +++ modules/common/trunk/common/src/test/resources/implode/foo.sar/bar.war/= index.jsp 2007-10-18 22:08:06 UTC (rev 8705) @@ -0,0 +1 @@ +<%@ page language=3D"java" %> \ No newline at end of file --===============6850919151212548384==-- From portal-commits at lists.jboss.org Thu Oct 18 19:22:29 2007 Content-Type: multipart/mixed; boundary="===============3161600183205118998==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8706 - in modules/test/trunk/build/ide/intellij/idea70: modules and 1 other directories. Date: Thu, 18 Oct 2007 19:22:29 -0400 Message-ID: --===============3161600183205118998== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: julien(a)jboss.com Date: 2007-10-18 19:22:29 -0400 (Thu, 18 Oct 2007) New Revision: 8706 Added: modules/test/trunk/build/ide/intellij/idea70/modules/docs/ modules/test/trunk/build/ide/intellij/idea70/modules/docs/docs.iml Modified: modules/test/trunk/build/ide/intellij/idea70/jboss-portal-test.ipr Log: added docs modoule in idea7 Modified: modules/test/trunk/build/ide/intellij/idea70/jboss-portal-test.ipr =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/build/ide/intellij/idea70/jboss-portal-test.ipr 2007= -10-18 22:08:06 UTC (rev 8705) +++ modules/test/trunk/build/ide/intellij/idea70/jboss-portal-test.ipr 2007= -10-18 23:22:29 UTC (rev 8706) @@ -112,6 +112,32 @@
+ + @@ -236,6 +262,7 @@ + @@ -246,7 +273,7 @@ - + @@ -265,6 +292,7 @@ + Added: modules/test/trunk/build/ide/intellij/idea70/modules/docs/docs.iml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/build/ide/intellij/idea70/modules/docs/docs.iml = (rev 0) +++ modules/test/trunk/build/ide/intellij/idea70/modules/docs/docs.iml 2007= -10-18 23:22:29 UTC (rev 8706) @@ -0,0 +1,11 @@ + + + + + + + + + + + --===============3161600183205118998==-- From portal-commits at lists.jboss.org Thu Oct 18 19:30:00 2007 Content-Type: multipart/mixed; boundary="===============0832722582590650829==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8707 - in modules/test/trunk/docs/user-guide/en: modules and 1 other directory. Date: Thu, 18 Oct 2007 19:30:00 -0400 Message-ID: --===============0832722582590650829== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: julien(a)jboss.com Date: 2007-10-18 19:29:59 -0400 (Thu, 18 Oct 2007) New Revision: 8707 Added: modules/test/trunk/docs/user-guide/en/modules/introduction.xml Removed: modules/test/trunk/docs/user-guide/en/ajax.xml Modified: modules/test/trunk/docs/user-guide/en/master.xml Log: setup base info in docbook Deleted: modules/test/trunk/docs/user-guide/en/ajax.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/docs/user-guide/en/ajax.xml 2007-10-18 23:22:29 UTC = (rev 8706) +++ modules/test/trunk/docs/user-guide/en/ajax.xml 2007-10-18 23:29:59 UTC = (rev 8707) @@ -1,273 +0,0 @@ - - - - - Julien - Viet - julien.viet(a)jboss.com - - - Ajax - This section covers the ajax features provided by the portal. - - Introduction - Todo - - - Ajaxified markup - - Ajaxified layouts - Part of the Ajax capabilities are implemented in the layout= framework which provide the structure for - generating portal pages. The good news is that the existing layou= t only requires a few modifications in - order to be ajaxified. - We will use as example an simplified version of the layout = JSP provided in JBoss Portal 2.6 and outline - what are the required changes that makes it an ajaxified layout: - - - - - - - - - - - - - -
-
-
-
- - - - -
- - - - - - -
-
-
- - - - -
-
-
-
-
- - - - - -]]>
- - ]]> = should be already present as it exists since 2.4 but is even more - necessary as it will inject in the page the reference to= the ajax stylesheet. - ]]> should be added before any other region - in the markup of the layout. - ]]> should be added after any other region - in the markup of the layout. - -
-
- - Ajaxified renderers - At runtime the portal combines the layout and the renderers= in order create the markup returned to the - web browser. The most used render set is the divRenderer. Rendere= rs only need a modification in the deployment - descriptor to indicate that they support ajax. Here is the declar= ation of the default divRenderer now in 2.6: - - - true - org.jboss.portal.theme.impl.render.div.DivRegionRen= derer - - org.jboss.portal.theme.impl.render.div.DivWindowRen= derer - - org.jboss.portal.theme.impl.render.div.DivPortletR= enderer - - org.jboss.portal.theme.impl.render.div.DivDecor= ationRenderer - - - -]]> - You should notice the true]]> which indicates that the render set - supports ajaxification. - -
- - Ajaxified pages - The ajaxification of the portal pages can be configured in a f= ine grained manner. Thanks to the portal - object properties it is possible to control which pages support ajax= and which page do not support ajax. The - administrator must pay attention to the fact that property values ar= e inherited in the object hierarchy. - - Drag and Drop - That feature is only effective in dashboards as it requires= the offer personalization of the page - layout per user. By default the feature is enabled thanks to a pr= operty set on the dashboard object. - It is possible to turn off that property if the administrator doe= s not want to expose that feature - to its user. - In the file jboss-portal.sar/conf/data/default-ob= ject.xml is declared and configured the - creation of the dashboard portal: - - - keep - - dashboard - - ... - - theme.dyna.dnd_enabled - true - - ... - - ... - - -]]> - The property theme.dyna.dnd_enabled is= set to the value true - which means that the dashboard object will provide the drag and d= rop feature. - - - - Partial refresh - Partial refresh is a very powerful feature which allows the= portal to optimize the refreshing - of portlets on a page. When one portlet is invoked, instead of re= drawing the full page, the portal is able - to detect which portlets needs to be refreshed and will update on= ly these portlets. - - - - - - The portal providing partial refresh - - - - Portal objects configuration - Like with the drag and drop feature, partial page refres= h is controlled via properties on portal objects. - The name of the property is theme.dyna.partial_re= fresh_enabled and its values can - be true or false.= When this property is set on an object - it is automatically inherited by the sub hierarchy located = under that object. By default the drag - and drop feature is positionned on the dashboard object and= not on the rest of the portal objects. - - - - keep - - dashboard - - ... - - theme.dyna.partial_refresh_enabled - true - - ... - - ... - - -]]> - - The partial page refresh feature is compatible with the Por= tal API. The Portal API allows programmatic - update of the state of portlets at runtime. For instance it= is possible to modify the window state or - the mode of several portlets on a given page. When such eve= nt occurs, the portal detects the changes - which occured and will update the portlet fragments in the = page. - - It is possible to change that behavior at runtime using = the property editor of the management portlet. - If you want to enable partial refreshing on the default portal= you should set the property to true - directly on the portal and all the pages in that portal will a= utomatically inherit those properties. - - - - - - The default portal configured for partial page ref= resh - - - - - Portlet configuration - - By default any portlet will support partial refreshing. Whe= n does the portal performs partial page - refreshing ? By default it is enabled for action and render= links with the following exceptions. In those - situations, the portal will prefer to perform a full page r= efresh: - - - Form GET are not handled, however it should not= be an issue as this situation is discouraged - by the Portlet specification. It however taken in acc= ount, just in case of. Here is an example - of a Java Server Page that would do one: - " method=3D"get"> - ... - -]]> - - - Form uploads are not handled. - - Having an interaction that deals with the MAXIMIZED window state. - When a window is entering a maximized state or leaving a= maximized window state, the portal will - perform a full page refresh. - - - It can happen that a portlet does not want to support pa= rtial refreshing, in those situations - the jboss-portlet.xml can be used to cont= rol that behavior. Since 2.6 an ajax - section has been added in order to configure ajax features rel= ated to the portlet. - - MyPortletNoAjax - - false - - -]]> - The usage of the partial-refresh se= t to the value false means that - the portlet will not be subject of a partial page refresh when= it is invoked. However the portlet - markup can still be subject to a partial rendering. - - - Limitations - Partial refreshing of portlets has limitations both on t= he server side (portal) and on the client side (browser). - - Application scoped session attributes - When partial refresh is activated, the state of a pag= e can potentially become inconsistent. for - example, if some objects are shared in the application scop= e of the session between portlets. When one - portlet update a session object, the other portlet won't be= refreshed and will still display content based - on the previous value of the object in the session. To avoi= d that, partial refresh can be desactivated - for certain portlets by adding <portlet-refresh>false= <portlet-refresh> in the jboss-portlet.xml file. - - - Non ajax interactions - The solution developped by JBoss Portal on the client= side is built on top of DOM events emitted - by the web browser when the user interracts with the pag= e. If an interaction is done without an - emission of an event then JBoss Portal will not be able = to transform it into a partial refresh and - it will result instead of a full refresh. This can happe= n with programmatic submission of forms. - - " action=3D"<%=3D renderResponse.createActionUR= L() %>" method=3D"post"> - ... - - ... - -]]> - - - - -
\ No newline at end of file Modified: modules/test/trunk/docs/user-guide/en/master.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/docs/user-guide/en/master.xml 2007-10-18 23:22:29 UT= C (rev 8706) +++ modules/test/trunk/docs/user-guide/en/master.xml 2007-10-18 23:29:59 UT= C (rev 8707) @@ -1,21 +1,20 @@ + ]> - Change Title in master.xml - Change SubTitle in master.xml - Change Release Info in master.xml - Change Release Info Date in master.xml + JBoss Unit + User Guide + Release 1.0 - Thomas - Heute - theute(a)jboss.org + Julien + Viet + julien(a)jboss.org - &sample; + &introduction; = Copied: modules/test/trunk/docs/user-guide/en/modules/introduction.xml (fro= m rev 8705, modules/test/trunk/docs/user-guide/en/modules/sample.xml) =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/docs/user-guide/en/modules/introduction.xml = (rev 0) +++ modules/test/trunk/docs/user-guide/en/modules/introduction.xml 2007-10-= 18 23:29:59 UTC (rev 8707) @@ -0,0 +1,58 @@ + + + + + Julien + Viet + julien(a)jboss.org + + + My title + This section covers the ajax features provided by the portal. + + Introduction + Todo + + + Ajaxified markup + + Ajaxified layouts + Part of the Ajax capabilities are implemented in the layout= framework which provide the structure for + generating portal pages. The good news is that the existing layou= t only requires a few modifications in + order to be ajaxified. + We will use as example an simplified version of the layout = JSP provided in JBoss Portal 2.6 and outline + what are the required changes that makes it an ajaxified layout: + + + + + + + + + + +]]> + + ]]> = should be already present as it exists since 2.4 but is even more + necessary as it will inject in the page the reference to= the ajax stylesheet. + ]]> should be added before any other region + in the markup of the layout. + ]]> should be added after any other region + in the markup of the layout. + + + + + + + + The portal providing partial refresh + + + + + --===============0832722582590650829==-- From portal-commits at lists.jboss.org Thu Oct 18 19:30:27 2007 Content-Type: multipart/mixed; boundary="===============2331699575425432232==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8708 - modules/test/trunk/docs/user-guide/en/images. Date: Thu, 18 Oct 2007 19:30:27 -0400 Message-ID: --===============2331699575425432232== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: julien(a)jboss.com Date: 2007-10-18 19:30:26 -0400 (Thu, 18 Oct 2007) New Revision: 8708 Removed: modules/test/trunk/docs/user-guide/en/images/sample/ Log: remove unused image --===============2331699575425432232==-- From portal-commits at lists.jboss.org Thu Oct 18 19:31:25 2007 Content-Type: multipart/mixed; boundary="===============2326480720024788094==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8709 - modules/test/trunk/docs/user-guide/en/modules. Date: Thu, 18 Oct 2007 19:31:25 -0400 Message-ID: --===============2326480720024788094== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: julien(a)jboss.com Date: 2007-10-18 19:31:25 -0400 (Thu, 18 Oct 2007) New Revision: 8709 Removed: modules/test/trunk/docs/user-guide/en/modules/sample.xml Log: removed unused file Deleted: modules/test/trunk/docs/user-guide/en/modules/sample.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/docs/user-guide/en/modules/sample.xml 2007-10-18 23:= 30:26 UTC (rev 8708) +++ modules/test/trunk/docs/user-guide/en/modules/sample.xml 2007-10-18 23:= 31:25 UTC (rev 8709) @@ -1,58 +0,0 @@ - - - - - Julien - Viet - julien.viet(a)jboss.com - - - My title - This section covers the ajax features provided by the portal. - - Introduction - Todo - - - Ajaxified markup - - Ajaxified layouts - Part of the Ajax capabilities are implemented in the layout= framework which provide the structure for - generating portal pages. The good news is that the existing layou= t only requires a few modifications in - order to be ajaxified. - We will use as example an simplified version of the layout = JSP provided in JBoss Portal 2.6 and outline - what are the required changes that makes it an ajaxified layout: - - - - - - - - - - -]]> - - ]]> = should be already present as it exists since 2.4 but is even more - necessary as it will inject in the page the reference to= the ajax stylesheet. - ]]> should be added before any other region - in the markup of the layout. - ]]> should be added after any other region - in the markup of the layout. - - - - - - - - The portal providing partial refresh - - - - - --===============2326480720024788094==-- From portal-commits at lists.jboss.org Thu Oct 18 20:48:06 2007 Content-Type: multipart/mixed; boundary="===============4733817868303752032==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8710 - in modules/test/trunk/tooling: src/main/org/jboss/test/unit/tooling and 2 other directories. Date: Thu, 18 Oct 2007 20:48:06 -0400 Message-ID: --===============4733817868303752032== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: julien(a)jboss.com Date: 2007-10-18 20:48:05 -0400 (Thu, 18 Oct 2007) New Revision: 8710 Added: modules/test/trunk/tooling/src/main/org/jboss/test/unit/tooling/AssertKe= ywordTest.java modules/test/trunk/tooling/src/resources/test/assertkeyword-unit.xml Modified: modules/test/trunk/tooling/build.xml modules/test/trunk/tooling/src/main/org/jboss/unit/tooling/ant/TestsType= .java Log: by default enable assertions in ant task in order to report errors generate= d by assert keywords Modified: modules/test/trunk/tooling/build.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/tooling/build.xml 2007-10-18 23:31:25 UTC (rev 8709) +++ modules/test/trunk/tooling/build.xml 2007-10-19 00:48:05 UTC (rev 8710) @@ -224,6 +224,9 @@ = + + + &introduction; + &pojotesting; = Modified: modules/test/trunk/docs/user-guide/en/modules/introduction.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/docs/user-guide/en/modules/introduction.xml 2007-10-= 19 00:48:05 UTC (rev 8710) +++ modules/test/trunk/docs/user-guide/en/modules/introduction.xml 2007-10-= 19 01:10:14 UTC (rev 8711) @@ -7,52 +7,46 @@ julien(a)jboss.org - My title - This section covers the ajax features provided by the portal. + Introduction - Introduction + Motivation Todo - Ajaxified markup + Principles + JBoss Unit clearly separates the different concerns for unit t= esting an application. - Ajaxified layouts - Part of the Ajax capabilities are implemented in the layout= framework which provide the structure for - generating portal pages. The good news is that the existing layou= t only requires a few modifications in - order to be ajaxified. - We will use as example an simplified version of the layout = JSP provided in JBoss Portal 2.6 and outline - what are the required changes that makes it an ajaxified layout: - - - - - - - - - - -]]> - - ]]> = should be already present as it exists since 2.4 but is even more - necessary as it will inject in the page the reference to= the ajax stylesheet. - ]]> should be added before any other region - in the markup of the layout. - ]]> should be added after any other region - in the markup of the layout. - - - - - - - - The portal providing partial refresh - - + Framework API + Writing a test case often requires the usage of an API in o= rder to perform interactions between the code tested + and the unit test framework. The first thing that a developer = does is to declare the different methods of the code + that are subject to be tested. In addition it can also declare= how the different tests needs to be parameterized. The + last interaction we recognize is the capability for a develope= r to perform assertions during the execution of the + test and signal to the unit test framework that it failed. JBo= ss Unit provides an API for those purposes that leverages + the features of the Java 5 platform such as annotations, gener= ics or statis imports. This API is not tied to the + framework itself which means that the test written will not ha= ve to import anything from the framework itself. + + Test Driver + The test driver is the part of the framework which defines = the contract of what a tested system is. It + provides support for retrieving the rich description of the te= sted system and perform interactions i.e executing + tests. + The goal of this concept is to isolate the tested system fr= om the unit test framework itself. For instance + the testing of POJOs is done via the implementation of a speci= fic test driver that understand how to extract + test description from a POJO and how to test a POJO. + + + Test Runner + The test runner is the engine of the framework. Indeed the = interface exposed by a test driver is very + simple and low level. The test runner provides a framework tha= t can be used to trigger a serie of tests + leveraging one or several test drivers. The definition of the = tests to execute is written in an XML file + that contains the base configuration for executing a serie of = test. It also provide additional features + such as eventing capabilities and filtering capabilities. + + + Tooling + Tests are triggered by build systems or from command line, = test reporting must also be done in a manner + such as it integrates with other reporting systems. By default= the framework comes with support of Ant, Maven + and JUnit XML reporting schema. + Copied: modules/test/trunk/docs/user-guide/en/modules/pojotesting.xml (from= rev 8708, modules/test/trunk/docs/user-guide/en/modules/introduction.xml) =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/docs/user-guide/en/modules/pojotesting.xml = (rev 0) +++ modules/test/trunk/docs/user-guide/en/modules/pojotesting.xml 2007-10-1= 9 01:10:14 UTC (rev 8711) @@ -0,0 +1,228 @@ + + + + + Julien + Viet + julien(a)jboss.org + + + POJO testing + We will describe in this chapter how to write tests for POJOs. We= will also cover the integration with JBoss Microcontainer + which allow the setup of complex POJO assemblies which enable to tes= t complex system with a reasonable amount of efforts. + The POJO test API leverages numerous Java 5 features in order to = make tests easy to write and read. + + The simplest test case + A test cases is public non static method annotated with the @Test annotation. The method + should have en empty list of arguments. At runtime an instance of th= e class is created and the method is invoked, if the invocation + of the method can be achieved then the test case is considered as a = success. Any exception thrown by the method will signal + that the test failed. + A class containing a serie of test cases is considered as a te= st suite. + + + MyTest.java + + In this example the method test is ou= r test case, and the class MyTest + is our test suite. + The various tested items tested must be declared in a file. Th= is file defines what is tested and how it should be. + One interesting thing is that it describes a tested system in an = manner independant of the tool which will trigger + your tests (command line, Ant, Maven, ...). + + + + + + + + + +]]> + jboss-unit.xml + + + + Making a test fail + + Asssertion and errors + We explained in the previous section that a test is conside= red as failed if it throws an exception during + its execution. There are two categories of failure. + + Assertion failures: produced by any exception instan= ce of the error java.lang.AssertionError. + Error failures: produced by any exception not instan= ce of the error java.lang.AssertionError. + + JBoss Unit relies on the assertion mechanism introduced by = the Java 1.4 platform which introduces the assert. The= first + advantage is that we leverage an existing feature of the platform= , the second advantage is that it will report assertion + failures that would be in the tested domain. + Obviously throwing instances of AssertionErr= or in your code is just an option + that you could use if you want. JBoss Unit comes with its own set= of utility methods that can perform various checks and + will throw an AssertionError if a = condition is evaluated to false. The class + org.jboss.unit.api.Assert contains those s= tatic methods. The class is final which means that + your code cannot extend it, instead you should rather rely on the= static import mechanism in order to import the various + methods needed by your test cases. + + + + The fail method will simply throw = a AssertionError with the specified message.= It will + stop the execution of the test case and it will be considered as = an assertion faillure. + + + Various assertions + + + <methodname>assertNull</methodname> + + Assert that the argument is null. + + + + <methodname>assertNotNull</methodname> + + Assert that the argument is not null. The method relies = on the generics and returns the same type + of the argument type in order to avoid a type cast, improving = the readability of the code. + + + + <methodname></methodname> + + . + + + + <methodname></methodname> + + . + + + + <methodname></methodname> + + . + + + + <methodname></methodname> + + . + + + + <methodname></methodname> + + . + + + + <methodname></methodname> + + . + + + + <methodname></methodname> + + . + + + + + --===============8346843982014989440==-- From portal-commits at lists.jboss.org Fri Oct 19 05:01:50 2007 Content-Type: multipart/mixed; boundary="===============4253355146914724441==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8712 - branches/JBoss_Portal_Branch_2_6/theme/src/main/org/jboss/portal/theme/page. Date: Fri, 19 Oct 2007 05:01:48 -0400 Message-ID: --===============4253355146914724441== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: thomas.heute(a)jboss.com Date: 2007-10-19 05:01:48 -0400 (Fri, 19 Oct 2007) New Revision: 8712 Modified: branches/JBoss_Portal_Branch_2_6/theme/src/main/org/jboss/portal/theme/p= age/WindowContext.java Log: minor Modified: branches/JBoss_Portal_Branch_2_6/theme/src/main/org/jboss/portal/= theme/page/WindowContext.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/theme/src/main/org/jboss/portal/theme/= page/WindowContext.java 2007-10-19 01:10:14 UTC (rev 8711) +++ branches/JBoss_Portal_Branch_2_6/theme/src/main/org/jboss/portal/theme/= page/WindowContext.java 2007-10-19 09:01:48 UTC (rev 8712) @@ -164,6 +164,6 @@ = public String toString() { - return "WindowContext[id=3D" + id + ",region=3D" + regionName + ",or= der=3D" + order; + return "WindowContext[id=3D" + id + ",region=3D" + regionName + ",or= der=3D" + order + "]"; } } --===============4253355146914724441==-- From portal-commits at lists.jboss.org Fri Oct 19 05:53:23 2007 Content-Type: multipart/mixed; boundary="===============3296880200749247237==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8713 - modules/test/trunk/unit/src/main/org/jboss/test/unit/api. Date: Fri, 19 Oct 2007 05:53:23 -0400 Message-ID: --===============3296880200749247237== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: julien(a)jboss.com Date: 2007-10-19 05:53:23 -0400 (Fri, 19 Oct 2007) New Revision: 8713 Modified: modules/test/trunk/unit/src/main/org/jboss/test/unit/api/AssertTests.java Log: added tests cases for equals/notequals for integer and boolean Modified: modules/test/trunk/unit/src/main/org/jboss/test/unit/api/AssertTe= sts.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/test/unit/api/AssertTests.ja= va 2007-10-19 09:01:48 UTC (rev 8712) +++ modules/test/trunk/unit/src/main/org/jboss/test/unit/api/AssertTests.ja= va 2007-10-19 09:53:23 UTC (rev 8713) @@ -45,12 +45,72 @@ testObjectNotSame(); testFail(); testInstanceOf(); + testInteger(); + testBoolean(); } = - public static void testInstanceOf() + private static void testBoolean() { + testAssertEquals(true, true); + testAssertEquals(true, new Boolean(true)); + testAssertEquals(new Boolean(true), new Boolean(true)); + testAssertEquals(new Boolean(true), true); + testAssertNotEquals(true, false); + testAssertNotEquals(new Boolean(true), false); + testAssertNotEquals(true, new Boolean(false)); + testAssertNotEquals(true, new Boolean(false)); + testAssertNotEquals(true, null); + testAssertNotEquals(new Boolean(true), null); + testAssertNotEquals(null, true); + testAssertNotEquals(null, new Boolean(true)); + } + + private static void testInteger() + { + testAssertEquals(1, 1); + testAssertEquals(1, new Integer(1)); + testAssertEquals(new Integer(1), new Integer(1)); + testAssertEquals(new Integer(1), 1); + testAssertNotEquals(1, 2); + testAssertNotEquals(new Integer(1), 2); + testAssertNotEquals(1, new Integer(2)); + testAssertNotEquals(1, new Integer(2)); + testAssertNotEquals(1, null); + testAssertNotEquals(new Integer(1), null); + testAssertNotEquals(null, 1); + testAssertNotEquals(null, new Integer(1)); + } + + private static void testAssertEquals(Object left, Object right) + { + Assert.assertEquals(left, right); try { + Assert.assertNotEquals(left, right); + throw new RuntimeException(); + } + catch (AssertionError ignored) + { + } + } + + private static void testAssertNotEquals(Object left, Object right) + { + Assert.assertNotEquals(left, right); + try + { + Assert.assertEquals(left, right); + throw new RuntimeException(); + } + catch (AssertionError ignored) + { + } + } + + private static void testInstanceOf() + { + try + { Assert.assertInstanceOf(null, Object.class); throw new RuntimeException(); } @@ -150,7 +210,7 @@ { } = - public static void testObjectEquals() + private static void testObjectEquals() { try { @@ -181,7 +241,7 @@ Assert.assertEquals((Object)null, null); } = - public static void testObjectNotEquals() + private static void testObjectNotEquals() { Assert.assertNotEquals(o1, null); Assert.assertNotEquals(null, o1); @@ -212,7 +272,7 @@ } } = - public static void testObjectSame() + private static void testObjectSame() { try { @@ -250,7 +310,7 @@ Assert.assertSame(null, null); } = - public static void testObjectNotSame() + private static void testObjectNotSame() { Assert.assertNotSame(o1, null); Assert.assertNotSame(null, o1); @@ -274,7 +334,7 @@ } } = - public static void testFail() + private static void testFail() { try { --===============3296880200749247237==-- From portal-commits at lists.jboss.org Fri Oct 19 06:42:51 2007 Content-Type: multipart/mixed; boundary="===============8083628085052597500==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8714 - modules/test/trunk/docs/user-guide/en/modules. Date: Fri, 19 Oct 2007 06:42:51 -0400 Message-ID: --===============8083628085052597500== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: julien(a)jboss.com Date: 2007-10-19 06:42:51 -0400 (Fri, 19 Oct 2007) New Revision: 8714 Modified: modules/test/trunk/docs/user-guide/en/modules/pojotesting.xml Log: more documentation Modified: modules/test/trunk/docs/user-guide/en/modules/pojotesting.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/docs/user-guide/en/modules/pojotesting.xml 2007-10-1= 9 09:53:23 UTC (rev 8713) +++ modules/test/trunk/docs/user-guide/en/modules/pojotesting.xml 2007-10-1= 9 10:42:51 UTC (rev 8714) @@ -96,7 +96,8 @@ = <methodname>assertNull</methodname> - + - Assert that the argument is null. + + Assert that the argument is null. + + = <methodname>assertNotNull</methodname> - + - Assert that the argument is not null. The method relies = on the generics and returns the same type - of the argument type in order to avoid a type cast, improving = the readability of the code. + + Assert that the argument is not null. The method relies on the generics and returns the same type + of the argument type in order to avoid a type cast, impr= oving the readability of the code. + + = - <methodname></methodname> - assertEquals + + - . + + Assert that the arguments are either null= or both are non null and the invocation of th= e first argument + equals method with the secon= d argument as parameter returns true. + + = - <methodname></methodname> - assertNotEquals + + - . + + Assert that either one argument is null and the other is not or that both arguments are non + null and the invocation of the fir= st argument equals method returns false. + + = - <methodname></methodname> - assertSame + + - . + + Assert that the arguments are either null= or are non null and have the same reference.<= /para> + + = - <methodname></methodname> - assertNotSame + + - . + + Assert that either one argument is null and the other is not or that both arguments + are non null but do not share the sam= e reference. + + = - <methodname></methodname> - assertInstanceOf + + - . + + Assert that an object implements or extends the sp= ecified class object. It leverages the generics to + have the same return type than the class argument which = allow to reuse the object with its asserted class + directly. + + + + = - - <methodname></methodname> + + Annotations + So far we have covered only the @Test annotation, in this chapter we will + review the other annotations available. + + + <interfacename>@Parameter</interfacename> + It is often interesting to run several times the same test = with different initial conditions. The + @Parameter annotation can be us= ed to provide an initial state to the tests. + It is possible to annotate Javabean property setters or test c= ase method arguments. When a property is annotated, + the parameter is scoped for all test cases contained in the PO= JO. Note that it is allowed to override + the name of the parameter using the name argument of the annotation. + + - . - + + A POJO with annotated Javabean property setters + + = - - <methodname></methodname> + When a test case method argument is annotated, only the tes= t case will have access to the parameter. In that + use case, the optional annotation parameter name becomes mandatory. + + + + A POJO with annotated Javabean property setters + + + + + + + <interfacename>@Test</interfacename> + The @Test annotation is used= to annotate a test case method that + is invoked at runtime by the JBoss Unit POJO extension. The metho= d must be public, non static, non abstract + and should have only arguments annotated with an @= Parameter annotation. + + By default the test name is the name of the + method but the annotation can be parameterized with a name argument that + will override the default name. + + + - . - + + A POJO with several test cases + + = + + + <interfacename>@Create</interfacename> and <interfacename>= @Destroy</interfacename> + The @Create and @Destroy annotations + are targetted for public, non static, methods that will be invoke= d to provide the POJO notifications + of the test life cycle. + The create method will be invoked prior any test case and w= ill have access to POJO scoped parameters. + It is allowed to fail by throwing any kind of throwable and will = make the test fail whenever it happens. If the + create method fails the test case method will not be invoked. + The destroy method is guaranteed to be always invoked wheth= er the test pass or fails. + + + + A POJO aware of its life cycle + + + + + + <interfacename>@Description</interfacename> + + + + + <interfacename>@Tag</interfacename> + + + + + + Integration with JBoss Microcontainer + + --===============8083628085052597500==-- From portal-commits at lists.jboss.org Fri Oct 19 08:28:58 2007 Content-Type: multipart/mixed; boundary="===============5248952763707687861==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8715 - in modules/test/trunk: unit/src/main/org/jboss/unit/api/pojo/annotations and 1 other directories. Date: Fri, 19 Oct 2007 08:28:58 -0400 Message-ID: --===============5248952763707687861== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: julien(a)jboss.com Date: 2007-10-19 08:28:58 -0400 (Fri, 19 Oct 2007) New Revision: 8715 Modified: modules/test/trunk/docs/user-guide/en/modules/pojotesting.xml modules/test/trunk/unit/src/main/org/jboss/unit/api/pojo/annotations/Des= cription.java modules/test/trunk/unit/src/main/org/jboss/unit/spi/pojo/TestProviderSup= port.java Log: more documentation Modified: modules/test/trunk/docs/user-guide/en/modules/pojotesting.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/docs/user-guide/en/modules/pojotesting.xml 2007-10-1= 9 10:42:51 UTC (rev 8714) +++ modules/test/trunk/docs/user-guide/en/modules/pojotesting.xml 2007-10-1= 9 12:28:58 UTC (rev 8715) @@ -413,18 +413,237 @@ = <interfacename>@Description</interfacename> - + The @Description annotation = can be used to annotate a test class, a test + case of a test parameter and provide a description + + + + + A test described + + + = <interfacename>@Tag</interfacename> - + The @Tag annotation allow to= tag a tested item with keywords. The main usage + of keywords is at runtime in order to provide filtering of tests.= It is very useful whenever you just want + to execute a subset of the tests based on a set of keywords. + + + + + A test annotated with keywords + + + = = Integration with JBoss Microcontainer + + The JBoss Microcontainer provides a lighweight container for m= anaging POJOs, their deployment and + configuration. The integration within JBoss Unit provides a powerful= way to setup complex assembly of + POJOs that will be part of unit tests. + This section will provide the general syntax and an example of= usage, for further details concerning + JBoss Microcontainer you should look at its documentation. + + + Triggering a microcontainer boostrap with the <interfacena= me>@Bootstrap</interfacename> annotation + The main usage of JBoss Microcontainer is done through the = @Bootstrap annotation. + It has a resourceName parameter which indi= cates the resource name of the microcontainer + bootstrap file. + The current POJO being tested will be inserted in the micro= container kernel and it is possible to reference it + in the bootstrap file under the special TestCase name. It is possible to override the name + using the beanName parameter of the @Bootstrap annotation. There + are several ways to leverage this: + + Inject the test case in a bean + Inject a property of the test case in a bean such= as a parameter of the test case + Inject a bean in the test case POJO using JBoss M= icrocontainer annotations + + + + + + Example + In this example we will show how to create a parameterized = test case that bootstrap a bean using + the microcontainer. The boostrapped bean will be configured fr= om the test case parameters and then + will be injected in the test case. + + + + + The service + + + + + + + The test suite + + + + Our tested system is composed of a service and a test suite= . The service is configured from + a dataSourceName parameter that will be in= jected from the test suite dataSourceName + corresponding property. The test suite is parameterized with the = dataSourceName parameter that will + be set by JBoss Unit. The test suite interacts with the microcont= ainer thanks to the @Bootstrap + annotation configured to use the file available from the classpat= h under the name /jboss-beans.xml. The + @Inject annotation is a microconta= iner annotation that will trigger the injection + of the service in the test case. + + + + + + + + + + +]]> + + The jboss-beans.xml file + + + + The injection of the dataSourceName = property from the TestCase bean + requires to add the state attribute with t= he value Instantiated. Without + this we would have a a bidirectional dependency between the servi= ce and the test case and the kernel would not + be able to resolve it: the test case wants the injection of the s= ervice and the service wants the injection + of a portion of the test case state. Using the Instantia= ted state tells the kernel to use + the test case bean when it is instantiated and that allows the re= solution of all the dependencies. + + One of the benefit of using JBoss Microcontainer is that it= takes care of the overral orchestration of the whole setup + and resolve the dependencies and configuration issues. When JB= oss Unit executes the test case the following sequence happens: + + An instance of MyTest is c= reated by JBoss Unit + JBoss Unit configures the instance and set the dataSourceName property + JBoss Unit creates a new microcontainer kernel an= d registers the MyTest instance under the T= estCase name + JBoss Unit deploys the jboss-beans.xml<= /filename> file + JBoss MC creates an instance of the My= Service service and configures it with the test case dataSourceName + value + JBoss MC starts the service + JBoss MC inject the service in the test case + + + + Once the test is finished a shutdown of the kernel will be = done that will trigger the stopping and destruction of the + involved services. + + + = Modified: modules/test/trunk/unit/src/main/org/jboss/unit/api/pojo/annotati= ons/Description.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/api/pojo/annotations/De= scription.java 2007-10-19 10:42:51 UTC (rev 8714) +++ modules/test/trunk/unit/src/main/org/jboss/unit/api/pojo/annotations/De= scription.java 2007-10-19 12:28:58 UTC (rev 8715) @@ -38,6 +38,6 @@ public @interface Description { = - String description(); + String value(); = } Modified: modules/test/trunk/unit/src/main/org/jboss/unit/spi/pojo/TestProv= iderSupport.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/spi/pojo/TestProviderSu= pport.java 2007-10-19 10:42:51 UTC (rev 8714) +++ modules/test/trunk/unit/src/main/org/jboss/unit/spi/pojo/TestProviderSu= pport.java 2007-10-19 12:28:58 UTC (rev 8715) @@ -118,7 +118,7 @@ = // Description descriptionAnnotation =3D ((AnnotatedElement)testClass).= getAnnotation(Description.class); - String suiteDescription =3D descriptionAnnotation !=3D null ? descri= ptionAnnotation.description() : ""; + String suiteDescription =3D descriptionAnnotation !=3D null ? descri= ptionAnnotation.value() : ""; if (suiteDescription.length() =3D=3D 0) { suiteDescription =3D "Test of class " + testClass.getName(); @@ -226,7 +226,7 @@ = // Description descriptionMethodAnnotation =3D method.getAnnotati= on(Description.class); - String description =3D descriptionMethodAnnotation !=3D null ?= descriptionMethodAnnotation.description() : ""; + String description =3D descriptionMethodAnnotation !=3D null ?= descriptionMethodAnnotation.value() : ""; if (description.length() =3D=3D 0) { description =3D "Parameter " + name; @@ -361,7 +361,7 @@ = // Description descriptionArgumentParameterAnnotation =3D (= Description)parameterAnnotationMap.get(Description.class); - String description =3D descriptionArgumentParameterAnnot= ation !=3D null ? descriptionArgumentParameterAnnotation.description() : ""; + String description =3D descriptionArgumentParameterAnnot= ation !=3D null ? descriptionArgumentParameterAnnotation.value() : ""; if (description.length() =3D=3D 0) { description =3D "Method parameter " + name; @@ -385,7 +385,7 @@ = // Description descriptionMethodAnnotation =3D method.getAnnotati= on(Description.class); - String description =3D descriptionMethodAnnotation !=3D null ?= descriptionMethodAnnotation.description() : ""; + String description =3D descriptionMethodAnnotation !=3D null ?= descriptionMethodAnnotation.value() : ""; if (description.length() =3D=3D 0) { description =3D "Test of method " + method.getName(); --===============5248952763707687861==-- From portal-commits at lists.jboss.org Fri Oct 19 08:47:44 2007 Content-Type: multipart/mixed; boundary="===============1654266850904990243==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8716 - modules/test/trunk/docs/user-guide/en/modules. Date: Fri, 19 Oct 2007 08:47:44 -0400 Message-ID: --===============1654266850904990243== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: julien(a)jboss.com Date: 2007-10-19 08:47:43 -0400 (Fri, 19 Oct 2007) New Revision: 8716 Modified: modules/test/trunk/docs/user-guide/en/modules/introduction.xml Log: more documentation Modified: modules/test/trunk/docs/user-guide/en/modules/introduction.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/docs/user-guide/en/modules/introduction.xml 2007-10-= 19 12:28:58 UTC (rev 8715) +++ modules/test/trunk/docs/user-guide/en/modules/introduction.xml 2007-10-= 19 12:47:43 UTC (rev 8716) @@ -10,7 +10,23 @@ Introduction Motivation - Todo + The JBoss Portal project historically has used JUnit as test f= ramework. With the evolution of the project + its testing became more and more complex and required the developmen= t of several utility classes interacting + with JUnit. Those utilities became more complex and at some point th= e integration with JUnit required to + introduce hacks in order to get the testsuite of the project to exec= ute. + When we decided to migrate the codebase to Java 5, the TestNG = framework had emerged for a couple of years + and I hoped it would be the silver bullet that would solve my pro= blems. After its study, I realized + that it was below my expectations in terms of integration. + Most of the existing unit test framework assumes that we test = only Java objects which leads to frameworks + that expose object related idioms in their interface. A large part o= f the portal tests cannot be considered + as just Java objects and it would have been very difficult to integr= ate those tests with the existing frameworks. + Of course before I started this effort I tried to gather the p= ros and the cons of such an effort. The major + cons is about to not reinvent the wheel or that I should not spen= d my time developping something that not only + already exists but will require maintenance!!! A few things convi= nced me that I was right. The fact that the current + wheels don't meet my expectations and I spent much more time in t= he past to integrate JUnit with JBoss Portal codebase + rather than developping JBoss Unit. The fact that after all it is= just a test framework and does not require much + maintenance, indeed JUnit was claimed to be invented in a few hou= rs!!! Probably also the fact that it is just + a good thing to invest time in a tool that will make me save more= time in the future. Principles --===============1654266850904990243==-- From portal-commits at lists.jboss.org Fri Oct 19 09:43:39 2007 Content-Type: multipart/mixed; boundary="===============0248838591159040360==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8717 - in branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/core: impl/model/content/generic and 3 other directories. Date: Fri, 19 Oct 2007 09:41:53 -0400 Message-ID: --===============0248838591159040360== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: thomas.heute(a)jboss.com Date: 2007-10-19 09:41:53 -0400 (Fri, 19 Oct 2007) New Revision: 8717 Modified: branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/core/imp= l/model/content/InternalContentProvider.java branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/core/imp= l/model/content/generic/InternalGenericContentProvider.java branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/core/imp= l/model/portal/WindowImpl.java branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/core/mod= el/portal/Window.java branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/core/mod= el/portal/navstate/WindowNavigationalState.java Log: JBPORTAL-1300: Ability to define an initial window state and mode Modified: branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/c= ore/impl/model/content/InternalContentProvider.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/core/im= pl/model/content/InternalContentProvider.java 2007-10-19 12:47:43 UTC (rev = 8716) +++ branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/core/im= pl/model/content/InternalContentProvider.java 2007-10-19 13:41:53 UTC (rev = 8717) @@ -22,30 +22,35 @@ *************************************************************************= *****/ package org.jboss.portal.core.impl.model.content; = +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashMap; +import java.util.Iterator; +import java.util.List; +import java.util.Map; +import java.util.Set; + import org.jboss.logging.Logger; import org.jboss.portal.Mode; import org.jboss.portal.WindowState; -import org.jboss.portal.security.spi.auth.PortalAuthorizationManager; -import org.jboss.portal.security.spi.auth.PortalAuthorizationManagerFactor= y; import org.jboss.portal.core.aspects.portlet.AjaxInterceptor; import org.jboss.portal.core.controller.ControllerContext; import org.jboss.portal.core.controller.ControllerResponse; -import org.jboss.portal.core.controller.command.response.UnavailableResour= ceResponse; import org.jboss.portal.core.controller.command.response.SecurityErrorResp= onse; +import org.jboss.portal.core.controller.command.response.UnavailableResour= ceResponse; import org.jboss.portal.core.controller.portlet.PortletInvocationFactory; import org.jboss.portal.core.model.content.Content; import org.jboss.portal.core.model.content.ContentType; import org.jboss.portal.core.model.content.spi.ContentProvider; import org.jboss.portal.core.model.instance.Instance; -import org.jboss.portal.core.model.instance.InstanceCustomization; import org.jboss.portal.core.model.instance.InstancePermission; import org.jboss.portal.core.model.portal.Portal; import org.jboss.portal.core.model.portal.PortalObjectId; import org.jboss.portal.core.model.portal.Window; -import org.jboss.portal.core.model.portal.content.WindowRendition; -import org.jboss.portal.core.model.portal.command.response.MarkupResponse; import org.jboss.portal.core.model.portal.command.render.RenderWindowComma= nd; +import org.jboss.portal.core.model.portal.command.response.MarkupResponse; import org.jboss.portal.core.model.portal.content.ContentRenderer; +import org.jboss.portal.core.model.portal.content.WindowRendition; import org.jboss.portal.core.model.portal.navstate.WindowNavigationalState; import org.jboss.portal.core.navstate.NavigationalStateKey; import org.jboss.portal.portlet.NoSuchPortletException; @@ -58,19 +63,13 @@ import org.jboss.portal.portlet.invocation.response.ErrorResponse; import org.jboss.portal.portlet.invocation.response.FragmentResponse; import org.jboss.portal.portlet.invocation.response.InsufficientPrivileges= Response; +import org.jboss.portal.portlet.invocation.response.InsufficientTransportG= uaranteeResponse; import org.jboss.portal.portlet.invocation.response.PortletInvocationRespo= nse; import org.jboss.portal.portlet.invocation.response.UnavailableResponse; -import org.jboss.portal.portlet.invocation.response.InsufficientTransportG= uaranteeResponse; +import org.jboss.portal.security.spi.auth.PortalAuthorizationManager; +import org.jboss.portal.security.spi.auth.PortalAuthorizationManagerFactor= y; import org.jboss.portal.theme.impl.render.dynamic.DynaRenderOptions; = -import java.util.ArrayList; -import java.util.HashMap; -import java.util.Iterator; -import java.util.List; -import java.util.Map; -import java.util.Collections; -import java.util.Set; - /** * @author Julien Viet * @version $Revision: 1.1 $ @@ -173,7 +172,7 @@ // if (windowNS =3D=3D null) { - windowNS =3D new WindowNavigationalState(WindowState.NORMAL, Mode= .VIEW, null); + windowNS =3D new WindowNavigationalState(window.getInitialWindowS= tate(), window.getInitialMode(), null); context.setAttribute(RenderWindowCommand.NAVIGATIONAL_STATE_SCOPE= , nsKey, windowNS); } = Modified: branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/c= ore/impl/model/content/generic/InternalGenericContentProvider.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/core/im= pl/model/content/generic/InternalGenericContentProvider.java 2007-10-19 12:= 47:43 UTC (rev 8716) +++ branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/core/im= pl/model/content/generic/InternalGenericContentProvider.java 2007-10-19 13:= 41:53 UTC (rev 8717) @@ -203,7 +203,7 @@ state.setValue("uri", uri); = // - WindowNavigationalState.setState(nsResolver, nsKey, state); + WindowNavigationalState.setState(nsResolver, nsKey, state, window= ); } = // Modified: branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/c= ore/impl/model/portal/WindowImpl.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/core/im= pl/model/portal/WindowImpl.java 2007-10-19 12:47:43 UTC (rev 8716) +++ branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/core/im= pl/model/portal/WindowImpl.java 2007-10-19 13:41:53 UTC (rev 8717) @@ -22,6 +22,8 @@ *************************************************************************= *****/ package org.jboss.portal.core.impl.model.portal; = +import org.jboss.portal.Mode; +import org.jboss.portal.WindowState; import org.jboss.portal.core.model.portal.PortalObject; import org.jboss.portal.core.model.portal.Window; import org.jboss.portal.core.model.portal.Page; @@ -43,6 +45,10 @@ = public static final String PORTAL_PROP_WINDOW_CONTENT_TYPE =3D "portal.= windowContentType"; = + public static final String PORTAL_INITIAL_WINDOW_STATE =3D "portal.wind= owInitialState"; + + public static final String PORTAL_INITIAL_MODE =3D "portal.windowInitia= lMode"; + // Persistent state protected String uri; = @@ -274,4 +280,30 @@ } } } + + public WindowState getInitialWindowState() + { + String value =3D getDeclaredProperty(PORTAL_INITIAL_WINDOW_STATE); + if (value !=3D null) + { + return WindowState.create(value); + } + else + { + return WindowState.NORMAL; + } + } + + public Mode getInitialMode() + { + String value =3D getDeclaredProperty(PORTAL_INITIAL_MODE); + if (value !=3D null) + { + return Mode.create(value); + } + else + { + return Mode.VIEW; + } + } } Modified: branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/c= ore/model/portal/Window.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/core/mo= del/portal/Window.java 2007-10-19 12:47:43 UTC (rev 8716) +++ branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/core/mo= del/portal/Window.java 2007-10-19 13:41:53 UTC (rev 8717) @@ -22,6 +22,8 @@ *************************************************************************= *****/ package org.jboss.portal.core.model.portal; = +import org.jboss.portal.Mode; +import org.jboss.portal.WindowState; import org.jboss.portal.core.model.content.Content; import org.jboss.portal.core.model.content.ContentType; = @@ -55,4 +57,20 @@ * @return the window content */ Content getContent(); + = + /** + * Returns the inital window state (the window state to use when no nav= igational + * state exists, for example on a new page request) for this particular= window + * = + * @return a windowState + */ + WindowState getInitialWindowState(); + = + /** + * Returns the inital mode to use (the mode to use when no navigational + * state exists, for example on a new page request) for this particular= window + * = + * @return a portlet mode + */ + Mode getInitialMode(); } Modified: branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/c= ore/model/portal/navstate/WindowNavigationalState.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/core/mo= del/portal/navstate/WindowNavigationalState.java 2007-10-19 12:47:43 UTC (r= ev 8716) +++ branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/core/mo= del/portal/navstate/WindowNavigationalState.java 2007-10-19 13:41:53 UTC (r= ev 8717) @@ -25,6 +25,7 @@ import org.jboss.portal.WindowState; import org.jboss.portal.Mode; import org.jboss.portal.common.invocation.AttributeResolver; +import org.jboss.portal.core.model.portal.Window; import org.jboss.portal.core.navstate.NavigationalStateKey; import org.jboss.portal.portlet.StateString; = @@ -233,6 +234,42 @@ resolver.setAttribute(key, wns); } = + public static void setState(AttributeResolver resolver, NavigationalSta= teKey key, StateString state, Window window) + { + if (resolver =3D=3D null) + { + throw new IllegalArgumentException("No null resolver"); + } + if (key =3D=3D null) + { + throw new IllegalArgumentException("No null key"); + } + if (state =3D=3D null) + { + throw new IllegalArgumentException("No null state"); + } + if (window =3D=3D null) + { + throw new IllegalArgumentException("No null window"); + } + + // + WindowNavigationalState wns =3D (WindowNavigationalState)resolver.ge= tAttribute(key); + + // + if (wns =3D=3D null) + { + wns =3D new WindowNavigationalState(window.getInitialWindowState(= ), window.getInitialMode(), state); + } + else + { + wns =3D new WindowNavigationalState(wns.getWindowState(), wns.get= Mode(), state); + } + + // + resolver.setAttribute(key, wns); + } + public static WindowNavigationalState bilto(WindowNavigationalState old= NS, WindowState windowState, Mode mode, StateString contentState) { StateString newState =3D oldNS !=3D null ? oldNS.getContentState() := null; --===============0248838591159040360==-- From portal-commits at lists.jboss.org Fri Oct 19 11:42:38 2007 Content-Type: multipart/mixed; boundary="===============1150841029193216130==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8718 - docs/template/user-guide/en. Date: Fri, 19 Oct 2007 11:42:38 -0400 Message-ID: --===============1150841029193216130== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: julien(a)jboss.com Date: 2007-10-19 11:42:38 -0400 (Fri, 19 Oct 2007) New Revision: 8718 Removed: docs/template/user-guide/en/ajax.xml Log: remove obsolete file Deleted: docs/template/user-guide/en/ajax.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- docs/template/user-guide/en/ajax.xml 2007-10-19 13:41:53 UTC (rev 8717) +++ docs/template/user-guide/en/ajax.xml 2007-10-19 15:42:38 UTC (rev 8718) @@ -1,273 +0,0 @@ - - - - - Julien - Viet - julien.viet(a)jboss.com - - - Ajax - This section covers the ajax features provided by the portal. - - Introduction - Todo - - - Ajaxified markup - - Ajaxified layouts - Part of the Ajax capabilities are implemented in the layout= framework which provide the structure for - generating portal pages. The good news is that the existing layou= t only requires a few modifications in - order to be ajaxified. - We will use as example an simplified version of the layout = JSP provided in JBoss Portal 2.6 and outline - what are the required changes that makes it an ajaxified layout: - - - - - - - - - - - - - -
-
-
-
- - - - -
- - - - - - -
-
-
- - - - -
-
-
-
-
- - - - - -]]>
- - ]]> = should be already present as it exists since 2.4 but is even more - necessary as it will inject in the page the reference to= the ajax stylesheet. - ]]> should be added before any other region - in the markup of the layout. - ]]> should be added after any other region - in the markup of the layout. - -
-
- - Ajaxified renderers - At runtime the portal combines the layout and the renderers= in order create the markup returned to the - web browser. The most used render set is the divRenderer. Rendere= rs only need a modification in the deployment - descriptor to indicate that they support ajax. Here is the declar= ation of the default divRenderer now in 2.6: - - - true - org.jboss.portal.theme.impl.render.div.DivRegionRen= derer - - org.jboss.portal.theme.impl.render.div.DivWindowRen= derer - - org.jboss.portal.theme.impl.render.div.DivPortletR= enderer - - org.jboss.portal.theme.impl.render.div.DivDecor= ationRenderer - - - -]]> - You should notice the true]]> which indicates that the render set - supports ajaxification. - -
- - Ajaxified pages - The ajaxification of the portal pages can be configured in a f= ine grained manner. Thanks to the portal - object properties it is possible to control which pages support ajax= and which page do not support ajax. The - administrator must pay attention to the fact that property values ar= e inherited in the object hierarchy. - - Drag and Drop - That feature is only effective in dashboards as it requires= the offer personalization of the page - layout per user. By default the feature is enabled thanks to a pr= operty set on the dashboard object. - It is possible to turn off that property if the administrator doe= s not want to expose that feature - to its user. - In the file jboss-portal.sar/conf/data/default-ob= ject.xml is declared and configured the - creation of the dashboard portal: - - - keep - - dashboard - - ... - - theme.dyna.dnd_enabled - true - - ... - - ... - - -]]> - The property theme.dyna.dnd_enabled is= set to the value true - which means that the dashboard object will provide the drag and d= rop feature. - - - - Partial refresh - Partial refresh is a very powerful feature which allows the= portal to optimize the refreshing - of portlets on a page. When one portlet is invoked, instead of re= drawing the full page, the portal is able - to detect which portlets needs to be refreshed and will update on= ly these portlets. - - - - - - The portal providing partial refresh - - - - Portal objects configuration - Like with the drag and drop feature, partial page refres= h is controlled via properties on portal objects. - The name of the property is theme.dyna.partial_re= fresh_enabled and its values can - be true or false.= When this property is set on an object - it is automatically inherited by the sub hierarchy located = under that object. By default the drag - and drop feature is positionned on the dashboard object and= not on the rest of the portal objects. - - - - keep - - dashboard - - ... - - theme.dyna.partial_refresh_enabled - true - - ... - - ... - - -]]> - - The partial page refresh feature is compatible with the Por= tal API. The Portal API allows programmatic - update of the state of portlets at runtime. For instance it= is possible to modify the window state or - the mode of several portlets on a given page. When such eve= nt occurs, the portal detects the changes - which occured and will update the portlet fragments in the = page. - - It is possible to change that behavior at runtime using = the property editor of the management portlet. - If you want to enable partial refreshing on the default portal= you should set the property to true - directly on the portal and all the pages in that portal will a= utomatically inherit those properties. - - - - - - The default portal configured for partial page ref= resh - - - - - Portlet configuration - - By default any portlet will support partial refreshing. Whe= n does the portal performs partial page - refreshing ? By default it is enabled for action and render= links with the following exceptions. In those - situations, the portal will prefer to perform a full page r= efresh: - - - Form GET are not handled, however it should not= be an issue as this situation is discouraged - by the Portlet specification. It however taken in acc= ount, just in case of. Here is an example - of a Java Server Page that would do one: - " method=3D"get"> - ... - -]]> - - - Form uploads are not handled. - - Having an interaction that deals with the MAXIMIZED window state. - When a window is entering a maximized state or leaving a= maximized window state, the portal will - perform a full page refresh. - - - It can happen that a portlet does not want to support pa= rtial refreshing, in those situations - the jboss-portlet.xml can be used to cont= rol that behavior. Since 2.6 an ajax - section has been added in order to configure ajax features rel= ated to the portlet. - - MyPortletNoAjax - - false - - -]]> - The usage of the partial-refresh se= t to the value false means that - the portlet will not be subject of a partial page refresh when= it is invoked. However the portlet - markup can still be subject to a partial rendering. - - - Limitations - Partial refreshing of portlets has limitations both on t= he server side (portal) and on the client side (browser). - - Application scoped session attributes - When partial refresh is activated, the state of a pag= e can potentially become inconsistent. for - example, if some objects are shared in the application scop= e of the session between portlets. When one - portlet update a session object, the other portlet won't be= refreshed and will still display content based - on the previous value of the object in the session. To avoi= d that, partial refresh can be desactivated - for certain portlets by adding <portlet-refresh>false= <portlet-refresh> in the jboss-portlet.xml file. - - - Non ajax interactions - The solution developped by JBoss Portal on the client= side is built on top of DOM events emitted - by the web browser when the user interracts with the pag= e. If an interaction is done without an - emission of an event then JBoss Portal will not be able = to transform it into a partial refresh and - it will result instead of a full refresh. This can happe= n with programmatic submission of forms. - - " action=3D"<%=3D renderResponse.createActionUR= L() %>" method=3D"post"> - ... - - ... - -]]> - - - - -
\ No newline at end of file --===============1150841029193216130==-- From portal-commits at lists.jboss.org Fri Oct 19 12:37:54 2007 Content-Type: multipart/mixed; boundary="===============7168588864217988032==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8719 - in docs/template/user-guide/en: modules and 1 other directory. Date: Fri, 19 Oct 2007 12:37:54 -0400 Message-ID: --===============7168588864217988032== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: julien(a)jboss.com Date: 2007-10-19 12:37:54 -0400 (Fri, 19 Oct 2007) New Revision: 8719 Modified: docs/template/user-guide/en/master.xml docs/template/user-guide/en/modules/sample.xml Log: update the doc template to include what we should use to write well formate= d documentation (not exhaustive of course) Modified: docs/template/user-guide/en/master.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- docs/template/user-guide/en/master.xml 2007-10-19 15:42:38 UTC (rev 871= 8) +++ docs/template/user-guide/en/master.xml 2007-10-19 16:37:54 UTC (rev 871= 9) @@ -10,9 +10,9 @@ Change Release Info in master.xml Change Release Info Date in master.xml - Thomas - Heute - theute(a)jboss.org + Your first name + Your last name + your.email(a)your.domain.com Modified: docs/template/user-guide/en/modules/sample.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- docs/template/user-guide/en/modules/sample.xml 2007-10-19 15:42:38 UTC = (rev 8718) +++ docs/template/user-guide/en/modules/sample.xml 2007-10-19 16:37:54 UTC = (rev 8719) @@ -1,58 +1,205 @@ - + - Julien - Viet - julien.viet(a)jboss.com + Your first name + Your last name + your.email(a)your.domain.com - My title - This section covers the ajax features provided by the portal. + Sample chapter + This is the beginning of the sample chapter. - Introduction - Todo - - - Ajaxified markup + sample section + This is the beginning of the sample section. It contains examp= les of how docbook should be used in the context + of a documentation for a Java related product. + - Ajaxified layouts - Part of the Ajax capabilities are implemented in the layout= framework which provide the structure for - generating portal pages. The good news is that the existing layou= t only requires a few modifications in - order to be ajaxified. - We will use as example an simplified version of the layout = JSP provided in JBoss Portal 2.6 and outline - what are the required changes that makes it an ajaxified layout: + Bullet points - - - - - - - - - + + Item1 + Item2 + Item3 + ]]> + - ]]> = should be already present as it exists since 2.4 but is even more - necessary as it will inject in the page the reference to= the ajax stylesheet. - ]]> should be added before any other region - in the markup of the layout. - ]]> should be added after any other region - in the markup of the layout. + Item1 + Item2 + Item3 - - - - - - The portal providing partial refresh - - + + + Interface or annotation reference + mypackage.MyInterface +@MyAnnotation +]]> + + mypackage.MyInterface + @MyAnnotation + + + + + Class reference + mypackage.MyClass +]]> + + mypackage.MyClass + + + + + Parameter reference + MyParameter +]]> + + MyParameter + + + + + Method referece + myMethod() +]]> + + myMethod() + + + + + Exception reference + mypackage.MyException +]]> + + mypackage.MyException + + + + + A variable name + myVariable +]]> + + myVariable + + + + + File reference + MyFile +]]> + + MyFile + + + + + Literal reference + null +1 +"foo" +]]> + + null + 1 + "foo" + + + + + A constant + MAX_VALUE +]]> + + MAX_VALUE + + + + + Inline code + System.out.println()
+]]> + + System.out.println() + + + + + Code or XML with a caption + +<example> + <programlisting><![CDATA[public class MyClass +{ +} +]]></programlisting> + <caption>This is the MyClass class</caption> +</example> + + + + + This is the MyClass class + + + + + + A database name + MyDatabase +]]> + + MyDatabase + + + + + A shell command + ls -l +]]> + + ls -l + + + + + A shell example + <![CDATA[julien-viets-computer:~/java/jboss-portal-template/use= r-guide julien$ ls -l +total 8 +drwxr-xr-x 3 julien julien 102 Oct 19 18:14 build +-rwxr-xr-x 1 julien julien 923 Oct 19 17:40 build.xml +drwxr-xr-x 6 julien julien 204 Oct 19 17:42 en +]]> +]]> + + + + + + --===============7168588864217988032==-- From portal-commits at lists.jboss.org Fri Oct 19 20:32:11 2007 Content-Type: multipart/mixed; boundary="===============3535227825088128086==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8720 - in modules/test/trunk/remote/src: resources/jboss-unit-remote-jar/org/jboss/unit/remote/driver and 1 other directory. Date: Fri, 19 Oct 2007 20:32:11 -0400 Message-ID: --===============3535227825088128086== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: julien(a)jboss.com Date: 2007-10-19 20:32:11 -0400 (Fri, 19 Oct 2007) New Revision: 8720 Modified: modules/test/trunk/remote/src/main/org/jboss/unit/remote/driver/RemoteTe= stDriverClient.java modules/test/trunk/remote/src/resources/jboss-unit-remote-jar/org/jboss/= unit/remote/driver/jboss-beans.xml Log: make the server name injected in the deployer handler Modified: modules/test/trunk/remote/src/main/org/jboss/unit/remote/driver/R= emoteTestDriverClient.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/remote/src/main/org/jboss/unit/remote/driver/RemoteT= estDriverClient.java 2007-10-19 16:37:54 UTC (rev 8719) +++ modules/test/trunk/remote/src/main/org/jboss/unit/remote/driver/RemoteT= estDriverClient.java 2007-10-20 00:32:11 UTC (rev 8720) @@ -77,6 +77,9 @@ private String archivePath; = /** . */ + private String serverName; + + /** . */ private Deployer deployer; = // public String getInitialNodeId() @@ -94,6 +97,11 @@ return archivePath; } = + public String getServerName() + { + return serverName; + } + public NodeManager getNodeManager() { return nodeManager; @@ -141,6 +149,7 @@ = // Get this property this.archivePath =3D context.getProperty("archivePath"); + this.serverName =3D context.getProperty("serverName"); = // run(); Modified: modules/test/trunk/remote/src/resources/jboss-unit-remote-jar/org= /jboss/unit/remote/driver/jboss-beans.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/remote/src/resources/jboss-unit-remote-jar/org/jboss= /unit/remote/driver/jboss-beans.xml 2007-10-19 16:37:54 UTC (rev 8719) +++ modules/test/trunk/remote/src/resources/jboss-unit-remote-jar/org/jboss= /unit/remote/driver/jboss-beans.xml 2007-10-20 00:32:11 UTC (rev 8720) @@ -28,7 +28,7 @@ servers.xml - RemoteTomcat_6_0 + = --===============3535227825088128086==-- From portal-commits at lists.jboss.org Sat Oct 20 08:45:10 2007 Content-Type: multipart/mixed; boundary="===============0548147257081400005==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8721 - in modules/test/trunk/unit: src/main/org/jboss/test/unit/sample and 2 other directories. Date: Sat, 20 Oct 2007 08:45:09 -0400 Message-ID: --===============0548147257081400005== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: julien(a)jboss.com Date: 2007-10-20 08:45:09 -0400 (Sat, 20 Oct 2007) New Revision: 8721 Added: modules/test/trunk/unit/src/main/org/jboss/test/unit/sample/TestDriver1.= java Modified: modules/test/trunk/unit/build.xml modules/test/trunk/unit/src/main/org/jboss/test/unit/sample/SampleTests.= java modules/test/trunk/unit/src/main/org/jboss/test/unit/sample/TestedClass2= .java modules/test/trunk/unit/src/main/org/jboss/unit/driver/AbstractTestDrive= r.java modules/test/trunk/unit/src/resources/test/org/jboss/test/unit/sample/f1= .xml Log: added a generic test driver in the samples Modified: modules/test/trunk/unit/build.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/build.xml 2007-10-20 00:32:11 UTC (rev 8720) +++ modules/test/trunk/unit/build.xml 2007-10-20 12:45:09 UTC (rev 8721) @@ -200,4 +200,13 @@ = = + + + + + + + + + Modified: modules/test/trunk/unit/src/main/org/jboss/test/unit/sample/Sampl= eTests.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/test/unit/sample/SampleTests= .java 2007-10-20 00:32:11 UTC (rev 8720) +++ modules/test/trunk/unit/src/main/org/jboss/test/unit/sample/SampleTests= .java 2007-10-20 12:45:09 UTC (rev 8721) @@ -79,7 +79,7 @@ = TestRunner runner =3D suite.createRunner(); = - TestRunnerEventListener junitReporter =3D new JUnitReporter("output"= , SampleTests.class.getName()); + TestRunnerEventListener junitReporter =3D new JUnitReporter("output/= tests", SampleTests.class.getName()); // add listeners = TestRunnerEventBroadcaster broadcaster =3D new TestRunnerEventBroadc= aster(); Added: modules/test/trunk/unit/src/main/org/jboss/test/unit/sample/TestDriv= er1.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/test/unit/sample/TestDriver1= .java (rev 0) +++ modules/test/trunk/unit/src/main/org/jboss/test/unit/sample/TestDriver1= .java 2007-10-20 12:45:09 UTC (rev 8721) @@ -0,0 +1,68 @@ +/*************************************************************************= ***** + * JBoss, a division of Red Hat = * + * Copyright 2006, Red Hat Middleware, LLC, and individual = * + * contributors as indicated by the @authors tag. See the = * + * copyright.txt in the distribution for a full listing of = * + * individual contributors. = * + * = * + * This is free software; you can redistribute it and/or modify it = * + * under the terms of the GNU Lesser General Public License as = * + * published by the Free Software Foundation; either version 2.1 of = * + * the License, or (at your option) any later version. = * + * = * + * This software is distributed in the hope that it will be useful, = * + * but WITHOUT ANY WARRANTY; without even the implied warranty of = * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU = * + * Lesser General Public License for more details. = * + * = * + * You should have received a copy of the GNU Lesser General Public = * + * License along with this software; if not, write to the Free = * + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA = * + * 02110-1301 USA, or see the FSF site: http://www.fsf.org. = * + *************************************************************************= *****/ +package org.jboss.test.unit.sample; + +import org.jboss.unit.Failure; +import org.jboss.unit.TestId; +import org.jboss.unit.driver.AbstractTestDriver; +import org.jboss.unit.driver.DriverCommand; +import org.jboss.unit.driver.DriverException; +import org.jboss.unit.driver.DriverResponse; +import org.jboss.unit.driver.impl.composite.CompositeTestDriver; +import org.jboss.unit.driver.response.EndTestResponse; +import org.jboss.unit.driver.response.FailureResponse; +import org.jboss.unit.info.TestInfo; +import org.jboss.unit.info.impl.SimpleTestCaseInfo; + +/** + * @author Julien Viet + * @version $Revision: 1.1 $ + */ +public class TestDriver1 extends CompositeTestDriver +{ + public TestDriver1() throws DriverException + { + mount(new AbstractTestDriver() + { + public TestInfo getInfo() + { + return new SimpleTestCaseInfo("test1"); + } + public DriverResponse invoke(TestId id, DriverCommand command) + { + return new EndTestResponse(); + } + }); + mount(new AbstractTestDriver() + { + public TestInfo getInfo() + { + return new SimpleTestCaseInfo("test2"); + } + public DriverResponse invoke(TestId id, DriverCommand command) + { + return new FailureResponse(Failure.createAssertionFailure("fai= lure")); + } + }); + } +} Modified: modules/test/trunk/unit/src/main/org/jboss/test/unit/sample/Teste= dClass2.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/test/unit/sample/TestedClass= 2.java 2007-10-20 00:32:11 UTC (rev 8720) +++ modules/test/trunk/unit/src/main/org/jboss/test/unit/sample/TestedClass= 2.java 2007-10-20 12:45:09 UTC (rev 8721) @@ -46,5 +46,4 @@ { assertEquals("foo", foo); } - } Modified: modules/test/trunk/unit/src/main/org/jboss/unit/driver/AbstractTe= stDriver.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/driver/AbstractTestDriv= er.java 2007-10-20 00:32:11 UTC (rev 8720) +++ modules/test/trunk/unit/src/main/org/jboss/unit/driver/AbstractTestDriv= er.java 2007-10-20 12:45:09 UTC (rev 8721) @@ -32,7 +32,7 @@ /** . */ private DriverContext context; = - public void initDriver(DriverContext context) + public void initDriver(DriverContext context) throws DriverException { this.context =3D context; = @@ -40,7 +40,7 @@ doInit(); } = - protected void doInit() + protected void doInit() throws DriverException { } = Modified: modules/test/trunk/unit/src/resources/test/org/jboss/test/unit/sa= mple/f1.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/resources/test/org/jboss/test/unit/sample/f= 1.xml 2007-10-20 00:32:11 UTC (rev 8720) +++ modules/test/trunk/unit/src/resources/test/org/jboss/test/unit/sample/f= 1.xml 2007-10-20 12:45:09 UTC (rev 8721) @@ -24,4 +24,7 @@ + + + --===============0548147257081400005==-- From portal-commits at lists.jboss.org Sat Oct 20 09:59:49 2007 Content-Type: multipart/mixed; boundary="===============5426881411479369529==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8722 - modules/test/trunk/unit/src/main/org/jboss/unit/report/impl/junit. Date: Sat, 20 Oct 2007 09:59:49 -0400 Message-ID: --===============5426881411479369529== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: emuckenhuber Date: 2007-10-20 09:59:49 -0400 (Sat, 20 Oct 2007) New Revision: 8722 Modified: modules/test/trunk/unit/src/main/org/jboss/unit/report/impl/junit/JUnitT= estReport.java Log: - checking if cause is null Modified: modules/test/trunk/unit/src/main/org/jboss/unit/report/impl/junit= /JUnitTestReport.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/report/impl/junit/JUnit= TestReport.java 2007-10-20 12:45:09 UTC (rev 8721) +++ modules/test/trunk/unit/src/main/org/jboss/unit/report/impl/junit/JUnit= TestReport.java 2007-10-20 13:59:49 UTC (rev 8722) @@ -36,7 +36,6 @@ import java.util.HashMap; import java.util.Iterator; import java.util.LinkedList; -import java.util.List; import java.util.Map; = import javax.xml.parsers.DocumentBuilder; @@ -61,7 +60,6 @@ import org.jboss.unit.runner.event.RunnerFailureEvent; import org.jboss.unit.runner.event.StartRunnerEvent; import org.jboss.unit.runner.event.StartTestCaseEvent; -import org.jboss.unit.runner.event.StartTestSuiteEvent; import org.jboss.unit.runner.results.TestFailure; import org.w3c.dom.Document; import org.w3c.dom.Element; @@ -229,7 +227,7 @@ errorNotStarted.setAttribute(XMLConstants.ATTR_MESSAGE, "TestCase= : " + testName + " was not started properly. (No StartTestEvent)"); test.appendChild(errorNotStarted); } - = + = /** If testcase failed */ if (result instanceof TestFailure) { @@ -248,9 +246,12 @@ this.errors++; failureType =3D XMLConstants.ERROR; } + if (failure.getCause() !=3D null) + { + test.appendChild(addError(failureType, failure.getCause())); + } + } = - test.appendChild(addError(failureType, failure.getCause())); - } this.rootElement.appendChild(test); } = @@ -313,6 +314,8 @@ Source source =3D new DOMSource(this.rootElement); Transformer xtrans =3D TransformerFactory.newInstance().newTransf= ormer(); xtrans.setOutputProperty(OutputKeys.INDENT, "yes"); + xtrans.setOutputProperty(OutputKeys.METHOD, "xml"); + xtrans.setOutputProperty(OutputKeys.STANDALONE, "yes"); Result result =3D new StreamResult(new FileOutputStream(file)); xtrans.transform(source, result); } --===============5426881411479369529==-- From portal-commits at lists.jboss.org Sat Oct 20 10:17:56 2007 Content-Type: multipart/mixed; boundary="===============8663832512188834600==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8723 - in modules/test/trunk/unit/src: resources/test/org/jboss/test/unit/sample and 1 other directory. Date: Sat, 20 Oct 2007 10:17:56 -0400 Message-ID: --===============8663832512188834600== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: julien(a)jboss.com Date: 2007-10-20 10:17:56 -0400 (Sat, 20 Oct 2007) New Revision: 8723 Added: modules/test/trunk/unit/src/main/org/jboss/test/unit/sample/TestDriver2.= java Modified: modules/test/trunk/unit/src/resources/test/org/jboss/test/unit/sample/f1= .xml Log: adding use case for simple test case executed Copied: modules/test/trunk/unit/src/main/org/jboss/test/unit/sample/TestDri= ver2.java (from rev 8722, modules/test/trunk/unit/src/main/org/jboss/test/u= nit/sample/TestDriver1.java) =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/test/unit/sample/TestDriver2= .java (rev 0) +++ modules/test/trunk/unit/src/main/org/jboss/test/unit/sample/TestDriver2= .java 2007-10-20 14:17:56 UTC (rev 8723) @@ -0,0 +1,49 @@ +/*************************************************************************= ***** + * JBoss, a division of Red Hat = * + * Copyright 2006, Red Hat Middleware, LLC, and individual = * + * contributors as indicated by the @authors tag. See the = * + * copyright.txt in the distribution for a full listing of = * + * individual contributors. = * + * = * + * This is free software; you can redistribute it and/or modify it = * + * under the terms of the GNU Lesser General Public License as = * + * published by the Free Software Foundation; either version 2.1 of = * + * the License, or (at your option) any later version. = * + * = * + * This software is distributed in the hope that it will be useful, = * + * but WITHOUT ANY WARRANTY; without even the implied warranty of = * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU = * + * Lesser General Public License for more details. = * + * = * + * You should have received a copy of the GNU Lesser General Public = * + * License along with this software; if not, write to the Free = * + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA = * + * 02110-1301 USA, or see the FSF site: http://www.fsf.org. = * + *************************************************************************= *****/ +package org.jboss.test.unit.sample; + +import org.jboss.unit.TestId; +import org.jboss.unit.driver.AbstractTestDriver; +import org.jboss.unit.driver.DriverCommand; +import org.jboss.unit.driver.DriverResponse; +import org.jboss.unit.driver.response.EndTestResponse; +import org.jboss.unit.info.TestInfo; +import org.jboss.unit.info.impl.SimpleTestCaseInfo; + +/** + * @author Julien Viet + * @version $Revision: 1.1 $ + */ +public class TestDriver2 extends AbstractTestDriver +{ + + public TestInfo getInfo() + { + return new SimpleTestCaseInfo("test"); + } + + public DriverResponse invoke(TestId id, DriverCommand command) + { + return new EndTestResponse(); + } +} \ No newline at end of file Modified: modules/test/trunk/unit/src/resources/test/org/jboss/test/unit/sa= mple/f1.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/resources/test/org/jboss/test/unit/sample/f= 1.xml 2007-10-20 13:59:49 UTC (rev 8722) +++ modules/test/trunk/unit/src/resources/test/org/jboss/test/unit/sample/f= 1.xml 2007-10-20 14:17:56 UTC (rev 8723) @@ -27,4 +27,7 @@ + + + --===============8663832512188834600==-- From portal-commits at lists.jboss.org Sat Oct 20 10:28:22 2007 Content-Type: multipart/mixed; boundary="===============3373408044635146440==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8724 - modules/test/trunk/unit/src/main/org/jboss/unit. Date: Sat, 20 Oct 2007 10:28:22 -0400 Message-ID: --===============3373408044635146440== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: julien(a)jboss.com Date: 2007-10-20 10:28:22 -0400 (Sat, 20 Oct 2007) New Revision: 8724 Modified: modules/test/trunk/unit/src/main/org/jboss/unit/Failure.java Log: added a non null stacktrace throwable on the Failure object Modified: modules/test/trunk/unit/src/main/org/jboss/unit/Failure.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/Failure.java 2007-10-20= 14:17:56 UTC (rev 8723) +++ modules/test/trunk/unit/src/main/org/jboss/unit/Failure.java 2007-10-20= 14:28:22 UTC (rev 8724) @@ -40,25 +40,34 @@ /** The type of failure. */ private final FailureType type; = + /** The non null stack trace. */ + private final Throwable stackTrace; + public Failure(String message, FailureType type) { - this.message =3D message; - this.cause =3D null; - this.type =3D type; + this(message, null, type); } = public Failure(Throwable cause, FailureType type) { - this.message =3D cause.getMessage(); - this.cause =3D cause; - this.type =3D type; + this(null, cause, type); } = public Failure(String message, Throwable cause, FailureType type) { + if (message =3D=3D null) + { + if (cause !=3D null) + { + message =3D cause.getMessage(); + } + } + + // this.message =3D message; this.cause =3D cause; this.type =3D type; + this.stackTrace =3D cause !=3D null ? cause : new Exception(); } = public String getMessage() @@ -71,6 +80,11 @@ return cause; } = + public Throwable getStackTrace() + { + return stackTrace; + } + public FailureType getType() { return type; --===============3373408044635146440==-- From portal-commits at lists.jboss.org Sat Oct 20 10:29:11 2007 Content-Type: multipart/mixed; boundary="===============6542253146421906543==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8725 - modules/test/trunk/unit/src/main/org/jboss/unit. Date: Sat, 20 Oct 2007 10:29:11 -0400 Message-ID: --===============6542253146421906543== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: julien(a)jboss.com Date: 2007-10-20 10:29:10 -0400 (Sat, 20 Oct 2007) New Revision: 8725 Modified: modules/test/trunk/unit/src/main/org/jboss/unit/Failure.java Log: added a non null stacktrace throwable on the Failure object Modified: modules/test/trunk/unit/src/main/org/jboss/unit/Failure.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/Failure.java 2007-10-20= 14:28:22 UTC (rev 8724) +++ modules/test/trunk/unit/src/main/org/jboss/unit/Failure.java 2007-10-20= 14:29:10 UTC (rev 8725) @@ -67,7 +67,7 @@ this.message =3D message; this.cause =3D cause; this.type =3D type; - this.stackTrace =3D cause !=3D null ? cause : new Exception(); + this.stackTrace =3D cause !=3D null ? cause : new Exception("Failed = at"); } = public String getMessage() --===============6542253146421906543==-- From portal-commits at lists.jboss.org Sat Oct 20 11:47:17 2007 Content-Type: multipart/mixed; boundary="===============0161421548706750258==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8726 - modules/test/trunk/unit/src/main/org/jboss/unit/report/impl/junit. Date: Sat, 20 Oct 2007 11:47:17 -0400 Message-ID: --===============0161421548706750258== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: emuckenhuber Date: 2007-10-20 11:47:17 -0400 (Sat, 20 Oct 2007) New Revision: 8726 Modified: modules/test/trunk/unit/src/main/org/jboss/unit/report/impl/junit/JUnitT= estReport.java Log: - using TestInfo.name instead of TestId Modified: modules/test/trunk/unit/src/main/org/jboss/unit/report/impl/junit= /JUnitTestReport.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/report/impl/junit/JUnit= TestReport.java 2007-10-20 14:29:10 UTC (rev 8725) +++ modules/test/trunk/unit/src/main/org/jboss/unit/report/impl/junit/JUnit= TestReport.java 2007-10-20 15:47:17 UTC (rev 8726) @@ -159,13 +159,12 @@ { this.tests++; this.errors++; + StringBuffer nb =3D new StringBuffer(); + /** The current tested Class */ Element e =3D document.createElement(XMLConstants.ERROR); e.setAttribute(XMLConstants.ATTR_TYPE, event.getFailure().getType().= name()); e.setAttribute(XMLConstants.ATTR_MESSAGE, event.getFailure().getMess= age()); - if ( event.getFailure().getCause() !=3D null) - { - e.appendChild(document.createCDATASection(stackToString(event.get= Failure().getCause()))); - } + e.appendChild(document.createCDATASection(stackToString(event.getFai= lure().getStackTrace()))); rootElement.appendChild(e); } = @@ -174,6 +173,8 @@ TestId testId =3D event.getTestId(); TestResult result =3D event.getTestResult(); Element test =3D document.createElement(XMLConstants.TESTCASE); + TestInfo info =3D this.startedTests.get(testId); + = /** The testcase name */ StringBuffer nb =3D new StringBuffer(); /** The current tested Class */ @@ -182,15 +183,9 @@ nb.append(testSuiteName); nb.append("."); } - /** TestId */ - for(int i =3D 0; i < testId.getLength(); i ++) - { - if (i > 0) - { - nb.append("."); - } - nb.append(testId.getName(i)); - } + /** Adding testcase name */ + nb.append(info.getName()); + = String testName =3D nb.toString(); = /** The testcase parameters */ @@ -209,12 +204,10 @@ if ( parameters.length() > 0) testName =3D testName + "?" + parameters.toString(); = - = /** Test case attributes */ test.setAttribute(XMLConstants.ATTR_NAME, testName); test.setAttribute(XMLConstants.ATTR_TIME, FORMAT.format(result.getDu= rationMillis() / 1000.0)); /** Check if test was started */ - TestInfo info =3D this.startedTests.get(testId); if ( info !=3D null) { // remove test from started List @@ -246,10 +239,8 @@ this.errors++; failureType =3D XMLConstants.ERROR; } - if (failure.getCause() !=3D null) - { - test.appendChild(addError(failureType, failure.getCause())); - } + + test.appendChild(addError(failureType, failure.getStackTrace())); } = this.rootElement.appendChild(test); @@ -401,7 +392,6 @@ } } = - public String getTestSuiteName() { if (testSuiteName =3D=3D null) --===============0161421548706750258==-- From portal-commits at lists.jboss.org Sat Oct 20 17:17:47 2007 Content-Type: multipart/mixed; boundary="===============5743790979296650788==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8727 - modules/identity/trunk/identity. Date: Sat, 20 Oct 2007 17:13:45 -0400 Message-ID: --===============5743790979296650788== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: bdaw Date: 2007-10-20 17:13:45 -0400 (Sat, 20 Oct 2007) New Revision: 8727 Modified: modules/identity/trunk/identity/build.xml Log: - fix for embedded OpenDS packaging Modified: modules/identity/trunk/identity/build.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/identity/trunk/identity/build.xml 2007-10-20 15:47:17 UTC (rev = 8726) +++ modules/identity/trunk/identity/build.xml 2007-10-20 21:13:45 UTC (rev = 8727) @@ -275,7 +275,7 @@ = - + --===============5743790979296650788==-- From portal-commits at lists.jboss.org Sat Oct 20 18:33:06 2007 Content-Type: multipart/mixed; boundary="===============6626168372932817655==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8728 - in modules/test/trunk/unit/src/main/org/jboss: unit/report/impl/junit and 1 other directories. Date: Sat, 20 Oct 2007 18:33:05 -0400 Message-ID: --===============6626168372932817655== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: julien(a)jboss.com Date: 2007-10-20 18:33:04 -0400 (Sat, 20 Oct 2007) New Revision: 8728 Added: modules/test/trunk/unit/src/main/org/jboss/unit/tooling/ByteArrayOutputS= treamExt.java modules/test/trunk/unit/src/main/org/jboss/unit/tooling/ForkedOutputStre= am.java modules/test/trunk/unit/src/main/org/jboss/unit/tooling/SystemOutputMana= ger.java modules/test/trunk/unit/src/main/org/jboss/unit/tooling/SystemOutputView= .java Modified: modules/test/trunk/unit/src/main/org/jboss/test/unit/sample/SampleTests.= java modules/test/trunk/unit/src/main/org/jboss/unit/report/impl/junit/JUnitR= eporter.java modules/test/trunk/unit/src/main/org/jboss/unit/tooling/Main.java Log: - Handle System.out / System.err at the Main level - added SystemOutputManager and SystemOutputView for managing System.out / = System.err Modified: modules/test/trunk/unit/src/main/org/jboss/test/unit/sample/Sampl= eTests.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/test/unit/sample/SampleTests= .java 2007-10-20 21:13:45 UTC (rev 8727) +++ modules/test/trunk/unit/src/main/org/jboss/test/unit/sample/SampleTests= .java 2007-10-20 22:33:04 UTC (rev 8728) @@ -31,6 +31,7 @@ import org.jboss.unit.runner.model.ModelBuilder; import org.jboss.unit.runner.model.TestSuiteDef; import org.jboss.unit.runner.model.BuilderException; +import org.jboss.unit.tooling.SystemOutputManager; import org.xml.sax.InputSource; import org.xml.sax.SAXException; = @@ -72,21 +73,32 @@ private static void test2() throws ParserConfigurationException, IOException, SAXException, Buil= derException { - InputStream in =3D SampleTests.class.getResourceAsStream("f1.xml"); - InputSource source =3D new InputSource(in); - ModelBuilder builder =3D new ModelBuilder(source); - TestSuiteDef suite =3D builder.build(); + SystemOutputManager outputManager =3D new SystemOutputManager(); = - TestRunner runner =3D suite.createRunner(); + try + { + outputManager.start(); = - TestRunnerEventListener junitReporter =3D new JUnitReporter("output/= tests", SampleTests.class.getName()); - // add listeners + InputStream in =3D SampleTests.class.getResourceAsStream("f1.xml"= ); + InputSource source =3D new InputSource(in); + ModelBuilder builder =3D new ModelBuilder(source); + TestSuiteDef suite =3D builder.build(); = - TestRunnerEventBroadcaster broadcaster =3D new TestRunnerEventBroadc= aster(); - broadcaster.addListener(junitReporter); - broadcaster.addListener(new PrintListener()); + TestRunner runner =3D suite.createRunner(); = - // run the test - runner.run(new TestRunnerContextSupport(broadcaster)); + TestRunnerEventListener junitReporter =3D new JUnitReporter("outp= ut/tests", SampleTests.class.getName()); + // add listeners + + TestRunnerEventBroadcaster broadcaster =3D new TestRunnerEventBro= adcaster(); + broadcaster.addListener(junitReporter); + broadcaster.addListener(new PrintListener()); + + // run the test + runner.run(new TestRunnerContextSupport(broadcaster)); + } + finally + { + outputManager.stop(); + } } } Modified: modules/test/trunk/unit/src/main/org/jboss/unit/report/impl/junit= /JUnitReporter.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/report/impl/junit/JUnit= Reporter.java 2007-10-20 21:13:45 UTC (rev 8727) +++ modules/test/trunk/unit/src/main/org/jboss/unit/report/impl/junit/JUnit= Reporter.java 2007-10-20 22:33:04 UTC (rev 8728) @@ -22,13 +22,8 @@ *************************************************************************= *****/ package org.jboss.unit.report.impl.junit; = -import java.io.ByteArrayOutputStream; -import java.io.IOException; -import java.io.OutputStream; -import java.io.PrintStream; - -import org.jboss.unit.runner.TestRunnerEventListener; import org.jboss.unit.runner.TestRunnerEvent; +import org.jboss.unit.runner.TestRunnerEventListener; import org.jboss.unit.runner.event.EndRunnerEvent; import org.jboss.unit.runner.event.EndTestCaseEvent; import org.jboss.unit.runner.event.EndTestSuiteEvent; @@ -36,7 +31,12 @@ import org.jboss.unit.runner.event.StartRunnerEvent; import org.jboss.unit.runner.event.StartTestCaseEvent; import org.jboss.unit.runner.event.StartTestSuiteEvent; +import org.jboss.unit.tooling.SystemOutputManager; +import org.jboss.unit.tooling.SystemOutputView; = +import java.io.StringWriter; +import java.io.IOException; + /** * * @author Julien Viet @@ -47,24 +47,16 @@ { /** The JUnit test report */ private JUnitTestReport report; - = - /** The system error printStream */ - private ByteArrayOutputStream systemError; - = - /** The system out printStream */ - private ByteArrayOutputStream systemOut; - = + /** To dir */ - private static String toDir; + private String toDir; = + private SystemOutputView view; = public JUnitReporter(String reportToDir) { toDir =3D reportToDir; // redirecting system out and err - this.systemError =3D new ByteArrayOutputStream(); - this.systemOut =3D new ByteArrayOutputStream(); - this.setStreams(systemError, systemOut); = this.report =3D new JUnitTestReport(); } @@ -84,13 +76,24 @@ if (event instanceof StartRunnerEvent) { report.startJUnitTestSuite((StartRunnerEvent) event); + view =3D SystemOutputManager.getInstance().createView(); } else if (event instanceof EndRunnerEvent) { // append system out and system err - report.appendSystemError(systemError.toString()); - report.appendSystemOutput(systemOut.toString()); - = + try + { + StringWriter out =3D new StringWriter(); + StringWriter err =3D new StringWriter(); + view.writeTo(out, err); + report.appendSystemError(err.toString()); + report.appendSystemOutput(out.toString()); + } + catch (IOException e) + { + e.printStackTrace(); + } + // Testsuite End report.endTestSuite((EndRunnerEvent) event); = @@ -118,67 +121,4 @@ report.endTest((EndTestCaseEvent) event); } } - = - private void setStreams(ByteArrayOutputStream a, ByteArrayOutputStream = b) - { - PrintStream savedError =3D System.err; - PrintStream savedOut =3D System.out; - = - System.setErr(new PrintStream(new CaptureOutputStream(savedError, a)= )); - System.setOut(new PrintStream(new CaptureOutputStream(savedOut, b))); - = - } - = - private class CaptureOutputStream extends OutputStream - { - private OutputStream s1; - private OutputStream s2; - = - public CaptureOutputStream(OutputStream s1, OutputStream s2) - { - this.s1 =3D s1; - this.s2 =3D s2; - } - = - @Override - public void close() throws IOException - { - try - { - s1.close(); - } - finally - { - s2.close(); - } - } - - @Override - public void flush() throws IOException - { - s1.flush(); - s2.flush(); - } - - @Override - public void write(int b) throws IOException - { - s1.write(b); - s2.write(b); - } - = - @Override - public void write(byte[] b) throws IOException - { - s1.write(b); - s2.write(b); - } - = - @Override - public void write(byte[] b, int off, int len) throws IOException - { - s1.write(b, off, len); - s2.write(b, off, len); - } - } } Added: modules/test/trunk/unit/src/main/org/jboss/unit/tooling/ByteArrayOut= putStreamExt.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/tooling/ByteArrayOutput= StreamExt.java (rev 0) +++ modules/test/trunk/unit/src/main/org/jboss/unit/tooling/ByteArrayOutput= StreamExt.java 2007-10-20 22:33:04 UTC (rev 8728) @@ -0,0 +1,49 @@ +/*************************************************************************= ***** + * JBoss, a division of Red Hat = * + * Copyright 2006, Red Hat Middleware, LLC, and individual = * + * contributors as indicated by the @authors tag. See the = * + * copyright.txt in the distribution for a full listing of = * + * individual contributors. = * + * = * + * This is free software; you can redistribute it and/or modify it = * + * under the terms of the GNU Lesser General Public License as = * + * published by the Free Software Foundation; either version 2.1 of = * + * the License, or (at your option) any later version. = * + * = * + * This software is distributed in the hope that it will be useful, = * + * but WITHOUT ANY WARRANTY; without even the implied warranty of = * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU = * + * Lesser General Public License for more details. = * + * = * + * You should have received a copy of the GNU Lesser General Public = * + * License along with this software; if not, write to the Free = * + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA = * + * 02110-1301 USA, or see the FSF site: http://www.fsf.org. = * + *************************************************************************= *****/ +package org.jboss.unit.tooling; + +import java.io.ByteArrayOutputStream; +import java.io.IOException; +import java.io.OutputStream; +import java.io.Writer; + +/** + * @author Julien Viet + * @version $Revision: 1.1 $ + */ +class ByteArrayOutputStreamExt extends ByteArrayOutputStream +{ + + public int writeTo(OutputStream out, int from) throws IOException, Arra= yIndexOutOfBoundsException + { + out.write(buf, from, count); + return count; + } + + public int writeTo(Writer out, int from) throws IOException, ArrayIndex= OutOfBoundsException + { + String s =3D new String(buf, from, count); + out.write(s); + return count; + } +} Added: modules/test/trunk/unit/src/main/org/jboss/unit/tooling/ForkedOutput= Stream.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/tooling/ForkedOutputStr= eam.java (rev 0) +++ modules/test/trunk/unit/src/main/org/jboss/unit/tooling/ForkedOutputStr= eam.java 2007-10-20 22:33:04 UTC (rev 8728) @@ -0,0 +1,80 @@ +/*************************************************************************= ***** + * JBoss, a division of Red Hat = * + * Copyright 2006, Red Hat Middleware, LLC, and individual = * + * contributors as indicated by the @authors tag. See the = * + * copyright.txt in the distribution for a full listing of = * + * individual contributors. = * + * = * + * This is free software; you can redistribute it and/or modify it = * + * under the terms of the GNU Lesser General Public License as = * + * published by the Free Software Foundation; either version 2.1 of = * + * the License, or (at your option) any later version. = * + * = * + * This software is distributed in the hope that it will be useful, = * + * but WITHOUT ANY WARRANTY; without even the implied warranty of = * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU = * + * Lesser General Public License for more details. = * + * = * + * You should have received a copy of the GNU Lesser General Public = * + * License along with this software; if not, write to the Free = * + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA = * + * 02110-1301 USA, or see the FSF site: http://www.fsf.org. = * + *************************************************************************= *****/ +package org.jboss.unit.tooling; + +import java.io.OutputStream; +import java.io.IOException; + +/** + * @author Julien Viet + * @version $Revision: 1.1 $ + */ +class ForkedOutputStream extends OutputStream +{ + + /** . */ + private final OutputStream out1; + + /** . */ + private final OutputStream out2; + + public ForkedOutputStream(OutputStream out1, OutputStream out2) + { + this.out1 =3D out1; + this.out2 =3D out2; + } + + public void write(int i) throws IOException + { + safeWrite(out1, i); + safeWrite(out2, i); + } + + public void flush() throws IOException + { + safeFlush(out1); + safeFlush(out2); + } + + private void safeWrite(OutputStream out, int i) + { + try + { + out.write(i); + } + catch (IOException ignore) + { + } + } + + private void safeFlush(OutputStream out) + { + try + { + out.flush(); + } + catch (IOException ignore) + { + } + } +} Modified: modules/test/trunk/unit/src/main/org/jboss/unit/tooling/Main.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/tooling/Main.java 2007-= 10-20 21:13:45 UTC (rev 8727) +++ modules/test/trunk/unit/src/main/org/jboss/unit/tooling/Main.java 2007-= 10-20 22:33:04 UTC (rev 8728) @@ -153,12 +153,20 @@ this.broadcaster =3D broadcaster; } = + private SystemOutputManager systemManager; + public void execute() throws Exception { - // For now lets just be verbose. Later we need some real logging + '= debug' switch - System.out.println("TestRunnerContext contains: "); - System.out.println("Properties: " + properties.toString()); + systemManager =3D new SystemOutputManager(); + systemManager.start(); = + // + try + { + // For now lets just be verbose. Later we need some real logging = + 'debug' switch + System.out.println("TestRunnerContext contains: "); + System.out.println("Properties: " + properties.toString()); + // System.out.println("System properties:"); // for (Object key : System.getProperties().keySet()) // { @@ -166,15 +174,21 @@ // System.out.println(key + "=3D" + System.getProperty((String)key= )); // } = - StringWriter sw =3D new StringWriter(); - broadcaster.addListener(new PrintListener(sw)); + StringWriter sw =3D new StringWriter(); + broadcaster.addListener(new PrintListener(sw)); = - TestRunnerContextSupport runnerContext =3D new TestRunnerContextSupp= ort(properties, new ParametrizationSet(), mainFilter, broadcaster); - runner.run(runnerContext); + TestRunnerContextSupport runnerContext =3D new TestRunnerContextS= upport(properties, new ParametrizationSet(), mainFilter, broadcaster); + runner.run(runnerContext); = - sw.close(); + sw.close(); = - System.out.println(sw.toString()); + System.out.println(sw.toString()); + } + finally + { + systemManager.stop(); + } + } = public static void main(String[] args) throws Exception Added: modules/test/trunk/unit/src/main/org/jboss/unit/tooling/SystemOutput= Manager.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/tooling/SystemOutputMan= ager.java (rev 0) +++ modules/test/trunk/unit/src/main/org/jboss/unit/tooling/SystemOutputMan= ager.java 2007-10-20 22:33:04 UTC (rev 8728) @@ -0,0 +1,102 @@ +/*************************************************************************= ***** + * JBoss, a division of Red Hat = * + * Copyright 2006, Red Hat Middleware, LLC, and individual = * + * contributors as indicated by the @authors tag. See the = * + * copyright.txt in the distribution for a full listing of = * + * individual contributors. = * + * = * + * This is free software; you can redistribute it and/or modify it = * + * under the terms of the GNU Lesser General Public License as = * + * published by the Free Software Foundation; either version 2.1 of = * + * the License, or (at your option) any later version. = * + * = * + * This software is distributed in the hope that it will be useful, = * + * but WITHOUT ANY WARRANTY; without even the implied warranty of = * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU = * + * Lesser General Public License for more details. = * + * = * + * You should have received a copy of the GNU Lesser General Public = * + * License along with this software; if not, write to the Free = * + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA = * + * 02110-1301 USA, or see the FSF site: http://www.fsf.org. = * + *************************************************************************= *****/ +package org.jboss.unit.tooling; + +import java.io.ByteArrayOutputStream; +import java.io.PrintStream; + +/** + * @author Julien Viet + * @version $Revision: 1.1 $ + */ +public class SystemOutputManager +{ + + /** . */ + private static SystemOutputManager instance; + + /** . */ + private PrintStream originalOut; + + /** . */ + private PrintStream originalErr; + + /** . */ + private ByteArrayOutputStreamExt baosOut; + + /** . */ + private ByteArrayOutputStreamExt baosErr; + + public SystemOutputManager() + { + } + + public static SystemOutputManager getInstance() + { + return instance; + } + + public SystemOutputView createView() + { + return new SystemOutputView(baosOut, baosErr); + } + + public void start() + { + synchronized (SystemOutputManager.class) + { + if (instance !=3D null) + { + throw new IllegalStateException(); + } + + // + baosOut =3D new ByteArrayOutputStreamExt(); + baosErr =3D new ByteArrayOutputStreamExt(); + originalOut =3D System.out; + originalErr =3D System.err; + ForkedOutputStream fOut =3D new ForkedOutputStream(originalOut, b= aosOut); + ForkedOutputStream fErr =3D new ForkedOutputStream(originalErr, b= aosErr); + + // + System.setOut(new PrintStream(fOut, true)); + System.setErr(new PrintStream(fErr, true)); + instance =3D this; + } + } + + public void stop() + { + synchronized (SystemOutputManager.class) + { + if (instance !=3D null) + { + System.out.flush(); + System.err.flush(); + instance =3D null; + System.setOut(originalOut); + System.setErr(originalErr); + } + } + } +} Added: modules/test/trunk/unit/src/main/org/jboss/unit/tooling/SystemOutput= View.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/tooling/SystemOutputVie= w.java (rev 0) +++ modules/test/trunk/unit/src/main/org/jboss/unit/tooling/SystemOutputVie= w.java 2007-10-20 22:33:04 UTC (rev 8728) @@ -0,0 +1,73 @@ +/*************************************************************************= ***** + * JBoss, a division of Red Hat = * + * Copyright 2006, Red Hat Middleware, LLC, and individual = * + * contributors as indicated by the @authors tag. See the = * + * copyright.txt in the distribution for a full listing of = * + * individual contributors. = * + * = * + * This is free software; you can redistribute it and/or modify it = * + * under the terms of the GNU Lesser General Public License as = * + * published by the Free Software Foundation; either version 2.1 of = * + * the License, or (at your option) any later version. = * + * = * + * This software is distributed in the hope that it will be useful, = * + * but WITHOUT ANY WARRANTY; without even the implied warranty of = * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU = * + * Lesser General Public License for more details. = * + * = * + * You should have received a copy of the GNU Lesser General Public = * + * License along with this software; if not, write to the Free = * + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA = * + * 02110-1301 USA, or see the FSF site: http://www.fsf.org. = * + *************************************************************************= *****/ +package org.jboss.unit.tooling; + +import java.io.IOException; +import java.io.OutputStream; +import java.io.Writer; + +/** + * @author Julien Viet + * @version $Revision: 1.1 $ + */ +public class SystemOutputView +{ + + /** . */ + private ByteArrayOutputStreamExt out; + + /** . */ + private ByteArrayOutputStreamExt err; + + /** . */ + private int outCount; + + /** . */ + private int errCount; + + public SystemOutputView(ByteArrayOutputStreamExt out, ByteArrayOutputSt= reamExt err) + { + this.out =3D out; + this.err =3D err; + this.outCount =3D 0; + this.errCount =3D 0; + } + + public void writeTo(OutputStream toOut, OutputStream toErr) throws IOEx= ception + { + outCount =3D out.writeTo(toOut, outCount); + errCount =3D err.writeTo(toErr, errCount); + } + + public void writeTo(Writer toOut, Writer toErr) throws IOException + { + outCount =3D out.writeTo(toOut, outCount); + errCount =3D err.writeTo(toErr, errCount); + } + + public void reset() + { + outCount =3D 0; + errCount =3D 0; + } +} --===============6626168372932817655==-- From portal-commits at lists.jboss.org Sun Oct 21 11:23:24 2007 Content-Type: multipart/mixed; boundary="===============3924010079349980248==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8729 - modules/identity/trunk/identity/src/resources/test. Date: Sun, 21 Oct 2007 11:23:23 -0400 Message-ID: --===============3924010079349980248== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: bdaw Date: 2007-10-21 11:23:23 -0400 (Sun, 21 Oct 2007) New Revision: 8729 Modified: modules/identity/trunk/identity/src/resources/test/jboss-unit.xml Log: - disable non defined OpenLDAP test from the matrix Modified: modules/identity/trunk/identity/src/resources/test/jboss-unit.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/identity/trunk/identity/src/resources/test/jboss-unit.xml 2007-= 10-20 22:33:04 UTC (rev 8728) +++ modules/identity/trunk/identity/src/resources/test/jboss-unit.xml 2007-= 10-21 15:23:23 UTC (rev 8729) @@ -68,6 +68,12 @@ = + + OpenDS + Sun DS + RedHatDS + + = --===============3924010079349980248==-- From portal-commits at lists.jboss.org Sun Oct 21 11:33:42 2007 Content-Type: multipart/mixed; boundary="===============8311140910602056111==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8730 - in modules/test/trunk: tooling/src/main/org/jboss/test/unit/tooling and 4 other directories. Date: Sun, 21 Oct 2007 11:33:41 -0400 Message-ID: --===============8311140910602056111== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: bdaw Date: 2007-10-21 11:33:41 -0400 (Sun, 21 Oct 2007) New Revision: 8730 Added: modules/test/trunk/tooling/src/main/org/jboss/test/unit/tooling/simple/ modules/test/trunk/tooling/src/main/org/jboss/test/unit/tooling/simple/S= impleTest1.java modules/test/trunk/tooling/src/main/org/jboss/unit/tooling/ant/Parameter= Type.java modules/test/trunk/tooling/src/main/org/jboss/unit/tooling/ant/ValueType= .java modules/test/trunk/tooling/src/resources/test/simple-tests.xml Removed: modules/test/trunk/tooling/src/main/org/jboss/test/unit/tooling/simple/B= oboTest1.java Modified: modules/test/trunk/tooling/build.xml modules/test/trunk/tooling/src/main/org/jboss/unit/tooling/ant/JBossUnit= Task.java modules/test/trunk/tooling/src/main/org/jboss/unit/tooling/ant/TestsType= .java modules/test/trunk/tooling/src/main/org/jboss/unit/tooling/ant/ToolingCo= nstants.java modules/test/trunk/unit/src/main/org/jboss/unit/tooling/Main.java modules/test/trunk/unit/src/main/org/jboss/unit/tooling/MainBuilder.java Log: - enable tooling to handle parameters from system properties Modified: modules/test/trunk/tooling/build.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/tooling/build.xml 2007-10-21 15:23:23 UTC (rev 8729) +++ modules/test/trunk/tooling/build.xml 2007-10-21 15:33:41 UTC (rev 8730) @@ -217,34 +217,47 @@ = = - + + + + one + two + three + + + + 2one + 2two + 2three + + = = - = = - + Copied: modules/test/trunk/tooling/src/main/org/jboss/test/unit/tooling/sim= ple (from rev 8674, modules/test/trunk/tooling/src/main/org/jboss/test/unit= /tooling/bobo) Deleted: modules/test/trunk/tooling/src/main/org/jboss/test/unit/tooling/si= mple/BoboTest1.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/tooling/src/main/org/jboss/test/unit/tooling/bobo/Bo= boTest1.java 2007-10-17 11:11:09 UTC (rev 8674) +++ modules/test/trunk/tooling/src/main/org/jboss/test/unit/tooling/simple/= BoboTest1.java 2007-10-21 15:33:41 UTC (rev 8730) @@ -1,62 +0,0 @@ -/* -* JBoss, a division of Red Hat -* Copyright 2006, Red Hat Middleware, LLC, and individual contributors as = indicated -* by the @authors tag. See the copyright.txt in the distribution for a -* full listing of individual contributors. -* -* This is free software; you can redistribute it and/or modify it -* under the terms of the GNU Lesser General Public License as -* published by the Free Software Foundation; either version 2.1 of -* the License, or (at your option) any later version. -* -* This software is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -* Lesser General Public License for more details. -* -* You should have received a copy of the GNU Lesser General Public -* License along with this software; if not, write to the Free -* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA -* 02110-1301 USA, or see the FSF site: http://www.fsf.org. -*/ - -package org.jboss.test.unit.tooling.bobo; - -import org.jboss.unit.api.pojo.annotations.Test; -import org.jboss.unit.api.pojo.annotations.Tag; - -/** - * @author Boleslaw Dawidowicz - * @version $Revision: 0.1 $ - */ -public class BoboTest1 -{ - @Test(name =3D "testOne") - @Tag("simpleTag") - public void test1() - { - System.out.println("Executed testOne"); - } - - @Test(name =3D "testTwo") - @Tag("simpleTag") - public void test2() - { - System.out.println("Executed testTwo"); - - } - - @Test(name =3D "otherTestOne") - @Tag({"simpleTag", "anotherTag"}) - public void test3() - { - System.out.println("Executed otherTestOne"); - } - - @Test(name =3D "otherTestTwo") - @Tag("simpleTag") - public void test4() - { - System.out.println("Executed otherTestTwo"); - } -} Added: modules/test/trunk/tooling/src/main/org/jboss/test/unit/tooling/simp= le/SimpleTest1.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/tooling/src/main/org/jboss/test/unit/tooling/simple/= SimpleTest1.java (rev 0) +++ modules/test/trunk/tooling/src/main/org/jboss/test/unit/tooling/simple/= SimpleTest1.java 2007-10-21 15:33:41 UTC (rev 8730) @@ -0,0 +1,62 @@ +/* +* JBoss, a division of Red Hat +* Copyright 2006, Red Hat Middleware, LLC, and individual contributors as = indicated +* by the @authors tag. See the copyright.txt in the distribution for a +* full listing of individual contributors. +* +* This is free software; you can redistribute it and/or modify it +* under the terms of the GNU Lesser General Public License as +* published by the Free Software Foundation; either version 2.1 of +* the License, or (at your option) any later version. +* +* This software is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +* Lesser General Public License for more details. +* +* You should have received a copy of the GNU Lesser General Public +* License along with this software; if not, write to the Free +* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +* 02110-1301 USA, or see the FSF site: http://www.fsf.org. +*/ + +package org.jboss.test.unit.tooling.simple; + +import org.jboss.unit.api.pojo.annotations.Test; +import org.jboss.unit.api.pojo.annotations.Tag; + +/** + * @author Boleslaw Dawidowicz + * @version $Revision: 0.1 $ + */ +public class SimpleTest1 +{ + @Test(name =3D "testOne") + @Tag("simpleTag") + public void test1() + { + System.out.println("Executed testOne"); + } + + @Test(name =3D "testTwo") + @Tag("simpleTag") + public void test2() + { + System.out.println("Executed testTwo"); + + } + + @Test(name =3D "otherTestOne") + @Tag({"simpleTag", "anotherTag"}) + public void test3() + { + System.out.println("Executed otherTestOne"); + } + + @Test(name =3D "otherTestTwo") + @Tag("simpleTag") + public void test4() + { + System.out.println("Executed otherTestTwo"); + } +} Modified: modules/test/trunk/tooling/src/main/org/jboss/unit/tooling/ant/JB= ossUnitTask.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/tooling/src/main/org/jboss/unit/tooling/ant/JBossUni= tTask.java 2007-10-21 15:23:23 UTC (rev 8729) +++ modules/test/trunk/tooling/src/main/org/jboss/unit/tooling/ant/JBossUni= tTask.java 2007-10-21 15:33:41 UTC (rev 8730) @@ -51,6 +51,8 @@ = private Set sysproperties =3D new HashSet(); = + private Set parameters =3D new HashSet(); + public JBossUnitTask() { } @@ -72,10 +74,14 @@ this.reports =3D reports; } = + public void addConfiguredParameter(ParameterType param) + { + this.parameters.add(param); + } = + public void execute() throws BuildException { - //System.out.println("Executing JBossUnit. tests: " + testsTypes.siz= e()); for (TestsType testsType : testsTypes) { = @@ -92,12 +98,21 @@ } = = + // Merge system properties Set propCopy =3D new HashSet(); propCopy.addAll(sysproperties); - propCopy.addAll(testsType.getSysproperties()); testsType.setSysproperties(propCopy); + + // Merge runtime parameters + Set paramCopy =3D new HashSet(); + paramCopy.addAll(parameters); + paramCopy.addAll(testsType.getParameters()); + testsType.setParameters(paramCopy); + testsType.execute(); + + } = = Added: modules/test/trunk/tooling/src/main/org/jboss/unit/tooling/ant/Param= eterType.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/tooling/src/main/org/jboss/unit/tooling/ant/Paramete= rType.java (rev 0) +++ modules/test/trunk/tooling/src/main/org/jboss/unit/tooling/ant/Paramete= rType.java 2007-10-21 15:33:41 UTC (rev 8730) @@ -0,0 +1,89 @@ +/* +* JBoss, a division of Red Hat +* Copyright 2006, Red Hat Middleware, LLC, and individual contributors as = indicated +* by the @authors tag. See the copyright.txt in the distribution for a +* full listing of individual contributors. +* +* This is free software; you can redistribute it and/or modify it +* under the terms of the GNU Lesser General Public License as +* published by the Free Software Foundation; either version 2.1 of +* the License, or (at your option) any later version. +* +* This software is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +* Lesser General Public License for more details. +* +* You should have received a copy of the GNU Lesser General Public +* License along with this software; if not, write to the Free +* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +* 02110-1301 USA, or see the FSF site: http://www.fsf.org. +*/ + +package org.jboss.unit.tooling.ant; + +import java.util.LinkedList; +import java.util.List; + +/** + * @author Boleslaw Dawidowicz + * @version : 0.1 $ + */ +public class ParameterType +{ + + private String name; + + private List values =3D new LinkedList(); + + public boolean equals(Object o) + { + if (this =3D=3D o) + { + return true; + } + if (o =3D=3D null || getClass() !=3D o.getClass()) + { + return false; + } + + ParameterType that =3D (ParameterType)o; + + if (!name.equals(that.name)) + { + return false; + } + + return true; + } + + public int hashCode() + { + int result; + result =3D name.hashCode(); + result =3D 31 * result + (values !=3D null ? values.hashCode() : 0); + return result; + } + + public void addConfiguredValue(ValueType value) + { + values.add(value.toString()); + } + + public String getName() + { + return name; + } + + public void setName(String name) + { + this.name =3D name; + } + + public List getValues() + { + return values; + } + + = +} Modified: modules/test/trunk/tooling/src/main/org/jboss/unit/tooling/ant/Te= stsType.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/tooling/src/main/org/jboss/unit/tooling/ant/TestsTyp= e.java 2007-10-21 15:23:23 UTC (rev 8729) +++ modules/test/trunk/tooling/src/main/org/jboss/unit/tooling/ant/TestsTyp= e.java 2007-10-21 15:33:41 UTC (rev 8730) @@ -69,6 +69,10 @@ = private Set sysproperties =3D new HashSet(); = + private Set parameters =3D new HashSet(); + + + public TestsType() { } @@ -308,8 +312,198 @@ javaTask.createArg().setValue(OPT_PROPERTIES + "=3D" + props); = } + + Map> sysParameters =3D new HashMap>(); + + Map> mergedParameters =3D new HashMap>(); + + for (ParameterType parameter : parameters) + { + List values; + + if (mergedParameters.containsKey(parameter.getName())) + { + values =3D mergedParameters.get(parameter.getName()); + } + else + { + values =3D new LinkedList(); + } + + values.addAll(parameter.getValues()); + + mergedParameters.put(parameter.getName(), values); + } + = + updateParameters(sysParameters); + + mergedParameters.putAll(sysParameters); + + + if (!mergedParameters.isEmpty()) + { + StringBuilder params =3D new StringBuilder("["); + + Set paramNames =3D mergedParameters.keySet(); + + for (Iterator stringIterator =3D paramNames.iterator(); s= tringIterator.hasNext();) + { + String name =3D stringIterator.next(); + + + List paramValues =3D mergedParameters.get(name); + + for (Iterator iterator =3D paramValues.iterator(); ite= rator.hasNext();) + { + String value =3D iterator.next(); + + + params.append(name) + .append("=3D") + .append(value); + + if (iterator.hasNext()) + { + params.append(","); + } + } + + if (stringIterator.hasNext()) + { + params.append(","); + } + else + { + params.append("]"); + } + + } + + javaTask.createArg().setValue(OPT_PARAMETERS + "=3D" + params); + + } + + = + + } = + private void updateParameters(Map> taskParameters) + { + Hashtable sysProps =3D (Hashtable)get= Project().getProperties(); + + String sysParameters =3D sysProps.get(JBOSS_UNIT_PARAMETERS); + + if (sysParameters !=3D null && sysParameters.length() > 0) + { + + Map> parsedParams =3D parseParameters(sysPara= meters); + + taskParameters.putAll(parsedParams); + } + + for (String sysPropKey : sysProps.keySet()) + { + if (sysPropKey.startsWith(JBOSS_UNIT_PARAMETER + ".")) + { + String propertyString =3D sysPropKey + "=3D" + sysProps.get(sy= sPropKey); + + propertyString =3D propertyString.replaceFirst(JBOSS_UNIT_PARA= METER + "\\.", ""); + + + // + String[] parameter =3D propertyString.split("=3D",2); + + // + if (parameter.length !=3D 2) + { + throw new IllegalArgumentException("Property not accepted, = it should match a=3Db and it is " + propertyString); + } + + + List parameterValues =3D new LinkedList(); + + if (parameter[1].matches("\\[.+(,.+)*\\]")) + { + + + + String valuesString =3D parameter[1]; + + valuesString =3D valuesString.replaceAll("\\[","").replaceA= ll("\\]",""); + + String[] values =3D valuesString.split(","); + + for (String value : values) + { + parameterValues.add(value); + } + + } + else + { + parameterValues.add(parameter[1]); + } + + if (taskParameters.containsKey(parameter[0])) + { + taskParameters.get(parameter[0]).addAll(parameterValues); + } + else + { + taskParameters.put(parameter[0], parameterValues); + } + } + } + } + + private Map> parseParameters(String parametersStri= ng) + { + + if (!parametersString.matches("\\[.+=3D.+(,.+=3D.+)*\\]")) + { + throw new IllegalArgumentException("Parameters don't follow prope= r format: [a=3Db,c=3Dd,e=3Df]"); + } + + Map> parsedParams =3D new HashMap>(); + + parametersString =3D parametersString.replaceAll("\\[","").replaceAl= l("\\]",""); + + String parameterGroups[] =3D parametersString.split(","); + + for (String parameterGroup : parameterGroups) + { + + String parameter[] =3D parameterGroup.split("=3D"); + + // + if (parameter.length !=3D 2) + { + throw new IllegalArgumentException("Parameter not accepted, it= should match a=3Db and it is " + parameter); + } + + List values; + + if (parsedParams.containsKey(parameter[0])) + { + values =3D parsedParams.get(parameter[0]); + } + else + { + values =3D new LinkedList(); + } + + values.add(parameter[1]); + + parsedParams.put(parameter[0], values); + } + + return parsedParams; + + + } + + private void addUnparsedString(Set set, String valueString) { if (valueString =3D=3D null) @@ -384,7 +578,7 @@ { if (!propertiesString.matches("\\[.+=3D.+(,.+=3D.+)*\\]")) { - throw new IllegalArgumentException("Parameters don't follow prope= r format: [a=3Db,c=3Dd,e=3Df]"); + throw new IllegalArgumentException("Properties don't follow prope= r format: [a=3Db,c=3Dd,e=3Df]"); } = Map parsedProps =3D new HashMap(); @@ -440,6 +634,21 @@ this.properties.add(property); } = + public void addConfiguredParameter(ParameterType param) + { + this.parameters.add(param); + } + + public Set getParameters() + { + return parameters; + } + + public void setParameters(Set parameters) + { + this.parameters =3D parameters; + } + public String getConfig() { return config; Modified: modules/test/trunk/tooling/src/main/org/jboss/unit/tooling/ant/To= olingConstants.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/tooling/src/main/org/jboss/unit/tooling/ant/ToolingC= onstants.java 2007-10-21 15:23:23 UTC (rev 8729) +++ modules/test/trunk/tooling/src/main/org/jboss/unit/tooling/ant/ToolingC= onstants.java 2007-10-21 15:33:41 UTC (rev 8730) @@ -63,5 +63,9 @@ = public static final String OPT_PROPERTIES =3D "--properties"; = + public static final String OPT_PARAMETER =3D "--parameter"; = + public static final String OPT_PARAMETERS =3D "--parameters"; + + } Added: modules/test/trunk/tooling/src/main/org/jboss/unit/tooling/ant/Value= Type.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/tooling/src/main/org/jboss/unit/tooling/ant/ValueTyp= e.java (rev 0) +++ modules/test/trunk/tooling/src/main/org/jboss/unit/tooling/ant/ValueTyp= e.java 2007-10-21 15:33:41 UTC (rev 8730) @@ -0,0 +1,47 @@ +/* +* JBoss, a division of Red Hat +* Copyright 2006, Red Hat Middleware, LLC, and individual contributors as = indicated +* by the @authors tag. See the copyright.txt in the distribution for a +* full listing of individual contributors. +* +* This is free software; you can redistribute it and/or modify it +* under the terms of the GNU Lesser General Public License as +* published by the Free Software Foundation; either version 2.1 of +* the License, or (at your option) any later version. +* +* This software is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +* Lesser General Public License for more details. +* +* You should have received a copy of the GNU Lesser General Public +* License along with this software; if not, write to the Free +* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +* 02110-1301 USA, or see the FSF site: http://www.fsf.org. +*/ + +package org.jboss.unit.tooling.ant; + +/** + * @author Boleslaw Dawidowicz + * @version : 0.1 $ + */ +public class ValueType +{ + private String value; + + public void addText(String text) + { + this.value =3D text; + } + + public String getValue() + { + return value; + } + + public String toString() + { + return this.value; + } +} Copied: modules/test/trunk/tooling/src/resources/test/simple-tests.xml (fro= m rev 8728, modules/test/trunk/tooling/src/resources/test/bobo-tests.xml) =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/tooling/src/resources/test/simple-tests.xml = (rev 0) +++ modules/test/trunk/tooling/src/resources/test/simple-tests.xml 2007-10-= 21 15:33:41 UTC (rev 8730) @@ -0,0 +1,11 @@ + + + + + + + + \ No newline at end of file Modified: modules/test/trunk/unit/src/main/org/jboss/unit/tooling/Main.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/tooling/Main.java 2007-= 10-21 15:23:23 UTC (rev 8729) +++ modules/test/trunk/unit/src/main/org/jboss/unit/tooling/Main.java 2007-= 10-21 15:33:41 UTC (rev 8730) @@ -52,6 +52,8 @@ = private final Map properties; = + private final Map parameters; + private final TestRunnerEventBroadcaster broadcaster; = public static final String JBOSS_UNIT_PROPERTIES =3D "jboss.unit.proper= ties"; @@ -93,6 +95,10 @@ = public static final String OPT_PROPERTIES =3D "--properties"; = + public static final String OPT_PARAMETER =3D "--parameter"; + + public static final String OPT_PARAMETERS =3D "--parameters"; + public static final Set options; = public static final Set options_no_arg; @@ -119,7 +125,7 @@ options_no_arg =3D Collections.unmodifiableSet(opts); } = - public Main(TestRunner runner, MainTestFilter mainFilter, TestRunnerEve= ntBroadcaster broadcaster, TestSuiteDef suiteDef, Map proper= ties) + public Main(TestRunner runner, MainTestFilter mainFilter, TestRunnerEve= ntBroadcaster broadcaster, TestSuiteDef suiteDef, Map proper= ties, Map parameters) { if (runner =3D=3D null) { @@ -146,11 +152,17 @@ throw new IllegalArgumentException("properties cannot be null"); } = + if (parameters =3D=3D null) + { + throw new IllegalArgumentException("parameters cannot be null"); + } + this.mainFilter =3D mainFilter; this.runner =3D runner; this.suiteDef =3D suiteDef; this.properties =3D properties; this.broadcaster =3D broadcaster; + this.parameters =3D parameters; } = private SystemOutputManager systemManager; @@ -177,7 +189,7 @@ StringWriter sw =3D new StringWriter(); broadcaster.addListener(new PrintListener(sw)); = - TestRunnerContextSupport runnerContext =3D new TestRunnerContextS= upport(properties, new ParametrizationSet(), mainFilter, broadcaster); + TestRunnerContextSupport runnerContext =3D new TestRunnerContextS= upport(properties, new ParametrizationSet(parameters), mainFilter, broadcas= ter); runner.run(runnerContext); = sw.close(); @@ -274,10 +286,10 @@ builder.setHTMLReportDir(arguments.get(OPT_HTML_REPORT_DIR)); } = - if (argument.startsWith(OPT_PROPERTY)) + if (argument.startsWith(OPT_PROPERTY) && !argument.equals(OPT_PRO= PERTIES)) { = - //pass whole --properties.name=3Dvalue to be parsed + // Pass whole --properties.name=3Dvalue to be parsed builder.addUnparsedProperty(argument + arguments.get(OPT_PROPE= RTY)); } = @@ -285,6 +297,18 @@ { builder.addUnparsedProperties(arguments.get(OPT_PROPERTIES)); } + + if (argument.startsWith(OPT_PARAMETER) && !argument.equals(OPT_PA= RAMETERS)) + { + + // Pass whole --parameter.name=3Dvalue/values to be parsed + builder.addUnparsedParameter(argument + arguments.get(OPT_PARA= METER)); + } + + if (argument.equals(OPT_PARAMETERS)) + { + builder.addUnparsedParameters(arguments.get(OPT_PARAMETERS)); + } = } = Modified: modules/test/trunk/unit/src/main/org/jboss/unit/tooling/MainBuild= er.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/tooling/MainBuilder.jav= a 2007-10-21 15:23:23 UTC (rev 8729) +++ modules/test/trunk/unit/src/main/org/jboss/unit/tooling/MainBuilder.jav= a 2007-10-21 15:33:41 UTC (rev 8730) @@ -22,26 +22,28 @@ = package org.jboss.unit.tooling; = +import org.jboss.unit.report.impl.junit.JUnitReporter; +import org.jboss.unit.runner.TestRunner; import org.jboss.unit.runner.TestRunnerEventListener; -import org.jboss.unit.runner.TestRunner; +import org.jboss.unit.runner.impl.NullFilter; import org.jboss.unit.runner.impl.TestRunnerEventBroadcaster; -import org.jboss.unit.runner.impl.NullFilter; import org.jboss.unit.runner.model.ModelBuilder; import org.jboss.unit.runner.model.TestSuiteDef; -import org.jboss.unit.report.impl.junit.JUnitReporter; import org.jboss.unit.tooling.filter.ExcludeTestFilter; import org.jboss.unit.tooling.filter.IncludeTestFilter; import org.jboss.unit.tooling.filter.MainTestFilter; import org.jboss.unit.tooling.report.DelegatingReporter; import org.xml.sax.InputSource; = -import java.util.Set; +import java.io.File; +import java.io.FileInputStream; +import java.io.InputStream; +import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; -import java.util.HashMap; -import java.io.InputStream; -import java.io.FileInputStream; -import java.io.File; +import java.util.Set; +import java.util.LinkedList; = /** * @author Boleslaw Dawidowicz @@ -76,7 +78,9 @@ = private Map properties =3D new HashMap(); = + private Map> parameters =3D new HashMap>(); = + private MainBuilder() { = @@ -352,8 +356,103 @@ return parsedProps; } = + public void addUnparsedParameter(String paramString) + { + paramString =3D paramString.replaceFirst(Main.OPT_PARAMETER + "\\.",= ""); = + // + String[] parameter =3D paramString.split("=3D",2); = + // + if (parameter.length !=3D 2) + { + throw new IllegalArgumentException("Parameter not accepted, it sh= ould match a=3Db and it is " + paramString); + } + + + List parameterValues =3D new LinkedList(); + + if (parameter[1].matches("\\[.+(,.+)*\\]")) + { + + String valuesString =3D parameter[1]; + + valuesString =3D valuesString.replaceAll("\\[","").replaceAll("\\= ]",""); + + String[] values =3D valuesString.split(","); + + for (String value : values) + { + parameterValues.add(value); + } + + } + else + { + parameterValues.add(parameter[1]); + } + + if (parameters.containsKey(parameter[0])) + { + parameters.get(parameter[0]).addAll(parameterValues); + } + else + { + parameters.put(parameter[0], parameterValues); + } + + } + + public void addUnparsedParameters(String parametersString) + { + + parametersString =3D parametersString.replaceAll("\\[","").replaceAl= l("\\]",""); + + String parameterGroups[] =3D parametersString.split(","); + + for (String parameterGroup : parameterGroups) + { + + String parameter[] =3D parameterGroup.split("=3D"); + + // + if (parameter.length !=3D 2) + { + throw new IllegalArgumentException("Parameter not accepted, it= should match a=3Db and it is " + parameter); + } + + List values; + + if (parameters.containsKey(parameter[0])) + { + values =3D parameters.get(parameter[0]); + } + else + { + values =3D new LinkedList(); + } + + values.add(parameter[1]); + + parameters.put(parameter[0], values); + } + } + + public Map getParameters() + { + Map params =3D new HashMap(); + + for (String paramKey : parameters.keySet()) + { + List values =3D parameters.get(paramKey); + params.put(paramKey, values.toArray(new String[values.size()])); + } + + return params; + + } + + public String getSuiteName() { return suiteName; @@ -447,7 +546,7 @@ } = = - return new Main(runner, filter, broadcaster, suite, properties); + return new Main(runner, filter, broadcaster, suite, properties, getP= arameters()); } = public static void checkCreateOutputDirectory(String dir) throws Except= ion @@ -481,5 +580,6 @@ } = = + } = --===============8311140910602056111==-- From portal-commits at lists.jboss.org Mon Oct 22 06:29:44 2007 Content-Type: multipart/mixed; boundary="===============4246310818674059616==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8731 - in modules/test/trunk: tooling/src/main/org/jboss/unit/tooling/ant and 7 other directories. Date: Mon, 22 Oct 2007 06:25:35 -0400 Message-ID: --===============4246310818674059616== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: julien(a)jboss.com Date: 2007-10-22 06:25:33 -0400 (Mon, 22 Oct 2007) New Revision: 8731 Added: modules/test/trunk/unit/src/main/org/jboss/unit/report/impl/junit/Abstra= ctJUnitReport.java modules/test/trunk/unit/src/main/org/jboss/unit/report/impl/junit/JUnitT= estsuiteReport.java modules/test/trunk/unit/src/main/org/jboss/unit/report/impl/junit/String= Utils.java modules/test/trunk/unit/src/resources/jboss-unit-jar/org/jboss/unit/repo= rt/ modules/test/trunk/unit/src/resources/jboss-unit-jar/org/jboss/unit/repo= rt/impl/ modules/test/trunk/unit/src/resources/jboss-unit-jar/org/jboss/unit/repo= rt/impl/junit/ modules/test/trunk/unit/src/resources/jboss-unit-jar/org/jboss/unit/repo= rt/impl/junit/junit-frames.xsl Modified: modules/test/trunk/tooling/build.xml modules/test/trunk/tooling/src/main/org/jboss/unit/tooling/ant/HTMLRepor= tsType.java modules/test/trunk/tooling/src/main/org/jboss/unit/tooling/ant/ReportsTy= pe.java modules/test/trunk/tooling/src/main/org/jboss/unit/tooling/ant/TestsType= .java modules/test/trunk/unit/src/main/org/jboss/test/unit/sample/SampleTests.= java modules/test/trunk/unit/src/main/org/jboss/unit/report/impl/junit/JUnitR= eporter.java modules/test/trunk/unit/src/main/org/jboss/unit/tooling/ByteArrayOutputS= treamExt.java modules/test/trunk/unit/src/main/org/jboss/unit/tooling/Main.java modules/test/trunk/unit/src/main/org/jboss/unit/tooling/MainBuilder.java modules/test/trunk/unit/src/main/org/jboss/unit/tooling/SystemOutputMana= ger.java modules/test/trunk/unit/src/main/org/jboss/unit/tooling/SystemOutputView= .java Log: - improved JUnit XML reporting - implemented HTML reporting Modified: modules/test/trunk/tooling/build.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/tooling/build.xml 2007-10-21 15:33:41 UTC (rev 8730) +++ modules/test/trunk/tooling/build.xml 2007-10-22 10:25:33 UTC (rev 8731) @@ -266,10 +266,10 @@ - + = = - + = Modified: modules/test/trunk/tooling/src/main/org/jboss/unit/tooling/ant/HT= MLReportsType.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/tooling/src/main/org/jboss/unit/tooling/ant/HTMLRepo= rtsType.java 2007-10-21 15:33:41 UTC (rev 8730) +++ modules/test/trunk/tooling/src/main/org/jboss/unit/tooling/ant/HTMLRepo= rtsType.java 2007-10-22 10:25:33 UTC (rev 8731) @@ -43,5 +43,4 @@ { this.toDir =3D toDir; } - } Modified: modules/test/trunk/tooling/src/main/org/jboss/unit/tooling/ant/Re= portsType.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/tooling/src/main/org/jboss/unit/tooling/ant/ReportsT= ype.java 2007-10-21 15:33:41 UTC (rev 8730) +++ modules/test/trunk/tooling/src/main/org/jboss/unit/tooling/ant/ReportsT= ype.java 2007-10-22 10:25:33 UTC (rev 8731) @@ -56,12 +56,12 @@ htmlReports =3D html; } = - public XMLReportsType getXmlReports() + public XMLReportsType getXMLReports() { return xmlReports; } = - public HTMLReportsType getHtmlReports() + public HTMLReportsType getHTMLReports() { return htmlReports; } Modified: modules/test/trunk/tooling/src/main/org/jboss/unit/tooling/ant/Te= stsType.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/tooling/src/main/org/jboss/unit/tooling/ant/TestsTyp= e.java 2007-10-21 15:33:41 UTC (rev 8730) +++ modules/test/trunk/tooling/src/main/org/jboss/unit/tooling/ant/TestsTyp= e.java 2007-10-22 10:25:33 UTC (rev 8731) @@ -187,14 +187,16 @@ javaTask.createArg().setValue(OPT_SUITE_NAME + "=3D" + getSuiteNa= me()); } = - - - if (getReports() !=3D null && getReports().getXmlReports() !=3D null) + if (getReports() !=3D null && getReports().getXMLReports() !=3D null) { - javaTask.createArg().setValue(OPT_XML_REPORT_DIR + "=3D" + getRep= orts().getXmlReports().getToDir()); + javaTask.createArg().setValue(OPT_XML_REPORT_DIR + "=3D" + getRep= orts().getXMLReports().getToDir()); } = - + if (getReports() !=3D null && getReports().getHTMLReports() !=3D nul= l) + { + javaTask.createArg().setValue(OPT_HTML_REPORT_DIR + "=3D" + getRe= ports().getHTMLReports().getToDir()); + } + = Set includeIds =3D new HashSet(); = Set includeKeywords =3D new HashSet(); @@ -203,9 +205,6 @@ = Set excludeKeywords =3D new HashSet(); = - - - for (IncludeType include : includes) { //Check attributes consistency Modified: modules/test/trunk/unit/src/main/org/jboss/test/unit/sample/Sampl= eTests.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/test/unit/sample/SampleTests= .java 2007-10-21 15:33:41 UTC (rev 8730) +++ modules/test/trunk/unit/src/main/org/jboss/test/unit/sample/SampleTests= .java 2007-10-22 10:25:33 UTC (rev 8731) @@ -22,22 +22,23 @@ *************************************************************************= *****/ package org.jboss.test.unit.sample; = +import org.jboss.unit.report.impl.junit.JUnitTestsuiteReport; import org.jboss.unit.report.impl.writer.PrintListener; -import org.jboss.unit.report.impl.junit.JUnitReporter; import org.jboss.unit.runner.TestRunner; import org.jboss.unit.runner.TestRunnerEventListener; +import org.jboss.unit.runner.impl.TestRunnerContextSupport; import org.jboss.unit.runner.impl.TestRunnerEventBroadcaster; -import org.jboss.unit.runner.impl.TestRunnerContextSupport; +import org.jboss.unit.runner.model.BuilderException; import org.jboss.unit.runner.model.ModelBuilder; import org.jboss.unit.runner.model.TestSuiteDef; -import org.jboss.unit.runner.model.BuilderException; import org.jboss.unit.tooling.SystemOutputManager; import org.xml.sax.InputSource; import org.xml.sax.SAXException; = import javax.xml.parsers.ParserConfigurationException; +import java.io.File; +import java.io.IOException; import java.io.InputStream; -import java.io.IOException; = /** * @author Julien Viet @@ -86,9 +87,34 @@ = TestRunner runner =3D suite.createRunner(); = - TestRunnerEventListener junitReporter =3D new JUnitReporter("outp= ut/tests", SampleTests.class.getName()); - // add listeners + File xmlDir =3D new File("output/tests/xml"); + File htmlDir =3D new File("output/tests/html"); = + if (!xmlDir.exists()) + { + xmlDir.mkdirs(); + } + else + { + if (!xmlDir.isDirectory()) + { + throw new AssertionError(); + } + } + if (!htmlDir.exists()) + { + htmlDir.mkdirs(); + } + else + { + if (!htmlDir.isDirectory()) + { + throw new AssertionError(); + } + } + + TestRunnerEventListener junitReporter =3D new JUnitTestsuiteRepor= t(xmlDir, htmlDir); + TestRunnerEventBroadcaster broadcaster =3D new TestRunnerEventBro= adcaster(); broadcaster.addListener(junitReporter); broadcaster.addListener(new PrintListener()); Added: modules/test/trunk/unit/src/main/org/jboss/unit/report/impl/junit/Ab= stractJUnitReport.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/report/impl/junit/Abstr= actJUnitReport.java (rev 0) +++ modules/test/trunk/unit/src/main/org/jboss/unit/report/impl/junit/Abstr= actJUnitReport.java 2007-10-22 10:25:33 UTC (rev 8731) @@ -0,0 +1,264 @@ +/*************************************************************************= ***** + * JBoss, a division of Red Hat = * + * Copyright 2006, Red Hat Middleware, LLC, and individual = * + * contributors as indicated by the @authors tag. See the = * + * copyright.txt in the distribution for a full listing of = * + * individual contributors. = * + * = * + * This is free software; you can redistribute it and/or modify it = * + * under the terms of the GNU Lesser General Public License as = * + * published by the Free Software Foundation; either version 2.1 of = * + * the License, or (at your option) any later version. = * + * = * + * This software is distributed in the hope that it will be useful, = * + * but WITHOUT ANY WARRANTY; without even the implied warranty of = * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU = * + * Lesser General Public License for more details. = * + * = * + * You should have received a copy of the GNU Lesser General Public = * + * License along with this software; if not, write to the Free = * + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA = * + * 02110-1301 USA, or see the FSF site: http://www.fsf.org. = * + *************************************************************************= *****/ +package org.jboss.unit.report.impl.junit; + +import org.jboss.unit.Failure; +import org.jboss.unit.TestId; +import org.jboss.unit.info.TestInfo; +import org.jboss.unit.runner.TestResult; +import org.jboss.unit.runner.TestRunnerEvent; +import org.jboss.unit.runner.TestRunnerEventListener; +import org.jboss.unit.runner.event.EndRunnerEvent; +import org.jboss.unit.runner.event.EndTestCaseEvent; +import org.jboss.unit.runner.event.EndTestSuiteEvent; +import org.jboss.unit.runner.event.RunnerFailureEvent; +import org.jboss.unit.runner.event.StartRunnerEvent; +import org.jboss.unit.runner.event.StartTestCaseEvent; +import org.jboss.unit.runner.event.StartTestSuiteEvent; +import org.jboss.unit.tooling.SystemOutputManager; +import org.jboss.unit.tooling.SystemOutputView; + +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashMap; +import java.util.Iterator; +import java.util.List; +import java.util.Map; + +/** + * @author Julien Viet + * @version $Revision: 1.1 $ + */ +public abstract class AbstractJUnitReport implements TestRunnerEventListen= er +{ + + /** The tested classes stack. */ + private TestSuite current; + + public void onEvent(TestRunnerEvent event) + { + if (event instanceof StartRunnerEvent) + { + handle((StartRunnerEvent) event); + } + else if (event instanceof EndRunnerEvent) + { + handle((EndRunnerEvent)event); + } + else if (event instanceof RunnerFailureEvent) + { + handle((RunnerFailureEvent) event); + } + else if (event instanceof StartTestSuiteEvent) + { + handle((StartTestSuiteEvent)event); + } + else if (event instanceof EndTestSuiteEvent) + { + handle((EndTestSuiteEvent)event); + } + else if (event instanceof StartTestCaseEvent) + { + handle((StartTestCaseEvent) event); + } + else if (event instanceof EndTestCaseEvent) + { + handle((EndTestCaseEvent) event); + } + } + + protected abstract void startRunner(); + + protected abstract void endRunner(); + + protected abstract void runnerFailure(TestSuite testSuite, Failure fail= ure); + + protected abstract void endTestCase(TestSuite testSuite, String testNam= e, TestResult result); + + protected abstract void startTestSuite(TestSuite testSuite); + + protected abstract void endTestSuite(TestSuite testSuite); + + private void handle(StartRunnerEvent event) + { + current =3D new TestSuite(null, ""); + + // + startTestSuite(current); + + // + startRunner(); + } + + private void handle(EndRunnerEvent event) + { + TestSuite tmp =3D current; + current =3D null; + + // + endTestSuite(tmp); + + // + endRunner(); + } + + private void handle(StartTestSuiteEvent event) + { + current =3D new TestSuite(current, event.getTestInfo().getName()); + + // + startTestSuite(current); + } + + private void handle(EndTestSuiteEvent event) + { + TestSuite testSuite =3D current; + current =3D current.parent; + + // + endTestSuite(testSuite); + } + + private void handle(StartTestCaseEvent event) + { + current.startedTests.put(event.getTestId(), event.getTestInfo()); + } + + private void handle(RunnerFailureEvent event) + { + current.tests++; + current.errors++; + + // + runnerFailure(current, event.getFailure()); + } + + private void handle(EndTestCaseEvent event) + { + TestId testId =3D event.getTestId(); + TestResult result =3D event.getTestResult(); + TestInfo info =3D current.startedTests.get(testId); + + // remove test from started List + current.startedTests.remove(testId); + + /** Adding testcase name */ + StringBuffer testName =3D new StringBuffer(info.getName()); + Iterator i =3D result.getParametrization().keySet().iterator= (); + if (i.hasNext()) + { + testName.append("?"); + while (i.hasNext()) + { + String parameterName =3D i.next(); + String value =3D result.getParametrization().get(parameterName= ); + testName.append(parameterName).append("=3D").append(value); + if(i.hasNext()) + { + testName.append("&"); + } + } + } + + // + current.durationMillis +=3D result.getDurationMillis(); + current.tests++; + + // + endTestCase(current, testName.toString(), result); + } + + public class TestSuite + { + + /** . */ + final TestSuite parent; + + /** . */ + final String name; + + /** . */ + long durationMillis; + + /** The test count */ + int tests; + + /** The error count */ + int errors; + + /** The failed count */ + int failed; + + /** The started Tests */ + Map startedTests =3D new HashMap= (); + +// /** . */ +// List children =3D new ArrayList(); + + /** The view of the system output. */ + SystemOutputView view =3D SystemOutputManager.getInstance().createVi= ew(false); + + /** + * Todo: set properties + * + * @param name + */ + TestSuite(TestSuite parent, String name) + { + this.parent =3D parent; + this.name =3D name; + } + + public StringBuffer getFQN() + { + if (parent =3D=3D null) + { + return new StringBuffer("_none_"); + } + else + { + List tmp =3D new ArrayList(); + for (TestSuite current =3D this;current.parent !=3D null;curre= nt =3D current.parent) + { + tmp.add(current); + } + + // + Collections.reverse(tmp); + + // Skip the first top that will not participate in the name + StringBuffer nb =3D new StringBuffer(); + for (Iterator i =3D tmp.iterator();i.hasNext();) + { + TestSuite testSuite =3D i.next(); + nb.append(testSuite.name); + if (i.hasNext()) + { + nb.append("."); + } + } + return nb; + } + } + } +} Modified: modules/test/trunk/unit/src/main/org/jboss/unit/report/impl/junit= /JUnitReporter.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/report/impl/junit/JUnit= Reporter.java 2007-10-21 15:33:41 UTC (rev 8730) +++ modules/test/trunk/unit/src/main/org/jboss/unit/report/impl/junit/JUnit= Reporter.java 2007-10-22 10:25:33 UTC (rev 8731) @@ -76,7 +76,7 @@ if (event instanceof StartRunnerEvent) { report.startJUnitTestSuite((StartRunnerEvent) event); - view =3D SystemOutputManager.getInstance().createView(); + view =3D SystemOutputManager.getInstance().createView(false); } else if (event instanceof EndRunnerEvent) { Added: modules/test/trunk/unit/src/main/org/jboss/unit/report/impl/junit/JU= nitTestsuiteReport.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/report/impl/junit/JUnit= TestsuiteReport.java (rev 0) +++ modules/test/trunk/unit/src/main/org/jboss/unit/report/impl/junit/JUnit= TestsuiteReport.java 2007-10-22 10:25:33 UTC (rev 8731) @@ -0,0 +1,382 @@ +/*************************************************************************= ***** + * JBoss, a division of Red Hat = * + * Copyright 2006, Red Hat Middleware, LLC, and individual = * + * contributors as indicated by the @authors tag. See the = * + * copyright.txt in the distribution for a full listing of = * + * individual contributors. = * + * = * + * This is free software; you can redistribute it and/or modify it = * + * under the terms of the GNU Lesser General Public License as = * + * published by the Free Software Foundation; either version 2.1 of = * + * the License, or (at your option) any later version. = * + * = * + * This software is distributed in the hope that it will be useful, = * + * but WITHOUT ANY WARRANTY; without even the implied warranty of = * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU = * + * Lesser General Public License for more details. = * + * = * + * You should have received a copy of the GNU Lesser General Public = * + * License along with this software; if not, write to the Free = * + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA = * + * 02110-1301 USA, or see the FSF site: http://www.fsf.org. = * + *************************************************************************= *****/ +package org.jboss.unit.report.impl.junit; + +import org.jboss.unit.Failure; +import org.jboss.unit.FailureType; +import org.jboss.unit.TestId; +import org.jboss.unit.runner.TestResult; +import org.jboss.unit.runner.results.TestFailure; +import org.w3c.dom.Document; +import org.w3c.dom.Element; +import org.w3c.dom.Node; + +import javax.xml.parsers.DocumentBuilderFactory; +import javax.xml.parsers.ParserConfigurationException; +import javax.xml.transform.OutputKeys; +import javax.xml.transform.Result; +import javax.xml.transform.Source; +import javax.xml.transform.Transformer; +import javax.xml.transform.TransformerException; +import javax.xml.transform.TransformerFactory; +import javax.xml.transform.dom.DOMSource; +import javax.xml.transform.stream.StreamResult; +import javax.xml.transform.stream.StreamSource; +import java.io.ByteArrayOutputStream; +import java.io.File; +import java.io.IOException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.PrintWriter; +import java.io.StringWriter; +import java.io.Writer; +import java.net.InetAddress; +import java.net.UnknownHostException; +import java.text.NumberFormat; +import java.text.SimpleDateFormat; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * @author Emanuel Muckenhuber + * @version $Revision$ + */ +public class JUnitTestsuiteReport extends AbstractJUnitReport +{ + + /** */ + public static final String TEST_FILE_NAME_PREFIX =3D "TEST-"; + + /** The formatter for timestamps.*/ + private static final SimpleDateFormat TIMESTAMP_FORMAT =3D new SimpleDa= teFormat("yyyy-MM-dd'T'HH:mm:ss"); + + /** The formatter for durations.*/ + private static final NumberFormat DURATION_FORMAT =3D NumberFormat.getI= nstance(); + + /** The document */ + private Document testsuitesDocument; + + /** The root element */ + private Element testsuitesElement; + + /** . */ + private Map> testSuiteListMap =3D new HashMap<= TestSuite, List>(); + + /** . */ + private File htmlReportDir; + + /** . */ + private File xmlReportDir; + + /** . */ + private Map fileNameCounters =3D new HashMap(); + + public JUnitTestsuiteReport(File xmlReportDir, File htmlReportDir) + { + this.xmlReportDir =3D xmlReportDir; + this.htmlReportDir =3D htmlReportDir; + } + + protected void startRunner() + { + testsuitesDocument =3D createDocument(); + testsuitesElement =3D testsuitesDocument.createElement(XMLConstants.= TESTSUITES); + } + + protected void endRunner() + { + if (htmlReportDir !=3D null) + { + try + { + InputStream xslIn =3D getClass().getResourceAsStream("/org/jbo= ss/unit/report/impl/junit/junit-frames.xsl"); + Source xmlSource =3D new DOMSource(testsuitesElement); + Source xslSource =3D new StreamSource(xslIn); + TransformerFactory transFact =3D TransformerFactory.newInstanc= e(); + Transformer trans =3D transFact.newTransformer(xslSource); + OutputStream os =3D new ByteArrayOutputStream(); + Result result =3D new StreamResult(os); + trans.setParameter("output.dir", htmlReportDir.getAbsolutePath= ()); + trans.transform(xmlSource, result); + } + catch (TransformerException e) + { + e.printStackTrace(); + } + + // + File tmp =3D new File(htmlReportDir, "TESTS-TestSuites.xml"); + dump(testsuitesElement, tmp); + } + } + + protected void runnerFailure(TestSuite testSuite, Failure failure) + { + Element errorElt =3D testsuitesDocument.createElement(XMLConstants.E= RROR); + errorElt.setAttribute(XMLConstants.ATTR_TYPE, failure.getType().name= ()); + errorElt.setAttribute(XMLConstants.ATTR_MESSAGE, failure.getMessage(= )); + errorElt.appendChild(testsuitesDocument.createCDATASection(stackToSt= ring(failure.getStackTrace()))); + + // + testSuiteListMap.get(testSuite).add(errorElt); + } + + protected void startTestSuite(TestSuite testSuite) + { + List elements =3D new ArrayList(); + testSuiteListMap.put(testSuite, elements); + } + + protected void endTestSuite(TestSuite testSuite) + { + StringBuffer fqn =3D testSuite.getFQN(); + + List elements =3D testSuiteListMap.remove(testSuite); + + // + if( testSuite.startedTests.size() > 0 ) + { + for(TestId id : testSuite.startedTests.keySet()) + { + Element errorNotEnded =3D testsuitesDocument.createElement(XML= Constants.ERROR); + errorNotEnded.setAttribute(XMLConstants.ATTR_MESSAGE, "Testcas= e: " + id + " was not ended properly. (No EndTestEvent)"); + elements.add(errorNotEnded); + } + } + + // + int pos =3D fqn.lastIndexOf("."); + String packageName =3D (pos =3D=3D -1) ? "" : fqn.substring(0, pos); + String className =3D (pos =3D=3D -1) ? fqn.toString() : fqn.substrin= g(pos + 1); + + // + StringWriter out =3D new StringWriter(); + StringWriter err =3D new StringWriter(); + try + { + testSuite.view.writeTo(out, err); + } + catch (IOException e) + { + e.printStackTrace(); + } + + Element systemError =3D testsuitesDocument.createElement(XMLConstant= s.SYSTEM_ERR); + systemError.appendChild(testsuitesDocument.createCDATASection(err.to= String())); + Element systemOutElement =3D testsuitesDocument.createElement(XMLCon= stants.SYSTEM_OUT); + systemOutElement.appendChild(testsuitesDocument.createCDATASection(o= ut.toString())); + + // + Element testSuiteElt =3D testsuitesDocument.createElement(XMLConstan= ts.TESTSUITE); + + // + testSuiteElt.setAttribute(XMLConstants.TIMESTAMP, createTimestamp()); + testSuiteElt.setAttribute(XMLConstants.HOSTNAME, getHostName()); + testSuiteElt.setAttribute(XMLConstants.ATTR_PACKAGE, packageName); + testSuiteElt.setAttribute(XMLConstants.ATTR_NAME, className); + testSuiteElt.setAttribute(XMLConstants.ATTR_TESTS, Integer.toString(= testSuite.tests)); + testSuiteElt.setAttribute(XMLConstants.ATTR_ERRORS, Integer.toString= (testSuite.errors)); + testSuiteElt.setAttribute(XMLConstants.ATTR_FAILURES, Integer.toStri= ng(testSuite.failed)); + testSuiteElt.setAttribute(XMLConstants.ATTR_TIME, DURATION_FORMAT.fo= rmat(testSuite.durationMillis / 1000.0)); + + // + for (Element elt : elements) + { + testSuiteElt.appendChild(elt); + } + + // + testSuiteElt.appendChild(testsuitesDocument.createElement(XMLConstan= ts.PROPERTIES)); + testSuiteElt.appendChild(systemError); + testSuiteElt.appendChild(systemOutElement); + + // + if (xmlReportDir !=3D null) + { + Document tmp =3D createDocument(); + Element copy =3D (Element)tmp.importNode(testSuiteElt, true); + tmp.appendChild(copy); + String a =3D copy.getAttribute("package"); + String b =3D copy.getAttribute("name"); + String c =3D a.length() =3D=3D 0 ? b : a + "." + b; + copy.setAttribute("name", c); + copy.removeAttribute("package"); + try + { + Integer counter =3D fileNameCounters.get(c); + if (counter =3D=3D null) + { + counter =3D 0; + } + else + { + counter =3D counter + 1; + } + fileNameCounters.put(c, counter); + File f =3D new File(xmlReportDir, TEST_FILE_NAME_PREFIX + c + = (counter =3D=3D 0 ? "" : "_" + counter) + ".xml"); + if (!f.exists()) + { + f.createNewFile(); + } + dump(tmp, f); + } + catch (IOException e) + { + e.printStackTrace(); + } + } + + // + testsuitesElement.appendChild(testSuiteElt); + } + + private void dump(Node node, File dest) + { + try + { + Source source =3D new DOMSource(node); + Transformer xtrans =3D TransformerFactory.newInstance().newTransf= ormer(); + xtrans.setOutputProperty(OutputKeys.INDENT, "yes"); + xtrans.setOutputProperty(OutputKeys.METHOD, "xml"); + xtrans.setOutputProperty(OutputKeys.STANDALONE, "yes"); + Result result =3D new StreamResult(dest); + xtrans.transform(source, result); + } + catch (TransformerException e) + { + e.printStackTrace(); + } + } + + protected void endTestCase(TestSuite testSuite, String testName, TestRe= sult result) + { + Element test =3D testsuitesDocument.createElement(XMLConstants.TESTC= ASE); + test.setAttribute(XMLConstants.ATTR_CLASSNAME, testSuite.getFQN().to= String()); + test.setAttribute(XMLConstants.ATTR_NAME, testName); + test.setAttribute(XMLConstants.ATTR_TIME, DURATION_FORMAT.format(res= ult.getDurationMillis() / 1000.0)); + + /** If testcase failed */ + if (result instanceof TestFailure) + { + TestFailure testFailure =3D (TestFailure) result; + Failure failure =3D testFailure.getFailure(); + + String failureType; + // Check failure type (failed, error) + if(FailureType.ASSERTION =3D=3D failure.getType()) + { + testSuite.failed++; + failureType =3D XMLConstants.FAILURE; + } + else + { + testSuite.errors++; + failureType =3D XMLConstants.ERROR; + } + + test.appendChild(addError(failureType, failure.getStackTrace())); + } + + // + testSuiteListMap.get(testSuite).add(test); + + + // +// if (info !=3D null) +// { +// +// +// } +// else +// { +// // If test is not started - add error message +// Element errorNotStarted =3D document.createElement(XMLConstants= .ERROR); +// errorNotStarted.setAttribute(XMLConstants.ATTR_MESSAGE, "TestCa= se: " + testId + " was not started properly. (No StartTestEvent)"); +// test.appendChild(errorNotStarted); +// } + } + + + private Element addError(String type, Throwable t) + { + Element error =3D testsuitesDocument.createElement(type); + + // Testcase error message + error.setAttribute(XMLConstants.ATTR_MESSAGE, t.getMessage()); + + // Testcase error type + error.setAttribute(XMLConstants.ATTR_TYPE, t.getClass().getName()); + + // Testcase stacktrace + error.appendChild(testsuitesDocument.createCDATASection(stackToStrin= g(t))); + + // + return error; + } + + private static String stackToString(Throwable t) + { + Writer writer =3D new StringWriter(); + PrintWriter printWriter =3D new PrintWriter(writer); + t.printStackTrace(printWriter); + printWriter.close(); + return writer.toString(); + } + + /** + * Generates a new timestamp string. + * + * @return a newly create timestamp string + */ + private static String createTimestamp() + { + return TIMESTAMP_FORMAT.format(new Date()); + } + + private static String getHostName() + { + try + { + return InetAddress.getLocalHost().getHostName(); + } + catch(UnknownHostException e) + { + return "localhost"; + } + } + + private static Document createDocument() + { + try + { + return DocumentBuilderFactory.newInstance().newDocumentBuilder().= newDocument(); + } + catch(ParserConfigurationException e) + { + throw new Error(e); + } + } +} \ No newline at end of file Added: modules/test/trunk/unit/src/main/org/jboss/unit/report/impl/junit/St= ringUtils.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/report/impl/junit/Strin= gUtils.java (rev 0) +++ modules/test/trunk/unit/src/main/org/jboss/unit/report/impl/junit/Strin= gUtils.java 2007-10-22 10:25:33 UTC (rev 8731) @@ -0,0 +1,35 @@ +/*************************************************************************= ***** + * JBoss, a division of Red Hat = * + * Copyright 2006, Red Hat Middleware, LLC, and individual = * + * contributors as indicated by the @authors tag. See the = * + * copyright.txt in the distribution for a full listing of = * + * individual contributors. = * + * = * + * This is free software; you can redistribute it and/or modify it = * + * under the terms of the GNU Lesser General Public License as = * + * published by the Free Software Foundation; either version 2.1 of = * + * the License, or (at your option) any later version. = * + * = * + * This software is distributed in the hope that it will be useful, = * + * but WITHOUT ANY WARRANTY; without even the implied warranty of = * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU = * + * Lesser General Public License for more details. = * + * = * + * You should have received a copy of the GNU Lesser General Public = * + * License along with this software; if not, write to the Free = * + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA = * + * 02110-1301 USA, or see the FSF site: http://www.fsf.org. = * + *************************************************************************= *****/ +package org.jboss.unit.report.impl.junit; + +/** + * @author Julien Viet + * @version $Revision: 1.1 $ + */ +public class StringUtils +{ + public static String replace(String data, String from, String to) + { + return data.replace(from, to); + } +} Modified: modules/test/trunk/unit/src/main/org/jboss/unit/tooling/ByteArray= OutputStreamExt.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/tooling/ByteArrayOutput= StreamExt.java 2007-10-21 15:33:41 UTC (rev 8730) +++ modules/test/trunk/unit/src/main/org/jboss/unit/tooling/ByteArrayOutput= StreamExt.java 2007-10-22 10:25:33 UTC (rev 8731) @@ -42,7 +42,7 @@ = public int writeTo(Writer out, int from) throws IOException, ArrayIndex= OutOfBoundsException { - String s =3D new String(buf, from, count); + String s =3D new String(buf, from, count - from); out.write(s); return count; } Modified: modules/test/trunk/unit/src/main/org/jboss/unit/tooling/Main.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/tooling/Main.java 2007-= 10-21 15:33:41 UTC (rev 8730) +++ modules/test/trunk/unit/src/main/org/jboss/unit/tooling/Main.java 2007-= 10-22 10:25:33 UTC (rev 8731) @@ -165,11 +165,9 @@ this.parameters =3D parameters; } = - private SystemOutputManager systemManager; - public void execute() throws Exception { - systemManager =3D new SystemOutputManager(); + SystemOutputManager systemManager =3D new SystemOutputManager(); systemManager.start(); = // Modified: modules/test/trunk/unit/src/main/org/jboss/unit/tooling/MainBuild= er.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/tooling/MainBuilder.jav= a 2007-10-21 15:33:41 UTC (rev 8730) +++ modules/test/trunk/unit/src/main/org/jboss/unit/tooling/MainBuilder.jav= a 2007-10-22 10:25:33 UTC (rev 8731) @@ -23,6 +23,7 @@ package org.jboss.unit.tooling; = import org.jboss.unit.report.impl.junit.JUnitReporter; +import org.jboss.unit.report.impl.junit.JUnitTestsuiteReport; import org.jboss.unit.runner.TestRunner; import org.jboss.unit.runner.TestRunnerEventListener; import org.jboss.unit.runner.impl.NullFilter; @@ -32,7 +33,6 @@ import org.jboss.unit.tooling.filter.ExcludeTestFilter; import org.jboss.unit.tooling.filter.IncludeTestFilter; import org.jboss.unit.tooling.filter.MainTestFilter; -import org.jboss.unit.tooling.report.DelegatingReporter; import org.xml.sax.InputSource; = import java.io.File; @@ -40,10 +40,10 @@ import java.io.InputStream; import java.util.HashMap; import java.util.HashSet; +import java.util.LinkedList; import java.util.List; import java.util.Map; import java.util.Set; -import java.util.LinkedList; = /** * @author Boleslaw Dawidowicz @@ -499,32 +499,20 @@ = //add PrintListener by default = - DelegatingReporter reporter =3D new DelegatingReporter(noConsole); - + // + File htmlReportFile =3D null; + if (htmlReportDir !=3D null) + { + htmlReportFile =3D checkCreateOutputDirectory(htmlReportDir); + } + File xmlReportFile =3D null; if (xmlReportDir !=3D null) { - - //XML Output directory must exists - checkCreateOutputDirectory(xmlReportDir); - - JUnitReporter xmlReporter =3D null; - if (getSuiteName() !=3D null) - { - xmlReporter =3D new JUnitReporter(xmlReportDir, getSuiteName()= ); - } - else - { - xmlReporter =3D new JUnitReporter(xmlReportDir); - } - - reporter.setXmlReporter(xmlReporter); + xmlReportFile =3D checkCreateOutputDirectory(xmlReportDir); } + JUnitTestsuiteReport fileReporter =3D new JUnitTestsuiteReport(xmlRe= portFile, htmlReportFile); + broadcaster.addListener(fileReporter); = - broadcaster.addListener(reporter); - - - - MainTestFilter filter =3D new MainTestFilter(); = if (keywords.size() =3D=3D 0 && names.size() =3D=3D 0 && namePattern= s.size() =3D=3D 0) @@ -545,22 +533,18 @@ filter.addExcludeFilter(new ExcludeTestFilter(excludeKeywords, ex= cludeNames, excludeNamePatterns)); } = - return new Main(runner, filter, broadcaster, suite, properties, getP= arameters()); } = - public static void checkCreateOutputDirectory(String dir) throws Except= ion + public static File checkCreateOutputDirectory(String dir) throws Except= ion { - File output =3D null; - = try { - output =3D new File(dir); + File output =3D new File(dir); = - //Check if the dir exits and if not create it + // heck if the dir exits and if not create it if (!output.exists()) { - output.mkdirs(); } else @@ -571,15 +555,13 @@ } } = + // + return output; } catch (Exception e) { throw new IllegalStateException("Failed to use provided output di= rectory: '" + dir + "'", e); } - = } - - - } = Modified: modules/test/trunk/unit/src/main/org/jboss/unit/tooling/SystemOut= putManager.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/tooling/SystemOutputMan= ager.java 2007-10-21 15:33:41 UTC (rev 8730) +++ modules/test/trunk/unit/src/main/org/jboss/unit/tooling/SystemOutputMan= ager.java 2007-10-22 10:25:33 UTC (rev 8731) @@ -56,9 +56,9 @@ return instance; } = - public SystemOutputView createView() + public SystemOutputView createView(boolean fullHistory) { - return new SystemOutputView(baosOut, baosErr); + return new SystemOutputView(baosOut, baosErr, fullHistory); } = public void start() Modified: modules/test/trunk/unit/src/main/org/jboss/unit/tooling/SystemOut= putView.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/tooling/SystemOutputVie= w.java 2007-10-21 15:33:41 UTC (rev 8730) +++ modules/test/trunk/unit/src/main/org/jboss/unit/tooling/SystemOutputVie= w.java 2007-10-22 10:25:33 UTC (rev 8731) @@ -45,12 +45,12 @@ /** . */ private int errCount; = - public SystemOutputView(ByteArrayOutputStreamExt out, ByteArrayOutputSt= reamExt err) + public SystemOutputView(ByteArrayOutputStreamExt out, ByteArrayOutputSt= reamExt err, boolean fullHistory) { this.out =3D out; this.err =3D err; - this.outCount =3D 0; - this.errCount =3D 0; + this.outCount =3D fullHistory ? 0 : out.size(); + this.errCount =3D fullHistory ? 0 : err.size(); } = public void writeTo(OutputStream toOut, OutputStream toErr) throws IOEx= ception Added: modules/test/trunk/unit/src/resources/jboss-unit-jar/org/jboss/unit/= report/impl/junit/junit-frames.xsl =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/resources/jboss-unit-jar/org/jboss/unit/rep= ort/impl/junit/junit-frames.xsl (rev 0) +++ modules/test/trunk/unit/src/resources/jboss-unit-jar/org/jboss/unit/rep= ort/impl/junit/junit-frames.xsl 2007-10-22 10:25:33 UTC (rev 8731) @@ -0,0 +1,712 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + . + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Unit Test Results. + + + + + + + + + <h2>Frame Alert</h2> + <p> + This document is designed to be viewed using the frames fe= ature. If you see this message, you are using a non-frame-capable web clien= t. + </p> + + + + + + + +body { + font:normal 68% verdana,arial,helvetica; + color:#000000; +} +table tr td, table tr th { + font-size: 68%; +} +table.details tr th{ + font-weight: bold; + text-align:left; + background:#a6caf0; +} +table.details tr td{ + background:#eeeee0; +} + +p { + line-height:1.5em; + margin-top:0.5em; margin-bottom:1.0em; +} +h1 { + margin: 0px 0px 5px; font: 165% verdana,arial,helvetica +} +h2 { + margin-top: 1em; margin-bottom: 0.5em; font: bold 125% verdana,arial,h= elvetica +} +h3 { + margin-bottom: 0.5em; font: bold 115% verdana,arial,helvetica +} +h4 { + margin-bottom: 0.5em; font: bold 100% verdana,arial,helvetica +} +h5 { + margin-bottom: 0.5em; font: bold 100% verdana,arial,helvetica +} +h6 { + margin-bottom: 0.5em; font: bold 100% verdana,arial,helvetica +} +.Error { + font-weight:bold; color:red; +} +.Failure { + font-weight:bold; color:purple; +} +.Properties { + text-align:right; +} + + + + + + + . + + + Unit Test Results: <xsl:value-of select=3D"$class.name"/>= + + + + + + + + +

Class

+ + + + + +
+ +

Tests

+ + + + + + + + + +
+ + + + + + + + + +
+ + + + cur =3D TestCases['.'] =3D new Array(); + + + cur[''] =3D ''; + + + + + + + + + + + Unit Test Classes: <xsl:value-of select=3D"$name"/></ti= tle> + <xsl:call-template name=3D"create.stylesheet.link"> + <xsl:with-param name=3D"package.name" select=3D"$name"/> + </xsl:call-template> + </head> + <body> + <table width=3D"100%"> + <tr> + <td nowrap=3D"nowrap"> + <h2><a href=3D"package-summary.html" target=3D"cla= ssFrame"> + <xsl:value-of select=3D"$name"/> + <xsl:if test=3D"$name =3D ''"><none></xs= l:if> + </a></h2> + </td> + </tr> + </table> + + <h2>Classes</h2> + <table width=3D"100%"> + <xsl:for-each select=3D"/testsuites/testsuite[./@package = =3D $name]"> + <xsl:sort select=3D"@name"/> + <tr> + <td nowrap=3D"nowrap"> + <a href=3D"{@id}_{@name}.html" target=3D"class= Frame"><xsl:value-of select=3D"@name"/></a> + </td> + </tr> + </xsl:for-each> + </table> + </body> + </html> +</xsl:template> + + +<!-- + Creates an all-classes.html file that contains a link to all package-s= ummary.html + on each class. +--> +<xsl:template match=3D"testsuites" mode=3D"all.classes"> + <html> + <head> + <title>All Unit Test Classes + + + + + +

Classes

+ + + + +
+ + +
+ + + + + + + + + / + _.html + + + + + + + + + + + + + All Unit Test Packages + + + + + +

Ho= me

+

Packages

+ + + + +
+ + +
+ + + + + + + <none> + + + + + + + + + + Unit Test Results: Summary + + + + + + open('allclasses-frame.html','class= ListFrame') + +

Summary

+ + + + + + + + + + + + + + + + + Error + Failure + Pass + + + + + + + + + +
TestsFailuresErrorsSuccess rateTime
+ + + + + + + +
+ + + + +
+ Note: failures are anticipated and checked for with asser= tions while errors are unanticipated. +
+ +

Packages

+ + + + + + + + + + + Error + Failure + Pass + + + + + + + + + +
+ + <none> + + + + +
+ + +
+ + + + + + + + + + + + open('package-frame.html','clas= sListFrame') + +

Package

+ + + + + +

Classes

+

+ + + + + +
+

+
+ + +
+ + + + + + + ../ + + + + + + ../ + + + + + + + + stylesheet.css<= /link> + + + + + +

Unit Test Results

+ + + + + +
Designed for use with JUnit and Ant.
+
+
+ + + + + Name + Tests + Errors + Failures + Time(s) + + + + + + + Name + Status + Type + Time(s) + + + + + + + + + + Error + Failure + Pass + + + + + + + + + + + + + + + + + + Error + Failure + TableRowColor + + + + + + Failure + + + + Error + + + + Success + + + + + + + + + + + + + + + + + + + + + + + + + N/A + + + + + +

+ + + + + + + +
+ + + + + + + + + + + + +
+ +
+ + + + + + + + + + +
+ --===============4246310818674059616==-- From portal-commits at lists.jboss.org Mon Oct 22 09:09:17 2007 Content-Type: multipart/mixed; boundary="===============7617503171155139432==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8732 - branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/core/model/portal/metadata. Date: Mon, 22 Oct 2007 09:09:16 -0400 Message-ID: --===============7617503171155139432== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: thomas.heute(a)jboss.com Date: 2007-10-22 09:09:16 -0400 (Mon, 22 Oct 2007) New Revision: 8732 Modified: branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/core/mod= el/portal/metadata/PageMetaData.java branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/core/mod= el/portal/metadata/WindowMetaData.java Log: JBPORTAL-1300: Let the user define an initial window-state and mode on a wi= ndow by specifying something lie: maximized edit Modified: branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/c= ore/model/portal/metadata/PageMetaData.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/core/mo= del/portal/metadata/PageMetaData.java 2007-10-22 10:25:33 UTC (rev 8731) +++ branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/core/mo= del/portal/metadata/PageMetaData.java 2007-10-22 13:09:16 UTC (rev 8732) @@ -22,21 +22,28 @@ *************************************************************************= *****/ package org.jboss.portal.core.model.portal.metadata; = +import java.util.ArrayList; +import java.util.Collection; +import java.util.Iterator; +import java.util.List; + +import org.jboss.logging.Logger; +import org.jboss.portal.WindowState; import org.jboss.portal.common.xml.XMLTools; +import org.jboss.portal.core.model.content.spi.ContentProviderRegistry; import org.jboss.portal.core.model.portal.PageContainer; import org.jboss.portal.core.model.portal.PortalObject; -import org.jboss.portal.core.model.content.spi.ContentProviderRegistry; import org.w3c.dom.Element; = -import java.util.List; - /** * @author Julien Viet + * @author Thoams Heute * @version $Revision$ */ public class PageMetaData extends PortalObjectMetaData { - + private static final Logger logger =3D Logger.getLogger(PageMetaData.cl= ass); + = public PageMetaData() { } @@ -75,6 +82,9 @@ e.printStackTrace(); } } + = + // Log errors if any + checkConstraints(pageMD); = // Add the contained pages List pageElts =3D XMLTools.getChildren(pageElt, "page"); @@ -95,6 +105,48 @@ // return pageMD; } + = + private static boolean checkConstraints(PageMetaData pageMD) + { + // Check that no more than 1 window has been defined as maximized + Collection values =3D pageMD.getChildren().values(); + List maximizedWindows =3D new ArrayList(); + if (values !=3D null) + { + Iterator it =3D values.iterator(); + while (it.hasNext()) + { + PortalObjectMetaData poMetaData =3D(PortalObjectMetaData)it.ne= xt(); + if (poMetaData instanceof WindowMetaData) + { + WindowMetaData windowMetaData =3D (WindowMetaData)poMetaDat= a; + if (WindowState.MAXIMIZED.toString().equals(windowMetaData.= getInitialWindowState())) + { + maximizedWindows.add(windowMetaData); + if (maximizedWindows.size() > 1) + { + logger.debug("Set initial window state to NORMAL for = window '" + windowMetaData + "'"); + windowMetaData.setInitialWindowState(WindowState.NORM= AL.toString()); + } + } + } + } + } + if (maximizedWindows.size() > 1) + { + StringBuffer windowsList =3D new StringBuffer(); + Iterator it =3D maximizedWindows.iterator(); + while (it.hasNext()) + { + WindowMetaData windowMD =3D (WindowMetaData)it.next(); + windowsList.append(windowMD.toString() + "\n"); + } + logger.error("More than one window is defined as maximized for pa= ge '" + pageMD.getName() + "'. The following windows" + + " have been defined as maximized:\n" + windowsList); + return false; + } + return true; + } = public String toString() { Modified: branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/c= ore/model/portal/metadata/WindowMetaData.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/core/mo= del/portal/metadata/WindowMetaData.java 2007-10-22 10:25:33 UTC (rev 8731) +++ branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/core/mo= del/portal/metadata/WindowMetaData.java 2007-10-22 13:09:16 UTC (rev 8732) @@ -22,6 +22,9 @@ *************************************************************************= *****/ package org.jboss.portal.core.model.portal.metadata; = +import org.jboss.logging.Logger; +import org.jboss.portal.WindowState; +import org.jboss.portal.core.impl.model.portal.WindowImpl; import org.jboss.portal.core.model.portal.Page; import org.jboss.portal.core.model.portal.PortalObject; import org.jboss.portal.core.model.portal.Window; @@ -37,13 +40,21 @@ */ public class WindowMetaData extends PortalObjectMetaData { - + = + private static final Logger logger =3D Logger.getLogger(WindowMetaData.= class); + = /** The window region. */ protected String region; = /** The window order. */ protected int order; = + /** The initial window state. */ + protected String initialWindowState; + + /** The initial window state. */ + protected String initialMode; + /** The window content. */ protected ContentMetaData content; = @@ -89,7 +100,27 @@ { this.contentType =3D contentType; } + = + public String getInitialWindowState() + { + return initialWindowState; + } + = + public void setInitialWindowState(String initialWindowState) + { + this.initialWindowState =3D initialWindowState; + } = + public String getInitialMode() + { + return initialMode; + } + = + public void setInitialMode(String initialMode) + { + this.initialMode =3D initialMode; + } + protected PortalObject newInstance(BuildContext buildContext, PortalObj= ect parent) throws Exception { if (!(parent instanceof Page)) @@ -103,7 +134,15 @@ // window.setDeclaredProperty(ThemeConstants.PORTAL_PROP_REGION, region= ); window.setDeclaredProperty(ThemeConstants.PORTAL_PROP_ORDER, "" + or= der); - + if (initialWindowState !=3D null) + { + window.setDeclaredProperty(WindowImpl.PORTAL_INITIAL_WINDOW_STATE= , "" + initialWindowState); + } + if (initialMode !=3D null) + { + window.setDeclaredProperty(WindowImpl.PORTAL_INITIAL_MODE, "" + i= nitialMode); + } + = // return window; } @@ -120,6 +159,31 @@ String region =3D XMLTools.asString(XMLTools.getUniqueChild(windowEl= t, "region", true)); windowMD.setRegion(region); = + // Get initial window state + Element element =3D XMLTools.getUniqueChild(windowElt, "initial-wind= ow-state", false); + if (element !=3D null) + { + String initialWindowState =3D XMLTools.asString(element); + if (initialWindowState.toLowerCase().equals(WindowState.MAXIMIZED= .toString()) + || (initialWindowState.toLowerCase().equals(WindowState.MINIMI= ZED.toString())) + || (initialWindowState.toLowerCase().equals(WindowState.NORMAL= .toString()))) + { + windowMD.setInitialWindowState(initialWindowState); + } + else + { + logger.error("initial-window-state for '" + windowName + "' mu= st be one of 'MAXIMIZED', 'MINIMIZED' or 'NORMAL'"); + } + } + + // Get initial mode + element =3D XMLTools.getUniqueChild(windowElt, "initial-mode", false= ); + if (element !=3D null) + { + String initialMode =3D XMLTools.asString(element); + windowMD.setInitialMode(initialMode); + } + // int height =3D Integer.parseInt(XMLTools.asString(XMLTools.getUnique= Child(windowElt, "height", true))); windowMD.setOrder(height); --===============7617503171155139432==-- From portal-commits at lists.jboss.org Mon Oct 22 09:11:06 2007 Content-Type: multipart/mixed; boundary="===============5834296088419319774==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8733 - branches/JBoss_Portal_Branch_2_6/core/src/resources/portal-core-sar/dtd. Date: Mon, 22 Oct 2007 09:11:06 -0400 Message-ID: --===============5834296088419319774== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: thomas.heute(a)jboss.com Date: 2007-10-22 09:11:05 -0400 (Mon, 22 Oct 2007) New Revision: 8733 Modified: branches/JBoss_Portal_Branch_2_6/core/src/resources/portal-core-sar/dtd/= portal-object_2_6.dtd Log: JBPORTAL-1300: Modified DTD Modified: branches/JBoss_Portal_Branch_2_6/core/src/resources/portal-core-s= ar/dtd/portal-object_2_6.dtd =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/core/src/resources/portal-core-sar/dtd= /portal-object_2_6.dtd 2007-10-22 13:09:16 UTC (rev 8732) +++ branches/JBoss_Portal_Branch_2_6/core/src/resources/portal-core-sar/dtd= /portal-object_2_6.dtd 2007-10-22 13:11:05 UTC (rev 8733) @@ -176,7 +176,7 @@ = The region and height defines how the window is placed in the page. --> - + = + + + + + + --===============5834296088419319774==-- From portal-commits at lists.jboss.org Mon Oct 22 09:22:15 2007 Content-Type: multipart/mixed; boundary="===============3642407908614955036==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8734 - modules/test/trunk/unit/src/main/org/jboss/unit/report/impl/junit. Date: Mon, 22 Oct 2007 09:22:14 -0400 Message-ID: --===============3642407908614955036== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: julien(a)jboss.com Date: 2007-10-22 09:22:14 -0400 (Mon, 22 Oct 2007) New Revision: 8734 Modified: modules/test/trunk/unit/src/main/org/jboss/unit/report/impl/junit/Abstra= ctJUnitReport.java modules/test/trunk/unit/src/main/org/jboss/unit/report/impl/junit/JUnitT= estsuiteReport.java Log: implemented aggregation of same testsuite in junit reporter Modified: modules/test/trunk/unit/src/main/org/jboss/unit/report/impl/junit= /AbstractJUnitReport.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/report/impl/junit/Abstr= actJUnitReport.java 2007-10-22 13:11:05 UTC (rev 8733) +++ modules/test/trunk/unit/src/main/org/jboss/unit/report/impl/junit/Abstr= actJUnitReport.java 2007-10-22 13:22:14 UTC (rev 8734) @@ -207,7 +207,7 @@ int errors; = /** The failed count */ - int failed; + int failures; = /** The started Tests */ Map startedTests =3D new HashMap= (); Modified: modules/test/trunk/unit/src/main/org/jboss/unit/report/impl/junit= /JUnitTestsuiteReport.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/report/impl/junit/JUnit= TestsuiteReport.java 2007-10-22 13:11:05 UTC (rev 8733) +++ modules/test/trunk/unit/src/main/org/jboss/unit/report/impl/junit/JUnit= TestsuiteReport.java 2007-10-22 13:22:14 UTC (rev 8734) @@ -79,20 +79,14 @@ /** The document */ private Document testsuitesDocument; = - /** The root element */ - private Element testsuitesElement; - /** . */ - private Map> testSuiteListMap =3D new HashMap<= TestSuite, List>(); - - /** . */ private File htmlReportDir; = /** . */ private File xmlReportDir; = /** . */ - private Map fileNameCounters =3D new HashMap(); + private Map reportMap =3D new HashMap(); = public JUnitTestsuiteReport(File xmlReportDir, File htmlReportDir) { @@ -103,11 +97,75 @@ protected void startRunner() { testsuitesDocument =3D createDocument(); - testsuitesElement =3D testsuitesDocument.createElement(XMLConstants.= TESTSUITES); } = protected void endRunner() { + Element testsuitesElement =3D testsuitesDocument.createElement(XMLCo= nstants.TESTSUITES); + testsuitesDocument.appendChild(testsuitesElement); + + // + for (Map.Entry entry : reportMap.entr= ySet()) + { + TestSuiteReport report =3D entry.getValue(); + + report.elements.add(testsuitesDocument.createElement(XMLConstants= .PROPERTIES)); + Element systemError =3D testsuitesDocument.createElement(XMLConst= ants.SYSTEM_ERR); + systemError.appendChild(testsuitesDocument.createCDATASection(rep= ort.err.toString())); + report.elements.add(systemError); + Element systemOutElement =3D testsuitesDocument.createElement(XML= Constants.SYSTEM_OUT); + systemOutElement.appendChild(testsuitesDocument.createCDATASectio= n(report.out.toString())); + report.elements.add(systemOutElement); + + // + Element testSuiteElt =3D testsuitesDocument.createElement(XMLCons= tants.TESTSUITE); + + // + testSuiteElt.setAttribute(XMLConstants.HOSTNAME, getHostName()); + testSuiteElt.setAttribute(XMLConstants.ATTR_PACKAGE, entry.getKey= ().packageName); + testSuiteElt.setAttribute(XMLConstants.ATTR_NAME, entry.getKey().= className); + testSuiteElt.setAttribute(XMLConstants.ATTR_TESTS, Integer.toStri= ng(report.tests)); + testSuiteElt.setAttribute(XMLConstants.ATTR_ERRORS, Integer.toStr= ing(report.errors)); + testSuiteElt.setAttribute(XMLConstants.ATTR_FAILURES, Integer.toS= tring(report.failures)); + testSuiteElt.setAttribute(XMLConstants.ATTR_TIME, DURATION_FORMAT= .format(report.durationMillis / 1000.0)); + + // + for (Element elt : report.elements) + { + testSuiteElt.appendChild(elt); + } + + // + if (xmlReportDir !=3D null) + { + Document tmp =3D createDocument(); + Element copy =3D (Element)tmp.importNode(testSuiteElt, true); + tmp.appendChild(copy); + String a =3D copy.getAttribute("package"); + String b =3D copy.getAttribute("name"); + String c =3D a.length() =3D=3D 0 ? b : a + "." + b; + copy.setAttribute("name", c); + copy.removeAttribute("package"); + try + { + File f =3D new File(xmlReportDir, TEST_FILE_NAME_PREFIX + c= + ".xml"); + if (!f.exists()) + { + f.createNewFile(); + } + dump(tmp, f); + } + catch (IOException e) + { + e.printStackTrace(); + } + } + + // + testsuitesElement.appendChild(testSuiteElt); + } + + // if (htmlReportDir !=3D null) { try @@ -141,21 +199,29 @@ errorElt.appendChild(testsuitesDocument.createCDATASection(stackToSt= ring(failure.getStackTrace()))); = // - testSuiteListMap.get(testSuite).add(errorElt); + get(testSuite).elements.add(errorElt); } = protected void startTestSuite(TestSuite testSuite) { - List elements =3D new ArrayList(); - testSuiteListMap.put(testSuite, elements); } = + private TestSuiteReport get(TestSuite testSuite) + { + TestSuiteKey key =3D new TestSuiteKey(testSuite); + TestSuiteReport report =3D reportMap.get(key); + if (report =3D=3D null) + { + report =3D new TestSuiteReport(); + reportMap.put(key, report); + } + return report; + } + protected void endTestSuite(TestSuite testSuite) { - StringBuffer fqn =3D testSuite.getFQN(); + TestSuiteReport report =3D get(testSuite); = - List elements =3D testSuiteListMap.remove(testSuite); - // if( testSuite.startedTests.size() > 0 ) { @@ -163,94 +229,25 @@ { Element errorNotEnded =3D testsuitesDocument.createElement(XML= Constants.ERROR); errorNotEnded.setAttribute(XMLConstants.ATTR_MESSAGE, "Testcas= e: " + id + " was not ended properly. (No EndTestEvent)"); - elements.add(errorNotEnded); + report.elements.add(errorNotEnded); } } = // - int pos =3D fqn.lastIndexOf("."); - String packageName =3D (pos =3D=3D -1) ? "" : fqn.substring(0, pos); - String className =3D (pos =3D=3D -1) ? fqn.toString() : fqn.substrin= g(pos + 1); - - // - StringWriter out =3D new StringWriter(); - StringWriter err =3D new StringWriter(); try { - testSuite.view.writeTo(out, err); + testSuite.view.writeTo(report.out, report.err); } catch (IOException e) { e.printStackTrace(); } = - Element systemError =3D testsuitesDocument.createElement(XMLConstant= s.SYSTEM_ERR); - systemError.appendChild(testsuitesDocument.createCDATASection(err.to= String())); - Element systemOutElement =3D testsuitesDocument.createElement(XMLCon= stants.SYSTEM_OUT); - systemOutElement.appendChild(testsuitesDocument.createCDATASection(o= ut.toString())); - // - Element testSuiteElt =3D testsuitesDocument.createElement(XMLConstan= ts.TESTSUITE); - - // - testSuiteElt.setAttribute(XMLConstants.TIMESTAMP, createTimestamp()); - testSuiteElt.setAttribute(XMLConstants.HOSTNAME, getHostName()); - testSuiteElt.setAttribute(XMLConstants.ATTR_PACKAGE, packageName); - testSuiteElt.setAttribute(XMLConstants.ATTR_NAME, className); - testSuiteElt.setAttribute(XMLConstants.ATTR_TESTS, Integer.toString(= testSuite.tests)); - testSuiteElt.setAttribute(XMLConstants.ATTR_ERRORS, Integer.toString= (testSuite.errors)); - testSuiteElt.setAttribute(XMLConstants.ATTR_FAILURES, Integer.toStri= ng(testSuite.failed)); - testSuiteElt.setAttribute(XMLConstants.ATTR_TIME, DURATION_FORMAT.fo= rmat(testSuite.durationMillis / 1000.0)); - - // - for (Element elt : elements) - { - testSuiteElt.appendChild(elt); - } - - // - testSuiteElt.appendChild(testsuitesDocument.createElement(XMLConstan= ts.PROPERTIES)); - testSuiteElt.appendChild(systemError); - testSuiteElt.appendChild(systemOutElement); - - // - if (xmlReportDir !=3D null) - { - Document tmp =3D createDocument(); - Element copy =3D (Element)tmp.importNode(testSuiteElt, true); - tmp.appendChild(copy); - String a =3D copy.getAttribute("package"); - String b =3D copy.getAttribute("name"); - String c =3D a.length() =3D=3D 0 ? b : a + "." + b; - copy.setAttribute("name", c); - copy.removeAttribute("package"); - try - { - Integer counter =3D fileNameCounters.get(c); - if (counter =3D=3D null) - { - counter =3D 0; - } - else - { - counter =3D counter + 1; - } - fileNameCounters.put(c, counter); - File f =3D new File(xmlReportDir, TEST_FILE_NAME_PREFIX + c + = (counter =3D=3D 0 ? "" : "_" + counter) + ".xml"); - if (!f.exists()) - { - f.createNewFile(); - } - dump(tmp, f); - } - catch (IOException e) - { - e.printStackTrace(); - } - } - - // - testsuitesElement.appendChild(testSuiteElt); + report.tests +=3D testSuite.tests; + report.failures +=3D testSuite.failures; + report.errors +=3D testSuite.errors; + report.durationMillis +=3D testSuite.durationMillis; } = private void dump(Node node, File dest) @@ -288,7 +285,7 @@ // Check failure type (failed, error) if(FailureType.ASSERTION =3D=3D failure.getType()) { - testSuite.failed++; + testSuite.failures++; failureType =3D XMLConstants.FAILURE; } else @@ -301,7 +298,7 @@ } = // - testSuiteListMap.get(testSuite).add(test); + get(testSuite).elements.add(test); = = // @@ -379,4 +376,82 @@ throw new Error(e); } } + + private static class TestSuiteKey + { + + /** . */ + private final String packageName; + + /** . */ + private final String className; + + private TestSuiteKey(TestSuite testSuite) + { + StringBuffer fqn =3D testSuite.getFQN(); + int pos =3D fqn.lastIndexOf("."); + packageName =3D (pos =3D=3D -1) ? "" : fqn.substring(0, pos); + className =3D (pos =3D=3D -1) ? fqn.toString() : fqn.substring(po= s + 1); + } + + private TestSuiteKey(String packageName, String className) + { + if (packageName =3D=3D null) + { + throw new IllegalArgumentException(); + } + if (className =3D=3D null) + { + throw new IllegalArgumentException(); + } + this.packageName =3D packageName; + this.className =3D className; + } + + public boolean equals(Object o) + { + if (o =3D=3D this) + { + return true; + } + if (o instanceof TestSuiteKey) + { + TestSuiteKey that =3D (TestSuiteKey)o; + return that.packageName.equals(packageName) && that.className.= equals(className); + } + return false; + } + + public int hashCode() + { + return packageName.hashCode() * 41 + className.hashCode(); + } + } + + private static class TestSuiteReport + { + + /** . */ + private final List elements =3D new ArrayList(); + + /** . */ + private final StringWriter out =3D new StringWriter(); + + /** . */ + private final StringWriter err =3D new StringWriter(); + + /** . */ + private int tests; + + /** . */ + private int errors; + + /** . */ + private int failures; + + /** . */ + private long durationMillis; + + } + } \ No newline at end of file --===============3642407908614955036==-- From portal-commits at lists.jboss.org Mon Oct 22 09:31:27 2007 Content-Type: multipart/mixed; boundary="===============6327067413947767876==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8735 - modules/test/trunk/unit/src/main/org/jboss/unit/report/impl/junit. Date: Mon, 22 Oct 2007 09:31:27 -0400 Message-ID: --===============6327067413947767876== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: julien(a)jboss.com Date: 2007-10-22 09:31:27 -0400 (Mon, 22 Oct 2007) New Revision: 8735 Modified: modules/test/trunk/unit/src/main/org/jboss/unit/report/impl/junit/JUnitT= estsuiteReport.java Log: skip empty reports Modified: modules/test/trunk/unit/src/main/org/jboss/unit/report/impl/junit= /JUnitTestsuiteReport.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/report/impl/junit/JUnit= TestsuiteReport.java 2007-10-22 13:22:14 UTC (rev 8734) +++ modules/test/trunk/unit/src/main/org/jboss/unit/report/impl/junit/JUnit= TestsuiteReport.java 2007-10-22 13:31:27 UTC (rev 8735) @@ -109,60 +109,64 @@ { TestSuiteReport report =3D entry.getValue(); = - report.elements.add(testsuitesDocument.createElement(XMLConstants= .PROPERTIES)); - Element systemError =3D testsuitesDocument.createElement(XMLConst= ants.SYSTEM_ERR); - systemError.appendChild(testsuitesDocument.createCDATASection(rep= ort.err.toString())); - report.elements.add(systemError); - Element systemOutElement =3D testsuitesDocument.createElement(XML= Constants.SYSTEM_OUT); - systemOutElement.appendChild(testsuitesDocument.createCDATASectio= n(report.out.toString())); - report.elements.add(systemOutElement); + // We filter and keep only meaningful results + if (report.elements.size() > 0) + { + report.elements.add(testsuitesDocument.createElement(XMLConsta= nts.PROPERTIES)); + Element systemError =3D testsuitesDocument.createElement(XMLCo= nstants.SYSTEM_ERR); + systemError.appendChild(testsuitesDocument.createCDATASection(= report.err.toString())); + report.elements.add(systemError); + Element systemOutElement =3D testsuitesDocument.createElement(= XMLConstants.SYSTEM_OUT); + systemOutElement.appendChild(testsuitesDocument.createCDATASec= tion(report.out.toString())); + report.elements.add(systemOutElement); = - // - Element testSuiteElt =3D testsuitesDocument.createElement(XMLCons= tants.TESTSUITE); + // + Element testSuiteElt =3D testsuitesDocument.createElement(XMLC= onstants.TESTSUITE); = - // - testSuiteElt.setAttribute(XMLConstants.HOSTNAME, getHostName()); - testSuiteElt.setAttribute(XMLConstants.ATTR_PACKAGE, entry.getKey= ().packageName); - testSuiteElt.setAttribute(XMLConstants.ATTR_NAME, entry.getKey().= className); - testSuiteElt.setAttribute(XMLConstants.ATTR_TESTS, Integer.toStri= ng(report.tests)); - testSuiteElt.setAttribute(XMLConstants.ATTR_ERRORS, Integer.toStr= ing(report.errors)); - testSuiteElt.setAttribute(XMLConstants.ATTR_FAILURES, Integer.toS= tring(report.failures)); - testSuiteElt.setAttribute(XMLConstants.ATTR_TIME, DURATION_FORMAT= .format(report.durationMillis / 1000.0)); + // + testSuiteElt.setAttribute(XMLConstants.HOSTNAME, getHostName()= ); + testSuiteElt.setAttribute(XMLConstants.ATTR_PACKAGE, entry.get= Key().packageName); + testSuiteElt.setAttribute(XMLConstants.ATTR_NAME, entry.getKey= ().className); + testSuiteElt.setAttribute(XMLConstants.ATTR_TESTS, Integer.toS= tring(report.tests)); + testSuiteElt.setAttribute(XMLConstants.ATTR_ERRORS, Integer.to= String(report.errors)); + testSuiteElt.setAttribute(XMLConstants.ATTR_FAILURES, Integer.= toString(report.failures)); + testSuiteElt.setAttribute(XMLConstants.ATTR_TIME, DURATION_FOR= MAT.format(report.durationMillis / 1000.0)); = - // - for (Element elt : report.elements) - { - testSuiteElt.appendChild(elt); - } + // + for (Element elt : report.elements) + { + testSuiteElt.appendChild(elt); + } = - // - if (xmlReportDir !=3D null) - { - Document tmp =3D createDocument(); - Element copy =3D (Element)tmp.importNode(testSuiteElt, true); - tmp.appendChild(copy); - String a =3D copy.getAttribute("package"); - String b =3D copy.getAttribute("name"); - String c =3D a.length() =3D=3D 0 ? b : a + "." + b; - copy.setAttribute("name", c); - copy.removeAttribute("package"); - try + // + if (xmlReportDir !=3D null) { - File f =3D new File(xmlReportDir, TEST_FILE_NAME_PREFIX + c= + ".xml"); - if (!f.exists()) + Document tmp =3D createDocument(); + Element copy =3D (Element)tmp.importNode(testSuiteElt, true= ); + tmp.appendChild(copy); + String a =3D copy.getAttribute("package"); + String b =3D copy.getAttribute("name"); + String c =3D a.length() =3D=3D 0 ? b : a + "." + b; + copy.setAttribute("name", c); + copy.removeAttribute("package"); + try { - f.createNewFile(); + File f =3D new File(xmlReportDir, TEST_FILE_NAME_PREFIX = + c + ".xml"); + if (!f.exists()) + { + f.createNewFile(); + } + serializeNode(tmp, f); } - dump(tmp, f); + catch (IOException e) + { + e.printStackTrace(); + } } - catch (IOException e) - { - e.printStackTrace(); - } + + // + testsuitesElement.appendChild(testSuiteElt); } - - // - testsuitesElement.appendChild(testSuiteElt); } = // @@ -187,7 +191,7 @@ = // File tmp =3D new File(htmlReportDir, "TESTS-TestSuites.xml"); - dump(testsuitesElement, tmp); + serializeNode(testsuitesElement, tmp); } } = @@ -250,7 +254,7 @@ report.durationMillis +=3D testSuite.durationMillis; } = - private void dump(Node node, File dest) + private void serializeNode(Node node, File dest) { try { @@ -294,7 +298,7 @@ failureType =3D XMLConstants.ERROR; } = - test.appendChild(addError(failureType, failure.getStackTrace())); + test.appendChild(addGeneralError(failureType, failure.getStackTra= ce())); } = // @@ -317,7 +321,7 @@ } = = - private Element addError(String type, Throwable t) + private Element addGeneralError(String type, Throwable t) { Element error =3D testsuitesDocument.createElement(type); = @@ -453,5 +457,4 @@ private long durationMillis; = } - } \ No newline at end of file --===============6327067413947767876==-- From portal-commits at lists.jboss.org Mon Oct 22 09:46:12 2007 Content-Type: multipart/mixed; boundary="===============7764038543803292389==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8736 - in modules/identity/trunk: testsuite and 1 other directory. Date: Mon, 22 Oct 2007 09:46:12 -0400 Message-ID: --===============7764038543803292389== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: bdaw Date: 2007-10-22 09:46:11 -0400 (Mon, 22 Oct 2007) New Revision: 8736 Modified: modules/identity/trunk/identity/build.xml modules/identity/trunk/testsuite/build.xml Log: - use jboss unit html reporting in testsuite Modified: modules/identity/trunk/identity/build.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/identity/trunk/identity/build.xml 2007-10-22 13:31:27 UTC (rev = 8735) +++ modules/identity/trunk/identity/build.xml 2007-10-22 13:46:11 UTC (rev = 8736) @@ -348,7 +348,8 @@
= - + + = @@ -356,13 +357,5 @@ =
- - - - - - - - Modified: modules/identity/trunk/testsuite/build.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/identity/trunk/testsuite/build.xml 2007-10-22 13:31:27 UTC (rev= 8735) +++ modules/identity/trunk/testsuite/build.xml 2007-10-22 13:46:11 UTC (rev= 8736) @@ -80,11 +80,16 @@ = - - - + + + + + + + + = @@ -124,18 +129,18 @@ - + = - - - - - - - - + + + + + + + + + = --===============7764038543803292389==-- From portal-commits at lists.jboss.org Mon Oct 22 10:05:00 2007 Content-Type: multipart/mixed; boundary="===============0862123985488493769==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8737 - modules/test/trunk/remote/src/main/org/jboss/unit/remote/driver. Date: Mon, 22 Oct 2007 10:05:00 -0400 Message-ID: --===============0862123985488493769== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: julien(a)jboss.com Date: 2007-10-22 10:05:00 -0400 (Mon, 22 Oct 2007) New Revision: 8737 Modified: modules/test/trunk/remote/src/main/org/jboss/unit/remote/driver/Composit= eRemoteTestDriver.java Log: support constructor with test suite name in composite remote test driver Modified: modules/test/trunk/remote/src/main/org/jboss/unit/remote/driver/C= ompositeRemoteTestDriver.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/remote/src/main/org/jboss/unit/remote/driver/Composi= teRemoteTestDriver.java 2007-10-22 13:46:11 UTC (rev 8736) +++ modules/test/trunk/remote/src/main/org/jboss/unit/remote/driver/Composi= teRemoteTestDriver.java 2007-10-22 14:05:00 UTC (rev 8737) @@ -40,6 +40,15 @@ public class CompositeRemoteTestDriver extends CompositeTestDriver impleme= nts RemoteTestDriver { = + public CompositeRemoteTestDriver() + { + } + + public CompositeRemoteTestDriver(String name) + { + super(name); + } + public void pushContext(TestId testId, RequestContext requestContext) { String name =3D testId.getName(0); --===============0862123985488493769==-- From portal-commits at lists.jboss.org Mon Oct 22 10:30:42 2007 Content-Type: multipart/mixed; boundary="===============8932902870077792753==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8738 - branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-admin-war/WEB-INF/jsf. Date: Mon, 22 Oct 2007 10:30:42 -0400 Message-ID: --===============8932902870077792753== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: thomas.heute(a)jboss.com Date: 2007-10-22 10:30:42 -0400 (Mon, 22 Oct 2007) New Revision: 8738 Modified: branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-admin-w= ar/WEB-INF/jsf/portlets.xhtml Log: Removed broken change Modified: branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-= admin-war/WEB-INF/jsf/portlets.xhtml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-admin-= war/WEB-INF/jsf/portlets.xhtml 2007-10-22 14:05:00 UTC (rev 8737) +++ branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-admin-= war/WEB-INF/jsf/portlets.xhtml 2007-10-22 14:30:42 UTC (rev 8738) @@ -42,7 +42,6 @@ - --===============8932902870077792753==-- From portal-commits at lists.jboss.org Mon Oct 22 12:57:27 2007 Content-Type: multipart/mixed; boundary="===============2309096017763136151==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8739 - branches/JBoss_Portal_Branch_2_6/core-samples. Date: Mon, 22 Oct 2007 12:57:27 -0400 Message-ID: --===============2309096017763136151== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: wesleyhales Date: 2007-10-22 12:57:26 -0400 (Mon, 22 Oct 2007) New Revision: 8739 Modified: branches/JBoss_Portal_Branch_2_6/core-samples/build.xml Log: JBPORTAL-1766 Portal Administration Icons Modified: branches/JBoss_Portal_Branch_2_6/core-samples/build.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/core-samples/build.xml 2007-10-22 14:3= 0:42 UTC (rev 8738) +++ branches/JBoss_Portal_Branch_2_6/core-samples/build.xml 2007-10-22 16:5= 7:26 UTC (rev 8739) @@ -219,6 +219,7 @@ = + @@ -228,6 +229,7 @@ = + --===============2309096017763136151==-- From portal-commits at lists.jboss.org Mon Oct 22 13:06:49 2007 Content-Type: multipart/mixed; boundary="===============5273295042995663905==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8740 - in branches/JBoss_Portal_Branch_2_6: core/src/resources/portal-core-war/WEB-INF and 18 other directories. Date: Mon, 22 Oct 2007 13:06:49 -0400 Message-ID: --===============5273295042995663905== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: wesleyhales Date: 2007-10-22 13:06:49 -0400 (Mon, 22 Oct 2007) New Revision: 8740 Added: branches/JBoss_Portal_Branch_2_6/core-admin/src/bin/portal-admin-war/img= /portletIcon_Admin.gif branches/JBoss_Portal_Branch_2_6/core-admin/src/bin/portal-admin-war/img= /portletIcon_DashConfig.gif branches/JBoss_Portal_Branch_2_6/core-admin/src/bin/portal-admin-war/img= /portletIcon_Default1.gif branches/JBoss_Portal_Branch_2_6/core-admin/src/bin/portal-admin-war/img= /portletIcon_Misc1.gif branches/JBoss_Portal_Branch_2_6/core-admin/src/bin/portal-admin-war/img= /portletIcon_Misc2.gif branches/JBoss_Portal_Branch_2_6/core-admin/src/bin/portal-admin-war/img= /portletIcon_Misc3.gif branches/JBoss_Portal_Branch_2_6/core-admin/src/bin/portal-admin-war/img= /portletIcon_Misc4.gif branches/JBoss_Portal_Branch_2_6/core-admin/src/bin/portal-admin-war/img= /portletIcon_Users.gif branches/JBoss_Portal_Branch_2_6/core-cms/src/bin/portal-cms-war/images/= portletIcon_CMS.gif branches/JBoss_Portal_Branch_2_6/core-identity/src/bin/portal-identity-w= ar/img/portletIcon_Users.gif branches/JBoss_Portal_Branch_2_6/core-samples/src/bin/portal-basic-sampl= es-war/images/portletIcon_Exception.gif branches/JBoss_Portal_Branch_2_6/core-samples/src/bin/portal-basic-sampl= es-war/images/portletIcon_Upload.gif branches/JBoss_Portal_Branch_2_6/core-samples/src/bin/portal-news-sample= s-war/ branches/JBoss_Portal_Branch_2_6/core-samples/src/bin/portal-news-sample= s-war/images/ branches/JBoss_Portal_Branch_2_6/core-samples/src/bin/portal-news-sample= s-war/images/portletIcon_News.gif branches/JBoss_Portal_Branch_2_6/core-samples/src/bin/portal-weather-sam= ples-war/ branches/JBoss_Portal_Branch_2_6/core-samples/src/bin/portal-weather-sam= ples-war/images/ branches/JBoss_Portal_Branch_2_6/core-samples/src/bin/portal-weather-sam= ples-war/images/portletIcon_Weather.gif branches/JBoss_Portal_Branch_2_6/core-samples/src/resources/portal-news-= samples-war/WEB-INF/jboss-portlet.xml branches/JBoss_Portal_Branch_2_6/core-samples/src/resources/portal-weath= er-samples-war/WEB-INF/jboss-portlet.xml branches/JBoss_Portal_Branch_2_6/core/src/bin/portal-core-war/images/por= tletIcon_Users.gif Modified: branches/JBoss_Portal_Branch_2_6/core-admin/src/main/org/jboss/portal/co= re/admin/ui/AdminPropertyResolver.java branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-admin-w= ar/WEB-INF/jboss-portlet.xml branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-admin-w= ar/WEB-INF/jsf/portlets.xhtml branches/JBoss_Portal_Branch_2_6/core-cms/src/resources/portal-cms-war/W= EB-INF/jboss-portlet.xml branches/JBoss_Portal_Branch_2_6/core-identity/src/resources/portal-iden= tity-war/WEB-INF/jboss-portlet.xml branches/JBoss_Portal_Branch_2_6/core-samples/src/resources/portal-basic= -samples-war/WEB-INF/jboss-portlet.xml branches/JBoss_Portal_Branch_2_6/core-samples/src/resources/portal-users= -samples-war/WEB-INF/jboss-portlet.xml branches/JBoss_Portal_Branch_2_6/core/src/resources/portal-core-war/WEB-= INF/jboss-portlet.xml Log: JBPORTAL-1766 Portal Administration Icons Added: branches/JBoss_Portal_Branch_2_6/core/src/bin/portal-core-war/images= /portletIcon_Users.gif =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D (Binary files differ) Property changes on: branches/JBoss_Portal_Branch_2_6/core/src/bin/portal-c= ore-war/images/portletIcon_Users.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Modified: branches/JBoss_Portal_Branch_2_6/core/src/resources/portal-core-w= ar/WEB-INF/jboss-portlet.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/core/src/resources/portal-core-war/WEB= -INF/jboss-portlet.xml 2007-10-22 16:57:26 UTC (rev 8739) +++ branches/JBoss_Portal_Branch_2_6/core/src/resources/portal-core-war/WEB= -INF/jboss-portlet.xml 2007-10-22 17:06:49 UTC (rev 8740) @@ -31,6 +31,12 @@ Required + + + /images/portletIcon_Users.gif + /images/portletIcon_Users.gif + + RolePortlet @@ -50,6 +56,12 @@ } + + + /images/portletIcon_Users.gif + /images/portletIcon_Users.gif + + = Added: branches/JBoss_Portal_Branch_2_6/core-admin/src/bin/portal-admin-war= /img/portletIcon_Admin.gif =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D (Binary files differ) Property changes on: branches/JBoss_Portal_Branch_2_6/core-admin/src/bin/po= rtal-admin-war/img/portletIcon_Admin.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: branches/JBoss_Portal_Branch_2_6/core-admin/src/bin/portal-admin-war= /img/portletIcon_DashConfig.gif =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D (Binary files differ) Property changes on: branches/JBoss_Portal_Branch_2_6/core-admin/src/bin/po= rtal-admin-war/img/portletIcon_DashConfig.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: branches/JBoss_Portal_Branch_2_6/core-admin/src/bin/portal-admin-war= /img/portletIcon_Default1.gif =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D (Binary files differ) Property changes on: branches/JBoss_Portal_Branch_2_6/core-admin/src/bin/po= rtal-admin-war/img/portletIcon_Default1.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: branches/JBoss_Portal_Branch_2_6/core-admin/src/bin/portal-admin-war= /img/portletIcon_Misc1.gif =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D (Binary files differ) Property changes on: branches/JBoss_Portal_Branch_2_6/core-admin/src/bin/po= rtal-admin-war/img/portletIcon_Misc1.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: branches/JBoss_Portal_Branch_2_6/core-admin/src/bin/portal-admin-war= /img/portletIcon_Misc2.gif =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D (Binary files differ) Property changes on: branches/JBoss_Portal_Branch_2_6/core-admin/src/bin/po= rtal-admin-war/img/portletIcon_Misc2.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: branches/JBoss_Portal_Branch_2_6/core-admin/src/bin/portal-admin-war= /img/portletIcon_Misc3.gif =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D (Binary files differ) Property changes on: branches/JBoss_Portal_Branch_2_6/core-admin/src/bin/po= rtal-admin-war/img/portletIcon_Misc3.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: branches/JBoss_Portal_Branch_2_6/core-admin/src/bin/portal-admin-war= /img/portletIcon_Misc4.gif =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D (Binary files differ) Property changes on: branches/JBoss_Portal_Branch_2_6/core-admin/src/bin/po= rtal-admin-war/img/portletIcon_Misc4.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: branches/JBoss_Portal_Branch_2_6/core-admin/src/bin/portal-admin-war= /img/portletIcon_Users.gif =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D (Binary files differ) Property changes on: branches/JBoss_Portal_Branch_2_6/core-admin/src/bin/po= rtal-admin-war/img/portletIcon_Users.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Modified: branches/JBoss_Portal_Branch_2_6/core-admin/src/main/org/jboss/po= rtal/core/admin/ui/AdminPropertyResolver.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/core-admin/src/main/org/jboss/portal/c= ore/admin/ui/AdminPropertyResolver.java 2007-10-22 16:57:26 UTC (rev 8739) +++ branches/JBoss_Portal_Branch_2_6/core-admin/src/main/org/jboss/portal/c= ore/admin/ui/AdminPropertyResolver.java 2007-10-22 17:06:49 UTC (rev 8740) @@ -203,7 +203,7 @@ } else { - return ""; + return "/portal-admin/img/portletIcon_Default1.gif"; } } }); @@ -220,7 +220,7 @@ } else { - return ""; + return "/portal-admin/img/portletIcon_Default1.gif"; } } }); Modified: branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-= admin-war/WEB-INF/jboss-portlet.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-admin-= war/WEB-INF/jboss-portlet.xml 2007-10-22 16:57:26 UTC (rev 8739) +++ branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-admin-= war/WEB-INF/jboss-portlet.xml 2007-10-22 17:06:49 UTC (rev 8740) @@ -37,6 +37,12 @@ + + + /img/portletIcon_Admin.gif + /img/portletIcon_Admin.gif + + DashboardConfigPortlet @@ -49,6 +55,12 @@ + + + /img/portletIcon_DashConfig.gif + /img/portletIcon_DashConfig.gif + + = Modified: branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-= admin-war/WEB-INF/jsf/portlets.xhtml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-admin-= war/WEB-INF/jsf/portlets.xhtml 2007-10-22 16:57:26 UTC (rev 8739) +++ branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-admin-= war/WEB-INF/jsf/portlets.xhtml 2007-10-22 17:06:49 UTC (rev 8740) @@ -42,6 +42,7 @@ + Added: branches/JBoss_Portal_Branch_2_6/core-cms/src/bin/portal-cms-war/ima= ges/portletIcon_CMS.gif =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D (Binary files differ) Property changes on: branches/JBoss_Portal_Branch_2_6/core-cms/src/bin/port= al-cms-war/images/portletIcon_CMS.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Modified: branches/JBoss_Portal_Branch_2_6/core-cms/src/resources/portal-cm= s-war/WEB-INF/jboss-portlet.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/core-cms/src/resources/portal-cms-war/= WEB-INF/jboss-portlet.xml 2007-10-22 16:57:26 UTC (rev 8739) +++ branches/JBoss_Portal_Branch_2_6/core-cms/src/resources/portal-cms-war/= WEB-INF/jboss-portlet.xml 2007-10-22 17:06:49 UTC (rev 8740) @@ -34,6 +34,12 @@ + + + /images/portletIcon_CMS.gif + /images/portletIcon_CMS.gif + + Added: branches/JBoss_Portal_Branch_2_6/core-identity/src/bin/portal-identi= ty-war/img/portletIcon_Users.gif =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D (Binary files differ) Property changes on: branches/JBoss_Portal_Branch_2_6/core-identity/src/bin= /portal-identity-war/img/portletIcon_Users.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Modified: branches/JBoss_Portal_Branch_2_6/core-identity/src/resources/port= al-identity-war/WEB-INF/jboss-portlet.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/core-identity/src/resources/portal-ide= ntity-war/WEB-INF/jboss-portlet.xml 2007-10-22 16:57:26 UTC (rev 8739) +++ branches/JBoss_Portal_Branch_2_6/core-identity/src/resources/portal-ide= ntity-war/WEB-INF/jboss-portlet.xml 2007-10-22 17:06:49 UTC (rev 8740) @@ -37,6 +37,12 @@ + + + /img/portletIcon_Users.gif + /img/portletIcon_Users.gif + + IdentityAdminPortlet @@ -49,6 +55,12 @@ + + + /img/portletIcon_Users.gif + /img/portletIcon_Users.gif + + = Added: branches/JBoss_Portal_Branch_2_6/core-samples/src/bin/portal-basic-s= amples-war/images/portletIcon_Exception.gif =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D (Binary files differ) Property changes on: branches/JBoss_Portal_Branch_2_6/core-samples/src/bin/= portal-basic-samples-war/images/portletIcon_Exception.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: branches/JBoss_Portal_Branch_2_6/core-samples/src/bin/portal-basic-s= amples-war/images/portletIcon_Upload.gif =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D (Binary files differ) Property changes on: branches/JBoss_Portal_Branch_2_6/core-samples/src/bin/= portal-basic-samples-war/images/portletIcon_Upload.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: branches/JBoss_Portal_Branch_2_6/core-samples/src/bin/portal-news-sa= mples-war/images/portletIcon_News.gif =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D (Binary files differ) Property changes on: branches/JBoss_Portal_Branch_2_6/core-samples/src/bin/= portal-news-samples-war/images/portletIcon_News.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: branches/JBoss_Portal_Branch_2_6/core-samples/src/bin/portal-weather= -samples-war/images/portletIcon_Weather.gif =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D (Binary files differ) Property changes on: branches/JBoss_Portal_Branch_2_6/core-samples/src/bin/= portal-weather-samples-war/images/portletIcon_Weather.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Modified: branches/JBoss_Portal_Branch_2_6/core-samples/src/resources/porta= l-basic-samples-war/WEB-INF/jboss-portlet.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/core-samples/src/resources/portal-basi= c-samples-war/WEB-INF/jboss-portlet.xml 2007-10-22 16:57:26 UTC (rev 8739) +++ branches/JBoss_Portal_Branch_2_6/core-samples/src/resources/portal-basi= c-samples-war/WEB-INF/jboss-portlet.xml 2007-10-22 17:06:49 UTC (rev 8740) @@ -52,6 +52,12 @@ ExceptionPortlet + + + /images/portletIcon_Exception.gif + /images/portletIcon_Exception.gif + + PortletB @@ -83,6 +89,15 @@ BasicPortlet + + FileUploadPortlet + + + /images/portletIcon_Upload.gif + /images/portletIcon_Upload.gif + + + = Added: branches/JBoss_Portal_Branch_2_6/core-samples/src/resources/portal-n= ews-samples-war/WEB-INF/jboss-portlet.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/core-samples/src/resources/portal-news= -samples-war/WEB-INF/jboss-portlet.xml (rev 0) +++ branches/JBoss_Portal_Branch_2_6/core-samples/src/resources/portal-news= -samples-war/WEB-INF/jboss-portlet.xml 2007-10-22 17:06:49 UTC (rev 8740) @@ -0,0 +1,38 @@ + + + + + + + NewsPortlet + + + /images/portletIcon_News.gif + /images/img/portletIcon_News.gif + + + + \ No newline at end of file Modified: branches/JBoss_Portal_Branch_2_6/core-samples/src/resources/porta= l-users-samples-war/WEB-INF/jboss-portlet.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/core-samples/src/resources/portal-user= s-samples-war/WEB-INF/jboss-portlet.xml 2007-10-22 16:57:26 UTC (rev 8739) +++ branches/JBoss_Portal_Branch_2_6/core-samples/src/resources/portal-user= s-samples-war/WEB-INF/jboss-portlet.xml 2007-10-22 17:06:49 UTC (rev 8740) @@ -30,7 +30,7 @@ = CurrentUsersPortlet - + = UsersActivityStats Added: branches/JBoss_Portal_Branch_2_6/core-samples/src/resources/portal-w= eather-samples-war/WEB-INF/jboss-portlet.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/core-samples/src/resources/portal-weat= her-samples-war/WEB-INF/jboss-portlet.xml (rev 0) +++ branches/JBoss_Portal_Branch_2_6/core-samples/src/resources/portal-weat= her-samples-war/WEB-INF/jboss-portlet.xml 2007-10-22 17:06:49 UTC (rev 8740) @@ -0,0 +1,38 @@ + + + + + + + WeatherPortlet + + + /images/portletIcon_Weather.gif + /images/portletIcon_Weather.gif + + + + \ No newline at end of file --===============5273295042995663905==-- From portal-commits at lists.jboss.org Mon Oct 22 15:51:57 2007 Content-Type: multipart/mixed; boundary="===============2900893012348819168==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8741 - in modules/test/trunk: unit/src/main/org/jboss/test/unit and 11 other directories. Date: Mon, 22 Oct 2007 15:51:57 -0400 Message-ID: --===============2900893012348819168== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: julien(a)jboss.com Date: 2007-10-22 15:51:57 -0400 (Mon, 22 Oct 2007) New Revision: 8741 Added: modules/test/trunk/unit/src/main/org/jboss/unit/driver/impl/composite/Ab= stractCompositeTestDriver.java Modified: modules/test/trunk/remote/src/main/org/jboss/unit/remote/driver/Composit= eRemoteTestDriver.java modules/test/trunk/remote/src/main/org/jboss/unit/remote/driver/RemoteTe= stDriverClient.java modules/test/trunk/unit/src/main/org/jboss/test/unit/AllTests.java modules/test/trunk/unit/src/main/org/jboss/test/unit/sample/SampleTests.= java modules/test/trunk/unit/src/main/org/jboss/unit/driver/impl/composite/Co= mpositeTestDriver.java modules/test/trunk/unit/src/main/org/jboss/unit/driver/impl/pojo/SimpleD= riverContext.java modules/test/trunk/unit/src/main/org/jboss/unit/report/impl/junit/Abstra= ctJUnitReport.java modules/test/trunk/unit/src/main/org/jboss/unit/report/impl/junit/JUnitT= estsuiteReport.java modules/test/trunk/unit/src/main/org/jboss/unit/runner/event/StartTestSu= iteEvent.java modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/driver/TestD= riverRunner.java modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/pojo/POJOTes= tRunner.java modules/test/trunk/unit/src/main/org/jboss/unit/runner/model/ModelBuilde= r.java modules/test/trunk/unit/src/main/org/jboss/unit/runner/model/TestSuiteDe= f.java modules/test/trunk/unit/src/main/org/jboss/unit/runner/model/generic/Gen= ericTestSuiteDef.java modules/test/trunk/unit/src/main/org/jboss/unit/runner/model/pojo/TestCl= assDef.java modules/test/trunk/unit/src/resources/test/org/jboss/test/unit/sample/f1= .xml Log: better support for test driver properties reporting Modified: modules/test/trunk/remote/src/main/org/jboss/unit/remote/driver/C= ompositeRemoteTestDriver.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/remote/src/main/org/jboss/unit/remote/driver/Composi= teRemoteTestDriver.java 2007-10-22 17:06:49 UTC (rev 8740) +++ modules/test/trunk/remote/src/main/org/jboss/unit/remote/driver/Composi= teRemoteTestDriver.java 2007-10-22 19:51:57 UTC (rev 8741) @@ -24,9 +24,15 @@ = import org.jboss.unit.Failure; import org.jboss.unit.TestId; +import org.jboss.unit.info.TestInfo; import org.jboss.unit.driver.TestDriver; +import org.jboss.unit.driver.DriverContext; +import org.jboss.unit.driver.DriverException; +import org.jboss.unit.driver.DriverResponse; +import org.jboss.unit.driver.DriverCommand; +import org.jboss.unit.driver.impl.composite.AbstractCompositeTestDriver; +import org.jboss.unit.driver.impl.composite.CompositeTestDriver; import org.jboss.unit.driver.response.FailureResponse; -import org.jboss.unit.driver.impl.composite.CompositeTestDriver; import org.jboss.unit.remote.RequestContext; import org.jboss.unit.remote.ResponseContext; = @@ -37,24 +43,48 @@ * @author Julien Viet * @version $Revision: 1.1 $ */ -public class CompositeRemoteTestDriver extends CompositeTestDriver impleme= nts RemoteTestDriver +public class CompositeRemoteTestDriver implements RemoteTestDriver { = - public CompositeRemoteTestDriver() + /** . */ + private AbstractCompositeTestDriver delegate; + + public CompositeRemoteTestDriver(String name) { + this(new CompositeTestDriver(name)); } = - public CompositeRemoteTestDriver(String name) + public CompositeRemoteTestDriver(AbstractCompositeTestDriver delegate) { - super(name); + this.delegate =3D delegate; } = + public void initDriver(DriverContext context) throws DriverException + { + delegate.initDriver(context); + } + + public void destroyDriver() + { + delegate.destroyDriver(); + } + + public TestInfo getInfo() + { + return delegate.getInfo(); + } + + public DriverResponse invoke(TestId id, DriverCommand command) + { + return delegate.invoke(id, command); + } + public void pushContext(TestId testId, RequestContext requestContext) { String name =3D testId.getName(0); = // - TestDriver driver =3D drivers.get(name); + TestDriver driver =3D delegate.getDriver(name); = // if (driver instanceof RemoteTestDriver) @@ -71,7 +101,7 @@ String name =3D testId.getName(0); = // - TestDriver driver =3D drivers.get(name); + TestDriver driver =3D delegate.getDriver(name); = // if (driver instanceof RemoteTestDriver) Modified: modules/test/trunk/remote/src/main/org/jboss/unit/remote/driver/R= emoteTestDriverClient.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/remote/src/main/org/jboss/unit/remote/driver/RemoteT= estDriverClient.java 2007-10-22 17:06:49 UTC (rev 8740) +++ modules/test/trunk/remote/src/main/org/jboss/unit/remote/driver/RemoteT= estDriverClient.java 2007-10-22 19:51:57 UTC (rev 8741) @@ -199,6 +199,9 @@ TestDriver server =3D getServer(node); = // + server.initDriver(context); + + // info =3D SimpleTestInfo.create(server.getInfo()); } = @@ -206,6 +209,23 @@ { try { + // Always retrieve meta data from the default node + Node node =3D nodeManager.getNode(NodeId.DEFAULT); + + // + TestDriver server =3D getServer(node); + + // + server.destroyDriver(); + } + catch (Exception ignore) + { + ignore.printStackTrace(); + } + + // + try + { beanDeployer.undeploy(deployment); } catch (Throwable ignore) Modified: modules/test/trunk/unit/src/main/org/jboss/test/unit/AllTests.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/test/unit/AllTests.java 2007= -10-22 17:06:49 UTC (rev 8740) +++ modules/test/trunk/unit/src/main/org/jboss/test/unit/AllTests.java 2007= -10-22 19:51:57 UTC (rev 8741) @@ -46,30 +46,30 @@ = public static void main(String[] args) throws Exception { - AssertTests.main(args); - TestIdTests.main(args); +// AssertTests.main(args); +// TestIdTests.main(args); +// +// // +// AbstractPOJOTests.main(args); +// JUnitPOJOTests.main(args); +// CompositeTestRunnerTests.main(args); +// TestDriverRunnerTests.main(args); +// GenericTestRunnerTests.main(args); +// POJOTestRunnerTests.main(args); +// +// // +// TestRunnerLifeCycleFilterTests.main(args); +// TestRunnerEventBroadcasterSupportTests.main(args); +// ModelTests.main(args); +// ParametrizationTests.main(args); +// +// // +// InfoTests.main(args); = // - AbstractPOJOTests.main(args); - JUnitPOJOTests.main(args); - CompositeTestRunnerTests.main(args); - TestDriverRunnerTests.main(args); - GenericTestRunnerTests.main(args); - POJOTestRunnerTests.main(args); - - // - TestRunnerLifeCycleFilterTests.main(args); - TestRunnerEventBroadcasterSupportTests.main(args); - ModelTests.main(args); - ParametrizationTests.main(args); - - // - InfoTests.main(args); - - // SampleTests.main(args); = // - JUnitReporterTests.main(args); +// JUnitReporterTests.main(args); } } Modified: modules/test/trunk/unit/src/main/org/jboss/test/unit/sample/Sampl= eTests.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/test/unit/sample/SampleTests= .java 2007-10-22 17:06:49 UTC (rev 8740) +++ modules/test/trunk/unit/src/main/org/jboss/test/unit/sample/SampleTests= .java 2007-10-22 19:51:57 UTC (rev 8741) @@ -50,7 +50,7 @@ public static void main(String[] args) throws Exception { = - test1(); +// test1(); test2(); = } Added: modules/test/trunk/unit/src/main/org/jboss/unit/driver/impl/composit= e/AbstractCompositeTestDriver.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/driver/impl/composite/A= bstractCompositeTestDriver.java (rev 0) +++ modules/test/trunk/unit/src/main/org/jboss/unit/driver/impl/composite/A= bstractCompositeTestDriver.java 2007-10-22 19:51:57 UTC (rev 8741) @@ -0,0 +1,91 @@ +/*************************************************************************= ***** + * JBoss, a division of Red Hat = * + * Copyright 2006, Red Hat Middleware, LLC, and individual = * + * contributors as indicated by the @authors tag. See the = * + * copyright.txt in the distribution for a full listing of = * + * individual contributors. = * + * = * + * This is free software; you can redistribute it and/or modify it = * + * under the terms of the GNU Lesser General Public License as = * + * published by the Free Software Foundation; either version 2.1 of = * + * the License, or (at your option) any later version. = * + * = * + * This software is distributed in the hope that it will be useful, = * + * but WITHOUT ANY WARRANTY; without even the implied warranty of = * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU = * + * Lesser General Public License for more details. = * + * = * + * You should have received a copy of the GNU Lesser General Public = * + * License along with this software; if not, write to the Free = * + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA = * + * 02110-1301 USA, or see the FSF site: http://www.fsf.org. = * + *************************************************************************= *****/ +package org.jboss.unit.driver.impl.composite; + +import org.jboss.unit.Failure; +import org.jboss.unit.TestId; +import org.jboss.unit.driver.AbstractTestDriver; +import org.jboss.unit.driver.DriverCommand; +import org.jboss.unit.driver.DriverResponse; +import org.jboss.unit.driver.TestDriver; +import org.jboss.unit.driver.response.FailureResponse; +import org.jboss.unit.info.TestInfo; +import org.jboss.unit.info.impl.SimpleTestSuiteInfo; +import org.jboss.unit.info.impl.SimpleTestInfo; + +import java.util.Set; + +/** + * @author Julien Viet + * @version $Revision: 1.1 $ + */ +public abstract class AbstractCompositeTestDriver extends AbstractTestDriv= er +{ + + public TestInfo getInfo() + { + SimpleTestSuiteInfo info =3D new SimpleTestSuiteInfo(getName()); + + // + for (String name : getNames()) + { + TestDriver driver =3D getDriver(name); + info.addTest(SimpleTestInfo.create(driver.getInfo())); + } + + return info; + } + + public DriverResponse invoke(TestId id, DriverCommand command) + { + if (id.getLength() =3D=3D 0) + { + return new FailureResponse(Failure.createErrorFailure("No null te= st id accepted")); + } + + // + String name =3D id.getName(0); + + // + TestDriver driver =3D getDriver(name); + + // + if (driver =3D=3D null) + { + return new FailureResponse(Failure.createErrorFailure("No test dr= iver found for name " + name)); + } + + // + TestId driverId =3D id.range(1); + + // + return driver.invoke(driverId, command); + } + + public abstract String getName(); + + public abstract TestDriver getDriver(String name); + + public abstract Set getNames(); + +} \ No newline at end of file Modified: modules/test/trunk/unit/src/main/org/jboss/unit/driver/impl/compo= site/CompositeTestDriver.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/driver/impl/composite/C= ompositeTestDriver.java 2007-10-22 17:06:49 UTC (rev 8740) +++ modules/test/trunk/unit/src/main/org/jboss/unit/driver/impl/composite/C= ompositeTestDriver.java 2007-10-22 19:51:57 UTC (rev 8741) @@ -23,33 +23,25 @@ package org.jboss.unit.driver.impl.composite; = import org.jboss.unit.driver.TestDriver; -import org.jboss.unit.driver.DriverResponse; -import org.jboss.unit.driver.DriverCommand; -import org.jboss.unit.driver.AbstractTestDriver; import org.jboss.unit.driver.DriverException; -import org.jboss.unit.driver.response.FailureResponse; -import org.jboss.unit.info.impl.SimpleTestSuiteInfo; -import org.jboss.unit.info.TestInfo; -import org.jboss.unit.TestId; -import org.jboss.unit.Failure; = import java.util.Map; import java.util.HashMap; +import java.util.Set; = /** * @author Julien Viet * @version $Revision: 1.1 $ */ -public class CompositeTestDriver extends AbstractTestDriver +public class CompositeTestDriver extends AbstractCompositeTestDriver { = /** . */ - private final SimpleTestSuiteInfo info; + private final String name; = /** . */ protected final Map drivers =3D new HashMap(); = - public CompositeTestDriver() { this("Main"); @@ -57,43 +49,22 @@ = public CompositeTestDriver(String name) { - info =3D new SimpleTestSuiteInfo(name); + this.name =3D name; } = - public TestInfo getInfo() + public String getName() { - return info; + return name; } = - public DriverResponse invoke(TestId id, DriverCommand command) + public TestDriver getDriver(String name) { - if (id.getLength() =3D=3D 0) - { - return new FailureResponse(Failure.createErrorFailure("No null te= st id accepted")); - } - - // - String name =3D id.getName(0); - - // - TestDriver driver =3D drivers.get(name); - - // - if (driver =3D=3D null) - { - return new FailureResponse(Failure.createErrorFailure("No test dr= iver found for name " + name)); - } - - // - TestId driverId =3D id.range(1); - - // - return driver.invoke(driverId, command); + return drivers.get(name); } = - public TestDriver get(String name) + public Set getNames() { - return drivers.get(name); + return drivers.keySet(); } = public void mount(TestDriver driver) throws DriverException @@ -103,9 +74,6 @@ driver.initDriver(getContext()); = // - info.addTest(driver.getInfo()); - - // String name =3D driver.getInfo().getName(); = // @@ -123,9 +91,6 @@ drivers.remove(name); = // - info.removeTest(name); - - // driver.destroyDriver(); } } Modified: modules/test/trunk/unit/src/main/org/jboss/unit/driver/impl/pojo/= SimpleDriverContext.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/driver/impl/pojo/Simple= DriverContext.java 2007-10-22 17:06:49 UTC (rev 8740) +++ modules/test/trunk/unit/src/main/org/jboss/unit/driver/impl/pojo/Simple= DriverContext.java 2007-10-22 19:51:57 UTC (rev 8741) @@ -24,16 +24,17 @@ = import org.jboss.unit.driver.DriverContext; = +import java.io.Serializable; +import java.util.Collections; +import java.util.HashMap; import java.util.Map; -import java.util.HashMap; import java.util.Set; -import java.util.Collections; = /** * @author Julien Viet * @version $Revision: 1.1 $ */ -public class SimpleDriverContext implements DriverContext +public class SimpleDriverContext implements DriverContext, Serializable { = /** . */ Modified: modules/test/trunk/unit/src/main/org/jboss/unit/report/impl/junit= /AbstractJUnitReport.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/report/impl/junit/Abstr= actJUnitReport.java 2007-10-22 17:06:49 UTC (rev 8740) +++ modules/test/trunk/unit/src/main/org/jboss/unit/report/impl/junit/Abstr= actJUnitReport.java 2007-10-22 19:51:57 UTC (rev 8741) @@ -101,7 +101,7 @@ = private void handle(StartRunnerEvent event) { - current =3D new TestSuite(null, ""); + current =3D new TestSuite(null, "", new HashMap()); = // startTestSuite(current); @@ -124,7 +124,7 @@ = private void handle(StartTestSuiteEvent event) { - current =3D new TestSuite(current, event.getTestInfo().getName()); + current =3D new TestSuite(current, event.getTestInfo().getName(), ev= ent.getProperties()); = // startTestSuite(current); @@ -162,30 +162,12 @@ // remove test from started List current.startedTests.remove(testId); = - /** Adding testcase name */ - StringBuffer testName =3D new StringBuffer(info.getName()); - Iterator i =3D result.getParametrization().keySet().iterator= (); - if (i.hasNext()) - { - testName.append("?"); - while (i.hasNext()) - { - String parameterName =3D i.next(); - String value =3D result.getParametrization().get(parameterName= ); - testName.append(parameterName).append("=3D").append(value); - if(i.hasNext()) - { - testName.append("&"); - } - } - } - // current.durationMillis +=3D result.getDurationMillis(); current.tests++; = // - endTestCase(current, testName.toString(), result); + endTestCase(current, info.getName(), result); } = public class TestSuite @@ -198,6 +180,9 @@ final String name; = /** . */ + Map properties; + + /** . */ long durationMillis; = /** The test count */ @@ -212,9 +197,6 @@ /** The started Tests */ Map startedTests =3D new HashMap= (); = -// /** . */ -// List children =3D new ArrayList(); - /** The view of the system output. */ SystemOutputView view =3D SystemOutputManager.getInstance().createVi= ew(false); = @@ -223,10 +205,11 @@ * * @param name */ - TestSuite(TestSuite parent, String name) + TestSuite(TestSuite parent, String name, Map propert= ies) { this.parent =3D parent; this.name =3D name; + this.properties =3D properties; } = public StringBuffer getFQN() Modified: modules/test/trunk/unit/src/main/org/jboss/unit/report/impl/junit= /JUnitTestsuiteReport.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/report/impl/junit/JUnit= TestsuiteReport.java 2007-10-22 17:06:49 UTC (rev 8740) +++ modules/test/trunk/unit/src/main/org/jboss/unit/report/impl/junit/JUnit= TestsuiteReport.java 2007-10-22 19:51:57 UTC (rev 8741) @@ -57,6 +57,7 @@ import java.util.ArrayList; import java.util.Date; import java.util.HashMap; +import java.util.Iterator; import java.util.List; import java.util.Map; = @@ -105,6 +106,9 @@ testsuitesDocument.appendChild(testsuitesElement); = // + int counter =3D 0; + + // for (Map.Entry entry : reportMap.entr= ySet()) { TestSuiteReport report =3D entry.getValue(); @@ -126,7 +130,7 @@ // testSuiteElt.setAttribute(XMLConstants.HOSTNAME, getHostName()= ); testSuiteElt.setAttribute(XMLConstants.ATTR_PACKAGE, entry.get= Key().packageName); - testSuiteElt.setAttribute(XMLConstants.ATTR_NAME, entry.getKey= ().className); + testSuiteElt.setAttribute(XMLConstants.ATTR_NAME, appendURI(ne= w StringBuffer(), entry.getKey().className, entry.getKey().properties).toSt= ring()); testSuiteElt.setAttribute(XMLConstants.ATTR_TESTS, Integer.toS= tring(report.tests)); testSuiteElt.setAttribute(XMLConstants.ATTR_ERRORS, Integer.to= String(report.errors)); testSuiteElt.setAttribute(XMLConstants.ATTR_FAILURES, Integer.= toString(report.failures)); @@ -141,26 +145,34 @@ // if (xmlReportDir !=3D null) { - Document tmp =3D createDocument(); - Element copy =3D (Element)tmp.importNode(testSuiteElt, true= ); - tmp.appendChild(copy); - String a =3D copy.getAttribute("package"); - String b =3D copy.getAttribute("name"); - String c =3D a.length() =3D=3D 0 ? b : a + "." + b; - copy.setAttribute("name", c); - copy.removeAttribute("package"); - try + if (xmlReportDir.exists()) { - File f =3D new File(xmlReportDir, TEST_FILE_NAME_PREFIX = + c + ".xml"); - if (!f.exists()) + Document tmp =3D createDocument(); + Element copy =3D (Element)tmp.importNode(testSuiteElt, t= rue); + tmp.appendChild(copy); + String a =3D copy.getAttribute("package"); + String b =3D copy.getAttribute("name"); + String c =3D a.length() =3D=3D 0 ? b : a + "." + b; + copy.setAttribute("name", c); + copy.removeAttribute("package"); + File f =3D new File(xmlReportDir, TEST_FILE_NAME_PREFIX = + (counter++) + ".xml"); + try { - f.createNewFile(); + if (!f.exists()) + { + f.createNewFile(); + } + serializeNode(tmp, f); } - serializeNode(tmp, f); + catch (IOException e) + { + System.out.println("Could not create file " + f.getAb= solutePath()); + e.printStackTrace(); + } } - catch (IOException e) + else { - e.printStackTrace(); + System.out.println("Cannot create report because parent = dir " + xmlReportDir.getAbsolutePath() + " does not exist"); } } = @@ -172,26 +184,33 @@ // if (htmlReportDir !=3D null) { - try + if (htmlReportDir.exists()) { - InputStream xslIn =3D getClass().getResourceAsStream("/org/jbo= ss/unit/report/impl/junit/junit-frames.xsl"); - Source xmlSource =3D new DOMSource(testsuitesElement); - Source xslSource =3D new StreamSource(xslIn); - TransformerFactory transFact =3D TransformerFactory.newInstanc= e(); - Transformer trans =3D transFact.newTransformer(xslSource); - OutputStream os =3D new ByteArrayOutputStream(); - Result result =3D new StreamResult(os); - trans.setParameter("output.dir", htmlReportDir.getAbsolutePath= ()); - trans.transform(xmlSource, result); + try + { + InputStream xslIn =3D getClass().getResourceAsStream("/org/= jboss/unit/report/impl/junit/junit-frames.xsl"); + Source xmlSource =3D new DOMSource(testsuitesElement); + Source xslSource =3D new StreamSource(xslIn); + TransformerFactory transFact =3D TransformerFactory.newInst= ance(); + Transformer trans =3D transFact.newTransformer(xslSource); + OutputStream os =3D new ByteArrayOutputStream(); + Result result =3D new StreamResult(os); + trans.setParameter("output.dir", htmlReportDir.getAbsoluteP= ath()); + trans.transform(xmlSource, result); + } + catch (TransformerException e) + { + e.printStackTrace(); + } + + // + File tmp =3D new File(htmlReportDir, "TESTS-TestSuites.xml"); + serializeNode(testsuitesElement, tmp); } - catch (TransformerException e) + else { - e.printStackTrace(); + System.out.println("Cannot create report because parent dir " = + htmlReportDir.getAbsolutePath() + " does not exist"); } - - // - File tmp =3D new File(htmlReportDir, "TESTS-TestSuites.xml"); - serializeNode(testsuitesElement, tmp); } } = @@ -272,11 +291,32 @@ } } = + public static StringBuffer appendURI(StringBuffer buffer, String name, = Map parameters) + { + buffer.append(name); + Iterator i =3D parameters.keySet().iterator(); + if (i.hasNext()) + { + buffer.append("?"); + while (i.hasNext()) + { + String parameterName =3D i.next(); + String value =3D parameters.get(parameterName); + buffer.append(parameterName).append("=3D").append(value); + if(i.hasNext()) + { + buffer.append("&"); + } + } + } + return buffer; + } + protected void endTestCase(TestSuite testSuite, String testName, TestRe= sult result) { Element test =3D testsuitesDocument.createElement(XMLConstants.TESTC= ASE); test.setAttribute(XMLConstants.ATTR_CLASSNAME, testSuite.getFQN().to= String()); - test.setAttribute(XMLConstants.ATTR_NAME, testName); + test.setAttribute(XMLConstants.ATTR_NAME, appendURI(new StringBuffer= (), testName, result.getParametrization()).toString()); test.setAttribute(XMLConstants.ATTR_TIME, DURATION_FORMAT.format(res= ult.getDurationMillis() / 1000.0)); = /** If testcase failed */ @@ -390,28 +430,18 @@ /** . */ private final String className; = + /** . */ + private final Map properties; + private TestSuiteKey(TestSuite testSuite) { StringBuffer fqn =3D testSuite.getFQN(); int pos =3D fqn.lastIndexOf("."); packageName =3D (pos =3D=3D -1) ? "" : fqn.substring(0, pos); className =3D (pos =3D=3D -1) ? fqn.toString() : fqn.substring(po= s + 1); + properties =3D testSuite.properties; } = - private TestSuiteKey(String packageName, String className) - { - if (packageName =3D=3D null) - { - throw new IllegalArgumentException(); - } - if (className =3D=3D null) - { - throw new IllegalArgumentException(); - } - this.packageName =3D packageName; - this.className =3D className; - } - public boolean equals(Object o) { if (o =3D=3D this) @@ -421,7 +451,7 @@ if (o instanceof TestSuiteKey) { TestSuiteKey that =3D (TestSuiteKey)o; - return that.packageName.equals(packageName) && that.className.= equals(className); + return that.packageName.equals(packageName) && that.className.= equals(className) && that.properties.equals(properties); } return false; } Modified: modules/test/trunk/unit/src/main/org/jboss/unit/runner/event/Star= tTestSuiteEvent.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/runner/event/StartTestS= uiteEvent.java 2007-10-22 17:06:49 UTC (rev 8740) +++ modules/test/trunk/unit/src/main/org/jboss/unit/runner/event/StartTestS= uiteEvent.java 2007-10-22 19:51:57 UTC (rev 8741) @@ -22,10 +22,12 @@ *************************************************************************= *****/ package org.jboss.unit.runner.event; = -import org.jboss.unit.runner.TestRunnerEvent; import org.jboss.unit.TestId; import org.jboss.unit.info.TestSuiteInfo; +import org.jboss.unit.runner.TestRunnerEvent; = +import java.util.Map; + /** * @author Julien Viet * @version $Revision: 1.1 $ @@ -39,10 +41,14 @@ /** . */ private final TestSuiteInfo testInfo; = - public StartTestSuiteEvent(TestId testId, TestSuiteInfo testInfo) + /** . */ + private final Map properties; + + public StartTestSuiteEvent(TestId testId, TestSuiteInfo testInfo, Map properties) { this.testId =3D testId; this.testInfo =3D testInfo; + this.properties =3D properties; } = public TestId getTestId() @@ -54,4 +60,9 @@ { return testInfo; } + + public Map getProperties() + { + return properties; + } } Modified: modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/drive= r/TestDriverRunner.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/driver/Test= DriverRunner.java 2007-10-22 17:06:49 UTC (rev 8740) +++ modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/driver/Test= DriverRunner.java 2007-10-22 19:51:57 UTC (rev 8741) @@ -143,7 +143,7 @@ TestSuiteInfo testSuiteInfo =3D (TestSuiteInfo)currentInfo; = // - context.getEventListener().onEvent(new StartTestSuiteEvent(= currentId, testSuiteInfo)); + context.getEventListener().onEvent(new StartTestSuiteEvent(= currentId, testSuiteInfo, context.getProperties())); = // for (String name : testSuiteInfo.getNames()) @@ -228,7 +228,7 @@ TestId nextId =3D new TestId(currentId, name); = // - context.getEventListener().onEvent(new StartTestSuiteEvent(= currentId, currentSuiteInfo)); + context.getEventListener().onEvent(new StartTestSuiteEvent(= currentId, currentSuiteInfo, context.getProperties())); = // internalRun(context, nextInfo, targetId, nextId); Modified: modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/pojo/= POJOTestRunner.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/pojo/POJOTe= stRunner.java 2007-10-22 17:06:49 UTC (rev 8740) +++ modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/pojo/POJOTe= stRunner.java 2007-10-22 19:51:57 UTC (rev 8741) @@ -93,7 +93,7 @@ parametrizations.combine(context.getParametrizations()); = // Compute properties - Map properties =3D new HashMap= (def.getProperties()); + Map properties =3D new HashMap= (testClass.getProperties()); properties.putAll(context.getProperties()); = // Modified: modules/test/trunk/unit/src/main/org/jboss/unit/runner/model/Mode= lBuilder.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/runner/model/ModelBuild= er.java 2007-10-22 17:06:49 UTC (rev 8740) +++ modules/test/trunk/unit/src/main/org/jboss/unit/runner/model/ModelBuild= er.java 2007-10-22 19:51:57 UTC (rev 8741) @@ -228,7 +228,9 @@ String classname =3D nameAttr.getValue(); TestClassDef testClass =3D new TestClassDef(classname); = + // testClass.setParameters(buildParameters(testElt)); + testClass.setProperties(buildProperties(testElt)); = // for (Element caseElt : children(classElt, "case")) @@ -250,9 +252,6 @@ } = // - suite.setProperties(buildProperties(suiteElt)); - - // suite.setParameters(buildParameters(suiteElt)); = // Modified: modules/test/trunk/unit/src/main/org/jboss/unit/runner/model/Test= SuiteDef.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/runner/model/TestSuiteD= ef.java 2007-10-22 17:06:49 UTC (rev 8740) +++ modules/test/trunk/unit/src/main/org/jboss/unit/runner/model/TestSuiteD= ef.java 2007-10-22 19:51:57 UTC (rev 8741) @@ -40,9 +40,6 @@ /** . */ protected ParametersDef parameters =3D new ParametersDef(); = - /** . */ - protected Map properties =3D new HashMap(); - public ParametersDef getParameters() { return parameters; @@ -53,32 +50,6 @@ this.parameters =3D parameters; } = - public Map getProperties() - { - return properties; - } - - public void setProperties(Map properties) - { - this.properties =3D properties; - } - - public void setProperty(String name, String value) - { - if (name =3D=3D null) - { - throw new IllegalArgumentException(); - } - if (value =3D=3D null) - { - properties.remove(name); - } - else - { - properties.put(name, value); - } - } - public abstract TestRunner createRunner() throws BuilderException; = } Modified: modules/test/trunk/unit/src/main/org/jboss/unit/runner/model/gene= ric/GenericTestSuiteDef.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/runner/model/generic/Ge= nericTestSuiteDef.java 2007-10-22 17:06:49 UTC (rev 8740) +++ modules/test/trunk/unit/src/main/org/jboss/unit/runner/model/generic/Ge= nericTestSuiteDef.java 2007-10-22 19:51:57 UTC (rev 8741) @@ -29,6 +29,8 @@ = import java.util.List; import java.util.ArrayList; +import java.util.Map; +import java.util.HashMap; = /** * @author Julien Viet @@ -43,6 +45,9 @@ /** . */ private final String className; = + /** . */ + private Map properties =3D new HashMap(= ); + public GenericTestSuiteDef(String className) { this.className =3D className; @@ -71,4 +76,30 @@ { return tests; } + + public Map getProperties() + { + return properties; + } + + public void setProperties(Map properties) + { + this.properties =3D properties; + } + + public void setProperty(String name, String value) + { + if (name =3D=3D null) + { + throw new IllegalArgumentException(); + } + if (value =3D=3D null) + { + properties.remove(name); + } + else + { + properties.put(name, value); + } + } } Modified: modules/test/trunk/unit/src/main/org/jboss/unit/runner/model/pojo= /TestClassDef.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/org/jboss/unit/runner/model/pojo/TestC= lassDef.java 2007-10-22 17:06:49 UTC (rev 8740) +++ modules/test/trunk/unit/src/main/org/jboss/unit/runner/model/pojo/TestC= lassDef.java 2007-10-22 19:51:57 UTC (rev 8741) @@ -44,6 +44,9 @@ /** . */ private ParametersDef parameters =3D new ParametersDef(); = + /** . */ + private Map properties =3D new HashMap(= ); + public TestClassDef(String name) { if (name =3D=3D null) @@ -92,4 +95,30 @@ { this.parameters =3D parameters; } + + public Map getProperties() + { + return properties; + } + + public void setProperties(Map properties) + { + this.properties =3D properties; + } + + public void setProperty(String name, String value) + { + if (name =3D=3D null) + { + throw new IllegalArgumentException(); + } + if (value =3D=3D null) + { + properties.remove(name); + } + else + { + properties.put(name, value); + } + } } Modified: modules/test/trunk/unit/src/resources/test/org/jboss/test/unit/sa= mple/f1.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/resources/test/org/jboss/test/unit/sample/f= 1.xml 2007-10-22 17:06:49 UTC (rev 8740) +++ modules/test/trunk/unit/src/resources/test/org/jboss/test/unit/sample/f= 1.xml 2007-10-22 19:51:57 UTC (rev 8741) @@ -11,6 +11,7 @@ +
@@ -28,6 +29,11 @@ + + + + + --===============2900893012348819168==-- From portal-commits at lists.jboss.org Mon Oct 22 16:22:51 2007 Content-Type: multipart/mixed; boundary="===============2372860416693753485==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8742 - in modules/web/trunk: build/ide/intellij/idea60/modules/web and 10 other directories. Date: Mon, 22 Oct 2007 16:22:50 -0400 Message-ID: --===============2372860416693753485== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: julien(a)jboss.com Date: 2007-10-22 16:22:50 -0400 (Mon, 22 Oct 2007) New Revision: 8742 Added: modules/web/trunk/web/src/resources/test/config/log4j.properties modules/web/trunk/web/src/resources/test/local-jboss-unit.xml modules/web/trunk/web/src/resources/test/remote-jboss-unit.xml modules/web/trunk/web/src/resources/test/spi/jboss-4.2-container-servlet= /server-war/WEB-INF/jboss-web.xml modules/web/trunk/web/src/resources/test/spi/jboss-4.2-generic/server-wa= r/WEB-INF/jboss-web.xml Removed: modules/web/trunk/web/src/main/org/jboss/portal/test/web/spi/SPITestCase= .java modules/web/trunk/web/src/main/org/jboss/portal/test/web/spi/SPITestConf= ig.java modules/web/trunk/web/src/resources/portal-web-test-jar/org/jboss/portal= /test/web/spi/client-beans.xml Modified: modules/web/trunk/build/build-thirdparty.xml modules/web/trunk/build/ide/intellij/idea60/modules/web/web.iml modules/web/trunk/tools/etc/buildfragments/buildmagic.ent modules/web/trunk/tools/etc/buildfragments/defaults.ent modules/web/trunk/web/build.xml modules/web/trunk/web/src/main/org/jboss/portal/test/web/container/Servl= etContainerTestCase.java modules/web/trunk/web/src/main/org/jboss/portal/test/web/spi/SPITestServ= let.java modules/web/trunk/web/src/main/org/jboss/portal/test/web/spi/callbacks/A= bstractCallback.java modules/web/trunk/web/src/main/org/jboss/portal/test/web/spi/callbacks/E= xceptionCallback.java modules/web/trunk/web/src/main/org/jboss/portal/test/web/spi/callbacks/N= ormalCallback.java modules/web/trunk/web/src/resources/portal-web-test-jar/org/jboss/portal= /test/web/spi/server-beans.xml modules/web/trunk/web/src/resources/test/config/servers.xml Log: update web module to jboss unit Modified: modules/web/trunk/build/build-thirdparty.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/web/trunk/build/build-thirdparty.xml 2007-10-22 19:51:57 UTC (r= ev 8741) +++ modules/web/trunk/build/build-thirdparty.xml 2007-10-22 20:22:50 UTC (r= ev 8742) @@ -48,44 +48,39 @@ --> = - + + + = + + + = - - + + + - - - - - - + + + + + - + + - ---> + = = @@ -102,6 +97,4 @@ = - = - Modified: modules/web/trunk/build/ide/intellij/idea60/modules/web/web.iml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/web/trunk/build/ide/intellij/idea60/modules/web/web.iml 2007-10= -22 19:51:57 UTC (rev 8741) +++ modules/web/trunk/build/ide/intellij/idea60/modules/web/web.iml 2007-10= -22 20:22:50 UTC (rev 8742) @@ -65,7 +65,7 @@ - + @@ -74,7 +74,7 @@ - + @@ -83,12 +83,30 @@ - + + + + + + + + + + + + + + + + + + + Modified: modules/web/trunk/tools/etc/buildfragments/buildmagic.ent =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/web/trunk/tools/etc/buildfragments/buildmagic.ent 2007-10-22 19= :51:57 UTC (rev 8741) +++ modules/web/trunk/tools/etc/buildfragments/buildmagic.ent 2007-10-22 20= :22:50 UTC (rev 8742) @@ -165,15 +165,6 @@ = - - - - - - @@ -676,57 +667,6 @@ = - - - - - - - - - - - - - - - - - - - - - - - - - - - - Modified: modules/web/trunk/tools/etc/buildfragments/defaults.ent =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/web/trunk/tools/etc/buildfragments/defaults.ent 2007-10-22 19:5= 1:57 UTC (rev 8741) +++ modules/web/trunk/tools/etc/buildfragments/defaults.ent 2007-10-22 20:2= 2:50 UTC (rev 8742) @@ -118,8 +118,8 @@ = = - - + + = = + = @@ -95,7 +96,7 @@ - + = @@ -189,6 +190,68 @@ = = + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -203,14 +266,21 @@ - - - - + - - + + + + + + + + + + + + @@ -230,7 +300,21 @@ - + + + + + + + + + + + + + + + @@ -251,14 +335,21 @@ - - - - + - - + + + + + + + + + + + + @@ -279,6 +370,16 @@ + + + + + + + + + + @@ -299,6 +400,16 @@ + + + + + + + + + + @@ -338,8 +449,8 @@ wait=3D"${cargo.wait}"> - - + + @@ -501,7 +612,7 @@ = - + - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + - + + + + + + + + + + + + + - - - - - - - - - - - + + + + = + = - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + = - - - = + + + + - + + + + + + + + - - - - - - - - + + + + = + + + + + + + + + Modified: modules/web/trunk/web/src/main/org/jboss/portal/test/web/containe= r/ServletContainerTestCase.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/web/trunk/web/src/main/org/jboss/portal/test/web/container/Serv= letContainerTestCase.java 2007-10-22 19:51:57 UTC (rev 8741) +++ modules/web/trunk/web/src/main/org/jboss/portal/test/web/container/Serv= letContainerTestCase.java 2007-10-22 20:22:50 UTC (rev 8742) @@ -22,22 +22,26 @@ *************************************************************************= *****/ package org.jboss.portal.test.web.container; = -import junit.framework.TestCase; import org.jboss.portal.web.ServletContainer; import org.jboss.portal.web.WebAppListener; import org.jboss.portal.web.WebAppEvent; import org.jboss.portal.web.spi.ServletContainerContext; import org.jboss.portal.common.util.CollectionBuilder; import org.jboss.portal.test.web.WebAppRegistry; +import org.jboss.unit.api.pojo.annotations.Test; import EDU.oswego.cs.dl.util.concurrent.SynchronizedBoolean; = +import static org.jboss.unit.api.Assert.*; + /** * @author Julien Viet * @version $Revision: 1.1 $ */ -public class ServletContainerTestCase extends TestCase +(a)Test +public class ServletContainerTestCase { = + @Test public void testContextRegistrationLifeCycle() { ServletContainer container =3D new ServletContainer(); @@ -85,6 +89,7 @@ } } = + @Test public void testConcurrentContextRegistrations() { ServletContainer container =3D new ServletContainer(); @@ -113,6 +118,7 @@ assertNotNull(scc2.registration); } = + @Test public void testContextRegistrationCancellationUnregistersWebApps() { ServletContainer container =3D new ServletContainer(); @@ -135,6 +141,7 @@ assertEquals(new CollectionBuilder().toHashSet(), registry.getKeys()= ); } = + @Test public void testListenerDoubleRegistration() { ServletContainer container =3D new ServletContainer(); @@ -163,6 +170,7 @@ assertEquals(new CollectionBuilder().toHashSet(), registry.getKeys()= ); } = + @Test public void testListenerIsNotified() { ServletContainer container =3D new ServletContainer(); @@ -207,6 +215,7 @@ assertEquals(new CollectionBuilder().toHashSet(), registry.getKeys()= ); } = + @Test public void testServletContainerThrowsIAE() { ServletContainer container =3D new ServletContainer(); @@ -236,6 +245,7 @@ } } = + @Test public void testServletContainerThrowsISE() throws Exception { ServletContainer container =3D new ServletContainer(); @@ -249,6 +259,7 @@ } } = + @Test public void testListenerFailure() { ServletContainer container =3D new ServletContainer(); Deleted: modules/web/trunk/web/src/main/org/jboss/portal/test/web/spi/SPITe= stCase.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/web/trunk/web/src/main/org/jboss/portal/test/web/spi/SPITestCas= e.java 2007-10-22 19:51:57 UTC (rev 8741) +++ modules/web/trunk/web/src/main/org/jboss/portal/test/web/spi/SPITestCas= e.java 2007-10-22 20:22:50 UTC (rev 8742) @@ -1,158 +0,0 @@ -/*************************************************************************= ***** - * JBoss, a division of Red Hat = * - * Copyright 2006, Red Hat Middleware, LLC, and individual = * - * contributors as indicated by the @authors tag. See the = * - * copyright.txt in the distribution for a full listing of = * - * individual contributors. = * - * = * - * This is free software; you can redistribute it and/or modify it = * - * under the terms of the GNU Lesser General Public License as = * - * published by the Free Software Foundation; either version 2.1 of = * - * the License, or (at your option) any later version. = * - * = * - * This software is distributed in the hope that it will be useful, = * - * but WITHOUT ANY WARRANTY; without even the implied warranty of = * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU = * - * Lesser General Public License for more details. = * - * = * - * You should have received a copy of the GNU Lesser General Public = * - * License along with this software; if not, write to the Free = * - * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA = * - * 02110-1301 USA, or see the FSF site: http://www.fsf.org. = * - *************************************************************************= *****/ -package org.jboss.portal.test.web.spi; - -import junit.framework.TestCase; -import junit.framework.TestResult; -import org.jboss.portal.test.framework.mc.TestRuntimeContext; -import org.jboss.portal.test.framework.deployment.Deployer; -import org.jboss.portal.test.framework.server.NodeManager; -import org.jboss.portal.test.framework.driver.TestDriver; -import org.jboss.portal.test.framework.junit.JUnitAdapter; - -/** - * @author Julien Viet - * @version $Revision: 1.1 $ - */ -public class SPITestCase extends TestCase -{ - - /** The deployer. */ - private Deployer deployer; - - /** The node manager. */ - private NodeManager nodeManager; - - /** . */ - private TestRuntimeContext runtimeContext; - - /** . */ - private TestDriver testDriver; - - /** . */ - private JUnitAdapter adapter; - - /** . */ - private SPITestConfig config; - - public SPITestConfig getConfig() - { - return config; - } - - public void setConfig(SPITestConfig config) - { - this.config =3D config; - } - - public Deployer getDeployer() - { - return deployer; - } - - public void setDeployer(Deployer deployer) - { - this.deployer =3D deployer; - } - - public NodeManager getNodeManager() - { - return nodeManager; - } - - public void setNodeManager(NodeManager nodeManager) - { - this.nodeManager =3D nodeManager; - } - - public TestDriver getTestDriver() - { - return testDriver; - } - - public void setTestDriver(TestDriver testDriver) - { - this.testDriver =3D testDriver; - } - - public JUnitAdapter getAdapter() - { - return adapter; - } - - public void setAdapter(JUnitAdapter adapter) - { - this.adapter =3D adapter; - } - - public void run(TestResult testResult) - { - try - { - runtimeContext =3D new TestRuntimeContext("org/jboss/portal/test/= web/spi/client-beans.xml"); - runtimeContext.addBean("This", this); - runtimeContext.addBean("Config", new SPITestConfig()); - runtimeContext.start(); - } - catch (Exception e) - { - try - { - this.e =3D e; - - // - super.run(testResult); - } - catch (Exception e1) - { - this.e =3D null; - } - - // - return; - } - - // - try - { - adapter.run(testResult); - } - finally - { - runtimeContext.stop(); - } - } - - /** . */ - private Exception e; - - public void runBare() throws Throwable - { - throw e; - } - - public void testDummy() - { - throw new UnsupportedOperationException(); - } -} Deleted: modules/web/trunk/web/src/main/org/jboss/portal/test/web/spi/SPITe= stConfig.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/web/trunk/web/src/main/org/jboss/portal/test/web/spi/SPITestCon= fig.java 2007-10-22 19:51:57 UTC (rev 8741) +++ modules/web/trunk/web/src/main/org/jboss/portal/test/web/spi/SPITestCon= fig.java 2007-10-22 20:22:50 UTC (rev 8742) @@ -1,62 +0,0 @@ -/*************************************************************************= ***** - * JBoss, a division of Red Hat = * - * Copyright 2006, Red Hat Middleware, LLC, and individual = * - * contributors as indicated by the @authors tag. See the = * - * copyright.txt in the distribution for a full listing of = * - * individual contributors. = * - * = * - * This is free software; you can redistribute it and/or modify it = * - * under the terms of the GNU Lesser General Public License as = * - * published by the Free Software Foundation; either version 2.1 of = * - * the License, or (at your option) any later version. = * - * = * - * This software is distributed in the hope that it will be useful, = * - * but WITHOUT ANY WARRANTY; without even the implied warranty of = * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU = * - * Lesser General Public License for more details. = * - * = * - * You should have received a copy of the GNU Lesser General Public = * - * License along with this software; if not, write to the Free = * - * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA = * - * 02110-1301 USA, or see the FSF site: http://www.fsf.org. = * - *************************************************************************= *****/ -package org.jboss.portal.test.web.spi; - -import org.jboss.portal.test.framework.TestParametrization; -import org.jboss.portal.test.framework.TestParameterValue; -import org.jboss.portal.test.framework.junit.JUnitAdapter; - -/** - * @author Julien Viet - * @version $Revision: 1.1 $ - */ -public class SPITestConfig -{ - - public String getArchivePath() - { - return System.getProperty("test.root"); - } - - /** - * Returns the server name from the test parametrization. If no value i= s found then it - * returns the litteral string RemoteTomcat-6.0. - * - * @return the server name - */ - public String getServerName() - { - TestParametrization parametrization =3D JUnitAdapter.getParametrizat= ion(); - TestParameterValue archive =3D parametrization.getParameterValue("se= rverName"); - - // - if (archive !=3D null) - { - return (String)archive.get(); - } - else - { - return "RemoteTomcat-6.0"; - } - } -} Modified: modules/web/trunk/web/src/main/org/jboss/portal/test/web/spi/SPIT= estServlet.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/web/trunk/web/src/main/org/jboss/portal/test/web/spi/SPITestSer= vlet.java 2007-10-22 19:51:57 UTC (rev 8741) +++ modules/web/trunk/web/src/main/org/jboss/portal/test/web/spi/SPITestSer= vlet.java 2007-10-22 20:22:50 UTC (rev 8742) @@ -22,19 +22,6 @@ *************************************************************************= *****/ package org.jboss.portal.test.web.spi; = -import org.jboss.portal.test.framework.driver.TestDriverContainer; -import org.jboss.portal.test.framework.driver.DriverResponse; -import org.jboss.portal.test.framework.driver.DriverCommand; -import org.jboss.portal.test.framework.driver.TestDriverException; -import org.jboss.portal.test.framework.driver.http.response.InvokeGetRespo= nse; -import org.jboss.portal.test.framework.driver.remote.RemoteTestDriver; -import org.jboss.portal.test.framework.driver.remote.TestContext; -import org.jboss.portal.test.framework.driver.remote.response.DeployRespon= se; -import org.jboss.portal.test.framework.driver.remote.response.UndeployResp= onse; -import org.jboss.portal.test.framework.driver.response.EndTestResponse; -import org.jboss.portal.test.framework.driver.response.FailureResponse; -import org.jboss.portal.test.framework.info.TestItemInfo; -import org.jboss.portal.test.framework.info.TestInfo; import org.jboss.portal.test.web.WebAppRegistry; import org.jboss.portal.test.web.spi.callbacks.NormalCallback; import org.jboss.portal.test.web.spi.callbacks.ExceptionCallback; @@ -42,6 +29,25 @@ import org.jboss.portal.web.WebApp; import org.jboss.portal.web.ServletContextDispatcher; import org.jboss.portal.web.impl.DefaultServletContainerFactory; +import org.jboss.unit.info.TestInfo; +import org.jboss.unit.info.impl.SimpleTestCaseInfo; +import org.jboss.unit.driver.DriverResponse; +import org.jboss.unit.driver.DriverCommand; +import org.jboss.unit.driver.DriverContext; +import org.jboss.unit.driver.DriverException; +import org.jboss.unit.driver.impl.composite.CompositeTestDriver; +import org.jboss.unit.driver.response.FailureResponse; +import org.jboss.unit.driver.response.EndTestResponse; +import org.jboss.unit.remote.driver.RemoteTestDriverServer; +import org.jboss.unit.remote.driver.RemoteTestDriver; +import org.jboss.unit.remote.driver.CompositeRemoteTestDriver; +import org.jboss.unit.remote.driver.handler.deployer.response.UndeployResp= onse; +import org.jboss.unit.remote.driver.handler.deployer.response.DeployRespon= se; +import org.jboss.unit.remote.driver.handler.http.response.InvokeGetRespons= e; +import org.jboss.unit.remote.ResponseContext; +import org.jboss.unit.remote.RequestContext; +import org.jboss.unit.Failure; +import org.jboss.unit.TestId; = import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; @@ -49,8 +55,11 @@ import javax.servlet.ServletException; import javax.servlet.ServletContext; import java.io.IOException; +import java.io.Serializable; import java.util.Set; import java.util.HashSet; +import java.util.HashMap; +import java.util.Collection; = /** * @author Julien Viet @@ -60,53 +69,69 @@ { = /** . */ - private TestInfo info =3D new TestInfo("Main"); + private TestInfo info =3D new SimpleTestCaseInfo("test"); = /** . */ private WebAppRegistry registry; = /** . */ - private Set keys; + private Set keys; = /** . */ private ServletContainer container; = + /** . */ + private RemoteTestDriverServer driver; + + /** . */ + private RequestContext requestContext; + + /** . */ + private ResponseContext responseContext; + public void init() throws ServletException { - TestDriverContainer driver =3D (TestDriverContainer)getServletContex= t().getAttribute("TestDriverServer"); - driver.addDriver(this); + try + { + CompositeTestDriver suite =3D new CompositeTestDriver(getClass().= getName()); + CompositeRemoteTestDriver remoteSuite =3D new CompositeRemoteTest= Driver(suite); + suite.mount(this); + driver =3D (RemoteTestDriverServer)getServletContext().getAttribu= te("TestDriverServer"); + driver.setDelegate(remoteSuite); + } + catch (DriverException e) + { + throw new ServletException(e); + } } = - private TestContext testContext; - - public void pushContext(String testId, TestContext testContext) + public void destroy() { - this.testContext =3D testContext; + driver.setDelegate(null); + driver =3D null; } = - public TestContext popContext(String string) + + public void initDriver(DriverContext driverContext) { - return testContext; + } = - public void destroy() + public void destroyDriver() { - TestDriverContainer driver =3D (TestDriverContainer)getServletContex= t().getAttribute("TestDriverServer"); - driver.removeDriver(this); + = } = protected void service(HttpServletRequest req, HttpServletResponse resp= ) throws ServletException, IOException { DriverResponse response =3D service2(req, resp); - testContext.setResponse(response); + responseContext =3D new ResponseContext(response, new HashMap()); resp.setStatus(200); } = private DriverResponse service2(HttpServletRequest req, HttpServletResp= onse resp) throws ServletException, IOException { - - // - if (testContext.isRequestCount(1)) + if (requestContext.isRequestCount(1)) { // Should try ServletContext appContext =3D getServletContext().getContext("/te= st-spi-app"); @@ -114,7 +139,7 @@ // if (appContext =3D=3D null) { - return new FailureResponse("Cannot get access to the /test-spi= -app servlet context"); + return new FailureResponse(Failure.createErrorFailure("Cannot = get access to the /test-spi-app servlet context")); } = // @@ -146,12 +171,12 @@ // Now we undeploy return new UndeployResponse("test-spi-app.war"); } - else if (testContext.isRequestCount(2)) + else if (requestContext.isRequestCount(2)) { if (!keys.equals(registry.getKeys())) { - return new FailureResponse("The set of deployed web applicatio= ns " + registry.getKeys() + " is not equals to the expected set " + - keys); + return new FailureResponse(Failure.createAssertionFailure("The= set of deployed web applications " + registry.getKeys() + " is not equals = to the expected set " + + keys)); } = // Remove registration @@ -160,7 +185,7 @@ // if (registry.getKeys().size() > 0) { - return new FailureResponse("The set of deployed web applicatio= n should be empty instead of " + registry.getKeys()); + return new FailureResponse(Failure.createAssertionFailure("The= set of deployed web application should be empty instead of " + registry.ge= tKeys())); } else { @@ -169,59 +194,70 @@ } = // - return new FailureResponse(); + return new FailureResponse(Failure.createAssertionFailure("")); } = - public TestItemInfo getInfo() + + public void pushContext(TestId testId, RequestContext requestContext) { + this.requestContext =3D requestContext; + } + + public ResponseContext popContext(TestId testId) + { + return responseContext; + } + + public TestInfo getInfo() + { return info; } = - public DriverResponse invoke(String string, DriverCommand driverCommand= ) throws TestDriverException + public DriverResponse invoke(TestId testId, DriverCommand driverCommand) { - if (testContext.isRequestCount(-1)) + if (requestContext.isRequestCount(-1)) { container =3D DefaultServletContainerFactory.getInstance().getSer= vletContainer(); if (container =3D=3D null) { - return new FailureResponse("No servlet container present"); + return new FailureResponse(Failure.createAssertionFailure("No = servlet container present")); } = // Register and save the deployed web apps registry =3D new WebAppRegistry(); container.addWebAppListener(registry); - keys =3D new HashSet(registry.getKeys()); + keys =3D new HashSet((Collection)regist= ry.getKeys()); = // Deploy the application web app return new DeployResponse("test-spi-app.war"); } - else if (testContext.isRequestCount(0)) + else if (requestContext.isRequestCount(0)) { // Compute the difference with the previous deployed web apps - Set diff =3D new HashSet(registry.getKeys()); + Set diff =3D new HashSet((Collection)re= gistry.getKeys()); diff.removeAll(keys); = // It should be 1 if (diff.size() !=3D 1) { - return new FailureResponse("The size of the new web applicatio= n deployed should be 1, it is " + diff.size() + " instead." + - "The previous set was " + keys + " and the new set is " + regi= stry.getKeys()); + return new FailureResponse(Failure.createAssertionFailure("The= size of the new web application deployed should be 1, it is " + diff.size(= ) + " instead." + + "The previous set was " + keys + " and the new set is " + regi= stry.getKeys())); } String key =3D (String)diff.iterator().next(); if (!"/test-spi-app".equals(key)) { - return new FailureResponse("The newly deployed web application= should be /test-spi-war and it is " + key); + return new FailureResponse(Failure.createAssertionFailure("The= newly deployed web application should be /test-spi-war and it is " + key)); } = // WebApp webApp =3D registry.getWebApp("/test-spi-app"); if (webApp =3D=3D null) { - return new FailureResponse("The web app /test-spi-app was not = found"); + return new FailureResponse(Failure.createAssertionFailure("The= web app /test-spi-app was not found")); } if (!"/test-spi-app".equals(webApp.getContextPath())) { - return new FailureResponse("The web app context is not equals = to the expected value but has the value " + webApp.getContextPath()); + return new FailureResponse(Failure.createAssertionFailure("The= web app context is not equals to the expected value but has the value " + = webApp.getContextPath())); } = // @@ -229,7 +265,7 @@ } else { - return new FailureResponse(); + return new FailureResponse(Failure.createAssertionFailure("")); } } } Modified: modules/web/trunk/web/src/main/org/jboss/portal/test/web/spi/call= backs/AbstractCallback.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/web/trunk/web/src/main/org/jboss/portal/test/web/spi/callbacks/= AbstractCallback.java 2007-10-22 19:51:57 UTC (rev 8741) +++ modules/web/trunk/web/src/main/org/jboss/portal/test/web/spi/callbacks/= AbstractCallback.java 2007-10-22 20:22:50 UTC (rev 8742) @@ -22,9 +22,9 @@ *************************************************************************= *****/ package org.jboss.portal.test.web.spi.callbacks; = -import org.jboss.portal.test.framework.driver.DriverResponse; import org.jboss.portal.web.RequestDispatchCallback; import org.jboss.portal.web.ServletContextDispatcher; +import org.jboss.unit.driver.DriverResponse; = /** * @author Julien Viet Modified: modules/web/trunk/web/src/main/org/jboss/portal/test/web/spi/call= backs/ExceptionCallback.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/web/trunk/web/src/main/org/jboss/portal/test/web/spi/callbacks/= ExceptionCallback.java 2007-10-22 19:51:57 UTC (rev 8741) +++ modules/web/trunk/web/src/main/org/jboss/portal/test/web/spi/callbacks/= ExceptionCallback.java 2007-10-22 20:22:50 UTC (rev 8742) @@ -22,9 +22,10 @@ *************************************************************************= *****/ package org.jboss.portal.test.web.spi.callbacks; = -import org.jboss.portal.test.framework.driver.DriverResponse; -import org.jboss.portal.test.framework.driver.response.FailureResponse; import org.jboss.portal.web.ServletContextDispatcher; +import org.jboss.unit.driver.DriverResponse; +import org.jboss.unit.driver.response.FailureResponse; +import org.jboss.unit.Failure; = import javax.servlet.ServletContext; import javax.servlet.ServletException; @@ -62,7 +63,7 @@ dispatcher.include(target, this, null); = // - return new FailureResponse("Got no throwable thrown was expecting= " + expectedThrowable); + return new FailureResponse(Failure.createAssertionFailure("Got no= throwable thrown was expecting " + expectedThrowable)); } catch (Throwable throwable) { @@ -72,7 +73,7 @@ } if (expectedThrowable !=3D throwable) { - return new FailureResponse("Got throwable " + throwable + " in= stead of throwable " + expectedThrowable); + return new FailureResponse(Failure.createAssertionFailure("Got= throwable " + throwable + " instead of throwable " + expectedThrowable)); } } = Modified: modules/web/trunk/web/src/main/org/jboss/portal/test/web/spi/call= backs/NormalCallback.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/web/trunk/web/src/main/org/jboss/portal/test/web/spi/callbacks/= NormalCallback.java 2007-10-22 19:51:57 UTC (rev 8741) +++ modules/web/trunk/web/src/main/org/jboss/portal/test/web/spi/callbacks/= NormalCallback.java 2007-10-22 20:22:50 UTC (rev 8742) @@ -23,8 +23,9 @@ package org.jboss.portal.test.web.spi.callbacks; = import org.jboss.portal.web.ServletContextDispatcher; -import org.jboss.portal.test.framework.driver.DriverResponse; -import org.jboss.portal.test.framework.driver.response.FailureResponse; +import org.jboss.unit.driver.response.FailureResponse; +import org.jboss.unit.driver.DriverResponse; +import org.jboss.unit.Failure; = import javax.servlet.ServletContext; import javax.servlet.ServletException; @@ -91,24 +92,24 @@ // if (!invoked) { - return new FailureResponse("The callback was not invoked"); + return new FailureResponse(Failure.createAssertionFailure("The= callback was not invoked")); } if (expectedHandback !=3D handback) { - return new FailureResponse("The provided handback is not the s= ame than the expected handback"); + return new FailureResponse(Failure.createAssertionFailure("The= provided handback is not the same than the expected handback")); } if (expectedReturnedValue !=3D returnedValue) { - return new FailureResponse("The returned value is not the same= than the expected one"); + return new FailureResponse(Failure.createAssertionFailure("The= returned value is not the same than the expected one")); } if (expectedThreadContextClassLoader !=3D threadContextClassLoade= r) { - return new FailureResponse("The thread context class loader is= not the same than the expected one"); + return new FailureResponse(Failure.createAssertionFailure("The= thread context class loader is not the same than the expected one")); } } catch (Exception e) { - return new FailureResponse(e); + return new FailureResponse(Failure.createErrorFailure(e)); } = // Deleted: modules/web/trunk/web/src/resources/portal-web-test-jar/org/jboss/= portal/test/web/spi/client-beans.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/web/trunk/web/src/resources/portal-web-test-jar/org/jboss/porta= l/test/web/spi/client-beans.xml 2007-10-22 19:51:57 UTC (rev 8741) +++ modules/web/trunk/web/src/resources/portal-web-test-jar/org/jboss/porta= l/test/web/spi/client-beans.xml 2007-10-22 20:22:50 UTC (rev 8742) @@ -1,89 +0,0 @@ - - - - - - - - - - Config - - - - - - servers.xml - - - - - - - - default - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - This - - - - - - - - - Modified: modules/web/trunk/web/src/resources/portal-web-test-jar/org/jboss= /portal/test/web/spi/server-beans.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/web/trunk/web/src/resources/portal-web-test-jar/org/jboss/porta= l/test/web/spi/server-beans.xml 2007-10-22 19:51:57 UTC (rev 8741) +++ modules/web/trunk/web/src/resources/portal-web-test-jar/org/jboss/porta= l/test/web/spi/server-beans.xml 2007-10-22 20:22:50 UTC (rev 8742) @@ -27,14 +27,14 @@ xsi:schemaLocation=3D"urn:jboss:bean-deployer bean-deployer_1_= 0.xsd" xmlns=3D"urn:jboss:bean-deployer"> = - + = socket://localhost:5400 - org.jboss.portal.test.framework.driver.remote.RemoteTe= stDriver + org.jboss.unit.remote.driver.RemoteTestDriver = Added: modules/web/trunk/web/src/resources/test/config/log4j.properties =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/web/trunk/web/src/resources/test/config/log4j.properties = (rev 0) +++ modules/web/trunk/web/src/resources/test/config/log4j.properties 2007-1= 0-22 20:22:50 UTC (rev 8742) @@ -0,0 +1,13 @@ +### =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D ### +## = ## +## JBoss Bootstrap Log4j Configuration = ## +## = ## +### =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D ### + +log4j.rootCategory=3DALL, CONSOLE + +log4j.appender.CONSOLE=3Dorg.apache.log4j.ConsoleAppender +log4j.appender.CONSOLE.Threshold=3DDEBUG +log4j.appender.CONSOLE.Target=3DSystem.out +log4j.appender.CONSOLE.layout=3Dorg.apache.log4j.PatternLayout +log4j.appender.CONSOLE.layout.ConversionPattern=3D%d{ABSOLUTE} %-5p [%c{1}= ] %m%n Modified: modules/web/trunk/web/src/resources/test/config/servers.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/web/trunk/web/src/resources/test/config/servers.xml 2007-10-22 = 19:51:57 UTC (rev 8741) +++ modules/web/trunk/web/src/resources/test/config/servers.xml 2007-10-22 = 20:22:50 UTC (rev 8742) @@ -5,7 +5,7 @@ default TestDriverServer - org.jboss.portal.test.framework.driver.remote.Remot= eTestDriver + org.jboss.unit.remote.driver.RemoteTestDriver socket://localhost:5400 @@ -27,7 +27,7 @@ default TestDriverServer - org.jboss.portal.test.framework.driver.remote.Remot= eTestDriver + org.jboss.unit.remote.driver.RemoteTestDriver socket://localhost:5400 @@ -45,7 +45,7 @@ default TestDriverServer - org.jboss.portal.test.framework.driver.remote.Remot= eTestDriver + org.jboss.unit.remote.driver.RemoteTestDriver socket://localhost:5400 Added: modules/web/trunk/web/src/resources/test/local-jboss-unit.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/web/trunk/web/src/resources/test/local-jboss-unit.xml = (rev 0) +++ modules/web/trunk/web/src/resources/test/local-jboss-unit.xml 2007-10-2= 2 20:22:50 UTC (rev 8742) @@ -0,0 +1,11 @@ + + + + + + + + Added: modules/web/trunk/web/src/resources/test/remote-jboss-unit.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/web/trunk/web/src/resources/test/remote-jboss-unit.xml = (rev 0) +++ modules/web/trunk/web/src/resources/test/remote-jboss-unit.xml 2007-10-= 22 20:22:50 UTC (rev 8742) @@ -0,0 +1,9 @@ + + + + + + Added: modules/web/trunk/web/src/resources/test/spi/jboss-4.2-container-ser= vlet/server-war/WEB-INF/jboss-web.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/web/trunk/web/src/resources/test/spi/jboss-4.2-container-servle= t/server-war/WEB-INF/jboss-web.xml (rev 0) +++ modules/web/trunk/web/src/resources/test/spi/jboss-4.2-container-servle= t/server-war/WEB-INF/jboss-web.xml 2007-10-22 20:22:50 UTC (rev 8742) @@ -0,0 +1,31 @@ + + + + + + test:loader=3Dportlet + + \ No newline at end of file Added: modules/web/trunk/web/src/resources/test/spi/jboss-4.2-generic/serve= r-war/WEB-INF/jboss-web.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/web/trunk/web/src/resources/test/spi/jboss-4.2-generic/server-w= ar/WEB-INF/jboss-web.xml (rev 0) +++ modules/web/trunk/web/src/resources/test/spi/jboss-4.2-generic/server-w= ar/WEB-INF/jboss-web.xml 2007-10-22 20:22:50 UTC (rev 8742) @@ -0,0 +1,31 @@ + + + + + + test:loader=3Dportlet + + \ No newline at end of file --===============2372860416693753485==-- From portal-commits at lists.jboss.org Mon Oct 22 16:41:30 2007 Content-Type: multipart/mixed; boundary="===============0328898077193485452==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8743 - modules/web/trunk/web. Date: Mon, 22 Oct 2007 16:41:30 -0400 Message-ID: --===============0328898077193485452== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: julien(a)jboss.com Date: 2007-10-22 16:41:30 -0400 (Mon, 22 Oct 2007) New Revision: 8743 Modified: modules/web/trunk/web/build.xml Log: adjust output dir for reports Modified: modules/web/trunk/web/build.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/web/trunk/web/build.xml 2007-10-22 20:22:50 UTC (rev 8742) +++ modules/web/trunk/web/build.xml 2007-10-22 20:41:30 UTC (rev 8743) @@ -481,7 +481,7 @@ - + @@ -495,7 +495,7 @@ - + @@ -590,7 +590,7 @@ - + @@ -605,7 +605,7 @@ - + @@ -718,13 +718,13 @@ = - + = - - + + = --===============0328898077193485452==-- From portal-commits at lists.jboss.org Mon Oct 22 22:50:18 2007 Content-Type: multipart/mixed; boundary="===============7662281280477041173==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8744 - in branches/JBoss_Portal_Branch_2_6: core/src/main/org/jboss/portal/core/impl/api/node and 3 other directories. Date: Mon, 22 Oct 2007 22:50:17 -0400 Message-ID: --===============7662281280477041173== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: chris.laprun(a)jboss.com Date: 2007-10-22 22:50:17 -0400 (Mon, 22 Oct 2007) New Revision: 8744 Modified: branches/JBoss_Portal_Branch_2_6/core-admin/src/main/org/jboss/portal/co= re/admin/ui/PortalObjectManagerBean.java branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-admin-w= ar/WEB-INF/faces-config.xml branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-admin-w= ar/WEB-INF/jboss-portlet.xml branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-admin-w= ar/WEB-INF/jsf/editProperties.xhtml branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/core/eve= nt/PortalEventListenerRegistry.java branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/core/eve= nt/PortalEventListenerRegistryImpl.java branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/core/imp= l/api/node/PortalNodeEventContextImpl.java Log: - JBPORTAL-1771: Added support to set listener on portal nodes graphically = in the admin GUI. Modified: branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/c= ore/event/PortalEventListenerRegistry.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/core/ev= ent/PortalEventListenerRegistry.java 2007-10-22 20:41:30 UTC (rev 8743) +++ branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/core/ev= ent/PortalEventListenerRegistry.java 2007-10-23 02:50:17 UTC (rev 8744) @@ -23,6 +23,7 @@ package org.jboss.portal.core.event; = import java.util.Collection; +import java.util.Set; = /** * @author Julien Viet @@ -50,4 +51,12 @@ * */ Collection getListeners(); + + /** + * Returns the set of String identifiers for all currently registered l= isteners. + * + * @return the set of String identifiers for all currently registered l= isteners. + * @since 2.6.3 + */ + Set getListenerIds(); } Modified: branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/c= ore/event/PortalEventListenerRegistryImpl.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/core/ev= ent/PortalEventListenerRegistryImpl.java 2007-10-22 20:41:30 UTC (rev 8743) +++ branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/core/ev= ent/PortalEventListenerRegistryImpl.java 2007-10-23 02:50:17 UTC (rev 8744) @@ -22,10 +22,11 @@ *************************************************************************= *****/ package org.jboss.portal.core.event; = +import org.jboss.portal.common.util.CopyOnWriteRegistry; import org.jboss.portal.jems.as.system.AbstractJBossService; -import org.jboss.portal.common.util.CopyOnWriteRegistry; = import java.util.Collection; +import java.util.Set; = /** * @author Julien Viet @@ -57,4 +58,9 @@ return listeners.getRegistrations(); } = + public Set getListenerIds() + { + return listeners.getKeys(); + } + } Modified: branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/c= ore/impl/api/node/PortalNodeEventContextImpl.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/core/im= pl/api/node/PortalNodeEventContextImpl.java 2007-10-22 20:41:30 UTC (rev 87= 43) +++ branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/core/im= pl/api/node/PortalNodeEventContextImpl.java 2007-10-23 02:50:17 UTC (rev 87= 44) @@ -22,11 +22,11 @@ *************************************************************************= *****/ package org.jboss.portal.core.impl.api.node; = +import org.jboss.portal.api.PortalRuntimeContext; +import org.jboss.portal.api.node.PortalNode; +import org.jboss.portal.api.node.event.PortalNodeEvent; import org.jboss.portal.api.node.event.PortalNodeEventContext; -import org.jboss.portal.api.node.event.PortalNodeEvent; import org.jboss.portal.api.node.event.PortalNodeEventListener; -import org.jboss.portal.api.node.PortalNode; -import org.jboss.portal.api.PortalRuntimeContext; import org.jboss.portal.core.event.PortalEventListenerRegistry; = /** @@ -68,9 +68,10 @@ public PortalNodeEvent dispatch() { PortalNodeEventListener listener =3D null; - if (node.object.getListener() !=3D null) + String listenerId =3D node.object.getListener(); + if (listenerId !=3D null && listenerId.length() > 0) { - Object tmp =3D registry.getListener(node.object.getListener()); + Object tmp =3D registry.getListener(listenerId); if (tmp !=3D null && tmp instanceof PortalNodeEventListener) { listener =3D (PortalNodeEventListener)tmp; Modified: branches/JBoss_Portal_Branch_2_6/core-admin/src/main/org/jboss/po= rtal/core/admin/ui/PortalObjectManagerBean.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/core-admin/src/main/org/jboss/portal/c= ore/admin/ui/PortalObjectManagerBean.java 2007-10-22 20:41:30 UTC (rev 8743) +++ branches/JBoss_Portal_Branch_2_6/core-admin/src/main/org/jboss/portal/c= ore/admin/ui/PortalObjectManagerBean.java 2007-10-23 02:50:17 UTC (rev 8744) @@ -26,6 +26,7 @@ import org.jboss.portal.core.admin.ui.actions.PropertyAction; import org.jboss.portal.core.admin.ui.common.PageManagerBean; import org.jboss.portal.core.admin.ui.portlet.PortletDefinitionInvoker; +import org.jboss.portal.core.event.PortalEventListenerRegistry; import org.jboss.portal.core.impl.model.content.ContentProviderRegistrySer= vice; import org.jboss.portal.core.model.content.Content; import org.jboss.portal.core.model.content.ContentType; @@ -99,6 +100,9 @@ /** . */ private RoleModule roleModule; = + /** Listener registry to bind even listener to PortalNodes. */ + private PortalEventListenerRegistry listenerRegistry; + // Navigational state = /** The selected id. */ @@ -206,6 +210,16 @@ return null; } = + public PortalEventListenerRegistry getListenerRegistry() + { + return listenerRegistry; + } + + public void setListenerRegistry(PortalEventListenerRegistry listenerReg= istry) + { + this.listenerRegistry =3D listenerRegistry; + } + public RoleModule getRoleModule() { return roleModule; @@ -800,4 +814,23 @@ { return controlProperties; } + + public SelectItem[] getListenerIds() + { + Set ids =3D listenerRegistry.getListenerIds(); + if (ids !=3D null) + { + SelectItem[] result =3D new SelectItem[ids.size() + 1]; + int i =3D 1; + result[0] =3D new SelectItem("", "no bound listener"); + for (Iterator idsIt =3D ids.iterator(); idsIt.hasNext();) + { + result[i++] =3D new SelectItem(idsIt.next()); + } + + return result; + } + + return null; + } } Modified: branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-= admin-war/WEB-INF/faces-config.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-admin-= war/WEB-INF/faces-config.xml 2007-10-22 20:41:30 UTC (rev 8743) +++ branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-admin-= war/WEB-INF/faces-config.xml 2007-10-23 02:50:17 UTC (rev 8744) @@ -75,6 +75,10 @@ domainConfigurator #{applicationScope.AuthorizationDomainRegistry.portalobjec= t.configurator} + + listenerRegistry + #{applicationScope.ListenerRegistry} + portalAction Modified: branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-= admin-war/WEB-INF/jboss-portlet.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-admin-= war/WEB-INF/jboss-portlet.xml 2007-10-22 20:41:30 UTC (rev 8743) +++ branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-admin-= war/WEB-INF/jboss-portlet.xml 2007-10-23 02:50:17 UTC (rev 8744) @@ -124,4 +124,9 @@ org.jboss.portal.portlet.federation.FederatingPortlet= Invoker :service=3DPortletInvoker,type=3DFederating + + ListenerRegistry + org.jboss.portal.core.event.PortalEventListenerRegist= ry + portal:service=3DListenerRegistry + Modified: branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-= admin-war/WEB-INF/jsf/editProperties.xhtml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-admin-= war/WEB-INF/jsf/editProperties.xhtml 2007-10-22 20:41:30 UTC (rev 8743) +++ branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-admin-= war/WEB-INF/jsf/editProperties.xhtml 2007-10-23 02:50:17 UTC (rev 8744) @@ -1,22 +1,37 @@
+ xmlns=3D"http://www.w3.org/1999/xhtml" + xmlns:f=3D"http://java.sun.com/jsf/core" + xmlns:ui=3D"http://java.sun.com/jsf/facelets" + xmlns:h=3D"http://java.sun.com/jsf/html" + xmlns:c=3D"http://java.sun.com/jstl/core"> = = = - = - - + +

Event Listener Binding

+ +
+ + + Choose the id of the PortalEventListener to bind to this= #{portalobjectmgr.selectedObjectType}: + + + + + + +
+ + + =
- + = @@ -36,6 +51,6 @@ =
- = +
\ No newline at end of file --===============7662281280477041173==-- From portal-commits at lists.jboss.org Mon Oct 22 22:52:33 2007 Content-Type: multipart/mixed; boundary="===============6895427258342105981==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8745 - in trunk: core/src/main/org/jboss/portal/core/impl/api/node and 3 other directories. Date: Mon, 22 Oct 2007 22:52:32 -0400 Message-ID: --===============6895427258342105981== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: chris.laprun(a)jboss.com Date: 2007-10-22 22:52:32 -0400 (Mon, 22 Oct 2007) New Revision: 8745 Modified: trunk/core-admin/src/main/org/jboss/portal/core/admin/ui/PortalObjectMan= agerBean.java trunk/core-admin/src/resources/portal-admin-war/WEB-INF/faces-config.xml trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jboss-portlet.xml trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/editProperti= es.xhtml trunk/core/src/main/org/jboss/portal/core/event/PortalEventListenerRegis= try.java trunk/core/src/main/org/jboss/portal/core/event/PortalEventListenerRegis= tryImpl.java trunk/core/src/main/org/jboss/portal/core/impl/api/node/PortalNodeEventC= ontextImpl.java Log: - JBPORTAL-1771: Added support to set listener on portal nodes graphically = in the admin GUI. Modified: trunk/core/src/main/org/jboss/portal/core/event/PortalEventListen= erRegistry.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/core/src/main/org/jboss/portal/core/event/PortalEventListenerRegi= stry.java 2007-10-23 02:50:17 UTC (rev 8744) +++ trunk/core/src/main/org/jboss/portal/core/event/PortalEventListenerRegi= stry.java 2007-10-23 02:52:32 UTC (rev 8745) @@ -23,6 +23,7 @@ package org.jboss.portal.core.event; = import java.util.Collection; +import java.util.Set; = /** * @author Julien Viet @@ -50,4 +51,12 @@ * */ Collection getListeners(); + + /** + * Returns the set of String identifiers for all currently registered l= isteners. + * + * @return the set of String identifiers for all currently registered l= isteners. + * @since 2.6.3 + */ + Set getListenerIds(); } Modified: trunk/core/src/main/org/jboss/portal/core/event/PortalEventListen= erRegistryImpl.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/core/src/main/org/jboss/portal/core/event/PortalEventListenerRegi= stryImpl.java 2007-10-23 02:50:17 UTC (rev 8744) +++ trunk/core/src/main/org/jboss/portal/core/event/PortalEventListenerRegi= stryImpl.java 2007-10-23 02:52:32 UTC (rev 8745) @@ -22,10 +22,11 @@ *************************************************************************= *****/ package org.jboss.portal.core.event; = +import org.jboss.portal.common.util.CopyOnWriteRegistry; import org.jboss.portal.jems.as.system.AbstractJBossService; -import org.jboss.portal.common.util.CopyOnWriteRegistry; = import java.util.Collection; +import java.util.Set; = /** * @author Julien Viet @@ -57,4 +58,9 @@ return listeners.getRegistrations(); } = + public Set getListenerIds() + { + return listeners.getKeys(); + } + } Modified: trunk/core/src/main/org/jboss/portal/core/impl/api/node/PortalNod= eEventContextImpl.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/core/src/main/org/jboss/portal/core/impl/api/node/PortalNodeEvent= ContextImpl.java 2007-10-23 02:50:17 UTC (rev 8744) +++ trunk/core/src/main/org/jboss/portal/core/impl/api/node/PortalNodeEvent= ContextImpl.java 2007-10-23 02:52:32 UTC (rev 8745) @@ -22,11 +22,11 @@ *************************************************************************= *****/ package org.jboss.portal.core.impl.api.node; = +import org.jboss.portal.api.PortalRuntimeContext; +import org.jboss.portal.api.node.PortalNode; +import org.jboss.portal.api.node.event.PortalNodeEvent; import org.jboss.portal.api.node.event.PortalNodeEventContext; -import org.jboss.portal.api.node.event.PortalNodeEvent; import org.jboss.portal.api.node.event.PortalNodeEventListener; -import org.jboss.portal.api.node.PortalNode; -import org.jboss.portal.api.PortalRuntimeContext; import org.jboss.portal.core.event.PortalEventListenerRegistry; = /** @@ -68,9 +68,10 @@ public PortalNodeEvent dispatch() { PortalNodeEventListener listener =3D null; - if (node.object.getListener() !=3D null) + String listenerId =3D node.object.getListener(); + if (listenerId !=3D null && listenerId.length() > 0) { - Object tmp =3D registry.getListener(node.object.getListener()); + Object tmp =3D registry.getListener(listenerId); if (tmp !=3D null && tmp instanceof PortalNodeEventListener) { listener =3D (PortalNodeEventListener)tmp; Modified: trunk/core-admin/src/main/org/jboss/portal/core/admin/ui/PortalOb= jectManagerBean.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/core-admin/src/main/org/jboss/portal/core/admin/ui/PortalObjectMa= nagerBean.java 2007-10-23 02:50:17 UTC (rev 8744) +++ trunk/core-admin/src/main/org/jboss/portal/core/admin/ui/PortalObjectMa= nagerBean.java 2007-10-23 02:52:32 UTC (rev 8745) @@ -26,6 +26,7 @@ import org.jboss.portal.core.admin.ui.actions.PropertyAction; import org.jboss.portal.core.admin.ui.common.PageManagerBean; import org.jboss.portal.core.admin.ui.portlet.PortletDefinitionInvoker; +import org.jboss.portal.core.event.PortalEventListenerRegistry; import org.jboss.portal.core.impl.model.content.ContentProviderRegistrySer= vice; import org.jboss.portal.core.model.content.Content; import org.jboss.portal.core.model.content.ContentType; @@ -99,6 +100,9 @@ /** . */ private RoleModule roleModule; = + /** Listener registry to bind even listener to PortalNodes. */ + private PortalEventListenerRegistry listenerRegistry; + // Navigational state = /** The selected id. */ @@ -206,6 +210,16 @@ return null; } = + public PortalEventListenerRegistry getListenerRegistry() + { + return listenerRegistry; + } + + public void setListenerRegistry(PortalEventListenerRegistry listenerReg= istry) + { + this.listenerRegistry =3D listenerRegistry; + } + public RoleModule getRoleModule() { return roleModule; @@ -800,4 +814,23 @@ { return controlProperties; } + + public SelectItem[] getListenerIds() + { + Set ids =3D listenerRegistry.getListenerIds(); + if (ids !=3D null) + { + SelectItem[] result =3D new SelectItem[ids.size() + 1]; + int i =3D 1; + result[0] =3D new SelectItem("", "no bound listener"); + for (Iterator idsIt =3D ids.iterator(); idsIt.hasNext();) + { + result[i++] =3D new SelectItem(idsIt.next()); + } + + return result; + } + + return null; + } } Modified: trunk/core-admin/src/resources/portal-admin-war/WEB-INF/faces-con= fig.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/core-admin/src/resources/portal-admin-war/WEB-INF/faces-config.xm= l 2007-10-23 02:50:17 UTC (rev 8744) +++ trunk/core-admin/src/resources/portal-admin-war/WEB-INF/faces-config.xm= l 2007-10-23 02:52:32 UTC (rev 8745) @@ -75,6 +75,10 @@ domainConfigurator #{applicationScope.AuthorizationDomainRegistry.portalobjec= t.configurator} + + listenerRegistry + #{applicationScope.ListenerRegistry} +
portalAction Modified: trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jboss-por= tlet.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jboss-portlet.x= ml 2007-10-23 02:50:17 UTC (rev 8744) +++ trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jboss-portlet.x= ml 2007-10-23 02:52:32 UTC (rev 8745) @@ -112,4 +112,9 @@ org.jboss.portal.portlet.federation.FederatingPortlet= Invoker :service=3DPortletInvoker,type=3DFederating + + ListenerRegistry + org.jboss.portal.core.event.PortalEventListenerRegist= ry + portal:service=3DListenerRegistry + Modified: trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/editP= roperties.xhtml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/editPropert= ies.xhtml 2007-10-23 02:50:17 UTC (rev 8744) +++ trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/editPropert= ies.xhtml 2007-10-23 02:52:32 UTC (rev 8745) @@ -1,22 +1,37 @@
+ xmlns=3D"http://www.w3.org/1999/xhtml" + xmlns:f=3D"http://java.sun.com/jsf/core" + xmlns:ui=3D"http://java.sun.com/jsf/facelets" + xmlns:h=3D"http://java.sun.com/jsf/html" + xmlns:c=3D"http://java.sun.com/jstl/core"> = = = - = - - + +

Event Listener Binding

+ +
+ + + Choose the id of the PortalEventListener to bind to this= #{portalobjectmgr.selectedObjectType}: + + + + + + +
+ + + =
- + = @@ -36,6 +51,6 @@ =
- = +
\ No newline at end of file --===============6895427258342105981==-- From portal-commits at lists.jboss.org Tue Oct 23 03:31:24 2007 Content-Type: multipart/mixed; boundary="===============9142632522994316899==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8746 - in modules/portlet/trunk: build/ide/intellij/idea60/modules/federation and 65 other directories. Date: Tue, 23 Oct 2007 03:31:23 -0400 Message-ID: --===============9142632522994316899== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: julien(a)jboss.com Date: 2007-10-23 03:31:22 -0400 (Tue, 23 Oct 2007) New Revision: 8746 Added: modules/portlet/trunk/federation/src/resources/ modules/portlet/trunk/federation/src/resources/test/ modules/portlet/trunk/federation/src/resources/test/jboss-unit.xml modules/portlet/trunk/portlet/src/resources/test/local-jboss-unit.xml modules/portlet/trunk/portlet/src/resources/test/remote-jboss-unit.xml modules/portlet/trunk/test/src/resources/jboss-4.2/portlet-test-war/WEB-= INF/jboss-web.xml modules/portlet/trunk/test/src/resources/test/local-jboss-unit.xml Removed: modules/portlet/trunk/test/src/resources/jboss-4.2/portlet-test-war/WEB-= INF/jboss-context.xml Modified: modules/portlet/trunk/build/build-thirdparty.xml modules/portlet/trunk/build/ide/intellij/idea60/modules/federation/feder= ation.iml modules/portlet/trunk/build/ide/intellij/idea60/modules/portlet/portlet.= iml modules/portlet/trunk/build/ide/intellij/idea60/modules/test/test.iml modules/portlet/trunk/federation/build.xml modules/portlet/trunk/federation/src/main/org/jboss/portal/test/portlet/= federation/FederatingPortletInvokerTestCase.java modules/portlet/trunk/federation/src/main/org/jboss/portal/test/portlet/= federation/NoInvokersTestCase.java modules/portlet/trunk/federation/src/main/org/jboss/portal/test/portlet/= federation/OneInvokerNoPortletsTestCase.java modules/portlet/trunk/portlet/build.xml modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/framework/p= ortlet/PortletTestContext.java modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/framework/p= ortlet/PortletTestDriver.java modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/framework/p= ortlet/PortletTestSuite.java modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/framework/p= ortlet/TestAction.java modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/framework/p= ortlet/actions/PortletActionTestAction.java modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/framework/p= ortlet/actions/PortletRenderTestAction.java modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/framework/p= ortlet/actions/ServletServiceTestAction.java modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/framework/p= ortlet/basictests/BasicTestSequenceBuilder.java modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/framework/p= ortlet/basictests/BasicTestSuite.java modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/framework/p= ortlet/basictests/classes/JoinpointTestCase.java modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/framework/p= ortlet/basictests/classes/SequenceRegistryBuilderTestCase.java modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/framework/p= ortlet/basictests/classes/SequenceRegistryTestCase.java modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/framework/p= ortlet/basictests/classes/SequenceTestCase.java modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/framework/p= ortlet/components/AbstractTestGenericPortlet.java modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/framework/p= ortlet/components/AbstractTestPortlet.java modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/framework/p= ortlet/components/AbstractUniversalTestPortlet.java modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/framework/p= ortlet/components/AbstractUniversalTestServlet.java modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/Con= tentTypesTestCase.java modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/Par= ametersTestCase.java modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/Por= tletRequestDecoderTestCase.java modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/Por= tletRequestEncoderTestCase.java modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/Pro= pertiesTestCase.java modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/ha/= session/SessionSequenceBuilder.java modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/ha/= session/SessionTestCase.java modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/inf= o/AbstractInfoTest.java modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/inf= o/CacheInfoTest.java modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/inf= o/CapabilitiesInfoTest.java modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/inf= o/MetaInfoTest.java modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/inf= o/ModeInfoTest.java modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/inf= o/PortletInfoTest.java modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/inf= o/PreferenceInfoTest.java modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/inf= o/SecurityInfoTest.java modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/inf= o/SessionInfoTest.java modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr= 168/api/actionrequest/ActionRequestAPITestSuite.java modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr= 168/api/actionrequest/ActionRequestSequenceBuilder.java modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr= 168/api/actionresponse/ActionResponseAPITestSuite.java modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr= 168/api/actionresponse/ActionResponseSequenceBuilder.java modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr= 168/api/portalcontext/PortalContextAPITestSuite.java modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr= 168/api/portalcontext/PortalContextSequenceBuilder.java modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr= 168/api/portletconfig/PortletConfigAPITestSuite.java modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr= 168/api/portletconfig/PortletConfigSequenceBuilder.java modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr= 168/api/portletcontext/PortletContextAPITestSuite.java modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr= 168/api/portletcontext/PortletContextSequenceBuilder.java modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr= 168/api/portletmode/PortletModeAPITestSuite.java modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr= 168/api/portletmode/PortletModeSequenceBuilder.java modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr= 168/api/portletpreferences/PortletPreferencesAPITestSuite.java modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr= 168/api/portletpreferences/PortletPreferencesSequenceBuilder.java modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr= 168/api/portletsession/PortletSessionAPITestSuite.java modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr= 168/api/portletsession/PortletSessionSequenceBuilder.java modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr= 168/api/portletsessionutil/PortletSessionUtilAPITestSuite.java modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr= 168/api/portletsessionutil/PortletSessionUtilSequenceBuilder.java modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr= 168/api/portleturl/PortletURLAPITestSuite.java modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr= 168/api/portleturl/PortletURLSequenceBuilder.java modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr= 168/api/renderrequest/RenderRequestAPITestSuite.java modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr= 168/api/renderrequest/RenderRequestSequenceBuilder.java modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr= 168/api/renderresponse/RenderResponseAPITestSuite.java modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr= 168/api/renderresponse/RenderResponseSequenceBuilder.java modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr= 168/api/windowstate/WindowStateAPITestSuite.java modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr= 168/api/windowstate/WindowStateSequenceBuilder.java modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr= 168/ext/common/AbstractCacheSequenceBuilder.java modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr= 168/ext/dispatcher/DispatcherSequenceBuilder.java modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr= 168/ext/expiringcache/ExpiringCacheSequenceBuilder.java modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr= 168/ext/nocache/NoCacheSequenceBuilder.java modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr= 168/ext/portletconfig/PortletConfigSequenceBuilder.java modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr= 168/ext/portletmode/PortletModeSequenceBuilder.java modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr= 168/ext/portletrequests/PortletRequestsSequenceBuilder.java modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr= 168/ext/portletresponses/PortletResponsesSequenceBuilder.java modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr= 168/ext/preferences/PreferencesSequenceBuilder.java modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr= 168/ext/session/SessionSequenceBuilder.java modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr= 168/misc/log4j/Log4jSequenceBuilder.java modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr= 168/tck/dispatcher/DispatcherSequenceBuilder.java modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr= 168/tck/dispatcher/DispatcherTestSuite.java modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr= 168/tck/portletconfig/PortletConfigSequenceBuilder.java modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr= 168/tck/portletconfig/PortletConfigTestSuite.java modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr= 168/tck/portletcontext/PortletContextSequenceBuilder.java modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr= 168/tck/portletcontext/PortletContextTestSuite.java modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr= 168/tck/portletinterface/PortletInterfaceSequenceBuilder.java modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr= 168/tck/portletinterface/PortletInterfaceTestSuite.java modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr= 168/tck/portletinterface/spec/ExceptionsDuringRequestHandlingControllerPort= let.java modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr= 168/tck/portletinterface/spec/MinimizedStateDontRenderPortlet.java modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr= 168/tck/portletinterface/spec/PortletExceptionDuringRequestHandlingPortlet.= java modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr= 168/tck/portletinterface/spec/RuntimeExceptionDuringRequestHandlingPortlet.= java modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr= 168/tck/portletinterface/spec/UnavailableExceptionDuringProcessActionPortle= t.java modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr= 168/tck/portletinterface/spec/UnavailableExceptionDuringRenderPortlet.java modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr= 168/tck/portletmode/PortletModeSequenceBuilder.java modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr= 168/tck/portletmode/PortletModeTestSuite.java modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr= 168/tck/portletmode/spec/RequestDispatchingDependingOnModePortlet.java modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr= 168/tck/portletrequests/PortletRequestTestSuite.java modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr= 168/tck/portletrequests/PortletRequestsSequenceBuilder.java modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr= 168/tck/portletresponses/PortletResponsesSequenceBuilder.java modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr= 168/tck/portletresponses/PortletResponsesTestSuite.java modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr= 168/tck/portletsession/HttpSessionInvalidatorServlet.java modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr= 168/tck/portletsession/PortletSessionSequenceBuilder.java modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr= 168/tck/portletsession/PortletSessionTestSuite.java modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr= 168/tck/portleturl/PortletURLTestSuite.java modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr= 168/tck/portleturl/PortletUrlSequenceBuilder.java modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr= 168/tck/preferences/PreferencesSequenceBuilder.java modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr= 168/tck/preferences/PreferencesTestSuite.java modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr= 168/tck/windowstates/WindowStatesSequenceBuilder.java modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr= 168/tck/windowstates/WindowStatesTestSuite.java modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/nav= igation/StateStringTestCase.java modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/ses= sion/SessionSynchronizationTestCase.java modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/sta= te/AbstractStatefulPortletInvokerTestCase.java modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/sta= te/ConsumerStatefulPortletInvokerTestCase.java modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/sta= te/ProducerStatefulPortletInvokerTestCase.java modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/sta= te/StateConverterV0TestCase.java modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/sta= te/ValueMapAssert.java modules/portlet/trunk/test/build.xml modules/portlet/trunk/test/src/main/org/jboss/portal/portlet/test/Portle= tApplicationDeployer.java modules/portlet/trunk/test/src/main/org/jboss/portal/portlet/test/Portle= tApplicationDeployment.java modules/portlet/trunk/test/src/main/org/jboss/portal/portlet/test/String= CodecTestCase.java modules/portlet/trunk/test/src/main/org/jboss/portal/portlet/test/deploy= ment/UnmarshallerTestCase.java modules/portlet/trunk/test/src/main/org/jboss/portal/portlet/test/url/De= coderTestCase.java modules/portlet/trunk/test/src/main/org/jboss/portal/portlet/test/url/En= coderTestCase.java modules/portlet/trunk/test/src/resources/portlet-test-war/WEB-INF/jboss-= beans.xml modules/portlet/trunk/test/src/resources/test/servers.xml modules/portlet/trunk/tools/etc/buildfragments/buildmagic.ent modules/portlet/trunk/tools/etc/buildfragments/defaults.ent Log: update portlet module to use jboss unit Modified: modules/portlet/trunk/build/build-thirdparty.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/portlet/trunk/build/build-thirdparty.xml 2007-10-23 02:52:32 UT= C (rev 8745) +++ modules/portlet/trunk/build/build-thirdparty.xml 2007-10-23 07:31:22 UT= C (rev 8746) @@ -48,31 +48,41 @@ = - + = + + + + - + + - - = - - + = - - + + + + + + + + + + + - - - ---> + + + = + = Modified: modules/portlet/trunk/build/ide/intellij/idea60/modules/federatio= n/federation.iml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/portlet/trunk/build/ide/intellij/idea60/modules/federation/fede= ration.iml 2007-10-23 02:52:32 UTC (rev 8745) +++ modules/portlet/trunk/build/ide/intellij/idea60/modules/federation/fede= ration.iml 2007-10-23 07:31:22 UTC (rev 8746) @@ -27,6 +27,24 @@
+ + + + + + + + + + + + + + + + + + Modified: modules/portlet/trunk/build/ide/intellij/idea60/modules/portlet/p= ortlet.iml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/portlet/trunk/build/ide/intellij/idea60/modules/portlet/portlet= .iml 2007-10-23 02:52:32 UTC (rev 8745) +++ modules/portlet/trunk/build/ide/intellij/idea60/modules/portlet/portlet= .iml 2007-10-23 07:31:22 UTC (rev 8746) @@ -40,16 +40,16 @@ - + - + - + @@ -58,7 +58,7 @@ - + @@ -67,40 +67,58 @@ - + - + + - + - + - + - - + + + + + + + + + + + + + + + + + + + Modified: modules/portlet/trunk/build/ide/intellij/idea60/modules/test/test= .iml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/portlet/trunk/build/ide/intellij/idea60/modules/test/test.iml 2= 007-10-23 02:52:32 UTC (rev 8745) +++ modules/portlet/trunk/build/ide/intellij/idea60/modules/test/test.iml 2= 007-10-23 07:31:22 UTC (rev 8746) @@ -12,7 +12,7 @@ - + @@ -21,6 +21,69 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -30,6 +93,87 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -39,7 +183,7 @@ - + @@ -48,7 +192,7 @@ - + @@ -57,7 +201,7 @@ - + @@ -66,7 +210,7 @@ - + Modified: modules/portlet/trunk/federation/build.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/portlet/trunk/federation/build.xml 2007-10-23 02:52:32 UTC (rev= 8745) +++ modules/portlet/trunk/federation/build.xml 2007-10-23 07:31:22 UTC (rev= 8746) @@ -190,21 +190,40 @@ = - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + - - + + + + + Modified: modules/portlet/trunk/federation/src/main/org/jboss/portal/test/p= ortlet/federation/FederatingPortletInvokerTestCase.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/portlet/trunk/federation/src/main/org/jboss/portal/test/portlet= /federation/FederatingPortletInvokerTestCase.java 2007-10-23 02:52:32 UTC (= rev 8745) +++ modules/portlet/trunk/federation/src/main/org/jboss/portal/test/portlet= /federation/FederatingPortletInvokerTestCase.java 2007-10-23 07:31:22 UTC (= rev 8746) @@ -22,7 +22,6 @@ *************************************************************************= *****/ package org.jboss.portal.test.portlet.federation; = -import junit.framework.TestCase; import org.jboss.portal.portlet.federation.FederatedPortletInvoker; import org.jboss.portal.portlet.federation.FederatingPortletInvoker; import org.jboss.portal.portlet.federation.impl.FederatingPortletInvokerSe= rvice; @@ -40,11 +39,16 @@ import java.util.Set; import java.util.Locale; = +import static org.jboss.unit.api.Assert.*; +import org.jboss.unit.api.pojo.annotations.Create; +import org.jboss.unit.api.pojo.annotations.Destroy; +import org.jboss.unit.api.pojo.annotations.Test; + /** * @author Julien Viet * @version $Revision: 1.1 $ */ -public class FederatingPortletInvokerTestCase extends TestCase +public class FederatingPortletInvokerTestCase { = /** . */ @@ -62,7 +66,8 @@ /** . */ private PortletContext portletContext; = - protected void setUp() throws Exception + @Create + public void setUp() throws Exception { federatingInvoker =3D new FederatingPortletInvokerService(); federatedInvoker =3D new PortletInvokerSupport(); @@ -86,8 +91,8 @@ assertNotNull(portletContext); } = - - protected void tearDown() throws Exception + @Destroy + public void tearDown() throws Exception { federatedPortlet =3D null; federatedInvoker =3D null; @@ -96,6 +101,7 @@ portletContext =3D null; } = + @Test public void testFederation() throws PortletInvokerException { Collection federateds =3D federatingInvoker.getFederatedInvokers(); @@ -107,6 +113,7 @@ assertEquals(federatedInvoker, federated.getPortletInvoker()); } = + @Test public void testInfo() throws PortletInvokerException { PortletInfo info =3D portlet.getInfo(); @@ -119,6 +126,7 @@ assertEquals("FooPortlet", description.getDefaultString()); } = + @Test public void testGetPortlet() throws PortletInvokerException { Portlet samePortlet =3D federatingInvoker.getPortlet(portletContext); Modified: modules/portlet/trunk/federation/src/main/org/jboss/portal/test/p= ortlet/federation/NoInvokersTestCase.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/portlet/trunk/federation/src/main/org/jboss/portal/test/portlet= /federation/NoInvokersTestCase.java 2007-10-23 02:52:32 UTC (rev 8745) +++ modules/portlet/trunk/federation/src/main/org/jboss/portal/test/portlet= /federation/NoInvokersTestCase.java 2007-10-23 07:31:22 UTC (rev 8746) @@ -22,7 +22,6 @@ *************************************************************************= *****/ package org.jboss.portal.test.portlet.federation; = -import junit.framework.TestCase; import org.jboss.portal.portlet.PortletInvokerException; import org.jboss.portal.portlet.federation.FederatingPortletInvoker; import org.jboss.portal.portlet.federation.impl.FederatingPortletInvokerSe= rvice; @@ -30,12 +29,16 @@ import java.util.HashSet; import java.util.ArrayList; = +import static org.jboss.unit.api.Assert.*; +import org.jboss.unit.api.pojo.annotations.Test; + /** * @author Julien Viet * @version $Revision: 1.1 $ */ -public class NoInvokersTestCase extends TestCase +public class NoInvokersTestCase { + @Test public void testNoFederated() throws PortletInvokerException { FederatingPortletInvoker federating =3D new FederatingPortletInvoker= Service(); Modified: modules/portlet/trunk/federation/src/main/org/jboss/portal/test/p= ortlet/federation/OneInvokerNoPortletsTestCase.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/portlet/trunk/federation/src/main/org/jboss/portal/test/portlet= /federation/OneInvokerNoPortletsTestCase.java 2007-10-23 02:52:32 UTC (rev = 8745) +++ modules/portlet/trunk/federation/src/main/org/jboss/portal/test/portlet= /federation/OneInvokerNoPortletsTestCase.java 2007-10-23 07:31:22 UTC (rev = 8746) @@ -22,7 +22,6 @@ *************************************************************************= *****/ package org.jboss.portal.test.portlet.federation; = -import junit.framework.TestCase; import org.jboss.portal.portlet.PortletInvokerException; import org.jboss.portal.test.portlet.state.PortletInvokerSupport; import org.jboss.portal.portlet.federation.FederatingPortletInvoker; @@ -32,13 +31,18 @@ import java.util.HashSet; import java.util.Collection; = +import org.jboss.unit.api.pojo.annotations.Test; + +import static org.jboss.unit.api.Assert.*; + /** * @author Julien Viet * @version $Revision: 1.1 $ */ -public class OneInvokerNoPortletsTestCase extends TestCase +public class OneInvokerNoPortletsTestCase { = + @Test public void testOneFederatedWithNoPortlets() throws PortletInvokerExcep= tion { FederatingPortletInvoker federating =3D new FederatingPortletInvoker= Service(); Added: modules/portlet/trunk/federation/src/resources/test/jboss-unit.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/portlet/trunk/federation/src/resources/test/jboss-unit.xml = (rev 0) +++ modules/portlet/trunk/federation/src/resources/test/jboss-unit.xml 2007= -10-23 07:31:22 UTC (rev 8746) @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + Modified: modules/portlet/trunk/portlet/build.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/portlet/trunk/portlet/build.xml 2007-10-23 02:52:32 UTC (rev 87= 45) +++ modules/portlet/trunk/portlet/build.xml 2007-10-23 07:31:22 UTC (rev 87= 46) @@ -81,10 +81,6 @@ = = - - - - &libraries; @@ -95,7 +91,6 @@ - = @@ -336,29 +331,32 @@ = - - = - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + @@ -369,8 +367,10 @@ - - + + + + + - Modified: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/fram= ework/portlet/PortletTestContext.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/framework/= portlet/PortletTestContext.java 2007-10-23 02:52:32 UTC (rev 8745) +++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/framework/= portlet/PortletTestContext.java 2007-10-23 07:31:22 UTC (rev 8746) @@ -22,12 +22,14 @@ *************************************************************************= *****/ package org.jboss.portal.test.framework.portlet; = -import org.jboss.portal.test.framework.driver.DriverResponse; -import org.jboss.portal.test.framework.driver.remote.TestContext; import org.jboss.portal.test.framework.server.NodeId; -import org.jboss.portal.test.framework.TestParameterValue; +import org.jboss.unit.driver.DriverResponse; +import org.jboss.unit.remote.RequestContext; +import org.jboss.unit.remote.ResponseContext; = import java.net.MalformedURLException; +import java.io.Serializable; +import java.util.HashMap; = /** * @author Julien Viet @@ -36,19 +38,23 @@ public class PortletTestContext { = + /** . */ final String testName; = /** . */ - final TestContext testContext; + RequestContext requestContext; = - public PortletTestContext(String testName, TestContext httpTestContext) + /** . */ + ResponseContext responseContext; + + public PortletTestContext(String testName, RequestContext requestContex= t) { - if (httpTestContext =3D=3D null) + if (requestContext =3D=3D null) { throw new IllegalArgumentException("No HTTP test context to wrap"= ); } this.testName =3D testName; - this.testContext =3D httpTestContext; + this.requestContext =3D requestContext; } = public String getTestName() @@ -58,17 +64,18 @@ = public void setResponse(DriverResponse response) { - testContext.setResponse(response); + responseContext =3D new ResponseContext(response, new HashMap()); } = public int getRequestCount() { - return testContext.getRequestCount(); + return requestContext.getRequestCount(); } = public String rewriteURLForNode(String url, NodeId nodeId) throws Malfo= rmedURLException { - return testContext.rewriteURLForNode(url, nodeId); +// return testContext.rewriteURLForNode(url, nodeId); + return null; } = public String getParameter(String parameterName) @@ -77,7 +84,6 @@ { throw new IllegalArgumentException(); } - TestParameterValue parameterValue =3D testContext.getParametrization= ().getParameterValue(parameterName); - return parameterValue !=3D null ? (String)parameterValue.get() : nul= l; + return requestContext.getParametrization().get(parameterName); } } Modified: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/fram= ework/portlet/PortletTestDriver.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/framework/= portlet/PortletTestDriver.java 2007-10-23 02:52:32 UTC (rev 8745) +++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/framework/= portlet/PortletTestDriver.java 2007-10-23 07:31:22 UTC (rev 8746) @@ -22,61 +22,63 @@ *************************************************************************= *****/ package org.jboss.portal.test.framework.portlet; = -import org.jboss.portal.test.framework.info.TestInfo; -import org.jboss.portal.test.framework.info.TestItemInfo; -import org.jboss.portal.test.framework.info.TestParameterInfo; -import org.jboss.portal.test.framework.driver.DriverResponse; -import org.jboss.portal.test.framework.driver.DriverCommand; -import org.jboss.portal.test.framework.driver.TestDriverException; -import org.jboss.portal.test.framework.driver.TestSuite; -import org.jboss.portal.test.framework.driver.TestDriver; -import org.jboss.portal.test.framework.driver.http.response.InvokeGetRespo= nse; -import org.jboss.portal.test.framework.driver.remote.TestContext; -import org.jboss.portal.test.framework.driver.remote.RemoteTestDriver; -import org.jboss.portal.test.framework.driver.remote.RemoteTestDriverServe= r; +import org.jboss.unit.remote.driver.RemoteTestDriver; +import org.jboss.unit.remote.driver.RemoteTestDriverServer; +import org.jboss.unit.remote.driver.CompositeRemoteTestDriver; +import org.jboss.unit.remote.driver.handler.http.response.InvokeGetRespons= e; +import org.jboss.unit.remote.RequestContext; +import org.jboss.unit.remote.ResponseContext; +import org.jboss.unit.driver.DriverResponse; +import org.jboss.unit.driver.TestDriver; +import org.jboss.unit.driver.DriverContext; +import org.jboss.unit.driver.DriverCommand; +import org.jboss.unit.driver.DriverException; +import org.jboss.unit.driver.impl.composite.CompositeTestDriver; +import org.jboss.unit.info.TestCaseInfo; +import org.jboss.unit.info.TestInfo; +import org.jboss.unit.info.impl.SimpleTestCaseInfo; +import org.jboss.unit.TestId; = -import java.util.Iterator; - /** * Registry of action sequences. Every sequence is binded with test id * * @author Boleslaw Daw= idowicz * @version $Revision: 6720 $ */ -public class PortletTestDriver implements RemoteTestDriver +public class PortletTestDriver extends CompositeTestDriver { = /** . */ private static PortletTestContext context; = /** . */ - private final RemoteTestDriverServer server =3D new RemoteTestDriverSer= ver(); + private final RemoteTestDriverServer server; = /** . */ - private TestSuite suite; - - /** . */ private String path; = - public PortletTestDriver(String name) + public PortletTestDriver(String name, RemoteTestDriverServer parent) { - this(name, "/test"); + this(name, parent, "/test"); } = - public PortletTestDriver(String name, String path) + public PortletTestDriver(String name, RemoteTestDriverServer parent, St= ring path) { - this.suite =3D new TestSuite(name); + super(name); + + // + this.server =3D parent; this.path =3D path; } = public void start() { - server.addDriver(this); + server.setDelegate(new CompositeRemoteTestDriver(this)); } = public void stop() { - server.removeDriver(this); + server.setDelegate(null); } = /** @@ -101,16 +103,25 @@ } = // - Sequence sequence =3D new Sequence(testName, portletTest); + try + { + Sequence sequence =3D new Sequence(testName, portletTest); = - // - suite.addDriver(sequence); + // + mount(sequence); + } + catch (DriverException e) + { + e.printStackTrace(); + } } = public void removeSequence(String testName) { - TestDriver a =3D suite.getDriver(testName); - suite.removeDriver(a); + TestDriver a =3D drivers.get(testName); + + // + unmount(a); } = public PortletTest getSequence(String testName) @@ -119,30 +130,12 @@ { throw new IllegalArgumentException("Test name can't be null"); } - Sequence sequence =3D (Sequence)suite.getDriver(testName); + Sequence sequence =3D (Sequence)drivers.get(testName); + + // return sequence !=3D null ? sequence.test : null; } = - public TestItemInfo getInfo() - { - return suite.getInfo(); - } - - public DriverResponse invoke(String testId, DriverCommand command) thro= ws TestDriverException - { - return suite.invoke(testId, command); - } - - public void pushContext(String testId, TestContext testContext) - { - context =3D new PortletTestContext(testId, testContext); - } - - public TestContext popContext(String testId) - { - return context.testContext; - } - /** * The current portlet test context statically available. * @@ -153,7 +146,7 @@ return context; } = - private class Sequence implements TestDriver + private class Sequence implements RemoteTestDriver { = /** . */ @@ -163,31 +156,51 @@ private final PortletTest test; = /** . */ - private final TestItemInfo info; + private final TestCaseInfo info; = public Sequence(String name, PortletTest test) { - TestInfo info =3D new TestInfo(name); - for (Iterator i =3D info.getParameterNames().iterator();i.hasNext= ();) - { - String parameterName =3D (String)i.next(); - info.addParameter(new TestParameterInfo(parameterName)); - } +// TestInfo info =3D new TestInfo(name); +// for (Iterator i =3D info.getParameterNames().iterator();i.hasNe= xt();) +// { +// String parameterName =3D (String)i.next(); +// info.addParameter(new TestParameterInfo(parameterName)); +// } = // this.name =3D name; this.test =3D test; - this.info =3D info; + this.info =3D new SimpleTestCaseInfo(name); } = - public TestItemInfo getInfo() + public void initDriver(DriverContext driverContext) { - return info; + } = - public DriverResponse invoke(String string, DriverCommand driverComm= and) throws TestDriverException + public void destroyDriver() { + + } + + public void pushContext(TestId testId, RequestContext requestContext) + { + context =3D new PortletTestContext(name, requestContext); + } + + public ResponseContext popContext(TestId testId) + { + return context.responseContext; + } + + public DriverResponse invoke(TestId testId, DriverCommand driverComm= and) + { return new InvokeGetResponse("/portlet-test"); } + + public TestInfo getInfo() + { + return info; + } } } Modified: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/fram= ework/portlet/PortletTestSuite.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/framework/= portlet/PortletTestSuite.java 2007-10-23 02:52:32 UTC (rev 8745) +++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/framework/= portlet/PortletTestSuite.java 2007-10-23 07:31:22 UTC (rev 8746) @@ -23,10 +23,13 @@ package org.jboss.portal.test.framework.portlet; = import org.apache.log4j.Logger; +import org.jboss.unit.remote.driver.RemoteTestDriverServer; = import javax.servlet.ServletContextEvent; import javax.servlet.ServletContextListener; -import java.lang.reflect.InvocationTargetException; +import javax.servlet.ServletContextAttributeListener; +import javax.servlet.ServletContextAttributeEvent; +import javax.servlet.ServletContext; import java.lang.reflect.Method; import java.lang.reflect.Modifier; import java.util.Arrays; @@ -41,7 +44,7 @@ * @author Boleslaw Daw= idowicz * @version $Revision: 6989 $ */ -public abstract class PortletTestSuite implements ServletContextListener +public abstract class PortletTestSuite implements ServletContextListener, = ServletContextAttributeListener { = /** . */ @@ -51,55 +54,93 @@ public static String METHOD_PATTERN =3D "create.*"; = /** . */ - private final PortletTestDriver driver; + private PortletTestDriver driver; = protected PortletTestSuite() { - this.driver =3D new PortletTestDriver(getClass().getName()); } = /** * Finds all methods matching pattern in current instance and invokes t= hem. Methods add Sequence into * SequenceRegistry. Then SequenceRegistry is injected into ServletCont= ext - * - * @param sce */ - public void contextInitialized(ServletContextEvent sce) + public void attributeAdded(ServletContextAttributeEvent event) { + if (event.getName().equals("TestDriverServer")) + { + RemoteTestDriverServer remoteDriver =3D (RemoteTestDriverServer)e= vent.getValue(); = - log.info("PortletTestSuite invoked with instance of: '" + this.getCl= ass().getName() + "' class"); - - // We invoke all createXXX methods to fill seqenceRegistry - List methods =3D introspectMethods(METHOD_PATTERN); - for (int i =3D 0; i < methods.size(); i++) - { - Method m =3D (Method)methods.get(i); + // It is only in servlet 2.5, for now we use reflection + String name =3D null; try { - log.info("Invoking method: '" + m.getName() + "' "); - m.invoke(this, new Object[]{driver}); + Method m =3D ServletContext.class.getMethod("getContextPath"); + ServletContext servletContext =3D event.getServletContext(); + name =3D (String)m.invoke(servletContext); + name =3D name.substring(1); // We remove the leading '/' } - catch (IllegalAccessException e) + catch (Exception e) { - log.info("Error during '" + m.getName() + "' method invokation= : " + e.getMessage()); - e.printStackTrace(); + log.info("Cannot get application context path", e); } - catch (InvocationTargetException e) + + // + if (name !=3D null) { - log.info("Error during '" + m.getName() + "' method invokation= : " + e.getMessage()); - e.printStackTrace(); + driver =3D new PortletTestDriver(name, remoteDriver); + + // + log.info("PortletTestSuite invoked with instance of: '" + this= .getClass().getName() + "' class"); + + // We invoke all createXXX methods to fill seqenceRegistry + List methods =3D introspectMethods(METHOD_PATTERN); + for (Object method : methods) + { + Method m =3D (Method)method; + try + { + log.info("Invoking method: '" + m.getName() + "' "); + m.invoke(this, driver); + } + catch (Exception e) + { + log.info("Error during '" + m.getName() + "' method invo= cation: " + e.getMessage(), e); + } + } + + // + driver.start(); + + // + event.getServletContext().setAttribute("SequenceRegistry", dri= ver); } } + } = - // - sce.getServletContext().setAttribute("SequenceRegistry", driver); - driver.start(); + public void attributeRemoved(ServletContextAttributeEvent event) + { + } = + public void attributeReplaced(ServletContextAttributeEvent event) + { + + } + + public void contextInitialized(ServletContextEvent sce) + { + } + public void contextDestroyed(ServletContextEvent sce) { - driver.stop(); sce.getServletContext().removeAttribute("SequenceRegistry"); + + // + if (driver !=3D null) + { + driver.stop(); + driver =3D null; + } } = /** @@ -111,14 +152,14 @@ private List introspectMethods(String namePattern) { List allMethods =3D Arrays.asList(getClass().getMethods()); - List methods =3D new ArrayList(allMethods.size()); - for (int i =3D 0; i < allMethods.size(); i++) + List methods =3D new ArrayList(allMethods.size()); + for (Object allMethod : allMethods) { - Method m =3D (Method)allMethods.get(i); + Method m =3D (Method)allMethod; if (Pattern.matches(namePattern, m.getName()) && - m.getParameterTypes().length =3D=3D 1 && - m.getParameterTypes()[0].equals(PortletTestDriver.class) && - Modifier.isPublic(m.getModifiers())) + m.getParameterTypes().length =3D=3D 1 && + m.getParameterTypes()[0].equals(PortletTestDriver.class) && + Modifier.isPublic(m.getModifiers())) { methods.add(m); } Modified: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/fram= ework/portlet/TestAction.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/framework/= portlet/TestAction.java 2007-10-23 02:52:32 UTC (rev 8745) +++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/framework/= portlet/TestAction.java 2007-10-23 07:31:22 UTC (rev 8746) @@ -22,12 +22,10 @@ *************************************************************************= *****/ package org.jboss.portal.test.framework.portlet; = -import org.jboss.portal.common.junit.ExtendedAssert; - /** * @author Boleslaw Daw= idowicz * @version $Revision: 7018 $ */ -public abstract class TestAction extends ExtendedAssert +public abstract class TestAction { } Modified: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/fram= ework/portlet/actions/PortletActionTestAction.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/framework/= portlet/actions/PortletActionTestAction.java 2007-10-23 02:52:32 UTC (rev 8= 745) +++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/framework/= portlet/actions/PortletActionTestAction.java 2007-10-23 07:31:22 UTC (rev 8= 746) @@ -22,10 +22,11 @@ *************************************************************************= *****/ package org.jboss.portal.test.framework.portlet.actions; = -import org.jboss.portal.test.framework.driver.DriverResponse; -import org.jboss.portal.test.framework.driver.response.FailureResponse; import org.jboss.portal.test.framework.portlet.TestAction; import org.jboss.portal.test.framework.portlet.PortletTestContext; +import org.jboss.unit.driver.DriverResponse; +import org.jboss.unit.driver.response.FailureResponse; +import org.jboss.unit.Failure; = import javax.portlet.ActionRequest; import javax.portlet.ActionResponse; @@ -33,8 +34,6 @@ import javax.portlet.PortletException; import java.io.IOException; = -import junit.framework.AssertionFailedError; - /** * @author Boleslaw Daw= idowicz * @version $Revision: 7954 $ @@ -49,9 +48,9 @@ run(portlet, request, response, context); return null; } - catch (AssertionFailedError t) + catch (AssertionError t) { - return new FailureResponse(t); + return new FailureResponse(Failure.createFailure(t)); } } = Modified: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/fram= ework/portlet/actions/PortletRenderTestAction.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/framework/= portlet/actions/PortletRenderTestAction.java 2007-10-23 02:52:32 UTC (rev 8= 745) +++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/framework/= portlet/actions/PortletRenderTestAction.java 2007-10-23 07:31:22 UTC (rev 8= 746) @@ -22,10 +22,11 @@ *************************************************************************= *****/ package org.jboss.portal.test.framework.portlet.actions; = -import org.jboss.portal.test.framework.driver.DriverResponse; -import org.jboss.portal.test.framework.driver.response.FailureResponse; import org.jboss.portal.test.framework.portlet.TestAction; import org.jboss.portal.test.framework.portlet.PortletTestContext; +import org.jboss.unit.driver.DriverResponse; +import org.jboss.unit.driver.response.FailureResponse; +import org.jboss.unit.Failure; = import javax.portlet.Portlet; import javax.portlet.PortletException; @@ -33,8 +34,6 @@ import javax.portlet.RenderResponse; import java.io.IOException; = -import junit.framework.AssertionFailedError; - /** * @author Boleslaw Daw= idowicz * @version $Revision: 7954 $ @@ -48,9 +47,9 @@ { return run(servlet, request, response, context); } - catch (AssertionFailedError t) + catch (AssertionError t) { - return new FailureResponse(t); + return new FailureResponse(Failure.createFailure(t)); } } = Modified: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/fram= ework/portlet/actions/ServletServiceTestAction.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/framework/= portlet/actions/ServletServiceTestAction.java 2007-10-23 02:52:32 UTC (rev = 8745) +++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/framework/= portlet/actions/ServletServiceTestAction.java 2007-10-23 07:31:22 UTC (rev = 8746) @@ -22,10 +22,11 @@ *************************************************************************= *****/ package org.jboss.portal.test.framework.portlet.actions; = -import org.jboss.portal.test.framework.driver.DriverResponse; -import org.jboss.portal.test.framework.junit.ThrowableDecoder; import org.jboss.portal.test.framework.portlet.TestAction; import org.jboss.portal.test.framework.portlet.PortletTestContext; +import org.jboss.unit.driver.DriverResponse; +import org.jboss.unit.driver.response.FailureResponse; +import org.jboss.unit.Failure; = import javax.servlet.Servlet; import javax.servlet.ServletException; @@ -49,7 +50,7 @@ } catch (Throwable t) { - return ThrowableDecoder.decode(t); + return new FailureResponse(Failure.createFailure(t)); } } } Modified: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/fram= ework/portlet/basictests/BasicTestSequenceBuilder.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/framework/= portlet/basictests/BasicTestSequenceBuilder.java 2007-10-23 02:52:32 UTC (r= ev 8745) +++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/framework/= portlet/basictests/BasicTestSequenceBuilder.java 2007-10-23 07:31:22 UTC (r= ev 8746) @@ -22,10 +22,6 @@ *************************************************************************= *****/ package org.jboss.portal.test.framework.portlet.basictests; = -import org.jboss.portal.test.framework.driver.response.EndTestResponse; -import org.jboss.portal.test.framework.driver.response.FailureResponse; -import org.jboss.portal.test.framework.driver.http.response.InvokeGetRespo= nse; -import org.jboss.portal.test.framework.driver.DriverResponse; import org.jboss.portal.test.framework.portlet.PortletTest; import org.jboss.portal.test.framework.portlet.PortletTestDriver; import org.jboss.portal.test.framework.portlet.PortletTestSuite; @@ -34,7 +30,14 @@ import org.jboss.portal.test.framework.portlet.actions.PortletRenderTestAc= tion; import org.jboss.portal.test.portlet.framework.UTP1; import org.jboss.portal.test.portlet.framework.UTP2; +import org.jboss.unit.remote.driver.handler.http.response.InvokeGetRespons= e; +import org.jboss.unit.driver.DriverResponse; +import org.jboss.unit.driver.response.FailureResponse; +import org.jboss.unit.driver.response.EndTestResponse; +import org.jboss.unit.Failure; = +import static org.jboss.unit.api.Assert.*; + import javax.portlet.ActionRequest; import javax.portlet.ActionResponse; import javax.portlet.Portlet; @@ -70,7 +73,7 @@ { protected DriverResponse run(Portlet portlet, RenderRequest reque= st, RenderResponse response, PortletTestContext context) { - return new FailureResponse(); + return new FailureResponse(Failure.createAssertionFailure("")); } }); } Modified: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/fram= ework/portlet/basictests/BasicTestSuite.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/framework/= portlet/basictests/BasicTestSuite.java 2007-10-23 02:52:32 UTC (rev 8745) +++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/framework/= portlet/basictests/BasicTestSuite.java 2007-10-23 07:31:22 UTC (rev 8746) @@ -22,15 +22,13 @@ *************************************************************************= *****/ package org.jboss.portal.test.framework.portlet.basictests; = -import junit.framework.Test; - /** * @author Boleslaw Daw= idowicz * @version $Revision: 5510 $ */ public class BasicTestSuite { - public static Test suite() + public static void suite() { // TestSuite suite =3D new TestSuite("test-basic.war"); // @@ -43,6 +41,5 @@ // suite.addTest(new TestCase("TwoResultPortlet")); // // return suite; - return null; } } Modified: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/fram= ework/portlet/basictests/classes/JoinpointTestCase.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/framework/= portlet/basictests/classes/JoinpointTestCase.java 2007-10-23 02:52:32 UTC (= rev 8745) +++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/framework/= portlet/basictests/classes/JoinpointTestCase.java 2007-10-23 07:31:22 UTC (= rev 8746) @@ -22,14 +22,15 @@ *************************************************************************= *****/ package org.jboss.portal.test.framework.portlet.basictests.classes; = -import junit.framework.TestCase; import org.jboss.portal.test.framework.portlet.Joinpoint; = +import static org.jboss.unit.api.Assert.*; + /** * @author Boleslaw Daw= idowicz * @version $Revision: 5448 $ */ -public class JoinpointTestCase extends TestCase +public class JoinpointTestCase { public void testCreate() { Modified: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/fram= ework/portlet/basictests/classes/SequenceRegistryBuilderTestCase.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/framework/= portlet/basictests/classes/SequenceRegistryBuilderTestCase.java 2007-10-23 = 02:52:32 UTC (rev 8745) +++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/framework/= portlet/basictests/classes/SequenceRegistryBuilderTestCase.java 2007-10-23 = 07:31:22 UTC (rev 8746) @@ -22,21 +22,22 @@ *************************************************************************= *****/ package org.jboss.portal.test.framework.portlet.basictests.classes; = -import junit.framework.TestCase; import org.jboss.portal.test.framework.portlet.PortletTestDriver; = import java.util.LinkedList; import java.util.List; = +import static org.jboss.unit.api.Assert.*; + /** * @author Boleslaw Daw= idowicz * @version $Revision: 6752 $ */ -public class SequenceRegistryBuilderTestCase extends TestCase +public class SequenceRegistryBuilderTestCase { public void testBuilder() { - final PortletTestDriver sr =3D new PortletTestDriver("toto"); + final PortletTestDriver sr =3D new PortletTestDriver(null, null, "to= to"); = final List invoked =3D new LinkedList(); = Modified: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/fram= ework/portlet/basictests/classes/SequenceRegistryTestCase.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/framework/= portlet/basictests/classes/SequenceRegistryTestCase.java 2007-10-23 02:52:3= 2 UTC (rev 8745) +++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/framework/= portlet/basictests/classes/SequenceRegistryTestCase.java 2007-10-23 07:31:2= 2 UTC (rev 8746) @@ -22,21 +22,22 @@ *************************************************************************= *****/ package org.jboss.portal.test.framework.portlet.basictests.classes; = -import junit.framework.TestCase; import org.jboss.portal.test.framework.portlet.PortletTest; import org.jboss.portal.test.framework.portlet.PortletTestDriver; = +import static org.jboss.unit.api.Assert.*; + /** * @author Boleslaw Daw= idowicz * @version $Revision: 6752 $ */ -public class SequenceRegistryTestCase extends TestCase +public class SequenceRegistryTestCase { public void testSequenceRegistry() { PortletTest portletTest =3D new PortletTest(); = - PortletTestDriver sr =3D new PortletTestDriver("toto"); + PortletTestDriver sr =3D new PortletTestDriver(null, null, "toto"); = sr.addSequence("testA", portletTest); = Modified: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/fram= ework/portlet/basictests/classes/SequenceTestCase.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/framework/= portlet/basictests/classes/SequenceTestCase.java 2007-10-23 02:52:32 UTC (r= ev 8745) +++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/framework/= portlet/basictests/classes/SequenceTestCase.java 2007-10-23 07:31:22 UTC (r= ev 8746) @@ -22,24 +22,25 @@ *************************************************************************= *****/ package org.jboss.portal.test.framework.portlet.basictests.classes; = -import junit.framework.TestCase; -import org.jboss.portal.test.framework.driver.http.response.InvokeGetRespo= nse; -import org.jboss.portal.test.framework.driver.DriverResponse; import org.jboss.portal.test.framework.portlet.Joinpoint; import org.jboss.portal.test.framework.portlet.PortletTest; import org.jboss.portal.test.framework.portlet.actions.PortletRenderTestAc= tion; import org.jboss.portal.test.framework.portlet.TestAction; import org.jboss.portal.test.framework.portlet.PortletTestContext; +import org.jboss.unit.remote.driver.handler.http.response.InvokeGetRespons= e; +import org.jboss.unit.driver.DriverResponse; = import javax.portlet.Portlet; import javax.portlet.RenderRequest; import javax.portlet.RenderResponse; = +import static org.jboss.unit.api.Assert.*; + /** * @author Boleslaw Daw= idowicz * @version $Revision: 7954 $ */ -public class SequenceTestCase extends TestCase +public class SequenceTestCase { public void testSequence() { Modified: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/fram= ework/portlet/components/AbstractTestGenericPortlet.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/framework/= portlet/components/AbstractTestGenericPortlet.java 2007-10-23 02:52:32 UTC = (rev 8745) +++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/framework/= portlet/components/AbstractTestGenericPortlet.java 2007-10-23 07:31:22 UTC = (rev 8746) @@ -25,9 +25,9 @@ import org.jboss.portal.test.framework.portlet.PortletTestContext; import org.jboss.portal.test.framework.portlet.PortletTestDriver; import org.jboss.portal.common.util.Tools; -import org.jboss.portal.test.framework.driver.DriverResponse; -import org.jboss.portal.test.framework.driver.response.FailureResponse; -import org.jboss.portal.test.framework.driver.response.ErrorResponse; +import org.jboss.unit.driver.DriverResponse; +import org.jboss.unit.driver.response.FailureResponse; +import org.jboss.unit.Failure; = import javax.portlet.ActionRequest; import javax.portlet.ActionResponse; @@ -38,8 +38,6 @@ import javax.portlet.RenderResponse; import java.io.IOException; = -import junit.framework.AssertionFailedError; - /** * Abstract test class for testing GenericPortlet implementation * @@ -74,9 +72,9 @@ { response =3D doProcessAction(req, resp, context); } - catch (AssertionFailedError e) + catch (AssertionError e) { - response =3D new FailureResponse(e); + response =3D new FailureResponse(Failure.createFailure(e)); } = // @@ -87,7 +85,7 @@ } else { - context.setResponse(new ErrorResponse()); + context.setResponse(new FailureResponse(Failure.createErrorFailur= e(""))); } } = @@ -103,9 +101,9 @@ super.render(req, resp); response =3D postRender(req, resp, context); } - catch (AssertionFailedError e) + catch (AssertionError e) { - response =3D new FailureResponse(e); + response =3D new FailureResponse(Failure.createFailure(e)); } = // Modified: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/fram= ework/portlet/components/AbstractTestPortlet.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/framework/= portlet/components/AbstractTestPortlet.java 2007-10-23 02:52:32 UTC (rev 87= 45) +++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/framework/= portlet/components/AbstractTestPortlet.java 2007-10-23 07:31:22 UTC (rev 87= 46) @@ -24,9 +24,9 @@ = import org.jboss.portal.test.framework.portlet.PortletTestContext; import org.jboss.portal.test.framework.portlet.PortletTestDriver; -import org.jboss.portal.test.framework.driver.DriverResponse; -import org.jboss.portal.test.framework.driver.response.FailureResponse; -import org.jboss.portal.test.framework.driver.response.ErrorResponse; +import org.jboss.unit.driver.DriverResponse; +import org.jboss.unit.driver.response.FailureResponse; +import org.jboss.unit.Failure; = import javax.portlet.ActionRequest; import javax.portlet.ActionResponse; @@ -38,8 +38,6 @@ import javax.portlet.RenderResponse; import java.io.IOException; = -import junit.framework.AssertionFailedError; - /** * @author Julien Viet * @author Boleslaw Daw= idowicz @@ -111,9 +109,9 @@ { response =3D doProcessAction(req, resp, context); } - catch (AssertionFailedError e) + catch (AssertionError e) { - response =3D new FailureResponse(e); + response =3D new FailureResponse(Failure.createFailure(e)); } = // @@ -124,7 +122,7 @@ } else { - context.setResponse(new ErrorResponse()); + context.setResponse(new FailureResponse(Failure.createErrorFailur= e(""))); } } = @@ -138,9 +136,9 @@ { response =3D doRender(req, resp, context); } - catch (AssertionFailedError e) + catch (AssertionError e) { - response =3D new FailureResponse(e); + response =3D new FailureResponse(Failure.createFailure(e)); } = // Modified: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/fram= ework/portlet/components/AbstractUniversalTestPortlet.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/framework/= portlet/components/AbstractUniversalTestPortlet.java 2007-10-23 02:52:32 UT= C (rev 8745) +++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/framework/= portlet/components/AbstractUniversalTestPortlet.java 2007-10-23 07:31:22 UT= C (rev 8746) @@ -23,8 +23,6 @@ package org.jboss.portal.test.framework.portlet.components; = import org.apache.log4j.Logger; -import org.jboss.portal.test.framework.driver.response.FailureResponse; -import org.jboss.portal.test.framework.driver.DriverResponse; import org.jboss.portal.test.framework.portlet.Joinpoint; import org.jboss.portal.test.framework.portlet.PortletTest; import org.jboss.portal.test.framework.portlet.PortletTestDriver; @@ -33,6 +31,9 @@ import org.jboss.portal.test.framework.portlet.TestAction; import org.jboss.portal.test.framework.portlet.PortletTestContext; import org.jboss.portal.test.framework.server.NodeId; +import org.jboss.unit.driver.response.FailureResponse; +import org.jboss.unit.driver.DriverResponse; +import org.jboss.unit.Failure; = import javax.portlet.ActionRequest; import javax.portlet.ActionResponse; @@ -153,11 +154,11 @@ // if (action =3D=3D null) { - ctx.setResponse(new FailureResponse("No action for " + ctx.get= RequestCount() + " " + NodeId.locate() + " " + actionJoinpoint)); + ctx.setResponse(new FailureResponse(Failure.createAssertionFai= lure("No action for " + ctx.getRequestCount() + " " + NodeId.locate() + " "= + actionJoinpoint))); } else if (action instanceof PortletActionTestAction =3D=3D false) { - ctx.setResponse(new FailureResponse("Action for " + ctx.getReq= uestCount() + " " + NodeId.locate() + " " + actionJoinpoint + " is not an i= nstance of " + PortletActionTestAction.class.getName() + " but is " + actio= n.getClass().getName())); + ctx.setResponse(new FailureResponse(Failure.createAssertionFai= lure("Action for " + ctx.getRequestCount() + " " + NodeId.locate() + " " + = actionJoinpoint + " is not an instance of " + PortletActionTestAction.class= .getName() + " but is " + action.getClass().getName()))); } else { Modified: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/fram= ework/portlet/components/AbstractUniversalTestServlet.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/framework/= portlet/components/AbstractUniversalTestServlet.java 2007-10-23 02:52:32 UT= C (rev 8745) +++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/framework/= portlet/components/AbstractUniversalTestServlet.java 2007-10-23 07:31:22 UT= C (rev 8746) @@ -23,7 +23,6 @@ package org.jboss.portal.test.framework.portlet.components; = import org.apache.log4j.Logger; -import org.jboss.portal.test.framework.driver.DriverResponse; import org.jboss.portal.test.framework.portlet.Joinpoint; import org.jboss.portal.test.framework.portlet.PortletTest; import org.jboss.portal.test.framework.portlet.PortletTestDriver; @@ -31,6 +30,7 @@ import org.jboss.portal.test.framework.portlet.TestAction; import org.jboss.portal.test.framework.portlet.PortletTestContext; import org.jboss.portal.test.framework.server.NodeId; +import org.jboss.unit.driver.DriverResponse; = import javax.servlet.ServletException; import javax.servlet.http.HttpServlet; Modified: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/port= let/ContentTypesTestCase.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/Co= ntentTypesTestCase.java 2007-10-23 02:52:32 UTC (rev 8745) +++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/Co= ntentTypesTestCase.java 2007-10-23 07:31:22 UTC (rev 8746) @@ -23,7 +23,6 @@ = package org.jboss.portal.test.portlet; = -import junit.framework.TestCase; import org.jboss.portal.Mode; import org.jboss.portal.portlet.impl.jsr168.info.ContentTypes; import org.jboss.portal.portlet.impl.jsr168.metadata.ContentTypeMetaData; @@ -31,12 +30,16 @@ = import java.util.Collection; = +import static org.jboss.unit.api.Assert.*; +import org.jboss.unit.api.pojo.annotations.Test; + /** * @author Chris Laprun * @version $Revision: 6720 $ * @since 2.4 */ -public class ContentTypesTestCase extends TestCase +(a)Test +public class ContentTypesTestCase { private ContentTypes contentTypes; = @@ -56,6 +59,7 @@ contentTypes.setMetadata(md); } = + @Test public void testGetAllModes() { Collection modes =3D contentTypes.getAllModes(); @@ -65,6 +69,7 @@ assertTrue(modes.contains(Mode.VIEW)); } = + @Test public void testGetAllContentTypes() { Collection types =3D contentTypes.getAllContentTypes(); @@ -76,10 +81,12 @@ assertTrue(types.contains("text")); } = + @Test public void testIsModeSupported() { } = + @Test public void testGetSupportedModes() { } @@ -89,6 +96,7 @@ } = = + @Test public void testIsModeSupportedFor() { } Modified: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/port= let/ParametersTestCase.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/Pa= rametersTestCase.java 2007-10-23 02:52:32 UTC (rev 8745) +++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/Pa= rametersTestCase.java 2007-10-23 07:31:22 UTC (rev 8746) @@ -22,40 +22,44 @@ *************************************************************************= *****/ package org.jboss.portal.test.portlet; = -import org.jboss.portal.common.junit.ExtendedAssert; import org.jboss.portal.portlet.PortletParameters; = import java.util.Arrays; import java.util.HashMap; import java.util.Map; = -import junit.framework.TestCase; +import static org.jboss.unit.api.Assert.*; +import org.jboss.unit.api.pojo.annotations.Test; +import org.jboss.unit.api.pojo.annotations.Create; +import org.jboss.unit.api.pojo.annotations.Destroy; = /** * @author Julien Viet * @version $Revision: 6639 $ */ +(a)Test public class ParametersTestCase - extends TestCase { = - public ParametersTestCase(String name) + public ParametersTestCase() { - super(name); } = private PortletParameters param; = + @Create public void setUp() { param =3D new PortletParameters(); } = + @Destroy public void tearDown() { param =3D null; } = + @Test public void testGetWithNullName() { try @@ -68,12 +72,14 @@ } } = + @Test public void testSet() { param.setValue("a", "b"); assertEquals(param.getValue("a"), "b"); } = + @Test public void testSetWithNullName() { try @@ -86,6 +92,7 @@ } } = + @Test public void testSetWithNullValue() { try @@ -98,6 +105,7 @@ } } = + @Test public void testRemoveWithNullName() { try @@ -110,6 +118,7 @@ } } = + @Test public void testRemove() { param.setValue("a", "b"); @@ -117,6 +126,7 @@ assertEquals(param.getValue("a"), null); } = + @Test public void testSetValues() { param.setValues("a", new String[]{"b", "c"}); @@ -125,6 +135,7 @@ assertEquals(param.getValue("a"), "b"); } = + @Test public void testSetValuesWithNullName() { try @@ -137,6 +148,7 @@ } } = + @Test public void testSetValuesWithNullValues() { try @@ -149,6 +161,7 @@ } } = + @Test public void testSetValuesWithZeroLengthValues() { try @@ -161,6 +174,7 @@ } } = + @Test public void testSetValuesWithOneNullValue() { try @@ -173,6 +187,7 @@ } } = + @Test public void testReplaceWithParameters() { PortletParameters other =3D new PortletParameters(); @@ -183,6 +198,7 @@ assertTrue(Arrays.equals(param.getValues("c"), new String[]{"d", "e"= })); } = + @Test public void testCopyConstructorWithNullParameters() { try @@ -195,6 +211,7 @@ } } = + @Test public void testCopyConstructorWithNullMap() { try @@ -207,6 +224,7 @@ } } = + @Test public void testReplaceWithNullMap() { try @@ -219,6 +237,7 @@ } } = + @Test public void testReplaceWithInvalidMap() { Map[] maps =3D buildInvalidMaps(); @@ -238,6 +257,7 @@ } } = + @Test public void testReplace() { param.setValue("a", "b"); @@ -249,11 +269,12 @@ map.put("h", new String[]{"_i"}); param.replace(map); assertEquals(3, param.size()); - ExtendedAssert.assertEquals(param.getValues("a"), new String[]{"_b"}= ); - ExtendedAssert.assertEquals(param.getValues("c"), new String[]{"_d",= "_e"}); - ExtendedAssert.assertEquals(param.getValues("h"), new String[]{"_i"}= ); + assertEquals(param.getValues("a"), new String[]{"_b"}); + assertEquals(param.getValues("c"), new String[]{"_d", "_e"}); + assertEquals(param.getValues("h"), new String[]{"_i"}); } = + @Test public void testAppendWithInvalidMap() { Map[] maps =3D buildInvalidMaps(); @@ -276,6 +297,7 @@ } } = + @Test public void testAppend() { param.setValue("a", "b"); @@ -287,12 +309,13 @@ map.put("h", new String[]{"_i"}); param.append(map); assertEquals(4, param.size()); - ExtendedAssert.assertEquals(param.getValues("a"), new String[]{"b", = "_b"}); - ExtendedAssert.assertEquals(param.getValues("c"), new String[]{"d", = "e", "_d", "_e"}); - ExtendedAssert.assertEquals(param.getValues("f"), new String[]{"g"}); - ExtendedAssert.assertEquals(param.getValues("h"), new String[]{"_i"}= ); + assertEquals(param.getValues("a"), new String[]{"b", "_b"}); + assertEquals(param.getValues("c"), new String[]{"d", "e", "_d", "_e"= }); + assertEquals(param.getValues("f"), new String[]{"g"}); + assertEquals(param.getValues("h"), new String[]{"_i"}); } = + @Test public void testClear() { param.setValue("a", "b"); Modified: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/port= let/PortletRequestDecoderTestCase.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/Po= rtletRequestDecoderTestCase.java 2007-10-23 02:52:32 UTC (rev 8745) +++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/Po= rtletRequestDecoderTestCase.java 2007-10-23 07:31:22 UTC (rev 8746) @@ -22,14 +22,16 @@ *************************************************************************= *****/ package org.jboss.portal.test.portlet; = -import junit.framework.TestCase; import org.jboss.portal.Mode; import org.jboss.portal.WindowState; import org.jboss.portal.portlet.OpaqueStateString; import org.jboss.portal.portlet.PortletParameters; import org.jboss.portal.portlet.PortletParametersStateString; import org.jboss.portal.portlet.impl.PortletRequestDecoder; +import org.jboss.unit.api.pojo.annotations.Test; = +import static org.jboss.unit.api.Assert.*; + import java.util.HashMap; import java.util.Map; = @@ -37,12 +39,12 @@ * @author Julien Viet * @version $Revision: 6549 $ */ -public class PortletRequestDecoderTestCase extends TestCase +(a)Test +public class PortletRequestDecoderTestCase { = - public PortletRequestDecoderTestCase(String name) + public PortletRequestDecoderTestCase() { - super(name); } = private String[] asStringArray(String s) @@ -50,6 +52,7 @@ return new String[]{s}; } = + @Test public void testCorruped() { Map queryParams =3D new HashMap(); @@ -165,6 +168,7 @@ } } = + @Test public void testNav() { Map queryParams =3D new HashMap(); @@ -250,6 +254,7 @@ bodyParams.clear(); } = + @Test public void testRender() { Map queryParams =3D new HashMap(); @@ -291,6 +296,7 @@ queryParams.clear(); } = + @Test public void testRenderNonOpaque() { Map queryParams =3D new HashMap(); @@ -426,6 +432,7 @@ bodyParams.clear(); } = + @Test public void testRenderOpaque() { Map queryParams =3D new HashMap(); @@ -494,6 +501,7 @@ bodyParams.clear(); } = + @Test public void testAction() { Map queryParams =3D new HashMap(); @@ -535,6 +543,7 @@ queryParams.clear(); } = + @Test public void testActionNonOpaque() { Map queryParams =3D new HashMap(); @@ -606,6 +615,7 @@ form.clear(); } = + @Test public void testActionOpaque() { Map queryParams =3D new HashMap(); Modified: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/port= let/PortletRequestEncoderTestCase.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/Po= rtletRequestEncoderTestCase.java 2007-10-23 02:52:32 UTC (rev 8745) +++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/Po= rtletRequestEncoderTestCase.java 2007-10-23 07:31:22 UTC (rev 8746) @@ -22,21 +22,24 @@ *************************************************************************= *****/ package org.jboss.portal.test.portlet; = -import junit.framework.TestCase; import org.jboss.portal.portlet.impl.PortletRequestEncoder; import org.jboss.portal.portlet.impl.PortletRequestDecoder; import org.jboss.portal.portlet.PortletParameters; import org.jboss.portal.portlet.PortletParametersStateString; import org.jboss.portal.common.util.ParameterMap; -import org.jboss.portal.common.junit.ExtendedAssert; import org.jboss.portal.Mode; import org.jboss.portal.WindowState; = +import static org.jboss.unit.api.Assert.*; +import org.jboss.unit.api.pojo.annotations.Create; +import org.jboss.unit.api.pojo.annotations.Destroy; +import org.jboss.unit.api.pojo.annotations.Test; + /** * @author Julien Viet * @version $Revision: 1.1 $ */ -public class PortletRequestEncoderTestCase extends TestCase +public class PortletRequestEncoderTestCase { = /** . */ @@ -51,23 +54,27 @@ /** . */ private PortletRequestEncoder encoder; = - protected void setUp() throws Exception + @Create + public void setUp() throws Exception { params =3D new PortletParameters(); encoder =3D new PortletRequestEncoder(params); } = - protected void tearDown() throws Exception + @Destroy + public void tearDown() throws Exception { params =3D null; encoder =3D null; } = + @Test public void testEncodeRender() { _testEncodeRender(RENDER, PortletRequestDecoder.RENDER_MASK); } = + @Test public void testEncodeAction() { _testEncodeRender(ACTION, PortletRequestDecoder.ACTION_MASK); @@ -78,90 +85,91 @@ PortletParametersStateString pp =3D new PortletParametersStateString= (); encode(pp, null, null, lifecycle); assertEquals(1, params.size()); - assertEquals(lifecycleMask, params.getValues(PortletRequestDecoder.M= ETA_PARAMETER)); + _assertEquals(lifecycleMask, params.getValues(PortletRequestDecoder.= META_PARAMETER)); = // pp =3D new PortletParametersStateString(); pp.setValue(PortletRequestDecoder.META_PARAMETER, "foo"); encode(pp, null, null, lifecycle); assertEquals(1, params.size()); - assertEquals(new String[]{Integer.toHexString(lifecycleMask),"foo"},= params.getValues(PortletRequestDecoder.META_PARAMETER)); + _assertEquals(new String[]{Integer.toHexString(lifecycleMask),"foo"}= , params.getValues(PortletRequestDecoder.META_PARAMETER)); = // pp =3D new PortletParametersStateString(); pp.setValue("foo", "bar"); encode(pp, null, null, lifecycle); assertEquals(2, params.size()); - assertEquals(lifecycleMask, params.getValues(PortletRequestDecoder.M= ETA_PARAMETER)); - assertEquals("bar", params.getValues("foo")); + _assertEquals(lifecycleMask, params.getValues(PortletRequestDecoder.= META_PARAMETER)); + _assertEquals("bar", params.getValues("foo")); = // pp =3D new PortletParametersStateString(); encode(pp, Mode.VIEW, null, lifecycle); assertEquals(2, params.size()); - assertEquals(lifecycleMask | PortletRequestDecoder.MODE_MASK, params= .getValues(PortletRequestDecoder.META_PARAMETER)); - assertEquals(Mode.VIEW, params.getValues(PortletRequestDecoder.MODE_= PARAMETER)); + _assertEquals(lifecycleMask | PortletRequestDecoder.MODE_MASK, param= s.getValues(PortletRequestDecoder.META_PARAMETER)); + _assertEquals(Mode.VIEW, params.getValues(PortletRequestDecoder.MODE= _PARAMETER)); = // pp =3D new PortletParametersStateString(); pp.setValue(PortletRequestDecoder.MODE_PARAMETER, "foo"); encode(pp, Mode.VIEW, null, lifecycle); assertEquals(2, params.size()); - assertEquals(lifecycleMask | PortletRequestDecoder.MODE_MASK, params= .getValues(PortletRequestDecoder.META_PARAMETER)); - assertEquals(new String[]{Mode.VIEW.toString(),"foo"}, params.getVal= ues(PortletRequestDecoder.MODE_PARAMETER)); + _assertEquals(lifecycleMask | PortletRequestDecoder.MODE_MASK, param= s.getValues(PortletRequestDecoder.META_PARAMETER)); + _assertEquals(new String[]{Mode.VIEW.toString(),"foo"}, params.getVa= lues(PortletRequestDecoder.MODE_PARAMETER)); = // pp =3D new PortletParametersStateString(); pp.setValue("foo", "bar"); encode(pp, Mode.VIEW, null, lifecycle); assertEquals(3, params.size()); - assertEquals(lifecycleMask | PortletRequestDecoder.MODE_MASK, params= .getValues(PortletRequestDecoder.META_PARAMETER)); - assertEquals(Mode.VIEW, params.getValues(PortletRequestDecoder.MODE_= PARAMETER)); - assertEquals("bar", params.getValues("foo")); + _assertEquals(lifecycleMask | PortletRequestDecoder.MODE_MASK, param= s.getValues(PortletRequestDecoder.META_PARAMETER)); + _assertEquals(Mode.VIEW, params.getValues(PortletRequestDecoder.MODE= _PARAMETER)); + _assertEquals("bar", params.getValues("foo")); = // pp =3D new PortletParametersStateString(); encode(pp, null, WindowState.NORMAL, lifecycle); assertEquals(2, params.size()); - assertEquals(lifecycleMask | PortletRequestDecoder.WINDOW_STATE_MASK= , params.getValues(PortletRequestDecoder.META_PARAMETER)); - assertEquals(WindowState.NORMAL, params.getValues(PortletRequestDeco= der.WINDOW_STATE_PARAMETER)); + _assertEquals(lifecycleMask | PortletRequestDecoder.WINDOW_STATE_MAS= K, params.getValues(PortletRequestDecoder.META_PARAMETER)); + _assertEquals(WindowState.NORMAL, params.getValues(PortletRequestDec= oder.WINDOW_STATE_PARAMETER)); = // pp =3D new PortletParametersStateString(); pp.setValue(PortletRequestDecoder.WINDOW_STATE_PARAMETER, "foo"); encode(pp, null, WindowState.NORMAL, lifecycle); assertEquals(2, params.size()); - assertEquals(lifecycleMask | PortletRequestDecoder.WINDOW_STATE_MASK= , params.getValues(PortletRequestDecoder.META_PARAMETER)); - assertEquals(new String[]{WindowState.NORMAL.toString(),"foo"}, para= ms.getValues(PortletRequestDecoder.WINDOW_STATE_PARAMETER)); + _assertEquals(lifecycleMask | PortletRequestDecoder.WINDOW_STATE_MAS= K, params.getValues(PortletRequestDecoder.META_PARAMETER)); + _assertEquals(new String[]{WindowState.NORMAL.toString(),"foo"}, par= ams.getValues(PortletRequestDecoder.WINDOW_STATE_PARAMETER)); = // pp =3D new PortletParametersStateString(); pp.setValue("foo", "bar"); encode(pp, null, WindowState.NORMAL, lifecycle); assertEquals(3, params.size()); - assertEquals(lifecycleMask | PortletRequestDecoder.WINDOW_STATE_MASK= , params.getValues(PortletRequestDecoder.META_PARAMETER)); - assertEquals(WindowState.NORMAL, params.getValues(PortletRequestDeco= der.WINDOW_STATE_PARAMETER)); - assertEquals("bar", params.getValues("foo")); + _assertEquals(lifecycleMask | PortletRequestDecoder.WINDOW_STATE_MAS= K, params.getValues(PortletRequestDecoder.META_PARAMETER)); + _assertEquals(WindowState.NORMAL, params.getValues(PortletRequestDec= oder.WINDOW_STATE_PARAMETER)); + _assertEquals("bar", params.getValues("foo")); = // pp =3D new PortletParametersStateString(); encode(pp, Mode.VIEW, WindowState.NORMAL, lifecycle); assertEquals(3, params.size()); - assertEquals(lifecycleMask | PortletRequestDecoder.MODE_MASK | Portl= etRequestDecoder.WINDOW_STATE_MASK, params.getValues(PortletRequestDecoder.= META_PARAMETER)); - assertEquals(Mode.VIEW, params.getValues(PortletRequestDecoder.MODE_= PARAMETER)); - assertEquals(WindowState.NORMAL, params.getValues(PortletRequestDeco= der.WINDOW_STATE_PARAMETER)); + _assertEquals(lifecycleMask | PortletRequestDecoder.MODE_MASK | Port= letRequestDecoder.WINDOW_STATE_MASK, params.getValues(PortletRequestDecoder= .META_PARAMETER)); + _assertEquals(Mode.VIEW, params.getValues(PortletRequestDecoder.MODE= _PARAMETER)); + _assertEquals(WindowState.NORMAL, params.getValues(PortletRequestDec= oder.WINDOW_STATE_PARAMETER)); = // pp =3D new PortletParametersStateString(); pp.setValue("foo", "bar"); encode(pp, Mode.VIEW, WindowState.NORMAL, lifecycle); assertEquals(4, params.size()); - assertEquals(lifecycleMask | PortletRequestDecoder.MODE_MASK | Portl= etRequestDecoder.WINDOW_STATE_MASK, params.getValues(PortletRequestDecoder.= META_PARAMETER)); - assertEquals(Mode.VIEW, params.getValues(PortletRequestDecoder.MODE_= PARAMETER)); - assertEquals(WindowState.NORMAL, params.getValues(PortletRequestDeco= der.WINDOW_STATE_PARAMETER)); - assertEquals("bar", params.getValues("foo")); + _assertEquals(lifecycleMask | PortletRequestDecoder.MODE_MASK | Port= letRequestDecoder.WINDOW_STATE_MASK, params.getValues(PortletRequestDecoder= .META_PARAMETER)); + _assertEquals(Mode.VIEW, params.getValues(PortletRequestDecoder.MODE= _PARAMETER)); + _assertEquals(WindowState.NORMAL, params.getValues(PortletRequestDec= oder.WINDOW_STATE_PARAMETER)); + _assertEquals("bar", params.getValues("foo")); } = + @Test public void testEncodeNav() { encode(null, null, null, RENDER); @@ -170,18 +178,18 @@ // encode(null, Mode.VIEW, null, RENDER); assertEquals(1, params.size()); - assertEquals(Mode.VIEW, params.getValues(PortletRequestDecoder.MODE_= PARAMETER)); + _assertEquals(Mode.VIEW, params.getValues(PortletRequestDecoder.MODE= _PARAMETER)); = // encode(null, null, WindowState.NORMAL, RENDER); assertEquals(1, params.size()); - assertEquals(WindowState.NORMAL, params.getValues(PortletRequestDeco= der.WINDOW_STATE_PARAMETER)); + _assertEquals(WindowState.NORMAL, params.getValues(PortletRequestDec= oder.WINDOW_STATE_PARAMETER)); = // encode(null, Mode.VIEW, WindowState.NORMAL, RENDER); assertEquals(2, params.size()); - assertEquals(Mode.VIEW, params.getValues(PortletRequestDecoder.MODE_= PARAMETER)); - assertEquals(WindowState.NORMAL, params.getValues(PortletRequestDeco= der.WINDOW_STATE_PARAMETER)); + _assertEquals(Mode.VIEW, params.getValues(PortletRequestDecoder.MODE= _PARAMETER)); + _assertEquals(WindowState.NORMAL, params.getValues(PortletRequestDec= oder.WINDOW_STATE_PARAMETER)); } = private void encode(PortletParametersStateString params, Mode view, Win= dowState normal, int lifecycle) @@ -200,18 +208,18 @@ } } = - void assertEquals(int expected, String[] actual) + void _assertEquals(int expected, String[] actual) { - ExtendedAssert.assertEquals(new String[]{Integer.toHexString(expecte= d)}, actual); + _assertEquals(new String[]{Integer.toHexString(expected)}, actual); } = - void assertEquals(Object expected, String[] actual) + void _assertEquals(Object expected, String[] actual) { - ExtendedAssert.assertEquals(new String[]{"" + expected}, actual); + _assertEquals(new String[]{"" + expected}, actual); } = - void assertEquals(String[] expected, String[] actual) + void _assertEquals(String[] expected, String[] actual) { - ExtendedAssert.assertEquals(expected, actual); + assertEquals(expected, actual); } } Modified: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/port= let/PropertiesTestCase.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/Pr= opertiesTestCase.java 2007-10-23 02:52:32 UTC (rev 8745) +++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/Pr= opertiesTestCase.java 2007-10-23 07:31:22 UTC (rev 8746) @@ -22,22 +22,24 @@ *************************************************************************= *****/ package org.jboss.portal.test.portlet; = -import junit.framework.TestCase; import org.jboss.portal.common.util.Tools; import org.jboss.portal.portlet.Properties; +import org.jboss.unit.api.pojo.annotations.Test; = +import static org.jboss.unit.api.Assert.*; + /** * @author Julien Viet * @version $Revision: 5448 $ */ -public class PropertiesTestCase extends TestCase +public class PropertiesTestCase { = - public PropertiesTestCase(String name) + public PropertiesTestCase() { - super(name); } = + @Test public void testA() { Properties props =3D new Properties(); Modified: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/port= let/ha/session/SessionSequenceBuilder.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/ha= /session/SessionSequenceBuilder.java 2007-10-23 02:52:32 UTC (rev 8745) +++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/ha= /session/SessionSequenceBuilder.java 2007-10-23 07:31:22 UTC (rev 8746) @@ -22,9 +22,6 @@ *************************************************************************= *****/ package org.jboss.portal.test.portlet.ha.session; = -import org.jboss.portal.test.framework.driver.http.response.InvokeGetRespo= nse; -import org.jboss.portal.test.framework.driver.DriverResponse; -import org.jboss.portal.test.framework.driver.response.EndTestResponse; import org.jboss.portal.common.util.Tools; import org.jboss.portal.test.framework.portlet.PortletTest; import org.jboss.portal.test.framework.portlet.PortletTestDriver; @@ -33,7 +30,12 @@ import org.jboss.portal.test.framework.portlet.actions.PortletRenderTestAc= tion; import org.jboss.portal.test.portlet.framework.UTP1; import org.jboss.portal.test.framework.server.NodeId; +import org.jboss.unit.driver.response.EndTestResponse; +import org.jboss.unit.driver.DriverResponse; +import org.jboss.unit.remote.driver.handler.http.response.InvokeGetRespons= e; = +import static org.jboss.unit.api.Assert.*; + import javax.portlet.Portlet; import javax.portlet.PortletException; import javax.portlet.PortletSecurityException; Modified: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/port= let/ha/session/SessionTestCase.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/ha= /session/SessionTestCase.java 2007-10-23 02:52:32 UTC (rev 8745) +++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/ha= /session/SessionTestCase.java 2007-10-23 07:31:22 UTC (rev 8746) @@ -22,20 +22,17 @@ *************************************************************************= *****/ package org.jboss.portal.test.portlet.ha.session; = -import org.jboss.portal.test.framework.runner.HTTPTestRunner; -import org.jboss.portal.test.framework.server.NodeId; - /** * @author Julien Viet * @version $Revision: 1.1 $ */ -public class SessionTestCase extends HTTPTestRunner +public class SessionTestCase // extends HTTPTestRunner { public SessionTestCase() { - super(new NodeId[]{NodeId.PORTS_01,NodeId.PORTS_02}); +// super(new NodeId[]{NodeId.PORTS_01,NodeId.PORTS_02}); = // - init("test-ha-session.war"); +// init("test-ha-session.war"); } } Modified: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/port= let/info/AbstractInfoTest.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/in= fo/AbstractInfoTest.java 2007-10-23 02:52:32 UTC (rev 8745) +++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/in= fo/AbstractInfoTest.java 2007-10-23 07:31:22 UTC (rev 8746) @@ -23,17 +23,21 @@ package org.jboss.portal.test.portlet.info; = import org.jboss.portal.portlet.container.PortletApplicationRegistry; -import org.jboss.portal.test.framework.driver.DriverResponse; -import org.jboss.portal.test.framework.driver.DriverCommand; -import org.jboss.portal.test.framework.driver.TestDriverException; -import org.jboss.portal.test.framework.driver.TestDriverContainer; -import org.jboss.portal.test.framework.driver.response.ErrorResponse; -import org.jboss.portal.test.framework.driver.response.EndTestResponse; -import org.jboss.portal.test.framework.driver.command.StartTestCommand; -import org.jboss.portal.test.framework.info.TestItemInfo; -import org.jboss.portal.test.framework.info.TestInfo; -import org.jboss.portal.test.framework.driver.remote.TestContext; -import org.jboss.portal.test.framework.driver.remote.RemoteTestDriver; +import org.jboss.unit.info.TestInfo; +import org.jboss.unit.info.impl.SimpleTestSuiteInfo; +import org.jboss.unit.remote.driver.RemoteTestDriver; +import org.jboss.unit.remote.RequestContext; +import org.jboss.unit.remote.ResponseContext; +import org.jboss.unit.driver.impl.composite.CompositeTestDriver; +import org.jboss.unit.driver.DriverResponse; +import org.jboss.unit.driver.DriverCommand; +import org.jboss.unit.driver.DriverContext; +import org.jboss.unit.driver.DriverException; +import org.jboss.unit.driver.response.EndTestResponse; +import org.jboss.unit.driver.response.FailureResponse; +import org.jboss.unit.driver.command.StartTestCommand; +import org.jboss.unit.Failure; +import org.jboss.unit.TestId; = /** * @author Julien Viet @@ -52,10 +56,10 @@ protected PortletApplicationRegistry registry; = /** The controller. */ - protected TestDriverContainer testDriverContainer; + protected CompositeTestDriver testDriverContainer; = /** Not really used for now, we need the concept of non http test conte= xt. */ - private TestContext testContext; + private RequestContext testContext; = public AbstractInfoTest(String testCaseId) { @@ -66,17 +70,17 @@ = // this.testCaseId =3D testCaseId; - this.testInfo =3D new TestInfo(testCaseId); + this.testInfo =3D new SimpleTestSuiteInfo(testCaseId); } = - public void pushContext(String testId, TestContext testContext) + public void pushContext(TestId testId, RequestContext requestContext) { - this.testContext =3D testContext; + this.testContext =3D requestContext; } = - public TestContext popContext(String testId) + public ResponseContext popContext(TestId testId) { - return testContext; + return null; } = public PortletApplicationRegistry getRegistry() @@ -89,32 +93,41 @@ this.registry =3D registry; } = - public TestDriverContainer getTestDriverRegistry() + public CompositeTestDriver getTestDriverRegistry() { return testDriverContainer; } = - public void setTestDriverRegistry(TestDriverContainer testDriverContain= er) + + public void initDriver(DriverContext driverContext) throws DriverExcept= ion { + } + + public void destroyDriver() + { + } + + public void setTestDriverRegistry(CompositeTestDriver testDriverContain= er) + { this.testDriverContainer =3D testDriverContainer; } = - public void create() + public void create() throws Exception { - testDriverContainer.addDriver(this); + testDriverContainer.mount(this); } = public void destroy() { - testDriverContainer.removeDriver(this); + testDriverContainer.unmount(this); } = - public TestItemInfo getInfo() + public TestInfo getInfo() { return testInfo; } = - public DriverResponse invoke(String testId, DriverCommand cmd) throws T= estDriverException + public DriverResponse invoke(TestId testId, DriverCommand cmd) { if (cmd instanceof StartTestCommand) { @@ -127,12 +140,12 @@ } catch (Exception e) { - return new ErrorResponse(e); + return new FailureResponse(Failure.createFailure(e)); } } else { - return new ErrorResponse(); + return new FailureResponse(Failure.createAssertionFailure("Unexpe= cted command")); } } = Modified: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/port= let/info/CacheInfoTest.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/in= fo/CacheInfoTest.java 2007-10-23 02:52:32 UTC (rev 8745) +++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/in= fo/CacheInfoTest.java 2007-10-23 07:31:22 UTC (rev 8746) @@ -25,8 +25,9 @@ import org.jboss.portal.portlet.container.PortletContainer; import org.jboss.portal.portlet.info.CacheInfo; import org.jboss.portal.portlet.info.PortletInfo; -import org.jboss.portal.common.junit.ExtendedAssert; = +import static org.jboss.unit.api.Assert.*; + /** * @author Boleslaw Daw= idowicz * @version $Revision: 7954 $ @@ -44,7 +45,7 @@ PortletContainer container =3D registry.getPortletApplication("/test= -info").getPortletContainer("CachePortlet"); PortletInfo info =3D container.getInfo(); CacheInfo cacheInfo =3D info.getCache(); - ExtendedAssert.assertEquals(65, cacheInfo.getExpirationSecs()); + assertEquals(65, cacheInfo.getExpirationSecs()); //TODO:implement getReferenceType(); } } Modified: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/port= let/info/CapabilitiesInfoTest.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/in= fo/CapabilitiesInfoTest.java 2007-10-23 02:52:32 UTC (rev 8745) +++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/in= fo/CapabilitiesInfoTest.java 2007-10-23 07:31:22 UTC (rev 8746) @@ -30,8 +30,9 @@ import org.jboss.portal.portlet.info.ModeInfo; import org.jboss.portal.portlet.info.PortletInfo; import org.jboss.portal.portlet.info.WindowStateInfo; -import org.jboss.portal.common.junit.ExtendedAssert; = +import static org.jboss.unit.api.Assert.*; + import java.util.HashSet; import java.util.Iterator; import java.util.Locale; @@ -58,8 +59,8 @@ //TODO: finish locales asserts // locales should at least contain Locale.ENGLISH Set allLocales =3D capInfo.getAllLocales(); - ExtendedAssert.assertNotNull(allLocales); - ExtendedAssert.assertTrue(allLocales.contains(Locale.ENGLISH)); + assertNotNull(allLocales); + assertTrue(allLocales.contains(Locale.ENGLISH)); = //check mime types Set types =3D capInfo.getMimeTypes(); @@ -70,59 +71,59 @@ Object o =3D i.next(); mt[count++] =3D (String)o; } - ExtendedAssert.assertEquals(new String[]{"text/vnd.wap.wml", "text/h= tml"}, mt); + assertEquals(new String[]{"text/vnd.wap.wml", "text/html"}, mt); = //check all modes Set modeInfos =3D capInfo.getAllModes(); Set modes =3D extractModes(modeInfos); = - ExtendedAssert.assertTrue(modes.contains(Mode.VIEW)); - ExtendedAssert.assertTrue(modes.contains(Mode.HELP)); - ExtendedAssert.assertTrue(modes.contains(Mode.EDIT)); + assertTrue(modes.contains(Mode.VIEW)); + assertTrue(modes.contains(Mode.HELP)); + assertTrue(modes.contains(Mode.EDIT)); = //check text/html modes modeInfos =3D capInfo.getModes("text/html"); modes =3D extractModes(modeInfos); - ExtendedAssert.assertEquals(2, modes.size()); - ExtendedAssert.assertTrue(modes.contains(Mode.VIEW)); - ExtendedAssert.assertTrue(modes.contains(Mode.HELP)); + assertEquals(2, modes.size()); + assertTrue(modes.contains(Mode.VIEW)); + assertTrue(modes.contains(Mode.HELP)); = //check text/vnd.wap.wml modes modeInfos =3D capInfo.getModes("text/vnd.wap.wml"); modes =3D extractModes(modeInfos); - ExtendedAssert.assertEquals(2, modes.size()); - ExtendedAssert.assertTrue(modes.contains(Mode.VIEW)); - ExtendedAssert.assertTrue(modes.contains(Mode.EDIT)); + assertEquals(2, modes.size()); + assertTrue(modes.contains(Mode.VIEW)); + assertTrue(modes.contains(Mode.EDIT)); = //check undeclared modeInfos =3D capInfo.getModes("text/undeclared"); modes =3D extractModes(modeInfos); - ExtendedAssert.assertEquals(0, modes.size()); + assertEquals(0, modes.size()); = //check all window states Set stateInfos =3D capInfo.getAllWindowStates(); Set states =3D extractWindowStates(stateInfos); - ExtendedAssert.assertEquals(3, states.size()); - ExtendedAssert.assertTrue(states.contains(WindowState.NORMAL)); - ExtendedAssert.assertTrue(states.contains(WindowState.MINIMIZED)); - ExtendedAssert.assertTrue(states.contains(WindowState.MAXIMIZED)); + assertEquals(3, states.size()); + assertTrue(states.contains(WindowState.NORMAL)); + assertTrue(states.contains(WindowState.MINIMIZED)); + assertTrue(states.contains(WindowState.MAXIMIZED)); = //check for text/html stateInfos =3D capInfo.getWindowStates("text/html"); states =3D extractWindowStates(stateInfos); - ExtendedAssert.assertEquals(3, states.size()); - ExtendedAssert.assertTrue(states.contains(WindowState.NORMAL)); - ExtendedAssert.assertTrue(states.contains(WindowState.MINIMIZED)); - ExtendedAssert.assertTrue(states.contains(WindowState.MAXIMIZED)); + assertEquals(3, states.size()); + assertTrue(states.contains(WindowState.NORMAL)); + assertTrue(states.contains(WindowState.MINIMIZED)); + assertTrue(states.contains(WindowState.MAXIMIZED)); = //simple check for text/vnd.wap.wml //TODO:is this really expected behaviour? shouldn't it return no sta= tes as this is unsupported by portal one? states =3D capInfo.getWindowStates("text/vnd.wap.wml"); - ExtendedAssert.assertEquals(3, states.size()); + assertEquals(3, states.size()); = //check undeclared states =3D capInfo.getWindowStates("undeclared/mime"); - ExtendedAssert.assertEquals(0, states.size()); + assertEquals(0, states.size()); = //fail(); = @@ -137,7 +138,7 @@ { WindowStateInfo info =3D (WindowStateInfo)i.next(); WindowState state =3D info.getWindowState(); - ExtendedAssert.assertEquals(state.toString(), (info.getWindowStat= eName())); + assertEquals(state.toString(), (info.getWindowStateName())); states.add(state); } return states; @@ -151,7 +152,7 @@ { ModeInfo info =3D (ModeInfo)i.next(); Mode mode =3D info.getMode(); - ExtendedAssert.assertEquals(mode.toString(), (info.getModeName())= ); + assertEquals(mode.toString(), (info.getModeName())); modes.add(mode); } return modes; Modified: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/port= let/info/MetaInfoTest.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/in= fo/MetaInfoTest.java 2007-10-23 02:52:32 UTC (rev 8745) +++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/in= fo/MetaInfoTest.java 2007-10-23 07:31:22 UTC (rev 8746) @@ -26,8 +26,9 @@ import org.jboss.portal.portlet.container.PortletContainer; import org.jboss.portal.portlet.info.MetaInfo; import org.jboss.portal.portlet.info.PortletInfo; -import org.jboss.portal.common.junit.ExtendedAssert; = +import static org.jboss.unit.api.Assert.*; + import java.util.Locale; = /** @@ -51,16 +52,16 @@ // LocalizedString title =3D metaInfo.getMetaValue(MetaInfo.TITLE); String titleEn =3D title.getString(Locale.ENGLISH, false); - ExtendedAssert.assertEquals("title", titleEn); + assertEquals("title", titleEn); = // LocalizedString shortTitle =3D metaInfo.getMetaValue(MetaInfo.SHORT_= TITLE); String shortTitleEn =3D shortTitle.getString(Locale.ENGLISH, false); - ExtendedAssert.assertEquals("short-title", shortTitleEn); + assertEquals("short-title", shortTitleEn); = // LocalizedString keywords =3D metaInfo.getMetaValue(MetaInfo.KEYWORDS= ); String keywordsEn =3D keywords.getString(Locale.ENGLISH, false); - ExtendedAssert.assertEquals("keywords", keywordsEn); + assertEquals("keywords", keywordsEn); } } Modified: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/port= let/info/ModeInfoTest.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/in= fo/ModeInfoTest.java 2007-10-23 02:52:32 UTC (rev 8745) +++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/in= fo/ModeInfoTest.java 2007-10-23 07:31:22 UTC (rev 8746) @@ -26,8 +26,9 @@ import org.jboss.portal.portlet.container.PortletContainer; import org.jboss.portal.portlet.info.CapabilitiesInfo; import org.jboss.portal.portlet.info.ModeInfo; -import org.jboss.portal.common.junit.ExtendedAssert; = +import static org.jboss.unit.api.Assert.*; + import java.util.HashSet; import java.util.Iterator; import java.util.Set; @@ -54,27 +55,27 @@ Set modeInfos =3D capaInfo.getModes("text/html"); = //shoule be 3 modes - ExtendedAssert.assertEquals(3, modeInfos.size()); + assertEquals(3, modeInfos.size()); = Set portletModes =3D new HashSet(); for (Iterator i =3D modeInfos.iterator(); i.hasNext();) { ModeInfo mode =3D (ModeInfo)i.next(); portletModes.add(mode.getMode()); - ExtendedAssert.assertEquals(mode.getModeName(), mode.getMode().to= String()); + assertEquals(mode.getModeName(), mode.getMode().toString()); } = = - ExtendedAssert.assertTrue(portletModes.contains(Mode.VIEW)); - ExtendedAssert.assertTrue(portletModes.contains(Mode.HELP)); - ExtendedAssert.assertTrue(portletModes.contains(Mode.EDIT)); + assertTrue(portletModes.contains(Mode.VIEW)); + assertTrue(portletModes.contains(Mode.HELP)); + assertTrue(portletModes.contains(Mode.EDIT)); = //Portlet 2 with only VIEW capaInfo =3D container2.getInfo().getCapabilities(); modeInfos =3D capaInfo.getModes("text/html"); = //shoule be 1 mode - ExtendedAssert.assertEquals(1, modeInfos.size()); + assertEquals(1, modeInfos.size()); = = portletModes =3D new HashSet(); @@ -82,11 +83,11 @@ { ModeInfo mode =3D (ModeInfo)i.next(); portletModes.add(mode.getMode()); - ExtendedAssert.assertEquals(mode.getModeName(), mode.getMode().to= String()); + assertEquals(mode.getModeName(), mode.getMode().toString()); } = - ExtendedAssert.assertTrue(portletModes.contains(Mode.VIEW)); - ExtendedAssert.assertTrue(!portletModes.contains(Mode.HELP)); - ExtendedAssert.assertTrue(!portletModes.contains(Mode.EDIT)); + assertTrue(portletModes.contains(Mode.VIEW)); + assertTrue(!portletModes.contains(Mode.HELP)); + assertTrue(!portletModes.contains(Mode.EDIT)); } } Modified: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/port= let/info/PortletInfoTest.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/in= fo/PortletInfoTest.java 2007-10-23 02:52:32 UTC (rev 8745) +++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/in= fo/PortletInfoTest.java 2007-10-23 07:31:22 UTC (rev 8746) @@ -24,8 +24,9 @@ = import org.jboss.portal.portlet.container.PortletContainer; import org.jboss.portal.portlet.info.PortletInfo; -import org.jboss.portal.common.junit.ExtendedAssert; = +import static org.jboss.unit.api.Assert.*; + /** * @author Boleslaw Daw= idowicz * @version $Revision: 6720 $ @@ -43,22 +44,22 @@ //This asserts only .isRemotable() as rest is checked in other tests PortletContainer container =3D registry.getPortletApplication("/test= -info").getPortletContainer("RemotablePortlet1"); PortletInfo info =3D container.getInfo(); - ExtendedAssert.assertEquals(Boolean.TRUE, info.isRemotable()); + assertEquals(Boolean.TRUE, info.isRemotable()); = //just simple test if we get other infos... - ExtendedAssert.assertNotNull(info.getCache()); - ExtendedAssert.assertNotNull(info.getCapabilities()); - ExtendedAssert.assertNotNull(info.getMeta()); - ExtendedAssert.assertNotNull(info.getPreferences()); - ExtendedAssert.assertNotNull(info.getSecurity()); - ExtendedAssert.assertNotNull(info.getSession()); + assertNotNull(info.getCache()); + assertNotNull(info.getCapabilities()); + assertNotNull(info.getMeta()); + assertNotNull(info.getPreferences()); + assertNotNull(info.getSecurity()); + assertNotNull(info.getSession()); = container =3D registry.getPortletApplication("/test-info").getPortle= tContainer("RemotablePortlet2"); info =3D container.getInfo(); - ExtendedAssert.assertEquals(Boolean.FALSE, info.isRemotable()); + assertEquals(Boolean.FALSE, info.isRemotable()); = container =3D registry.getPortletApplication("/test-info").getPortle= tContainer("RemotablePortlet3"); info =3D container.getInfo(); - ExtendedAssert.assertEquals(Boolean.TRUE, info.isRemotable()); + assertEquals(Boolean.TRUE, info.isRemotable()); } } Modified: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/port= let/info/PreferenceInfoTest.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/in= fo/PreferenceInfoTest.java 2007-10-23 02:52:32 UTC (rev 8745) +++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/in= fo/PreferenceInfoTest.java 2007-10-23 07:31:22 UTC (rev 8746) @@ -26,8 +26,9 @@ import org.jboss.portal.portlet.impl.jsr168.info.ContainerPreferencesInfo; import org.jboss.portal.portlet.impl.jsr168.info.ContainerPreferenceInfo; import org.jboss.portal.portlet.info.PortletInfo; -import org.jboss.portal.common.junit.ExtendedAssert; = +import static org.jboss.unit.api.Assert.*; + import java.util.Locale; import java.util.Set; = @@ -53,46 +54,46 @@ = // ContainerPreferenceInfo prefInfo =3D prefsInfo.getContainerPreferenc= e("localized_pref"); - ExtendedAssert.assertEquals("localized_pref", prefInfo.getKey()); - ExtendedAssert.assertEquals("english localized description", prefInf= o.getDescription().getString(Locale.ENGLISH, false)); - ExtendedAssert.assertEquals("polish localized description", prefInfo= .getDescription().getString(new Locale("pl"), false)); - ExtendedAssert.assertEquals("english_localized_name", prefInfo.getDi= splayName().getString(Locale.ENGLISH, false)); - ExtendedAssert.assertEquals("polish_localized_name", prefInfo.getDis= playName().getString(new Locale("pl"), false)); + assertEquals("localized_pref", prefInfo.getKey()); + assertEquals("english localized description", prefInfo.getDescriptio= n().getString(Locale.ENGLISH, false)); + assertEquals("polish localized description", prefInfo.getDescription= ().getString(new Locale("pl"), false)); + assertEquals("english_localized_name", prefInfo.getDisplayName().get= String(Locale.ENGLISH, false)); + assertEquals("polish_localized_name", prefInfo.getDisplayName().getS= tring(new Locale("pl"), false)); = // Set keys =3D prefsInfo.getKeys(); - ExtendedAssert.assertTrue(keys.contains("localized_pref")); - ExtendedAssert.assertTrue(keys.contains("single_pref")); - ExtendedAssert.assertTrue(keys.contains("multi_pref")); - ExtendedAssert.assertTrue(keys.contains("single_pref_bis")); - ExtendedAssert.assertTrue(keys.contains("multi_pref_bis")); + assertTrue(keys.contains("localized_pref")); + assertTrue(keys.contains("single_pref")); + assertTrue(keys.contains("multi_pref")); + assertTrue(keys.contains("single_pref_bis")); + assertTrue(keys.contains("multi_pref_bis")); = // prefInfo =3D prefsInfo.getContainerPreference("single_pref"); - ExtendedAssert.assertEquals("single_pref", prefInfo.getKey()); + assertEquals("single_pref", prefInfo.getKey()); String[] values =3D prefInfo.getDefaultValue().asStringArray(); - ExtendedAssert.assertEquals(new String[]{"single_pref_value"}, value= s); - ExtendedAssert.assertTrue(!prefInfo.isReadOnly().booleanValue()); + assertEquals(new String[]{"single_pref_value"}, values); + assertTrue(!prefInfo.isReadOnly().booleanValue()); = // prefInfo =3D prefsInfo.getContainerPreference("multi_pref"); - ExtendedAssert.assertEquals("multi_pref", prefInfo.getKey()); + assertEquals("multi_pref", prefInfo.getKey()); values =3D prefInfo.getDefaultValue().asStringArray(); - ExtendedAssert.assertEquals(new String[]{"multi_pref_value_1", "mult= i_pref_value_2"}, values); - ExtendedAssert.assertTrue(!prefInfo.isReadOnly().booleanValue()); + assertEquals(new String[]{"multi_pref_value_1", "multi_pref_value_2"= }, values); + assertTrue(!prefInfo.isReadOnly().booleanValue()); = // prefInfo =3D prefsInfo.getContainerPreference("single_pref_bis"); - ExtendedAssert.assertEquals("single_pref_bis", prefInfo.getKey()); + assertEquals("single_pref_bis", prefInfo.getKey()); values =3D prefInfo.getDefaultValue().asStringArray(); - ExtendedAssert.assertEquals(new String[]{"single_pref_value"}, value= s); - ExtendedAssert.assertTrue(prefInfo.isReadOnly().booleanValue()); + assertEquals(new String[]{"single_pref_value"}, values); + assertTrue(prefInfo.isReadOnly().booleanValue()); = // prefInfo =3D prefsInfo.getContainerPreference("multi_pref_bis"); - ExtendedAssert.assertEquals("multi_pref_bis", prefInfo.getKey()); + assertEquals("multi_pref_bis", prefInfo.getKey()); values =3D prefInfo.getDefaultValue().asStringArray(); - ExtendedAssert.assertEquals(new String[]{"multi_pref_value_1", "mult= i_pref_value_2"}, values); - ExtendedAssert.assertTrue(prefInfo.isReadOnly().booleanValue()); + assertEquals(new String[]{"multi_pref_value_1", "multi_pref_value_2"= }, values); + assertTrue(prefInfo.isReadOnly().booleanValue()); } } Modified: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/port= let/info/SecurityInfoTest.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/in= fo/SecurityInfoTest.java 2007-10-23 02:52:32 UTC (rev 8745) +++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/in= fo/SecurityInfoTest.java 2007-10-23 07:31:22 UTC (rev 8746) @@ -26,8 +26,9 @@ import org.jboss.portal.portlet.container.PortletContainer; import org.jboss.portal.portlet.info.PortletInfo; import org.jboss.portal.portlet.info.SecurityInfo; -import org.jboss.portal.common.junit.ExtendedAssert; = +import static org.jboss.unit.api.Assert.*; + /** * @author Boleslaw Daw= idowicz * @version $Revision: 6720 $ @@ -49,27 +50,27 @@ SecurityInfo secInfo =3D info.getSecurity(); = secInfo =3D info.getSecurity(); - ExtendedAssert.assertEquals(2, secInfo.getTransportGuarantees().size= ()); - ExtendedAssert.assertTrue(secInfo.containsTransportGuarantee(Transpo= rtGuarantee.CONFIDENTIAL)); - //ExtendedAssert.assertTrue(secInfo.containsTransportGuarantee(Trans= portGuarantee.INTEGRAL)); - ExtendedAssert.assertTrue(secInfo.containsTransportGuarantee(Transpo= rtGuarantee.NONE)); + assertEquals(2, secInfo.getTransportGuarantees().size()); + assertTrue(secInfo.containsTransportGuarantee(TransportGuarantee.CON= FIDENTIAL)); + //assertTrue(secInfo.containsTransportGuarantee(TransportGuarantee.I= NTEGRAL)); + assertTrue(secInfo.containsTransportGuarantee(TransportGuarantee.NON= E)); = = container =3D registry.getPortletApplication("/test-info").getPortle= tContainer("SecuredPortlet2"); info =3D container.getInfo(); = secInfo =3D info.getSecurity(); - ExtendedAssert.assertEquals(3, secInfo.getTransportGuarantees().size= ()); - ExtendedAssert.assertTrue(secInfo.containsTransportGuarantee(Transpo= rtGuarantee.INTEGRAL)); - ExtendedAssert.assertTrue(secInfo.containsTransportGuarantee(Transpo= rtGuarantee.CONFIDENTIAL)); - ExtendedAssert.assertTrue(secInfo.containsTransportGuarantee(Transpo= rtGuarantee.NONE)); + assertEquals(3, secInfo.getTransportGuarantees().size()); + assertTrue(secInfo.containsTransportGuarantee(TransportGuarantee.INT= EGRAL)); + assertTrue(secInfo.containsTransportGuarantee(TransportGuarantee.CON= FIDENTIAL)); + assertTrue(secInfo.containsTransportGuarantee(TransportGuarantee.NON= E)); = = container =3D registry.getPortletApplication("/test-info").getPortle= tContainer("SecuredPortlet3"); info =3D container.getInfo(); secInfo =3D info.getSecurity(); - ExtendedAssert.assertEquals(2, secInfo.getTransportGuarantees().size= ()); - ExtendedAssert.assertTrue(secInfo.containsTransportGuarantee(Transpo= rtGuarantee.INTEGRAL)); - ExtendedAssert.assertTrue(secInfo.containsTransportGuarantee(Transpo= rtGuarantee.NONE)); + assertEquals(2, secInfo.getTransportGuarantees().size()); + assertTrue(secInfo.containsTransportGuarantee(TransportGuarantee.INT= EGRAL)); + assertTrue(secInfo.containsTransportGuarantee(TransportGuarantee.NON= E)); } } Modified: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/port= let/info/SessionInfoTest.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/in= fo/SessionInfoTest.java 2007-10-23 02:52:32 UTC (rev 8745) +++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/in= fo/SessionInfoTest.java 2007-10-23 07:31:22 UTC (rev 8746) @@ -25,8 +25,9 @@ import org.jboss.portal.portlet.container.PortletContainer; import org.jboss.portal.portlet.info.PortletInfo; import org.jboss.portal.portlet.info.SessionInfo; -import org.jboss.portal.common.junit.ExtendedAssert; = +import static org.jboss.unit.api.Assert.*; + /** * @author Boleslaw Daw= idowicz * @version $Revision: 6720 $ @@ -44,16 +45,16 @@ PortletContainer container =3D registry.getPortletApplication("/test= -info").getPortletContainer("DistributedPortlet1"); PortletInfo info =3D container.getInfo(); SessionInfo sessionInfo =3D info.getSession(); - ExtendedAssert.assertNotNull(sessionInfo); + assertNotNull(sessionInfo); Boolean distributed =3D sessionInfo.getDistributed(); - ExtendedAssert.assertEquals(Boolean.TRUE, distributed); + assertEquals(Boolean.TRUE, distributed); = = container =3D registry.getPortletApplication("/test-info").getPortle= tContainer("DistributedPortlet2"); info =3D container.getInfo(); sessionInfo =3D info.getSession(); - ExtendedAssert.assertNotNull(sessionInfo); + assertNotNull(sessionInfo); distributed =3D sessionInfo.getDistributed(); - ExtendedAssert.assertEquals(Boolean.FALSE, distributed); + assertEquals(Boolean.FALSE, distributed); } } Modified: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/port= let/jsr168/api/actionrequest/ActionRequestAPITestSuite.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/js= r168/api/actionrequest/ActionRequestAPITestSuite.java 2007-10-23 02:52:32 U= TC (rev 8745) +++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/js= r168/api/actionrequest/ActionRequestAPITestSuite.java 2007-10-23 07:31:22 U= TC (rev 8746) @@ -22,8 +22,6 @@ *************************************************************************= *****/ package org.jboss.portal.test.portlet.jsr168.api.actionrequest; = -import junit.framework.Test; - /** * @author Boleslaw Daw= idowicz * @version $Revision: 5510 $ @@ -31,7 +29,7 @@ public class ActionRequestAPITestSuite { = - public static Test suite() + public static void suite() { // TestSuite suite =3D new TestSuite("test-jsr168-api-actionrequest.w= ar"); // @@ -80,6 +78,5 @@ // // // return suite; - return null; } } Modified: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/port= let/jsr168/api/actionrequest/ActionRequestSequenceBuilder.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/js= r168/api/actionrequest/ActionRequestSequenceBuilder.java 2007-10-23 02:52:3= 2 UTC (rev 8745) +++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/js= r168/api/actionrequest/ActionRequestSequenceBuilder.java 2007-10-23 07:31:2= 2 UTC (rev 8746) @@ -22,9 +22,6 @@ *************************************************************************= *****/ package org.jboss.portal.test.portlet.jsr168.api.actionrequest; = -import org.jboss.portal.test.framework.driver.response.EndTestResponse; -import org.jboss.portal.test.framework.driver.http.response.InvokeGetRespo= nse; -import org.jboss.portal.test.framework.driver.DriverResponse; import org.jboss.portal.test.framework.portlet.PortletTest; import org.jboss.portal.test.framework.portlet.PortletTestDriver; import org.jboss.portal.test.framework.portlet.PortletTestSuite; @@ -32,7 +29,12 @@ import org.jboss.portal.test.framework.portlet.actions.PortletActionTestAc= tion; import org.jboss.portal.test.framework.portlet.actions.PortletRenderTestAc= tion; import org.jboss.portal.test.portlet.framework.UTP1; +import org.jboss.unit.driver.DriverResponse; +import org.jboss.unit.driver.response.EndTestResponse; +import org.jboss.unit.remote.driver.handler.http.response.InvokeGetRespons= e; = +import static org.jboss.unit.api.Assert.*; + import javax.portlet.ActionRequest; import javax.portlet.ActionResponse; import javax.portlet.Portlet; Modified: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/port= let/jsr168/api/actionresponse/ActionResponseAPITestSuite.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/js= r168/api/actionresponse/ActionResponseAPITestSuite.java 2007-10-23 02:52:32= UTC (rev 8745) +++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/js= r168/api/actionresponse/ActionResponseAPITestSuite.java 2007-10-23 07:31:22= UTC (rev 8746) @@ -22,8 +22,6 @@ *************************************************************************= *****/ package org.jboss.portal.test.portlet.jsr168.api.actionresponse; = -import junit.framework.Test; - /** * @author Boleslaw Daw= idowicz * @version $Revision: 5510 $ @@ -31,7 +29,7 @@ public class ActionResponseAPITestSuite { = - public static Test suite() + public static void suite() { // TestSuite suite =3D new TestSuite("test-jsr168-api-actionresponse.= war"); // @@ -67,6 +65,5 @@ // suite.addTest(new TestCase("EncodeURL")); // // return suite; - return null; } } Modified: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/port= let/jsr168/api/actionresponse/ActionResponseSequenceBuilder.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/js= r168/api/actionresponse/ActionResponseSequenceBuilder.java 2007-10-23 02:52= :32 UTC (rev 8745) +++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/js= r168/api/actionresponse/ActionResponseSequenceBuilder.java 2007-10-23 07:31= :22 UTC (rev 8746) @@ -22,9 +22,6 @@ *************************************************************************= *****/ package org.jboss.portal.test.portlet.jsr168.api.actionresponse; = -import org.jboss.portal.test.framework.driver.response.EndTestResponse; -import org.jboss.portal.test.framework.driver.http.response.InvokeGetRespo= nse; -import org.jboss.portal.test.framework.driver.DriverResponse; import org.jboss.portal.test.framework.portlet.PortletTest; import org.jboss.portal.test.framework.portlet.PortletTestDriver; import org.jboss.portal.test.framework.portlet.PortletTestSuite; @@ -32,7 +29,12 @@ import org.jboss.portal.test.framework.portlet.actions.PortletActionTestAc= tion; import org.jboss.portal.test.framework.portlet.actions.PortletRenderTestAc= tion; import org.jboss.portal.test.portlet.framework.UTP1; +import org.jboss.unit.remote.driver.handler.http.response.InvokeGetRespons= e; +import org.jboss.unit.driver.DriverResponse; +import org.jboss.unit.driver.response.EndTestResponse; = +import static org.jboss.unit.api.Assert.*; + import javax.portlet.ActionRequest; import javax.portlet.ActionResponse; import javax.portlet.Portlet; Modified: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/port= let/jsr168/api/portalcontext/PortalContextAPITestSuite.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/js= r168/api/portalcontext/PortalContextAPITestSuite.java 2007-10-23 02:52:32 U= TC (rev 8745) +++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/js= r168/api/portalcontext/PortalContextAPITestSuite.java 2007-10-23 07:31:22 U= TC (rev 8746) @@ -22,8 +22,6 @@ *************************************************************************= *****/ package org.jboss.portal.test.portlet.jsr168.api.portalcontext; = -import junit.framework.Test; - /** * @author Boleslaw Daw= idowicz * @version $Revision: 5510 $ @@ -31,7 +29,7 @@ public class PortalContextAPITestSuite { = - public static Test suite() + public static void suite() { // TestSuite suite =3D new TestSuite("test-jsr168-api-portalcontext.w= ar"); // @@ -57,6 +55,5 @@ // // // return suite; - return null; } } Modified: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/port= let/jsr168/api/portalcontext/PortalContextSequenceBuilder.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/js= r168/api/portalcontext/PortalContextSequenceBuilder.java 2007-10-23 02:52:3= 2 UTC (rev 8745) +++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/js= r168/api/portalcontext/PortalContextSequenceBuilder.java 2007-10-23 07:31:2= 2 UTC (rev 8746) @@ -22,15 +22,17 @@ *************************************************************************= *****/ package org.jboss.portal.test.portlet.jsr168.api.portalcontext; = -import org.jboss.portal.test.framework.driver.response.EndTestResponse; -import org.jboss.portal.test.framework.driver.DriverResponse; import org.jboss.portal.test.framework.portlet.PortletTest; import org.jboss.portal.test.framework.portlet.PortletTestDriver; import org.jboss.portal.test.framework.portlet.PortletTestSuite; import org.jboss.portal.test.framework.portlet.PortletTestContext; import org.jboss.portal.test.framework.portlet.actions.PortletRenderTestAc= tion; import org.jboss.portal.test.portlet.framework.UTP1; +import org.jboss.unit.driver.response.EndTestResponse; +import org.jboss.unit.driver.DriverResponse; = +import static org.jboss.unit.api.Assert.*; + import javax.portlet.Portlet; import javax.portlet.PortletMode; import javax.portlet.RenderRequest; Modified: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/port= let/jsr168/api/portletconfig/PortletConfigAPITestSuite.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/js= r168/api/portletconfig/PortletConfigAPITestSuite.java 2007-10-23 02:52:32 U= TC (rev 8745) +++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/js= r168/api/portletconfig/PortletConfigAPITestSuite.java 2007-10-23 07:31:22 U= TC (rev 8746) @@ -22,8 +22,6 @@ *************************************************************************= *****/ package org.jboss.portal.test.portlet.jsr168.api.portletconfig; = -import junit.framework.Test; - /** * @author Boleslaw Daw= idowicz * @version $Revision: 5510 $ @@ -31,7 +29,7 @@ public class PortletConfigAPITestSuite { = - public static Test suite() + public static void suite() { // TestSuite suite =3D new TestSuite("test-jsr168-api-portletconfig.w= ar"); // @@ -62,6 +60,5 @@ // // // return suite; - return null; } } Modified: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/port= let/jsr168/api/portletconfig/PortletConfigSequenceBuilder.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/js= r168/api/portletconfig/PortletConfigSequenceBuilder.java 2007-10-23 02:52:3= 2 UTC (rev 8745) +++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/js= r168/api/portletconfig/PortletConfigSequenceBuilder.java 2007-10-23 07:31:2= 2 UTC (rev 8746) @@ -22,8 +22,6 @@ *************************************************************************= *****/ package org.jboss.portal.test.portlet.jsr168.api.portletconfig; = -import org.jboss.portal.test.framework.driver.response.EndTestResponse; -import org.jboss.portal.test.framework.driver.DriverResponse; import org.jboss.portal.test.framework.portlet.PortletTest; import org.jboss.portal.test.framework.portlet.PortletTestDriver; import org.jboss.portal.test.framework.portlet.PortletTestSuite; @@ -32,7 +30,11 @@ import org.jboss.portal.test.framework.portlet.components.AbstractUniversa= lTestPortlet; import org.jboss.portal.test.portlet.framework.UTP1; import org.jboss.portal.test.portlet.framework.UTP2; +import org.jboss.unit.driver.response.EndTestResponse; +import org.jboss.unit.driver.DriverResponse; = +import static org.jboss.unit.api.Assert.*; + import javax.portlet.Portlet; import javax.portlet.PortletConfig; import javax.portlet.PortletContext; Modified: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/port= let/jsr168/api/portletcontext/PortletContextAPITestSuite.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/js= r168/api/portletcontext/PortletContextAPITestSuite.java 2007-10-23 02:52:32= UTC (rev 8745) +++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/js= r168/api/portletcontext/PortletContextAPITestSuite.java 2007-10-23 07:31:22= UTC (rev 8746) @@ -22,8 +22,6 @@ *************************************************************************= *****/ package org.jboss.portal.test.portlet.jsr168.api.portletcontext; = -import junit.framework.Test; - /** * @author Boleslaw Daw= idowicz * @version $Revision: 5510 $ @@ -31,7 +29,7 @@ public class PortletContextAPITestSuite { = - public static Test suite() + public static void suite() { // TestSuite suite =3D new TestSuite("test-jsr168-api-portletcontext.= war"); // @@ -91,6 +89,5 @@ // suite.addTest(new TestCase("PortletContextName")); // // return suite; - return null; } } Modified: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/port= let/jsr168/api/portletcontext/PortletContextSequenceBuilder.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/js= r168/api/portletcontext/PortletContextSequenceBuilder.java 2007-10-23 02:52= :32 UTC (rev 8745) +++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/js= r168/api/portletcontext/PortletContextSequenceBuilder.java 2007-10-23 07:31= :22 UTC (rev 8746) @@ -22,8 +22,6 @@ *************************************************************************= *****/ package org.jboss.portal.test.portlet.jsr168.api.portletcontext; = -import org.jboss.portal.test.framework.driver.response.EndTestResponse; -import org.jboss.portal.test.framework.driver.DriverResponse; import org.jboss.portal.test.framework.portlet.PortletTest; import org.jboss.portal.test.framework.portlet.PortletTestDriver; import org.jboss.portal.test.framework.portlet.PortletTestSuite; @@ -32,7 +30,11 @@ import org.jboss.portal.test.framework.portlet.actions.PortletRenderTestAc= tion; import org.jboss.portal.test.framework.portlet.components.AbstractUniversa= lTestPortlet; import org.jboss.portal.test.portlet.framework.UTP1; +import org.jboss.unit.driver.response.EndTestResponse; +import org.jboss.unit.driver.DriverResponse; = +import static org.jboss.unit.api.Assert.*; + import javax.portlet.Portlet; import javax.portlet.RenderRequest; import javax.portlet.RenderResponse; Modified: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/port= let/jsr168/api/portletmode/PortletModeAPITestSuite.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/js= r168/api/portletmode/PortletModeAPITestSuite.java 2007-10-23 02:52:32 UTC (= rev 8745) +++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/js= r168/api/portletmode/PortletModeAPITestSuite.java 2007-10-23 07:31:22 UTC (= rev 8746) @@ -22,8 +22,6 @@ *************************************************************************= *****/ package org.jboss.portal.test.portlet.jsr168.api.portletmode; = -import junit.framework.Test; - /** * @author Boleslaw Daw= idowicz * @version $Revision: 5510 $ @@ -31,7 +29,7 @@ public class PortletModeAPITestSuite { = - public static Test suite() + public static void suite() { // TestSuite suite =3D new TestSuite("test-jsr168-api-portletmode.war= "); // @@ -58,6 +56,5 @@ // suite.addTest(new TestCase("HashCode")); // // return suite; - return null; } } Modified: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/port= let/jsr168/api/portletmode/PortletModeSequenceBuilder.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/js= r168/api/portletmode/PortletModeSequenceBuilder.java 2007-10-23 02:52:32 UT= C (rev 8745) +++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/js= r168/api/portletmode/PortletModeSequenceBuilder.java 2007-10-23 07:31:22 UT= C (rev 8746) @@ -22,15 +22,17 @@ *************************************************************************= *****/ package org.jboss.portal.test.portlet.jsr168.api.portletmode; = -import org.jboss.portal.test.framework.driver.response.EndTestResponse; -import org.jboss.portal.test.framework.driver.DriverResponse; import org.jboss.portal.test.framework.portlet.PortletTest; import org.jboss.portal.test.framework.portlet.PortletTestDriver; import org.jboss.portal.test.framework.portlet.PortletTestSuite; import org.jboss.portal.test.framework.portlet.PortletTestContext; import org.jboss.portal.test.framework.portlet.actions.PortletRenderTestAc= tion; import org.jboss.portal.test.portlet.framework.UTP1; +import org.jboss.unit.driver.DriverResponse; +import org.jboss.unit.driver.response.EndTestResponse; = +import static org.jboss.unit.api.Assert.*; + import javax.portlet.Portlet; import javax.portlet.PortletMode; import javax.portlet.RenderRequest; Modified: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/port= let/jsr168/api/portletpreferences/PortletPreferencesAPITestSuite.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/js= r168/api/portletpreferences/PortletPreferencesAPITestSuite.java 2007-10-23 = 02:52:32 UTC (rev 8745) +++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/js= r168/api/portletpreferences/PortletPreferencesAPITestSuite.java 2007-10-23 = 07:31:22 UTC (rev 8746) @@ -22,8 +22,6 @@ *************************************************************************= *****/ package org.jboss.portal.test.portlet.jsr168.api.portletpreferences; = -import junit.framework.Test; - /** * @author Boleslaw Daw= idowicz * @version $Revision: 5510 $ @@ -31,7 +29,7 @@ public class PortletPreferencesAPITestSuite { = - public static Test suite() + public static void suite() { // TestSuite suite =3D new TestSuite("test-jsr168-api-portletpreferen= ces.war"); // @@ -56,6 +54,5 @@ // // // return suite; - return null; } } Modified: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/port= let/jsr168/api/portletpreferences/PortletPreferencesSequenceBuilder.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/js= r168/api/portletpreferences/PortletPreferencesSequenceBuilder.java 2007-10-= 23 02:52:32 UTC (rev 8745) +++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/js= r168/api/portletpreferences/PortletPreferencesSequenceBuilder.java 2007-10-= 23 07:31:22 UTC (rev 8746) @@ -22,9 +22,6 @@ *************************************************************************= *****/ package org.jboss.portal.test.portlet.jsr168.api.portletpreferences; = -import org.jboss.portal.test.framework.driver.response.EndTestResponse; -import org.jboss.portal.test.framework.driver.http.response.InvokeGetRespo= nse; -import org.jboss.portal.test.framework.driver.DriverResponse; import org.jboss.portal.test.framework.portlet.PortletTest; import org.jboss.portal.test.framework.portlet.PortletTestDriver; import org.jboss.portal.test.framework.portlet.PortletTestSuite; @@ -33,7 +30,12 @@ import org.jboss.portal.test.framework.portlet.actions.PortletRenderTestAc= tion; import org.jboss.portal.test.portlet.framework.UTP1; import org.jboss.portal.test.portlet.framework.UTP2; +import org.jboss.unit.driver.DriverResponse; +import org.jboss.unit.driver.response.EndTestResponse; = +import static org.jboss.unit.api.Assert.*; +import org.jboss.unit.remote.driver.handler.http.response.InvokeGetRespons= e; + import javax.portlet.ActionRequest; import javax.portlet.ActionResponse; import javax.portlet.Portlet; Modified: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/port= let/jsr168/api/portletsession/PortletSessionAPITestSuite.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/js= r168/api/portletsession/PortletSessionAPITestSuite.java 2007-10-23 02:52:32= UTC (rev 8745) +++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/js= r168/api/portletsession/PortletSessionAPITestSuite.java 2007-10-23 07:31:22= UTC (rev 8746) @@ -22,8 +22,6 @@ *************************************************************************= *****/ package org.jboss.portal.test.portlet.jsr168.api.portletsession; = -import junit.framework.Test; - /** * @author Boleslaw Daw= idowicz * @version $Revision: 5510 $ @@ -31,7 +29,7 @@ public class PortletSessionAPITestSuite { = - public static Test suite() + public static void suite() { // TestSuite suite =3D new TestSuite("test-jsr168-api-portletsession.= war"); // @@ -77,6 +75,5 @@ // suite.addTest(new TestCase("SetAttribute")); // // return suite; - return null; } } Modified: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/port= let/jsr168/api/portletsession/PortletSessionSequenceBuilder.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/js= r168/api/portletsession/PortletSessionSequenceBuilder.java 2007-10-23 02:52= :32 UTC (rev 8745) +++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/js= r168/api/portletsession/PortletSessionSequenceBuilder.java 2007-10-23 07:31= :22 UTC (rev 8746) @@ -22,15 +22,17 @@ *************************************************************************= *****/ package org.jboss.portal.test.portlet.jsr168.api.portletsession; = -import org.jboss.portal.test.framework.driver.response.EndTestResponse; -import org.jboss.portal.test.framework.driver.DriverResponse; import org.jboss.portal.test.framework.portlet.PortletTest; import org.jboss.portal.test.framework.portlet.PortletTestDriver; import org.jboss.portal.test.framework.portlet.PortletTestSuite; import org.jboss.portal.test.framework.portlet.PortletTestContext; import org.jboss.portal.test.framework.portlet.actions.PortletRenderTestAc= tion; import org.jboss.portal.test.portlet.framework.UTP1; +import org.jboss.unit.driver.DriverResponse; +import org.jboss.unit.driver.response.EndTestResponse; = +import static org.jboss.unit.api.Assert.*; + import javax.portlet.Portlet; import javax.portlet.PortletSession; import javax.portlet.RenderRequest; Modified: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/port= let/jsr168/api/portletsessionutil/PortletSessionUtilAPITestSuite.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/js= r168/api/portletsessionutil/PortletSessionUtilAPITestSuite.java 2007-10-23 = 02:52:32 UTC (rev 8745) +++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/js= r168/api/portletsessionutil/PortletSessionUtilAPITestSuite.java 2007-10-23 = 07:31:22 UTC (rev 8746) @@ -22,8 +22,6 @@ *************************************************************************= *****/ package org.jboss.portal.test.portlet.jsr168.api.portletsessionutil; = -import junit.framework.Test; - /** * @author Boleslaw Daw= idowicz * @version $Revision: 5510 $ @@ -31,7 +29,7 @@ public class PortletSessionUtilAPITestSuite { = - public static Test suite() + public static void suite() { // TestSuite suite =3D new TestSuite("test-jsr168-api-portletsessionu= til.war"); // @@ -47,6 +45,5 @@ // // // return suite; - return null; } } Modified: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/port= let/jsr168/api/portletsessionutil/PortletSessionUtilSequenceBuilder.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/js= r168/api/portletsessionutil/PortletSessionUtilSequenceBuilder.java 2007-10-= 23 02:52:32 UTC (rev 8745) +++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/js= r168/api/portletsessionutil/PortletSessionUtilSequenceBuilder.java 2007-10-= 23 07:31:22 UTC (rev 8746) @@ -22,15 +22,17 @@ *************************************************************************= *****/ package org.jboss.portal.test.portlet.jsr168.api.portletsessionutil; = -import org.jboss.portal.test.framework.driver.response.EndTestResponse; -import org.jboss.portal.test.framework.driver.DriverResponse; import org.jboss.portal.test.framework.portlet.PortletTest; import org.jboss.portal.test.framework.portlet.PortletTestDriver; import org.jboss.portal.test.framework.portlet.PortletTestSuite; import org.jboss.portal.test.framework.portlet.PortletTestContext; import org.jboss.portal.test.framework.portlet.actions.PortletRenderTestAc= tion; import org.jboss.portal.test.portlet.framework.UTP1; +import org.jboss.unit.driver.DriverResponse; +import org.jboss.unit.driver.response.EndTestResponse; = +import static org.jboss.unit.api.Assert.*; + import javax.portlet.Portlet; import javax.portlet.PortletSession; import javax.portlet.PortletSessionUtil; Modified: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/port= let/jsr168/api/portleturl/PortletURLAPITestSuite.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/js= r168/api/portleturl/PortletURLAPITestSuite.java 2007-10-23 02:52:32 UTC (re= v 8745) +++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/js= r168/api/portleturl/PortletURLAPITestSuite.java 2007-10-23 07:31:22 UTC (re= v 8746) @@ -22,8 +22,6 @@ *************************************************************************= *****/ package org.jboss.portal.test.portlet.jsr168.api.portleturl; = -import junit.framework.Test; - /** * @author Boleslaw Daw= idowicz * @version $Revision: 5510 $ @@ -31,7 +29,7 @@ public class PortletURLAPITestSuite { = - public static Test suite() + public static void suite() { // TestSuite suite =3D new TestSuite("test-jsr168-api-portleturl.war"= ); // @@ -61,6 +59,5 @@ // // // return suite; - return null; } } Modified: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/port= let/jsr168/api/portleturl/PortletURLSequenceBuilder.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/js= r168/api/portleturl/PortletURLSequenceBuilder.java 2007-10-23 02:52:32 UTC = (rev 8745) +++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/js= r168/api/portleturl/PortletURLSequenceBuilder.java 2007-10-23 07:31:22 UTC = (rev 8746) @@ -22,15 +22,17 @@ *************************************************************************= *****/ package org.jboss.portal.test.portlet.jsr168.api.portleturl; = -import org.jboss.portal.test.framework.driver.response.EndTestResponse; -import org.jboss.portal.test.framework.driver.DriverResponse; import org.jboss.portal.test.framework.portlet.PortletTest; import org.jboss.portal.test.framework.portlet.PortletTestDriver; import org.jboss.portal.test.framework.portlet.PortletTestSuite; import org.jboss.portal.test.framework.portlet.PortletTestContext; import org.jboss.portal.test.framework.portlet.actions.PortletRenderTestAc= tion; import org.jboss.portal.test.portlet.framework.UTP1; +import org.jboss.unit.driver.DriverResponse; +import org.jboss.unit.driver.response.EndTestResponse; = +import static org.jboss.unit.api.Assert.*; + import javax.portlet.Portlet; import javax.portlet.PortletURL; import javax.portlet.RenderRequest; Modified: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/port= let/jsr168/api/renderrequest/RenderRequestAPITestSuite.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/js= r168/api/renderrequest/RenderRequestAPITestSuite.java 2007-10-23 02:52:32 U= TC (rev 8745) +++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/js= r168/api/renderrequest/RenderRequestAPITestSuite.java 2007-10-23 07:31:22 U= TC (rev 8746) @@ -22,8 +22,6 @@ *************************************************************************= *****/ package org.jboss.portal.test.portlet.jsr168.api.renderrequest; = -import junit.framework.Test; - /** * @author Boleslaw Daw= idowicz * @version $Revision: 5510 $ @@ -31,7 +29,7 @@ public class RenderRequestAPITestSuite { = - public static Test suite() + public static void suite() { // TestSuite suite =3D new TestSuite("test-jsr168-api-renderrequest.w= ar"); // @@ -69,6 +67,5 @@ // // // return suite; - return null; } } Modified: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/port= let/jsr168/api/renderrequest/RenderRequestSequenceBuilder.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/js= r168/api/renderrequest/RenderRequestSequenceBuilder.java 2007-10-23 02:52:3= 2 UTC (rev 8745) +++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/js= r168/api/renderrequest/RenderRequestSequenceBuilder.java 2007-10-23 07:31:2= 2 UTC (rev 8746) @@ -22,15 +22,17 @@ *************************************************************************= *****/ package org.jboss.portal.test.portlet.jsr168.api.renderrequest; = -import org.jboss.portal.test.framework.driver.response.EndTestResponse; -import org.jboss.portal.test.framework.driver.DriverResponse; import org.jboss.portal.test.framework.portlet.PortletTest; import org.jboss.portal.test.framework.portlet.PortletTestDriver; import org.jboss.portal.test.framework.portlet.PortletTestSuite; import org.jboss.portal.test.framework.portlet.PortletTestContext; import org.jboss.portal.test.framework.portlet.actions.PortletRenderTestAc= tion; import org.jboss.portal.test.portlet.framework.UTP1; +import org.jboss.unit.driver.response.EndTestResponse; +import org.jboss.unit.driver.DriverResponse; = +import static org.jboss.unit.api.Assert.*; + import javax.portlet.Portlet; import javax.portlet.RenderRequest; import javax.portlet.RenderResponse; Modified: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/port= let/jsr168/api/renderresponse/RenderResponseAPITestSuite.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/js= r168/api/renderresponse/RenderResponseAPITestSuite.java 2007-10-23 02:52:32= UTC (rev 8745) +++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/js= r168/api/renderresponse/RenderResponseAPITestSuite.java 2007-10-23 07:31:22= UTC (rev 8746) @@ -22,8 +22,6 @@ *************************************************************************= *****/ package org.jboss.portal.test.portlet.jsr168.api.renderresponse; = -import junit.framework.Test; - /** * @author Boleslaw Daw= idowicz * @version $Revision: 5510 $ @@ -31,7 +29,7 @@ public class RenderResponseAPITestSuite { = - public static Test suite() + public static void suite() { // TestSuite suite =3D new TestSuite("test-jsr168-api-renderresponse.= war"); // @@ -71,6 +69,5 @@ // suite.addTest(new TestCase("EncodeURL")); // // return suite; - return null; } } Modified: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/port= let/jsr168/api/renderresponse/RenderResponseSequenceBuilder.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/js= r168/api/renderresponse/RenderResponseSequenceBuilder.java 2007-10-23 02:52= :32 UTC (rev 8745) +++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/js= r168/api/renderresponse/RenderResponseSequenceBuilder.java 2007-10-23 07:31= :22 UTC (rev 8746) @@ -22,15 +22,17 @@ *************************************************************************= *****/ package org.jboss.portal.test.portlet.jsr168.api.renderresponse; = -import org.jboss.portal.test.framework.driver.response.EndTestResponse; -import org.jboss.portal.test.framework.driver.DriverResponse; import org.jboss.portal.test.framework.portlet.PortletTest; import org.jboss.portal.test.framework.portlet.PortletTestDriver; import org.jboss.portal.test.framework.portlet.PortletTestSuite; import org.jboss.portal.test.framework.portlet.PortletTestContext; import org.jboss.portal.test.framework.portlet.actions.PortletRenderTestAc= tion; import org.jboss.portal.test.portlet.framework.UTP1; +import org.jboss.unit.driver.DriverResponse; +import org.jboss.unit.driver.response.EndTestResponse; = +import static org.jboss.unit.api.Assert.*; + import javax.portlet.Portlet; import javax.portlet.RenderRequest; import javax.portlet.RenderResponse; Modified: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/port= let/jsr168/api/windowstate/WindowStateAPITestSuite.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/js= r168/api/windowstate/WindowStateAPITestSuite.java 2007-10-23 02:52:32 UTC (= rev 8745) +++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/js= r168/api/windowstate/WindowStateAPITestSuite.java 2007-10-23 07:31:22 UTC (= rev 8746) @@ -22,8 +22,6 @@ *************************************************************************= *****/ package org.jboss.portal.test.portlet.jsr168.api.windowstate; = -import junit.framework.Test; - /** * @author Boleslaw Daw= idowicz * @version $Revision: 5510 $ @@ -31,7 +29,7 @@ public class WindowStateAPITestSuite { = - public static Test suite() + public static void suite() { // TestSuite suite =3D new TestSuite("test-jsr168-api-windowstate.war= "); // @@ -58,6 +56,5 @@ // suite.addTest(new TestCase("HashCode")); // // return suite; - return null; } } Modified: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/port= let/jsr168/api/windowstate/WindowStateSequenceBuilder.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/js= r168/api/windowstate/WindowStateSequenceBuilder.java 2007-10-23 02:52:32 UT= C (rev 8745) +++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/js= r168/api/windowstate/WindowStateSequenceBuilder.java 2007-10-23 07:31:22 UT= C (rev 8746) @@ -22,15 +22,17 @@ *************************************************************************= *****/ package org.jboss.portal.test.portlet.jsr168.api.windowstate; = -import org.jboss.portal.test.framework.driver.response.EndTestResponse; -import org.jboss.portal.test.framework.driver.DriverResponse; import org.jboss.portal.test.framework.portlet.PortletTest; import org.jboss.portal.test.framework.portlet.PortletTestDriver; import org.jboss.portal.test.framework.portlet.PortletTestSuite; import org.jboss.portal.test.framework.portlet.PortletTestContext; import org.jboss.portal.test.framework.portlet.actions.PortletRenderTestAc= tion; import org.jboss.portal.test.portlet.framework.UTP1; +import org.jboss.unit.driver.DriverResponse; +import org.jboss.unit.driver.response.EndTestResponse; = +import static org.jboss.unit.api.Assert.*; + import javax.portlet.Portlet; import javax.portlet.RenderRequest; import javax.portlet.RenderResponse; Modified: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/port= let/jsr168/ext/common/AbstractCacheSequenceBuilder.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/js= r168/ext/common/AbstractCacheSequenceBuilder.java 2007-10-23 02:52:32 UTC (= rev 8745) +++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/js= r168/ext/common/AbstractCacheSequenceBuilder.java 2007-10-23 07:31:22 UTC (= rev 8746) @@ -29,11 +29,13 @@ import org.jboss.portal.test.framework.portlet.PortletTestContext; import org.jboss.portal.test.framework.portlet.actions.PortletRenderTestAc= tion; import org.jboss.portal.test.framework.portlet.actions.PortletActionTestAc= tion; -import org.jboss.portal.test.framework.driver.http.response.InvokeGetRespo= nse; -import org.jboss.portal.test.framework.driver.DriverResponse; -import org.jboss.portal.test.framework.driver.response.EndTestResponse; import org.jboss.portal.common.util.CollectionBuilder; +import org.jboss.unit.driver.DriverResponse; +import org.jboss.unit.driver.response.EndTestResponse; +import org.jboss.unit.remote.driver.handler.http.response.InvokeGetRespons= e; = +import static org.jboss.unit.api.Assert.*; + import javax.portlet.PortletURL; import javax.portlet.RenderResponse; import javax.portlet.ActionResponse; Modified: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/port= let/jsr168/ext/dispatcher/DispatcherSequenceBuilder.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/js= r168/ext/dispatcher/DispatcherSequenceBuilder.java 2007-10-23 02:52:32 UTC = (rev 8745) +++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/js= r168/ext/dispatcher/DispatcherSequenceBuilder.java 2007-10-23 07:31:22 UTC = (rev 8746) @@ -24,9 +24,6 @@ = import org.jboss.portal.common.util.Tools; import org.jboss.portal.common.util.CollectionBuilder; -import org.jboss.portal.test.framework.driver.response.EndTestResponse; -import org.jboss.portal.test.framework.driver.http.response.InvokeGetRespo= nse; -import org.jboss.portal.test.framework.driver.DriverResponse; import org.jboss.portal.test.framework.portlet.PortletTest; import org.jboss.portal.test.framework.portlet.PortletTestDriver; import org.jboss.portal.test.framework.portlet.PortletTestSuite; @@ -38,7 +35,12 @@ import org.jboss.portal.test.portlet.framework.UTS1; import org.jboss.portal.test.portlet.framework.UTP2; import org.jboss.portal.test.portlet.framework.UTP3; +import org.jboss.unit.driver.DriverResponse; +import org.jboss.unit.driver.response.EndTestResponse; +import org.jboss.unit.remote.driver.handler.http.response.InvokeGetRespons= e; = +import static org.jboss.unit.api.Assert.*; + import javax.portlet.Portlet; import javax.portlet.PortletException; import javax.portlet.PortletRequestDispatcher; Modified: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/port= let/jsr168/ext/expiringcache/ExpiringCacheSequenceBuilder.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/js= r168/ext/expiringcache/ExpiringCacheSequenceBuilder.java 2007-10-23 02:52:3= 2 UTC (rev 8745) +++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/js= r168/ext/expiringcache/ExpiringCacheSequenceBuilder.java 2007-10-23 07:31:2= 2 UTC (rev 8746) @@ -26,7 +26,6 @@ import org.jboss.portal.test.framework.portlet.PortletTestContext; import org.jboss.portal.test.framework.portlet.PortletTest; import org.jboss.portal.test.framework.portlet.actions.PortletRenderTestAc= tion; -import org.jboss.portal.test.framework.driver.http.response.InvokeGetRespo= nse; import org.jboss.portal.test.portlet.framework.UTP1; import org.jboss.portal.test.portlet.framework.UTP2; import org.jboss.portal.test.portlet.framework.UTP3; @@ -39,11 +38,16 @@ import org.jboss.portal.test.portlet.framework.UTP10; import org.jboss.portal.test.portlet.framework.UTP11; import org.jboss.portal.test.portlet.jsr168.ext.common.AbstractCacheSequen= ceBuilder; -import org.jboss.portal.test.framework.driver.DriverResponse; -import org.jboss.portal.test.framework.driver.response.ErrorResponse; -import org.jboss.portal.test.framework.driver.response.EndTestResponse; import org.jboss.portal.common.util.CollectionBuilder; +import org.jboss.portal.portlet.invocation.response.ErrorResponse; +import org.jboss.unit.driver.DriverResponse; +import org.jboss.unit.driver.response.FailureResponse; +import org.jboss.unit.driver.response.EndTestResponse; +import org.jboss.unit.remote.driver.handler.http.response.InvokeGetRespons= e; = +import static org.jboss.unit.api.Assert.*; +import org.jboss.unit.Failure; + import javax.portlet.Portlet; import javax.portlet.RenderRequest; import javax.portlet.RenderResponse; @@ -157,7 +161,7 @@ } catch (InterruptedException e) { - return new ErrorResponse(e); + return new FailureResponse(Failure.createFailure(e)); } } }); @@ -239,7 +243,7 @@ } catch (InterruptedException e) { - return new ErrorResponse(e); + return new FailureResponse(Failure.createFailure(e)); } } }); Modified: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/port= let/jsr168/ext/nocache/NoCacheSequenceBuilder.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/js= r168/ext/nocache/NoCacheSequenceBuilder.java 2007-10-23 02:52:32 UTC (rev 8= 745) +++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/js= r168/ext/nocache/NoCacheSequenceBuilder.java 2007-10-23 07:31:22 UTC (rev 8= 746) @@ -29,16 +29,19 @@ import org.jboss.portal.test.framework.portlet.Joinpoint; import org.jboss.portal.test.framework.portlet.actions.PortletRenderTestAc= tion; import org.jboss.portal.test.framework.portlet.actions.PortletActionTestAc= tion; -import org.jboss.portal.test.framework.driver.http.response.InvokeGetRespo= nse; import org.jboss.portal.test.portlet.framework.UTP1; import org.jboss.portal.test.portlet.framework.UTP2; import org.jboss.portal.test.portlet.framework.UTP3; import org.jboss.portal.test.portlet.framework.UTP4; -import org.jboss.portal.test.framework.driver.DriverResponse; -import org.jboss.portal.test.framework.driver.response.EndTestResponse; -import org.jboss.portal.test.framework.driver.response.ErrorResponse; import org.jboss.portal.common.util.CollectionBuilder; +import org.jboss.unit.driver.DriverResponse; +import org.jboss.unit.driver.response.FailureResponse; +import org.jboss.unit.driver.response.EndTestResponse; +import org.jboss.unit.remote.driver.handler.http.response.InvokeGetRespons= e; +import org.jboss.unit.Failure; = +import static org.jboss.unit.api.Assert.*; + import javax.portlet.Portlet; import javax.portlet.RenderRequest; import javax.portlet.RenderResponse; @@ -166,7 +169,7 @@ } catch (InterruptedException e) { - return new ErrorResponse(e); + return new FailureResponse(Failure.createFailure(e)); } } }); Modified: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/port= let/jsr168/ext/portletconfig/PortletConfigSequenceBuilder.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/js= r168/ext/portletconfig/PortletConfigSequenceBuilder.java 2007-10-23 02:52:3= 2 UTC (rev 8745) +++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/js= r168/ext/portletconfig/PortletConfigSequenceBuilder.java 2007-10-23 07:31:2= 2 UTC (rev 8746) @@ -22,8 +22,6 @@ *************************************************************************= *****/ package org.jboss.portal.test.portlet.jsr168.ext.portletconfig; = -import org.jboss.portal.test.framework.driver.response.EndTestResponse; -import org.jboss.portal.test.framework.driver.DriverResponse; import org.jboss.portal.test.framework.portlet.PortletTest; import org.jboss.portal.test.framework.portlet.PortletTestDriver; import org.jboss.portal.test.framework.portlet.PortletTestSuite; @@ -33,7 +31,11 @@ import org.jboss.portal.test.portlet.jsr168.ext.portletconfig.extended.Get= ResourceBundleDuringInitPortlet; import org.jboss.portal.test.portlet.jsr168.ext.portletconfig.extended.Res= ourceBundleCascadePortlet; import org.jboss.portal.test.portlet.jsr168.ext.portletconfig.extended.Res= ourceBundlePortlet; +import org.jboss.unit.driver.response.EndTestResponse; +import org.jboss.unit.driver.DriverResponse; = +import static org.jboss.unit.api.Assert.*; + import javax.portlet.Portlet; import javax.portlet.PortletConfig; import javax.portlet.RenderRequest; Modified: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/port= let/jsr168/ext/portletmode/PortletModeSequenceBuilder.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/js= r168/ext/portletmode/PortletModeSequenceBuilder.java 2007-10-23 02:52:32 UT= C (rev 8745) +++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/js= r168/ext/portletmode/PortletModeSequenceBuilder.java 2007-10-23 07:31:22 UT= C (rev 8746) @@ -22,9 +22,6 @@ *************************************************************************= *****/ package org.jboss.portal.test.portlet.jsr168.ext.portletmode; = -import org.jboss.portal.test.framework.driver.response.EndTestResponse; -import org.jboss.portal.test.framework.driver.http.response.InvokeGetRespo= nse; -import org.jboss.portal.test.framework.driver.DriverResponse; import org.jboss.portal.test.framework.portlet.PortletTest; import org.jboss.portal.test.framework.portlet.PortletTestDriver; import org.jboss.portal.test.framework.portlet.PortletTestSuite; @@ -33,7 +30,12 @@ import org.jboss.portal.test.framework.portlet.actions.PortletRenderTestAc= tion; import org.jboss.portal.test.portlet.framework.UTP1; import org.jboss.portal.test.portlet.jsr168.ext.portletmode.extended.TestA= ctionWithPortletModePortlet; +import org.jboss.unit.remote.driver.handler.http.response.InvokeGetRespons= e; +import org.jboss.unit.driver.response.EndTestResponse; +import org.jboss.unit.driver.DriverResponse; = +import static org.jboss.unit.api.Assert.*; + import javax.portlet.ActionRequest; import javax.portlet.ActionResponse; import javax.portlet.Portlet; Modified: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/port= let/jsr168/ext/portletrequests/PortletRequestsSequenceBuilder.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/js= r168/ext/portletrequests/PortletRequestsSequenceBuilder.java 2007-10-23 02:= 52:32 UTC (rev 8745) +++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/js= r168/ext/portletrequests/PortletRequestsSequenceBuilder.java 2007-10-23 07:= 31:22 UTC (rev 8746) @@ -23,12 +23,8 @@ package org.jboss.portal.test.portlet.jsr168.ext.portletrequests; = import org.jboss.portal.common.util.Tools; -import org.jboss.portal.test.framework.driver.response.EndTestResponse; -import org.jboss.portal.test.framework.driver.http.response.InvokeGetRespo= nse; -import org.jboss.portal.test.framework.driver.DriverResponse; import org.jboss.portal.common.http.HttpRequest; import org.jboss.portal.common.io.IOTools; -import org.jboss.portal.test.framework.driver.http.response.InvokePostResp= onse; import org.jboss.portal.test.framework.portlet.PortletTest; import org.jboss.portal.test.framework.portlet.PortletTestDriver; import org.jboss.portal.test.framework.portlet.PortletTestSuite; @@ -36,7 +32,13 @@ import org.jboss.portal.test.framework.portlet.actions.PortletActionTestAc= tion; import org.jboss.portal.test.framework.portlet.actions.PortletRenderTestAc= tion; import org.jboss.portal.test.portlet.framework.UTP1; +import org.jboss.unit.remote.driver.handler.http.response.InvokePostRespon= se; +import org.jboss.unit.remote.driver.handler.http.response.InvokeGetRespons= e; +import org.jboss.unit.driver.DriverResponse; +import org.jboss.unit.driver.response.EndTestResponse; = +import static org.jboss.unit.api.Assert.*; + import javax.portlet.ActionRequest; import javax.portlet.ActionResponse; import javax.portlet.Portlet; Modified: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/port= let/jsr168/ext/portletresponses/PortletResponsesSequenceBuilder.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/js= r168/ext/portletresponses/PortletResponsesSequenceBuilder.java 2007-10-23 0= 2:52:32 UTC (rev 8745) +++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/js= r168/ext/portletresponses/PortletResponsesSequenceBuilder.java 2007-10-23 0= 7:31:22 UTC (rev 8746) @@ -22,15 +22,17 @@ *************************************************************************= *****/ package org.jboss.portal.test.portlet.jsr168.ext.portletresponses; = -import org.jboss.portal.test.framework.driver.response.EndTestResponse; -import org.jboss.portal.test.framework.driver.DriverResponse; import org.jboss.portal.test.framework.portlet.PortletTest; import org.jboss.portal.test.framework.portlet.PortletTestDriver; import org.jboss.portal.test.framework.portlet.PortletTestSuite; import org.jboss.portal.test.framework.portlet.PortletTestContext; import org.jboss.portal.test.framework.portlet.actions.PortletRenderTestAc= tion; import org.jboss.portal.test.portlet.framework.UTP1; +import org.jboss.unit.driver.response.EndTestResponse; +import org.jboss.unit.driver.DriverResponse; = +import static org.jboss.unit.api.Assert.*; + import javax.portlet.Portlet; import javax.portlet.RenderRequest; import javax.portlet.RenderResponse; Modified: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/port= let/jsr168/ext/preferences/PreferencesSequenceBuilder.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/js= r168/ext/preferences/PreferencesSequenceBuilder.java 2007-10-23 02:52:32 UT= C (rev 8745) +++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/js= r168/ext/preferences/PreferencesSequenceBuilder.java 2007-10-23 07:31:22 UT= C (rev 8746) @@ -22,9 +22,6 @@ *************************************************************************= *****/ package org.jboss.portal.test.portlet.jsr168.ext.preferences; = -import org.jboss.portal.test.framework.driver.response.EndTestResponse; -import org.jboss.portal.test.framework.driver.DriverResponse; -import org.jboss.portal.test.framework.driver.http.response.InvokeGetRespo= nse; import org.jboss.portal.test.framework.portlet.PortletTest; import org.jboss.portal.test.framework.portlet.PortletTestDriver; import org.jboss.portal.test.framework.portlet.PortletTestSuite; @@ -34,7 +31,12 @@ import org.jboss.portal.test.portlet.framework.UTP2; import org.jboss.portal.test.portlet.framework.UTP4; import org.jboss.portal.test.portlet.framework.UTP3; +import org.jboss.unit.driver.response.EndTestResponse; +import org.jboss.unit.driver.DriverResponse; +import org.jboss.unit.remote.driver.handler.http.response.InvokeGetRespons= e; = +import static org.jboss.unit.api.Assert.*; + import javax.portlet.ActionRequest; import javax.portlet.ActionResponse; import javax.portlet.Portlet; Modified: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/port= let/jsr168/ext/session/SessionSequenceBuilder.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/js= r168/ext/session/SessionSequenceBuilder.java 2007-10-23 02:52:32 UTC (rev 8= 745) +++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/js= r168/ext/session/SessionSequenceBuilder.java 2007-10-23 07:31:22 UTC (rev 8= 746) @@ -22,9 +22,6 @@ *************************************************************************= *****/ package org.jboss.portal.test.portlet.jsr168.ext.session; = -import org.jboss.portal.test.framework.driver.response.EndTestResponse; -import org.jboss.portal.test.framework.driver.http.response.InvokeGetRespo= nse; -import org.jboss.portal.test.framework.driver.DriverResponse; import org.jboss.portal.test.framework.portlet.PortletTest; import org.jboss.portal.test.framework.portlet.PortletTestDriver; import org.jboss.portal.test.framework.portlet.PortletTestSuite; @@ -34,7 +31,12 @@ import org.jboss.portal.test.framework.portlet.actions.ServletServiceTestA= ction; import org.jboss.portal.test.portlet.framework.UTP1; import org.jboss.portal.test.portlet.framework.UTS1; +import org.jboss.unit.remote.driver.handler.http.response.InvokeGetRespons= e; +import org.jboss.unit.driver.DriverResponse; +import org.jboss.unit.driver.response.EndTestResponse; = +import static org.jboss.unit.api.Assert.*; + import javax.portlet.ActionRequest; import javax.portlet.ActionResponse; import javax.portlet.Portlet; Modified: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/port= let/jsr168/misc/log4j/Log4jSequenceBuilder.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/js= r168/misc/log4j/Log4jSequenceBuilder.java 2007-10-23 02:52:32 UTC (rev 8745) +++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/js= r168/misc/log4j/Log4jSequenceBuilder.java 2007-10-23 07:31:22 UTC (rev 8746) @@ -23,14 +23,16 @@ package org.jboss.portal.test.portlet.jsr168.misc.log4j; = import org.apache.log4j.Logger; -import org.jboss.portal.test.framework.driver.response.EndTestResponse; -import org.jboss.portal.test.framework.driver.DriverResponse; import org.jboss.portal.test.framework.portlet.PortletTest; import org.jboss.portal.test.framework.portlet.PortletTestDriver; import org.jboss.portal.test.framework.portlet.PortletTestSuite; import org.jboss.portal.test.framework.portlet.PortletTestContext; import org.jboss.portal.test.framework.portlet.actions.PortletRenderTestAc= tion; +import org.jboss.unit.driver.DriverResponse; +import org.jboss.unit.driver.response.EndTestResponse; = +import static org.jboss.unit.api.Assert.*; + import javax.portlet.Portlet; import javax.portlet.RenderRequest; import javax.portlet.RenderResponse; Modified: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/port= let/jsr168/tck/dispatcher/DispatcherSequenceBuilder.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/js= r168/tck/dispatcher/DispatcherSequenceBuilder.java 2007-10-23 02:52:32 UTC = (rev 8745) +++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/js= r168/tck/dispatcher/DispatcherSequenceBuilder.java 2007-10-23 07:31:22 UTC = (rev 8746) @@ -22,9 +22,6 @@ *************************************************************************= *****/ package org.jboss.portal.test.portlet.jsr168.tck.dispatcher; = -import org.jboss.portal.test.framework.driver.response.EndTestResponse; -import org.jboss.portal.test.framework.driver.http.response.InvokeGetRespo= nse; -import org.jboss.portal.test.framework.driver.DriverResponse; import org.jboss.portal.test.framework.portlet.PortletTest; import org.jboss.portal.test.framework.portlet.PortletTestDriver; import org.jboss.portal.test.framework.portlet.PortletTestSuite; @@ -35,7 +32,12 @@ import org.jboss.portal.test.framework.portlet.components.AbstractUniversa= lTestPortlet; import org.jboss.portal.test.portlet.framework.UTP1; import org.jboss.portal.test.portlet.framework.UTS1; +import org.jboss.unit.driver.DriverResponse; +import org.jboss.unit.driver.response.EndTestResponse; +import org.jboss.unit.remote.driver.handler.http.response.InvokeGetRespons= e; = +import static org.jboss.unit.api.Assert.*; + import javax.portlet.ActionRequest; import javax.portlet.ActionResponse; import javax.portlet.Portlet; Modified: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/port= let/jsr168/tck/dispatcher/DispatcherTestSuite.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/js= r168/tck/dispatcher/DispatcherTestSuite.java 2007-10-23 02:52:32 UTC (rev 8= 745) +++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/js= r168/tck/dispatcher/DispatcherTestSuite.java 2007-10-23 07:31:22 UTC (rev 8= 746) @@ -22,8 +22,6 @@ *************************************************************************= *****/ package org.jboss.portal.test.portlet.jsr168.tck.dispatcher; = -import junit.framework.Test; - /** * @author Julien Viet * @author Boleslaw Daw= idowicz @@ -31,7 +29,7 @@ */ public class DispatcherTestSuite { - public static Test suite() + public static void suite() { // TestSuite suite =3D new TestSuite("test-jsr168-dispatcher.war"); // @@ -125,6 +123,5 @@ // suite.addTest(new TestCase("ErrorHandling")); // // return suite; - return null; } } Modified: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/port= let/jsr168/tck/portletconfig/PortletConfigSequenceBuilder.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/js= r168/tck/portletconfig/PortletConfigSequenceBuilder.java 2007-10-23 02:52:3= 2 UTC (rev 8745) +++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/js= r168/tck/portletconfig/PortletConfigSequenceBuilder.java 2007-10-23 07:31:2= 2 UTC (rev 8746) @@ -22,8 +22,6 @@ *************************************************************************= *****/ package org.jboss.portal.test.portlet.jsr168.tck.portletconfig; = -import org.jboss.portal.test.framework.driver.response.EndTestResponse; -import org.jboss.portal.test.framework.driver.DriverResponse; import org.jboss.portal.test.framework.portlet.PortletTest; import org.jboss.portal.test.framework.portlet.PortletTestDriver; import org.jboss.portal.test.framework.portlet.PortletTestSuite; @@ -32,7 +30,11 @@ import org.jboss.portal.test.framework.portlet.components.AbstractUniversa= lTestPortlet; import org.jboss.portal.test.portlet.jsr168.tck.portletconfig.spec.InlineV= aluesNotInResourceBundlePortlet; import org.jboss.portal.test.portlet.jsr168.tck.portletconfig.spec.InlineV= aluesWithNoResourceBundleDefinedPortlet; +import org.jboss.unit.driver.response.EndTestResponse; +import org.jboss.unit.driver.DriverResponse; = +import static org.jboss.unit.api.Assert.*; + import javax.portlet.Portlet; import javax.portlet.PortletConfig; import javax.portlet.RenderRequest; Modified: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/port= let/jsr168/tck/portletconfig/PortletConfigTestSuite.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/js= r168/tck/portletconfig/PortletConfigTestSuite.java 2007-10-23 02:52:32 UTC = (rev 8745) +++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/js= r168/tck/portletconfig/PortletConfigTestSuite.java 2007-10-23 07:31:22 UTC = (rev 8746) @@ -22,8 +22,6 @@ *************************************************************************= *****/ package org.jboss.portal.test.portlet.jsr168.tck.portletconfig; = -import junit.framework.Test; - /** * @author Julien Viet * @author Boleslaw Daw= idowicz @@ -32,7 +30,7 @@ public class PortletConfigTestSuite { = - public static Test suite() + public static void suite() { // TestSuite suite =3D new TestSuite("test-jsr168-portletconfig.war"); // @@ -48,6 +46,5 @@ // */ // suite.addTest(new TestCase("InlineValuesWithNoResourceBundleDefine= d")); // return suite; - return null; } } Modified: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/port= let/jsr168/tck/portletcontext/PortletContextSequenceBuilder.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/js= r168/tck/portletcontext/PortletContextSequenceBuilder.java 2007-10-23 02:52= :32 UTC (rev 8745) +++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/js= r168/tck/portletcontext/PortletContextSequenceBuilder.java 2007-10-23 07:31= :22 UTC (rev 8746) @@ -22,8 +22,6 @@ *************************************************************************= *****/ package org.jboss.portal.test.portlet.jsr168.tck.portletcontext; = -import org.jboss.portal.test.framework.driver.response.EndTestResponse; -import org.jboss.portal.test.framework.driver.DriverResponse; import org.jboss.portal.common.util.Tools; import org.jboss.portal.test.framework.portlet.PortletTest; import org.jboss.portal.test.framework.portlet.PortletTestDriver; @@ -35,7 +33,11 @@ import org.jboss.portal.test.framework.portlet.components.AbstractUniversa= lTestServlet; import org.jboss.portal.test.portlet.framework.UTP1; import org.jboss.portal.test.portlet.framework.UTS1; +import org.jboss.unit.driver.DriverResponse; +import org.jboss.unit.driver.response.EndTestResponse; = +import static org.jboss.unit.api.Assert.*; + import javax.portlet.Portlet; import javax.portlet.PortletException; import javax.portlet.PortletRequestDispatcher; Modified: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/port= let/jsr168/tck/portletcontext/PortletContextTestSuite.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/js= r168/tck/portletcontext/PortletContextTestSuite.java 2007-10-23 02:52:32 UT= C (rev 8745) +++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/js= r168/tck/portletcontext/PortletContextTestSuite.java 2007-10-23 07:31:22 UT= C (rev 8746) @@ -22,8 +22,6 @@ *************************************************************************= *****/ package org.jboss.portal.test.portlet.jsr168.tck.portletcontext; = -import junit.framework.Test; - /** * @author Julien Viet * @author Boleslaw Daw= idowicz @@ -32,7 +30,7 @@ public class PortletContextTestSuite { = - public static Test suite() + public static void suite() { // TestSuite suite =3D new TestSuite("test-jsr168-portletcontext.war"= ); // @@ -62,6 +60,5 @@ // */ // // return suite; - return null; } } Modified: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/port= let/jsr168/tck/portletinterface/PortletInterfaceSequenceBuilder.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/js= r168/tck/portletinterface/PortletInterfaceSequenceBuilder.java 2007-10-23 0= 2:52:32 UTC (rev 8745) +++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/js= r168/tck/portletinterface/PortletInterfaceSequenceBuilder.java 2007-10-23 0= 7:31:22 UTC (rev 8746) @@ -22,10 +22,6 @@ *************************************************************************= *****/ package org.jboss.portal.test.portlet.jsr168.tck.portletinterface; = -import org.jboss.portal.test.framework.driver.response.EndTestResponse; -import org.jboss.portal.test.framework.driver.response.FailureResponse; -import org.jboss.portal.test.framework.driver.http.response.InvokeGetRespo= nse; -import org.jboss.portal.test.framework.driver.DriverResponse; import org.jboss.portal.test.framework.portlet.PortletTest; import org.jboss.portal.test.framework.portlet.PortletTestDriver; import org.jboss.portal.test.framework.portlet.PortletTestSuite; @@ -40,7 +36,14 @@ import org.jboss.portal.test.portlet.jsr168.tck.portletinterface.spec.Port= letExceptionDuringInitPortlet; import org.jboss.portal.test.portlet.jsr168.tck.portletinterface.spec.Runt= imeExceptionDuringInitPortlet; import org.jboss.portal.test.portlet.jsr168.tck.portletinterface.spec.Unav= ailableExceptionDuringInitPortlet; +import org.jboss.unit.driver.DriverResponse; +import org.jboss.unit.driver.response.EndTestResponse; +import org.jboss.unit.driver.response.FailureResponse; = +import static org.jboss.unit.api.Assert.*; +import org.jboss.unit.remote.driver.handler.http.response.InvokeGetRespons= e; +import org.jboss.unit.Failure; + import javax.portlet.ActionRequest; import javax.portlet.ActionResponse; import javax.portlet.Portlet; @@ -360,7 +363,7 @@ protected DriverResponse run(Portlet portlet, RenderRequest reque= st, RenderResponse response, PortletTestContext context) { //We shouldn't be here - return new FailureResponse("Render wasn't expected to be invok= ed"); + return new FailureResponse(Failure.createAssertionFailure("Ren= der wasn't expected to be invoked")); } }); } Modified: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/port= let/jsr168/tck/portletinterface/PortletInterfaceTestSuite.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/js= r168/tck/portletinterface/PortletInterfaceTestSuite.java 2007-10-23 02:52:3= 2 UTC (rev 8745) +++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/js= r168/tck/portletinterface/PortletInterfaceTestSuite.java 2007-10-23 07:31:2= 2 UTC (rev 8746) @@ -22,15 +22,13 @@ *************************************************************************= *****/ package org.jboss.portal.test.portlet.jsr168.tck.portletinterface; = -import junit.framework.Test; - /** * @author Boleslaw Daw= idowicz * @version $Revision: 5510 $ */ public class PortletInterfaceTestSuite { - public static Test suite() + public static void suite() { // TestSuite suite =3D new TestSuite("test-jsr168-portletinterface.wa= r"); // @@ -107,6 +105,5 @@ // // // return suite; - return null; } } Modified: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/port= let/jsr168/tck/portletinterface/spec/ExceptionsDuringRequestHandlingControl= lerPortlet.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/js= r168/tck/portletinterface/spec/ExceptionsDuringRequestHandlingControllerPor= tlet.java 2007-10-23 02:52:32 UTC (rev 8745) +++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/js= r168/tck/portletinterface/spec/ExceptionsDuringRequestHandlingControllerPor= tlet.java 2007-10-23 07:31:22 UTC (rev 8746) @@ -22,13 +22,14 @@ *************************************************************************= *****/ package org.jboss.portal.test.portlet.jsr168.tck.portletinterface.spec; = -import org.jboss.portal.test.framework.driver.response.EndTestResponse; -import org.jboss.portal.test.framework.driver.DriverResponse; -import org.jboss.portal.test.framework.driver.remote.TestContext; -import org.jboss.portal.common.junit.ExtendedAssert; -import org.jboss.portal.test.framework.driver.http.response.InvokeGetRespo= nse; import org.jboss.portal.test.framework.portlet.components.AbstractTestPort= let; +import org.jboss.unit.remote.driver.handler.http.response.InvokeGetRespons= e; +import org.jboss.unit.remote.RequestContext; +import org.jboss.unit.driver.DriverResponse; +import org.jboss.unit.driver.response.EndTestResponse; = +import static org.jboss.unit.api.Assert.*; + import javax.portlet.PortletException; import javax.portlet.PortletSecurityException; import javax.portlet.PortletURL; @@ -59,7 +60,7 @@ return "ExceptionsDuringRequestHandlingPortlet"; } = - protected DriverResponse doRender(RenderRequest req, RenderResponse res= p, TestContext context) throws PortletException, PortletSecurityException, = IOException + protected DriverResponse doRender(RenderRequest req, RenderResponse res= p, RequestContext context) throws PortletException, PortletSecurityExceptio= n, IOException { if (context.getRequestCount() =3D=3D 0) { @@ -91,13 +92,13 @@ else if (context.getRequestCount() =3D=3D 5) { //portlets that shouldn't render itself after Exception in Action= Phase - ExtendedAssert.assertEquals(false, PortletExceptionDuringRequestH= andlingPortlet.rendered); - ExtendedAssert.assertEquals(false, RuntimeExceptionDuringRequestH= andlingPortlet.rendered); - ExtendedAssert.assertEquals(false, UnavailableExceptionDuringProc= essActionPortlet.rendered); + assertEquals(false, PortletExceptionDuringRequestHandlingPortlet.= rendered); + assertEquals(false, RuntimeExceptionDuringRequestHandlingPortlet.= rendered); + assertEquals(false, UnavailableExceptionDuringProcessActionPortle= t.rendered); = //and should be destroyed because of UnavailableException was thr= owed - ExtendedAssert.assertEquals(true, UnavailableExceptionDuringProce= ssActionPortlet.destroyed); - ExtendedAssert.assertEquals(true, UnavailableExceptionDuringRende= rPortlet.destroyed); + assertEquals(true, UnavailableExceptionDuringProcessActionPortlet= .destroyed); + assertEquals(true, UnavailableExceptionDuringRenderPortlet.destro= yed); = // return new EndTestResponse(); Modified: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/port= let/jsr168/tck/portletinterface/spec/MinimizedStateDontRenderPortlet.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/js= r168/tck/portletinterface/spec/MinimizedStateDontRenderPortlet.java 2007-10= -23 02:52:32 UTC (rev 8745) +++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/js= r168/tck/portletinterface/spec/MinimizedStateDontRenderPortlet.java 2007-10= -23 07:31:22 UTC (rev 8746) @@ -22,14 +22,16 @@ *************************************************************************= *****/ package org.jboss.portal.test.portlet.jsr168.tck.portletinterface.spec; = -import org.jboss.portal.test.framework.driver.response.EndTestResponse; -import org.jboss.portal.test.framework.driver.response.ErrorResponse; -import org.jboss.portal.test.framework.driver.DriverResponse; -import org.jboss.portal.common.junit.ExtendedAssert; -import org.jboss.portal.test.framework.driver.http.response.InvokeGetRespo= nse; import org.jboss.portal.test.framework.portlet.components.AbstractTestGene= ricPortlet; import org.jboss.portal.test.framework.portlet.PortletTestContext; +import org.jboss.unit.remote.driver.handler.http.response.InvokeGetRespons= e; +import org.jboss.unit.driver.DriverResponse; +import org.jboss.unit.driver.response.EndTestResponse; +import org.jboss.unit.driver.response.FailureResponse; +import org.jboss.unit.Failure; = +import static org.jboss.unit.api.Assert.*; + import javax.portlet.PortletException; import javax.portlet.PortletMode; import javax.portlet.PortletURL; @@ -86,7 +88,7 @@ } case 1: { - ExtendedAssert.assertNull(rendered); + assertNull(rendered); = // Invoking EDIT mode PortletURL url =3D resp.createRenderURL(); @@ -96,7 +98,7 @@ } case 2: { - ExtendedAssert.assertNull(rendered); + assertNull(rendered); = // Invoking HELP mode PortletURL url =3D resp.createRenderURL(); @@ -106,13 +108,13 @@ } case 3: { - ExtendedAssert.assertNull(rendered); + assertNull(rendered); = // return new EndTestResponse(); } default: - return new ErrorResponse(); + return new FailureResponse(Failure.createAssertionFailure("")); } } } Modified: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/port= let/jsr168/tck/portletinterface/spec/PortletExceptionDuringRequestHandlingP= ortlet.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/js= r168/tck/portletinterface/spec/PortletExceptionDuringRequestHandlingPortlet= .java 2007-10-23 02:52:32 UTC (rev 8745) +++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/js= r168/tck/portletinterface/spec/PortletExceptionDuringRequestHandlingPortlet= .java 2007-10-23 07:31:22 UTC (rev 8746) @@ -23,8 +23,8 @@ package org.jboss.portal.test.portlet.jsr168.tck.portletinterface.spec; = import org.jboss.portal.test.framework.portlet.components.AbstractTestPort= let; -import org.jboss.portal.test.framework.driver.DriverResponse; -import org.jboss.portal.test.framework.driver.remote.TestContext; +import org.jboss.unit.driver.DriverResponse; +import org.jboss.unit.remote.RequestContext; = import javax.portlet.ActionRequest; import javax.portlet.ActionResponse; @@ -57,7 +57,7 @@ return "ExceptionsDuringRequestHandlingPortlet"; } = - protected DriverResponse doProcessAction(ActionRequest req, ActionRespo= nse resp, TestContext context) throws PortletException, IOException + protected DriverResponse doProcessAction(ActionRequest req, ActionRespo= nse resp, RequestContext context) throws PortletException, IOException { if (context.isRequestCount(2)) { @@ -66,7 +66,7 @@ return null; } = - protected DriverResponse doRender(RenderRequest req, RenderResponse res= p, TestContext context) throws PortletException, IOException + protected DriverResponse doRender(RenderRequest req, RenderResponse res= p, RequestContext context) throws PortletException, IOException { if (context.isRequestCount(0)) { Modified: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/port= let/jsr168/tck/portletinterface/spec/RuntimeExceptionDuringRequestHandlingP= ortlet.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/js= r168/tck/portletinterface/spec/RuntimeExceptionDuringRequestHandlingPortlet= .java 2007-10-23 02:52:32 UTC (rev 8745) +++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/js= r168/tck/portletinterface/spec/RuntimeExceptionDuringRequestHandlingPortlet= .java 2007-10-23 07:31:22 UTC (rev 8746) @@ -23,8 +23,8 @@ package org.jboss.portal.test.portlet.jsr168.tck.portletinterface.spec; = import org.jboss.portal.test.framework.portlet.components.AbstractTestPort= let; -import org.jboss.portal.test.framework.driver.DriverResponse; -import org.jboss.portal.test.framework.driver.remote.TestContext; +import org.jboss.unit.driver.DriverResponse; +import org.jboss.unit.remote.RequestContext; = import javax.portlet.ActionRequest; import javax.portlet.ActionResponse; @@ -59,7 +59,7 @@ return "ExceptionsDuringRequestHandlingPortlet"; } = - protected DriverResponse doProcessAction(ActionRequest req, ActionRespo= nse resp, TestContext context) throws PortletException, IOException + protected DriverResponse doProcessAction(ActionRequest req, ActionRespo= nse resp, RequestContext context) throws PortletException, IOException { if (context.isRequestCount(3)) { @@ -68,7 +68,7 @@ return null; } = - protected DriverResponse doRender(RenderRequest req, RenderResponse res= p, TestContext context) throws PortletException, IOException + protected DriverResponse doRender(RenderRequest req, RenderResponse res= p, RequestContext context) throws PortletException, IOException { if (context.isRequestCount(0)) { Modified: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/port= let/jsr168/tck/portletinterface/spec/UnavailableExceptionDuringProcessActio= nPortlet.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/js= r168/tck/portletinterface/spec/UnavailableExceptionDuringProcessActionPortl= et.java 2007-10-23 02:52:32 UTC (rev 8745) +++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/js= r168/tck/portletinterface/spec/UnavailableExceptionDuringProcessActionPortl= et.java 2007-10-23 07:31:22 UTC (rev 8746) @@ -23,8 +23,8 @@ package org.jboss.portal.test.portlet.jsr168.tck.portletinterface.spec; = import org.jboss.portal.test.framework.portlet.components.AbstractTestPort= let; -import org.jboss.portal.test.framework.driver.DriverResponse; -import org.jboss.portal.test.framework.driver.remote.TestContext; +import org.jboss.unit.driver.DriverResponse; +import org.jboss.unit.remote.RequestContext; = import javax.portlet.ActionRequest; import javax.portlet.ActionResponse; @@ -57,7 +57,7 @@ return "ExceptionsDuringRequestHandlingPortlet"; } = - protected DriverResponse doProcessAction(ActionRequest req, ActionRespo= nse resp, TestContext context) throws PortletException, IOException + protected DriverResponse doProcessAction(ActionRequest req, ActionRespo= nse resp, RequestContext context) throws PortletException, IOException { if (context.isRequestCount(4)) { @@ -66,7 +66,7 @@ return null; } = - protected DriverResponse doRender(RenderRequest req, RenderResponse res= p, TestContext context) throws PortletException, IOException + protected DriverResponse doRender(RenderRequest req, RenderResponse res= p, RequestContext context) throws PortletException, IOException { if (context.isRequestCount(0)) { Modified: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/port= let/jsr168/tck/portletinterface/spec/UnavailableExceptionDuringRenderPortle= t.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/js= r168/tck/portletinterface/spec/UnavailableExceptionDuringRenderPortlet.java= 2007-10-23 02:52:32 UTC (rev 8745) +++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/js= r168/tck/portletinterface/spec/UnavailableExceptionDuringRenderPortlet.java= 2007-10-23 07:31:22 UTC (rev 8746) @@ -23,8 +23,8 @@ package org.jboss.portal.test.portlet.jsr168.tck.portletinterface.spec; = import org.jboss.portal.test.framework.portlet.components.AbstractTestPort= let; -import org.jboss.portal.test.framework.driver.DriverResponse; -import org.jboss.portal.test.framework.driver.remote.TestContext; +import org.jboss.unit.driver.DriverResponse; +import org.jboss.unit.remote.RequestContext; = import javax.portlet.PortletException; import javax.portlet.RenderRequest; @@ -52,7 +52,7 @@ return "ExceptionsDuringRequestHandlingPortlet"; } = - protected DriverResponse doRender(RenderRequest req, RenderResponse res= p, TestContext context) throws PortletException, IOException + protected DriverResponse doRender(RenderRequest req, RenderResponse res= p, RequestContext context) throws PortletException, IOException { if (context.isRequestCount(0)) { Modified: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/port= let/jsr168/tck/portletmode/PortletModeSequenceBuilder.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/js= r168/tck/portletmode/PortletModeSequenceBuilder.java 2007-10-23 02:52:32 UT= C (rev 8745) +++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/js= r168/tck/portletmode/PortletModeSequenceBuilder.java 2007-10-23 07:31:22 UT= C (rev 8746) @@ -22,9 +22,6 @@ *************************************************************************= *****/ package org.jboss.portal.test.portlet.jsr168.tck.portletmode; = -import org.jboss.portal.test.framework.driver.response.EndTestResponse; -import org.jboss.portal.test.framework.driver.http.response.InvokeGetRespo= nse; -import org.jboss.portal.test.framework.driver.DriverResponse; import org.jboss.portal.test.framework.portlet.PortletTest; import org.jboss.portal.test.framework.portlet.PortletTestDriver; import org.jboss.portal.test.framework.portlet.PortletTestSuite; @@ -32,7 +29,12 @@ import org.jboss.portal.test.framework.portlet.actions.PortletRenderTestAc= tion; import org.jboss.portal.test.portlet.framework.UTP1; import org.jboss.portal.test.portlet.jsr168.tck.portletmode.spec.NotInvoke= ModeDeclaredForNotSupportedMarkupHelperPortlet; +import org.jboss.unit.driver.DriverResponse; +import org.jboss.unit.driver.response.EndTestResponse; +import org.jboss.unit.remote.driver.handler.http.response.InvokeGetRespons= e; = +import static org.jboss.unit.api.Assert.*; + import javax.portlet.Portlet; import javax.portlet.PortletMode; import javax.portlet.PortletModeException; Modified: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/port= let/jsr168/tck/portletmode/PortletModeTestSuite.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/js= r168/tck/portletmode/PortletModeTestSuite.java 2007-10-23 02:52:32 UTC (rev= 8745) +++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/js= r168/tck/portletmode/PortletModeTestSuite.java 2007-10-23 07:31:22 UTC (rev= 8746) @@ -22,8 +22,6 @@ *************************************************************************= *****/ package org.jboss.portal.test.portlet.jsr168.tck.portletmode; = -import junit.framework.Test; - /** * @author Julien Viet * @author Boleslaw Daw= idowicz @@ -31,7 +29,7 @@ */ public class PortletModeTestSuite { - public static Test suite() + public static void suite() { // TestSuite suite =3D new TestSuite("test-jsr168-portletmode.war"); // @@ -54,6 +52,5 @@ // //suite.addTest(new TestCase("NotInvokeModeDeclaredForNotSupported= Markup")); // // return suite; - return null; } } Modified: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/port= let/jsr168/tck/portletmode/spec/RequestDispatchingDependingOnModePortlet.ja= va =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/js= r168/tck/portletmode/spec/RequestDispatchingDependingOnModePortlet.java 200= 7-10-23 02:52:32 UTC (rev 8745) +++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/js= r168/tck/portletmode/spec/RequestDispatchingDependingOnModePortlet.java 200= 7-10-23 07:31:22 UTC (rev 8746) @@ -24,12 +24,14 @@ = import org.jboss.portal.test.framework.portlet.components.AbstractTestGene= ricPortlet; import org.jboss.portal.test.framework.portlet.PortletTestContext; -import org.jboss.portal.test.framework.driver.http.response.InvokeGetRespo= nse; -import org.jboss.portal.common.junit.ExtendedAssert; -import org.jboss.portal.test.framework.driver.response.EndTestResponse; -import org.jboss.portal.test.framework.driver.response.ErrorResponse; -import org.jboss.portal.test.framework.driver.DriverResponse; +import org.jboss.unit.remote.driver.handler.http.response.InvokeGetRespons= e; +import org.jboss.unit.driver.DriverResponse; +import org.jboss.unit.driver.response.EndTestResponse; +import org.jboss.unit.driver.response.FailureResponse; +import org.jboss.unit.Failure; = +import static org.jboss.unit.api.Assert.*; + import javax.portlet.PortletException; import javax.portlet.RenderRequest; import javax.portlet.RenderResponse; @@ -97,7 +99,7 @@ } case 1: { - ExtendedAssert.assertEquals("doView", methodCall); + assertEquals("doView", methodCall); = // Invoking EDIT mode PortletURL url =3D resp.createRenderURL(); @@ -106,7 +108,7 @@ } case 2: { - ExtendedAssert.assertEquals("doEdit", methodCall); + assertEquals("doEdit", methodCall); = // Invoking HELP mode PortletURL url =3D resp.createRenderURL(); @@ -115,13 +117,13 @@ } case 3: { - ExtendedAssert.assertEquals("doHelp", methodCall); + assertEquals("doHelp", methodCall); = // return new EndTestResponse(); } default: - return new ErrorResponse(); + return new FailureResponse(Failure.createAssertionFailure("= ")); } } finally Modified: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/port= let/jsr168/tck/portletrequests/PortletRequestTestSuite.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/js= r168/tck/portletrequests/PortletRequestTestSuite.java 2007-10-23 02:52:32 U= TC (rev 8745) +++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/js= r168/tck/portletrequests/PortletRequestTestSuite.java 2007-10-23 07:31:22 U= TC (rev 8746) @@ -22,15 +22,13 @@ *************************************************************************= *****/ package org.jboss.portal.test.portlet.jsr168.tck.portletrequests; = -import junit.framework.Test; - /** * @author Julien Viet * @version $Revision: 5510 $ */ public class PortletRequestTestSuite { - public static Test suite() + public static void suite() { // TestSuite suite =3D new TestSuite("test-jsr168-portletrequests.war= "); // @@ -103,6 +101,5 @@ // */ // // return suite; - return null; } } Modified: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/port= let/jsr168/tck/portletrequests/PortletRequestsSequenceBuilder.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/js= r168/tck/portletrequests/PortletRequestsSequenceBuilder.java 2007-10-23 02:= 52:32 UTC (rev 8745) +++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/js= r168/tck/portletrequests/PortletRequestsSequenceBuilder.java 2007-10-23 07:= 31:22 UTC (rev 8746) @@ -22,9 +22,6 @@ *************************************************************************= *****/ package org.jboss.portal.test.portlet.jsr168.tck.portletrequests; = -import org.jboss.portal.test.framework.driver.response.EndTestResponse; -import org.jboss.portal.test.framework.driver.http.response.InvokeGetRespo= nse; -import org.jboss.portal.test.framework.driver.DriverResponse; import org.jboss.portal.test.framework.portlet.PortletTest; import org.jboss.portal.test.framework.portlet.PortletTestDriver; import org.jboss.portal.test.framework.portlet.PortletTestSuite; @@ -33,7 +30,12 @@ import org.jboss.portal.test.framework.portlet.actions.PortletRenderTestAc= tion; import org.jboss.portal.test.portlet.framework.UTP1; import org.jboss.portal.test.portlet.framework.UTP2; +import org.jboss.unit.driver.response.EndTestResponse; +import org.jboss.unit.driver.DriverResponse; +import org.jboss.unit.remote.driver.handler.http.response.InvokeGetRespons= e; = +import static org.jboss.unit.api.Assert.*; + import javax.portlet.ActionRequest; import javax.portlet.ActionResponse; import javax.portlet.Portlet; Modified: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/port= let/jsr168/tck/portletresponses/PortletResponsesSequenceBuilder.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/js= r168/tck/portletresponses/PortletResponsesSequenceBuilder.java 2007-10-23 0= 2:52:32 UTC (rev 8745) +++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/js= r168/tck/portletresponses/PortletResponsesSequenceBuilder.java 2007-10-23 0= 7:31:22 UTC (rev 8746) @@ -22,10 +22,6 @@ *************************************************************************= *****/ package org.jboss.portal.test.portlet.jsr168.tck.portletresponses; = -import org.jboss.portal.test.framework.driver.response.EndTestResponse; -import org.jboss.portal.test.framework.driver.response.FailureResponse; -import org.jboss.portal.test.framework.driver.http.response.InvokeGetRespo= nse; -import org.jboss.portal.test.framework.driver.DriverResponse; import org.jboss.portal.test.framework.portlet.PortletTest; import org.jboss.portal.test.framework.portlet.PortletTestDriver; import org.jboss.portal.test.framework.portlet.PortletTestSuite; @@ -36,7 +32,14 @@ import org.jboss.portal.test.portlet.framework.UTP1; import org.jboss.portal.test.portlet.framework.UTS1; import org.jboss.portal.test.portlet.framework.UTS2; +import org.jboss.unit.remote.driver.handler.http.response.InvokeGetRespons= e; +import org.jboss.unit.driver.DriverResponse; +import org.jboss.unit.driver.response.EndTestResponse; +import org.jboss.unit.driver.response.FailureResponse; = +import static org.jboss.unit.api.Assert.*; +import org.jboss.unit.Failure; + import javax.portlet.ActionRequest; import javax.portlet.ActionResponse; import javax.portlet.Portlet; @@ -376,7 +379,7 @@ { protected DriverResponse run(Portlet portlet, RenderRequest reque= st, RenderResponse response, PortletTestContext context) { - return new FailureResponse("Render wasn't expected to be calle= d"); + return new FailureResponse(Failure.createAssertionFailure("Ren= der wasn't expected to be called")); } }); } @@ -503,7 +506,7 @@ { protected DriverResponse run(Portlet portlet, RenderRequest reque= st, RenderResponse response, PortletTestContext context) { - return new FailureResponse("Render wasn't expected"); + return new FailureResponse(Failure.createAssertionFailure("Ren= der wasn't expected")); } }); } @@ -756,7 +759,7 @@ { protected DriverResponse run(Servlet servlet, HttpServletRequest = request, HttpServletResponse response, PortletTestContext context) throws S= ervletException, IOException { - return new FailureResponse("Redirection shouldn't be made"); + return new FailureResponse(Failure.createAssertionFailure("Red= irection shouldn't be made")); } }); = Modified: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/port= let/jsr168/tck/portletresponses/PortletResponsesTestSuite.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/js= r168/tck/portletresponses/PortletResponsesTestSuite.java 2007-10-23 02:52:3= 2 UTC (rev 8745) +++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/js= r168/tck/portletresponses/PortletResponsesTestSuite.java 2007-10-23 07:31:2= 2 UTC (rev 8746) @@ -22,8 +22,6 @@ *************************************************************************= *****/ package org.jboss.portal.test.portlet.jsr168.tck.portletresponses; = -import junit.framework.Test; - /** * @author Julien Viet * @author Boleslaw Daw= idowicz @@ -31,7 +29,7 @@ */ public class PortletResponsesTestSuite { - public static Test suite() + public static void suite() { // TestSuite suite =3D new TestSuite("test-jsr168-portletresponses.wa= r"); // @@ -136,8 +134,5 @@ // */ // suite.addTest(new TestCase("NamespaceEncoding")); // return suite; - return null; } - - } Modified: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/port= let/jsr168/tck/portletsession/HttpSessionInvalidatorServlet.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/js= r168/tck/portletsession/HttpSessionInvalidatorServlet.java 2007-10-23 02:52= :32 UTC (rev 8745) +++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/js= r168/tck/portletsession/HttpSessionInvalidatorServlet.java 2007-10-23 07:31= :22 UTC (rev 8746) @@ -22,7 +22,7 @@ *************************************************************************= *****/ package org.jboss.portal.test.portlet.jsr168.tck.portletsession; = -import org.jboss.portal.common.junit.ExtendedAssert; +import static org.jboss.unit.api.Assert.*; = import javax.servlet.ServletException; import javax.servlet.http.HttpServlet; @@ -45,7 +45,7 @@ try { session.getAttribute("doesnotexist"); - ExtendedAssert.fail(); + fail(); } catch (IllegalStateException expected) { Modified: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/port= let/jsr168/tck/portletsession/PortletSessionSequenceBuilder.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/js= r168/tck/portletsession/PortletSessionSequenceBuilder.java 2007-10-23 02:52= :32 UTC (rev 8745) +++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/js= r168/tck/portletsession/PortletSessionSequenceBuilder.java 2007-10-23 07:31= :22 UTC (rev 8746) @@ -22,9 +22,6 @@ *************************************************************************= *****/ package org.jboss.portal.test.portlet.jsr168.tck.portletsession; = -import org.jboss.portal.test.framework.driver.response.EndTestResponse; -import org.jboss.portal.test.framework.driver.http.response.InvokeGetRespo= nse; -import org.jboss.portal.test.framework.driver.DriverResponse; import org.jboss.portal.test.framework.portlet.PortletTest; import org.jboss.portal.test.framework.portlet.PortletTestDriver; import org.jboss.portal.test.framework.portlet.PortletTestSuite; @@ -36,7 +33,12 @@ import org.jboss.portal.test.portlet.framework.UTP1; import org.jboss.portal.test.portlet.framework.UTP2; import org.jboss.portal.test.portlet.framework.UTS1; +import org.jboss.unit.remote.driver.handler.http.response.InvokeGetRespons= e; +import org.jboss.unit.driver.DriverResponse; +import org.jboss.unit.driver.response.EndTestResponse; = +import static org.jboss.unit.api.Assert.*; + import javax.portlet.ActionRequest; import javax.portlet.ActionResponse; import javax.portlet.Portlet; Modified: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/port= let/jsr168/tck/portletsession/PortletSessionTestSuite.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/js= r168/tck/portletsession/PortletSessionTestSuite.java 2007-10-23 02:52:32 UT= C (rev 8745) +++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/js= r168/tck/portletsession/PortletSessionTestSuite.java 2007-10-23 07:31:22 UT= C (rev 8746) @@ -22,15 +22,13 @@ *************************************************************************= *****/ package org.jboss.portal.test.portlet.jsr168.tck.portletsession; = -import junit.framework.Test; - /** * @author Julien Viet * @version $Revision: 5510 $ */ public class PortletSessionTestSuite { - public static Test suite() + public static void suite() { // TestSuite suite =3D new TestSuite("test-jsr168-portletsession.war"= ); // @@ -76,6 +74,5 @@ // */ // // return suite; - return null; } } Modified: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/port= let/jsr168/tck/portleturl/PortletURLTestSuite.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/js= r168/tck/portleturl/PortletURLTestSuite.java 2007-10-23 02:52:32 UTC (rev 8= 745) +++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/js= r168/tck/portleturl/PortletURLTestSuite.java 2007-10-23 07:31:22 UTC (rev 8= 746) @@ -22,15 +22,13 @@ *************************************************************************= *****/ package org.jboss.portal.test.portlet.jsr168.tck.portleturl; = -import junit.framework.Test; - /** * @author Julien Viet * @version $Revision: 5510 $ */ public class PortletURLTestSuite { - public static Test suite() + public static void suite() { // TestSuite suite =3D new TestSuite("test-jsr168-portleturl.war"); // @@ -75,6 +73,5 @@ // // // return suite; - return null; } } Modified: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/port= let/jsr168/tck/portleturl/PortletUrlSequenceBuilder.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/js= r168/tck/portleturl/PortletUrlSequenceBuilder.java 2007-10-23 02:52:32 UTC = (rev 8745) +++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/js= r168/tck/portleturl/PortletUrlSequenceBuilder.java 2007-10-23 07:31:22 UTC = (rev 8746) @@ -22,9 +22,6 @@ *************************************************************************= *****/ package org.jboss.portal.test.portlet.jsr168.tck.portleturl; = -import org.jboss.portal.test.framework.driver.response.EndTestResponse; -import org.jboss.portal.test.framework.driver.http.response.InvokeGetRespo= nse; -import org.jboss.portal.test.framework.driver.DriverResponse; import org.jboss.portal.test.framework.portlet.PortletTest; import org.jboss.portal.test.framework.portlet.PortletTestDriver; import org.jboss.portal.test.framework.portlet.PortletTestSuite; @@ -32,7 +29,12 @@ import org.jboss.portal.test.framework.portlet.actions.PortletActionTestAc= tion; import org.jboss.portal.test.framework.portlet.actions.PortletRenderTestAc= tion; import org.jboss.portal.test.portlet.framework.UTP1; +import org.jboss.unit.driver.DriverResponse; +import org.jboss.unit.driver.response.EndTestResponse; +import org.jboss.unit.remote.driver.handler.http.response.InvokeGetRespons= e; = +import static org.jboss.unit.api.Assert.*; + import javax.portlet.ActionRequest; import javax.portlet.ActionResponse; import javax.portlet.Portlet; Modified: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/port= let/jsr168/tck/preferences/PreferencesSequenceBuilder.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/js= r168/tck/preferences/PreferencesSequenceBuilder.java 2007-10-23 02:52:32 UT= C (rev 8745) +++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/js= r168/tck/preferences/PreferencesSequenceBuilder.java 2007-10-23 07:31:22 UT= C (rev 8746) @@ -22,9 +22,6 @@ *************************************************************************= *****/ package org.jboss.portal.test.portlet.jsr168.tck.preferences; = -import org.jboss.portal.test.framework.driver.response.EndTestResponse; -import org.jboss.portal.test.framework.driver.http.response.InvokeGetRespo= nse; -import org.jboss.portal.test.framework.driver.DriverResponse; import org.jboss.portal.test.framework.portlet.PortletTest; import org.jboss.portal.test.framework.portlet.PortletTestDriver; import org.jboss.portal.test.framework.portlet.PortletTestSuite; @@ -41,7 +38,12 @@ import org.jboss.portal.test.portlet.framework.UTP8; import org.jboss.portal.test.portlet.jsr168.tck.preferences.spec.CreateASi= ngleInstanceOfValidatorValidator; import org.jboss.portal.test.portlet.jsr168.tck.preferences.spec.Validatio= nStoresValidator; +import org.jboss.unit.remote.driver.handler.http.response.InvokeGetRespons= e; +import org.jboss.unit.driver.DriverResponse; +import org.jboss.unit.driver.response.EndTestResponse; = +import static org.jboss.unit.api.Assert.*; + import javax.portlet.ActionRequest; import javax.portlet.ActionResponse; import javax.portlet.Portlet; Modified: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/port= let/jsr168/tck/preferences/PreferencesTestSuite.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/js= r168/tck/preferences/PreferencesTestSuite.java 2007-10-23 02:52:32 UTC (rev= 8745) +++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/js= r168/tck/preferences/PreferencesTestSuite.java 2007-10-23 07:31:22 UTC (rev= 8746) @@ -22,8 +22,6 @@ *************************************************************************= *****/ package org.jboss.portal.test.portlet.jsr168.tck.preferences; = -import junit.framework.Test; - /** * @author Julien Viet * @author Boleslaw Daw= idowicz @@ -31,7 +29,7 @@ */ public class PreferencesTestSuite { - public static Test suite() + public static void suite() { // TestSuite suite =3D new TestSuite("test-jsr168-preferences.war"); // @@ -116,6 +114,5 @@ // // // return suite; - return null; } } Modified: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/port= let/jsr168/tck/windowstates/WindowStatesSequenceBuilder.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/js= r168/tck/windowstates/WindowStatesSequenceBuilder.java 2007-10-23 02:52:32 = UTC (rev 8745) +++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/js= r168/tck/windowstates/WindowStatesSequenceBuilder.java 2007-10-23 07:31:22 = UTC (rev 8746) @@ -22,10 +22,6 @@ *************************************************************************= *****/ package org.jboss.portal.test.portlet.jsr168.tck.windowstates; = -import org.jboss.portal.test.framework.driver.response.EndTestResponse; -import org.jboss.portal.test.framework.driver.response.FailureResponse; -import org.jboss.portal.test.framework.driver.http.response.InvokeGetRespo= nse; -import org.jboss.portal.test.framework.driver.DriverResponse; import org.jboss.portal.test.framework.portlet.PortletTest; import org.jboss.portal.test.framework.portlet.PortletTestDriver; import org.jboss.portal.test.framework.portlet.PortletTestSuite; @@ -33,7 +29,14 @@ import org.jboss.portal.test.framework.portlet.actions.PortletRenderTestAc= tion; import org.jboss.portal.test.portlet.framework.UTP1; import org.jboss.portal.test.portlet.framework.UTP2; +import org.jboss.unit.driver.DriverResponse; +import org.jboss.unit.driver.response.FailureResponse; +import org.jboss.unit.driver.response.EndTestResponse; +import org.jboss.unit.remote.driver.handler.http.response.InvokeGetRespons= e; = +import static org.jboss.unit.api.Assert.*; +import org.jboss.unit.Failure; + import javax.portlet.Portlet; import javax.portlet.PortletURL; import javax.portlet.RenderRequest; @@ -71,7 +74,7 @@ protected DriverResponse run(Portlet portlet, RenderRequest reque= st, RenderResponse response, PortletTestContext context) { //if portlet was invoked we will have failure - return new FailureResponse("Render wasn't expected"); + return new FailureResponse(Failure.createAssertionFailure("Ren= der wasn't expected")); } }); = Modified: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/port= let/jsr168/tck/windowstates/WindowStatesTestSuite.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/js= r168/tck/windowstates/WindowStatesTestSuite.java 2007-10-23 02:52:32 UTC (r= ev 8745) +++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/js= r168/tck/windowstates/WindowStatesTestSuite.java 2007-10-23 07:31:22 UTC (r= ev 8746) @@ -22,8 +22,6 @@ *************************************************************************= *****/ package org.jboss.portal.test.portlet.jsr168.tck.windowstates; = -import junit.framework.Test; - /** * @author Julien Viet * @author Boleslaw Daw= idowicz @@ -31,7 +29,7 @@ */ public class WindowStatesTestSuite { - public static Test suite() + public static void suite() { // TestSuite suite =3D new TestSuite("test-jsr168-windowstates.war"); // @@ -44,6 +42,5 @@ // // // return suite; - return null; } } Modified: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/port= let/navigation/StateStringTestCase.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/na= vigation/StateStringTestCase.java 2007-10-23 02:52:32 UTC (rev 8745) +++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/na= vigation/StateStringTestCase.java 2007-10-23 07:31:22 UTC (rev 8746) @@ -23,20 +23,24 @@ = package org.jboss.portal.test.portlet.navigation; = -import junit.framework.TestCase; import org.jboss.portal.portlet.PortletParametersStateString; +import org.jboss.unit.api.pojo.annotations.Test; = +import static org.jboss.unit.api.Assert.*; + /** * @author Chris Laprun * @version $Revision: 5976 $ * @since 2.4 (Apr 30, 2006) */ -public class StateStringTestCase extends TestCase +(a)Test +public class StateStringTestCase { public static final String NAME1 =3D "param1"; public static final String VALUE1 =3D "value1"; public static final String VALUE2 =3D "value2"; = + @Test public void testNavigationalState() throws Exception { PortletParametersStateString ns =3D new PortletParametersStateString= (); Modified: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/port= let/session/SessionSynchronizationTestCase.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/se= ssion/SessionSynchronizationTestCase.java 2007-10-23 02:52:32 UTC (rev 8745) +++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/se= ssion/SessionSynchronizationTestCase.java 2007-10-23 07:31:22 UTC (rev 8746) @@ -22,13 +22,11 @@ *************************************************************************= *****/ package org.jboss.portal.test.portlet.session; = -import junit.framework.TestCase; - /** * @author Julien Viet * @version $Revision: 5448 $ */ -public class SessionSynchronizationTestCase extends TestCase +public class SessionSynchronizationTestCase { = public SessionSynchronizationTestCase() @@ -36,12 +34,6 @@ System.out.println("SessionSynchronizationTestCase"); } = - public SessionSynchronizationTestCase(String string) - { - super(string); - System.out.println("SessionSynchronizationTestCase: " + string); - } - public void testA() { = Modified: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/port= let/state/AbstractStatefulPortletInvokerTestCase.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/st= ate/AbstractStatefulPortletInvokerTestCase.java 2007-10-23 02:52:32 UTC (re= v 8745) +++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/st= ate/AbstractStatefulPortletInvokerTestCase.java 2007-10-23 07:31:22 UTC (re= v 8746) @@ -22,7 +22,6 @@ *************************************************************************= *****/ package org.jboss.portal.test.portlet.state; = -import junit.framework.TestCase; import org.jboss.portal.common.util.CollectionBuilder; import org.jboss.portal.common.i18n.LocalizedString; import org.jboss.portal.common.value.StringValue; @@ -44,9 +43,10 @@ import org.jboss.portal.portlet.state.PropertyMap; import org.jboss.portal.portlet.state.SimplePropertyMap; import org.jboss.portal.portlet.state.PropertyContext; -import org.jboss.portal.test.portlet.state.ValueMapAssert; -import org.jboss.portal.test.portlet.state.PortletSupport; = +import static org.jboss.unit.api.Assert.*; +import org.jboss.unit.api.pojo.annotations.Test; + import java.util.Collections; import java.util.HashSet; import java.util.List; @@ -58,7 +58,7 @@ * @author Julien Viet * @version $Revision: 1.1 $ */ -public abstract class AbstractStatefulPortletInvokerTestCase extends TestC= ase +public abstract class AbstractStatefulPortletInvokerTestCase { = /** @@ -194,6 +194,7 @@ return createPOPRef(info); } = + @Test public void testCloneWithNullContext() throws Exception { try @@ -207,6 +208,7 @@ assertNoExistingState(); } = + @Test public void testCloneNonExistingPOP() throws Exception { PortletContext popCtx =3D createNonExistingPOPRef(); @@ -221,6 +223,7 @@ assertNoExistingState(); } = + @Test public void testCloneNonExistingCCP() throws Exception { PortletContext ccpCtx =3D createNonExistingLocalCCPRef(); @@ -235,6 +238,7 @@ assertNoExistingState(); } = +// @Test // public void testCloneInvalidCCP() throws Exception // { // PortletContext ccpCtx =3D getProducer().wrapCCP("InvalidPortletId"= ); @@ -249,6 +253,7 @@ // assertNoExistingState(); // } = + @Test public void testCloneInvalidPOP() throws Exception { PortletContext popCtx =3D createInvalidPOPRef(); @@ -263,6 +268,7 @@ assertNoExistingState(); } = + @Test public void testClonePortlet() throws Exception { PortletInfoSupport info =3D new PortletInfoSupport(); @@ -284,7 +290,7 @@ Portlet ccp1 =3D getPortlet(ccp1Ctx); LocalizedString abc =3D ccp1.getInfo().getMeta().getMetaValue(MetaIn= fo.DISPLAY_NAME); assertEquals("MyPortlet", abc.getString(Locale.ENGLISH, true)); - assertEquals(ccp1Ctx, ccp1.getContext()); + _assertEquals(ccp1Ctx, ccp1.getContext()); = // Update state PropertyChange[] changes =3D new PropertyChange[]{PropertyChange.new= Update("ghi", new StringValue("jkl"))}; @@ -306,6 +312,7 @@ assertEquals("MyPortlet", def.getString(Locale.ENGLISH, true)); } = + @Test public void testGetWithNullId() throws Exception { try @@ -318,6 +325,7 @@ } } = + @Test public void testGetNonExistingPOP() throws Exception { PortletContext pop =3D createNonExistingPOPRef(); @@ -331,6 +339,7 @@ } } = + @Test public void testGetNonExistingCCP() throws Exception { PortletContext ccpCtx =3D createNonExistingLocalCCPRef(); @@ -344,6 +353,7 @@ } } = + @Test public void testGetInvalidPOP() throws Exception { PortletContext popCtx =3D createInvalidPOPRef(); @@ -357,6 +367,7 @@ } } = +// @Test // public void testGetInvalidCCP() throws Exception // { // PortletContext ccpId =3D getProducer().wrapCCP("InvalidPortletId"); @@ -370,6 +381,7 @@ // } // } = + @Test public void testDestroyWithNullId() throws Exception { try @@ -382,6 +394,7 @@ } } = + @Test public void testDestroyPOP() throws Exception { PortletContext popCtx =3D createPOPRef(); @@ -391,6 +404,7 @@ assertEquals(getPortletId(popCtx), failure.getPortletId()); } = + @Test public void testDestroyCCP() throws Exception { PortletContext popCtx =3D createPOPRef(); @@ -400,6 +414,7 @@ assertNoExistingState(); } = +// @Test // public void testDestroyInvalidCCP() throws Exception // { // PortletContext ccpId =3D getProducer().wrapCCP("PortletId"); @@ -409,6 +424,7 @@ // assertEquals(ccpId.getId(), failure.getPortletId()); // } = + @Test public void testDestroyNonExistingCCP() throws Exception { PortletContext ccpCtx =3D createNonExistingLocalCCPRef(); @@ -418,6 +434,7 @@ assertEquals(getPortletId(ccpCtx), failure.getPortletId()); } = + @Test public void testGetPropertiesWithNullPortlet() throws Exception { try @@ -438,6 +455,7 @@ } } = + @Test public void testGetNonExistingPOPProperties() throws Exception { PortletContext popCtx =3D createNonExistingPOPRef(); @@ -459,6 +477,7 @@ } } = + @Test public void testGetInvalidPOPProperties() throws Exception { PortletContext popCtx =3D createInvalidPOPRef(); @@ -480,6 +499,7 @@ } } = + @Test public void testGetNonExistingCCPProperties() throws Exception { PortletContext ccpCtx =3D createNonExistingLocalCCPRef(); @@ -501,6 +521,7 @@ } } = +// @Test // public void testGetInvalidCCPProperties() throws Exception // { // PortletContext ccpId =3D getProducer().wrapCCP("InvalidPortletId"); @@ -522,6 +543,7 @@ // } // } = + @Test public void testGetPOPWithNullKeys() throws Exception { PortletContext popCtx =3D createPOPRef(); @@ -535,6 +557,7 @@ } } = + @Test public void testGetCCPWithNullKeys() throws Exception { PortletContext ccpCtx =3D createLocalCCPRef(); @@ -548,6 +571,7 @@ } } = + @Test public void testGetPOPProperties() throws Exception { PortletInfoSupport info =3D new PortletInfoSupport(); @@ -569,6 +593,7 @@ ValueMapAssert.assertEquals(expectedProps, props); } = + @Test public void testGetCCPProperties() throws Exception { PortletInfoSupport info =3D new PortletInfoSupport(); @@ -603,6 +628,7 @@ ValueMapAssert.assertEquals(expectedProps, props); } = + @Test public void testSetPropertiesWithNullId() throws Exception { try @@ -615,6 +641,7 @@ } } = + @Test public void testSetPropertiesWithNullProperties() throws Exception { PortletContext ccpCtx =3D createLocalCCPRef(); @@ -628,6 +655,7 @@ } } = + @Test public void testSetPOPProperties() throws Exception { PortletContext popCtx =3D createPOPRef(); @@ -641,6 +669,7 @@ } } = + @Test public void testSetNonExistingCCPProperties() throws Exception { PortletContext ccpCtx =3D createNonExistingLocalCCPRef(); @@ -654,6 +683,7 @@ } } = + @Test public void testSetCCPProperties() throws Exception { PortletInfoSupport info =3D new PortletInfoSupport(); @@ -708,6 +738,7 @@ ValueMapAssert.assertEquals(expectedProps, ccpProps); } = + @Test public void testInvokeCloneBeforeWriteWithUpdate() throws Exception { PortletInfoSupport info =3D new PortletInfoSupport(); @@ -738,6 +769,7 @@ ValueMapAssert.assertEquals(expectedProps, blah); } = + @Test public void testInvokeReadOnlyWithUpdate() throws Exception { final Boolean[] ise =3D {Boolean.FALSE}; @@ -773,6 +805,7 @@ assertEquals(Boolean.TRUE, ise[0]); } = + @Test public void testInvokeReadWriteWithUpdate() throws Exception { PortletInfoSupport info =3D new PortletInfoSupport(); @@ -806,7 +839,7 @@ ValueMapAssert.assertEquals(expectedProps, blah); } = - private void assertEquals(PortletContext expected, PortletContext actua= l) + private void _assertEquals(PortletContext expected, PortletContext actu= al) { if (expected =3D=3D null) { Modified: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/port= let/state/ConsumerStatefulPortletInvokerTestCase.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/st= ate/ConsumerStatefulPortletInvokerTestCase.java 2007-10-23 02:52:32 UTC (re= v 8745) +++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/st= ate/ConsumerStatefulPortletInvokerTestCase.java 2007-10-23 07:31:22 UTC (re= v 8746) @@ -41,6 +41,9 @@ import org.jboss.portal.portlet.state.producer.ProducerPortletInvoker; import org.jboss.portal.common.value.Value; = +import static org.jboss.unit.api.Assert.*; +import org.jboss.unit.api.pojo.annotations.Create; + import java.util.Collections; import java.util.List; import java.util.Set; @@ -81,7 +84,8 @@ /** . */ protected StateConverter stateConverter; = - protected void setUp() throws Exception + @Create + public void setUp() throws Exception { consumer =3D new ConsumerPortletInvoker(); consumerPersistenceManager =3D new ConsumerPersistenceManagerService= (); Modified: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/port= let/state/ProducerStatefulPortletInvokerTestCase.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/st= ate/ProducerStatefulPortletInvokerTestCase.java 2007-10-23 02:52:32 UTC (re= v 8745) +++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/st= ate/ProducerStatefulPortletInvokerTestCase.java 2007-10-23 07:31:22 UTC (re= v 8746) @@ -39,6 +39,9 @@ import org.jboss.portal.portlet.support.info.PortletInfoSupport; import org.jboss.portal.common.value.Value; = +import static org.jboss.unit.api.Assert.*; +import org.jboss.unit.api.pojo.annotations.Create; + import java.util.Collections; import java.util.List; import java.util.Set; @@ -73,7 +76,8 @@ /** . */ protected StateConverter stateConverter; = - protected void setUp() throws Exception + @Create + public void create() throws Exception { producer =3D new ProducerPortletInvoker(); container =3D new PortletInvokerSupport(); Modified: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/port= let/state/StateConverterV0TestCase.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/st= ate/StateConverterV0TestCase.java 2007-10-23 02:52:32 UTC (rev 8745) +++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/st= ate/StateConverterV0TestCase.java 2007-10-23 07:31:22 UTC (rev 8746) @@ -22,7 +22,6 @@ *************************************************************************= *****/ package org.jboss.portal.test.portlet.state; = -import junit.framework.TestCase; import org.jboss.portal.common.value.StringValue; import org.jboss.portal.portlet.impl.state.StateConverterV0; import org.jboss.portal.portlet.state.PropertyMap; @@ -30,17 +29,21 @@ import org.jboss.portal.portlet.state.StateConversionException; import org.jboss.portal.portlet.state.StateConverter; import org.jboss.portal.portlet.state.producer.PortletState; -import org.jboss.portal.test.portlet.state.ValueMapAssert; = +import static org.jboss.unit.api.Assert.*; +import org.jboss.unit.api.pojo.annotations.Test; + /** * @author Julien Viet * @version $Revision: 1.1 $ */ -public class StateConverterV0TestCase extends TestCase +(a)Test +public class StateConverterV0TestCase { = private final StateConverter converter =3D new StateConverterV0(); = + @Test public void testIAE() throws StateConversionException { try @@ -61,6 +64,7 @@ } } = + @Test public void testAlteredMagic() throws StateConversionException { byte[] bytes =3D converter.marshall(new PortletState("foo")); @@ -78,6 +82,7 @@ } } = + @Test public void testBadVersionNumber() throws StateConversionException { byte[] bytes =3D converter.marshall(new PortletState("foo")); @@ -92,6 +97,7 @@ } } = + @Test public void testWorks() throws Exception { assertWorks(new PortletState("foo")); Modified: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/port= let/state/ValueMapAssert.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/st= ate/ValueMapAssert.java 2007-10-23 02:52:32 UTC (rev 8745) +++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/st= ate/ValueMapAssert.java 2007-10-23 07:31:22 UTC (rev 8746) @@ -22,18 +22,19 @@ *************************************************************************= *****/ package org.jboss.portal.test.portlet.state; = -import junit.framework.Assert; import org.jboss.portal.common.value.Value; import org.jboss.portal.portlet.state.PropertyMap; = import java.util.HashSet; import java.util.Iterator; = +import org.jboss.unit.api.Assert; + /** * @author Julien Viet * @version $Revision: 5448 $ */ -public class ValueMapAssert extends Assert +public class ValueMapAssert { public static void assertEquals(PropertyMap vm1, PropertyMap vm2) { @@ -41,22 +42,22 @@ { if (vm2 !=3D null) { - fail("Value map should be null"); + Assert.fail("Value map should be null"); } } else { if (vm2 =3D=3D null) { - fail("Value map should not be null"); + Assert.fail("Value map should not be null"); } - assertEquals("Value maps don't have the same keys", new HashSet(v= m1.keySet()), new HashSet(vm2.keySet())); + Assert.assertEquals("Value maps don't have the same keys", new Ha= shSet(vm1.keySet()), new HashSet(vm2.keySet())); for (Iterator i =3D vm1.keySet().iterator(); i.hasNext();) { String key =3D (String)i.next(); Value v1 =3D vm1.getProperty(key); Value v2 =3D vm2.getProperty(key); - assertEquals("Values for key " + key + " are not equals", v1, = v2); + Assert.assertEquals("Values for key " + key + " are not equals= ", v1, v2); } } } Added: modules/portlet/trunk/portlet/src/resources/test/local-jboss-unit.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/portlet/trunk/portlet/src/resources/test/local-jboss-unit.xml = (rev 0) +++ modules/portlet/trunk/portlet/src/resources/test/local-jboss-unit.xml 2= 007-10-23 07:31:22 UTC (rev 8746) @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Added: modules/portlet/trunk/portlet/src/resources/test/remote-jboss-unit.x= ml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/portlet/trunk/portlet/src/resources/test/remote-jboss-unit.xml = (rev 0) +++ modules/portlet/trunk/portlet/src/resources/test/remote-jboss-unit.xml = 2007-10-23 07:31:22 UTC (rev 8746) @@ -0,0 +1,157 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Modified: modules/portlet/trunk/test/build.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/portlet/trunk/test/build.xml 2007-10-23 02:52:32 UTC (rev 8745) +++ modules/portlet/trunk/test/build.xml 2007-10-23 07:31:22 UTC (rev 8746) @@ -98,7 +98,6 @@ - = @@ -158,26 +157,93 @@ = + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + = - - - - - - - - - - - - + + + = + + + + + + + + + + + + @@ -187,25 +253,28 @@ = + + - - + + = - + + + = - - - - - - - - - - - - + + + + + + + + + + + = @@ -279,9 +348,10 @@ wait=3D"${cargo.wait}"> - - + + + @@ -357,18 +427,19 @@ wait=3D"${cargo.wait}"> + + - - + @@ -424,331 +495,110 @@ = = - - + + + = - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + = - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + = - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + = - - + + + + = - - - - - - + + + + + + + + + + + - + + + + + + + + - - - - - - - - - - + = + + = - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + - - + + + + + - - - - + - - - - - + + - - + + + + + + = Modified: modules/portlet/trunk/test/src/main/org/jboss/portal/portlet/test= /PortletApplicationDeployer.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/portlet/trunk/test/src/main/org/jboss/portal/portlet/test/Portl= etApplicationDeployer.java 2007-10-23 02:52:32 UTC (rev 8745) +++ modules/portlet/trunk/test/src/main/org/jboss/portal/portlet/test/Portl= etApplicationDeployer.java 2007-10-23 07:31:22 UTC (rev 8746) @@ -77,6 +77,19 @@ /** . */ private final Map registrationContextMap =3D new HashMap(); = + /** . */ + private Object driver; + + public Object getDriver() + { + return driver; + } + + public void setDriver(Object driver) + { + this.driver =3D driver; + } + public PortletApplicationRegistry getRegistry() { return registry; @@ -116,6 +129,10 @@ = private void add(WebApp webApp) { + // Set the driver for the web app + webApp.getServletContext().setAttribute("TestDriverServer", driver); + + // PortletApplicationMetaData metaData =3D buildPortletApplicationMetaD= ata(webApp); if (metaData !=3D null) { Modified: modules/portlet/trunk/test/src/main/org/jboss/portal/portlet/test= /PortletApplicationDeployment.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/portlet/trunk/test/src/main/org/jboss/portal/portlet/test/Portl= etApplicationDeployment.java 2007-10-23 02:52:32 UTC (rev 8745) +++ modules/portlet/trunk/test/src/main/org/jboss/portal/portlet/test/Portl= etApplicationDeployment.java 2007-10-23 07:31:22 UTC (rev 8746) @@ -45,6 +45,9 @@ import org.jboss.beans.metadata.plugins.AbstractPropertyMetaData; import org.jboss.beans.metadata.plugins.AbstractInstallMetaData; import org.jboss.beans.metadata.plugins.ThisValueMetaData; +import org.jboss.beans.metadata.spi.PropertyMetaData; +import org.jboss.beans.metadata.spi.ParameterMetaData; +import org.jboss.beans.metadata.spi.InstallMetaData; import org.apache.log4j.Logger; = import javax.servlet.ServletContext; @@ -109,23 +112,23 @@ bmd.setConstructor(ctormd); bmd.setStart(new AbstractLifecycleMetaData("start")); bmd.setStop(new AbstractLifecycleMetaData("stop")); - bmd.setProperties(Collections.singleton(new AbstractPropertyMetaD= ata("application", new AbstractDependencyValueMetaData(id)))); + bmd.setProperties(Collections.singleton((PropertyMetaData)new Abs= tractPropertyMetaData("application", new AbstractDependencyValueMetaData(id= )))); AbstractInstallMetaData deployerinstallmd =3D new AbstractInstall= MetaData(); deployerinstallmd.setBean("PortletApplicationDeployer"); - deployerinstallmd.setParameters(Collections.singletonList(new Abs= tractParameterMetaData(new ThisValueMetaData()))); + deployerinstallmd.setParameters(Collections.singletonList((Parame= terMetaData)new AbstractParameterMetaData(new ThisValueMetaData()))); deployerinstallmd.setMethodName("installPortletContainer"); AbstractInstallMetaData applicationinstallmd =3D new AbstractInst= allMetaData(); applicationinstallmd.setBean(id); - applicationinstallmd.setParameters(Collections.singletonList(new = AbstractParameterMetaData(new ThisValueMetaData()))); + applicationinstallmd.setParameters(Collections.singletonList((Par= ameterMetaData)new AbstractParameterMetaData(new ThisValueMetaData()))); applicationinstallmd.setMethodName("addContainer"); bmd.setInstalls(new CollectionBuilder().add(deployerinstallmd).ad= d(applicationinstallmd).toArrayList()); AbstractInstallMetaData deployeruninstallmd =3D new AbstractInsta= llMetaData(); deployeruninstallmd.setBean("PortletApplicationDeployer"); - deployeruninstallmd.setParameters(Collections.singletonList(new A= bstractParameterMetaData(new ThisValueMetaData()))); + deployeruninstallmd.setParameters(Collections.singletonList((Para= meterMetaData)new AbstractParameterMetaData(new ThisValueMetaData()))); deployeruninstallmd.setMethodName("uninstallPortletContainer"); AbstractInstallMetaData applicationuninstallmd =3D new AbstractIn= stallMetaData(); applicationuninstallmd.setBean(id); - applicationuninstallmd.setParameters(Collections.singletonList(ne= w AbstractParameterMetaData(new ThisValueMetaData()))); + applicationuninstallmd.setParameters(Collections.singletonList((P= arameterMetaData)new AbstractParameterMetaData(new ThisValueMetaData()))); applicationuninstallmd.setMethodName("removeContainer"); bmd.setUninstalls(new CollectionBuilder().add(deployeruninstallmd= ).add(applicationuninstallmd).toArrayList()); try @@ -154,14 +157,14 @@ bmd.setStop(new AbstractLifecycleMetaData("stop")); AbstractInstallMetaData installmd =3D new AbstractInstallMetaData(); installmd.setBean("PortletApplicationDeployer"); - installmd.setParameters(Collections.singletonList(new AbstractParame= terMetaData(new ThisValueMetaData()))); + installmd.setParameters(Collections.singletonList((ParameterMetaData= )new AbstractParameterMetaData(new ThisValueMetaData()))); installmd.setMethodName("installPortletApplication"); - bmd.setInstalls(Collections.singletonList(installmd)); + bmd.setInstalls(Collections.singletonList((InstallMetaData)installmd= )); AbstractInstallMetaData uninstallmd =3D new AbstractInstallMetaData(= ); uninstallmd.setBean("PortletApplicationDeployer"); - uninstallmd.setParameters(Collections.singletonList(new AbstractPara= meterMetaData(new ThisValueMetaData()))); + uninstallmd.setParameters(Collections.singletonList((ParameterMetaDa= ta)new AbstractParameterMetaData(new ThisValueMetaData()))); uninstallmd.setMethodName("uninstallPortletApplication"); - bmd.setUninstalls(Collections.singletonList(uninstallmd)); + bmd.setUninstalls(Collections.singletonList((InstallMetaData)uninsta= llmd)); = // try Modified: modules/portlet/trunk/test/src/main/org/jboss/portal/portlet/test= /StringCodecTestCase.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/portlet/trunk/test/src/main/org/jboss/portal/portlet/test/Strin= gCodecTestCase.java 2007-10-23 02:52:32 UTC (rev 8745) +++ modules/portlet/trunk/test/src/main/org/jboss/portal/portlet/test/Strin= gCodecTestCase.java 2007-10-23 07:31:22 UTC (rev 8746) @@ -22,17 +22,20 @@ *************************************************************************= *****/ package org.jboss.portal.portlet.test; = -import junit.framework.TestCase; +import org.jboss.unit.api.pojo.annotations.Test; = +import static org.jboss.unit.api.Assert.*; + /** * @author Julien Viet * @version $Revision: 1.1 $ */ -public class StringCodecTestCase extends TestCase +public class StringCodecTestCase { = private static final char EURO_CHAR =3D '\u20AC'; = + @Test public void testA() { = @@ -46,6 +49,7 @@ = } = + @Test public void testB() { assertEquals("ABCDEFGHIJKLMNOPQRSTUVWXYZ", StringCodec.decode(String= Codec.encode("ABCDEFGHIJKLMNOPQRSTUVWXYZ"))); Modified: modules/portlet/trunk/test/src/main/org/jboss/portal/portlet/test= /deployment/UnmarshallerTestCase.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/portlet/trunk/test/src/main/org/jboss/portal/portlet/test/deplo= yment/UnmarshallerTestCase.java 2007-10-23 02:52:32 UTC (rev 8745) +++ modules/portlet/trunk/test/src/main/org/jboss/portal/portlet/test/deplo= yment/UnmarshallerTestCase.java 2007-10-23 07:31:22 UTC (rev 8746) @@ -22,7 +22,6 @@ *************************************************************************= *****/ package org.jboss.portal.portlet.test.deployment; = -import junit.framework.TestCase; import org.jboss.portal.common.transaction.Transactions; import org.jboss.portal.common.net.URLTools; import org.jboss.portal.portlet.TransportGuarantee; @@ -40,13 +39,17 @@ import java.net.URL; import java.util.Locale; = +import static org.jboss.unit.api.Assert.*; +import org.jboss.unit.api.pojo.annotations.Test; + /** * @author Julien Viet * @version $Revision: 7379 $ */ -public class UnmarshallerTestCase extends TestCase +public class UnmarshallerTestCase { = + @Test public void testJBossPortletXML() throws Exception { URL jbossPortletXML =3D Thread.currentThread().getContextClassLoader= ().getResource("test/deployment/jboss-portlet.xml"); @@ -91,6 +94,7 @@ assertTrue(remotable.booleanValue()); } = + @Test public void testPortletXML() throws Exception { URL portletXML =3D Thread.currentThread().getContextClassLoader().ge= tResource("test/deployment/portlet.xml"); Modified: modules/portlet/trunk/test/src/main/org/jboss/portal/portlet/test= /url/DecoderTestCase.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/portlet/trunk/test/src/main/org/jboss/portal/portlet/test/url/D= ecoderTestCase.java 2007-10-23 02:52:32 UTC (rev 8745) +++ modules/portlet/trunk/test/src/main/org/jboss/portal/portlet/test/url/D= ecoderTestCase.java 2007-10-23 07:31:22 UTC (rev 8746) @@ -22,26 +22,30 @@ *************************************************************************= *****/ package org.jboss.portal.portlet.test.url; = -import junit.framework.TestCase; import org.jboss.portal.common.util.ParameterMap; -import org.jboss.portal.common.junit.ExtendedAssert; = import java.util.ArrayList; = +import static org.jboss.unit.api.Assert.*; +import org.jboss.unit.api.pojo.annotations.Create; +import org.jboss.unit.api.pojo.annotations.Test; + /** * @author Julien Viet * @version $Revision: 1.1 $ */ -public class DecoderTestCase extends TestCase +public class DecoderTestCase { = Tester tester; = - protected void setUp() throws Exception + @Create + public void setUp() throws Exception { tester =3D new Tester(); } = + @Test public void testNoMeta() { tester.assertActual(0); @@ -59,12 +63,14 @@ tester.checkAndReset(); } = + @Test public void testNoMetaCorruption() { tester.parameter("action", "a").assertFailed().checkAndReset(); tester.parameter("action", "1").assertFailed().checkAndReset(); } = + @Test public void testOneMeta() { tester.builder.addMetaParameter("m1"); @@ -125,6 +131,7 @@ tester.checkAndReset(); } = + @Test public void testOneMetaCorruption() { tester.builder.addMetaParameter("m1"); @@ -139,6 +146,7 @@ tester.parameter("action", "10").parameter("m1", "foo").assertFailed= ().checkAndReset(); } = + @Test public void testTwoMeta() { tester.builder.addMetaParameter("m1"); @@ -344,7 +352,7 @@ public void doAssert() { assertFalse(failed); - ExtendedAssert.assertEquals(values, actualParameters.getVal= ues(name)); + assertEquals(values, actualParameters.getValues(name)); } }); return this; @@ -368,7 +376,7 @@ public void doAssert() { assertFalse(failed); - ExtendedAssert.assertEquals(values, metaParameters.getValue= s(name)); + assertEquals(values, metaParameters.getValues(name)); } }); return this; Modified: modules/portlet/trunk/test/src/main/org/jboss/portal/portlet/test= /url/EncoderTestCase.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/portlet/trunk/test/src/main/org/jboss/portal/portlet/test/url/E= ncoderTestCase.java 2007-10-23 02:52:32 UTC (rev 8745) +++ modules/portlet/trunk/test/src/main/org/jboss/portal/portlet/test/url/E= ncoderTestCase.java 2007-10-23 07:31:22 UTC (rev 8746) @@ -22,43 +22,48 @@ *************************************************************************= *****/ package org.jboss.portal.portlet.test.url; = -import junit.framework.TestCase; import org.jboss.portal.common.util.ParameterMap; -import org.jboss.portal.common.junit.ExtendedAssert; = +import static org.jboss.unit.api.Assert.*; +import org.jboss.unit.api.pojo.annotations.Create; +import org.jboss.unit.api.pojo.annotations.Test; + /** * @author Julien Viet * @version $Revision: 1.1 $ */ -public class EncoderTestCase extends TestCase +public class EncoderTestCase { = Tester tester; = - protected void setUp() throws Exception + @Create + public void setUp() throws Exception { tester =3D new Tester(); } = + @Test public void testEncodeNoMeta() { ParameterMap result =3D tester.encode(); assertEquals(1, result.size()); - ExtendedAssert.assertEquals(new String[]{"0"}, result.getValues("act= ion")); + assertEquals(new String[]{"0"}, result.getValues("action")); = // tester.actual("action", "foo"); result =3D tester.encode(); assertEquals(1, result.size()); - ExtendedAssert.assertEquals(new String[]{"0","foo"}, result.getValue= s("action")); + assertEquals(new String[]{"0","foo"}, result.getValues("action")); = // = tester.meta("action", "foo"); result =3D tester.encode(); assertEquals(1, result.size()); - ExtendedAssert.assertEquals(new String[]{"0"}, result.getValues("act= ion")); + assertEquals(new String[]{"0"}, result.getValues("action")); } = + @Test public void testEncodeOneMeta() { tester.meta("m1"); @@ -66,30 +71,31 @@ // ParameterMap result =3D tester.encode(); assertEquals(1, result.size()); - ExtendedAssert.assertEquals(new String[]{"0"}, result.getValues("act= ion")); + assertEquals(new String[]{"0"}, result.getValues("action")); = // tester.meta("m1", "foo"); result =3D tester.encode(); assertEquals(2, result.size()); - ExtendedAssert.assertEquals(new String[]{"1"}, result.getValues("act= ion")); - ExtendedAssert.assertEquals(new String[]{"foo"}, result.getValues("m= 1")); + assertEquals(new String[]{"1"}, result.getValues("action")); + assertEquals(new String[]{"foo"}, result.getValues("m1")); = // tester.actual("m1", "foo"); result =3D tester.encode(); assertEquals(2, result.size()); - ExtendedAssert.assertEquals(new String[]{"0"}, result.getValues("act= ion")); - ExtendedAssert.assertEquals(new String[]{"foo"}, result.getValues("m= 1")); + assertEquals(new String[]{"0"}, result.getValues("action")); + assertEquals(new String[]{"foo"}, result.getValues("m1")); = // tester.meta("m1", "bar").actual("m1", "foo"); result =3D tester.encode(); assertEquals(2, result.size()); - ExtendedAssert.assertEquals(new String[]{"1"}, result.getValues("act= ion")); - ExtendedAssert.assertEquals(new String[]{"bar","foo"}, result.getVal= ues("m1")); + assertEquals(new String[]{"1"}, result.getValues("action")); + assertEquals(new String[]{"bar","foo"}, result.getValues("m1")); } = + @Test public void testEncodeTwoMeta() { tester.meta("m1"); @@ -100,464 +106,464 @@ // ParameterMap result =3D tester.encode(); assertEquals(1, result.size()); - ExtendedAssert.assertEquals(new String[]{"0"}, result.getValues("act= ion")); + assertEquals(new String[]{"0"}, result.getValues("action")); = // result =3D tester.meta("m1", "foo").encode(); assertEquals(2, result.size()); - ExtendedAssert.assertEquals(new String[]{"10"}, result.getValues("ac= tion")); - ExtendedAssert.assertEquals(new String[]{"foo"}, result.getValues("m= 1")); + assertEquals(new String[]{"10"}, result.getValues("action")); + assertEquals(new String[]{"foo"}, result.getValues("m1")); = // result =3D tester.meta("m2", "foo").encode(); assertEquals(2, result.size()); - ExtendedAssert.assertEquals(new String[]{"1"}, result.getValues("act= ion")); - ExtendedAssert.assertEquals(new String[]{"foo"}, result.getValues("m= 2")); + assertEquals(new String[]{"1"}, result.getValues("action")); + assertEquals(new String[]{"foo"}, result.getValues("m2")); = // result =3D tester.meta("m1", "foo").meta("m2", "bar").encode(); assertEquals(3, result.size()); - ExtendedAssert.assertEquals(new String[]{"11"}, result.getValues("ac= tion")); - ExtendedAssert.assertEquals(new String[]{"foo"}, result.getValues("m= 1")); - ExtendedAssert.assertEquals(new String[]{"bar"}, result.getValues("m= 2")); + assertEquals(new String[]{"11"}, result.getValues("action")); + assertEquals(new String[]{"foo"}, result.getValues("m1")); + assertEquals(new String[]{"bar"}, result.getValues("m2")); = // result =3D tester.meta("m1", "foo").meta("m3", "zuu").encode(); assertEquals(2, result.size()); - ExtendedAssert.assertEquals(new String[]{"10"}, result.getValues("ac= tion")); - ExtendedAssert.assertEquals(new String[]{"foo"}, result.getValues("m= 1")); + assertEquals(new String[]{"10"}, result.getValues("action")); + assertEquals(new String[]{"foo"}, result.getValues("m1")); = // result =3D tester.meta("m3", "zuu").encode(); assertEquals(1, result.size()); - ExtendedAssert.assertEquals(new String[]{"0"}, result.getValues("act= ion")); + assertEquals(new String[]{"0"}, result.getValues("action")); = // result =3D tester.meta("m2", "foo").meta("m3", "zuu").encode(); assertEquals(2, result.size()); - ExtendedAssert.assertEquals(new String[]{"1"}, result.getValues("act= ion")); - ExtendedAssert.assertEquals(new String[]{"foo"}, result.getValues("m= 2")); + assertEquals(new String[]{"1"}, result.getValues("action")); + assertEquals(new String[]{"foo"}, result.getValues("m2")); = // result =3D tester.meta("m1", "foo").meta("m2", "bar").meta("m2", "ba= r").encode(); assertEquals(3, result.size()); - ExtendedAssert.assertEquals(new String[]{"11"}, result.getValues("ac= tion")); - ExtendedAssert.assertEquals(new String[]{"foo"}, result.getValues("m= 1")); - ExtendedAssert.assertEquals(new String[]{"bar"}, result.getValues("m= 2")); + assertEquals(new String[]{"11"}, result.getValues("action")); + assertEquals(new String[]{"foo"}, result.getValues("m1")); + assertEquals(new String[]{"bar"}, result.getValues("m2")); = // {m1} actual parameter = // result =3D tester.actual("m1", "a").encode(); assertEquals(2, result.size()); - ExtendedAssert.assertEquals(new String[]{"0"}, result.getValues("act= ion")); - ExtendedAssert.assertEquals(new String[]{"a"}, result.getValues("m1"= )); + assertEquals(new String[]{"0"}, result.getValues("action")); + assertEquals(new String[]{"a"}, result.getValues("m1")); = // result =3D tester.actual("m1", "a").meta("m1", "foo").encode(); assertEquals(2, result.size()); - ExtendedAssert.assertEquals(new String[]{"10"}, result.getValues("ac= tion")); - ExtendedAssert.assertEquals(new String[]{"foo","a"}, result.getValue= s("m1")); + assertEquals(new String[]{"10"}, result.getValues("action")); + assertEquals(new String[]{"foo","a"}, result.getValues("m1")); = // result =3D tester.actual("m1", "a").meta("m2", "foo").encode(); assertEquals(3, result.size()); - ExtendedAssert.assertEquals(new String[]{"1"}, result.getValues("act= ion")); - ExtendedAssert.assertEquals(new String[]{"a"}, result.getValues("m1"= )); - ExtendedAssert.assertEquals(new String[]{"foo"}, result.getValues("m= 2")); + assertEquals(new String[]{"1"}, result.getValues("action")); + assertEquals(new String[]{"a"}, result.getValues("m1")); + assertEquals(new String[]{"foo"}, result.getValues("m2")); = // result =3D tester.actual("m1", "a").meta("m1", "foo").meta("m2", "ba= r").encode(); assertEquals(3, result.size()); - ExtendedAssert.assertEquals(new String[]{"11"}, result.getValues("ac= tion")); - ExtendedAssert.assertEquals(new String[]{"foo","a"}, result.getValue= s("m1")); - ExtendedAssert.assertEquals(new String[]{"bar"}, result.getValues("m= 2")); + assertEquals(new String[]{"11"}, result.getValues("action")); + assertEquals(new String[]{"foo","a"}, result.getValues("m1")); + assertEquals(new String[]{"bar"}, result.getValues("m2")); = // result =3D tester.actual("m1", "a").meta("m3", "zuu").encode(); assertEquals(2, result.size()); - ExtendedAssert.assertEquals(new String[]{"0"}, result.getValues("act= ion")); - ExtendedAssert.assertEquals(new String[]{"a"}, result.getValues("m1"= )); + assertEquals(new String[]{"0"}, result.getValues("action")); + assertEquals(new String[]{"a"}, result.getValues("m1")); = // result =3D tester.actual("m1", "a").meta("m1", "foo").meta("m3", "zu= u").encode(); assertEquals(2, result.size()); - ExtendedAssert.assertEquals(new String[]{"10"}, result.getValues("ac= tion")); - ExtendedAssert.assertEquals(new String[]{"foo","a"}, result.getValue= s("m1")); + assertEquals(new String[]{"10"}, result.getValues("action")); + assertEquals(new String[]{"foo","a"}, result.getValues("m1")); = // result =3D tester.actual("m1", "a").meta("m2", "foo").meta("m3", "zu= u").encode(); assertEquals(3, result.size()); - ExtendedAssert.assertEquals(new String[]{"1"}, result.getValues("act= ion")); - ExtendedAssert.assertEquals(new String[]{"a"}, result.getValues("m1"= )); - ExtendedAssert.assertEquals(new String[]{"foo"}, result.getValues("m= 2")); + assertEquals(new String[]{"1"}, result.getValues("action")); + assertEquals(new String[]{"a"}, result.getValues("m1")); + assertEquals(new String[]{"foo"}, result.getValues("m2")); = // result =3D tester.actual("m1", "a").meta("m1", "foo").meta("m2", "ba= r").meta("m3", "zuu").encode(); assertEquals(3, result.size()); - ExtendedAssert.assertEquals(new String[]{"11"}, result.getValues("ac= tion")); - ExtendedAssert.assertEquals(new String[]{"foo","a"}, result.getValue= s("m1")); - ExtendedAssert.assertEquals(new String[]{"bar"}, result.getValues("m= 2")); + assertEquals(new String[]{"11"}, result.getValues("action")); + assertEquals(new String[]{"foo","a"}, result.getValues("m1")); + assertEquals(new String[]{"bar"}, result.getValues("m2")); = // {m2} actual parameter = // result =3D tester.actual("m2", "b").encode(); assertEquals(2, result.size()); - ExtendedAssert.assertEquals(new String[]{"0"}, result.getValues("act= ion")); - ExtendedAssert.assertEquals(new String[]{"b"}, result.getValues("m2"= )); + assertEquals(new String[]{"0"}, result.getValues("action")); + assertEquals(new String[]{"b"}, result.getValues("m2")); = // result =3D tester.actual("m2", "b").meta("m1", "foo").encode(); assertEquals(3, result.size()); - ExtendedAssert.assertEquals(new String[]{"10"}, result.getValues("ac= tion")); - ExtendedAssert.assertEquals(new String[]{"foo"}, result.getValues("m= 1")); - ExtendedAssert.assertEquals(new String[]{"b"}, result.getValues("m2"= )); + assertEquals(new String[]{"10"}, result.getValues("action")); + assertEquals(new String[]{"foo"}, result.getValues("m1")); + assertEquals(new String[]{"b"}, result.getValues("m2")); = // result =3D tester.actual("m2", "b").meta("m2", "foo").encode(); assertEquals(2, result.size()); - ExtendedAssert.assertEquals(new String[]{"1"}, result.getValues("act= ion")); - ExtendedAssert.assertEquals(new String[]{"foo","b"}, result.getValue= s("m2")); + assertEquals(new String[]{"1"}, result.getValues("action")); + assertEquals(new String[]{"foo","b"}, result.getValues("m2")); = // result =3D tester.actual("m2", "b").meta("m1", "foo").meta("m2", "ba= r").encode(); assertEquals(3, result.size()); - ExtendedAssert.assertEquals(new String[]{"11"}, result.getValues("ac= tion")); - ExtendedAssert.assertEquals(new String[]{"foo"}, result.getValues("m= 1")); - ExtendedAssert.assertEquals(new String[]{"bar","b"}, result.getValue= s("m2")); + assertEquals(new String[]{"11"}, result.getValues("action")); + assertEquals(new String[]{"foo"}, result.getValues("m1")); + assertEquals(new String[]{"bar","b"}, result.getValues("m2")); = // result =3D tester.actual("m2", "b").meta("m3", "zuu").encode(); assertEquals(2, result.size()); - ExtendedAssert.assertEquals(new String[]{"0"}, result.getValues("act= ion")); - ExtendedAssert.assertEquals(new String[]{"b"}, result.getValues("m2"= )); + assertEquals(new String[]{"0"}, result.getValues("action")); + assertEquals(new String[]{"b"}, result.getValues("m2")); = // result =3D tester.actual("m2", "b").meta("m1", "foo").meta("m3", "zu= u").encode(); assertEquals(3, result.size()); - ExtendedAssert.assertEquals(new String[]{"10"}, result.getValues("ac= tion")); - ExtendedAssert.assertEquals(new String[]{"foo"}, result.getValues("m= 1")); - ExtendedAssert.assertEquals(new String[]{"b"}, result.getValues("m2"= )); + assertEquals(new String[]{"10"}, result.getValues("action")); + assertEquals(new String[]{"foo"}, result.getValues("m1")); + assertEquals(new String[]{"b"}, result.getValues("m2")); = // result =3D tester.actual("m2", "b").meta("m2", "foo").meta("m3", "zu= u").encode(); assertEquals(2, result.size()); - ExtendedAssert.assertEquals(new String[]{"1"}, result.getValues("act= ion")); - ExtendedAssert.assertEquals(new String[]{"foo","b"}, result.getValue= s("m2")); + assertEquals(new String[]{"1"}, result.getValues("action")); + assertEquals(new String[]{"foo","b"}, result.getValues("m2")); = // result =3D tester.actual("m2", "b").meta("m1", "foo").meta("m2", "ba= r").meta("m3", "zuu").encode(); assertEquals(3, result.size()); - ExtendedAssert.assertEquals(new String[]{"11"}, result.getValues("ac= tion")); - ExtendedAssert.assertEquals(new String[]{"foo"}, result.getValues("m= 1")); - ExtendedAssert.assertEquals(new String[]{"bar","b"}, result.getValue= s("m2")); + assertEquals(new String[]{"11"}, result.getValues("action")); + assertEquals(new String[]{"foo"}, result.getValues("m1")); + assertEquals(new String[]{"bar","b"}, result.getValues("m2")); = // {m3} actual parameter = // result =3D tester.actual("m3", "c").encode(); assertEquals(2, result.size()); - ExtendedAssert.assertEquals(new String[]{"0"}, result.getValues("act= ion")); - ExtendedAssert.assertEquals(new String[]{"c"}, result.getValues("m3"= )); + assertEquals(new String[]{"0"}, result.getValues("action")); + assertEquals(new String[]{"c"}, result.getValues("m3")); = // result =3D tester.actual("m3", "c").meta("m1", "foo").encode(); assertEquals(3, result.size()); - ExtendedAssert.assertEquals(new String[]{"10"}, result.getValues("ac= tion")); - ExtendedAssert.assertEquals(new String[]{"foo"}, result.getValues("m= 1")); - ExtendedAssert.assertEquals(new String[]{"c"}, result.getValues("m3"= )); + assertEquals(new String[]{"10"}, result.getValues("action")); + assertEquals(new String[]{"foo"}, result.getValues("m1")); + assertEquals(new String[]{"c"}, result.getValues("m3")); = // result =3D tester.actual("m3", "c").meta("m2", "foo").encode(); assertEquals(3, result.size()); - ExtendedAssert.assertEquals(new String[]{"1"}, result.getValues("act= ion")); - ExtendedAssert.assertEquals(new String[]{"foo"}, result.getValues("m= 2")); - ExtendedAssert.assertEquals(new String[]{"c"}, result.getValues("m3"= )); + assertEquals(new String[]{"1"}, result.getValues("action")); + assertEquals(new String[]{"foo"}, result.getValues("m2")); + assertEquals(new String[]{"c"}, result.getValues("m3")); = // result =3D tester.actual("m3", "c").meta("m1", "foo").meta("m2", "ba= r").encode(); assertEquals(4, result.size()); - ExtendedAssert.assertEquals(new String[]{"11"}, result.getValues("ac= tion")); - ExtendedAssert.assertEquals(new String[]{"foo"}, result.getValues("m= 1")); - ExtendedAssert.assertEquals(new String[]{"bar"}, result.getValues("m= 2")); - ExtendedAssert.assertEquals(new String[]{"c"}, result.getValues("m3"= )); + assertEquals(new String[]{"11"}, result.getValues("action")); + assertEquals(new String[]{"foo"}, result.getValues("m1")); + assertEquals(new String[]{"bar"}, result.getValues("m2")); + assertEquals(new String[]{"c"}, result.getValues("m3")); = // result =3D tester.actual("m3", "c").meta("m3", "zuu").encode(); assertEquals(2, result.size()); - ExtendedAssert.assertEquals(new String[]{"0"}, result.getValues("act= ion")); - ExtendedAssert.assertEquals(new String[]{"c"}, result.getValues("m3"= )); + assertEquals(new String[]{"0"}, result.getValues("action")); + assertEquals(new String[]{"c"}, result.getValues("m3")); = // result =3D tester.actual("m3", "c").meta("m1", "foo").meta("m3", "zu= u").encode(); assertEquals(3, result.size()); - ExtendedAssert.assertEquals(new String[]{"10"}, result.getValues("ac= tion")); - ExtendedAssert.assertEquals(new String[]{"foo"}, result.getValues("m= 1")); - ExtendedAssert.assertEquals(new String[]{"c"}, result.getValues("m3"= )); + assertEquals(new String[]{"10"}, result.getValues("action")); + assertEquals(new String[]{"foo"}, result.getValues("m1")); + assertEquals(new String[]{"c"}, result.getValues("m3")); = // result =3D tester.actual("m3", "c").meta("m2", "foo").meta("m3", "zu= u").encode(); assertEquals(3, result.size()); - ExtendedAssert.assertEquals(new String[]{"1"}, result.getValues("act= ion")); - ExtendedAssert.assertEquals(new String[]{"foo"}, result.getValues("m= 2")); - ExtendedAssert.assertEquals(new String[]{"c"}, result.getValues("m3"= )); + assertEquals(new String[]{"1"}, result.getValues("action")); + assertEquals(new String[]{"foo"}, result.getValues("m2")); + assertEquals(new String[]{"c"}, result.getValues("m3")); = // result =3D tester.actual("m3", "c").meta("m1", "foo").meta("m2", "ba= r").meta("m3", "zuu").encode(); assertEquals(4, result.size()); - ExtendedAssert.assertEquals(new String[]{"11"}, result.getValues("ac= tion")); - ExtendedAssert.assertEquals(new String[]{"foo"}, result.getValues("m= 1")); - ExtendedAssert.assertEquals(new String[]{"bar"}, result.getValues("m= 2")); - ExtendedAssert.assertEquals(new String[]{"c"}, result.getValues("m3"= )); + assertEquals(new String[]{"11"}, result.getValues("action")); + assertEquals(new String[]{"foo"}, result.getValues("m1")); + assertEquals(new String[]{"bar"}, result.getValues("m2")); + assertEquals(new String[]{"c"}, result.getValues("m3")); = // {m1,m2} actual parameter = // result =3D tester.actual("m1", "a").actual("m2", "b").encode(); assertEquals(3, result.size()); - ExtendedAssert.assertEquals(new String[]{"0"}, result.getValues("act= ion")); - ExtendedAssert.assertEquals(new String[]{"a"}, result.getValues("m1"= )); - ExtendedAssert.assertEquals(new String[]{"b"}, result.getValues("m2"= )); + assertEquals(new String[]{"0"}, result.getValues("action")); + assertEquals(new String[]{"a"}, result.getValues("m1")); + assertEquals(new String[]{"b"}, result.getValues("m2")); = // result =3D tester.actual("m1", "a").actual("m2", "b").meta("m1", "fo= o").encode(); assertEquals(3, result.size()); - ExtendedAssert.assertEquals(new String[]{"10"}, result.getValues("ac= tion")); - ExtendedAssert.assertEquals(new String[]{"foo","a"}, result.getValue= s("m1")); - ExtendedAssert.assertEquals(new String[]{"b"}, result.getValues("m2"= )); + assertEquals(new String[]{"10"}, result.getValues("action")); + assertEquals(new String[]{"foo","a"}, result.getValues("m1")); + assertEquals(new String[]{"b"}, result.getValues("m2")); = // result =3D tester.actual("m1", "a").actual("m2", "b").meta("m2", "fo= o").encode(); assertEquals(3, result.size()); - ExtendedAssert.assertEquals(new String[]{"1"}, result.getValues("act= ion")); - ExtendedAssert.assertEquals(new String[]{"a"}, result.getValues("m1"= )); - ExtendedAssert.assertEquals(new String[]{"foo","b"}, result.getValue= s("m2")); + assertEquals(new String[]{"1"}, result.getValues("action")); + assertEquals(new String[]{"a"}, result.getValues("m1")); + assertEquals(new String[]{"foo","b"}, result.getValues("m2")); = // result =3D tester.actual("m1", "a").actual("m2", "b").meta("m1", "fo= o").meta("m2", "bar").encode(); assertEquals(3, result.size()); - ExtendedAssert.assertEquals(new String[]{"11"}, result.getValues("ac= tion")); - ExtendedAssert.assertEquals(new String[]{"foo","a"}, result.getValue= s("m1")); - ExtendedAssert.assertEquals(new String[]{"bar","b"}, result.getValue= s("m2")); + assertEquals(new String[]{"11"}, result.getValues("action")); + assertEquals(new String[]{"foo","a"}, result.getValues("m1")); + assertEquals(new String[]{"bar","b"}, result.getValues("m2")); = // result =3D tester.actual("m1", "a").actual("m2", "b").meta("m3", "zu= u").encode(); assertEquals(3, result.size()); - ExtendedAssert.assertEquals(new String[]{"0"}, result.getValues("act= ion")); - ExtendedAssert.assertEquals(new String[]{"a"}, result.getValues("m1"= )); - ExtendedAssert.assertEquals(new String[]{"b"}, result.getValues("m2"= )); + assertEquals(new String[]{"0"}, result.getValues("action")); + assertEquals(new String[]{"a"}, result.getValues("m1")); + assertEquals(new String[]{"b"}, result.getValues("m2")); = // result =3D tester.actual("m1", "a").actual("m2", "b").meta("m1", "fo= o").meta("m3", "zuu").encode(); assertEquals(3, result.size()); - ExtendedAssert.assertEquals(new String[]{"10"}, result.getValues("ac= tion")); - ExtendedAssert.assertEquals(new String[]{"foo","a"}, result.getValue= s("m1")); - ExtendedAssert.assertEquals(new String[]{"b"}, result.getValues("m2"= )); + assertEquals(new String[]{"10"}, result.getValues("action")); + assertEquals(new String[]{"foo","a"}, result.getValues("m1")); + assertEquals(new String[]{"b"}, result.getValues("m2")); = // result =3D tester.actual("m1", "a").actual("m2", "b").meta("m2", "fo= o").meta("m3", "zuu").encode(); assertEquals(3, result.size()); - ExtendedAssert.assertEquals(new String[]{"1"}, result.getValues("act= ion")); - ExtendedAssert.assertEquals(new String[]{"a"}, result.getValues("m1"= )); - ExtendedAssert.assertEquals(new String[]{"foo","b"}, result.getValue= s("m2")); + assertEquals(new String[]{"1"}, result.getValues("action")); + assertEquals(new String[]{"a"}, result.getValues("m1")); + assertEquals(new String[]{"foo","b"}, result.getValues("m2")); = // result =3D tester.actual("m1", "a").actual("m2", "b").meta("m1", "fo= o").meta("m2", "bar").meta("m3", "zuu").encode(); assertEquals(3, result.size()); - ExtendedAssert.assertEquals(new String[]{"11"}, result.getValues("ac= tion")); - ExtendedAssert.assertEquals(new String[]{"foo","a"}, result.getValue= s("m1")); - ExtendedAssert.assertEquals(new String[]{"bar","b"}, result.getValue= s("m2")); + assertEquals(new String[]{"11"}, result.getValues("action")); + assertEquals(new String[]{"foo","a"}, result.getValues("m1")); + assertEquals(new String[]{"bar","b"}, result.getValues("m2")); = // {m1,m3} actual parameter = // result =3D tester.actual("m1", "a").actual("m3", "c").encode(); assertEquals(3, result.size()); - ExtendedAssert.assertEquals(new String[]{"0"}, result.getValues("act= ion")); - ExtendedAssert.assertEquals(new String[]{"a"}, result.getValues("m1"= )); - ExtendedAssert.assertEquals(new String[]{"c"}, result.getValues("m3"= )); + assertEquals(new String[]{"0"}, result.getValues("action")); + assertEquals(new String[]{"a"}, result.getValues("m1")); + assertEquals(new String[]{"c"}, result.getValues("m3")); = // result =3D tester.actual("m1", "a").actual("m3", "c").meta("m1", "fo= o").encode(); assertEquals(3, result.size()); - ExtendedAssert.assertEquals(new String[]{"10"}, result.getValues("ac= tion")); - ExtendedAssert.assertEquals(new String[]{"foo","a"}, result.getValue= s("m1")); - ExtendedAssert.assertEquals(new String[]{"c"}, result.getValues("m3"= )); + assertEquals(new String[]{"10"}, result.getValues("action")); + assertEquals(new String[]{"foo","a"}, result.getValues("m1")); + assertEquals(new String[]{"c"}, result.getValues("m3")); = // result =3D tester.actual("m1", "a").actual("m3", "c").meta("m2", "fo= o").encode(); assertEquals(4, result.size()); - ExtendedAssert.assertEquals(new String[]{"1"}, result.getValues("act= ion")); - ExtendedAssert.assertEquals(new String[]{"a"}, result.getValues("m1"= )); - ExtendedAssert.assertEquals(new String[]{"foo"}, result.getValues("m= 2")); - ExtendedAssert.assertEquals(new String[]{"c"}, result.getValues("m3"= )); + assertEquals(new String[]{"1"}, result.getValues("action")); + assertEquals(new String[]{"a"}, result.getValues("m1")); + assertEquals(new String[]{"foo"}, result.getValues("m2")); + assertEquals(new String[]{"c"}, result.getValues("m3")); = // result =3D tester.actual("m1", "a").actual("m3", "c").meta("m1", "fo= o").meta("m2", "bar").encode(); assertEquals(4, result.size()); - ExtendedAssert.assertEquals(new String[]{"11"}, result.getValues("ac= tion")); - ExtendedAssert.assertEquals(new String[]{"foo","a"}, result.getValue= s("m1")); - ExtendedAssert.assertEquals(new String[]{"bar"}, result.getValues("m= 2")); - ExtendedAssert.assertEquals(new String[]{"c"}, result.getValues("m3"= )); + assertEquals(new String[]{"11"}, result.getValues("action")); + assertEquals(new String[]{"foo","a"}, result.getValues("m1")); + assertEquals(new String[]{"bar"}, result.getValues("m2")); + assertEquals(new String[]{"c"}, result.getValues("m3")); = // result =3D tester.actual("m1", "a").actual("m3", "c").meta("m3", "zu= u").encode(); assertEquals(3, result.size()); - ExtendedAssert.assertEquals(new String[]{"0"}, result.getValues("act= ion")); - ExtendedAssert.assertEquals(new String[]{"a"}, result.getValues("m1"= )); - ExtendedAssert.assertEquals(new String[]{"c"}, result.getValues("m3"= )); + assertEquals(new String[]{"0"}, result.getValues("action")); + assertEquals(new String[]{"a"}, result.getValues("m1")); + assertEquals(new String[]{"c"}, result.getValues("m3")); = // result =3D tester.actual("m1", "a").actual("m3", "c").meta("m1", "fo= o").meta("m3", "zuu").encode(); assertEquals(3, result.size()); - ExtendedAssert.assertEquals(new String[]{"10"}, result.getValues("ac= tion")); - ExtendedAssert.assertEquals(new String[]{"foo","a"}, result.getValue= s("m1")); - ExtendedAssert.assertEquals(new String[]{"c"}, result.getValues("m3"= )); + assertEquals(new String[]{"10"}, result.getValues("action")); + assertEquals(new String[]{"foo","a"}, result.getValues("m1")); + assertEquals(new String[]{"c"}, result.getValues("m3")); = // result =3D tester.actual("m1", "a").actual("m3", "c").meta("m2", "fo= o").meta("m3", "zuu").encode(); assertEquals(4, result.size()); - ExtendedAssert.assertEquals(new String[]{"1"}, result.getValues("act= ion")); - ExtendedAssert.assertEquals(new String[]{"a"}, result.getValues("m1"= )); - ExtendedAssert.assertEquals(new String[]{"foo"}, result.getValues("m= 2")); - ExtendedAssert.assertEquals(new String[]{"c"}, result.getValues("m3"= )); + assertEquals(new String[]{"1"}, result.getValues("action")); + assertEquals(new String[]{"a"}, result.getValues("m1")); + assertEquals(new String[]{"foo"}, result.getValues("m2")); + assertEquals(new String[]{"c"}, result.getValues("m3")); = // result =3D tester.actual("m1", "a").actual("m3", "c").meta("m1", "fo= o").meta("m2", "bar").meta("m3", "zuu").encode(); assertEquals(4, result.size()); - ExtendedAssert.assertEquals(new String[]{"11"}, result.getValues("ac= tion")); - ExtendedAssert.assertEquals(new String[]{"foo","a"}, result.getValue= s("m1")); - ExtendedAssert.assertEquals(new String[]{"bar"}, result.getValues("m= 2")); - ExtendedAssert.assertEquals(new String[]{"c"}, result.getValues("m3"= )); + assertEquals(new String[]{"11"}, result.getValues("action")); + assertEquals(new String[]{"foo","a"}, result.getValues("m1")); + assertEquals(new String[]{"bar"}, result.getValues("m2")); + assertEquals(new String[]{"c"}, result.getValues("m3")); = // {m2,m3} actual parameter = // result =3D tester.actual("m2", "b").actual("m3", "c").encode(); assertEquals(3, result.size()); - ExtendedAssert.assertEquals(new String[]{"0"}, result.getValues("act= ion")); - ExtendedAssert.assertEquals(new String[]{"b"}, result.getValues("m2"= )); - ExtendedAssert.assertEquals(new String[]{"c"}, result.getValues("m3"= )); + assertEquals(new String[]{"0"}, result.getValues("action")); + assertEquals(new String[]{"b"}, result.getValues("m2")); + assertEquals(new String[]{"c"}, result.getValues("m3")); = // result =3D tester.actual("m2", "b").actual("m3", "c").meta("m1", "fo= o").encode(); assertEquals(4, result.size()); - ExtendedAssert.assertEquals(new String[]{"10"}, result.getValues("ac= tion")); - ExtendedAssert.assertEquals(new String[]{"foo"}, result.getValues("m= 1")); - ExtendedAssert.assertEquals(new String[]{"b"}, result.getValues("m2"= )); - ExtendedAssert.assertEquals(new String[]{"c"}, result.getValues("m3"= )); + assertEquals(new String[]{"10"}, result.getValues("action")); + assertEquals(new String[]{"foo"}, result.getValues("m1")); + assertEquals(new String[]{"b"}, result.getValues("m2")); + assertEquals(new String[]{"c"}, result.getValues("m3")); = // result =3D tester.actual("m2", "b").actual("m3", "c").meta("m2", "fo= o").encode(); assertEquals(3, result.size()); - ExtendedAssert.assertEquals(new String[]{"1"}, result.getValues("act= ion")); - ExtendedAssert.assertEquals(new String[]{"foo","b"}, result.getValue= s("m2")); - ExtendedAssert.assertEquals(new String[]{"c"}, result.getValues("m3"= )); + assertEquals(new String[]{"1"}, result.getValues("action")); + assertEquals(new String[]{"foo","b"}, result.getValues("m2")); + assertEquals(new String[]{"c"}, result.getValues("m3")); = // result =3D tester.actual("m2", "b").actual("m3", "c").meta("m1", "fo= o").meta("m2", "bar").encode(); assertEquals(4, result.size()); - ExtendedAssert.assertEquals(new String[]{"11"}, result.getValues("ac= tion")); - ExtendedAssert.assertEquals(new String[]{"foo"}, result.getValues("m= 1")); - ExtendedAssert.assertEquals(new String[]{"bar","b"}, result.getValue= s("m2")); - ExtendedAssert.assertEquals(new String[]{"c"}, result.getValues("m3"= )); + assertEquals(new String[]{"11"}, result.getValues("action")); + assertEquals(new String[]{"foo"}, result.getValues("m1")); + assertEquals(new String[]{"bar","b"}, result.getValues("m2")); + assertEquals(new String[]{"c"}, result.getValues("m3")); = // result =3D tester.actual("m2", "b").actual("m3", "c").meta("m3", "zu= u").encode(); assertEquals(3, result.size()); - ExtendedAssert.assertEquals(new String[]{"0"}, result.getValues("act= ion")); - ExtendedAssert.assertEquals(new String[]{"b"}, result.getValues("m2"= )); - ExtendedAssert.assertEquals(new String[]{"c"}, result.getValues("m3"= )); + assertEquals(new String[]{"0"}, result.getValues("action")); + assertEquals(new String[]{"b"}, result.getValues("m2")); + assertEquals(new String[]{"c"}, result.getValues("m3")); = // result =3D tester.actual("m2", "b").actual("m3", "c").meta("m1", "fo= o").meta("m3", "zuu").encode(); assertEquals(4, result.size()); - ExtendedAssert.assertEquals(new String[]{"10"}, result.getValues("ac= tion")); - ExtendedAssert.assertEquals(new String[]{"foo"}, result.getValues("m= 1")); - ExtendedAssert.assertEquals(new String[]{"b"}, result.getValues("m2"= )); - ExtendedAssert.assertEquals(new String[]{"c"}, result.getValues("m3"= )); + assertEquals(new String[]{"10"}, result.getValues("action")); + assertEquals(new String[]{"foo"}, result.getValues("m1")); + assertEquals(new String[]{"b"}, result.getValues("m2")); + assertEquals(new String[]{"c"}, result.getValues("m3")); = // result =3D tester.actual("m2", "b").actual("m3", "c").meta("m2", "fo= o").meta("m3", "zuu").encode(); assertEquals(3, result.size()); - ExtendedAssert.assertEquals(new String[]{"1"}, result.getValues("act= ion")); - ExtendedAssert.assertEquals(new String[]{"foo","b"}, result.getValue= s("m2")); - ExtendedAssert.assertEquals(new String[]{"c"}, result.getValues("m3"= )); + assertEquals(new String[]{"1"}, result.getValues("action")); + assertEquals(new String[]{"foo","b"}, result.getValues("m2")); + assertEquals(new String[]{"c"}, result.getValues("m3")); = // result =3D tester.actual("m2", "b").actual("m3", "c").meta("m1", "fo= o").meta("m2", "bar").meta("m3", "zuu").encode(); assertEquals(4, result.size()); - ExtendedAssert.assertEquals(new String[]{"11"}, result.getValues("ac= tion")); - ExtendedAssert.assertEquals(new String[]{"foo"}, result.getValues("m= 1")); - ExtendedAssert.assertEquals(new String[]{"bar","b"}, result.getValue= s("m2")); - ExtendedAssert.assertEquals(new String[]{"c"}, result.getValues("m3"= )); + assertEquals(new String[]{"11"}, result.getValues("action")); + assertEquals(new String[]{"foo"}, result.getValues("m1")); + assertEquals(new String[]{"bar","b"}, result.getValues("m2")); + assertEquals(new String[]{"c"}, result.getValues("m3")); = // {m1,m2,m3} actual parameter = // result =3D tester.actual("m1", "a").actual("m2", "b").actual("m3", "= c").encode(); assertEquals(4, result.size()); - ExtendedAssert.assertEquals(new String[]{"0"}, result.getValues("act= ion")); - ExtendedAssert.assertEquals(new String[]{"a"}, result.getValues("m1"= )); - ExtendedAssert.assertEquals(new String[]{"b"}, result.getValues("m2"= )); - ExtendedAssert.assertEquals(new String[]{"c"}, result.getValues("m3"= )); + assertEquals(new String[]{"0"}, result.getValues("action")); + assertEquals(new String[]{"a"}, result.getValues("m1")); + assertEquals(new String[]{"b"}, result.getValues("m2")); + assertEquals(new String[]{"c"}, result.getValues("m3")); = // result =3D tester.actual("m1", "a").actual("m2", "b").actual("m3", "= c").meta("m1", "foo").encode(); assertEquals(4, result.size()); - ExtendedAssert.assertEquals(new String[]{"10"}, result.getValues("ac= tion")); - ExtendedAssert.assertEquals(new String[]{"foo","a"}, result.getValue= s("m1")); - ExtendedAssert.assertEquals(new String[]{"b"}, result.getValues("m2"= )); - ExtendedAssert.assertEquals(new String[]{"c"}, result.getValues("m3"= )); + assertEquals(new String[]{"10"}, result.getValues("action")); + assertEquals(new String[]{"foo","a"}, result.getValues("m1")); + assertEquals(new String[]{"b"}, result.getValues("m2")); + assertEquals(new String[]{"c"}, result.getValues("m3")); = // result =3D tester.actual("m1", "a").actual("m2", "b").actual("m3", "= c").meta("m2", "foo").encode(); assertEquals(4, result.size()); - ExtendedAssert.assertEquals(new String[]{"1"}, result.getValues("act= ion")); - ExtendedAssert.assertEquals(new String[]{"a"}, result.getValues("m1"= )); - ExtendedAssert.assertEquals(new String[]{"foo","b"}, result.getValue= s("m2")); - ExtendedAssert.assertEquals(new String[]{"c"}, result.getValues("m3"= )); + assertEquals(new String[]{"1"}, result.getValues("action")); + assertEquals(new String[]{"a"}, result.getValues("m1")); + assertEquals(new String[]{"foo","b"}, result.getValues("m2")); + assertEquals(new String[]{"c"}, result.getValues("m3")); = // result =3D tester.actual("m1", "a").actual("m2", "b").actual("m3", "= c").meta("m1", "foo").meta("m2", "bar").encode(); assertEquals(4, result.size()); - ExtendedAssert.assertEquals(new String[]{"11"}, result.getValues("ac= tion")); - ExtendedAssert.assertEquals(new String[]{"foo","a"}, result.getValue= s("m1")); - ExtendedAssert.assertEquals(new String[]{"bar","b"}, result.getValue= s("m2")); - ExtendedAssert.assertEquals(new String[]{"c"}, result.getValues("m3"= )); + assertEquals(new String[]{"11"}, result.getValues("action")); + assertEquals(new String[]{"foo","a"}, result.getValues("m1")); + assertEquals(new String[]{"bar","b"}, result.getValues("m2")); + assertEquals(new String[]{"c"}, result.getValues("m3")); = // result =3D tester.actual("m1", "a").actual("m2", "b").actual("m3", "= c").meta("m3", "zuu").encode(); assertEquals(4, result.size()); - ExtendedAssert.assertEquals(new String[]{"0"}, result.getValues("act= ion")); - ExtendedAssert.assertEquals(new String[]{"a"}, result.getValues("m1"= )); - ExtendedAssert.assertEquals(new String[]{"b"}, result.getValues("m2"= )); - ExtendedAssert.assertEquals(new String[]{"c"}, result.getValues("m3"= )); + assertEquals(new String[]{"0"}, result.getValues("action")); + assertEquals(new String[]{"a"}, result.getValues("m1")); + assertEquals(new String[]{"b"}, result.getValues("m2")); + assertEquals(new String[]{"c"}, result.getValues("m3")); = // result =3D tester.actual("m1", "a").actual("m2", "b").actual("m3", "= c").meta("m1", "foo").meta("m3", "zuu").encode(); assertEquals(4, result.size()); - ExtendedAssert.assertEquals(new String[]{"10"}, result.getValues("ac= tion")); - ExtendedAssert.assertEquals(new String[]{"foo","a"}, result.getValue= s("m1")); - ExtendedAssert.assertEquals(new String[]{"b"}, result.getValues("m2"= )); - ExtendedAssert.assertEquals(new String[]{"c"}, result.getValues("m3"= )); + assertEquals(new String[]{"10"}, result.getValues("action")); + assertEquals(new String[]{"foo","a"}, result.getValues("m1")); + assertEquals(new String[]{"b"}, result.getValues("m2")); + assertEquals(new String[]{"c"}, result.getValues("m3")); = // result =3D tester.actual("m1", "a").actual("m2", "b").actual("m3", "= c").meta("m2", "foo").meta("m3", "zuu").encode(); assertEquals(4, result.size()); - ExtendedAssert.assertEquals(new String[]{"1"}, result.getValues("act= ion")); - ExtendedAssert.assertEquals(new String[]{"a"}, result.getValues("m1"= )); - ExtendedAssert.assertEquals(new String[]{"foo","b"}, result.getValue= s("m2")); - ExtendedAssert.assertEquals(new String[]{"c"}, result.getValues("m3"= )); + assertEquals(new String[]{"1"}, result.getValues("action")); + assertEquals(new String[]{"a"}, result.getValues("m1")); + assertEquals(new String[]{"foo","b"}, result.getValues("m2")); + assertEquals(new String[]{"c"}, result.getValues("m3")); = // result =3D tester.actual("m1", "a").actual("m2", "b").actual("m3", "= c").meta("m1", "foo").meta("m2", "bar").meta("m3", "zuu").encode(); assertEquals(4, result.size()); - ExtendedAssert.assertEquals(new String[]{"11"}, result.getValues("ac= tion")); - ExtendedAssert.assertEquals(new String[]{"foo","a"}, result.getValue= s("m1")); - ExtendedAssert.assertEquals(new String[]{"bar","b"}, result.getValue= s("m2")); - ExtendedAssert.assertEquals(new String[]{"c"}, result.getValues("m3"= )); + assertEquals(new String[]{"11"}, result.getValues("action")); + assertEquals(new String[]{"foo","a"}, result.getValues("m1")); + assertEquals(new String[]{"bar","b"}, result.getValues("m2")); + assertEquals(new String[]{"c"}, result.getValues("m3")); } = private static class Tester Deleted: modules/portlet/trunk/test/src/resources/jboss-4.2/portlet-test-wa= r/WEB-INF/jboss-context.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/portlet/trunk/test/src/resources/jboss-4.2/portlet-test-war/WEB= -INF/jboss-context.xml 2007-10-23 02:52:32 UTC (rev 8745) +++ modules/portlet/trunk/test/src/resources/jboss-4.2/portlet-test-war/WEB= -INF/jboss-context.xml 2007-10-23 07:31:22 UTC (rev 8746) @@ -1,31 +0,0 @@ - - - - - - test:loader=3Dportlet - - \ No newline at end of file Added: modules/portlet/trunk/test/src/resources/jboss-4.2/portlet-test-war/= WEB-INF/jboss-web.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/portlet/trunk/test/src/resources/jboss-4.2/portlet-test-war/WEB= -INF/jboss-web.xml (rev 0) +++ modules/portlet/trunk/test/src/resources/jboss-4.2/portlet-test-war/WEB= -INF/jboss-web.xml 2007-10-23 07:31:22 UTC (rev 8746) @@ -0,0 +1,31 @@ + + + + + + test:loader=3Dportlet + + \ No newline at end of file Modified: modules/portlet/trunk/test/src/resources/portlet-test-war/WEB-INF= /jboss-beans.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/portlet/trunk/test/src/resources/portlet-test-war/WEB-INF/jboss= -beans.xml 2007-10-23 02:52:32 UTC (rev 8745) +++ modules/portlet/trunk/test/src/resources/portlet-test-war/WEB-INF/jboss= -beans.xml 2007-10-23 07:31:22 UTC (rev 8746) @@ -25,14 +25,14 @@ xsi:schemaLocation=3D"urn:jboss:bean-deployer bean-deployer_1_= 0.xsd" xmlns=3D"urn:jboss:bean-deployer"> = - + = socket://localhost:5400 - org.jboss.portal.test.framework.driver.remote.RemoteTe= stDriver + org.jboss.unit.remote.driver.RemoteTestDriver = @@ -43,6 +43,7 @@ + = Added: modules/portlet/trunk/test/src/resources/test/local-jboss-unit.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/portlet/trunk/test/src/resources/test/local-jboss-unit.xml = (rev 0) +++ modules/portlet/trunk/test/src/resources/test/local-jboss-unit.xml 2007= -10-23 07:31:22 UTC (rev 8746) @@ -0,0 +1,23 @@ + + + + + + + + + + + + + + + + + + + + Modified: modules/portlet/trunk/test/src/resources/test/servers.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/portlet/trunk/test/src/resources/test/servers.xml 2007-10-23 02= :52:32 UTC (rev 8745) +++ modules/portlet/trunk/test/src/resources/test/servers.xml 2007-10-23 07= :31:22 UTC (rev 8746) @@ -5,7 +5,7 @@ default TestDriverServer - org.jboss.portal.test.framework.driver.remote.Remot= eTestDriver + org.jboss.unit.remote.driver.RemoteTestDriver socket://localhost:5400 @@ -27,7 +27,7 @@ default TestDriverServer - org.jboss.portal.test.framework.driver.remote.Remot= eTestDriver + org.jboss.unit.remote.driver.RemoteTestDriver socket://localhost:5400 @@ -45,7 +45,7 @@ default TestDriverServer - org.jboss.portal.test.framework.driver.remote.Remot= eTestDriver + org.jboss.unit.remote.driver.RemoteTestDriver socket://localhost:5400 Modified: modules/portlet/trunk/tools/etc/buildfragments/buildmagic.ent =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/portlet/trunk/tools/etc/buildfragments/buildmagic.ent 2007-10-2= 3 02:52:32 UTC (rev 8745) +++ modules/portlet/trunk/tools/etc/buildfragments/buildmagic.ent 2007-10-2= 3 07:31:22 UTC (rev 8746) @@ -165,15 +165,6 @@ = - - - - - - @@ -676,57 +667,6 @@ = - - - - - - - - - - - - - - - - - - - - - - - - - - - - Modified: modules/portlet/trunk/tools/etc/buildfragments/defaults.ent =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/portlet/trunk/tools/etc/buildfragments/defaults.ent 2007-10-23 = 02:52:32 UTC (rev 8745) +++ modules/portlet/trunk/tools/etc/buildfragments/defaults.ent 2007-10-23 = 07:31:22 UTC (rev 8746) @@ -118,8 +118,8 @@ = = - - + + = = - + --===============0075802351183214421==-- From portal-commits at lists.jboss.org Tue Oct 23 07:14:02 2007 Content-Type: multipart/mixed; boundary="===============8727108077306915708==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8750 - in branches/JBoss_Portal_2_6_2_JBPORTAL-1772: core-samples/src/main/org/jboss/portal/core/samples/basic and 1 other directories. Date: Tue, 23 Oct 2007 07:14:01 -0400 Message-ID: --===============8727108077306915708== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: mageshbk(a)jboss.com Date: 2007-10-23 07:14:01 -0400 (Tue, 23 Oct 2007) New Revision: 8750 Modified: branches/JBoss_Portal_2_6_2_JBPORTAL-1772/core-samples/src/main/org/jbos= s/portal/core/samples/basic/TestPortlet.java branches/JBoss_Portal_2_6_2_JBPORTAL-1772/core/src/main/org/jboss/portal= /core/impl/api/node/AbstractPortalNodeURL.java branches/JBoss_Portal_2_6_2_JBPORTAL-1772/wsrp/build.xml Log: [JBPORTAL-1772] Security fixes for JBoss Portal 2.6.2 - Added changes for [= JBPORTAL-1741] PortalURL security not honored Modified: branches/JBoss_Portal_2_6_2_JBPORTAL-1772/core/src/main/org/jboss= /portal/core/impl/api/node/AbstractPortalNodeURL.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_2_6_2_JBPORTAL-1772/core/src/main/org/jboss/porta= l/core/impl/api/node/AbstractPortalNodeURL.java 2007-10-23 10:31:14 UTC (re= v 8749) +++ branches/JBoss_Portal_2_6_2_JBPORTAL-1772/core/src/main/org/jboss/porta= l/core/impl/api/node/AbstractPortalNodeURL.java 2007-10-23 11:14:01 UTC (re= v 8750) @@ -53,6 +53,9 @@ /** . */ protected boolean relative; = + /** . */ + protected URLContext urlContext; + public AbstractPortalNodeURL(PortalObjectId id, ControllerContext contr= ollerContext) { this.id =3D id; @@ -74,11 +77,17 @@ public void setAuthenticated(Boolean authenticated) { this.wantAuthenticated =3D authenticated; + + // + this.urlContext =3D null; } = public void setSecure(Boolean secure) { this.wantSecure =3D secure; + + // + this.urlContext =3D null; } = public void setRelative(boolean relative) @@ -88,6 +97,41 @@ = protected URLContext getURLContext() { - return controllerContext.getServerInvocation().getServerContext().ge= tURLContext(); + if (urlContext =3D=3D null) + { + URLContext tmp =3D controllerContext.getServerInvocation().getSer= verContext().getURLContext(); + + // + if (wantSecure !=3D null) + { + if (wantSecure.booleanValue()) + { + tmp =3D tmp.asSecured(); + } + else + { + tmp =3D tmp.asNonSecured(); + } + } + + // + if (wantAuthenticated !=3D null) + { + if (wantAuthenticated.booleanValue()) + { + tmp =3D tmp.asAuthenticated(); + } + else + { + tmp =3D tmp.asNonAuthenticated(); + } + } + + // + urlContext =3D tmp; + } + + // + return urlContext; } } Modified: branches/JBoss_Portal_2_6_2_JBPORTAL-1772/core-samples/src/main/o= rg/jboss/portal/core/samples/basic/TestPortlet.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_2_6_2_JBPORTAL-1772/core-samples/src/main/org/jbo= ss/portal/core/samples/basic/TestPortlet.java 2007-10-23 10:31:14 UTC (rev = 8749) +++ branches/JBoss_Portal_2_6_2_JBPORTAL-1772/core-samples/src/main/org/jbo= ss/portal/core/samples/basic/TestPortlet.java 2007-10-23 11:14:01 UTC (rev = 8750) @@ -22,6 +22,7 @@ *************************************************************************= *****/ package org.jboss.portal.core.samples.basic; = +import org.jboss.portal.api.node.PortalNodeURL; import org.jboss.portal.common.transaction.TransactionManagerProvider; import org.jboss.portal.core.CoreConstants; import org.jboss.portal.identity.User; @@ -147,7 +148,32 @@ writer.write("
"); writer.write("

"); = + PortalNodeURL nodeURL =3D resp.createRenderURL(req.getPortalNode()); + String nothingURL =3D nodeURL.toString(); + nodeURL.setAuthenticated(Boolean.TRUE); + nodeURL.setSecure(Boolean.TRUE); + String authenticatedSecureURL =3D nodeURL.toString(); + nodeURL.setAuthenticated(Boolean.TRUE); + nodeURL.setSecure(Boolean.FALSE); + String authenticatedNotSecureURL =3D nodeURL.toString(); + nodeURL.setAuthenticated(Boolean.FALSE); + nodeURL.setSecure(Boolean.FALSE); + String notAuthenticatedNotSecureURL =3D nodeURL.toString(); + nodeURL.setAuthenticated(Boolean.FALSE); + nodeURL.setSecure(Boolean.TRUE); + String notAuthenticatedSecureURL =3D nodeURL.toString(); writer.write("

"); + writer.write("

Portal node UR= Ls
"); + writer.write(""); + writer.write("

"); + + writer.write("

"); writer.write("

Path
"); writer.write("
"); writer.write("
portal path info =3D " + req.getAttribute("PATH")= + "
"); Modified: branches/JBoss_Portal_2_6_2_JBPORTAL-1772/wsrp/build.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_2_6_2_JBPORTAL-1772/wsrp/build.xml 2007-10-23 10:= 31:14 UTC (rev 8749) +++ branches/JBoss_Portal_2_6_2_JBPORTAL-1772/wsrp/build.xml 2007-10-23 11:= 14:01 UTC (rev 8750) @@ -641,8 +641,8 @@ - - + + = --===============8727108077306915708==-- From portal-commits at lists.jboss.org Tue Oct 23 09:57:28 2007 Content-Type: multipart/mixed; boundary="===============7505656867137494686==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8751 - in modules/common/trunk/common: src/main/java/org/jboss/portal/common/net and 2 other directories. Date: Tue, 23 Oct 2007 09:57:28 -0400 Message-ID: --===============7505656867137494686== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: julien(a)jboss.com Date: 2007-10-23 09:57:28 -0400 (Tue, 23 Oct 2007) New Revision: 8751 Added: modules/common/trunk/common/src/test/java/org/jboss/portal/test/common/n= et/AbstractServer.java modules/common/trunk/common/src/test/java/org/jboss/portal/test/common/n= et/AbstractSynchronizedServer.java modules/common/trunk/common/src/test/resources/log4j.properties Removed: modules/common/trunk/common/src/main/java/org/jboss/portal/common/net/UR= LStreamOpeningThread.java Modified: modules/common/trunk/common/pom.xml modules/common/trunk/common/src/main/java/org/jboss/portal/common/net/UR= LTools.java modules/common/trunk/common/src/test/java/org/jboss/portal/test/common/n= et/URLToolsTestCase.java Log: - switched URLTools timeout implementations to use Java 5 - removed dependency over HTTP Client - added timeout and response 200 test cases for URLTools.exist and URLTools= .performGET Modified: modules/common/trunk/common/pom.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/common/trunk/common/pom.xml 2007-10-23 11:14:01 UTC (rev 8750) +++ modules/common/trunk/common/pom.xml 2007-10-23 13:57:28 UTC (rev 8751) @@ -145,6 +145,9 @@ org.apache.maven.plugins maven-surefire-plugin + --===============5016729077818262948==-- From portal-commits at lists.jboss.org Tue Oct 23 11:50:18 2007 Content-Type: multipart/mixed; boundary="===============7306031150935429970==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8755 - in modules/test/trunk/unit: src and 10 other directories. Date: Tue, 23 Oct 2007 11:46:18 -0400 Message-ID: --===============7306031150935429970== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: bdaw Date: 2007-10-23 11:46:18 -0400 (Tue, 23 Oct 2007) New Revision: 8755 Added: modules/test/trunk/unit/pom.xml modules/test/trunk/unit/src/main/java/ modules/test/trunk/unit/src/main/java/org/ modules/test/trunk/unit/src/main/java/org/jboss/ modules/test/trunk/unit/src/main/java/org/jboss/unit/ modules/test/trunk/unit/src/main/resources/ modules/test/trunk/unit/src/main/resources/org/ modules/test/trunk/unit/src/test/ modules/test/trunk/unit/src/test/java/ modules/test/trunk/unit/src/test/java/org/ modules/test/trunk/unit/src/test/java/org/jboss/ modules/test/trunk/unit/src/test/java/org/jboss/test/ modules/test/trunk/unit/src/test/resources/ modules/test/trunk/unit/src/test/resources/org/ Removed: modules/test/trunk/unit/src/main/org/ modules/test/trunk/unit/src/resources/ Modified: modules/test/trunk/unit/build.xml Log: - unit submodule reorganization for maven structure Modified: modules/test/trunk/unit/build.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/build.xml 2007-10-23 15:44:23 UTC (rev 8754) +++ modules/test/trunk/unit/build.xml 2007-10-23 15:46:18 UTC (rev 8755) @@ -124,6 +124,30 @@ _default:compile-etc, _default:compile-resources"> + + + + = + + + + + + + + + + = = @@ -144,13 +168,14 @@ - + = + = Added: modules/test/trunk/unit/pom.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/pom.xml (rev 0) +++ modules/test/trunk/unit/pom.xml 2007-10-23 15:46:18 UTC (rev 8755) @@ -0,0 +1,33 @@ + + + org.jboss.portal.test + jboss-portal-modules-test-root + 1.1.0-SNAPSHOT + + 4.0.0 + jboss-portal-modules-test-unit + jar + JBoss Portal Modules Common Portal + + + + + + + + org.apache.maven.plugins + maven-surefire-plugin + + true + + + + + + + + + + + Copied: modules/test/trunk/unit/src/main/java/org/jboss/unit (from rev 8752= , modules/test/trunk/unit/src/main/org/jboss/unit) Copied: modules/test/trunk/unit/src/main/resources/org (from rev 8752, modu= les/test/trunk/unit/src/resources/jboss-unit-jar/org) Copied: modules/test/trunk/unit/src/test/java/org/jboss/test (from rev 8752= , modules/test/trunk/unit/src/main/org/jboss/test) Copied: modules/test/trunk/unit/src/test/resources/org (from rev 8752, modu= les/test/trunk/unit/src/resources/test/org) --===============7306031150935429970==-- From portal-commits at lists.jboss.org Tue Oct 23 11:51:49 2007 Content-Type: multipart/mixed; boundary="===============1888456571987186455==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8756 - in modules/test/trunk: build and 8 other directories. Date: Tue, 23 Oct 2007 11:47:49 -0400 Message-ID: --===============1888456571987186455== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: bdaw Date: 2007-10-23 11:47:48 -0400 (Tue, 23 Oct 2007) New Revision: 8756 Added: modules/test/trunk/pom.xml Modified: modules/test/trunk/build/build-thirdparty.xml modules/test/trunk/build/ide/intellij/idea60/modules/mc/mc.iml modules/test/trunk/build/ide/intellij/idea60/modules/remote/remote.iml modules/test/trunk/build/ide/intellij/idea60/modules/test/test.iml modules/test/trunk/build/ide/intellij/idea60/modules/testsuite/testsuite= .iml modules/test/trunk/build/ide/intellij/idea60/modules/thirdparty/thirdpar= ty.iml modules/test/trunk/build/ide/intellij/idea60/modules/tooling/tooling.iml modules/test/trunk/build/ide/intellij/idea60/modules/tools/tools.iml modules/test/trunk/build/ide/intellij/idea60/modules/unit/unit.iml Log: root pom for test module Modified: modules/test/trunk/build/build-thirdparty.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/build/build-thirdparty.xml 2007-10-23 15:46:18 UTC (= rev 8755) +++ modules/test/trunk/build/build-thirdparty.xml 2007-10-23 15:47:48 UTC (= rev 8756) @@ -49,12 +49,12 @@ = = - + = = - + Modified: modules/test/trunk/build/ide/intellij/idea60/modules/mc/mc.iml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/build/ide/intellij/idea60/modules/mc/mc.iml 2007-10-= 23 15:46:18 UTC (rev 8755) +++ modules/test/trunk/build/ide/intellij/idea60/modules/mc/mc.iml 2007-10-= 23 15:47:48 UTC (rev 8756) @@ -1,6 +1,5 @@ - - + Modified: modules/test/trunk/build/ide/intellij/idea60/modules/remote/remot= e.iml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/build/ide/intellij/idea60/modules/remote/remote.iml = 2007-10-23 15:46:18 UTC (rev 8755) +++ modules/test/trunk/build/ide/intellij/idea60/modules/remote/remote.iml = 2007-10-23 15:47:48 UTC (rev 8756) @@ -1,6 +1,5 @@ - - + Modified: modules/test/trunk/build/ide/intellij/idea60/modules/test/test.iml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/build/ide/intellij/idea60/modules/test/test.iml 2007= -10-23 15:46:18 UTC (rev 8755) +++ modules/test/trunk/build/ide/intellij/idea60/modules/test/test.iml 2007= -10-23 15:47:48 UTC (rev 8756) @@ -1,6 +1,5 @@ - - + Modified: modules/test/trunk/build/ide/intellij/idea60/modules/testsuite/te= stsuite.iml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/build/ide/intellij/idea60/modules/testsuite/testsuit= e.iml 2007-10-23 15:46:18 UTC (rev 8755) +++ modules/test/trunk/build/ide/intellij/idea60/modules/testsuite/testsuit= e.iml 2007-10-23 15:47:48 UTC (rev 8756) @@ -1,6 +1,5 @@ - - + Modified: modules/test/trunk/build/ide/intellij/idea60/modules/thirdparty/t= hirdparty.iml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/build/ide/intellij/idea60/modules/thirdparty/thirdpa= rty.iml 2007-10-23 15:46:18 UTC (rev 8755) +++ modules/test/trunk/build/ide/intellij/idea60/modules/thirdparty/thirdpa= rty.iml 2007-10-23 15:47:48 UTC (rev 8756) @@ -1,12 +1,10 @@ - - + - Modified: modules/test/trunk/build/ide/intellij/idea60/modules/tooling/tool= ing.iml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/build/ide/intellij/idea60/modules/tooling/tooling.im= l 2007-10-23 15:46:18 UTC (rev 8755) +++ modules/test/trunk/build/ide/intellij/idea60/modules/tooling/tooling.im= l 2007-10-23 15:47:48 UTC (rev 8756) @@ -1,6 +1,5 @@ - - + @@ -8,7 +7,6 @@ - @@ -27,6 +25,7 @@ + Modified: modules/test/trunk/build/ide/intellij/idea60/modules/tools/tools.= iml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/build/ide/intellij/idea60/modules/tools/tools.iml 20= 07-10-23 15:46:18 UTC (rev 8755) +++ modules/test/trunk/build/ide/intellij/idea60/modules/tools/tools.iml 20= 07-10-23 15:47:48 UTC (rev 8756) @@ -1,6 +1,5 @@ - - + Modified: modules/test/trunk/build/ide/intellij/idea60/modules/unit/unit.iml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/build/ide/intellij/idea60/modules/unit/unit.iml 2007= -10-23 15:46:18 UTC (rev 8755) +++ modules/test/trunk/build/ide/intellij/idea60/modules/unit/unit.iml 2007= -10-23 15:47:48 UTC (rev 8756) @@ -1,10 +1,10 @@ - - + - + + Added: modules/test/trunk/pom.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/pom.xml (rev 0) +++ modules/test/trunk/pom.xml 2007-10-23 15:47:48 UTC (rev 8756) @@ -0,0 +1,188 @@ + + 4.0.0 + org.jboss.portal.test + jboss-portal-modules-test-root + pom + JBoss Portal Modules Test + 1.1.0-SNAPSHOT + http://labs.jboss.com/jbossportal + + + + + + repository.maven.org + Maven Repository + default + http://repo1.maven.org/maven2/ + + false + + + + repository.jboss.org + JBoss Repository + default + http://repository.jboss.org/maven2/ + + false + + + + snapshots.jboss.org + JBoss Snapshots Repository + default + http://snapshots.jboss.org/maven2/ + + true + + + false + + + + + + + + org.apache.maven.wagon + wagon-webdav + 1.0-beta-2 + + + + + + true + org.apache.maven.plugins + maven-compiler-plugin + + 1.5 + 1.5 + true + true + true + + + + org.apache.maven.plugins + maven-jar-plugin + + + + true + + + + + + org.codehaus.mojo + jboss-packaging-maven-plugin + 2.0-SNAPSHOT + true + + + maven-idea-plugin + + true + + + + org.jboss.maven.plugins + maven-jboss-deploy-plugin + 1.3 + + + + jboss-deploy + + + + + ${jboss.repository.root} + + + + + + + + + + + + + + snapshots.jboss.org + JBoss Snapshot Repository + dav:https://snapshots.jboss.org/maven2 + true + + + + + unit + + + + + JIRA + http://jira.jboss.com/jira/browse/JBPORTAL + + + cruisecontrol + + + + + LGPL 2.1 + http://www.gnu.org/licenses/lgpl.html + repo + + GNU LESSER GENERAL PUBLIC LICENSE Version 2.1 + + + + + scm:svn:http://anonsvn.jboss.org/repos/portal/trunk + scm:svn:https://svn.jboss.org/repos/portal/trun= k + https://svn.jboss.org/repos/portal/trunk + + + + + + maven-changes-plugin + + + maven-checkstyle-plugin + + + org.codehaus.mojo + cobertura-maven-plugin + 2.0 + + + maven-javadoc-plugin + + + maven-jxr-plugin + + + maven-pmd-plugin + + true + 1.5 + + + + maven-surefire-report-plugin + + + + + + + \ No newline at end of file --===============1888456571987186455==-- From portal-commits at lists.jboss.org Tue Oct 23 12:16:43 2007 Content-Type: multipart/mixed; boundary="===============2834373015476773307==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8757 - in modules/test/trunk/tooling: src and 9 other directories. Date: Tue, 23 Oct 2007 12:16:42 -0400 Message-ID: --===============2834373015476773307== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: bdaw Date: 2007-10-23 12:16:42 -0400 (Tue, 23 Oct 2007) New Revision: 8757 Added: modules/test/trunk/tooling/src/main/java/ modules/test/trunk/tooling/src/main/java/org/ modules/test/trunk/tooling/src/main/java/org/jboss/ modules/test/trunk/tooling/src/main/java/unit/ modules/test/trunk/tooling/src/main/resources/ modules/test/trunk/tooling/src/test/ modules/test/trunk/tooling/src/test/java/ modules/test/trunk/tooling/src/test/java/org/ modules/test/trunk/tooling/src/test/java/org/jboss/ modules/test/trunk/tooling/src/test/java/org/jboss/test/ modules/test/trunk/tooling/src/test/resources/ modules/test/trunk/tooling/src/test/resources/assertkeyword-unit.xml modules/test/trunk/tooling/src/test/resources/simple-tests.xml Removed: modules/test/trunk/tooling/src/main/org/jboss/test/ modules/test/trunk/tooling/src/main/org/jboss/unit/ modules/test/trunk/tooling/src/resources/ Modified: modules/test/trunk/tooling/build.xml Log: tooling reorganization to maven structure Modified: modules/test/trunk/tooling/build.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/tooling/build.xml 2007-10-23 15:47:48 UTC (rev 8756) +++ modules/test/trunk/tooling/build.xml 2007-10-23 16:16:42 UTC (rev 8757) @@ -127,6 +127,30 @@ _default:compile-etc, _default:compile-resources"> + + + + + + + + + + + + + + = @@ -147,13 +171,13 @@ - = + = @@ -217,7 +241,7 @@ = = - + @@ -237,7 +261,7 @@ = - + = = - + --===============3569711145144279367==-- From portal-commits at lists.jboss.org Tue Oct 23 12:21:41 2007 Content-Type: multipart/mixed; boundary="===============5242070441821515586==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8760 - in modules/test/trunk/tooling/src/main/java: org/jboss and 1 other directory. Date: Tue, 23 Oct 2007 12:21:41 -0400 Message-ID: --===============5242070441821515586== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: bdaw Date: 2007-10-23 12:21:41 -0400 (Tue, 23 Oct 2007) New Revision: 8760 Added: modules/test/trunk/tooling/src/main/java/org/jboss/unit/ Removed: modules/test/trunk/tooling/src/main/java/unit/ Log: bobo Copied: modules/test/trunk/tooling/src/main/java/org/jboss/unit (from rev 8= 757, modules/test/trunk/tooling/src/main/java/unit) --===============5242070441821515586==-- From portal-commits at lists.jboss.org Tue Oct 23 12:26:22 2007 Content-Type: multipart/mixed; boundary="===============6504447099812412959==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8761 - modules/test/trunk/build/ide/intellij/idea60/modules/tooling. Date: Tue, 23 Oct 2007 12:26:21 -0400 Message-ID: --===============6504447099812412959== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: bdaw Date: 2007-10-23 12:26:21 -0400 (Tue, 23 Oct 2007) New Revision: 8761 Modified: modules/test/trunk/build/ide/intellij/idea60/modules/tooling/tooling.iml Log: intellij module update Modified: modules/test/trunk/build/ide/intellij/idea60/modules/tooling/tool= ing.iml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/build/ide/intellij/idea60/modules/tooling/tooling.im= l 2007-10-23 16:21:41 UTC (rev 8760) +++ modules/test/trunk/build/ide/intellij/idea60/modules/tooling/tooling.im= l 2007-10-23 16:26:21 UTC (rev 8761) @@ -3,7 +3,8 @@ - + + --===============6504447099812412959==-- From portal-commits at lists.jboss.org Tue Oct 23 12:33:47 2007 Content-Type: multipart/mixed; boundary="===============1342493855104772632==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8762 - in modules/test/trunk/mc: src and 9 other directories. Date: Tue, 23 Oct 2007 12:33:44 -0400 Message-ID: --===============1342493855104772632== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: bdaw Date: 2007-10-23 12:33:44 -0400 (Tue, 23 Oct 2007) New Revision: 8762 Added: modules/test/trunk/mc/src/main/java/ modules/test/trunk/mc/src/main/java/org/ modules/test/trunk/mc/src/main/java/org/jboss/ modules/test/trunk/mc/src/main/java/org/jboss/unit/ modules/test/trunk/mc/src/main/resources/ modules/test/trunk/mc/src/test/ modules/test/trunk/mc/src/test/java/ modules/test/trunk/mc/src/test/java/org/ modules/test/trunk/mc/src/test/java/org/jboss/ modules/test/trunk/mc/src/test/java/org/jboss/test/ modules/test/trunk/mc/src/test/resources/ modules/test/trunk/mc/src/test/resources/blah/ Removed: modules/test/trunk/mc/src/main/org/ modules/test/trunk/mc/src/resources/ Modified: modules/test/trunk/mc/build.xml Log: mc module reorganization for maven structure Modified: modules/test/trunk/mc/build.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/mc/build.xml 2007-10-23 16:26:21 UTC (rev 8761) +++ modules/test/trunk/mc/build.xml 2007-10-23 16:33:44 UTC (rev 8762) @@ -128,6 +128,29 @@ _default:compile-etc, _default:compile-resources"> + + + + + + + + + + + + + = @@ -148,12 +171,14 @@ + = - + + = Copied: modules/test/trunk/mc/src/main/java/org/jboss/unit (from rev 8752, = modules/test/trunk/mc/src/main/org/jboss/unit) Copied: modules/test/trunk/mc/src/test/java/org/jboss/test (from rev 8752, = modules/test/trunk/mc/src/main/org/jboss/test) Copied: modules/test/trunk/mc/src/test/resources/blah (from rev 8752, modul= es/test/trunk/mc/src/resources/test/blah) --===============1342493855104772632==-- From portal-commits at lists.jboss.org Tue Oct 23 12:34:21 2007 Content-Type: multipart/mixed; boundary="===============4927267710827111716==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8763 - modules/test/trunk/build/ide/intellij/idea60/modules/mc. Date: Tue, 23 Oct 2007 12:34:21 -0400 Message-ID: --===============4927267710827111716== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: bdaw Date: 2007-10-23 12:34:20 -0400 (Tue, 23 Oct 2007) New Revision: 8763 Modified: modules/test/trunk/build/ide/intellij/idea60/modules/mc/mc.iml Log: mc module - intellij Modified: modules/test/trunk/build/ide/intellij/idea60/modules/mc/mc.iml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/build/ide/intellij/idea60/modules/mc/mc.iml 2007-10-= 23 16:33:44 UTC (rev 8762) +++ modules/test/trunk/build/ide/intellij/idea60/modules/mc/mc.iml 2007-10-= 23 16:34:20 UTC (rev 8763) @@ -3,7 +3,8 @@ - + + --===============4927267710827111716==-- From portal-commits at lists.jboss.org Tue Oct 23 13:59:29 2007 Content-Type: multipart/mixed; boundary="===============3863856819498552826==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8764 - in modules/test/trunk/remote: src and 10 other directories. Date: Tue, 23 Oct 2007 13:59:29 -0400 Message-ID: --===============3863856819498552826== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: bdaw Date: 2007-10-23 13:59:29 -0400 (Tue, 23 Oct 2007) New Revision: 8764 Added: modules/test/trunk/remote/src/main/java/ modules/test/trunk/remote/src/main/java/org/ modules/test/trunk/remote/src/main/java/org/jboss/ modules/test/trunk/remote/src/main/java/org/jboss/unit/ modules/test/trunk/remote/src/main/resources/ modules/test/trunk/remote/src/main/resources/org/ modules/test/trunk/remote/src/test/ modules/test/trunk/remote/src/test/java/ modules/test/trunk/remote/src/test/java/org/ modules/test/trunk/remote/src/test/java/org/jboss/ modules/test/trunk/remote/src/test/java/org/jboss/test/ modules/test/trunk/remote/src/test/resources/ Removed: modules/test/trunk/remote/src/main/org/jboss/test/ modules/test/trunk/remote/src/main/org/jboss/unit/ modules/test/trunk/remote/src/resources/ Modified: modules/test/trunk/remote/build.xml Log: remote module reorganization for maven Modified: modules/test/trunk/remote/build.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/remote/build.xml 2007-10-23 16:34:20 UTC (rev 8763) +++ modules/test/trunk/remote/build.xml 2007-10-23 17:59:29 UTC (rev 8764) @@ -136,6 +136,29 @@ _default:compile-etc, _default:compile-resources"> + + + + + + + + + + + + + = @@ -156,9 +179,16 @@ - + = + + + + + + + = @@ -200,6 +230,8 @@ + + = Copied: modules/test/trunk/remote/src/main/java/org/jboss/unit (from rev 87= 52, modules/test/trunk/remote/src/main/org/jboss/unit) Copied: modules/test/trunk/remote/src/main/resources/org (from rev 8752, mo= dules/test/trunk/remote/src/resources/jboss-unit-remote-jar/org) Copied: modules/test/trunk/remote/src/test/java/org/jboss/test (from rev 87= 52, modules/test/trunk/remote/src/main/org/jboss/test) --===============3863856819498552826==-- From portal-commits at lists.jboss.org Tue Oct 23 14:01:45 2007 Content-Type: multipart/mixed; boundary="===============3381938457520086589==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8765 - modules/test/trunk/remote/src/main. Date: Tue, 23 Oct 2007 14:01:44 -0400 Message-ID: --===============3381938457520086589== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: bdaw Date: 2007-10-23 14:01:44 -0400 (Tue, 23 Oct 2007) New Revision: 8765 Removed: modules/test/trunk/remote/src/main/org/ Log: bobo --===============3381938457520086589==-- From portal-commits at lists.jboss.org Tue Oct 23 14:04:17 2007 Content-Type: multipart/mixed; boundary="===============8696747828205869855==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8766 - modules/test/trunk/build/ide/intellij/idea60/modules/remote. Date: Tue, 23 Oct 2007 14:04:17 -0400 Message-ID: --===============8696747828205869855== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: bdaw Date: 2007-10-23 14:04:16 -0400 (Tue, 23 Oct 2007) New Revision: 8766 Modified: modules/test/trunk/build/ide/intellij/idea60/modules/remote/remote.iml Log: intellij module Modified: modules/test/trunk/build/ide/intellij/idea60/modules/remote/remot= e.iml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/build/ide/intellij/idea60/modules/remote/remote.iml = 2007-10-23 18:01:44 UTC (rev 8765) +++ modules/test/trunk/build/ide/intellij/idea60/modules/remote/remote.iml = 2007-10-23 18:04:16 UTC (rev 8766) @@ -3,7 +3,8 @@ - + + --===============8696747828205869855==-- From portal-commits at lists.jboss.org Tue Oct 23 15:41:48 2007 Content-Type: multipart/mixed; boundary="===============2784855444699394849==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8767 - in modules/test/trunk/build/ide/intellij/idea70/modules: remote and 2 other directories. Date: Tue, 23 Oct 2007 15:41:48 -0400 Message-ID: --===============2784855444699394849== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: julien(a)jboss.com Date: 2007-10-23 15:41:48 -0400 (Tue, 23 Oct 2007) New Revision: 8767 Modified: modules/test/trunk/build/ide/intellij/idea70/modules/mc/mc.iml modules/test/trunk/build/ide/intellij/idea70/modules/remote/remote.iml modules/test/trunk/build/ide/intellij/idea70/modules/tooling/tooling.iml modules/test/trunk/build/ide/intellij/idea70/modules/unit/unit.iml Log: update intellij project file for source location Modified: modules/test/trunk/build/ide/intellij/idea70/modules/mc/mc.iml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/build/ide/intellij/idea70/modules/mc/mc.iml 2007-10-= 23 18:04:16 UTC (rev 8766) +++ modules/test/trunk/build/ide/intellij/idea70/modules/mc/mc.iml 2007-10-= 23 19:41:48 UTC (rev 8767) @@ -3,7 +3,8 @@ - + + Modified: modules/test/trunk/build/ide/intellij/idea70/modules/remote/remot= e.iml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/build/ide/intellij/idea70/modules/remote/remote.iml = 2007-10-23 18:04:16 UTC (rev 8766) +++ modules/test/trunk/build/ide/intellij/idea70/modules/remote/remote.iml = 2007-10-23 19:41:48 UTC (rev 8767) @@ -3,7 +3,8 @@ - + + Modified: modules/test/trunk/build/ide/intellij/idea70/modules/tooling/tool= ing.iml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/build/ide/intellij/idea70/modules/tooling/tooling.im= l 2007-10-23 18:04:16 UTC (rev 8766) +++ modules/test/trunk/build/ide/intellij/idea70/modules/tooling/tooling.im= l 2007-10-23 19:41:48 UTC (rev 8767) @@ -3,7 +3,8 @@ - + + Modified: modules/test/trunk/build/ide/intellij/idea70/modules/unit/unit.iml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/build/ide/intellij/idea70/modules/unit/unit.iml 2007= -10-23 18:04:16 UTC (rev 8766) +++ modules/test/trunk/build/ide/intellij/idea70/modules/unit/unit.iml 2007= -10-23 19:41:48 UTC (rev 8767) @@ -3,7 +3,8 @@ - + + --===============2784855444699394849==-- From portal-commits at lists.jboss.org Tue Oct 23 21:52:12 2007 Content-Type: multipart/mixed; boundary="===============4828806566264462162==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8768 - branches/JBoss_Portal_Branch_2_6/core-admin/src/main/org/jboss/portal/core/admin/ui. Date: Tue, 23 Oct 2007 21:52:12 -0400 Message-ID: --===============4828806566264462162== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: chris.laprun(a)jboss.com Date: 2007-10-23 21:52:12 -0400 (Tue, 23 Oct 2007) New Revision: 8768 Modified: branches/JBoss_Portal_Branch_2_6/core-admin/src/main/org/jboss/portal/co= re/admin/ui/AdminPropertyResolver.java Log: - Fixed incorrect assumption when downcasting PortletInfo in icon property = resolver: in the WSRP case, the PortletInfo is NOT a CorePortletInfo object. - Extracted common code into inner class. Modified: branches/JBoss_Portal_Branch_2_6/core-admin/src/main/org/jboss/po= rtal/core/admin/ui/AdminPropertyResolver.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/core-admin/src/main/org/jboss/portal/c= ore/admin/ui/AdminPropertyResolver.java 2007-10-23 19:41:48 UTC (rev 8767) +++ branches/JBoss_Portal_Branch_2_6/core-admin/src/main/org/jboss/portal/c= ore/admin/ui/AdminPropertyResolver.java 2007-10-24 01:52:12 UTC (rev 8768) @@ -74,6 +74,7 @@ */ public class AdminPropertyResolver extends DelegatingPropertyResolver { + private static final String DEFAULT_PORTLET_ICON =3D "/portal-admin/img= /portletIcon_Default1.gif"; = public AdminPropertyResolver() { @@ -190,40 +191,8 @@ return new ArrayList(portlet.getInfo().getCapabilities().getAl= lLocales()); } }); - portletDecorator.setProperty("smallIconLocation", new AbstractProper= tyDecorator(String.class) - { - public Object getValue(Object bean) throws IllegalArgumentExcepti= on - { - Portlet portlet =3D (Portlet)bean; - CorePortletInfo cInfo =3D (CorePortletInfo)portlet.getInfo(); - PortletInfoInfo portletInfo =3D cInfo.getPortletInfo(); - if (portletInfo !=3D null && portletInfo.getPortletIconInfo() = !=3D null && portletInfo.getPortletIconInfo().getIconLocation(PortletIconIn= fo.SMALL) !=3D null) - { - return portletInfo.getPortletIconInfo().getIconLocation(Por= tletIconInfo.SMALL); - } - else - { - return "/portal-admin/img/portletIcon_Default1.gif"; - } - } - }); - portletDecorator.setProperty("largeIconLocation", new AbstractProper= tyDecorator(String.class) - { - public Object getValue(Object bean) throws IllegalArgumentExcepti= on - { - Portlet portlet =3D (Portlet)bean; - CorePortletInfo cInfo =3D (CorePortletInfo)portlet.getInfo(); - PortletInfoInfo portletInfo =3D cInfo.getPortletInfo(); - if (portletInfo !=3D null && portletInfo.getPortletIconInfo() = !=3D null && portletInfo.getPortletIconInfo().getIconLocation(PortletIconIn= fo.LARGE) !=3D null) - { - return portletInfo.getPortletIconInfo().getIconLocation(Por= tletIconInfo.LARGE); - } - else - { - return "/portal-admin/img/portletIcon_Default1.gif"; - } - } - }); + portletDecorator.setProperty("smallIconLocation", new PortletIconPro= pertyDecorator(PortletIconInfo.SMALL)); + portletDecorator.setProperty("largeIconLocation", new PortletIconPro= pertyDecorator(PortletIconInfo.LARGE)); registerDecorator(Portlet.class, portletDecorator); = // @@ -450,4 +419,32 @@ registerDecorator(ThemeService.class, themeServiceDecorator); } = + private static class PortletIconPropertyDecorator extends AbstractPrope= rtyDecorator + { + private String iconType; + + public PortletIconPropertyDecorator(String iconType) + { + super(String.class); + this.iconType =3D iconType; + } + + public Object getValue(Object bean) throws IllegalArgumentException + { + Portlet portlet =3D (Portlet)bean; + PortletInfo info =3D portlet.getInfo(); + + if (info instanceof CorePortletInfo) + { + CorePortletInfo cInfo =3D (CorePortletInfo)portlet.getInfo(); + PortletInfoInfo portletInfo =3D cInfo.getPortletInfo(); + if (portletInfo !=3D null && portletInfo.getPortletIconInfo() = !=3D null && portletInfo.getPortletIconInfo().getIconLocation(iconType) != =3D null) + { + return portletInfo.getPortletIconInfo().getIconLocation(ico= nType); + } + } + + return DEFAULT_PORTLET_ICON; + } + } } --===============4828806566264462162==-- From portal-commits at lists.jboss.org Wed Oct 24 14:59:18 2007 Content-Type: multipart/mixed; boundary="===============6694037846108858967==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8769 - branches/JBoss_Portal_2_6_2_SecurityPatch/security/src/main/org/jboss/portal/security/impl/jacc. Date: Wed, 24 Oct 2007 14:59:17 -0400 Message-ID: --===============6694037846108858967== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: sohil.shah(a)jboss.com Date: 2007-10-24 14:59:17 -0400 (Wed, 24 Oct 2007) New Revision: 8769 Added: branches/JBoss_Portal_2_6_2_SecurityPatch/security/src/main/org/jboss/po= rtal/security/impl/jacc/Permissions.java branches/JBoss_Portal_2_6_2_SecurityPatch/security/src/main/org/jboss/po= rtal/security/impl/jacc/SecurityContext.java Modified: branches/JBoss_Portal_2_6_2_SecurityPatch/security/src/main/org/jboss/po= rtal/security/impl/jacc/JACCPortalAuthorizationManager.java branches/JBoss_Portal_2_6_2_SecurityPatch/security/src/main/org/jboss/po= rtal/security/impl/jacc/JACCPortalAuthorizationManagerFactory.java Log: porting a JACC bypassing security patch from 2.4.1SP1 to 2.6.2 Modified: branches/JBoss_Portal_2_6_2_SecurityPatch/security/src/main/org/j= boss/portal/security/impl/jacc/JACCPortalAuthorizationManager.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_2_6_2_SecurityPatch/security/src/main/org/jboss/p= ortal/security/impl/jacc/JACCPortalAuthorizationManager.java 2007-10-24 01:= 52:12 UTC (rev 8768) +++ branches/JBoss_Portal_2_6_2_SecurityPatch/security/src/main/org/jboss/p= ortal/security/impl/jacc/JACCPortalAuthorizationManager.java 2007-10-24 18:= 59:17 UTC (rev 8769) @@ -68,6 +68,21 @@ = /** Used to retrieve the subject in hte jacc portal permission collecti= on. */ private static final ThreadLocal checkedSubjectLocal =3D new ThreadLoca= l(); + = + /** + * JACC bypass + */ + private SecurityContext securityContext =3D null; + = + /** + * JACC bypass = + * = + * @param securityContext + */ + void setSecurityContext(SecurityContext securityContext) + { + this.securityContext =3D securityContext; + } = public JACCPortalAuthorizationManager(JACCPortalAuthorizationManagerFac= tory factory) { @@ -84,7 +99,7 @@ = public void checkRoleConfig(String contextID, String roleName) throws P= ortalSecurityException { - Map configuredRoles =3D factory.configuredRoles; + /*Map configuredRoles =3D factory.configuredRoles; synchronized (configuredRoles) { // The policy configuration @@ -145,6 +160,36 @@ log.error("Error when commiting policy config", e); } } + }*/ + = + /** + * JACC bypass + */ + Map configuredRoles =3D factory.configuredRoles; + synchronized (configuredRoles) + { + if (!configuredRoles.containsKey(roleName)) + { + // Iterate over all domains to add their container + Collection domains =3D factory.getAuthorizationDomainRegistry(= ).getDomains(); + for (Iterator j =3D domains.iterator(); j.hasNext();) + { + AuthorizationDomain domain =3D (AuthorizationDomain)j.next(= ); + JACCPortalPermissionCollection collection =3D new JACCPorta= lPermissionCollection(roleName, domain); + PermissionFactory permissionFactory =3D domain.getPermissio= nFactory(); + PortalPermission container =3D permissionFactory.createPerm= issionContainer(collection); + = + if (SecurityConstants.UNCHECKED_ROLE_NAME.equals(roleName)) + { + this.securityContext.addToUncheckedPolicy(container); + } + else + { + this.securityContext.addToRole(roleName, container); + } + } + configuredRoles.put(roleName, roleName); + } } } = @@ -209,10 +254,23 @@ principals =3D new Principal[0]; } = - // + //Bypass the JACC layer and go straight to the portal security permi= ssion layer + /*ProtectionDomain pd =3D new ProtectionDomain(null, null, null, pri= ncipals); + Policy policy =3D Policy.getPolicy(); + boolean implied =3D policy.implies(pd, permission);*/ + = + /** + * alternately bypassing the call and not letting it go through the = + * JACC system. + * = + * There is not an issue with JBoss JACC implementation, but the Per= missions object + * in JDK5 which is leveraged by JACC. The synchrnozied block inside= Permissions object + * is causing performance bottleneck + */ ProtectionDomain pd =3D new ProtectionDomain(null, null, null, princ= ipals); - Policy policy =3D Policy.getPolicy(); - return policy.implies(pd, permission); + boolean implied =3D this.securityContext.implies(pd, permission); + = + return implied; } = = Modified: branches/JBoss_Portal_2_6_2_SecurityPatch/security/src/main/org/j= boss/portal/security/impl/jacc/JACCPortalAuthorizationManagerFactory.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_2_6_2_SecurityPatch/security/src/main/org/jboss/p= ortal/security/impl/jacc/JACCPortalAuthorizationManagerFactory.java 2007-10= -24 01:52:12 UTC (rev 8768) +++ branches/JBoss_Portal_2_6_2_SecurityPatch/security/src/main/org/jboss/p= ortal/security/impl/jacc/JACCPortalAuthorizationManagerFactory.java 2007-10= -24 18:59:17 UTC (rev 8769) @@ -51,6 +51,11 @@ = /** The configured roles. */ final Map configuredRoles =3D new HashMap(); + = + /** + * JACC bypass + */ + private SecurityContext securityContext =3D null; = public AuthorizationDomainRegistry getAuthorizationDomainRegistry() { @@ -64,6 +69,14 @@ = public PortalAuthorizationManager getManager() { + JACCPortalAuthorizationManager manager =3D new JACCPortalAuthorizati= onManager(this); + = + if(this.securityContext =3D=3D null) + { + this.securityContext =3D new SecurityContext(); + } + = + manager.setSecurityContext(this.securityContext); return manager; } = @@ -95,5 +108,8 @@ = // Refresh policy.refresh(); + = + //JACC bypass + this.securityContext =3D new SecurityContext(); } } Added: branches/JBoss_Portal_2_6_2_SecurityPatch/security/src/main/org/jbos= s/portal/security/impl/jacc/Permissions.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_2_6_2_SecurityPatch/security/src/main/org/jboss/p= ortal/security/impl/jacc/Permissions.java (rev 0) +++ branches/JBoss_Portal_2_6_2_SecurityPatch/security/src/main/org/jboss/p= ortal/security/impl/jacc/Permissions.java 2007-10-24 18:59:17 UTC (rev 8769) @@ -0,0 +1,167 @@ +/*************************************************************************= ***** + * JBoss, a division of Red Hat = * + * Copyright 2006, Red Hat Middleware, LLC, and individual = * + * contributors as indicated by the @authors tag. See the = * + * copyright.txt in the distribution for a full listing of = * + * individual contributors. = * + * = * + * This is free software; you can redistribute it and/or modify it = * + * under the terms of the GNU Lesser General Public License as = * + * published by the Free Software Foundation; either version 2.1 of = * + * the License, or (at your option) any later version. = * + * = * + * This software is distributed in the hope that it will be useful, = * + * but WITHOUT ANY WARRANTY; without even the implied warranty of = * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU = * + * Lesser General Public License for more details. = * + * = * + * You should have received a copy of the GNU Lesser General Public = * + * License along with this software; if not, write to the Free = * + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA = * + * 02110-1301 USA, or see the FSF site: http://www.fsf.org. = * + *************************************************************************= *****/ +package org.jboss.portal.security.impl.jacc; + +import java.util.Map; + +import java.security.Permission; +import java.security.PermissionCollection; + +import EDU.oswego.cs.dl.util.concurrent.ConcurrentHashMap; + +/** + * @author Sohil Shah + */ +public final class Permissions +{ + /** + * Key is permissions Class, value is PermissionCollection for that cla= ss. + * Not serialized; see serialization section at end of class. + */ + private transient Map permsMap =3D null; + + + /** + * Creates a new Permissions object containing no PermissionCollections. + */ + public Permissions() + { + this.permsMap =3D new ConcurrentHashMap(); + } + + /** + * Adds a permission object to the PermissionCollection for the class t= he + * permission belongs to. For example, if permission is a + * FilePermission, it is added to the FilePermissionCollection stored i= n this + * Permissions object. + * = + * This method creates a new PermissionCollection object (and adds the + * permission to it) if an appropriate collection does not yet exist. + *

+ * = + * @param permission + * the Permission object to add. + * = + * @exception SecurityException + * if this Permissions object is marked as readonly. + * = + * @see PermissionCollection#isReadOnly() + */ + public void add(Permission permission) + { = + PermissionCollection pc; + pc =3D getPermissionCollection(permission, true); + pc.add(permission); = + } + + /** + * Checks to see if this object's PermissionCollection for permissions = of the + * specified permission's type implies the permissions expressed in the + * permission object. Returns true if the combination of permiss= ions + * in the appropriate PermissionCollection (e.g., a FilePermissionColle= ction + * for a FilePermission) together imply the specified permission. + * = + *

+ * For example, suppose there is a FilePermissionCollection in this + * Permissions object, and it contains one FilePermission that specifies + * "read" access for all files in all subdirectories of the "/tmp" dire= ctory, + * and another FilePermission that specifies "write" access for all fil= es in + * the "/tmp/scratch/foo" directory. Then if the implies + * method is called with a permission specifying both "read" and "write" + * access to files in the "/tmp/scratch/foo" directory, true + * is returned. + * = + *

+ * Additionally, if this PermissionCollection contains the AllPermissio= n, + * this method will always return true. + *

+ * = + * @param permission + * the Permission object to check. + * = + * @return true if "permission" is implied by the permissions in the + * PermissionCollection it belongs to, false if not. + */ + public boolean implies(Permission permission) + { + PermissionCollection pc =3D getPermissionCollection(permission, fals= e); + if (pc !=3D null) + { + return pc.implies(permission); + } + else + { + // none found + return false; + } + } + + = + /** + * Gets the PermissionCollection in this Permissions object for permiss= ions + * whose type is the same as that of p. For example, if p= is + * a FilePermission, the FilePermissionCollection stored in this Permis= sions + * object will be returned. + * = + * If createEmpty is true, this method creates a new PermissionCollecti= on + * object for the specified type of permission objects if one does not = yet + * exist. To do so, it first calls the newPermissionCollection + * method on p. Subclasses of class Permission override that met= hod + * if they need to store their permissions in a particular + * PermissionCollection object in order to provide the correct semantic= s when + * the PermissionCollection.implies method is called. If t= he + * call returns a PermissionCollection, that collection is stored in th= is + * Permissions object. If the call returns null and createEmpty is true= , then + * this method instantiates and stores a default PermissionCollection t= hat + * uses a hashtable to store its permission objects. + * = + * createEmpty is ignored when creating empty PermissionCollection for + * unresolved permissions because of the overhead of determining the + * PermissionCollection to use. + * = + * createEmpty should be set to false when this method is invoked from + * implies() because it incurs the additional overhead of creating and = adding + * an empty PermissionCollection that will just return false. It should= be + * set to true when invoked from add(). + */ + private PermissionCollection getPermissionCollection(Permission p, + boolean createEmpty) + { + Class c =3D p.getClass(); + + PermissionCollection pc =3D (PermissionCollection) permsMap.get(c); + if (!createEmpty) + { + return pc; + } + else if (pc =3D=3D null) + { + pc =3D p.newPermissionCollection(); = + if (pc !=3D null) + { + permsMap.put(c, pc); + } + } + return pc; + } = +} \ No newline at end of file Added: branches/JBoss_Portal_2_6_2_SecurityPatch/security/src/main/org/jbos= s/portal/security/impl/jacc/SecurityContext.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_2_6_2_SecurityPatch/security/src/main/org/jboss/p= ortal/security/impl/jacc/SecurityContext.java (rev = 0) +++ branches/JBoss_Portal_2_6_2_SecurityPatch/security/src/main/org/jboss/p= ortal/security/impl/jacc/SecurityContext.java 2007-10-24 18:59:17 UTC (rev = 8769) @@ -0,0 +1,134 @@ +/*************************************************************************= ***** + * JBoss, a division of Red Hat = * + * Copyright 2006, Red Hat Middleware, LLC, and individual = * + * contributors as indicated by the @authors tag. See the = * + * copyright.txt in the distribution for a full listing of = * + * individual contributors. = * + * = * + * This is free software; you can redistribute it and/or modify it = * + * under the terms of the GNU Lesser General Public License as = * + * published by the Free Software Foundation; either version 2.1 of = * + * the License, or (at your option) any later version. = * + * = * + * This software is distributed in the hope that it will be useful, = * + * but WITHOUT ANY WARRANTY; without even the implied warranty of = * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU = * + * Lesser General Public License for more details. = * + * = * + * You should have received a copy of the GNU Lesser General Public = * + * License along with this software; if not, write to the Free = * + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA = * + * 02110-1301 USA, or see the FSF site: http://www.fsf.org. = * + *************************************************************************= *****/ +package org.jboss.portal.security.impl.jacc; + +import java.security.Permission; +import java.security.Principal; +import java.security.ProtectionDomain; +import java.security.acl.Group; +import java.util.ArrayList; +import java.util.Enumeration; +import java.util.HashMap; + +/** + * @author Sohil Shah + */ +public class SecurityContext +{ + private Permissions uncheckedPermissions =3D null; + private HashMap rolePermissions =3D null; + + /** + * = + * + */ + SecurityContext() + { + this.uncheckedPermissions =3D new Permissions(); + this.rolePermissions =3D new HashMap(); + } + = + /** + * = + * @param roleName + * @param permission + */ + void addToRole(String roleName, Permission permission) + { + Permissions perms =3D (Permissions) this.rolePermissions.get(roleNam= e); + if (perms =3D=3D null) + { + perms =3D new Permissions(); + this.rolePermissions.put(roleName, perms); + } + perms.add(permission); + } + + = + /** + * = + * @param permission + */ + void addToUncheckedPolicy(Permission permission) + { + this.uncheckedPermissions.add(permission); + } + = + /** + * = + * @param domain + * @param permission + * @return + */ + boolean implies(ProtectionDomain domain, Permission permission) + { + boolean implied =3D false; + = + // Next see if this matches an unchecked permission + if( uncheckedPermissions.implies(permission) ) + { = + return true; = + } + + // Check principal to role permissions + Principal[] principals =3D domain.getPrincipals(); + int length =3D principals !=3D null ? principals.length : 0; + ArrayList princpalNames =3D new ArrayList(); + for(int n =3D 0; n < length; n ++) + { + Principal p =3D principals[n]; + if( p instanceof Group ) + { + Group g =3D (Group) p; + Enumeration iter =3D g.members(); + while( iter.hasMoreElements() ) + { + p =3D (Principal) iter.nextElement(); + String name =3D p.getName(); + princpalNames.add(name); + } + } + else + { + String name =3D p.getName(); + princpalNames.add(name); + } + } + if( princpalNames.size() > 0 ) + { + for(int n =3D 0; implied =3D=3D false && n < princpalNames.size()= ; n ++) + { + String name =3D (String) princpalNames.get(n); + Permissions perms =3D (Permissions) rolePermissions.get(name); + = + if( perms =3D=3D null ) + { + continue; + } + implied =3D perms.implies(permission); = + } + } = + + return implied; + } +} --===============6694037846108858967==-- From portal-commits at lists.jboss.org Thu Oct 25 01:49:35 2007 Content-Type: multipart/mixed; boundary="===============1977091776087136588==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8770 - branches/JBoss_Portal_2_6_2_JBPORTAL-1772/security/src/main/org/jboss/portal/security/impl/jacc. Date: Thu, 25 Oct 2007 01:49:35 -0400 Message-ID: --===============1977091776087136588== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: mageshbk(a)jboss.com Date: 2007-10-25 01:49:35 -0400 (Thu, 25 Oct 2007) New Revision: 8770 Added: branches/JBoss_Portal_2_6_2_JBPORTAL-1772/security/src/main/org/jboss/po= rtal/security/impl/jacc/Permissions.java branches/JBoss_Portal_2_6_2_JBPORTAL-1772/security/src/main/org/jboss/po= rtal/security/impl/jacc/SecurityContext.java Modified: branches/JBoss_Portal_2_6_2_JBPORTAL-1772/security/src/main/org/jboss/po= rtal/security/impl/jacc/JACCPortalAuthorizationManager.java branches/JBoss_Portal_2_6_2_JBPORTAL-1772/security/src/main/org/jboss/po= rtal/security/impl/jacc/JACCPortalAuthorizationManagerFactory.java Log: [JBPORTAL-1772] Security fixes for JBoss Portal 2.6.2 - Added changes for [= JBPORTAL-1481] Reimplement portal security interface without JACC Modified: branches/JBoss_Portal_2_6_2_JBPORTAL-1772/security/src/main/org/j= boss/portal/security/impl/jacc/JACCPortalAuthorizationManager.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_2_6_2_JBPORTAL-1772/security/src/main/org/jboss/p= ortal/security/impl/jacc/JACCPortalAuthorizationManager.java 2007-10-24 18:= 59:17 UTC (rev 8769) +++ branches/JBoss_Portal_2_6_2_JBPORTAL-1772/security/src/main/org/jboss/p= ortal/security/impl/jacc/JACCPortalAuthorizationManager.java 2007-10-25 05:= 49:35 UTC (rev 8770) @@ -68,6 +68,21 @@ = /** Used to retrieve the subject in hte jacc portal permission collecti= on. */ private static final ThreadLocal checkedSubjectLocal =3D new ThreadLoca= l(); + = + /** + * JACC bypass + */ + private SecurityContext securityContext =3D null; + = + /** + * JACC bypass = + * = + * @param securityContext + */ + void setSecurityContext(SecurityContext securityContext) + { + this.securityContext =3D securityContext; + } = public JACCPortalAuthorizationManager(JACCPortalAuthorizationManagerFac= tory factory) { @@ -84,7 +99,7 @@ = public void checkRoleConfig(String contextID, String roleName) throws P= ortalSecurityException { - Map configuredRoles =3D factory.configuredRoles; + /*Map configuredRoles =3D factory.configuredRoles; synchronized (configuredRoles) { // The policy configuration @@ -145,6 +160,36 @@ log.error("Error when commiting policy config", e); } } + }*/ + = + /** + * JACC bypass + */ + Map configuredRoles =3D factory.configuredRoles; + synchronized (configuredRoles) + { + if (!configuredRoles.containsKey(roleName)) + { + // Iterate over all domains to add their container + Collection domains =3D factory.getAuthorizationDomainRegistry(= ).getDomains(); + for (Iterator j =3D domains.iterator(); j.hasNext();) + { + AuthorizationDomain domain =3D (AuthorizationDomain)j.next(= ); + JACCPortalPermissionCollection collection =3D new JACCPorta= lPermissionCollection(roleName, domain); + PermissionFactory permissionFactory =3D domain.getPermissio= nFactory(); + PortalPermission container =3D permissionFactory.createPerm= issionContainer(collection); + = + if (SecurityConstants.UNCHECKED_ROLE_NAME.equals(roleName)) + { + this.securityContext.addToUncheckedPolicy(container); + } + else + { + this.securityContext.addToRole(roleName, container); + } + } + configuredRoles.put(roleName, roleName); + } } } = @@ -209,10 +254,23 @@ principals =3D new Principal[0]; } = - // + //Bypass the JACC layer and go straight to the portal security permi= ssion layer + /*ProtectionDomain pd =3D new ProtectionDomain(null, null, null, pri= ncipals); + Policy policy =3D Policy.getPolicy(); + boolean implied =3D policy.implies(pd, permission);*/ + = + /** + * alternately bypassing the call and not letting it go through the = + * JACC system. + * = + * There is not an issue with JBoss JACC implementation, but the Per= missions object + * in JDK5 which is leveraged by JACC. The synchrnozied block inside= Permissions object + * is causing performance bottleneck + */ ProtectionDomain pd =3D new ProtectionDomain(null, null, null, princ= ipals); - Policy policy =3D Policy.getPolicy(); - return policy.implies(pd, permission); + boolean implied =3D this.securityContext.implies(pd, permission); + = + return implied; } = = Modified: branches/JBoss_Portal_2_6_2_JBPORTAL-1772/security/src/main/org/j= boss/portal/security/impl/jacc/JACCPortalAuthorizationManagerFactory.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_2_6_2_JBPORTAL-1772/security/src/main/org/jboss/p= ortal/security/impl/jacc/JACCPortalAuthorizationManagerFactory.java 2007-10= -24 18:59:17 UTC (rev 8769) +++ branches/JBoss_Portal_2_6_2_JBPORTAL-1772/security/src/main/org/jboss/p= ortal/security/impl/jacc/JACCPortalAuthorizationManagerFactory.java 2007-10= -25 05:49:35 UTC (rev 8770) @@ -51,6 +51,11 @@ = /** The configured roles. */ final Map configuredRoles =3D new HashMap(); + = + /** + * JACC bypass + */ + private SecurityContext securityContext =3D null; = public AuthorizationDomainRegistry getAuthorizationDomainRegistry() { @@ -64,6 +69,14 @@ = public PortalAuthorizationManager getManager() { + JACCPortalAuthorizationManager manager =3D new JACCPortalAuthorizati= onManager(this); + = + if(this.securityContext =3D=3D null) + { + this.securityContext =3D new SecurityContext(); + } + = + manager.setSecurityContext(this.securityContext); return manager; } = @@ -95,5 +108,8 @@ = // Refresh policy.refresh(); + = + //JACC bypass + this.securityContext =3D new SecurityContext(); } } Added: branches/JBoss_Portal_2_6_2_JBPORTAL-1772/security/src/main/org/jbos= s/portal/security/impl/jacc/Permissions.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_2_6_2_JBPORTAL-1772/security/src/main/org/jboss/p= ortal/security/impl/jacc/Permissions.java (rev 0) +++ branches/JBoss_Portal_2_6_2_JBPORTAL-1772/security/src/main/org/jboss/p= ortal/security/impl/jacc/Permissions.java 2007-10-25 05:49:35 UTC (rev 8770) @@ -0,0 +1,167 @@ +/*************************************************************************= ***** + * JBoss, a division of Red Hat = * + * Copyright 2006, Red Hat Middleware, LLC, and individual = * + * contributors as indicated by the @authors tag. See the = * + * copyright.txt in the distribution for a full listing of = * + * individual contributors. = * + * = * + * This is free software; you can redistribute it and/or modify it = * + * under the terms of the GNU Lesser General Public License as = * + * published by the Free Software Foundation; either version 2.1 of = * + * the License, or (at your option) any later version. = * + * = * + * This software is distributed in the hope that it will be useful, = * + * but WITHOUT ANY WARRANTY; without even the implied warranty of = * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU = * + * Lesser General Public License for more details. = * + * = * + * You should have received a copy of the GNU Lesser General Public = * + * License along with this software; if not, write to the Free = * + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA = * + * 02110-1301 USA, or see the FSF site: http://www.fsf.org. = * + *************************************************************************= *****/ +package org.jboss.portal.security.impl.jacc; + +import java.util.Map; + +import java.security.Permission; +import java.security.PermissionCollection; + +import EDU.oswego.cs.dl.util.concurrent.ConcurrentHashMap; + +/** + * @author Sohil Shah + */ +public final class Permissions +{ + /** + * Key is permissions Class, value is PermissionCollection for that cla= ss. + * Not serialized; see serialization section at end of class. + */ + private transient Map permsMap =3D null; + + + /** + * Creates a new Permissions object containing no PermissionCollections. + */ + public Permissions() + { + this.permsMap =3D new ConcurrentHashMap(); + } + + /** + * Adds a permission object to the PermissionCollection for the class t= he + * permission belongs to. For example, if permission is a + * FilePermission, it is added to the FilePermissionCollection stored i= n this + * Permissions object. + * = + * This method creates a new PermissionCollection object (and adds the + * permission to it) if an appropriate collection does not yet exist. + *

+ * = + * @param permission + * the Permission object to add. + * = + * @exception SecurityException + * if this Permissions object is marked as readonly. + * = + * @see PermissionCollection#isReadOnly() + */ + public void add(Permission permission) + { = + PermissionCollection pc; + pc =3D getPermissionCollection(permission, true); + pc.add(permission); = + } + + /** + * Checks to see if this object's PermissionCollection for permissions = of the + * specified permission's type implies the permissions expressed in the + * permission object. Returns true if the combination of permiss= ions + * in the appropriate PermissionCollection (e.g., a FilePermissionColle= ction + * for a FilePermission) together imply the specified permission. + * = + *

+ * For example, suppose there is a FilePermissionCollection in this + * Permissions object, and it contains one FilePermission that specifies + * "read" access for all files in all subdirectories of the "/tmp" dire= ctory, + * and another FilePermission that specifies "write" access for all fil= es in + * the "/tmp/scratch/foo" directory. Then if the implies + * method is called with a permission specifying both "read" and "write" + * access to files in the "/tmp/scratch/foo" directory, true + * is returned. + * = + *

+ * Additionally, if this PermissionCollection contains the AllPermissio= n, + * this method will always return true. + *

+ * = + * @param permission + * the Permission object to check. + * = + * @return true if "permission" is implied by the permissions in the + * PermissionCollection it belongs to, false if not. + */ + public boolean implies(Permission permission) + { + PermissionCollection pc =3D getPermissionCollection(permission, fals= e); + if (pc !=3D null) + { + return pc.implies(permission); + } + else + { + // none found + return false; + } + } + + = + /** + * Gets the PermissionCollection in this Permissions object for permiss= ions + * whose type is the same as that of p. For example, if p= is + * a FilePermission, the FilePermissionCollection stored in this Permis= sions + * object will be returned. + * = + * If createEmpty is true, this method creates a new PermissionCollecti= on + * object for the specified type of permission objects if one does not = yet + * exist. To do so, it first calls the newPermissionCollection + * method on p. Subclasses of class Permission override that met= hod + * if they need to store their permissions in a particular + * PermissionCollection object in order to provide the correct semantic= s when + * the PermissionCollection.implies method is called. If t= he + * call returns a PermissionCollection, that collection is stored in th= is + * Permissions object. If the call returns null and createEmpty is true= , then + * this method instantiates and stores a default PermissionCollection t= hat + * uses a hashtable to store its permission objects. + * = + * createEmpty is ignored when creating empty PermissionCollection for + * unresolved permissions because of the overhead of determining the + * PermissionCollection to use. + * = + * createEmpty should be set to false when this method is invoked from + * implies() because it incurs the additional overhead of creating and = adding + * an empty PermissionCollection that will just return false. It should= be + * set to true when invoked from add(). + */ + private PermissionCollection getPermissionCollection(Permission p, + boolean createEmpty) + { + Class c =3D p.getClass(); + + PermissionCollection pc =3D (PermissionCollection) permsMap.get(c); + if (!createEmpty) + { + return pc; + } + else if (pc =3D=3D null) + { + pc =3D p.newPermissionCollection(); = + if (pc !=3D null) + { + permsMap.put(c, pc); + } + } + return pc; + } = +} \ No newline at end of file Property changes on: branches/JBoss_Portal_2_6_2_JBPORTAL-1772/security/src= /main/org/jboss/portal/security/impl/jacc/Permissions.java ___________________________________________________________________ Name: svn:keywords + Id Revision Name: svn:eol-style + LF Added: branches/JBoss_Portal_2_6_2_JBPORTAL-1772/security/src/main/org/jbos= s/portal/security/impl/jacc/SecurityContext.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_2_6_2_JBPORTAL-1772/security/src/main/org/jboss/p= ortal/security/impl/jacc/SecurityContext.java (rev = 0) +++ branches/JBoss_Portal_2_6_2_JBPORTAL-1772/security/src/main/org/jboss/p= ortal/security/impl/jacc/SecurityContext.java 2007-10-25 05:49:35 UTC (rev = 8770) @@ -0,0 +1,134 @@ +/*************************************************************************= ***** + * JBoss, a division of Red Hat = * + * Copyright 2006, Red Hat Middleware, LLC, and individual = * + * contributors as indicated by the @authors tag. See the = * + * copyright.txt in the distribution for a full listing of = * + * individual contributors. = * + * = * + * This is free software; you can redistribute it and/or modify it = * + * under the terms of the GNU Lesser General Public License as = * + * published by the Free Software Foundation; either version 2.1 of = * + * the License, or (at your option) any later version. = * + * = * + * This software is distributed in the hope that it will be useful, = * + * but WITHOUT ANY WARRANTY; without even the implied warranty of = * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU = * + * Lesser General Public License for more details. = * + * = * + * You should have received a copy of the GNU Lesser General Public = * + * License along with this software; if not, write to the Free = * + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA = * + * 02110-1301 USA, or see the FSF site: http://www.fsf.org. = * + *************************************************************************= *****/ +package org.jboss.portal.security.impl.jacc; + +import java.security.Permission; +import java.security.Principal; +import java.security.ProtectionDomain; +import java.security.acl.Group; +import java.util.ArrayList; +import java.util.Enumeration; +import java.util.HashMap; + +/** + * @author Sohil Shah + */ +public class SecurityContext +{ + private Permissions uncheckedPermissions =3D null; + private HashMap rolePermissions =3D null; + + /** + * = + * + */ + SecurityContext() + { + this.uncheckedPermissions =3D new Permissions(); + this.rolePermissions =3D new HashMap(); + } + = + /** + * = + * @param roleName + * @param permission + */ + void addToRole(String roleName, Permission permission) + { + Permissions perms =3D (Permissions) this.rolePermissions.get(roleNam= e); + if (perms =3D=3D null) + { + perms =3D new Permissions(); + this.rolePermissions.put(roleName, perms); + } + perms.add(permission); + } + + = + /** + * = + * @param permission + */ + void addToUncheckedPolicy(Permission permission) + { + this.uncheckedPermissions.add(permission); + } + = + /** + * = + * @param domain + * @param permission + * @return + */ + boolean implies(ProtectionDomain domain, Permission permission) + { + boolean implied =3D false; + = + // Next see if this matches an unchecked permission + if( uncheckedPermissions.implies(permission) ) + { = + return true; = + } + + // Check principal to role permissions + Principal[] principals =3D domain.getPrincipals(); + int length =3D principals !=3D null ? principals.length : 0; + ArrayList princpalNames =3D new ArrayList(); + for(int n =3D 0; n < length; n ++) + { + Principal p =3D principals[n]; + if( p instanceof Group ) + { + Group g =3D (Group) p; + Enumeration iter =3D g.members(); + while( iter.hasMoreElements() ) + { + p =3D (Principal) iter.nextElement(); + String name =3D p.getName(); + princpalNames.add(name); + } + } + else + { + String name =3D p.getName(); + princpalNames.add(name); + } + } + if( princpalNames.size() > 0 ) + { + for(int n =3D 0; implied =3D=3D false && n < princpalNames.size()= ; n ++) + { + String name =3D (String) princpalNames.get(n); + Permissions perms =3D (Permissions) rolePermissions.get(name); + = + if( perms =3D=3D null ) + { + continue; + } + implied =3D perms.implies(permission); = + } + } = + + return implied; + } +} Property changes on: branches/JBoss_Portal_2_6_2_JBPORTAL-1772/security/src= /main/org/jboss/portal/security/impl/jacc/SecurityContext.java ___________________________________________________________________ Name: svn:keywords + Id Revision Name: svn:eol-style + LF --===============1977091776087136588==-- From portal-commits at lists.jboss.org Thu Oct 25 04:24:21 2007 Content-Type: multipart/mixed; boundary="===============7307710632945724203==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8771 - branches/JBoss_Portal_Branch_2_6/security/src/main/org/jboss/portal/security/impl/jacc. Date: Thu, 25 Oct 2007 04:24:21 -0400 Message-ID: --===============7307710632945724203== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: mageshbk(a)jboss.com Date: 2007-10-25 04:24:21 -0400 (Thu, 25 Oct 2007) New Revision: 8771 Added: branches/JBoss_Portal_Branch_2_6/security/src/main/org/jboss/portal/secu= rity/impl/jacc/Permissions.java branches/JBoss_Portal_Branch_2_6/security/src/main/org/jboss/portal/secu= rity/impl/jacc/SecurityContext.java Modified: branches/JBoss_Portal_Branch_2_6/security/src/main/org/jboss/portal/secu= rity/impl/jacc/JACCPortalAuthorizationManager.java branches/JBoss_Portal_Branch_2_6/security/src/main/org/jboss/portal/secu= rity/impl/jacc/JACCPortalAuthorizationManagerFactory.java Log: [JBPORTAL-1481] Reimplement portal security interface without JACC Modified: branches/JBoss_Portal_Branch_2_6/security/src/main/org/jboss/port= al/security/impl/jacc/JACCPortalAuthorizationManager.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/security/src/main/org/jboss/portal/sec= urity/impl/jacc/JACCPortalAuthorizationManager.java 2007-10-25 05:49:35 UTC= (rev 8770) +++ branches/JBoss_Portal_Branch_2_6/security/src/main/org/jboss/portal/sec= urity/impl/jacc/JACCPortalAuthorizationManager.java 2007-10-25 08:24:21 UTC= (rev 8771) @@ -68,6 +68,21 @@ = /** Used to retrieve the subject in hte jacc portal permission collecti= on. */ private static final ThreadLocal checkedSubjectLocal =3D new ThreadLoca= l(); + = + /** + * JACC bypass + */ + private SecurityContext securityContext =3D null; + = + /** + * JACC bypass = + * = + * @param securityContext + */ + void setSecurityContext(SecurityContext securityContext) + { + this.securityContext =3D securityContext; + } = public JACCPortalAuthorizationManager(JACCPortalAuthorizationManagerFac= tory factory) { @@ -84,7 +99,7 @@ = public void checkRoleConfig(String contextID, String roleName) throws P= ortalSecurityException { - Map configuredRoles =3D factory.configuredRoles; + /*Map configuredRoles =3D factory.configuredRoles; synchronized (configuredRoles) { // The policy configuration @@ -145,6 +160,36 @@ log.error("Error when commiting policy config", e); } } + }*/ + = + /** + * JACC bypass + */ + Map configuredRoles =3D factory.configuredRoles; + synchronized (configuredRoles) + { + if (!configuredRoles.containsKey(roleName)) + { + // Iterate over all domains to add their container + Collection domains =3D factory.getAuthorizationDomainRegistry(= ).getDomains(); + for (Iterator j =3D domains.iterator(); j.hasNext();) + { + AuthorizationDomain domain =3D (AuthorizationDomain)j.next(= ); + JACCPortalPermissionCollection collection =3D new JACCPorta= lPermissionCollection(roleName, domain); + PermissionFactory permissionFactory =3D domain.getPermissio= nFactory(); + PortalPermission container =3D permissionFactory.createPerm= issionContainer(collection); + = + if (SecurityConstants.UNCHECKED_ROLE_NAME.equals(roleName)) + { + this.securityContext.addToUncheckedPolicy(container); + } + else + { + this.securityContext.addToRole(roleName, container); + } + } + configuredRoles.put(roleName, roleName); + } } } = @@ -209,10 +254,23 @@ principals =3D new Principal[0]; } = - // + //Bypass the JACC layer and go straight to the portal security permi= ssion layer + /*ProtectionDomain pd =3D new ProtectionDomain(null, null, null, pri= ncipals); + Policy policy =3D Policy.getPolicy(); + boolean implied =3D policy.implies(pd, permission);*/ + = + /** + * alternately bypassing the call and not letting it go through the = + * JACC system. + * = + * There is not an issue with JBoss JACC implementation, but the Per= missions object + * in JDK5 which is leveraged by JACC. The synchrnozied block inside= Permissions object + * is causing performance bottleneck + */ ProtectionDomain pd =3D new ProtectionDomain(null, null, null, princ= ipals); - Policy policy =3D Policy.getPolicy(); - return policy.implies(pd, permission); + boolean implied =3D this.securityContext.implies(pd, permission); + = + return implied; } = = Modified: branches/JBoss_Portal_Branch_2_6/security/src/main/org/jboss/port= al/security/impl/jacc/JACCPortalAuthorizationManagerFactory.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/security/src/main/org/jboss/portal/sec= urity/impl/jacc/JACCPortalAuthorizationManagerFactory.java 2007-10-25 05:49= :35 UTC (rev 8770) +++ branches/JBoss_Portal_Branch_2_6/security/src/main/org/jboss/portal/sec= urity/impl/jacc/JACCPortalAuthorizationManagerFactory.java 2007-10-25 08:24= :21 UTC (rev 8771) @@ -51,6 +51,11 @@ = /** The configured roles. */ final Map configuredRoles =3D new HashMap(); + = + /** + * JACC bypass + */ + private SecurityContext securityContext =3D null; = public AuthorizationDomainRegistry getAuthorizationDomainRegistry() { @@ -64,6 +69,14 @@ = public PortalAuthorizationManager getManager() { + JACCPortalAuthorizationManager manager =3D new JACCPortalAuthorizati= onManager(this); + = + if(this.securityContext =3D=3D null) + { + this.securityContext =3D new SecurityContext(); + } + = + manager.setSecurityContext(this.securityContext); return manager; } = @@ -95,5 +108,8 @@ = // Refresh policy.refresh(); + = + //JACC bypass + this.securityContext =3D new SecurityContext(); } } Added: branches/JBoss_Portal_Branch_2_6/security/src/main/org/jboss/portal/= security/impl/jacc/Permissions.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/security/src/main/org/jboss/portal/sec= urity/impl/jacc/Permissions.java (rev 0) +++ branches/JBoss_Portal_Branch_2_6/security/src/main/org/jboss/portal/sec= urity/impl/jacc/Permissions.java 2007-10-25 08:24:21 UTC (rev 8771) @@ -0,0 +1,167 @@ +/*************************************************************************= ***** + * JBoss, a division of Red Hat = * + * Copyright 2006, Red Hat Middleware, LLC, and individual = * + * contributors as indicated by the @authors tag. See the = * + * copyright.txt in the distribution for a full listing of = * + * individual contributors. = * + * = * + * This is free software; you can redistribute it and/or modify it = * + * under the terms of the GNU Lesser General Public License as = * + * published by the Free Software Foundation; either version 2.1 of = * + * the License, or (at your option) any later version. = * + * = * + * This software is distributed in the hope that it will be useful, = * + * but WITHOUT ANY WARRANTY; without even the implied warranty of = * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU = * + * Lesser General Public License for more details. = * + * = * + * You should have received a copy of the GNU Lesser General Public = * + * License along with this software; if not, write to the Free = * + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA = * + * 02110-1301 USA, or see the FSF site: http://www.fsf.org. = * + *************************************************************************= *****/ +package org.jboss.portal.security.impl.jacc; + +import java.util.Map; + +import java.security.Permission; +import java.security.PermissionCollection; + +import EDU.oswego.cs.dl.util.concurrent.ConcurrentHashMap; + +/** + * @author Sohil Shah + */ +public final class Permissions +{ + /** + * Key is permissions Class, value is PermissionCollection for that cla= ss. + * Not serialized; see serialization section at end of class. + */ + private transient Map permsMap =3D null; + + + /** + * Creates a new Permissions object containing no PermissionCollections. + */ + public Permissions() + { + this.permsMap =3D new ConcurrentHashMap(); + } + + /** + * Adds a permission object to the PermissionCollection for the class t= he + * permission belongs to. For example, if permission is a + * FilePermission, it is added to the FilePermissionCollection stored i= n this + * Permissions object. + * = + * This method creates a new PermissionCollection object (and adds the + * permission to it) if an appropriate collection does not yet exist. + *

+ * = + * @param permission + * the Permission object to add. + * = + * @exception SecurityException + * if this Permissions object is marked as readonly. + * = + * @see PermissionCollection#isReadOnly() + */ + public void add(Permission permission) + { = + PermissionCollection pc; + pc =3D getPermissionCollection(permission, true); + pc.add(permission); = + } + + /** + * Checks to see if this object's PermissionCollection for permissions = of the + * specified permission's type implies the permissions expressed in the + * permission object. Returns true if the combination of permiss= ions + * in the appropriate PermissionCollection (e.g., a FilePermissionColle= ction + * for a FilePermission) together imply the specified permission. + * = + *

+ * For example, suppose there is a FilePermissionCollection in this + * Permissions object, and it contains one FilePermission that specifies + * "read" access for all files in all subdirectories of the "/tmp" dire= ctory, + * and another FilePermission that specifies "write" access for all fil= es in + * the "/tmp/scratch/foo" directory. Then if the implies + * method is called with a permission specifying both "read" and "write" + * access to files in the "/tmp/scratch/foo" directory, true + * is returned. + * = + *

+ * Additionally, if this PermissionCollection contains the AllPermissio= n, + * this method will always return true. + *

+ * = + * @param permission + * the Permission object to check. + * = + * @return true if "permission" is implied by the permissions in the + * PermissionCollection it belongs to, false if not. + */ + public boolean implies(Permission permission) + { + PermissionCollection pc =3D getPermissionCollection(permission, fals= e); + if (pc !=3D null) + { + return pc.implies(permission); + } + else + { + // none found + return false; + } + } + + = + /** + * Gets the PermissionCollection in this Permissions object for permiss= ions + * whose type is the same as that of p. For example, if p= is + * a FilePermission, the FilePermissionCollection stored in this Permis= sions + * object will be returned. + * = + * If createEmpty is true, this method creates a new PermissionCollecti= on + * object for the specified type of permission objects if one does not = yet + * exist. To do so, it first calls the newPermissionCollection + * method on p. Subclasses of class Permission override that met= hod + * if they need to store their permissions in a particular + * PermissionCollection object in order to provide the correct semantic= s when + * the PermissionCollection.implies method is called. If t= he + * call returns a PermissionCollection, that collection is stored in th= is + * Permissions object. If the call returns null and createEmpty is true= , then + * this method instantiates and stores a default PermissionCollection t= hat + * uses a hashtable to store its permission objects. + * = + * createEmpty is ignored when creating empty PermissionCollection for + * unresolved permissions because of the overhead of determining the + * PermissionCollection to use. + * = + * createEmpty should be set to false when this method is invoked from + * implies() because it incurs the additional overhead of creating and = adding + * an empty PermissionCollection that will just return false. It should= be + * set to true when invoked from add(). + */ + private PermissionCollection getPermissionCollection(Permission p, + boolean createEmpty) + { + Class c =3D p.getClass(); + + PermissionCollection pc =3D (PermissionCollection) permsMap.get(c); + if (!createEmpty) + { + return pc; + } + else if (pc =3D=3D null) + { + pc =3D p.newPermissionCollection(); = + if (pc !=3D null) + { + permsMap.put(c, pc); + } + } + return pc; + } = +} \ No newline at end of file Property changes on: branches/JBoss_Portal_Branch_2_6/security/src/main/org= /jboss/portal/security/impl/jacc/Permissions.java ___________________________________________________________________ Name: svn:keywords + Id Revision Name: svn:eol-style + LF Added: branches/JBoss_Portal_Branch_2_6/security/src/main/org/jboss/portal/= security/impl/jacc/SecurityContext.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/security/src/main/org/jboss/portal/sec= urity/impl/jacc/SecurityContext.java (rev 0) +++ branches/JBoss_Portal_Branch_2_6/security/src/main/org/jboss/portal/sec= urity/impl/jacc/SecurityContext.java 2007-10-25 08:24:21 UTC (rev 8771) @@ -0,0 +1,134 @@ +/*************************************************************************= ***** + * JBoss, a division of Red Hat = * + * Copyright 2006, Red Hat Middleware, LLC, and individual = * + * contributors as indicated by the @authors tag. See the = * + * copyright.txt in the distribution for a full listing of = * + * individual contributors. = * + * = * + * This is free software; you can redistribute it and/or modify it = * + * under the terms of the GNU Lesser General Public License as = * + * published by the Free Software Foundation; either version 2.1 of = * + * the License, or (at your option) any later version. = * + * = * + * This software is distributed in the hope that it will be useful, = * + * but WITHOUT ANY WARRANTY; without even the implied warranty of = * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU = * + * Lesser General Public License for more details. = * + * = * + * You should have received a copy of the GNU Lesser General Public = * + * License along with this software; if not, write to the Free = * + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA = * + * 02110-1301 USA, or see the FSF site: http://www.fsf.org. = * + *************************************************************************= *****/ +package org.jboss.portal.security.impl.jacc; + +import java.security.Permission; +import java.security.Principal; +import java.security.ProtectionDomain; +import java.security.acl.Group; +import java.util.ArrayList; +import java.util.Enumeration; +import java.util.HashMap; + +/** + * @author Sohil Shah + */ +public class SecurityContext +{ + private Permissions uncheckedPermissions =3D null; + private HashMap rolePermissions =3D null; + + /** + * = + * + */ + SecurityContext() + { + this.uncheckedPermissions =3D new Permissions(); + this.rolePermissions =3D new HashMap(); + } + = + /** + * = + * @param roleName + * @param permission + */ + void addToRole(String roleName, Permission permission) + { + Permissions perms =3D (Permissions) this.rolePermissions.get(roleNam= e); + if (perms =3D=3D null) + { + perms =3D new Permissions(); + this.rolePermissions.put(roleName, perms); + } + perms.add(permission); + } + + = + /** + * = + * @param permission + */ + void addToUncheckedPolicy(Permission permission) + { + this.uncheckedPermissions.add(permission); + } + = + /** + * = + * @param domain + * @param permission + * @return + */ + boolean implies(ProtectionDomain domain, Permission permission) + { + boolean implied =3D false; + = + // Next see if this matches an unchecked permission + if( uncheckedPermissions.implies(permission) ) + { = + return true; = + } + + // Check principal to role permissions + Principal[] principals =3D domain.getPrincipals(); + int length =3D principals !=3D null ? principals.length : 0; + ArrayList princpalNames =3D new ArrayList(); + for(int n =3D 0; n < length; n ++) + { + Principal p =3D principals[n]; + if( p instanceof Group ) + { + Group g =3D (Group) p; + Enumeration iter =3D g.members(); + while( iter.hasMoreElements() ) + { + p =3D (Principal) iter.nextElement(); + String name =3D p.getName(); + princpalNames.add(name); + } + } + else + { + String name =3D p.getName(); + princpalNames.add(name); + } + } + if( princpalNames.size() > 0 ) + { + for(int n =3D 0; implied =3D=3D false && n < princpalNames.size()= ; n ++) + { + String name =3D (String) princpalNames.get(n); + Permissions perms =3D (Permissions) rolePermissions.get(name); + = + if( perms =3D=3D null ) + { + continue; + } + implied =3D perms.implies(permission); = + } + } = + + return implied; + } +} Property changes on: branches/JBoss_Portal_Branch_2_6/security/src/main/org= /jboss/portal/security/impl/jacc/SecurityContext.java ___________________________________________________________________ Name: svn:keywords + Id Revision Name: svn:eol-style + LF --===============7307710632945724203==-- From portal-commits at lists.jboss.org Thu Oct 25 08:51:20 2007 Content-Type: multipart/mixed; boundary="===============6419715034885491033==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8772 - in branches/JBoss_Portal_Branch_2_6/wsrp: src/resources/tests/test-consumer-jar/org/jboss/portal/test/wsrp/consumer and 1 other directory. Date: Thu, 25 Oct 2007 08:51:19 -0400 Message-ID: --===============6419715034885491033== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: chris.laprun(a)jboss.com Date: 2007-10-25 08:51:19 -0400 (Thu, 25 Oct 2007) New Revision: 8772 Modified: branches/JBoss_Portal_Branch_2_6/wsrp/build.xml branches/JBoss_Portal_Branch_2_6/wsrp/src/resources/tests/test-consumer-= jar/org/jboss/portal/test/wsrp/consumer/persistent-jboss-beans.xml Log: - Fixed incorrect path to Hibernate configuration which was causing Consume= rRegistryTestCase to fail. Modified: branches/JBoss_Portal_Branch_2_6/wsrp/build.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/wsrp/build.xml 2007-10-25 08:24:21 UTC= (rev 8771) +++ branches/JBoss_Portal_Branch_2_6/wsrp/build.xml 2007-10-25 12:51:19 UTC= (rev 8772) @@ -831,7 +831,7 @@ - + = Modified: branches/JBoss_Portal_Branch_2_6/wsrp/src/resources/tests/test-co= nsumer-jar/org/jboss/portal/test/wsrp/consumer/persistent-jboss-beans.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/wsrp/src/resources/tests/test-consumer= -jar/org/jboss/portal/test/wsrp/consumer/persistent-jboss-beans.xml 2007-10= -25 08:24:21 UTC (rev 8771) +++ branches/JBoss_Portal_Branch_2_6/wsrp/src/resources/tests/test-consumer= -jar/org/jboss/portal/test/wsrp/consumer/persistent-jboss-beans.xml 2007-10= -25 12:51:19 UTC (rev 8772) @@ -60,7 +60,7 @@ - conf/consumer/hibernate/domain.hbm.xml + conf/hibernate/consumer/domain.hbm.xml java:/SessionFactory --===============6419715034885491033==-- From portal-commits at lists.jboss.org Thu Oct 25 08:52:27 2007 Content-Type: multipart/mixed; boundary="===============4492738279282389136==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8773 - branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/wsrp/producer. Date: Thu, 25 Oct 2007 08:52:26 -0400 Message-ID: --===============4492738279282389136== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: chris.laprun(a)jboss.com Date: 2007-10-25 08:52:26 -0400 (Thu, 25 Oct 2007) New Revision: 8773 Modified: branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/wsrp/pro= ducer/ActionRequestProcessor.java Log: - Minor clean-up. Modified: branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/w= srp/producer/ActionRequestProcessor.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/wsrp/pr= oducer/ActionRequestProcessor.java 2007-10-25 12:51:19 UTC (rev 8772) +++ branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/wsrp/pr= oducer/ActionRequestProcessor.java 2007-10-25 12:52:26 UTC (rev 8773) @@ -119,11 +119,6 @@ = StateString interactionState =3D createNavigationalState(interaction= Params.getInteractionState()); = - /*WSRPActionContext actionContext =3D new WSRPActionContext(navigati= onalState, securityContext, markupInfo, - portalContext, userContext, instanceContext, windowContext, - WSRPUtils.getJSR168PortletModeFromWSRPName(markupRequest.getMode(= )), - WSRPUtils.getJSR168WindowStateFromWSRPName(markupRequest.getWindo= wState()), interactionState, parameters, - markupRequest.getCharacterSet(), markupRequest.getMimeType());*/ WSRPActionContext actionContext =3D WSRPActionContext.createActionCo= ntext(navigationalState, securityContext, markupInfo, portalContext, userContext, instanceContext, windowCo= ntext, markupRequest, interactionState, interactionParams); @@ -162,7 +157,7 @@ = private String getNewStateOrNull(RenderResponse renderResult, boolean f= orMode) { - Object state =3D forMode ? (Object)renderResult.getMode() : renderRe= sult.getWindowState(); + Object state =3D forMode ? renderResult.getMode() : renderResult.get= WindowState(); return state !=3D null ? state.toString() : null; } } --===============4492738279282389136==-- From portal-commits at lists.jboss.org Thu Oct 25 08:52:34 2007 Content-Type: multipart/mixed; boundary="===============5442754894006008974==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8774 - in modules/test/trunk: build/ide/intellij/idea60/modules/test and 24 other directories. Date: Thu, 25 Oct 2007 08:52:32 -0400 Message-ID: --===============5442754894006008974== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: bdaw Date: 2007-10-25 08:52:32 -0400 (Thu, 25 Oct 2007) New Revision: 8774 Added: modules/test/trunk/mc/pom.xml modules/test/trunk/remote/pom.xml modules/test/trunk/test/agent/ modules/test/trunk/test/agent/resources/ modules/test/trunk/test/agent/resources/META-INF/ modules/test/trunk/test/core/ modules/test/trunk/test/core/pom.xml modules/test/trunk/test/core/resources/ modules/test/trunk/test/core/resources/META-INF/ modules/test/trunk/test/core/resources/META-INF/portal-test-lib-jar.mf modules/test/trunk/test/core/resources/config/ modules/test/trunk/test/core/resources/config/datasources.xml modules/test/trunk/test/core/resources/config/directories-extrolemodule.= xml modules/test/trunk/test/core/resources/config/directories-extusermodule.= xml modules/test/trunk/test/core/resources/config/directories-identity.xml modules/test/trunk/test/core/resources/config/directories-simplerolemodu= le.xml modules/test/trunk/test/core/resources/config/directories-simpleusermodu= le.xml modules/test/trunk/test/core/resources/config/directories-staticgroupmem= bership.xml modules/test/trunk/test/core/resources/config/directories-staticrolememb= ership.xml modules/test/trunk/test/core/resources/config/directories-userprofilemod= ule.xml modules/test/trunk/test/core/resources/config/directories.xml modules/test/trunk/test/core/resources/config/hibernates.xml modules/test/trunk/test/core/resources/config/opends/ modules/test/trunk/test/core/resources/config/opends/config/ modules/test/trunk/test/core/resources/config/opends/config/config.ldif modules/test/trunk/test/core/resources/config/opends/config/schema/ modules/test/trunk/test/core/resources/config/opends/config/schema/00-co= re.ldif modules/test/trunk/test/core/resources/config/opends/config/schema/01-pw= policy.ldif modules/test/trunk/test/core/resources/config/opends/config/schema/02-co= nfig.ldif modules/test/trunk/test/core/resources/config/opends/config/schema/03-ch= angelog.ldif modules/test/trunk/test/core/resources/config/opends/config/schema/03-rf= c2713.ldif modules/test/trunk/test/core/resources/config/opends/config/schema/03-rf= c2714.ldif modules/test/trunk/test/core/resources/config/opends/config/schema/03-rf= c2739.ldif modules/test/trunk/test/core/resources/config/opends/config/schema/03-rf= c2926.ldif modules/test/trunk/test/core/resources/config/opends/config/schema/03-rf= c3112.ldif modules/test/trunk/test/core/resources/config/opends/config/schema/03-rf= c3712.ldif modules/test/trunk/test/core/resources/config/opends/config/schema/03-ud= div3.ldif modules/test/trunk/test/core/resources/config/opends/config/schema/04-rf= c2307bis.ldif modules/test/trunk/test/core/resources/config/opends/config/schema/05-ot= her.ldif modules/test/trunk/test/core/resources/config/opends/db/ modules/test/trunk/test/core/resources/config/opends/db/dummy modules/test/trunk/test/core/resources/config/opends/ldif/ modules/test/trunk/test/core/resources/config/opends/ldif/example1.ldif modules/test/trunk/test/core/resources/config/opends/locks/ modules/test/trunk/test/core/resources/config/opends/locks/dummy modules/test/trunk/test/core/resources/config/opends/logs/ modules/test/trunk/test/core/resources/config/opends/logs/access modules/test/trunk/test/core/resources/config/opends/logs/debug modules/test/trunk/test/core/resources/config/opends/logs/errors modules/test/trunk/test/generic/ modules/test/trunk/test/generic/pom.xml modules/test/trunk/test/generic/resources/ modules/test/trunk/test/generic/resources/org/ modules/test/trunk/test/jboss/ modules/test/trunk/test/jboss/resources/ modules/test/trunk/test/jboss/resources/org/ modules/test/trunk/test/src/main/java/ modules/test/trunk/test/src/main/java/org/ modules/test/trunk/test/src/main/resources/ modules/test/trunk/tooling/pom.xml Removed: modules/test/trunk/test/src/etc/ modules/test/trunk/test/src/main/org/ modules/test/trunk/test/src/resources/ Modified: modules/test/trunk/build/ide/intellij/idea60/modules/test/test.iml modules/test/trunk/pom.xml modules/test/trunk/test/build.xml Log: followup with test module reorg for maven convention (some of poms not func= tional yet) Modified: modules/test/trunk/build/ide/intellij/idea60/modules/test/test.iml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/build/ide/intellij/idea60/modules/test/test.iml 2007= -10-25 12:52:26 UTC (rev 8773) +++ modules/test/trunk/build/ide/intellij/idea60/modules/test/test.iml 2007= -10-25 12:52:32 UTC (rev 8774) @@ -4,7 +4,7 @@ - + Added: modules/test/trunk/mc/pom.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/mc/pom.xml (rev 0) +++ modules/test/trunk/mc/pom.xml 2007-10-25 12:52:32 UTC (rev 8774) @@ -0,0 +1,43 @@ + + + org.jboss.portal.test + jboss-portal-modules-test-root + 1.1.0-SNAPSHOT + + 4.0.0 + jboss-portal-modules-test-mc + jar + JBoss Portal Modules Test MC + + + + org.jboss.portal.test + jboss-portal-modules-test-unit + 1.1.0-SNAPSHOT + + + org.jboss.microcontainer + jboss-kernel + 2.0.0.Beta4 + + + + + = + + + org.apache.maven.plugins + maven-surefire-plugin + + true + + + + + + + + + + Modified: modules/test/trunk/pom.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/pom.xml 2007-10-25 12:52:26 UTC (rev 8773) +++ modules/test/trunk/pom.xml 2007-10-25 12:52:32 UTC (rev 8774) @@ -124,6 +124,11 @@ = unit + tooling + mc + + + = = Added: modules/test/trunk/remote/pom.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/remote/pom.xml (rev 0) +++ modules/test/trunk/remote/pom.xml 2007-10-25 12:52:32 UTC (rev 8774) @@ -0,0 +1,58 @@ + + + org.jboss.portal.test + jboss-portal-modules-test-root + 1.1.0-SNAPSHOT + + 4.0.0 + jboss-portal-modules-test-remote + jar + JBoss Portal Modules Common Remote + + + + org.jboss.portal.test + jboss-portal-modules-test-unit + 1.1.0-SNAPSHOT + + + org.jboss.portal.common + jboss-portal-modules-common + 1.1.0-SNAPSHOT + + + + + + + + apache-httpclient + commons-httpclient + 2.0.2 + + + org.jboss.microcontainer + jboss-kernel + 2.0.0.Beta4 + + + + + + + + org.apache.maven.plugins + maven-surefire-plugin + + true + + + + + + + + + + \ No newline at end of file Copied: modules/test/trunk/test/agent/resources/META-INF (from rev 8771, mo= dules/test/trunk/test/src/resources/portal-test-agent-sar/META-INF) Modified: modules/test/trunk/test/build.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/test/build.xml 2007-10-25 12:52:26 UTC (rev 8773) +++ modules/test/trunk/test/build.xml 2007-10-25 12:52:32 UTC (rev 8774) @@ -136,13 +136,12 @@ = - + = @@ -168,51 +167,25 @@ includeAntRuntime=3D"${javac.include.ant.runtime}" includeJavaRuntime=3D"${javac.include.java.runtime}" failonerror=3D"${javac.fail.onerror}"> - + = - - = = - - + + + + + + + = - - - - - - - - - - - - - - - - - = + @@ -228,7 +201,7 @@ = - + @@ -236,25 +209,25 @@ = - + - + = - + - + = - + @@ -268,10 +241,10 @@ - + - + = @@ -335,50 +308,36 @@ --> = - + = - - - - - - + + + + + + = - + = - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + = - + = - - - - - = Added: modules/test/trunk/test/core/pom.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/test/core/pom.xml (rev 0) +++ modules/test/trunk/test/core/pom.xml 2007-10-25 12:52:32 UTC (rev 8774) @@ -0,0 +1,79 @@ + + + org.jboss.portal.test + jboss-portal-modules-test-root + 1.1.0-SNAPSHOT + + 4.0.0 + jboss-portal-modules-test-core + jar + JBoss Portal Modules Test Core + + + + org.jboss.portal.common + jboss-portal-modules-common + 1.1.0-SNAPSHOT + + + cargo + cargo + 0.5 + + + sun-opends + opends-core + 1.0.0-BUILD04 + + + hibernate + hibernate3 + 3.2.3.GA + + + dom4j + dom4j + 1.6.1 + + + jboss.jbossas.core-libs + jboss-client + 4.0.3.SP1 + + + + + + + + + + ../src/main/java + + + + maven-compiler-plugin + + + org/jboss/portal/test/framework/runner/** + org/jboss/portal/test/framework/impl/** + org/jboss/test/** + + + + + org.apache.maven.plugins + maven-surefire-plugin + + true + + + + + + + + + + Added: modules/test/trunk/test/core/resources/META-INF/portal-test-lib-jar.= mf =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/test/core/resources/META-INF/portal-test-lib-jar.mf = (rev 0) +++ modules/test/trunk/test/core/resources/META-INF/portal-test-lib-jar.mf = 2007-10-25 12:52:32 UTC (rev 8774) @@ -0,0 +1,10 @@ +Manifest-Version: 1.0 +Created-By: @java.vm.version@ (@java.vm.vendor@) +Specification-Title: @specification.title@ +Specification-Version: @specification.version@ +Specification-Vendor: @specification.vendor@ +Implementation-Title: @implementation.title@ +Implementation-URL: @implementation.url@ +Implementation-Version: @implementation.version@ +Implementation-Vendor: @implementation.vendor@ +Implementation-Vendor-Id: @implementation.vendor.id@ Property changes on: modules/test/trunk/test/core/resources/META-INF/portal= -test-lib-jar.mf ___________________________________________________________________ Name: svn:executable + * Added: modules/test/trunk/test/core/resources/config/datasources.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/test/core/resources/config/datasources.xml = (rev 0) +++ modules/test/trunk/test/core/resources/config/datasources.xml 2007-10-2= 5 12:52:32 UTC (rev 8774) @@ -0,0 +1,60 @@ + + + + + + hsqldb + jdbc:hsqldb:file:test + org.hsqldb.jdbcDriver + sa + + + + + = + Property changes on: modules/test/trunk/test/core/resources/config/datasour= ces.xml ___________________________________________________________________ Name: svn:executable + * Added: modules/test/trunk/test/core/resources/config/directories-extrolemod= ule.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/test/core/resources/config/directories-extrolemodule= .xml (rev 0) +++ modules/test/trunk/test/core/resources/config/directories-extrolemodule= .xml 2007-10-25 12:52:32 UTC (rev 8774) @@ -0,0 +1,94 @@ + + + + + OpenDS + OpenDS service deployed on JBoss AS as an mbean + test/config/extrole/opends-config.xml + localhost + 10389 + com.sun.jndi.ldap.LdapCtxFactory + cn=3DDirectory Manager + password + test/ldif/initial-tests-qa-opends.ldif + dc=3Dexample,dc=3Dcom + + + Sun DS + Sun DS in QA Labs + test/config/extrole/sunds-config.xml + dev39.qa.atl.jboss.com + 1389 + com.sun.jndi.ldap.LdapCtxFactory + cn=3DDirectory Manager + testldap + test/ldif/initial-tests-qa-sunds.ldif + dc=3Dexample,dc=3Dcom + + + RedHatDS + RedHat Directory in QA Labs (need vpn access) + + test/config/extrole/rhds-config.xml + dev39.qa.atl.jboss.com + 10389 + com.sun.jndi.ldap.LdapCtxFactory + cn=3DDirectory Manager + qpq123qpq + + test/ldif/initial-tests-qa.ldif + + dc=3Dtestsuite,dc=3Dportal,dc=3Dqa,dc=3Datl,dc=3Djboss,d= c=3Dcom + + + OpenLDAP + OpenLDAP Directory in QA Labs (need vpn access) + + test/config/extrole/openldap-config.xml + dev39.qa.atl.jboss.com + 389 + com.sun.jndi.ldap.LdapCtxFactory + cn=3DManager,dc=3Dmy-domain,dc=3Dcom + jbossqa + + test/ldif/initial-tests-qa-openldap.ldif + + dc=3Dtestsuite,dc=3Dportal,dc=3Dmy-domain,dc=3Dcom + + + Added: modules/test/trunk/test/core/resources/config/directories-extusermod= ule.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/test/core/resources/config/directories-extusermodule= .xml (rev 0) +++ modules/test/trunk/test/core/resources/config/directories-extusermodule= .xml 2007-10-25 12:52:32 UTC (rev 8774) @@ -0,0 +1,94 @@ + + + + + OpenDS + OpenDS service deployed on JBoss AS as an mbean + test/config/extuser/opends-config.xml + localhost + 10389 + com.sun.jndi.ldap.LdapCtxFactory + cn=3DDirectory Manager + password + test/ldif/initial-tests-qa-opends.ldif + dc=3Dexample,dc=3Dcom + + + Sun DS + Sun DS in QA Labs + test/config/extuser/sunds-config.xml + dev39.qa.atl.jboss.com + 1389 + com.sun.jndi.ldap.LdapCtxFactory + cn=3DDirectory Manager + testldap + test/ldif/initial-tests-qa-sunds.ldif + dc=3Dexample,dc=3Dcom + + + RedHatDS + RedHat Directory in QA Labs (need vpn access) + test/config/extuser/rhds-config.xml + dev39.qa.atl.jboss.com + 10389 + com.sun.jndi.ldap.LdapCtxFactory + cn=3DDirectory Manager + qpq123qpq + + test/ldif/initial-tests-qa.ldif + + dc=3Dtestsuite,dc=3Dportal,dc=3Dqa,dc=3Datl,dc=3Djboss,d= c=3Dcom + + + + OpenLDAP + OpenLDAP Directory in QA Labs (need vpn access) + + test/config/extuser/openldap-config.xml + dev39.qa.atl.jboss.com + 389 + com.sun.jndi.ldap.LdapCtxFactory + cn=3DManager,dc=3Dmy-domain,dc=3Dcom + jbossqa + + test/ldif/initial-tests-qa-openldap.ldif + + dc=3Dtestsuite,dc=3Dportal,dc=3Dmy-domain,dc=3Dcom + + + Added: modules/test/trunk/test/core/resources/config/directories-identity.x= ml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/test/core/resources/config/directories-identity.xml = (rev 0) +++ modules/test/trunk/test/core/resources/config/directories-identity.xml = 2007-10-25 12:52:32 UTC (rev 8774) @@ -0,0 +1,136 @@ + + + + + OpenDS + OpenDS service deployed on JBoss AS as an mbean -Static= GroupMembership config + + test/config/identity/opends-config.xml + localhost + 10389 + com.sun.jndi.ldap.LdapCtxFactory + cn=3DDirectory Manager + password + test/ldif/initial-tests-notpopulated-opends.ldif + dc=3Dexample,dc=3Dcom + + + OpenDS - StaticRoleMembership + OpenDS service deployed on JBoss AS as an mbean - Stati= cRoleMembership config + test/config/identity/opends-config-staticrole.xml + localhost + 10389 + com.sun.jndi.ldap.LdapCtxFactory + cn=3DDirectory Manager + password + test/ldif/initial-tests-notpopulated-opends.ldif + dc=3Dexample,dc=3Dcom + + + Sun DS + Sun DS in QA Labs - StaticGroupMembership config + + test/config/identity/sunds-config.xml + dev39.qa.atl.jboss.com + 1389 + com.sun.jndi.ldap.LdapCtxFactory + cn=3DDirectory Manager + testldap + test/ldif/initial-tests-notpopulated-sunds.ldif + dc=3Dexample,dc=3Dcom + + + Sun DS - StaticRoleMembership + Sun DS in QA Labs - StaticRoleMembership config + test/config/identity/sunds-config-staticrole.xml + dev39.qa.atl.jboss.com + 1389 + com.sun.jndi.ldap.LdapCtxFactory + cn=3DDirectory Manager + testldap + test/ldif/initial-tests-notpopulated-sunds.ldif + dc=3Dexample,dc=3Dcom + + + RedHatDS + RedHat Directory in QA Labs (need vpn access) - StaticG= roupMembership config + + test/config/identity/rhds-config.xml + dev39.qa.atl.jboss.com + 10389 + com.sun.jndi.ldap.LdapCtxFactory + cn=3DDirectory Manager + qpq123qpq + + test/ldif/initial-tests-notpopulated.ldif + + dc=3Dtestsuite,dc=3Dportal,dc=3Dqa,dc=3Datl,dc=3Djboss,d= c=3Dcom + + + RedHatDS + RedHat Directory in QA Labs (need vpn access) - StaticR= oleMembership config + + test/config/identity/rhds-config-staticrole.xml + dev39.qa.atl.jboss.com + 10389 + com.sun.jndi.ldap.LdapCtxFactory + cn=3DDirectory Manager + qpq123qpq + + test/ldif/initial-tests-notpopulated.ldif + + dc=3Dtestsuite,dc=3Dportal,dc=3Dqa,dc=3Datl,dc=3Djboss,d= c=3Dcom + + + + OpenLDAP + OpenLDAP Directory in QA Labs (need vpn access) - Stati= cGroupMembership config + + test/config/identity/openldap-config.xml + dev39.qa.atl.jboss.com + 389 + com.sun.jndi.ldap.LdapCtxFactory + cn=3DManager,dc=3Dmy-domain,dc=3Dcom + jbossqa + + test/ldif/initial-tests-notpopulated-openldap.ldif + + dc=3Dtestsuite,dc=3Dportal,dc=3Dmy-domain,dc=3Dcom + + + Added: modules/test/trunk/test/core/resources/config/directories-simplerole= module.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/test/core/resources/config/directories-simplerolemod= ule.xml (rev 0) +++ modules/test/trunk/test/core/resources/config/directories-simplerolemod= ule.xml 2007-10-25 12:52:32 UTC (rev 8774) @@ -0,0 +1,100 @@ + + + + + OpenDS + OpenDS service deployed on JBoss AS as an mbean + + test/config/opends-config.xml + localhost + 10389 + com.sun.jndi.ldap.LdapCtxFactory + cn=3DDirectory Manager + password + + test/ldif/initial-tests-qa-opends.ldif + + dc=3Dexample,dc=3Dcom + + + Sun DS + Sun DS in QA Labs + + test/config/sunds-config.xml + dev39.qa.atl.jboss.com + 1389 + com.sun.jndi.ldap.LdapCtxFactory + cn=3DDirectory Manager + testldap + + test/ldif/initial-tests-qa-sunds.ldif + + dc=3Dexample,dc=3Dcom + + + RedHatDS + RedHat Directory in QA Labs (need vpn access) + + test/config/rhds-config.xml + dev39.qa.atl.jboss.com + 10389 + com.sun.jndi.ldap.LdapCtxFactory + cn=3DDirectory Manager + qpq123qpq + + test/ldif/initial-tests-qa.ldif + + dc=3Dtestsuite,dc=3Dportal,dc=3Dqa,dc=3Datl,dc=3Djboss,d= c=3Dcom + + + OpenLDAP + OpenLDAP Directory in QA Labs (need vpn access) + + test/config/openldap-config.xml + dev39.qa.atl.jboss.com + 389 + com.sun.jndi.ldap.LdapCtxFactory + cn=3DManager,dc=3Dmy-domain,dc=3Dcom + jbossqa + + test/ldif/initial-tests-qa-openldap.ldif + + dc=3Dtestsuite,dc=3Dportal,dc=3Dmy-domain,dc=3Dcom + + + Added: modules/test/trunk/test/core/resources/config/directories-simpleuser= module.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/test/core/resources/config/directories-simpleusermod= ule.xml (rev 0) +++ modules/test/trunk/test/core/resources/config/directories-simpleusermod= ule.xml 2007-10-25 12:52:32 UTC (rev 8774) @@ -0,0 +1,100 @@ + + + + + OpenDS + OpenDS service deployed on JBoss AS as an mbean + + test/config/opends-config.xml + localhost + 10389 + com.sun.jndi.ldap.LdapCtxFactory + cn=3DDirectory Manager + password + + test/ldif/initial-tests-qa-opends.ldif + + dc=3Dexample,dc=3Dcom + + + Sun DS + Sun DS in QA Labs + + test/config/sunds-config.xml + dev39.qa.atl.jboss.com + 1389 + com.sun.jndi.ldap.LdapCtxFactory + cn=3DDirectory Manager + testldap + + test/ldif/initial-tests-qa-sunds.ldif + + dc=3Dexample,dc=3Dcom + + + RedHatDS + RedHat Directory in QA Labs (need vpn access) + + test/config/rhds-config.xml + dev39.qa.atl.jboss.com + 10389 + com.sun.jndi.ldap.LdapCtxFactory + cn=3DDirectory Manager + qpq123qpq + + test/ldif/initial-tests-qa.ldif + + dc=3Dtestsuite,dc=3Dportal,dc=3Dqa,dc=3Datl,dc=3Djboss,d= c=3Dcom + + + OpenLDAP + OpenLDAP Directory in QA Labs (need vpn access) + + test/config/openldap-config.xml + dev39.qa.atl.jboss.com + 389 + com.sun.jndi.ldap.LdapCtxFactory + cn=3DManager,dc=3Dmy-domain,dc=3Dcom + jbossqa + + test/ldif/initial-tests-qa-openldap.ldif + + dc=3Dtestsuite,dc=3Dportal,dc=3Dmy-domain,dc=3Dcom + + + Added: modules/test/trunk/test/core/resources/config/directories-staticgrou= pmembership.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/test/core/resources/config/directories-staticgroupme= mbership.xml (rev 0) +++ modules/test/trunk/test/core/resources/config/directories-staticgroupme= mbership.xml 2007-10-25 12:52:32 UTC (rev 8774) @@ -0,0 +1,115 @@ + + + + + OpenDS + OpenDS service deployed on JBoss AS as an mbean + + test/config/opends-config.xml + localhost + 10389 + com.sun.jndi.ldap.LdapCtxFactory + cn=3DDirectory Manager + password + + test/ldif/initial-tests-qa-opends.ldif + + dc=3Dexample,dc=3Dcom + + + Sun DS + Sun DS in QA Labs + + test/config/sunds-config.xml + dev39.qa.atl.jboss.com + 1389 + com.sun.jndi.ldap.LdapCtxFactory + cn=3DDirectory Manager + testldap + + test/ldif/initial-tests-qa-sunds.ldif + + dc=3Dexample,dc=3Dcom + + + RedHatDS + RedHat Directory in QA Labs (need vpn access) + + test/config/rhds-config.xml + dev39.qa.atl.jboss.com + 10389 + com.sun.jndi.ldap.LdapCtxFactory + cn=3DDirectory Manager + qpq123qpq + + test/ldif/initial-tests-qa.ldif + + dc=3Dtestsuite,dc=3Dportal,dc=3Dqa,dc=3Datl,dc=3Djboss,d= c=3Dcom + + + RedHatDS + RedHat Directory in QA Labs (need vpn access) + + test/config/staticgroup/rhds-config-nonDNMember.xml + dev39.qa.atl.jboss.com + 10389 + com.sun.jndi.ldap.LdapCtxFactory + cn=3DDirectory Manager + qpq123qpq + + test/ldif/initial-tests-qa-nonDNMember.ldif + + dc=3Dtestsuite,dc=3Dportal,dc=3Dqa,dc=3Datl,dc=3Djboss,d= c=3Dcom + + + OpenLDAP + OpenLDAP Directory in QA Labs (need vpn access) + + test/config/openldap-config.xml + dev39.qa.atl.jboss.com + 389 + com.sun.jndi.ldap.LdapCtxFactory + cn=3DManager,dc=3Dmy-domain,dc=3Dcom + jbossqa + + test/ldif/initial-tests-qa-openldap.ldif + + dc=3Dtestsuite,dc=3Dportal,dc=3Dmy-domain,dc=3Dcom + + + Added: modules/test/trunk/test/core/resources/config/directories-staticrole= membership.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/test/core/resources/config/directories-staticrolemem= bership.xml (rev 0) +++ modules/test/trunk/test/core/resources/config/directories-staticrolemem= bership.xml 2007-10-25 12:52:32 UTC (rev 8774) @@ -0,0 +1,115 @@ + + + + + OpenDS + OpenDS service deployed on JBoss AS as an mbean + + test/config/staticrole/opends-config.xml + localhost + 10389 + com.sun.jndi.ldap.LdapCtxFactory + cn=3DDirectory Manager + password + + test/ldif/initial-tests-qa-opends.ldif + + dc=3Dexample,dc=3Dcom + + + Sun DS + Sun DS in QA Labs + + test/config/staticrole/sunds-config.xml + dev39.qa.atl.jboss.com + 1389 + com.sun.jndi.ldap.LdapCtxFactory + cn=3DDirectory Manager + testldap + + test/ldif/initial-tests-qa-sunds.ldif + + dc=3Dexample,dc=3Dcom + + + RedHatDS + RedHat Directory in QA Labs (need vpn access) + + test/config/staticrole/rhds-config.xml + dev39.qa.atl.jboss.com + 10389 + com.sun.jndi.ldap.LdapCtxFactory + cn=3DDirectory Manager + qpq123qpq + + test/ldif/initial-tests-qa.ldif + + dc=3Dtestsuite,dc=3Dportal,dc=3Dqa,dc=3Datl,dc=3Djboss,d= c=3Dcom + + + RedHatDS + RedHat Directory in QA Labs (need vpn access) + + test/config/staticrole/rhds-config-nonDNMember.xml + dev39.qa.atl.jboss.com + 10389 + com.sun.jndi.ldap.LdapCtxFactory + cn=3DDirectory Manager + qpq123qpq + + test/ldif/initial-tests-qa-nonDNMember.ldif + + dc=3Dtestsuite,dc=3Dportal,dc=3Dqa,dc=3Datl,dc=3Djboss,d= c=3Dcom + + + + Added: modules/test/trunk/test/core/resources/config/directories-userprofil= emodule.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/test/core/resources/config/directories-userprofilemo= dule.xml (rev 0) +++ modules/test/trunk/test/core/resources/config/directories-userprofilemo= dule.xml 2007-10-25 12:52:32 UTC (rev 8774) @@ -0,0 +1,100 @@ + + + + + OpenDS + OpenDS service deployed on JBoss AS as an mbean + + test/config/opends-config.xml + localhost + 10389 + com.sun.jndi.ldap.LdapCtxFactory + cn=3DDirectory Manager + password + + test/ldif/initial-tests-qa-opends.ldif + + dc=3Dexample,dc=3Dcom + + + Sun DS + Sun DS in QA Labs + + test/config/sunds-config.xml + dev39.qa.atl.jboss.com + 1389 + com.sun.jndi.ldap.LdapCtxFactory + cn=3DDirectory Manager + testldap + + test/ldif/initial-tests-qa-sunds.ldif + + dc=3Dexample,dc=3Dcom + + + RedHatDS + RedHat Directory in QA Labs (need vpn access) + + test/config/rhds-config.xml + dev39.qa.atl.jboss.com + 10389 + com.sun.jndi.ldap.LdapCtxFactory + cn=3DDirectory Manager + qpq123qpq + + test/ldif/initial-tests-qa.ldif + + dc=3Dtestsuite,dc=3Dportal,dc=3Dqa,dc=3Datl,dc=3Djboss,d= c=3Dcom + + + OpenLDAP + OpenLDAP Directory in QA Labs (need vpn access) + + test/config/openldap-config.xml + dev39.qa.atl.jboss.com + 389 + com.sun.jndi.ldap.LdapCtxFactory + cn=3DManager,dc=3Dmy-domain,dc=3Dcom + jbossqa + + test/ldif/initial-tests-qa-openldap.ldif + + dc=3Dtestsuite,dc=3Dportal,dc=3Dmy-domain,dc=3Dcom + + + Added: modules/test/trunk/test/core/resources/config/directories.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/test/core/resources/config/directories.xml = (rev 0) +++ modules/test/trunk/test/core/resources/config/directories.xml 2007-10-2= 5 12:52:32 UTC (rev 8774) @@ -0,0 +1,100 @@ + + + + + OpenDS + OpenDS service deployed on JBoss AS as an mbean + + test/config/opends-config.xml + localhost + 10389 + com.sun.jndi.ldap.LdapCtxFactory + cn=3DDirectory Manager + password + + test/ldif/initial-tests-qa-opends.ldif + + dc=3Dexample,dc=3Dcom + + + Sun DS + Sun DS in QA Labs + + test/config/sunds-config.xml + dev39.qa.atl.jboss.com + 1389 + com.sun.jndi.ldap.LdapCtxFactory + cn=3DDirectory Manager + testldap + + test/ldif/initial-tests-qa-sunds.ldif + + dc=3Dexample,dc=3Dcom + + + RedHatDS + RedHat Directory in QA Labs (need vpn access) + + test/config/rhds-config.xml + dev39.qa.atl.jboss.com + 10389 + com.sun.jndi.ldap.LdapCtxFactory + cn=3DDirectory Manager + qpq123qpq + + test/ldif/initial-tests-qa.ldif + + dc=3Dtestsuite,dc=3Dportal,dc=3Dqa,dc=3Datl,dc=3Djboss,d= c=3Dcom + + + + OpenLDAP + OpenLDAP Directory in QA Labs (need vpn access) + + test/config/openldap-config.xml + dev39.qa.atl.jboss.com + 389 + com.sun.jndi.ldap.LdapCtxFactory + cn=3DManager,dc=3Dmy-domain,dc=3Dcom + jbossqa + + test/ldif/initial-tests-qa-openldap.ldif + + dc=3Dtestsuite,dc=3Dportal,dc=3Dmy-domain,dc=3Dcom + + Added: modules/test/trunk/test/core/resources/config/hibernates.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/test/core/resources/config/hibernates.xml = (rev 0) +++ modules/test/trunk/test/core/resources/config/hibernates.xml 2007-10-25= 12:52:32 UTC (rev 8774) @@ -0,0 +1,120 @@ + + + + default + + + hibernate.show_sql + true + + + hibernate.auto_close_session + true + + + hibernate.transaction.flush_before_completion + true + + + hibernate.transaction.factory_class + org.hibernate.transaction.JTATransactionFactory + + + hibernate.transaction.manager_lookup_class + org.hibernate.transaction.JBossTransactionManagerLookup= + + + hibernate.cache.provider_class + org.hibernate.cache.HashtableCacheProvider + + + hibernate.cache.use_second_level_cache + false + + + hibernate.cache.use_query_cache + false + + + + + + hsqldb + + + hibernate.dialect + org.hibernate.dialect.HSQLDialect + + + + + + oracle9i + + + hibernate.dialect + org.hibernate.dialect.Oracle9Dialect + + + + hibernate.cache.use_second_level_cache + true + + + + + + oracle10g + + + hibernate.dialect + org.hibernate.dialect.Oracle9Dialect + + + + hibernate.cache.use_second_level_cache + true + + + + + + sqlserver + + + hibernate.dialect + org.hibernate.dialect.SQLServerDialect + + + + + + mysql4 + + + hibernate.dialect + org.hibernate.dialect.MySQLInnoDBDialect + + + + + + mysql5 + + + hibernate.dialect + org.hibernate.dialect.MySQLInnoDBDialect + + + + + + postgresql8 + + + hibernate.dialect + org.hibernate.dialect.PostgreSQLDialect + + + + Added: modules/test/trunk/test/core/resources/config/opends/config/config.l= dif =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/test/core/resources/config/opends/config/config.ldif= (rev 0) +++ modules/test/trunk/test/core/resources/config/opends/config/config.ldif= 2007-10-25 12:52:32 UTC (rev 8774) @@ -0,0 +1,1431 @@ +# This file contains the primary Directory Server configuration. It must = not +# be directly edited while the server is online. The server configuration +# should only be managed using the administration utilities provided with = the +# Directory Server. +dn: cn=3Dconfig +objectClass: top +objectClass: ds-cfg-root-config +ds-cfg-check-schema: true +ds-cfg-allow-attribute-name-exceptions: false +ds-cfg-default-password-policy: cn=3DDefault Password Policy,cn=3DPassword= Policies,cn=3Dconfig +ds-cfg-writability-mode: enabled +ds-cfg-invalid-attribute-syntax-behavior: reject +ds-cfg-notify-abandoned-operations: false +ds-cfg-add-missing-rdn-attributes: true +ds-cfg-single-structural-objectclass-behavior: reject +ds-cfg-proxied-authorization-identity-mapper-dn: cn=3DExact Match,cn=3DIde= ntity Mappers,cn=3Dconfig +ds-cfg-size-limit: 1000 +ds-cfg-bind-with-dn-requires-password: true +ds-cfg-time-limit: 60 seconds +ds-cfg-lookthrough-limit: 5000 +cn: config + +dn: cn=3DAccess Control Handler,cn=3Dconfig +objectClass: top +objectClass: ds-cfg-access-control-handler +ds-cfg-acl-handler-enabled: false +cn: Access Control Handler +ds-cfg-acl-handler-class: org.opends.server.authorization.BasicAccessContr= olProvider + +dn: cn=3DAccount Status Notification Handlers,cn=3Dconfig +objectClass: top +objectClass: ds-cfg-branch +cn: Account Status Notification Handlers + +dn: cn=3DError Log Handler,cn=3DAccount Status Notification Handlers,cn=3D= config +objectClass: top +objectClass: ds-cfg-account-status-notification-handler +objectClass: ds-cfg-error-log-account-status-notification-handler +ds-cfg-account-status-notification-handler-enabled: true +ds-cfg-account-status-notification-type: account-temporarily-locked +ds-cfg-account-status-notification-type: account-permanently-locked +ds-cfg-account-status-notification-type: account-unlocked +ds-cfg-account-status-notification-type: account-idle-locked +ds-cfg-account-status-notification-type: account-reset-locked +ds-cfg-account-status-notification-type: account-disabled +ds-cfg-account-status-notification-type: account-enabled +ds-cfg-account-status-notification-type: account-expired +ds-cfg-account-status-notification-type: password-expired +ds-cfg-account-status-notification-type: password-expiring +ds-cfg-account-status-notification-type: password-reset +ds-cfg-account-status-notification-type: password-changed +cn: Error Log Handler +ds-cfg-account-status-notification-handler-class: org.opends.server.extens= ions.ErrorLogAccountStatusNotificationHandler + +dn: cn=3DAlert Handlers,cn=3Dconfig +objectClass: top +objectClass: ds-cfg-branch +cn: Alert Handlers + +dn: cn=3DJMX Alert Handler,cn=3DAlert Handlers,cn=3Dconfig +objectClass: top +objectClass: ds-cfg-alert-handler +cn: JMX Alert Handler +ds-cfg-alert-handler-enabled: true +ds-cfg-alert-handler-class: org.opends.server.extensions.JMXAlertHandler + +dn: cn=3DBackends,cn=3Dconfig +objectClass: top +objectClass: ds-cfg-branch +cn: Backends + +dn: ds-cfg-backend-id=3Dbackup,cn=3DBackends,cn=3Dconfig +objectClass: ds-cfg-backup-backend +objectClass: top +objectClass: ds-cfg-backend +ds-cfg-backend-base-dn: cn=3Dbackups +ds-cfg-backup-directory: bak +ds-cfg-backend-id: backup +ds-cfg-backend-class: org.opends.server.backends.BackupBackend +ds-cfg-backend-enabled: true +ds-cfg-backend-writability-mode: disabled + +dn: ds-cfg-backend-id=3Dconfig,cn=3DBackends,cn=3Dconfig +objectClass: top +objectClass: ds-cfg-backend +ds-cfg-backend-base-dn: cn=3Dconfig +ds-cfg-backend-id: config +ds-cfg-backend-class: org.opends.server.config.ConfigFileHandler +ds-cfg-backend-enabled: true +ds-cfg-backend-writability-mode: enabled + +dn: ds-cfg-backend-id=3Dmonitor,cn=3DBackends,cn=3Dconfig +objectClass: top +objectClass: ds-cfg-backend +ds-cfg-backend-base-dn: cn=3Dmonitor +ds-cfg-backend-id: monitor +ds-cfg-backend-class: org.opends.server.backends.MonitorBackend +ds-cfg-backend-enabled: true +ds-cfg-backend-writability-mode: disabled + +dn: ds-cfg-backend-id=3Dschema,cn=3DBackends,cn=3Dconfig +objectClass: top +objectClass: ds-cfg-schema-backend +objectClass: ds-cfg-backend +ds-cfg-backend-base-dn: cn=3Dschema +ds-cfg-backend-id: schema +ds-cfg-backend-class: org.opends.server.backends.SchemaBackend +ds-cfg-backend-enabled: true +ds-cfg-backend-writability-mode: enabled + +dn: ds-cfg-backend-id=3Dtasks,cn=3DBackends,cn=3Dconfig +objectClass: top +objectClass: ds-cfg-task-backend +objectClass: ds-cfg-backend +ds-cfg-task-backing-file: config/tasks.ldif +ds-cfg-backend-base-dn: cn=3Dtasks +ds-cfg-backend-id: tasks +ds-cfg-backend-class: org.opends.server.backends.task.TaskBackend +ds-cfg-task-retention-time: 24 hours +ds-cfg-backend-enabled: true +ds-cfg-backend-writability-mode: enabled + +dn: ds-cfg-backend-id=3DuserRoot,cn=3DBackends,cn=3Dconfig +objectClass: top +objectClass: ds-cfg-je-backend +objectClass: ds-cfg-backend +ds-cfg-backend-directory: db +ds-cfg-backend-import-queue-size: 100 +ds-cfg-backend-import-thread-count: 8 +ds-cfg-backend-class: org.opends.server.backends.jeb.BackendImpl +ds-cfg-backend-subtree-delete-size-limit: 100000 +ds-cfg-backend-index-entry-limit: 4000 +ds-cfg-backend-writability-mode: enabled +ds-cfg-backend-preload-time-limit: 0 seconds +ds-cfg-backend-base-dn: dc=3Dexample,dc=3Dcom +ds-cfg-backend-entries-compressed: false +ds-cfg-backend-import-temp-directory: importTmp +ds-cfg-backend-id: userRoot +ds-cfg-backend-deadlock-retry-limit: 10 +ds-cfg-backend-import-buffer-size: 256 megabytes +ds-cfg-backend-import-pass-size: 0 +ds-cfg-backend-enabled: true + +dn: cn=3DIndex,ds-cfg-backend-id=3DuserRoot,cn=3DBackends,cn=3Dconfig +objectClass: top +objectClass: ds-cfg-branch +cn: Index + +dn: ds-cfg-index-attribute=3Dcn,cn=3DIndex,ds-cfg-backend-id=3DuserRoot,cn= =3DBackends,cn=3Dconfig +objectClass: top +objectClass: ds-cfg-je-index +ds-cfg-index-type: presence +ds-cfg-index-type: equality +ds-cfg-index-type: substring +ds-cfg-index-attribute: cn + +dn: ds-cfg-index-attribute=3Dds-sync-hist,cn=3DIndex,ds-cfg-backend-id=3Du= serRoot,cn=3DBackends,cn=3Dconfig +objectClass: top +objectClass: ds-cfg-je-index +ds-cfg-index-type: ordering +ds-cfg-index-attribute: ds-sync-hist + +dn: ds-cfg-index-attribute=3Dentryuuid,cn=3DIndex,ds-cfg-backend-id=3Duser= Root,cn=3DBackends,cn=3Dconfig +objectClass: top +objectClass: ds-cfg-je-index +ds-cfg-index-type: equality +ds-cfg-index-attribute: entryuuid + +dn: ds-cfg-index-attribute=3DgivenName,cn=3DIndex,ds-cfg-backend-id=3Duser= Root,cn=3DBackends,cn=3Dconfig +objectClass: top +objectClass: ds-cfg-je-index +ds-cfg-index-type: presence +ds-cfg-index-type: equality +ds-cfg-index-type: substring +ds-cfg-index-attribute: givenName + +dn: ds-cfg-index-attribute=3Dmail,cn=3DIndex,ds-cfg-backend-id=3DuserRoot,= cn=3DBackends,cn=3Dconfig +objectClass: top +objectClass: ds-cfg-je-index +ds-cfg-index-type: presence +ds-cfg-index-type: equality +ds-cfg-index-type: substring +ds-cfg-index-attribute: mail + +dn: ds-cfg-index-attribute=3Dmember,cn=3DIndex,ds-cfg-backend-id=3DuserRoo= t,cn=3DBackends,cn=3Dconfig +objectClass: top +objectClass: ds-cfg-je-index +ds-cfg-index-type: equality +ds-cfg-index-attribute: member + +dn: ds-cfg-index-attribute=3Dsn,cn=3DIndex,ds-cfg-backend-id=3DuserRoot,cn= =3DBackends,cn=3Dconfig +objectClass: top +objectClass: ds-cfg-je-index +ds-cfg-index-type: presence +ds-cfg-index-type: equality +ds-cfg-index-type: substring +ds-cfg-index-attribute: sn + +dn: ds-cfg-index-attribute=3DtelephoneNumber,cn=3DIndex,ds-cfg-backend-id= =3DuserRoot,cn=3DBackends,cn=3Dconfig +objectClass: top +objectClass: ds-cfg-je-index +ds-cfg-index-type: presence +ds-cfg-index-type: equality +ds-cfg-index-type: substring +ds-cfg-index-attribute: telephoneNumber + +dn: ds-cfg-index-attribute=3Duid,cn=3DIndex,ds-cfg-backend-id=3DuserRoot,c= n=3DBackends,cn=3Dconfig +objectClass: top +objectClass: ds-cfg-je-index +ds-cfg-index-type: equality +ds-cfg-index-attribute: uid + +dn: cn=3DJE Database,ds-cfg-backend-id=3DuserRoot,cn=3DBackends,cn=3Dconfig +objectClass: ds-cfg-je-database +objectClass: top +ds-cfg-database-txn-write-no-sync: true +ds-cfg-database-checkpointer-bytes-interval: 20 megabytes +ds-cfg-database-txn-no-sync: false +ds-cfg-database-checkpointer-wakeup-interval: 30 seconds +ds-cfg-database-cache-percent: 10 +ds-cfg-database-cleaner-min-utilization: 75 +ds-cfg-database-log-file-max: 50 megabytes +ds-cfg-database-lock-num-lock-tables: 19 +ds-cfg-database-cleaner-num-threads: 1 +ds-cfg-database-evictor-nodes-per-scan: 10 +ds-cfg-database-logging-file-handler-on: true +ds-cfg-database-cache-size: 0 megabytes +cn: JE Database +ds-cfg-database-logging-level: CONFIG +ds-cfg-database-evictor-lru-only: true +ds-cfg-database-run-cleaner: true + +dn: cn=3DConnection Handlers,cn=3Dconfig +objectClass: top +objectClass: ds-cfg-branch +cn: Connection Handlers + +dn: cn=3DJMX Connection Handler,cn=3DConnection Handlers,cn=3Dconfig +objectClass: top +objectClass: ds-cfg-connection-handler +objectClass: ds-cfg-jmx-connection-handler +ds-cfg-connection-handler-class: org.opends.server.protocols.jmx.JmxConnec= tionHandler +ds-cfg-ssl-cert-nickname: adm-server-cert +ds-cfg-listen-port: 1689 +cn: JMX Connection Handler +ds-cfg-use-ssl: false +ds-cfg-connection-handler-enabled: true + +dn: cn=3DLDAP Connection Handler,cn=3DConnection Handlers,cn=3Dconfig +objectClass: top +objectClass: ds-cfg-connection-handler +objectClass: ds-cfg-ldap-connection-handler +ds-cfg-allow-start-tls: false +ds-cfg-use-tcp-keepalive: true +ds-cfg-listen-address: 0.0.0.0 +ds-cfg-keep-stats: true +ds-cfg-ssl-cert-nickname: server-cert +ds-cfg-allow-tcp-reuse-address: true +ds-cfg-use-tcp-nodelay: true +ds-cfg-listen-port: 10389 +ds-cfg-connection-handler-enabled: true +ds-cfg-accept-backlog: 128 +ds-cfg-max-request-size: 5 megabytes +ds-cfg-num-request-handlers: 2 +ds-cfg-allow-ldapv2: true +ds-cfg-connection-handler-class: org.opends.server.protocols.ldap.LDAPConn= ectionHandler +ds-cfg-send-rejection-notice: true +cn: LDAP Connection Handler +ds-cfg-ssl-client-auth-policy: optional +ds-cfg-use-ssl: false + +dn: cn=3DEntry Cache,cn=3Dconfig +objectClass: top +objectClass: ds-cfg-soft-reference-entry-cache +objectClass: ds-cfg-entry-cache +ds-cfg-entry-cache-class: org.opends.server.extensions.SoftReferenceEntryC= ache +cn: Entry Cache +ds-cfg-entry-cache-enabled: false + +dn: cn=3DExtended Operations,cn=3Dconfig +objectClass: top +objectClass: ds-cfg-branch +cn: Extended Operations + +dn: cn=3DCancel,cn=3DExtended Operations,cn=3Dconfig +objectClass: top +objectClass: ds-cfg-extended-operation-handler +ds-cfg-extended-operation-handler-class: org.opends.server.extensions.Canc= elExtendedOperation +cn: Cancel +ds-cfg-extended-operation-handler-enabled: true + +dn: cn=3DPassword Modify,cn=3DExtended Operations,cn=3Dconfig +objectClass: top +objectClass: ds-cfg-password-modify-extended-operation-handler +objectClass: ds-cfg-extended-operation-handler +ds-cfg-extended-operation-handler-class: org.opends.server.extensions.Pass= wordModifyExtendedOperation +ds-cfg-identity-mapper-dn: cn=3DExact Match,cn=3DIdentity Mappers,cn=3Dcon= fig +cn: Password Modify +ds-cfg-extended-operation-handler-enabled: true + +dn: cn=3DStartTLS,cn=3DExtended Operations,cn=3Dconfig +objectClass: top +objectClass: ds-cfg-extended-operation-handler +ds-cfg-extended-operation-handler-class: org.opends.server.extensions.Star= tTLSExtendedOperation +cn: StartTLS +ds-cfg-extended-operation-handler-enabled: true + +dn: cn=3DWho Am I,cn=3DExtended Operations,cn=3Dconfig +objectClass: top +objectClass: ds-cfg-extended-operation-handler +ds-cfg-extended-operation-handler-class: org.opends.server.extensions.WhoA= mIExtendedOperation +cn: Who Am I +ds-cfg-extended-operation-handler-enabled: true + +dn: cn=3DIdentity Mappers,cn=3Dconfig +objectClass: top +objectClass: ds-cfg-branch +cn: Identity Mappers + +dn: cn=3DExact Match,cn=3DIdentity Mappers,cn=3Dconfig +objectClass: top +objectClass: ds-cfg-identity-mapper +objectClass: ds-cfg-exact-match-identity-mapper +ds-cfg-identity-mapper-enabled: true +cn: Exact Match +ds-cfg-match-attribute: uid +ds-cfg-identity-mapper-class: org.opends.server.extensions.ExactMatchIdent= ityMapper + +dn: cn=3DLoggers,cn=3Dconfig +objectClass: top +objectClass: ds-cfg-branch +cn: Loggers + +dn: cn=3DFile-Based Access Logger,cn=3DLoggers,cn=3Dconfig +objectClass: top +objectClass: ds-cfg-file-based-access-logger +objectClass: ds-cfg-logger +objectClass: ds-cfg-access-logger +ds-cfg-size-limit: 104857600 +ds-cfg-rotation-policy: Size +ds-cfg-rotation-policy: FixedTime +ds-cfg-suppress-internal-operations: true +ds-cfg-log-file: logs/access +ds-cfg-fixed-time-limit: 86400000 +ds-cfg-logger-enabled: true +cn: File-Based Access Logger +ds-cfg-logger-class: org.opends.server.loggers.DirectoryAccessLogger + +dn: cn=3DFile-Based Audit Logger,cn=3DLoggers,cn=3Dconfig +objectClass: top +objectClass: ds-cfg-file-based-access-logger +objectClass: ds-cfg-logger +objectClass: ds-cfg-access-logger +ds-cfg-size-limit: 104857600 +ds-cfg-rotation-policy: Size +ds-cfg-rotation-policy: FixedTime +ds-cfg-suppress-internal-operations: true +ds-cfg-log-file: logs/audit +ds-cfg-fixed-time-limit: 86400000 +ds-cfg-logger-enabled: false +cn: File-Based Audit Logger +ds-cfg-logger-class: org.opends.server.loggers.DirectoryAuditLogger + +dn: cn=3DFile-Based Debug Logger,cn=3DLoggers,cn=3Dconfig +objectClass: top +objectClass: ds-cfg-logger +objectClass: ds-cfg-debug-logger +objectClass: ds-cfg-file-based-debug-logger +ds-cfg-log-file: logs/debug +ds-cfg-logger-enabled: true +cn: File-Based Debug Logger +ds-cfg-logger-class: org.opends.server.loggers.DirectoryDebugLogger +ds-cfg-default-severity: ERROR +ds-cfg-default-severity: WARNING + +dn: cn=3DFile-Based Error Logger,cn=3DLoggers,cn=3Dconfig +objectClass: top +objectClass: ds-cfg-file-based-error-logger +objectClass: ds-cfg-logger +objectClass: ds-cfg-error-logger +ds-cfg-size-limit: 104857600 +ds-cfg-rotation-policy: Size +ds-cfg-rotation-policy: FixedTime +ds-cfg-log-file: logs/errors +ds-cfg-fixed-time-limit: 86400000 +ds-cfg-logger-enabled: true +cn: File-Based Error Logger +ds-cfg-logger-class: org.opends.server.loggers.DirectoryErrorLogger +ds-cfg-default-severity: FATAL_ERROR +ds-cfg-default-severity: NOTICE +ds-cfg-default-severity: SEVERE_ERROR +ds-cfg-default-severity: SEVERE_WARNING + +dn: cn=3DMatching Rules,cn=3Dconfig +objectClass: top +objectClass: ds-cfg-branch +cn: Matching Rules + +dn: cn=3DAuth Password Equality Matching Rule,cn=3DMatching Rules,cn=3Dcon= fig +objectClass: top +objectClass: ds-cfg-equality-matching-rule +objectClass: ds-cfg-matching-rule +ds-cfg-matching-rule-enabled: true +cn: Auth Password Equality Matching Rule +ds-cfg-matching-rule-class: org.opends.server.schema.AuthPasswordEqualityM= atchingRule + +dn: cn=3DAuth Password Exact Equality Matching Rule,cn=3DMatching Rules,cn= =3Dconfig +objectClass: top +objectClass: ds-cfg-equality-matching-rule +objectClass: ds-cfg-matching-rule +ds-cfg-matching-rule-enabled: true +cn: Auth Password Exact Equality Matching Rule +ds-cfg-matching-rule-class: org.opends.server.schema.AuthPasswordExactEqua= lityMatchingRule + +dn: cn=3DBit String Equality Matching Rule,cn=3DMatching Rules,cn=3Dconfig +objectClass: top +objectClass: ds-cfg-equality-matching-rule +objectClass: ds-cfg-matching-rule +ds-cfg-matching-rule-enabled: true +cn: Bit String Equality Matching Rule +ds-cfg-matching-rule-class: org.opends.server.schema.BitStringEqualityMatc= hingRule + +dn: cn=3DBoolean Equality Matching Rule,cn=3DMatching Rules,cn=3Dconfig +objectClass: top +objectClass: ds-cfg-equality-matching-rule +objectClass: ds-cfg-matching-rule +ds-cfg-matching-rule-enabled: true +cn: Boolean Equality Matching Rule +ds-cfg-matching-rule-class: org.opends.server.schema.BooleanEqualityMatchi= ngRule + +dn: cn=3DCase Exact Equality Matching Rule,cn=3DMatching Rules,cn=3Dconfig +objectClass: top +objectClass: ds-cfg-equality-matching-rule +objectClass: ds-cfg-matching-rule +ds-cfg-matching-rule-enabled: true +cn: Case Exact Equality Matching Rule +ds-cfg-matching-rule-class: org.opends.server.schema.CaseExactEqualityMatc= hingRule + +dn: cn=3DCase Exact IA5 Equality Matching Rule,cn=3DMatching Rules,cn=3Dco= nfig +objectClass: top +objectClass: ds-cfg-equality-matching-rule +objectClass: ds-cfg-matching-rule +ds-cfg-matching-rule-enabled: true +cn: Case Exact IA5 Equality Matching Rule +ds-cfg-matching-rule-class: org.opends.server.schema.CaseExactIA5EqualityM= atchingRule + +dn: cn=3DCase Exact IA5 Substring Matching Rule,cn=3DMatching Rules,cn=3Dc= onfig +objectClass: top +objectClass: ds-cfg-matching-rule +objectClass: ds-cfg-substring-matching-rule +ds-cfg-matching-rule-enabled: true +cn: Case Exact IA5 Substring Matching Rule +ds-cfg-matching-rule-class: org.opends.server.schema.CaseExactIA5Substring= MatchingRule + +dn: cn=3DCase Exact Ordering Matching Rule,cn=3DMatching Rules,cn=3Dconfig +objectClass: top +objectClass: ds-cfg-matching-rule +objectClass: ds-cfg-ordering-matching-rule +ds-cfg-matching-rule-enabled: true +cn: Case Exact Ordering Matching Rule +ds-cfg-matching-rule-class: org.opends.server.schema.CaseExactOrderingMatc= hingRule + +dn: cn=3DCase Exact Substring Matching Rule,cn=3DMatching Rules,cn=3Dconfig +objectClass: top +objectClass: ds-cfg-matching-rule +objectClass: ds-cfg-substring-matching-rule +ds-cfg-matching-rule-enabled: true +cn: Case Exact Substring Matching Rule +ds-cfg-matching-rule-class: org.opends.server.schema.CaseExactSubstringMat= chingRule + +dn: cn=3DCase Ignore Equality Matching Rule,cn=3DMatching Rules,cn=3Dconfig +objectClass: top +objectClass: ds-cfg-equality-matching-rule +objectClass: ds-cfg-matching-rule +ds-cfg-matching-rule-enabled: true +cn: Case Ignore Equality Matching Rule +ds-cfg-matching-rule-class: org.opends.server.schema.CaseIgnoreEqualityMat= chingRule + +dn: cn=3DCase Ignore IA5 Equality Matching Rule,cn=3DMatching Rules,cn=3Dc= onfig +objectClass: top +objectClass: ds-cfg-equality-matching-rule +objectClass: ds-cfg-matching-rule +ds-cfg-matching-rule-enabled: true +cn: Case Ignore IA5 Equality Matching Rule +ds-cfg-matching-rule-class: org.opends.server.schema.CaseIgnoreIA5Equality= MatchingRule + +dn: cn=3DCase Ignore IA5 Substring Matching Rule,cn=3DMatching Rules,cn=3D= config +objectClass: top +objectClass: ds-cfg-matching-rule +objectClass: ds-cfg-substring-matching-rule +ds-cfg-matching-rule-enabled: true +cn: Case Ignore IA5 Substring Matching Rule +ds-cfg-matching-rule-class: org.opends.server.schema.CaseIgnoreIA5Substrin= gMatchingRule + +dn: cn=3DCase Ignore List Equality Matching Rule,cn=3DMatching Rules,cn=3D= config +objectClass: top +objectClass: ds-cfg-equality-matching-rule +objectClass: ds-cfg-matching-rule +ds-cfg-matching-rule-enabled: true +cn: Case Ignore List Equality Matching Rule +ds-cfg-matching-rule-class: org.opends.server.schema.CaseIgnoreListEqualit= yMatchingRule + +dn: cn=3DCase Ignore List Substring Matching Rule,cn=3DMatching Rules,cn= =3Dconfig +objectClass: top +objectClass: ds-cfg-matching-rule +objectClass: ds-cfg-substring-matching-rule +ds-cfg-matching-rule-enabled: true +cn: Case Ignore List Substring Matching Rule +ds-cfg-matching-rule-class: org.opends.server.schema.CaseIgnoreListSubstri= ngMatchingRule + +dn: cn=3DCase Ignore Ordering Matching Rule,cn=3DMatching Rules,cn=3Dconfig +objectClass: top +objectClass: ds-cfg-matching-rule +objectClass: ds-cfg-ordering-matching-rule +ds-cfg-matching-rule-enabled: true +cn: Case Ignore Ordering Matching Rule +ds-cfg-matching-rule-class: org.opends.server.schema.CaseIgnoreOrderingMat= chingRule + +dn: cn=3DCase Ignore Substring Matching Rule,cn=3DMatching Rules,cn=3Dconf= ig +objectClass: top +objectClass: ds-cfg-matching-rule +objectClass: ds-cfg-substring-matching-rule +ds-cfg-matching-rule-enabled: true +cn: Case Ignore Substring Matching Rule +ds-cfg-matching-rule-class: org.opends.server.schema.CaseIgnoreSubstringMa= tchingRule + +dn: cn=3DDirectory String First Component Equality Matching Rule,cn=3DMatc= hing Rules,cn=3Dconfig +objectClass: top +objectClass: ds-cfg-equality-matching-rule +objectClass: ds-cfg-matching-rule +ds-cfg-matching-rule-enabled: true +cn: Directory String First Component Equality Matching Rule +ds-cfg-matching-rule-class: org.opends.server.schema.DirectoryStringFirstC= omponentEqualityMatchingRule + +dn: cn=3DDistinguished Name Equality Matching Rule,cn=3DMatching Rules,cn= =3Dconfig +objectClass: top +objectClass: ds-cfg-equality-matching-rule +objectClass: ds-cfg-matching-rule +ds-cfg-matching-rule-enabled: true +cn: Distinguished Name Equality Matching Rule +ds-cfg-matching-rule-class: org.opends.server.schema.DistinguishedNameEqua= lityMatchingRule + +dn: cn=3DDouble Metaphone Approximate Matching Rule,cn=3DMatching Rules,cn= =3Dconfig +objectClass: top +objectClass: ds-cfg-matching-rule +objectClass: ds-cfg-approximate-matching-rule +ds-cfg-matching-rule-enabled: true +cn: Double Metaphone Approximate Matching Rule +ds-cfg-matching-rule-class: org.opends.server.schema.DoubleMetaphoneApprox= imateMatchingRule + +dn: cn=3DGeneralized Time Equality Matching Rule,cn=3DMatching Rules,cn=3D= config +objectClass: top +objectClass: ds-cfg-equality-matching-rule +objectClass: ds-cfg-matching-rule +ds-cfg-matching-rule-enabled: true +cn: Generalized Time Equality Matching Rule +ds-cfg-matching-rule-class: org.opends.server.schema.GeneralizedTimeEquali= tyMatchingRule + +dn: cn=3DGeneralized Time Ordering Matching Rule,cn=3DMatching Rules,cn=3D= config +objectClass: top +objectClass: ds-cfg-matching-rule +objectClass: ds-cfg-ordering-matching-rule +ds-cfg-matching-rule-enabled: true +cn: Generalized Time Ordering Matching Rule +ds-cfg-matching-rule-class: org.opends.server.schema.GeneralizedTimeOrderi= ngMatchingRule + +dn: cn=3DHistorical CSN Ordering Matching Rule,cn=3DMatching Rules,cn=3Dco= nfig +objectClass: top +objectClass: ds-cfg-matching-rule +objectClass: ds-cfg-ordering-matching-rule +ds-cfg-matching-rule-enabled: true +cn: Historical CSN Ordering Matching Rule +ds-cfg-matching-rule-class: org.opends.server.synchronization.HistoricalCs= nOrderingMatchingRule + +dn: cn=3DInteger Equality Matching Rule,cn=3DMatching Rules,cn=3Dconfig +objectClass: top +objectClass: ds-cfg-equality-matching-rule +objectClass: ds-cfg-matching-rule +ds-cfg-matching-rule-enabled: true +cn: Integer Equality Matching Rule +ds-cfg-matching-rule-class: org.opends.server.schema.IntegerEqualityMatchi= ngRule + +dn: cn=3DInteger First Component Equality Matching Rule,cn=3DMatching Rule= s,cn=3Dconfig +objectClass: top +objectClass: ds-cfg-equality-matching-rule +objectClass: ds-cfg-matching-rule +ds-cfg-matching-rule-enabled: true +cn: Integer First Component Equality Matching Rule +ds-cfg-matching-rule-class: org.opends.server.schema.IntegerFirstComponent= EqualityMatchingRule + +dn: cn=3DInteger Ordering Matching Rule,cn=3DMatching Rules,cn=3Dconfig +objectClass: top +objectClass: ds-cfg-matching-rule +objectClass: ds-cfg-ordering-matching-rule +ds-cfg-matching-rule-enabled: true +cn: Integer Ordering Matching Rule +ds-cfg-matching-rule-class: org.opends.server.schema.IntegerOrderingMatchi= ngRule + +dn: cn=3DKeyword Equality Matching Rule,cn=3DMatching Rules,cn=3Dconfig +objectClass: top +objectClass: ds-cfg-equality-matching-rule +objectClass: ds-cfg-matching-rule +ds-cfg-matching-rule-enabled: true +cn: Keyword Equality Matching Rule +ds-cfg-matching-rule-class: org.opends.server.schema.KeywordEqualityMatchi= ngRule + +dn: cn=3DNumeric String Equality Matching Rule,cn=3DMatching Rules,cn=3Dco= nfig +objectClass: top +objectClass: ds-cfg-equality-matching-rule +objectClass: ds-cfg-matching-rule +ds-cfg-matching-rule-enabled: true +cn: Numeric String Equality Matching Rule +ds-cfg-matching-rule-class: org.opends.server.schema.NumericStringEquality= MatchingRule + +dn: cn=3DNumeric String Ordering Matching Rule,cn=3DMatching Rules,cn=3Dco= nfig +objectClass: top +objectClass: ds-cfg-matching-rule +objectClass: ds-cfg-ordering-matching-rule +ds-cfg-matching-rule-enabled: true +cn: Numeric String Ordering Matching Rule +ds-cfg-matching-rule-class: org.opends.server.schema.NumericStringOrdering= MatchingRule + +dn: cn=3DNumeric String Substring Matching Rule,cn=3DMatching Rules,cn=3Dc= onfig +objectClass: top +objectClass: ds-cfg-matching-rule +objectClass: ds-cfg-substring-matching-rule +ds-cfg-matching-rule-enabled: true +cn: Numeric String Substring Matching Rule +ds-cfg-matching-rule-class: org.opends.server.schema.NumericStringSubstrin= gMatchingRule + +dn: cn=3DObject Identifier Equality Matching Rule,cn=3DMatching Rules,cn= =3Dconfig +objectClass: top +objectClass: ds-cfg-equality-matching-rule +objectClass: ds-cfg-matching-rule +ds-cfg-matching-rule-enabled: true +cn: Object Identifier Equality Matching Rule +ds-cfg-matching-rule-class: org.opends.server.schema.ObjectIdentifierEqual= ityMatchingRule + +dn: cn=3DObject Identifier First Component Equality Matching Rule,cn=3DMat= ching Rules,cn=3Dconfig +objectClass: top +objectClass: ds-cfg-equality-matching-rule +objectClass: ds-cfg-matching-rule +ds-cfg-matching-rule-enabled: true +cn: Object Identifier First Component Equality Matching Rule +ds-cfg-matching-rule-class: org.opends.server.schema.ObjectIdentifierFirst= ComponentEqualityMatchingRule + +dn: cn=3DOctet String Equality Matching Rule,cn=3DMatching Rules,cn=3Dconf= ig +objectClass: top +objectClass: ds-cfg-equality-matching-rule +objectClass: ds-cfg-matching-rule +ds-cfg-matching-rule-enabled: true +cn: Octet String Equality Matching Rule +ds-cfg-matching-rule-class: org.opends.server.schema.OctetStringEqualityMa= tchingRule + +dn: cn=3DOctet String Ordering Matching Rule,cn=3DMatching Rules,cn=3Dconf= ig +objectClass: top +objectClass: ds-cfg-matching-rule +objectClass: ds-cfg-ordering-matching-rule +ds-cfg-matching-rule-enabled: true +cn: Octet String Ordering Matching Rule +ds-cfg-matching-rule-class: org.opends.server.schema.OctetStringOrderingMa= tchingRule + +dn: cn=3DOctet String Substring Matching Rule,cn=3DMatching Rules,cn=3Dcon= fig +objectClass: top +objectClass: ds-cfg-matching-rule +objectClass: ds-cfg-substring-matching-rule +ds-cfg-matching-rule-enabled: true +cn: Octet String Substring Matching Rule +ds-cfg-matching-rule-class: org.opends.server.schema.OctetStringSubstringM= atchingRule + +dn: cn=3DPresentation Address Equality Matching Rule,cn=3DMatching Rules,c= n=3Dconfig +objectClass: top +objectClass: ds-cfg-equality-matching-rule +objectClass: ds-cfg-matching-rule +ds-cfg-matching-rule-enabled: true +cn: Presentation Address Equality Matching Rule +ds-cfg-matching-rule-class: org.opends.server.schema.PresentationAddressEq= ualityMatchingRule + +dn: cn=3DProtocol Information Equality Matching Rule,cn=3DMatching Rules,c= n=3Dconfig +objectClass: top +objectClass: ds-cfg-equality-matching-rule +objectClass: ds-cfg-matching-rule +ds-cfg-matching-rule-enabled: true +cn: Protocol Information Equality Matching Rule +ds-cfg-matching-rule-class: org.opends.server.schema.ProtocolInformationEq= ualityMatchingRule + +dn: cn=3DTelephone Number Equality Matching Rule,cn=3DMatching Rules,cn=3D= config +objectClass: top +objectClass: ds-cfg-equality-matching-rule +objectClass: ds-cfg-matching-rule +ds-cfg-matching-rule-enabled: true +cn: Telephone Number Equality Matching Rule +ds-cfg-matching-rule-class: org.opends.server.schema.TelephoneNumberEquali= tyMatchingRule + +dn: cn=3DTelephone Number Substring Matching Rule,cn=3DMatching Rules,cn= =3Dconfig +objectClass: top +objectClass: ds-cfg-matching-rule +objectClass: ds-cfg-substring-matching-rule +ds-cfg-matching-rule-enabled: true +cn: Telephone Number Substring Matching Rule +ds-cfg-matching-rule-class: org.opends.server.schema.TelephoneNumberSubstr= ingMatchingRule + +dn: cn=3DUnique Member Equality Matching Rule,cn=3DMatching Rules,cn=3Dcon= fig +objectClass: top +objectClass: ds-cfg-equality-matching-rule +objectClass: ds-cfg-matching-rule +ds-cfg-matching-rule-enabled: true +cn: Unique Member Equality Matching Rule +ds-cfg-matching-rule-class: org.opends.server.schema.UniqueMemberEqualityM= atchingRule + +dn: cn=3DUser Password Equality Matching Rule,cn=3DMatching Rules,cn=3Dcon= fig +objectClass: top +objectClass: ds-cfg-equality-matching-rule +objectClass: ds-cfg-matching-rule +ds-cfg-matching-rule-enabled: true +cn: User Password Equality Matching Rule +ds-cfg-matching-rule-class: org.opends.server.schema.UserPasswordEqualityM= atchingRule + +dn: cn=3DUser Password Exact Equality Matching Rule,cn=3DMatching Rules,cn= =3Dconfig +objectClass: top +objectClass: ds-cfg-equality-matching-rule +objectClass: ds-cfg-matching-rule +ds-cfg-matching-rule-enabled: true +cn: User Password Exact Equality Matching Rule +ds-cfg-matching-rule-class: org.opends.server.schema.UserPasswordExactEqua= lityMatchingRule + +dn: cn=3DUUID Equality Matching Rule,cn=3DMatching Rules,cn=3Dconfig +objectClass: top +objectClass: ds-cfg-equality-matching-rule +objectClass: ds-cfg-matching-rule +ds-cfg-matching-rule-enabled: true +cn: UUID Equality Matching Rule +ds-cfg-matching-rule-class: org.opends.server.schema.UUIDEqualityMatchingR= ule + +dn: cn=3DUUID Ordering Matching Rule,cn=3DMatching Rules,cn=3Dconfig +objectClass: top +objectClass: ds-cfg-matching-rule +objectClass: ds-cfg-ordering-matching-rule +ds-cfg-matching-rule-enabled: true +cn: UUID Ordering Matching Rule +ds-cfg-matching-rule-class: org.opends.server.schema.UUIDOrderingMatchingR= ule + +dn: cn=3DWord Equality Matching Rule,cn=3DMatching Rules,cn=3Dconfig +objectClass: top +objectClass: ds-cfg-matching-rule +objectClass: ds-cfg-substring-matching-rule +ds-cfg-matching-rule-enabled: true +cn: Word Equality Matching Rule +ds-cfg-matching-rule-class: org.opends.server.schema.WordEqualityMatchingR= ule + +dn: cn=3DMonitor Providers,cn=3Dconfig +objectClass: top +objectClass: ds-cfg-branch +cn: Monitor Providers + +dn: cn=3DJVM Stack Trace,cn=3DMonitor Providers,cn=3Dconfig +objectClass: top +objectClass: ds-cfg-monitor-provider +ds-cfg-monitor-provider-class: org.opends.server.monitors.StackTraceMonito= rProvider +ds-cfg-monitor-provider-enabled: true +cn: JVM Stack Trace + +dn: cn=3DSystem Info,cn=3DMonitor Providers,cn=3Dconfig +objectClass: top +objectClass: ds-cfg-monitor-provider +ds-cfg-monitor-provider-class: org.opends.server.monitors.SystemInfoMonito= rProvider +ds-cfg-monitor-provider-enabled: true +cn: System Info + +dn: cn=3DVersion,cn=3DMonitor Providers,cn=3Dconfig +objectClass: top +objectClass: ds-cfg-monitor-provider +ds-cfg-monitor-provider-class: org.opends.server.monitors.VersionMonitorPr= ovider +ds-cfg-monitor-provider-enabled: true +cn: Version + +dn: cn=3DPassword Generators,cn=3Dconfig +objectClass: top +objectClass: ds-cfg-branch +cn: Password Generators + +dn: cn=3DRandom Password Generator,cn=3DPassword Generators,cn=3Dconfig +objectClass: top +objectClass: ds-cfg-password-generator +objectClass: ds-cfg-random-password-generator +ds-cfg-password-generator-class: org.opends.server.extensions.RandomPasswo= rdGenerator +ds-cfg-password-character-set: alpha:abcdefghijklmnopqrstuvwxyz +ds-cfg-password-character-set: numeric:0123456789 +cn: Random Password Generator +ds-cfg-password-generator-enabled: true +ds-cfg-password-format: alpha:3,numeric:2,alpha:3 + +dn: cn=3DPassword Policies,cn=3Dconfig +objectClass: top +objectClass: ds-cfg-branch +cn: Password Policies + +dn: cn=3DDefault Password Policy,cn=3DPassword Policies,cn=3Dconfig +objectClass: top +objectClass: ds-cfg-password-policy +ds-cfg-require-secure-authentication: false +ds-cfg-password-attribute: userPassword +ds-cfg-idle-lockout-interval: 0 seconds +ds-cfg-skip-validation-for-administrators: false +ds-cfg-password-change-requires-current-password: false +ds-cfg-maximum-password-age: 0 seconds +ds-cfg-password-expiration-warning-interval: 5 days +ds-cfg-allow-expired-password-changes: false +ds-cfg-expire-passwords-without-warning: false +ds-cfg-require-secure-password-changes: false +ds-cfg-password-generator-dn: cn=3DRandom Password Generator,cn=3DPassword= Generators,cn=3Dconfig +ds-cfg-allow-pre-encoded-passwords: false +ds-cfg-maximum-password-reset-age: 0 seconds +ds-cfg-lockout-failure-expiration-interval: 0 seconds +ds-cfg-force-change-on-add: false +ds-cfg-force-change-on-reset: false +ds-cfg-lockout-duration: 0 seconds +ds-cfg-allow-user-password-changes: true +cn: Default PasswordPolicy +ds-cfg-minimum-password-age: 0 seconds +ds-cfg-allow-multiple-password-values: false +ds-cfg-grace-login-count: 0 +ds-cfg-default-password-storage-scheme: SSHA +ds-cfg-lockout-failure-count: 0 + +dn: cn=3DPassword Storage Schemes,cn=3Dconfig +objectClass: top +objectClass: ds-cfg-branch +cn: Password Storage Schemes + +dn: cn=3DBase64,cn=3DPassword Storage Schemes,cn=3Dconfig +objectClass: top +objectClass: ds-cfg-password-storage-scheme +ds-cfg-password-storage-scheme-enabled: true +ds-cfg-password-storage-scheme-class: org.opends.server.extensions.Base64P= asswordStorageScheme +cn: Base64 + +dn: cn=3DClear,cn=3DPassword Storage Schemes,cn=3Dconfig +objectClass: top +objectClass: ds-cfg-password-storage-scheme +ds-cfg-password-storage-scheme-enabled: true +ds-cfg-password-storage-scheme-class: org.opends.server.extensions.ClearPa= sswordStorageScheme +cn: Clear + +dn: cn=3DMD5,cn=3DPassword Storage Schemes,cn=3Dconfig +objectClass: top +objectClass: ds-cfg-password-storage-scheme +ds-cfg-password-storage-scheme-enabled: true +ds-cfg-password-storage-scheme-class: org.opends.server.extensions.MD5Pass= wordStorageScheme +cn: MD5 + +dn: cn=3DSalted MD5,cn=3DPassword Storage Schemes,cn=3Dconfig +objectClass: top +objectClass: ds-cfg-password-storage-scheme +ds-cfg-password-storage-scheme-enabled: true +ds-cfg-password-storage-scheme-class: org.opends.server.extensions.SaltedM= D5PasswordStorageScheme +cn: Salted MD5 + +dn: cn=3DSalted SHA-1,cn=3DPassword Storage Schemes,cn=3Dconfig +objectClass: top +objectClass: ds-cfg-password-storage-scheme +ds-cfg-password-storage-scheme-enabled: true +ds-cfg-password-storage-scheme-class: org.opends.server.extensions.SaltedS= HA1PasswordStorageScheme +cn: Salted SHA-1 + +dn: cn=3DSalted SHA-256,cn=3DPassword Storage Schemes,cn=3Dconfig +objectClass: top +objectClass: ds-cfg-password-storage-scheme +ds-cfg-password-storage-scheme-enabled: true +ds-cfg-password-storage-scheme-class: org.opends.server.extensions.SaltedS= HA256PasswordStorageScheme +cn: Salted SHA-256 + +dn: cn=3DSalted SHA-384,cn=3DPassword Storage Schemes,cn=3Dconfig +objectClass: top +objectClass: ds-cfg-password-storage-scheme +ds-cfg-password-storage-scheme-enabled: true +ds-cfg-password-storage-scheme-class: org.opends.server.extensions.SaltedS= HA384PasswordStorageScheme +cn: Salted SHA-384 + +dn: cn=3DSalted SHA-512,cn=3DPassword Storage Schemes,cn=3Dconfig +objectClass: top +objectClass: ds-cfg-password-storage-scheme +ds-cfg-password-storage-scheme-enabled: true +ds-cfg-password-storage-scheme-class: org.opends.server.extensions.SaltedS= HA512PasswordStorageScheme +cn: Salted SHA-512 + +dn: cn=3DSHA-1,cn=3DPassword Storage Schemes,cn=3Dconfig +objectClass: top +objectClass: ds-cfg-password-storage-scheme +ds-cfg-password-storage-scheme-enabled: true +ds-cfg-password-storage-scheme-class: org.opends.server.extensions.SHA1Pas= swordStorageScheme +cn: SHA-1 + +dn: cn=3DPassword Validators,cn=3Dconfig +objectClass: top +objectClass: ds-cfg-branch +cn: Password Validators + +dn: cn=3DLength-Based Password Validator,cn=3DPassword Validators,cn=3Dcon= fig +objectClass: ds-cfg-length-based-password-validator +objectClass: top +objectClass: ds-cfg-password-validator +ds-cfg-password-validator-enabled: true +ds-cfg-password-validator-class: org.opends.server.extensions.LengthBasedP= asswordValidator +ds-cfg-maximum-password-length: 0 +cn: Length-Based Password Validator +ds-cfg-minimum-password-length: 6 + +dn: cn=3DPlugins,cn=3Dconfig +objectClass: top +objectClass: ds-cfg-branch +cn: Plugins + +dn: cn=3DEntry UUID,cn=3DPlugins,cn=3Dconfig +objectClass: top +objectClass: ds-cfg-plugin +ds-cfg-plugin-class: org.opends.server.plugins.EntryUUIDPlugin +ds-cfg-plugin-type: ldifImport +ds-cfg-plugin-type: preOperationAdd +cn: Entry UUID +ds-cfg-plugin-enabled: true + +dn: cn=3DLastMod,cn=3DPlugins,cn=3Dconfig +objectClass: top +objectClass: ds-cfg-plugin +ds-cfg-plugin-class: org.opends.server.plugins.LastModPlugin +ds-cfg-plugin-type: preOperationAdd +ds-cfg-plugin-type: preOperationModify +ds-cfg-plugin-type: preOperationModifyDN +cn: LastMod +ds-cfg-plugin-enabled: true + +dn: cn=3DLDAP Attribute Description List,cn=3DPlugins,cn=3Dconfig +objectClass: top +objectClass: ds-cfg-plugin +ds-cfg-plugin-class: org.opends.server.plugins.LDAPADListPlugin +ds-cfg-plugin-type: preParseSearch +cn: LDAP Attribute Description List +ds-cfg-plugin-enabled: true + +dn: cn=3DPassword Policy Import,cn=3DPlugins,cn=3Dconfig +objectClass: top +objectClass: ds-cfg-plugin +ds-cfg-plugin-class: org.opends.server.plugins.PasswordPolicyImportPlugin +ds-cfg-plugin-type: ldifImport +cn: Password Policy Import +ds-cfg-plugin-enabled: true + +dn: cn=3DProfiler,cn=3DPlugins,cn=3Dconfig +objectClass: top +objectClass: ds-cfg-plugin +objectClass: ds-cfg-profiler-plugin +ds-cfg-plugin-class: org.opends.server.plugins.profiler.ProfilerPlugin +ds-cfg-profile-sample-interval: 10 milliseconds +ds-cfg-plugin-type: startup +ds-cfg-profile-directory: logs +cn: Profiler +ds-cfg-plugin-enabled: true +ds-cfg-enable-profiling-on-startup: false + +dn: cn=3DRoot DNs,cn=3Dconfig +objectClass: top +objectClass: ds-cfg-branch +cn: Root DNs + +dn: cn=3DDirectory Manager,cn=3DRoot DNs,cn=3Dconfig +objectClass: top +objectClass: person +objectClass: inetOrgPerson +objectClass: ds-cfg-root-dn +objectClass: organizationalPerson +givenName: Directory +userpassword: {SSHA}MuRK74milgw9Jq38UDfHdGcJmLK/eJRfg39qNg=3D=3D +cn: Directory Manager +ds-cfg-alternate-bind-dn: cn=3DDirectory Manager +sn: Manager +ds-rlim-time-limit: 0 +ds-rlim-lookthrough-limit: 0 +ds-rlim-size-limit: 0 + +dn: cn=3DRoot DSE,cn=3Dconfig +objectClass: top +objectClass: ds-cfg-root-dse +ds-cfg-show-all-attributes: false +cn: Root DSE + +dn: cn=3DSASL Mechanisms,cn=3Dconfig +objectClass: top +objectClass: ds-cfg-branch +cn: SASL Mechanisms + +dn: cn=3DANONYMOUS,cn=3DSASL Mechanisms,cn=3Dconfig +objectClass: top +objectClass: ds-cfg-sasl-mechanism-handler +ds-cfg-sasl-mechanism-handler-enabled: false +ds-cfg-sasl-mechanism-handler-class: org.opends.server.extensions.Anonymou= sSASLMechanismHandler +cn: ANONYMOUS + +dn: cn=3DCRAM-MD5,cn=3DSASL Mechanisms,cn=3Dconfig +objectClass: top +objectClass: ds-cfg-cram-md5-sasl-mechanism-handler +objectClass: ds-cfg-sasl-mechanism-handler +ds-cfg-sasl-mechanism-handler-enabled: true +ds-cfg-sasl-mechanism-handler-class: org.opends.server.extensions.CRAMMD5S= ASLMechanismHandler +ds-cfg-identity-mapper-dn: cn=3DExact Match,cn=3DIdentity Mappers,cn=3Dcon= fig +cn: CRAM-MD5 + +dn: cn=3DDIGEST-MD5,cn=3DSASL Mechanisms,cn=3Dconfig +objectClass: top +objectClass: ds-cfg-digest-md5-sasl-mechanism-handler +objectClass: ds-cfg-sasl-mechanism-handler +ds-cfg-sasl-mechanism-handler-enabled: true +ds-cfg-sasl-mechanism-handler-class: org.opends.server.extensions.DigestMD= 5SASLMechanismHandler +ds-cfg-identity-mapper-dn: cn=3DExact Match,cn=3DIdentity Mappers,cn=3Dcon= fig +cn: DIGEST-MD5 + +dn: cn=3DEXTERNAL,cn=3DSASL Mechanisms,cn=3Dconfig +objectClass: top +objectClass: ds-cfg-external-sasl-mechanism-handler +objectClass: ds-cfg-sasl-mechanism-handler +ds-cfg-certificate-attribute: userCertificate +ds-cfg-sasl-mechanism-handler-enabled: true +ds-cfg-sasl-mechanism-handler-class: org.opends.server.extensions.External= SASLMechanismHandler +cn: EXTERNAL +ds-cfg-client-certificate-validation-policy: ifpresent + +dn: cn=3DGSSAPI,cn=3DSASL Mechanisms,cn=3Dconfig +objectClass: top +objectClass: ds-cfg-gssapi-sasl-mechanism-handler +objectClass: ds-cfg-sasl-mechanism-handler +ds-cfg-sasl-mechanism-handler-enabled: true +ds-cfg-sasl-mechanism-handler-class: org.opends.server.extensions.GSSAPISA= SLMechanismHandler +ds-cfg-identity-mapper-dn: cn=3DExact Match,cn=3DIdentity Mappers,cn=3Dcon= fig +cn: GSSAPI +ds-cfg-keytab: /etc/krb5/krb5.keytab + +dn: cn=3DPLAIN,cn=3DSASL Mechanisms,cn=3Dconfig +objectClass: top +objectClass: ds-cfg-sasl-mechanism-handler +objectClass: ds-cfg-plain-sasl-mechanism-handler +ds-cfg-sasl-mechanism-handler-enabled: true +ds-cfg-sasl-mechanism-handler-class: org.opends.server.extensions.PlainSAS= LMechanismHandler +ds-cfg-identity-mapper-dn: cn=3DExact Match,cn=3DIdentity Mappers,cn=3Dcon= fig +cn: PLAIN + +dn: cn=3DSSL,cn=3Dconfig +objectClass: top +objectClass: ds-cfg-branch +cn: SSL + +dn: cn=3DCertificate Mapper,cn=3DSSL,cn=3Dconfig +objectClass: top +objectClass: ds-cfg-certificate-mapper +ds-cfg-certificate-mapper-enabled: true +cn: Certificate Mapper +ds-cfg-certificate-mapper-class: org.opends.server.extensions.SubjectEqual= sDNCertificateMapper + +dn: cn=3DKey Manager Provider,cn=3DSSL,cn=3Dconfig +objectClass: top +objectClass: ds-cfg-file-based-key-manager-provider +objectClass: ds-cfg-key-manager-provider +ds-cfg-key-manager-provider-enabled: false +ds-cfg-key-store-file: config/keystore +ds-cfg-key-manager-provider-class: org.opends.server.extensions.FileBasedK= eyManagerProvider +cn: Key Manager Provider + +dn: cn=3DTrust Manager Provider,cn=3DSSL,cn=3Dconfig +objectClass: top +objectClass: ds-cfg-trust-manager-provider +objectClass: ds-cfg-file-based-trust-manager-provider +ds-cfg-trust-store-file: config/truststore +ds-cfg-trust-manager-provider-class: org.opends.server.extensions.FileBase= dTrustManagerProvider +cn: Trust Manager Provider +ds-cfg-trust-manager-provider-enabled: false + +dn: cn=3DSynchronization Providers,cn=3Dconfig +objectClass: top +objectClass: ds-cfg-branch +cn: Synchronization Providers + +dn: cn=3DSyntaxes,cn=3Dconfig +objectClass: top +objectClass: ds-cfg-branch +cn: Syntaxes + +dn: cn=3DAbsolute Subtree Specification,cn=3DSyntaxes,cn=3Dconfig +objectClass: top +objectClass: ds-cfg-attribute-syntax +ds-cfg-syntax-enabled: true +cn: Absolute Subtree Specification +ds-cfg-syntax-class: org.opends.server.schema.AbsoluteSubtreeSpecification= Syntax + +dn: cn=3DAttribute Type Description,cn=3DSyntaxes,cn=3Dconfig +objectClass: top +objectClass: ds-cfg-attribute-syntax +ds-cfg-syntax-enabled: true +cn: Attribute Type Description +ds-cfg-syntax-class: org.opends.server.schema.AttributeTypeSyntax + +dn: cn=3DAuthentication Password,cn=3DSyntaxes,cn=3Dconfig +objectClass: top +objectClass: ds-cfg-attribute-syntax +ds-cfg-syntax-enabled: true +cn: Authentiation Password +ds-cfg-syntax-class: org.opends.server.schema.AuthPasswordSyntax + +dn: cn=3DBinary,cn=3DSyntaxes,cn=3Dconfig +objectClass: top +objectClass: ds-cfg-attribute-syntax +ds-cfg-syntax-enabled: true +cn: Binary +ds-cfg-syntax-class: org.opends.server.schema.BinarySyntax + +dn: cn=3DBit String,cn=3DSyntaxes,cn=3Dconfig +objectClass: top +objectClass: ds-cfg-attribute-syntax +ds-cfg-syntax-enabled: true +cn: Bit String +ds-cfg-syntax-class: org.opends.server.schema.BitStringSyntax + +dn: cn=3DBoolean,cn=3DSyntaxes,cn=3Dconfig +objectClass: top +objectClass: ds-cfg-attribute-syntax +ds-cfg-syntax-enabled: true +cn: Boolean +ds-cfg-syntax-class: org.opends.server.schema.BooleanSyntax + +dn: cn=3DCertificate,cn=3DSyntaxes,cn=3Dconfig +objectClass: top +objectClass: ds-cfg-attribute-syntax +ds-cfg-syntax-enabled: true +cn: Certificate +ds-cfg-syntax-class: org.opends.server.schema.CertificateSyntax + +dn: cn=3DCertificate List,cn=3DSyntaxes,cn=3Dconfig +objectClass: top +objectClass: ds-cfg-attribute-syntax +ds-cfg-syntax-enabled: true +cn: Certificate List +ds-cfg-syntax-class: org.opends.server.schema.CertificateListSyntax + +dn: cn=3DCertificate Pair,cn=3DSyntaxes,cn=3Dconfig +objectClass: top +objectClass: ds-cfg-attribute-syntax +ds-cfg-syntax-enabled: true +cn: Certificate Pair +ds-cfg-syntax-class: org.opends.server.schema.CertificatePairSyntax + +dn: cn=3DCountry String,cn=3DSyntaxes,cn=3Dconfig +objectClass: top +objectClass: ds-cfg-attribute-syntax +ds-cfg-syntax-enabled: true +cn: Country String +ds-cfg-syntax-class: org.opends.server.schema.CountryStringSyntax + +dn: cn=3DDelivery Method,cn=3DSyntaxes,cn=3Dconfig +objectClass: top +objectClass: ds-cfg-attribute-syntax +ds-cfg-syntax-enabled: true +cn: Delivery Method +ds-cfg-syntax-class: org.opends.server.schema.DeliveryMethodSyntax + +dn: cn=3DDirectory String,cn=3DSyntaxes,cn=3Dconfig +objectClass: top +objectClass: ds-cfg-directory-string-attribute-syntax +objectClass: ds-cfg-attribute-syntax +ds-cfg-syntax-enabled: true +cn: Directory String +ds-cfg-allow-zero-length-values: false +ds-cfg-syntax-class: org.opends.server.schema.DirectoryStringSyntax + +dn: cn=3DDistinguished Name,cn=3DSyntaxes,cn=3Dconfig +objectClass: top +objectClass: ds-cfg-attribute-syntax +ds-cfg-syntax-enabled: true +cn: Distinguished Name +ds-cfg-syntax-class: org.opends.server.schema.DistinguishedNameSyntax + +dn: cn=3DDIT Content Rule Description,cn=3DSyntaxes,cn=3Dconfig +objectClass: top +objectClass: ds-cfg-attribute-syntax +ds-cfg-syntax-enabled: true +cn: DIT Content Rule Description +ds-cfg-syntax-class: org.opends.server.schema.DITContentRuleSyntax + +dn: cn=3DDIT Structure Rule Description,cn=3DSyntaxes,cn=3Dconfig +objectClass: top +objectClass: ds-cfg-attribute-syntax +ds-cfg-syntax-enabled: true +cn: DIT Structure Rule Description +ds-cfg-syntax-class: org.opends.server.schema.DITStructureRuleSyntax + +dn: cn=3DEnhanced Guide,cn=3DSyntaxes,cn=3Dconfig +objectClass: top +objectClass: ds-cfg-attribute-syntax +ds-cfg-syntax-enabled: true +cn: Enhanced Guide +ds-cfg-syntax-class: org.opends.server.schema.EnhancedGuideSyntax + +dn: cn=3DFacsimile Telephone Number,cn=3DSyntaxes,cn=3Dconfig +objectClass: top +objectClass: ds-cfg-attribute-syntax +ds-cfg-syntax-enabled: true +cn: Facsimile Telephone Number +ds-cfg-syntax-class: org.opends.server.schema.FaxNumberSyntax + +dn: cn=3DFax,cn=3DSyntaxes,cn=3Dconfig +objectClass: top +objectClass: ds-cfg-attribute-syntax +ds-cfg-syntax-enabled: true +cn: Fax +ds-cfg-syntax-class: org.opends.server.schema.FaxSyntax + +dn: cn=3DGeneralized Time,cn=3DSyntaxes,cn=3Dconfig +objectClass: top +objectClass: ds-cfg-attribute-syntax +ds-cfg-syntax-enabled: true +cn: Generalized Time +ds-cfg-syntax-class: org.opends.server.schema.GeneralizedTimeSyntax + +dn: cn=3DGuide,cn=3DSyntaxes,cn=3Dconfig +objectClass: top +objectClass: ds-cfg-attribute-syntax +ds-cfg-syntax-enabled: true +cn: Guide +ds-cfg-syntax-class: org.opends.server.schema.GuideSyntax + +dn: cn=3DIA5 String,cn=3DSyntaxes,cn=3Dconfig +objectClass: top +objectClass: ds-cfg-attribute-syntax +ds-cfg-syntax-enabled: true +cn: IA5 String +ds-cfg-syntax-class: org.opends.server.schema.IA5StringSyntax + +dn: cn=3DInteger,cn=3DSyntaxes,cn=3Dconfig +objectClass: top +objectClass: ds-cfg-attribute-syntax +ds-cfg-syntax-enabled: true +cn: Integer +ds-cfg-syntax-class: org.opends.server.schema.IntegerSyntax + +dn: cn=3DJPEG,cn=3DSyntaxes,cn=3Dconfig +objectClass: top +objectClass: ds-cfg-attribute-syntax +ds-cfg-syntax-enabled: true +cn: JPEG +ds-cfg-syntax-class: org.opends.server.schema.JPEGSyntax + +dn: cn=3DLDAP Syntax Description,cn=3DSyntaxes,cn=3Dconfig +objectClass: top +objectClass: ds-cfg-attribute-syntax +ds-cfg-syntax-enabled: true +cn: LDAP Syntax Description +ds-cfg-syntax-class: org.opends.server.schema.LDAPSyntaxDescriptionSyntax + +dn: cn=3DMatching Rule Description,cn=3DSyntaxes,cn=3Dconfig +objectClass: top +objectClass: ds-cfg-attribute-syntax +ds-cfg-syntax-enabled: true +cn: Matching Rule Description +ds-cfg-syntax-class: org.opends.server.schema.MatchingRuleSyntax + +dn: cn=3DMatching Rule Use Description,cn=3DSyntaxes,cn=3Dconfig +objectClass: top +objectClass: ds-cfg-attribute-syntax +ds-cfg-syntax-enabled: true +cn: Matching Rule Use Description +ds-cfg-syntax-class: org.opends.server.schema.MatchingRuleUseSyntax + +dn: cn=3DName and Optional UID,cn=3DSyntaxes,cn=3Dconfig +objectClass: top +objectClass: ds-cfg-attribute-syntax +ds-cfg-syntax-enabled: true +cn: Name and Optional UID +ds-cfg-syntax-class: org.opends.server.schema.NameAndOptionalUIDSyntax + +dn: cn=3DName Form Description,cn=3DSyntaxes,cn=3Dconfig +objectClass: top +objectClass: ds-cfg-attribute-syntax +ds-cfg-syntax-enabled: true +cn: Name Form Description +ds-cfg-syntax-class: org.opends.server.schema.NameFormSyntax + +dn: cn=3DNumeric String,cn=3DSyntaxes,cn=3Dconfig +objectClass: top +objectClass: ds-cfg-attribute-syntax +ds-cfg-syntax-enabled: true +cn: Numeric String +ds-cfg-syntax-class: org.opends.server.schema.NumericStringSyntax + +dn: cn=3DObject Class Description,cn=3DSyntaxes,cn=3Dconfig +objectClass: top +objectClass: ds-cfg-attribute-syntax +ds-cfg-syntax-enabled: true +cn: Object Class Description +ds-cfg-syntax-class: org.opends.server.schema.ObjectClassSyntax + +dn: cn=3DObject Identifier,cn=3DSyntaxes,cn=3Dconfig +objectClass: top +objectClass: ds-cfg-attribute-syntax +ds-cfg-syntax-enabled: true +cn: Object Identifier +ds-cfg-syntax-class: org.opends.server.schema.OIDSyntax + +dn: cn=3DOctet String,cn=3DSyntaxes,cn=3Dconfig +objectClass: top +objectClass: ds-cfg-attribute-syntax +ds-cfg-syntax-enabled: true +cn: Octet String +ds-cfg-syntax-class: org.opends.server.schema.OctetStringSyntax + +dn: cn=3DOther Mailbox,cn=3DSyntaxes,cn=3Dconfig +objectClass: top +objectClass: ds-cfg-attribute-syntax +ds-cfg-syntax-enabled: true +cn: Other Mailbox +ds-cfg-syntax-class: org.opends.server.schema.OtherMailboxSyntax + +dn: cn=3DPostal Address,cn=3DSyntaxes,cn=3Dconfig +objectClass: top +objectClass: ds-cfg-attribute-syntax +ds-cfg-syntax-enabled: true +cn: Postal Address +ds-cfg-syntax-class: org.opends.server.schema.PostalAddressSyntax + +dn: cn=3DPresentation Address,cn=3DSyntaxes,cn=3Dconfig +objectClass: top +objectClass: ds-cfg-attribute-syntax +ds-cfg-syntax-enabled: true +cn: Presentation Address +ds-cfg-syntax-class: org.opends.server.schema.PresentationAddressSyntax + +dn: cn=3DPrintable String,cn=3DSyntaxes,cn=3Dconfig +objectClass: top +objectClass: ds-cfg-attribute-syntax +ds-cfg-syntax-enabled: true +cn: Printable String +ds-cfg-syntax-class: org.opends.server.schema.PrintableStringSyntax + +dn: cn=3DProtocol Information,cn=3DSyntaxes,cn=3Dconfig +objectClass: top +objectClass: ds-cfg-attribute-syntax +ds-cfg-syntax-enabled: true +cn: Protocol Information +ds-cfg-syntax-class: org.opends.server.schema.ProtocolInformationSyntax + +dn: cn=3DRelative Subtree Specification,cn=3DSyntaxes,cn=3Dconfig +objectClass: top +objectClass: ds-cfg-attribute-syntax +ds-cfg-syntax-enabled: true +cn: Relative Subtree Specification +ds-cfg-syntax-class: org.opends.server.schema.RelativeSubtreeSpecification= Syntax + +dn: cn=3DSubstring Assertion,cn=3DSyntaxes,cn=3Dconfig +objectClass: top +objectClass: ds-cfg-attribute-syntax +ds-cfg-syntax-enabled: true +cn: Substring Assertion +ds-cfg-syntax-class: org.opends.server.schema.SubstringAssertionSyntax + +dn: cn=3DSubtree Specification,cn=3DSyntaxes,cn=3Dconfig +objectClass: top +objectClass: ds-cfg-attribute-syntax +ds-cfg-syntax-enabled: true +cn: Subtree Specification +ds-cfg-syntax-class: org.opends.server.schema.RFC3672SubtreeSpecificationS= yntax + +dn: cn=3DSupported Algorithm,cn=3DSyntaxes,cn=3Dconfig +objectClass: top +objectClass: ds-cfg-attribute-syntax +ds-cfg-syntax-enabled: true +cn: Supported Algorithm +ds-cfg-syntax-class: org.opends.server.schema.SupportedAlgorithmSyntax + +dn: cn=3DTelephone Number,cn=3DSyntaxes,cn=3Dconfig +objectClass: top +objectClass: ds-cfg-telephone-number-attribute-syntax +objectClass: ds-cfg-attribute-syntax +ds-cfg-strict-telephone-number-format: false +ds-cfg-syntax-enabled: true +cn: Telephone Number +ds-cfg-syntax-class: org.opends.server.schema.TelephoneNumberSyntax + +dn: cn=3DTeletex Terminal Identifier,cn=3DSyntaxes,cn=3Dconfig +objectClass: top +objectClass: ds-cfg-attribute-syntax +ds-cfg-syntax-enabled: true +cn: Teletex Terminal Identifier +ds-cfg-syntax-class: org.opends.server.schema.TeletexTerminalIdentifierSyn= tax + +dn: cn=3DTelex Number,cn=3DSyntaxes,cn=3Dconfig +objectClass: top +objectClass: ds-cfg-attribute-syntax +ds-cfg-syntax-enabled: true +cn: Telex Number +ds-cfg-syntax-class: org.opends.server.schema.TelexNumberSyntax + +dn: cn=3DUser Password,cn=3DSyntaxes,cn=3Dconfig +objectClass: top +objectClass: ds-cfg-attribute-syntax +ds-cfg-syntax-enabled: true +cn: User Password +ds-cfg-syntax-class: org.opends.server.schema.UserPasswordSyntax + +dn: cn=3DUTC Time,cn=3DSyntaxes,cn=3Dconfig +objectClass: top +objectClass: ds-cfg-attribute-syntax +ds-cfg-syntax-enabled: true +cn: UTC Time +ds-cfg-syntax-class: org.opends.server.schema.UTCTimeSyntax + +dn: cn=3DUUID,cn=3DSyntaxes,cn=3Dconfig +objectClass: top +objectClass: ds-cfg-attribute-syntax +ds-cfg-syntax-enabled: true +cn: UUID +ds-cfg-syntax-class: org.opends.server.schema.UUIDSyntax + +dn: cn=3DVirtual Attributes,cn=3Dconfig +objectClass: top +objectClass: ds-cfg-branch +cn: Virtual Attributes + +dn: cn=3DWork Queue,cn=3Dconfig +objectClass: top +objectClass: ds-cfg-traditional-work-queue +objectClass: ds-cfg-work-queue +ds-cfg-max-work-queue-capacity: 0 +ds-cfg-work-queue-class: org.opends.server.extensions.TraditionalWorkQueue +cn: Work Queue +ds-cfg-num-worker-threads: 24 Added: modules/test/trunk/test/core/resources/config/opends/config/schema/0= 0-core.ldif =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/test/core/resources/config/opends/config/schema/00-c= ore.ldif (rev 0) +++ modules/test/trunk/test/core/resources/config/opends/config/schema/00-c= ore.ldif 2007-10-25 12:52:32 UTC (rev 8774) @@ -0,0 +1,521 @@ +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License, Version 1.0 only +# (the "License"). You may not use this file except in compliance +# with the License. +# +# You can obtain a copy of the license at +# trunk/opends/resource/legal-notices/OpenDS.LICENSE +# or https://OpenDS.dev.java.net/OpenDS.LICENSE. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at +# trunk/opends/resource/legal-notices/OpenDS.LICENSE. If applicable, +# add the following below this CDDL HEADER, with the fields enclosed +# by brackets "[]" replaced with your own identifying * information: +# Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# +# +# Portions Copyright 2006 Sun Microsystems, Inc. +# +# +# This file contains a core set of attribute type and objectlass definitio= ns +# from several standard LDAP documents (primarily RFCs and IETF Internet +# Drafts). The X-ORIGIN component of each name should provide the +# specification in which that attribute type or objectclass is defined. +dn: cn=3Dschema +objectClass: top +objectClass: ldapSubentry +objectClass: subschema +attributeTypes: ( 2.5.4.41 NAME 'name' EQUALITY caseIgnoreMatch + SUBSTR caseIgnoreSubstringsMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{32= 768} + X-ORIGIN 'RFC 2256' ) +attributeTypes: ( 2.5.4.49 NAME 'distinguishedName' + EQUALITY distinguishedNameMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.12 + X-ORIGIN 'RFC 2256' ) +attributeTypes: ( 2.5.4.0 NAME 'objectClass' EQUALITY objectIdentifierMatch + SYNTAX 1.3.6.1.4.1.1466.115.121.1.38 X-ORIGIN 'RFC 2256' ) +attributeTypes: ( 2.5.4.1 NAME 'aliasedObjectName' + EQUALITY distinguishedNameMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.12 + SINGLE-VALUE X-ORIGIN 'RFC 2256' ) +attributeTypes: ( 2.5.4.2 NAME 'knowledgeInformation' EQUALITY caseIgnoreM= atch + SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{32768} X-ORIGIN 'RFC 2256' ) +attributeTypes: ( 2.5.4.3 NAME 'cn' SUP name X-ORIGIN 'RFC 2256' ) +attributeTypes: ( 2.5.4.4 NAME 'sn' SUP name X-ORIGIN 'RFC 2256' ) +attributeTypes: ( 2.5.4.5 NAME 'serialNumber' EQUALITY caseIgnoreMatch + SUBSTR caseIgnoreSubstringsMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.44{64} + X-ORIGIN 'RFC 2256' ) +attributeTypes: ( 2.5.4.6 NAME 'c' SUP name SINGLE-VALUE X-ORIGIN 'RFC 225= 6' ) +attributeTypes: ( 2.5.4.7 NAME 'l' SUP name X-ORIGIN 'RFC 2256' ) +attributeTypes: ( 2.5.4.8 NAME 'st' SUP name X-ORIGIN 'RFC 2256' ) +attributeTypes: ( 2.5.4.9 NAME 'street' EQUALITY caseIgnoreMatch + SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{128} X-ORIGIN 'RFC 2256' ) +attributeTypes: ( 2.5.4.10 NAME 'o' SUP name X-ORIGIN 'RFC 2256' ) +attributeTypes: ( 2.5.4.11 NAME 'ou' SUP name X-ORIGIN 'RFC 2256' ) +attributeTypes: ( 2.5.4.12 NAME 'title' SUP name X-ORIGIN 'RFC 2256' ) +attributeTypes: ( 2.5.4.13 NAME 'description' EQUALITY caseIgnoreMatch + SUBSTR caseIgnoreSubstringsMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{10= 24} + X-ORIGIN 'RFC 2256' ) +attributeTypes: ( 2.5.4.14 NAME 'searchGuide' + SYNTAX 1.3.6.1.4.1.1466.115.121.1.25 X-ORIGIN 'RFC 2256' ) +attributeTypes: ( 2.5.4.15 NAME 'businessCategory' EQUALITY caseIgnoreMatch + SUBSTR caseIgnoreSubstringsMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{12= 8} + X-ORIGIN 'RFC 2256' ) +attributeTypes: ( 2.5.4.16 NAME 'postalAddress' EQUALITY caseIgnoreListMat= ch + SUBSTR caseIgnoreListSubstringsMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.41 + X-ORIGIN 'RFC 2256' ) +attributeTypes: ( 2.5.4.17 NAME 'postalCode' EQUALITY caseIgnoreMatch + SUBSTR caseIgnoreSubstringsMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{40} + X-ORIGIN 'RFC 2256' ) +attributeTypes: ( 2.5.4.18 NAME 'postOfficeBox' EQUALITY caseIgnoreMatch + SUBSTR caseIgnoreSubstringsMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{40} + X-ORIGIN 'RFC 2256' ) +attributeTypes: ( 2.5.4.19 NAME 'physicalDeliveryOfficeName' + EQUALITY caseIgnoreMatch SUBSTR caseIgnoreSubstringsMatch + SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{128} X-ORIGIN 'RFC 2256' ) +attributeTypes: ( 2.5.4.20 NAME 'telephoneNumber' EQUALITY telephoneNumber= Match + SUBSTR telephoneNumberSubstringsMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.= 50{32} + X-ORIGIN 'RFC 2256' ) +attributeTypes: ( 2.5.4.21 NAME 'telexNumber' + SYNTAX 1.3.6.1.4.1.1466.115.121.1.52 X-ORIGIN 'RFC 2256' ) +attributeTypes: ( 2.5.4.22 NAME 'teletexTerminalIdentifier' + SYNTAX 1.3.6.1.4.1.1466.115.121.1.51 X-ORIGIN 'RFC 2256' ) +attributeTypes: ( 2.5.4.23 NAME 'facsimileTelephoneNumber' + SYNTAX 1.3.6.1.4.1.1466.115.121.1.22 X-ORIGIN 'RFC 2256' ) +attributeTypes: ( 2.5.4.24 NAME 'x121Address' EQUALITY numericStringMatch + SUBSTR numericStringSubstringsMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.36= {15} + X-ORIGIN 'RFC 2256' ) +attributeTypes: ( 2.5.4.25 NAME 'internationaliSDNNumber' + EQUALITY numericStringMatch SUBSTR numericStringSubstringsMatch + SYNTAX 1.3.6.1.4.1.1466.115.121.1.36{16} X-ORIGIN 'RFC 2256' ) +attributeTypes: ( 2.5.4.26 NAME 'registeredAddress' SUP postalAddress + SYNTAX 1.3.6.1.4.1.1466.115.121.1.41 X-ORIGIN 'RFC 2256' ) +attributeTypes: ( 2.5.4.27 NAME 'destinationIndicator' EQUALITY caseIgnore= Match + SUBSTR caseIgnoreSubstringsMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.44{12= 8} + X-ORIGIN 'RFC 2256' ) +attributeTypes: ( 2.5.4.28 NAME 'preferredDeliveryMethod' + SYNTAX 1.3.6.1.4.1.1466.115.121.1.14 SINGLE-VALUE X-ORIGIN 'RFC 2256' ) +attributeTypes: ( 2.5.4.29 NAME 'presentationAddress' + EQUALITY presentationAddressMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.43 + SINGLE-VALUE X-ORIGIN 'RFC 2256' ) +attributeTypes: ( 2.5.4.30 NAME 'supportedApplicationContext' + EQUALITY objectIdentifierMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.38 + X-ORIGIN 'RFC 2256' ) +attributeTypes: ( 2.5.4.31 NAME 'member' SUP distinguishedName + X-ORIGIN 'RFC 2256' ) +attributeTypes: ( 2.5.4.32 NAME 'owner' SUP distinguishedName + X-ORIGIN 'RFC 2256' ) +attributeTypes: ( 2.5.4.33 NAME 'roleOccupant' SUP distinguishedName + X-ORIGIN 'RFC 2256' ) +attributeTypes: ( 2.5.4.34 NAME 'seeAlso' SUP distinguishedName + X-ORIGIN 'RFC 2256' ) +attributeTypes: ( 2.5.4.35 NAME 'userPassword' + SYNTAX 1.3.6.1.4.1.26027.1.3.1 X-ORIGIN 'RFC 2256' ) +attributeTypes: ( 2.5.4.36 NAME 'userCertificate' + SYNTAX 1.3.6.1.4.1.1466.115.121.1.8 X-ORIGIN 'RFC 2256' ) +attributeTypes: ( 2.5.4.37 NAME 'cACertificate' + SYNTAX 1.3.6.1.4.1.1466.115.121.1.8 X-ORIGIN 'RFC 2256' ) +attributeTypes: ( 2.5.4.38 NAME 'authorityRevocationList' + SYNTAX 1.3.6.1.4.1.1466.115.121.1.9 X-ORIGIN 'RFC 2256' ) +attributeTypes: ( 2.5.4.39 NAME 'certificateRevocationList' + SYNTAX 1.3.6.1.4.1.1466.115.121.1.9 X-ORIGIN 'RFC 2256' ) +attributeTypes: ( 2.5.4.40 NAME 'crossCertificatePair' + SYNTAX 1.3.6.1.4.1.1466.115.121.1.10 X-ORIGIN 'RFC 2256' ) +attributeTypes: ( 2.5.4.42 NAME 'givenName' SUP name X-ORIGIN 'RFC 2256' ) +attributeTypes: ( 2.5.4.43 NAME 'initials' SUP name X-ORIGIN 'RFC 2256' ) +attributeTypes: ( 2.5.4.44 NAME 'generationQualifier' SUP name + X-ORIGIN 'RFC 2256' ) +attributeTypes: ( 2.5.4.45 NAME 'x500UniqueIdentifier' EQUALITY bitStringM= atch + SYNTAX 1.3.6.1.4.1.1466.115.121.1.6 X-ORIGIN 'RFC 2256' ) +attributeTypes: ( 2.5.4.46 NAME 'dnQualifier' EQUALITY caseIgnoreMatch + ORDERING caseIgnoreOrderingMatch SUBSTR caseIgnoreSubstringsMatch + SYNTAX 1.3.6.1.4.1.1466.115.121.1.44 X-ORIGIN 'RFC 2256' ) +attributeTypes: ( 2.5.4.47 NAME 'enhancedSearchGuide' + SYNTAX 1.3.6.1.4.1.1466.115.121.1.21 X-ORIGIN 'RFC 2256' ) +attributeTypes: ( 1.3.6.1.1.16.4 NAME 'entryUUID' + DESC 'UUID of the entry' EQUALITY uuidMatch ORDERING uuidOrderingMatch + SYNTAX 1.3.6.1.1.16.1 SINGLE-VALUE NO-USER-MODIFICATION + USAGE directoryOperation X-ORIGIN 'RFC 4530' ) +attributeTypes: ( 2.5.4.48 NAME 'protocolInformation' + EQUALITY protocolInformationMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.42 + X-ORIGIN 'RFC 2256' ) +attributeTypes: ( 2.5.4.50 NAME 'uniqueMember' EQUALITY uniqueMemberMatch + SYNTAX 1.3.6.1.4.1.1466.115.121.1.34 X-ORIGIN 'RFC 2256' ) +attributeTypes: ( 2.5.4.51 NAME 'houseIdentifier' EQUALITY caseIgnoreMatch + SUBSTR caseIgnoreSubstringsMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{32= 768} + X-ORIGIN 'RFC 2256' ) +attributeTypes: ( 2.5.4.52 NAME 'supportedAlgorithms' + SYNTAX 1.3.6.1.4.1.1466.115.121.1.49 X-ORIGIN 'RFC 2256' ) +attributeTypes: ( 2.5.4.53 NAME 'deltaRevocationList' + SYNTAX 1.3.6.1.4.1.1466.115.121.1.9 X-ORIGIN 'RFC 2256' ) +attributeTypes: ( 2.5.4.54 NAME 'dmdName' SUP name X-ORIGIN 'RFC 2256' ) +attributeTypes: ( 2.5.18.1 NAME 'createTimestamp' EQUALITY generalizedTime= Match + ORDERING generalizedTimeOrderingMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.= 24 + SINGLE-VALUE NO-USER-MODIFICATION USAGE directoryOperation + X-ORIGIN 'RFC 2252' ) +attributeTypes: ( 2.5.18.2 NAME 'modifyTimestamp' EQUALITY generalizedTime= Match + ORDERING generalizedTimeOrderingMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.= 24 + SINGLE-VALUE NO-USER-MODIFICATION USAGE directoryOperation + X-ORIGIN 'RFC 2252' ) +attributeTypes: ( 2.5.18.3 NAME 'creatorsName' EQUALITY distinguishedNameM= atch + SYNTAX 1.3.6.1.4.1.1466.115.121.1.12 SINGLE-VALUE NO-USER-MODIFICATION + USAGE directoryOperation X-ORIGIN 'RFC 2252' ) +attributeTypes: ( 2.5.18.4 NAME 'modifiersName' EQUALITY distinguishedName= Match + SYNTAX 1.3.6.1.4.1.1466.115.121.1.12 SINGLE-VALUE NO-USER-MODIFICATION + USAGE directoryOperation X-ORIGIN 'RFC 2252' ) +attributeTypes: ( 2.5.18.10 NAME 'subschemaSubentry' + EQUALITY distinguishedNameMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.12 + SINGLE-VALUE NO-USER-MODIFICATION USAGE directoryOperation + X-ORIGIN 'RFC 2252' ) +attributeTypes: ( 2.5.21.5 NAME 'attributeTypes' + EQUALITY objectIdentifierFirstComponentMatch + SYNTAX 1.3.6.1.4.1.1466.115.121.1.3 USAGE directoryOperation + X-ORIGIN 'RFC 2252' ) +attributeTypes: ( 2.5.21.6 NAME 'objectClasses' + EQUALITY objectIdentifierFirstComponentMatch + SYNTAX 1.3.6.1.4.1.1466.115.121.1.37 USAGE directoryOperation + X-ORIGIN 'RFC 2252' ) +attributeTypes: ( 2.5.21.4 NAME 'matchingRules' + EQUALITY objectIdentifierFirstComponentMatch + SYNTAX 1.3.6.1.4.1.1466.115.121.1.30 USAGE directoryOperation + X-ORIGIN 'RFC 2252' ) +attributeTypes: ( 2.5.21.8 NAME 'matchingRuleUse' + EQUALITY objectIdentifierFirstComponentMatch + SYNTAX 1.3.6.1.4.1.1466.115.121.1.31 USAGE directoryOperation + X-ORIGIN 'RFC 2252' ) +attributeTypes: ( 1.3.6.1.4.1.1466.101.120.5 NAME 'namingContexts' + SYNTAX 1.3.6.1.4.1.1466.115.121.1.12 USAGE dSAOperation X-ORIGIN 'RFC 22= 52' ) +attributeTypes: ( 1.3.6.1.4.1.1466.101.120.6 NAME 'altServer' + SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 USAGE dSAOperation X-ORIGIN 'RFC 22= 52' ) +attributeTypes: ( 1.3.6.1.4.1.1466.101.120.7 NAME 'supportedExtension' + SYNTAX 1.3.6.1.4.1.1466.115.121.1.38 USAGE dSAOperation X-ORIGIN 'RFC 22= 52' ) +attributeTypes: ( 1.3.6.1.4.1.1466.101.120.13 NAME 'supportedControl' + SYNTAX 1.3.6.1.4.1.1466.115.121.1.38 USAGE dSAOperation X-ORIGIN 'RFC 22= 52' ) +attributeTypes: ( 1.3.6.1.4.1.1466.101.120.14 NAME 'supportedSASLMechanism= s' + SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 USAGE dSAOperation X-ORIGIN 'RFC 22= 52' ) +attributeTypes: ( 1.3.6.1.4.1.1466.101.120.15 NAME 'supportedLDAPVersion' + SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 USAGE dSAOperation X-ORIGIN 'RFC 22= 52' ) +attributeTypes: ( 1.3.6.1.4.1.4203.1.3.5 NAME 'supportedFeatures' + EQUALITY objectIdentifierMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.38 + USAGE dSAOperation X-ORIGIN 'RFC 4512' ) +attributeTypes: ( 1.3.6.1.4.1.1466.101.120.16 NAME 'ldapSyntaxes' + SYNTAX 1.3.6.1.4.1.1466.115.121.1.54 USAGE directoryOperation + X-ORIGIN 'RFC 2252' ) +attributeTypes: ( 2.5.21.1 NAME 'dITStructureRules' + EQUALITY integerFirstComponentMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.17 + USAGE directoryOperation X-ORIGIN 'RFC 2252' ) +attributeTypes: ( 2.5.21.7 NAME 'nameForms' + EQUALITY objectIdentifierFirstComponentMatch + SYNTAX 1.3.6.1.4.1.1466.115.121.1.35 USAGE directoryOperation + X-ORIGIN 'RFC 2252' ) +attributeTypes: ( 2.5.21.2 NAME 'dITContentRules' + EQUALITY objectIdentifierFirstComponentMatch + SYNTAX 1.3.6.1.4.1.1466.115.121.1.16 USAGE directoryOperation + X-ORIGIN 'RFC 2252' ) +attributeTypes: ( 0.9.2342.19200300.100.1.25 NAME 'dc' + EQUALITY caseIgnoreIA5Match SUBSTR caseIgnoreIA5SubstringsMatch + SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 SINGLE-VALUE X-ORIGIN 'RFC 2247' ) +attributeTypes: ( 2.16.840.1.113730.3.1.1 NAME 'carLicense' + DESC 'vehicle license or registration plate' EQUALITY caseIgnoreMatch + SUBSTR caseIgnoreSubstringsMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 + X-ORIGIN 'RFC 2798' ) +attributeTypes: ( 2.16.840.1.113730.3.1.2 NAME 'departmentNumber' + DESC 'identifies a department within an organization' + EQUALITY caseIgnoreMatch SUBSTR caseIgnoreSubstringsMatch + SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 X-ORIGIN 'RFC 2798' ) +attributeTypes: ( 2.16.840.1.113730.3.1.241 NAME 'displayName' + DESC 'preferred name of a person to be used when displaying entries' + EQUALITY caseIgnoreMatch SUBSTR caseIgnoreSubstringsMatch + SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE X-ORIGIN 'RFC 2798' ) +attributeTypes: ( 2.16.840.1.113730.3.1.3 NAME 'employeeNumber' + DESC 'numerically identifies an employee within an organization' + EQUALITY caseIgnoreMatch SUBSTR caseIgnoreSubstringsMatch + SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE X-ORIGIN 'RFC 2798' ) +attributeTypes: ( 2.16.840.1.113730.3.1.4 NAME 'employeeType' + DESC 'type of employment for a person' EQUALITY caseIgnoreMatch + SUBSTR caseIgnoreSubstringsMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 + X-ORIGIN 'RFC 2798' ) +attributeTypes: ( 0.9.2342.19200300.100.1.60 NAME 'jpegPhoto' + DESC 'a JPEG image' SYNTAX 1.3.6.1.4.1.1466.115.121.1.28 + X-ORIGIN 'RFC 2798' ) +attributeTypes: ( 2.16.840.1.113730.3.1.39 NAME 'preferredLanguage' + DESC 'preferred written or spoken language for a person' + EQUALITY caseIgnoreMatch SUBSTR caseIgnoreSubstringsMatch + SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE X-ORIGIN 'RFC 2798' ) +attributeTypes: ( 2.16.840.1.113730.3.1.40 NAME 'userSMIMECertificate' + DESC 'PKCS#7 SignedData used to support S/MIME' + SYNTAX 1.3.6.1.4.1.1466.115.121.1.5 X-ORIGIN 'RFC 2798' ) +attributeTypes: ( 2.16.840.1.113730.3.1.216 NAME 'userPKCS12' + DESC 'PKCS #12 PFX PDU for exchange of personal identity information' + SYNTAX 1.3.6.1.4.1.1466.115.121.1.5 X-ORIGIN 'RFC 2798' ) +attributeTypes: ( 0.9.2342.19200300.100.1.37 NAME 'associatedDomain' + EQUALITY caseIgnoreIA5Match SUBSTR caseIgnoreIA5SubstringsMatch + SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 X-ORIGIN 'RFC 4524' ) +attributeTypes: ( 0.9.2342.19200300.100.1.38 NAME 'associatedName' + EQUALITY distinguishedNameMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.12 + X-ORIGIN 'RFC 4524' ) +attributeTypes: ( 0.9.2342.19200300.100.1.48 NAME 'buildingName' + EQUALITY caseIgnoreMatch SUBSTR caseIgnoreSubstringsMatch + SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{256} X-ORIGIN 'RFC 4524' ) +attributeTypes: ( 0.9.2342.19200300.100.1.43 NAME 'co' EQUALITY caseIgnore= Match + SUBSTR caseIgnoreSubstringsMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 + X-ORIGIN 'RFC 4524' ) +attributeTypes: ( 0.9.2342.19200300.100.1.14 NAME 'documentAuthor' + EQUALITY distinguishedNameMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.12 + X-ORIGIN 'RFC 4524' ) +attributeTypes: ( 0.9.2342.19200300.100.1.11 NAME 'documentIdentifier' + EQUALITY caseIgnoreMatch SUBSTR caseIgnoreSubstringsMatch + SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{256} X-ORIGIN 'RFC 4524' ) +attributeTypes: ( 0.9.2342.19200300.100.1.15 NAME 'documentLocation' + EQUALITY caseIgnoreMatch SUBSTR caseIgnoreSubstringsMatch + SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{256} X-ORIGIN 'RFC 4524' ) +attributeTypes: ( 0.9.2342.19200300.100.1.56 NAME 'documentPublisher' + EQUALITY caseIgnoreMatch SUBSTR caseIgnoreSubstringsMatch + SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 X-ORIGIN 'RFC 4524' ) +attributeTypes: ( 0.9.2342.19200300.100.1.12 NAME 'documentTitle' + EQUALITY caseIgnoreMatch SUBSTR caseIgnoreSubstringsMatch + SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{256} X-ORIGIN 'RFC 4524' ) +attributeTypes: ( 0.9.2342.19200300.100.1.13 NAME 'documentVersion' + EQUALITY caseIgnoreMatch SUBSTR caseIgnoreSubstringsMatch + SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{256} X-ORIGIN 'RFC 4524' ) +attributeTypes: ( 0.9.2342.19200300.100.1.5 NAME 'drink' + EQUALITY caseIgnoreMatch SUBSTR caseIgnoreSubstringsMatch + SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{256} X-ORIGIN 'RFC 4524' ) +attributeTypes: ( 0.9.2342.19200300.100.1.20 NAME 'homePhone' + EQUALITY telephoneNumberMatch SUBSTR telephoneNumberSubstringsMatch + SYNTAX 1.3.6.1.4.1.1466.115.121.1.50 X-ORIGIN 'RFC 4524' ) +attributeTypes: ( 0.9.2342.19200300.100.1.39 NAME 'homePostalAddress' + EQUALITY caseIgnoreListMatch SUBSTR caseIgnoreListSubstringsMatch + SYNTAX 1.3.6.1.4.1.1466.115.121.1.41 X-ORIGIN 'RFC 4524' ) +attributeTypes: ( 0.9.2342.19200300.100.1.9 NAME 'host' EQUALITY caseIgnor= eMatch + SUBSTR caseIgnoreSubstringsMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{25= 6} + X-ORIGIN 'RFC 4524' ) +attributeTypes: ( 0.9.2342.19200300.100.1.4 NAME 'info' EQUALITY caseIgnor= eMatch + SUBSTR caseIgnoreSubstringsMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{20= 48} + X-ORIGIN 'RFC 4524' ) +attributeTypes: ( 0.9.2342.19200300.100.1.3 NAME 'mail' + EQUALITY caseIgnoreIA5Match SUBSTR caseIgnoreIA5SubstringsMatch + SYNTAX 1.3.6.1.4.1.1466.115.121.1.26{256} X-ORIGIN 'RFC 4524' ) +attributeTypes: ( 0.9.2342.19200300.100.1.10 NAME 'manager' + EQUALITY distinguishedNameMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.12 + X-ORIGIN 'RFC 4524' ) +attributeTypes: ( 0.9.2342.19200300.100.1.41 NAME 'mobile' + EQUALITY telephoneNumberMatch SUBSTR telephoneNumberSubstringsMatch + SYNTAX 1.3.6.1.4.1.1466.115.121.1.50 X-ORIGIN 'RFC 4524' ) +attributeTypes: ( 0.9.2342.19200300.100.1.45 NAME 'organizationalStatus' + EQUALITY caseIgnoreMatch SUBSTR caseIgnoreSubstringsMatch + SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{256} X-ORIGIN 'RFC 4524' ) +attributeTypes: ( 0.9.2342.19200300.100.1.42 NAME 'pager' + EQUALITY telephoneNumberMatch SUBSTR telephoneNumberSubstringsMatch + SYNTAX 1.3.6.1.4.1.1466.115.121.1.50 X-ORIGIN 'RFC 4524' ) +attributeTypes: ( 0.9.2342.19200300.100.1.40 NAME 'personalTitle' + EQUALITY caseIgnoreMatch SUBSTR caseIgnoreSubstringsMatch + SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{256} X-ORIGIN 'RFC 4524' ) +attributeTypes: ( 0.9.2342.19200300.100.1.6 NAME 'roomNumber' + EQUALITY caseIgnoreMatch SUBSTR caseIgnoreSubstringsMatch + SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{256} X-ORIGIN 'RFC 4524' ) +attributeTypes: ( 0.9.2342.19200300.100.1.21 NAME 'secretary' + EQUALITY distinguishedNameMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.12 + X-ORIGIN 'RFC 4524' ) +attributeTypes: ( 0.9.2342.19200300.100.1.44 NAME 'uniqueIdentifier' + EQUALITY caseIgnoreMatch SUBSTR caseIgnoreSubstringsMatch + SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{256} X-ORIGIN 'RFC 4524' ) +attributeTypes: ( 0.9.2342.19200300.100.1.8 NAME 'userClass' + EQUALITY caseIgnoreMatch SUBSTR caseIgnoreSubstringsMatch + SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{256} X-ORIGIN 'RFC 4524' ) +attributeTypes: ( 1.3.6.1.4.1.250.1.57 NAME 'labeledURI' + DESC 'Uniform Resource Identifier with optional label' + EQUALITY caseExactMatch SUBSTR caseExactSubstringsMatch + SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 X-ORIGIN 'RFC 2079' ) +attributeTypes: ( 1.3.6.1.4.1.250.1.41 NAME 'labeledURL' + DESC 'Uniform Resource Locator with optional label' + EQUALITY caseExactMatch SUBSTR caseExactSubstringsMatch + SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 X-ORIGIN 'RFC 2079' ) +attributeTypes: ( 0.9.2342.19200300.100.1.55 NAME 'audio' + EQUALITY octetStringMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.40{250000} + X-ORIGIN 'RFC 1274' ) +attributeTypes: ( 0.9.2342.19200300.100.1.7 NAME 'photo' + EQUALITY octetStringMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.40 + X-ORIGIN 'RFC 1274' ) +attributeTypes: ( 0.9.2342.19200300.100.1.1 NAME 'uid' + EQUALITY caseIgnoreMatch SUBSTR caseIgnoreSubstringsMatch + SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{256} X-ORIGIN 'RFC 1274' ) +attributeTypes: ( 1.3.6.1.1.4 NAME 'vendorName' + EQUALITY 1.3.6.1.4.1.1466.109.114.1 SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 + SINGLE-VALUE NO-USER-MODIFICATION USAGE dSAOperation X-ORIGIN 'RFC 3045'= ) +attributeTypes: ( 1.3.6.1.1.5 NAME 'vendorVersion' + EQUALITY 1.3.6.1.4.1.1466.109.114.1 SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 + SINGLE-VALUE NO-USER-MODIFICATION USAGE dSAOperation X-ORIGIN 'RFC 3045'= ) +attributeTypes: ( 2.16.840.1.113730.3.1.34 NAME 'ref' + DESC 'named reference - a labeledURI' EQUALITY caseExactMatch + SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 USAGE distributedOperation + X-ORIGIN 'RFC 3296' ) +attributeTypes: ( 1.3.6.1.4.1.7628.5.4.1 NAME 'inheritable' + SYNTAX 1.3.6.1.4.1.1466.115.121.1.7 SINGLE-VALUE NO-USER-MODIFICATION + USAGE dSAOperation X-ORIGIN 'draft-ietf-ldup-subentry' ) +attributeTypes: ( 1.3.6.1.4.1.7628.5.4.2 NAME 'blockInheritance' + SYNTAX 1.3.6.1.4.1.1466.115.121.1.7 SINGLE-VALUE NO-USER-MODIFICATION + USAGE dSAOperation X-ORIGIN 'draft-ietf-ldup-subentry' ) +attributeTypes: ( 2.16.840.1.113730.3.1.55 NAME 'aci' + DESC 'Sun-defined access control information attribute type' + SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 USAGE directoryOperation + X-ORIGIN 'Sun Java System Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.1466.101.120.1 NAME 'administratorsAddress' + SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 USAGE directoryOperation + X-ORIGIN 'draft-wahl-ldap-adminaddr' ) +objectClasses: ( 2.5.6.0 NAME 'top' ABSTRACT MUST objectClass + X-ORIGIN 'RFC 2256' ) +objectClasses: ( 2.5.6.1 NAME 'alias' SUP top STRUCTURAL MUST aliasedObjec= tName + X-ORIGIN 'RFC 2256' ) +objectClasses: ( 2.5.6.2 NAME 'country' SUP top STRUCTURAL MUST c + MAY ( searchGuide $ description ) X-ORIGIN 'RFC 2256' ) +objectClasses: ( 2.5.6.3 NAME 'locality' SUP top STRUCTURAL + MAY ( street $ seeAlso $ searchGuide $ st $ l $ description ) + X-ORIGIN 'RFC 2256' ) +objectClasses: ( 2.5.6.4 NAME 'organization' SUP top STRUCTURAL MUST o + MAY ( userPassword $ searchGuide $ seeAlso $ businessCategory $ x121Addr= ess $ + registeredAddress $ destinationIndicator $ preferredDeliveryMethod $ + telexNumber $ teletexTerminalIdentifier $ telephoneNumber $ + internationaliSDNNumber $ facsimileTelephoneNumber $ street $ postOffice= Box $ + postalCode $ postalAddress $ physicalDeliveryOfficeName $ st $ l $ + description ) X-ORIGIN 'RFC 2256' ) +objectClasses: ( 2.5.6.5 NAME 'organizationalUnit' SUP top STRUCTURAL MUST= ou + MAY ( userPassword $ searchGuide $ seeAlso $ businessCategory $ x121Addr= ess $ + registeredAddress $ destinationIndicator $ preferredDeliveryMethod $ + telexNumber $ teletexTerminalIdentifier $ telephoneNumber $ + internationaliSDNNumber $ facsimileTelephoneNumber $ street $ postOffice= Box $ + postalCode $ postalAddress $ physicalDeliveryOfficeName $ st $ l $ + description ) X-ORIGIN 'RFC 2256' ) +objectClasses: ( 2.5.6.6 NAME 'person' SUP top STRUCTURAL MUST ( sn $ cn ) + MAY ( userPassword $ telephoneNumber $ seeAlso $ description ) + X-ORIGIN 'RFC 2256' ) +objectClasses: ( 2.5.6.7 NAME 'organizationalPerson' SUP person STRUCTURAL + MAY ( title $ x121Address $ registeredAddress $ destinationIndicator $ + preferredDeliveryMethod $ telexNumber $ teletexTerminalIdentifier $ + telephoneNumber $ internationaliSDNNumber $ facsimileTelephoneNumber $ + street $ postOfficeBox $ postalCode $ postalAddress $ + physicalDeliveryOfficeName $ ou $ st $ l ) X-ORIGIN 'RFC 2256' ) +objectClasses: ( 2.5.6.8 NAME 'organizationalRole' SUP top STRUCTURAL MUST= cn + MAY ( x121Address $ registeredAddress $ destinationIndicator $ + preferredDeliveryMethod $ telexNumber $ teletexTerminalIdentifier $ + telephoneNumber $ internationaliSDNNumber $ facsimileTelephoneNumber $ + seeAlso $ roleOccupant $ preferredDeliveryMethod $ street $ postOfficeBo= x $ + postalCode $ postalAddress $ physicalDeliveryOfficeName $ ou $ st $ l $ + description ) X-ORIGIN 'RFC 2256' ) +objectClasses: ( 2.5.6.9 NAME 'groupOfNames' SUP top STRUCTURAL + MUST ( member $ cn ) MAY ( businessCategory $ seeAlso $ owner $ ou $ o $ + description ) X-ORIGIN 'RFC 2256' ) +objectClasses: ( 2.5.6.10 NAME 'residentialPerson' SUP person STRUCTURAL M= UST l + MAY ( businessCategory $ x121Address $ registeredAddress $ + destinationIndicator $ preferredDeliveryMethod $ telexNumber $ + teletexTerminalIdentifier $ telephoneNumber $ internationaliSDNNumber $ + facsimileTelephoneNumber $ street $ postOfficeBox $ postalCode $ + postalAddress $ physicalDeliveryOfficeName $ st $ l ) X-ORIGIN 'RFC 2256= ' ) +objectClasses: ( 2.5.6.11 NAME 'applicationProcess' SUP top STRUCTURAL MUS= T cn + MAY ( seeAlso $ ou $ l $ description ) X-ORIGIN 'RFC 2256' ) +objectClasses: ( 2.5.6.12 NAME 'applicationEntity' SUP top STRUCTURAL + MUST ( presentationAddress $ cn ) MAY ( supportedApplicationContext $ + seeAlso $ ou $ o $ l $ description ) X-ORIGIN 'RFC 2256' ) +objectClasses: ( 2.5.6.13 NAME 'dSA' SUP applicationEntity STRUCTURAL + MAY knowledgeInformation X-ORIGIN 'RFC 2256' ) +objectClasses: ( 2.5.6.14 NAME 'device' SUP top STRUCTURAL MUST cn + MAY ( serialNumber $ seeAlso $ owner $ ou $ o $ l $ description ) + X-ORIGIN 'RFC 2256' ) +objectClasses: ( 2.5.6.15 NAME 'strongAuthenticationUser' SUP top AUXILIARY + MUST userCertificate X-ORIGIN 'RFC 2256' ) +objectClasses: ( 2.5.6.16 NAME 'certificationAuthority' SUP top AUXILIARY + MUST ( authorityRevocationList $ certificateRevocationList $ caCertifica= te ) + MAY crossCertificatePair X-ORIGIN 'RFC 2256' ) +objectClasses: ( 2.5.6.16.2 NAME 'certificationAuthority-V2' + SUP certificationAuthority AUXILIARY MAY deltaRevocationList + X-ORIGIN 'RFC 2256' ) +objectClasses: ( 2.5.6.17 NAME 'groupOfUniqueNames' SUP top STRUCTURAL + MUST ( uniqueMember $ cn ) MAY ( businessCategory $ seeAlso $ owner $ ou= $ o $ + description ) X-ORIGIN 'RFC 2256' ) +objectClasses: ( 2.5.6.18 NAME 'userSecurityInformation' SUP top AUXILIARY + MAY ( supportedAlgorithms ) X-ORIGIN 'RFC 2256' ) +objectClasses: ( 2.5.6.19 NAME 'cRLDistributionPoint' SUP top STRUCTURAL + MUST cn MAY ( certificateRevocationList $ authorityRevocationList $ + deltaRevocationList ) X-ORIGIN 'RFC 2256' ) +objectClasses: ( 2.5.6.20 NAME 'dmd' SUP top STRUCTURAL MUST dmdName + MAY ( userPassword $ searchGuide $ seeAlso $ businessCategory $ x121Addr= ess $ + registeredAddress $ destinationIndicator $ preferredDeliveryMethod $ + telexNumber $ teletexTerminalIdentifier $ telephoneNumber $ + internationaliSDNNumber $ facsimileTelephoneNumber $ street $ postOffice= Box $ + postalCode $ postalAddress $ physicalDeliveryOfficeName $ st $ l $ + description ) X-ORIGIN 'RFC 2256' ) +objectClasses: ( 1.3.6.1.4.1.1466.101.120.111 NAME 'extensibleObject' SUP = top + AUXILIARY X-ORIGIN 'RFC 2252' ) +objectClasses: ( 2.5.20.1 NAME 'subschema' AUXILIARY MAY ( dITStructureRul= es $ + nameForms $ ditContentRules $ objectClasses $ attributeTypes $ matchingR= ules $ + matchingRuleUse ) X-ORIGIn 'RFC 2252' ) +objectClasses: ( 0.9.2342.19200300.100.4.5 NAME 'account' SUP top STRUCTUR= AL + MUST uid MAY ( description $ seeAlso $ l $ o $ ou $ host ) + X-ORIGIN 'RFC 4524' ) +objectClasses: ( 0.9.2342.19200300.100.4.6 NAME 'document' SUP top STRUCTU= RAL + MUST documentIdentifier MAY ( cn $ description $ seeAlso $ l $ o $ ou $ + documentTitle $ documentVersion $ documentAuthor $ documentLocation $ + documentPublisher ) X-ORIGIN 'RFC 4524' ) +objectClasses: ( 0.9.2342.19200300.100.4.9 NAME 'documentSeries' SUP top + STRUCTURAL MUST cn MAY ( description $ l $ o $ ou $ seeAlso $ + telephoneNumber ) X-ORIGIN 'RFC 4524' ) +objectClasses: ( 0.9.2342.19200300.100.4.13 NAME 'domain' SUP top STRUCTUR= AL + MUST dc MAY ( userPassword $ searchGuide $ seeAlso $ businessCategory $ + x121Address $ registeredAddress $ destinationIndicator $ + preferredDeliveryMethod $ telexNumber $ teletexTerminalIdentifier $ + telephoneNumber $ internationaliSDNNumber $ facsimileTelephoneNumber $ + street $ postOfficeBox $ postalCode $ postalAddress $ + physicalDeliveryOfficeName $ st $ l $ description $ o $ associatedName ) + X-ORIGIN 'RFC 4524' ) +objectClasses: ( 0.9.2342.19200300.100.4.17 NAME 'domainRelatedObject' SUP= top + AUXILIARY MUST associatedDomain X-ORIGIN 'RFC 4524' ) +objectClasses: ( 0.9.2342.19200300.100.4.18 NAME 'friendlyCountry' SUP cou= ntry + STRUCTURAL MUST co X-ORIGIN 'RFC 4524' ) +objectClasses: ( 0.9.2342.19200300.100.4.14 NAME 'rFC822LocalPart' SUP dom= ain + STRUCTURAL MAY ( cn $ description $ destinationIndicator $ + facsimileTelephoneNumber $ internationaliSDNNumber $ + physicalDeliveryOfficeName $ postalAddress $ postalCode $ postOfficeBox $ + preferredDeliveryMethod $ registeredAddress $ seeAlso $ sn $ street $ + telephoneNumber $ teletexTerminalIdentifier $ telexNumber $ x121Address ) + X-ORIGIN 'RFC 4524' ) +objectClasses: ( 0.9.2342.19200300.100.4.7 NAME 'room' SUP top STRUCTURAL + MUST cn MAY ( roomNumber $ description $ seeAlso $ telephoneNumber ) + X-ORIGIN 'RFC 4524' ) +objectClasses: ( 0.9.2342.19200300.100.4.19 NAME 'simpleSecurityObject' SU= P top + AUXILIARY MUST userPassword X-ORIGIN 'RFC 4524' ) +objectClasses: ( 1.3.6.1.4.1.1466.344 NAME 'dcObject' SUP top AUXILIARY MU= ST dc + X-ORIGIN 'RFC 2247' ) +objectClasses: ( 2.16.840.1.113730.3.2.2 NAME 'inetOrgPerson' + SUP organizationalPerson STRUCTURAL MAY ( audio $ businessCategory $ + carLicense $ departmentNumber $ displayName $ employeeNumber $ employeeT= ype $ + givenName $ homePhone $ homePostalAddress $ initials $ jpegPhoto $ + labeledURI $ mail $ manager $ mobile $ o $ pager $ photo $ roomNumber $ + secretary $ uid $ userCertificate $ x500UniqueIdentifier $ + preferredLanguage $ userSMIMECertificate $ userPKCS12 ) X-ORIGIN 'RFC 27= 98' ) +objectClasses: ( 1.3.6.1.4.1.250.3.15 NAME 'labeledURIObject' + DESC 'object that contains the URI attribute type' SUP top AUXILIARY + MAY labeledURI X-ORIGIN 'RFC 2079' ) +objectClasses: ( 1.3.6.1.4.1.5322.13.1.1 NAME 'namedObject' SUP top STRUCT= URAL + MAY cn X-ORIGIN 'draft-howard-namedobject' ) +objectClasses: ( 1.3.6.1.4.1.26027.1.2.900 NAME 'untypedObject' + DESC 'Entry of no particular type' SUP top STRUCTURAL MAY ( c $ cn $ dc = $ l $ + o $ ou $ st $ street $ uid $ description $ owner $ seeAlso ) + X-ORIGIN 'draft-furuseth-ldap-untypedobject' ) +objectClasses: ( 1.3.6.1.1.3.1 NAME 'uidObject' SUP top AUXILIARY MUST uid + X-ORIGIN 'RFC 2377' ) +objectClasses: ( 2.16.840.1.113730.3.2.6 NAME 'referral' + DESC 'named subordinate reference object' STRUCTURAL MUST ref + X-ORIGIN 'RFC 3296' ) +objectClasses: ( 2.16.840.1.113719.2.142.6.1.1 NAME 'ldapSubEntry' + DESC 'LDAP Subentry class, version 1' SUP top STRUCTURAL MAY ( cn ) = + X-ORIGIN 'draft-ietf-ldup-subentry' ) +objectClasses: ( 1.3.6.1.4.1.7628.5.6.1.1 NAME 'inheritableLDAPSubEntry' + DESC 'Inheritable LDAP Subentry class, version 1' SUP ldapSubEntry + STRUCTURAL MUST ( inheritable ) MAY ( blockInheritance ) + X-ORIGIN 'draft-ietf-ldup-subentry' ) + Added: modules/test/trunk/test/core/resources/config/opends/config/schema/0= 1-pwpolicy.ldif =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/test/core/resources/config/opends/config/schema/01-p= wpolicy.ldif (rev 0) +++ modules/test/trunk/test/core/resources/config/opends/config/schema/01-p= wpolicy.ldif 2007-10-25 12:52:32 UTC (rev 8774) @@ -0,0 +1,118 @@ +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License, Version 1.0 only +# (the "License"). You may not use this file except in compliance +# with the License. +# +# You can obtain a copy of the license at +# trunk/opends/resource/legal-notices/OpenDS.LICENSE +# or https://OpenDS.dev.java.net/OpenDS.LICENSE. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at +# trunk/opends/resource/legal-notices/OpenDS.LICENSE. If applicable, +# add the following below this CDDL HEADER, with the fields enclosed +# by brackets "[]" replaced with your own identifying * information: +# Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# +# +# Portions Copyright 2006 Sun Microsystems, Inc. +# +# +# This file contains schema definitions from draft-behera-ldap-password-po= licy, +# which defines a mechanism for storing password policy information in an = LDAP +# directory server. +dn: cn=3Dschema +objectClass: top +objectClass: ldapSubentry +objectClass: subschema +attributeTypes: ( 1.3.6.1.4.1.42.2.27.8.1.1 NAME 'pwdAttribute' + EQUALITY objectIdentifierMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.38 + X-ORIGIN 'draft-behera-ldap-password-policy' ) +attributeTypes: ( 1.3.6.1.4.1.42.2.27.8.1.2 NAME 'pwdMinAge' + EQUALITY integerMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE + X-ORIGIN 'draft-behera-ldap-password-policy' ) +attributeTypes: ( 1.3.6.1.4.1.42.2.27.8.1.3 NAME 'pwdMaxAge' + EQUALITY integerMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE + X-ORIGIN 'draft-behera-ldap-password-policy' ) +attributeTypes: ( 1.3.6.1.4.1.42.2.27.8.1.4 NAME 'pwdInHistory' + EQUALITY integerMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE + X-ORIGIN 'draft-behera-ldap-password-policy' ) +attributeTypes: ( 1.3.6.1.4.1.42.2.27.8.1.5 NAME 'pwdCheckQuality' + EQUALITY integerMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE + X-ORIGIN 'draft-behera-ldap-password-policy' ) +attributeTypes: ( 1.3.6.1.4.1.42.2.27.8.1.6 NAME 'pwdMinLength' + EQUALITY integerMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE + X-ORIGIN 'draft-behera-ldap-password-policy' ) +attributeTypes: ( 1.3.6.1.4.1.42.2.27.8.1.7 NAME 'pwdExpireWarning' + EQUALITY integerMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE + X-ORIGIN 'draft-behera-ldap-password-policy' ) +attributeTypes: ( 1.3.6.1.4.1.42.2.27.8.1.8 NAME 'pwdGraceAuthNLimit' + EQUALITY integerMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE + X-ORIGIN 'draft-behera-ldap-password-policy' ) +attributeTypes: ( 1.3.6.1.4.1.42.2.27.8.1.9 NAME 'pwdLockout' + EQUALITY booleanMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.7 SINGLE-VALUE + X-ORIGIN 'draft-behera-ldap-password-policy' ) +attributeTypes: ( 1.3.6.1.4.1.42.2.27.8.1.10 NAME 'pwdLockoutDuration' + EQUALITY integerMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE + X-ORIGIN 'draft-behera-ldap-password-policy' ) +attributeTypes: ( 1.3.6.1.4.1.42.2.27.8.1.11 NAME 'pwdMaxFailure' + EQUALITY integerMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE + X-ORIGIN 'draft-behera-ldap-password-policy' ) +attributeTypes: ( 1.3.6.1.4.1.42.2.27.8.1.12 NAME 'pwdFailureCountInterval' + EQUALITY integerMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE + X-ORIGIN 'draft-behera-ldap-password-policy' ) +attributeTypes: ( 1.3.6.1.4.1.42.2.27.8.1.13 NAME 'pwdMustChange' + EQUALITY booleanMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.7 SINGLE-VALUE + X-ORIGIN 'draft-behera-ldap-password-policy' ) +attributeTypes: ( 1.3.6.1.4.1.42.2.27.8.1.14 NAME 'pwdAllowUserChange' + EQUALITY booleanMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.7 SINGLE-VALUE + X-ORIGIN 'draft-behera-ldap-password-policy' ) +attributeTypes: ( 1.3.6.1.4.1.42.2.27.8.1.15 NAME 'pwdSafeModify' + EQUALITY booleanMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.7 SINGLE-VALUE + X-ORIGIN 'draft-behera-ldap-password-policy' ) +attributeTypes: ( 1.3.6.1.4.1.42.2.27.8.1.16 NAME 'pwdChangedTime' + DESC 'The time the password was last changed' EQUALITY generalizedTimeMa= tch + ORDERING generalizedTimeOrderingMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.= 24 + SINGLE-VALUE NO-USER-MODIFICATION USAGE directoryOperation + X-ORIGIN 'draft-behera-ldap-password-policy' ) +attributeTypes: ( 1.3.6.1.4.1.42.2.27.8.1.17 NAME 'pwdAccountLockedTime' + DESC 'The time an user account was locked' EQUALITY generalizedTimeMatch + ORDERING generalizedTimeOrderingMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.= 24 + SINGLE-VALUE NO-USER-MODIFICATION USAGE directoryOperation + X-ORIGIN 'draft-behera-ldap-password-policy' ) +attributeTypes: ( 1.3.6.1.4.1.42.2.27.8.1.19 NAME 'pwdFailureTime' + DESC 'The timestamps of the last consecutive authentication failures' + EQUALITY generalizedTimeMatch ORDERING generalizedTimeOrderingMatch + SYNTAX 1.3.6.1.4.1.1466.115.121.1.24 NO-USER-MODIFICATION + USAGE directoryOperation X-ORIGIN 'draft-behera-ldap-password-policy' ) +attributeTypes: ( 1.3.6.1.4.1.42.2.27.8.1.20 NAME 'pwdHistory' + DESC 'The history of user s passwords' EQUALITY octetStringMatch + SYNTAX 1.3.6.1.4.1.1466.115.121.1.40 NO-USER-MODIFICATION + USAGE directoryOperation X-ORIGIN 'draft-behera-ldap-password-policy' ) +attributeTypes: ( 1.3.6.1.4.1.42.2.27.8.1.21 NAME 'pwdGraceUseTime' + DESC 'The timestamps of the grace authentication after the password has + expired' EQUALITY generalizedTimeMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1= .24 + NO-USER-MODIFICATION USAGE directoryOperation + X-ORIGIN 'draft-behera-ldap-password-policy' ) +attributeTypes: ( 1.3.6.1.4.1.42.2.27.8.1.22 NAME 'pwdReset' + DESC 'The indication that the password has been reset' EQUALITY booleanM= atch + SYNTAX 1.3.6.1.4.1.1466.115.121.1.7 SINGLE-VALUE USAGE directoryOperation + X-ORIGIN 'draft-behera-ldap-password-policy' ) +attributeTypes: ( 1.3.6.1.4.1.42.2.27.8.1.23 NAME 'pwdPolicySubentry' + DESC 'The pwdPolicy subentry in effect for this object' + EQUALITY distinguishedNameMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.12 + SINGLE-VALUE NO-USER-MODIFICATION USAGE directoryOperation + X-ORIGIN 'draft-behera-ldap-password-policy' ) +objectClasses: ( 1.3.6.1.4.1.42.2.27.8.2.1 NAME 'pwdPolicy' SUP top AUXILI= ARY + MUST ( pwdAttribute ) MAY ( pwdMinAge $ pwdMaxAge $ pwdInHistory $ + pwdCheckQuality $ pwdMinLength $ pwdExpireWarning $ pwdGraceAuthNLimit $ + pwdLockout $ pwdLockoutDuration $ pwdMaxFailure $ pwdFailureCountInterva= l $ + pwdMustChange $ pwdAllowUserChange $ pwdSafeModify ) = + X-ORIGIN 'draft-behera-ldap-password-policy' ) + Added: modules/test/trunk/test/core/resources/config/opends/config/schema/0= 2-config.ldif =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/test/core/resources/config/opends/config/schema/02-c= onfig.ldif (rev 0) +++ modules/test/trunk/test/core/resources/config/opends/config/schema/02-c= onfig.ldif 2007-10-25 12:52:32 UTC (rev 8774) @@ -0,0 +1,1349 @@ +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License, Version 1.0 only +# (the "License"). You may not use this file except in compliance +# with the License. +# +# You can obtain a copy of the license at +# trunk/opends/resource/legal-notices/OpenDS.LICENSE +# or https://OpenDS.dev.java.net/OpenDS.LICENSE. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at +# trunk/opends/resource/legal-notices/OpenDS.LICENSE. If applicable, +# add the following below this CDDL HEADER, with the fields enclosed +# by brackets "[]" replaced with your own identifying * information: +# Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# +# +# Portions Copyright 2006 Sun Microsystems, Inc. +# +# +# This file contains the attribute type and objectclass definitions for use +# with the Directory Server configuration. +dn: cn=3Dschema +objectClass: top +objectClass: ldapSubentry +objectClass: subschema +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.1 + NAME 'ds-cfg-acl-handler-class' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 + SINGLE-VALUE X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.2 + NAME 'ds-cfg-acl-handler-enabled' SYNTAX 1.3.6.1.4.1.1466.115.121.1.7 + SINGLE-VALUE X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.3 + NAME 'ds-cfg-alert-handler-class' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 + SINGLE-VALUE X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.4 + NAME 'ds-cfg-alert-handler-enabled' SYNTAX 1.3.6.1.4.1.1466.115.121.1.7 + SINGLE-VALUE X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.5 + NAME 'ds-cfg-allow-attribute-name-exceptions' + SYNTAX 1.3.6.1.4.1.1466.115.121.1.7 SINGLE-VALUE + X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.6 NAME 'ds-cfg-allowed-client' + SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.7 + NAME 'ds-cfg-allow-ldapv2' SYNTAX 1.3.6.1.4.1.1466.115.121.1.7 SINGLE-VA= LUE + X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.8 + NAME 'ds-cfg-allow-start-tls' SYNTAX 1.3.6.1.4.1.1466.115.121.1.7 + SINGLE-VALUE X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.9 + NAME 'ds-cfg-allow-tcp-reuse-address' SYNTAX 1.3.6.1.4.1.1466.115.121.1.7 + SINGLE-VALUE X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.10 NAME 'ds-cfg-backend-base-dn' + SYNTAX 1.3.6.1.4.1.1466.115.121.1.12 X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.11 NAME 'ds-cfg-backend-class' + SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE + X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.12 + NAME 'ds-cfg-backend-directory' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 + SINGLE-VALUE X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.13 + NAME 'ds-cfg-backend-enabled' SYNTAX 1.3.6.1.4.1.1466.115.121.1.7 + SINGLE-VALUE X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.14 NAME 'ds-cfg-backend-id' + SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE + X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.15 + NAME 'ds-cfg-backend-index-entry-limit' + SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE + X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.16 + NAME 'ds-cfg-backend-subtree-delete-size-limit' + SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE + X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.17 NAME 'ds-cfg-alternate-bind-dn' + SYNTAX 1.3.6.1.4.1.1466.115.121.1.12 X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.18 + NAME 'ds-cfg-certificate-attribute' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 + SINGLE-VALUE X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.19 + NAME 'ds-cfg-certificate-mapper-class' SYNTAX 1.3.6.1.4.1.1466.115.121.1= .15 + SINGLE-VALUE X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.20 + NAME 'ds-cfg-certificate-mapper-enabled' SYNTAX 1.3.6.1.4.1.1466.115.121= .1.7 + SINGLE-VALUE X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.21 NAME 'ds-cfg-check-schema' + SYNTAX 1.3.6.1.4.1.1466.115.121.1.7 SINGLE-VALUE + X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.22 + NAME 'ds-cfg-client-certificate-validation-policy' + SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE + X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.23 + NAME 'ds-cfg-connection-handler-class' SYNTAX 1.3.6.1.4.1.1466.115.121.1= .15 + SINGLE-VALUE X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.24 + NAME 'ds-cfg-connection-handler-enabled' SYNTAX 1.3.6.1.4.1.1466.115.121= .1.7 + SINGLE-VALUE X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.25 + NAME 'ds-cfg-database-cache-percent' SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 + SINGLE-VALUE X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.26 + NAME 'ds-cfg-database-cleaner-min-utilization' + SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE + X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.27 + NAME 'ds-cfg-database-cache-size' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 + SINGLE-VALUE X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.28 + NAME 'ds-cfg-database-run-cleaner' SYNTAX 1.3.6.1.4.1.1466.115.121.1.7 + SINGLE-VALUE X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.29 + NAME 'ds-cfg-database-txn-no-sync' SYNTAX 1.3.6.1.4.1.1466.115.121.1.7 + SINGLE-VALUE X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.30 + NAME 'ds-cfg-database-txn-write-no-sync' SYNTAX 1.3.6.1.4.1.1466.115.121= .1.7 + SINGLE-VALUE X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.31 + NAME 'ds-cfg-default-severity' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 + X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.32 NAME 'ds-cfg-denied-client' + SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.33 + NAME 'ds-cfg-enable-profiling-on-startup' + SYNTAX 1.3.6.1.4.1.1466.115.121.1.7 SINGLE-VALUE + X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.34 + NAME 'ds-cfg-entry-cache-class' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 + SINGLE-VALUE X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.35 + NAME 'ds-cfg-entry-cache-enabled' SYNTAX 1.3.6.1.4.1.1466.115.121.1.7 + SINGLE-VALUE X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.36 + NAME 'ds-cfg-extended-operation-handler-class' + SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE + X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.37 + NAME 'ds-cfg-extended-operation-handler-enabled' + SYNTAX 1.3.6.1.4.1.1466.115.121.1.7 SINGLE-VALUE + X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.38 NAME 'ds-cfg-exclude-filter' + SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.39 + NAME 'ds-cfg-fixed-time-limit' SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 + SINGLE-VALUE X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.40 + NAME 'ds-cfg-index-attribute' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 + SINGLE-VALUE X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.41 + NAME 'ds-cfg-index-entry-limit' SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 + SINGLE-VALUE X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.42 NAME 'ds-cfg-index-type' + SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.43 NAME 'ds-cfg-include-filter' + SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.44 + NAME 'ds-cfg-invalid-attribute-syntax-behavior' + SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE + X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.45 NAME 'ds-cfg-kdc-address' + SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE + X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.46 NAME 'ds-cfg-keytab' + SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE + X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.47 NAME 'ds-cfg-keep-stats' + SYNTAX 1.3.6.1.4.1.1466.115.121.1.7 SINGLE-VALUE + X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.48 + NAME 'ds-cfg-key-manager-provider-class' SYNTAX 1.3.6.1.4.1.1466.115.121= .1.15 + SINGLE-VALUE X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.49 + NAME 'ds-cfg-key-manager-provider-enabled' + SYNTAX 1.3.6.1.4.1.1466.115.121.1.7 SINGLE-VALUE + X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.50 NAME 'ds-cfg-key-store-file' + SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE + X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.51 NAME 'ds-cfg-key-store-pin' + SYNTAX 1.3.6.1.4.1.1466.115.121.1.40 SINGLE-VALUE + X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.52 + NAME 'ds-cfg-key-store-pin-environment-variable' + SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE + X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.53 + NAME 'ds-cfg-key-store-pin-file' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 + SINGLE-VALUE X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.54 + NAME 'ds-cfg-key-store-pin-property' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 + SINGLE-VALUE X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.55 NAME 'ds-cfg-key-store-type' + SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE + X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.56 NAME 'ds-cfg-listen-address' + SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.57 NAME 'ds-cfg-listen-port' + SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE + X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.58 + NAME 'ds-cfg-lock-timeout' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 + SINGLE-VALUE X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.59 NAME 'ds-cfg-log-file' + SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE + X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.60 NAME 'ds-cfg-logger-class' + SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE + X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.61 + NAME 'ds-cfg-logger-enabled' SYNTAX 1.3.6.1.4.1.1466.115.121.1.7 + SINGLE-VALUE X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.62 + NAME 'ds-cfg-matching-rule-class' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 + SINGLE-VALUE X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.63 + NAME 'ds-cfg-matching-rule-enabled' SYNTAX 1.3.6.1.4.1.1466.115.121.1.7 + SINGLE-VALUE X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.64 + NAME 'ds-cfg-max-allowed-client-connections' + SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE + X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.65 + NAME 'ds-cfg-max-entries' SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 + SINGLE-VALUE X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.66 + NAME 'ds-cfg-max-memory-percent' SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 + SINGLE-VALUE X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.67 + NAME 'ds-cfg-max-request-size' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 + SINGLE-VALUE X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.68 + NAME 'ds-cfg-max-work-queue-capacity' + SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE + X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.69 + NAME 'ds-cfg-monitor-provider-class' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 + SINGLE-VALUE X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.70 + NAME 'ds-cfg-monitor-provider-enabled' SYNTAX 1.3.6.1.4.1.1466.115.121.1= .7 + SINGLE-VALUE X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.71 + NAME 'ds-cfg-notify-abandoned-operations' + SYNTAX 1.3.6.1.4.1.1466.115.121.1.7 SINGLE-VALUE + X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.72 + NAME 'ds-cfg-num-request-handlers' + SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE + X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.73 + NAME 'ds-cfg-num-worker-threads' + SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE + X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.74 + NAME 'ds-cfg-override-severity' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 + X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.75 + NAME 'ds-cfg-password-storage-scheme-class' + SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE + X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.76 + NAME 'ds-cfg-password-storage-scheme-enabled' + SYNTAX 1.3.6.1.4.1.1466.115.121.1.7 SINGLE-VALUE + X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.77 + NAME 'ds-cfg-password-validator-class' + SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE + X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.78 + NAME 'ds-cfg-password-validator-enabled' + SYNTAX 1.3.6.1.4.1.1466.115.121.1.7 SINGLE-VALUE + X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.79 NAME 'ds-cfg-plugin-class' + SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE + X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.80 NAME 'ds-cfg-plugin-enabled' + SYNTAX 1.3.6.1.4.1.1466.115.121.1.7 SINGLE-VALUE + X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.81 NAME 'ds-cfg-plugin-type' + SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.82 NAME 'ds-cfg-profile-action' + SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE + X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.83 + NAME 'ds-cfg-profile-directory' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 + SINGLE-VALUE X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.84 + NAME 'ds-cfg-profiler-state' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 + SINGLE-VALUE NO-USER-MODIFICATION X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.85 + NAME 'ds-cfg-profile-sample-interval' SYNTAX 1.3.6.1.4.1.1466.115.121.1.= 15 + SINGLE-VALUE X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.86 NAME 'ds-cfg-realm' + SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE + X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.87 + NAME 'ds-recurring-task-class-name' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 + SINGLE-VALUE X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.88 + NAME 'ds-recurring-task-id' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 + SINGLE-VALUE X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.89 + NAME 'ds-cfg-rotation-action' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 + SINGLE-VALUE X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.90 + NAME 'ds-cfg-rotation-policy' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 + X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.91 + NAME 'ds-cfg-retention-policy' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 + X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.92 NAME 'ds-cfg-number-of-files' + SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.93 NAME 'ds-cfg-disk-space-used' + SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.94 NAME 'ds-cfg-free-disk-space' + SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.95 + NAME 'ds-task-shutdown-message' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 + SINGLE-VALUE X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.96 + NAME 'ds-task-actual-start-time' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 + SINGLE-VALUE X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.97 + NAME 'ds-cfg-task-backing-file' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 + SINGLE-VALUE X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.98 + NAME 'ds-task-class-name' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 + SINGLE-VALUE X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.99 + NAME 'ds-task-completion-time' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 + SINGLE-VALUE X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.100 + NAME 'ds-task-dependency-id' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 + X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.101 + NAME 'ds-task-failed-dependency-action' + SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE + X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.102 + NAME 'ds-task-id' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE + X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.103 + NAME 'ds-task-log-message' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 + X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.104 + NAME 'ds-task-notify-on-completion' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 + X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.105 + NAME 'ds-task-notify-on-error' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 + X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.106 + NAME 'ds-cfg-task-retention-time' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 + X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.107 + NAME 'ds-task-scheduled-start-time' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 + SINGLE-VALUE X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.108 + NAME 'ds-task-state' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE + X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.109 + NAME 'ds-cfg-thread-time-interval' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 + X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.110 NAME 'ds-cfg-buffer-size' + SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.111 + NAME 'ds-cfg-sasl-mechanism-handler-class' + SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE + X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.112 + NAME 'ds-cfg-sasl-mechanism-handler-enabled' + SYNTAX 1.3.6.1.4.1.1466.115.121.1.7 SINGLE-VALUE + X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.113 + NAME 'ds-cfg-schema-entry-dn' SYNTAX 1.3.6.1.4.1.1466.115.121.1.12 + X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.114 + NAME 'ds-cfg-send-rejection-notice' SYNTAX 1.3.6.1.4.1.1466.115.121.1.7 + SINGLE-VALUE X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.115 NAME 'ds-cfg-server-fqdn' + SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE + X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.116 + NAME 'ds-task-shutdown-password' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 + SINGLE-VALUE X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.117 + NAME 'ds-cfg-single-structural-objectclass-behavior' + SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE + X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.118 NAME 'ds-cfg-size-limit' + SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE + X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.119 + NAME 'ds-cfg-ssl-client-auth-policy' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 + SINGLE-VALUE X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.120 + NAME 'ds-cfg-ssl-cert-nickname' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 + SINGLE-VALUE X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.121 + NAME 'ds-cfg-strict-telephone-number-format' + SYNTAX 1.3.6.1.4.1.1466.115.121.1.7 SINGLE-VALUE + X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.122 + NAME 'ds-cfg-subordinate-base-dn' SYNTAX 1.3.6.1.4.1.1466.115.121.1.12 + X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.123 + NAME 'ds-cfg-suppress-internal-operations' + SYNTAX 1.3.6.1.4.1.1466.115.121.1.7 SINGLE-VALUE + X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.124 NAME 'ds-cfg-syntax-class' + SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE + X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.125 NAME 'ds-cfg-syntax-enabled' + SYNTAX 1.3.6.1.4.1.1466.115.121.1.7 SINGLE-VALUE + X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.126 NAME 'ds-cfg-time-of-day' + SYNTAX 1.3.6.1.4.1.1466.115.121.1.36 SINGLE-VALUE + X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.127 + NAME 'ds-cfg-trust-manager-provider-class' + SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE + X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.128 + NAME 'ds-cfg-trust-manager-provider-enabled' + SYNTAX 1.3.6.1.4.1.1466.115.121.1.7 SINGLE-VALUE + X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.129 + NAME 'ds-cfg-trust-store-file' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 + SINGLE-VALUE X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.130 + NAME 'ds-cfg-trust-store-pin' SYNTAX 1.3.6.1.4.1.1466.115.121.1.40 + SINGLE-VALUE X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.131 + NAME 'ds-cfg-trust-store-pin-environment-variable' + SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE + X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.132 + NAME 'ds-cfg-trust-store-pin-file' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 + SINGLE-VALUE X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.133 + NAME 'ds-cfg-trust-store-pin-property' SYNTAX 1.3.6.1.4.1.1466.115.121.1= .15 + SINGLE-VALUE X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.134 + NAME 'ds-cfg-trust-store-type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 + SINGLE-VALUE X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.135 NAME 'ds-cfg-user-base-dn' + SYNTAX 1.3.6.1.4.1.1466.115.121.1.12 SINGLE-VALUE + X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.136 + NAME 'ds-cfg-user-name-attribute' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 + SINGLE-VALUE X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.137 NAME 'ds-cfg-use-ssl' + SYNTAX 1.3.6.1.4.1.1466.115.121.1.7 SINGLE-VALUE + X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.138 + NAME 'ds-cfg-use-tcp-keepalive' SYNTAX 1.3.6.1.4.1.1466.115.121.1.7 + SINGLE-VALUE X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.139 + NAME 'ds-cfg-use-tcp-nodelay' SYNTAX 1.3.6.1.4.1.1466.115.121.1.7 + SINGLE-VALUE X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.140 + NAME 'ds-cfg-allow-zero-length-values' SYNTAX 1.3.6.1.4.1.1466.115.121.1= .7 + SINGLE-VALUE X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.141 + NAME 'ds-cfg-show-all-attributes' SYNTAX 1.3.6.1.4.1.1466.115.121.1.7 + SINGLE-VALUE X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.142 + NAME 'ds-cfg-add-missing-rdn-attributes' SYNTAX 1.3.6.1.4.1.1466.115.121= .1.7 + SINGLE-VALUE X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.143 + NAME 'ds-cfg-server-error-result-code' SYNTAX 1.3.6.1.4.1.1466.115.121.1= .27 + SINGLE-VALUE X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.144 + NAME 'ds-cfg-identity-mapper-class' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 + SINGLE-VALUE X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.145 + NAME 'ds-cfg-identity-mapper-enabled' SYNTAX 1.3.6.1.4.1.1466.115.121.1.7 + SINGLE-VALUE X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.146 + NAME 'ds-cfg-match-attribute' SYNTAX 1.3.6.1.4.1.1466.115.121.1.38 + X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.147 + NAME 'ds-cfg-match-base-dn' SYNTAX 1.3.6.1.4.1.1466.115.121.1.12 + X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.148 + NAME 'ds-cfg-identity-mapper-dn' SYNTAX 1.3.6.1.4.1.1466.115.121.1.12 + SINGLE-VALUE X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.149 + NAME 'ds-cfg-proxied-authorization-identity-mapper-dn' + SYNTAX 1.3.6.1.4.1.1466.115.121.1.12 SINGLE-VALUE + X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.150 NAME 'ds-cfg-time-limit' + SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE + X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.151 NAME 'ds-rlim-size-limit' + SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE USAGE directoryOperati= on + X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.152 NAME 'ds-rlim-time-limit' + SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE USAGE directoryOperati= on + X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.153 + NAME 'ds-cfg-accept-backlog' SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 + SINGLE-VALUE X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.154 + NAME 'ds-cfg-synchronization-provider-class' + SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE + X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.155 + NAME 'ds-cfg-synchronization-provider-enabled' + SYNTAX 1.3.6.1.4.1.1466.115.121.1.7 SINGLE-VALUE + X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.156 NAME 'ds-sync-hist' + ORDERING historicalCsnOrderingMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 + USAGE directoryOperation X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.157 + NAME 'ds-cfg-receive-status' + SYNTAX 1.3.6.1.4.1.1466.115.121.1.7 + X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.158 + NAME 'ds-cfg-changelog-port' + SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 + X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.278 + NAME 'ds-cfg-changelog-server-id' + SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 + X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.279 + NAME 'ds-cfg-directory-server-id' + SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 + X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.160 + NAME 'ds-cfg-changelog-server' + SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 + X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.161 + NAME 'ds-cfg-writability-mode' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 + SINGLE-VALUE X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.162 + NAME 'ds-cfg-backend-writability-mode' SYNTAX 1.3.6.1.4.1.1466.115.121.1= .15 + SINGLE-VALUE X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.163 + NAME 'ds-cfg-bind-with-dn-requires-password' + SYNTAX 1.3.6.1.4.1.1466.115.121.1.7 SINGLE-VALUE + X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.164 + NAME 'ds-cfg-max-receive-queue' + SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE + X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.165 + NAME 'ds-cfg-max-receive-delay' + SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE + X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.166 + NAME 'ds-cfg-max-send-queue' + SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE + X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.167 + NAME 'ds-cfg-max-send-delay' + SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE + X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.168 + NAME 'ds-cfg-maximum-password-length' SYNTAX 1.3.6.1.4.1.1466.115.121.1.= 27 + SINGLE-VALUE X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.169 + NAME 'ds-cfg-minimum-password-length' SYNTAX 1.3.6.1.4.1.1466.115.121.1.= 27 + SINGLE-VALUE X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.170 + NAME 'ds-cfg-password-character-set' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 + X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.171 + NAME 'ds-cfg-password-format' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 + SINGLE-VALUE X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.172 + NAME 'ds-cfg-password-generator-class' SYNTAX 1.3.6.1.4.1.1466.115.121.1= .15 + SINGLE-VALUE X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.173 + NAME 'ds-cfg-password-generator-enabled' SYNTAX 1.3.6.1.4.1.1466.115.121= .1.7 + SINGLE-VALUE X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.174 + NAME 'ds-cfg-account-status-notification-handler-dn' + SYNTAX 1.3.6.1.4.1.1466.115.121.1.12 X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.175 + NAME 'ds-cfg-allow-expired-password-changes' + SYNTAX 1.3.6.1.4.1.1466.115.121.1.7 SINGLE-VALUE + X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.176 + NAME 'ds-cfg-allow-pre-encoded-passwords' SYNTAX 1.3.6.1.4.1.1466.115.12= 1.1.7 + SINGLE-VALUE X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.177 + NAME 'ds-cfg-allow-user-password-changes' SYNTAX 1.3.6.1.4.1.1466.115.12= 1.1.7 + SINGLE-VALUE X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.178 + NAME 'ds-cfg-default-password-storage-scheme' + SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.179 + NAME 'ds-cfg-deprecated-password-storage-scheme' + SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.180 + NAME 'ds-cfg-expire-passwords-without-warning' + SYNTAX 1.3.6.1.4.1.1466.115.121.1.7 SINGLE-VALUE + X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.181 + NAME 'ds-cfg-force-change-on-reset' SYNTAX 1.3.6.1.4.1.1466.115.121.1.7 + SINGLE-VALUE X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.182 + NAME 'ds-cfg-grace-login-count' SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 + SINGLE-VALUE X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.183 + NAME 'ds-cfg-idle-lockout-interval' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 + SINGLE-VALUE X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.184 + NAME 'ds-cfg-last-login-time-attribute' SYNTAX 1.3.6.1.4.1.1466.115.121.= 1.38 + SINGLE-VALUE X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.185 + NAME 'ds-cfg-last-login-time-format' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 + SINGLE-VALUE X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.186 + NAME 'ds-cfg-lockout-duration' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 + SINGLE-VALUE X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.187 + NAME 'ds-cfg-lockout-failure-count' SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 + SINGLE-VALUE X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.188 + NAME 'ds-cfg-lockout-failure-expiration-interval' + SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE + X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.189 + NAME 'ds-cfg-maximum-password-age' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 + SINGLE-VALUE X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.190 + NAME 'ds-cfg-maximum-password-reset-age' SYNTAX 1.3.6.1.4.1.1466.115.121= .1.15 + SINGLE-VALUE X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.191 + NAME 'ds-cfg-minimum-password-age' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 + SINGLE-VALUE X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.192 + NAME 'ds-cfg-password-attribute' SYNTAX 1.3.6.1.4.1.1466.115.121.1.38 + SINGLE-VALUE X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.193 + NAME 'ds-cfg-password-expiration-warning-interval' + SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE + X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.194 + NAME 'ds-cfg-password-generator-dn' SYNTAX 1.3.6.1.4.1.1466.115.121.1.12 + SINGLE-VALUE X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.195 + NAME 'ds-cfg-password-validator-dn' SYNTAX 1.3.6.1.4.1.1466.115.121.1.12 + X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.196 + NAME 'ds-cfg-previous-last-login-time-format' + SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.197 + NAME 'ds-cfg-require-change-by-time' SYNTAX 1.3.6.1.4.1.1466.115.121.1.24 + SINGLE-VALUE X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.198 + NAME 'ds-cfg-password-change-requires-current-password' + SYNTAX 1.3.6.1.4.1.1466.115.121.1.7 SINGLE-VALUE + X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.199 + NAME 'ds-cfg-require-secure-authentication' + SYNTAX 1.3.6.1.4.1.1466.115.121.1.7 SINGLE-VALUE + X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.200 + NAME 'ds-cfg-require-secure-password-changes' + SYNTAX 1.3.6.1.4.1.1466.115.121.1.7 SINGLE-VALUE + X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.201 + NAME 'ds-cfg-skip-validation-for-administrators' + SYNTAX 1.3.6.1.4.1.1466.115.121.1.7 SINGLE-VALUE + X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.202 + NAME 'ds-cfg-default-password-policy' SYNTAX 1.3.6.1.4.1.1466.115.121.1.= 12 + SINGLE-VALUE X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.203 NAME 'ds-pwp-last-login-time' + SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE USAGE directoryOperati= on + X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.204 + NAME 'ds-pwp-password-changed-by-required-time' + SYNTAX 1.3.6.1.4.1.1466.115.121.1.24 SINGLE-VALUE USAGE directoryOperati= on + X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.205 NAME 'ds-pwp-reset-time' + SYNTAX 1.3.6.1.4.1.1466.115.121.1.24 SINGLE-VALUE USAGE directoryOperati= on + X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.206 NAME 'ds-pwp-warned-time' + SYNTAX 1.3.6.1.4.1.1466.115.121.1.24 SINGLE-VALUE USAGE directoryOperati= on + X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.207 + NAME 'ds-pwp-account-disabled' SYNTAX 1.3.6.1.4.1.1466.115.121.1.7 + SINGLE-VALUE USAGE directoryOperation X-ORIGIN 'OpenDS Directory Server'= ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.208 + NAME 'ds-cfg-force-change-on-add' SYNTAX 1.3.6.1.4.1.1466.115.121.1.7 + SINGLE-VALUE X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.209 + NAME 'ds-cfg-allow-multiple-password-values' + SYNTAX 1.3.6.1.4.1.1466.115.121.1.7 SINGLE-VALUE + X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.210 + NAME 'ds-task-import-ldif-file' + SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 + X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.211 + NAME 'ds-task-import-append' + SYNTAX 1.3.6.1.4.1.1466.115.121.1.7 SINGLE-VALUE + X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.212 + NAME 'ds-task-import-replace-existing' + SYNTAX 1.3.6.1.4.1.1466.115.121.1.7 SINGLE-VALUE + X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.213 + NAME 'ds-task-import-backend-id' + SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE + X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.214 + NAME 'ds-task-import-include-branch' + SYNTAX 1.3.6.1.4.1.1466.115.121.1.12 + X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.215 + NAME 'ds-task-import-exclude-branch' + SYNTAX 1.3.6.1.4.1.1466.115.121.1.12 + X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.216 + NAME 'ds-task-import-include-attribute' + SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 + X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.217 + NAME 'ds-task-import-exclude-attribute' + SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 + X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.218 + NAME 'ds-task-import-include-filter' + SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 + X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.219 + NAME 'ds-task-import-exclude-filter' + SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 + X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.220 + NAME 'ds-task-import-reject-file' + SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE + X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.221 + NAME 'ds-task-import-overwrite-rejects' + SYNTAX 1.3.6.1.4.1.1466.115.121.1.7 SINGLE-VALUE + X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.222 + NAME 'ds-task-import-skip-schema-validation' + SYNTAX 1.3.6.1.4.1.1466.115.121.1.7 SINGLE-VALUE + X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.223 + NAME 'ds-task-import-is-compressed' + SYNTAX 1.3.6.1.4.1.1466.115.121.1.7 SINGLE-VALUE + X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.224 + NAME 'ds-task-import-is-encrypted' + SYNTAX 1.3.6.1.4.1.1466.115.121.1.7 SINGLE-VALUE + X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.225 + NAME 'ds-task-restart-server' SYNTAX 1.3.6.1.4.1.1466.115.121.1.7 + SINGLE-VALUE X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.226 + NAME 'ds-cfg-synchronization-dn' + SYNTAX 1.3.6.1.4.1.1466.115.121.1.12 + SINGLE-VALUE X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.227 NAME 'ds-sync-state' + SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.228 + NAME 'ds-cfg-backup-directory' EQUALITY caseExactMatch + SUBSTR caseExactSubstringsMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 + X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.229 NAME 'ds-backup-compressed' + SYNTAX 1.3.6.1.4.1.1466.115.121.1.7 SINGLE-VALUE + X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.230 NAME 'ds-backup-date' + SYNTAX 1.3.6.1.4.1.1466.115.121.1.24 SINGLE-VALUE + X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.231 NAME 'ds-backup-dependency' + SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.232 + NAME 'ds-backup-directory-path' EQUALITY caseExactMatch + SUBSTR caseExactSubstringsMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 + SINGLE-VALUE X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.233 NAME 'ds-backup-encrypted' + SYNTAX 1.3.6.1.4.1.1466.115.121.1.7 SINGLE-VALUE + X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.234 NAME 'ds-backup-id' + SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE + X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.235 NAME 'ds-backup-incremental' + SYNTAX 1.3.6.1.4.1.1466.115.121.1.7 SINGLE-VALUE + X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.236 NAME 'ds-backup-signed-hash' + SYNTAX 1.3.6.1.4.1.1466.115.121.1.40 SINGLE-VALUE + X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.237 + NAME 'ds-backup-unsigned-hash' SYNTAX 1.3.6.1.4.1.1466.115.121.1.40 + SINGLE-VALUE X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.238 NAME 'ds-backup-backend-dn' + SYNTAX 1.3.6.1.4.1.1466.115.121.1.12 SINGLE-VALUE + X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.239 + NAME 'ds-task-export-ldif-file' + SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE + X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.240 + NAME 'ds-task-export-append-to-ldif' + SYNTAX 1.3.6.1.4.1.1466.115.121.1.7 SINGLE-VALUE + X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.241 + NAME 'ds-task-export-backend-id' + SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE + X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.242 + NAME 'ds-task-export-include-branch' + SYNTAX 1.3.6.1.4.1.1466.115.121.1.12 + X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.243 + NAME 'ds-task-export-exclude-branch' + SYNTAX 1.3.6.1.4.1.1466.115.121.1.12 + X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.244 + NAME 'ds-task-export-include-attribute' + SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 + X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.245 + NAME 'ds-task-export-exclude-attribute' + SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 + X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.246 + NAME 'ds-task-export-include-filter' + SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 + X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.247 + NAME 'ds-task-export-exclude-filter' + SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 + X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.248 + NAME 'ds-task-export-wrap-column' + SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE + X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.249 + NAME 'ds-task-export-compress-ldif' + SYNTAX 1.3.6.1.4.1.1466.115.121.1.7 SINGLE-VALUE + X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.250 + NAME 'ds-task-export-encrypt-ldif' + SYNTAX 1.3.6.1.4.1.1466.115.121.1.7 SINGLE-VALUE + X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.251 + NAME 'ds-task-export-sign-hash' + SYNTAX 1.3.6.1.4.1.1466.115.121.1.7 SINGLE-VALUE + X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.252 + NAME 'ds-task-restore-verify-only' + SYNTAX 1.3.6.1.4.1.1466.115.121.1.7 SINGLE-VALUE + X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.253 + NAME 'ds-task-backup-backend-id' + SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 + X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.254 + NAME 'ds-task-backup-all' + SYNTAX 1.3.6.1.4.1.1466.115.121.1.7 SINGLE-VALUE + X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.255 + NAME 'ds-task-backup-incremental' + SYNTAX 1.3.6.1.4.1.1466.115.121.1.7 SINGLE-VALUE + X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.256 + NAME 'ds-task-backup-incremental-base-id' + SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE + X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.257 + NAME 'ds-task-backup-compress' + SYNTAX 1.3.6.1.4.1.1466.115.121.1.7 SINGLE-VALUE + X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.258 + NAME 'ds-task-backup-encrypt' + SYNTAX 1.3.6.1.4.1.1466.115.121.1.7 SINGLE-VALUE + X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.259 + NAME 'ds-task-backup-hash' + SYNTAX 1.3.6.1.4.1.1466.115.121.1.7 SINGLE-VALUE + X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.260 + NAME 'ds-task-backup-sign-hash' + SYNTAX 1.3.6.1.4.1.1466.115.121.1.7 SINGLE-VALUE + X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.261 + NAME 'ds-cfg-backend-preload-time-limit' + SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE + X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.262 + NAME 'ds-cfg-backend-import-temp-directory' + SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE + X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.263 + NAME 'ds-cfg-backend-import-buffer-size' + SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE + X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.264 + NAME 'ds-cfg-backend-import-queue-size' + SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE + X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.265 + NAME 'ds-cfg-backend-import-thread-count' + SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE + X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.266 + NAME 'ds-cfg-backend-entries-compressed' + SYNTAX 1.3.6.1.4.1.1466.115.121.1.7 SINGLE-VALUE + X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.267 + NAME 'ds-cfg-backend-deadlock-retry-limit' + SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE + X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.268 + NAME 'ds-cfg-database-evictor-lru-only' + SYNTAX 1.3.6.1.4.1.1466.115.121.1.7 SINGLE-VALUE + X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.269 + NAME 'ds-cfg-database-evictor-nodes-per-scan' + SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE + X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.270 + NAME 'ds-cfg-database-log-file-max' + SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE + X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.271 + NAME 'ds-cfg-database-logging-file-handler-on' + SYNTAX 1.3.6.1.4.1.1466.115.121.1.7 SINGLE-VALUE + X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.272 + NAME 'ds-cfg-database-logging-level' + SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 SINGLE-VALUE + X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.273 + NAME 'ds-cfg-database-checkpointer-bytes-interval' + SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE + X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.274 + NAME 'ds-cfg-database-checkpointer-wakeup-interval' + SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE + X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.275 + NAME 'ds-cfg-database-lock-num-lock-tables' + SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE + X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.276 + NAME 'ds-cfg-work-queue-class' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 + SINGLE-VALUE X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.277 + NAME 'ds-cfg-backend-import-pass-size' SYNTAX 1.3.6.1.4.1.1466.115.121.1= .27 + SINGLE-VALUE X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.280 + NAME 'ds-pwp-account-expiration-time' SYNTAX 1.3.6.1.4.1.1466.115.121.1.= 24 + SINGLE-VALUE USAGE directoryOperation X-ORIGIN 'OpenDS Directory Server'= ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.281 + NAME 'ds-cfg-account-status-notification-handler-class' + SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE + X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.282 + NAME 'ds-cfg-account-status-notification-handler-enabled' + SYNTAX 1.3.6.1.4.1.1466.115.121.1.7 SINGLE-VALUE + X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.283 + NAME 'ds-cfg-account-status-notification-type' + SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.284 + Name 'ds-cfg-database-cleaner-num-threads' + SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE + X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.285 + NAME 'ds-cfg-lookthrough-limit' + SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE + X-ORIGIN 'OpenDS Directory Server' ) +attributeTypes: ( 1.3.6.1.4.1.26027.1.1.286 NAME 'ds-rlim-lookthrough-limi= t' + SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE USAGE directoryOperati= on + X-ORIGIN 'OpenDS Directory Server' ) +objectClasses: ( 1.3.6.1.4.1.26027.1.2.1 + NAME 'ds-cfg-access-control-handler' SUP top STRUCTURAL + MUST ( cn $ ds-cfg-acl-handler-class $ ds-cfg-acl-handler-enabled ) + X-ORIGIN 'OpenDS Directory Server' ) +objectClasses: ( 1.3.6.1.4.1.26027.1.2.2 + NAME 'ds-cfg-alert-handler' SUP top STRUCTURAL + MUST ( cn $ ds-cfg-alert-handler-class $ ds-cfg-alert-handler-enabled ) + X-ORIGIN 'OpenDS Directory Server' ) +objectClasses: ( 1.3.6.1.4.1.26027.1.2.3 NAME 'ds-cfg-attribute-syntax' + SUP top STRUCTURAL MUST ( cn $ ds-cfg-syntax-class $ ds-cfg-syntax-enabl= ed ) + X-ORIGIN 'OpenDS Directory Server' ) +objectClasses: ( 1.3.6.1.4.1.26027.1.2.4 + NAME 'ds-cfg-telephone-number-attribute-syntax' + SUP ds-cfg-attribute-syntax STRUCTURAL + MAY ds-cfg-strict-telephone-number-format X-ORIGIN 'OpenDS Directory Ser= ver' ) +objectClasses: ( 1.3.6.1.4.1.26027.1.2.5 NAME 'ds-cfg-backend' + SUP top STRUCTURAL MUST ( ds-cfg-backend-id $ ds-cfg-backend-base-dn $ + ds-cfg-backend-class $ ds-cfg-backend-enabled $ + ds-cfg-backend-writability-mode ) X-ORIGIN 'OpenDS Directory Server' ) +objectClasses: ( 1.3.6.1.4.1.26027.1.2.6 NAME 'ds-cfg-je-backend' + SUP ds-cfg-backend STRUCTURAL MUST ds-cfg-backend-directory + MAY ( ds-cfg-backend-index-entry-limit $ + ds-cfg-backend-subtree-delete-size-limit $ ds-cfg-backend-preload-time-l= imit $ + ds-cfg-backend-import-temp-directory $ ds-cfg-backend-import-buffer-size= $ + ds-cfg-backend-import-queue-size $ ds-cfg-backend-import-thread-count $ + ds-cfg-backend-entries-compressed $ ds-cfg-backend-deadlock-retry-limit $ + ds-cfg-backend-import-pass-size ) X-ORIGIN 'OpenDS Directory Server' ) +objectClasses: ( 1.3.6.1.4.1.26027.1.2.7 NAME 'ds-cfg-je-database' + SUP top STRUCTURAL MAY ( cn $ ds-cfg-database-cache-percent $ + ds-cfg-database-cache-size $ ds-cfg-database-txn-no-sync $ + ds-cfg-database-txn-write-no-sync $ ds-cfg-database-run-cleaner $ + ds-cfg-database-cleaner-min-utilization $ ds-cfg-database-evictor-lru-on= ly $ + ds-cfg-database-evictor-nodes-per-scan $ ds-cfg-database-log-file-max $ + ds-cfg-database-logging-file-handler-on $ ds-cfg-database-logging-level $ + ds-cfg-database-checkpointer-bytes-interval $ + ds-cfg-database-checkpointer-wakeup-interval $ + ds-cfg-database-lock-num-lock-tables $ ds-cfg-database-cleaner-num-threa= ds ) + X-ORIGIN 'OpenDS Directory Server' ) +objectClasses: ( 1.3.6.1.4.1.26027.1.2.8 NAME 'ds-cfg-je-index' SUP top + STRUCTURAL MUST ( ds-cfg-index-attribute $ ds-cfg-index-type ) + MAY ds-cfg-index-entry-limit X-ORIGIN 'OpenDS Directory Server' ) +objectClasses: ( 1.3.6.1.4.1.26027.1.2.9 NAME 'ds-cfg-schema-backend' + SUP ds-cfg-backend STRUCTURAL MAY ds-cfg-schema-entry-dn + X-ORIGIN 'OpenDS Directory Server' ) +objectClasses: ( 1.3.6.1.4.1.26027.1.2.10 NAME 'ds-cfg-task-backend' + SUP ds-cfg-backend STRUCTURAL MAY ( ds-cfg-task-backing-file $ + ds-cfg-task-retention-time ) X-ORIGIN 'OpenDS Directory Server' ) +objectClasses: ( 1.3.6.1.4.1.26027.1.2.11 NAME 'ds-cfg-branch' + SUP top STRUCTURAL MUST cn X-ORIGIN 'OpenDS Directory Server' ) +objectClasses: ( 1.3.6.1.4.1.26027.1.2.12 + NAME 'ds-cfg-certificate-mapper' SUP top STRUCTURAL + MUST ( cn $ ds-cfg-certificate-mapper-class $ + ds-cfg-certificate-mapper-enabled ) X-ORIGIN 'OpenDS Directory Server' ) +objectClasses: ( 1.3.6.1.4.1.26027.1.2.13 + NAME 'ds-cfg-connection-handler' SUP top STRUCTURAL + MUST ( cn $ ds-cfg-connection-handler-class $ + ds-cfg-connection-handler-enabled ) X-ORIGIN 'OpenDS Directory Server' ) +objectClasses: ( 1.3.6.1.4.1.26027.1.2.14 + NAME 'ds-cfg-ldap-connection-handler' SUP ds-cfg-connection-handler + STRUCTURAL MUST ds-cfg-listen-port MAY ( ds-cfg-listen-address $ + ds-cfg-allow-ldapv2 $ ds-cfg-keep-stats $ ds-cfg-use-tcp-keepalive $ + ds-cfg-use-tcp-nodelay $ ds-cfg-allow-tcp-reuse-address $ + ds-cfg-send-rejection-notice $ ds-cfg-max-request-size $ + ds-cfg-num-request-handlers $ ds-cfg-allow-start-tls $ ds-cfg-use-ssl $ + ds-cfg-ssl-client-auth-policy $ ds-cfg-ssl-cert-nickname $ + ds-cfg-accept-backlog ) X-ORIGIN 'OpenDS Directory Server' ) +objectClasses: ( 1.3.6.1.4.1.26027.1.2.15 NAME 'ds-cfg-entry-cache' + SUP top STRUCTURAL MUST ( cn $ ds-cfg-entry-cache-class $ + ds-cfg-entry-cache-enabled ) X-ORIGIN 'OpenDS Directory Server' ) +objectClasses: ( 1.3.6.1.4.1.26027.1.2.16 NAME 'ds-cfg-fifo-entry-cache' + SUP ds-cfg-entry-cache STRUCTURAL MAY ( ds-cfg-max-entries $ + ds-cfg-max-memory-percent $ ds-cfg-lock-timeout $ + ds-cfg-exclude-filter $ ds-cfg-include-filter ) + X-ORIGIN 'OpenDS Directory Server' ) +objectClasses: ( 1.3.6.1.4.1.26027.1.2.17 + NAME 'ds-cfg-soft-reference-entry-cache' SUP ds-cfg-entry-cache STRUCTUR= AL + MAY ( ds-cfg-lock-timeout $ ds-cfg-exclude-filter $ + ds-cfg-include-filter ) X-ORIGIN 'OpenDS Directory Server' ) +objectClasses: ( 1.3.6.1.4.1.26027.1.2.18 + NAME 'ds-cfg-extended-operation-handler' SUP top STRUCTURAL + MUST ( cn $ ds-cfg-extended-operation-handler-class $ + ds-cfg-extended-operation-handler-enabled ) + X-ORIGIN 'OpenDS Directory Server' ) +objectClasses: ( 1.3.6.1.4.1.26027.1.2.19 + NAME 'ds-cfg-key-manager-provider' SUP top STRUCTURAL + MUST ( cn $ ds-cfg-key-manager-provider-class $ + ds-cfg-key-manager-provider-enabled ) X-ORIGIN 'OpenDS Directory Server'= ) +objectClasses: ( 1.3.6.1.4.1.26027.1.2.20 + NAME 'ds-cfg-file-based-key-manager-provider' SUP ds-cfg-key-manager-pro= vider + STRUCTURAL MUST ds-cfg-key-store-file MAY ( ds-cfg-key-store-type $ + ds-cfg-key-store-pin $ ds-cfg-key-store-pin-property $ + ds-cfg-key-store-pin-environment-variable $ ds-cfg-key-store-pin-file ) + X-ORIGIN 'OpenDS Directory Server' ) +objectClasses: ( 1.3.6.1.4.1.26027.1.2.21 + NAME 'ds-cfg-pkcs11-key-manager-provider' SUP ds-cfg-key-manager-provider + MAY ( ds-cfg-key-store-pin $ ds-cfg-key-store-pin-property $ + ds-cfg-key-store-pin-environment-variable $ ds-cfg-key-store-pin-file ) + X-ORIGIN 'OpenDS Directory Server' ) +objectClasses: ( 1.3.6.1.4.1.26027.1.2.22 NAME 'ds-cfg-logger' + SUP top STRUCTURAL MUST ( cn $ ds-cfg-logger-class $ + ds-cfg-logger-enabled ) X-ORIGIN 'OpenDS Directory Server' ) +objectClasses: ( 1.3.6.1.4.1.26027.1.2.23 NAME 'ds-cfg-access-logger' + SUP ds-cfg-logger STRUCTURAL X-ORIGIN 'OpenDS Directory Server' ) +objectClasses: ( 1.3.6.1.4.1.26027.1.2.24 NAME 'ds-cfg-error-logger' + SUP ds-cfg-logger STRUCTURAL X-ORIGIN 'OpenDS Directory Server' ) +objectClasses: ( 1.3.6.1.4.1.26027.1.2.25 NAME 'ds-cfg-debug-logger' + SUP ds-cfg-logger STRUCTURAL X-ORIGIN 'OpenDS Directory Server' ) +objectClasses: ( 1.3.6.1.4.1.26027.1.2.26 + NAME 'ds-cfg-file-based-access-logger' SUP ds-cfg-access-logger STRUCTUR= AL + MUST ds-cfg-log-file MAY ( ds-cfg-rotation-policy $ ds-cfg-size-limit $ + ds-cfg-fixed-time-limit $ ds-cfg-time-of-day $ ds-cfg-rotation-action $ + ds-cfg-default-severity $ ds-cfg-override-severity $ + ds-cfg-retention-policy $ ds-cfg-number-of-files $ ds-cfg-disk-space-use= d $ + ds-cfg-thread-time-interval $ ds-cfg-buffer-size $ ds-cfg-free-disk-spac= e $ + ds-cfg-suppress-internal-operations ) X-ORIGIN 'OpenDS Directory Server'= ) +objectClasses: ( 1.3.6.1.4.1.26027.1.2.27 + NAME 'ds-cfg-file-based-debug-logger' SUP ds-cfg-debug-logger STRUCTURAL + MUST ds-cfg-log-file MAY ( ds-cfg-rotation-policy $ ds-cfg-size-limit $ + ds-cfg-fixed-time-limit $ ds-cfg-time-of-day $ ds-cfg-rotation-action $ + ds-cfg-retention-policy $ ds-cfg-number-of-files $ ds-cfg-disk-space-use= d $ + ds-cfg-thread-time-interval $ ds-cfg-buffer-size $ ds-cfg-free-disk-spac= e $ + ds-cfg-default-severity $ ds-cfg-override-severity ) + X-ORIGIN 'OpenDS Directory Server' ) +objectClasses: ( 1.3.6.1.4.1.26027.1.2.28 + NAME 'ds-cfg-file-based-error-logger' SUP ds-cfg-error-logger STRUCTURAL + MUST ds-cfg-log-file MAY ( ds-cfg-rotation-policy $ ds-cfg-size-limit $ + ds-cfg-fixed-time-limit $ ds-cfg-time-of-day $ ds-cfg-rotation-action $ + ds-cfg-retention-policy $ ds-cfg-number-of-files $ ds-cfg-disk-space-use= d $ + ds-cfg-thread-time-interval $ ds-cfg-buffer-size $ ds-cfg-free-disk-spac= e $ + ds-cfg-default-severity $ ds-cfg-override-severity ) + X-ORIGIN 'OpenDS Directory Server' ) +objectClasses: ( 1.3.6.1.4.1.26027.1.2.29 NAME 'ds-cfg-matching-rule' + SUP top STRUCTURAL MUST ( cn $ ds-cfg-matching-rule-class $ + ds-cfg-matching-rule-enabled ) X-ORIGIN 'OpenDS Directory Server' ) +objectClasses: ( 1.3.6.1.4.1.26027.1.2.30 + NAME 'ds-cfg-approximate-matching-rule' SUP ds-cfg-matching-rule + STRUCTURAL X-ORIGIN 'OpenDS Directory Server' ) +objectClasses: ( 1.3.6.1.4.1.26027.1.2.31 + NAME 'ds-cfg-equality-matching-rule' SUP ds-cfg-matching-rule STRUCTURAL + X-ORIGIN 'OpenDS Directory Server' ) +objectClasses: ( 1.3.6.1.4.1.26027.1.2.32 + NAME 'ds-cfg-ordering-matching-rule' SUP ds-cfg-matching-rule STRUCTURAL + X-ORIGIN 'OpenDS Directory Server' ) +objectClasses: ( 1.3.6.1.4.1.26027.1.2.33 + NAME 'ds-cfg-substring-matching-rule' SUP ds-cfg-matching-rule + STRUCTURAL X-ORIGIN 'OpenDS Directory Server' ) +objectClasses: ( 1.3.6.1.4.1.26027.1.2.34 + NAME 'ds-cfg-monitor-provider' SUP top STRUCTURAL MUST ( cn $ + ds-cfg-monitor-provider-class $ ds-cfg-monitor-provider-enabled ) + X-ORIGIN 'OpenDS Directory Server' ) +objectClasses: ( 1.3.6.1.4.1.26027.1.2.35 + NAME 'ds-cfg-password-storage-scheme' SUP top STRUCTURAL + MUST ( cn $ ds-cfg-password-storage-scheme-class $ + ds-cfg-password-storage-scheme-enabled ) X-ORIGIN 'OpenDS Directory Serv= er' ) +objectClasses: ( 1.3.6.1.4.1.26027.1.2.36 + NAME 'ds-cfg-password-validator' SUP top STRUCTURAL + MUST ( cn $ ds-cfg-password-validator-class $ + ds-cfg-password-validator-enabled ) X-ORIGIN 'OpenDS Directory Server' ) +objectClasses: ( 1.3.6.1.4.1.26027.1.2.37 NAME 'ds-cfg-plugin' SUP top + STRUCTURAL MUST ( cn $ ds-cfg-plugin-class $ ds-cfg-plugin-enabled $ + ds-cfg-plugin-type ) X-ORIGIN 'OpenDS Directory Server' ) +objectClasses: ( 1.3.6.1.4.1.26027.1.2.38 NAME 'ds-cfg-profiler-plugin' + SUP ds-cfg-plugin STRUCTURAL MAY ( ds-cfg-enable-profiling-on-startup $ + ds-cfg-profile-directory $ ds-cfg-profile-sample-interval $ + ds-cfg-profile-action ) X-ORIGIN 'OpenDS Directory Server' ) +objectClasses: ( 1.3.6.1.4.1.26027.1.2.39 NAME 'ds-recurring-task' + SUP top STRUCTURAL MUST ( ds-recurring-task-class-name $ + ds-recurring-task-id ) MAY ( ds-task-notify-on-completion $ + ds-task-notify-on-error ) X-ORIGIN 'OpenDS Directory Server' ) +objectClasses: ( 1.3.6.1.4.1.26027.1.2.40 NAME 'ds-cfg-root-config' + SUP top STRUCTURAL MUST ( cn $ ds-cfg-default-password-policy ) + MAY ( ds-cfg-check-schema $ ds-cfg-add-missing-rdn-attributes $ + ds-cfg-allow-attribute-name-exceptions $ + ds-cfg-invalid-attribute-syntax-behavior $ ds-cfg-server-error-result-co= de $ + ds-cfg-single-structural-objectclass-behavior $ + ds-cfg-notify-abandoned-operations $ ds-cfg-size-limit $ ds-cfg-time-lim= it $ + ds-cfg-proxied-authorization-identity-mapper-dn $ ds-cfg-writability-mod= e $ + ds-cfg-bind-with-dn-requires-password $ ds-cfg-lookthrough-limit ) + X-ORIGIN 'OpenDS Directory Server' ) +objectClasses: ( 1.3.6.1.4.1.26027.1.2.41 NAME 'ds-cfg-root-dn' SUP top + AUXILIARY MAY ds-cfg-alternate-bind-dn X-ORIGIN 'OpenDS Directory Server= ' ) +objectClasses: ( 1.3.6.1.4.1.26027.1.2.42 NAME 'ds-cfg-root-dse' + SUP top STRUCTURAL MUST cn MAY ( ds-cfg-subordinate-base-dn $ + ds-cfg-show-all-attributes ) X-ORIGIN 'OpenDS Directory Server' ) +objectClasses: ( 1.3.6.1.4.1.26027.1.2.43 + NAME 'ds-cfg-sasl-mechanism-handler' SUP top STRUCTURAL MUST ( cn $ + ds-cfg-sasl-mechanism-handler-class $ + ds-cfg-sasl-mechanism-handler-enabled ) X-ORIGIN 'OpenDS Directory Serve= r' ) +objectClasses: ( 1.3.6.1.4.1.26027.1.2.44 + NAME 'ds-cfg-external-sasl-mechanism-handler' + SUP ds-cfg-sasl-mechanism-handler MAY ( ds-cfg-certificate-attribute $ + ds-cfg-client-certificate-validation-policy ) + X-ORIGIN 'OpenDS Directory Server' ) +objectClasses: ( 1.3.6.1.4.1.26027.1.2.45 + NAME 'ds-cfg-plain-sasl-mechanism-handler' SUP ds-cfg-sasl-mechanism-han= dler + MUST ds-cfg-identity-mapper-dn X-ORIGIN 'OpenDS Directory Server' ) +objectClasses: ( 1.3.6.1.4.1.26027.1.2.46 + NAME 'ds-cfg-cram-md5-sasl-mechanism-handler' + SUP ds-cfg-sasl-mechanism-handler MUST ds-cfg-identity-mapper-dn + X-ORIGIN 'OpenDS Directory Server' ) +objectClasses: ( 1.3.6.1.4.1.26027.1.2.47 + NAME 'ds-cfg-digest-md5-sasl-mechanism-handler' + SUP ds-cfg-sasl-mechanism-handler MUST ds-cfg-identity-mapper-dn + MAY ds-cfg-realm X-ORIGIN 'OpenDS Directory Server' ) +objectClasses: ( 1.3.6.1.4.1.26027.1.2.48 + NAME 'ds-cfg-gssapi-sasl-mechanism-handler' + SUP ds-cfg-sasl-mechanism-handler MAY ( ds-cfg-identity-mapper-dn $ + ds-cfg-realm $ ds-cfg-kdc-address $ ds-cfg-keytab $ ds-cfg-server-fqdn ) + X-ORIGIN 'OpenDS Directory Server' ) +objectClasses: ( 1.3.6.1.4.1.26027.1.2.49 NAME 'ds-task' SUP top + STRUCTURAL MUST ( ds-task-class-name $ ds-task-id ) MAY ( ds-task-state $ + ds-task-scheduled-start-time $ ds-task-actual-start-time $ + ds-task-completion-time $ ds-task-dependency-id $ + ds-task-failed-dependency-action $ ds-task-log-message $ + ds-task-notify-on-completion $ ds-task-notify-on-error ) + X-ORIGIN 'OpenDS Directory Server' ) +objectClasses: ( 1.3.6.1.4.1.26027.1.2.50 NAME 'ds-task-shutdown' + SUP ds-task MAY ( ds-task-shutdown-message $ + ds-task-restart-server ) X-ORIGIN 'OpenDS Directory Server' ) +objectClasses: ( 1.3.6.1.4.1.26027.1.2.51 + NAME 'ds-cfg-trust-manager-provider' SUP top STRUCTURAL + MUST ( cn $ ds-cfg-trust-manager-provider-class $ + ds-cfg-trust-manager-provider-enabled ) X-ORIGIN 'OpenDS Directory Serve= r' ) +objectClasses: ( 1.3.6.1.4.1.26027.1.2.52 + NAME 'ds-cfg-file-based-trust-manager-provider' + SUP ds-cfg-trust-manager-provider STRUCTURAL MUST ds-cfg-trust-store-file + MAY ( ds-cfg-trust-store-type $ ds-cfg-trust-store-pin $ + ds-cfg-trust-store-pin-property $ + ds-cfg-trust-store-pin-environment-variable $ ds-cfg-trust-store-pin-fil= e ) + X-ORIGIN 'OpenDS Directory Server' ) +objectClasses: ( 1.3.6.1.4.1.26027.1.2.53 + NAME 'ds-cfg-directory-string-attribute-syntax' + SUP ds-cfg-attribute-syntax STRUCTURAL + MAY ds-cfg-allow-zero-length-values X-ORIGIN 'OpenDS Directory Server' ) +objectClasses: ( 1.3.6.1.4.1.26027.1.2.54 NAME 'ds-root-dse' SUP top + STRUCTURAL X-ORIGIN 'OpenDS Directory Server' ) +objectClasses: ( 1.3.6.1.4.1.26027.1.2.55 + NAME 'ds-cfg-identity-mapper' SUP top STRUCTURAL MUST ( cn $ + ds-cfg-identity-mapper-class $ ds-cfg-identity-mapper-enabled ) + X-ORIGIN 'OpenDS Directory Server' ) +objectClasses: ( 1.3.6.1.4.1.26027.1.2.56 + NAME 'ds-cfg-exact-match-identity-mapper' SUP ds-cfg-identity-mapper + STRUCTURAL MUST ds-cfg-match-attribute MAY ds-cfg-match-base-dn + X-ORIGIN 'OpenDS Directory Server' ) +objectClasses: ( 1.3.6.1.4.1.26027.1.2.57 + NAME 'ds-cfg-synchronization-provider' SUP top STRUCTURAL + MUST ( ds-cfg-synchronization-provider-class $ + ds-cfg-synchronization-provider-enabled ) X-ORIGIN 'OpenDS Directory Ser= ver' ) +objectClasses: ( 1.3.6.1.4.1.26027.1.2.58 NAME + 'ds-cfg-synchronization-provider-config' SUP top + STRUCTURAL MUST ( ds-cfg-changelog-server $ ds-cfg-directory-server-id + $ ds-cfg-synchronization-dn ) + MAY ( cn $ ds-cfg-receive-status $ ds-cfg-max-receive-queue $ + ds-cfg-max-receive-delay $ ds-cfg-max-send-queue $ ds-cfg-max-send-delay= ) + X-ORIGIN 'OpenDS Directory Server' ) +objectClasses: ( 1.3.6.1.4.1.26027.1.2.59 + NAME 'ds-cfg-length-based-password-validator' SUP ds-cfg-password-valida= tor + STRUCTURAL MAY ( ds-cfg-maximum-password-length $ + ds-cfg-minimum-password-length ) X-ORIGIN 'OpenDS Directory Server' ) +objectClasses: ( 1.3.6.1.4.1.26027.1.2.60 + NAME 'ds-cfg-password-generator' SUP top STRUCTURAL + MUST ( cn $ ds-cfg-password-generator-class $ + ds-cfg-password-generator-enabled ) X-ORIGIN 'OpenDS Directory Server' ) +objectClasses: ( 1.3.6.1.4.1.26027.1.2.61 + NAME 'ds-cfg-random-password-generator' SUP ds-cfg-password-generator + STRUCTURAL MUST ( ds-cfg-password-character-set $ ds-cfg-password-format= ) + X-ORIGIN 'OpenDS Directory Server' ) +objectClasses: ( 1.3.6.1.4.1.26027.1.2.62 NAME 'ds-cfg-password-policy' + SUP top STRUCTURAL MUST ( cn $ ds-cfg-password-attribute $ + ds-cfg-default-password-storage-scheme ) + MAY ( ds-cfg-account-status-notification-handler-dn $ + ds-cfg-allow-expired-password-changes $ + ds-cfg-allow-multiple-password-values $ ds-cfg-allow-pre-encoded-passwor= ds $ + ds-cfg-allow-user-password-changes $ + ds-cfg-deprecated-password-storage-scheme $ + ds-cfg-expire-passwords-without-warning $ ds-cfg-force-change-on-add $ + ds-cfg-force-change-on-reset $ ds-cfg-grace-login-count $ + ds-cfg-idle-lockout-interval $ ds-cfg-last-login-time-attribute $ + ds-cfg-last-login-time-format $ ds-cfg-lockout-duration $ + ds-cfg-lockout-failure-count $ + ds-cfg-lockout-failure-expiration-interval $ + ds-cfg-maximum-password-age $ ds-cfg-maximum-password-reset-age $ + ds-cfg-minimum-password-age $ + ds-cfg-password-change-requires-current-password $ + ds-cfg-password-expiration-warning-interval $ ds-cfg-password-generator-= dn $ + ds-cfg-password-validator-dn $ ds-cfg-previous-last-login-time-format $ + ds-cfg-require-change-by-time $ ds-cfg-require-secure-authentication $ + ds-cfg-require-secure-password-changes $ + ds-cfg-skip-validation-for-administrators ) + X-ORIGIN 'OpenDS Directory Server' ) +objectClasses: ( 1.3.6.1.4.1.26027.1.2.63 NAME + 'ds-cfg-jmx-connection-handler' SUP ds-cfg-connection-handler + STRUCTURAL MUST ( ds-cfg-listen-port $ ds-cfg-ssl-cert-nickname $ + ds-cfg-use-ssl ) + X-ORIGIN 'OpenDS Directory Server' ) +objectClasses: ( 1.3.6.1.4.1.26027.1.2.64 + NAME 'ds-task-import' SUP ds-task + MUST ( ds-task-import-ldif-file $ ds-task-import-backend-id ) + MAY ( ds-task-import-append $ ds-task-import-replace-existing $ + ds-task-import-include-branch $ ds-task-import-exclude-branch $ + ds-task-import-include-attribute $ ds-task-import-exclude-attribute $ + ds-task-import-include-filter $ ds-task-import-exclude-filter $ + ds-task-import-reject-file $ ds-task-import-overwrite-rejects $ + ds-task-import-skip-schema-validation $ ds-task-import-is-compressed $ + ds-task-import-is-encrypted ) + X-ORIGIN 'OpenDS Directory Server' ) +objectClasses: ( 1.3.6.1.4.1.26027.1.2.65 NAME + 'ds-cfg-synchronization-changelog-server-config' SUP top + STRUCTURAL MUST (ds-cfg-changelog-server-id $ ds-cfg-changelog-port ) + MAY ( ds-cfg-changelog-server $ cn ) X-ORIGIN 'OpenDS Directory Server' ) +objectClasses: ( 1.3.6.1.4.1.26027.1.2.66 NAME 'ds-backup-directory' + SUP top STRUCTURAL MUST ( ds-backup-directory-path $ ds-backup-backend-d= n ) + X-ORIGIN 'OpenDS Directory Server' ) +objectClasses: ( 1.3.6.1.4.1.26027.1.2.67 NAME 'ds-backup-info' + SUP top STRUCTURAL MUST ( ds-backup-id $ ds-backup-directory-path ) + MAY ( ds-backup-compressed $ ds-backup-date $ ds-backup-dependency $ + ds-backup-encrypted $ ds-backup-incremental $ ds-backup-signed-hash $ + ds-backup-unsigned-hash ) X-ORIGIN 'OpenDS Directory Server' ) +objectClasses: ( 1.3.6.1.4.1.26027.1.2.68 NAME 'ds-cfg-backup-backend' + SUP ds-cfg-backend STRUCTURAL MAY ds-cfg-backup-directory + X-ORIGIN 'OpenDS Directory Server' ) +objectClasses: ( 1.3.6.1.4.1.26027.1.2.69 + NAME 'ds-task-export' SUP ds-task + MUST ( ds-task-export-ldif-file $ ds-task-export-backend-id ) + MAY ( ds-task-export-append-to-ldif $ ds-task-export-include-branch $ + ds-task-export-exclude-branch $ ds-task-export-include-attribute $ + ds-task-export-exclude-attribute $ ds-task-export-include-filter $ + ds-task-export-exclude-filter $ ds-task-export-wrap-column $ + ds-task-export-compress-ldif $ ds-task-export-encrypt-ldif $ + ds-task-export-sign-hash ) + X-ORIGIN 'OpenDS Directory Server' ) +objectClasses: ( 1.3.6.1.4.1.26027.1.2.70 + NAME 'ds-task-backup' SUP ds-task + MUST ( ds-backup-directory-path ) + MAY ( ds-task-backup-backend-id $ ds-backup-id $ ds-task-backup-all $ + ds-task-backup-incremental $ ds-task-backup-incremental-base-id $ + ds-task-backup-compress $ ds-task-backup-encrypt $ + ds-task-backup-hash $ ds-task-backup-sign-hash ) + X-ORIGIN 'OpenDS Directory Server' ) +objectClasses: ( 1.3.6.1.4.1.26027.1.2.71 + NAME 'ds-task-restore' SUP ds-task + MUST ( ds-backup-directory-path ) + MAY ( ds-backup-id $ ds-task-restore-verify-only ) + X-ORIGIN 'OpenDS Directory Server' ) +objectClasses: ( 1.3.6.1.4.1.26027.1.2.72 NAME 'ds-cfg-work-queue' SUP top + STRUCTURAL MUST ( cn $ ds-cfg-work-queue-class ) + X-ORIGIN 'OpenDS Directory Server' ) +objectClasses: ( 1.3.6.1.4.1.26027.1.2.73 NAME 'ds-cfg-traditional-work-qu= eue' + SUP ds-cfg-work-queue MUST ds-cfg-num-worker-threads + MAY ds-cfg-max-work-queue-capacity X-ORIGIN 'OpenDS Directory Server' ) +objectClasses: ( 1.3.6.1.4.1.26027.1.2.74 + NAME 'ds-cfg-password-modify-extended-operation-handler' + SUP ds-cfg-extended-operation-handler MUST ds-cfg-identity-mapper-dn + X-ORIGIN 'OpenDS Directory Server' ) +objectClasses: ( 1.3.6.1.4.1.26027.1.2.75 + NAME 'ds-cfg-account-status-notification-handler' SUP top STRUCTURAL + MUST ( cn $ ds-cfg-account-status-notification-handler-class $ + ds-cfg-account-status-notification-handler-enabled ) + X-ORIGIN 'OpenDS Directory Server' ) +objectClasses: ( 1.3.6.1.4.1.26027.1.2.76 + NAME 'ds-cfg-error-log-account-status-notification-handler' + SUP ds-cfg-account-status-notification-handler STRUCTURAL + MUST ds-cfg-account-status-notification-type + X-ORIGIN 'OpenDS Directory Server' ) + + Added: modules/test/trunk/test/core/resources/config/opends/config/schema/0= 3-changelog.ldif =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/test/core/resources/config/opends/config/schema/03-c= hangelog.ldif (rev 0) +++ modules/test/trunk/test/core/resources/config/opends/config/schema/03-c= hangelog.ldif 2007-10-25 12:52:32 UTC (rev 8774) @@ -0,0 +1,67 @@ +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License, Version 1.0 only +# (the "License"). You may not use this file except in compliance +# with the License. +# +# You can obtain a copy of the license at +# trunk/opends/resource/legal-notices/OpenDS.LICENSE +# or https://OpenDS.dev.java.net/OpenDS.LICENSE. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at +# trunk/opends/resource/legal-notices/OpenDS.LICENSE. If applicable, +# add the following below this CDDL HEADER, with the fields enclosed +# by brackets "[]" replaced with your own identifying * information: +# Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# +# +# Portions Copyright 2006 Sun Microsystems, Inc. +# +# +# This file contains schema definitions from draft-good-ldap-changelog, wh= ich +# defines a mechanism for storing informmation about changes to Directory +# Server data. +dn: cn=3Dschema +objectClass: top +objectClass: ldapSubentry +objectClass: subschema +attributeTypes: ( 2.16.840.1.113730.3.1.5 NAME 'changeNumber' + DESC 'a number which uniquely identifies a change made to a directory en= try' + SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 EQUALITY integerMatch + ORDERING integerOrderingMatch SINGLE-VALUE + X-ORIGIN 'draft-good-ldap-changelog' ) +attributeTypes: ( 2.16.840.1.113730.3.1.6 NAME 'targetDN' + DESC 'the DN of the entry which was modified' EQUALITY distinguishedName= Match + SYNTAX 1.3.6.1.4.1.1466.115.121.1.12 SINGLE-VALUE + X-ORIGIN 'draft-good-ldap-changelog' ) +attributeTypes: ( 2.16.840.1.113730.3.1.7 NAME 'changeType' + DESC 'the type of change made to an entry' EQUALITY caseIgnoreMatch + SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE + X-ORIGIN 'draft-good-ldap-changelog' ) +attributeTypes: ( 2.16.840.1.113730.3.1.8 NAME 'changes' + DESC 'a set of changes to apply to an entry' + SYNTAX 1.3.6.1.4.1.1466.115.121.1.40 X-ORIGIN 'draft-good-ldap-changelog= ' ) +attributeTypes: ( 2.16.840.1.113730.3.1.9 NAME 'newRDN' + DESC 'the new RDN of an entry which is the target of a modrdn operation' + EQUALITY distinguishedNameMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.12 + SINGLE-VALUE X-ORIGIN 'draft-good-ldap-changelog' ) +attributeTypes: ( 2.16.840.1.113730.3.1.10 NAME 'deleteOldRDN' + DESC 'a flag which indicates if the old RDN should be retained as an + attribute of the entry' EQUALITY booleanMatch + SYNTAX 1.3.6.1.4.1.1466.115.121.1.7 SINGLE-VALUE + X-ORIGIN 'draft-good-ldap-changelog' ) +attributeTypes: ( 2.16.840.1.113730.3.1.11 NAME 'newSuperior' + DESC 'the new parent of an entry which is the target of a moddn operatio= n' + EQUALITY distinguishedNameMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.12 + SINGLE-VALUE X-ORIGIN 'draft-good-ldap-changelog' ) +objectClasses: ( 2.16.840.1.113730.3.2.1 NAME 'changeLogEntry' SUP top + STRUCTURAL MUST ( changeNumber $ targetDN $ changeType ) + MAY ( changes $ newRDN $ deleteOldRDN $ newSuperior ) + X-ORIGIN 'draft-good-ldap-changelog' ) + Added: modules/test/trunk/test/core/resources/config/opends/config/schema/0= 3-rfc2713.ldif =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/test/core/resources/config/opends/config/schema/03-r= fc2713.ldif (rev 0) +++ modules/test/trunk/test/core/resources/config/opends/config/schema/03-r= fc2713.ldif 2007-10-25 12:52:32 UTC (rev 8774) @@ -0,0 +1,73 @@ +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License, Version 1.0 only +# (the "License"). You may not use this file except in compliance +# with the License. +# +# You can obtain a copy of the license at +# trunk/opends/resource/legal-notices/OpenDS.LICENSE +# or https://OpenDS.dev.java.net/OpenDS.LICENSE. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at +# trunk/opends/resource/legal-notices/OpenDS.LICENSE. If applicable, +# add the following below this CDDL HEADER, with the fields enclosed +# by brackets "[]" replaced with your own identifying * information: +# Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# +# +# Portions Copyright 2006 Sun Microsystems, Inc. +# +# +# This file contains schema definitions from RFC 2713, which defines a +# mechanism for storing serialized Java objects in the Directory Server. +dn: cn=3Dschema +objectClass: top +objectClass: ldapSubentry +objectClass: subschema +attributeTypes: ( 1.3.6.1.4.1.42.2.27.4.1.6 NAME 'javaClassName' + DESC 'Fully qualified name of distinguished Java class or interface' + EQUALITY caseExactMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE + X-ORIGIN 'RFC 2713' ) +attributeTypes: ( 1.3.6.1.4.1.42.2.27.4.1.7 NAME 'javaCodebase' + DESC 'URL(s) specifying the location of class definition' + EQUALITY caseExactIA5Match SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 + X-ORIGIN 'RFC 2713' ) +attributeTypes: ( 1.3.6.1.4.1.42.2.27.4.1.13 NAME 'javaClassNames' + DESC 'Fully qualified Java class or interface name' EQUALITY caseExactMa= tch + SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 X-ORIGIN 'RFC 2713' ) +attributeTypes: ( 1.3.6.1.4.1.42.2.27.4.1.8 NAME 'javaSerializedData' + DESC 'Serialized form of a Java object' SYNTAX 1.3.6.1.4.1.1466.115.121.= 1.40 + SINGLE-VALUE X-ORIGIN 'RFC 2713' ) +attributeTypes: ( 1.3.6.1.4.1.42.2.27.4.1.10 NAME 'javaFactory' + DESC 'Fully qualified Java class name of a JNDI object factory' + EQUALITY caseExactMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE + X-ORIGIN 'RFC 2713' ) +attributeTypes: ( 1.3.6.1.4.1.42.2.27.4.1.11 NAME 'javaReferenceAddress' + DESC 'Addresses associated with a JNDI Reference' EQUALITY caseExactMatch + SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 X-ORIGIN 'RFC 2713' ) +attributeTypes: ( 1.3.6.1.4.1.42.2.27.4.1.12 NAME 'javaDoc' + DESC 'The Java documentation for the class' EQUALITY caseExactIA5Match + SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 X-ORIGIN 'RFC 2713' ) +objectClasses: ( 1.3.6.1.4.1.42.2.27.4.2.1 NAME 'javaContainer' + DESC 'Container for a Java object' SUP top STRUCTURAL MUST ( cn ) + X-ORIGIN 'RFC 2713' ) +objectClasses: ( 1.3.6.1.4.1.42.2.27.4.2.4 NAME 'javaObject' + DESC 'Java object representation' SUP top ABSTRACT MUST ( javaClassName ) + MAY ( javaClassNames $ javaCodebase $ javaDoc $ description ) + X-ORIGIN 'RFC 2713' ) +objectClasses: ( 1.3.6.1.4.1.42.2.27.4.2.5 NAME 'javaSerializedObject' + DESC 'Java serialized object' SUP javaObject AUXILIARY + MUST ( javaSerializedData ) X-ORIGIN 'RFC 2713' ) +objectClasses: ( 1.3.6.1.4.1.42.2.27.4.2.8 NAME 'javaMarshalledObject' + DESC 'Java marshalled object' SUP javaObject AUXILIARY + MUST ( javaSerializedData ) X-ORIGIN 'RFC 2713' ) +objectClasses: ( 1.3.6.1.4.1.42.2.27.4.2.7 NAME 'javaNamingReference' + DESC 'JNDI reference' SUP javaObject AUXILIARY + MAY ( javaReferenceAddress $ javaFactory ) X-ORIGIN 'RFC 2713' ) + Added: modules/test/trunk/test/core/resources/config/opends/config/schema/0= 3-rfc2714.ldif =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/test/core/resources/config/opends/config/schema/03-r= fc2714.ldif (rev 0) +++ modules/test/trunk/test/core/resources/config/opends/config/schema/03-r= fc2714.ldif 2007-10-25 12:52:32 UTC (rev 8774) @@ -0,0 +1,50 @@ +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License, Version 1.0 only +# (the "License"). You may not use this file except in compliance +# with the License. +# +# You can obtain a copy of the license at +# trunk/opends/resource/legal-notices/OpenDS.LICENSE +# or https://OpenDS.dev.java.net/OpenDS.LICENSE. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at +# trunk/opends/resource/legal-notices/OpenDS.LICENSE. If applicable, +# add the following below this CDDL HEADER, with the fields enclosed +# by brackets "[]" replaced with your own identifying * information: +# Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# +# +# Portions Copyright 2006 Sun Microsystems, Inc. +# +# +# This file contains schema definitions from RFC 2714, which defines a +# mechanism for storing CORBA objects in the Directory Server. +dn: cn=3Dschema +objectClass: top +objectClass: ldapSubentry +objectClass: subschema +attributeTypes: ( 1.3.6.1.4.1.42.2.27.4.1.14 NAME 'corbaIor' + DESC 'Stringified interoperable object reference of a CORBA object' + EQUALITY caseIgnoreIA5Match SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 + SINGLE-VALUE X-ORIGIN 'RFC 2714' ) +attributeTypes: ( 1.3.6.1.4.1.42.2.27.4.1.15 NAME 'corbaRepositoryId' + DESC 'Repository ids of interfaces implemented by a CORBA object' + EQUALITY caseExactMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 + X-ORIGIN 'RFC 2714' ) +objectClasses: ( 1.3.6.1.4.1.42.2.27.4.2.9 NAME 'corbaObject' + DESC 'CORBA object representation' SUP top ABSTRACT + MAY ( corbaRepositoryId $ description ) X-ORIGIN 'RFC 2714' ) +objectClasses: ( 1.3.6.1.4.1.42.2.27.4.2.10 NAME 'corbaContainer' + DESC 'Container for a CORBA object' SUP top STRUCTURAL MUST ( cn ) + X-ORIGIN 'RFC 2714' ) +objectClasses: ( 1.3.6.1.4.1.42.2.27.4.2.11 NAME 'corbaObjectReference' + DESC 'CORBA interoperable object reference' SUP corbaObject AUXILIARY + MUST ( corbaIor ) X-ORIGIN 'RFC 2714' ) + Added: modules/test/trunk/test/core/resources/config/opends/config/schema/0= 3-rfc2739.ldif =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/test/core/resources/config/opends/config/schema/03-r= fc2739.ldif (rev 0) +++ modules/test/trunk/test/core/resources/config/opends/config/schema/03-r= fc2739.ldif 2007-10-25 12:52:32 UTC (rev 8774) @@ -0,0 +1,68 @@ +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License, Version 1.0 only +# (the "License"). You may not use this file except in compliance +# with the License. +# +# You can obtain a copy of the license at +# trunk/opends/resource/legal-notices/OpenDS.LICENSE +# or https://OpenDS.dev.java.net/OpenDS.LICENSE. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at +# trunk/opends/resource/legal-notices/OpenDS.LICENSE. If applicable, +# add the following below this CDDL HEADER, with the fields enclosed +# by brackets "[]" replaced with your own identifying * information: +# Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# +# +# Portions Copyright 2006 Sun Microsystems, Inc. +# +# +# This file contains schema definitions from RFC 2739, which defines a +# mechanism for storing calendar and vCard objects in the Directory Server. +dn: cn=3Dschema +objectClass: top +objectClass: ldapSubentry +objectClass: subschema +attributeTypes: ( 1.2.840.113556.1.4.478 NAME 'calCalURI' + EQUALITY caseIgnoreMatch SUBSTRING caseIgnoreMatch + SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 USAGE userApplications + X-ORIGIN 'RFC 2739' ) +attributeTypes: ( 1.2.840.113556.1.4.479 NAME 'calFBURL' + EQUALITY caseIgnoreMatch SUBSTRING caseIgnoreMatch + SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 USAGE userApplications + X-ORIGIN 'RFC 2739' ) +attributeTypes: ( 1.2.840.113556.1.4.480 NAME 'calCAPURI' + EQUALITY caseIgnoreMatch SUBSTRING caseIgnoreMatch + SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 USAGE userApplications + X-ORIGIN 'RFC 2739' ) +attributeTypes: ( 1.2.840.113556.1.4.481 NAME 'calCalAdrURI' + EQUALITY caseIgnoreMatch SUBSTRING caseIgnoreMatch + SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 USAGE userApplications + X-ORIGIN 'RFC 2739' ) +attributeTypes: ( 1.2.840.113556.1.4.482 NAME 'calOtherCalURIs' + EQUALITY caseIgnoreMatch SUBSTRING caseIgnoreMatch + SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 USAGE userApplications + X-ORIGIN 'RFC 2739' ) +attributeTypes: ( 1.2.840.113556.1.4.483 NAME 'calOtherFBURLs' + EQUALITY caseIgnoreMatch SUBSTRING caseIgnoreMatch + SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 USAGE userApplications + X-ORIGIN 'RFC 2739' ) +attributeTypes: ( 1.2.840.113556.1.4.484 NAME 'calOtherCAPURIs' + EQUALITY caseIgnoreMatch SUBSTRING caseIgnoreMatch + SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 USAGE userApplications + X-ORIGIN 'RFC 2739' ) +attributeTypes: ( 1.2.840.113556.1.4.485 NAME 'calOtherCalAdrURIs' + EQUALITY caseIgnoreMatch SUBSTRING caseIgnoreMatch + SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 USAGE userApplications + X-ORIGIN 'RFC 2739' ) +objectClasses: ( 1.2.840.113556.1.5.87 NAME 'calEntry' TOP AUXILIARY + MAY ( calCalURI $ calFBURL $ calOtherCalURIs $ calOtherFBURLs $ calCAPUR= I $ + calOtherCAPURIs ) X-ORIGIN 'RFC 2739' ) + Added: modules/test/trunk/test/core/resources/config/opends/config/schema/0= 3-rfc2926.ldif =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/test/core/resources/config/opends/config/schema/03-r= fc2926.ldif (rev 0) +++ modules/test/trunk/test/core/resources/config/opends/config/schema/03-r= fc2926.ldif 2007-10-25 12:52:32 UTC (rev 8774) @@ -0,0 +1,71 @@ +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License, Version 1.0 only +# (the "License"). You may not use this file except in compliance +# with the License. +# +# You can obtain a copy of the license at +# trunk/opends/resource/legal-notices/OpenDS.LICENSE +# or https://OpenDS.dev.java.net/OpenDS.LICENSE. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at +# trunk/opends/resource/legal-notices/OpenDS.LICENSE. If applicable, +# add the following below this CDDL HEADER, with the fields enclosed +# by brackets "[]" replaced with your own identifying * information: +# Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# +# +# Portions Copyright 2006 Sun Microsystems, Inc. +# +# +# This file contains schema definitions from RFC 2926, which defines a +# mechanism for mapping between Service Location Protocol (SLP) advertisem= ents +# and LDAP. +dn: cn=3Dschema +objectClass: top +objectClass: ldapSubentry +objectClass: subschema +attributeTypes: ( 1.3.6.1.4.1.6252.2.27.6.1.1 + NAME 'template-major-version-number' + DESC 'The major version number of the service type template' + EQUALITY integerMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE + X-ORIGIN 'RFC 2926' ) +attributeTypes: ( 1.3.6.1.4.1.6252.2.27.6.1.2 + NAME 'template-minor-version-number' + DESC 'The minor version number of the service type template' + EQUALITY integerMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE + X-ORIGIN 'RFC 2926' ) +attributeTypes: ( 1.3.6.1.4.1.6252.2.27.6.1.3 NAME 'template-url-syntax' + DESC 'An ABNF grammar describing the service type specific part of the + service URL' EQUALITY caseExactIA5Match SYNTAX 1.3.6.1.4.1.1466.115.121.= 1.26 + SINGLE-VALUE X-ORIGIN 'RFC 2926' ) +attributeTypes: ( 1.3.6.1.4.1.6252.2.27.6.1.4 + NAME 'service-advert-service-type' + DESC 'The service type of the service advertisement, including the + "service:" prefix.' EQUALITY caseExactIA5Match + SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 SINGLE-VALUE X-ORIGIN 'RFC 2926' ) +attributeTypes: ( 1.3.6.1.4.1.6252.2.27.6.1.5 NAME 'service-advert-scopes' + DESC 'A list of scopes for a service advertisement.' + EQUALITY caseExactIA5Match + SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 X-ORIGIN 'RFC 2926' ) +attributeTypes: ( 1.3.6.1.4.1.6252.2.27.6.1.6 + NAME 'service-advert-url-authenticator' + DESC 'The authenticator for the URL, null if none.' + SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 SINGLE-VALUE X-ORIGIN 'RFC 2926' ) +attributeTypes: ( 1.3.6.1.4.1.6252.2.27.6.1.7 + NAME 'service-advert-attribute-authenticator' + DESC 'The authenticator for the attribute list, null if none.' + SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 SINGLE-VALUE X-ORIGIN 'RFC 2926' ) +objectClasses: ( 1.3.6.1.4.1.6252.2.27.6.2.1 NAME 'slpService' + DESC 'parent superclass for SLP services' ABSTRACT SUP top + MUST ( template-major-version-number $ template-minor-version-number $ + description $ template-url-syntax $ service-advert-service-type $ + service-advert-scopes ) MAY ( service-advert-url-authenticator $ + service-advert-attribute-authenticator ) X-ORIGIN 'RFC 2926' ) + Added: modules/test/trunk/test/core/resources/config/opends/config/schema/0= 3-rfc3112.ldif =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/test/core/resources/config/opends/config/schema/03-r= fc3112.ldif (rev 0) +++ modules/test/trunk/test/core/resources/config/opends/config/schema/03-r= fc3112.ldif 2007-10-25 12:52:32 UTC (rev 8774) @@ -0,0 +1,43 @@ +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License, Version 1.0 only +# (the "License"). You may not use this file except in compliance +# with the License. +# +# You can obtain a copy of the license at +# trunk/opends/resource/legal-notices/OpenDS.LICENSE +# or https://OpenDS.dev.java.net/OpenDS.LICENSE. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at +# trunk/opends/resource/legal-notices/OpenDS.LICENSE. If applicable, +# add the following below this CDDL HEADER, with the fields enclosed +# by brackets "[]" replaced with your own identifying * information: +# Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# +# +# Portions Copyright 2006 Sun Microsystems, Inc. +# +# +# This file contains schema definitions from RFC 3112, which defines the +# authentication password schema. +dn: cn=3Dschema +objectClass: top +objectClass: ldapSubentry +objectClass: subschema +attributeTypes: ( 1.3.6.1.4.1.4203.1.3.3 NAME 'supportedAuthPasswordScheme= s' + DESC 'supported password storage schemes' EQUALITY caseExactIA5Match + SYNTAX 1.3.6.1.4.1.1466.115.121.1.26{32} USAGE dSAOperation + X-ORIGIN 'RFC 3112' ) +attributeTypes: ( 1.3.6.1.4.1.4203.1.3.4 NAME 'authPassword' + DESC 'password authentication information' EQUALITY 1.3.6.1.4.1.4203.1.2= .2 + SYNTAX 1.3.6.1.4.1.4203.1.1.2 X-ORIGIN 'RFC 3112' ) +objectClasses: ( 1.3.6.1.4.1.4203.1.4.7 NAME 'authPasswordObject' + DESC 'authentication password mix in class' MAY authPassword AUXILIARY + X-ORIGIN 'RFC 3112' ) + Added: modules/test/trunk/test/core/resources/config/opends/config/schema/0= 3-rfc3712.ldif =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/test/core/resources/config/opends/config/schema/03-r= fc3712.ldif (rev 0) +++ modules/test/trunk/test/core/resources/config/opends/config/schema/03-r= fc3712.ldif 2007-10-25 12:52:32 UTC (rev 8774) @@ -0,0 +1,215 @@ +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License, Version 1.0 only +# (the "License"). You may not use this file except in compliance +# with the License. +# +# You can obtain a copy of the license at +# trunk/opends/resource/legal-notices/OpenDS.LICENSE +# or https://OpenDS.dev.java.net/OpenDS.LICENSE. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at +# trunk/opends/resource/legal-notices/OpenDS.LICENSE. If applicable, +# add the following below this CDDL HEADER, with the fields enclosed +# by brackets "[]" replaced with your own identifying * information: +# Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# +# +# Portions Copyright 2006 Sun Microsystems, Inc. +# +# +# This file contains schema definitions from RFC 3712, which defines a +# mechanism for storing printer information in the Directory Server. +dn: cn=3Dschema +objectClass: top +objectClass: ldapSubentry +objectClass: subschema +attributeTypes: ( 1.3.18.0.2.4.1140 NAME 'printer-uri' + DESC 'A URI supported by this printer.' EQUALITY caseIgnoreMatch + SUBSTR caseIgnoreSubstringsMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 + SINGLE-VALUE X-ORIGIN 'RFC 3712' ) +attributeTypes: ( 1.3.18.0.2.4.1107 NAME 'printer-xri-supported' + DESC 'The unordered list of XRI (extended resource identifiers) supporte= d by + this printer.' EQUALITY caseIgnoreMatch SUBSTR caseIgnoreSubstringsMatch + SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 X-ORIGIN 'RFC 3712' ) +attributeTypes: ( 1.3.18.0.2.4.1135 NAME 'printer-name' + DESC 'The site-specific administrative name of this printer.' + EQUALITY caseIgnoreMatch SUBSTR caseIgnoreSubstringsMatch + SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{127} SINGLE-VALUE + X-ORIGIN 'RFC 3712' ) +attributeTypes: ( 1.3.18.0.2.4.1119 NAME 'printer-natural-language-configu= red' + DESC 'The configured natural language in which error and status messages= will + be generated (by default) by this printer.' EQUALITY caseIgnoreMatch + SUBSTR caseIgnoreSubstringsMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{1= 27} + SINGLE-VALUE X-ORIGIN 'RFC 3712' ) +attributeTypes: ( 1.3.18.0.2.4.1136 NAME 'printer-location' + DESC 'The physical location of this printer.' EQUALITY caseIgnoreMatch + SUBSTR caseIgnoreSubstringsMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{1= 27} + SINGLE-VALUE X-ORIGIN 'RFC 3712' ) +attributeTypes: ( 1.3.18.0.2.4.1139 NAME 'printer-info' + DESC 'Descriptive information about this printer.' EQUALITY caseIgnoreMa= tch + SUBSTR caseIgnoreSubstringsMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{1= 27} + SINGLE-VALUE X-ORIGIN 'RFC 3712' ) +attributeTypes: ( 1.3.18.0.2.4.1134 NAME 'printer-more-info' + DESC 'A URI for more information about this specific printer.' + EQUALITY caseIgnoreMatch SUBSTR caseIgnoreSubstringsMatch + SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE X-ORIGIN 'RFC 3712' ) +attributeTypes: ( 1.3.18.0.2.4.1138 NAME 'printer-make-and-model' + DESC 'Make and model of this printer.' EQUALITY caseIgnoreMatch + SUBSTR caseIgnoreSubstringsMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{1= 27} + SINGLE-VALUE X-ORIGIN 'RFC 3712' ) +attributeTypes: ( 1.3.18.0.2.4.1133 NAME 'printer-ipp-versions-supported' + DESC 'IPP protocol version(s) that this printer supports.' + EQUALITY caseIgnoreMatch SUBSTR caseIgnoreSubstringsMatch + SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{127} X-ORIGIN 'RFC 3712' ) +attributeTypes: ( 1.3.18.0.2.4.1132 + NAME 'printer-multiple-document-jobs-supported' + DESC 'Indicates whether or not this printer supports more than one docum= ent + per job.' EQUALITY booleanMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.7 + SINGLE-VALUE X-ORIGIN 'RFC 3712' ) +attributeTypes: ( 1.3.18.0.2.4.1109 NAME 'printer-charset-configured' + DESC 'The configured charset in which error and status messages will be + generated (by default) by this printer.' EQUALITY caseIgnoreMatch + SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{63} SINGLE-VALUE X-ORIGIN 'RFC 371= 2' ) +attributeTypes: ( 1.3.18.0.2.4.1131 NAME 'printer-charset-supported' + DESC 'Set of charsets supported for the attribute values of syntax + DirectoryString for this directory entry.' EQUALITY caseIgnoreMatch + SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{63} X-ORIGIN 'RFC 3712' ) +attributeTypes: ( 1.3.18.0.2.4.1137 + NAME 'printer-generated-natural-language-supported' + DESC 'Natural language(s) supported for this directory entry.' + EQUALITY caseIgnoreMatch SUBSTR caseIgnoreSubstringsMatch + SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{63} X-ORIGIN 'RFC 3712' ) +attributeTypes: ( 1.3.18.0.2.4.1130 NAME 'printer-document-format-supporte= d' + DESC 'The possible source document formats which may be interpreted and + printed by this printer.' EQUALITY caseIgnoreMatch + SUBSTR caseIgnoreSubstringsMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{1= 27} + X-ORIGIN 'RFC 3712' ) +attributeTypes: ( 1.3.18.0.2.4.1129 NAME 'printer-color-supported' + DESC 'Indicates whether this printer is capable of any type of color pri= nting + at all, including highlight color.' EQUALITY booleanMatch + SYNTAX 1.3.6.1.4.1.1466.115.121.1.7 SINGLE-VALUE X-ORIGIN 'RFC 3712' ) +attributeTypes: ( 1.3.18.0.2.4.1128 NAME 'printer-compression-supported' + DESC 'Compression algorithms supported by this printer.' + EQUALITY caseIgnoreMatch SUBSTR caseIgnoreSubstringsMatch + SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{255} X-ORIGIN 'RFC 3712' ) +attributeTypes: ( 1.3.18.0.2.4.1127 NAME 'printer-pages-per-minute' + DESC 'The nominal number of pages per minute which may be output by this + printer.' EQUALITY integerMatch ORDERING integerOrderingMatch + SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE X-ORIGIN 'RFC 3712' ) +attributeTypes: ( 1.3.18.0.2.4.1126 NAME 'printer-pages-per-minute-color' + DESC 'The nominal number of color pages per minute which may be output by + this printer.' EQUALITY integerMatch ORDERING integerOrderingMatch + SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE X-ORIGIN 'RFC 3712' ) +attributeTypes: ( 1.3.18.0.2.4.1125 NAME 'printer-finishings-supported' + DESC 'The possible finishing operations supported by this printer.' + EQUALITY caseIgnoreMatch SUBSTR caseIgnoreSubstringsMatch + SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{255} X-ORIGIN 'RFC 3712' ) +attributeTypes: ( 1.3.18.0.2.4.1124 NAME 'printer-number-up-supported' + DESC 'The possible numbers of print-stream pages to impose upon a single= side + of an instance of a selected medium.' EQUALITY integerMatch + ORDERING integerOrderingMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 + X-ORIGIN 'RFC 3712' ) +attributeTypes: ( 1.3.18.0.2.4.1123 NAME 'printer-sides-supported' + DESC 'The number of impression sides (one or two) and the two-sided + impression rotations supported by this printer.' EQUALITY caseIgnoreMatch + SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{127} X-ORIGIN 'RFC 3712' ) +attributeTypes: ( 1.3.18.0.2.4.1122 NAME 'printer-media-supported' + DESC 'The standard names/types/sizes (and optional color suffixes) of the + media supported by this printer.' EQUALITY caseIgnoreMatch + SUBSTR caseIgnoreSubstringsMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{2= 55} + X-ORIGIN 'RFC 3712' ) +attributeTypes: ( 1.3.18.0.2.4.1117 NAME 'printer-media-local-supported' + DESC 'Site-specific names of media supported by this printer.' + EQUALITY caseIgnoreMatch SUBSTR caseIgnoreSubstringsMatch + SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{255} X-ORIGIN 'RFC 3712' ) +attributeTypes: ( 1.3.18.0.2.4.1121 NAME 'printer-resolution-supported' + DESC 'List of resolutions supported for printing documents by this print= er.' + EQUALITY caseIgnoreMatch SUBSTR caseIgnoreSubstringsMatch + SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{255} X-ORIGIN 'RFC 3712' ) +attributeTypes: ( 1.3.18.0.2.4.1120 NAME 'printer-print-quality-supported' + DESC 'List of print qualities supported for printing documents on this + printer.' EQUALITY caseIgnoreMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.15= {127} + X-ORIGIN 'RFC 3712' ) +attributeTypes: ( 1.3.18.0.2.4.1110 NAME 'printer-job-priority-supported' + DESC 'Indicates the number of job priority levels supported by this prin= ter.' + EQUALITY integerMatch ORDERING integerOrderingMatch + SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE X-ORIGIN 'RFC 3712' ) +attributeTypes: ( 1.3.18.0.2.4.1118 NAME 'printer-copies-supported' + DESC 'The maximum number of copies of a document that may be printed as a + single job on this printer.' EQUALITY integerMatch + ORDERING integerOrderingMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 + SINGLE-VALUE X-ORIGIN 'RFC 3712' ) +attributeTypes: ( 1.3.18.0.2.4.1111 NAME 'printer-job-k-octets-supported' + DESC 'The maximum size in kilobytes (1,024 octets actually) incoming pri= nt + job that this printer will accept.' EQUALITY integerMatch + ORDERING integerOrderingMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 + SINGLE-VALUE X-ORIGIN 'RFC 3712' ) +attributeTypes: ( 1.3.18.0.2.4.1112 NAME 'printer-current-operator' + DESC 'The identity of the current human operator responsible for operati= ng + this printer.' EQUALITY caseIgnoreMatch SUBSTR caseIgnoreSubstringsMatch + SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{127} SINGLE-VALUE X-ORIGIN 'RFC 37= 12' ) +attributeTypes: ( 1.3.18.0.2.4.1113 NAME 'printer-service-person' + DESC 'The identity of the current human service person responsible for + servicing this printer.' EQUALITY caseIgnoreMatch + SUBSTR caseIgnoreSubstringsMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{1= 27} + SINGLE-VALUE X-ORIGIN 'RFC 3712' ) +attributeTypes: ( 1.3.18.0.2.4.1114 + NAME 'printer-delivery-orientation-supported' + DESC 'The possible delivery orientations of pages as they are printed and + ejected from this printer.' EQUALITY caseIgnoreMatch + SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{127} X-ORIGIN 'RFC 3712' ) +attributeTypes: ( 1.3.18.0.2.4.1115 NAME 'printer-stacking-order-supported' + DESC 'The possible stacking order of pages as they are printed and eject= ed + from this printer.' EQUALITY caseIgnoreMatch + SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{127} X-ORIGIN 'RFC 3712' ) +attributeTypes: ( 1.3.18.0.2.4.1116 NAME 'printer-output-features-supporte= d' + DESC 'The possible output features supported by this printer.' + EQUALITY caseIgnoreMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{127} + X-ORIGIN 'RFC 3712' ) +attributeTypes: ( 1.3.18.0.2.4.1108 NAME 'printer-aliases' + DESC 'List of site-specific administrative names of this printer in addi= tion + to the value specified for printer-name.' EQUALITY caseIgnoreMatch + SUBSTR caseIgnoreSubstringsMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{1= 27} + X-ORIGIN 'RFC 3712' ) +objectClasses: ( 1.3.18.0.2.6.254 NAME 'slpServicePrinter' + DESC 'Service Location Protocol (SLP) information.' AUXILIARY SUP slpSer= vice + X-ORIGIN 'RFC 3712' ) +objectClasses: ( 1.3.18.0.2.6.258 NAME 'printerAbstract' + DESC 'Printer related information.' ABSTRACT SUP top + MAY ( printer-name $ printer-natural-language-configured $ + printer-location $ printer-info $ printer-more-info $ + printer-make-and-model $ printer-multiple-document-jobs-supported $ + printer-charset-configured $ printer-charset-supported $ + printer-generated-natural-language-supported $ + printer-document-format-supported $ printer-color-supported $ + printer-compression-supported $ printer-pages-per-minute $ + printer-pages-per-minute-color $ printer-finishings-supported $ + printer-number-up-supported $ printer-sides-supported $ + printer-media-supported $ printer-media-local-supported $ + printer-resolution-supported $ printer-print-quality-supported $ + printer-job-priority-supported $ printer-copies-supported $ + printer-job-k-octets-supported $ printer-current-operator $ + printer-service-person $ printer-delivery-orientation-supported $ + printer-stacking-order-supported $ printer-output-features-supported ) + X-ORIGIN 'RFC 3712' ) +objectClasses: ( 1.3.18.0.2.6.255 NAME 'printerService' + DESC 'Printer information.' STRUCTURAL SUP printerAbstract + MAY ( printer-uri $ printer-xri-supported ) X-ORIGIN 'RFC 3712' ) +objectClasses: ( 1.3.18.0.2.6.257 NAME 'printerServiceAuxClass' + DESC 'Printer information.' AUXILIARY SUP printerAbstract + MAY ( printer-uri $ printer-xri-supported ) X-ORIGIN 'RFC 3712' ) +objectClasses: ( 1.3.18.0.2.6.256 NAME 'printerIPP' + DESC 'Internet Printing Protocol (IPP) information.' AUXILIARY SUP top + MAY ( printer-ipp-versions-supported $ + printer-multiple-document-jobs-supported ) X-ORIGIN 'RFC 3712' ) +objectClasses: ( 1.3.18.0.2.6.253 NAME 'printerLPR' DESC 'LPR information.' + AUXILIARY SUP top MUST ( printer-name ) MAY ( printer-aliases ) + X-ORIGIN 'RFC 3712' ) + Added: modules/test/trunk/test/core/resources/config/opends/config/schema/0= 3-uddiv3.ldif =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/test/core/resources/config/opends/config/schema/03-u= ddiv3.ldif (rev 0) +++ modules/test/trunk/test/core/resources/config/opends/config/schema/03-u= ddiv3.ldif 2007-10-25 12:52:32 UTC (rev 8774) @@ -0,0 +1,321 @@ +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License, Version 1.0 only +# (the "License"). You may not use this file except in compliance +# with the License. +# +# You can obtain a copy of the license at +# trunk/opends/resource/legal-notices/OpenDS.LICENSE +# or https://OpenDS.dev.java.net/OpenDS.LICENSE. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at +# trunk/opends/resource/legal-notices/OpenDS.LICENSE. If applicable, +# add the following below this CDDL HEADER, with the fields enclosed +# by brackets "[]" replaced with your own identifying * information: +# Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# +# +# Portions Copyright 2006 Sun Microsystems, Inc. +# +# +# This file contains schema definitions from RFC 4403, +# which defines a mechanism for storing UDDIv3 information in the Directory +# Server. +dn: cn=3Dschema +objectClass: top +objectClass: ldapSubentry +objectClass: subschema +attributeTypes: ( 1.3.6.1.1.10.4.1 NAME 'uddiBusinessKey' + DESC 'businessEntity unique identifier' EQUALITY caseIgnoreMatch + SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE + X-ORIGIN 'RFC 4403' ) +attributeTypes: ( 1.3.6.1.1.10.4.2 NAME 'uddiAuthorizedName' + DESC 'businessEntity publisher name' EQUALITY distinguishedNameMatch + SYNTAX 1.3.6.1.4.1.1466.115.121.1.12 SINGLE-VALUE + X-ORIGIN 'RFC 4403' ) +attributeTypes: ( 1.3.6.1.1.10.4.3 NAME 'uddiOperator' + DESC 'registry site operator of businessEntitys master copy' + EQUALITY caseIgnoreMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VAL= UE + X-ORIGIN 'RFC 4403' ) +attributeTypes: ( 1.3.6.1.1.10.4.4 NAME 'uddiName' DESC 'human readable na= me' + EQUALITY caseIgnoreMatch ORDERING caseIgnoreOrderingMatch + SUBSTR caseIgnoreSubstringsMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 + X-ORIGIN 'RFC 4403' ) +attributeTypes: ( 1.3.6.1.1.10.4.5 NAME 'uddiDescription' + DESC 'short description' EQUALITY caseIgnoreMatch + SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 + X-ORIGIN 'RFC 4403' ) +attributeTypes: ( 1.3.6.1.1.10.4.6 NAME 'uddiDiscoveryURLs' + DESC 'URL to retrieve a businessEntity instance' EQUALITY caseIgnoreMatch + SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 + X-ORIGIN 'RFC 4403' ) +attributeTypes: ( 1.3.6.1.1.10.4.7 NAME 'uddiUseType' + DESC 'name of convention the referenced document follows' + EQUALITY caseIgnoreMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VAL= UE + X-ORIGIN 'RFC 4403' ) +attributeTypes: ( 1.3.6.1.1.10.4.8 NAME 'uddiPersonName' + DESC 'name of person or job role available for contact' + EQUALITY caseIgnoreMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VAL= UE + X-ORIGIN 'RFC 4403' ) +attributeTypes: ( 1.3.6.1.1.10.4.9 NAME 'uddiPhone' + DESC 'telephone number for contact' EQUALITY caseIgnoreMatch + SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 + X-ORIGIN 'RFC 4403' ) +attributeTypes: ( 1.3.6.1.1.10.4.10 NAME 'uddiEMail' + DESC 'e-mail address for contact' EQUALITY caseIgnoreMatch + SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 + X-ORIGIN 'RFC 4403' ) +attributeTypes: ( 1.3.6.1.1.10.4.11 NAME 'uddiSortCode' + DESC 'specifies an external disply mechanism' EQUALITY caseIgnoreMatch + ORDERING caseIgnoreOrderingMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 + SINGLE-VALUE X-ORIGIN 'RFC 4403' ) +attributeTypes: ( 1.3.6.1.1.10.4.12 NAME 'uddiTModelKey' + DESC 'tModel unique identifier' EQUALITY caseIgnoreMatch + SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE + X-ORIGIN 'RFC 4403' ) +attributeTypes: ( 1.3.6.1.1.10.4.13 NAME 'uddiAddressLine' DESC 'address' + EQUALITY caseIgnoreMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 + X-ORIGIN 'RFC 4403' ) +attributeTypes: ( 1.3.6.1.1.10.4.14 NAME 'uddiIdentifierBag' + DESC 'identification information' EQUALITY caseIgnoreMatch + SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 + X-ORIGIN 'RFC 4403' ) +attributeTypes: ( 1.3.6.1.1.10.4.15 NAME 'uddiCategoryBag' + DESC 'categorization information' EQUALITY caseIgnoreMatch + SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 + X-ORIGIN 'RFC 4403' ) +attributeTypes: ( 1.3.6.1.1.10.4.16 NAME 'uddiKeyedReference' + DESC 'categorization information' EQUALITY caseIgnoreMatch + SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 + X-ORIGIN 'RFC 4403' ) +attributeTypes: ( 1.3.6.1.1.10.4.17 NAME 'uddiServiceKey' + DESC 'businessService unique identifier' EQUALITY caseIgnoreMatch + SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE + X-ORIGIN 'RFC 4403' ) +attributeTypes: ( 1.3.6.1.1.10.4.18 NAME 'uddiBindingKey' + DESC 'bindingTemplate unique identifier' EQUALITY caseIgnoreMatch + SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE + X-ORIGIN 'RFC 4403' ) +attributeTypes: ( 1.3.6.1.1.10.4.19 NAME 'uddiAccessPoint' + DESC 'entry point address to call a web service' EQUALITY caseIgnoreMatch + SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE + X-ORIGIN 'RFC 4403' ) +attributeTypes: ( 1.3.6.1.1.10.4.20 NAME 'uddiHostingRedirector' + DESC 'designates a pointer to another bindingTemplate' + EQUALITY caseIgnoreMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VAL= UE + X-ORIGIN 'RFC 4403' ) +attributeTypes: ( 1.3.6.1.1.10.4.21 NAME 'uddiInstanceDescription' + DESC 'instance details description' EQUALITY caseIgnoreMatch + SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 + X-ORIGIN 'RFC 4403' ) +attributeTypes: ( 1.3.6.1.1.10.4.22 NAME 'uddiInstanceParms' + DESC 'URL reference to required settings' EQUALITY caseIgnoreMatch + SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE + X-ORIGIN 'RFC 4403' ) +attributeTypes: ( 1.3.6.1.1.10.4.23 NAME 'uddiOverviewDescription' + DESC 'outlines tModel usage' EQUALITY caseIgnoreMatch + SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 + X-ORIGIN 'RFC 4403' ) +attributeTypes: ( 1.3.6.1.1.10.4.24 NAME 'uddiOverviewURL' + DESC 'URL reference to overview document' EQUALITY caseIgnoreMatch + SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE + X-ORIGIN 'RFC 4403' ) +attributeTypes: ( 1.3.6.1.1.10.4.25 NAME 'uddiFromKey' + DESC 'unique businessEntity key reference' EQUALITY caseIgnoreMatch + SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE + X-ORIGIN 'RFC 4403' ) +attributeTypes: ( 1.3.6.1.1.10.4.26 NAME 'uddiToKey' + DESC 'unique businessEntity key reference' EQUALITY caseIgnoreMatch + SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE + X-ORIGIN 'RFC 4403' ) +attributeTypes: ( 1.3.6.1.1.10.4.27 NAME 'uddiUUID' + DESC 'unique attribute' EQUALITY caseIgnoreMatch + SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE + X-ORIGIN 'RFC 4403' ) +attributeTypes: ( 1.3.6.1.1.10.4.28 NAME 'uddiIsHidden' + DESC 'isHidden attribute' EQUALITY booleanMatch + SYNTAX 1.3.6.1.4.1.1466.115.121.1.7 SINGLE-VALUE + X-ORIGIN 'RFC 4403' ) +attributeTypes: ( 1.3.6.1.1.10.4.29 NAME 'uddiIsProjection' + DESC 'isServiceProjection attribute' EQUALITY booleanMatch + SYNTAX 1.3.6.1.4.1.1466.115.121.1.7 SINGLE-VALUE + X-ORIGIN 'RFC 4403' ) +attributeTypes: ( 1.3.6.1.1.10.4.30 NAME 'uddiLang' + DESC 'xml:lang value in v3 Address structure' EQUALITY caseIgnoreMatch + SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE + X-ORIGIN 'RFC 4403' ) +attributeTypes: ( 1.3.6.1.1.10.4.31 NAME 'uddiv3BusinessKey' + DESC 'UDDIv3 businessEntity unique identifier' EQUALITY caseIgnoreMatch + SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE + X-ORIGIN 'RFC 4403' ) +attributeTypes: ( 1.3.6.1.1.10.4.32 NAME 'uddiv3ServiceKey' + DESC 'UDDIv3 businessService unique identifier' EQUALITY caseIgnoreMatch + SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE + X-ORIGIN 'RFC 4403' ) +attributeTypes: ( 1.3.6.1.1.10.4.33 NAME 'uddiv3BindingKey' + DESC 'UDDIv3 BindingTemplate unique identifier' EQUALITY caseIgnoreMatch + SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE + X-ORIGIN 'RFC 4403' ) +attributeTypes: ( 1.3.6.1.1.10.4.34 NAME 'uddiv3TModelKey' + DESC 'UDDIv3 TModel unique identifier' EQUALITY caseIgnoreMatch + SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE + X-ORIGIN 'RFC 4403' ) +attributeTypes: ( 1.3.6.1.1.10.4.35 NAME 'uddiv3DigitalSignature' + DESC 'UDDIv3 entity digital signature' EQUALITY caseExactMatch + SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 + X-ORIGIN 'RFC 4403' ) +attributeTypes: ( 1.3.6.1.1.10.4.36 NAME 'uddiv3NodeId' + DESC 'UDDIv3 Node Identifier' EQUALITY caseIgnoreMatch + SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE + X-ORIGIN 'RFC 4403' ) +attributeTypes: ( 1.3.6.1.1.10.4.37 NAME 'uddiv3EntityModificationTime' + DESC 'UDDIv3 Last Modified Time for Entity' EQUALITY generalizedTimeMatch + SYNTAX 1.3.6.1.4.1.1466.115.121.1.24 SINGLE-VALUE + X-ORIGIN 'RFC 4403' ) +attributeTypes: ( 1.3.6.1.1.10.4.38 NAME 'uddiv3SubscriptionKey' + DESC 'UDDIv3 Subscription unique identifier' EQUALITY caseIgnoreMatch + SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE + X-ORIGIN 'RFC 4403' ) +attributeTypes: ( 1.3.6.1.1.10.4.39 NAME 'uddiv3SubscriptionFilter' + DESC 'UDDIv3 Subscription Filter' EQUALITY caseIgnoreMatch + SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE + X-ORIGIN 'RFC 4403' ) +attributeTypes: ( 1.3.6.1.1.10.4.40 NAME 'uddiv3NotificationInterval' + DESC 'UDDIv3 Notification Interval' EQUALITY caseIgnoreMatch + SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE + X-ORIGIN 'RFC 4403' ) +attributeTypes: ( 1.3.6.1.1.10.4.41 NAME 'uddiv3MaxEntities' + DESC 'UDDIv3 Subscription maxEntities field' EQUALITY integerMatch + SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE + X-ORIGIN 'RFC 4403' ) +attributeTypes: ( 1.3.6.1.1.10.4.42 NAME 'uddiv3ExpiresAfter' + DESC 'UDDIv3 Subscription ExpiresAfter field' EQUALITY generalizedTimeMa= tch + SYNTAX 1.3.6.1.4.1.1466.115.121.1.24 SINGLE-VALUE + X-ORIGIN 'RFC 4403' ) +attributeTypes: ( 1.3.6.1.1.10.4.43 NAME 'uddiv3BriefResponse' + DESC 'UDDIv3 Subscription ExpiresAfter field' EQUALITY booleanMatch + SYNTAX 1.3.6.1.4.1.1466.115.121.1.7 SINGLE-VALUE + X-ORIGIN 'RFC 4403' ) +attributeTypes: ( 1.3.6.1.1.10.4.44 NAME 'uddiv3EntityKey' + DESC 'UDDIv3 Entity unique identifier' EQUALITY caseIgnoreMatch + SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE + X-ORIGIN 'RFC 4403' ) +attributeTypes: ( 1.3.6.1.1.10.4.45 NAME 'uddiv3EntityCreationTime' + DESC 'UDDIv3 Entity Creation Time' EQUALITY generalizedTimeMatch + SYNTAX 1.3.6.1.4.1.1466.115.121.1.24 SINGLE-VALUE + X-ORIGIN 'RFC 4403' ) +attributeTypes: ( 1.3.6.1.1.10.4.46 NAME 'uddiv3EntityDeletionTime' + DESC 'UDDIv3 Entity Deletion Time' EQUALITY generalizedTimeMatch + SYNTAX 1.3.6.1.4.1.1466.115.121.1.24 SINGLE-VALUE + X-ORIGIN 'RFC 4403' ) +objectClasses: ( 1.3.6.1.1.10.6.1 NAME 'uddiBusinessEntity' SUP top + STRUCTURAL MUST ( uddiBusinessKey $ uddiName ) + MAY ( uddiAuthorizedName $ uddiOperator $ uddiDiscoveryURLs $ + uddiDescription $ uddiIdentifierBag $ uddiCategoryBag $uddiv3BusinessKey= $ + uddiv3DigitalSignature $ uddiv3EntityModificationTime $ uddiv3NodeId ) + X-ORIGIN 'RFC 4403' ) +objectClasses: ( 1.3.6.1.1.10.6.2 NAME 'uddiContact' SUP top STRUCTURAL + MUST ( uddiPersonName $ uddiUUID ) MAY ( uddiUseType $ uddiDescription $ + uddiPhone $ uddiEMail ) X-ORIGIN 'RFC 4403' ) +objectClasses: ( 1.3.6.1.1.10.6.3 NAME 'uddiAddress' SUP top STRUCTURAL + MUST ( uddiUUID ) MAY ( uddiUseType $ uddiSortCode $ uddiTModelKey $ + uddiv3TmodelKey $ uddiAddressLine $ uddiLang ) + X-ORIGIN 'RFC 4403' ) +objectClasses: ( 1.3.6.1.1.10.6.4 NAME 'uddiBusinessService' SUP top + STRUCTURAL MUST ( uddiServiceKey ) MAY ( uddiName $ uddiBusinessKey $ + uddiDescription $ uddiCategoryBag $ uddiIsProjection $ uddiv3ServiceKey $ + uddiv3BusinessKey $ uddiv3DigitalSignature $ uddiv3EntityCreationTime $ + uddiv3EntityModificationTime $ uddiv3NodeId ) + X-ORIGIN 'RFC 4403' ) +objectClasses: ( 1.3.6.1.1.10.6.5 NAME 'uddiBindingTemplate' SUP top + STRUCTURAL MUST ( uddiBindingKey ) MAY ( uddiServiceKey $ uddiDescriptio= n $ + uddiAccessPoint $ uddiHostingRedirector $ uddiCategoryBag $ + uddiv3BindingKey $ uddiv3ServiceKey $ uddiv3DigitalSignature $ + uddiv3EntityCreationTime $ uddiv3NodeId) + X-ORIGIN 'RFC 4403' ) +objectClasses: ( 1.3.6.1.1.10.6.6 NAME 'uddiTModelInstanceInfo' SUP top + STRUCTURAL MUST ( uddiTModelKey ) MAY ( uddiDescription $ + uddiInstanceDescription $ uddiInstanceParms $ uddiOverviewDescription $ + uddiOverviewURL $ uddiv3TmodelKey ) + X-ORIGIN 'RFC 4403' ) +objectClasses: ( 1.3.6.1.1.10.6.7 NAME 'uddiTModel' SUP top STRUCTURAL + MUST ( uddiTModelKey $ uddiName ) MAY ( uddiAuthorizedName $ uddiOperato= r $ + uddiDescription $ uddiOverviewDescription $ uddiOverviewURL $ + uddiIdentifierBag $ uddiCategoryBag $ uddiIsHidden $ uddiv3TModelKey $ + uddiv3DigitalSignature $ uddiv3NodeId ) + X-ORIGIN 'RFC 4403' ) +objectClasses: ( 1.3.6.1.1.10.6.8 NAME 'uddiPublisherAssertion' SUP top + STRUCTURAL MUST ( uddiFromKey $ uddiToKey $ uddiKeyedReference $ uddiUUI= D ) + MAY ( uddiv3DigitalSignature $ uddiv3NodeId ) + X-ORIGIN 'RFC 4403' ) +objectClasses: ( 1.3.6.1.1.10.6.9 NAME 'uddiv3Subscription' SUP top + STRUCTURAL MUST ( uddiv3SubscriptionFilter $ uddiUUID ) + MAY ( uddiAuthorizedName $ uddiv3SubscriptionKey $ uddiv3BindingKey $ + uddiv3NotificationInterval $ uddiv3MaxEntities $ uddiv3ExpiresAfter $ + uddiv3BriefResponse $ uddiv3NodeId ) + X-ORIGIN 'RFC 4403' ) +objectClasses: ( 1.3.6.1.1.10.6.10 NAME 'uddiv3EntityObituary' SUP top + STRUCTURAL MUST ( uddiv3EntityKey $ uddiUUID ) MAY ( uddiAuthorizedName= $ + uddiv3EntityCreationTime $ uddiv3EntityDeletionTime $ uddiv3NodeId ) + X-ORIGIN 'RFC 4403' ) +nameForms: ( 1.3.6.1.1.10.15.1 NAME 'uddiBusinessEntityNameForm' + OC uddiBusinessEntity MUST ( uddiBusinessKey ) + X-ORIGIN 'RFC 4403' ) +nameForms: ( 1.3.6.1.1.10.15.2 NAME 'uddiContactNameForm' OC uddiContact + MUST ( uddiUUID ) X-ORIGIN 'RFC 4403' ) +nameForms: ( 1.3.6.1.1.10.15.3 NAME 'uddiAddressNameForm' OC uddiAddress + MUST ( uddiUUID ) X-ORIGIN 'RFC 4403' ) +nameForms: ( 1.3.6.1.1.10.15.4 NAME 'uddiBusinessServiceNameForm' + OC uddiBusinessService MUST ( uddiServiceKey ) + X-ORIGIN 'RFC 4403' ) +nameForms: ( 1.3.6.1.1.10.15.5 NAME 'uddiBindingTemplateNameForm' + OC uddiBindingTemplate MUST ( uddiBindingKey ) + X-ORIGIN 'RFC 4403' ) +nameForms: ( 1.3.6.1.1.10.15.6 NAME 'uddiTModelInstanceInfoNameForm' + OC uddiTModelInstanceInfo MUST ( uddiTModelKey ) + X-ORIGIN 'RFC 4403' ) +nameForms: ( 1.3.6.1.1.10.15.7 NAME 'uddiTModelNameForm' OC uddiTModel + MUST ( uddiTModelKey ) X-ORIGIN 'RFC 4403' ) +nameForms: ( 1.3.6.1.1.10.15.8 NAME 'uddiPublisherAssertionNameForm' + OC uddiPublisherAssertion MUST ( uddiUUID ) + X-ORIGIN 'RFC 4403' ) +nameForms: ( 1.3.6.1.1.10.15.9 NAME 'uddiv3SubscriptionNameForm' + OC uddiv3Subscription MUST ( uddiUUID ) + X-ORIGIN 'RFC 4403' ) +nameForms: ( 1.3.6.1.1.10.15.10 NAME 'uddiv3EntityObituaryNameForm' + OC uddiv3EntityObituary MUST ( uddiUUID ) + X-ORIGIN 'RFC 4403' ) +dITStructureRules: ( 1 NAME 'uddiBusinessEntityStructureRule' + FORM uddiBusinessEntityNameForm X-ORIGIN 'RFC 4403' ) +dITStructureRules: ( 2 NAME 'uddiContactStructureRule' + FORM uddiContactNameForm SUP ( 1 ) + X-ORIGIN 'RFC 4403' ) +dITStructureRules: ( 3 NAME 'uddiAddressStructureRule' FORM uddiAddressNam= eForm + SUP ( 2 ) X-ORIGIN 'RFC 4403' ) +dITStructureRules: ( 4 NAME 'uddiBusinessServiceStructureRule' + FORM uddiBusinessServiceNameForm SUP ( 1 ) + X-ORIGIN 'RFC 4403' ) +dITStructureRules: ( 5 NAME 'uddiBindingTemplateStructureRule' + FORM uddiBindingTemplateNameForm SUP ( 4 ) + X-ORIGIN 'RFC 4403' ) +dITStructureRules: ( 6 NAME 'uddiTModelInstanceInfoStructureRule' + FORM uddiTModelInstanceInfoNameForm SUP ( 5 ) + X-ORIGIN 'RFC 4403' ) +dITStructureRules: ( 7 NAME 'uddiTModelStructureRule' FORM uddiTModelNameF= orm + X-ORIGIN 'RFC 4403' ) +dITStructureRules: ( 8 NAME 'uddiPublisherAssertionStructureRule' + FORM uddiPublisherAssertionNameForm + X-ORIGIN 'RFC 4403' ) +dITStructureRules: ( 9 NAME 'uddiv3SubscriptionStructureRule' + FORM uddiv3SubscriptionNameForm + X-ORIGIN 'RFC 4403' ) +dITStructureRules: ( 10 NAME 'uddiv3EntityObituaryStructureRule' + FORM uddiv3EntityObituaryNameForm + X-ORIGIN 'RFC 4403' ) + Added: modules/test/trunk/test/core/resources/config/opends/config/schema/0= 4-rfc2307bis.ldif =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/test/core/resources/config/opends/config/schema/04-r= fc2307bis.ldif (rev 0) +++ modules/test/trunk/test/core/resources/config/opends/config/schema/04-r= fc2307bis.ldif 2007-10-25 12:52:32 UTC (rev 8774) @@ -0,0 +1,216 @@ +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License, Version 1.0 only +# (the "License"). You may not use this file except in compliance +# with the License. +# +# You can obtain a copy of the license at +# trunk/opends/resource/legal-notices/OpenDS.LICENSE +# or https://OpenDS.dev.java.net/OpenDS.LICENSE. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at +# trunk/opends/resource/legal-notices/OpenDS.LICENSE. If applicable, +# add the following below this CDDL HEADER, with the fields enclosed +# by brackets "[]" replaced with your own identifying * information: +# Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# +# +# Portions Copyright 2006 Sun Microsystems, Inc. +# +# +# This file contains schema definitions from the draft-howard-rfc2307bis +# specification, used to store naming service information in the Directory +# Server. +dn: cn=3Dschema +objectClass: top +objectClass: ldapSubentry +objectClass: subschema +attributeTypes: ( 1.3.6.1.1.1.1.0 NAME 'uidNumber' + DESC 'An integer uniquely identifying a user in an administrative domain' + EQUALITY integerMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE + X-ORIGIN 'draft-howard-rfc2307bis' ) +attributeTypes: ( 1.3.6.1.1.1.1.1 NAME 'gidNumber' + DESC 'An integer uniquely identifying a group in an administrative domai= n' + EQUALITY integerMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE + X-ORIGIN 'draft-howard-rfc2307bis' ) +attributeTypes: ( 1.3.6.1.1.1.1.2 NAME 'gecos' + DESC 'The GECOS field; the common name' EQUALITY caseIgnoreIA5Match + SUBSTRINGS caseIgnoreIA5SubstringsMatch SYNTAX 1.3.6.1.4.1.1466.115.121.= 1.26 + SINGLE-VALUE X-ORIGIN 'draft-howard-rfc2307bis' ) +attributeTypes: ( 1.3.6.1.1.1.1.3 NAME 'homeDirectory' + DESC 'The absolute path to the home directory' EQUALITY caseExactIA5Match + SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 SINGLE-VALUE + X-ORIGIN 'draft-howard-rfc2307bis' ) +attributeTypes: ( 1.3.6.1.1.1.1.4 NAME 'loginShell' + DESC 'The path to the login shell' EQUALITY caseExactIA5Match + SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 SINGLE-VALUE + X-ORIGIN 'draft-howard-rfc2307bis' ) +attributeTypes: ( 1.3.6.1.1.1.1.5 NAME 'shadowLastChange' EQUALITY integer= Match + SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE + X-ORIGIN 'draft-howard-rfc2307bis' ) +attributeTypes: ( 1.3.6.1.1.1.1.6 NAME 'shadowMin' EQUALITY integerMatch + SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE + X-ORIGIN 'draft-howard-rfc2307bis' ) +attributeTypes: ( 1.3.6.1.1.1.1.7 NAME 'shadowMax' EQUALITY integerMatch + SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE + X-ORIGIN 'draft-howard-rfc2307bis' ) +attributeTypes: ( 1.3.6.1.1.1.1.8 NAME 'shadowWarning' EQUALITY integerMat= ch + SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE + X-ORIGIN 'draft-howard-rfc2307bis' ) +attributeTypes: ( 1.3.6.1.1.1.1.9 NAME 'shadowInactive' EQUALITY integerMa= tch + SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE + X-ORIGIN 'draft-howard-rfc2307bis' ) +attributeTypes: ( 1.3.6.1.1.1.1.10 NAME 'shadowExpire' EQUALITY integerMat= ch + SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE + X-ORIGIN 'draft-howard-rfc2307bis' ) +attributeTypes: ( 1.3.6.1.1.1.1.11 NAME 'shadowFlag' EQUALITY integerMatch + SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE + X-ORIGIN 'draft-howard-rfc2307bis' ) +attributeTypes: ( 1.3.6.1.1.1.1.12 NAME 'memberUid' EQUALITY caseExactIA5M= atch + SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 X-ORIGIN 'draft-howard-rfc2307bis' ) +attributeTypes: ( 1.3.6.1.1.1.1.13 NAME 'memberNisNetgroup' + EQUALITY caseExactIA5Match SUBSTRINGS caseExactIA5SubstringsMatch + SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 X-ORIGIN 'draft-howard-rfc2307bis' ) +attributeTypes: ( 1.3.6.1.1.1.1.14 NAME 'nisNetgroupTriple' + DESC 'Netgroup triple' EQUALITY caseIgnoreIA5Match + SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 X-ORIGIN 'draft-howard-rfc2307bis' ) +attributeTypes: ( 1.3.6.1.1.1.1.15 NAME 'ipServicePort' + DESC 'Service port number' EQUALITY integerMatch + SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE + X-ORIGIN 'draft-howard-rfc2307bis' ) +attributeTypes: ( 1.3.6.1.1.1.1.16 NAME 'ipServiceProtocol' + DESC 'Service protocol name' SUP name X-ORIGIN 'draft-howard-rfc2307bis'= ) +attributeTypes: ( 1.3.6.1.1.1.1.17 NAME 'ipProtocolNumber' + DESC 'IP protocol number' EQUALITY integerMatch + SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE + X-ORIGIN 'draft-howard-rfc2307bis' ) +attributeTypes: ( 1.3.6.1.1.1.1.18 NAME 'oncRpcNumber' DESC 'ONC RPC numbe= r' + EQUALITY integerMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE + X-ORIGIN 'draft-howard-rfc2307bis' ) +attributeTypes: ( 1.3.6.1.1.1.1.19 NAME 'ipHostNumber' + DESC 'IPv4 addresses as a dotted decimal omitting leading zeros or IPv6 + addresses as defined in RFC2373' SUP name + X-ORIGIN 'draft-howard-rfc2307bis' ) +attributeTypes: ( 1.3.6.1.1.1.1.20 NAME 'ipNetworkNumber' + DESC 'IP network as a dotted decimal, eg. 192.168, omitting leading zero= s' + SUP name SINGLE-VALUE X-ORIGIN 'draft-howard-rfc2307bis' ) +attributeTypes: ( 1.3.6.1.1.1.1.21 NAME 'ipNetmaskNumber' + DESC 'IP netmask as a dotted decimal, eg. 255.255.255.0, omitting leading + zeros' EQUALITY caseIgnoreIA5Match SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 + SINGLE-VALUE X-ORIGIN 'draft-howard-rfc2307bis' ) +attributeTypes: ( 1.3.6.1.1.1.1.22 NAME 'macAddress' + DESC 'MAC address in maximal, colon separated hex notation, eg. + 00:00:92:90:ee:e2' EQUALITY caseIgnoreIA5Match + SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 X-ORIGIN 'draft-howard-rfc2307bis' ) +attributeTypes: ( 1.3.6.1.1.1.1.23 NAME 'bootParameter' + DESC 'rpc.bootparamd parameter' EQUALITY caseExactIA5Match + SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 X-ORIGIN 'draft-howard-rfc2307bis' ) +attributeTypes: ( 1.3.6.1.1.1.1.24 NAME 'bootFile' DESC 'Boot image name' + EQUALITY caseExactIA5Match SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 + X-ORIGIN 'draft-howard-rfc2307bis' ) +attributeTypes: ( 1.3.6.1.1.1.1.26 NAME 'nisMapName' + DESC 'Name of a A generic NIS map' SUP name + X-ORIGIN 'draft-howard-rfc2307bis' ) +attributeTypes: ( 1.3.6.1.1.1.1.27 NAME 'nisMapEntry' + DESC 'A generic NIS entry' EQUALITY caseExactIA5Match + SUBSTRINGS caseExactIA5SubstringsMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1= .26 + SINGLE-VALUE X-ORIGIN 'draft-howard-rfc2307bis' ) +attributeTypes: ( 1.3.6.1.1.1.1.28 NAME 'nisPublicKey' DESC 'NIS public ke= y' + EQUALITY octetStringMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.40 SINGLE-VA= LUE + X-ORIGIN 'draft-howard-rfc2307bis' ) +attributeTypes: ( 1.3.6.1.1.1.1.29 NAME 'nisSecretKey' DESC 'NIS secret ke= y' + EQUALITY octetStringMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.40 SINGLE-VA= LUE + X-ORIGIN 'draft-howard-rfc2307bis' ) +attributeTypes: ( 1.3.6.1.1.1.1.30 NAME 'nisDomain' DESC 'NIS domain' + EQUALITY caseIgnoreIA5Match SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 + X-ORIGIN 'draft-howard-rfc2307bis' ) +attributeTypes: ( 1.3.6.1.1.1.1.31 NAME 'automountMapName' + DESC 'automount Map Name' EQUALITY caseExactIA5Match + SUBSTR caseExactIA5SubstringsMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 + SINGLE-VALUE X-ORIGIN 'draft-howard-rfc2307bis' ) +attributeTypes: ( 1.3.6.1.1.1.1.32 NAME 'automountKey' + DESC 'Automount Key value' EQUALITY caseExactIA5Match + SUBSTR caseExactIA5SubstringsMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 + SINGLE-VALUE X-ORIGIN 'draft-howard-rfc2307bis' ) +attributeTypes: ( 1.3.6.1.1.1.1.33 NAME 'automountInformation' + DESC 'Automount information' EQUALITY caseExactIA5Match + SUBSTR caseExactIA5SubstringsMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 + SINGLE-VALUE X-ORIGIN 'draft-howard-rfc2307bis' ) +objectClasses: ( 1.3.6.1.1.1.2.0 NAME 'posixAccount' SUP top AUXILIARY + DESC 'Abstraction of an account with POSIX attributes' + MUST ( cn $ uid $ uidNumber $ gidNumber $ homeDirectory ) + MAY ( authPassword $ userPassword $ loginShell $ gecos $ description ) + X-ORIGIN 'draft-howard-rfc2307bis' ) +objectClasses: ( 1.3.6.1.1.1.2.1 NAME 'shadowAccount' SUP top AUXILIARY + DESC 'Additional attributes for shadow passwords' MUST uid + MAY ( authPassword $ userPassword $ description $ shadowLastChange $ + shadowMin $ shadowMax $ shadowWarning $ shadowInactive $ shadowExpire $ + shadowFlag ) X-ORIGIN 'draft-howard-rfc2307bis' ) +objectClasses: ( 1.3.6.1.1.1.2.2 NAME 'posixGroup' SUP top AUXILIARY + DESC 'Abstraction of a group of accounts' MUST gidNumber + MAY ( authPassword $ userPassword $ memberUid $ description ) + X-ORIGIN 'draft-howard-rfc2307bis' ) +objectClasses: ( 1.3.6.1.1.1.2.3 NAME 'ipService' SUP top STRUCTURAL + DESC 'Abstraction an Internet Protocol service. Maps an IP port and pro= tocol + (such as tcp or udp) to one or more names; the distinguished value of th= e cn + attribute denotes the canonical name of the service' + MUST ( cn $ ipServicePort $ ipServiceProtocol ) MAY description + X-ORIGIN 'draft-howard-rfc2307bis' ) +objectClasses: ( 1.3.6.1.1.1.2.4 NAME 'ipProtocol' SUP top STRUCTURAL + DESC 'Abstraction of an IP protocol. Maps a protocol number to one or mo= re + names. The distinguished value of the cn attribute denotes the canonical= name + of the protocol' MUST ( cn $ ipProtocolNumber ) MAY description + X-ORIGIN 'draft-howard-rfc2307bis' ) +objectClasses: ( 1.3.6.1.1.1.2.5 NAME 'oncRpc' SUP top STRUCTURAL + DESC 'Abstraction of an Open Network Computing (ONC) [RFC1057] Remote + Procedure Call (RPC) binding. This class maps an ONC RPC number to a na= me. + The distinguished value of the cn attribute denotes the canonical name o= f the + RPC service' MUST ( cn $ oncRpcNumber ) MAY description + X-ORIGIN 'draft-howard-rfc2307bis' ) +objectClasses: ( 1.3.6.1.1.1.2.6 NAME 'ipHost' SUP top AUXILIARY + DESC 'Abstraction of a host, an IP device. The distinguished value of th= e cn + attribute denotes the canonical name of the host. Device SHOULD be used = as a + structural class' MUST ( cn $ ipHostNumber ) + MAY ( authPassword $ userPassword $ l $ description $ manager ) + X-ORIGIN 'draft-howard-rfc2307bis' ) +objectClasses: ( 1.3.6.1.1.1.2.7 NAME 'ipNetwork' SUP top STRUCTURAL + DESC 'Abstraction of a network. The distinguished value of the cn attrib= ute + denotes the canonical name of the network' MUST ipNetworkNumber + MAY ( cn $ ipNetmaskNumber $ l $ description $ manager ) + X-ORIGIN 'draft-howard-rfc2307bis' ) +objectClasses: ( 1.3.6.1.1.1.2.8 NAME 'nisNetgroup' SUP top STRUCTURAL + DESC 'Abstraction of a netgroup. May refer to other netgroups' MUST cn + MAY ( nisNetgroupTriple $ memberNisNetgroup $ description ) + X-ORIGIN 'draft-howard-rfc2307bis' ) +objectClasses: ( 1.3.6.1.1.1.2.9 NAME 'nisMap' SUP top STRUCTURAL + DESC 'A generic abstraction of a NIS map' MUST nisMapName MAY description + X-ORIGIN 'draft-howard-rfc2307bis' ) +objectClasses: ( 1.3.6.1.1.1.2.10 NAME 'nisObject' SUP top STRUCTURAL + DESC 'An entry in a NIS map' MUST ( cn $ nisMapEntry $ nisMapName ) + MAY description X-ORIGIN 'draft-howard-rfc2307bis' ) +objectClasses: ( 1.3.6.1.1.1.2.11 NAME 'ieee802Device' SUP top AUXILIARY + DESC 'A device with a MAC address; device SHOULD be used as a structural + class' MAY macAddress X-ORIGIN 'draft-howard-rfc2307bis' ) +objectClasses: ( 1.3.6.1.1.1.2.12 NAME 'bootableDevice' SUP top AUXILIARY + DESC 'A device with boot parameters; device SHOULD be used as a structur= al + class' MAY ( bootFile $ bootParameter ) X-ORIGIN 'draft-howard-rfc2307bi= s' ) +objectClasses: ( 1.3.6.1.1.1.2.14 NAME 'nisKeyObject' SUP top AUXILIARY + DESC 'An object with a public and secret key' + MUST ( cn $ nisPublicKey $ nisSecretKey ) MAY ( uidNumber $ description ) + X-ORIGIN 'draft-howard-rfc2307bis' ) +objectClasses: ( 1.3.6.1.1.1.2.15 NAME 'nisDomainObject' SUP top AUXILIARY + DESC 'Associates a NIS domain with a naming context' MUST nisDomain + X-ORIGIN 'draft-howard-rfc2307bis' ) +objectClasses: ( 1.3.6.1.1.1.2.16 NAME 'automountMap' SUP top STRUCTURAL + MUST ( automountMapName ) MAY description + X-ORIGIN 'draft-howard-rfc2307bis' ) +objectClasses: ( 1.3.6.1.1.1.2.17 NAME 'automount' SUP top STRUCTURAL + DESC 'Automount information' MUST ( automountKey $ automountInformation ) + MAY description X-ORIGIN 'draft-howard-rfc2307bis' ) + Added: modules/test/trunk/test/core/resources/config/opends/config/schema/0= 5-other.ldif =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/test/core/resources/config/opends/config/schema/05-o= ther.ldif (rev 0) +++ modules/test/trunk/test/core/resources/config/opends/config/schema/05-o= ther.ldif 2007-10-25 12:52:32 UTC (rev 8774) @@ -0,0 +1,21 @@ +# Some schema parts that were missing in standard set +# +# +# +dn: cn=3Dschema +objectClass: top +objectClass: ldapSubentry +objectClass: subschema +attributeTypes: ( 2.16.840.1.113730.3.1.692 NAME 'inetUserStatus' + DESC '"active", "inactive", or "deleted" status of a user' SYNTAX 1.3.6.= 1.4.1.1466.115.121.1.15 + SINGLE-VALUE X-ORIGIN 'Nortel subscriber interoperability' ) +attributeTypes: ( 2.16.840.1.113730.3.1.693 NAME 'inetUserHttpURL' + DESC 'A users Web addresses' SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 + X-ORIGIN 'Nortel subscriber interoperability' ) +attributeTypes: ( 1.2.840.113556.1.2.102 NAME 'memberOf' + DESC 'Group that theentry belongs to' SYNTAX 1.3.6.1.4.1.1466.115.121.1.= 12 + X-ORIGIN 'iPlanet Delegated Administrator' ) +objectClasses: ( 2.16.840.1.113730.3.2.130 NAME 'inetUser' + DESC 'Auxiliary class which must be present in an entry for delivery of = subscriber services' + SUP top AUXILIARY MAY ( uid $ inetUserStatus $ inetUserHttpURL $ userPas= sword $ memberOf ) + X-ORIGIN 'Nortel subscriber interoperability' ) Added: modules/test/trunk/test/core/resources/config/opends/db/dummy =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D Added: modules/test/trunk/test/core/resources/config/opends/ldif/example1.l= dif =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/test/core/resources/config/opends/ldif/example1.ldif= (rev 0) +++ modules/test/trunk/test/core/resources/config/opends/ldif/example1.ldif= 2007-10-25 12:52:32 UTC (rev 8774) @@ -0,0 +1,39 @@ +dn: dc=3Djboss,dc=3Dorg +objectclass: top +objectclass: dcObject +objectclass: organization +dc: jboss +o: JBoss + +dn: ou=3DPeople,dc=3Djboss,dc=3Dorg +objectclass: top +objectclass: organizationalUnit +ou: People + +dn: uid=3Djduke,ou=3DPeople,dc=3Djboss,dc=3Dorg +objectclass: top +objectclass: uidObject +objectclass: person +uid: jduke +cn: Java Duke +sn: Duke +userPassword: theduke + +dn: ou=3DRoles,dc=3Djboss,dc=3Dorg +objectclass: top +objectclass: organizationalUnit +ou: Roles + +dn: cn=3DEcho,ou=3DRoles,dc=3Djboss,dc=3Dorg +objectClass: top +objectClass: groupOfNames +cn: Echo +description: the JBossAdmin group +member: uid=3Djduke,ou=3DPeople,dc=3Djboss,dc=3Dorg + +dn: cn=3DTheDuke,ou=3DRoles,dc=3Djboss,dc=3Dorg +objectClass: groupOfNames +objectClass: top +cn: TheDuke +description: TheDuke role context +member: uid=3Djduke,ou=3DPeople,dc=3Djboss,dc=3Dorg Added: modules/test/trunk/test/core/resources/config/opends/locks/dummy =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D Added: modules/test/trunk/test/core/resources/config/opends/logs/access =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D Added: modules/test/trunk/test/core/resources/config/opends/logs/debug =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D Added: modules/test/trunk/test/core/resources/config/opends/logs/errors =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D Added: modules/test/trunk/test/generic/pom.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/test/generic/pom.xml (rev 0) +++ modules/test/trunk/test/generic/pom.xml 2007-10-25 12:52:32 UTC (rev 87= 74) @@ -0,0 +1,40 @@ + + + org.jboss.portal.test + jboss-portal-modules-test-root + 1.1.0-SNAPSHOT + + 4.0.0 + jboss-portal-modules-test-generic + jar + JBoss Portal Modules Test Generic + + + + + + ../src/main/java + + + + maven-compiler-plugin + + org/jboss/portal/test/framework/impl/gen= eric/** + + + + org.apache.maven.plugins + maven-surefire-plugin + + true + + + + + + + + + + Copied: modules/test/trunk/test/generic/resources/org (from rev 8771, modul= es/test/trunk/test/src/resources/generic/portal-test-jar/org) Copied: modules/test/trunk/test/jboss/resources/org (from rev 8771, modules= /test/trunk/test/src/resources/jboss/portal-test-jar/org) Copied: modules/test/trunk/test/src/main/java/org (from rev 8771, modules/t= est/trunk/test/src/main/org) Added: modules/test/trunk/tooling/pom.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/tooling/pom.xml (rev 0) +++ modules/test/trunk/tooling/pom.xml 2007-10-25 12:52:32 UTC (rev 8774) @@ -0,0 +1,49 @@ + + + org.jboss.portal.test + jboss-portal-modules-test-root + 1.1.0-SNAPSHOT + + 4.0.0 + jboss-portal-modules-test-tooling + jar + JBoss Portal Modules Common Tooling + + + + ant + ant-junit + 1.6.5 + + + ant + ant + 1.6.5 + + + org.jboss.portal.test + jboss-portal-modules-test-unit + 1.1.0-SNAPSHOT + + + + + + = + + + org.apache.maven.plugins + maven-surefire-plugin + + true + + + + + + + + + + \ No newline at end of file --===============5442754894006008974==-- From portal-commits at lists.jboss.org Thu Oct 25 15:27:48 2007 Content-Type: multipart/mixed; boundary="===============4454839672601700928==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8775 - in modules/test/trunk: build/ide/intellij/idea60/modules/test and 7 other directories. Date: Thu, 25 Oct 2007 15:27:47 -0400 Message-ID: --===============4454839672601700928== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: bdaw Date: 2007-10-25 15:27:47 -0400 (Thu, 25 Oct 2007) New Revision: 8775 Added: modules/test/trunk/test/jboss/pom.xml Modified: modules/test/trunk/build/ide/intellij/idea60/modules/test/test.iml modules/test/trunk/pom.xml modules/test/trunk/remote/pom.xml modules/test/trunk/test/core/pom.xml modules/test/trunk/test/generic/pom.xml modules/test/trunk/test/src/main/java/org/jboss/portal/test/framework/em= bedded/opends/OpenDSService.java modules/test/trunk/tooling/pom.xml modules/test/trunk/unit/pom.xml Log: update of poms for test module Modified: modules/test/trunk/build/ide/intellij/idea60/modules/test/test.iml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/build/ide/intellij/idea60/modules/test/test.iml 2007= -10-25 12:52:32 UTC (rev 8774) +++ modules/test/trunk/build/ide/intellij/idea60/modules/test/test.iml 2007= -10-25 19:27:47 UTC (rev 8775) @@ -264,15 +264,6 @@ - - - - - - - - - @@ -351,6 +342,15 @@ + + + + + + + + + Modified: modules/test/trunk/pom.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/pom.xml 2007-10-25 12:52:32 UTC (rev 8774) +++ modules/test/trunk/pom.xml 2007-10-25 19:27:47 UTC (rev 8775) @@ -126,9 +126,10 @@ unit tooling mc - - - + remote + test/core + test/generic + test/jboss = = Modified: modules/test/trunk/remote/pom.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/remote/pom.xml 2007-10-25 12:52:32 UTC (rev 8774) +++ modules/test/trunk/remote/pom.xml 2007-10-25 19:27:47 UTC (rev 8775) @@ -8,7 +8,7 @@ 4.0.0 jboss-portal-modules-test-remote jar - JBoss Portal Modules Common Remote + JBoss Portal Modules Test Remote = @@ -17,6 +17,11 @@ 1.1.0-SNAPSHOT + org.jboss.portal.test + jboss-portal-modules-test-core + 1.1.0-SNAPSHOT + + org.jboss.portal.common jboss-portal-modules-common 1.1.0-SNAPSHOT @@ -29,7 +34,7 @@ apache-httpclient commons-httpclient - 2.0.2 + 3.0.1 org.jboss.microcontainer Modified: modules/test/trunk/test/core/pom.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/test/core/pom.xml 2007-10-25 12:52:32 UTC (rev 8774) +++ modules/test/trunk/test/core/pom.xml 2007-10-25 19:27:47 UTC (rev 8775) @@ -18,8 +18,8 @@ cargo - cargo - 0.5 + core + 0.9-portal sun-opends @@ -38,14 +38,29 @@ jboss.jbossas.core-libs - jboss-client - 4.0.3.SP1 + jboss-transaction + 4.0.4.GA - - - - - + + jboss.jbossas.core-libs + jnpserver + 4.0.4.GA + + + jboss.jbossas.core-libs + jboss-jca + 4.0.4.GA + + + jboss.jbossas.core-libs + jboss-local-jdbc + 4.0.4.GA + + + jboss.jbossas.core-libs + jboss + 4.0.4.GA + = Modified: modules/test/trunk/test/generic/pom.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/test/generic/pom.xml 2007-10-25 12:52:32 UTC (rev 87= 74) +++ modules/test/trunk/test/generic/pom.xml 2007-10-25 19:27:47 UTC (rev 87= 75) @@ -11,6 +11,61 @@ JBoss Portal Modules Test Generic = + + org.jboss.portal.common + jboss-portal-modules-common + 1.1.0-SNAPSHOT + + + cargo + core + 0.9-portal + + + sun-opends + opends-core + 1.0.0-BUILD04 + + + hibernate + hibernate3 + 3.2.3.GA + + + dom4j + dom4j + 1.6.1 + + + jboss.jbossas.core-libs + jboss-transaction + 4.0.4.GA + + + jboss.jbossas.core-libs + jnpserver + 4.0.4.GA + + + jboss.jbossas.core-libs + jboss-jca + 4.0.4.GA + + + jboss.jbossas.core-libs + jboss-local-jdbc + 4.0.4.GA + + + jboss.jbossas.core-libs + jboss + 4.0.4.GA + + + jboss + jboss-remoting + 2.2.1.GA + = @@ -20,9 +75,23 @@ maven-compiler-plugin - org/jboss/portal/test/framework/impl/gen= eric/** + + org/jboss/portal/test/framework/impl/generic/**= + + org/jboss/portal/test/framework/agent/** + org/jboss/portal/test/framework/server/** + + + + + + + + + + org.apache.maven.plugins maven-surefire-plugin Copied: modules/test/trunk/test/jboss/pom.xml (from rev 8774, modules/test/= trunk/test/generic/pom.xml) =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/test/jboss/pom.xml (rev 0) +++ modules/test/trunk/test/jboss/pom.xml 2007-10-25 19:27:47 UTC (rev 8775) @@ -0,0 +1,98 @@ + + + org.jboss.portal.test + jboss-portal-modules-test-root + 1.1.0-SNAPSHOT + + 4.0.0 + jboss-portal-modules-test-jboss + jar + JBoss Portal Modules Test JBoss + + + + org.jboss.portal.common + jboss-portal-modules-common + 1.1.0-SNAPSHOT + + + cargo + core + 0.9-portal + + + sun-opends + opends-core + 1.0.0-BUILD04 + + + hibernate + hibernate3 + 3.2.3.GA + + + dom4j + dom4j + 1.6.1 + + + jboss.jbossas.core-libs + jboss-transaction + 4.0.4.GA + + + jboss.jbossas.core-libs + jnpserver + 4.0.4.GA + + + jboss.jbossas.core-libs + jboss-jca + 4.0.4.GA + + + jboss.jbossas.core-libs + jboss-local-jdbc + 4.0.4.GA + + + jboss.jbossas.core-libs + jboss + 4.0.4.GA + + + jboss + jboss-remoting + 2.2.1.GA + + + + + ../src/main/java + + + + maven-compiler-plugin + + + org/jboss/portal/test/framework/impl/jboss/** + org/jboss/portal/test/framework/embedded/opends= /** + + + + + org.apache.maven.plugins + maven-surefire-plugin + + true + + + + + + + + + + Modified: modules/test/trunk/test/src/main/java/org/jboss/portal/test/frame= work/embedded/opends/OpenDSService.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/test/src/main/java/org/jboss/portal/test/framework/e= mbedded/opends/OpenDSService.java 2007-10-25 12:52:32 UTC (rev 8774) +++ modules/test/trunk/test/src/main/java/org/jboss/portal/test/framework/e= mbedded/opends/OpenDSService.java 2007-10-25 19:27:47 UTC (rev 8775) @@ -70,7 +70,9 @@ */ public void restart() { - DirectoryServer.restart(getClass().getName(), "DS restart"); + + //TODO: + //DirectoryServer.restart(getClass().getName(), "DS restart"); } = public void create() throws Exception @@ -112,8 +114,9 @@ = public void stopService() throws Exception { - log.info("Asking DS to shutdown"); - DirectoryServer.shutDown(getClass().getName(), "Shut down DS"); + //TODO: + //log.info("Asking DS to shutdown"); + //DirectoryServer.shutDown(getClass().getName(), "Shut down DS"); } = public void destroy() throws Exception Modified: modules/test/trunk/tooling/pom.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/tooling/pom.xml 2007-10-25 12:52:32 UTC (rev 8774) +++ modules/test/trunk/tooling/pom.xml 2007-10-25 19:27:47 UTC (rev 8775) @@ -8,7 +8,7 @@ 4.0.0 jboss-portal-modules-test-tooling jar - JBoss Portal Modules Common Tooling + JBoss Portal Modules Test Tooling = Modified: modules/test/trunk/unit/pom.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/pom.xml 2007-10-25 12:52:32 UTC (rev 8774) +++ modules/test/trunk/unit/pom.xml 2007-10-25 19:27:47 UTC (rev 8775) @@ -8,7 +8,7 @@ 4.0.0 jboss-portal-modules-test-unit jar - JBoss Portal Modules Common Portal + JBoss Portal Modules Test Portal = = --===============4454839672601700928==-- From portal-commits at lists.jboss.org Thu Oct 25 20:27:58 2007 Content-Type: multipart/mixed; boundary="===============1861042640098399513==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8776 - in branches/JBoss_Portal_Branch_2_6/wsrp: src/main/org/jboss/portal/test/wsrp/portlet and 4 other directories. Date: Thu, 25 Oct 2007 20:27:58 -0400 Message-ID: --===============1861042640098399513== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: chris.laprun(a)jboss.com Date: 2007-10-25 20:27:58 -0400 (Thu, 25 Oct 2007) New Revision: 8776 Added: branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/test/wsr= p/portlet/ApplicationScopeGetPortlet.java branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/test/wsr= p/portlet/ApplicationScopeSetPortlet.java branches/JBoss_Portal_Branch_2_6/wsrp/src/resources/tests/test-applicati= onscope-portlet-war/ branches/JBoss_Portal_Branch_2_6/wsrp/src/resources/tests/test-applicati= onscope-portlet-war/WEB-INF/ branches/JBoss_Portal_Branch_2_6/wsrp/src/resources/tests/test-applicati= onscope-portlet-war/WEB-INF/jboss-portlet.xml branches/JBoss_Portal_Branch_2_6/wsrp/src/resources/tests/test-applicati= onscope-portlet-war/WEB-INF/portlet.xml branches/JBoss_Portal_Branch_2_6/wsrp/src/resources/tests/test-applicati= onscope-portlet-war/WEB-INF/web.xml Modified: branches/JBoss_Portal_Branch_2_6/wsrp/build.xml branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/test/wsr= p/v1/producer/MarkupTestCase.java branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/test/wsr= p/v1/producer/NeedPortletHandleTest.java Log: - Added test case to check correct handling of application scope variables = on the producer. Modified: branches/JBoss_Portal_Branch_2_6/wsrp/build.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/wsrp/build.xml 2007-10-25 19:27:47 UTC= (rev 8775) +++ branches/JBoss_Portal_Branch_2_6/wsrp/build.xml 2007-10-26 00:27:58 UTC= (rev 8776) @@ -628,6 +628,15 @@ = + + + + + + + + + = Added: branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/test= /wsrp/portlet/ApplicationScopeGetPortlet.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/test/ws= rp/portlet/ApplicationScopeGetPortlet.java (rev 0) +++ branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/test/ws= rp/portlet/ApplicationScopeGetPortlet.java 2007-10-26 00:27:58 UTC (rev 877= 6) @@ -0,0 +1,48 @@ +/*************************************************************************= ***** + * JBoss, a division of Red Hat = * + * Copyright 2007, Red Hat Middleware, LLC, and individual = * + * contributors as indicated by the @authors tag. See the = * + * copyright.txt in the distribution for a full listing of = * + * individual contributors. = * + * = * + * This is free software; you can redistribute it and/or modify it = * + * under the terms of the GNU Lesser General Public License as = * + * published by the Free Software Foundation; either version 2.1 of = * + * the License, or (at your option) any later version. = * + * = * + * This software is distributed in the hope that it will be useful, = * + * but WITHOUT ANY WARRANTY; without even the implied warranty of = * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU = * + * Lesser General Public License for more details. = * + * = * + * You should have received a copy of the GNU Lesser General Public = * + * License along with this software; if not, write to the Free = * + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA = * + * 02110-1301 USA, or see the FSF site: http://www.fsf.org. = * + *************************************************************************= *****/ + +package org.jboss.portal.test.wsrp.portlet; + +import javax.portlet.GenericPortlet; +import javax.portlet.PortletException; +import javax.portlet.PortletSecurityException; +import javax.portlet.PortletSession; +import javax.portlet.RenderRequest; +import javax.portlet.RenderResponse; +import java.io.IOException; +import java.io.Writer; + +/** + * @author Chris Laprun + * @version $Revision$ + * @since 2.6.3 + */ +public class ApplicationScopeGetPortlet extends GenericPortlet +{ + protected void doView(RenderRequest renderRequest, RenderResponse rende= rResponse) throws PortletException, PortletSecurityException, IOException + { + renderResponse.setContentType("text/html"); + Writer writer =3D renderResponse.getWriter(); + writer.write("appVar=3D" + renderRequest.getPortletSession().getAttr= ibute("appVar", PortletSession.APPLICATION_SCOPE)); + } +} Property changes on: branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jbo= ss/portal/test/wsrp/portlet/ApplicationScopeGetPortlet.java ___________________________________________________________________ Name: svn:keywords + Author Date Id Revision Name: svn:eol-style + native Added: branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/test= /wsrp/portlet/ApplicationScopeSetPortlet.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/test/ws= rp/portlet/ApplicationScopeSetPortlet.java (rev 0) +++ branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/test/ws= rp/portlet/ApplicationScopeSetPortlet.java 2007-10-26 00:27:58 UTC (rev 877= 6) @@ -0,0 +1,46 @@ +/*************************************************************************= ***** + * JBoss, a division of Red Hat = * + * Copyright 2007, Red Hat Middleware, LLC, and individual = * + * contributors as indicated by the @authors tag. See the = * + * copyright.txt in the distribution for a full listing of = * + * individual contributors. = * + * = * + * This is free software; you can redistribute it and/or modify it = * + * under the terms of the GNU Lesser General Public License as = * + * published by the Free Software Foundation; either version 2.1 of = * + * the License, or (at your option) any later version. = * + * = * + * This software is distributed in the hope that it will be useful, = * + * but WITHOUT ANY WARRANTY; without even the implied warranty of = * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU = * + * Lesser General Public License for more details. = * + * = * + * You should have received a copy of the GNU Lesser General Public = * + * License along with this software; if not, write to the Free = * + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA = * + * 02110-1301 USA, or see the FSF site: http://www.fsf.org. = * + *************************************************************************= *****/ + +package org.jboss.portal.test.wsrp.portlet; + +import javax.portlet.ActionRequest; +import javax.portlet.ActionResponse; +import javax.portlet.GenericPortlet; +import javax.portlet.PortletException; +import javax.portlet.PortletSecurityException; +import javax.portlet.PortletSession; +import java.io.IOException; + +/** + * @author Chris Laprun + * @version $Revision$ + * @since 2.6.3 + */ +public class ApplicationScopeSetPortlet extends GenericPortlet +{ + public void processAction(ActionRequest actionRequest, ActionResponse a= ctionResponse) throws PortletException, PortletSecurityException, IOExcepti= on + { + PortletSession session =3D actionRequest.getPortletSession(); + session.setAttribute("appVar", actionRequest.getParameter("appVar"),= PortletSession.APPLICATION_SCOPE); + } +} Property changes on: branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jbo= ss/portal/test/wsrp/portlet/ApplicationScopeSetPortlet.java ___________________________________________________________________ Name: svn:keywords + Author Date Id Revision Name: svn:eol-style + native Modified: branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/t= est/wsrp/v1/producer/MarkupTestCase.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/test/ws= rp/v1/producer/MarkupTestCase.java 2007-10-25 19:27:47 UTC (rev 8775) +++ branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/test/ws= rp/v1/producer/MarkupTestCase.java 2007-10-26 00:27:58 UTC (rev 8776) @@ -47,6 +47,7 @@ import org.jboss.portal.wsrp.core.UpdateResponse; = import java.rmi.RemoteException; +import java.util.List; = /** * @author Chris Laprun @@ -88,9 +89,7 @@ checkException(e, WSRPExceptionFactory.UNSUPPORTED_MODE); } // reactivate check for exception once tests go through WS stack see= : JBPORTAL-1712 - /*catch (UnsupportedModeFault unsupportedModeFault) - { - }*/ +// catch (UnsupportedModeFault unsupportedModeFault) { } } = public void testGetMarkupWithSessionID() throws Exception @@ -109,10 +108,7 @@ checkException(e, WSRPExceptionFactory.OPERATION_FAILED); } // reactivate check for exception once tests go through WS stack see= : JBPORTAL-1712 - /*catch (OperationFailedFault operationFailedFault) - { - // expected fault. - }*/ +// catch (OperationFailedFault operationFailedFault){} } = public void testGetMarkupEditNoSession() throws Exception @@ -269,9 +265,7 @@ checkException(e, WSRPExceptionFactory.OPERATION_FAILED); } // reactivate check for exception once tests go through WS stack see= : JBPORTAL-1712 - /*catch (OperationFailedFault expected) - { - }*/ +// catch (OperationFailedFault expected){} } = public void testMarkupCaching() throws Exception @@ -467,6 +461,40 @@ undeploy(archive); } = + public void testApplicationScopeVariableHandling() throws Exception + { + undeploy(DEFAULT_MARKUP_PORTLET_WAR); + String archive =3D "test-applicationscope-portlet.war"; + deploy(archive); + + // get handles: current archive contains 2 portlets, one to set the = application scoped variable, another one to read it + List handles =3D getHandlesForCurrentlyDeployedArchive(); + String handle =3D handles.get(0); + String setHandle, getHandle; + if (handle.contains("Set")) + { + setHandle =3D handle; + getHandle =3D handles.get(1); + } + else + { + getHandle =3D handle; + setHandle =3D handles.get(1); + } + + // set appVar to value in the application scope by the first portlet + PerformBlockingInteraction pbi =3D WSRPTypeFactory.createDefaultPerf= ormBlockingInteraction(setHandle); + pbi.getInteractionParams().setFormParameters(new NamedString[]{new N= amedString("appVar", "value")}); + markupService.performBlockingInteraction(pbi); + + // the second portlet reads the appVar value and outputs it + GetMarkup gm =3D createMarkupRequest(getHandle); + MarkupResponse res =3D markupService.getMarkup(gm); + checkMarkupResponse(res, "appVar=3Dvalue"); + + undeploy(archive); + } + private String checkPBIAndGetNavigationalState(String symbol) throws Ex= ception { PerformBlockingInteraction performBlockingInteraction =3D Modified: branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/t= est/wsrp/v1/producer/NeedPortletHandleTest.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/test/ws= rp/v1/producer/NeedPortletHandleTest.java 2007-10-25 19:27:47 UTC (rev 8775) +++ branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/test/ws= rp/v1/producer/NeedPortletHandleTest.java 2007-10-26 00:27:58 UTC (rev 8776) @@ -38,7 +38,9 @@ import org.jboss.portal.wsrp.handler.RequestHeaderClientHandler; = import java.rmi.RemoteException; +import java.util.ArrayList; import java.util.HashMap; +import java.util.List; import java.util.Map; = /** @@ -50,7 +52,7 @@ { private String mostUsedPortletWARFileName; private String currentlyDeployedArchiveName; - private Map war2Handle =3D new HashMap(7); + private Map> war2Handles =3D new HashMap>(7); = = public NeedPortletHandleTest(String portletWARFileName) @@ -69,15 +71,34 @@ = protected String getDefaultHandle() throws RemoteException, InvalidRegi= strationFault, OperationFailedFault { - return (String)war2Handle.get(mostUsedPortletWARFileName); + return getFirstHandleFor(mostUsedPortletWARFileName); } = + /** + * @param archiveName + * @return + * @since 2.6.3 + */ + private String getFirstHandleFor(String archiveName) + { + return war2Handles.get(archiveName).get(0); + } + protected String getHandleForCurrentlyDeployedArchive() throws RemoteEx= ception, InvalidRegistrationFault, OperationFailedFault { - return (String)war2Handle.get(currentlyDeployedArchiveName); + return getFirstHandleFor(currentlyDeployedArchiveName); } = /** + * @return + * @since 2.6.3 + */ + protected List getHandlesForCurrentlyDeployedArchive() + { + return war2Handles.get(currentlyDeployedArchiveName); + } + + /** * Each time we deploy a new archive, check to see if the service descr= iption has changed and add any new portlet * handles found. * @@ -89,7 +110,7 @@ super.deploy(archiveName); currentlyDeployedArchiveName =3D archiveName; = - if (!war2Handle.containsKey(archiveName)) + if (!war2Handles.containsKey(archiveName)) { GetServiceDescription getServiceDescription =3D WSRPTypeFactory.c= reateGetServiceDescription(); ServiceDescription serviceDescription =3D serviceDescriptionServi= ce.getServiceDescription(getServiceDescription); @@ -101,7 +122,14 @@ String warName =3D handle.substring(1, handle.indexOf('.')) + = ".war"; if (warName.equals(archiveName)) { - war2Handle.put(warName, handle); + List handles =3D war2Handles.get(warName); + if (handles =3D=3D null) + { + handles =3D new ArrayList(3); + war2Handles.put(warName, handles); + } + + handles.add(handle); } } } @@ -125,7 +153,7 @@ // only remove the mapping if we're not undeploying the most used po= rtlet (optimization, as it avoids parsing the SD) if (!mostUsedPortletWARFileName.equals(archiveName)) { - war2Handle.remove(archiveName); + war2Handles.remove(archiveName); } } = @@ -158,7 +186,20 @@ */ protected GetMarkup createMarkupRequestForCurrentlyDeployedPortlet() th= rows Exception { - GetMarkup getMarkup =3D WSRPTypeFactory.createDefaultMarkupRequest(g= etHandleForCurrentlyDeployedArchive()); + return createMarkupRequest(getHandleForCurrentlyDeployedArchive()); + } + + /** + * @param handle + * @return + * @throws RemoteException + * @throws InvalidRegistrationFault + * @throws OperationFailedFault + * @since 2.6.3 + */ + protected GetMarkup createMarkupRequest(String handle) throws RemoteExc= eption, InvalidRegistrationFault, OperationFailedFault + { + GetMarkup getMarkup =3D WSRPTypeFactory.createDefaultMarkupRequest(h= andle); getMarkup.getMarkupParams().setMarkupCharacterSets(new String[]{WSRP= Constants.DEFAULT_CHARACTER_SET}); = return getMarkup; Added: branches/JBoss_Portal_Branch_2_6/wsrp/src/resources/tests/test-appli= cationscope-portlet-war/WEB-INF/jboss-portlet.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/wsrp/src/resources/tests/test-applicat= ionscope-portlet-war/WEB-INF/jboss-portlet.xml (rev= 0) +++ branches/JBoss_Portal_Branch_2_6/wsrp/src/resources/tests/test-applicat= ionscope-portlet-war/WEB-INF/jboss-portlet.xml 2007-10-26 00:27:58 UTC (rev= 8776) @@ -0,0 +1,33 @@ + + + + + Application Scope Set Test Portlet + true + + + Application Scope Get Test Portlet = + true + + \ No newline at end of file Added: branches/JBoss_Portal_Branch_2_6/wsrp/src/resources/tests/test-appli= cationscope-portlet-war/WEB-INF/portlet.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/wsrp/src/resources/tests/test-applicat= ionscope-portlet-war/WEB-INF/portlet.xml (rev 0) +++ branches/JBoss_Portal_Branch_2_6/wsrp/src/resources/tests/test-applicat= ionscope-portlet-war/WEB-INF/portlet.xml 2007-10-26 00:27:58 UTC (rev 8776) @@ -0,0 +1,57 @@ + + + + + + Application Scope Set Test Portlet + Application Scope Set Test Portlet + org.jboss.portal.test.wsrp.portlet.ApplicationScopeSe= tPortlet + + + text/html + view + + + + title + = + + + + Application Scope Get Test Portlet + Application Scope Get Test Portlet + org.jboss.portal.test.wsrp.portlet.ApplicationScopeGe= tPortlet + + + text/html + view + + + + title + + + \ No newline at end of file Added: branches/JBoss_Portal_Branch_2_6/wsrp/src/resources/tests/test-appli= cationscope-portlet-war/WEB-INF/web.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/wsrp/src/resources/tests/test-applicat= ionscope-portlet-war/WEB-INF/web.xml (rev 0) +++ branches/JBoss_Portal_Branch_2_6/wsrp/src/resources/tests/test-applicat= ionscope-portlet-war/WEB-INF/web.xml 2007-10-26 00:27:58 UTC (rev 8776) @@ -0,0 +1,30 @@ + + + + + + \ No newline at end of file --===============1861042640098399513==-- From portal-commits at lists.jboss.org Fri Oct 26 06:43:23 2007 Content-Type: multipart/mixed; boundary="===============4572772764013612896==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8777 - in branches/JBoss_Portal_Branch_2_6/core: src/main/org/jboss/portal/core/deployment/jboss and 8 other directories. Date: Fri, 26 Oct 2007 06:43:23 -0400 Message-ID: --===============4572772764013612896== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: thomas.heute(a)jboss.com Date: 2007-10-26 06:43:23 -0400 (Fri, 26 Oct 2007) New Revision: 8777 Added: branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/test/cor= e/deployment/PortletInstancesMetaDataFactoryTestCase.java branches/JBoss_Portal_Branch_2_6/core/src/resources/test/deployment/port= let-instances.xml Modified: branches/JBoss_Portal_Branch_2_6/core/build.xml branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/core/dep= loyment/jboss/PortletAppDeployment.java branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/core/imp= l/model/instance/InstanceContainerContext.java branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/core/imp= l/model/instance/InstanceContainerImpl.java branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/core/imp= l/model/instance/persistent/PersistentInstanceContainerContext.java branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/core/imp= l/model/instance/persistent/PersistentInstanceCustomization.java branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/core/imp= l/model/instance/persistent/PersistentInstanceDefinition.java branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/core/mod= el/instance/Instance.java branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/core/mod= el/instance/InstanceContainer.java branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/core/mod= el/instance/metadata/InstanceMetaData.java branches/JBoss_Portal_Branch_2_6/core/src/resources/portal-core-sar/conf= /hibernate/instance/domain.hbm.xml branches/JBoss_Portal_Branch_2_6/core/src/resources/portal-core-war/WEB-= INF/jsp/content/portlet_editor.jsp Log: JBPORTAL-1597: i18n display name for portlet instances Modified: branches/JBoss_Portal_Branch_2_6/core/build.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/core/build.xml 2007-10-26 00:27:58 UTC= (rev 8776) +++ branches/JBoss_Portal_Branch_2_6/core/build.xml 2007-10-26 10:43:23 UTC= (rev 8777) @@ -631,16 +631,18 @@ + = + = - Modified: branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/c= ore/deployment/jboss/PortletAppDeployment.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/core/de= ployment/jboss/PortletAppDeployment.java 2007-10-26 00:27:58 UTC (rev 8776) +++ branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/core/de= ployment/jboss/PortletAppDeployment.java 2007-10-26 10:43:23 UTC (rev 8777) @@ -447,10 +447,10 @@ log.debug("Creating portlet instance " + metaData.getId()); = // Resolve the portlet ref - String resolvedRef =3D resolvePortletRef(metaData.getPortletRef()); - + metaData.setPortletRef(resolvePortletRef(metaData.getPortletRef())); + = // Create the instance - Instance instance =3D factory.getInstanceContainer().createDefinitio= n(metaData.getId(), resolvedRef); + Instance instance =3D factory.getInstanceContainer().createDefinitio= n(metaData); = // Configure configureInstance(instance, metaData); Modified: branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/c= ore/impl/model/instance/InstanceContainerContext.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/core/im= pl/model/instance/InstanceContainerContext.java 2007-10-26 00:27:58 UTC (re= v 8776) +++ branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/core/im= pl/model/instance/InstanceContainerContext.java 2007-10-26 10:43:23 UTC (re= v 8777) @@ -24,6 +24,7 @@ = import org.jboss.portal.core.model.instance.DuplicateInstanceException; import org.jboss.portal.core.model.instance.InstancePermission; +import org.jboss.portal.core.model.instance.metadata.InstanceMetaData; import org.jboss.portal.portlet.PortletContext; = import java.util.Collection; @@ -42,6 +43,8 @@ = AbstractInstanceDefinition newInstanceDefinition(String id, String port= letRef); = + AbstractInstanceDefinition newInstanceDefinition(InstanceMetaData insta= nceMetaData); + void createInstanceDefinition(AbstractInstanceDefinition instanceDef) t= hrows DuplicateInstanceException; = void destroyInstanceDefinition(AbstractInstanceDefinition instanceDef); Modified: branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/c= ore/impl/model/instance/InstanceContainerImpl.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/core/im= pl/model/instance/InstanceContainerImpl.java 2007-10-26 00:27:58 UTC (rev 8= 776) +++ branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/core/im= pl/model/instance/InstanceContainerImpl.java 2007-10-26 10:43:23 UTC (rev 8= 777) @@ -32,6 +32,7 @@ import org.jboss.portal.core.model.instance.InstancePermission; import org.jboss.portal.core.model.instance.NoSuchInstanceException; import org.jboss.portal.core.model.instance.Instance; +import org.jboss.portal.core.model.instance.metadata.InstanceMetaData; import org.jboss.portal.portlet.PortletContext; import org.jboss.portal.portlet.PortletInvokerException; import org.jboss.portal.portlet.PortletInvoker; @@ -247,6 +248,11 @@ return internalCreateDefinition(id, portletId, cloneOnCreate); } = + public InstanceDefinition createDefinition(InstanceMetaData instanceMD)= throws DuplicateInstanceException, IllegalArgumentException, PortletInvoke= rException + { + return internalCreateDefinition(instanceMD, cloneOnCreate); + } + public InstanceDefinition createDefinition(String id, String portletId,= boolean clone) throws DuplicateInstanceException, PortletInvokerException { return internalCreateDefinition(id, portletId, clone); @@ -254,26 +260,34 @@ = private InstanceDefinition internalCreateDefinition(String id, String p= ortletId, boolean clone) throws DuplicateInstanceException, PortletInvokerE= xception { - if (id =3D=3D null) + InstanceMetaData instanceMD =3D new InstanceMetaData(); + instanceMD.setId(id); + instanceMD.setPortletRef(portletId); + return internalCreateDefinition(instanceMD, clone); + } + = + private InstanceDefinition internalCreateDefinition(InstanceMetaData in= stanceMD, boolean clone) throws DuplicateInstanceException, PortletInvokerE= xception + { + if (instanceMD =3D=3D null) { - throw new IllegalArgumentException("id cannot be null"); + throw new IllegalArgumentException("instanceMD cannot be null"); } boolean debug =3D log.isDebugEnabled(); = // if (debug) { - log.debug("Creating instance " + id + " of portlet " + portletId); + log.debug("Creating instance " + instanceMD.getId() + " of portle= t " + instanceMD.getPortletRef()); } = // Create the portlet context we'll use - PortletContext portletContext =3D PortletContext.createPortletContex= t(portletId); + PortletContext portletContext =3D PortletContext.createPortletContex= t(instanceMD.getPortletRef()); = // Check that the portlet exist before creating an instance of it portletInvoker.getPortlet(portletContext); = // - AbstractInstanceDefinition instance =3D containerContext.newInstance= Definition(id, portletId); + AbstractInstanceDefinition instance =3D containerContext.newInstance= Definition(instanceMD); = // containerContext.createInstanceDefinition(instance); Modified: branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/c= ore/impl/model/instance/persistent/PersistentInstanceContainerContext.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/core/im= pl/model/instance/persistent/PersistentInstanceContainerContext.java 2007-1= 0-26 00:27:58 UTC (rev 8776) +++ branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/core/im= pl/model/instance/persistent/PersistentInstanceContainerContext.java 2007-1= 0-26 10:43:23 UTC (rev 8777) @@ -29,6 +29,7 @@ import org.jboss.portal.jems.hibernate.ObjectContextualizer; import org.jboss.portal.core.model.instance.DuplicateInstanceException; import org.jboss.portal.core.model.instance.InstancePermission; +import org.jboss.portal.core.model.instance.metadata.InstanceMetaData; import org.jboss.portal.core.impl.model.instance.AbstractInstance; import org.jboss.portal.core.impl.model.instance.AbstractInstanceDefinitio= n; import org.jboss.portal.core.impl.model.instance.AbstractInstanceCustomiza= tion; @@ -159,6 +160,11 @@ return new PersistentInstanceDefinition(this, id, portletRef); } = + public AbstractInstanceDefinition newInstanceDefinition(InstanceMetaDat= a instanceMetaData) + { + return new PersistentInstanceDefinition(this, instanceMetaData); + } + public AbstractInstanceDefinition getInstanceDefinition(String id) { // Get cached pk from natural id Modified: branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/c= ore/impl/model/instance/persistent/PersistentInstanceCustomization.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/core/im= pl/model/instance/persistent/PersistentInstanceCustomization.java 2007-10-2= 6 00:27:58 UTC (rev 8776) +++ branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/core/im= pl/model/instance/persistent/PersistentInstanceCustomization.java 2007-10-2= 6 10:43:23 UTC (rev 8777) @@ -22,6 +22,7 @@ *************************************************************************= *****/ package org.jboss.portal.core.impl.model.instance.persistent; = +import org.jboss.portal.common.i18n.LocalizedString; import org.jboss.portal.core.impl.model.instance.AbstractInstanceCustomiza= tion; import org.jboss.portal.core.impl.model.instance.AbstractInstanceDefinitio= n; import org.jboss.portal.core.impl.model.instance.InstanceContainerContext; @@ -93,6 +94,11 @@ return owner.getInstanceId(); } = + public LocalizedString getDisplayName() + { + return owner.getDisplayName(); + } + public String getCustomizationId() { return customizationId; Modified: branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/c= ore/impl/model/instance/persistent/PersistentInstanceDefinition.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/core/im= pl/model/instance/persistent/PersistentInstanceDefinition.java 2007-10-26 0= 0:27:58 UTC (rev 8776) +++ branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/core/im= pl/model/instance/persistent/PersistentInstanceDefinition.java 2007-10-26 1= 0:43:23 UTC (rev 8777) @@ -22,12 +22,17 @@ *************************************************************************= *****/ package org.jboss.portal.core.impl.model.instance.persistent; = +import org.jboss.portal.common.i18n.LocalizedString; import org.jboss.portal.core.impl.model.instance.InstanceContainerContext; import org.jboss.portal.core.impl.model.instance.AbstractInstanceDefinitio= n; +import org.jboss.portal.core.model.instance.metadata.InstanceMetaData; import org.jboss.portal.jems.hibernate.ContextObject; +import org.jboss.portal.portlet.impl.jsr168.metadata.LocalizedStringMetaDa= ta; +import org.jboss.portal.portlet.impl.jsr168.metadata.LocalizedValueMetaDat= a; import org.jboss.portal.security.RoleSecurityBinding; = import java.util.HashMap; +import java.util.Locale; import java.util.Map; import java.util.Collection; import java.util.Set; @@ -48,6 +53,7 @@ protected boolean mutable; protected Map relatedSecurityBindings; protected Map relatedCustomizations; + protected Map displayNames; = // Runtime fields = @@ -75,6 +81,39 @@ this.state =3D null; } = + public PersistentInstanceDefinition(InstanceContainerContext containerC= ontext, InstanceMetaData instanceMD) + { + this.containerContext =3D containerContext; + this.mutable =3D false; + this.portletRef =3D instanceMD.getPortletRef(); + this.instanceId =3D instanceMD.getId(); + setDisplayNames(setDisplayNames(instanceMD.getDisplayName())); + this.relatedSecurityBindings =3D new HashMap(); + this.relatedCustomizations =3D new HashMap(); + this.state =3D null; + } + + private Map setDisplayNames(LocalizedStringMetaData displayName) + { + Map map =3D new HashMap(); + for (int i =3D 0; i < displayName.getValues().size(); i++) + { + LocalizedValueMetaData descriptionMD =3D (LocalizedValueMetaData)= displayName.getValues().get(i); + Locale locale =3D descriptionMD.getLocale(); + if (locale =3D=3D null) + { + locale =3D Locale.ENGLISH; + } + map.put(locale, descriptionMD.getValue()); + } + return map; + } + = + public LocalizedString getDisplayName() + { + return new LocalizedString(displayNames, Locale.ENGLISH); + } + // Hibernate **********************************************************= ********************************************** = public Long getKey() @@ -112,6 +151,16 @@ return relatedCustomizations; } = + public void setDisplayNames(Map displayNames) + { + this.displayNames =3D displayNames; + } + + public Map getDisplayNames() + { + return displayNames; + } + public void setRelatedCustomizations(Map relatedCustomizations) { this.relatedCustomizations =3D relatedCustomizations; @@ -133,7 +182,7 @@ { return instanceId; } - + = // AbstractInstanceDefinition implementation **************************= ********************************************** = public Collection getCustomizations() Modified: branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/c= ore/model/instance/Instance.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/core/mo= del/instance/Instance.java 2007-10-26 00:27:58 UTC (rev 8776) +++ branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/core/mo= del/instance/Instance.java 2007-10-26 10:43:23 UTC (rev 8777) @@ -22,6 +22,7 @@ *************************************************************************= *****/ package org.jboss.portal.core.model.instance; = +import org.jboss.portal.common.i18n.LocalizedString; import org.jboss.portal.portlet.Portlet; import org.jboss.portal.portlet.PortletInvokerException; import org.jboss.portal.portlet.invocation.PortletInvocation; @@ -50,6 +51,13 @@ String getId(); = /** + * Return the display name + * = + * @return the display name + */ + LocalizedString getDisplayName(); + = + /** * Return the runtime metadata for this portlet. * * @return the info Modified: branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/c= ore/model/instance/InstanceContainer.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/core/mo= del/instance/InstanceContainer.java 2007-10-26 00:27:58 UTC (rev 8776) +++ branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/core/mo= del/instance/InstanceContainer.java 2007-10-26 10:43:23 UTC (rev 8777) @@ -22,12 +22,13 @@ *************************************************************************= *****/ package org.jboss.portal.core.model.instance; = +import java.util.Collection; + +import org.jboss.portal.core.model.instance.metadata.InstanceMetaData; import org.jboss.portal.portlet.PortletInvoker; import org.jboss.portal.portlet.PortletInvokerException; import org.jboss.portal.security.spi.provider.AuthorizationDomain; = -import java.util.Collection; - /** * A container for instances of component. * @@ -66,6 +67,16 @@ /** * Create a new instance of the specified portlet. * + * @param instanceMetaData the instance Metadata + * @return the newly created instance + * @throws DuplicateInstanceException if the instance already exist + * @throws IllegalArgumentException if the instance id is null + */ + InstanceDefinition createDefinition(InstanceMetaData instanceMetaData) = throws DuplicateInstanceException, IllegalArgumentException, PortletInvoker= Exception; + + /** + * Create a new instance of the specified portlet. + * * @param id * @param portletId the portlet id * @param clone force a clone of the portlet Modified: branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/c= ore/model/instance/metadata/InstanceMetaData.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/core/mo= del/instance/metadata/InstanceMetaData.java 2007-10-26 00:27:58 UTC (rev 87= 76) +++ branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/core/mo= del/instance/metadata/InstanceMetaData.java 2007-10-26 10:43:23 UTC (rev 87= 77) @@ -22,17 +22,22 @@ *************************************************************************= *****/ package org.jboss.portal.core.model.instance.metadata; = +import java.util.HashMap; +import java.util.Iterator; +import java.util.List; +import java.util.Locale; +import java.util.Map; + import org.apache.log4j.Logger; +import org.jboss.portal.common.i18n.LocaleFormat; +import org.jboss.portal.common.util.ConversionException; import org.jboss.portal.common.xml.XMLTools; +import org.jboss.portal.portlet.impl.jsr168.metadata.DisplayNameMetaData; +import org.jboss.portal.portlet.impl.jsr168.metadata.LocalizedStringMetaDa= ta; import org.jboss.portal.portlet.impl.jsr168.metadata.PreferenceMetaData; import org.jboss.portal.security.metadata.SecurityConstraintsMetaData; import org.w3c.dom.Element; = -import java.util.HashMap; -import java.util.Iterator; -import java.util.List; -import java.util.Map; - /** * Represent metadata of an instance. * @@ -57,6 +62,8 @@ /** The security constraints. */ private SecurityConstraintsMetaData securityConstraints; = + private LocalizedStringMetaData displayName; + public InstanceMetaData() { } @@ -91,6 +98,16 @@ this.portletRef =3D portletRef; } = + public LocalizedStringMetaData getDisplayName() + { + return displayName; + } + + public void setDisplayName(LocalizedStringMetaData displayName) + { + this.displayName =3D displayName; + } + public SecurityConstraintsMetaData getSecurityConstraints() { return securityConstraints; @@ -105,6 +122,7 @@ { String instanceName =3D XMLTools.asString(XMLTools.getUniqueChild(in= stanceElt, "instance-id", true)); String componentRef =3D XMLTools.asString(XMLTools.getUniqueChild(in= stanceElt, "portlet-ref", true)); + Iterator displayNamesIt =3D XMLTools.getChildrenIterator(instanceElt= , "display-name"); = // Configure preferences override PreferencesMetaData preferencesMD =3D new PreferencesMetaData(); @@ -117,12 +135,34 @@ preferencesMD.addPreference(preferenceMD); } } + = + // Configure localized display-name + LocalizedStringMetaData localizedStringMD =3D new LocalizedStringMet= aData(); + while (displayNamesIt.hasNext()) + { + Element element =3D (Element)displayNamesIt.next(); + DisplayNameMetaData displayNameMD =3D new DisplayNameMetaData(); + String lang =3D element.getAttribute("xml:lang"); + Locale locale; + try + { + locale =3D LocaleFormat.DEFAULT.getLocale(lang); + displayNameMD.setLocale(locale); + displayNameMD.setValue(element.getTextContent()); + localizedStringMD.getValues().add(displayNameMD); + } + catch (ConversionException e) + { + log.error("Cannot set localized display-name, for language: " = + lang, e); + } + } = // Create the meta data InstanceMetaData instanceMD =3D new InstanceMetaData(); instanceMD.setId(instanceName); instanceMD.setPortletRef(componentRef); instanceMD.setPreferences(preferencesMD); + instanceMD.setDisplayName(localizedStringMD); = // Add the security constraints Element securityConstraintElt =3D XMLTools.getUniqueChild(instanceEl= t, "security-constraint", false); Added: branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/test= /core/deployment/PortletInstancesMetaDataFactoryTestCase.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/test/co= re/deployment/PortletInstancesMetaDataFactoryTestCase.java = (rev 0) +++ branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/test/co= re/deployment/PortletInstancesMetaDataFactoryTestCase.java 2007-10-26 10:43= :23 UTC (rev 8777) @@ -0,0 +1,123 @@ +/*************************************************************************= ***** + * JBoss, a division of Red Hat = * + * Copyright 2006, Red Hat Middleware, LLC, and individual = * + * contributors as indicated by the @authors tag. See the = * + * copyright.txt in the distribution for a full listing of = * + * individual contributors. = * + * = * + * This is free software; you can redistribute it and/or modify it = * + * under the terms of the GNU Lesser General Public License as = * + * published by the Free Software Foundation; either version 2.1 of = * + * the License, or (at your option) any later version. = * + * = * + * This software is distributed in the hope that it will be useful, = * + * but WITHOUT ANY WARRANTY; without even the implied warranty of = * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU = * + * Lesser General Public License for more details. = * + * = * + * You should have received a copy of the GNU Lesser General Public = * + * License along with this software; if not, write to the Free = * + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA = * + * 02110-1301 USA, or see the FSF site: http://www.fsf.org. = * + *************************************************************************= *****/ + +package org.jboss.portal.test.core.deployment; + +import java.io.InputStream; +import java.net.URL; +import java.util.ArrayList; +import java.util.Iterator; +import java.util.List; +import java.util.Locale; + +import javax.xml.parsers.DocumentBuilder; + +import junit.framework.TestCase; + +import org.jboss.portal.common.i18n.LocalizedString; +import org.jboss.portal.common.io.IOTools; +import org.jboss.portal.common.net.URLTools; +import org.jboss.portal.common.xml.NullEntityResolver; +import org.jboss.portal.common.xml.XMLTools; +import org.jboss.portal.core.deployment.jboss.PortletAppDeploymentFactory; +import org.jboss.portal.core.model.instance.metadata.InstanceMetaData; +import org.jboss.portal.portlet.impl.jsr168.info.Utils; +import org.w3c.dom.Document; +import org.w3c.dom.Element; +import org.xml.sax.EntityResolver; + +public class PortletInstancesMetaDataFactoryTestCase extends TestCase +{ + + + = + public void testLocalizedDisplayNameMetadata() throws Exception + { + // Get instances from portlet-instances.xml + InputStream in =3D null; + List instancesMetadata =3D new ArrayList(); + try + { + + URL jbossPortletXML =3D Thread.currentThread().getContextClassLoa= der().getResource("test/deployment/jboss-portlet.xml"); + assertTrue(URLTools.exists(jbossPortletXML)); + + in =3D Thread.currentThread().getContextClassLoader().getResource= AsStream("test/deployment/portlet-instances.xml"); +// in =3D IOTools.safeBufferedWrapper(in); + = + + + = + assertNotNull(in); + = + PortletAppDeploymentFactory factory =3D new PortletAppDeploymentF= actory(); + = + if (in !=3D null) + { + DocumentBuilder builder =3D XMLTools.getDocumentBuilderFactory= ().newDocumentBuilder(); + EntityResolver entityResolver =3D factory.getPortletInstancesE= ntityResolver(); + if (entityResolver =3D=3D null) + { + entityResolver =3D new NullEntityResolver(); + } + + builder.setEntityResolver(entityResolver); + Document doc =3D builder.parse(in); + + // + for (Iterator i =3D XMLTools.getChildrenIterator(doc.getDocume= ntElement(), "deployment"); i.hasNext();) + { + Element deploymentElt =3D (Element)i.next(); + + // + Element instanceElt =3D XMLTools.getUniqueChild(deploymentE= lt, "instance", true); + + // + InstanceMetaData metaData =3D InstanceMetaData.buildMetaDat= a(instanceElt); + instancesMetadata.add(metaData); + } + } + } + finally + { + IOTools.safeClose(in); + } + + assertEquals(4, instancesMetadata.size()); + = + InstanceMetaData instanceMD =3D (InstanceMetaData) instancesMetadata= .get(0); + assertEquals("UserPortletInstance", instanceMD.getId()); + LocalizedString lString =3D Utils.getLocalizedDescription(instanceMD= .getDisplayName()); + assertEquals("Mon instance de User portlet", lString.getString(Local= e.FRENCH, false)); + assertEquals("My User portlet instance", lString.getString(Locale.EN= GLISH, false)); + assertEquals("My User portlet instance", lString.getDefaultString()); + instanceMD =3D (InstanceMetaData) instancesMetadata.get(1); + assertEquals("RolePortletInstance", instanceMD.getId()); + instanceMD =3D (InstanceMetaData) instancesMetadata.get(2); + assertEquals("CatalogPortletInstance", instanceMD.getId()); + instanceMD =3D (InstanceMetaData) instancesMetadata.get(3); + assertEquals("PortletContentEditorInstance", instanceMD.getId()); + = + } + +} Modified: branches/JBoss_Portal_Branch_2_6/core/src/resources/portal-core-s= ar/conf/hibernate/instance/domain.hbm.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/core/src/resources/portal-core-sar/con= f/hibernate/instance/domain.hbm.xml 2007-10-26 00:27:58 UTC (rev 8776) +++ branches/JBoss_Portal_Branch_2_6/core/src/resources/portal-core-sar/con= f/hibernate/instance/domain.hbm.xml 2007-10-26 10:43:23 UTC (rev 8777) @@ -73,6 +73,13 @@ + + + + + + = Portlet instance associated to this window: = @@ -21,13 +22,15 @@ { Instance instance =3D (Instance)i.next(); String rowClass =3D instance =3D=3D selectedInstance ? "portle= t-section-selected" : (i.getIndex() % 2 =3D=3D 0 ? "portlet-section-body" := "portlet-section-alternate"); + String displayName =3D instance.getDisplayName().getString(ren= derRequest.getLocale(), true); + if (displayName =3D=3D null) { displayName =3D instance.getId(= ); } = %> "/> "> - "><%=3D instance.getId() %> + "><%=3D displayName %> <% @@ -39,9 +42,11 @@ <% if (selectedInstance !=3D null) { + String displayName =3D selectedInstance.getDisplayName().getString(r= enderRequest.getLocale(), true); + if (displayName =3D=3D null) { displayName =3D selectedInstance.getI= d(); } = %>

-
Portlet instance:<= %=3D selectedInstance.getId() %> +
Portlet instance:<= %=3D displayName %>
<% = Added: branches/JBoss_Portal_Branch_2_6/core/src/resources/test/deployment/= portlet-instances.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/core/src/resources/test/deployment/por= tlet-instances.xml (rev 0) +++ branches/JBoss_Portal_Branch_2_6/core/src/resources/test/deployment/por= tlet-instances.xml 2007-10-26 10:43:23 UTC (rev 8777) @@ -0,0 +1,62 @@ + + + + + + + Mon instance de User portlet + My User portlet instance + UserPortletInstance + UserPortlet + + + + + RolePortletInstance + RolePortlet + + + + + CatalogPortletInstance + CatalogPortlet + + + + + PortletContentEditorInstance + PortletContentEditorPortlet + + + Admin + view + + + User + view + + + + + \ No newline at end of file --===============4572772764013612896==-- From portal-commits at lists.jboss.org Fri Oct 26 08:51:05 2007 Content-Type: multipart/mixed; boundary="===============5122607486564762559==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8778 - branches/JBoss_Portal_Branch_2_6/wsrp. Date: Fri, 26 Oct 2007 08:51:05 -0400 Message-ID: --===============5122607486564762559== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: mageshbk(a)jboss.com Date: 2007-10-26 08:51:04 -0400 (Fri, 26 Oct 2007) New Revision: 8778 Modified: branches/JBoss_Portal_Branch_2_6/wsrp/build.xml Log: Fixed failed build in windows due to this line = and Modified: branches/JBoss_Portal_Branch_2_6/wsrp/build.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/wsrp/build.xml 2007-10-26 10:43:23 UTC= (rev 8777) +++ branches/JBoss_Portal_Branch_2_6/wsrp/build.xml 2007-10-26 12:51:04 UTC= (rev 8778) @@ -652,8 +652,8 @@ - - + + = --===============5122607486564762559==-- From portal-commits at lists.jboss.org Fri Oct 26 11:17:30 2007 Content-Type: multipart/mixed; boundary="===============3320251565055232714==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8779 - branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/core/impl/model/instance/persistent. Date: Fri, 26 Oct 2007 11:17:29 -0400 Message-ID: --===============3320251565055232714== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: thomas.heute(a)jboss.com Date: 2007-10-26 11:17:29 -0400 (Fri, 26 Oct 2007) New Revision: 8779 Modified: branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/core/imp= l/model/instance/persistent/PersistentInstanceDefinition.java Log: Oups Modified: branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/c= ore/impl/model/instance/persistent/PersistentInstanceDefinition.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/core/im= pl/model/instance/persistent/PersistentInstanceDefinition.java 2007-10-26 1= 2:51:04 UTC (rev 8778) +++ branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/core/im= pl/model/instance/persistent/PersistentInstanceDefinition.java 2007-10-26 1= 5:17:29 UTC (rev 8779) @@ -87,7 +87,7 @@ this.mutable =3D false; this.portletRef =3D instanceMD.getPortletRef(); this.instanceId =3D instanceMD.getId(); - setDisplayNames(setDisplayNames(instanceMD.getDisplayName())); + this.displayNames =3D setDisplayNames(instanceMD.getDisplayName()); this.relatedSecurityBindings =3D new HashMap(); this.relatedCustomizations =3D new HashMap(); this.state =3D null; @@ -96,6 +96,10 @@ private Map setDisplayNames(LocalizedStringMetaData displayName) { Map map =3D new HashMap(); + if (displayName =3D=3D null) + { + return map; + } for (int i =3D 0; i < displayName.getValues().size(); i++) { LocalizedValueMetaData descriptionMD =3D (LocalizedValueMetaData)= displayName.getValues().get(i); --===============3320251565055232714==-- From portal-commits at lists.jboss.org Fri Oct 26 11:46:58 2007 Content-Type: multipart/mixed; boundary="===============0533584585873297745==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8780 - branches/JBoss_Portal_Branch_2_6/cms. Date: Fri, 26 Oct 2007 11:46:58 -0400 Message-ID: --===============0533584585873297745== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: thomas.heute(a)jboss.com Date: 2007-10-26 11:46:58 -0400 (Fri, 26 Oct 2007) New Revision: 8780 Modified: branches/JBoss_Portal_Branch_2_6/cms/build.xml Log: prefer IPv4 when running test with jdk1.5 on linux. This supposedly is a ja= va bug as per jgroups page. (Backport Prabhat's fix) Modified: branches/JBoss_Portal_Branch_2_6/cms/build.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/cms/build.xml 2007-10-26 15:17:29 UTC = (rev 8779) +++ branches/JBoss_Portal_Branch_2_6/cms/build.xml 2007-10-26 15:46:58 UTC = (rev 8780) @@ -409,6 +409,11 @@ --> + + --===============0533584585873297745==-- From portal-commits at lists.jboss.org Fri Oct 26 19:07:40 2007 Content-Type: multipart/mixed; boundary="===============6629278599197262225==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8781 - branches/JBoss_Portal_Branch_2_6/wsrp. Date: Fri, 26 Oct 2007 19:07:40 -0400 Message-ID: --===============6629278599197262225== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: chris.laprun(a)jboss.com Date: 2007-10-26 19:07:40 -0400 (Fri, 26 Oct 2007) New Revision: 8781 Modified: branches/JBoss_Portal_Branch_2_6/wsrp/build.xml Log: Property changes on: branches/JBoss_Portal_Branch_2_6/wsrp/build.xml ___________________________________________________________________ Name: svn:keywords - Author Date Id Revision + LastChangedDate LastChangedBy LastChangedRevision Id --===============6629278599197262225==-- From portal-commits at lists.jboss.org Fri Oct 26 19:10:02 2007 Content-Type: multipart/mixed; boundary="===============6165771489433094997==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8782 - branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/wsrp. Date: Fri, 26 Oct 2007 19:10:01 -0400 Message-ID: --===============6165771489433094997== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: chris.laprun(a)jboss.com Date: 2007-10-26 19:10:01 -0400 (Fri, 26 Oct 2007) New Revision: 8782 Modified: branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/wsrp/WSR= PConsumer.java Log: Trying svn keywords... Property changes on: branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jbo= ss/portal/wsrp/WSRPConsumer.java ___________________________________________________________________ Name: svn:keywords - Author Date Id Revision + LastChangedDate LastChangedBy LastChangedRevision Id --===============6165771489433094997==-- From portal-commits at lists.jboss.org Sat Oct 27 12:15:33 2007 Content-Type: multipart/mixed; boundary="===============7315966130368545813==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8783 - in branches/JBoss_Portal_Branch_2_6/core-admin/src: bin/portal-admin-war/img and 3 other directories. Date: Sat, 27 Oct 2007 12:15:33 -0400 Message-ID: --===============7315966130368545813== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: wesleyhales Date: 2007-10-27 12:15:32 -0400 (Sat, 27 Oct 2007) New Revision: 8783 Added: branches/JBoss_Portal_Branch_2_6/core-admin/src/bin/portal-admin-war/img= /max-icon.gif branches/JBoss_Portal_Branch_2_6/core-admin/src/bin/portal-admin-war/img= /min-icon.gif branches/JBoss_Portal_Branch_2_6/core-admin/src/bin/portal-admin-war/img= /norm-icon.gif Modified: branches/JBoss_Portal_Branch_2_6/core-admin/src/bin/portal-admin-war/sty= le.css branches/JBoss_Portal_Branch_2_6/core-admin/src/main/org/jboss/portal/co= re/admin/ui/AdminPropertyResolver.java branches/JBoss_Portal_Branch_2_6/core-admin/src/main/org/jboss/portal/co= re/admin/ui/PortalObjectManagerBean.java branches/JBoss_Portal_Branch_2_6/core-admin/src/main/org/jboss/portal/co= re/admin/ui/PropertiesInfo.java branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-admin-w= ar/WEB-INF/jsf/common/editProperties.xhtml branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-admin-w= ar/WEB-INF/jsf/editProperties.xhtml branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-admin-w= ar/WEB-INF/jsf/objectNavigation.xhtml branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-admin-w= ar/WEB-INF/jsf/objectTemplate.xhtml Log: JBPORTAL-1765 - Adapt the admin portlet to let the user set a default windo= w state Added: branches/JBoss_Portal_Branch_2_6/core-admin/src/bin/portal-admin-war= /img/max-icon.gif =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D (Binary files differ) Property changes on: branches/JBoss_Portal_Branch_2_6/core-admin/src/bin/po= rtal-admin-war/img/max-icon.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: branches/JBoss_Portal_Branch_2_6/core-admin/src/bin/portal-admin-war= /img/min-icon.gif =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D (Binary files differ) Property changes on: branches/JBoss_Portal_Branch_2_6/core-admin/src/bin/po= rtal-admin-war/img/min-icon.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: branches/JBoss_Portal_Branch_2_6/core-admin/src/bin/portal-admin-war= /img/norm-icon.gif =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D (Binary files differ) Property changes on: branches/JBoss_Portal_Branch_2_6/core-admin/src/bin/po= rtal-admin-war/img/norm-icon.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Modified: branches/JBoss_Portal_Branch_2_6/core-admin/src/bin/portal-admin-= war/style.css =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/core-admin/src/bin/portal-admin-war/st= yle.css 2007-10-26 23:10:01 UTC (rev 8782) +++ branches/JBoss_Portal_Branch_2_6/core-admin/src/bin/portal-admin-war/st= yle.css 2007-10-27 16:15:32 UTC (rev 8783) @@ -502,3 +502,7 @@ display: inline-block; vertical-align: middle; } + +.admin-ui .objectList img.windowStateIcon{ + margin: 0 5px 0 0; +} Modified: branches/JBoss_Portal_Branch_2_6/core-admin/src/main/org/jboss/po= rtal/core/admin/ui/AdminPropertyResolver.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/core-admin/src/main/org/jboss/portal/c= ore/admin/ui/AdminPropertyResolver.java 2007-10-26 23:10:01 UTC (rev 8782) +++ branches/JBoss_Portal_Branch_2_6/core-admin/src/main/org/jboss/portal/c= ore/admin/ui/AdminPropertyResolver.java 2007-10-27 16:15:32 UTC (rev 8783) @@ -258,6 +258,23 @@ return getChildren(object, PortalObject.WINDOW_MASK); } }); + setProperty("maximizedStateExists", new AbstractPropertyDecora= tor(Boolean.class) + { + public Object getValue(Object bean) + { + PortalObject object =3D (PortalObject)bean; + ArrayList children =3D new ArrayList(getChildren(object,= PortalObject.WINDOW_MASK)); + for (IteratorStatus i =3D new IteratorStatus(children.it= erator()); i.hasNext();) + { + PortalObject portalObject =3D (PortalObject)i.next(); + if (portalObject.getDeclaredProperties().containsValu= e("MAXIMIZED")) + { + return Boolean.TRUE; + } + } + return Boolean.FALSE; + } + }); } }; portalObjectDecorator.setProperty("id", new AbstractPropertyDecorato= r(String.class) Modified: branches/JBoss_Portal_Branch_2_6/core-admin/src/main/org/jboss/po= rtal/core/admin/ui/PortalObjectManagerBean.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/core-admin/src/main/org/jboss/portal/c= ore/admin/ui/PortalObjectManagerBean.java 2007-10-26 23:10:01 UTC (rev 8782) +++ branches/JBoss_Portal_Branch_2_6/core-admin/src/main/org/jboss/portal/c= ore/admin/ui/PortalObjectManagerBean.java 2007-10-27 16:15:32 UTC (rev 8783) @@ -161,6 +161,9 @@ /** . */ public PageManagerBean pageManager; = + /** . */ + private Boolean maximizedStateExists; + // Wired services = public String getNamespace() @@ -378,6 +381,14 @@ return theme; } = + public Boolean getMaximizedStateExists() { + return maximizedStateExists; + } + + public void setMaximizedStateExists(Boolean maximizedStateExists) { + this.maximizedStateExists =3D maximizedStateExists; + } + // UI operations = public void selectObject(PortalObject po) @@ -458,6 +469,9 @@ { PortalObjectId poid =3D getSelectedPortalObjectId(); = + Map pmap =3D getRequestParameterMap(); + maximizedStateExists =3D Boolean.valueOf((String)pmap.get("maximi= zedStateExists")); + PortalObject object =3D portalObjectContainer.getObject(poid); = // Update state if possible @@ -499,7 +513,7 @@ private PortalObjectId getSelectedPortalObjectId() { // Get id - Map pmap =3D FacesContext.getCurrentInstance().getExternalContext().= getRequestParameterMap(); + Map pmap =3D getRequestParameterMap(); String id =3D (String)pmap.get("id"); = // Set the state from the id @@ -509,10 +523,14 @@ public void selectPlugin() { // Get plugin - Map pmap =3D FacesContext.getCurrentInstance().getExternalContext().= getRequestParameterMap(); + Map pmap =3D getRequestParameterMap(); selectedPlugin =3D (String)pmap.get("plugin"); } = + public Map getRequestParameterMap(){ + return FacesContext.getCurrentInstance().getExternalContext().getReq= uestParameterMap(); + } + public void selectParentObject(ActionEvent actionEvent) { PortalObject parent =3D getSelectedObjectParent(); Modified: branches/JBoss_Portal_Branch_2_6/core-admin/src/main/org/jboss/po= rtal/core/admin/ui/PropertiesInfo.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/core-admin/src/main/org/jboss/portal/c= ore/admin/ui/PropertiesInfo.java 2007-10-26 23:10:01 UTC (rev 8782) +++ branches/JBoss_Portal_Branch_2_6/core-admin/src/main/org/jboss/portal/c= ore/admin/ui/PropertiesInfo.java 2007-10-27 16:15:32 UTC (rev 8783) @@ -60,6 +60,7 @@ public static final PropertyInfo WINDOW_CONTENT_TYPE =3D new PropertyIn= fo(WindowImpl.PORTAL_PROP_WINDOW_CONTENT_TYPE, new LocalizedString("Content= type"), new LocalizedString("The type of content of a window"), "java.lang= .String", PropertyInfo.READ_WRITE_ACCESS_MODE, PropertyInfo.PRIVATE_SCOPE); public static final PropertyInfo DEFAULT_CHILD_NAME =3D new PropertyInf= o(WindowImpl.PORTAL_PROP_DEFAULT_OBJECT_NAME, new LocalizedString("Default = child name"), new LocalizedString("The child name used when no specific chi= ld name is explicited"), "java.lang.String", PropertyInfo.READ_WRITE_ACCESS= _MODE, PropertyInfo.PUBLIC_SCOPE); public static final PropertyInfo PAGE_ORDER =3D new PropertyInfo("order= ", new LocalizedString("Tab order"), new LocalizedString("The order value t= o display pages in tabs"), "java.lang.String", PropertyInfo.READ_WRITE_ACCE= SS_MODE, PropertyInfo.PUBLIC_SCOPE); + public static final PropertyInfo INITIAL_WINDOW_STATE =3D new PropertyI= nfo(WindowImpl.PORTAL_INITIAL_WINDOW_STATE, new LocalizedString("Initial Mo= de"), new LocalizedString("The inital mode of the window"), "java.lang.Stri= ng", PropertyInfo.READ_WRITE_ACCESS_MODE, PropertyInfo.PUBLIC_SCOPE); = // = @@ -169,6 +170,7 @@ WINDOW_PROPERTIES.add(THEME_RENDER_REGION_ID); WINDOW_PROPERTIES.add(THEME_RENDER_REGION_ORDER); WINDOW_PROPERTIES.add(WINDOW_CONTENT_TYPE); + WINDOW_PROPERTIES.add(INITIAL_WINDOW_STATE); = // CONTROL_PAGE_PROPERTIES.add(CONTROL_POLICY_PAGE_ACCESS_DENIED); Modified: branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-= admin-war/WEB-INF/jsf/common/editProperties.xhtml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-admin-= war/WEB-INF/jsf/common/editProperties.xhtml 2007-10-26 23:10:01 UTC (rev 87= 82) +++ branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-admin-= war/WEB-INF/jsf/common/editProperties.xhtml 2007-10-27 16:15:32 UTC (rev 87= 83) @@ -14,7 +14,7 @@
- + = @@ -22,9 +22,8 @@ +
- + = - @@ -101,9 +100,27 @@ + + rendered=3D"#{prop.type eq 'java.lang= .String' and prop.name ne 'portal.windowInitialState'}"/> + + + + + + + + + + + + + Delete Modified: branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-= admin-war/WEB-INF/jsf/editProperties.xhtml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-admin-= war/WEB-INF/jsf/editProperties.xhtml 2007-10-26 23:10:01 UTC (rev 8782) +++ branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-admin-= war/WEB-INF/jsf/editProperties.xhtml 2007-10-27 16:15:32 UTC (rev 8783) @@ -25,9 +25,11 @@ = +
+
=

Manage windows within #{portalobjectmgr.selectedObject.name} #{portalobjectmgr.selectedObject.typeName}

+ + + + + + = #{objec= t.name} - + = -
- + + + @@ -141,12 +158,13 @@ | + Properties - | | Rename - | | Delete Modified: branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-= admin-war/WEB-INF/jsf/objectTemplate.xhtml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-admin-= war/WEB-INF/jsf/objectTemplate.xhtml 2007-10-26 23:10:01 UTC (rev 8782) +++ branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-admin-= war/WEB-INF/jsf/objectTemplate.xhtml 2007-10-27 16:15:32 UTC (rev 8783) @@ -50,7 +50,7 @@ fatalClass=3D"portlet-msg-error" warnClass=3D"portlet-msg-al= ert"/> = - Content + Content --===============7315966130368545813==-- From portal-commits at lists.jboss.org Sat Oct 27 21:09:26 2007 Content-Type: multipart/mixed; boundary="===============3124256365074867052==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8785 - in branches/JBoss_Portal_Branch_2_6: api/src/main/org/jboss/portal/api and 72 other directories. Date: Sat, 27 Oct 2007 21:09:22 -0400 Message-ID: --===============3124256365074867052== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: chris.laprun(a)jboss.com Date: 2007-10-27 21:09:21 -0400 (Sat, 27 Oct 2007) New Revision: 8785 Modified: branches/JBoss_Portal_Branch_2_6/api/build.bat branches/JBoss_Portal_Branch_2_6/api/build.sh branches/JBoss_Portal_Branch_2_6/api/build.xml branches/JBoss_Portal_Branch_2_6/api/src/main/org/jboss/portal/api/Porta= lRuntimeContext.java branches/JBoss_Portal_Branch_2_6/api/src/main/org/jboss/portal/api/Porta= lURL.java branches/JBoss_Portal_Branch_2_6/api/src/main/org/jboss/portal/api/event= /PortalEvent.java branches/JBoss_Portal_Branch_2_6/api/src/main/org/jboss/portal/api/event= /PortalEventContext.java branches/JBoss_Portal_Branch_2_6/api/src/main/org/jboss/portal/api/event= /PortalEventListener.java branches/JBoss_Portal_Branch_2_6/api/src/main/org/jboss/portal/api/navst= ate/NavigationalStateContext.java branches/JBoss_Portal_Branch_2_6/api/src/main/org/jboss/portal/api/node/= PortalNode.java branches/JBoss_Portal_Branch_2_6/api/src/main/org/jboss/portal/api/node/= PortalNodeURL.java branches/JBoss_Portal_Branch_2_6/api/src/main/org/jboss/portal/api/node/= event/PageEvent.java branches/JBoss_Portal_Branch_2_6/api/src/main/org/jboss/portal/api/node/= event/PageRenderEvent.java branches/JBoss_Portal_Branch_2_6/api/src/main/org/jboss/portal/api/node/= event/PortalNodeEvent.java branches/JBoss_Portal_Branch_2_6/api/src/main/org/jboss/portal/api/node/= event/PortalNodeEventContext.java branches/JBoss_Portal_Branch_2_6/api/src/main/org/jboss/portal/api/node/= event/PortalNodeEventListener.java branches/JBoss_Portal_Branch_2_6/api/src/main/org/jboss/portal/api/node/= event/WindowActionEvent.java branches/JBoss_Portal_Branch_2_6/api/src/main/org/jboss/portal/api/node/= event/WindowEvent.java branches/JBoss_Portal_Branch_2_6/api/src/main/org/jboss/portal/api/node/= event/WindowNavigationEvent.java branches/JBoss_Portal_Branch_2_6/api/src/main/org/jboss/portal/api/node/= event/WindowRenderEvent.java branches/JBoss_Portal_Branch_2_6/api/src/main/org/jboss/portal/api/sessi= on/PortalSession.java branches/JBoss_Portal_Branch_2_6/api/src/main/org/jboss/portal/api/sessi= on/event/PortalSessionEvent.java branches/JBoss_Portal_Branch_2_6/api/src/main/org/jboss/portal/api/user/= event/UserAuthenticationEvent.java branches/JBoss_Portal_Branch_2_6/api/src/main/org/jboss/portal/api/user/= event/UserEvent.java branches/JBoss_Portal_Branch_2_6/cms/build.bat branches/JBoss_Portal_Branch_2_6/cms/build.sh branches/JBoss_Portal_Branch_2_6/cms/build.xml branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cms/CMS.j= ava branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cms/CMSEx= ception.java branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cms/CMSIn= terceptor.java branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cms/CMSMi= meMappings.java branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cms/Comma= nd.java branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cms/Comma= ndFactory.java branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cms/hiber= nate/CMSEntry.java branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cms/hiber= nate/HibernateStore.java branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cms/hiber= nate/HibernateStoreConstants.java branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cms/hiber= nate/RepositoryEntry.java branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cms/hiber= nate/VersionEntry.java branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cms/hiber= nate/state/Base.java branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cms/hiber= nate/state/HibernatePersistenceManager.java branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cms/hiber= nate/state/JBossCachePersistenceManager.java branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cms/hiber= nate/state/PortalCMSCacheLoader.java branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cms/hiber= nate/state/Tools.java branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cms/hiber= nate/state/VersionBinVal.java branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cms/hiber= nate/state/VersionNode.java branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cms/hiber= nate/state/VersionProp.java branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cms/hiber= nate/state/VersionRefs.java branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cms/hiber= nate/state/WSPBinVal.java branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cms/hiber= nate/state/WSPNode.java branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cms/hiber= nate/state/WSPProp.java branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cms/hiber= nate/state/WSPRefs.java branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cms/impl/= CMSCacheException.java branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cms/impl/= CMSObjectImpl.java branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cms/impl/= CMSTreeCacheService.java branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cms/impl/= ContentImpl.java branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cms/impl/= FileImpl.java branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cms/impl/= FolderImpl.java branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cms/impl/= cache/CMSTreeCacheServiceImpl.java branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cms/impl/= interceptors/ACLInterceptor.java branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cms/impl/= interceptors/ApprovalWorkflowInterceptor.java branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cms/impl/= interceptors/CacheInterceptor.java branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cms/impl/= interceptors/LogInterceptor.java branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cms/impl/= jcr/JCRCMS.java branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cms/impl/= jcr/JCRCommand.java branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cms/impl/= jcr/JCRCommandContext.java branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cms/impl/= jcr/JCRCommandFactory.java branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cms/impl/= jcr/JCRCompositeCommand.java branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cms/impl/= jcr/JCRService.java branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cms/impl/= jcr/command/ACLEnforcer.java branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cms/impl/= jcr/command/ContentCreateCommand.java branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cms/impl/= jcr/command/ContentCreateNewVersionCommand.java branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cms/impl/= jcr/command/ContentGetCommand.java branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cms/impl/= jcr/command/ContentGetVersionsCommand.java branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cms/impl/= jcr/command/CopyCommand.java branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cms/impl/= jcr/command/DeleteCommand.java branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cms/impl/= jcr/command/FileCreateCommand.java branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cms/impl/= jcr/command/FileGetCommand.java branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cms/impl/= jcr/command/FileGetListCommand.java branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cms/impl/= jcr/command/FileUpdateAndVersionCommand.java branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cms/impl/= jcr/command/FileUpdateCommand.java branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cms/impl/= jcr/command/FolderCreateCommand.java branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cms/impl/= jcr/command/FolderGetCommand.java branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cms/impl/= jcr/command/FolderGetListCommand.java branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cms/impl/= jcr/command/FolderUpdateCommand.java branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cms/impl/= jcr/command/GetArchiveCommand.java branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cms/impl/= jcr/command/ItemExistsCommand.java branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cms/impl/= jcr/command/MakeLiveVersionCommand.java branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cms/impl/= jcr/command/MoveCommand.java branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cms/impl/= jcr/command/RenameCommand.java branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cms/impl/= jcr/command/SearchCommand.java branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cms/impl/= jcr/command/StoreArchiveCommand.java branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cms/impl/= jcr/composite/NewFileCommand.java branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cms/impl/= jcr/composite/UpdateFileCommand.java branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cms/impl/= jcr/ha/HAJCRCMS.java branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cms/impl/= jcr/jackrabbit/ClusteredCacheListener.java branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cms/impl/= jcr/jackrabbit/JackrabbitJCRService.java branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cms/impl/= jcr/util/NodeTypeUtil.java branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cms/impl/= jcr/util/VersionUtil.java branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cms/manag= ement/CMS.java branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cms/manag= ement/CMSImpl.java branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cms/model= /CMSObject.java branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cms/model= /CMSUser.java branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cms/model= /Content.java branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cms/model= /File.java branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cms/model= /Folder.java branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cms/searc= h/CMSFederatedSearch.java branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cms/searc= h/CMSResult.java branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cms/searc= h/CMSResultURL.java branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cms/secur= ity/AuthorizationManager.java branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cms/secur= ity/AuthorizationManagerImpl.java branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cms/secur= ity/AuthorizationProvider.java branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cms/secur= ity/AuthorizationProviderImpl.java branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cms/secur= ity/CMSPermission.java branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cms/secur= ity/Criteria.java branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cms/secur= ity/PermRoleAssoc.java branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cms/secur= ity/PermUserAssoc.java branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cms/secur= ity/Permission.java branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cms/secur= ity/PortalCMSSecurityContext.java branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cms/util/= FileUtil.java branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cms/util/= HibernateUtil.java branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cms/util/= NodeUtil.java branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cms/util/= RepositoryUtil.java branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cms/workf= low/ApprovePublish.java branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cms/workf= low/ApprovePublishImpl.java branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cms/workf= low/ApprovePublishServlet.java branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cms/workf= low/Content.java branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cms/workf= low/FinalizePublish.java branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cms/workf= low/PublishAssignmentHandler.java branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cms/workf= low/TaskExceptionHandler.java branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/test/cms/= AbstractCMSTestCase.java branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/test/cms/= JackrabbitTestCase.java branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/test/cms/= TestRegEx.java branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/test/cms/= TestRepositoryBootStrap.java branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/test/cms/= TestRepositoryUtil.java branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/test/cms/= clustering/FileDeleteTest.java branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/test/cms/= clustering/FileUpdateTest.java branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/test/cms/= commands/AbstractCommandTestCase.java branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/test/cms/= commands/CMSInterceptorStackFactory.java branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/test/cms/= commands/TestFileArchiveUpload.java branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/test/cms/= commands/TestFileCopy.java branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/test/cms/= commands/TestFileCreate.java branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/test/cms/= commands/TestFileCreateFailed.java branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/test/cms/= commands/TestFileDelete.java branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/test/cms/= commands/TestFileGet.java branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/test/cms/= commands/TestFileGetList.java branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/test/cms/= commands/TestFileGetVersion.java branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/test/cms/= commands/TestFileUpdate.java branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/test/cms/= commands/TestFolderCopy.java branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/test/cms/= commands/TestFolderCreate.java branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/test/cms/= commands/TestFolderDelete.java branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/test/cms/= commands/TestFolderGet.java branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/test/cms/= commands/TestFolderUpdate.java branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/test/cms/= commands/TestSearch.java branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/test/cms/= mock/RuntimeExceptionCommand.java branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/test/cms/= security/IdentityDataLoader.java branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/test/cms/= security/SecureCommandTestCase.java branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/test/cms/= security/TestManageAccess.java branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/test/cms/= security/TestReadAccess.java branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/test/cms/= security/TestWriteAccess.java branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/test/cms/= workflow/AbstractWorkflowTestCase.java branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/test/cms/= workflow/TestApprovedPublish.java branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/test/cms/= workflow/TestDeniedPublish.java branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/test/cms/= workflow/TestWorkflowEnvironment.java branches/JBoss_Portal_Branch_2_6/cms/src/resources/hibernate/domain.hbm.= xml branches/JBoss_Portal_Branch_2_6/cms/src/resources/portal-cms-jar/org/jb= oss/portal/cms/jboss-beans-security.xml branches/JBoss_Portal_Branch_2_6/cms/src/resources/portal-cms-jar/org/jb= oss/portal/cms/jboss-beans-workflow.xml branches/JBoss_Portal_Branch_2_6/cms/src/resources/portal-cms-jar/org/jb= oss/portal/cms/jboss-beans.xml branches/JBoss_Portal_Branch_2_6/cms/src/resources/portal-cms-jar/org/jb= oss/portal/cms/mime-mappings.xml branches/JBoss_Portal_Branch_2_6/cms/src/resources/portal-cms-sar/defaul= t-content/default/index.html branches/JBoss_Portal_Branch_2_6/cms/src/resources/portal-cms-sar/defaul= t-content/default/private/license.html branches/JBoss_Portal_Branch_2_6/cms/src/resources/portal-cms-sar/defaul= t-content/default/project.html branches/JBoss_Portal_Branch_2_6/cms/src/resources/portal-cms-sar/defaul= t-content/default/support.html branches/JBoss_Portal_Branch_2_6/cms/src/resources/test/cms/clustering/d= atasource/ports01-ds.xml branches/JBoss_Portal_Branch_2_6/cms/src/resources/test/cms/clustering/d= atasource/ports02-ds.xml branches/JBoss_Portal_Branch_2_6/cms/src/resources/test/cms/clustering/s= ar/META-INF/jboss-service.xml branches/JBoss_Portal_Branch_2_6/cms/src/resources/test/cms/clustering/s= ar/conf/hibernate/cms/domain.hbm.xml branches/JBoss_Portal_Branch_2_6/cms/src/resources/test/cms/clustering/s= ar/conf/hibernate/cms/hibernate.cfg.xml branches/JBoss_Portal_Branch_2_6/cms/src/resources/test/cms/clustering/t= est-cms-clustering-war/WEB-INF/jboss-portlet.xml branches/JBoss_Portal_Branch_2_6/cms/src/resources/test/cms/clustering/t= est-cms-clustering-war/WEB-INF/portlet.xml branches/JBoss_Portal_Branch_2_6/cms/src/resources/test/cms/clustering/t= est-cms-clustering-war/WEB-INF/web.xml branches/JBoss_Portal_Branch_2_6/cms/src/resources/test/db-config.xml branches/JBoss_Portal_Branch_2_6/cms/src/resources/test/domain-identity.= hbm.xml branches/JBoss_Portal_Branch_2_6/cms/src/resources/test/jbpm-ehcache.xml branches/JBoss_Portal_Branch_2_6/cms/src/resources/test/jbpm-hibernate.c= fg.xml branches/JBoss_Portal_Branch_2_6/cms/src/resources/test/jcr/fs-repositor= y.xml branches/JBoss_Portal_Branch_2_6/cms/src/resources/test/jcr/repository.x= ml branches/JBoss_Portal_Branch_2_6/cms/src/resources/test/log4j.xml branches/JBoss_Portal_Branch_2_6/cms/src/resources/test/pm-cache.xml branches/JBoss_Portal_Branch_2_6/cms/src/resources/test/standardidentity= -config.xml branches/JBoss_Portal_Branch_2_6/core-admin/build.bat branches/JBoss_Portal_Branch_2_6/core-admin/build.sh branches/JBoss_Portal_Branch_2_6/core-admin/build.xml branches/JBoss_Portal_Branch_2_6/core-admin/src/bin/portal-admin-war/sty= le.css branches/JBoss_Portal_Branch_2_6/core-admin/src/main/org/jboss/portal/co= re/admin/ui/AdminPropertyResolver.java branches/JBoss_Portal_Branch_2_6/core-admin/src/main/org/jboss/portal/co= re/admin/ui/AuthorizationBean.java branches/JBoss_Portal_Branch_2_6/core-admin/src/main/org/jboss/portal/co= re/admin/ui/ControlPropertiesBean.java branches/JBoss_Portal_Branch_2_6/core-admin/src/main/org/jboss/portal/co= re/admin/ui/ControlPropertyBean.java branches/JBoss_Portal_Branch_2_6/core-admin/src/main/org/jboss/portal/co= re/admin/ui/InstanceManagerBean.java branches/JBoss_Portal_Branch_2_6/core-admin/src/main/org/jboss/portal/co= re/admin/ui/PortalObjectManagerBean.java branches/JBoss_Portal_Branch_2_6/core-admin/src/main/org/jboss/portal/co= re/admin/ui/PortletManagerBean.java branches/JBoss_Portal_Branch_2_6/core-admin/src/main/org/jboss/portal/co= re/admin/ui/PreferenceBean.java branches/JBoss_Portal_Branch_2_6/core-admin/src/main/org/jboss/portal/co= re/admin/ui/PreferencesBean.java branches/JBoss_Portal_Branch_2_6/core-admin/src/main/org/jboss/portal/co= re/admin/ui/PropertiesBean.java branches/JBoss_Portal_Branch_2_6/core-admin/src/main/org/jboss/portal/co= re/admin/ui/PropertiesInfo.java branches/JBoss_Portal_Branch_2_6/core-admin/src/main/org/jboss/portal/co= re/admin/ui/PropertyBean.java branches/JBoss_Portal_Branch_2_6/core-admin/src/main/org/jboss/portal/co= re/admin/ui/PropertyBeanContainer.java branches/JBoss_Portal_Branch_2_6/core-admin/src/main/org/jboss/portal/co= re/admin/ui/PropertyInfo.java branches/JBoss_Portal_Branch_2_6/core-admin/src/main/org/jboss/portal/co= re/admin/ui/Refresher.java branches/JBoss_Portal_Branch_2_6/core-admin/src/main/org/jboss/portal/co= re/admin/ui/ThemeBean.java branches/JBoss_Portal_Branch_2_6/core-admin/src/main/org/jboss/portal/co= re/admin/ui/actions/AddPageAction.java branches/JBoss_Portal_Branch_2_6/core-admin/src/main/org/jboss/portal/co= re/admin/ui/actions/AssignContentToWindowAction.java branches/JBoss_Portal_Branch_2_6/core-admin/src/main/org/jboss/portal/co= re/admin/ui/actions/CreateInstanceAction.java branches/JBoss_Portal_Branch_2_6/core-admin/src/main/org/jboss/portal/co= re/admin/ui/actions/PortalAction.java branches/JBoss_Portal_Branch_2_6/core-admin/src/main/org/jboss/portal/co= re/admin/ui/actions/PropertyAction.java branches/JBoss_Portal_Branch_2_6/core-admin/src/main/org/jboss/portal/co= re/admin/ui/actions/RenameAction.java branches/JBoss_Portal_Branch_2_6/core-admin/src/main/org/jboss/portal/co= re/admin/ui/actions/WindowComparator.java branches/JBoss_Portal_Branch_2_6/core-admin/src/main/org/jboss/portal/co= re/admin/ui/common/PageManagerBean.java branches/JBoss_Portal_Branch_2_6/core-admin/src/main/org/jboss/portal/co= re/admin/ui/conversion/ContentTypeConverter.java branches/JBoss_Portal_Branch_2_6/core-admin/src/main/org/jboss/portal/co= re/admin/ui/conversion/PortalObjectIdConverter.java branches/JBoss_Portal_Branch_2_6/core-admin/src/main/org/jboss/portal/co= re/admin/ui/dashboard/DashboardBean.java branches/JBoss_Portal_Branch_2_6/core-admin/src/main/org/jboss/portal/co= re/admin/ui/portlet/PortletDefinitionInvoker.java branches/JBoss_Portal_Branch_2_6/core-admin/src/main/org/jboss/portal/co= re/admin/ui/wizard/NewWindowWizard.java branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-admin-s= ar/META-INF/jboss-service.xml branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-admin-w= ar/WEB-INF/faces-config.xml branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-admin-w= ar/WEB-INF/jboss-portlet.xml branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-admin-w= ar/WEB-INF/jboss_portal.tld branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-admin-w= ar/WEB-INF/jsf/common/confirm.xhtml branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-admin-w= ar/WEB-INF/jsf/common/editPageErrorHandling.xhtml branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-admin-w= ar/WEB-INF/jsf/common/editPageLayout.xhtml branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-admin-w= ar/WEB-INF/jsf/common/editPortalErrorHandling.xhtml branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-admin-w= ar/WEB-INF/jsf/common/editPreferences.xhtml branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-admin-w= ar/WEB-INF/jsf/common/editProperties.xhtml branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-admin-w= ar/WEB-INF/jsf/common/editSecurity.xhtml branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-admin-w= ar/WEB-INF/jsf/common/editTheme.xhtml branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-admin-w= ar/WEB-INF/jsf/common/editWindowTheme.xhtml branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-admin-w= ar/WEB-INF/jsf/common/showPortletDetails.xhtml branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-admin-w= ar/WEB-INF/jsf/common/tabContainer.xhtml branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-admin-w= ar/WEB-INF/jsf/confirmDeleteInstance.xhtml branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-admin-w= ar/WEB-INF/jsf/dashboard/dashboard.xhtml branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-admin-w= ar/WEB-INF/jsf/dashboards.xhtml branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-admin-w= ar/WEB-INF/jsf/dashboardsTemplate.xhtml branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-admin-w= ar/WEB-INF/jsf/editContext.xhtml branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-admin-w= ar/WEB-INF/jsf/editPage.xhtml branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-admin-w= ar/WEB-INF/jsf/editPageLayout.xhtml branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-admin-w= ar/WEB-INF/jsf/editPageSecurity.xhtml branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-admin-w= ar/WEB-INF/jsf/editPageTheme.xhtml branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-admin-w= ar/WEB-INF/jsf/editPortalSecurity.xhtml branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-admin-w= ar/WEB-INF/jsf/editPortalTheme.xhtml branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-admin-w= ar/WEB-INF/jsf/editProperties.xhtml branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-admin-w= ar/WEB-INF/jsf/editWindow.xhtml branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-admin-w= ar/WEB-INF/jsf/editWindowSecurity.xhtml branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-admin-w= ar/WEB-INF/jsf/editWindowTheme.xhtml branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-admin-w= ar/WEB-INF/jsf/instances.xhtml branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-admin-w= ar/WEB-INF/jsf/instancesTemplate.xhtml branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-admin-w= ar/WEB-INF/jsf/objectNavigation.xhtml branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-admin-w= ar/WEB-INF/jsf/objectTemplate.xhtml branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-admin-w= ar/WEB-INF/jsf/objects.xhtml branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-admin-w= ar/WEB-INF/jsf/portlets.xhtml branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-admin-w= ar/WEB-INF/jsf/portletsTemplate.xhtml branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-admin-w= ar/WEB-INF/jsf/renameObject.xhtml branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-admin-w= ar/WEB-INF/jsf/wizard/newWindowTpl.xhtml branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-admin-w= ar/WEB-INF/jsf/wizard/newWindowWizardConfirm.xhtml branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-admin-w= ar/WEB-INF/jsf/wizard/selectPage.xhtml branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-admin-w= ar/WEB-INF/jsf/wizard/selectPortal.xhtml branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-admin-w= ar/WEB-INF/jsf/wizard/selectPortlet.xhtml branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-admin-w= ar/WEB-INF/jsf/wizard/selectRegion.xhtml branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-admin-w= ar/WEB-INF/portal.taglib.xml branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-admin-w= ar/WEB-INF/portlet-instances.xml branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-admin-w= ar/WEB-INF/portlet.xml branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-admin-w= ar/WEB-INF/web.xml branches/JBoss_Portal_Branch_2_6/core-cms/src/main/org/jboss/portal/core= /cms/CMSConstants.java branches/JBoss_Portal_Branch_2_6/core-cms/src/main/org/jboss/portal/core= /cms/CMSObjectCommandFactory.java branches/JBoss_Portal_Branch_2_6/core-cms/src/main/org/jboss/portal/core= /cms/CMSObjectCommandFactoryService.java branches/JBoss_Portal_Branch_2_6/core-cms/src/main/org/jboss/portal/core= /cms/CMSObjectURLFactory.java branches/JBoss_Portal_Branch_2_6/core-cms/src/main/org/jboss/portal/core= /cms/aspect/IdentityBindingInterceptor.java branches/JBoss_Portal_Branch_2_6/core-cms/src/main/org/jboss/portal/core= /cms/command/StreamContentCommand.java branches/JBoss_Portal_Branch_2_6/core-cms/src/main/org/jboss/portal/core= /cms/content/InternalCMSContentProvider.java branches/JBoss_Portal_Branch_2_6/core-cms/src/main/org/jboss/portal/core= /cms/servlet/CMSExportServlet.java branches/JBoss_Portal_Branch_2_6/core-cms/src/main/org/jboss/portal/core= /cms/servlet/CMSPreviewServlet.java branches/JBoss_Portal_Branch_2_6/core-cms/src/main/org/jboss/portal/core= /cms/ui/CMSPortlet.java branches/JBoss_Portal_Branch_2_6/core-cms/src/main/org/jboss/portal/core= /cms/ui/admin/CMSAdminConstants.java branches/JBoss_Portal_Branch_2_6/core-cms/src/main/org/jboss/portal/core= /cms/ui/admin/CMSAdminPortlet.java branches/JBoss_Portal_Branch_2_6/core-cms/src/main/org/jboss/portal/core= /cms/ui/admin/CMSContentEditorPortlet.java branches/JBoss_Portal_Branch_2_6/core-cms/src/main/org/jboss/portal/core= /cms/ui/admin/CMSEditorConstants.java branches/JBoss_Portal_Branch_2_6/core-cms/src/resources/portal-cms-sar/M= ETA-INF/jboss-service.xml branches/JBoss_Portal_Branch_2_6/core-cms/src/resources/portal-cms-sar/c= onf/hibernate/cms/domain.hbm.xml branches/JBoss_Portal_Branch_2_6/core-cms/src/resources/portal-cms-sar/c= onf/hibernate/cms/ehcache.xml branches/JBoss_Portal_Branch_2_6/core-cms/src/resources/portal-cms-sar/c= onf/hibernate/cms/hibernate.cfg.xml branches/JBoss_Portal_Branch_2_6/core-cms/src/resources/portal-cms-war/W= EB-INF/classes/Resource.properties branches/JBoss_Portal_Branch_2_6/core-cms/src/resources/portal-cms-war/W= EB-INF/classes/Resource_es.properties branches/JBoss_Portal_Branch_2_6/core-cms/src/resources/portal-cms-war/W= EB-INF/classes/Resource_fr.properties branches/JBoss_Portal_Branch_2_6/core-cms/src/resources/portal-cms-war/W= EB-INF/classes/Resource_it.properties branches/JBoss_Portal_Branch_2_6/core-cms/src/resources/portal-cms-war/W= EB-INF/classes/Resource_pt_BR.properties branches/JBoss_Portal_Branch_2_6/core-cms/src/resources/portal-cms-war/W= EB-INF/default-object.xml branches/JBoss_Portal_Branch_2_6/core-cms/src/resources/portal-cms-war/W= EB-INF/jboss-portlet.xml branches/JBoss_Portal_Branch_2_6/core-cms/src/resources/portal-cms-war/W= EB-INF/jboss-web.xml branches/JBoss_Portal_Branch_2_6/core-cms/src/resources/portal-cms-war/W= EB-INF/jsp/cms/admin/confirmcopy.jsp branches/JBoss_Portal_Branch_2_6/core-cms/src/resources/portal-cms-war/W= EB-INF/jsp/cms/admin/confirmcreatecollection.jsp branches/JBoss_Portal_Branch_2_6/core-cms/src/resources/portal-cms-war/W= EB-INF/jsp/cms/admin/confirmdelete.jsp branches/JBoss_Portal_Branch_2_6/core-cms/src/resources/portal-cms-war/W= EB-INF/jsp/cms/admin/confirmmove.jsp branches/JBoss_Portal_Branch_2_6/core-cms/src/resources/portal-cms-war/W= EB-INF/jsp/cms/admin/create.jsp branches/JBoss_Portal_Branch_2_6/core-cms/src/resources/portal-cms-war/W= EB-INF/jsp/cms/admin/edit.jsp branches/JBoss_Portal_Branch_2_6/core-cms/src/resources/portal-cms-war/W= EB-INF/jsp/cms/admin/editbinary.jsp branches/JBoss_Portal_Branch_2_6/core-cms/src/resources/portal-cms-war/W= EB-INF/jsp/cms/admin/exportarchive.jsp branches/JBoss_Portal_Branch_2_6/core-cms/src/resources/portal-cms-war/W= EB-INF/jsp/cms/admin/exportarchive_pickup.jsp branches/JBoss_Portal_Branch_2_6/core-cms/src/resources/portal-cms-war/W= EB-INF/jsp/cms/admin/exportarchive_pickup_error.jsp branches/JBoss_Portal_Branch_2_6/core-cms/src/resources/portal-cms-war/W= EB-INF/jsp/cms/admin/folderlist.jsp branches/JBoss_Portal_Branch_2_6/core-cms/src/resources/portal-cms-war/W= EB-INF/jsp/cms/admin/help.jsp branches/JBoss_Portal_Branch_2_6/core-cms/src/resources/portal-cms-war/W= EB-INF/jsp/cms/admin/main.jsp branches/JBoss_Portal_Branch_2_6/core-cms/src/resources/portal-cms-war/W= EB-INF/jsp/cms/admin/pending_items.jsp branches/JBoss_Portal_Branch_2_6/core-cms/src/resources/portal-cms-war/W= EB-INF/jsp/cms/admin/searchResults.jsp branches/JBoss_Portal_Branch_2_6/core-cms/src/resources/portal-cms-war/W= EB-INF/jsp/cms/admin/securenode.jsp branches/JBoss_Portal_Branch_2_6/core-cms/src/resources/portal-cms-war/W= EB-INF/jsp/cms/admin/upload.jsp branches/JBoss_Portal_Branch_2_6/core-cms/src/resources/portal-cms-war/W= EB-INF/jsp/cms/admin/uploadarchive.jsp branches/JBoss_Portal_Branch_2_6/core-cms/src/resources/portal-cms-war/W= EB-INF/jsp/cms/admin/viewfile.jsp branches/JBoss_Portal_Branch_2_6/core-cms/src/resources/portal-cms-war/W= EB-INF/jsp/cms/edit.jsp branches/JBoss_Portal_Branch_2_6/core-cms/src/resources/portal-cms-war/W= EB-INF/jsp/cms/editor/main.jsp branches/JBoss_Portal_Branch_2_6/core-cms/src/resources/portal-cms-war/W= EB-INF/jsp/cms/help.jsp branches/JBoss_Portal_Branch_2_6/core-cms/src/resources/portal-cms-war/W= EB-INF/portal-lib.tld branches/JBoss_Portal_Branch_2_6/core-cms/src/resources/portal-cms-war/W= EB-INF/portlet-instances.xml branches/JBoss_Portal_Branch_2_6/core-cms/src/resources/portal-cms-war/W= EB-INF/portlet.xml branches/JBoss_Portal_Branch_2_6/core-cms/src/resources/portal-cms-war/W= EB-INF/web.xml branches/JBoss_Portal_Branch_2_6/core-samples/src/main/org/jboss/portal/= core/samples/basic/event/PortletB.java Log: Updated svn properties Property changes on: branches/JBoss_Portal_Branch_2_6/api/build.bat ___________________________________________________________________ Name: svn:keywords - Author Date Id Revision + LastChangedDate LastChangedBy LastChangedRevision Id Property changes on: branches/JBoss_Portal_Branch_2_6/api/build.sh ___________________________________________________________________ Name: svn:keywords - Author Date Id Revision + LastChangedDate LastChangedBy LastChangedRevision Id Property changes on: branches/JBoss_Portal_Branch_2_6/api/build.xml ___________________________________________________________________ Name: svn:keywords - Author Date Id Revision + LastChangedDate LastChangedBy LastChangedRevision Id Modified: branches/JBoss_Portal_Branch_2_6/api/src/main/org/jboss/portal/ap= i/PortalRuntimeContext.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/api/src/main/org/jboss/portal/api/Port= alRuntimeContext.java 2007-10-27 23:01:46 UTC (rev 8784) +++ branches/JBoss_Portal_Branch_2_6/api/src/main/org/jboss/portal/api/Port= alRuntimeContext.java 2007-10-28 01:09:21 UTC (rev 8785) @@ -29,7 +29,7 @@ * The portal runtime context which provides access to runtime objects. * * @author Julien Viet - * @version $Revision: 1.1 $ + * @version $Revision$ */ public interface PortalRuntimeContext { Property changes on: branches/JBoss_Portal_Branch_2_6/api/src/main/org/jbos= s/portal/api/PortalRuntimeContext.java ___________________________________________________________________ Name: svn:keywords + LastChangedDate LastChangedBy LastChangedRevision Id Modified: branches/JBoss_Portal_Branch_2_6/api/src/main/org/jboss/portal/ap= i/PortalURL.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/api/src/main/org/jboss/portal/api/Port= alURL.java 2007-10-27 23:01:46 UTC (rev 8784) +++ branches/JBoss_Portal_Branch_2_6/api/src/main/org/jboss/portal/api/Port= alURL.java 2007-10-28 01:09:21 UTC (rev 8785) @@ -26,25 +26,23 @@ * Base interface for portal urls. * * @author Julien Viet - * @version $Revision: 1.1 $ + * @version $Revision$ */ public interface PortalURL { /** - * Affect the authentication mode of the transport protocol that the UR= L will designate. - * A null value indicates that it should reuse the value of the incomin= g transport. + * Affect the authentication mode of the transport protocol that the UR= L will designate. A null value indicates that + * it should reuse the value of the incoming transport. */ void setAuthenticated(Boolean wantAuthenticated); = /** - * Affect the security mode of the transport protocol that the URL will= designate. - * A null value indicates that it should reuse the value of the incomin= g transport. + * Affect the security mode of the transport protocol that the URL will= designate. A null value indicates that it + * should reuse the value of the incoming transport. */ void setSecure(Boolean wantSecure); = - /** - * Affet the URL generation by creating either a relative or an absolut= e URL. - */ + /** Affet the URL generation by creating either a relative or an absolu= te URL. */ void setRelative(boolean relative); = /** Property changes on: branches/JBoss_Portal_Branch_2_6/api/src/main/org/jbos= s/portal/api/PortalURL.java ___________________________________________________________________ Name: svn:keywords + LastChangedDate LastChangedBy LastChangedRevision Id Property changes on: branches/JBoss_Portal_Branch_2_6/api/src/main/org/jbos= s/portal/api/event/PortalEvent.java ___________________________________________________________________ Name: svn:keywords - Author Date Id Revision + LastChangedDate LastChangedBy LastChangedRevision Id Modified: branches/JBoss_Portal_Branch_2_6/api/src/main/org/jboss/portal/ap= i/event/PortalEventContext.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/api/src/main/org/jboss/portal/api/even= t/PortalEventContext.java 2007-10-27 23:01:46 UTC (rev 8784) +++ branches/JBoss_Portal_Branch_2_6/api/src/main/org/jboss/portal/api/even= t/PortalEventContext.java 2007-10-28 01:09:21 UTC (rev 8785) @@ -26,7 +26,7 @@ = /** * @author Julien Viet - * @version $Revision: 1.1 $ + * @version $Revision$ */ public interface PortalEventContext { Property changes on: branches/JBoss_Portal_Branch_2_6/api/src/main/org/jbos= s/portal/api/event/PortalEventContext.java ___________________________________________________________________ Name: svn:keywords + LastChangedDate LastChangedBy LastChangedRevision Id Modified: branches/JBoss_Portal_Branch_2_6/api/src/main/org/jboss/portal/ap= i/event/PortalEventListener.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/api/src/main/org/jboss/portal/api/even= t/PortalEventListener.java 2007-10-27 23:01:46 UTC (rev 8784) +++ branches/JBoss_Portal_Branch_2_6/api/src/main/org/jboss/portal/api/even= t/PortalEventListener.java 2007-10-28 01:09:21 UTC (rev 8785) @@ -24,7 +24,7 @@ = /** * @author Julien Viet - * @version $Revision: 1.1 $ + * @version $Revision$ */ public interface PortalEventListener { Property changes on: branches/JBoss_Portal_Branch_2_6/api/src/main/org/jbos= s/portal/api/event/PortalEventListener.java ___________________________________________________________________ Name: svn:keywords + LastChangedDate LastChangedBy LastChangedRevision Id Modified: branches/JBoss_Portal_Branch_2_6/api/src/main/org/jboss/portal/ap= i/navstate/NavigationalStateContext.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/api/src/main/org/jboss/portal/api/navs= tate/NavigationalStateContext.java 2007-10-27 23:01:46 UTC (rev 8784) +++ branches/JBoss_Portal_Branch_2_6/api/src/main/org/jboss/portal/api/navs= tate/NavigationalStateContext.java 2007-10-28 01:09:21 UTC (rev 8785) @@ -22,15 +22,15 @@ *************************************************************************= *****/ package org.jboss.portal.api.navstate; = +import org.jboss.portal.Mode; import org.jboss.portal.WindowState; -import org.jboss.portal.Mode; import org.jboss.portal.api.node.PortalNode; = /** * Provide access to a portion of the navigational state managed by the po= rtal. * * @author Julien Viet - * @version $Revision: 1.1 $ + * @version $Revision$ */ public interface NavigationalStateContext { @@ -46,7 +46,7 @@ /** * Updates the window state of a window. * - * @param window the window to update + * @param window the window to update * @param windowState the new window state value * @throws IllegalArgumentException */ @@ -65,7 +65,7 @@ * Updates the mode of a window. * * @param window the window to update - * @param mode the new mode value + * @param mode the new mode value * @throws IllegalArgumentException */ void setMode(PortalNode window, Mode mode) throws IllegalArgumentExcept= ion; Property changes on: branches/JBoss_Portal_Branch_2_6/api/src/main/org/jbos= s/portal/api/navstate/NavigationalStateContext.java ___________________________________________________________________ Name: svn:keywords + LastChangedDate LastChangedBy LastChangedRevision Id Modified: branches/JBoss_Portal_Branch_2_6/api/src/main/org/jboss/portal/ap= i/node/PortalNode.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/api/src/main/org/jboss/portal/api/node= /PortalNode.java 2007-10-27 23:01:46 UTC (rev 8784) +++ branches/JBoss_Portal_Branch_2_6/api/src/main/org/jboss/portal/api/node= /PortalNode.java 2007-10-28 01:09:21 UTC (rev 8785) @@ -25,8 +25,8 @@ import org.jboss.portal.api.PortalRuntimeContext; = import java.util.Collection; +import java.util.Locale; import java.util.Map; -import java.util.Locale; = /** * Represents a portal node, a first class entity for the portal. @@ -80,7 +80,7 @@ /** * Returns the best display name for specified locale. * - * @return the display name = + * @return the display name */ String getDisplayName(Locale locale); = Property changes on: branches/JBoss_Portal_Branch_2_6/api/src/main/org/jbos= s/portal/api/node/PortalNode.java ___________________________________________________________________ Name: svn:keywords - Author Date Id Revision + LastChangedDate LastChangedBy LastChangedRevision Id Modified: branches/JBoss_Portal_Branch_2_6/api/src/main/org/jboss/portal/ap= i/node/PortalNodeURL.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/api/src/main/org/jboss/portal/api/node= /PortalNodeURL.java 2007-10-27 23:01:46 UTC (rev 8784) +++ branches/JBoss_Portal_Branch_2_6/api/src/main/org/jboss/portal/api/node= /PortalNodeURL.java 2007-10-28 01:09:21 UTC (rev 8785) @@ -35,7 +35,7 @@ /** * Set a parameter on the URL. * - * @param name the parameter name + * @param name the parameter name * @param value the parameter value * @throws IllegalArgumentException if the name is null */ @@ -44,7 +44,7 @@ /** * Set a parameter on the URL. * - * @param name the parameter name + * @param name the parameter name * @param values the parameter values * @throws IllegalArgumentException if the name is null */ Property changes on: branches/JBoss_Portal_Branch_2_6/api/src/main/org/jbos= s/portal/api/node/PortalNodeURL.java ___________________________________________________________________ Name: svn:keywords - Author Date Id Revision + LastChangedDate LastChangedBy LastChangedRevision Id Modified: branches/JBoss_Portal_Branch_2_6/api/src/main/org/jboss/portal/ap= i/node/event/PageEvent.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/api/src/main/org/jboss/portal/api/node= /event/PageEvent.java 2007-10-27 23:01:46 UTC (rev 8784) +++ branches/JBoss_Portal_Branch_2_6/api/src/main/org/jboss/portal/api/node= /event/PageEvent.java 2007-10-28 01:09:21 UTC (rev 8785) @@ -28,7 +28,7 @@ * Base class for page events. * * @author Julien Viet - * @version $Revision: 1.1 $ + * @version $Revision$ */ public abstract class PageEvent extends PortalNodeEvent { Property changes on: branches/JBoss_Portal_Branch_2_6/api/src/main/org/jbos= s/portal/api/node/event/PageEvent.java ___________________________________________________________________ Name: svn:keywords + LastChangedDate LastChangedBy LastChangedRevision Id Modified: branches/JBoss_Portal_Branch_2_6/api/src/main/org/jboss/portal/ap= i/node/event/PageRenderEvent.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/api/src/main/org/jboss/portal/api/node= /event/PageRenderEvent.java 2007-10-27 23:01:46 UTC (rev 8784) +++ branches/JBoss_Portal_Branch_2_6/api/src/main/org/jboss/portal/api/node= /event/PageRenderEvent.java 2007-10-28 01:09:21 UTC (rev 8785) @@ -28,7 +28,7 @@ * This event is raised whenever a page is rendered. * * @author Julien Viet - * @version $Revision: 1.1 $ + * @version $Revision$ */ public class PageRenderEvent extends PageEvent { Property changes on: branches/JBoss_Portal_Branch_2_6/api/src/main/org/jbos= s/portal/api/node/event/PageRenderEvent.java ___________________________________________________________________ Name: svn:keywords + LastChangedDate LastChangedBy LastChangedRevision Id Modified: branches/JBoss_Portal_Branch_2_6/api/src/main/org/jboss/portal/ap= i/node/event/PortalNodeEvent.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/api/src/main/org/jboss/portal/api/node= /event/PortalNodeEvent.java 2007-10-27 23:01:46 UTC (rev 8784) +++ branches/JBoss_Portal_Branch_2_6/api/src/main/org/jboss/portal/api/node= /event/PortalNodeEvent.java 2007-10-28 01:09:21 UTC (rev 8785) @@ -22,8 +22,8 @@ *************************************************************************= *****/ package org.jboss.portal.api.node.event; = +import org.jboss.portal.api.event.PortalEvent; import org.jboss.portal.api.node.PortalNode; -import org.jboss.portal.api.event.PortalEvent; = /** * Base class for all portal node events. Property changes on: branches/JBoss_Portal_Branch_2_6/api/src/main/org/jbos= s/portal/api/node/event/PortalNodeEvent.java ___________________________________________________________________ Name: svn:keywords - Author Date Id Revision + LastChangedDate LastChangedBy LastChangedRevision Id Modified: branches/JBoss_Portal_Branch_2_6/api/src/main/org/jboss/portal/ap= i/node/event/PortalNodeEventContext.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/api/src/main/org/jboss/portal/api/node= /event/PortalNodeEventContext.java 2007-10-27 23:01:46 UTC (rev 8784) +++ branches/JBoss_Portal_Branch_2_6/api/src/main/org/jboss/portal/api/node= /event/PortalNodeEventContext.java 2007-10-28 01:09:21 UTC (rev 8785) @@ -22,12 +22,12 @@ *************************************************************************= *****/ package org.jboss.portal.api.node.event; = +import org.jboss.portal.api.event.PortalEventContext; import org.jboss.portal.api.node.PortalNode; -import org.jboss.portal.api.event.PortalEventContext; = /** * The context in which a PortalNodeEvent is dispatched. - * = + * * @author Julien Viet * @version $Revision$ */ Property changes on: branches/JBoss_Portal_Branch_2_6/api/src/main/org/jbos= s/portal/api/node/event/PortalNodeEventContext.java ___________________________________________________________________ Name: svn:keywords - Author Date Id Revision + LastChangedDate LastChangedBy LastChangedRevision Id Modified: branches/JBoss_Portal_Branch_2_6/api/src/main/org/jboss/portal/ap= i/node/event/PortalNodeEventListener.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/api/src/main/org/jboss/portal/api/node= /event/PortalNodeEventListener.java 2007-10-27 23:01:46 UTC (rev 8784) +++ branches/JBoss_Portal_Branch_2_6/api/src/main/org/jboss/portal/api/node= /event/PortalNodeEventListener.java 2007-10-28 01:09:21 UTC (rev 8785) @@ -32,15 +32,13 @@ { /** *

Dispatch an event to the listener. If the listener does not care = about replacing the current event with a new - * one then it should return the event returned by the PortalNode= EventContext provided such as:

+ * one then it should return the event returned by the PortalNode= EventContext provided such as:

+ *

return context.dispatch()

Otherwise it c= an return a new event to replace the current + * one. Only events of type WindowNavigationEvent or WindowActionEvent; will have an + * effect.

* - *

return context.dispatch()

- * - *

Otherwise it can return a new event to replace the current one. O= nly events of type WindowNavigationEvent - * or WindowActionEvent; will have an effect.

- * * @param context the context in which the event is triggered - * @param event the fired event + * @param event the fired event * @return an event */ PortalNodeEvent onEvent(PortalNodeEventContext context, PortalNodeEvent= event); Property changes on: branches/JBoss_Portal_Branch_2_6/api/src/main/org/jbos= s/portal/api/node/event/PortalNodeEventListener.java ___________________________________________________________________ Name: svn:keywords - Author Date Id Revision + LastChangedDate LastChangedBy LastChangedRevision Id Property changes on: branches/JBoss_Portal_Branch_2_6/api/src/main/org/jbos= s/portal/api/node/event/WindowActionEvent.java ___________________________________________________________________ Name: svn:keywords - Author Date Id Revision + LastChangedDate LastChangedBy LastChangedRevision Id Property changes on: branches/JBoss_Portal_Branch_2_6/api/src/main/org/jbos= s/portal/api/node/event/WindowEvent.java ___________________________________________________________________ Name: svn:keywords - Author Date Id Revision + LastChangedDate LastChangedBy LastChangedRevision Id Property changes on: branches/JBoss_Portal_Branch_2_6/api/src/main/org/jbos= s/portal/api/node/event/WindowNavigationEvent.java ___________________________________________________________________ Name: svn:keywords - Author Date Id Revision + LastChangedDate LastChangedBy LastChangedRevision Id Property changes on: branches/JBoss_Portal_Branch_2_6/api/src/main/org/jbos= s/portal/api/node/event/WindowRenderEvent.java ___________________________________________________________________ Name: svn:keywords - Author Date Id Revision + LastChangedDate LastChangedBy LastChangedRevision Id Modified: branches/JBoss_Portal_Branch_2_6/api/src/main/org/jboss/portal/ap= i/session/PortalSession.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/api/src/main/org/jboss/portal/api/sess= ion/PortalSession.java 2007-10-27 23:01:46 UTC (rev 8784) +++ branches/JBoss_Portal_Branch_2_6/api/src/main/org/jboss/portal/api/sess= ion/PortalSession.java 2007-10-28 01:09:21 UTC (rev 8785) @@ -23,11 +23,11 @@ package org.jboss.portal.api.session; = /** - * The portal session, the portal session attributes are accessible howeve= r it is not possible to influence - * the lifecycle of the session as it is managed by the portal. + * The portal session, the portal session attributes are accessible howeve= r it is not possible to influence the + * lifecycle of the session as it is managed by the portal. * * @author Julien Viet - * @version $Revision: 1.1 $ + * @version $Revision$ */ public interface PortalSession { @@ -50,7 +50,7 @@ /** * Update an attribute value. If the attribute value is null, then it i= s considered as a removal. * - * @param name the attribute name + * @param name the attribute name * @param attribute the attribute value * @throws IllegalArgumentException if the attribute name is null */ Property changes on: branches/JBoss_Portal_Branch_2_6/api/src/main/org/jbos= s/portal/api/session/PortalSession.java ___________________________________________________________________ Name: svn:keywords + LastChangedDate LastChangedBy LastChangedRevision Id Modified: branches/JBoss_Portal_Branch_2_6/api/src/main/org/jboss/portal/ap= i/session/event/PortalSessionEvent.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/api/src/main/org/jboss/portal/api/sess= ion/event/PortalSessionEvent.java 2007-10-27 23:01:46 UTC (rev 8784) +++ branches/JBoss_Portal_Branch_2_6/api/src/main/org/jboss/portal/api/sess= ion/event/PortalSessionEvent.java 2007-10-28 01:09:21 UTC (rev 8785) @@ -26,7 +26,7 @@ = /** * @author Julien Viet - * @version $Revision: 1.1 $ + * @version $Revision$ */ public class PortalSessionEvent extends PortalEvent { Property changes on: branches/JBoss_Portal_Branch_2_6/api/src/main/org/jbos= s/portal/api/session/event/PortalSessionEvent.java ___________________________________________________________________ Name: svn:keywords + LastChangedDate LastChangedBy LastChangedRevision Id Modified: branches/JBoss_Portal_Branch_2_6/api/src/main/org/jboss/portal/ap= i/user/event/UserAuthenticationEvent.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/api/src/main/org/jboss/portal/api/user= /event/UserAuthenticationEvent.java 2007-10-27 23:01:46 UTC (rev 8784) +++ branches/JBoss_Portal_Branch_2_6/api/src/main/org/jboss/portal/api/user= /event/UserAuthenticationEvent.java 2007-10-28 01:09:21 UTC (rev 8785) @@ -24,7 +24,7 @@ = /** * @author Julien Viet - * @version $Revision: 1.1 $ + * @version $Revision$ */ public class UserAuthenticationEvent extends UserEvent { Property changes on: branches/JBoss_Portal_Branch_2_6/api/src/main/org/jbos= s/portal/api/user/event/UserAuthenticationEvent.java ___________________________________________________________________ Name: svn:keywords + LastChangedDate LastChangedBy LastChangedRevision Id Modified: branches/JBoss_Portal_Branch_2_6/api/src/main/org/jboss/portal/ap= i/user/event/UserEvent.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/api/src/main/org/jboss/portal/api/user= /event/UserEvent.java 2007-10-27 23:01:46 UTC (rev 8784) +++ branches/JBoss_Portal_Branch_2_6/api/src/main/org/jboss/portal/api/user= /event/UserEvent.java 2007-10-28 01:09:21 UTC (rev 8785) @@ -26,7 +26,7 @@ = /** * @author Julien Viet - * @version $Revision: 1.1 $ + * @version $Revision$ */ public abstract class UserEvent extends PortalEvent { Property changes on: branches/JBoss_Portal_Branch_2_6/api/src/main/org/jbos= s/portal/api/user/event/UserEvent.java ___________________________________________________________________ Name: svn:keywords + LastChangedDate LastChangedBy LastChangedRevision Id Property changes on: branches/JBoss_Portal_Branch_2_6/cms/build.bat ___________________________________________________________________ Name: svn:keywords - Author Date Id Revision + LastChangedDate LastChangedBy LastChangedRevision Id Property changes on: branches/JBoss_Portal_Branch_2_6/cms/build.sh ___________________________________________________________________ Name: svn:keywords - Author Date Id Revision + LastChangedDate LastChangedBy LastChangedRevision Id Modified: branches/JBoss_Portal_Branch_2_6/cms/build.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/cms/build.xml 2007-10-27 23:01:46 UTC = (rev 8784) +++ branches/JBoss_Portal_Branch_2_6/cms/build.xml 2007-10-28 01:09:21 UTC = (rev 8785) @@ -115,8 +115,8 @@ - - + + = @@ -132,11 +132,11 @@ - + - - - + + + = = @@ -202,7 +202,7 @@ = - = + @@ -230,27 +230,27 @@ = - - + + = = = - - - = - - - + + + + + + @@ -274,23 +274,25 @@ - = - - - = + + + + - = - - = - + + + + = @@ -298,16 +300,16 @@ description=3D"UnDeploy." depends=3D"output"> = - - - = - + + + + = @@ -409,11 +411,11 @@ --> - - + + @@ -439,15 +441,15 @@ = = = - = + = - - + + = - = - = - - + + + + = @@ -491,11 +493,11 @@ - - + + - - + + Property changes on: branches/JBoss_Portal_Branch_2_6/cms/build.xml ___________________________________________________________________ Name: svn:keywords - Author Date Id Revision + LastChangedDate LastChangedBy LastChangedRevision Id Modified: branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cm= s/CMS.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cms/CMS.= java 2007-10-27 23:01:46 UTC (rev 8784) +++ branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cms/CMS.= java 2007-10-28 01:09:21 UTC (rev 8785) @@ -25,7 +25,7 @@ /** * @author Roy Russo * @author Julien Viet - * @version $Revision$ + * @version $Revision: 6112 $ */ public interface CMS { @@ -37,10 +37,7 @@ = /** Return default locale */ String getDefaultLocale(); - = - /** - * = - * @return - */ + + /** @return */ public boolean isWorkflowActivated(); } Property changes on: branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jbos= s/portal/cms/CMS.java ___________________________________________________________________ Name: svn:keywords - Author Date Id Revision + = Modified: branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cm= s/CMSException.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cms/CMSE= xception.java 2007-10-27 23:01:46 UTC (rev 8784) +++ branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cms/CMSE= xception.java 2007-10-28 01:09:21 UTC (rev 8785) @@ -24,7 +24,7 @@ = /** * @author Julien Viet - * @version $Revision$ + * @version $Revision: 5806 $ */ public class CMSException extends RuntimeException { Property changes on: branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jbos= s/portal/cms/CMSException.java ___________________________________________________________________ Name: svn:keywords - Author Date Id Revision + = Property changes on: branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jbos= s/portal/cms/CMSInterceptor.java ___________________________________________________________________ Name: svn:keywords - Author Date Id Revision + = Modified: branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cm= s/CMSMimeMappings.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cms/CMSM= imeMappings.java 2007-10-27 23:01:46 UTC (rev 8784) +++ branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cms/CMSM= imeMappings.java 2007-10-28 01:09:21 UTC (rev 8785) @@ -22,8 +22,8 @@ *************************************************************************= *****/ package org.jboss.portal.cms; = +import org.jboss.portal.common.io.IOTools; import org.jboss.portal.common.xml.XMLTools; -import org.jboss.portal.common.io.IOTools; import org.w3c.dom.Document; import org.w3c.dom.Element; = Property changes on: branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jbos= s/portal/cms/CMSMimeMappings.java ___________________________________________________________________ Name: svn:keywords - Author Date Id Revision + = Modified: branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cm= s/Command.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cms/Comm= and.java 2007-10-27 23:01:46 UTC (rev 8784) +++ branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cms/Comm= and.java 2007-10-28 01:09:21 UTC (rev 8785) @@ -29,7 +29,7 @@ * * @author Julien Viet * @author Thomas Heute - * @version $Revision$ + * @version $Revision: 5448 $ */ public abstract class Command extends Invocation { Property changes on: branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jbos= s/portal/cms/Command.java ___________________________________________________________________ Name: svn:keywords - Author Date Id Revision + = Modified: branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cm= s/CommandFactory.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cms/Comm= andFactory.java 2007-10-27 23:01:46 UTC (rev 8784) +++ branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cms/Comm= andFactory.java 2007-10-28 01:09:21 UTC (rev 8785) @@ -22,20 +22,20 @@ *************************************************************************= *****/ package org.jboss.portal.cms; = -import java.io.InputStream; -import java.util.List; -import java.util.Locale; - import org.jboss.portal.cms.model.Content; import org.jboss.portal.cms.model.File; import org.jboss.portal.cms.model.Folder; import org.jboss.portal.search.impl.jcr.JCRQuery; = +import java.io.InputStream; +import java.util.List; +import java.util.Locale; + /** * Factory to create commands for the cms service. * * @author Julien Viet - * @version $Revision$ + * @version $Revision: 8332 $ */ public interface CommandFactory { @@ -85,7 +85,7 @@ = Command createGetArchiveCommand(String sRootPath, String sLanguage); = - Command createSearchCommand(JCRQuery query); = - = + Command createSearchCommand(JCRQuery query); + Command createMakeLiveVersionCommand(String filePath, String language, = String version); } Property changes on: branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jbos= s/portal/cms/CommandFactory.java ___________________________________________________________________ Name: svn:keywords - Author Date Id Revision + = Property changes on: branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jbos= s/portal/cms/hibernate/CMSEntry.java ___________________________________________________________________ Name: svn:keywords - Author Date Id Revision + = Modified: branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cm= s/hibernate/HibernateStore.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cms/hibe= rnate/HibernateStore.java 2007-10-27 23:01:46 UTC (rev 8784) +++ branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cms/hibe= rnate/HibernateStore.java 2007-10-28 01:09:21 UTC (rev 8785) @@ -32,9 +32,9 @@ import org.hibernate.Session; import org.hibernate.SessionFactory; import org.hibernate.Transaction; +import org.jboss.logging.Logger; import org.jboss.portal.cms.util.HibernateUtil; import org.jboss.portal.common.io.IOTools; -import org.jboss.logging.Logger; = import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; Property changes on: branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jbos= s/portal/cms/hibernate/HibernateStore.java ___________________________________________________________________ Name: svn:keywords - Author Date Id Revision + = Property changes on: branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jbos= s/portal/cms/hibernate/HibernateStoreConstants.java ___________________________________________________________________ Name: svn:keywords - Author Date Id Revision + = Property changes on: branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jbos= s/portal/cms/hibernate/RepositoryEntry.java ___________________________________________________________________ Name: svn:keywords - Author Date Id Revision + = Property changes on: branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jbos= s/portal/cms/hibernate/VersionEntry.java ___________________________________________________________________ Name: svn:keywords - Author Date Id Revision + = Property changes on: branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jbos= s/portal/cms/hibernate/state/Base.java ___________________________________________________________________ Name: svn:keywords + = Modified: branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cm= s/hibernate/state/HibernatePersistenceManager.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cms/hibe= rnate/state/HibernatePersistenceManager.java 2007-10-27 23:01:46 UTC (rev 8= 784) +++ branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cms/hibe= rnate/state/HibernatePersistenceManager.java 2007-10-28 01:09:21 UTC (rev 8= 785) @@ -41,16 +41,15 @@ import org.apache.jackrabbit.core.state.util.Serializer; import org.apache.jackrabbit.core.value.BLOBFileValue; import org.apache.jackrabbit.core.value.InternalValue; - import org.hibernate.Hibernate; import org.hibernate.HibernateException; import org.hibernate.Query; import org.hibernate.Session; import org.hibernate.SessionFactory; import org.hibernate.Transaction; +import org.jboss.logging.Logger; import org.jboss.portal.cms.hibernate.HibernateStoreConstants; import org.jboss.portal.common.io.IOTools; -import org.jboss.logging.Logger; = import javax.jcr.PropertyType; import java.io.ByteArrayOutputStream; @@ -70,7 +69,7 @@ = /** Logger instance */ private static Logger log =3D Logger - .getLogger(HibernatePersistenceManager.class); + .getLogger(HibernatePersistenceManager.class); = protected static final String SCHEMA_OBJECT_PREFIX_VARIABLE =3D "${sche= maObjectPrefix}"; = @@ -121,10 +120,7 @@ /** file system where BLOB data is stored (if externalBLOBs=3D=3D= true) */ protected FileSystem blobFS; = - /** - * BLOBStore that manages BLOB data in the file system (if - * externalBLOBs=3D=3Dtrue) - */ + /** BLOBStore that manages BLOB data in the file system (if exter= nalBLOBs=3D=3Dtrue) */ protected BLOBStore blobStore; = /** Creates a new SimpleDbPersistenceManager instance. */ @@ -138,7 +134,7 @@ // ---------------------------------------------------< PersistenceMana= ger > = /** - * = + * */ public void init(PMContext context) throws Exception { @@ -150,30 +146,30 @@ // hibernateSessionFactory =3D HibernateUtil.getSessionFactory(jndiN= ame); org.jboss.portal.cms.hibernate.state.Tools.init(jndiName); hibernateSessionFactory =3D org.jboss.portal.cms.hibernate.state.Too= ls - .getSessionFactory(); + .getSessionFactory(); = nodeBinValSelect =3D "from " + schemaObjectPrefix - + "BinVal where BINVAL_ID =3D ?"; + + "BinVal where BINVAL_ID =3D ?"; = nodeStateSelect =3D "from " + schemaObjectPrefix + "Node where NODE_= ID =3D ?"; nodeStateSelectData =3D "select data from " + schemaObjectPrefix - + "Node where NODE_ID =3D ?"; + + "Node where NODE_ID =3D ?"; nodeStateSelectExist =3D "select 1 from " + schemaObjectPrefix - + "Node where NODE_ID =3D ?"; + + "Node where NODE_ID =3D ?"; = propertyStateSelect =3D "from " + schemaObjectPrefix - + "Prop where PROP_ID =3D ?"; + + "Prop where PROP_ID =3D ?"; propertyStateSelectData =3D "select data from " + schemaObjectPrefix - + "Prop where PROP_ID =3D ?"; + + "Prop where PROP_ID =3D ?"; propertyStateSelectExist =3D "select 1 from " + schemaObjectPrefix - + "Prop where PROP_ID =3D ?"; + + "Prop where PROP_ID =3D ?"; = nodeReferenceSelect =3D "from " + schemaObjectPrefix - + "Refs where NODE_ID =3D ?"; + + "Refs where NODE_ID =3D ?"; nodeReferenceSelectData =3D "select data from " + schemaObjectPrefix - + "Refs where NODE_ID =3D ?"; + + "Refs where NODE_ID =3D ?"; nodeReferenceSelectExist =3D "select 1 from " + schemaObjectPrefix - + "Refs where NODE_ID =3D ?"; + + "Refs where NODE_ID =3D ?"; = if (externalBLOBs) { @@ -195,11 +191,11 @@ blobStore =3D new DbBLOBStore(); = blobSelect =3D "from " + schemaObjectPrefix - + "BinVal where BINVAL_ID =3D ?"; + + "BinVal where BINVAL_ID =3D ?"; blobSelectData =3D "select data from " + schemaObjectPrefix - + "BinVal where BINVAL_ID =3D ?"; + + "BinVal where BINVAL_ID =3D ?"; blobSelectExist =3D "select 1 from " + schemaObjectPrefix - + "BinVal where BINVAL_ID =3D ?"; + + "BinVal where BINVAL_ID =3D ?"; } = initialized =3D true; @@ -208,7 +204,7 @@ // ---------------------------------------------------< PersistenceMana= ger > = /** - * = + * */ public void close() throws Exception { @@ -322,46 +318,46 @@ Iterator iter =3D changeLog.deletedStates(); while (iter.hasNext()) { - ItemState state =3D (ItemState) iter.next(); + ItemState state =3D (ItemState)iter.next(); if (state.isNode()) { - destroy((NodeState) state); + destroy((NodeState)state); } else { - destroy((PropertyState) state); + destroy((PropertyState)state); } } iter =3D changeLog.addedStates(); while (iter.hasNext()) { - ItemState state =3D (ItemState) iter.next(); + ItemState state =3D (ItemState)iter.next(); if (state.isNode()) { - store((NodeState) state); + store((NodeState)state); } else { - store((PropertyState) state); + store((PropertyState)state); } } iter =3D changeLog.modifiedStates(); while (iter.hasNext()) { - ItemState state =3D (ItemState) iter.next(); + ItemState state =3D (ItemState)iter.next(); if (state.isNode()) { - update((NodeState) state); + update((NodeState)state); } else { - update((PropertyState) state); + update((PropertyState)state); } } iter =3D changeLog.modifiedRefs(); while (iter.hasNext()) { - NodeReferences refs =3D (NodeReferences) iter.next(); + NodeReferences refs =3D (NodeReferences)iter.next(); if (refs.hasReferences()) { store(refs); @@ -377,7 +373,7 @@ } = public NodeState load(NodeId id) throws NoSuchItemStateException, - ItemStateException + ItemStateException { if (!initialized) { @@ -391,13 +387,13 @@ try { List rs =3D session.createQuery(nodeStateSelectData).setString(0, - id.toString()).list(); + id.toString()).list(); = Iterator iter =3D rs.iterator(); = // java.sql.Blob blob =3D (java.sql.Blob) iter.next(); // in =3D blob.getBinaryStream(); - byte[] data =3D (byte[]) iter.next(); + byte[] data =3D (byte[])iter.next(); in =3D new java.io.ByteArrayInputStream(data); = NodeState state =3D createNew(id); @@ -411,7 +407,7 @@ tx.rollback(); if (e instanceof NoSuchItemStateException) { - throw (NoSuchItemStateException) e; + throw (NoSuchItemStateException)e; } String msg =3D "failed to read node state: " + id; log.error(msg, e); @@ -424,7 +420,7 @@ } = public PropertyState load(PropertyId id) throws NoSuchItemStateExceptio= n, - ItemStateException + ItemStateException { if (!initialized) { @@ -438,12 +434,12 @@ try { List rs =3D session.createQuery(propertyStateSelectData).setCache= able( - true).setString(0, id.toString()).list(); + true).setString(0, id.toString()).list(); Iterator iter =3D rs.iterator(); = // java.sql.Blob blob =3D (java.sql.Blob) iter.next(); // in =3D blob.getBinaryStream(); - byte[] data =3D (byte[]) iter.next(); + byte[] data =3D (byte[])iter.next(); in =3D new java.io.ByteArrayInputStream(data); = PropertyState state =3D createNew(id); @@ -457,7 +453,7 @@ tx.rollback(); if (e instanceof NoSuchItemStateException) { - throw (NoSuchItemStateException) e; + throw (NoSuchItemStateException)e; } String msg =3D "failed to read property state: " + id.toString(); log.error(msg, e); @@ -470,10 +466,10 @@ } = /** - * = + * */ public NodeReferences load(NodeReferencesId targetId) - throws NoSuchItemStateException, ItemStateException + throws NoSuchItemStateException, ItemStateException { if (!initialized) { @@ -486,13 +482,13 @@ try { List rs =3D session.createQuery(nodeReferenceSelectData).setCache= able( - true).setString(0, targetId.toString()).list(); + true).setString(0, targetId.toString()).list(); Iterator iter =3D rs.iterator(); if (!iter.hasNext()) { throw new NoSuchItemStateException(targetId.toString()); } - byte[] data =3D (byte[]) iter.next(); + byte[] data =3D (byte[])iter.next(); in =3D new java.io.ByteArrayInputStream(data); = NodeReferences refs =3D new NodeReferences(targetId); @@ -506,7 +502,7 @@ tx.rollback(); if (e instanceof NoSuchItemStateException) { - throw (NoSuchItemStateException) e; + throw (NoSuchItemStateException)e; } String msg =3D "failed to read references: " + targetId; log.error(msg, e); @@ -533,18 +529,18 @@ { Serializer.serialize(state, out); if (schemaObjectPrefix - .equalsIgnoreCase(HibernateStoreConstants.versionPrefix)) + .equalsIgnoreCase(HibernateStoreConstants.versionPrefix)) { VersionNode versionNode =3D new VersionNode(state.getId().toSt= ring(), - out.toByteArray()); + out.toByteArray()); session.save(versionNode); } else if (schemaObjectPrefix - .equalsIgnoreCase(HibernateStoreConstants.wspPrefix)) + .equalsIgnoreCase(HibernateStoreConstants.wspPrefix)) { = WSPNode wspNode =3D new WSPNode(state.getId().toString(), out - .toByteArray()); + .toByteArray()); session.save(wspNode); } } @@ -589,19 +585,19 @@ { Serializer.serialize(refs, out); if (schemaObjectPrefix - .equalsIgnoreCase(HibernateStoreConstants.versionPrefix)) + .equalsIgnoreCase(HibernateStoreConstants.versionPrefix)) { = VersionRefs versionRefs =3D new VersionRefs(refs.getTargetId() - .toString(), out.toByteArray()); + .toString(), out.toByteArray()); session.save(versionRefs); } else if (schemaObjectPrefix - .equalsIgnoreCase(HibernateStoreConstants.wspPrefix)) + .equalsIgnoreCase(HibernateStoreConstants.wspPrefix)) { = WSPRefs wspRefs =3D new WSPRefs(refs.getTargetId().toString(),= out - .toByteArray()); + .toByteArray()); session.save(wspRefs); } } @@ -626,11 +622,9 @@ } = /** - *

This method uses shared PreparedStatements which m= ust - * be executed strictly sequentially. Because this method synchronizes = on the - * persistence manager instance there is no need to synchronize on the = shared - * statement. If the method would not be sychronized the shared stateme= nts - * would have to be synchronized. + *

This method uses shared PreparedStatements which m= ust be executed strictly sequentially. Because + * this method synchronizes on the persistence manager instance there i= s no need to synchronize on the shared + * statement. If the method would not be sychronized the shared stateme= nts would have to be synchronized. */ // public synchronized void store(PropertyState state) private void store(PropertyState state) throws ItemStateException @@ -649,17 +643,17 @@ Serializer.serialize(state, out, blobStore); = if (schemaObjectPrefix - .equalsIgnoreCase(HibernateStoreConstants.versionPrefix)) + .equalsIgnoreCase(HibernateStoreConstants.versionPrefix)) { VersionProp versionProp =3D new VersionProp(state.getId().toSt= ring(), - out.toByteArray()); + out.toByteArray()); session.save(versionProp); } else if (schemaObjectPrefix - .equalsIgnoreCase(HibernateStoreConstants.wspPrefix)) + .equalsIgnoreCase(HibernateStoreConstants.wspPrefix)) { WSPProp wspProp =3D new WSPProp(state.getId().toString(), out - .toByteArray()); + .toByteArray()); session.save(wspProp); } } @@ -700,10 +694,10 @@ = Query query =3D session.createQuery(nodeStateSelect).setCacheable= (true); if (schemaObjectPrefix - .equalsIgnoreCase(HibernateStoreConstants.versionPrefix)) + .equalsIgnoreCase(HibernateStoreConstants.versionPrefix)) { query.setString(0, state.getId().toString()); - VersionNode versionNode =3D (VersionNode) query.uniqueResult(); + VersionNode versionNode =3D (VersionNode)query.uniqueResult(); if (versionNode =3D=3D null) { throw new Exception("No such Node: " + state.getId()); @@ -711,10 +705,10 @@ versionNode.setData(out.toByteArray()); } else if (schemaObjectPrefix - .equalsIgnoreCase(HibernateStoreConstants.wspPrefix)) + .equalsIgnoreCase(HibernateStoreConstants.wspPrefix)) { query.setString(0, state.getId().toString()); - WSPNode wspNode =3D (WSPNode) query.uniqueResult(); + WSPNode wspNode =3D (WSPNode)query.uniqueResult(); if (wspNode =3D=3D null) { throw new Exception("No such Node: " + state.getId()); @@ -758,12 +752,12 @@ Serializer.serialize(state, out, blobStore); = Query query =3D session.createQuery(propertyStateSelect).setCache= able( - true); + true); if (schemaObjectPrefix - .equalsIgnoreCase(HibernateStoreConstants.versionPrefix)) + .equalsIgnoreCase(HibernateStoreConstants.versionPrefix)) { query.setString(0, state.getId().toString()); - VersionProp versionProp =3D (VersionProp) query.uniqueResult(); + VersionProp versionProp =3D (VersionProp)query.uniqueResult(); if (versionProp =3D=3D null) { throw new Exception("No such Property: " + state.getId()); @@ -771,10 +765,10 @@ versionProp.setData(out.toByteArray()); } else if (schemaObjectPrefix - .equalsIgnoreCase(HibernateStoreConstants.wspPrefix)) + .equalsIgnoreCase(HibernateStoreConstants.wspPrefix)) { query.setString(0, state.getId().toString()); - WSPProp wspProp =3D (WSPProp) query.uniqueResult(); + WSPProp wspProp =3D (WSPProp)query.uniqueResult(); if (wspProp =3D=3D null) { throw new Exception("No such Property: " + state.getId()); @@ -814,7 +808,7 @@ try { Query query =3D session.createQuery(nodeStateSelect).setCacheable= (true) - .setString(0, state.getId().toString()); + .setString(0, state.getId().toString()); Object result =3D query.uniqueResult(); if (result !=3D null) { @@ -848,12 +842,12 @@ { if (val.getType() =3D=3D PropertyType.BINARY) { - BLOBFileValue blobVal =3D (BLOBFileValue) val.internalVa= lue(); + BLOBFileValue blobVal =3D (BLOBFileValue)val.internalVal= ue(); // delete internal resource representation of BLOB value blobVal.delete(true); // also remove from BLOBStore String blobId =3D blobStore.createId( - (PropertyId) state.getId(), i); + (PropertyId)state.getId(), i); try { blobStore.remove(blobId); @@ -873,7 +867,7 @@ try { Query query =3D session.createQuery(propertyStateSelect).setCache= able( - true).setString(0, state.getId().toString()); + true).setString(0, state.getId().toString()); Object result =3D query.uniqueResult(); if (result !=3D null) { @@ -891,7 +885,7 @@ } = /** - * = + * */ private void destroy(NodeReferences refs) throws ItemStateException { @@ -904,7 +898,7 @@ try { Query query =3D session.createQuery(nodeReferenceSelect).setCache= able( - true).setString(0, refs.getTargetId().toString()); + true).setString(0, refs.getTargetId().toString()); = List list =3D query.list(); if (list =3D=3D null) @@ -932,7 +926,7 @@ } = /** - * = + * */ public boolean exists(NodeId id) throws ItemStateException { @@ -940,7 +934,7 @@ } = /** - * = + * */ protected boolean exists(String blobid) throws ItemStateException { @@ -948,7 +942,7 @@ } = /** - * = + * */ public boolean exists(PropertyId id) throws ItemStateException { @@ -956,7 +950,7 @@ } = /** - * = + * */ public boolean exists(NodeReferencesId targetId) throws ItemStateExcept= ion { @@ -974,7 +968,7 @@ try { List rs =3D session.createQuery(query).setCacheable(true).setStri= ng(0, - id).list(); + id).list(); Iterator iter =3D rs.iterator(); return iter.hasNext(); } @@ -1009,7 +1003,7 @@ { = /** - * = + * */ public String createId(PropertyId id, int index) { @@ -1023,7 +1017,7 @@ } = /** - * = + * */ public InputStream get(String blobId) throws Exception { @@ -1032,7 +1026,7 @@ { List rs =3D session.createQuery(blobSelectData).setString(0, b= lobId).list(); Iterator iter =3D rs.iterator(); - java.sql.Blob blob =3D (java.sql.Blob) iter.next(); + java.sql.Blob blob =3D (java.sql.Blob)iter.next(); InputStream is =3D blob.getBinaryStream(); return is; } @@ -1040,7 +1034,7 @@ { if (e instanceof NoSuchItemStateException) { - throw (NoSuchItemStateException) e; + throw (NoSuchItemStateException)e; } String msg =3D "failed to read binary data: " + blobId; log.error(msg, e); @@ -1049,10 +1043,10 @@ } = /** - * = + * */ public void put(String blobId, InputStream in, long size) - throws Exception + throws Exception { boolean update =3D exists(blobId); = @@ -1065,11 +1059,11 @@ = Query query =3D session.createQuery(blobSelect); if (schemaObjectPrefix - .equalsIgnoreCase(HibernateStoreConstants.versionPref= ix)) + .equalsIgnoreCase(HibernateStoreConstants.versionPrefix)) { query.setString(0, blobId); - VersionBinVal versionNode =3D (VersionBinVal) query - .uniqueResult(); + VersionBinVal versionNode =3D (VersionBinVal)query + .uniqueResult(); if (versionNode =3D=3D null) { throw new Exception("No such Node: " + blobId); @@ -1078,10 +1072,10 @@ versionNode.setData(Hibernate.createBlob(in)); } else if (schemaObjectPrefix - .equalsIgnoreCase(HibernateStoreConstants.wspPrefix)) + .equalsIgnoreCase(HibernateStoreConstants.wspPrefix)) { query.setString(0, blobId); - WSPBinVal wspNode =3D (WSPBinVal) query.uniqueResult(); + WSPBinVal wspNode =3D (WSPBinVal)query.uniqueResult(); if (wspNode =3D=3D null) { throw new Exception("No such Node: " + blobId); @@ -1108,17 +1102,17 @@ { = if (schemaObjectPrefix - .equalsIgnoreCase(HibernateStoreConstants.versionPref= ix)) + .equalsIgnoreCase(HibernateStoreConstants.versionPrefix)) { VersionBinVal versionNode =3D new VersionBinVal(blobId, - Hibernate.createBlob(in)); + Hibernate.createBlob(in)); session.save(versionNode); } else if (schemaObjectPrefix - .equalsIgnoreCase(HibernateStoreConstants.wspPrefix)) + .equalsIgnoreCase(HibernateStoreConstants.wspPrefix)) { WSPBinVal wspNode =3D new WSPBinVal(blobId, Hibernate - .createBlob(in)); + .createBlob(in)); session.save(wspNode); } } @@ -1136,7 +1130,7 @@ } = /** - * = + * */ // public synchronized boolean remove(String blobId) throws Exception public boolean remove(String blobId) throws Exception Property changes on: branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jbos= s/portal/cms/hibernate/state/HibernatePersistenceManager.java ___________________________________________________________________ Name: svn:keywords - Author Date Id Revision + = Modified: branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cm= s/hibernate/state/JBossCachePersistenceManager.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cms/hibe= rnate/state/JBossCachePersistenceManager.java 2007-10-27 23:01:46 UTC (rev = 8784) +++ branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cms/hibe= rnate/state/JBossCachePersistenceManager.java 2007-10-28 01:09:21 UTC (rev = 8785) @@ -41,7 +41,6 @@ import org.apache.jackrabbit.core.state.util.Serializer; import org.apache.jackrabbit.core.value.BLOBFileValue; import org.apache.jackrabbit.core.value.InternalValue; - import org.hibernate.Hibernate; import org.hibernate.Query; import org.hibernate.Session; @@ -50,15 +49,14 @@ import org.jboss.cache.PropertyConfigurator; import org.jboss.cache.TreeCache; import org.jboss.cache.TreeCacheMBean; +import org.jboss.logging.Logger; import org.jboss.mx.util.MBeanProxyExt; import org.jboss.mx.util.MBeanServerLocator; import org.jboss.portal.cms.hibernate.HibernateStoreConstants; import org.jboss.portal.common.io.IOTools; -import org.jboss.logging.Logger; = import javax.jcr.PropertyType; import javax.management.MBeanServer; - import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import java.io.File; @@ -77,7 +75,7 @@ { /** Logger instance */ private static Logger log =3D Logger - .getLogger(JBossCachePersistenceManager.class); + .getLogger(JBossCachePersistenceManager.class); = protected static final String SCHEMA_OBJECT_PREFIX_VARIABLE =3D "${sche= maObjectPrefix}"; = @@ -105,27 +103,22 @@ /** file system where BLOB data is stored (if externalBLOBs=3D=3D= true) */ protected FileSystem blobFS =3D null; = - /** - * BLOBStore that manages BLOB data in the file system (if - * externalBLOBs=3D=3Dtrue) - */ + /** BLOBStore that manages BLOB data in the file system (if exter= nalBLOBs=3D=3Dtrue) */ protected BLOBStore blobStore =3D null; = /** - * JackRabbit initalizes multiple instances of the Persistence Manager = to - * perform its operations. A static TreeCache is used to make sure ther= e is - * only once instance of the cache per VM where the CMS node runs. - * = - * One side effect of using a static instance is proper cleanup which is - * addressed in the close method + * JackRabbit initalizes multiple instances of the Persistence Manager = to perform its operations. A static TreeCache + * is used to make sure there is only once instance of the cache per VM= where the CMS node runs. + *

+ * One side effect of using a static instance is proper cleanup which i= s addressed in the close method */ private static TreeCacheMBean pmCache =3D null; = private static boolean preloaded =3D false; = /** - * = - * = + * + * */ public JBossCachePersistenceManager() { @@ -181,7 +174,7 @@ } = nodeBinValSelect =3D "from " + schemaObjectPrefix - + "BinVal where BINVAL_ID =3D ?"; + + "BinVal where BINVAL_ID =3D ?"; = if (externalBLOBs) { @@ -203,11 +196,11 @@ blobStore =3D new DbBLOBStore(); = blobSelect =3D "from " + schemaObjectPrefix - + "BinVal where BINVAL_ID =3D ?"; + + "BinVal where BINVAL_ID =3D ?"; blobSelectData =3D "select data from " + schemaObjectPrefix - + "BinVal where BINVAL_ID =3D ?"; + + "BinVal where BINVAL_ID =3D ?"; blobSelectExist =3D "select 1 from " + schemaObjectPrefix - + "BinVal where BINVAL_ID =3D ?"; + + "BinVal where BINVAL_ID =3D ?"; } = initialized =3D true; @@ -234,9 +227,9 @@ try { MBeanServer server =3D MBeanServerLocator.locateJBoss(); - pmCache =3D (TreeCacheMBean) MBeanProxyExt.create( - TreeCacheMBean.class, "cms.pm.cache:service=3DTreeCac= he", - server); + pmCache =3D (TreeCacheMBean)MBeanProxyExt.create( + TreeCacheMBean.class, "cms.pm.cache:service=3DTreeCache", + server); } catch (Exception e) { @@ -255,7 +248,7 @@ // configure the cache PropertyConfigurator configurator =3D new PropertyConfig= urator(); is =3D JBossCachePersistenceManager.class.getClassLoader= () - .getResourceAsStream("pm-cache.xml"); + .getResourceAsStream("pm-cache.xml"); configurator.configure(pmCache, is); = pmCache.createService(); @@ -287,8 +280,8 @@ } = /** - * = - * = + * + * */ private static synchronized void loadProperties() throws Exception { @@ -298,25 +291,25 @@ } = log - .info("Pre-loading the PersistenceManager Cache in the backgro= und (started)......."); + .info("Pre-loading the PersistenceManager Cache in the background= (started)......."); = CacheLoader wspProp =3D new CacheLoader(CacheLoader.wspProp, - PortalCMSCacheLoader.WSP_PROP_NODE); + PortalCMSCacheLoader.WSP_PROP_NODE); Thread wspPropLoader =3D new Thread(wspProp); CacheLoader versionProp =3D new CacheLoader(CacheLoader.versionProp, - PortalCMSCacheLoader.VERSION_PROP_NODE); + PortalCMSCacheLoader.VERSION_PROP_NODE); Thread versionPropLoader =3D new Thread(versionProp); CacheLoader wspNode =3D new CacheLoader(CacheLoader.wspNode, - PortalCMSCacheLoader.WSP_NODE_NODE); + PortalCMSCacheLoader.WSP_NODE_NODE); Thread wspNodeLoader =3D new Thread(wspNode); CacheLoader versionNode =3D new CacheLoader(CacheLoader.versionNode, - PortalCMSCacheLoader.VERSION_NODE_NODE); + PortalCMSCacheLoader.VERSION_NODE_NODE); Thread versionNodeLoader =3D new Thread(versionNode); CacheLoader wspRef =3D new CacheLoader(CacheLoader.wspRef, - PortalCMSCacheLoader.WSP_REF_NODE); + PortalCMSCacheLoader.WSP_REF_NODE); Thread wspRefLoader =3D new Thread(wspRef); CacheLoader versionRef =3D new CacheLoader(CacheLoader.versionRef, - PortalCMSCacheLoader.VERSION_REF_NODE); + PortalCMSCacheLoader.VERSION_REF_NODE); Thread versionRefLoader =3D new Thread(versionRef); = wspPropLoader.start(); @@ -331,9 +324,9 @@ // of the CMS...don't allow the usage of CMS till this operation is // completed. while (!wspProp.done || !versionProp.done || !wspNode.done - || !versionNode.done || !wspRef.done || !versionRef.done) + || !versionNode.done || !wspRef.done || !versionRef.done) { - Thread.currentThread().sleep((long) 2000); + Thread.currentThread().sleep((long)2000); } = JBossCachePersistenceManager.preloaded =3D true; @@ -342,7 +335,7 @@ private static class CacheLoader implements Runnable { /** - * = + * */ private static final String wspProp =3D "from org.jboss.portal.cms.h= ibernate.state.WSPProp"; = @@ -357,7 +350,7 @@ private static final String versionRef =3D "from org.jboss.portal.cm= s.hibernate.state.VersionRefs"; = /** - * = + * */ private String nodeQuery =3D null; = @@ -382,63 +375,63 @@ { for (Iterator itr =3D rs.iterator(); itr.hasNext();) { - Base cour =3D (Base) itr.next(); + Base cour =3D (Base)itr.next(); cour.disableCacheItemPersistence(); = if (cour instanceof WSPProp) { String node =3D this.nodePrefix - + "/" - + PortalCMSCacheLoader - .parseNodeName(((WSPProp) cour).getPropId= ()); - pmCache.put(node, ((WSPProp) cour).getPropId(), cour); + + "/" + + PortalCMSCacheLoader + .parseNodeName(((WSPProp)cour).getPropId()); + pmCache.put(node, ((WSPProp)cour).getPropId(), cour); } else if (cour instanceof VersionProp) { String node =3D this.nodePrefix - + "/" - + PortalCMSCacheLoader - .parseNodeName(((VersionProp) cour) - .getPropId()); - pmCache.put(node, ((VersionProp) cour).getPropId(), c= our); + + "/" + + PortalCMSCacheLoader + .parseNodeName(((VersionProp)cour) + .getPropId()); + pmCache.put(node, ((VersionProp)cour).getPropId(), co= ur); } else if (cour instanceof WSPNode) { String node =3D this.nodePrefix - + "/" - + PortalCMSCacheLoader - .parseNodeName(((WSPNode) cour).getNodeId= ()); - pmCache.put(node, ((WSPNode) cour).getNodeId(), cour); + + "/" + + PortalCMSCacheLoader + .parseNodeName(((WSPNode)cour).getNodeId()); + pmCache.put(node, ((WSPNode)cour).getNodeId(), cour); } else if (cour instanceof VersionNode) { String node =3D this.nodePrefix - + "/" - + PortalCMSCacheLoader - .parseNodeName(((VersionNode) cour) - .getNodeId()); - pmCache.put(node, ((VersionNode) cour).getNodeId(), c= our); + + "/" + + PortalCMSCacheLoader + .parseNodeName(((VersionNode)cour) + .getNodeId()); + pmCache.put(node, ((VersionNode)cour).getNodeId(), co= ur); } else if (cour instanceof WSPRefs) { String node =3D this.nodePrefix - + "/" - + PortalCMSCacheLoader - .parseNodeName(((WSPRefs) cour).getRefId(= )); - pmCache.put(node, ((WSPRefs) cour).getRefId(), cour); + + "/" + + PortalCMSCacheLoader + .parseNodeName(((WSPRefs)cour).getRefId()); + pmCache.put(node, ((WSPRefs)cour).getRefId(), cour); } else if (cour instanceof VersionRefs) { String node =3D this.nodePrefix - + "/" - + PortalCMSCacheLoader - .parseNodeName(((VersionRefs) cour).getRe= fId()); - pmCache.put(node, ((VersionRefs) cour).getRefId(), co= ur); + + "/" + + PortalCMSCacheLoader + .parseNodeName(((VersionRefs)cour).getRefId()); + pmCache.put(node, ((VersionRefs)cour).getRefId(), cou= r); } } } log.info("Pre-loading the PersistenceManager Cache for" - + this.nodePrefix + " (finished)......."); + + this.nodePrefix + " (finished)......."); } catch (CacheException ce) { @@ -464,24 +457,24 @@ boolean exists =3D false; String nodeId =3D node.toString(); if (this.schemaObjectPrefix - .equalsIgnoreCase(HibernateStoreConstants.wspPrefix)) + .equalsIgnoreCase(HibernateStoreConstants.wspPrefix)) { Object o =3D this.pmCache.get(PortalCMSCacheLoader.WSP_NODE_NO= DE - + "/" + PortalCMSCacheLoader.parseNodeName(nodeId), node= Id); + + "/" + PortalCMSCacheLoader.parseNodeName(nodeId), nodeId); if (o !=3D null) { exists =3D true; - } = + } } else if (this.schemaObjectPrefix - .equalsIgnoreCase(HibernateStoreConstants.versionPrefix)) + .equalsIgnoreCase(HibernateStoreConstants.versionPrefix)) { Object o =3D this.pmCache.get(PortalCMSCacheLoader.VERSION_NOD= E_NODE - + "/" + PortalCMSCacheLoader.parseNodeName(nodeId), node= Id); + + "/" + PortalCMSCacheLoader.parseNodeName(nodeId), nodeId); if (o !=3D null) { exists =3D true; - } = + } } return exists; } @@ -495,7 +488,7 @@ * = */ public NodeState load(NodeId node) throws NoSuchItemStateException, - ItemStateException + ItemStateException { try { @@ -505,18 +498,18 @@ // get the nodeData byte[] nodeData =3D null; if (this.schemaObjectPrefix - .equalsIgnoreCase(HibernateStoreConstants.wspPrefix)) + .equalsIgnoreCase(HibernateStoreConstants.wspPrefix)) { Object o =3D this.pmCache.get(PortalCMSCacheLoader.WSP_NODE_NO= DE - + "/" + PortalCMSCacheLoader.parseNodeName(nodeId), node= Id); - nodeData =3D ((WSPNode) o).getData(); + + "/" + PortalCMSCacheLoader.parseNodeName(nodeId), nodeId); + nodeData =3D ((WSPNode)o).getData(); } else if (this.schemaObjectPrefix - .equalsIgnoreCase(HibernateStoreConstants.versionPrefix)) + .equalsIgnoreCase(HibernateStoreConstants.versionPrefix)) { Object o =3D this.pmCache.get(PortalCMSCacheLoader.VERSION_NOD= E_NODE - + "/" + PortalCMSCacheLoader.parseNodeName(nodeId), node= Id); - nodeData =3D ((VersionNode) o).getData(); + + "/" + PortalCMSCacheLoader.parseNodeName(nodeId), nodeId); + nodeData =3D ((VersionNode)o).getData(); } = // parse propertyData into propertyState @@ -544,10 +537,10 @@ { if (e instanceof NoSuchItemStateException) { - throw (NoSuchItemStateException) e; + throw (NoSuchItemStateException)e; } String msg =3D "failed to read node state from cache: " - + node.toString(); + + node.toString(); log.error(msg, e); throw new ItemStateException(msg, e); } @@ -570,8 +563,8 @@ } = /** - * = - * = + * + * */ private void store(NodeState state) throws ItemStateException { @@ -585,28 +578,28 @@ { Serializer.serialize(state, out); if (schemaObjectPrefix - .equalsIgnoreCase(HibernateStoreConstants.versionPrefix)) + .equalsIgnoreCase(HibernateStoreConstants.versionPrefix)) { VersionNode versionNode =3D new VersionNode(state.getId().toSt= ring(), - out.toByteArray()); + out.toByteArray()); = // place this in the cache versionNode.resetCacheItemPersistence(); String cacheNode =3D PortalCMSCacheLoader.VERSION_NODE_NODE + = "/" - + PortalCMSCacheLoader.parseNodeName(versionNode.getNode= Id()); + + PortalCMSCacheLoader.parseNodeName(versionNode.getNodeId(= )); pmCache.put(cacheNode, versionNode.getNodeId(), versionNode); } else if (schemaObjectPrefix - .equalsIgnoreCase(HibernateStoreConstants.wspPrefix)) + .equalsIgnoreCase(HibernateStoreConstants.wspPrefix)) { = WSPNode wspNode =3D new WSPNode(state.getId().toString(), out - .toByteArray()); + .toByteArray()); = // place this in the cache wspNode.resetCacheItemPersistence(); String cacheNode =3D PortalCMSCacheLoader.WSP_NODE_NODE + "/" - + PortalCMSCacheLoader.parseNodeName(wspNode.getNodeId()= ); + + PortalCMSCacheLoader.parseNodeName(wspNode.getNodeId()); pmCache.put(cacheNode, wspNode.getNodeId(), wspNode); } } @@ -630,8 +623,8 @@ } = /** - * = - * = + * + * */ private void update(NodeState state) throws ItemStateException { @@ -647,11 +640,11 @@ String id =3D state.getId().toString(); String cacheNodeName =3D PortalCMSCacheLoader.parseNodeName(id); if (schemaObjectPrefix - .equalsIgnoreCase(HibernateStoreConstants.versionPrefix)) + .equalsIgnoreCase(HibernateStoreConstants.versionPrefix)) { - VersionNode versionNode =3D (VersionNode) pmCache.get( - PortalCMSCacheLoader.VERSION_NODE_NODE + "/" + cacheNode= Name, - id); + VersionNode versionNode =3D (VersionNode)pmCache.get( + PortalCMSCacheLoader.VERSION_NODE_NODE + "/" + cacheNodeNam= e, + id); if (versionNode =3D=3D null) { throw new Exception("No such Node: " + state.getId()); @@ -659,13 +652,13 @@ versionNode.setData(out.toByteArray()); versionNode.resetCacheItemPersistence(); pmCache.put(PortalCMSCacheLoader.VERSION_NODE_NODE + "/" - + cacheNodeName, id, versionNode); + + cacheNodeName, id, versionNode); } else if (schemaObjectPrefix - .equalsIgnoreCase(HibernateStoreConstants.wspPrefix)) + .equalsIgnoreCase(HibernateStoreConstants.wspPrefix)) { - WSPNode wspNode =3D (WSPNode) pmCache.get( - PortalCMSCacheLoader.WSP_NODE_NODE + "/" + cacheNodeName= , id); + WSPNode wspNode =3D (WSPNode)pmCache.get( + PortalCMSCacheLoader.WSP_NODE_NODE + "/" + cacheNodeName, i= d); if (wspNode =3D=3D null) { throw new Exception("No such Node: " + state.getId()); @@ -673,7 +666,7 @@ wspNode.setData(out.toByteArray()); wspNode.resetCacheItemPersistence(); pmCache.put(PortalCMSCacheLoader.WSP_NODE_NODE + "/" - + cacheNodeName, id, wspNode); + + cacheNodeName, id, wspNode); } } catch (Exception e) @@ -708,16 +701,16 @@ try { if (schemaObjectPrefix - .equalsIgnoreCase(HibernateStoreConstants.versionPrefix)) + .equalsIgnoreCase(HibernateStoreConstants.versionPrefix)) { pmCache.remove(PortalCMSCacheLoader.VERSION_NODE_NODE + "/" - + cacheNodeName, id); + + cacheNodeName, id); } else if (schemaObjectPrefix - .equalsIgnoreCase(HibernateStoreConstants.wspPrefix)) + .equalsIgnoreCase(HibernateStoreConstants.wspPrefix)) { pmCache.remove(PortalCMSCacheLoader.WSP_NODE_NODE + "/" - + cacheNodeName, id); + + cacheNodeName, id); } } catch (Exception e) @@ -740,24 +733,24 @@ boolean exists =3D false; String propId =3D property.toString(); if (this.schemaObjectPrefix - .equalsIgnoreCase(HibernateStoreConstants.wspPrefix)) + .equalsIgnoreCase(HibernateStoreConstants.wspPrefix)) { Object o =3D this.pmCache.get(PortalCMSCacheLoader.WSP_PROP_NO= DE - + "/" + PortalCMSCacheLoader.parseNodeName(propId), prop= Id); + + "/" + PortalCMSCacheLoader.parseNodeName(propId), propId); if (o !=3D null) { exists =3D true; - } = + } } else if (this.schemaObjectPrefix - .equalsIgnoreCase(HibernateStoreConstants.versionPrefix)) + .equalsIgnoreCase(HibernateStoreConstants.versionPrefix)) { Object o =3D this.pmCache.get(PortalCMSCacheLoader.VERSION_PRO= P_NODE - + "/" + PortalCMSCacheLoader.parseNodeName(propId), prop= Id); + + "/" + PortalCMSCacheLoader.parseNodeName(propId), propId); if (o !=3D null) { exists =3D true; - } = + } } return exists; } @@ -771,7 +764,7 @@ * = */ public PropertyState load(PropertyId property) - throws NoSuchItemStateException, ItemStateException + throws NoSuchItemStateException, ItemStateException { try { @@ -781,18 +774,18 @@ // get the propertyData byte[] propertyData =3D null; if (this.schemaObjectPrefix - .equalsIgnoreCase(HibernateStoreConstants.wspPrefix)) + .equalsIgnoreCase(HibernateStoreConstants.wspPrefix)) { Object o =3D this.pmCache.get(PortalCMSCacheLoader.WSP_PROP_NO= DE - + "/" + PortalCMSCacheLoader.parseNodeName(propId), prop= Id); - propertyData =3D ((WSPProp) o).getData(); + + "/" + PortalCMSCacheLoader.parseNodeName(propId), propId); + propertyData =3D ((WSPProp)o).getData(); } else if (this.schemaObjectPrefix - .equalsIgnoreCase(HibernateStoreConstants.versionPrefix)) + .equalsIgnoreCase(HibernateStoreConstants.versionPrefix)) { Object o =3D this.pmCache.get(PortalCMSCacheLoader.VERSION_PRO= P_NODE - + "/" + PortalCMSCacheLoader.parseNodeName(propId), prop= Id); - propertyData =3D ((VersionProp) o).getData(); + + "/" + PortalCMSCacheLoader.parseNodeName(propId), propId); + propertyData =3D ((VersionProp)o).getData(); } = // parse propertyData into propertyState @@ -820,10 +813,10 @@ { if (e instanceof NoSuchItemStateException) { - throw (NoSuchItemStateException) e; + throw (NoSuchItemStateException)e; } String msg =3D "failed to read property state from cache: " - + property.toString(); + + property.toString(); log.error(msg, e); throw new ItemStateException(msg, e); } @@ -846,7 +839,7 @@ } = /** - * = + * */ private void store(PropertyState state) throws ItemStateException { @@ -860,28 +853,28 @@ { Serializer.serialize(state, out, blobStore); if (schemaObjectPrefix - .equalsIgnoreCase(HibernateStoreConstants.versionPrefix)) + .equalsIgnoreCase(HibernateStoreConstants.versionPrefix)) { VersionProp versionProp =3D new VersionProp(state.getId().toSt= ring(), - out.toByteArray()); + out.toByteArray()); = // place this in the cache versionProp.resetCacheItemPersistence(); String cacheNode =3D PortalCMSCacheLoader.VERSION_PROP_NODE + = "/" - + PortalCMSCacheLoader.parseNodeName(versionProp.getProp= Id()); + + PortalCMSCacheLoader.parseNodeName(versionProp.getPropId(= )); pmCache.put(cacheNode, versionProp.getPropId(), versionProp); } else if (schemaObjectPrefix - .equalsIgnoreCase(HibernateStoreConstants.wspPrefix)) + .equalsIgnoreCase(HibernateStoreConstants.wspPrefix)) { = WSPProp wspProp =3D new WSPProp(state.getId().toString(), out - .toByteArray()); + .toByteArray()); = // place this in the cache wspProp.resetCacheItemPersistence(); String cacheNode =3D PortalCMSCacheLoader.WSP_PROP_NODE + "/" - + PortalCMSCacheLoader.parseNodeName(wspProp.getPropId()= ); + + PortalCMSCacheLoader.parseNodeName(wspProp.getPropId()); pmCache.put(cacheNode, wspProp.getPropId(), wspProp); } } @@ -905,8 +898,8 @@ } = /** - * = - * = + * + * */ private void update(PropertyState state) throws ItemStateException { @@ -922,11 +915,11 @@ String id =3D state.getId().toString(); String cacheNodeName =3D PortalCMSCacheLoader.parseNodeName(id); if (schemaObjectPrefix - .equalsIgnoreCase(HibernateStoreConstants.versionPrefix)) + .equalsIgnoreCase(HibernateStoreConstants.versionPrefix)) { - VersionProp versionProp =3D (VersionProp) pmCache.get( - PortalCMSCacheLoader.VERSION_PROP_NODE + "/" + cacheNode= Name, - id); + VersionProp versionProp =3D (VersionProp)pmCache.get( + PortalCMSCacheLoader.VERSION_PROP_NODE + "/" + cacheNodeNam= e, + id); if (versionProp =3D=3D null) { throw new Exception("No such Property: " + state.getId()); @@ -934,13 +927,13 @@ versionProp.setData(out.toByteArray()); versionProp.resetCacheItemPersistence(); pmCache.put(PortalCMSCacheLoader.VERSION_PROP_NODE + "/" - + cacheNodeName, id, versionProp); + + cacheNodeName, id, versionProp); } else if (schemaObjectPrefix - .equalsIgnoreCase(HibernateStoreConstants.wspPrefix)) + .equalsIgnoreCase(HibernateStoreConstants.wspPrefix)) { - WSPProp wspProp =3D (WSPProp) pmCache.get( - PortalCMSCacheLoader.WSP_PROP_NODE + "/" + cacheNodeName= , id); + WSPProp wspProp =3D (WSPProp)pmCache.get( + PortalCMSCacheLoader.WSP_PROP_NODE + "/" + cacheNodeName, i= d); if (wspProp =3D=3D null) { throw new Exception("No such Property: " + state.getId()); @@ -948,7 +941,7 @@ wspProp.setData(out.toByteArray()); wspProp.resetCacheItemPersistence(); pmCache.put(PortalCMSCacheLoader.WSP_PROP_NODE + "/" - + cacheNodeName, id, wspProp); + + cacheNodeName, id, wspProp); } } catch (Exception e) @@ -989,12 +982,12 @@ { if (val.getType() =3D=3D PropertyType.BINARY) { - BLOBFileValue blobVal =3D (BLOBFileValue) val.internalVa= lue(); + BLOBFileValue blobVal =3D (BLOBFileValue)val.internalVal= ue(); // delete internal resource representation of BLOB value blobVal.delete(true); // also remove from BLOBStore String blobId =3D blobStore.createId( - (PropertyId) state.getId(), i); + (PropertyId)state.getId(), i); try { blobStore.remove(blobId); @@ -1014,16 +1007,16 @@ try { if (schemaObjectPrefix - .equalsIgnoreCase(HibernateStoreConstants.versionPrefix)) + .equalsIgnoreCase(HibernateStoreConstants.versionPrefix)) { pmCache.remove(PortalCMSCacheLoader.VERSION_PROP_NODE + "/" - + cacheNodeName, id); + + cacheNodeName, id); } else if (schemaObjectPrefix - .equalsIgnoreCase(HibernateStoreConstants.wspPrefix)) + .equalsIgnoreCase(HibernateStoreConstants.wspPrefix)) { pmCache.remove(PortalCMSCacheLoader.WSP_PROP_NODE + "/" - + cacheNodeName, id); + + cacheNodeName, id); } } catch (Exception e) @@ -1037,7 +1030,7 @@ // ----------actions for nodereferences // entities------------------------------------------------------------= ------------------------------------------------- /** - * = + * */ public boolean exists(NodeReferencesId targetId) throws ItemStateExcept= ion { @@ -1046,24 +1039,24 @@ boolean exists =3D false; String nodeId =3D targetId.toString(); if (this.schemaObjectPrefix - .equalsIgnoreCase(HibernateStoreConstants.wspPrefix)) + .equalsIgnoreCase(HibernateStoreConstants.wspPrefix)) { Object o =3D this.pmCache.get(PortalCMSCacheLoader.WSP_REF_NOD= E + "/" - + PortalCMSCacheLoader.parseNodeName(nodeId), nodeId); + + PortalCMSCacheLoader.parseNodeName(nodeId), nodeId); if (o !=3D null) { exists =3D true; - } = + } } else if (this.schemaObjectPrefix - .equalsIgnoreCase(HibernateStoreConstants.versionPrefix)) + .equalsIgnoreCase(HibernateStoreConstants.versionPrefix)) { Object o =3D this.pmCache.get(PortalCMSCacheLoader.VERSION_REF= _NODE - + "/" + PortalCMSCacheLoader.parseNodeName(nodeId), node= Id); + + "/" + PortalCMSCacheLoader.parseNodeName(nodeId), nodeId); if (o !=3D null) { exists =3D true; - } = + } } return exists; } @@ -1074,10 +1067,10 @@ } = /** - * = + * */ public NodeReferences load(NodeReferencesId targetId) - throws NoSuchItemStateException, ItemStateException + throws NoSuchItemStateException, ItemStateException { try { @@ -1087,26 +1080,26 @@ // get the nodeData byte[] nodeData =3D null; if (this.schemaObjectPrefix - .equalsIgnoreCase(HibernateStoreConstants.wspPrefix)) + .equalsIgnoreCase(HibernateStoreConstants.wspPrefix)) { Object o =3D this.pmCache.get(PortalCMSCacheLoader.WSP_REF_NOD= E + "/" - + PortalCMSCacheLoader.parseNodeName(nodeId), nodeId); + + PortalCMSCacheLoader.parseNodeName(nodeId), nodeId); if (o =3D=3D null || !(o instanceof Base)) { throw new NoSuchItemStateException(targetId.toString()); } - nodeData =3D ((WSPRefs) o).getData(); + nodeData =3D ((WSPRefs)o).getData(); } else if (this.schemaObjectPrefix - .equalsIgnoreCase(HibernateStoreConstants.versionPrefix)) + .equalsIgnoreCase(HibernateStoreConstants.versionPrefix)) { Object o =3D this.pmCache.get(PortalCMSCacheLoader.VERSION_REF= _NODE - + "/" + PortalCMSCacheLoader.parseNodeName(nodeId), node= Id); + + "/" + PortalCMSCacheLoader.parseNodeName(nodeId), nodeId); if (o =3D=3D null || !(o instanceof Base)) { throw new NoSuchItemStateException(targetId.toString()); } - nodeData =3D ((VersionRefs) o).getData(); + nodeData =3D ((VersionRefs)o).getData(); } = // parse propertyData into propertyState @@ -1134,10 +1127,10 @@ { if (e instanceof NoSuchItemStateException) { - throw (NoSuchItemStateException) e; + throw (NoSuchItemStateException)e; } String msg =3D "failed to read reference from cache: " - + targetId.toString(); + + targetId.toString(); log.error(msg, e); throw new ItemStateException(msg, e); } @@ -1160,8 +1153,8 @@ } = /** - * = - * = + * + * */ private void store(NodeReferences refs) throws ItemStateException { @@ -1175,28 +1168,28 @@ { Serializer.serialize(refs, out); if (schemaObjectPrefix - .equalsIgnoreCase(HibernateStoreConstants.versionPrefix)) + .equalsIgnoreCase(HibernateStoreConstants.versionPrefix)) { VersionRefs versionRefs =3D new VersionRefs(refs.getId().toStr= ing(), - out.toByteArray()); + out.toByteArray()); = // place this in the cache versionRefs.resetCacheItemPersistence(); String cacheNode =3D PortalCMSCacheLoader.VERSION_REF_NODE + "= /" - + PortalCMSCacheLoader.parseNodeName(versionRefs.getRefI= d()); + + PortalCMSCacheLoader.parseNodeName(versionRefs.getRefId()= ); pmCache.put(cacheNode, versionRefs.getRefId(), versionRefs); } else if (schemaObjectPrefix - .equalsIgnoreCase(HibernateStoreConstants.wspPrefix)) + .equalsIgnoreCase(HibernateStoreConstants.wspPrefix)) { = WSPRefs wspRefs =3D new WSPRefs(refs.getId().toString(), out - .toByteArray()); + .toByteArray()); = // place this in the cache wspRefs.resetCacheItemPersistence(); String cacheNode =3D PortalCMSCacheLoader.WSP_REF_NODE + "/" - + PortalCMSCacheLoader.parseNodeName(wspRefs.getRefId()); + + PortalCMSCacheLoader.parseNodeName(wspRefs.getRefId()); pmCache.put(cacheNode, wspRefs.getRefId(), wspRefs); } } @@ -1220,7 +1213,7 @@ } = /** - * = + * */ private void destroy(NodeReferences refs) throws ItemStateException { @@ -1234,16 +1227,16 @@ try { if (schemaObjectPrefix - .equalsIgnoreCase(HibernateStoreConstants.versionPrefix)) + .equalsIgnoreCase(HibernateStoreConstants.versionPrefix)) { pmCache.remove(PortalCMSCacheLoader.VERSION_REF_NODE + "/" - + cacheNodeName, id); + + cacheNodeName, id); } else if (schemaObjectPrefix - .equalsIgnoreCase(HibernateStoreConstants.wspPrefix)) + .equalsIgnoreCase(HibernateStoreConstants.wspPrefix)) { pmCache.remove(PortalCMSCacheLoader.WSP_REF_NODE + "/" - + cacheNodeName, id); + + cacheNodeName, id); } } catch (Exception e) @@ -1256,7 +1249,7 @@ = // --------------------------------------------------------------------= -------------------------------------------------------------------- /** - * = + * */ public void close() throws Exception { @@ -1306,7 +1299,7 @@ } = /** - * = + * */ public void store(ChangeLog changeLog) throws ItemStateException { @@ -1341,46 +1334,46 @@ Iterator iter =3D changeLog.deletedStates(); while (iter.hasNext()) { - ItemState state =3D (ItemState) iter.next(); + ItemState state =3D (ItemState)iter.next(); if (state.isNode()) { - destroy((NodeState) state); + destroy((NodeState)state); } else { - destroy((PropertyState) state); + destroy((PropertyState)state); } } iter =3D changeLog.addedStates(); while (iter.hasNext()) { - ItemState state =3D (ItemState) iter.next(); + ItemState state =3D (ItemState)iter.next(); if (state.isNode()) { - store((NodeState) state); + store((NodeState)state); } else { - store((PropertyState) state); + store((PropertyState)state); } } iter =3D changeLog.modifiedStates(); while (iter.hasNext()) { - ItemState state =3D (ItemState) iter.next(); + ItemState state =3D (ItemState)iter.next(); if (state.isNode()) { - update((NodeState) state); + update((NodeState)state); } else { - update((PropertyState) state); + update((PropertyState)state); } } iter =3D changeLog.modifiedRefs(); while (iter.hasNext()) { - NodeReferences refs =3D (NodeReferences) iter.next(); + NodeReferences refs =3D (NodeReferences)iter.next(); if (refs.hasReferences()) { store(refs); @@ -1396,7 +1389,7 @@ } = /** - * = + * */ protected boolean exists(String blobid) throws ItemStateException { @@ -1404,8 +1397,8 @@ } = /** - * = - * = + * + * */ private boolean exists(String query, String id) throws ItemStateExcepti= on { @@ -1451,7 +1444,7 @@ { = /** - * = + * */ public String createId(PropertyId id, int index) { @@ -1465,7 +1458,7 @@ } = /** - * = + * */ public InputStream get(String blobId) throws Exception { @@ -1473,9 +1466,9 @@ try { List rs =3D session.createQuery(blobSelectData).setString(0, b= lobId) - .list(); + .list(); Iterator iter =3D rs.iterator(); - java.sql.Blob blob =3D (java.sql.Blob) iter.next(); + java.sql.Blob blob =3D (java.sql.Blob)iter.next(); InputStream is =3D blob.getBinaryStream(); return is; } @@ -1483,7 +1476,7 @@ { if (e instanceof NoSuchItemStateException) { - throw (NoSuchItemStateException) e; + throw (NoSuchItemStateException)e; } String msg =3D "failed to read binary data: " + blobId; log.error(msg, e); @@ -1492,10 +1485,10 @@ } = /** - * = + * */ public void put(String blobId, InputStream in, long size) - throws Exception + throws Exception { boolean update =3D exists(blobId); = @@ -1507,11 +1500,11 @@ = Query query =3D session.createQuery(blobSelect); if (schemaObjectPrefix - .equalsIgnoreCase(HibernateStoreConstants.versionPref= ix)) + .equalsIgnoreCase(HibernateStoreConstants.versionPrefix)) { query.setString(0, blobId); - VersionBinVal versionNode =3D (VersionBinVal) query - .uniqueResult(); + VersionBinVal versionNode =3D (VersionBinVal)query + .uniqueResult(); if (versionNode =3D=3D null) { throw new Exception("No such Node: " + blobId); @@ -1520,10 +1513,10 @@ versionNode.setData(Hibernate.createBlob(in)); } else if (schemaObjectPrefix - .equalsIgnoreCase(HibernateStoreConstants.wspPrefix)) + .equalsIgnoreCase(HibernateStoreConstants.wspPrefix)) { query.setString(0, blobId); - WSPBinVal wspNode =3D (WSPBinVal) query.uniqueResult(); + WSPBinVal wspNode =3D (WSPBinVal)query.uniqueResult(); if (wspNode =3D=3D null) { throw new Exception("No such Node: " + blobId); @@ -1550,17 +1543,17 @@ { = if (schemaObjectPrefix - .equalsIgnoreCase(HibernateStoreConstants.versionPref= ix)) + .equalsIgnoreCase(HibernateStoreConstants.versionPrefix)) { VersionBinVal versionNode =3D new VersionBinVal(blobId, - Hibernate.createBlob(in)); + Hibernate.createBlob(in)); session.save(versionNode); } else if (schemaObjectPrefix - .equalsIgnoreCase(HibernateStoreConstants.wspPrefix)) + .equalsIgnoreCase(HibernateStoreConstants.wspPrefix)) { WSPBinVal wspNode =3D new WSPBinVal(blobId, Hibernate - .createBlob(in)); + .createBlob(in)); session.save(wspNode); } } @@ -1578,7 +1571,7 @@ } = /** - * = + * */ // public synchronized boolean remove(String blobId) throws Exception public boolean remove(String blobId) throws Exception @@ -1587,7 +1580,7 @@ try { Query query =3D session.createQuery(nodeBinValSelect).setStrin= g(0, - blobId); + blobId); Object result =3D query.uniqueResult(); if (result !=3D null) { Property changes on: branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jbos= s/portal/cms/hibernate/state/JBossCachePersistenceManager.java ___________________________________________________________________ Name: svn:keywords + = Property changes on: branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jbos= s/portal/cms/hibernate/state/PortalCMSCacheLoader.java ___________________________________________________________________ Name: svn:keywords + = Modified: branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cm= s/hibernate/state/Tools.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cms/hibe= rnate/state/Tools.java 2007-10-27 23:01:46 UTC (rev 8784) +++ branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cms/hibe= rnate/state/Tools.java 2007-10-28 01:09:21 UTC (rev 8785) @@ -36,10 +36,11 @@ = /** * Static state is evil. - * + *

* Created on Aug 29, 2006 - * = - * A Tool for performing some Hibernate related utilities. This is designe= d to work in both managed as well as non-managed environments + *

+ * A Tool for performing some Hibernate related utilities. This is designe= d to work in both managed as well as + * non-managed environments * * @author Sohil Shah */ Property changes on: branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jbos= s/portal/cms/hibernate/state/Tools.java ___________________________________________________________________ Name: svn:keywords + = Property changes on: branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jbos= s/portal/cms/hibernate/state/VersionBinVal.java ___________________________________________________________________ Name: svn:keywords - Author Date Id Revision + = Property changes on: branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jbos= s/portal/cms/hibernate/state/VersionNode.java ___________________________________________________________________ Name: svn:keywords - Author Date Id Revision + = Property changes on: branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jbos= s/portal/cms/hibernate/state/VersionProp.java ___________________________________________________________________ Name: svn:keywords - Author Date Id Revision + = Property changes on: branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jbos= s/portal/cms/hibernate/state/VersionRefs.java ___________________________________________________________________ Name: svn:keywords - Author Date Id Revision + = Property changes on: branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jbos= s/portal/cms/hibernate/state/WSPBinVal.java ___________________________________________________________________ Name: svn:keywords - Author Date Id Revision + = Property changes on: branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jbos= s/portal/cms/hibernate/state/WSPNode.java ___________________________________________________________________ Name: svn:keywords - Author Date Id Revision + = Property changes on: branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jbos= s/portal/cms/hibernate/state/WSPProp.java ___________________________________________________________________ Name: svn:keywords - Author Date Id Revision + = Property changes on: branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jbos= s/portal/cms/hibernate/state/WSPRefs.java ___________________________________________________________________ Name: svn:keywords - Author Date Id Revision + = Modified: branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cm= s/impl/CMSCacheException.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cms/impl= /CMSCacheException.java 2007-10-27 23:01:46 UTC (rev 8784) +++ branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cms/impl= /CMSCacheException.java 2007-10-28 01:09:21 UTC (rev 8785) @@ -26,7 +26,7 @@ = /** * @author Thomas Heute - * @version $Revision$ + * @version $Revision: 5448 $ */ public class CMSCacheException extends Exception { Property changes on: branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jbos= s/portal/cms/impl/CMSCacheException.java ___________________________________________________________________ Name: svn:keywords - Author Date Id Revision + = Property changes on: branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jbos= s/portal/cms/impl/CMSObjectImpl.java ___________________________________________________________________ Name: svn:keywords - Author Date Id Revision + = Modified: branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cm= s/impl/CMSTreeCacheService.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cms/impl= /CMSTreeCacheService.java 2007-10-27 23:01:46 UTC (rev 8784) +++ branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cms/impl= /CMSTreeCacheService.java 2007-10-28 01:09:21 UTC (rev 8785) @@ -28,7 +28,7 @@ = /** * @author Thomas Heute - * @version $Revision$ + * @version $Revision: 5448 $ */ public interface CMSTreeCacheService { Property changes on: branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jbos= s/portal/cms/impl/CMSTreeCacheService.java ___________________________________________________________________ Name: svn:keywords - Author Date Id Revision + = Modified: branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cm= s/impl/ContentImpl.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cms/impl= /ContentImpl.java 2007-10-27 23:01:46 UTC (rev 8784) +++ branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cms/impl= /ContentImpl.java 2007-10-28 01:09:21 UTC (rev 8785) @@ -61,7 +61,7 @@ protected String mimeType; = protected int size; - = + protected boolean isWaitingForPublishApproval =3D false; protected String approvalProcessId =3D null; = @@ -185,39 +185,32 @@ { this.size =3D size; } - = + /** - * = + * */ public boolean isWaitingForPublishApproval() { - return this.isWaitingForPublishApproval; + return this.isWaitingForPublishApproval; } - = - /** - * = - * @param isWaitingForPublishApproval - */ + + /** @param isWaitingForPublishApproval */ public void setWaitingForPublishApproval(boolean isWaitingForPublishApp= roval) { - this.isWaitingForPublishApproval =3D isWaitingForPublishApproval; + this.isWaitingForPublishApproval =3D isWaitingForPublishApproval; } = - /** - * @return the approvalProcessId - */ - public String getApprovalProcessId() - { - return approvalProcessId; - } - = - /** - * @param approvalProcessId the approvalProcessId to set - */ - public void setApprovalProcessId(String approvalProcessId) - { - this.approvalProcessId =3D approvalProcessId; - } + /** @return the approvalProcessId */ + public String getApprovalProcessId() + { + return approvalProcessId; + } + + /** @param approvalProcessId the approvalProcessId to set */ + public void setApprovalProcessId(String approvalProcessId) + { + this.approvalProcessId =3D approvalProcessId; + } } = = Property changes on: branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jbos= s/portal/cms/impl/ContentImpl.java ___________________________________________________________________ Name: svn:keywords - Author Date Id Revision + = Property changes on: branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jbos= s/portal/cms/impl/FileImpl.java ___________________________________________________________________ Name: svn:keywords - Author Date Id Revision + = Property changes on: branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jbos= s/portal/cms/impl/FolderImpl.java ___________________________________________________________________ Name: svn:keywords - Author Date Id Revision + = Modified: branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cm= s/impl/cache/CMSTreeCacheServiceImpl.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cms/impl= /cache/CMSTreeCacheServiceImpl.java 2007-10-27 23:01:46 UTC (rev 8784) +++ branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cms/impl= /cache/CMSTreeCacheServiceImpl.java 2007-10-28 01:09:21 UTC (rev 8785) @@ -35,7 +35,7 @@ = /** * @author Thomas Heute - * @version $Revision$ + * @version $Revision: 6728 $ */ public class CMSTreeCacheServiceImpl extends AbstractJBossService implemen= ts CMSTreeCacheService { Property changes on: branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jbos= s/portal/cms/impl/cache/CMSTreeCacheServiceImpl.java ___________________________________________________________________ Name: svn:keywords - Author Date Id Revision + = Modified: branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cm= s/impl/interceptors/ACLInterceptor.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cms/impl= /interceptors/ACLInterceptor.java 2007-10-27 23:01:46 UTC (rev 8784) +++ branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cms/impl= /interceptors/ACLInterceptor.java 2007-10-28 01:09:21 UTC (rev 8785) @@ -22,50 +22,50 @@ *************************************************************************= *****/ package org.jboss.portal.cms.impl.interceptors; = -import org.w3c.dom.*; - -import javax.xml.parsers.DocumentBuilderFactory; - -import java.io.InputStream; -import java.io.ByteArrayInputStream; -import java.util.Collection; -import java.util.ArrayList; -import java.util.Iterator; -import java.util.List; -import java.util.Set; -import java.util.HashSet; - -import javax.naming.InitialContext; -import javax.naming.NamingException; - -import org.jboss.portal.security.PortalPermission; - +import org.apache.log4j.Logger; +import org.hibernate.Query; +import org.hibernate.Session; +import org.hibernate.SessionFactory; +import org.hibernate.Transaction; import org.jboss.portal.cms.CMSException; import org.jboss.portal.cms.CMSInterceptor; -import org.jboss.portal.cms.impl.jcr.JCRCommand; +import org.jboss.portal.cms.hibernate.state.Tools; import org.jboss.portal.cms.impl.jcr.JCRCMS; +import org.jboss.portal.cms.impl.jcr.JCRCommand; import org.jboss.portal.cms.impl.jcr.command.SearchCommand; import org.jboss.portal.cms.model.File; import org.jboss.portal.cms.model.Folder; -import org.jboss.portal.cms.hibernate.state.Tools; +import org.jboss.portal.cms.security.AuthorizationManager; +import org.jboss.portal.cms.security.CMSPermission; +import org.jboss.portal.cms.security.Criteria; +import org.jboss.portal.cms.security.PermRoleAssoc; +import org.jboss.portal.cms.security.Permission; +import org.jboss.portal.cms.security.PortalCMSSecurityContext; import org.jboss.portal.common.invocation.InvocationException; - -import org.hibernate.SessionFactory; -import org.hibernate.Session; -import org.hibernate.Transaction; -import org.hibernate.Query; - -import org.jboss.portal.cms.security.*; - -import org.jboss.portal.identity.User; import org.jboss.portal.identity.Role; import org.jboss.portal.identity.RoleModule; +import org.jboss.portal.identity.User; import org.jboss.portal.jems.as.JNDI; -import org.apache.log4j.Logger; +import org.jboss.portal.security.PortalPermission; +import org.w3c.dom.Document; +import org.w3c.dom.Element; +import org.w3c.dom.NodeList; = +import javax.naming.InitialContext; +import javax.naming.NamingException; +import javax.xml.parsers.DocumentBuilderFactory; +import java.io.ByteArrayInputStream; +import java.io.InputStream; +import java.util.ArrayList; +import java.util.Collection; +import java.util.HashSet; +import java.util.Iterator; +import java.util.List; +import java.util.Set; + /** - * ACLInterceptor is plugged into the CMS system to enforce fine grained s= ecurity access control - * on resources stored in the CMS system. + * ACLInterceptor is plugged into the CMS system to enforce fine grained s= ecurity access control on resources stored in + * the CMS system. * * @author Sohil Shah - sohil.shah(a)jboss.com - Nov 27, 2006 */ @@ -74,125 +74,95 @@ = private static Logger log =3D Logger.getLogger(ACLInterceptor.class); = - /** - * default security policy that the cms service should be booted with - */ + /** default security policy that the cms service should be booted with = */ private String defaultPolicy =3D null; = - /** . */ + /** . */ private RoleModule roleModule =3D null; = - /** . */ + /** . */ private String jndiName =3D null; - = - /** . */ + + /** . */ private JNDI.Binding jndiBinding =3D null; = - /** . */ + /** . */ private AuthorizationManager authorizationManager =3D null; - = - /** . */ + + /** . */ private String cmsSessionFactory =3D null; - = - /** . */ + + /** . */ private String identitySessionFactory =3D null; = = - /** - * @return - */ + /** @return */ public AuthorizationManager getAuthorizationManager() { return this.authorizationManager; } = - /** - * @param authorizationManager - */ + /** @param authorizationManager */ public void setAuthorizationManager(AuthorizationManager authorizationM= anager) { this.authorizationManager =3D authorizationManager; } = - /** - * @return - */ + /** @return */ public String getDefaultPolicy() { return this.defaultPolicy; } = - /** - * @param defaultPolicy - */ + /** @param defaultPolicy */ public void setDefaultPolicy(String defaultPolicy) { this.defaultPolicy =3D defaultPolicy; } = - /** - * @return - */ + /** @return */ public RoleModule getRoleModule() { return this.roleModule; } = - /** - * @param roleModule - */ + /** @param roleModule */ public void setRoleModule(RoleModule roleModule) { this.roleModule =3D roleModule; } = - /** - * @return - */ + /** @return */ public String getJNDIName() { return this.jndiName; } = - /** - * @param jndiName - */ + /** @param jndiName */ public void setJNDIName(String jndiName) { this.jndiName =3D jndiName; } - = - /** - * = - * @return - */ + + /** @return */ public String getIdentitySessionFactory() { return this.identitySessionFactory; } - = - /** - * = - * @param identitySessionFactory - */ + + /** @param identitySessionFactory */ public void setIdentitySessionFactory(String identitySessionFactory) { this.identitySessionFactory =3D identitySessionFactory; } - = - /** - * = - * @return - */ + + /** @return */ public String getCmsSessionFactory() { return cmsSessionFactory; } = - /** - * = - * @param cmsSessionFactory - */ + /** @param cmsSessionFactory */ public void setCmsSessionFactory(String cmsSessionFactory) { this.cmsSessionFactory =3D cmsSessionFactory; @@ -217,7 +187,7 @@ = //perform access check PortalPermission cmsPermission =3D new CMSPermission(securityCont= ext); - boolean allowAccess =3D this.authorizationManager.checkPermission= (cmsPermission); = + boolean allowAccess =3D this.authorizationManager.checkPermission= (cmsPermission); if (allowAccess) { Object response =3D invocation.invokeNext(); @@ -250,8 +220,8 @@ } = /** - * Filters any files/folders based on the user's access. The filter is = applied to folders/files - * returned by invoking a CMS command + * Filters any files/folders based on the user's access. The filter is = applied to folders/files returned by invoking + * a CMS command * * @param response * @return @@ -268,7 +238,7 @@ List filteredFolders =3D new ArrayList(); List filteredFiles =3D new ArrayList(); securityContext.removeAttribute("command"); - if(folder.getFolders()!=3Dnull) + if (folder.getFolders() !=3D null) { for (Iterator itr =3D folder.getFolders().iterator(); itr.h= asNext();) { @@ -282,7 +252,7 @@ } } } - if(folder.getFiles()!=3Dnull) + if (folder.getFiles() !=3D null) { for (Iterator itr =3D folder.getFiles().iterator(); itr.has= Next();) { @@ -320,7 +290,7 @@ catch (Exception e) { throw new RuntimeException(e); - } = + } return filteredResponse; } = @@ -330,8 +300,8 @@ public void start() throws Exception { log.info("AuthorizationManager initialized=3D" + this.authorizationM= anager); - = - if(this.jndiName !=3D null) + + if (this.jndiName !=3D null) { this.jndiBinding =3D new JNDI.Binding(jndiName, this); this.jndiBinding.bind(); @@ -414,18 +384,15 @@ } } } - = - /** - * = - * @throws Exception - */ + + /** @throws Exception */ public void stop() throws Exception { - if(this.jndiBinding !=3D null) + if (this.jndiBinding !=3D null) { this.jndiBinding.unbind(); this.jndiBinding =3D null; - } = + } Tools.destroy(); } = @@ -533,12 +500,12 @@ } = /** - * This turns off acl security only for a particular thread. - * This is used by system level operations that need to integrate with = the CMS + * This turns off acl security only for a particular thread. This is us= ed by system level operations that need to + * integrate with the CMS *

- * Example is: the workflow daemon that publishes a content as live whe= n a manager - * approves it. Without turning this off, the daemon thread is running = in Anonymous mode - * which obviously does not have the rights to publish the content + * Example is: the workflow daemon that publishes a content as live whe= n a manager approves it. Without turning this + * off, the daemon thread is running in Anonymous mode which obviously = does not have the rights to publish the + * content */ private static ThreadLocal turnOff =3D new ThreadLocal(); = Property changes on: branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jbos= s/portal/cms/impl/interceptors/ACLInterceptor.java ___________________________________________________________________ Name: svn:keywords + = Modified: branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cm= s/impl/interceptors/ApprovalWorkflowInterceptor.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cms/impl= /interceptors/ApprovalWorkflowInterceptor.java 2007-10-27 23:01:46 UTC (rev= 8784) +++ branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cms/impl= /interceptors/ApprovalWorkflowInterceptor.java 2007-10-28 01:09:21 UTC (rev= 8785) @@ -22,126 +22,109 @@ *************************************************************************= *****/ package org.jboss.portal.cms.impl.interceptors; = -import java.util.Date; -import java.lang.reflect.Method; - import org.jboss.portal.cms.CMSInterceptor; import org.jboss.portal.cms.impl.jcr.JCRCommand; import org.jboss.portal.cms.impl.jcr.JCRCommandContext; - import org.jboss.portal.cms.impl.jcr.composite.NewFileCommand; import org.jboss.portal.cms.impl.jcr.composite.UpdateFileCommand; - +import org.jboss.portal.cms.workflow.ApprovePublish; +import org.jboss.portal.cms.workflow.Content; import org.jboss.portal.common.invocation.InvocationException; - import org.jboss.portal.identity.User; import org.jboss.portal.jems.as.JNDI; = -import org.jboss.portal.cms.workflow.ApprovePublish; -import org.jboss.portal.cms.workflow.Content; +import java.lang.reflect.Method; +import java.util.Date; = = /** - * = * Created on : Jan 29, 2007 - * @author Sohil Shah - sohil.shah(a)jboss.com * + * @author Sohil Shah - sohil.shah(a)jboss.com */ public class ApprovalWorkflowInterceptor extends CMSInterceptor { /** - * = + * */ private String jndiName =3D null; - = + /** - * = + * */ private JNDI.Binding jndiBinding =3D null; - = - /** - * = - * @return - */ + + /** @return */ public String getJNDIName() { return this.jndiName; } - = - /** - * = - * @param jndiName - */ + + /** @param jndiName */ public void setJNDIName(String jndiName) { this.jndiName =3D jndiName; } - = - /** - * = - */ - protected Object invoke(JCRCommand invocation) throws Exception, Invocati= onException - { - //pre-processing - if(invocation instanceof NewFileCommand || invocation instanceof UpdateF= ileCommand) - { = - ApprovePublish approvePublishWorkflow =3D (ApprovePublish)invocation.ge= tContext(). - getAttribute(JCRCommandContext.scope, "approvePublishWorkflow"); - = - if(approvePublishWorkflow!=3Dnull) - { - User user =3D (User)invocation.getContext().getAttribute(JCRCommandCon= text.scope,"user"); - org.jboss.portal.cms.model.Content content =3D null; - Method getContentMethod =3D invocation.getClass().getMethod("getConten= t", null); - content =3D (org.jboss.portal.cms.model.Content)getContentMethod.invok= e(invocation, null); - = - //call the workflow service here - Content workflowContent =3D new Content(); - workflowContent.setPath(content.getBasePath()); = = - workflowContent.setUserName(user.getUserName()); - workflowContent.setMimeType(content.getMimeType()); - if(content.getBytes()!=3Dnull) - { - workflowContent.setSize(content.getBytes().length); - } - workflowContent.setCreationDate(new Date()); - = - long processId =3D approvePublishWorkflow.requestApproval(workfl= owContent); - = - //save the processId in the context - invocation.setAttribute(JCRCommandContext.scope, "processid", St= ring.valueOf(processId)); - } - } - = - Object returnVal =3D invocation.invokeNext(); - = - //post-processing - = - //no post-processing needed for this interceptor - = - return returnVal; - } - = + /** - * = - * @throws Exception + * */ + protected Object invoke(JCRCommand invocation) throws Exception, Invoca= tionException + { + //pre-processing + if (invocation instanceof NewFileCommand || invocation instanceof Up= dateFileCommand) + { + ApprovePublish approvePublishWorkflow =3D (ApprovePublish)invocat= ion.getContext(). + getAttribute(JCRCommandContext.scope, "approvePublishWorkflow"= ); + + if (approvePublishWorkflow !=3D null) + { + User user =3D (User)invocation.getContext().getAttribute(JCRCo= mmandContext.scope, "user"); + org.jboss.portal.cms.model.Content content =3D null; + Method getContentMethod =3D invocation.getClass().getMethod("g= etContent", null); + content =3D (org.jboss.portal.cms.model.Content)getContentMeth= od.invoke(invocation, null); + + //call the workflow service here + Content workflowContent =3D new Content(); + workflowContent.setPath(content.getBasePath()); + workflowContent.setUserName(user.getUserName()); + workflowContent.setMimeType(content.getMimeType()); + if (content.getBytes() !=3D null) + { + workflowContent.setSize(content.getBytes().length); + } + workflowContent.setCreationDate(new Date()); + + long processId =3D approvePublishWorkflow.requestApproval(work= flowContent); + + //save the processId in the context + invocation.setAttribute(JCRCommandContext.scope, "processid", = String.valueOf(processId)); + } + } + + Object returnVal =3D invocation.invokeNext(); + + //post-processing + + //no post-processing needed for this interceptor + + return returnVal; + } + + /** @throws Exception */ public void start() throws Exception { - if(this.jndiName !=3D null) + if (this.jndiName !=3D null) { this.jndiBinding =3D new JNDI.Binding(jndiName, this); this.jndiBinding.bind(); } } - = - /** - * = - * @throws Exception - */ + + /** @throws Exception */ public void stop() throws Exception { - if(this.jndiBinding !=3D null) + if (this.jndiBinding !=3D null) { this.jndiBinding.unbind(); this.jndiBinding =3D null; Property changes on: branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jbos= s/portal/cms/impl/interceptors/ApprovalWorkflowInterceptor.java ___________________________________________________________________ Name: svn:keywords + = Property changes on: branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jbos= s/portal/cms/impl/interceptors/CacheInterceptor.java ___________________________________________________________________ Name: svn:keywords - Author Date Id Revision + = Property changes on: branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jbos= s/portal/cms/impl/interceptors/LogInterceptor.java ___________________________________________________________________ Name: svn:keywords - Author Date Id Revision + = Modified: branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cm= s/impl/jcr/JCRCMS.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cms/impl= /jcr/JCRCMS.java 2007-10-27 23:01:46 UTC (rev 8784) +++ branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cms/impl= /jcr/JCRCMS.java 2007-10-28 01:09:21 UTC (rev 8785) @@ -34,29 +34,27 @@ import org.jboss.portal.cms.impl.FileImpl; import org.jboss.portal.cms.impl.FolderImpl; import org.jboss.portal.cms.impl.jcr.jackrabbit.JackrabbitJCRService; +import org.jboss.portal.cms.model.CMSUser; import org.jboss.portal.cms.model.Content; import org.jboss.portal.cms.model.File; import org.jboss.portal.cms.model.Folder; -import org.jboss.portal.cms.model.CMSUser; import org.jboss.portal.cms.util.RepositoryUtil; +import org.jboss.portal.cms.workflow.ApprovePublish; import org.jboss.portal.common.invocation.InterceptorStackFactory; import org.jboss.portal.common.invocation.Invocation; import org.jboss.portal.common.invocation.InvocationException; import org.jboss.portal.common.invocation.InvocationHandler; +import org.jboss.portal.common.io.IOTools; import org.jboss.portal.common.net.URLNavigator; import org.jboss.portal.common.net.URLVisitor; import org.jboss.portal.common.xml.XMLTools; -import org.jboss.portal.common.io.IOTools; -import org.jboss.portal.jems.as.JNDI; -import org.jboss.portal.identity.User; -import org.jboss.portal.identity.UserModule; -import org.jboss.portal.identity.IdentityServiceController; import org.jboss.portal.identity.IdentityContext; import org.jboss.portal.identity.IdentityException; +import org.jboss.portal.identity.IdentityServiceController; +import org.jboss.portal.identity.User; +import org.jboss.portal.identity.UserModule; +import org.jboss.portal.jems.as.JNDI; import org.jboss.portal.jems.as.system.AbstractJBossService; - -import org.jboss.portal.cms.workflow.ApprovePublish; - import org.jboss.util.StopWatch; import org.w3c.dom.DOMImplementation; import org.w3c.dom.Document; @@ -99,13 +97,13 @@ private InterceptorStackFactory stackFactory; = private Element config; - = + private String identitySessionFactory =3D null; - = + private IdentityServiceController identityServiceController; - = + private ApprovePublish approvePublishWorkflow; - = + private String jndiName; = private JNDI.Binding jndiBinding; @@ -118,28 +116,26 @@ return cmd.execute(); } }; - = - /** - * Used for storing the logged in user information - */ + + /** Used for storing the logged in user information */ protected static ThreadLocal userInfo =3D new ThreadLocal(); + public static ThreadLocal getUserInfo() { - return JCRCMS.userInfo; + return JCRCMS.userInfo; } - = - /** - * This is used to turnoff workflow triggering only - * for this particular request through the CMS commands - */ + + /** This is used to turnoff workflow triggering only for this particula= r request through the CMS commands */ protected static ThreadLocal turnOffWorkflow =3D new ThreadLocal(); + public static void turnOffWorkflow() { - turnOffWorkflow.set(new Boolean(true)); + turnOffWorkflow.set(new Boolean(true)); } + public static void turnOnWorkflow() { - turnOffWorkflow.set(null); + turnOffWorkflow.set(null); } = public JCRCMS() @@ -211,25 +207,20 @@ { this.doChecking =3D doChecking; } - = - = = - /** - * @return the approvePublishWorkflow - */ - public ApprovePublish getApprovePublishWorkflow() - { - return approvePublishWorkflow; - } - = - /** - * @param approvePublishWorkflow the approvePublishWorkflow to set - */ - public void setApprovePublishWorkflow(ApprovePublish approvePublishWorkfl= ow) - { - this.approvePublishWorkflow =3D approvePublishWorkflow; - } = + /** @return the approvePublishWorkflow */ + public ApprovePublish getApprovePublishWorkflow() + { + return approvePublishWorkflow; + } + + /** @param approvePublishWorkflow the approvePublishWorkflow to set */ + public void setApprovePublishWorkflow(ApprovePublish approvePublishWork= flow) + { + this.approvePublishWorkflow =3D approvePublishWorkflow; + } + public UserModule getUserModule() { if (identityServiceController !=3D null) @@ -257,43 +248,31 @@ this.identityServiceController =3D identityServiceController; } = - /** - * = - * @return - */ + /** @return */ public String getJNDIName() { - return this.jndiName; + return this.jndiName; } - = - /** - * = - * @param jndiName - */ + + /** @param jndiName */ public void setJNDIName(String jndiName) { - this.jndiName =3D jndiName; + this.jndiName =3D jndiName; } - = - /** - * = - * @return - */ + + /** @return */ public String getIdentitySessionFactory() { return identitySessionFactory; } - = - /** - * = - * @param identitySessionFactory - */ + + /** @param identitySessionFactory */ public void setIdentitySessionFactory(String identitySessionFactory) { this.identitySessionFactory =3D identitySessionFactory; } - = - = + + /** CMS Start */ public void startService() throws Exception { @@ -307,7 +286,6 @@ String cacheVersion =3D Version.getVersionString(Version.getVersionS= hort()); log.info("JBossCache Version=3D" + cacheVersion); = - = // See how long it takes us to start up StopWatch watch =3D new StopWatch(true); log.info("Starting JCR CMS"); @@ -395,25 +373,24 @@ public void createContent() throws Exception { log.info("Creating default CMS content."); - = = // Get the content URL root =3D Thread.currentThread().getContextClassLoader().getResou= rce(defaultContentLocation); - = + //make the user executing these to create the default content, an 'A= dmin' user //without this, the fine grained security won't allow the creation UserModule userModule =3D getUserModule(); - if(userModule !=3D null) + if (userModule !=3D null) { - org.hibernate.Session session =3D org.jboss.portal.cms.hibernate.st= ate.Tools.getOpenSession(); - org.hibernate.Transaction tx =3D session.beginTransaction(); - User user =3D userModule.findUserByUserName("admin"); - if(user!=3Dnull) - { - JCRCMS.getUserInfo().set(user); - } - tx.rollback(); - org.jboss.portal.cms.hibernate.state.Tools.closeSession(session); + org.hibernate.Session session =3D org.jboss.portal.cms.hibernate.= state.Tools.getOpenSession(); + org.hibernate.Transaction tx =3D session.beginTransaction(); + User user =3D userModule.findUserByUserName("admin"); + if (user !=3D null) + { + JCRCMS.getUserInfo().set(user); + } + tx.rollback(); + org.jboss.portal.cms.hibernate.state.Tools.closeSession(session); } = // Iterate over the content @@ -588,20 +565,20 @@ try { xares.start(xid, XAResource.TMNOFLAGS); - = + //Check and make sure in the case of a clustered call, the Identi= ty propagated //as part of the invocation is handled correctly JCRCommandContext propagatedContext =3D (JCRCommandContext)((JCRC= ommand)cmd).getContext(); - if(propagatedContext !=3D null) + if (propagatedContext !=3D null) { CMSUser propagatedUser =3D (CMSUser)propagatedContext.getClust= erContextInfo("user"); - if(propagatedUser !=3D null) - { = + if (propagatedUser !=3D null) + { JCRCMS.getUserInfo().set(propagatedUser); isClusterDelegatedRequest =3D true; - } = + } Boolean workflowStatus =3D (Boolean)propagatedContext.getClust= erContextInfo("workflowStatus"); - if(workflowStatus !=3D null) + if (workflowStatus !=3D null) { JCRCMS.turnOffWorkflow(); clusterWorkflowStatus =3D true; @@ -612,15 +589,15 @@ JCRCommand jcrCmd =3D (JCRCommand)cmd; JCRCommandContext ctx =3D new JCRCommandContext(session, commandF= actory, defaultLocale); jcrCmd.setContext(ctx); - = + ctx.setAttribute(JCRCommandContext.scope, "user", JCRCMS.getUserI= nfo().get()); Object isWorkflowOff =3D JCRCMS.turnOffWorkflow.get(); - if( this.approvePublishWorkflow!=3Dnull //this checks and makes = sure workflow is activated for the CMS - && - isWorkflowOff=3D=3Dnull //this checks and makes sure workflow is= not turned off only for this particular request = - ) + if (this.approvePublishWorkflow !=3D null //this checks and make= s sure workflow is activated for the CMS + && + isWorkflowOff =3D=3D null //this checks and makes sure workflo= w is not turned off only for this particular request + ) { - ctx.setAttribute(JCRCommandContext.scope, "approvePublishWorkflo= w", this.approvePublishWorkflow); + ctx.setAttribute(JCRCommandContext.scope, "approvePublishWorkf= low", this.approvePublishWorkflow); } = = @@ -656,11 +633,11 @@ = if (e instanceof CMSException) { - throw(CMSException)e; + throw (CMSException)e; } else if (e instanceof RuntimeException) { - throw(RuntimeException)e; + throw (RuntimeException)e; } else { @@ -674,25 +651,22 @@ //must do this otherwise, the whole cms will hang session.logout(); } - if(isClusterDelegatedRequest) + if (isClusterDelegatedRequest) { JCRCMS.getUserInfo().set(null); } - if(clusterWorkflowStatus) + if (clusterWorkflowStatus) { JCRCMS.turnOnWorkflow(); } } return obj; } - = - /** - * = - * @return - */ + + /** @return */ public boolean isWorkflowActivated() { - return (this.approvePublishWorkflow!=3Dnull); + return (this.approvePublishWorkflow !=3D null); } = public void setStackFactory(InterceptorStackFactory stackFactory) @@ -703,5 +677,5 @@ public InterceptorStackFactory getStackFactory() { return stackFactory; - } = + } } Property changes on: branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jbos= s/portal/cms/impl/jcr/JCRCMS.java ___________________________________________________________________ Name: svn:keywords - Author Date Id Revision + = Property changes on: branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jbos= s/portal/cms/impl/jcr/JCRCommand.java ___________________________________________________________________ Name: svn:keywords - Author Date Id Revision + = Modified: branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cm= s/impl/jcr/JCRCommandContext.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cms/impl= /jcr/JCRCommandContext.java 2007-10-27 23:01:46 UTC (rev 8784) +++ branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cms/impl= /jcr/JCRCommandContext.java 2007-10-28 01:09:21 UTC (rev 8785) @@ -22,33 +22,31 @@ *************************************************************************= *****/ package org.jboss.portal.cms.impl.jcr; = -import java.io.Serializable; -import java.util.Map; -import java.util.HashMap; - import org.jboss.portal.cms.CMSException; -import org.jboss.portal.cms.model.CMSUser; import org.jboss.portal.common.invocation.AbstractInvocationContext; -import org.jboss.portal.common.invocation.resolver.MapAttributeResolver; import org.jboss.portal.common.invocation.Scope; +import org.jboss.portal.common.invocation.resolver.MapAttributeResolver; = import javax.jcr.Session; +import java.io.Serializable; +import java.util.HashMap; import java.util.Locale; +import java.util.Map; = /** * @author Julien Viet - * @version $Revision$ + * @version $Revision: 7163 $ */ public class JCRCommandContext extends AbstractInvocationContext implement= s Serializable { public static final Scope scope =3D Scope.THREAD_SCOPE; - = + private transient final Session session; = private transient final JCRCommandFactory commandFactory; = private transient final Locale locale; - = + private Map clusterContext =3D null; = public JCRCommandContext(Session session, JCRCommandFactory factory, Lo= cale locale) @@ -81,17 +79,15 @@ } = /** - * = * @param key * @param data */ - public void setClusterContextInfo(String key,Object data) + public void setClusterContextInfo(String key, Object data) { this.getClusterContext().put(key, data); } - = + /** - * = * @param key * @return */ @@ -99,14 +95,15 @@ { return this.getClusterContext().get(key); } - = + /** * Instantiates the cluser context only on-demand + * * @return */ private Map getClusterContext() { - if(this.clusterContext =3D=3D null) + if (this.clusterContext =3D=3D null) { this.clusterContext =3D new HashMap(); } Property changes on: branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jbos= s/portal/cms/impl/jcr/JCRCommandContext.java ___________________________________________________________________ Name: svn:keywords - Author Date Id Revision + = Modified: branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cm= s/impl/jcr/JCRCommandFactory.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cms/impl= /jcr/JCRCommandFactory.java 2007-10-27 23:01:46 UTC (rev 8784) +++ branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cms/impl= /jcr/JCRCommandFactory.java 2007-10-28 01:09:21 UTC (rev 8785) @@ -22,10 +22,6 @@ *************************************************************************= *****/ package org.jboss.portal.cms.impl.jcr; = -import java.io.InputStream; -import java.util.List; -import java.util.Locale; - import org.jboss.portal.cms.Command; import org.jboss.portal.cms.CommandFactory; import org.jboss.portal.cms.impl.jcr.command.ContentCreateCommand; @@ -44,19 +40,22 @@ import org.jboss.portal.cms.impl.jcr.command.FolderUpdateCommand; import org.jboss.portal.cms.impl.jcr.command.GetArchiveCommand; import org.jboss.portal.cms.impl.jcr.command.ItemExistsCommand; +import org.jboss.portal.cms.impl.jcr.command.MakeLiveVersionCommand; import org.jboss.portal.cms.impl.jcr.command.MoveCommand; import org.jboss.portal.cms.impl.jcr.command.RenameCommand; import org.jboss.portal.cms.impl.jcr.command.SearchCommand; import org.jboss.portal.cms.impl.jcr.command.StoreArchiveCommand; -import org.jboss.portal.cms.impl.jcr.command.MakeLiveVersionCommand; import org.jboss.portal.cms.impl.jcr.composite.NewFileCommand; import org.jboss.portal.cms.impl.jcr.composite.UpdateFileCommand; import org.jboss.portal.cms.model.Content; import org.jboss.portal.cms.model.File; import org.jboss.portal.cms.model.Folder; -import org.jboss.portal.search.Query; import org.jboss.portal.search.impl.jcr.JCRQuery; = +import java.io.InputStream; +import java.util.List; +import java.util.Locale; + /** * @author Roy Russo * @author Thomas Heute @@ -186,9 +185,9 @@ { return new SearchCommand(query); } - = + public Command createMakeLiveVersionCommand(String filePath, String lan= guage, String version) { - return new MakeLiveVersionCommand(filePath,language,version); + return new MakeLiveVersionCommand(filePath, language, version); } } Property changes on: branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jbos= s/portal/cms/impl/jcr/JCRCommandFactory.java ___________________________________________________________________ Name: svn:keywords - Author Date Id Revision + = Property changes on: branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jbos= s/portal/cms/impl/jcr/JCRCompositeCommand.java ___________________________________________________________________ Name: svn:keywords - Author Date Id Revision + = Modified: branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cm= s/impl/jcr/JCRService.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cms/impl= /jcr/JCRService.java 2007-10-27 23:01:46 UTC (rev 8784) +++ branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cms/impl= /jcr/JCRService.java 2007-10-28 01:09:21 UTC (rev 8785) @@ -27,7 +27,7 @@ = /** * @author Julien Viet - * @version $Revision$ + * @version $Revision: 5448 $ */ public interface JCRService { Property changes on: branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jbos= s/portal/cms/impl/jcr/JCRService.java ___________________________________________________________________ Name: svn:keywords - Author Date Id Revision + = Modified: branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cm= s/impl/jcr/command/ACLEnforcer.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cms/impl= /jcr/command/ACLEnforcer.java 2007-10-27 23:01:46 UTC (rev 8784) +++ branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cms/impl= /jcr/command/ACLEnforcer.java 2007-10-28 01:09:21 UTC (rev 8785) @@ -21,725 +21,717 @@ */ package org.jboss.portal.cms.impl.jcr.command; = -import java.util.Collection; -import java.util.ArrayList; -import java.util.Iterator; -import java.util.List; -import java.util.Set; -import java.util.HashSet; -import java.util.StringTokenizer; - import org.jboss.portal.cms.impl.jcr.JCRCommand; import org.jboss.portal.cms.impl.jcr.composite.NewFileCommand; import org.jboss.portal.cms.impl.jcr.composite.UpdateFileCommand; -import org.jboss.portal.cms.security.PortalCMSSecurityContext; -import org.jboss.portal.cms.security.Permission; -import org.jboss.portal.cms.security.Criteria; import org.jboss.portal.cms.security.AuthorizationManager; - -import org.jboss.portal.identity.User; +import org.jboss.portal.cms.security.Criteria; +import org.jboss.portal.cms.security.Permission; +import org.jboss.portal.cms.security.PortalCMSSecurityContext; +import org.jboss.portal.cms.workflow.ApprovePublish; import org.jboss.portal.identity.Role; +import org.jboss.portal.identity.User; = -import org.jboss.portal.cms.workflow.ApprovePublish; +import java.util.ArrayList; +import java.util.Collection; +import java.util.HashSet; +import java.util.Iterator; +import java.util.List; +import java.util.Set; +import java.util.StringTokenizer; = /** - * ACLEnforcer checks proper access privileges for actions before = - * the Command objects are allowed to execute and do their job on the CMS - * = - * @author Sohil Shah - sohil.shah(a)jboss.com - Nov 28, 2006 + * ACLEnforcer checks proper access privileges for actions before the Comm= and objects are allowed to execute and do + * their job on the CMS * + * @author Sohil Shah - sohil.shah(a)jboss.com - Nov 28, 2006 */ public class ACLEnforcer { - private Collection readCommands =3D new ArrayList(); //a list of comma= nds that perform read action on the cms - private Collection writeCommands =3D new ArrayList();//a list of comma= nds that perform write action on the cms - private Collection manageCommands =3D new ArrayList();//a list of comm= ands that perform manage action on the cms - = - private static final int read =3D 0; - private static final int write =3D 1; - private static final int manage =3D 2; + private Collection readCommands =3D new ArrayList(); //a list of comman= ds that perform read action on the cms + private Collection writeCommands =3D new ArrayList();//a list of comman= ds that perform write action on the cms + private Collection manageCommands =3D new ArrayList();//a list of comma= nds that perform manage action on the cms + + private static final int read =3D 0; + private static final int write =3D 1; + private static final int manage =3D 2; // private static final int manageWorkflow =3D 3; - = - private AuthorizationManager authorizationManager =3D null; - = = - /** - * = - * - */ - public ACLEnforcer(AuthorizationManager authorizationManager) = - { - super(); - this.authorizationManager =3D authorizationManager; - = - String packageName =3D "org.jboss.portal.cms.impl.jcr.command."; - = - //load the read related commands - readCommands.add(packageName+"FolderGetListCommand"); - readCommands.add(packageName+"FolderGetCommand"); - readCommands.add(packageName+"FileGetListCommand"); - readCommands.add(packageName+"FileGetCommand"); - = - //load the write related commands - writeCommands.add(packageName+"ContentCreateCommand"); - writeCommands.add(packageName+"FileCreateCommand"); - writeCommands.add(packageName+"FolderCreateCommand"); - writeCommands.add(packageName+"FileUpdateCommand"); - writeCommands.add(packageName+"StoreArchiveCommand"); - writeCommands.add("org.jboss.portal.cms.impl.jcr.composite.NewFile= Command"); - writeCommands.add("org.jboss.portal.cms.impl.jcr.composite.UpdateF= ileCommand"); - = - = - //load the manage related commands - manageCommands.add(packageName+"CopyCommand"); - manageCommands.add(packageName+"DeleteCommand"); - manageCommands.add(packageName+"MoveCommand"); - } - = - = - /** - * = - * @param securityContext - * @return - */ - public boolean hasAccess(PortalCMSSecurityContext cmsSecurityContext) - { - boolean hasAccess =3D true; = - User loggedInUser =3D (User)cmsSecurityContext.getIdentity(); - JCRCommand command =3D (JCRCommand)cmsSecurityContext.getAttribute= ("command"); - = - //get the action code of the action being protected - int actionCode =3D -1; - if(command !=3D null) - { - actionCode =3D this.getActionCode(command); - } - = - switch(actionCode) - { - case read: = - hasAccess =3D this.hasReadAccess(loggedInUser,command); + private AuthorizationManager authorizationManager =3D null; + + + /** + * + * + */ + public ACLEnforcer(AuthorizationManager authorizationManager) + { + super(); + this.authorizationManager =3D authorizationManager; + + String packageName =3D "org.jboss.portal.cms.impl.jcr.command."; + + //load the read related commands + readCommands.add(packageName + "FolderGetListCommand"); + readCommands.add(packageName + "FolderGetCommand"); + readCommands.add(packageName + "FileGetListCommand"); + readCommands.add(packageName + "FileGetCommand"); + + //load the write related commands + writeCommands.add(packageName + "ContentCreateCommand"); + writeCommands.add(packageName + "FileCreateCommand"); + writeCommands.add(packageName + "FolderCreateCommand"); + writeCommands.add(packageName + "FileUpdateCommand"); + writeCommands.add(packageName + "StoreArchiveCommand"); + writeCommands.add("org.jboss.portal.cms.impl.jcr.composite.NewFileCo= mmand"); + writeCommands.add("org.jboss.portal.cms.impl.jcr.composite.UpdateFil= eCommand"); + + //load the manage related commands + manageCommands.add(packageName + "CopyCommand"); + manageCommands.add(packageName + "DeleteCommand"); + manageCommands.add(packageName + "MoveCommand"); + } + + + /** + * @param securityContext + * @return + */ + public boolean hasAccess(PortalCMSSecurityContext cmsSecurityContext) + { + boolean hasAccess =3D true; + User loggedInUser =3D (User)cmsSecurityContext.getIdentity(); + JCRCommand command =3D (JCRCommand)cmsSecurityContext.getAttribute("= command"); + + //get the action code of the action being protected + int actionCode =3D -1; + if (command !=3D null) + { + actionCode =3D this.getActionCode(command); + } + + switch (actionCode) + { + case read: + hasAccess =3D this.hasReadAccess(loggedInUser, command); break; - = - case write: = - hasAccess =3D this.hasWriteAccess(loggedInUser,command); + + case write: + hasAccess =3D this.hasWriteAccess(loggedInUser, command); break; - = - case manage: = - hasAccess =3D this.hasManageAccess(loggedInUser,command); + + case manage: + hasAccess =3D this.hasManageAccess(loggedInUser, command); break; - = - default: - //check if a filter needs to be applied here...... - //only show resources that the user has write or more acce= ss to - if(cmsSecurityContext.getAttribute("applyFilter")!=3Dnull) - { - String path =3D (String)cmsSecurityContext.getAttribut= e("applyFilter"); - hasAccess =3D this.computeToolAccess(loggedInUser, pat= h); = - } - else if(cmsSecurityContext.getAttribute("path")!=3Dnull) - { - String path =3D (String)cmsSecurityContext.getAttribut= e("path"); - hasAccess =3D this.computeAccess(loggedInUser, path, "= read"); = - } - //check if workflow management protection needs to be enforced - else if(cmsSecurityContext.getAttribute("manageWorkflow")!= =3Dnull) - { - ApprovePublish service =3D (ApprovePublish)cmsSecurityCon= text. - getAttribute("approvePublish"); - hasAccess =3D this.computeWorkflowManagementAccess(logged= InUser,service.getManagers()); - } - break; - } - = - return hasAccess; - } - = - /** - * = - * @param command - * @return - */ - private int getActionCode(JCRCommand command) - { - int actionCode =3D -1; - = - if(this.readCommands.contains(command.getClass().getName())) - { - actionCode =3D read; - } - else if(this.writeCommands.contains(command.getClass().getName())) - { - actionCode =3D write; - } - else if(this.manageCommands.contains(command.getClass().getName())) - { - actionCode =3D manage; - } - return actionCode; - } = - //--------------------------------------------------------------------= ------------------------------------------------------------------- - /** - * = - * @param user - * @param command - * @return - */ - private boolean hasReadAccess(User user,JCRCommand command) - { - boolean hasReadAccess =3D false; - = - String path =3D null; - if(command instanceof FolderGetListCommand) - { - path =3D ((FolderGetListCommand)command).sFolderPath; - } - else if(command instanceof FolderGetCommand) - { - path =3D ((FolderGetCommand)command).msPath; - } - else if(command instanceof FileGetCommand) - { - path =3D ((FileGetCommand)command).path; - } - else if(command instanceof FileGetListCommand) - { - path =3D ((FileGetListCommand)command).sFilePath; - } - = - hasReadAccess =3D this.computeAccess(user,path,"read"); - if(!hasReadAccess) - { - //make sure implied write is not available - hasReadAccess =3D this.computeAccess(user,path,"write"); - if(!hasReadAccess) + + default: + //check if a filter needs to be applied here...... + //only show resources that the user has write or more access to + if (cmsSecurityContext.getAttribute("applyFilter") !=3D null) { - //make sure implied manage is not available - hasReadAccess =3D this.computeAccess(user,path,"manage"); + String path =3D (String)cmsSecurityContext.getAttribute("ap= plyFilter"); + hasAccess =3D this.computeToolAccess(loggedInUser, path); } - } - = - return hasReadAccess; - } = - //--------------------------------------------------------------------= ----------------------------------------------------------------------- - /** - * = - * @param user - * @param command - * @return - */ - private boolean hasWriteAccess(User user,JCRCommand command) - { - boolean hasWriteAccess =3D false; - = - String path =3D null; - if(command instanceof ContentCreateCommand) - { - path =3D ((ContentCreateCommand)command).mFile.getBasePath(); - } - else if(command instanceof FileCreateCommand) - { - path =3D ((FileCreateCommand)command).mFile.getBasePath(); - } - else if(command instanceof FolderCreateCommand) - { - path =3D ((FolderCreateCommand)command).mFolder.getBasePath(); - } - else if(command instanceof FileUpdateCommand) - { - path =3D ((FileUpdateCommand)command).mFile.getBasePath(); - } - else if(command instanceof StoreArchiveCommand) - { - path =3D ((StoreArchiveCommand)command).msRootPath; - } - else if(command instanceof NewFileCommand) - { - path =3D ((NewFileCommand)command).getPath(); - } - else if(command instanceof UpdateFileCommand) - { - path =3D ((UpdateFileCommand)command).getPath(); - } - = - hasWriteAccess =3D this.computeAccess(user,path,"write"); - if(!hasWriteAccess) - { - //make sure implied manage is not available - hasWriteAccess =3D this.computeAccess(user,path,"manage"); - } - = - return hasWriteAccess; - } - //--------------------------------------------------------------------= --------------------------------------------------------------------- - /** - * = - * @param user - * @param command - * @return - */ - private boolean hasManageAccess(User user,JCRCommand command) - { - boolean hasManageAccess =3D false; - = - String path =3D null; - if(command instanceof CopyCommand) - { - path =3D ((CopyCommand)command).msFromPath; - hasManageAccess =3D this.computeAccess(user,path,"manage"); - if(hasManageAccess) + else if (cmsSecurityContext.getAttribute("path") !=3D null) { - path =3D ((CopyCommand)command).msToPath; - hasManageAccess =3D this.computeAccess(user,path,"manage"); + String path =3D (String)cmsSecurityContext.getAttribute("pa= th"); + hasAccess =3D this.computeAccess(loggedInUser, path, "read"= ); } - } - else if(command instanceof DeleteCommand) - { - path =3D ((DeleteCommand)command).msPath; - hasManageAccess =3D this.computeAccess(user,path,"manage"); - } - else if(command instanceof MoveCommand) - { - path =3D ((MoveCommand)command).msFromPath; - hasManageAccess =3D this.computeAccess(user,path,"manage"); - if(hasManageAccess) + //check if workflow management protection needs to be enforced + else if (cmsSecurityContext.getAttribute("manageWorkflow") != =3D null) { - path =3D ((MoveCommand)command).msToPath; - hasManageAccess =3D this.computeAccess(user,path,"manage"); + ApprovePublish service =3D (ApprovePublish)cmsSecurityConte= xt. + getAttribute("approvePublish"); + hasAccess =3D this.computeWorkflowManagementAccess(loggedIn= User, service.getManagers()); } - } = - = - return hasManageAccess; - } - //--------------------------------------------------------------------= --------------------------------------------------------------------- - /** - * = - */ - private boolean computeAccess(User user,String path,String action) - { - boolean hasAccess =3D false; - = - //to prevent any administration issues, if the user is the 'admin' - //treat him like a super user with access to everything in the cms - if(user!=3D null && user.getUserName()!=3Dnull && user.getUserName= ().equals("admin")) - { - return true; - } - = - = - //get the permissions available for the user in question - Collection userPermissions =3D this.getPermissions(user); - = - //check against permissions that are explicitly specified on this = node (file or folder) - Collection specificPermissions =3D this.getPermissions(path); - for(Iterator itr=3DspecificPermissions.iterator();itr.hasNext();) - { - Permission specificPermission =3D (Permission)itr.next(); - if(specificPermission.getService().equals("cms") && specificPe= rmission.getAction().equals(action)) + break; + } + + return hasAccess; + } + + /** + * @param command + * @return + */ + private int getActionCode(JCRCommand command) + { + int actionCode =3D -1; + + if (this.readCommands.contains(command.getClass().getName())) + { + actionCode =3D read; + } + else if (this.writeCommands.contains(command.getClass().getName())) + { + actionCode =3D write; + } + else if (this.manageCommands.contains(command.getClass().getName())) + { + actionCode =3D manage; + } + return actionCode; + } + + //---------------------------------------------------------------------= ------------------------------------------------------------------ + /** + * @param user + * @param command + * @return + */ + private boolean hasReadAccess(User user, JCRCommand command) + { + boolean hasReadAccess =3D false; + + String path =3D null; + if (command instanceof FolderGetListCommand) + { + path =3D ((FolderGetListCommand)command).sFolderPath; + } + else if (command instanceof FolderGetCommand) + { + path =3D ((FolderGetCommand)command).msPath; + } + else if (command instanceof FileGetCommand) + { + path =3D ((FileGetCommand)command).path; + } + else if (command instanceof FileGetListCommand) + { + path =3D ((FileGetListCommand)command).sFilePath; + } + + hasReadAccess =3D this.computeAccess(user, path, "read"); + if (!hasReadAccess) + { + //make sure implied write is not available + hasReadAccess =3D this.computeAccess(user, path, "write"); + if (!hasReadAccess) + { + //make sure implied manage is not available + hasReadAccess =3D this.computeAccess(user, path, "manage"); + } + } + + return hasReadAccess; + } + + //---------------------------------------------------------------------= ---------------------------------------------------------------------- + /** + * @param user + * @param command + * @return + */ + private boolean hasWriteAccess(User user, JCRCommand command) + { + boolean hasWriteAccess =3D false; + + String path =3D null; + if (command instanceof ContentCreateCommand) + { + path =3D ((ContentCreateCommand)command).mFile.getBasePath(); + } + else if (command instanceof FileCreateCommand) + { + path =3D ((FileCreateCommand)command).mFile.getBasePath(); + } + else if (command instanceof FolderCreateCommand) + { + path =3D ((FolderCreateCommand)command).mFolder.getBasePath(); + } + else if (command instanceof FileUpdateCommand) + { + path =3D ((FileUpdateCommand)command).mFile.getBasePath(); + } + else if (command instanceof StoreArchiveCommand) + { + path =3D ((StoreArchiveCommand)command).msRootPath; + } + else if (command instanceof NewFileCommand) + { + path =3D ((NewFileCommand)command).getPath(); + } + else if (command instanceof UpdateFileCommand) + { + path =3D ((UpdateFileCommand)command).getPath(); + } + + hasWriteAccess =3D this.computeAccess(user, path, "write"); + if (!hasWriteAccess) + { + //make sure implied manage is not available + hasWriteAccess =3D this.computeAccess(user, path, "manage"); + } + + return hasWriteAccess; + } + + //---------------------------------------------------------------------= -------------------------------------------------------------------- + /** + * @param user + * @param command + * @return + */ + private boolean hasManageAccess(User user, JCRCommand command) + { + boolean hasManageAccess =3D false; + + String path =3D null; + if (command instanceof CopyCommand) + { + path =3D ((CopyCommand)command).msFromPath; + hasManageAccess =3D this.computeAccess(user, path, "manage"); + if (hasManageAccess) + { + path =3D ((CopyCommand)command).msToPath; + hasManageAccess =3D this.computeAccess(user, path, "manage"); + } + } + else if (command instanceof DeleteCommand) + { + path =3D ((DeleteCommand)command).msPath; + hasManageAccess =3D this.computeAccess(user, path, "manage"); + } + else if (command instanceof MoveCommand) + { + path =3D ((MoveCommand)command).msFromPath; + hasManageAccess =3D this.computeAccess(user, path, "manage"); + if (hasManageAccess) + { + path =3D ((MoveCommand)command).msToPath; + hasManageAccess =3D this.computeAccess(user, path, "manage"); + } + } + + return hasManageAccess; + } + + //---------------------------------------------------------------------= -------------------------------------------------------------------- + /** + * + */ + private boolean computeAccess(User user, String path, String action) + { + boolean hasAccess =3D false; + + //to prevent any administration issues, if the user is the 'admin' + //treat him like a super user with access to everything in the cms + if (user !=3D null && user.getUserName() !=3D null && user.getUserNa= me().equals("admin")) + { + return true; + } + + //get the permissions available for the user in question + Collection userPermissions =3D this.getPermissions(user); + + //check against permissions that are explicitly specified on this no= de (file or folder) + Collection specificPermissions =3D this.getPermissions(path); + for (Iterator itr =3D specificPermissions.iterator(); itr.hasNext();) + { + Permission specificPermission =3D (Permission)itr.next(); + if (specificPermission.getService().equals("cms") && specificPerm= ission.getAction().equals(action)) + { + for (Iterator itr2 =3D userPermissions.iterator(); itr2.hasNex= t();) { - for(Iterator itr2=3DuserPermissions.iterator();itr2.hasNex= t();) - { - Permission userPermission =3D (Permission)itr2.next(); - if(userPermission.getService().equals("cms") && userPe= rmission.getAction().equals(action)) - { + Permission userPermission =3D (Permission)itr2.next(); + if (userPermission.getService().equals("cms") && userPermis= sion.getAction().equals(action)) + { + String pathCriteria =3D userPermission.findCriteriaValue= ("path"); + if (pathCriteria.equals(path)) + { + //this means this user has read access to this path + hasAccess =3D true; + } + } + } + } + } + + if (specificPermissions !=3D null && !specificPermissions.isEmpty()) + { + //explicit permissions on this node have been specified.... + //which override any permissions that could be inherited via the = path hierarchy + return hasAccess; + } + + //check against the full path of this resource and make sure, + //there aren't any specific node permissions specified on any node a= long the path + //that excludes this user from having access for this action + StringTokenizer st =3D new StringTokenizer(path, "/"); + StringBuffer buffer =3D new StringBuffer("/"); + List list =3D new ArrayList(); + list.add(new String(buffer.toString())); + while (st.hasMoreTokens()) + { + String token =3D st.nextToken(); + + buffer.append(token); + list.add(buffer.toString()); + + //Make sure only path leading up to the resource is checked again= st. + //Not on the full path to the resource... + //Because if that was the case, the specificPermissions would hav= e been applied + //in earlier checks...This is to check the recursive application = of permissions + //to the resource in question + if (st.hasMoreTokens()) + { + buffer.append("/"); + } + else + { + continue; + } + } + + boolean explicitPermissionsFound =3D false; + Iterator it =3D list.iterator(); + while (it.hasNext()) + { + String currentPath =3D (String)it.next(); + Collection permissions =3D this.getPermissions(currentPath); + + //perform processing for permissions explicitly set on this node + //in the path hierarchy + if (permissions !=3D null && !permissions.isEmpty()) + { + explicitPermissionsFound =3D true; + + //specific node permissions found on one of the nodes in the p= ath... + //make sure the current user is listed to have access to this. + boolean accessFound =3D false; + for (Iterator itr =3D permissions.iterator(); itr.hasNext();) + { + Permission nodePermission =3D (Permission)itr.next(); + if (nodePermission.getService().equals("cms") && nodePermis= sion.getAction().equals(action)) + { + for (Iterator itr2 =3D userPermissions.iterator(); itr2.= hasNext();) + { + Permission userPermission =3D (Permission)itr2.next(); + if (userPermission.getService().equals("cms") && + this.isActionImplied(userPermission.getAction(), a= ction) + ) + { String pathCriteria =3D userPermission.findCriteri= aValue("path"); - if(pathCriteria.equals(path)) + if (pathCriteria.equals(currentPath)) { - //this means this user has read access to this= path - hasAccess =3D true; + //this means this user has read access to this = path + accessFound =3D true; } - } - } + } + } + } + if (accessFound) + { + break; + } } - } - = - if(specificPermissions!=3Dnull && !specificPermissions.isEmpty()) - { - //explicit permissions on this node have been specified.... - //which override any permissions that could be inherited via t= he path hierarchy - return hasAccess; - } - = - = - //check against the full path of this resource and make sure, - //there aren't any specific node permissions specified on any node= along the path - //that excludes this user from having access for this action - StringTokenizer st =3D new StringTokenizer(path,"/"); - StringBuffer buffer =3D new StringBuffer("/"); - List list =3D new ArrayList(); - list.add(new String(buffer.toString())); - while(st.hasMoreTokens()) - { - String token =3D st.nextToken(); - = - buffer.append(token); - list.add(buffer.toString()); - = - //Make sure only path leading up to the resource is checked ag= ainst. - //Not on the full path to the resource... - //Because if that was the case, the specificPermissions would = have been applied - //in earlier checks...This is to check the recursive applicati= on of permissions - //to the resource in question - if(st.hasMoreTokens()) - { = - buffer.append("/"); - } - else + if (!accessFound) { - continue; + //the user does not have access through the path hierarchy + return false; } - } - = - boolean explicitPermissionsFound =3D false; - Iterator it =3D list.iterator(); - while (it.hasNext()) - { - String currentPath =3D (String)it.next(); - Collection permissions =3D this.getPermissions(currentPath); + } + } = - //perform processing for permissions explicitly set on this no= de - //in the path hierarchy - if(permissions!=3Dnull && !permissions.isEmpty()) - { - explicitPermissionsFound =3D true; - = - //specific node permissions found on one of the nodes in t= he path... - //make sure the current user is listed to have access to t= his. - boolean accessFound =3D false; - for(Iterator itr=3Dpermissions.iterator();itr.hasNext();) - { - Permission nodePermission =3D (Permission)itr.next(); - if(nodePermission.getService().equals("cms") && nodePe= rmission.getAction().equals(action)) - { - for(Iterator itr2=3DuserPermissions.iterator();itr= 2.hasNext();) - { - Permission userPermission =3D (Permission)itr2= .next(); - if( userPermission.getService().equals("cms")= && = - this.isActionImplied(userPermission.getActio= n(),action) - ) - { - String pathCriteria =3D userPermission.fin= dCriteriaValue("path"); - if(pathCriteria.equals(currentPath)) - { - //this means this user has read access= to this path - accessFound =3D true; - } - } - } - } - if(accessFound) - { - break; - } - } - if(!accessFound) - { - //the user does not have access through the path hiera= rchy - return false; - } - } = - } - = - //if i am here the user has access to this node via path hierarchy= inheritance - if(explicitPermissionsFound) - { - //and without the hierarchy access *not being overriden* by an= y *explicit permissions* - //on nodes in the hierarchy - hasAccess =3D true; - } - else - { - //there were no permissions found anywhere throughout the reso= urce's path hierarchy - hasAccess =3D false; - } - = - return hasAccess; - } - = - /** - * This is used to filter out cms resources in the CMS Admin tool, so = that the user - * can see only the resources that he has write/manage access to - * = - * @param user - * @param path - * @return - */ - private boolean computeToolAccess(User user,String path) - { - boolean toolAccess =3D false; - = - //to prevent any administration issues, if the user is the 'admin' - //treat him like a super user with access to everything in the cms - if(user!=3D null && user.getUserName()!=3Dnull && user.getUserName= ().equals("admin")) - { - return true; - } + //if i am here the user has access to this node via path hierarchy i= nheritance + if (explicitPermissionsFound) + { + //and without the hierarchy access *not being overriden* by any *= explicit permissions* + //on nodes in the hierarchy + hasAccess =3D true; + } + else + { + //there were no permissions found anywhere throughout the resourc= e's path hierarchy + hasAccess =3D false; + } = - //get the permissions available for the user in question - Collection userPermissions =3D this.getPermissions(user); - = - //check against permissions that are explicitly specified on this = node (file or folder) - Collection specificPermissions =3D this.getPermissions(path); - for(Iterator itr=3DspecificPermissions.iterator();itr.hasNext();) - { - Permission specificPermission =3D (Permission)itr.next(); - if( (specificPermission.getService().equals("cms")) && = - (specificPermission.getAction().equals("write") || specifi= cPermission.getAction().equals("manage")) + return hasAccess; + } + + /** + * This is used to filter out cms resources in the CMS Admin tool, so t= hat the user can see only the resources that + * he has write/manage access to + * + * @param user + * @param path + * @return + */ + private boolean computeToolAccess(User user, String path) + { + boolean toolAccess =3D false; + + //to prevent any administration issues, if the user is the 'admin' + //treat him like a super user with access to everything in the cms + if (user !=3D null && user.getUserName() !=3D null && user.getUserNa= me().equals("admin")) + { + return true; + } + + //get the permissions available for the user in question + Collection userPermissions =3D this.getPermissions(user); + + //check against permissions that are explicitly specified on this no= de (file or folder) + Collection specificPermissions =3D this.getPermissions(path); + for (Iterator itr =3D specificPermissions.iterator(); itr.hasNext();) + { + Permission specificPermission =3D (Permission)itr.next(); + if ((specificPermission.getService().equals("cms")) && + (specificPermission.getAction().equals("write") || specificPer= mission.getAction().equals("manage")) ) + { + for (Iterator itr2 =3D userPermissions.iterator(); itr2.hasNex= t();) { - for(Iterator itr2=3DuserPermissions.iterator();itr2.hasNex= t();) - { - Permission userPermission =3D (Permission)itr2.next(); - if( (userPermission.getService().equals("cms")) && = - (userPermission.getAction().equals("write") || use= rPermission.getAction().equals("manage")) - ) - { - String pathCriteria =3D userPermission.findCriteri= aValue("path"); - if(pathCriteria.equals(path)) - { - //this means this user has read access to this= path - toolAccess =3D true; - } - } - } + Permission userPermission =3D (Permission)itr2.next(); + if ((userPermission.getService().equals("cms")) && + (userPermission.getAction().equals("write") || userPermi= ssion.getAction().equals("manage")) + ) + { + String pathCriteria =3D userPermission.findCriteriaValue= ("path"); + if (pathCriteria.equals(path)) + { + //this means this user has read access to this path + toolAccess =3D true; + } + } } - } - = - if(specificPermissions!=3Dnull && !specificPermissions.isEmpty()) - { - //explicit permissions on this node have been specified.... - //which override any permissions that could be inherited via t= he path hierarchy - return toolAccess; - } - = - //if i am here...calculate based on permissions inherited via path= hierarchy - Collection writeOrMoreCriteria =3D this.getWriteOrMore(userPermiss= ions); = - for(Iterator itr=3DwriteOrMoreCriteria.iterator();itr.hasNext();) - { - Criteria cour =3D (Criteria)itr.next(); - if(this.doesPathMatchPattern(path,cour.getValue())) + } + } + + if (specificPermissions !=3D null && !specificPermissions.isEmpty()) + { + //explicit permissions on this node have been specified.... + //which override any permissions that could be inherited via the = path hierarchy + return toolAccess; + } + + //if i am here...calculate based on permissions inherited via path h= ierarchy + Collection writeOrMoreCriteria =3D this.getWriteOrMore(userPermissio= ns); + for (Iterator itr =3D writeOrMoreCriteria.iterator(); itr.hasNext();) + { + Criteria cour =3D (Criteria)itr.next(); + if (this.doesPathMatchPattern(path, cour.getValue())) + { + + toolAccess =3D true; + break; + } + } + + return toolAccess; + } + + /** + * @param user + * @return + */ + private boolean computeWorkflowManagementAccess(User user, Set managerR= oles) + { + if (managerRoles =3D=3D null || managerRoles.isEmpty()) + { + return false; + } + + //now check to see if the currently logged in user has workflow mana= gement access + try + { + boolean hasAccess =3D false; + + Set userRoles =3D this.authorizationManager.getProvider(). + getMembershipModule().getRoles(user); + + if (userRoles !=3D null) + { + for (Iterator itr =3D userRoles.iterator(); itr.hasNext();) { - = - toolAccess =3D true; - break; + Role userRole =3D (Role)itr.next(); + String userRoleName =3D userRole.getName(); + if (managerRoles.contains(userRoleName)) + { + hasAccess =3D true; + break; + } } - } - = - return toolAccess; - } + } = - /** - * = - * @param user - * @return - */ - private boolean computeWorkflowManagementAccess(User user,Set managerR= oles) - { - if(managerRoles =3D=3D null || managerRoles.isEmpty()) - { - return false; - } - = - //now check to see if the currently logged in user has workflow manag= ement access - try - { - boolean hasAccess =3D false; - = - Set userRoles =3D this.authorizationManager.getProvider(). - getMembershipModule().getRoles(user); - = - if(userRoles !=3D null) - { - for(Iterator itr=3DuserRoles.iterator();itr.hasNext();) - { - Role userRole =3D (Role)itr.next(); - String userRoleName =3D userRole.getName(); - if(managerRoles.contains(userRoleName)) - { - hasAccess =3D true; - break; - } - } - } - = - return hasAccess; - } - catch(Exception e) - { - throw new RuntimeException(e); - } - } - //--------------------------------------------------------------------= -------------------------------------------------------------------------- - /** - * = - * @param user - * @return - */ - private Collection getPermissions(User user) - { - Collection permissions =3D null; = - = - if(user!=3Dnull) - { - //this is not an anonymous access - String userId =3D user.getUserName(); - String uri =3D this.authorizationManager.getProvider().getUser= URI(userId); - permissions =3D this.authorizationManager.getProvider().getSec= urityBindings(uri); - } = - else - { - //this is an anonymous access - String uri =3D this.authorizationManager.getProvider().getRoleURI= (AuthorizationManager.Anonymous); - permissions =3D this.authorizationManager.getProvider().getSecuri= tyBindings(uri); - } - return permissions; - } - = - /** - * = - * @param user - * @return - */ - private Collection getPermissions(String path) - { - Criteria criteria =3D new Criteria("path",path); - = - String uri =3D this.authorizationManager.getProvider(). - getCriteriaURI(criteria.getName(), criteria.getValue()); - = - return this.authorizationManager.getProvider().getSecurityBindings= (uri); - } = - = - /** - * = - * @param allPermissions - * @return - */ - private Collection getWriteOrMore(Collection allPermissions) - { - Collection writeOrMore =3D new HashSet(); - = - if(allPermissions!=3Dnull) - { - for(Iterator itr=3DallPermissions.iterator();itr.hasNext();) - { - Permission cour =3D (Permission)itr.next(); - if( (cour.getService().equals("cms")) && - ( cour.getAction().equals("write") || cour.getAction()= .equals("manage") ) + return hasAccess; + } + catch (Exception e) + { + throw new RuntimeException(e); + } + } + + //---------------------------------------------------------------------= ------------------------------------------------------------------------- + /** + * @param user + * @return + */ + private Collection getPermissions(User user) + { + Collection permissions =3D null; + + if (user !=3D null) + { + //this is not an anonymous access + String userId =3D user.getUserName(); + String uri =3D this.authorizationManager.getProvider().getUserURI= (userId); + permissions =3D this.authorizationManager.getProvider().getSecuri= tyBindings(uri); + } + else + { + //this is an anonymous access + String uri =3D this.authorizationManager.getProvider().getRoleURI= (AuthorizationManager.Anonymous); + permissions =3D this.authorizationManager.getProvider().getSecuri= tyBindings(uri); + } + return permissions; + } + + /** + * @param user + * @return + */ + private Collection getPermissions(String path) + { + Criteria criteria =3D new Criteria("path", path); + + String uri =3D this.authorizationManager.getProvider(). + getCriteriaURI(criteria.getName(), criteria.getValue()); + + return this.authorizationManager.getProvider().getSecurityBindings(u= ri); + } + + /** + * @param allPermissions + * @return + */ + private Collection getWriteOrMore(Collection allPermissions) + { + Collection writeOrMore =3D new HashSet(); + + if (allPermissions !=3D null) + { + for (Iterator itr =3D allPermissions.iterator(); itr.hasNext();) + { + Permission cour =3D (Permission)itr.next(); + if ((cour.getService().equals("cms")) && + (cour.getAction().equals("write") || cour.getAction().equal= s("manage")) ) - { - writeOrMore.addAll(cour.getCriteria()); - } - } - } - = - return writeOrMore; - } - = - /** - * @param path - * @param pattern - * @return - */ - private boolean doesPathMatchPattern(String path,String pattern) - { - boolean match =3D true; = - = - //format the path first before starting to match it with the speci= fied pattern - if(!path.startsWith("/")) - { - path =3D "/" + path; - } - if(!path.endsWith("/")) - { - path =3D path + "/"; - } - = - StringTokenizer patternTokenizer =3D new StringTokenizer(pattern,"= /"); - StringTokenizer pathTokenizer =3D new StringTokenizer(path,"/"); - StringBuffer pathMatched =3D new StringBuffer("/"); - StringBuffer patternMatched =3D new StringBuffer(); - if(pattern.startsWith("/")) - { - patternMatched.append("/"); - } - while( - patternTokenizer.hasMoreTokens() && = - pathTokenizer.hasMoreTokens() - ) - { - String patternToken =3D patternTokenizer.nextToken(); - String pathToken =3D pathTokenizer.nextToken(); - = - //setup token tracking - pathMatched.append(pathToken+"/"); - if(patternTokenizer.hasMoreTokens()) { - patternMatched.append(patternToken+"/"); + writeOrMore.addAll(cour.getCriteria()); } - else + } + } + + return writeOrMore; + } + + /** + * @param path + * @param pattern + * @return + */ + private boolean doesPathMatchPattern(String path, String pattern) + { + boolean match =3D true; + + //format the path first before starting to match it with the specifi= ed pattern + if (!path.startsWith("/")) + { + path =3D "/" + path; + } + if (!path.endsWith("/")) + { + path =3D path + "/"; + } + + StringTokenizer patternTokenizer =3D new StringTokenizer(pattern, "/= "); + StringTokenizer pathTokenizer =3D new StringTokenizer(path, "/"); + StringBuffer pathMatched =3D new StringBuffer("/"); + StringBuffer patternMatched =3D new StringBuffer(); + if (pattern.startsWith("/")) + { + patternMatched.append("/"); + } + while ( + patternTokenizer.hasMoreTokens() && + pathTokenizer.hasMoreTokens() + ) + { + String patternToken =3D patternTokenizer.nextToken(); + String pathToken =3D pathTokenizer.nextToken(); + + //setup token tracking + pathMatched.append(pathToken + "/"); + if (patternTokenizer.hasMoreTokens()) + { + patternMatched.append(patternToken + "/"); + } + else + { + patternMatched.append(patternToken); + } + + //perform token matching + if (!match) + { + continue; + } + int wildCardIndex =3D patternToken.indexOf('*'); + //if wildCard is not relevant + if (wildCardIndex <=3D 0) + { + //if wildCardIndex =3D=3D 0 then this token matches... + if (wildCardIndex !=3D 0 && !pathToken.equals(patternToken)) { - patternMatched.append(patternToken); + match =3D false; } - = - //perform token matching - if(!match){continue;} - int wildCardIndex =3D patternToken.indexOf('*'); - //if wildCard is not relevant - if(wildCardIndex<=3D0) + } + else + { + String wildPath =3D pathToken.substring(0, wildCardIndex); + String wildPattern =3D patternToken.substring(0, wildCardIndex= ); + if (!wildPath.equals(wildPattern)) { - //if wildCardIndex =3D=3D 0 then this token matches... - if(wildCardIndex!=3D0 && !pathToken.equals(patternToken)) - { - match =3D false; - } + match =3D false; } - else - { - String wildPath =3D pathToken.substring(0,wildCardIndex); - String wildPattern =3D patternToken.substring(0,wildCardIn= dex); - if(!wildPath.equals(wildPattern)) - { - match =3D false; - } - } - } - = - return match; - } - = - /** - * = - * @param action - * @param impliedTarget - * @return - */ - private boolean isActionImplied(String action,String impliedTarget) - { - boolean implied =3D false; - = - if(impliedTarget.equalsIgnoreCase("read")) - { - if(action.equalsIgnoreCase("read") || action.equalsIgnoreCase("write= ") || action.equalsIgnoreCase("manage")) - { - implied =3D true; - } - } - else if(impliedTarget.equalsIgnoreCase("write")) - { - if(action.equalsIgnoreCase("write") || action.equalsIgnoreCase("mana= ge")) - { - implied =3D true; - } - } - else if(impliedTarget.equalsIgnoreCase("manage")) - { - if(action.equalsIgnoreCase("manage")) - { - implied =3D true; - } - } - = - return implied; - } + } + } + + return match; + } + + /** + * @param action + * @param impliedTarget + * @return + */ + private boolean isActionImplied(String action, String impliedTarget) + { + boolean implied =3D false; + + if (impliedTarget.equalsIgnoreCase("read")) + { + if (action.equalsIgnoreCase("read") || action.equalsIgnoreCase("w= rite") || action.equalsIgnoreCase("manage")) + { + implied =3D true; + } + } + else if (impliedTarget.equalsIgnoreCase("write")) + { + if (action.equalsIgnoreCase("write") || action.equalsIgnoreCase("= manage")) + { + implied =3D true; + } + } + else if (impliedTarget.equalsIgnoreCase("manage")) + { + if (action.equalsIgnoreCase("manage")) + { + implied =3D true; + } + } + + return implied; + } } Property changes on: branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jbos= s/portal/cms/impl/jcr/command/ACLEnforcer.java ___________________________________________________________________ Name: svn:keywords + = Modified: branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cm= s/impl/jcr/command/ContentCreateCommand.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cms/impl= /jcr/command/ContentCreateCommand.java 2007-10-27 23:01:46 UTC (rev 8784) +++ branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cms/impl= /jcr/command/ContentCreateCommand.java 2007-10-28 01:09:21 UTC (rev 8785) @@ -62,8 +62,8 @@ contentNode.setProperty("portalcms:description", new StringValue(= mFile.getContent().getDescription())); contentNode.setProperty("portalcms:title", new StringValue(mFile.= getContent().getTitle())); contentNode.setProperty("portalcms:language", new StringValue(mFi= le.getContent().getLocale().getLanguage())); - = = + if (mFile.getContent().getMimeType() !=3D null) { contentNode.setProperty("jcr:mimeType", mFile.getContent().get= MimeType()); Property changes on: branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jbos= s/portal/cms/impl/jcr/command/ContentCreateCommand.java ___________________________________________________________________ Name: svn:keywords - Author Date Id Revision + = Modified: branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cm= s/impl/jcr/command/ContentCreateNewVersionCommand.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cms/impl= /jcr/command/ContentCreateNewVersionCommand.java 2007-10-27 23:01:46 UTC (r= ev 8784) +++ branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cms/impl= /jcr/command/ContentCreateNewVersionCommand.java 2007-10-28 01:09:21 UTC (r= ev 8785) @@ -27,7 +27,6 @@ import org.jboss.portal.cms.impl.jcr.util.VersionUtil; import org.jboss.portal.cms.model.Content; import org.jboss.portal.common.invocation.Scope; - import org.jboss.portal.identity.User; = import javax.jcr.Node; @@ -36,7 +35,7 @@ = /** * Creates a new version of the content and labels it "LIVE". - * = + * * @author Roy Russo * @author Thomas Heute * @author Sohil Shah - sohil.shah(a)jboss.com @@ -53,8 +52,7 @@ = /** * @param content - * @param bMakeLive - * Whether this updated version should be made "LIVE" + * @param bMakeLive Whether this updated version should be made "LIVE" */ public ContentCreateNewVersionCommand(Content content, boolean bMakeLiv= e) { @@ -69,7 +67,7 @@ } = /** - * = + * */ public Object execute() { @@ -80,27 +78,27 @@ // create versions for (int i =3D 0; i < mContents.size(); i++) { - Content content =3D (Content) mContents.get(i); - Node contentNode =3D (Node) context.getSession().getItem( - content.getBasePath()); + Content content =3D (Content)mContents.get(i); + Node contentNode =3D (Node)context.getSession().getItem( + content.getBasePath()); = // if the creator of this content is known, record it - User user =3D (User) this.context.getAttribute(scope, "user"); + User user =3D (User)this.context.getAttribute(scope, "user"); if (user !=3D null) { contentNode.setProperty("portalcms:user", user.getUserName(= )); } = contentNode.setProperty("portalcms:size", new StringValue(Stri= ng - .valueOf(content.getBytes().length))); + .valueOf(content.getBytes().length))); context.getSession().save(); = - String processId =3D (String) context - .getAttribute(scope, "processid"); + String processId =3D (String)context + .getAttribute(scope, "processid"); = // integration of publish/approval workflow if (this.bMakeLive && processId !=3D null - && processId.trim().length() !=3D 0) + && processId.trim().length() !=3D 0) { // now save workflow related meta data on this version // so that this version can be processed later in the execu= tion @@ -116,7 +114,7 @@ else { // remove any processid if they are present on the node - contentNode.setProperty("portalcms:processid", (String) nul= l); + contentNode.setProperty("portalcms:processid", (String)null= ); contentNode.save(); = // not asking to publish the content...no workflow needed Property changes on: branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jbos= s/portal/cms/impl/jcr/command/ContentCreateNewVersionCommand.java ___________________________________________________________________ Name: svn:keywords - Author Date Id Revision + = Modified: branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cm= s/impl/jcr/command/ContentGetCommand.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cms/impl= /jcr/command/ContentGetCommand.java 2007-10-27 23:01:46 UTC (rev 8784) +++ branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cms/impl= /jcr/command/ContentGetCommand.java 2007-10-28 01:09:21 UTC (rev 8785) @@ -22,12 +22,12 @@ *************************************************************************= *****/ package org.jboss.portal.cms.impl.jcr.command; = +import org.jboss.logging.Logger; import org.jboss.portal.cms.impl.ContentImpl; import org.jboss.portal.cms.impl.jcr.JCRCommand; +import org.jboss.portal.cms.impl.jcr.util.VersionUtil; import org.jboss.portal.cms.model.Content; import org.jboss.portal.cms.util.FileUtil; -import org.jboss.logging.Logger; -import org.jboss.portal.cms.impl.jcr.util.VersionUtil; = import javax.jcr.Node; import javax.jcr.NodeIterator; @@ -108,12 +108,12 @@ contentNode =3D (Node)session.getItem(content.getBasePath()); VersionHistory vh =3D contentNode.getVersionHistory(); Version version =3D VersionUtil.getLiveVersion(vh); - = - if(version =3D=3D null) + + if (version =3D=3D null) { return null; } - = + NodeIterator ni =3D version.getNodes(); contentNode =3D ni.nextNode(); content.setCreationDate(version.getCreated().getTime()); @@ -139,7 +139,7 @@ content.setVersionNumber(version.getName()); content.setVersionPath(version.getPath()); content.setVersionUUID(version.getUUID()); - if(liveVersion !=3D null && liveVersion.getName().equals= (version.getName())) // check if this version is the live one. + if (liveVersion !=3D null && liveVersion.getName().equal= s(version.getName())) // check if this version is the live one. { content.setLive(true); } Property changes on: branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jbos= s/portal/cms/impl/jcr/command/ContentGetCommand.java ___________________________________________________________________ Name: svn:keywords - Author Date Id Revision + = Modified: branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cm= s/impl/jcr/command/ContentGetVersionsCommand.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cms/impl= /jcr/command/ContentGetVersionsCommand.java 2007-10-27 23:01:46 UTC (rev 87= 84) +++ branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cms/impl= /jcr/command/ContentGetVersionsCommand.java 2007-10-28 01:09:21 UTC (rev 87= 85) @@ -24,16 +24,16 @@ = import org.jboss.portal.cms.impl.ContentImpl; import org.jboss.portal.cms.impl.jcr.JCRCommand; +import org.jboss.portal.cms.impl.jcr.util.VersionUtil; import org.jboss.portal.cms.model.Content; -import org.jboss.portal.cms.impl.jcr.util.VersionUtil; = import javax.jcr.Node; import javax.jcr.NodeIterator; +import javax.jcr.PathNotFoundException; import javax.jcr.Session; import javax.jcr.version.Version; import javax.jcr.version.VersionHistory; import javax.jcr.version.VersionIterator; -import javax.jcr.PathNotFoundException; import java.util.Locale; import java.util.Vector; = @@ -65,10 +65,10 @@ Node fileNode =3D (Node)session.getItem(this.msFilePath); = VersionHistory vh =3D fileNode.getVersionHistory(); - = + Version liveVersion =3D VersionUtil.getLiveVersion(vh); - = - = + + Version rootVersion =3D vh.getRootVersion(); = = @@ -96,9 +96,9 @@ = content.setBytes("".getBytes()); int size =3D 0; - if(node.hasProperty("portalcms:size")) + if (node.hasProperty("portalcms:size")) { - size =3D Integer.parseInt(node.getProperty("portalcm= s:size").getString()); + size =3D Integer.parseInt(node.getProperty("portalcms= :size").getString()); } = content.setSize(size); @@ -115,26 +115,26 @@ = = content.setEncoding(node.getProperty("jcr:encoding").get= String()); - = + //check if this content is waiting to be approved for pu= blishing or not try { - String processid =3D node.getProperty("portalcms:proces= sid").getString(); - if(processid !=3D null && processid.trim().length()>0) - { - content.setWaitingForPublishApproval(true); - content.setApprovalProcessId(processid); - } - else - { - content.setWaitingForPublishApproval(false); - content.setApprovalProcessId(null); - } + String processid =3D node.getProperty("portalcms:proc= essid").getString(); + if (processid !=3D null && processid.trim().length() = > 0) + { + content.setWaitingForPublishApproval(true); + content.setApprovalProcessId(processid); + } + else + { + content.setWaitingForPublishApproval(false); + content.setApprovalProcessId(null); + } } - catch(PathNotFoundException pne) + catch (PathNotFoundException pne) { - content.setWaitingForPublishApproval(false); - content.setApprovalProcessId(null); + content.setWaitingForPublishApproval(false); + content.setApprovalProcessId(null); } = contents.addElement(content); Property changes on: branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jbos= s/portal/cms/impl/jcr/command/ContentGetVersionsCommand.java ___________________________________________________________________ Name: svn:keywords - Author Date Id Revision + = Property changes on: branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jbos= s/portal/cms/impl/jcr/command/CopyCommand.java ___________________________________________________________________ Name: svn:keywords - Author Date Id Revision + = Property changes on: branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jbos= s/portal/cms/impl/jcr/command/DeleteCommand.java ___________________________________________________________________ Name: svn:keywords - Author Date Id Revision + = Property changes on: branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jbos= s/portal/cms/impl/jcr/command/FileCreateCommand.java ___________________________________________________________________ Name: svn:keywords - Author Date Id Revision + = Modified: branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cm= s/impl/jcr/command/FileGetCommand.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cms/impl= /jcr/command/FileGetCommand.java 2007-10-27 23:01:46 UTC (rev 8784) +++ branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cms/impl= /jcr/command/FileGetCommand.java 2007-10-28 01:09:21 UTC (rev 8785) @@ -126,7 +126,7 @@ } return null; } - = + public String toString() { return "FileGetCommand[path=3D" + path + ", versionNumber=3D" + vers= ionNumber + ", locale=3D" + locale + "]"; Property changes on: branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jbos= s/portal/cms/impl/jcr/command/FileGetCommand.java ___________________________________________________________________ Name: svn:keywords - Author Date Id Revision + = Property changes on: branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jbos= s/portal/cms/impl/jcr/command/FileGetListCommand.java ___________________________________________________________________ Name: svn:keywords - Author Date Id Revision + = Property changes on: branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jbos= s/portal/cms/impl/jcr/command/FileUpdateAndVersionCommand.java ___________________________________________________________________ Name: svn:keywords + = Property changes on: branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jbos= s/portal/cms/impl/jcr/command/FileUpdateCommand.java ___________________________________________________________________ Name: svn:keywords - Author Date Id Revision + = Property changes on: branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jbos= s/portal/cms/impl/jcr/command/FolderCreateCommand.java ___________________________________________________________________ Name: svn:keywords - Author Date Id Revision + = Property changes on: branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jbos= s/portal/cms/impl/jcr/command/FolderGetCommand.java ___________________________________________________________________ Name: svn:keywords - Author Date Id Revision + = Property changes on: branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jbos= s/portal/cms/impl/jcr/command/FolderGetListCommand.java ___________________________________________________________________ Name: svn:keywords - Author Date Id Revision + = Property changes on: branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jbos= s/portal/cms/impl/jcr/command/FolderUpdateCommand.java ___________________________________________________________________ Name: svn:keywords - Author Date Id Revision + = Property changes on: branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jbos= s/portal/cms/impl/jcr/command/GetArchiveCommand.java ___________________________________________________________________ Name: svn:keywords - Author Date Id Revision + = Property changes on: branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jbos= s/portal/cms/impl/jcr/command/ItemExistsCommand.java ___________________________________________________________________ Name: svn:keywords - Author Date Id Revision + = Modified: branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cm= s/impl/jcr/command/MakeLiveVersionCommand.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cms/impl= /jcr/command/MakeLiveVersionCommand.java 2007-10-27 23:01:46 UTC (rev 8784) +++ branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cms/impl= /jcr/command/MakeLiveVersionCommand.java 2007-10-28 01:09:21 UTC (rev 8785) @@ -23,7 +23,6 @@ package org.jboss.portal.cms.impl.jcr.command; = import org.apache.log4j.Logger; - import org.jboss.portal.cms.CMSException; import org.jboss.portal.cms.impl.jcr.JCRCommand; = @@ -40,10 +39,10 @@ public class MakeLiveVersionCommand extends JCRCommand { /** - * = + * */ private static Logger log =3D Logger.getLogger(MakeLiveVersionCommand.c= lass); - = + /** The serialVersionUID */ private static final long serialVersionUID =3D 6853173755818339647L; String msFilePath =3D null; @@ -51,7 +50,6 @@ String version =3D null; = /** - * = * @param sFilePath * @param language * @param version @@ -64,7 +62,7 @@ } = /** - * = + * */ public Object execute() { @@ -72,17 +70,17 @@ try { Session session =3D context.getSession(); - Node fileNode =3D (Node)session.getItem(this.msFilePath+"/"+this.= language); + Node fileNode =3D (Node)session.getItem(this.msFilePath + "/" + t= his.language); = - VersionHistory vh =3D fileNode.getVersionHistory(); = + VersionHistory vh =3D fileNode.getVersionHistory(); vh.addVersionLabel(this.version, "LIVE", true); - versionMadeLive =3D this.version; = + versionMadeLive =3D this.version; } catch (Exception e) { - log.error(this,e); + log.error(this, e); throw new CMSException(e); - } = + } return versionMadeLive; } } Property changes on: branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jbos= s/portal/cms/impl/jcr/command/MakeLiveVersionCommand.java ___________________________________________________________________ Name: svn:keywords + = Property changes on: branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jbos= s/portal/cms/impl/jcr/command/MoveCommand.java ___________________________________________________________________ Name: svn:keywords - Author Date Id Revision + = Property changes on: branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jbos= s/portal/cms/impl/jcr/command/RenameCommand.java ___________________________________________________________________ Name: svn:keywords - Author Date Id Revision + = Modified: branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cm= s/impl/jcr/command/SearchCommand.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cms/impl= /jcr/command/SearchCommand.java 2007-10-27 23:01:46 UTC (rev 8784) +++ branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cms/impl= /jcr/command/SearchCommand.java 2007-10-28 01:09:21 UTC (rev 8785) @@ -22,8 +22,11 @@ *************************************************************************= *****/ package org.jboss.portal.cms.impl.jcr.command; = -import java.util.ArrayList; -import java.util.List; +import org.jboss.portal.cms.CMSException; +import org.jboss.portal.cms.impl.FileImpl; +import org.jboss.portal.cms.impl.jcr.JCRCommand; +import org.jboss.portal.cms.model.File; +import org.jboss.portal.search.impl.jcr.JCRQuery; = import javax.jcr.Node; import javax.jcr.NodeIterator; @@ -31,17 +34,9 @@ import javax.jcr.Workspace; import javax.jcr.query.QueryManager; import javax.jcr.query.QueryResult; +import java.util.ArrayList; +import java.util.List; = -import org.jboss.portal.cms.CMSException; -import org.jboss.portal.cms.impl.FileImpl; -import org.jboss.portal.cms.impl.jcr.JCRCommand; -import org.jboss.portal.cms.model.File; -import org.jboss.portal.search.Query; -import org.jboss.portal.search.QueryConverter; -import org.jboss.portal.search.impl.StandardQueryConverter; -import org.jboss.portal.search.impl.jcr.JCRQuery; -import org.jboss.portal.search.impl.jcr.JCRQueryConverter; - /** * @author Thomas Heute * @version $Revision$ @@ -52,13 +47,13 @@ private static final long serialVersionUID =3D 2614067614144410297L; = private JCRQuery query; - = + public SearchCommand(JCRQuery query) { this.query =3D query; } - = - = + + public Object execute() throws CMSException { Session session =3D context.getSession(); @@ -69,7 +64,7 @@ try { queryManager =3D workspace.getQueryManager(); - = + queryString =3D query.getJcrQuery(); = if (!"".equals(queryString) && query !=3D null) Property changes on: branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jbos= s/portal/cms/impl/jcr/command/SearchCommand.java ___________________________________________________________________ Name: svn:keywords + = Modified: branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cm= s/impl/jcr/command/StoreArchiveCommand.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cms/impl= /jcr/command/StoreArchiveCommand.java 2007-10-27 23:01:46 UTC (rev 8784) +++ branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cms/impl= /jcr/command/StoreArchiveCommand.java 2007-10-28 01:09:21 UTC (rev 8785) @@ -22,6 +22,8 @@ *************************************************************************= *****/ package org.jboss.portal.cms.impl.jcr.command; = +import org.apache.tools.zip.ZipEntry; +import org.apache.tools.zip.ZipFile; import org.jboss.portal.cms.CMSException; import org.jboss.portal.cms.impl.ContentImpl; import org.jboss.portal.cms.impl.FileImpl; @@ -32,18 +34,14 @@ import org.jboss.portal.cms.util.FileUtil; import org.jboss.portal.cms.util.NodeUtil; = -import java.io.InputStream; -import java.io.FileOutputStream; import java.io.File; +import java.io.FileOutputStream; +import java.io.InputStream; import java.util.ArrayList; import java.util.Date; +import java.util.Enumeration; import java.util.List; import java.util.Locale; -import java.util.Enumeration; - -import org.apache.tools.zip.ZipFile; -import org.apache.tools.zip.ZipEntry; - import java.util.StringTokenizer; = /** @@ -61,7 +59,6 @@ String msLanguage; = /** - * = * @param sRootPath * @param is * @param sLanguage @@ -74,7 +71,7 @@ } = /** - * = + * */ public Object execute() { @@ -87,12 +84,12 @@ ZipFile zipFile =3D new ZipFile(tmpFile); ZipEntry zipEntry; Enumeration entries =3D zipFile.getEntries(); - while(entries.hasMoreElements()) + while (entries.hasMoreElements()) { zipEntry =3D (ZipEntry)entries.nextElement(); String itemName =3D zipEntry.getName(); if (!zipEntry.isDirectory()) - { = + { long fileSize =3D zipEntry.getSize(); byte[] zipBytes =3D new byte[(int)fileSize]; InputStream zipDataStream =3D zipFile.getInputStream(zipEnt= ry); @@ -102,7 +99,7 @@ { bytesRead +=3D zipDataStream.read(zipBytes, (int)bytesRe= ad, (int)(fileSize - bytesRead)); } - = + org.jboss.portal.cms.model.File file =3D new FileImpl(); = String sBasePath =3D FileUtil.cleanDoubleSlashes("/" + this= .msRootPath + "/" + itemName); @@ -179,44 +176,40 @@ } finally { - if(tmpFile !=3D null) + if (tmpFile !=3D null) { tmpFile.delete(); } } return null; } - = - /** - * = - * @param parentPath - */ + + /** @param parentPath */ private void createParentHierarchy(String parentPath) throws CMSExcepti= on { - StringTokenizer tokenizer =3D new StringTokenizer(parentPath,"/"); - = + StringTokenizer tokenizer =3D new StringTokenizer(parentPath, "/"); + StringBuffer buffer =3D new StringBuffer("/"); - while(tokenizer.hasMoreTokens()) + while (tokenizer.hasMoreTokens()) { buffer.append(tokenizer.nextToken()); String cour =3D buffer.toString(); - = + JCRCommand nodeExists =3D (JCRCommand)context.getCommandFactory()= .createItemExistsCommand(cour); Boolean bExists =3D (Boolean)context.execute(nodeExists); - if(!bExists.booleanValue()) + if (!bExists.booleanValue()) { this.createFolder(cour); } - = - if(tokenizer.hasMoreTokens()) + + if (tokenizer.hasMoreTokens()) { buffer.append("/"); } } } - = + /** - * = * @param folderPath * @throws CMSException */ @@ -232,17 +225,14 @@ JCRCommand parentSave =3D (JCRCommand)context.getCommandFactory().cr= eateFolderSaveCommand(folder); context.execute(parentSave); } - = - /** - * = - * @return - */ + + /** @return */ private File getZipFile() throws Exception { File zipFile =3D null; - = + zipFile =3D File.createTempFile("jbportal_", "_cmsimport.zip"); - FileOutputStream fos =3D new FileOutputStream(zipFile.getCanonicalPa= th()); = + FileOutputStream fos =3D new FileOutputStream(zipFile.getCanonicalPa= th()); try { int count; @@ -257,7 +247,7 @@ { fos.close(); } - = + return zipFile; } } \ No newline at end of file Property changes on: branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jbos= s/portal/cms/impl/jcr/command/StoreArchiveCommand.java ___________________________________________________________________ Name: svn:keywords - Author Date Id Revision + = Modified: branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cm= s/impl/jcr/composite/NewFileCommand.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cms/impl= /jcr/composite/NewFileCommand.java 2007-10-27 23:01:46 UTC (rev 8784) +++ branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cms/impl= /jcr/composite/NewFileCommand.java 2007-10-28 01:09:21 UTC (rev 8785) @@ -30,44 +30,39 @@ import org.jboss.portal.cms.model.Content; import org.jboss.portal.cms.model.File; = -/** @author Thomas Heute - * @author Sohil Shah - Nov= 28, 2006 = - **/ +/** + * @author Thomas Heute + * @author Sohil Shah - Nov = 28, 2006 + */ public class NewFileCommand extends JCRCompositeCommand { = /** The serialVersionUID */ private static final long serialVersionUID =3D -6134173065175936408L; - = + // private String path =3D null; private Content content =3D null; - = - /** - * = - * @return - */ + + /** @return */ public String getPath() { - return this.path; + return this.path; } - = - /** - * = - * @return - */ + + /** @return */ public Content getContent() { - return this.content; + return this.content; } = public NewFileCommand(File file, Content content) { // setAttribute("file", file); // setAttribute("content", content); - this.path =3D file.getBasePath(); - this.content =3D content; - = + this.path =3D file.getBasePath(); + this.content =3D content; + Command saveFileCMD =3D new FileCreateCommand(file); commands.add(saveFileCMD); Command saveContentCMD =3D new ContentCreateCommand(file); Property changes on: branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jbos= s/portal/cms/impl/jcr/composite/NewFileCommand.java ___________________________________________________________________ Name: svn:keywords - Author Date Id Revision + = Modified: branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cm= s/impl/jcr/composite/UpdateFileCommand.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cms/impl= /jcr/composite/UpdateFileCommand.java 2007-10-27 23:01:46 UTC (rev 8784) +++ branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cms/impl= /jcr/composite/UpdateFileCommand.java 2007-10-28 01:09:21 UTC (rev 8785) @@ -48,14 +48,11 @@ { return path; } - = - /** - * = - * @return - */ + + /** @return */ public Content getContent() { - return this.content; + return this.content; } = public Locale getLocale() Property changes on: branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jbos= s/portal/cms/impl/jcr/composite/UpdateFileCommand.java ___________________________________________________________________ Name: svn:keywords - Author Date Id Revision + = Modified: branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cm= s/impl/jcr/ha/HAJCRCMS.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cms/impl= /jcr/ha/HAJCRCMS.java 2007-10-27 23:01:46 UTC (rev 8784) +++ branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cms/impl= /jcr/ha/HAJCRCMS.java 2007-10-28 01:09:21 UTC (rev 8785) @@ -24,20 +24,19 @@ = import org.jboss.portal.cms.CMSException; import org.jboss.portal.cms.Command; -import org.jboss.portal.cms.model.CMSUser; import org.jboss.portal.cms.impl.jcr.JCRCMS; import org.jboss.portal.cms.impl.jcr.JCRCommand; import org.jboss.portal.cms.impl.jcr.JCRCommandContext; +import org.jboss.portal.cms.model.CMSUser; +import org.jboss.portal.identity.User; import org.jboss.portal.jems.ha.HASingletonInvoker; = -import org.jboss.portal.identity.User; - /** * Extend the JCR CMS and make it run as an ha singleton. * * @author Julien Viet * @author Thomas Heute - * @version $Revision$ + * @version $Revision: 7163 $ */ public class HAJCRCMS extends JCRCMS implements HASingletonInvoker.Callback { @@ -58,31 +57,31 @@ try { //Add the user Identity ThreadLocal variable to the Command Co= ntext for propagation to the Master Node - if(this.getUserInfo().get() !=3D null) + if (this.getUserInfo().get() !=3D null) { User user =3D (User)this.getUserInfo().get(); JCRCommandContext context =3D (JCRCommandContext)((JCRComma= nd)cmd).getContext(); - if(context =3D=3D null) + if (context =3D=3D null) { - context =3D new JCRCommandContext(null,null,null); + context =3D new JCRCommandContext(null, null, null); ((JCRCommand)cmd).setContext(context); } - context.setClusterContextInfo("user",new CMSUser(user.getUs= erName())); + context.setClusterContextInfo("user", new CMSUser(user.getU= serName())); } - = + //Add the Workflow ThreadLocal variable to the Command Context= for propagation to the Master Node - if(this.turnOffWorkflow.get() !=3D null) + if (this.turnOffWorkflow.get() !=3D null) { Boolean workflowStatus =3D (Boolean)this.turnOffWorkflow.ge= t(); JCRCommandContext context =3D (JCRCommandContext)((JCRComma= nd)cmd).getContext(); - if(context =3D=3D null) + if (context =3D=3D null) { - context =3D new JCRCommandContext(null,null,null); + context =3D new JCRCommandContext(null, null, null); ((JCRCommand)cmd).setContext(context); } - context.setClusterContextInfo("workflowStatus",workflowStat= us); + context.setClusterContextInfo("workflowStatus", workflowSta= tus); } - = + // Use the proxy to invoke on the singleton return invoker.invoke("execute", new Class[]{Command.class}, n= ew Object[]{cmd}); } @@ -90,7 +89,7 @@ { e.printStackTrace(); throw new RuntimeException("Fixme bad contract", e); - } = + } } } = Property changes on: branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jbos= s/portal/cms/impl/jcr/ha/HAJCRCMS.java ___________________________________________________________________ Name: svn:keywords - Author Date Id Revision + = Property changes on: branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jbos= s/portal/cms/impl/jcr/jackrabbit/ClusteredCacheListener.java ___________________________________________________________________ Name: svn:keywords + = Modified: branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cm= s/impl/jcr/jackrabbit/JackrabbitJCRService.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cms/impl= /jcr/jackrabbit/JackrabbitJCRService.java 2007-10-27 23:01:46 UTC (rev 8784) +++ branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cms/impl= /jcr/jackrabbit/JackrabbitJCRService.java 2007-10-28 01:09:21 UTC (rev 8785) @@ -33,10 +33,9 @@ import org.apache.jackrabbit.core.nodetype.PropDef; import org.apache.jackrabbit.core.nodetype.PropDefImpl; import org.apache.jackrabbit.name.QName; - +import org.jboss.logging.Logger; import org.jboss.portal.cms.impl.jcr.JCRService; import org.jboss.portal.cms.util.RepositoryUtil; -import org.jboss.logging.Logger; import org.xml.sax.InputSource; = import javax.jcr.NamespaceRegistry; @@ -50,7 +49,7 @@ = /** * @author Julien Viet - * @version $Revision$ + * @version $Revision: 6469 $ */ public class JackrabbitJCRService implements JCRService { Property changes on: branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jbos= s/portal/cms/impl/jcr/jackrabbit/JackrabbitJCRService.java ___________________________________________________________________ Name: svn:keywords - Author Date Id Revision + = Property changes on: branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jbos= s/portal/cms/impl/jcr/util/NodeTypeUtil.java ___________________________________________________________________ Name: svn:keywords - Author Date Id Revision + = Modified: branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cm= s/impl/jcr/util/VersionUtil.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cms/impl= /jcr/util/VersionUtil.java 2007-10-27 23:01:46 UTC (rev 8784) +++ branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cms/impl= /jcr/util/VersionUtil.java 2007-10-28 01:09:21 UTC (rev 8785) @@ -216,25 +216,24 @@ e.printStackTrace(); } } - = + /** - * = * @param history * @return */ public static Version getLiveVersion(VersionHistory history) { Version liveVersion =3D null; - = + try { liveVersion =3D history.getVersionByLabel("LIVE"); } - catch(Exception e) + catch (Exception e) { liveVersion =3D null; } - = + return liveVersion; } } Property changes on: branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jbos= s/portal/cms/impl/jcr/util/VersionUtil.java ___________________________________________________________________ Name: svn:keywords - Author Date Id Revision + = Modified: branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cm= s/management/CMS.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cms/mana= gement/CMS.java 2007-10-27 23:01:46 UTC (rev 8784) +++ branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cms/mana= gement/CMS.java 2007-10-28 01:09:21 UTC (rev 8785) @@ -26,7 +26,8 @@ * @author Thomas Heute * @version $Revision$ */ -public interface CMS { +public interface CMS +{ = - public int getNbFiles(); + public int getNbFiles(); } Property changes on: branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jbos= s/portal/cms/management/CMS.java ___________________________________________________________________ Name: svn:keywords + = Modified: branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cm= s/management/CMSImpl.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cms/mana= gement/CMSImpl.java 2007-10-27 23:01:46 UTC (rev 8784) +++ branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cms/mana= gement/CMSImpl.java 2007-10-28 01:09:21 UTC (rev 8785) @@ -22,56 +22,57 @@ *************************************************************************= *****/ package org.jboss.portal.cms.management; = -import java.util.List; - import org.jboss.portal.cms.CMSException; import org.jboss.portal.cms.Command; import org.jboss.portal.cms.model.Folder; import org.jboss.portal.jems.as.system.AbstractJBossService; = +import java.util.List; + /** - * Unused. With the introduction of CMS security, this can - * no longer count CMS files. - * = + * Unused. With the introduction of CMS security, this can no longer count= CMS files. + * * @author Thomas Heute * @version $Revision$ */ -public class CMSImpl extends AbstractJBossService implements CMS { +public class CMSImpl extends AbstractJBossService implements CMS +{ = - private org.jboss.portal.cms.CMS cms; - = - public void setCMS(org.jboss.portal.cms.CMS cms) - { - this.cms =3D cms; - } - = - /** Very costly = - * TODO: Make it cheap = - */ - public int getNbFiles() - { - String sPath =3D"/"; - try { - return nbFiles(sPath); - } catch (CMSException e) { - e.printStackTrace(); - } - return -1; - } - = - private int nbFiles(String path) throws CMSException - { - Command listCMD =3D cms.getCommandFactory().createFolderGetListCommand(p= ath); - Folder mainFolder =3D (Folder)cms.execute(listCMD); - List files =3D mainFolder.getFiles(); - int nbFiles =3D files.size(); - List folders =3D mainFolder.getFolders(); - for (int i=3D0; iSohil Shah - * - */ +import java.io.Serializable; + +/** @author Sohil Shah */ public class CMSUser implements User, Serializable { /** - * = + * */ private String username =3D null; - = - /** - * = - * @param username - */ + + /** @param username */ public CMSUser(String username) { this.username =3D username; } - = + /** - * = + * */ public Object getId() - { = + { return null; } = /** - * = + * */ public String getUserName() - { = + { return this.username; } = /** - * = + * */ public void updatePassword(String password) { @@ -70,10 +65,10 @@ } = /** - * = + * */ public boolean validatePassword(String password) - { = + { throw new RuntimeException("Illegal Operation"); } } Property changes on: branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jbos= s/portal/cms/model/CMSUser.java ___________________________________________________________________ Name: svn:keywords + = Modified: branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cm= s/model/Content.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cms/mode= l/Content.java 2007-10-27 23:01:46 UTC (rev 8784) +++ branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cms/mode= l/Content.java 2007-10-28 01:09:21 UTC (rev 8785) @@ -29,7 +29,7 @@ * CMS content interface. * * @author Roy Russo - * @version $Id$ + * @version $Id: Content.java 5929 2006-12-22 20:15:42Z sohil.shah(a)jboss= .com $ */ public interface Content extends CMSObject, Cloneable { @@ -41,7 +41,7 @@ int getSize(); = void setSize(int size); - = + /** @return Returns the content. */ InputStream getStream(); = @@ -73,30 +73,26 @@ boolean isLive(); = void setLive(boolean live); - = + /** - * this is used to signify that a content is waiting to be approved bef= ore being published to go - * live - * = + * this is used to signify that a content is waiting to be approved bef= ore being published to go live + * * @return */ public boolean isWaitingForPublishApproval(); - = + /** - * = * + * */ public void setWaitingForPublishApproval(boolean isWaitingForPublishApp= roval); - = - /** - * = - * @return - */ + + /** @return */ public String getApprovalProcessId(); - = + /** - * = * + * */ public void setApprovalProcessId(String processId); } Property changes on: branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jbos= s/portal/cms/model/Content.java ___________________________________________________________________ Name: svn:keywords - Author Date Id Revision + = Modified: branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cm= s/model/File.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cms/mode= l/File.java 2007-10-27 23:01:46 UTC (rev 8784) +++ branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cms/mode= l/File.java 2007-10-28 01:09:21 UTC (rev 8785) @@ -29,7 +29,7 @@ * * @author = Christophe Lombart * @author Roy Russo - * @version $Id$ + * @version $Id: File.java 5448 2006-10-13 19:29:17Z chris.laprun(a)jboss.= com $ */ public interface File extends CMSObject, Cloneable { Property changes on: branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jbos= s/portal/cms/model/File.java ___________________________________________________________________ Name: svn:keywords - Author Date Id Revision + = Property changes on: branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jbos= s/portal/cms/model/Folder.java ___________________________________________________________________ Name: svn:keywords - Author Date Id Revision + = Modified: branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cm= s/search/CMSFederatedSearch.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cms/sear= ch/CMSFederatedSearch.java 2007-10-27 23:01:46 UTC (rev 8784) +++ branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cms/sear= ch/CMSFederatedSearch.java 2007-10-28 01:09:21 UTC (rev 8785) @@ -22,9 +22,6 @@ *************************************************************************= *****/ package org.jboss.portal.cms.search; = -import java.util.Iterator; -import java.util.List; - import org.jboss.portal.cms.CMS; import org.jboss.portal.cms.Command; import org.jboss.portal.cms.model.File; @@ -36,6 +33,9 @@ import org.jboss.portal.search.impl.jcr.JCRQueryConverter; import org.jboss.portal.search.result.ResultSet; = +import java.util.Iterator; +import java.util.List; + /** * @author Thomas Heute * @version $Revision$ @@ -78,5 +78,5 @@ { return queryConverter; } - = + } Property changes on: branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jbos= s/portal/cms/search/CMSFederatedSearch.java ___________________________________________________________________ Name: svn:keywords + = Modified: branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cm= s/search/CMSResult.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cms/sear= ch/CMSResult.java 2007-10-27 23:01:46 UTC (rev 8784) +++ branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cms/sear= ch/CMSResult.java 2007-10-28 01:09:21 UTC (rev 8785) @@ -33,10 +33,10 @@ */ public class CMSResult implements Result { - = + private File file; private ResultURL url; - = + public CMSResult(File file, String prefix) { this.file =3D file; @@ -53,7 +53,7 @@ { return url; } - = + public LocalizedString getTitle() { if (file.getTitle() !=3D null) Property changes on: branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jbos= s/portal/cms/search/CMSResult.java ___________________________________________________________________ Name: svn:keywords + = Modified: branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cm= s/search/CMSResultURL.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cms/sear= ch/CMSResultURL.java 2007-10-27 23:01:46 UTC (rev 8784) +++ branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cms/sear= ch/CMSResultURL.java 2007-10-28 01:09:21 UTC (rev 8785) @@ -31,10 +31,10 @@ */ public class CMSResultURL extends SimpleResultURL { - = + public CMSResultURL(String prefix, File file) { super("/" + prefix + file.getBasePath()); } - = + } Property changes on: branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jbos= s/portal/cms/search/CMSResultURL.java ___________________________________________________________________ Name: svn:keywords + = Modified: branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cm= s/security/AuthorizationManager.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cms/secu= rity/AuthorizationManager.java 2007-10-27 23:01:46 UTC (rev 8784) +++ branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cms/secu= rity/AuthorizationManager.java 2007-10-28 01:09:21 UTC (rev 8785) @@ -27,18 +27,15 @@ = /** * Created on : Jan 24, 2007 - * @author Sohil Shah - sohil.shah(a)jboss.com * + * @author Sohil Shah - sohil.shah(a)jboss.com */ public interface AuthorizationManager extends -PortalAuthorizationManagerFactory, -PortalAuthorizationManager + PortalAuthorizationManagerFactory, + PortalAuthorizationManager { - public static final String Anonymous =3D "Anonymous"; - = - /** - * = - * @return - */ - public AuthorizationProvider getProvider(); + public static final String Anonymous =3D "Anonymous"; + + /** @return */ + public AuthorizationProvider getProvider(); } Property changes on: branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jbos= s/portal/cms/security/AuthorizationManager.java ___________________________________________________________________ Name: svn:keywords + = Modified: branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cm= s/security/AuthorizationManagerImpl.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cms/secu= rity/AuthorizationManagerImpl.java 2007-10-27 23:01:46 UTC (rev 8784) +++ branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cms/secu= rity/AuthorizationManagerImpl.java 2007-10-28 01:09:21 UTC (rev 8785) @@ -22,116 +22,103 @@ *************************************************************************= *****/ package org.jboss.portal.cms.security; = -import javax.security.auth.Subject; - -import org.jboss.portal.jems.as.system.AbstractJBossService; +import org.jboss.portal.cms.impl.jcr.command.ACLEnforcer; import org.jboss.portal.jems.as.JNDI; - +import org.jboss.portal.jems.as.system.AbstractJBossService; import org.jboss.portal.security.PortalPermission; import org.jboss.portal.security.PortalSecurityException; import org.jboss.portal.security.spi.auth.PortalAuthorizationManager; = -import org.jboss.portal.cms.impl.jcr.command.ACLEnforcer; +import javax.security.auth.Subject; = /** * Created on : Jan 23, 2007 - * @author Sohil Shah - sohil.shah(a)jboss.com * + * @author Sohil Shah - sohil.shah(a)jboss.com */ public class AuthorizationManagerImpl extends AbstractJBossService impleme= nts AuthorizationManager { - /** - * = - */ - private ACLEnforcer enforcer =3D null; - = - /** - * = - */ - private AuthorizationProvider provider =3D null; - = - /** - * = - */ - private String jndiName =3D null; - private JNDI.Binding jndiBinding =3D null; - = - /** - * = - * @return - */ - public AuthorizationProvider getProvider() - { - return provider; - } + /** + * + */ + private ACLEnforcer enforcer =3D null; = - /** - * = - * @param provider - */ - public void setProvider(AuthorizationProvider provider) - { - this.provider =3D provider; - } - = - /** - * = - * @return - */ - public String getJNDIName() - { - return this.jndiName; - } - = - /** - * = - * @param jndiName - */ - public void setJNDIName(String jndiName) - { - this.jndiName =3D jndiName; - } + /** + * + */ + private AuthorizationProvider provider =3D null; = - /** - * = - */ - public void startService() throws Exception = - { - super.startService(); - = - //perform jndi registration for this service - if (this.jndiName !=3D null) - { - jndiBinding =3D new JNDI.Binding(jndiName, this); - jndiBinding.bind(); - } - = - //initialize the authorization/policy enforcer - enforcer =3D new ACLEnforcer(this); - } - = - //---PortalAuthorizationManagerFactory implementation--------------------= --------------------------- - /** - * = - */ - public PortalAuthorizationManager getManager() throws PortalSecurityExcep= tion - { - return this; - } - //---PortalAuthorizationManager implementation---------------------------= ---------------------------- - /** - * = - */ - public boolean checkPermission(PortalPermission permission) throws Portal= SecurityException - { = - return this.enforcer.hasAccess(((CMSPermission)permission).getSecurityCo= ntext()); - } + /** + * + */ + private String jndiName =3D null; + private JNDI.Binding jndiBinding =3D null; = - /** - * = - */ - public boolean checkPermission(Subject checkedSubject, PortalPermission p= ermission) throws PortalSecurityException - { - return this.checkPermission(permission); - } = + /** @return */ + public AuthorizationProvider getProvider() + { + return provider; + } + + /** @param provider */ + public void setProvider(AuthorizationProvider provider) + { + this.provider =3D provider; + } + + /** @return */ + public String getJNDIName() + { + return this.jndiName; + } + + /** @param jndiName */ + public void setJNDIName(String jndiName) + { + this.jndiName =3D jndiName; + } + + /** + * + */ + public void startService() throws Exception + { + super.startService(); + + //perform jndi registration for this service + if (this.jndiName !=3D null) + { + jndiBinding =3D new JNDI.Binding(jndiName, this); + jndiBinding.bind(); + } + + //initialize the authorization/policy enforcer + enforcer =3D new ACLEnforcer(this); + } + + //---PortalAuthorizationManagerFactory implementation------------------= ----------------------------- + /** + * + */ + public PortalAuthorizationManager getManager() throws PortalSecurityExc= eption + { + return this; + } + + //---PortalAuthorizationManager implementation-------------------------= ------------------------------ + /** + * + */ + public boolean checkPermission(PortalPermission permission) throws Port= alSecurityException + { + return this.enforcer.hasAccess(((CMSPermission)permission).getSecuri= tyContext()); + } + + /** + * + */ + public boolean checkPermission(Subject checkedSubject, PortalPermission= permission) throws PortalSecurityException + { + return this.checkPermission(permission); + } } Property changes on: branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jbos= s/portal/cms/security/AuthorizationManagerImpl.java ___________________________________________________________________ Name: svn:keywords + = Modified: branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cm= s/security/AuthorizationProvider.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cms/secu= rity/AuthorizationProvider.java 2007-10-27 23:01:46 UTC (rev 8784) +++ branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cms/secu= rity/AuthorizationProvider.java 2007-10-28 01:09:21 UTC (rev 8785) @@ -22,45 +22,38 @@ *************************************************************************= *****/ package org.jboss.portal.cms.security; = +import org.jboss.portal.identity.MembershipModule; import org.jboss.portal.security.spi.provider.AuthorizationDomain; import org.jboss.portal.security.spi.provider.DomainConfigurator; = -import org.jboss.portal.identity.MembershipModule; - /** * Created on : Jan 24, 2007 - * @author Sohil Shah - sohil.shah(a)jboss.com * + * @author Sohil Shah - sohil.shah(a)jboss.com */ public interface AuthorizationProvider extends -AuthorizationDomain, -DomainConfigurator + AuthorizationDomain, + DomainConfigurator { - /** - * = - * @param userId - * @return - */ - public String getUserURI(String userId); - = - /** - * = - * @param roleId - * @return - */ - public String getRoleURI(String roleId); - = - /** - * = - * @param name - * @param value - * @return - */ - public String getCriteriaURI(String name,String value); - = - /** - * = - * @return - */ - public MembershipModule getMembershipModule(); + /** + * @param userId + * @return + */ + public String getUserURI(String userId); + + /** + * @param roleId + * @return + */ + public String getRoleURI(String roleId); + + /** + * @param name + * @param value + * @return + */ + public String getCriteriaURI(String name, String value); + + /** @return */ + public MembershipModule getMembershipModule(); } Property changes on: branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jbos= s/portal/cms/security/AuthorizationProvider.java ___________________________________________________________________ Name: svn:keywords + = Modified: branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cm= s/security/AuthorizationProviderImpl.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cms/secu= rity/AuthorizationProviderImpl.java 2007-10-27 23:01:46 UTC (rev 8784) +++ branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cms/secu= rity/AuthorizationProviderImpl.java 2007-10-28 01:09:21 UTC (rev 8785) @@ -22,38 +22,36 @@ *************************************************************************= *****/ package org.jboss.portal.cms.security; = -import java.util.Collection; -import java.util.Set; -import java.util.Iterator; -import java.util.HashSet; - import org.hibernate.Query; import org.hibernate.Session; import org.hibernate.Transaction; import org.jboss.portal.cms.hibernate.state.Tools; +import org.jboss.portal.identity.AnonymousRole; import org.jboss.portal.identity.IdentityContext; import org.jboss.portal.identity.IdentityServiceController; import org.jboss.portal.identity.MembershipModule; -import org.jboss.portal.identity.UserModule; import org.jboss.portal.identity.Role; import org.jboss.portal.identity.User; -import org.jboss.portal.identity.AnonymousRole; +import org.jboss.portal.identity.UserModule; import org.jboss.portal.identity.db.HibernateUserModuleImpl; import org.jboss.portal.jems.as.system.AbstractJBossService; - import org.jboss.portal.security.spi.provider.DomainConfigurator; import org.jboss.portal.security.spi.provider.PermissionFactory; import org.jboss.portal.security.spi.provider.PermissionRepository; import org.jboss.portal.security.spi.provider.SecurityConfigurationExcepti= on; = +import java.util.Collection; +import java.util.HashSet; +import java.util.Iterator; +import java.util.Set; + /** * Created on : Jan 23, 2007 - * = + * * @author Sohil Shah - sohil.shah(a)jboss.com - * = */ public class AuthorizationProviderImpl extends AbstractJBossService implem= ents - AuthorizationProvider + AuthorizationProvider { private IdentityServiceController identityServiceController =3D null; = @@ -62,22 +60,22 @@ private UserModule userModule =3D null; = /** - * = + * */ public void startService() throws Exception { super.startService(); - this.membershipModule =3D (MembershipModule) identityServiceControll= er - .getIdentityContext().getObject( - IdentityContext.TYPE_MEMBERSHIP_MODULE); - this.userModule =3D (UserModule) identityServiceController - .getIdentityContext().getObject(IdentityContext.TYPE_USER_MODU= LE); + this.membershipModule =3D (MembershipModule)identityServiceController + .getIdentityContext().getObject( + IdentityContext.TYPE_MEMBERSHIP_MODULE); + this.userModule =3D (UserModule)identityServiceController + .getIdentityContext().getObject(IdentityContext.TYPE_USER_MODULE); } = // ------AuthorizationDomain // impl----------------------------------------------------------------- /** - * = + * */ public DomainConfigurator getConfigurator() { @@ -85,7 +83,7 @@ } = /** - * = + * */ public PermissionFactory getPermissionFactory() { @@ -93,7 +91,7 @@ } = /** - * = + * */ public PermissionRepository getPermissionRepository() { @@ -101,7 +99,7 @@ } = /** - * = + * */ public String getType() { @@ -111,21 +109,21 @@ // ------DomainConfigurator // impl----------------------------------------------------------------= -- /** - * = + * */ public void setSecurityBindings(String uri, Set securityBindings) - throws SecurityConfigurationException + throws SecurityConfigurationException { if (securityBindings !=3D null) { for (Iterator itr =3D securityBindings.iterator(); itr.hasNext();) { - Permission securityBinding =3D (Permission) itr.next(); + Permission securityBinding =3D (Permission)itr.next(); if (securityBinding.getRoles() !=3D null - || securityBinding.getUsers() !=3D null) + || securityBinding.getUsers() !=3D null) { this.store(securityBinding, securityBinding.getRoles(), - securityBinding.getUsers()); + securityBinding.getUsers()); } else { @@ -136,17 +134,17 @@ } = /** - * = + * */ public void removeSecurityBindings(String uri) - throws SecurityConfigurationException + throws SecurityConfigurationException { Set permissions =3D this.getSecurityBindings(uri); this.remove(permissions); } = /** - * = + * */ public Set getSecurityBindings(String uri) { @@ -190,7 +188,7 @@ // ---------URIFactory // impl----------------------------------------------------------------= ------------------------- /** - * = + * */ public String getUserURI(String userId) { @@ -198,7 +196,6 @@ } = /** - * = * @param roleId * @return */ @@ -208,7 +205,6 @@ } = /** - * = * @param name * @param value * @return @@ -219,7 +215,7 @@ } = /** - * = + * */ public MembershipModule getMembershipModule() { @@ -228,19 +224,16 @@ = // --------------------------------------------------------------------= ------------------------------------------ /** - * = + * */ public IdentityServiceController getIdentityServiceController() { return identityServiceController; } = - /** - * = - * @param identityServiceController - */ + /** @param identityServiceController */ public void setIdentityServiceController( - IdentityServiceController identityServiceController) + IdentityServiceController identityServiceController) { this.identityServiceController =3D identityServiceController; } @@ -248,13 +241,10 @@ // --------------------------------------------------------------------= ------------------------------------------ /** * Stores a permission and its associations into peristent storage - * = - * @param permission - - * Permission to be persisted - * @param roles - - * Roles associated with this permission - * @param users - - * Individual users associated with this permission + * + * @param permission - Permission to be persisted + * @param roles - Roles associated with this permission + * @param users - Individual users associated with this permission */ private void store(Permission permission, Collection roles, Collection = users) { @@ -264,7 +254,7 @@ Set roleAssoc =3D new HashSet(); for (Iterator itr =3D roles.iterator(); itr.hasNext();) { - Role role =3D (Role) itr.next(); + Role role =3D (Role)itr.next(); PermRoleAssoc cour =3D new PermRoleAssoc(); if (!(role instanceof AnonymousRole)) { @@ -289,7 +279,7 @@ Set userAssoc =3D new HashSet(); for (Iterator itr =3D users.iterator(); itr.hasNext();) { - User user =3D (User) itr.next(); + User user =3D (User)itr.next(); PermUserAssoc cour =3D new PermUserAssoc(); cour.setUserId(user.getUserName()); userAssoc.add(cour); @@ -307,9 +297,8 @@ = /** * Stores a permission and its associations into peristent storage - * = - * @param permission - - * Permission to be persisted + * + * @param permission - Permission to be persisted */ private void store(Permission permission) { @@ -320,7 +309,7 @@ = /** * Deletes the specified permissions from the database - * = + * * @param permissions */ private void remove(Collection permissions) @@ -330,7 +319,7 @@ { for (Iterator itr =3D permissions.iterator(); itr.hasNext();) { - Permission permission =3D (Permission) itr.next(); + Permission permission =3D (Permission)itr.next(); session.delete(permission); } } @@ -338,7 +327,7 @@ = /** * Returns all permissions associated with the specified user - * = + * * @param user * @return */ @@ -364,14 +353,14 @@ // in case of a database version, use the cache optmized way to // lookup the permissions String lookupByRole =3D "SELECT p.* from jbp_cms_perm p,jbp_cm= s_perm_role r,jbp_role_membership m,jbp_roles roles,jbp_users users WHERE " - + "p.id=3Dr.cms_perm_id AND " - + "r.role_id=3Droles.jbp_name AND " - + "m.jbp_rid=3Droles.jbp_rid AND " - + "m.jbp_uid=3Dusers.jbp_uid AND " + "users.jbp_uname=3D= ?"; + + "p.id=3Dr.cms_perm_id AND " + + "r.role_id=3Droles.jbp_name AND " + + "m.jbp_rid=3Droles.jbp_rid AND " + + "m.jbp_uid=3Dusers.jbp_uid AND " + "users.jbp_uname=3D?"; = // perform lookup based on role membership Query roleQuery =3D session.createSQLQuery(lookupByRole).addEn= tity( - Permission.class); + Permission.class); roleQuery.setString(0, userId); roleQuery.setCacheable(true); permissions.addAll(roleQuery.list()); @@ -381,14 +370,14 @@ // in the case of LDAP use the IdentityModule // now find permissions for all the roles that this user belon= gs to Set belongedRoles =3D this.membershipModule.getRoles(this.user= Module - .findUserByUserName(userId)); + .findUserByUserName(userId)); if (belongedRoles !=3D null) { for (Iterator itr =3D belongedRoles.iterator(); itr.hasNext= ();) { - Role role =3D (Role) itr.next(); + Role role =3D (Role)itr.next(); Collection rolePermissions =3D this.findPermissionsByRol= e(role - .getName()); + .getName()); if (rolePermissions !=3D null && !rolePermissions.isEmpt= y()) { permissions.addAll(rolePermissions); @@ -413,7 +402,7 @@ = /** * Returns all permissions associated with the specified role - * = + * * @param role * @return */ @@ -433,7 +422,7 @@ roleQuery.setCacheable(true); permissions.addAll(roleQuery.list()); } - catch(Exception e) + catch (Exception e) { tx.rollback(); throw new RuntimeException(e); @@ -449,7 +438,7 @@ = /** * Return all permissions that match the specified criteria - * = + * * @param criteria * @return */ @@ -470,7 +459,7 @@ criteriaQuery.setCacheable(true); permissions.addAll(criteriaQuery.list()); } - catch(Exception e) + catch (Exception e) { tx.rollback(); throw new RuntimeException(e); Property changes on: branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jbos= s/portal/cms/security/AuthorizationProviderImpl.java ___________________________________________________________________ Name: svn:keywords + = Modified: branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cm= s/security/CMSPermission.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cms/secu= rity/CMSPermission.java 2007-10-27 23:01:46 UTC (rev 8784) +++ branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cms/secu= rity/CMSPermission.java 2007-10-28 01:09:21 UTC (rev 8785) @@ -23,96 +23,91 @@ package org.jboss.portal.cms.security; = = -import javax.security.auth.Subject; - import org.jboss.portal.security.PortalPermission; import org.jboss.portal.security.PortalSecurityException; import org.jboss.portal.security.spi.provider.PermissionRepository; = +import javax.security.auth.Subject; + /** * Created on : Jan 23, 2007 - * @author Sohil Shah - sohil.shah(a)jboss.com * + * @author Sohil Shah - sohil.shah(a)jboss.com */ public class CMSPermission extends PortalPermission { - private PortalCMSSecurityContext securityContext =3D null; - = - /** - * = - */ - public CMSPermission(String name, String uri) - { - super(name,uri); - } - = - /** - * = - * @param wrappedPermission - */ - public CMSPermission(PortalCMSSecurityContext securityContext) - { - super("",""); - this.securityContext =3D securityContext; - } + private PortalCMSSecurityContext securityContext =3D null; = - //--------PortalPermission implementation--------------------------------= ---------------------------- - /** - * = - */ - public String getType() - { = - return this.getClass().getName(); - } + /** + * + */ + public CMSPermission(String name, String uri) + { + super(name, uri); + } = - /** - * = - */ - public boolean implies(PermissionRepository repository, Subject caller, - String roleName, PortalPermission permission) - throws PortalSecurityException - { = - return false; - } = - = - /** - * = - * @return - */ - public PortalCMSSecurityContext getSecurityContext() - { - return this.securityContext; - } - //-------Permission implementation---------------------------------------= --------------------------- - /** - * = - */ - public boolean equals(Object obj) - { = - return false; - } + /** @param wrappedPermission */ + public CMSPermission(PortalCMSSecurityContext securityContext) + { + super("", ""); + this.securityContext =3D securityContext; + } = - /** - * = - */ - public String getActions() - { = - return null; - } - = - /** - * = - */ - public int hashCode() - { = - return 0; - } = - = - /** - * = - */ - public boolean implies(java.security.Permission permission) - { - return false; - } + //--------PortalPermission implementation------------------------------= ------------------------------ + /** + * + */ + public String getType() + { + return this.getClass().getName(); + } + + /** + * + */ + public boolean implies(PermissionRepository repository, Subject caller, + String roleName, PortalPermission permission) + throws PortalSecurityException + { + return false; + } + + /** @return */ + public PortalCMSSecurityContext getSecurityContext() + { + return this.securityContext; + } + + //-------Permission implementation-------------------------------------= ----------------------------- + /** + * + */ + public boolean equals(Object obj) + { + return false; + } + + /** + * + */ + public String getActions() + { + return null; + } + + /** + * + */ + public int hashCode() + { + return 0; + } + + /** + * + */ + public boolean implies(java.security.Permission permission) + { + return false; + } } Property changes on: branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jbos= s/portal/cms/security/CMSPermission.java ___________________________________________________________________ Name: svn:keywords + = Modified: branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cm= s/security/Criteria.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cms/secu= rity/Criteria.java 2007-10-27 23:01:46 UTC (rev 8784) +++ branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cms/secu= rity/Criteria.java 2007-10-28 01:09:21 UTC (rev 8785) @@ -23,105 +23,87 @@ = import java.io.Serializable; = -/** - * = - * @author Sohil Shah - sohil.shah(a)jboss.com - Nov 29, 2006 - * - */ +/** @author Sohil Shah - sohil.shah(a)jboss.com - Nov 29, 2006 */ public class Criteria implements Serializable { - /** - * = - */ - private long id =3D 0; - private String name =3D null; - private String value =3D null; - = - /** - * = - * - */ - public Criteria() - { - = - } - = - /** - * = - * - */ - public Criteria(String name,String value) - { - this(); - this.name =3D name; - this.value =3D value; - } - = - /** - * = - * @return - */ - public long getId() - { - return this.id; - } - = - /** - * = - * @param key - */ - public void setId(long id) - { - this.id =3D id; - } - = - /** - * @return Returns the context. - */ - public String getName() = - { - return name; - } - = - /** - * @param context The context to set. - */ - public void setName(String name) = - { - this.name =3D name; - } - = - = - /** - * @return Returns the value. - */ - public String getValue() = - { - return value; - } - = - /** - * @param value The value to set. - */ - public void setValue(String value) = - { - this.value =3D value; - } - = - /** - * = - */ - public boolean equals(Object obj) - { - boolean equals =3D false; - if(obj instanceof Criteria) - { - Criteria input =3D (Criteria)obj; - if(input.name.equals(this.name) && input.value.equals(this.val= ue)) - { - equals =3D true; - } - } - return equals; - } + /** + * + */ + private long id =3D 0; + private String name =3D null; + private String value =3D null; + + /** + * + * + */ + public Criteria() + { + + } + + /** + * + * + */ + public Criteria(String name, String value) + { + this(); + this.name =3D name; + this.value =3D value; + } + + /** @return */ + public long getId() + { + return this.id; + } + + /** @param key */ + public void setId(long id) + { + this.id =3D id; + } + + /** @return Returns the context. */ + public String getName() + { + return name; + } + + /** @param context The context to set. */ + public void setName(String name) + { + this.name =3D name; + } + + + /** @return Returns the value. */ + public String getValue() + { + return value; + } + + /** @param value The value to set. */ + public void setValue(String value) + { + this.value =3D value; + } + + /** + * + */ + public boolean equals(Object obj) + { + boolean equals =3D false; + if (obj instanceof Criteria) + { + Criteria input =3D (Criteria)obj; + if (input.name.equals(this.name) && input.value.equals(this.value= )) + { + equals =3D true; + } + } + return equals; + } } Property changes on: branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jbos= s/portal/cms/security/Criteria.java ___________________________________________________________________ Name: svn:keywords + = Modified: branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cm= s/security/PermRoleAssoc.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cms/secu= rity/PermRoleAssoc.java 2007-10-27 23:01:46 UTC (rev 8784) +++ branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cms/secu= rity/PermRoleAssoc.java 2007-10-28 01:09:21 UTC (rev 8785) @@ -21,75 +21,59 @@ */ package org.jboss.portal.cms.security; = -/** - * = - * @author Sohil Shah - sohil.shah(a)jboss.com - Dec 7, 2006 - * - */ -public class PermRoleAssoc = +/** @author Sohil Shah - sohil.shah(a)jboss.com - Dec 7, 2006 */ +public class PermRoleAssoc { - private long id =3D 0; - private String roleId =3D null; + private long id =3D 0; + private String roleId =3D null; = - /** - * = - * - */ - public PermRoleAssoc() = - { - super(); - } + /** + * + * + */ + public PermRoleAssoc() + { + super(); + } = - /** - * = - * @return - */ - public long getId() = - { - return id; - } + /** @return */ + public long getId() + { + return id; + } = - /** - * = - * @param id - */ - public void setId(long id) = - { - this.id =3D id; - } + /** @param id */ + public void setId(long id) + { + this.id =3D id; + } = - = - /** - * = - * @return - */ - public String getRoleId() = - { - return roleId; - } = - /** - * = - * @param roleId - */ - public void setRoleId(String roleId) = - { - this.roleId =3D roleId; - } = - = - public boolean equals(Object obj) - { - boolean equals =3D false; - = - if(obj instanceof PermRoleAssoc) - { - PermRoleAssoc input =3D (PermRoleAssoc)obj; - if(input.roleId.equals(this.roleId)) - { - equals =3D true; - } - } - = - return equals; - } + /** @return */ + public String getRoleId() + { + return roleId; + } + + /** @param roleId */ + public void setRoleId(String roleId) + { + this.roleId =3D roleId; + } + + public boolean equals(Object obj) + { + boolean equals =3D false; + + if (obj instanceof PermRoleAssoc) + { + PermRoleAssoc input =3D (PermRoleAssoc)obj; + if (input.roleId.equals(this.roleId)) + { + equals =3D true; + } + } + + return equals; + } } Property changes on: branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jbos= s/portal/cms/security/PermRoleAssoc.java ___________________________________________________________________ Name: svn:keywords + = Modified: branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cm= s/security/PermUserAssoc.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cms/secu= rity/PermUserAssoc.java 2007-10-27 23:01:46 UTC (rev 8784) +++ branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cms/secu= rity/PermUserAssoc.java 2007-10-28 01:09:21 UTC (rev 8785) @@ -21,75 +21,59 @@ */ package org.jboss.portal.cms.security; = -/** - * = - * @author Sohil Shah - sohil.shah(a)jboss.com - Dec 7, 2006 - * - */ -public class PermUserAssoc = +/** @author Sohil Shah - sohil.shah(a)jboss.com - Dec 7, 2006 */ +public class PermUserAssoc { - private long id =3D 0; - private String userId =3D null; + private long id =3D 0; + private String userId =3D null; = - /** - * = - * - */ - public PermUserAssoc() = - { - super(); - } + /** + * + * + */ + public PermUserAssoc() + { + super(); + } = - /** - * = - * @return - */ - public long getId() = - { - return id; - } + /** @return */ + public long getId() + { + return id; + } = - /** - * = - * @param id - */ - public void setId(long id) = - { - this.id =3D id; - } + /** @param id */ + public void setId(long id) + { + this.id =3D id; + } = - = - /** - * = - * @return - */ - public String getUserId() = - { - return userId; - } = - /** - * = - * @param roleId - */ - public void setUserId(String userId) = - { - this.userId =3D userId; - } = - = - public boolean equals(Object obj) - { - boolean equals =3D false; - = - if(obj instanceof PermUserAssoc) - { - PermUserAssoc input =3D (PermUserAssoc)obj; - if(input.userId.equals(this.userId)) - { - equals =3D true; - } - } - = - return equals; - } + /** @return */ + public String getUserId() + { + return userId; + } + + /** @param roleId */ + public void setUserId(String userId) + { + this.userId =3D userId; + } + + public boolean equals(Object obj) + { + boolean equals =3D false; + + if (obj instanceof PermUserAssoc) + { + PermUserAssoc input =3D (PermUserAssoc)obj; + if (input.userId.equals(this.userId)) + { + equals =3D true; + } + } + + return equals; + } } Property changes on: branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jbos= s/portal/cms/security/PermUserAssoc.java ___________________________________________________________________ Name: svn:keywords + = Modified: branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cm= s/security/Permission.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cms/secu= rity/Permission.java 2007-10-27 23:01:46 UTC (rev 8784) +++ branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cms/secu= rity/Permission.java 2007-10-28 01:09:21 UTC (rev 8785) @@ -21,398 +21,321 @@ */ package org.jboss.portal.cms.security; = -import java.util.Set; +import java.security.BasicPermission; import java.util.HashSet; import java.util.Iterator; -import java.security.BasicPermission; +import java.util.Set; = -/** - * = - * @author Sohil Shah - sohil.shah(a)jboss.com - Nov 28, 2006 - * - */ -public class Permission extends BasicPermission = +/** @author Sohil Shah - sohil.shah(a)jboss.com - Nov 28, 2006 */ +public class Permission extends BasicPermission { - /** - * = - */ - private long id =3D 0; //unique id for this permission object in the s= torage (typically database) = - private String service =3D null; //portal service that this permission= applies to like cms etc - private String action =3D null; //action on the service that needs to = be protected - private boolean isNegated =3D false; - = - /** - * = - */ - private Set criteria =3D null; - private Set roleAssoc =3D null; - private Set userAssoc =3D null; - = - /** - * = - */ - private Set roles =3D null; //these are information carrying fields, t= hey are not persisted in the database - private Set users =3D null; //these are information carrying fields, t= hey are not persisted in the database - = - /** - * = - * - */ - public Permission() - { - this("null"); - } - = - = - /** - * = - * @param name - */ - public Permission(String service) = - { - super(service); - this.service =3D service; - } - = - /** - * = - * @param name - * @param actions - */ - public Permission(String service,String actions) = - { - super(service,actions); - this.service =3D service; - this.action =3D actions; - } - = - = - /** - * = - * @return - */ - public long getId() - { - return this.id; - } - = - /** - * = - * @param id - */ - public void setId(long id) - { - this.id =3D id; - } = - = - /** - * = - * @return - */ - public Set getCriteria() - { - return this.criteria; - } - = - /** - * = - * @param criteria - */ - public void setCriteria(Set criteria) - { - this.criteria =3D criteria; - } - = - /** - * = - * @param criteria - */ - public void addCriteria(Criteria criteria) - { - if(this.criteria =3D=3D null) - { - this.criteria =3D new HashSet(); - } - this.criteria.add(criteria); - } - = - /** - * = - * @return - */ - public String getService() - { - return this.service; - } - = - = - /** - * = - * @param name - */ - public void setService(String service) - { - this.service =3D service; - } - = - /** - * = - * @return - */ - public String getAction() - { - return this.action; - } - = - /** - * = - * @param action - */ - public void setAction(String action) - { - this.action =3D action; - } - = - = - /** - * Finds the specified criteria value for the criteriaId - * = - * @param criteriaId - * @return value of the criteria - */ - public String findCriteriaValue(String criteriaId) - { - String value =3D null; - if(this.criteria!=3Dnull) - { - for(Iterator itr=3Dthis.criteria.iterator();itr.hasNext();) - { - Criteria cour =3D (Criteria)itr.next(); - if(criteriaId.equals(cour.getName())) - { - value =3D cour.getValue(); - } - } - } - return value; - } + /** + * + */ + private long id =3D 0; //unique id for this permission object in the st= orage (typically database) + private String service =3D null; //portal service that this permission = applies to like cms etc + private String action =3D null; //action on the service that needs to b= e protected + private boolean isNegated =3D false; = - /** - * = - * @return - */ - public boolean isNegated() = - { - return isNegated; - } + /** + * + */ + private Set criteria =3D null; + private Set roleAssoc =3D null; + private Set userAssoc =3D null; = - /** - * = - * @param isNegated - */ - public void setNegated(boolean isNegated) = - { - this.isNegated =3D isNegated; - } + /** + * + */ + private Set roles =3D null; //these are information carrying fields, th= ey are not persisted in the database + private Set users =3D null; //these are information carrying fields, th= ey are not persisted in the database = - /** - * = - * @return - */ - public Set getRoleAssoc() = - { - return roleAssoc; - } + /** + * + * + */ + public Permission() + { + this("null"); + } = - /** - * = - * @param roleAssoc - */ - public void setRoleAssoc(Set roleAssoc) = - { - this.roleAssoc =3D roleAssoc; - } - = - /** - * = - * @param roleAssoc - */ - public void addRoleAssoc(PermRoleAssoc roleAssoc) - { - if(this.roleAssoc =3D=3D null) - { - this.roleAssoc =3D new HashSet(); - } - this.roleAssoc.add(roleAssoc); - } - = - /** - * = - * @return - */ - public Set getRoleAssocIds() - { - Set ids =3D new HashSet(); - if(this.roleAssoc!=3Dnull) - { - for(Iterator itr=3Dthis.roleAssoc.iterator();itr.hasNext();) - { - PermRoleAssoc cour =3D (PermRoleAssoc)itr.next(); - ids.add(cour.getRoleId()); - } - } - return ids; - } = - /** - * = - * @return - */ - public Set getUserAssoc() = - { - return userAssoc; - } + /** @param name */ + public Permission(String service) + { + super(service); + this.service =3D service; + } = - /** - * = - * @param userAssoc - */ - public void setUserAssoc(Set userAssoc) = - { - this.userAssoc =3D userAssoc; - } - = - /** - * = - * @param userAssoc - */ - public void addUserAssoc(PermUserAssoc userAssoc) - { - if(this.userAssoc =3D=3D null) - { - this.userAssoc =3D new HashSet(); - } - this.userAssoc.add(userAssoc); - } - = - /** - * = - * @return - */ - public Set getUserAssocIds() - { - Set ids =3D new HashSet(); - if(this.userAssoc!=3Dnull) - { - for(Iterator itr=3Dthis.userAssoc.iterator();itr.hasNext();) - { - PermUserAssoc cour =3D (PermUserAssoc)itr.next(); - ids.add(cour.getUserId()); - } - } - return ids; - } - = - /** - * = - * @return - */ - public Set getRoles() - { - return roles; - } + /** + * @param name + * @param actions + */ + public Permission(String service, String actions) + { + super(service, actions); + this.service =3D service; + this.action =3D actions; + } = - /** - * = - * @param roles - */ - public void setRoles(Set roles) - { - this.roles =3D roles; - } = - /** - * = - * @return - */ - public Set getUsers() - { - return users; - } + /** @return */ + public long getId() + { + return this.id; + } = - /** - * = - * @param users - */ - public void setUsers(Set users) - { - this.users =3D users; - } + /** @param id */ + public void setId(long id) + { + this.id =3D id; + } = + /** @return */ + public Set getCriteria() + { + return this.criteria; + } = - /** - * = - */ - public String toString() - { - StringBuffer buffer =3D new StringBuffer(); - = - buffer.append("-----------------------------\n"); - buffer.append("ID=3D"+this.id+"\n"); - buffer.append("Service=3D"+this.service+"\n"); - buffer.append("Action=3D"+this.action+"\n"); - buffer.append("Negated=3D"+this.isNegated+"\n"); - = - //print role association - if(this.roleAssoc!=3Dnull) - { - for(Iterator itr=3Dthis.roleAssoc.iterator();itr.hasNext();) - { - PermRoleAssoc cour =3D (PermRoleAssoc)itr.next(); - buffer.append("Role =3D"+cour.getRoleId()+"\n"); - } - } - = - //print user association - if(this.userAssoc!=3Dnull) - { - for(Iterator itr=3Dthis.userAssoc.iterator();itr.hasNext();) - { - PermUserAssoc cour =3D (PermUserAssoc)itr.next(); - buffer.append("User =3D"+cour.getUserId()+"\n"); - } - } - = - //print criteria - if(this.criteria!=3Dnull) - { - for(Iterator itr=3Dthis.criteria.iterator();itr.hasNext();) - { - Criteria cour =3D (Criteria)itr.next(); - buffer.append("Criteria =3D"+cour.getName()+","+cour.getVa= lue()+"\n"); - } - } - = - buffer.append("-----------------------------\n"); - = - return buffer.toString(); - } + /** @param criteria */ + public void setCriteria(Set criteria) + { + this.criteria =3D criteria; + } = + /** @param criteria */ + public void addCriteria(Criteria criteria) + { + if (this.criteria =3D=3D null) + { + this.criteria =3D new HashSet(); + } + this.criteria.add(criteria); + } = - /** - * = - */ - public boolean equals(Object obj) = - { = - boolean equals =3D false; - if(obj instanceof Permission) - { - Permission input =3D (Permission)obj; - if(input.id =3D=3D this.id) + /** @return */ + public String getService() + { + return this.service; + } + + + /** @param name */ + public void setService(String service) + { + this.service =3D service; + } + + /** @return */ + public String getAction() + { + return this.action; + } + + /** @param action */ + public void setAction(String action) + { + this.action =3D action; + } + + + /** + * Finds the specified criteria value for the criteriaId + * + * @param criteriaId + * @return value of the criteria + */ + public String findCriteriaValue(String criteriaId) + { + String value =3D null; + if (this.criteria !=3D null) + { + for (Iterator itr =3D this.criteria.iterator(); itr.hasNext();) + { + Criteria cour =3D (Criteria)itr.next(); + if (criteriaId.equals(cour.getName())) { - equals =3D true; + value =3D cour.getValue(); } - } - return equals; - } + } + } + return value; + } + + /** @return */ + public boolean isNegated() + { + return isNegated; + } + + /** @param isNegated */ + public void setNegated(boolean isNegated) + { + this.isNegated =3D isNegated; + } + + /** @return */ + public Set getRoleAssoc() + { + return roleAssoc; + } + + /** @param roleAssoc */ + public void setRoleAssoc(Set roleAssoc) + { + this.roleAssoc =3D roleAssoc; + } + + /** @param roleAssoc */ + public void addRoleAssoc(PermRoleAssoc roleAssoc) + { + if (this.roleAssoc =3D=3D null) + { + this.roleAssoc =3D new HashSet(); + } + this.roleAssoc.add(roleAssoc); + } + + /** @return */ + public Set getRoleAssocIds() + { + Set ids =3D new HashSet(); + if (this.roleAssoc !=3D null) + { + for (Iterator itr =3D this.roleAssoc.iterator(); itr.hasNext();) + { + PermRoleAssoc cour =3D (PermRoleAssoc)itr.next(); + ids.add(cour.getRoleId()); + } + } + return ids; + } + + /** @return */ + public Set getUserAssoc() + { + return userAssoc; + } + + /** @param userAssoc */ + public void setUserAssoc(Set userAssoc) + { + this.userAssoc =3D userAssoc; + } + + /** @param userAssoc */ + public void addUserAssoc(PermUserAssoc userAssoc) + { + if (this.userAssoc =3D=3D null) + { + this.userAssoc =3D new HashSet(); + } + this.userAssoc.add(userAssoc); + } + + /** @return */ + public Set getUserAssocIds() + { + Set ids =3D new HashSet(); + if (this.userAssoc !=3D null) + { + for (Iterator itr =3D this.userAssoc.iterator(); itr.hasNext();) + { + PermUserAssoc cour =3D (PermUserAssoc)itr.next(); + ids.add(cour.getUserId()); + } + } + return ids; + } + + /** @return */ + public Set getRoles() + { + return roles; + } + + /** @param roles */ + public void setRoles(Set roles) + { + this.roles =3D roles; + } + + /** @return */ + public Set getUsers() + { + return users; + } + + /** @param users */ + public void setUsers(Set users) + { + this.users =3D users; + } + + + /** + * + */ + public String toString() + { + StringBuffer buffer =3D new StringBuffer(); + + buffer.append("-----------------------------\n"); + buffer.append("ID=3D" + this.id + "\n"); + buffer.append("Service=3D" + this.service + "\n"); + buffer.append("Action=3D" + this.action + "\n"); + buffer.append("Negated=3D" + this.isNegated + "\n"); + + //print role association + if (this.roleAssoc !=3D null) + { + for (Iterator itr =3D this.roleAssoc.iterator(); itr.hasNext();) + { + PermRoleAssoc cour =3D (PermRoleAssoc)itr.next(); + buffer.append("Role =3D" + cour.getRoleId() + "\n"); + } + } + + //print user association + if (this.userAssoc !=3D null) + { + for (Iterator itr =3D this.userAssoc.iterator(); itr.hasNext();) + { + PermUserAssoc cour =3D (PermUserAssoc)itr.next(); + buffer.append("User =3D" + cour.getUserId() + "\n"); + } + } + + //print criteria + if (this.criteria !=3D null) + { + for (Iterator itr =3D this.criteria.iterator(); itr.hasNext();) + { + Criteria cour =3D (Criteria)itr.next(); + buffer.append("Criteria =3D" + cour.getName() + "," + cour.get= Value() + "\n"); + } + } + + buffer.append("-----------------------------\n"); + + return buffer.toString(); + } + + + /** + * + */ + public boolean equals(Object obj) + { + boolean equals =3D false; + if (obj instanceof Permission) + { + Permission input =3D (Permission)obj; + if (input.id =3D=3D this.id) + { + equals =3D true; + } + } + return equals; + } } Property changes on: branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jbos= s/portal/cms/security/Permission.java ___________________________________________________________________ Name: svn:keywords + = Modified: branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cm= s/security/PortalCMSSecurityContext.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cms/secu= rity/PortalCMSSecurityContext.java 2007-10-27 23:01:46 UTC (rev 8784) +++ branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cms/secu= rity/PortalCMSSecurityContext.java 2007-10-28 01:09:21 UTC (rev 8785) @@ -21,89 +21,86 @@ */ package org.jboss.portal.cms.security; = +import org.jboss.portal.identity.User; + import java.io.Serializable; import java.util.HashMap; import java.util.Map; = -import org.jboss.portal.identity.User; - /** * An implementation of SecurityContext for the core Portal Engine - * = - * @author Sohil Shah - sohil.shah(a)jboss.com - Nov 27, 2006 * + * @author Sohil Shah - sohil.shah(a)jboss.com - Nov 27, 2006 */ -public class PortalCMSSecurityContext implements Serializable = +public class PortalCMSSecurityContext implements Serializable { - private Map contextMap =3D null; - = - /** - * signifies the user currently logged in to the system - */ - private User portalUser =3D null; - = + private Map contextMap =3D null; = - /** - * = - * - */ - public PortalCMSSecurityContext(User portalUser) = - { - super(); - this.portalUser =3D portalUser; - this.contextMap =3D new HashMap(); - } + /** signifies the user currently logged in to the system */ + private User portalUser =3D null; = - /** - * This method returns the Identity of the user logged into the portal= . The return value is of type - * org.jboss.portal.identity.User - * = - * @return Identity related information associated with the user logge= d into the portal - */ - public Object getIdentity() = - { = - return this.portalUser; - } = - = - /** - * Returns value corresponding to the specified attribute name - * = - * @param name - * @return - */ - public Object getAttribute(String name) - { - return this.contextMap.get(name); - } - = - /** - * Sets a specified value corresponding to the specified name in the c= ontext - * = - * @param name - * @param value - */ - public void setAttribute(String name,Object value) - { - this.contextMap.put(name,value); - } - = - /** - * Removes the specified attribute - * = - * @param name - */ - public void removeAttribute(String name) - { - this.contextMap.remove(name); - } - = - /** - * Returns an array of Strings consisting of all keys/names stored in = the context - * = - * @return - */ - public String[] getAttributeNames() - { - return (String[])this.contextMap.keySet().toArray(); - } + + /** + * + * + */ + public PortalCMSSecurityContext(User portalUser) + { + super(); + this.portalUser =3D portalUser; + this.contextMap =3D new HashMap(); + } + + /** + * This method returns the Identity of the user logged into the portal.= The return value is of type + * org.jboss.portal.identity.User + * + * @return Identity related information associated with the user logged= into the portal + */ + public Object getIdentity() + { + return this.portalUser; + } + + /** + * Returns value corresponding to the specified attribute name + * + * @param name + * @return + */ + public Object getAttribute(String name) + { + return this.contextMap.get(name); + } + + /** + * Sets a specified value corresponding to the specified name in the co= ntext + * + * @param name + * @param value + */ + public void setAttribute(String name, Object value) + { + this.contextMap.put(name, value); + } + + /** + * Removes the specified attribute + * + * @param name + */ + public void removeAttribute(String name) + { + this.contextMap.remove(name); + } + + /** + * Returns an array of Strings consisting of all keys/names stored in t= he context + * + * @return + */ + public String[] getAttributeNames() + { + return (String[])this.contextMap.keySet().toArray(); + } } Property changes on: branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jbos= s/portal/cms/security/PortalCMSSecurityContext.java ___________________________________________________________________ Name: svn:keywords + = Property changes on: branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jbos= s/portal/cms/util/FileUtil.java ___________________________________________________________________ Name: svn:keywords - Author Date Id Revision + = Property changes on: branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jbos= s/portal/cms/util/HibernateUtil.java ___________________________________________________________________ Name: svn:keywords - Author Date Id Revision + = Property changes on: branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jbos= s/portal/cms/util/NodeUtil.java ___________________________________________________________________ Name: svn:keywords - Author Date Id Revision + = Property changes on: branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jbos= s/portal/cms/util/RepositoryUtil.java ___________________________________________________________________ Name: svn:keywords - Author Date Id Revision + = Modified: branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cm= s/workflow/ApprovePublish.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cms/work= flow/ApprovePublish.java 2007-10-27 23:01:46 UTC (rev 8784) +++ branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cms/work= flow/ApprovePublish.java 2007-10-28 01:09:21 UTC (rev 8785) @@ -22,11 +22,10 @@ *************************************************************************= *****/ package org.jboss.portal.cms.workflow; = -import java.util.Set; - import org.jboss.portal.workflow.WorkflowException; = import java.util.Collection; +import java.util.Set; = /** * Created on : Dec 19, 2006 @@ -36,8 +35,8 @@ public interface ApprovePublish { /** - * Called when content is added to the CMS, and needs to be approved by= the managers - * before it can be published to go live + * Called when content is added to the CMS, and needs to be approved by= the managers before it can be published to go + * live * * @param content * @return returns the process id of the workflow process set in motion @@ -45,8 +44,7 @@ public long requestApproval(Content content) throws WorkflowException; = /** - * Called when a manager either approves or rejects the publishing of a= specific content to - * go live + * Called when a manager either approves or rejects the publishing of a= specific content to go live * * @param processId * @param manager userId of the manager @@ -70,13 +68,12 @@ * @throws WorkflowException */ public Collection getAllPendingInQueue() throws WorkflowException; - = + /** - * Returns role names of Roles that are designated to be Managers in th= is workflow. - * Managers approve/deny all content publish requests before the conten= t goes live in the - * CMS - * = - * @return a Set of role names = + * Returns role names of Roles that are designated to be Managers in th= is workflow. Managers approve/deny all content + * publish requests before the content goes live in the CMS + * + * @return a Set of role names */ public Set getManagers(); } Property changes on: branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jbos= s/portal/cms/workflow/ApprovePublish.java ___________________________________________________________________ Name: svn:keywords + = Modified: branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cm= s/workflow/ApprovePublishImpl.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cms/work= flow/ApprovePublishImpl.java 2007-10-27 23:01:46 UTC (rev 8784) +++ branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cms/work= flow/ApprovePublishImpl.java 2007-10-28 01:09:21 UTC (rev 8785) @@ -22,18 +22,6 @@ *************************************************************************= *****/ package org.jboss.portal.cms.workflow; = -import java.io.ByteArrayInputStream; -import java.io.InputStream; -import java.util.ArrayList; -import java.util.Collection; -import java.util.HashSet; -import java.util.Iterator; -import java.util.List; -import java.util.Set; -import java.util.StringTokenizer; - -import javax.xml.parsers.DocumentBuilderFactory; - import org.apache.log4j.Logger; import org.jboss.portal.common.io.IOTools; import org.jboss.portal.identity.IdentityContext; @@ -54,6 +42,16 @@ import org.w3c.dom.Document; import org.w3c.dom.Element; = +import javax.xml.parsers.DocumentBuilderFactory; +import java.io.ByteArrayInputStream; +import java.io.InputStream; +import java.util.ArrayList; +import java.util.Collection; +import java.util.HashSet; +import java.util.Iterator; +import java.util.List; +import java.util.Set; +import java.util.StringTokenizer; = = /** @@ -83,7 +81,7 @@ private String subject =3D null; private String body =3D null; private JNDI.Binding jndiBinding; - = + private MembershipModule membershipModule =3D null; private UserModule userModule =3D null; = @@ -164,12 +162,12 @@ this.managers[i] =3D st.nextToken(); this.managerSet.add(this.managers[i]); } - = + this.membershipModule =3D (MembershipModule)identityServiceControlle= r.getIdentityContext(). - getObject(IdentityContext.TYPE_MEMBERSHIP_MODULE); - = - this.userModule =3D (UserModule)identityServiceController.getIdentityCo= ntext(). - getObject(IdentityContext.TYPE_USER_MODULE); + getObject(IdentityContext.TYPE_MEMBERSHIP_MODULE); + + this.userModule =3D (UserModule)identityServiceController.getIdentit= yContext(). + getObject(IdentityContext.TYPE_USER_MODULE); } = /** @@ -247,24 +245,21 @@ { this.jndiName =3D jndiName; } - = + /** - * = - */ - public IdentityServiceController getIdentityServiceController() - { - return identityServiceController; - } + * + */ + public IdentityServiceController getIdentityServiceController() + { + return identityServiceController; + } = - /** - * = - * @param identityServiceController - */ - public void setIdentityServiceController( - IdentityServiceController identityServiceController) - { - this.identityServiceController =3D identityServiceController; - } + /** @param identityServiceController */ + public void setIdentityServiceController( + IdentityServiceController identityServiceController) + { + this.identityServiceController =3D identityServiceController; + } = = /** @return the body */ @@ -305,8 +300,8 @@ = //----------ApprovePublish Implementation------------------------------= ------------------------------------ /** - * Called when content is added to the CMS, and needs to be approved by= the managers - * before it can be published to go live + * Called when content is added to the CMS, and needs to be approved by= the managers before it can be published to go + * live * * @param content * @return returns the process id of the workflow process set in motion @@ -363,15 +358,14 @@ } = /** - * Called when a manager either approves or rejects the publishing of a= specific content to - * go live + * Called when a manager either approves or rejects the publishing of a= specific content to go live * * @param processId * @param manager userId of the manager * @param approved true if approved, false if rejected */ public void processManagerResponse(long processId, String manager, bool= ean approved) throws WorkflowException - { = + { JbpmContext jbpmContext =3D null; ProcessInstance processInstance =3D null; boolean isManager =3D false; @@ -396,9 +390,9 @@ for (Iterator itr =3D allTasks.iterator(); itr.hasNext();) { TaskInstance cour =3D (TaskInstance)itr.next(); - if (this.isManager(manager,cour.getActorId())) + if (this.isManager(manager, cour.getActorId())) { - isManager =3D true; + isManager =3D true; log.debug("Manager=3D" + cour.getActorId() + "(" + proce= ssId + ")"); = //check and make sure this task instance is not marked f= or deletion @@ -433,11 +427,11 @@ { jbpmContext.save(processInstance); } - = - if(!isManager) + + if (!isManager) { - WorkflowException we =3D new WorkflowException("You are not auth= orized to Approve/Deny content publish requests"); - throw we; + WorkflowException we =3D new WorkflowException("You are not au= thorized to Approve/Deny content publish requests"); + throw we; } IOTools.safeClose(jbpmContext); } @@ -480,7 +474,7 @@ = if (criteriaPath.trim().equals(filePath.trim())) { - content.setProcessId(String.valueOf(cour.getId())); + content.setProcessId(String.valueOf(cour.getId())); pendingQueue.add(content); } } @@ -526,7 +520,7 @@ //apply proper criteria to extract pending content only = for the specified file if (content !=3D null) { - content.setProcessId(String.valueOf(cour.getId())); + content.setProcessId(String.valueOf(cour.getId())); pendingQueue.add(content); } } @@ -539,44 +533,41 @@ } return pendingQueue; } - = - /** - * = - * @return - */ + + /** @return */ public Set getManagers() { - return this.managerSet; - } = + return this.managerSet; + } + //---------------------------------------------------------------------= ------------------------------------------- /** - * checks to see if the user trying to approve/deny a publish request b= elongs to the - * approved list of managers - * = + * checks to see if the user trying to approve/deny a publish request b= elongs to the approved list of managers + * * @param user * @param managerRole * @return */ - private boolean isManager(String user,String managerRole) throws Except= ion + private boolean isManager(String user, String managerRole) throws Excep= tion { - boolean isManager =3D false; - = - Set userRoles =3D this.membershipModule.getRoles( - this.userModule.findUserByUserName(user)); - if(userRoles !=3D null) - { - for(Iterator itr=3DuserRoles.iterator();itr.hasNext();) - { - Role cour =3D (Role)itr.next(); - if(cour.getName().equalsIgnoreCase(managerRole)) - { - //user is allowed to be a manager for this workflow - isManager =3D true; - break; - } - } - } - = - return isManager; + boolean isManager =3D false; + + Set userRoles =3D this.membershipModule.getRoles( + this.userModule.findUserByUserName(user)); + if (userRoles !=3D null) + { + for (Iterator itr =3D userRoles.iterator(); itr.hasNext();) + { + Role cour =3D (Role)itr.next(); + if (cour.getName().equalsIgnoreCase(managerRole)) + { + //user is allowed to be a manager for this workflow + isManager =3D true; + break; + } + } + } + + return isManager; } } Property changes on: branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jbos= s/portal/cms/workflow/ApprovePublishImpl.java ___________________________________________________________________ Name: svn:keywords + = Modified: branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cm= s/workflow/ApprovePublishServlet.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cms/work= flow/ApprovePublishServlet.java 2007-10-27 23:01:46 UTC (rev 8784) +++ branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cms/work= flow/ApprovePublishServlet.java 2007-10-28 01:09:21 UTC (rev 8785) @@ -22,16 +22,14 @@ *************************************************************************= *****/ package org.jboss.portal.cms.workflow; = -import java.io.IOException; - +import javax.naming.InitialContext; import javax.servlet.ServletException; +import javax.servlet.UnavailableException; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; -import javax.servlet.UnavailableException; +import java.io.IOException; = -import javax.naming.InitialContext; - /** * Created on : Dec 20, 2006 * Property changes on: branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jbos= s/portal/cms/workflow/ApprovePublishServlet.java ___________________________________________________________________ Name: svn:keywords + = Modified: branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cm= s/workflow/Content.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cms/work= flow/Content.java 2007-10-27 23:01:46 UTC (rev 8784) +++ branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cms/work= flow/Content.java 2007-10-28 01:09:21 UTC (rev 8785) @@ -23,9 +23,9 @@ package org.jboss.portal.cms.workflow; = import java.io.Serializable; -import java.util.Date; import java.text.Format; import java.text.SimpleDateFormat; +import java.util.Date; = /** * Created on : Dec 20, 2006 @@ -40,7 +40,7 @@ private String mimeType =3D null; private int size =3D 0; private Date creationDate =3D null; - = + private String processId =3D null; = /** @@ -52,65 +52,49 @@ = } = - /** - * @return the path - */ + /** @return the path */ public String getPath() { return path; } = - /** - * @param path the path to set - */ + /** @param path the path to set */ public void setPath(String path) { this.path =3D path; } = - /** - * @return the userName - */ + /** @return the userName */ public String getUserName() { return userName; } = - /** - * @param userName the userName to set - */ + /** @param userName the userName to set */ public void setUserName(String userName) { this.userName =3D userName; } = - /** - * @return the mimeType - */ + /** @return the mimeType */ public String getMimeType() { return mimeType; } = - /** - * @param mimeType the mimeType to set - */ + /** @param mimeType the mimeType to set */ public void setMimeType(String mimeType) { this.mimeType =3D mimeType; } = - /** - * @return the size - */ + /** @return the size */ public int getSize() { return size; } = - /** - * @param size the size to set - */ + /** @param size the size to set */ public void setSize(int size) { this.size =3D size; @@ -121,17 +105,13 @@ return String.valueOf((this.size / 1024)) + "kb"; } = - /** - * @return the creationDate - */ + /** @return the creationDate */ public Date getCreationDate() { return creationDate; } = - /** - * @param creationDate the creationDate to set - */ + /** @param creationDate the creationDate to set */ public void setCreationDate(Date creationDate) { this.creationDate =3D creationDate; @@ -148,21 +128,15 @@ return date; } = - /** - * = - * @return - */ - public String getProcessId() - { - return processId; - } - = - /** - * = - * @param processId - */ - public void setProcessId(String processId) - { - this.processId =3D processId; - } + /** @return */ + public String getProcessId() + { + return processId; + } + + /** @param processId */ + public void setProcessId(String processId) + { + this.processId =3D processId; + } } Property changes on: branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jbos= s/portal/cms/workflow/Content.java ___________________________________________________________________ Name: svn:keywords + = Modified: branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cm= s/workflow/FinalizePublish.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cms/work= flow/FinalizePublish.java 2007-10-27 23:01:46 UTC (rev 8784) +++ branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cms/work= flow/FinalizePublish.java 2007-10-28 01:09:21 UTC (rev 8785) @@ -22,129 +22,119 @@ *************************************************************************= *****/ package org.jboss.portal.cms.workflow; = -import java.util.Locale; -import java.util.List; - -import javax.naming.InitialContext; -import javax.naming.NamingException; - import org.apache.log4j.Logger; - -import org.jbpm.graph.def.*; -import org.jbpm.graph.exe.*; - -import org.jboss.portal.cms.workflow.Content; import org.jboss.portal.cms.CMS; import org.jboss.portal.cms.Command; -import org.jboss.portal.cms.model.File; -import org.jboss.portal.cms.impl.jcr.JCRCMS; import org.jboss.portal.cms.impl.interceptors.ACLInterceptor; +import org.jboss.portal.cms.impl.jcr.JCRCMS; +import org.jboss.portal.cms.model.File; +import org.jbpm.graph.def.ActionHandler; +import org.jbpm.graph.exe.ExecutionContext; = +import javax.naming.InitialContext; +import java.util.List; +import java.util.Locale; + /** - * = * Created on : Dec 20, 2006 - * @author Sohil Shah - sohil.shah(a)jboss.com * + * @author Sohil Shah - sohil.shah(a)jboss.com */ -public class FinalizePublish implements ActionHandler = +public class FinalizePublish implements ActionHandler { - /** - * = - */ - private static Logger log =3D Logger.getLogger(FinalizePublish.class); = - = - /** - * = - */ - public void execute(ExecutionContext executionContext) = - { - Content content =3D (Content)executionContext.getContextInstance().getV= ariable("content"); = - boolean approved =3D ((Boolean)executionContext.getContextInstance().ge= tVariable("approved")).booleanValue(); - long processId =3D executionContext.getProcessInstance().getId(); - CMS cms =3D this.getCMSService(); - = - if(approved) - { - ACLInterceptor.turnOff(); - JCRCMS.turnOffWorkflow(); - = - //create this content in the CMS and make it live - int lastIndex =3D content.getPath().lastIndexOf('/'); - String path =3D content.getPath().substring(0,lastIndex); - String language =3D content.getPath().substring(lastIndex+1); - = - Command command =3D cms.getCommandFactory().createContentGetVersionsCo= mmand(content.getPath()); - List versions =3D (List)cms.execute(command); - org.jboss.portal.cms.model.Content processContent =3D this.findProcess= Content(processId, versions); - = - /** - * if processContent is null, a pending version of the content was not= found - * this could be due to an outdated link. let the process finish, but = nothing - * new will be published - */ - if(processContent !=3D null) - { - //get the file to be updated and published live - command =3D cms.getCommandFactory().createFileGetCommand(path,process= Content.getVersionNumber(), - new Locale(language)); - File file =3D (File)cms.execute(command); - = - //now publish this - file.getContent().setApprovalProcessId(null); - file.getContent().setWaitingForPublishApproval(false); - command =3D cms.getCommandFactory().createUpdateFileCommand(file, fil= e.getContent(), true); - cms.execute(command); - } - = - = - JCRCMS.turnOnWorkflow(); - ACLInterceptor.turnOn(); - } = - } - = - /** - * = - * @param processId - * @param versions - * @return - */ - private org.jboss.portal.cms.model.Content findProcessContent(long proce= ssId,List versions) - { - org.jboss.portal.cms.model.Content content =3D null; - = - if(versions !=3D null) - { - for(int i=3D0;i0) - { = - //this.notifyManagers(executionContext,managers[0]); - assignable.setActorId(managers[0]); - = - for(int i=3D1;i 0) + { + //this.notifyManagers(executionContext,managers[0]); + assignable.setActorId(managers[0]); + + for (int i =3D 1; i < managers.length; i++) + { + //this.notifyManagers(executionContext,managers[i]); + TaskInstance t =3D executionContext.getTaskMgmtInstance(). + createTaskInstance(((TaskInstance)assignable).getTask(),= executionContext); + t.setActorId(managers[i]); + } + } + } + } } Property changes on: branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jbos= s/portal/cms/workflow/PublishAssignmentHandler.java ___________________________________________________________________ Name: svn:keywords + = Modified: branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cm= s/workflow/TaskExceptionHandler.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cms/work= flow/TaskExceptionHandler.java 2007-10-27 23:01:46 UTC (rev 8784) +++ branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cms/work= flow/TaskExceptionHandler.java 2007-10-28 01:09:21 UTC (rev 8785) @@ -22,9 +22,9 @@ *************************************************************************= *****/ package org.jboss.portal.cms.workflow; = +import org.jbpm.graph.def.ActionHandler; +import org.jbpm.graph.exe.ExecutionContext; import org.jbpm.taskmgmt.exe.TaskInstance; -import org.jbpm.graph.exe.ExecutionContext; -import org.jbpm.graph.def.ActionHandler; = = /** Property changes on: branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jbos= s/portal/cms/workflow/TaskExceptionHandler.java ___________________________________________________________________ Name: svn:keywords + = Modified: branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/te= st/cms/AbstractCMSTestCase.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/test/cms= /AbstractCMSTestCase.java 2007-10-27 23:01:46 UTC (rev 8784) +++ branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/test/cms= /AbstractCMSTestCase.java 2007-10-28 01:09:21 UTC (rev 8785) @@ -24,20 +24,20 @@ = import junit.framework.TestCase; import junit.framework.TestSuite; +import org.jboss.portal.test.framework.embedded.DataSourceSupport; +import org.jboss.portal.test.framework.embedded.HibernateSupport; +import org.jboss.portal.test.framework.junit.JUnitAdapter; import org.jboss.portal.test.framework.junit.POJOJUnitTest; -import org.jboss.portal.test.framework.junit.JUnitAdapter; import org.jboss.portal.test.framework.mc.TestRuntimeContext; -import org.jboss.portal.test.framework.embedded.DataSourceSupport; -import org.jboss.portal.test.framework.embedded.HibernateSupport; = import java.net.URL; +import java.util.HashMap; import java.util.Map; -import java.util.HashMap; = /** * @author Julien Viet * @author Thomas Heute - * @version $Revision$ + * @version $Revision: 7954 $ */ public abstract class AbstractCMSTestCase extends TestCase { @@ -47,10 +47,10 @@ = /** . */ protected TestRuntimeContext runtimeContext; - = + /** - * = * + * */ protected String configuration =3D "org/jboss/portal/cms/jboss-beans.xm= l"; = @@ -74,7 +74,7 @@ runtimeContext =3D new TestRuntimeContext(this.configuration); runtimeContext.addBean("DataSourceConfig", dataSourceConfigParameter= ); runtimeContext.addBean("HibernateConfig", HibernateSupport.getConfig= (dataSourceConfigParameter.getName())); - = + //Start the context runtimeContext.start(); } Property changes on: branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jbos= s/portal/test/cms/AbstractCMSTestCase.java ___________________________________________________________________ Name: svn:keywords - Author Date Id Revision + = Modified: branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/te= st/cms/JackrabbitTestCase.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/test/cms= /JackrabbitTestCase.java 2007-10-27 23:01:46 UTC (rev 8784) +++ branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/test/cms= /JackrabbitTestCase.java 2007-10-28 01:09:21 UTC (rev 8785) @@ -39,7 +39,7 @@ = /** * @author Julien Viet - * @version $Revision$ + * @version $Revision: 6653 $ */ public class JackrabbitTestCase extends AbstractCMSTestCase { Property changes on: branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jbos= s/portal/test/cms/JackrabbitTestCase.java ___________________________________________________________________ Name: svn:keywords - Author Date Id Revision + = Property changes on: branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jbos= s/portal/test/cms/TestRegEx.java ___________________________________________________________________ Name: svn:keywords - Author Date Id Revision + = Modified: branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/te= st/cms/TestRepositoryBootStrap.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/test/cms= /TestRepositoryBootStrap.java 2007-10-27 23:01:46 UTC (rev 8784) +++ branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/test/cms= /TestRepositoryBootStrap.java 2007-10-28 01:09:21 UTC (rev 8785) @@ -24,11 +24,10 @@ = import junit.framework.TestSuite; import org.jboss.portal.cms.util.RepositoryUtil; +import org.jboss.portal.test.cms.commands.AbstractCommandTestCase; = import javax.jcr.Session; = -import org.jboss.portal.test.cms.commands.AbstractCommandTestCase; - /** * Tests JCRCMS Service * Property changes on: branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jbos= s/portal/test/cms/TestRepositoryBootStrap.java ___________________________________________________________________ Name: svn:keywords - Author Date Id Revision + = Modified: branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/te= st/cms/TestRepositoryUtil.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/test/cms= /TestRepositoryUtil.java 2007-10-27 23:01:46 UTC (rev 8784) +++ branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/test/cms= /TestRepositoryUtil.java 2007-10-28 01:09:21 UTC (rev 8785) @@ -25,8 +25,6 @@ import junit.framework.TestSuite; import org.jboss.portal.cms.util.NodeUtil; = -import java.util.Map; - /** * Tests RepositoryUtil * Property changes on: branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jbos= s/portal/test/cms/TestRepositoryUtil.java ___________________________________________________________________ Name: svn:keywords - Author Date Id Revision + = Modified: branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/te= st/cms/clustering/FileDeleteTest.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/test/cms= /clustering/FileDeleteTest.java 2007-10-27 23:01:46 UTC (rev 8784) +++ branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/test/cms= /clustering/FileDeleteTest.java 2007-10-28 01:09:21 UTC (rev 8785) @@ -22,26 +22,26 @@ *************************************************************************= *****/ package org.jboss.portal.test.cms.clustering; = -import org.jboss.portal.test.framework.server.driver.AbstractTest; +import org.jboss.portal.cms.CMS; +import org.jboss.portal.cms.Command; +import org.jboss.portal.cms.impl.ContentImpl; +import org.jboss.portal.cms.impl.FileImpl; +import org.jboss.portal.cms.model.Content; +import org.jboss.portal.cms.model.File; +import org.jboss.portal.common.junit.ExtendedAssert; +import org.jboss.portal.server.AbstractServerURL; +import org.jboss.portal.server.ServerInvocation; +import org.jboss.portal.test.framework.driver.DriverResponse; import org.jboss.portal.test.framework.driver.http.response.InvokeGetRespo= nse; import org.jboss.portal.test.framework.driver.remote.TestContext; -import org.jboss.portal.test.framework.server.NodeId; -import org.jboss.portal.test.framework.driver.DriverResponse; -import org.jboss.portal.test.framework.driver.response.FailureResponse; import org.jboss.portal.test.framework.driver.response.EndTestResponse; import org.jboss.portal.test.framework.driver.response.ErrorResponse; -import org.jboss.portal.common.junit.ExtendedAssert; -import org.jboss.portal.server.ServerInvocation; -import org.jboss.portal.server.AbstractServerURL; -import org.jboss.portal.cms.CMS; -import org.jboss.portal.cms.Command; -import org.jboss.portal.cms.impl.FileImpl; -import org.jboss.portal.cms.impl.ContentImpl; -import org.jboss.portal.cms.model.File; -import org.jboss.portal.cms.model.Content; +import org.jboss.portal.test.framework.driver.response.FailureResponse; +import org.jboss.portal.test.framework.server.NodeId; +import org.jboss.portal.test.framework.server.driver.AbstractTest; = +import java.net.MalformedURLException; import java.util.Locale; -import java.net.MalformedURLException; = /** * @author Julien Viet Property changes on: branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jbos= s/portal/test/cms/clustering/FileDeleteTest.java ___________________________________________________________________ Name: svn:keywords + = Modified: branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/te= st/cms/clustering/FileUpdateTest.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/test/cms= /clustering/FileUpdateTest.java 2007-10-27 23:01:46 UTC (rev 8784) +++ branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/test/cms= /clustering/FileUpdateTest.java 2007-10-28 01:09:21 UTC (rev 8785) @@ -22,26 +22,26 @@ *************************************************************************= *****/ package org.jboss.portal.test.cms.clustering; = +import org.jboss.portal.cms.CMS; import org.jboss.portal.cms.Command; -import org.jboss.portal.cms.CMS; import org.jboss.portal.cms.impl.ContentImpl; import org.jboss.portal.cms.impl.FileImpl; import org.jboss.portal.cms.model.Content; import org.jboss.portal.cms.model.File; -import org.jboss.portal.test.framework.driver.response.EndTestResponse; -import org.jboss.portal.test.framework.driver.response.FailureResponse; -import org.jboss.portal.test.framework.driver.response.ErrorResponse; +import org.jboss.portal.common.junit.ExtendedAssert; +import org.jboss.portal.server.AbstractServerURL; +import org.jboss.portal.server.ServerInvocation; import org.jboss.portal.test.framework.driver.DriverResponse; -import org.jboss.portal.common.junit.ExtendedAssert; -import org.jboss.portal.test.framework.server.driver.AbstractTest; import org.jboss.portal.test.framework.driver.http.response.InvokeGetRespo= nse; import org.jboss.portal.test.framework.driver.remote.TestContext; +import org.jboss.portal.test.framework.driver.response.EndTestResponse; +import org.jboss.portal.test.framework.driver.response.ErrorResponse; +import org.jboss.portal.test.framework.driver.response.FailureResponse; import org.jboss.portal.test.framework.server.NodeId; -import org.jboss.portal.server.ServerInvocation; -import org.jboss.portal.server.AbstractServerURL; +import org.jboss.portal.test.framework.server.driver.AbstractTest; = +import java.net.MalformedURLException; import java.util.Locale; -import java.net.MalformedURLException; = /** * @author Julien Viet Property changes on: branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jbos= s/portal/test/cms/clustering/FileUpdateTest.java ___________________________________________________________________ Name: svn:keywords + = Property changes on: branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jbos= s/portal/test/cms/commands/AbstractCommandTestCase.java ___________________________________________________________________ Name: svn:keywords + = Modified: branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/te= st/cms/commands/CMSInterceptorStackFactory.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/test/cms= /commands/CMSInterceptorStackFactory.java 2007-10-27 23:01:46 UTC (rev 8784) +++ branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/test/cms= /commands/CMSInterceptorStackFactory.java 2007-10-28 01:09:21 UTC (rev 8785) @@ -21,20 +21,20 @@ */ package org.jboss.portal.test.cms.commands; = +import org.jboss.portal.common.invocation.InterceptorStack; import org.jboss.portal.server.impl.invocation.JBossInterceptorStackFactor= y; -import org.jboss.portal.common.invocation.InterceptorStack; = public class CMSInterceptorStackFactory extends JBossInterceptorStackFacto= ry { = - public CMSInterceptorStackFactory() = - { - super(); - } - = - public void setInterceptorStack(InterceptorStack stack) - { - this.stack =3D stack; - } + public CMSInterceptorStackFactory() + { + super(); + } = + public void setInterceptorStack(InterceptorStack stack) + { + this.stack =3D stack; + } + } Property changes on: branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jbos= s/portal/test/cms/commands/CMSInterceptorStackFactory.java ___________________________________________________________________ Name: svn:keywords + = Modified: branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/te= st/cms/commands/TestFileArchiveUpload.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/test/cms= /commands/TestFileArchiveUpload.java 2007-10-27 23:01:46 UTC (rev 8784) +++ branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/test/cms= /commands/TestFileArchiveUpload.java 2007-10-28 01:09:21 UTC (rev 8785) @@ -54,7 +54,7 @@ String sJPG =3D "/hibernate_logo.gif"; = String sText =3D "/training.txt"; - = + String foreignArchive =3D "resources/test/jcr/prueba.zip"; = = @@ -108,12 +108,12 @@ Folder whopper3 =3D (Folder)service.execute(listCMD3); List folders3 =3D whopper3.getFolders(); List files3 =3D whopper3.getFiles(); - = + //Create and Test an archive containing foreign files is =3D IOTools.safeBufferedWrapper(new FileInputStream(this.foreignA= rchive)); storearchiveCMD =3D service.getCommandFactory().createStoreArchiveCo= mmand("", is, "en"); contentsToVersion =3D (List)service.execute(storearchiveCMD); - assertTrue("Foreign Archive Creation Failed",(contentsToVersion !=3D= null && !contentsToVersion.isEmpty() && contentsToVersion.size() =3D=3D 2)= ); = + assertTrue("Foreign Archive Creation Failed", (contentsToVersion != =3D null && !contentsToVersion.isEmpty() && contentsToVersion.size() =3D=3D= 2)); is.close(); } } Property changes on: branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jbos= s/portal/test/cms/commands/TestFileArchiveUpload.java ___________________________________________________________________ Name: svn:keywords + = Modified: branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/te= st/cms/commands/TestFileCopy.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/test/cms= /commands/TestFileCopy.java 2007-10-27 23:01:46 UTC (rev 8784) +++ branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/test/cms= /commands/TestFileCopy.java 2007-10-28 01:09:21 UTC (rev 8785) @@ -31,7 +31,6 @@ import org.jboss.portal.cms.model.File; = import java.util.Locale; -import java.util.Map; = = /** Property changes on: branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jbos= s/portal/test/cms/commands/TestFileCopy.java ___________________________________________________________________ Name: svn:keywords + = Modified: branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/te= st/cms/commands/TestFileCreate.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/test/cms= /commands/TestFileCreate.java 2007-10-27 23:01:46 UTC (rev 8784) +++ branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/test/cms= /commands/TestFileCreate.java 2007-10-28 01:09:21 UTC (rev 8785) @@ -34,7 +34,6 @@ import javax.jcr.Node; import javax.jcr.Session; import java.util.Locale; -import java.util.Map; = = /** Property changes on: branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jbos= s/portal/test/cms/commands/TestFileCreate.java ___________________________________________________________________ Name: svn:keywords + = Modified: branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/te= st/cms/commands/TestFileCreateFailed.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/test/cms= /commands/TestFileCreateFailed.java 2007-10-27 23:01:46 UTC (rev 8784) +++ branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/test/cms= /commands/TestFileCreateFailed.java 2007-10-28 01:09:21 UTC (rev 8785) @@ -37,7 +37,6 @@ import javax.jcr.Node; import javax.jcr.Session; import java.util.Locale; -import java.util.Map; = = /** Property changes on: branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jbos= s/portal/test/cms/commands/TestFileCreateFailed.java ___________________________________________________________________ Name: svn:keywords + = Modified: branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/te= st/cms/commands/TestFileDelete.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/test/cms= /commands/TestFileDelete.java 2007-10-27 23:01:46 UTC (rev 8784) +++ branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/test/cms= /commands/TestFileDelete.java 2007-10-28 01:09:21 UTC (rev 8785) @@ -33,7 +33,6 @@ = import javax.jcr.Session; import java.util.Locale; -import java.util.Map; = = /** Property changes on: branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jbos= s/portal/test/cms/commands/TestFileDelete.java ___________________________________________________________________ Name: svn:keywords + = Modified: branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/te= st/cms/commands/TestFileGet.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/test/cms= /commands/TestFileGet.java 2007-10-27 23:01:46 UTC (rev 8784) +++ branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/test/cms= /commands/TestFileGet.java 2007-10-28 01:09:21 UTC (rev 8785) @@ -31,7 +31,6 @@ import org.jboss.portal.cms.model.File; = import java.util.Locale; -import java.util.Map; = = /** Property changes on: branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jbos= s/portal/test/cms/commands/TestFileGet.java ___________________________________________________________________ Name: svn:keywords + = Modified: branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/te= st/cms/commands/TestFileGetList.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/test/cms= /commands/TestFileGetList.java 2007-10-27 23:01:46 UTC (rev 8784) +++ branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/test/cms= /commands/TestFileGetList.java 2007-10-28 01:09:21 UTC (rev 8785) @@ -32,7 +32,6 @@ = import java.util.List; import java.util.Locale; -import java.util.Map; = = /** Property changes on: branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jbos= s/portal/test/cms/commands/TestFileGetList.java ___________________________________________________________________ Name: svn:keywords + = Modified: branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/te= st/cms/commands/TestFileGetVersion.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/test/cms= /commands/TestFileGetVersion.java 2007-10-27 23:01:46 UTC (rev 8784) +++ branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/test/cms= /commands/TestFileGetVersion.java 2007-10-28 01:09:21 UTC (rev 8785) @@ -75,29 +75,29 @@ public void testFileGetVersion() throws CMSException { createFile(); - = + // get specific file version Command getCMDV =3D service.getCommandFactory().createFileGetCommand= (sFilePath, "1.0", Locale.ENGLISH); File Vnewfile =3D (File)service.execute(getCMDV); assertTrue("Incorrect version number for file object", Vnewfile.getC= ontent().getVersionNumber().equals("1.0")); - = + //Update this file and create a new version that goes "LIVE" this.updateFile(Vnewfile); - = + //Make sure a new version 1.1 is created and thats the one that is "= LIVE" getCMDV =3D service.getCommandFactory().createFileGetCommand(sFilePa= th, Locale.ENGLISH); Vnewfile =3D (File)service.execute(getCMDV); assertTrue("Incorrect version number for file object", Vnewfile.getC= ontent().getVersionNumber().equals("1.1")); - = + //Now switch to 1.0 as being the "LIVE" version Command makeLiveCommand =3D service.getCommandFactory().createMakeLi= veVersionCommand(sFilePath, Locale.ENGLISH.getLanguage(), "1.0"); String liveVersion =3D (String)service.execute(makeLiveCommand); - assertEquals("Incorrect version number is 'LIVE'",liveVersion,"1.0"); - = + assertEquals("Incorrect version number is 'LIVE'", liveVersion, "1.0= "); + //Verify that 1.0 is the "LIVE" version and not 1.1 getCMDV =3D service.getCommandFactory().createFileGetCommand(sFilePa= th, Locale.ENGLISH); Vnewfile =3D (File)service.execute(getCMDV); - assertEquals("Incorrect version number for file object ("+liveVersio= n+")", Vnewfile.getContent().getVersionNumber(), liveVersion); + assertEquals("Incorrect version number for file object (" + liveVers= ion + ")", Vnewfile.getContent().getVersionNumber(), liveVersion); } = /** @@ -135,11 +135,8 @@ Command newFileSPCMD =3D service.getCommandFactory().createNewFileCo= mmand(file, contentSP); service.execute(newFileSPCMD); } - = - /** - * = - * @throws CMSException - */ + + /** @throws CMSException */ private void updateFile(File updatedFile) throws CMSException { Command updateFileCMD =3D service.getCommandFactory().createUpdateFi= leCommand(updatedFile, updatedFile.getContent(), true); Property changes on: branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jbos= s/portal/test/cms/commands/TestFileGetVersion.java ___________________________________________________________________ Name: svn:keywords + = Modified: branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/te= st/cms/commands/TestFileUpdate.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/test/cms= /commands/TestFileUpdate.java 2007-10-27 23:01:46 UTC (rev 8784) +++ branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/test/cms= /commands/TestFileUpdate.java 2007-10-28 01:09:21 UTC (rev 8785) @@ -36,7 +36,6 @@ import javax.jcr.Property; import javax.jcr.Session; import java.util.Locale; -import java.util.Map; = = /** Property changes on: branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jbos= s/portal/test/cms/commands/TestFileUpdate.java ___________________________________________________________________ Name: svn:keywords + = Modified: branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/te= st/cms/commands/TestFolderCopy.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/test/cms= /commands/TestFolderCopy.java 2007-10-27 23:01:46 UTC (rev 8784) +++ branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/test/cms= /commands/TestFolderCopy.java 2007-10-28 01:09:21 UTC (rev 8785) @@ -33,7 +33,6 @@ = import java.util.Date; import java.util.Locale; -import java.util.Map; = = /** Property changes on: branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jbos= s/portal/test/cms/commands/TestFolderCopy.java ___________________________________________________________________ Name: svn:keywords + = Modified: branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/te= st/cms/commands/TestFolderCreate.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/test/cms= /commands/TestFolderCreate.java 2007-10-27 23:01:46 UTC (rev 8784) +++ branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/test/cms= /commands/TestFolderCreate.java 2007-10-28 01:09:21 UTC (rev 8785) @@ -32,7 +32,6 @@ import javax.jcr.Property; import javax.jcr.Session; import java.util.Date; -import java.util.Map; = = /** Property changes on: branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jbos= s/portal/test/cms/commands/TestFolderCreate.java ___________________________________________________________________ Name: svn:keywords + = Modified: branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/te= st/cms/commands/TestFolderDelete.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/test/cms= /commands/TestFolderDelete.java 2007-10-27 23:01:46 UTC (rev 8784) +++ branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/test/cms= /commands/TestFolderDelete.java 2007-10-28 01:09:21 UTC (rev 8785) @@ -27,7 +27,6 @@ import org.jboss.portal.cms.util.RepositoryUtil; = import javax.jcr.Session; -import java.util.Map; = = /** Property changes on: branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jbos= s/portal/test/cms/commands/TestFolderDelete.java ___________________________________________________________________ Name: svn:keywords + = Modified: branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/te= st/cms/commands/TestFolderGet.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/test/cms= /commands/TestFolderGet.java 2007-10-27 23:01:46 UTC (rev 8784) +++ branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/test/cms= /commands/TestFolderGet.java 2007-10-28 01:09:21 UTC (rev 8785) @@ -29,7 +29,6 @@ import org.jboss.portal.cms.model.Folder; = import java.util.Date; -import java.util.Map; = /** * @author Roy Russo Property changes on: branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jbos= s/portal/test/cms/commands/TestFolderGet.java ___________________________________________________________________ Name: svn:keywords + = Modified: branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/te= st/cms/commands/TestFolderUpdate.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/test/cms= /commands/TestFolderUpdate.java 2007-10-27 23:01:46 UTC (rev 8784) +++ branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/test/cms= /commands/TestFolderUpdate.java 2007-10-28 01:09:21 UTC (rev 8785) @@ -32,7 +32,6 @@ import javax.jcr.Property; import javax.jcr.Session; import java.util.Date; -import java.util.Map; = /** * @author Roy Russo Property changes on: branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jbos= s/portal/test/cms/commands/TestFolderUpdate.java ___________________________________________________________________ Name: svn:keywords + = Modified: branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/te= st/cms/commands/TestSearch.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/test/cms= /commands/TestSearch.java 2007-10-27 23:01:46 UTC (rev 8784) +++ branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/test/cms= /commands/TestSearch.java 2007-10-28 01:09:21 UTC (rev 8785) @@ -22,22 +22,18 @@ *************************************************************************= *****/ package org.jboss.portal.test.cms.commands; = -import java.util.List; - import junit.framework.TestSuite; - import org.jboss.portal.cms.CMSException; import org.jboss.portal.cms.Command; import org.jboss.portal.cms.model.File; import org.jboss.portal.search.FederatedQuery; -import org.jboss.portal.search.Query; import org.jboss.portal.search.impl.jcr.JCRQuery; import org.jboss.portal.search.impl.jcr.JCRQueryConverter; = +import java.util.List; = -/** - * @author Thomas Heute - */ + +/** @author Thomas Heute */ public class TestSearch extends AbstractCommandTestCase { = @@ -54,9 +50,9 @@ public void testFileGet() throws CMSException { FederatedQuery query =3D new FederatedQuery("risks"); - = + JCRQueryConverter converter =3D new JCRQueryConverter(); - = + Command searchCMD =3D service.getCommandFactory().createSearchComman= d((JCRQuery)converter.convert(query)); List list =3D (List)service.execute(searchCMD); = Property changes on: branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jbos= s/portal/test/cms/commands/TestSearch.java ___________________________________________________________________ Name: svn:keywords + = Property changes on: branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jbos= s/portal/test/cms/mock/RuntimeExceptionCommand.java ___________________________________________________________________ Name: svn:keywords - Author Date Id Revision + = Modified: branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/te= st/cms/security/IdentityDataLoader.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/test/cms= /security/IdentityDataLoader.java 2007-10-27 23:01:46 UTC (rev 8784) +++ branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/test/cms= /security/IdentityDataLoader.java 2007-10-28 01:09:21 UTC (rev 8785) @@ -22,7 +22,6 @@ *************************************************************************= *****/ package org.jboss.portal.test.cms.security; = -import javax.naming.InitialContext; import org.hibernate.Session; import org.hibernate.SessionFactory; import org.hibernate.Transaction; @@ -32,94 +31,84 @@ import org.jboss.portal.identity.db.HibernateRoleImpl; import org.jboss.portal.identity.db.HibernateUserImpl; = -/** - * @author Sohil Shah - * - */ +import javax.naming.InitialContext; + +/** @author Sohil Shah */ public class IdentityDataLoader { /** - * = + * */ private IdentityServiceController identityServiceController =3D null; - = + /** - * = + * */ private String identitySessionFactory =3D null; - = - /** - * = - * @return - */ + + /** @return */ public IdentityServiceController getIdentityServiceController() { return this.identityServiceController; } - = + public void setIdentityServiceController(IdentityServiceController iden= tityServiceController) { this.identityServiceController =3D identityServiceController; } - = - /** - * = - * @return - */ = + + /** @return */ public String getIdentitySessionFactory() { return identitySessionFactory; } = - /** - * = - * @param identitySessionFactory - */ + /** @param identitySessionFactory */ public void setIdentitySessionFactory(String identitySessionFactory) { this.identitySessionFactory =3D identitySessionFactory; } = /** - * = * + * */ public IdentityDataLoader() { - = + } - = + /** - * = * + * */ public void start() throws Exception { SessionFactory sessionFactory =3D (SessionFactory)new InitialContext= ().lookup(this.identitySessionFactory); - this.loadData(sessionFactory,this.identityServiceController); + this.loadData(sessionFactory, this.identityServiceController); } - = + /** - * = + * */ public void stop() throws Exception { } - = + /** - * = * + * */ - private void loadData(SessionFactory sessionFactory,IdentityServiceCont= roller service) throws Exception + private void loadData(SessionFactory sessionFactory, IdentityServiceCon= troller service) throws Exception { UserModule userModule =3D (UserModule)service.getIdentityContext().g= etObject(IdentityContext.TYPE_USER_MODULE); - = + Session session =3D sessionFactory.openSession(); Transaction tx =3D session.beginTransaction(); boolean success =3D false; try { - if(userModule.getUserCount()=3D=3D0) + if (userModule.getUserCount() =3D=3D 0) { // HibernateRoleImpl adminRole =3D new HibernateRoleImpl("Admin",= "Administrators"); @@ -146,7 +135,7 @@ // user.getRoles().add(userRole); userRole.getUsers().add(user); - = + //Another admin user besides the core admin user HibernateUserImpl sysAdmin =3D new HibernateUserImpl("sysadmin= "); sysAdmin.setPassword(org.jboss.portal.common.util.Tools.md5AsH= exString("sysadmin")); @@ -165,15 +154,15 @@ session.save(admin); session.save(user); session.save(sysAdmin); - = + success =3D true; } } finally { - if(tx !=3D null) + if (tx !=3D null) { - if(success) + if (success) { tx.commit(); } @@ -182,10 +171,10 @@ tx.rollback(); } } - if(session !=3D null) + if (session !=3D null) { session.close(); } - } = + } } } Property changes on: branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jbos= s/portal/test/cms/security/IdentityDataLoader.java ___________________________________________________________________ Name: svn:keywords + = Modified: branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/te= st/cms/security/SecureCommandTestCase.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/test/cms= /security/SecureCommandTestCase.java 2007-10-27 23:01:46 UTC (rev 8784) +++ branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/test/cms= /security/SecureCommandTestCase.java 2007-10-28 01:09:21 UTC (rev 8785) @@ -21,8 +21,6 @@ */ package org.jboss.portal.test.cms.security; = -import javax.naming.InitialContext; - import org.hibernate.Session; import org.hibernate.SessionFactory; import org.hibernate.Transaction; @@ -32,19 +30,16 @@ import org.jboss.portal.common.invocation.Interceptor; import org.jboss.portal.identity.IdentityServiceController; import org.jboss.portal.server.impl.invocation.JBossInterceptorStack; - import org.jboss.portal.test.cms.commands.AbstractCommandTestCase; import org.jboss.portal.test.cms.commands.CMSInterceptorStackFactory; = -/** - * = - * @author Sohil Shah - sohil.shah(a)jboss.com - Nov 30, 2006 - * = - */ +import javax.naming.InitialContext; + +/** @author Sohil Shah - sohil.shah(a)jboss.com - Nov 30, 2006 */ public abstract class SecureCommandTestCase extends AbstractCommandTestCase -{ = +{ /** - * = + * */ public SecureCommandTestCase() { @@ -52,16 +47,16 @@ } = /** - * = + * */ public void setUp() throws Exception { //override the configration location to include workflow services this.configuration =3D "org/jboss/portal/cms/jboss-beans-security.xm= l"; super.setUp(); - = + ACLInterceptor aclInterceptor =3D this.getACLInterceptor(); - = + //Setup the interceptor stack CMSInterceptorStackFactory stackFactory =3D new CMSInterceptorStackF= actory(); Interceptor[] interceptors =3D new Interceptor[1]; @@ -70,38 +65,32 @@ stackFactory.setInterceptorStack(stack); = this.service.setStackFactory(stackFactory); - = + //Register the IdentityService with the JCR service IdentityServiceController identityService =3D ((AuthorizationProvide= rImpl)aclInterceptor.getAuthorizationManager().getProvider()). - getIdentityServiceController(); - this.service.setIdentityServiceController(identityService); = = + getIdentityServiceController(); + this.service.setIdentityServiceController(identityService); } - = + /** - * = + * */ public void tearDown() throws Exception - { = + { super.tearDown(); } - = = - /** - * = - * @return - */ + + /** @return */ protected ACLInterceptor getACLInterceptor() throws Exception - { = + { ACLInterceptor aclInterceptor =3D (ACLInterceptor)new InitialContext= ().lookup("java:/portal/cms/ACLInterceptor"); return aclInterceptor; - } = - = - /** - * = - * @param username - */ + } + + /** @param username */ protected void runAs(String username) throws Exception - { = + { SessionFactory sessionFactory =3D (SessionFactory)new InitialContext= ().lookup("java:/SessionFactory"); Session session =3D sessionFactory.openSession(); Transaction tx =3D session.beginTransaction(); Property changes on: branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jbos= s/portal/test/cms/security/SecureCommandTestCase.java ___________________________________________________________________ Name: svn:keywords + = Modified: branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/te= st/cms/security/TestManageAccess.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/test/cms= /security/TestManageAccess.java 2007-10-27 23:01:46 UTC (rev 8784) +++ branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/test/cms= /security/TestManageAccess.java 2007-10-28 01:09:21 UTC (rev 8785) @@ -25,46 +25,38 @@ import junit.framework.TestSuite; import org.jboss.portal.cms.CMSException; import org.jboss.portal.cms.Command; -import org.jboss.portal.cms.model.Folder; import org.jboss.portal.cms.impl.FolderImpl; +import org.jboss.portal.cms.model.Folder; = - import java.util.Date; = -/** - * = - * @author Sohil Shah - sohil.shah(a)jboss.com - Nov 30, 2006 - * = - */ +/** @author Sohil Shah - sohil.shah(a)jboss.com - Nov 30, 2006 */ public class TestManageAccess extends SecureCommandTestCase { String rejectPath =3D "/default/private"; String allowedPath =3D "/default/images"; String supportPath =3D "/default/support.html"; String copyPath =3D "/support.html"; - = = + /** - * = - * = + * + * */ public TestManageAccess() { } = /** - * = - * = + * + * */ public static TestSuite suite() throws Exception { return createTestSuite(TestManageAccess.class); } - = - /** - * = - * @return - */ + + /** @return */ private Folder getNewPublicFolder() { //create folder object @@ -75,14 +67,11 @@ folder.setLastModified(new Date()); folder.setName("images"); folder.setBasePath(this.allowedPath); - = + return folder; } - = - /** - * = - * @return - */ + + /** @return */ private Folder getNewProtectedFolder() { //create folder object @@ -93,23 +82,23 @@ folder.setLastModified(new Date()); folder.setName("private"); folder.setBasePath(this.rejectPath); - = + return folder; } - = - = + + /** - * = * + * */ private void runManageScenario(Folder folder) throws CMSException - { = + { //Copy the specified folder String copySrc =3D folder.getBasePath(); String copyDest =3D folder.getBasePath() + "/" + "copy"; - Command copyCommand =3D this.service.getCommandFactory().createCopyC= ommand(copySrc,copyDest); + Command copyCommand =3D this.service.getCommandFactory().createCopyC= ommand(copySrc, copyDest); this.service.execute(copyCommand); - = + //Assert the copy execution Command get =3D this.service.getCommandFactory().createFolderGetComm= and(copySrc); Folder copyFrom =3D (Folder)this.service.execute(get); @@ -117,13 +106,13 @@ Folder copyTo =3D (Folder)this.service.execute(get); assertNotNull(copyFrom); assertNotNull(copyTo); - = + //Move a folder String moveSrc =3D copyDest; String moveDest =3D folder.getBasePath() + "/" + "move"; - Command moveCommand =3D this.service.getCommandFactory().createMoveC= ommand(moveSrc,moveDest); + Command moveCommand =3D this.service.getCommandFactory().createMoveC= ommand(moveSrc, moveDest); this.service.execute(moveCommand); - = + //Assert the move execution get =3D this.service.getCommandFactory().createFolderGetCommand(move= Src); Folder moveFrom =3D (Folder)this.service.execute(get); @@ -131,30 +120,27 @@ Folder moveTo =3D (Folder)this.service.execute(get); assertNull(moveFrom); assertNotNull(moveTo); - = + //Delete the folder - String delete =3D moveDest; = + String delete =3D moveDest; Command deleteCommand =3D this.service.getCommandFactory().createDel= eteCommand(delete); this.service.execute(deleteCommand); - = + //Assert delete execution get =3D this.service.getCommandFactory().createFolderGetCommand(dele= te); - Folder deletedFolder =3D (Folder)this.service.execute(get); = + Folder deletedFolder =3D (Folder)this.service.execute(get); assertNull(deletedFolder); } - = - /** - * = - * @throws Exception - */ + + /** @throws Exception */ public void testAnonymous() throws Exception - { = + { // first run against non-access scenario try { this.runManageScenario(this.getNewProtectedFolder()); assertTrue("Access should not have been granted to" + this.reject= Path, - false); + false); } catch (CMSException cme) { @@ -168,8 +154,8 @@ try { this.runManageScenario(this.getNewPublicFolder()); - assertTrue("Access should not have been granted to" + this.reject= Path, = - false); + assertTrue("Access should not have been granted to" + this.reject= Path, + false); } catch (CMSException cme) { @@ -179,20 +165,17 @@ } } = - /** - * = - * @throws Exception - */ + /** @throws Exception */ public void testUser() throws Exception { this.runAs("user"); - = + // first run against non-access scenario try { this.runManageScenario(this.getNewProtectedFolder()); assertTrue("Access should not have been granted to" + this.reject= Path, - false); + false); } catch (CMSException cme) { @@ -205,7 +188,7 @@ //for anonymous, this should still result in an access denied try { - this.runManageScenario(this.getNewPublicFolder()); = + this.runManageScenario(this.getNewPublicFolder()); } catch (CMSException cme) { @@ -214,15 +197,12 @@ assertTrue(cmeMessage.indexOf("Access to this resource is denied"= ) !=3D -1); } } - = - /** - * = - * @throws Exception - */ + + /** @throws Exception */ public void testAdmin() throws Exception { this.runAs("admin"); - = + // first run against non-access scenario try { @@ -248,34 +228,31 @@ assertTrue(cmeMessage.indexOf("Access to this resource is denied"= ) =3D=3D -1); } } - = - /** - * = - * @throws Exception - */ + + /** @throws Exception */ public void testCopyToDeniedDestination() throws Exception { this.runAs("user"); - = + //Copy the file to the folder try { - Command copyCommand =3D this.service.getCommandFactory().createCo= pyCommand(this.supportPath,this.copyPath); + Command copyCommand =3D this.service.getCommandFactory().createCo= pyCommand(this.supportPath, this.copyPath); this.service.execute(copyCommand); - = + //Make sure copy operation did not happen //I should not get here assertTrue(false); } - catch(CMSException cme) + catch (CMSException cme) { String cmeMessage =3D cme.toString(); - if(cmeMessage.indexOf("Access to this resource is denied") !=3D -= 1) + if (cmeMessage.indexOf("Access to this resource is denied") !=3D = -1) { //Make sure copy operation did not happen Command exists =3D (Command)this.service.getCommandFactory().c= reateItemExistsCommand(this.copyPath); boolean existsValue =3D ((Boolean)this.service.execute(exists)= ).booleanValue(); - assertFalse(existsValue); = + assertFalse(existsValue); } else { @@ -283,35 +260,32 @@ } } } - = - /** - * = - * @throws Exception - */ + + /** @throws Exception */ public void testMoveToDeniedDestination() throws Exception { this.runAs("user"); - = + //Move the file from the folder try { - Command moveCommand =3D this.service.getCommandFactory().createMo= veCommand(this.supportPath,this.copyPath); + Command moveCommand =3D this.service.getCommandFactory().createMo= veCommand(this.supportPath, this.copyPath); this.service.execute(moveCommand); - = + //Make sure copy operation did not happen //I should not get here assertTrue(false); } - catch(CMSException cme) + catch (CMSException cme) { String cmeMessage =3D cme.toString(); - if(cmeMessage.indexOf("Access to this resource is denied") !=3D -= 1) + if (cmeMessage.indexOf("Access to this resource is denied") !=3D = -1) { //Make sure move operation didnot happen Command exists =3D (Command)this.service.getCommandFactory().c= reateItemExistsCommand(this.copyPath); boolean existsValue =3D ((Boolean)this.service.execute(exists)= ).booleanValue(); assertFalse(existsValue); - = + exists =3D (Command)this.service.getCommandFactory().createIte= mExistsCommand(this.supportPath); existsValue =3D ((Boolean)this.service.execute(exists)).boolea= nValue(); assertTrue(existsValue); Property changes on: branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jbos= s/portal/test/cms/security/TestManageAccess.java ___________________________________________________________________ Name: svn:keywords + = Modified: branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/te= st/cms/security/TestReadAccess.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/test/cms= /security/TestReadAccess.java 2007-10-27 23:01:46 UTC (rev 8784) +++ branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/test/cms= /security/TestReadAccess.java 2007-10-28 01:09:21 UTC (rev 8785) @@ -22,20 +22,16 @@ *************************************************************************= *****/ package org.jboss.portal.test.cms.security; = -import java.util.List; import junit.framework.TestSuite; import org.jboss.portal.cms.CMSException; import org.jboss.portal.cms.Command; -import org.jboss.portal.cms.model.Folder; import org.jboss.portal.cms.model.File; +import org.jboss.portal.cms.model.Folder; = +import java.util.List; import java.util.Locale; = -/** - * = - * @author Sohil Shah - sohil.shah(a)jboss.com - Nov 30, 2006 - * = - */ +/** @author Sohil Shah - sohil.shah(a)jboss.com - Nov 30, 2006 */ public class TestReadAccess extends SecureCommandTestCase { String rejectFolderPath =3D "/default/private"; @@ -44,45 +40,44 @@ String allowedFilePath =3D "/default/images/check.gif"; = /** - * = - * = + * + * */ public TestReadAccess() { } = /** - * = - * = + * + * */ public static TestSuite suite() throws Exception { return createTestSuite(TestReadAccess.class); } - = - = + + /** - * = * + * */ private void runFileScenario(String filePath) throws CMSException - { = + { //Get the specified file - Command get =3D this.service.getCommandFactory().createFileGetComman= d(filePath,new Locale(this.service.getDefaultLocale())); + Command get =3D this.service.getCommandFactory().createFileGetComman= d(filePath, new Locale(this.service.getDefaultLocale())); File file =3D (File)this.service.execute(get); assertNotNull(file); - assertEquals(file.getBasePath(),filePath); - = + assertEquals(file.getBasePath(), filePath); + //Get a list of file versions get =3D this.service.getCommandFactory() - .createFileGetListCommand(filePath); + .createFileGetListCommand(filePath); List versions =3D (List)this.service.execute(get); assertNotNull(versions); - assertTrue(versions.size()>0); + assertTrue(versions.size() > 0); } - = + /** - * = * @param folderPath * @throws CMSException */ @@ -92,27 +87,24 @@ Command get =3D this.service.getCommandFactory().createFolderGetComm= and(folderPath); Folder folder =3D (Folder)this.service.execute(get); assertNotNull(folder); - assertEquals(folder.getBasePath(),folderPath); - = + assertEquals(folder.getBasePath(), folderPath); + //Get the specified folder list get =3D this.service.getCommandFactory().createFolderGetListCommand(= folderPath); Folder folderList =3D (Folder)this.service.execute(get); assertNotNull(folderList); - assertTrue(folderList.getFolders()!=3Dnull || folderList.getFiles()!= =3Dnull); + assertTrue(folderList.getFolders() !=3D null || folderList.getFiles(= ) !=3D null); } - = = - /** - * = - * @throws Exception - */ + + /** @throws Exception */ public void testAnonymous() throws Exception - { = + { try { - this.runFileScenario(this.rejectFilePath); = + this.runFileScenario(this.rejectFilePath); assertTrue("Access should not have been granted to" + this.reject= FilePath, - false); = + false); } catch (CMSException cme) { @@ -120,12 +112,12 @@ String cmeMessage =3D cme.toString(); assertTrue(cmeMessage.indexOf("Access to this resource is denied"= ) !=3D -1); } - = + try { - this.runFolderScenario(this.rejectFolderPath); = + this.runFolderScenario(this.rejectFolderPath); assertTrue("Access should not have been granted to" + this.reject= FolderPath, - false); = + false); } catch (CMSException cme) { @@ -136,7 +128,7 @@ = try { - this.runFileScenario(this.allowedFilePath); = = + this.runFileScenario(this.allowedFilePath); } catch (CMSException cme) { @@ -144,10 +136,10 @@ String cmeMessage =3D cme.toString(); assertTrue(cmeMessage.indexOf("Access to this resource is denied"= ) =3D=3D -1); } - = + try { - this.runFolderScenario(this.allowedFolderPath); = = + this.runFolderScenario(this.allowedFolderPath); } catch (CMSException cme) { @@ -157,19 +149,16 @@ } } = - /** - * = - * @throws Exception - */ + /** @throws Exception */ public void testUser() throws Exception - { = + { this.runAs("user"); - = + try { - this.runFileScenario(this.rejectFilePath); = + this.runFileScenario(this.rejectFilePath); assertTrue("Access should not have been granted to" + this.reject= FilePath, - false); = + false); } catch (CMSException cme) { @@ -177,12 +166,12 @@ String cmeMessage =3D cme.toString(); assertTrue(cmeMessage.indexOf("Access to this resource is denied"= ) !=3D -1); } - = + try { - this.runFolderScenario(this.rejectFolderPath); = + this.runFolderScenario(this.rejectFolderPath); assertTrue("Access should not have been granted to" + this.reject= FolderPath, - false); = + false); } catch (CMSException cme) { @@ -193,7 +182,7 @@ = try { - this.runFileScenario(this.allowedFilePath); = = + this.runFileScenario(this.allowedFilePath); } catch (CMSException cme) { @@ -201,10 +190,10 @@ String cmeMessage =3D cme.toString(); assertTrue(cmeMessage.indexOf("Access to this resource is denied"= ) =3D=3D -1); } - = + try { - this.runFolderScenario(this.allowedFolderPath); = = + this.runFolderScenario(this.allowedFolderPath); } catch (CMSException cme) { @@ -213,18 +202,15 @@ assertTrue(cmeMessage.indexOf("Access to this resource is denied"= ) =3D=3D -1); } } - = - /** - * = - * @throws Exception - */ + + /** @throws Exception */ public void testAdmin() throws Exception - { = + { this.runAs("admin"); - = + try { - this.runFileScenario(this.rejectFilePath); = + this.runFileScenario(this.rejectFilePath); } catch (CMSException cme) { @@ -232,10 +218,10 @@ String cmeMessage =3D cme.toString(); assertTrue(cmeMessage.indexOf("Access to this resource is denied"= ) =3D=3D -1); } - = + try { - this.runFolderScenario(this.rejectFolderPath); = + this.runFolderScenario(this.rejectFolderPath); } catch (CMSException cme) { @@ -246,7 +232,7 @@ = try { - this.runFileScenario(this.allowedFilePath); = = + this.runFileScenario(this.allowedFilePath); } catch (CMSException cme) { @@ -254,10 +240,10 @@ String cmeMessage =3D cme.toString(); assertTrue(cmeMessage.indexOf("Access to this resource is denied"= ) =3D=3D -1); } - = + try { - this.runFolderScenario(this.allowedFolderPath); = = + this.runFolderScenario(this.allowedFolderPath); } catch (CMSException cme) { Property changes on: branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jbos= s/portal/test/cms/security/TestReadAccess.java ___________________________________________________________________ Name: svn:keywords + = Modified: branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/te= st/cms/security/TestWriteAccess.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/test/cms= /security/TestWriteAccess.java 2007-10-27 23:01:46 UTC (rev 8784) +++ branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/test/cms= /security/TestWriteAccess.java 2007-10-28 01:09:21 UTC (rev 8785) @@ -22,25 +22,21 @@ *************************************************************************= *****/ package org.jboss.portal.test.cms.security; = -import java.util.List; import junit.framework.TestSuite; import org.jboss.portal.cms.CMSException; import org.jboss.portal.cms.Command; -import org.jboss.portal.cms.model.Folder; -import org.jboss.portal.cms.impl.FolderImpl; -import org.jboss.portal.cms.model.File; -import org.jboss.portal.cms.impl.FileImpl; import org.jboss.portal.cms.impl.ContentImpl; +import org.jboss.portal.cms.impl.FileImpl; +import org.jboss.portal.cms.impl.FolderImpl; import org.jboss.portal.cms.model.Content; +import org.jboss.portal.cms.model.File; +import org.jboss.portal.cms.model.Folder; = import java.util.Date; +import java.util.List; import java.util.Locale; = -/** - * = - * @author Sohil Shah - sohil.shah(a)jboss.com - Nov 30, 2006 - * = - */ +/** @author Sohil Shah - sohil.shah(a)jboss.com - Nov 30, 2006 */ public class TestWriteAccess extends SecureCommandTestCase { String rejectPath =3D "/default/private"; @@ -48,26 +44,23 @@ String rootFolderPath =3D "/"; = /** - * = - * = + * + * */ public TestWriteAccess() { } = /** - * = - * = + * + * */ public static TestSuite suite() throws Exception { return createTestSuite(TestWriteAccess.class); } - = - /** - * = - * @return - */ + + /** @return */ private Folder getNewPublicFolder() { //create folder object @@ -77,15 +70,12 @@ folder.setTitle("Folder Title"); folder.setLastModified(new Date()); folder.setName("Unit Test"); - folder.setBasePath(this.allowedPath+"/"+folder.getName()); - = + folder.setBasePath(this.allowedPath + "/" + folder.getName()); + return folder; } - = - /** - * = - * @return - */ + + /** @return */ private Folder getNewProtectedFolder() { //create folder object @@ -95,15 +85,12 @@ folder.setTitle("Folder Title"); folder.setLastModified(new Date()); folder.setName("Unit Test"); - folder.setBasePath(this.rejectPath+"/"+folder.getName()); - = + folder.setBasePath(this.rejectPath + "/" + folder.getName()); + return folder; } - = - /** - * = - * @return - */ + + /** @return */ private Folder getNewRootFolder() { //create folder object @@ -113,20 +100,19 @@ folder.setTitle("Folder Title"); folder.setLastModified(new Date()); folder.setName("Unit Test"); - folder.setBasePath(this.rootFolderPath+folder.getName()); - = + folder.setBasePath(this.rootFolderPath + folder.getName()); + return folder; } - = + /** - * = * @param folder * @return */ - private File getFile(Folder folder,String fileName,String data) + private File getFile(Folder folder, String fileName, String data) { File file =3D new FileImpl(); - file.setBasePath(folder.getBasePath()+"/"+fileName); + file.setBasePath(folder.getBasePath() + "/" + fileName); = Content content =3D new ContentImpl(); content.setEncoding("UTF-8"); @@ -136,90 +122,87 @@ content.setBytes(data.getBytes()); content.setMimeType("text/html"); file.setContent(Locale.ENGLISH, content); - = + return file; } - = + /** - * = * + * */ private void runWriteScenario(Folder folder) throws CMSException - { = + { //Create a new folder Command newFolder =3D this.service.getCommandFactory().createFolderS= aveCommand(folder); this.service.execute(newFolder); - = + //Assert the successfull creation of the folder Command get =3D service.getCommandFactory().createFolderGetCommand(f= older.getBasePath()); - Folder assertFolder =3D (Folder) service.execute(get); + Folder assertFolder =3D (Folder)service.execute(get); assertNotNull(assertFolder); - assertEquals(folder.getDescription(),assertFolder.getDescription()); - assertEquals(folder.getName(),assertFolder.getName()); - assertEquals(folder.getBasePath(),assertFolder.getBasePath()); - = + assertEquals(folder.getDescription(), assertFolder.getDescription()); + assertEquals(folder.getName(), assertFolder.getName()); + assertEquals(folder.getBasePath(), assertFolder.getBasePath()); + //Create a new file into the newly created folder - File file =3D this.getFile(assertFolder,"testFile.html","newdata"); - Command newFile =3D this.service.getCommandFactory().createNewFileCo= mmand(file,file.getContent()); + File file =3D this.getFile(assertFolder, "testFile.html", "newdata"); + Command newFile =3D this.service.getCommandFactory().createNewFileCo= mmand(file, file.getContent()); this.service.execute(newFile); - = + //Assert the creation of the new file - get =3D this.service.getCommandFactory().createFileGetCommand(file.g= etBasePath(),file.getContent().getLocale()); + get =3D this.service.getCommandFactory().createFileGetCommand(file.g= etBasePath(), file.getContent().getLocale()); File assertFile =3D (File)this.service.execute(get); assertNotNull(assertFile); - assertEquals(file.getBasePath(),assertFile.getBasePath()); - assertEquals(new String(file.getContent().getBytes()),new String(ass= ertFile.getContent().getBytes())); - = + assertEquals(file.getBasePath(), assertFile.getBasePath()); + assertEquals(new String(file.getContent().getBytes()), new String(as= sertFile.getContent().getBytes())); + //Update the newly created file file =3D assertFile; file.getContent().setBytes(new String("updateddata").getBytes()); - Command updateFile =3D this.service.getCommandFactory().createUpdate= FileCommand(file,file.getContent(),true); + Command updateFile =3D this.service.getCommandFactory().createUpdate= FileCommand(file, file.getContent(), true); this.service.execute(updateFile); - = + //Assert the updated file - get =3D this.service.getCommandFactory().createFileGetCommand(file.g= etBasePath(),file.getContent().getLocale()); + get =3D this.service.getCommandFactory().createFileGetCommand(file.g= etBasePath(), file.getContent().getLocale()); assertFile =3D (File)this.service.execute(get); assertNotNull(assertFile); - assertEquals(file.getBasePath(),assertFile.getBasePath()); - assertEquals(new String(file.getContent().getBytes()),new String(ass= ertFile.getContent().getBytes())); - = + assertEquals(file.getBasePath(), assertFile.getBasePath()); + assertEquals(new String(file.getContent().getBytes()), new String(as= sertFile.getContent().getBytes())); + //Get the versions of the file get =3D this.service.getCommandFactory().createContentGetVersionsCom= mand(file.getContent().getBasePath()); List before =3D (List)this.service.execute(get); - = + //Create a new version of this file - file =3D this.getFile(folder,"testFile.html","newversion"); + file =3D this.getFile(folder, "testFile.html", "newversion"); Command fileUpdate =3D this.service.getCommandFactory().createFileUp= dateCommand(file); - Command createNewVersion =3D this.service.getCommandFactory().create= ContentCreateNewVersionCommand(file.getContent(),true); + Command createNewVersion =3D this.service.getCommandFactory().create= ContentCreateNewVersionCommand(file.getContent(), true); this.service.execute(fileUpdate); this.service.execute(createNewVersion); - = + //Assert new version creation - get =3D this.service.getCommandFactory().createFileGetCommand(file.g= etBasePath(),file.getContent().getLocale()); + get =3D this.service.getCommandFactory().createFileGetCommand(file.g= etBasePath(), file.getContent().getLocale()); assertFile =3D (File)this.service.execute(get); assertNotNull(assertFile); - assertEquals(file.getBasePath(),assertFile.getBasePath()); - assertEquals(new String(file.getContent().getBytes()),new String(ass= ertFile.getContent().getBytes())); - = + assertEquals(file.getBasePath(), assertFile.getBasePath()); + assertEquals(new String(file.getContent().getBytes()), new String(as= sertFile.getContent().getBytes())); + //Assert number of versions after get =3D this.service.getCommandFactory().createContentGetVersionsCom= mand(file.getContent().getBasePath()); List after =3D (List)this.service.execute(get); - assertEquals(before.size()+1,after.size()); + assertEquals(before.size() + 1, after.size()); } - = = - /** - * = - * @throws Exception - */ + + /** @throws Exception */ public void testAnonymous() throws Exception - { = + { // first run against non-access scenario try { this.runWriteScenario(this.getNewProtectedFolder()); assertTrue("Access should not have been granted to" + this.reject= Path, - false); + false); } catch (CMSException cme) { @@ -233,8 +216,8 @@ try { this.runWriteScenario(this.getNewPublicFolder()); - assertTrue("Access should not have been granted to" + this.reject= Path, = - false); + assertTrue("Access should not have been granted to" + this.reject= Path, + false); } catch (CMSException cme) { @@ -244,20 +227,17 @@ } } = - /** - * = - * @throws Exception - */ + /** @throws Exception */ public void testUser() throws Exception { this.runAs("user"); - = + // first run against non-access scenario try { this.runWriteScenario(this.getNewProtectedFolder()); assertTrue("Access should not have been granted to" + this.reject= Path, - false); + false); } catch (CMSException cme) { @@ -270,7 +250,7 @@ //for anonymous, this should still result in an access denied try { - this.runWriteScenario(this.getNewPublicFolder()); = + this.runWriteScenario(this.getNewPublicFolder()); } catch (CMSException cme) { @@ -279,15 +259,12 @@ assertTrue(cmeMessage.indexOf("Access to this resource is denied"= ) =3D=3D -1); } } - = - /** - * = - * @throws Exception - */ + + /** @throws Exception */ public void testAdmin() throws Exception { this.runAs("admin"); - = + // first run against non-access scenario try { @@ -312,7 +289,7 @@ String cmeMessage =3D cme.toString(); assertTrue(cmeMessage.indexOf("Access to this resource is denied"= ) =3D=3D -1); } - = + //now run against scenario where access should be granted for a regi= stered user //for anonymous, this should still result in an access denied try @@ -326,15 +303,12 @@ assertTrue(cmeMessage.indexOf("Access to this resource is denied"= ) =3D=3D -1); } } - = - /** - * = - * @throws Exception - */ + + /** @throws Exception */ public void testSysAdmin() throws Exception { this.runAs("sysadmin"); - = + // first run against non-access scenario try { @@ -359,8 +333,7 @@ String cmeMessage =3D cme.toString(); assertTrue(cmeMessage.indexOf("Access to this resource is denied"= ) =3D=3D -1); } - = - = + //now run against scenario where access should be granted for a regi= stered user //for anonymous, this should still result in an access denied try Property changes on: branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jbos= s/portal/test/cms/security/TestWriteAccess.java ___________________________________________________________________ Name: svn:keywords + = Modified: branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/te= st/cms/workflow/AbstractWorkflowTestCase.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/test/cms= /workflow/AbstractWorkflowTestCase.java 2007-10-27 23:01:46 UTC (rev 8784) +++ branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/test/cms= /workflow/AbstractWorkflowTestCase.java 2007-10-28 01:09:21 UTC (rev 8785) @@ -21,12 +21,12 @@ */ package org.jboss.portal.test.cms.workflow; = -import javax.naming.InitialContext; - import org.hibernate.Session; import org.hibernate.SessionFactory; import org.hibernate.Transaction; import org.jboss.portal.cms.impl.interceptors.ApprovalWorkflowInterceptor; +import org.jboss.portal.cms.workflow.ApprovePublish; +import org.jboss.portal.cms.workflow.ApprovePublishImpl; import org.jboss.portal.common.invocation.Interceptor; import org.jboss.portal.identity.IdentityContext; import org.jboss.portal.identity.IdentityServiceController; @@ -34,21 +34,16 @@ import org.jboss.portal.identity.db.HibernateRoleImpl; import org.jboss.portal.identity.db.HibernateUserImpl; import org.jboss.portal.server.impl.invocation.JBossInterceptorStack; -import org.jboss.portal.cms.workflow.ApprovePublish; -import org.jboss.portal.cms.workflow.ApprovePublishImpl; - import org.jboss.portal.test.cms.commands.AbstractCommandTestCase; import org.jboss.portal.test.cms.commands.CMSInterceptorStackFactory; = -/** - * = - * @author Sohil Shah - sohil.shah(a)jboss.com - Nov 30, 2006 - * = - */ +import javax.naming.InitialContext; + +/** @author Sohil Shah - sohil.shah(a)jboss.com - Nov 30, 2006 */ public abstract class AbstractWorkflowTestCase extends AbstractCommandTest= Case -{ = +{ /** - * = + * */ public AbstractWorkflowTestCase() { @@ -56,21 +51,21 @@ } = /** - * = + * */ public void setUp() throws Exception { //override the configration location to include workflow services - this.configuration =3D "org/jboss/portal/cms/jboss-beans-workflow.xm= l"; = + this.configuration =3D "org/jboss/portal/cms/jboss-beans-workflow.xm= l"; super.setUp(); - = + ApprovalWorkflowInterceptor workflowInterceptor =3D this.getApproval= WorkflowInterceptor(); ApprovePublish approvePublish =3D this.getApprovePublish(); IdentityServiceController identityService =3D ((ApprovePublishImpl)a= pprovePublish).getIdentityServiceController(); - = + //Setup bootstrapped Identity data into the Identity store SessionFactory sessionFactory =3D (SessionFactory)new InitialContext= ().lookup("java:/SessionFactory"); - this.loadData(sessionFactory,identityService); + this.loadData(sessionFactory, identityService); = //Setup the interceptor stack CMSInterceptorStackFactory stackFactory =3D new CMSInterceptorStackF= actory(); @@ -83,28 +78,24 @@ this.service.setApprovePublishWorkflow(approvePublish); this.service.setIdentityServiceController(identityService); } - = + /** - * = + * */ public void tearDown() throws Exception { super.tearDown(); } - = = - /** - * = - * @return - */ + + /** @return */ protected ApprovalWorkflowInterceptor getApprovalWorkflowInterceptor() = throws Exception - { = + { ApprovalWorkflowInterceptor approvalWorkflowInterceptor =3D (Approva= lWorkflowInterceptor)new InitialContext().lookup("java:/portal/cms/Approval= WorkflowInterceptor"); return approvalWorkflowInterceptor; - } = - = + } + /** - * = * @return * @throws Exception */ @@ -112,21 +103,21 @@ { return (ApprovePublish)new InitialContext().lookup("java:/portal/App= rovePublishWorkflow"); } - = + /** - * = * + * */ - private void loadData(SessionFactory sessionFactory,IdentityServiceCont= roller service) throws Exception + private void loadData(SessionFactory sessionFactory, IdentityServiceCon= troller service) throws Exception { UserModule userModule =3D (UserModule)service.getIdentityContext().g= etObject(IdentityContext.TYPE_USER_MODULE); - = + Session session =3D sessionFactory.openSession(); Transaction tx =3D session.beginTransaction(); boolean success =3D false; try { - if(userModule.getUserCount()=3D=3D0) + if (userModule.getUserCount() =3D=3D 0) { // HibernateRoleImpl adminRole =3D new HibernateRoleImpl("Admin",= "Administrators"); @@ -159,15 +150,15 @@ session.save(userRole); session.save(admin); session.save(user); - = + success =3D true; } } finally { - if(tx !=3D null) + if (tx !=3D null) { - if(success) + if (success) { tx.commit(); } @@ -176,10 +167,10 @@ tx.rollback(); } } - if(session !=3D null) + if (session !=3D null) { session.close(); } - } = + } } } Property changes on: branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jbos= s/portal/test/cms/workflow/AbstractWorkflowTestCase.java ___________________________________________________________________ Name: svn:keywords + = Modified: branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/te= st/cms/workflow/TestApprovedPublish.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/test/cms= /workflow/TestApprovedPublish.java 2007-10-27 23:01:46 UTC (rev 8784) +++ branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/test/cms= /workflow/TestApprovedPublish.java 2007-10-28 01:09:21 UTC (rev 8785) @@ -22,35 +22,30 @@ *************************************************************************= *****/ package org.jboss.portal.test.cms.workflow; = -import java.util.Locale; -import java.util.Collection; -import java.util.Set; -import javax.naming.InitialContext; - -import org.hibernate.SessionFactory; +import junit.framework.TestSuite; import org.hibernate.Session; +import org.hibernate.SessionFactory; import org.hibernate.Transaction; -import junit.framework.TestSuite; - import org.jboss.portal.cms.Command; -import org.jboss.portal.cms.model.File; -import org.jboss.portal.cms.model.Content; -import org.jboss.portal.cms.impl.FileImpl; import org.jboss.portal.cms.impl.ContentImpl; -import org.jboss.portal.cms.workflow.ApprovePublish; +import org.jboss.portal.cms.impl.FileImpl; import org.jboss.portal.cms.impl.jcr.JCRCMS; +import org.jboss.portal.cms.model.Content; +import org.jboss.portal.cms.model.File; +import org.jboss.portal.cms.workflow.ApprovePublish; = -/** - * = - * @author Sohil Shah - sohil.shah(a)jboss.com - Nov 30, 2006 - * - */ +import javax.naming.InitialContext; +import java.util.Collection; +import java.util.Locale; +import java.util.Set; + +/** @author Sohil Shah - sohil.shah(a)jboss.com - Nov 30, 2006 */ public class TestApprovedPublish extends AbstractWorkflowTestCase { private String file =3D "/default/workflow.html"; private Transaction tx =3D null; private Session session =3D null; - = + /** * * @@ -67,41 +62,38 @@ { return createTestSuite(TestApprovedPublish.class); } - = + /** - * = + * */ public void setUp() throws Exception { super.setUp(); JCRCMS.turnOnWorkflow(); - = + SessionFactory sessionFactory =3D (SessionFactory)new InitialContext= ().lookup("java:/SessionFactory"); this.session =3D sessionFactory.openSession(); this.tx =3D session.beginTransaction(); } - = + /** - * = + * */ public void tearDown() throws Exception - { = + { this.tx.commit(); this.session.close(); - = - super.tearDown(); = + + super.tearDown(); } = - = - /** - * = - * @throws Exception - */ + + /** @throws Exception */ public void test() throws Exception { //Execute file creation as a regular user/non-manager this.runAs("user"); - = + //Add a new file to the CMS File file =3D new FileImpl(); file.setBasePath(this.file); @@ -114,81 +106,77 @@ content.setBytes("newdata".getBytes()); content.setMimeType("text/html"); file.setContent(Locale.ENGLISH, content); - = + Command newFileCommand =3D this.service.getCommandFactory().createNe= wFileCommand(file, content); this.service.execute(newFileCommand); - = + //Make sure this resource is not published into the CMS yet Command fileGet =3D this.service.getCommandFactory().createFileGetCo= mmand(this.file, Locale.ENGLISH); File assertFile =3D (File)this.service.execute(fileGet); assertNull(assertFile.getContent()); - = + //Check the pending queue for this file ApprovePublish approvePublish =3D this.service.getApprovePublishWork= flow(); - Collection queueItems =3D approvePublish.getPendingQueue(this.file);= = + Collection queueItems =3D approvePublish.getPendingQueue(this.file); assertNotNull(queueItems); - assertEquals(1,queueItems.size()); - = + assertEquals(1, queueItems.size()); + //Approve and publish this file into the CMS Set managers =3D approvePublish.getManagers(); String manager =3D (String)managers.iterator().next(); org.jboss.portal.cms.workflow.Content pendingItem =3D (org.jboss.por= tal.cms.workflow.Content)queueItems.iterator().next(); approvePublish.processManagerResponse(Long.parseLong(pendingItem.get= ProcessId()), manager.toLowerCase(), true); - = + //Make sure this resource is successfully published into the CMS, an= d removed from the pending queue assertFile =3D (File)this.service.execute(fileGet); assertNotNull(assertFile.getContent()); assertTrue(assertFile.getContent().isLive()); assertFalse(assertFile.getContent().isWaitingForPublishApproval()); - assertEquals(new String(assertFile.getContent().getBytes()),"newdata= "); + assertEquals(new String(assertFile.getContent().getBytes()), "newdat= a"); queueItems =3D approvePublish.getPendingQueue(this.file); - if(queueItems !=3D null) + if (queueItems !=3D null) { assertTrue(queueItems.isEmpty()); } - = = + String currentLiveVersion =3D assertFile.getContent().getVersionNumb= er(); - = - = + //Now testing the update side of it //modify this file file.getContent().setBytes("updateddata".getBytes()); - Command updateFileCommand =3D this.service.getCommandFactory().creat= eUpdateFileCommand(file,content,true); + Command updateFileCommand =3D this.service.getCommandFactory().creat= eUpdateFileCommand(file, content, true); this.service.execute(updateFileCommand); - = + //Make sure a new LIVE version of this resource is not published int= o the CMS assertFile =3D (File)this.service.execute(fileGet); - assertEquals(new String(assertFile.getContent().getBytes()),"newdata= "); - assertEquals(assertFile.getContent().getVersionNumber(),currentLiveV= ersion); - = + assertEquals(new String(assertFile.getContent().getBytes()), "newdat= a"); + assertEquals(assertFile.getContent().getVersionNumber(), currentLive= Version); + //Checking pending queue for a version of this file to be approved queueItems =3D approvePublish.getPendingQueue(this.file); assertNotNull(queueItems); - assertEquals(1,queueItems.size()); - = + assertEquals(1, queueItems.size()); + //Approve and publish this new version into the CMS pendingItem =3D (org.jboss.portal.cms.workflow.Content)queueItems.it= erator().next(); - approvePublish.processManagerResponse(Long.parseLong(pendingItem.get= ProcessId()), manager.toLowerCase(),true); - = + approvePublish.processManagerResponse(Long.parseLong(pendingItem.get= ProcessId()), manager.toLowerCase(), true); + //Check for the success of this publish, and removal from the pendin= g queue assertFile =3D (File)this.service.execute(fileGet); assertFalse(assertFile.getContent().isWaitingForPublishApproval()); - assertEquals(new String(assertFile.getContent().getBytes()),"updated= data"); + assertEquals(new String(assertFile.getContent().getBytes()), "update= ddata"); assertTrue(assertFile.getContent().getVersionNumber() !=3D currentLi= veVersion); queueItems =3D approvePublish.getPendingQueue(this.file); - if(queueItems !=3D null) + if (queueItems !=3D null) { assertTrue(queueItems.isEmpty()); } } - = - /** - * = - * @param username - */ + + /** @param username */ private void runAs(String username) throws Exception - { = + { JCRCMS.getUserInfo().set(this.service.getUserModule().findUserByUser= Name(username)); } } Property changes on: branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jbos= s/portal/test/cms/workflow/TestApprovedPublish.java ___________________________________________________________________ Name: svn:keywords + = Modified: branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/te= st/cms/workflow/TestDeniedPublish.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/test/cms= /workflow/TestDeniedPublish.java 2007-10-27 23:01:46 UTC (rev 8784) +++ branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/test/cms= /workflow/TestDeniedPublish.java 2007-10-28 01:09:21 UTC (rev 8785) @@ -22,38 +22,32 @@ *************************************************************************= *****/ package org.jboss.portal.test.cms.workflow; = -import java.util.Locale; -import java.util.Collection; -import java.util.Set; -import java.util.List; -import javax.naming.InitialContext; - -import org.hibernate.SessionFactory; +import junit.framework.TestSuite; import org.hibernate.Session; +import org.hibernate.SessionFactory; import org.hibernate.Transaction; - -import junit.framework.TestSuite; - import org.jboss.portal.cms.Command; -import org.jboss.portal.cms.model.File; -import org.jboss.portal.cms.model.Content; -import org.jboss.portal.cms.impl.FileImpl; import org.jboss.portal.cms.impl.ContentImpl; -import org.jboss.portal.cms.workflow.ApprovePublish; +import org.jboss.portal.cms.impl.FileImpl; import org.jboss.portal.cms.impl.jcr.JCRCMS; +import org.jboss.portal.cms.model.Content; +import org.jboss.portal.cms.model.File; +import org.jboss.portal.cms.workflow.ApprovePublish; = -/** - * = - * @author Sohil Shah - sohil.shah(a)jboss.com - Nov 30, 2006 - * - */ +import javax.naming.InitialContext; +import java.util.Collection; +import java.util.List; +import java.util.Locale; +import java.util.Set; + +/** @author Sohil Shah - sohil.shah(a)jboss.com - Nov 30, 2006 */ public class TestDeniedPublish extends AbstractWorkflowTestCase { private String newFile =3D "/default/workflow.html"; private String updateFile =3D "/default/index.html"; private Transaction tx =3D null; private Session session =3D null; - = + /** * * @@ -70,41 +64,38 @@ { return createTestSuite(TestDeniedPublish.class); } - = + /** - * = + * */ public void setUp() throws Exception { super.setUp(); JCRCMS.turnOnWorkflow(); - = + SessionFactory sessionFactory =3D (SessionFactory)new InitialContext= ().lookup("java:/SessionFactory"); this.session =3D sessionFactory.openSession(); this.tx =3D session.beginTransaction(); } - = + /** - * = + * */ public void tearDown() throws Exception - { = + { this.tx.commit(); this.session.close(); - = - super.tearDown(); = + + super.tearDown(); } = - = - /** - * = - * @throws Exception - */ + + /** @throws Exception */ public void test() throws Exception { //Execute file creation as a regular user/non-manager this.runAs("user"); - = + //Add a new file to the CMS File file =3D new FileImpl(); file.setBasePath(this.newFile); @@ -117,98 +108,92 @@ content.setBytes("newdata".getBytes()); content.setMimeType("text/html"); file.setContent(Locale.ENGLISH, content); - = + Command newFileCommand =3D this.service.getCommandFactory().createNe= wFileCommand(file, content); this.service.execute(newFileCommand); - = + //Make sure this resource is not published into the CMS yet Command fileGet =3D this.service.getCommandFactory().createFileGetCo= mmand(this.newFile, Locale.ENGLISH); File assertFile =3D (File)this.service.execute(fileGet); assertNull(assertFile.getContent()); - = + //Check the pending queue for this file ApprovePublish approvePublish =3D this.service.getApprovePublishWork= flow(); Collection queueItems =3D approvePublish.getPendingQueue(this.newFil= e); assertNotNull(queueItems); - assertEquals(1,queueItems.size()); - = + assertEquals(1, queueItems.size()); + //Deny the publish of this file into the CMS Set managers =3D approvePublish.getManagers(); String manager =3D (String)managers.iterator().next(); org.jboss.portal.cms.workflow.Content pendingItem =3D (org.jboss.por= tal.cms.workflow.Content)queueItems.iterator().next(); approvePublish.processManagerResponse(Long.parseLong(pendingItem.get= ProcessId()), manager.toLowerCase(), false); - = + //Make sure this resource is not published into the CMS, and removed= from the pending queue assertFile =3D (File)this.service.execute(fileGet); - assertNull(assertFile.getContent()); = + assertNull(assertFile.getContent()); queueItems =3D approvePublish.getPendingQueue(this.newFile); - if(queueItems !=3D null) + if (queueItems !=3D null) { assertTrue(queueItems.isEmpty()); } - = - = + //Check for the existence of a file to be updated first Command existsCommand =3D this.service.getCommandFactory().createIte= mExistsCommand(this.updateFile); Boolean exists =3D (Boolean)this.service.execute(existsCommand); assertTrue(exists.booleanValue()); - = - = + //Get the file to be updated - fileGet =3D this.service.getCommandFactory().createFileGetCommand(th= is.updateFile,new Locale(this.service.getDefaultLocale())); + fileGet =3D this.service.getCommandFactory().createFileGetCommand(th= is.updateFile, new Locale(this.service.getDefaultLocale())); File updateFile =3D (File)this.service.execute(fileGet); assertNotNull(updateFile); assertNotNull(updateFile.getContent()); assertTrue(updateFile.getContent().isLive()); - = + //Get some data related to this CMS in the file before sending in an= update Command getVersions =3D this.service.getCommandFactory().createConte= ntGetVersionsCommand(updateFile.getContent().getBasePath()); - List versions =3D (List)this.service.execute(getVersions); = + List versions =3D (List)this.service.execute(getVersions); String oldLiveVersion =3D updateFile.getContent().getVersionNumber(); String oldContent =3D new String(updateFile.getContent().getBytes()); - assertEquals(1,versions.size()); - = + assertEquals(1, versions.size()); + //Peform the file update updateFile.getContent().setBytes("updateddata".getBytes()); - Command updateFileCommand =3D this.service.getCommandFactory().creat= eUpdateFileCommand(updateFile,updateFile.getContent(),true); + Command updateFileCommand =3D this.service.getCommandFactory().creat= eUpdateFileCommand(updateFile, updateFile.getContent(), true); this.service.execute(updateFileCommand); - = - = + //Make sure a new LIVE version of this resource is not published int= o the CMS assertFile =3D (File)this.service.execute(fileGet); versions =3D (List)this.service.execute(getVersions); - assertEquals(new String(assertFile.getContent().getBytes()),oldConte= nt); - assertEquals(assertFile.getContent().getVersionNumber(),oldLiveVersi= on); - assertEquals(2,versions.size()); - = + assertEquals(new String(assertFile.getContent().getBytes()), oldCont= ent); + assertEquals(assertFile.getContent().getVersionNumber(), oldLiveVers= ion); + assertEquals(2, versions.size()); + //Checking pending queue for a version of this file to be approved queueItems =3D approvePublish.getPendingQueue(this.updateFile); assertNotNull(queueItems); - assertEquals(1,queueItems.size()); - = + assertEquals(1, queueItems.size()); + //Deny publishing of this new version into the CMS pendingItem =3D (org.jboss.portal.cms.workflow.Content)queueItems.it= erator().next(); - approvePublish.processManagerResponse(Long.parseLong(pendingItem.get= ProcessId()), manager.toLowerCase(),false); - = + approvePublish.processManagerResponse(Long.parseLong(pendingItem.get= ProcessId()), manager.toLowerCase(), false); + //Check for the success of this denial, and removal from the pending= queue assertFile =3D (File)this.service.execute(fileGet); versions =3D (List)this.service.execute(getVersions); - assertEquals(new String(assertFile.getContent().getBytes()),oldConte= nt); - assertEquals(assertFile.getContent().getVersionNumber(),oldLiveVersi= on); - assertEquals(2,versions.size()); + assertEquals(new String(assertFile.getContent().getBytes()), oldCont= ent); + assertEquals(assertFile.getContent().getVersionNumber(), oldLiveVers= ion); + assertEquals(2, versions.size()); queueItems =3D approvePublish.getPendingQueue(this.updateFile); - if(queueItems !=3D null) + if (queueItems !=3D null) { assertTrue(queueItems.isEmpty()); - } = + } } - = - /** - * = - * @param username - */ + + /** @param username */ private void runAs(String username) throws Exception - { = + { JCRCMS.getUserInfo().set(this.service.getUserModule().findUserByUser= Name(username)); } } Property changes on: branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jbos= s/portal/test/cms/workflow/TestDeniedPublish.java ___________________________________________________________________ Name: svn:keywords + = Modified: branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/te= st/cms/workflow/TestWorkflowEnvironment.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/test/cms= /workflow/TestWorkflowEnvironment.java 2007-10-27 23:01:46 UTC (rev 8784) +++ branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/test/cms= /workflow/TestWorkflowEnvironment.java 2007-10-28 01:09:21 UTC (rev 8785) @@ -22,26 +22,21 @@ *************************************************************************= *****/ package org.jboss.portal.test.cms.workflow; = -import java.util.Set; - import junit.framework.Assert; import junit.framework.TestSuite; - import org.jboss.portal.cms.CMSException; import org.jboss.portal.cms.workflow.ApprovePublish; = +import java.util.Set; = -/** - * = - * @author Sohil Shah - sohil.shah(a)jboss.com - Nov 30, 2006 - * - */ + +/** @author Sohil Shah - sohil.shah(a)jboss.com - Nov 30, 2006 */ public class TestWorkflowEnvironment extends AbstractWorkflowTestCase { String rejectPath =3D "/default/private/license.html"; String allowedPath =3D "/default/images/check.gif"; = - = + /** * * @@ -59,21 +54,18 @@ return createTestSuite(TestWorkflowEnvironment.class); } = - /** - * = - * @throws CMSException - */ + /** @throws CMSException */ public void test() throws Exception - { = + { //Get the ApprovePublish service ApprovePublish service =3D this.getApprovePublish(); - = + //Get the list of managers allowed to approve content Set managers =3D service.getManagers(); - = + //Assert and make sure there is atleast one portal role that is allo= wed //to function of content manager Assert.assertNotNull(managers); - Assert.assertTrue(managers.size()>0); + Assert.assertTrue(managers.size() > 0); } } Property changes on: branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jbos= s/portal/test/cms/workflow/TestWorkflowEnvironment.java ___________________________________________________________________ Name: svn:keywords + = Modified: branches/JBoss_Portal_Branch_2_6/cms/src/resources/hibernate/doma= in.hbm.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/cms/src/resources/hibernate/domain.hbm= .xml 2007-10-27 23:01:46 UTC (rev 8784) +++ branches/JBoss_Portal_Branch_2_6/cms/src/resources/hibernate/domain.hbm= .xml 2007-10-28 01:09:21 UTC (rev 8785) @@ -274,103 +274,103 @@ type=3D"long" not-null=3D"true"/> - = + = + name=3D"id" + column=3D"ID" + type=3D"java.lang.Long"> = + name=3D"roleId" + column=3D"ROLE_ID" + type=3D"string" + not-null=3D"true" + /> = + name=3D"id" + column=3D"ID" + type=3D"java.lang.Long"> = + name=3D"userId" + column=3D"USER_ID" + type=3D"string" + not-null=3D"true" + /> = + name=3D"id" + column=3D"ID" + type=3D"java.lang.Long"> + name=3D"name" + column=3D"NAME" + type=3D"string" + not-null=3D"true" + /> = + name=3D"value" + column=3D"VALUE" + type=3D"string" + not-null=3D"true" + /> = + name=3D"id" + column=3D"ID" + type=3D"java.lang.Long"> - - + + = - - + + = - - + + = + name=3D"service" + column=3D"NAME" + type=3D"string" + not-null=3D"true" + /> + name=3D"action" + column=3D"ACTION" + type=3D"string" + not-null=3D"true" + /> = + name=3D"negated" + column=3D"NEGATED" + type=3D"boolean" + not-null=3D"true" + /> = Property changes on: branches/JBoss_Portal_Branch_2_6/cms/src/resources/hib= ernate/domain.hbm.xml ___________________________________________________________________ Name: svn:keywords - Author Date Id Revision + LastChangedDate LastChangedBy LastChangedRevision Id Modified: branches/JBoss_Portal_Branch_2_6/cms/src/resources/portal-cms-jar= /org/jboss/portal/cms/jboss-beans-security.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/cms/src/resources/portal-cms-jar/org/j= boss/portal/cms/jboss-beans-security.xml 2007-10-27 23:01:46 UTC (rev 8784) +++ branches/JBoss_Portal_Branch_2_6/cms/src/resources/portal-cms-jar/org/j= boss/portal/cms/jboss-beans-security.xml 2007-10-28 01:09:21 UTC (rev 8785) @@ -79,7 +79,7 @@ = java:/SessionFactory - = + Property changes on: branches/JBoss_Portal_Branch_2_6/cms/src/resources/por= tal-cms-jar/org/jboss/portal/cms/jboss-beans-security.xml ___________________________________________________________________ Name: svn:keywords + LastChangedDate LastChangedBy LastChangedRevision Id Modified: branches/JBoss_Portal_Branch_2_6/cms/src/resources/portal-cms-jar= /org/jboss/portal/cms/jboss-beans-workflow.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/cms/src/resources/portal-cms-jar/org/j= boss/portal/cms/jboss-beans-workflow.xml 2007-10-27 23:01:46 UTC (rev 8784) +++ branches/JBoss_Portal_Branch_2_6/cms/src/resources/portal-cms-jar/org/j= boss/portal/cms/jboss-beans-workflow.xml 2007-10-28 01:09:21 UTC (rev 8785) @@ -163,8 +163,8 @@ standardidentity-config.xml false - = - = + + Property changes on: branches/JBoss_Portal_Branch_2_6/cms/src/resources/por= tal-cms-jar/org/jboss/portal/cms/jboss-beans-workflow.xml ___________________________________________________________________ Name: svn:keywords + LastChangedDate LastChangedBy LastChangedRevision Id Property changes on: branches/JBoss_Portal_Branch_2_6/cms/src/resources/por= tal-cms-jar/org/jboss/portal/cms/jboss-beans.xml ___________________________________________________________________ Name: svn:keywords - Author Date Id Revision + LastChangedDate LastChangedBy LastChangedRevision Id Property changes on: branches/JBoss_Portal_Branch_2_6/cms/src/resources/por= tal-cms-jar/org/jboss/portal/cms/mime-mappings.xml ___________________________________________________________________ Name: svn:keywords - Author Date Id Revision + LastChangedDate LastChangedBy LastChangedRevision Id Property changes on: branches/JBoss_Portal_Branch_2_6/cms/src/resources/por= tal-cms-sar/default-content/default/index.html ___________________________________________________________________ Name: svn:keywords - Author Date Id Revision + LastChangedDate LastChangedBy LastChangedRevision Id Modified: branches/JBoss_Portal_Branch_2_6/cms/src/resources/portal-cms-sar= /default-content/default/private/license.html =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/cms/src/resources/portal-cms-sar/defau= lt-content/default/private/license.html 2007-10-27 23:01:46 UTC (rev 8784) +++ branches/JBoss_Portal_Branch_2_6/cms/src/resources/portal-cms-sar/defau= lt-content/default/private/license.html 2007-10-28 01:09:21 UTC (rev 8785) @@ -1,38 +1,54 @@

- - - - - -
JBoss Inc. delivers the Professional Support, Consultin= g, and Training that you need whether you are testing a proof of concept, d= eploying a mission-critical application, or rolling out JEMS across your en= terprise.
- - - - - - - - - - - - - + + + + + +
-Pr= ofessional Support -
-The JBoss Subscription is a set of services and tools that assist you duri= ng every stage of the application lifecycle - from design and development, = thru testing and deployment, to on-going management and monitoring of your = enterprise application deployments. JBoss Subscriptions allow you to reduce= business, legal, and technical risks while enabling you to more effectivel= y utilize your team's resources. A JBoss Subscription will ensure that you = achieve a much greater success rate for all of your JEMS-based projects. -
-Con= sulting Services -
-JBoss offers short-term on-site JEMS consulting engagements that provide y= ou expert assistance at various stages of the application lifecycle. All en= gagements are delivered by certified JEMS consultants. -
-Train= ing and Certification -
-A Certified JBoss Web Developer is capable of implementing presentation ti= er components for J2EE applications. They have the base knowledge on Servle= t and JSP technology, Portlet specification, Tomcat Servlet container and J= Boss Portal. A Certified JBoss Developer for web tier is able to implement = and deploy presentation components (Web Archives) on Tomcat server and Port= let components on JBoss Portal implementation. -
JBoss Inc. delivers the + Professional Support, Consulting, and Training that you need whet= her you are testing a proof of concept, + deploying a mission-critical application, or rolling out JEMS acr= oss your enterprise.
+ + + + + + + + + + + + + +
+ Professional Support +
+ The JBoss Subscription is a set of services and tools th= at assist you during every stage of the + application lifecycle - from design and development, thr= u testing and deployment, to on-going + management and monitoring of your enterprise application= deployments. JBoss Subscriptions allow you to + reduce business, legal, and technical risks while enabli= ng you to more effectively utilize your team's + resources. A JBoss Subscription will ensure that you ach= ieve a much greater success rate for all of + your JEMS-based projects. +
+ Consulting Services +
+ JBoss offers short-term on-site JEMS consulting engageme= nts that provide you expert assistance at + various stages of the application lifecycle. All engagem= ents are delivered by certified JEMS + consultants. +
+ Training and Certification +
+ A Certified JBoss Web Developer is capable of implementi= ng presentation tier components for J2EE + applications. They have the base knowledge on Servlet an= d JSP technology, Portlet specification, + Tomcat Servlet container and JBoss Portal. A Certified J= Boss Developer for web tier is able to + implement and deploy presentation components (Web Archiv= es) on Tomcat server and Portlet components on + JBoss Portal implementation. +
-

3D"back" \ No newline at end of file Property changes on: branches/JBoss_Portal_Branch_2_6/cms/src/resources/por= tal-cms-sar/default-content/default/private/license.html ___________________________________________________________________ Name: svn:keywords + LastChangedDate LastChangedBy LastChangedRevision Id Modified: branches/JBoss_Portal_Branch_2_6/cms/src/resources/portal-cms-sar= /default-content/default/project.html =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/cms/src/resources/portal-cms-sar/defau= lt-content/default/project.html 2007-10-27 23:01:46 UTC (rev 8784) +++ branches/JBoss_Portal_Branch_2_6/cms/src/resources/portal-cms-sar/defau= lt-content/default/project.html 2007-10-28 01:09:21 UTC (rev 8785) @@ -8,61 +8,65 @@
- - - + - - - - + + + - - - - + + + - - - - + + + - - - - + + + - - -
+
- JBoss Portal Home -
- The Epicenter of everything JBoss Portal.
+ JBoss Portal Home +
+ The Epicenter of everything JBoss Portal.
- Documentation -
- Here you will find user documentation, reference documentat= ion, tutorials, and javadoc.
+ Documentation +
+ Here you will find user documentation, reference documen= tation, tutorials, and javadoc.
- Forums -
- Our forums are the main channel of communication between al= l community - members. If you have any questions or concerns, please use - our User - Forums, Developer - Forums, or WSRP Forums to voice t= hem. Project developers and community members are always there to help. -
+ Forums +
+ Our forums are the main channel of communication between= all community + members. If you have any questions or concerns, please u= se + our User + Forums, Developer + Forums, or WSRP + Forums to voice them. Project developers and communi= ty members are always there to help. +
- Wiki -
- Our wiki knowledge base is a user and developer contributed= collection of important resources regarding - JBoss Portal.
+ Wiki +
+ Our wiki knowledge base is a user and developer contribu= ted collection of important resources + regarding + JBoss Portal.
- Jira -
- JBoss Portal uses the JIRA tracking and project management = system to organize and prioritize tasks.
- JBoss Portal -  |  + Jira +
+ JBoss Portal uses the JIRA tracking and project manageme= nt system to organize and prioritize + tasks.
+ JBoss + Portal +  | Open Issues -  | Roadmap
+

3D"back" Property changes on: branches/JBoss_Portal_Branch_2_6/cms/src/resources/por= tal-cms-sar/default-content/default/project.html ___________________________________________________________________ Name: svn:keywords + LastChangedDate LastChangedBy LastChangedRevision Id Modified: branches/JBoss_Portal_Branch_2_6/cms/src/resources/portal-cms-sar= /default-content/default/support.html =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/cms/src/resources/portal-cms-sar/defau= lt-content/default/support.html 2007-10-27 23:01:46 UTC (rev 8784) +++ branches/JBoss_Portal_Branch_2_6/cms/src/resources/portal-cms-sar/defau= lt-content/default/support.html 2007-10-28 01:09:21 UTC (rev 8785) @@ -1,38 +1,54 @@ - - - - - -
JBoss Inc. delivers the Professional Support, Consultin= g, and Training that you need whether you are testing a proof of concept, d= eploying a mission-critical application, or rolling out JEMS across your en= terprise.
- - - - - - - - - - - - - + + + + + +
-Pr= ofessional Support -
-The JBoss Subscription is a set of services and tools that assist you duri= ng every stage of the application lifecycle - from design and development, = thru testing and deployment, to on-going management and monitoring of your = enterprise application deployments. JBoss Subscriptions allow you to reduce= business, legal, and technical risks while enabling you to more effectivel= y utilize your team's resources. A JBoss Subscription will ensure that you = achieve a much greater success rate for all of your JEMS-based projects. -
-Con= sulting Services -
-JBoss offers short-term on-site JEMS consulting engagements that provide y= ou expert assistance at various stages of the application lifecycle. All en= gagements are delivered by certified JEMS consultants. -
-Train= ing and Certification -
-A Certified JBoss Web Developer is capable of implementing presentation ti= er components for J2EE applications. They have the base knowledge on Servle= t and JSP technology, Portlet specification, Tomcat Servlet container and J= Boss Portal. A Certified JBoss Developer for web tier is able to implement = and deploy presentation components (Web Archives) on Tomcat server and Port= let components on JBoss Portal implementation. -
JBoss Inc. delivers the + Professional Support, Consulting, and Training that you need whet= her you are testing a proof of concept, + deploying a mission-critical application, or rolling out JEMS acr= oss your enterprise.
+ + + + + + + + + + + + + +
+ Professional Support +
+ The JBoss Subscription is a set of services and tools th= at assist you during every stage of the + application lifecycle - from design and development, thr= u testing and deployment, to on-going + management and monitoring of your enterprise application= deployments. JBoss Subscriptions allow you to + reduce business, legal, and technical risks while enabli= ng you to more effectively utilize your team's + resources. A JBoss Subscription will ensure that you ach= ieve a much greater success rate for all of + your JEMS-based projects. +
+ Consulting Services +
+ JBoss offers short-term on-site JEMS consulting engageme= nts that provide you expert assistance at + various stages of the application lifecycle. All engagem= ents are delivered by certified JEMS + consultants. +
+ Training and Certification +
+ A Certified JBoss Web Developer is capable of implementi= ng presentation tier components for J2EE + applications. They have the base knowledge on Servlet an= d JSP technology, Portlet specification, + Tomcat Servlet container and JBoss Portal. A Certified J= Boss Developer for web tier is able to + implement and deploy presentation components (Web Archiv= es) on Tomcat server and Portlet components on + JBoss Portal implementation. +
-

3D"back" \ No newline at end of file Property changes on: branches/JBoss_Portal_Branch_2_6/cms/src/resources/por= tal-cms-sar/default-content/default/support.html ___________________________________________________________________ Name: svn:keywords + LastChangedDate LastChangedBy LastChangedRevision Id Property changes on: branches/JBoss_Portal_Branch_2_6/cms/src/resources/tes= t/cms/clustering/datasource/ports01-ds.xml ___________________________________________________________________ Name: svn:keywords + LastChangedDate LastChangedBy LastChangedRevision Id Property changes on: branches/JBoss_Portal_Branch_2_6/cms/src/resources/tes= t/cms/clustering/datasource/ports02-ds.xml ___________________________________________________________________ Name: svn:keywords + LastChangedDate LastChangedBy LastChangedRevision Id Modified: branches/JBoss_Portal_Branch_2_6/cms/src/resources/test/cms/clust= ering/sar/META-INF/jboss-service.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/cms/src/resources/test/cms/clustering/= sar/META-INF/jboss-service.xml 2007-10-27 23:01:46 UTC (rev 8784) +++ branches/JBoss_Portal_Branch_2_6/cms/src/resources/test/cms/clustering/= sar/META-INF/jboss-service.xml 2007-10-28 01:09:21 UTC (rev 8785) @@ -58,12 +58,12 @@ portal:service=3DJAASLoginModule portal:service=3DHibernate,type=3DCMS portal:service=3DModule,type=3DIdentityServiceControlle= r - = + - = + portal:service=3DInterceptorStackFactory,type=3DCms true portal/cms/conf/default-c= ontent/default/ @@ -127,7 +127,7 @@ = - + @@ -432,7 +432,7 @@ false false - = + portal:service=3DInterceptor,type=3DCms,nam= e=3DACL portal:service=3DInterceptor,type=3DCms,nam= e=3DApprovalWorkflow - = - = + + = portal:service=3DModule,type=3DIdentityServiceControlle= r = - = + portal:service=3DHibernate,type=3DCMS portal:service=3DModule,type=3DIdentityServiceController = - = + java:/portal/cms/ApprovalWorkflowInterc= eptor = portal:service=3DHibernate,type=3DCMS = - = + - = + = + name=3D"id" + column=3D"ID" + type=3D"java.lang.Long"> = + name=3D"roleId" + column=3D"ROLE_ID" + type=3D"string" + not-null=3D"true" + /> = + name=3D"id" + column=3D"ID" + type=3D"java.lang.Long"> = + name=3D"userId" + column=3D"USER_ID" + type=3D"string" + not-null=3D"true" + /> = + name=3D"id" + column=3D"ID" + type=3D"java.lang.Long"> + name=3D"name" + column=3D"NAME" + type=3D"string" + not-null=3D"true" + /> = + name=3D"value" + column=3D"VALUE" + type=3D"string" + not-null=3D"true" + /> = + name=3D"id" + column=3D"ID" + type=3D"java.lang.Long"> - - + + = - - + + = - - + + = + name=3D"service" + column=3D"NAME" + type=3D"string" + not-null=3D"true" + /> + name=3D"action" + column=3D"ACTION" + type=3D"string" + not-null=3D"true" + /> = + name=3D"negated" + column=3D"NEGATED" + type=3D"boolean" + not-null=3D"true" + /> = Property changes on: branches/JBoss_Portal_Branch_2_6/cms/src/resources/tes= t/cms/clustering/sar/conf/hibernate/cms/domain.hbm.xml ___________________________________________________________________ Name: svn:keywords + LastChangedDate LastChangedBy LastChangedRevision Id Property changes on: branches/JBoss_Portal_Branch_2_6/cms/src/resources/tes= t/cms/clustering/sar/conf/hibernate/cms/hibernate.cfg.xml ___________________________________________________________________ Name: svn:keywords + LastChangedDate LastChangedBy LastChangedRevision Id Property changes on: branches/JBoss_Portal_Branch_2_6/cms/src/resources/tes= t/cms/clustering/test-cms-clustering-war/WEB-INF/jboss-portlet.xml ___________________________________________________________________ Name: svn:keywords + LastChangedDate LastChangedBy LastChangedRevision Id Property changes on: branches/JBoss_Portal_Branch_2_6/cms/src/resources/tes= t/cms/clustering/test-cms-clustering-war/WEB-INF/portlet.xml ___________________________________________________________________ Name: svn:keywords + LastChangedDate LastChangedBy LastChangedRevision Id Property changes on: branches/JBoss_Portal_Branch_2_6/cms/src/resources/tes= t/cms/clustering/test-cms-clustering-war/WEB-INF/web.xml ___________________________________________________________________ Name: svn:keywords + LastChangedDate LastChangedBy LastChangedRevision Id Modified: branches/JBoss_Portal_Branch_2_6/cms/src/resources/test/db-config= .xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/cms/src/resources/test/db-config.xml 2= 007-10-27 23:01:46 UTC (rev 8784) +++ branches/JBoss_Portal_Branch_2_6/cms/src/resources/test/db-config.xml 2= 007-10-28 01:09:21 UTC (rev 8785) @@ -22,9 +22,9 @@ ~ 02110-1301 USA, or see the FSF site: http://www.fsf.org. = ~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~= ~~~--> = - + = = Property changes on: branches/JBoss_Portal_Branch_2_6/cms/src/resources/tes= t/db-config.xml ___________________________________________________________________ Name: svn:keywords + LastChangedDate LastChangedBy LastChangedRevision Id Modified: branches/JBoss_Portal_Branch_2_6/cms/src/resources/test/domain-id= entity.hbm.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/cms/src/resources/test/domain-identity= .hbm.xml 2007-10-27 23:01:46 UTC (rev 8784) +++ branches/JBoss_Portal_Branch_2_6/cms/src/resources/test/domain-identity= .hbm.xml 2007-10-28 01:09:21 UTC (rev 8785) @@ -30,10 +30,10 @@ name=3D"org.jboss.portal.identity.db.HibernateUserImpl" table=3D"jbp_users"> - + user_seq Property changes on: branches/JBoss_Portal_Branch_2_6/cms/src/resources/tes= t/domain-identity.hbm.xml ___________________________________________________________________ Name: svn:keywords + LastChangedDate LastChangedBy LastChangedRevision Id Property changes on: branches/JBoss_Portal_Branch_2_6/cms/src/resources/tes= t/jbpm-ehcache.xml ___________________________________________________________________ Name: svn:keywords + LastChangedDate LastChangedBy LastChangedRevision Id Modified: branches/JBoss_Portal_Branch_2_6/cms/src/resources/test/jbpm-hibe= rnate.cfg.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/cms/src/resources/test/jbpm-hibernate.= cfg.xml 2007-10-27 23:01:46 UTC (rev 8784) +++ branches/JBoss_Portal_Branch_2_6/cms/src/resources/test/jbpm-hibernate.= cfg.xml 2007-10-28 01:09:21 UTC (rev 8785) @@ -1,59 +1,60 @@ = + "-//Hibernate/Hibernate Configuration DTD 3.0//EN" + "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd"> = - java:/DefaultDS + java:/DefaultDS = - - false + + false true true = - - true + + true true jbp= m-ehcache.xml org.hibernate.cache.EhCachePro= vider = - - org.hibe= rnate.transaction.JBossTransactionManagerLookup + + org.hibernate.= transaction.JBossTransactionManagerLookup org.hibernate.t= ransaction.JTATransactionFactory - = - - - = - - - - - - + + + = - - - - - - - + + + + + + + + + + + + + + = - - - + + + = - - + + = - - + + @@ -62,8 +63,8 @@ = - - + + @@ -72,40 +73,40 @@ = - - + + = - - + + = - - + + = - - + + = - - + + = - - + + = - - + + = - - + + = - - + + @@ -117,25 +118,25 @@ = - - + + = - - + + = - - + + = - - + + Property changes on: branches/JBoss_Portal_Branch_2_6/cms/src/resources/tes= t/jbpm-hibernate.cfg.xml ___________________________________________________________________ Name: svn:keywords + LastChangedDate LastChangedBy LastChangedRevision Id Modified: branches/JBoss_Portal_Branch_2_6/cms/src/resources/test/jcr/fs-re= pository.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/cms/src/resources/test/jcr/fs-reposito= ry.xml 2007-10-27 23:01:46 UTC (rev 8784) +++ branches/JBoss_Portal_Branch_2_6/cms/src/resources/test/jcr/fs-reposito= ry.xml 2007-10-28 01:09:21 UTC (rev 8785) @@ -41,7 +41,7 @@ - + Property changes on: branches/JBoss_Portal_Branch_2_6/cms/src/resources/tes= t/jcr/fs-repository.xml ___________________________________________________________________ Name: svn:keywords - Author Date Id Revision + LastChangedDate LastChangedBy LastChangedRevision Id Modified: branches/JBoss_Portal_Branch_2_6/cms/src/resources/test/jcr/repos= itory.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/cms/src/resources/test/jcr/repository.= xml 2007-10-27 23:01:46 UTC (rev 8784) +++ branches/JBoss_Portal_Branch_2_6/cms/src/resources/test/jcr/repository.= xml 2007-10-28 01:09:21 UTC (rev 8785) @@ -75,9 +75,9 @@ = - + - + Property changes on: branches/JBoss_Portal_Branch_2_6/cms/src/resources/tes= t/jcr/repository.xml ___________________________________________________________________ Name: svn:keywords - Author Date Id Revision + LastChangedDate LastChangedBy LastChangedRevision Id Modified: branches/JBoss_Portal_Branch_2_6/cms/src/resources/test/log4j.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/cms/src/resources/test/log4j.xml 2007-= 10-27 23:01:46 UTC (rev 8784) +++ branches/JBoss_Portal_Branch_2_6/cms/src/resources/test/log4j.xml 2007-= 10-28 01:09:21 UTC (rev 8785) @@ -30,7 +30,7 @@ = - + = @@ -22,7 +22,7 @@ @@ -52,7 +52,7 @@ You can control the page titles, column layouts, page theme= s, and add, order, or remove portlets. - = +
- = + @@ -106,18 +106,18 @@ rendered=3D"#{prop.type eq 'java.lang= .String' and prop.name ne 'portal.windowInitialState'}"/> = - - - - + + + + = - + = = Property changes on: branches/JBoss_Portal_Branch_2_6/core-admin/src/resour= ces/portal-admin-war/WEB-INF/jsf/common/editProperties.xhtml ___________________________________________________________________ Name: svn:keywords + LastChangedDate LastChangedBy LastChangedRevision Id Modified: branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-= admin-war/WEB-INF/jsf/common/editSecurity.xhtml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-admin-= war/WEB-INF/jsf/common/editSecurity.xhtml 2007-10-27 23:01:46 UTC (rev 8784) +++ branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-admin-= war/WEB-INF/jsf/common/editSecurity.xhtml 2007-10-28 01:09:21 UTC (rev 8785) @@ -18,7 +18,8 @@
- Role #{role =3D=3D '__unchecked__' ? 'Unchecked' := (auth.roleDisplayNameMap[role] !=3D null ? auth.roleDisplayNameMap[role] := role)}: + Role + #{role =3D=3D '__unchecked__' ? 'Unchecked' : (aut= h.roleDisplayNameMap[role] !=3D null ? auth.roleDisplayNameMap[role] : role= )}: @@ -34,8 +35,8 @@
- - + +
= Property changes on: branches/JBoss_Portal_Branch_2_6/core-admin/src/resour= ces/portal-admin-war/WEB-INF/jsf/common/editSecurity.xhtml ___________________________________________________________________ Name: svn:keywords + LastChangedDate LastChangedBy LastChangedRevision Id Property changes on: branches/JBoss_Portal_Branch_2_6/core-admin/src/resour= ces/portal-admin-war/WEB-INF/jsf/common/editTheme.xhtml ___________________________________________________________________ Name: svn:keywords + LastChangedDate LastChangedBy LastChangedRevision Id Property changes on: branches/JBoss_Portal_Branch_2_6/core-admin/src/resour= ces/portal-admin-war/WEB-INF/jsf/common/editWindowTheme.xhtml ___________________________________________________________________ Name: svn:keywords + LastChangedDate LastChangedBy LastChangedRevision Id Modified: branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-= admin-war/WEB-INF/jsf/common/showPortletDetails.xhtml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-admin-= war/WEB-INF/jsf/common/showPortletDetails.xhtml 2007-10-27 23:01:46 UTC (re= v 8784) +++ branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-admin-= war/WEB-INF/jsf/common/showPortletDetails.xhtml 2007-10-28 01:09:21 UTC (re= v 8785) @@ -1,19 +1,19 @@
+ xmlns=3D"http://www.w3.org/1999/xhtml" + xmlns:ui=3D"http://java.sun.com/jsf/facelets" + xmlns:h=3D"http://java.sun.com/jsf/html" + xmlns:f=3D"http://java.sun.com/jsf/core" + xmlns:c=3D"http://java.sun.com/jstl/core"> = + action=3D"#{portletmgr.selectPortlet}"> + + + #{portlet.name.value} + @@ -31,7 +31,7 @@ Property changes on: branches/JBoss_Portal_Branch_2_6/core-admin/src/resour= ces/portal-admin-war/WEB-INF/jsf/common/showPortletDetails.xhtml ___________________________________________________________________ Name: svn:keywords + LastChangedDate LastChangedBy LastChangedRevision Id Property changes on: branches/JBoss_Portal_Branch_2_6/core-admin/src/resour= ces/portal-admin-war/WEB-INF/jsf/common/tabContainer.xhtml ___________________________________________________________________ Name: svn:keywords + LastChangedDate LastChangedBy LastChangedRevision Id Property changes on: branches/JBoss_Portal_Branch_2_6/core-admin/src/resour= ces/portal-admin-war/WEB-INF/jsf/confirmDeleteInstance.xhtml ___________________________________________________________________ Name: svn:keywords + LastChangedDate LastChangedBy LastChangedRevision Id Modified: branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-= admin-war/WEB-INF/jsf/dashboard/dashboard.xhtml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-admin-= war/WEB-INF/jsf/dashboard/dashboard.xhtml 2007-10-27 23:01:46 UTC (rev 8784) +++ branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-admin-= war/WEB-INF/jsf/dashboard/dashboard.xhtml 2007-10-28 01:09:21 UTC (rev 8785) @@ -32,18 +32,18 @@ - - - + + +
Portlet name: - - - #{portlet.name.value} -
Portlet description:
Portlet locales: - #{= locale} + #{l= ocale}
Rename this Page= :
New page name:  - - - - - -
Rename this P= age:
New page name:  + + + + + +
@@ -69,77 +69,79 @@ styleClass=3D"portlet-form-field" onchange=3D"document.getElementById('page_selector_form').submit(= )"> - +
- = + - - - - - -
- - - - - - - - - - - - - - - - -
- Theme and Layout -
- Apply a theme to your dashboard, or select the = number of columns for the layout. -
-
- - Choose a layout:
- - - - -
-
- - Choose a theme:
- - - - -
-
-
- - - - -
-
- - - -
-
-
+ + + + + +
+ + + + + + + + + + + + + + + + +
+ Theme and Layout +
+ Apply a theme to your dashboard, or select the num= ber of columns for the layout. +
+
+ + Choose a layout:
+ + + + +
+
+ + Choose a theme:
+ + + + +
+
+
+ + + + +
+
+ + + +
+
+
@@ -149,7 +151,8 @@ - +
You cannot undo this action!
Property changes on: branches/JBoss_Portal_Branch_2_6/core-admin/src/resour= ces/portal-admin-war/WEB-INF/jsf/dashboard/dashboard.xhtml ___________________________________________________________________ Name: svn:keywords + LastChangedDate LastChangedBy LastChangedRevision Id Property changes on: branches/JBoss_Portal_Branch_2_6/core-admin/src/resour= ces/portal-admin-war/WEB-INF/jsf/dashboards.xhtml ___________________________________________________________________ Name: svn:keywords + LastChangedDate LastChangedBy LastChangedRevision Id Modified: branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-= admin-war/WEB-INF/jsf/dashboardsTemplate.xhtml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-admin-= war/WEB-INF/jsf/dashboardsTemplate.xhtml 2007-10-27 23:01:46 UTC (rev 8784) +++ branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-admin-= war/WEB-INF/jsf/dashboardsTemplate.xhtml 2007-10-28 01:09:21 UTC (rev 8785) @@ -10,7 +10,8 @@
  • - +
  • @@ -22,12 +23,13 @@
- - - + + + = - - Content - + + Content +
Property changes on: branches/JBoss_Portal_Branch_2_6/core-admin/src/resour= ces/portal-admin-war/WEB-INF/jsf/dashboardsTemplate.xhtml ___________________________________________________________________ Name: svn:keywords + LastChangedDate LastChangedBy LastChangedRevision Id Property changes on: branches/JBoss_Portal_Branch_2_6/core-admin/src/resour= ces/portal-admin-war/WEB-INF/jsf/editContext.xhtml ___________________________________________________________________ Name: svn:keywords + LastChangedDate LastChangedBy LastChangedRevision Id Property changes on: branches/JBoss_Portal_Branch_2_6/core-admin/src/resour= ces/portal-admin-war/WEB-INF/jsf/editPage.xhtml ___________________________________________________________________ Name: svn:keywords + LastChangedDate LastChangedBy LastChangedRevision Id Modified: branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-= admin-war/WEB-INF/jsf/editPageLayout.xhtml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-admin-= war/WEB-INF/jsf/editPageLayout.xhtml 2007-10-27 23:01:46 UTC (rev 8784) +++ branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-admin-= war/WEB-INF/jsf/editPageLayout.xhtml 2007-10-28 01:09:21 UTC (rev 8785) @@ -7,11 +7,11 @@ xmlns:jbp=3D"http://www.jboss.org/portal" xmlns:c=3D"http://java.sun.com/jstl/core"> - - - - - - + + + + + +
Property changes on: branches/JBoss_Portal_Branch_2_6/core-admin/src/resour= ces/portal-admin-war/WEB-INF/jsf/editPageLayout.xhtml ___________________________________________________________________ Name: svn:keywords + LastChangedDate LastChangedBy LastChangedRevision Id Property changes on: branches/JBoss_Portal_Branch_2_6/core-admin/src/resour= ces/portal-admin-war/WEB-INF/jsf/editPageSecurity.xhtml ___________________________________________________________________ Name: svn:keywords + LastChangedDate LastChangedBy LastChangedRevision Id Property changes on: branches/JBoss_Portal_Branch_2_6/core-admin/src/resour= ces/portal-admin-war/WEB-INF/jsf/editPageTheme.xhtml ___________________________________________________________________ Name: svn:keywords + LastChangedDate LastChangedBy LastChangedRevision Id Property changes on: branches/JBoss_Portal_Branch_2_6/core-admin/src/resour= ces/portal-admin-war/WEB-INF/jsf/editPortalSecurity.xhtml ___________________________________________________________________ Name: svn:keywords + LastChangedDate LastChangedBy LastChangedRevision Id Property changes on: branches/JBoss_Portal_Branch_2_6/core-admin/src/resour= ces/portal-admin-war/WEB-INF/jsf/editPortalTheme.xhtml ___________________________________________________________________ Name: svn:keywords + LastChangedDate LastChangedBy LastChangedRevision Id Modified: branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-= admin-war/WEB-INF/jsf/editProperties.xhtml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-admin-= war/WEB-INF/jsf/editProperties.xhtml 2007-10-27 23:01:46 UTC (rev 8784) +++ branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-admin-= war/WEB-INF/jsf/editProperties.xhtml 2007-10-28 01:09:21 UTC (rev 8785) @@ -26,9 +26,9 @@
=
- - - + + +
=
Property changes on: branches/JBoss_Portal_Branch_2_6/core-admin/src/resour= ces/portal-admin-war/WEB-INF/jsf/editProperties.xhtml ___________________________________________________________________ Name: svn:keywords + LastChangedDate LastChangedBy LastChangedRevision Id Modified: branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-= admin-war/WEB-INF/jsf/editWindow.xhtml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-admin-= war/WEB-INF/jsf/editWindow.xhtml 2007-10-27 23:01:46 UTC (rev 8784) +++ branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-admin-= war/WEB-INF/jsf/editWindow.xhtml 2007-10-28 01:09:21 UTC (rev 8785) @@ -1,9 +1,9 @@
+ xmlns=3D"http://www.w3.org/1999/xhtml" + xmlns:ui=3D"http://java.sun.com/jsf/facelets" + xmlns:ct=3D"http://www.julien.com" + xmlns:jbp=3D"http://www.jboss.org/portal" + xmlns:h=3D"http://java.sun.com/jsf/html"> = = Property changes on: branches/JBoss_Portal_Branch_2_6/core-admin/src/resour= ces/portal-admin-war/WEB-INF/jsf/editWindow.xhtml ___________________________________________________________________ Name: svn:keywords + LastChangedDate LastChangedBy LastChangedRevision Id Property changes on: branches/JBoss_Portal_Branch_2_6/core-admin/src/resour= ces/portal-admin-war/WEB-INF/jsf/editWindowSecurity.xhtml ___________________________________________________________________ Name: svn:keywords + LastChangedDate LastChangedBy LastChangedRevision Id Property changes on: branches/JBoss_Portal_Branch_2_6/core-admin/src/resour= ces/portal-admin-war/WEB-INF/jsf/editWindowTheme.xhtml ___________________________________________________________________ Name: svn:keywords + LastChangedDate LastChangedBy LastChangedRevision Id Property changes on: branches/JBoss_Portal_Branch_2_6/core-admin/src/resour= ces/portal-admin-war/WEB-INF/jsf/instances.xhtml ___________________________________________________________________ Name: svn:keywords + LastChangedDate LastChangedBy LastChangedRevision Id Modified: branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-= admin-war/WEB-INF/jsf/instancesTemplate.xhtml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-admin-= war/WEB-INF/jsf/instancesTemplate.xhtml 2007-10-27 23:01:46 UTC (rev 8784) +++ branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-admin-= war/WEB-INF/jsf/instancesTemplate.xhtml 2007-10-28 01:09:21 UTC (rev 8785) @@ -21,13 +21,13 @@ - - - + + + = - - Content - + + Content +
Property changes on: branches/JBoss_Portal_Branch_2_6/core-admin/src/resour= ces/portal-admin-war/WEB-INF/jsf/instancesTemplate.xhtml ___________________________________________________________________ Name: svn:keywords + LastChangedDate LastChangedBy LastChangedRevision Id Modified: branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-= admin-war/WEB-INF/jsf/objectNavigation.xhtml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-admin-= war/WEB-INF/jsf/objectNavigation.xhtml 2007-10-27 23:01:46 UTC (rev 8784) +++ branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-admin-= war/WEB-INF/jsf/objectNavigation.xhtml 2007-10-28 01:09:21 UTC (rev 8785) @@ -130,24 +130,26 @@ = - = - - = + + #{objec= t.name} - = + = - - + + @@ -160,11 +162,11 @@ Properties - | | Rename - | | Delete Property changes on: branches/JBoss_Portal_Branch_2_6/core-admin/src/resour= ces/portal-admin-war/WEB-INF/jsf/objectNavigation.xhtml ___________________________________________________________________ Name: svn:keywords + LastChangedDate LastChangedBy LastChangedRevision Id Modified: branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-= admin-war/WEB-INF/jsf/objectTemplate.xhtml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-admin-= war/WEB-INF/jsf/objectTemplate.xhtml 2007-10-27 23:01:46 UTC (rev 8784) +++ branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-admin-= war/WEB-INF/jsf/objectTemplate.xhtml 2007-10-28 01:09:21 UTC (rev 8785) @@ -22,35 +22,35 @@ - - - -
    - - -
  • "/>
  • -
    -
  • - - - - Portals - #{node.name}<= /span> #{node.typeName} - - - -
  • -
    -
-
+ + + +
    + + +
  • "/>
  • +
    +
  • + + + + Portals + #{node.= name} #{node.typeName} + + + +
  • +
    +
+
= - - + + = - - Content -
+ + Content +
Property changes on: branches/JBoss_Portal_Branch_2_6/core-admin/src/resour= ces/portal-admin-war/WEB-INF/jsf/objectTemplate.xhtml ___________________________________________________________________ Name: svn:keywords + LastChangedDate LastChangedBy LastChangedRevision Id Modified: branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-= admin-war/WEB-INF/jsf/objects.xhtml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-admin-= war/WEB-INF/jsf/objects.xhtml 2007-10-27 23:01:46 UTC (rev 8784) +++ branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-admin-= war/WEB-INF/jsf/objects.xhtml 2007-10-28 01:09:21 UTC (rev 8785) @@ -21,7 +21,8 @@ = -

Switch to wizard mode

+

Switch to wizard + mode

= Property changes on: branches/JBoss_Portal_Branch_2_6/core-admin/src/resour= ces/portal-admin-war/WEB-INF/jsf/objects.xhtml ___________________________________________________________________ Name: svn:keywords + LastChangedDate LastChangedBy LastChangedRevision Id Property changes on: branches/JBoss_Portal_Branch_2_6/core-admin/src/resour= ces/portal-admin-war/WEB-INF/jsf/portlets.xhtml ___________________________________________________________________ Name: svn:keywords + LastChangedDate LastChangedBy LastChangedRevision Id Modified: branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-= admin-war/WEB-INF/jsf/portletsTemplate.xhtml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-admin-= war/WEB-INF/jsf/portletsTemplate.xhtml 2007-10-27 23:01:46 UTC (rev 8784) +++ branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-admin-= war/WEB-INF/jsf/portletsTemplate.xhtml 2007-10-28 01:09:21 UTC (rev 8785) @@ -21,13 +21,13 @@ - - - + + + = - - Content - + + Content + Property changes on: branches/JBoss_Portal_Branch_2_6/core-admin/src/resour= ces/portal-admin-war/WEB-INF/jsf/portletsTemplate.xhtml ___________________________________________________________________ Name: svn:keywords + LastChangedDate LastChangedBy LastChangedRevision Id Property changes on: branches/JBoss_Portal_Branch_2_6/core-admin/src/resour= ces/portal-admin-war/WEB-INF/jsf/renameObject.xhtml ___________________________________________________________________ Name: svn:keywords + LastChangedDate LastChangedBy LastChangedRevision Id Modified: branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-= admin-war/WEB-INF/jsf/wizard/newWindowTpl.xhtml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-admin-= war/WEB-INF/jsf/wizard/newWindowTpl.xhtml 2007-10-27 23:01:46 UTC (rev 8784) +++ branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-admin-= war/WEB-INF/jsf/wizard/newWindowTpl.xhtml 2007-10-28 01:09:21 UTC (rev 8785) @@ -10,169 +10,190 @@ =

-Adding a new Portlet + Adding a new Portlet

= - - -
-

Step 1

-

Select Portlet

-
-
- - - - - -
-

Step 1

-

Select Portlet

-
-
-
- -
-

Step 1

-

Select Portlet

-
-
-
-
-
+ + +
+

Step 1

= - - -
-

Step 2

-

Select Portal

-
-
- - - - - -
-

Step 2

-

Select Portal

-
-
-
- -
-

Step 2

-

Select Portal

-
-
-
-
-
+

Select Portlet

+
+
+ + + + + = - - -
-

Step 3

-

Select Page

-
-
- - - - - -
-

Step 3

-

Select Page

-
-
-
- -
-

Step 3

-

Select Page

-
-
-
-
-
+
+

Step 1

= - - -
-

Step 4

-

Select Region

-
-
- - - - - -
-

Step 4

-

Select Region

-
-
-
- -
-

Step 4

-

Select Region

-
-
-
-
-
+

Select Portlet

+
+
+
+ +
+

Step 1

= - - -
-

Step 5

-

Confirm

-
-
- - - - - -
-

Step 5

-

Confirm

-
-
-
- -
-

Step 5

-

Confirm

-
-
-
-
-
+

Select Portlet

+
+
+
+
+
= - - + + +
+

Step 2

= +

Select Portal

+
+
+ + + + + = - -
- Content -
+
+

Step 2

= -
- - - - -
+

Select Portal

+
+
+
+ +
+

Step 2

= +

Select Portal

+
+
+
+
+
+ + + +
+

Step 3

+ +

Select Page

+
+
+ + + + + + +
+

Step 3

+ +

Select Page

+
+
+
+ +
+

Step 3

+ +

Select Page

+
+
+
+
+
+ + + +
+

Step 4

+ +

Select Region

+
+
+ + + + + + +
+

Step 4

+ +

Select Region

+
+
+
+ +
+

Step 4

+ +

Select Region

+
+
+
+
+
+ + + +
+

Step 5

+ +

Confirm

+
+
+ + + + + + +
+

Step 5

+ +

Confirm

+
+
+
+ +
+

Step 5

+ +

Confirm

+
+
+
+
+
+ + + + + + +
+ Content +
+ +
-

Switch to advanced mode

+ +
+ + +

= Switch to advanced mode

+
+ Property changes on: branches/JBoss_Portal_Branch_2_6/core-admin/src/resour= ces/portal-admin-war/WEB-INF/jsf/wizard/newWindowTpl.xhtml ___________________________________________________________________ Name: svn:keywords + LastChangedDate LastChangedBy LastChangedRevision Id Modified: branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-= admin-war/WEB-INF/jsf/wizard/newWindowWizardConfirm.xhtml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-admin-= war/WEB-INF/jsf/wizard/newWindowWizardConfirm.xhtml 2007-10-27 23:01:46 UTC= (rev 8784) +++ branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-admin-= war/WEB-INF/jsf/wizard/newWindowWizardConfirm.xhtml 2007-10-28 01:09:21 UTC= (rev 8785) @@ -4,23 +4,35 @@ xmlns:h=3D"http://java.sun.com/jsf/html" xmlns:f=3D"http://java.sun.com/jsf/core" xmlns:c=3D"http://java.sun.com/jstl/core"> - = + - = - - - - - -
Portlet:#{newWindowWizard.selectedPortlet.na= me.defaultString}
Portal:#{newWindowWizard.selectedPortal.name= }
Page:#{newWindowWizard.selectedPage.name}
Region:#{newWindowWizard.selectedRegionId}
- = - - = - = - - = -
-
- = + + + + + + + + + + + + + + + + + +
Portlet:#{newWindowWizard.selectedPortlet.name.defaultString} +
Portal:#{newWindowWizard.selectedPortal.name}
Page:#{newWindowWizard.selectedPage.name}
Region:#{newWindowWizard.selectedRegionId}
+ + + + + + + + + \ No newline at end of file Property changes on: branches/JBoss_Portal_Branch_2_6/core-admin/src/resour= ces/portal-admin-war/WEB-INF/jsf/wizard/newWindowWizardConfirm.xhtml ___________________________________________________________________ Name: svn:keywords + LastChangedDate LastChangedBy LastChangedRevision Id Modified: branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-= admin-war/WEB-INF/jsf/wizard/selectPage.xhtml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-admin-= war/WEB-INF/jsf/wizard/selectPage.xhtml 2007-10-27 23:01:46 UTC (rev 8784) +++ branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-admin-= war/WEB-INF/jsf/wizard/selectPage.xhtml 2007-10-28 01:09:21 UTC (rev 8785) @@ -17,7 +17,8 @@ - + Property changes on: branches/JBoss_Portal_Branch_2_6/core-admin/src/resour= ces/portal-admin-war/WEB-INF/jsf/wizard/selectPage.xhtml ___________________________________________________________________ Name: svn:keywords + LastChangedDate LastChangedBy LastChangedRevision Id Property changes on: branches/JBoss_Portal_Branch_2_6/core-admin/src/resour= ces/portal-admin-war/WEB-INF/jsf/wizard/selectPortal.xhtml ___________________________________________________________________ Name: svn:keywords + LastChangedDate LastChangedBy LastChangedRevision Id Property changes on: branches/JBoss_Portal_Branch_2_6/core-admin/src/resour= ces/portal-admin-war/WEB-INF/jsf/wizard/selectPortlet.xhtml ___________________________________________________________________ Name: svn:keywords + LastChangedDate LastChangedBy LastChangedRevision Id Property changes on: branches/JBoss_Portal_Branch_2_6/core-admin/src/resour= ces/portal-admin-war/WEB-INF/jsf/wizard/selectRegion.xhtml ___________________________________________________________________ Name: svn:keywords + LastChangedDate LastChangedBy LastChangedRevision Id Property changes on: branches/JBoss_Portal_Branch_2_6/core-admin/src/resour= ces/portal-admin-war/WEB-INF/portal.taglib.xml ___________________________________________________________________ Name: svn:keywords + LastChangedDate LastChangedBy LastChangedRevision Id Property changes on: branches/JBoss_Portal_Branch_2_6/core-admin/src/resour= ces/portal-admin-war/WEB-INF/portlet-instances.xml ___________________________________________________________________ Name: svn:keywords + LastChangedDate LastChangedBy LastChangedRevision Id Property changes on: branches/JBoss_Portal_Branch_2_6/core-admin/src/resour= ces/portal-admin-war/WEB-INF/portlet.xml ___________________________________________________________________ Name: svn:keywords + LastChangedDate LastChangedBy LastChangedRevision Id Property changes on: branches/JBoss_Portal_Branch_2_6/core-admin/src/resour= ces/portal-admin-war/WEB-INF/web.xml ___________________________________________________________________ Name: svn:keywords + LastChangedDate LastChangedBy LastChangedRevision Id Modified: branches/JBoss_Portal_Branch_2_6/core-cms/src/main/org/jboss/port= al/core/cms/CMSConstants.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/core-cms/src/main/org/jboss/portal/cor= e/cms/CMSConstants.java 2007-10-27 23:01:46 UTC (rev 8784) +++ branches/JBoss_Portal_Branch_2_6/core-cms/src/main/org/jboss/portal/cor= e/cms/CMSConstants.java 2007-10-28 01:09:21 UTC (rev 8785) @@ -24,7 +24,7 @@ = /** * @author Julien Viet - * @version $Revision: 1.1 $ + * @version $Revision$ */ public class CMSConstants { Property changes on: branches/JBoss_Portal_Branch_2_6/core-cms/src/main/org= /jboss/portal/core/cms/CMSConstants.java ___________________________________________________________________ Name: svn:keywords + LastChangedDate LastChangedBy LastChangedRevision Id Modified: branches/JBoss_Portal_Branch_2_6/core-cms/src/main/org/jboss/port= al/core/cms/CMSObjectCommandFactory.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/core-cms/src/main/org/jboss/portal/cor= e/cms/CMSObjectCommandFactory.java 2007-10-27 23:01:46 UTC (rev 8784) +++ branches/JBoss_Portal_Branch_2_6/core-cms/src/main/org/jboss/portal/cor= e/cms/CMSObjectCommandFactory.java 2007-10-28 01:09:21 UTC (rev 8785) @@ -22,8 +22,8 @@ *************************************************************************= *****/ package org.jboss.portal.core.cms; = +import org.jboss.portal.core.controller.command.mapper.CommandFactory; import org.jboss.portal.core.model.portal.PortalObjectId; -import org.jboss.portal.core.controller.command.mapper.CommandFactory; = /** * This command mapper is used to map urls to cms content objects Property changes on: branches/JBoss_Portal_Branch_2_6/core-cms/src/main/org= /jboss/portal/core/cms/CMSObjectCommandFactory.java ___________________________________________________________________ Name: svn:keywords + LastChangedDate LastChangedBy LastChangedRevision Id Modified: branches/JBoss_Portal_Branch_2_6/core-cms/src/main/org/jboss/port= al/core/cms/CMSObjectCommandFactoryService.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/core-cms/src/main/org/jboss/portal/cor= e/cms/CMSObjectCommandFactoryService.java 2007-10-27 23:01:46 UTC (rev 8784) +++ branches/JBoss_Portal_Branch_2_6/core-cms/src/main/org/jboss/portal/cor= e/cms/CMSObjectCommandFactoryService.java 2007-10-28 01:09:21 UTC (rev 8785) @@ -22,23 +22,23 @@ *************************************************************************= *****/ package org.jboss.portal.core.cms; = -import org.jboss.portal.core.controller.command.mapper.AbstractCommandFact= ory; +import org.jboss.portal.Mode; +import org.jboss.portal.cms.CMS; +import org.jboss.portal.cms.CMSException; +import org.jboss.portal.cms.Command; +import org.jboss.portal.cms.model.Content; +import org.jboss.portal.cms.model.File; +import org.jboss.portal.core.cms.command.StreamContentCommand; +import org.jboss.portal.core.cms.ui.CMSPortlet; import org.jboss.portal.core.controller.ControllerCommand; import org.jboss.portal.core.controller.ControllerContext; +import org.jboss.portal.core.controller.command.mapper.AbstractCommandFact= ory; import org.jboss.portal.core.model.portal.PortalObjectId; import org.jboss.portal.core.model.portal.PortalObjectPath; import org.jboss.portal.core.model.portal.command.action.InvokePortletWind= owRenderCommand; -import org.jboss.portal.core.cms.command.StreamContentCommand; -import org.jboss.portal.core.cms.ui.CMSPortlet; -import org.jboss.portal.cms.CMS; -import org.jboss.portal.cms.Command; -import org.jboss.portal.cms.CMSException; -import org.jboss.portal.cms.model.File; -import org.jboss.portal.cms.model.Content; +import org.jboss.portal.portlet.PortletParametersStateString; +import org.jboss.portal.server.ServerInvocation; import org.jboss.portal.server.config.ServerConfig; -import org.jboss.portal.server.ServerInvocation; -import org.jboss.portal.portlet.PortletParametersStateString; -import org.jboss.portal.Mode; = import java.util.Locale; = @@ -165,21 +165,21 @@ } catch (CMSException e) { - if(e.toString().indexOf("Access to this resource is denied")!=3D= -1) - { - PortletParametersStateString parameters =3D new PortletParam= etersStateString(); - parameters.setValue("path", requestPath); - return new InvokePortletWindowRenderCommand(targetWindowId, = Mode.VIEW, null, parameters); - } - else - { - log.error("CMS error", e); - } + if (e.toString().indexOf("Access to this resource is denied") != =3D -1) + { + PortletParametersStateString parameters =3D new PortletParamet= ersStateString(); + parameters.setValue("path", requestPath); + return new InvokePortletWindowRenderCommand(targetWindowId, Mo= de.VIEW, null, parameters); + } + else + { + log.error("CMS error", e); + } } = return null; // TODO: 404? } - = + private boolean isStreamable(String mimeType) { return (!"text/html".equalsIgnoreCase(mimeType) && !"text/plain".equ= alsIgnoreCase(mimeType)); Property changes on: branches/JBoss_Portal_Branch_2_6/core-cms/src/main/org= /jboss/portal/core/cms/CMSObjectCommandFactoryService.java ___________________________________________________________________ Name: svn:keywords + LastChangedDate LastChangedBy LastChangedRevision Id Modified: branches/JBoss_Portal_Branch_2_6/core-cms/src/main/org/jboss/port= al/core/cms/CMSObjectURLFactory.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/core-cms/src/main/org/jboss/portal/cor= e/cms/CMSObjectURLFactory.java 2007-10-27 23:01:46 UTC (rev 8784) +++ branches/JBoss_Portal_Branch_2_6/core-cms/src/main/org/jboss/portal/cor= e/cms/CMSObjectURLFactory.java 2007-10-28 01:09:21 UTC (rev 8785) @@ -22,17 +22,17 @@ *************************************************************************= *****/ package org.jboss.portal.core.cms; = +import org.jboss.portal.core.cms.command.StreamContentCommand; import org.jboss.portal.core.controller.ControllerCommand; import org.jboss.portal.core.controller.ControllerContext; import org.jboss.portal.core.controller.command.mapper.URLFactoryDelegate; -import org.jboss.portal.core.cms.command.StreamContentCommand; import org.jboss.portal.server.AbstractServerURL; import org.jboss.portal.server.ServerInvocation; import org.jboss.portal.server.ServerURL; = /** * @author Julien Viet - * @version $Revision: 6007 $ + * @version $Revision$ */ public class CMSObjectURLFactory extends URLFactoryDelegate { Property changes on: branches/JBoss_Portal_Branch_2_6/core-cms/src/main/org= /jboss/portal/core/cms/CMSObjectURLFactory.java ___________________________________________________________________ Name: svn:keywords + LastChangedDate LastChangedBy LastChangedRevision Id Modified: branches/JBoss_Portal_Branch_2_6/core-cms/src/main/org/jboss/port= al/core/cms/aspect/IdentityBindingInterceptor.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/core-cms/src/main/org/jboss/portal/cor= e/cms/aspect/IdentityBindingInterceptor.java 2007-10-27 23:01:46 UTC (rev 8= 784) +++ branches/JBoss_Portal_Branch_2_6/core-cms/src/main/org/jboss/portal/cor= e/cms/aspect/IdentityBindingInterceptor.java 2007-10-28 01:09:21 UTC (rev 8= 785) @@ -22,16 +22,16 @@ *************************************************************************= *****/ package org.jboss.portal.core.cms.aspect; = +import org.jboss.portal.cms.impl.jcr.JCRCMS; +import org.jboss.portal.common.invocation.InvocationException; +import org.jboss.portal.core.aspects.server.UserInterceptor; import org.jboss.portal.identity.User; -import org.jboss.portal.cms.impl.jcr.JCRCMS; import org.jboss.portal.server.ServerInterceptor; import org.jboss.portal.server.ServerInvocation; -import org.jboss.portal.common.invocation.InvocationException; -import org.jboss.portal.core.aspects.server.UserInterceptor; = /** * @author Julien Viet - * @version $Revision: 1.1 $ + * @version $Revision$ */ public class IdentityBindingInterceptor extends ServerInterceptor { Property changes on: branches/JBoss_Portal_Branch_2_6/core-cms/src/main/org= /jboss/portal/core/cms/aspect/IdentityBindingInterceptor.java ___________________________________________________________________ Name: svn:keywords + LastChangedDate LastChangedBy LastChangedRevision Id Property changes on: branches/JBoss_Portal_Branch_2_6/core-cms/src/main/org= /jboss/portal/core/cms/command/StreamContentCommand.java ___________________________________________________________________ Name: svn:keywords + LastChangedDate LastChangedBy LastChangedRevision Id Modified: branches/JBoss_Portal_Branch_2_6/core-cms/src/main/org/jboss/port= al/core/cms/content/InternalCMSContentProvider.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/core-cms/src/main/org/jboss/portal/cor= e/cms/content/InternalCMSContentProvider.java 2007-10-27 23:01:46 UTC (rev = 8784) +++ branches/JBoss_Portal_Branch_2_6/core-cms/src/main/org/jboss/portal/cor= e/cms/content/InternalCMSContentProvider.java 2007-10-28 01:09:21 UTC (rev = 8785) @@ -22,17 +22,17 @@ *************************************************************************= *****/ package org.jboss.portal.core.cms.content; = +import org.jboss.portal.Mode; +import org.jboss.portal.core.cms.CMSObjectCommandFactory; import org.jboss.portal.core.impl.model.content.generic.InternalGenericCon= tentProvider; +import org.jboss.portal.core.model.content.spi.portlet.ContentPortlet; +import org.jboss.portal.core.model.portal.PortalObjectId; import org.jboss.portal.core.model.portal.command.render.RenderWindowComma= nd; -import org.jboss.portal.core.model.portal.PortalObjectId; import org.jboss.portal.core.model.portal.content.WindowRendition; -import org.jboss.portal.core.model.content.spi.portlet.ContentPortlet; -import org.jboss.portal.core.cms.CMSObjectCommandFactory; -import org.jboss.portal.Mode; = /** * @author Julien Viet - * @version $Revision: 1.1 $ + * @version $Revision$ */ public class InternalCMSContentProvider extends InternalGenericContentProv= ider { Property changes on: branches/JBoss_Portal_Branch_2_6/core-cms/src/main/org= /jboss/portal/core/cms/content/InternalCMSContentProvider.java ___________________________________________________________________ Name: svn:keywords + LastChangedDate LastChangedBy LastChangedRevision Id Property changes on: branches/JBoss_Portal_Branch_2_6/core-cms/src/main/org= /jboss/portal/core/cms/servlet/CMSExportServlet.java ___________________________________________________________________ Name: svn:keywords + LastChangedDate LastChangedBy LastChangedRevision Id Property changes on: branches/JBoss_Portal_Branch_2_6/core-cms/src/main/org= /jboss/portal/core/cms/servlet/CMSPreviewServlet.java ___________________________________________________________________ Name: svn:keywords + LastChangedDate LastChangedBy LastChangedRevision Id Modified: branches/JBoss_Portal_Branch_2_6/core-cms/src/main/org/jboss/port= al/core/cms/ui/CMSPortlet.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/core-cms/src/main/org/jboss/portal/cor= e/cms/ui/CMSPortlet.java 2007-10-27 23:01:46 UTC (rev 8784) +++ branches/JBoss_Portal_Branch_2_6/core-cms/src/main/org/jboss/portal/cor= e/cms/ui/CMSPortlet.java 2007-10-28 01:09:21 UTC (rev 8785) @@ -22,26 +22,6 @@ *************************************************************************= *****/ package org.jboss.portal.core.cms.ui; = -import java.io.IOException; -import java.io.PrintWriter; -import java.lang.reflect.UndeclaredThrowableException; -import java.util.Locale; -import java.util.regex.Matcher; -import java.util.regex.Pattern; - -import javax.portlet.GenericPortlet; -import javax.portlet.PortletException; -import javax.portlet.PortletPreferences; -import javax.portlet.PortletRequestDispatcher; -import javax.portlet.PortletSecurityException; -import javax.portlet.PortletURL; -import javax.portlet.RenderRequest; -import javax.portlet.RenderResponse; -import javax.portlet.PortletConfig; -import javax.portlet.ActionRequest; -import javax.portlet.ActionResponse; -import javax.portlet.PortletMode; - import org.apache.log4j.Logger; import org.jboss.portal.cms.CMS; import org.jboss.portal.cms.CMSException; @@ -50,21 +30,40 @@ import org.jboss.portal.cms.search.CMSFederatedSearch; import org.jboss.portal.cms.util.FileUtil; import org.jboss.portal.core.cms.CMSConstants; +import org.jboss.portal.core.cms.command.StreamContentCommand; import org.jboss.portal.core.cms.content.InternalCMSContentProvider; import org.jboss.portal.core.cms.ui.admin.CMSContentEditorPortlet; -import org.jboss.portal.core.cms.command.StreamContentCommand; import org.jboss.portal.core.controller.ControllerContext; import org.jboss.portal.search.federation.SearchFederation; import org.jboss.portal.server.request.URLContext; import org.jboss.portal.server.request.URLFormat; import org.jboss.portlet.JBossRenderRequest; = +import javax.portlet.ActionRequest; +import javax.portlet.ActionResponse; +import javax.portlet.GenericPortlet; +import javax.portlet.PortletConfig; +import javax.portlet.PortletException; +import javax.portlet.PortletMode; +import javax.portlet.PortletPreferences; +import javax.portlet.PortletRequestDispatcher; +import javax.portlet.PortletSecurityException; +import javax.portlet.PortletURL; +import javax.portlet.RenderRequest; +import javax.portlet.RenderResponse; +import java.io.IOException; +import java.io.PrintWriter; +import java.lang.reflect.UndeclaredThrowableException; +import java.util.Locale; +import java.util.regex.Matcher; +import java.util.regex.Pattern; + /** * Displays content from the CMS. * * @author Roy Russo * @author Julien Viet - * @version $Revision: 6007 $ + * @version $Revision$ *

* TODO: use portlet preferences for default homepage, and allow = for preference modification in doEdit() */ @@ -347,17 +346,13 @@ return content; } = - /** - * Creates CMS urls which is used for image src calls from the html. - */ + /** Creates CMS urls which is used for image src calls from the html. */ protected abstract static class URLFactory { public abstract String createURL(String path); } = - /** - * Implementation that uses a PortletURL object. - */ + /** Implementation that uses a PortletURL object. */ protected static class LocalURLFactory extends URLFactory { = @@ -376,9 +371,7 @@ } } = - /** - * Implementation that routes thru the CMSObjectCommandMapper. - */ + /** Implementation that routes thru the CMSObjectCommandMapper. */ protected static class GlobalURLFactory extends URLFactory { = Property changes on: branches/JBoss_Portal_Branch_2_6/core-cms/src/main/org= /jboss/portal/core/cms/ui/CMSPortlet.java ___________________________________________________________________ Name: svn:keywords + LastChangedDate LastChangedBy LastChangedRevision Id Modified: branches/JBoss_Portal_Branch_2_6/core-cms/src/main/org/jboss/port= al/core/cms/ui/admin/CMSAdminConstants.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/core-cms/src/main/org/jboss/portal/cor= e/cms/ui/admin/CMSAdminConstants.java 2007-10-27 23:01:46 UTC (rev 8784) +++ branches/JBoss_Portal_Branch_2_6/core-cms/src/main/org/jboss/portal/cor= e/cms/ui/admin/CMSAdminConstants.java 2007-10-28 01:09:21 UTC (rev 8785) @@ -105,6 +105,6 @@ public static final String OP_VIEWPENDING =3D "view_pending_items"; = public static final String OP_VIEWSEARCHRESULTS =3D "view_search_result= s"; - = + public static final String OP_CREATEFILE_VALIDATION_ERROR =3D "create_f= ile_validation_error"; } Property changes on: branches/JBoss_Portal_Branch_2_6/core-cms/src/main/org= /jboss/portal/core/cms/ui/admin/CMSAdminConstants.java ___________________________________________________________________ Name: svn:keywords + LastChangedDate LastChangedBy LastChangedRevision Id Modified: branches/JBoss_Portal_Branch_2_6/core-cms/src/main/org/jboss/port= al/core/cms/ui/admin/CMSAdminPortlet.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/core-cms/src/main/org/jboss/portal/cor= e/cms/ui/admin/CMSAdminPortlet.java 2007-10-27 23:01:46 UTC (rev 8784) +++ branches/JBoss_Portal_Branch_2_6/core-cms/src/main/org/jboss/portal/cor= e/cms/ui/admin/CMSAdminPortlet.java 2007-10-28 01:09:21 UTC (rev 8785) @@ -22,26 +22,6 @@ *************************************************************************= *****/ package org.jboss.portal.core.cms.ui.admin; = -import java.io.IOException; -import java.io.InputStream; -import java.io.PrintWriter; -import java.util.ArrayList; -import java.util.Collection; -import java.util.Date; -import java.util.HashSet; -import java.util.Iterator; -import java.util.List; -import java.util.Locale; -import java.util.Set; -import java.util.Vector; - -import javax.naming.InitialContext; -import javax.portlet.PortletException; -import javax.portlet.PortletRequest; -import javax.portlet.PortletRequestDispatcher; -import javax.portlet.PortletSession; -import javax.portlet.UnavailableException; - import org.apache.commons.fileupload.FileItem; import org.apache.commons.fileupload.disk.DiskFileItemFactory; import org.apache.commons.fileupload.portlet.PortletFileUpload; @@ -85,6 +65,25 @@ import org.jboss.portlet.JBossRenderRequest; import org.jboss.portlet.JBossRenderResponse; = +import javax.naming.InitialContext; +import javax.portlet.PortletException; +import javax.portlet.PortletRequest; +import javax.portlet.PortletRequestDispatcher; +import javax.portlet.PortletSession; +import javax.portlet.UnavailableException; +import java.io.IOException; +import java.io.InputStream; +import java.io.PrintWriter; +import java.util.ArrayList; +import java.util.Collection; +import java.util.Date; +import java.util.HashSet; +import java.util.Iterator; +import java.util.List; +import java.util.Locale; +import java.util.Set; +import java.util.Vector; + /** * @author Roy Russo * @author Thomas Heute @@ -98,8 +97,8 @@ private MembershipModule membershipModule; private ApprovePublish approvePublish; private AuthorizationManager authorizationManager; - = = + public void init() throws PortletException { CMSService =3D (CMS)getPortletContext().getAttribute("CMS"); @@ -124,12 +123,12 @@ { throw new PortletException("No membership module"); } - if(this.authorizationManager =3D=3D null) + if (this.authorizationManager =3D=3D null) { - throw new PortletException("Authorization Service not found"); + throw new PortletException("Authorization Service not found"); } = - this.initializeApprovePublishWorkflow(); = + this.initializeApprovePublishWorkflow(); } = protected void doView(final JBossRenderRequest rReq, final JBossRenderR= esponse rRes) @@ -209,19 +208,19 @@ rReq.setAttribute("folders", folders); rReq.setAttribute("files", files); rReq.setAttribute("currpath", sPath); - = + //manage workflow accessibility check boolean isWorkflowManagementAccessible =3D this.isWorkflowManagem= entAccessible(rReq); boolean isWorkflowActivated =3D this.CMSService.isWorkflowActivat= ed(); - if(isWorkflowManagementAccessible && isWorkflowActivated) + if (isWorkflowManagementAccessible && isWorkflowActivated) { - rReq.setAttribute("manageWorkflowAccessible", new Boolean(true)); + rReq.setAttribute("manageWorkflowAccessible", new Boolean(true= )); } else { - rReq.setAttribute("manageWorkflowAccessible", new Boolean(false)= ); + rReq.setAttribute("manageWorkflowAccessible", new Boolean(fals= e)); } - = + javax.portlet.PortletRequestDispatcher prd =3D getPortletContext(= ).getRequestDispatcher(CMSAdminConstants.CMS_JSP_PATH + "/main.jsp"); prd.include(rReq, rRes); } @@ -289,31 +288,31 @@ rRes.setContentType("text/html"); rReq.setAttribute("currpath", sPath); rReq.setAttribute("contents", contents); - = + //manage workflow accessibility check boolean isWorkflowManagementAccessible =3D this.isWorkflowManagem= entAccessible(rReq); boolean isWorkflowActivated =3D this.CMSService.isWorkflowActivat= ed(); - if(isWorkflowManagementAccessible && isWorkflowActivated) + if (isWorkflowManagementAccessible && isWorkflowActivated) { - rReq.setAttribute("manageWorkflowAccessible", new Boolean(true)); + rReq.setAttribute("manageWorkflowAccessible", new Boolean(true= )); } else { - rReq.setAttribute("manageWorkflowAccessible", new Boolean(false)= ); + rReq.setAttribute("manageWorkflowAccessible", new Boolean(fals= e)); } - = + javax.portlet.PortletRequestDispatcher prd =3D getPortletContext(= ).getRequestDispatcher(CMSAdminConstants.CMS_JSP_PATH + "/viewfile.jsp"); prd.include(rReq, rRes); } else if (CMSAdminConstants.OP_VIEWSEARCHRESULTS.equals(op)) { rRes.setContentType("text/html"); - = + String textQuery =3D rReq.getParameter("search"); FederatedQuery query =3D new FederatedQuery(textQuery); - = - JCRQueryConverter converter =3D new JCRQueryConverter(); = - = + + JCRQueryConverter converter =3D new JCRQueryConverter(); + List files; try { @@ -394,7 +393,8 @@ javax.portlet.PortletRequestDispatcher prd =3D getPortletContext(= ).getRequestDispatcher(CMSAdminConstants.CMS_JSP_PATH + "/editbinary.jsp"); prd.include(rReq, rRes); } - else if (CMSAdminConstants.OP_CREATENEWTEXT.equals(op) || CMSAdminCo= nstants.OP_CREATEFILE_VALIDATION_ERROR.equals(op)) + else + if (CMSAdminConstants.OP_CREATENEWTEXT.equals(op) || CMSAdminConstan= ts.OP_CREATEFILE_VALIDATION_ERROR.equals(op)) { String sPath =3D rReq.getParameter("path"); = @@ -425,28 +425,28 @@ rRes.setContentType("text/html"); rReq.setAttribute("currpath", sPath); rReq.setAttribute("document_base_url", sbUrl.toString() + this.bu= ildURL(rReq, "/")); - = + //If a validation error occurred, re-populate data already submit= ted - if(rReq.getParameter("error:content") !=3D null) + if (rReq.getParameter("error:content") !=3D null) { rReq.setAttribute("error:content", rReq.getParameter("error:co= ntent")); } - if(rReq.getParameter("error:description") !=3D null) + if (rReq.getParameter("error:description") !=3D null) { rReq.setAttribute("error:description", rReq.getParameter("erro= r:description")); } - if(rReq.getParameter("error:title") !=3D null) + if (rReq.getParameter("error:title") !=3D null) { rReq.setAttribute("error:title", rReq.getParameter("error:titl= e")); } - if(rReq.getParameter("error:language") !=3D null) + if (rReq.getParameter("error:language") !=3D null) { rReq.setAttribute("error:language", rReq.getParameter("error:l= anguage")); } - = + javax.portlet.PortletRequestDispatcher prd =3D getPortletContext(= ).getRequestDispatcher(CMSAdminConstants.CMS_JSP_PATH + "/create.jsp"); prd.include(rReq, rRes); - } = + } else if (CMSAdminConstants.OP_EDIT.equals(op)) { String sPath =3D rReq.getParameter("path"); @@ -559,7 +559,7 @@ = String uri =3D this.authorizationManager.getProvider().getCrit= eriaURI("path", sPath); Collection permissions =3D this.authorizationManager.getProvid= er(). - getSecurityBindings(uri); + getSecurityBindings(uri); = readRoleSet =3D this.processRolePermissions(permissions, "read= "); readUserSet =3D this.processUserPermissions(permissions, "read= "); @@ -620,7 +620,7 @@ = javax.portlet.PortletRequestDispatcher prd =3D getPortletContext(= ).getRequestDispatcher(CMSAdminConstants.CMS_JSP_PATH + "/pending_items.jsp= "); prd.include(rReq, rRes); - } = + } } = public void processAction(final JBossActionRequest aReq, final JBossAct= ionResponse aRes) throws PortletException @@ -786,7 +786,7 @@ } else if (CMSAdminConstants.OP_DOSEARCH.equals(op)) { - String search =3D (String) aReq.getParameter("search"); + String search =3D (String)aReq.getParameter("search"); = aRes.setRenderParameter("search", search); aRes.setRenderParameter("op", CMSAdminConstants.OP_VIEWSEARCHR= ESULTS); @@ -1006,27 +1006,27 @@ String sTitle =3D aReq.getParameter("title"); String sDescription =3D aReq.getParameter("description"); String sLanguage =3D aReq.getParameter("language"); - = + //Perform server side data validation - if(sFileName =3D=3D null || sFileName.trim().length() =3D=3D 0) + if (sFileName =3D=3D null || sFileName.trim().length() =3D=3D = 0) { //Validation Error occurred //FileName should not be empty aRes.setRenderParameter("op", CMSAdminConstants.OP_CREATEFI= LE_VALIDATION_ERROR); - = + //set render parameters here aRes.setRenderParameter("path", sDirectory); - = + //used to remember the data already submitted by the user aRes.setRenderParameter("error:content", aReq.getParameter(= "elm1")); aRes.setRenderParameter("error:description", aReq.getParame= ter("description")); aRes.setRenderParameter("error:title", aReq.getParameter("t= itle")); aRes.setRenderParameter("error:language", aReq.getParameter= ("language")); - = + return; } - = - = + + if (!"".equals(sFileName) && !"".equals(sDirectory)) { String sContent =3D aReq.getParameter("elm1"); @@ -1069,7 +1069,7 @@ CMSService.execute(newFileCMD); } aRes.setRenderParameter("path", sNewFilePath); - } = + } = aRes.setRenderParameter("op", CMSAdminConstants.OP_VIEWFILE); } @@ -1196,15 +1196,15 @@ //show an error message on the pending item screen aRes.setRenderParameter("path", aReq.getParameter("path")); aRes.setRenderParameter("exception", e.getMessage()); - = + String from =3D aReq.getParameter("from"); - if(from =3D=3D null || from.trim().length()=3D=3D0) + if (from =3D=3D null || from.trim().length() =3D=3D 0) { - aRes.setRenderParameter("op", CMSAdminConstants.OP_VIEWPEN= DING); + aRes.setRenderParameter("op", CMSAdminConstants.OP_VIEWP= ENDING); } else { - aRes.setRenderParameter("op", from); + aRes.setRenderParameter("op", from); } return; } @@ -1213,42 +1213,42 @@ } else if (CMSAdminConstants.OP_DENY.equals(op)) { - String sManager =3D aReq.getUser().getUserName(); - String sPID =3D aReq.getParameter("pid"); - try - { - this.getApprovePublish().processManagerResponse(Long.parse= Long(sPID), sManager, false); - } - catch (Exception e) - { - //show an error message on the pending item screen - aRes.setRenderParameter("path", aReq.getParameter("path")= ); - aRes.setRenderParameter("exception", e.getMessage()); - = - String from =3D aReq.getParameter("from"); - if(from =3D=3D null || from.trim().length()=3D=3D0) - { - aRes.setRenderParameter("op", CMSAdminConstants.OP_VIEWP= ENDING); - } - else - { - aRes.setRenderParameter("op", from); - } - return; - } - aRes.setRenderParameter("path", aReq.getParameter("path")); - aRes.setRenderParameter("op", CMSAdminConstants.OP_VIEWFILE); + String sManager =3D aReq.getUser().getUserName(); + String sPID =3D aReq.getParameter("pid"); + try + { + this.getApprovePublish().processManagerResponse(Long.parseL= ong(sPID), sManager, false); + } + catch (Exception e) + { + //show an error message on the pending item screen + aRes.setRenderParameter("path", aReq.getParameter("path")); + aRes.setRenderParameter("exception", e.getMessage()); + + String from =3D aReq.getParameter("from"); + if (from =3D=3D null || from.trim().length() =3D=3D 0) + { + aRes.setRenderParameter("op", CMSAdminConstants.OP_VIEWP= ENDING); + } + else + { + aRes.setRenderParameter("op", from); + } + return; + } + aRes.setRenderParameter("path", aReq.getParameter("path")); + aRes.setRenderParameter("op", CMSAdminConstants.OP_VIEWFILE); } - else if(CMSAdminConstants.OP_MAKELIVE.equals(op)) + else if (CMSAdminConstants.OP_MAKELIVE.equals(op)) { String path =3D aReq.getParameter("path"); String language =3D aReq.getParameter("language"); String version =3D aReq.getParameter("version"); - = + //Perform the change in live version here = Command makeLiveCommand =3D CMSService.getCommandFactory().cre= ateMakeLiveVersionCommand(path, language, version); CMSService.execute(makeLiveCommand); - = + aRes.setRenderParameter("path", path); aRes.setRenderParameter("op", CMSAdminConstants.OP_VIEWFILE); } @@ -1280,8 +1280,7 @@ = /** * Rewrites urls. Typically, this is used for image src calls from the = html, so they route thru the - * CMSObjectCommandMapper and invoke the StreamObjectCommand. - * TODO : need to make this not a hack + * CMSObjectCommandMapper and invoke the StreamObjectCommand. TODO : ne= ed to make this not a hack */ public String buildURL(JBossRenderRequest req, String path) { @@ -1376,7 +1375,7 @@ permission.setUsers(usersSet); Set securityBinding =3D new HashSet(); securityBinding.add(permission); - this.authorizationManager.getProvider().setSecurityBindings(null,sec= urityBinding); + this.authorizationManager.getProvider().setSecurityBindings(null, se= curityBinding); } = /** @@ -1492,33 +1491,30 @@ return false; } } - = - /** - * = - * @return - */ + + /** @return */ private boolean isWorkflowManagementAccessible(JBossRenderRequest rende= rRequest) { - boolean isAccessible =3D false; + boolean isAccessible =3D false; = - User user =3D renderRequest.getUser(); - try - { - user =3D userModule.findUserById(user.getId()); - } - catch (Exception e) - { - return false; - } + User user =3D renderRequest.getUser(); + try + { + user =3D userModule.findUserById(user.getId()); + } + catch (Exception e) + { + return false; + } = - PortalCMSSecurityContext securityContext =3D new PortalCMSSecurityCon= text(user); - securityContext.setAttribute("manageWorkflow", "true"); - securityContext.setAttribute("approvePublish", getApprovePublish()); - = - PortalPermission cmsPermission =3D new CMSPermission(securityContext); - isAccessible =3D this.authorizationManager.checkPermission(cmsPermissio= n); - = - return isAccessible; + PortalCMSSecurityContext securityContext =3D new PortalCMSSecurityCo= ntext(user); + securityContext.setAttribute("manageWorkflow", "true"); + securityContext.setAttribute("approvePublish", getApprovePublish()); + + PortalPermission cmsPermission =3D new CMSPermission(securityContext= ); + isAccessible =3D this.authorizationManager.checkPermission(cmsPermis= sion); + + return isAccessible; } = /** @return */ @@ -1548,10 +1544,10 @@ { this.approvePublish =3D approvePublish; } - = + /** - * = * + * */ private void initializeAuthorizationManager() { Property changes on: branches/JBoss_Portal_Branch_2_6/core-cms/src/main/org= /jboss/portal/core/cms/ui/admin/CMSAdminPortlet.java ___________________________________________________________________ Name: svn:keywords + LastChangedDate LastChangedBy LastChangedRevision Id Modified: branches/JBoss_Portal_Branch_2_6/core-cms/src/main/org/jboss/port= al/core/cms/ui/admin/CMSContentEditorPortlet.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/core-cms/src/main/org/jboss/portal/cor= e/cms/ui/admin/CMSContentEditorPortlet.java 2007-10-27 23:01:46 UTC (rev 87= 84) +++ branches/JBoss_Portal_Branch_2_6/core-cms/src/main/org/jboss/portal/cor= e/cms/ui/admin/CMSContentEditorPortlet.java 2007-10-28 01:09:21 UTC (rev 87= 85) @@ -22,11 +22,10 @@ *************************************************************************= *****/ package org.jboss.portal.core.cms.ui.admin; = -import java.io.IOException; -import java.util.HashMap; -import java.util.List; -import java.util.Locale; -import java.util.Map; +import org.jboss.portal.cms.CMS; +import org.jboss.portal.cms.Command; +import org.jboss.portal.cms.model.Content; +import org.jboss.portal.cms.model.Folder; = import javax.portlet.ActionRequest; import javax.portlet.ActionResponse; @@ -36,12 +35,12 @@ import javax.portlet.PortletSecurityException; import javax.portlet.RenderRequest; import javax.portlet.RenderResponse; +import java.io.IOException; +import java.util.HashMap; +import java.util.List; +import java.util.Locale; +import java.util.Map; = -import org.jboss.portal.cms.CMS; -import org.jboss.portal.cms.Command; -import org.jboss.portal.cms.model.Content; -import org.jboss.portal.cms.model.Folder; - /** * @author Thomas Heute * @version $Revision$ @@ -54,7 +53,7 @@ = /** . */ private static final PortletMode EDIT_CONTENT =3D new PortletMode("edit= _content"); - = + public void init() throws PortletException { cmsService =3D (CMS)getPortletContext().getAttribute("CMS"); @@ -124,15 +123,15 @@ { Command getContentCMD =3D cmsService.getCommandFactory().createCo= ntentGetCommand(contentUri, null, req.getLocale()); Content content =3D (Content)cmsService.execute(getContentCMD); - = + if (content =3D=3D null) { getContentCMD =3D cmsService.getCommandFactory().createContent= GetCommand(contentUri, null, new Locale(cmsService.getDefaultLocale())); content =3D (Content)cmsService.execute(getContentCMD); } - req.setAttribute("content" , content); + req.setAttribute("content", content); } - = + javax.portlet.PortletRequestDispatcher prd =3D getPortletContext().g= etRequestDispatcher(CMSEditorConstants.CMS_EDITOR_JSP_PATH + "/main.jsp"); prd.include(req, resp); } Property changes on: branches/JBoss_Portal_Branch_2_6/core-cms/src/main/org= /jboss/portal/core/cms/ui/admin/CMSContentEditorPortlet.java ___________________________________________________________________ Name: svn:keywords + LastChangedDate LastChangedBy LastChangedRevision Id Property changes on: branches/JBoss_Portal_Branch_2_6/core-cms/src/main/org= /jboss/portal/core/cms/ui/admin/CMSEditorConstants.java ___________________________________________________________________ Name: svn:keywords + LastChangedDate LastChangedBy LastChangedRevision Id Modified: branches/JBoss_Portal_Branch_2_6/core-cms/src/resources/portal-cm= s-sar/META-INF/jboss-service.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/core-cms/src/resources/portal-cms-sar/= META-INF/jboss-service.xml 2007-10-27 23:01:46 UTC (rev 8784) +++ branches/JBoss_Portal_Branch_2_6/core-cms/src/resources/portal-cms-sar/= META-INF/jboss-service.xml 2007-10-28 01:09:21 UTC (rev 8785) @@ -37,8 +37,8 @@ --> - = - portal:service=3DHibernate,type=3DCMS cms.pm.cache:service=3DTreeCache portal:service=3DModule,type=3DIdentityServiceControlle= r - = + - = + portal:service=3DInterceptorStackFactory,type=3DCms true portal/cms/conf/default-c= ontent/default/ @@ -132,7 +132,7 @@ = - + @@ -270,7 +270,7 @@ name=3D"cms.pm.cache:service=3DTreeCache"> = jboss:service=3DNaming jboss:service=3DTransactionManager - portal:service=3DHibernate,type=3DCMS = = + portal:service=3DHibernate,type=3DCMS @@ -434,7 +434,7 @@ false false - = + portal:service=3DInterceptor,type=3DCms,nam= e=3DACL portal:service=3DInterceptor,type=3DCms,nam= e=3DApprovalWorkflow - = - = + + = portal:service=3DModule,type=3DIdentityServiceControlle= r = - = + portal:service=3DHibernate,type=3DCMS portal:service=3DModule,type=3DIdentityServiceController = - = + portal:service=3DPortalAuthorizationMana= gerFactory - = - = + + portal:service=3DModule,type=3DIdentityServiceController - = + Admin - java:portal/ApprovePublishWorkflow = - = - = - = + java:portal/ApprovePublishWorkflow + + + = = Property changes on: branches/JBoss_Portal_Branch_2_6/core-cms/src/resource= s/portal-cms-sar/META-INF/jboss-service.xml ___________________________________________________________________ Name: svn:keywords + LastChangedDate LastChangedBy LastChangedRevision Id Modified: branches/JBoss_Portal_Branch_2_6/core-cms/src/resources/portal-cm= s-sar/conf/hibernate/cms/domain.hbm.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/core-cms/src/resources/portal-cms-sar/= conf/hibernate/cms/domain.hbm.xml 2007-10-27 23:01:46 UTC (rev 8784) +++ branches/JBoss_Portal_Branch_2_6/core-cms/src/resources/portal-cms-sar/= conf/hibernate/cms/domain.hbm.xml 2007-10-28 01:09:21 UTC (rev 8785) @@ -274,103 +274,103 @@ type=3D"long" not-null=3D"true"/> - = + = + name=3D"id" + column=3D"ID" + type=3D"java.lang.Long"> = + name=3D"roleId" + column=3D"ROLE_ID" + type=3D"string" + not-null=3D"true" + /> = + name=3D"id" + column=3D"ID" + type=3D"java.lang.Long"> = + name=3D"userId" + column=3D"USER_ID" + type=3D"string" + not-null=3D"true" + /> = + name=3D"id" + column=3D"ID" + type=3D"java.lang.Long"> + name=3D"name" + column=3D"NAME" + type=3D"string" + not-null=3D"true" + /> = + name=3D"value" + column=3D"VALUE" + type=3D"string" + not-null=3D"true" + /> = + name=3D"id" + column=3D"ID" + type=3D"java.lang.Long"> - - + + = - - + + = - - + + = + name=3D"service" + column=3D"NAME" + type=3D"string" + not-null=3D"true" + /> + name=3D"action" + column=3D"ACTION" + type=3D"string" + not-null=3D"true" + /> = + name=3D"negated" + column=3D"NEGATED" + type=3D"boolean" + not-null=3D"true" + /> = Property changes on: branches/JBoss_Portal_Branch_2_6/core-cms/src/resource= s/portal-cms-sar/conf/hibernate/cms/domain.hbm.xml ___________________________________________________________________ Name: svn:keywords + LastChangedDate LastChangedBy LastChangedRevision Id Property changes on: branches/JBoss_Portal_Branch_2_6/core-cms/src/resource= s/portal-cms-sar/conf/hibernate/cms/ehcache.xml ___________________________________________________________________ Name: svn:keywords + LastChangedDate LastChangedBy LastChangedRevision Id Modified: branches/JBoss_Portal_Branch_2_6/core-cms/src/resources/portal-cm= s-sar/conf/hibernate/cms/hibernate.cfg.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/core-cms/src/resources/portal-cms-sar/= conf/hibernate/cms/hibernate.cfg.xml 2007-10-27 23:01:46 UTC (rev 8784) +++ branches/JBoss_Portal_Branch_2_6/core-cms/src/resources/portal-cms-sar/= conf/hibernate/cms/hibernate.cfg.xml 2007-10-28 01:09:21 UTC (rev 8785) @@ -28,8 +28,8 @@ java:@portal.datasource.nam= e@ - @portal.sql.show@ = - = + @portal.sql.show@ + true true Property changes on: branches/JBoss_Portal_Branch_2_6/core-cms/src/resource= s/portal-cms-sar/conf/hibernate/cms/hibernate.cfg.xml ___________________________________________________________________ Name: svn:keywords + LastChangedDate LastChangedBy LastChangedRevision Id Property changes on: branches/JBoss_Portal_Branch_2_6/core-cms/src/resource= s/portal-cms-war/WEB-INF/classes/Resource.properties ___________________________________________________________________ Name: svn:keywords + LastChangedDate LastChangedBy LastChangedRevision Id Property changes on: branches/JBoss_Portal_Branch_2_6/core-cms/src/resource= s/portal-cms-war/WEB-INF/classes/Resource_es.properties ___________________________________________________________________ Name: svn:keywords + LastChangedDate LastChangedBy LastChangedRevision Id Property changes on: branches/JBoss_Portal_Branch_2_6/core-cms/src/resource= s/portal-cms-war/WEB-INF/classes/Resource_fr.properties ___________________________________________________________________ Name: svn:keywords + LastChangedDate LastChangedBy LastChangedRevision Id Property changes on: branches/JBoss_Portal_Branch_2_6/core-cms/src/resource= s/portal-cms-war/WEB-INF/classes/Resource_it.properties ___________________________________________________________________ Name: svn:keywords + LastChangedDate LastChangedBy LastChangedRevision Id Property changes on: branches/JBoss_Portal_Branch_2_6/core-cms/src/resource= s/portal-cms-war/WEB-INF/classes/Resource_pt_BR.properties ___________________________________________________________________ Name: svn:keywords + LastChangedDate LastChangedBy LastChangedRevision Id Property changes on: branches/JBoss_Portal_Branch_2_6/core-cms/src/resource= s/portal-cms-war/WEB-INF/default-object.xml ___________________________________________________________________ Name: svn:keywords + LastChangedDate LastChangedBy LastChangedRevision Id Property changes on: branches/JBoss_Portal_Branch_2_6/core-cms/src/resource= s/portal-cms-war/WEB-INF/jboss-portlet.xml ___________________________________________________________________ Name: svn:keywords + LastChangedDate LastChangedBy LastChangedRevision Id Property changes on: branches/JBoss_Portal_Branch_2_6/core-cms/src/resource= s/portal-cms-war/WEB-INF/jboss-web.xml ___________________________________________________________________ Name: svn:keywords + LastChangedDate LastChangedBy LastChangedRevision Id Modified: branches/JBoss_Portal_Branch_2_6/core-cms/src/resources/portal-cm= s-war/WEB-INF/jsp/cms/admin/confirmcopy.jsp =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/core-cms/src/resources/portal-cms-war/= WEB-INF/jsp/cms/admin/confirmcopy.jsp 2007-10-27 23:01:46 UTC (rev 8784) +++ branches/JBoss_Portal_Branch_2_6/core-cms/src/resources/portal-cms-war/= WEB-INF/jsp/cms/admin/confirmcopy.jsp 2007-10-28 01:09:21 UTC (rev 8785) @@ -4,47 +4,54 @@ <%@ page isELIgnored=3D"false" %> = <% - String sCurrPath =3D (String) request.getAttribute("currpath"); + String sCurrPath =3D (String)request.getAttribute("currpath"); String OP =3D CMSAdminConstants.OP_CONFIRMCOPY; - String sType =3D (String) request.getAttribute("type"); + String sType =3D (String)request.getAttribute("type"); String sBackPath =3D NodeUtil.getParentPath(sCurrPath); %>

-
- - - - + + +

${n:i18n("TITLE_COPYCONFIR= M")}

-
+
+ + + + - - -

${n:i18n("TITLE_COPY= CONFIRM")}

+ = "/> "/> "/> " method=3D"post"> - - - - - - - - - - - -
${n:i18n("CMS_SOURCE")}:<%=3D sCurrPath %>
${n:i18n("CMS_DESTIN= ATION")}:
- "/>"/>'"> -
- -
- <%@ include file=3D"folderlist.jsp" %> -
+ + + + + + + + + + + + + +
${n:i18n("CMS_SOURCE")}:<%=3D sCurrPath %> +
${n:i18n("CMS_= DESTINATION")}: +
+ "/>"/>'"> +
+ +
+ <%@ include file=3D"folderlist.jsp" %> +
+
- Property changes on: branches/JBoss_Portal_Branch_2_6/core-cms/src/resource= s/portal-cms-war/WEB-INF/jsp/cms/admin/confirmcopy.jsp ___________________________________________________________________ Name: svn:keywords + LastChangedDate LastChangedBy LastChangedRevision Id Modified: branches/JBoss_Portal_Branch_2_6/core-cms/src/resources/portal-cm= s-war/WEB-INF/jsp/cms/admin/confirmcreatecollection.jsp =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/core-cms/src/resources/portal-cms-war/= WEB-INF/jsp/cms/admin/confirmcreatecollection.jsp 2007-10-27 23:01:46 UTC (= rev 8784) +++ branches/JBoss_Portal_Branch_2_6/core-cms/src/resources/portal-cms-war/= WEB-INF/jsp/cms/admin/confirmcreatecollection.jsp 2007-10-28 01:09:21 UTC (= rev 8785) @@ -10,56 +10,59 @@
-
- - - - - + +

${n:i18n("TITLE_CREATECOLL= CONFIRM")}

- <%@ include file=3D"folderlist.jsp" %> - -
+
+ + + + + - -

${n:i18n("TITLE_CREA= TECOLLCONFIRM")}

+ <%@ include file=3D"folderlist.jsp" %> + + "/> "/> " method=3D"post"> - "> - - - - - - - - - - - - - - - - - -
- Destination: - - " - class=3D"portlet-form-input-field"/>
${n:i18n("CMS_NAME")}: -
${n:i18n("CMS_DESCRIPTION")}: -
- - "/>"/>'"> -
- -
-

+ "> + + + + + + + + + + + + + + + + + +
+ Destination: + + " + class=3D"portlet-form-input-field"/>
${n:i18n("CMS_NAME")}: +
${n:i18n("CMS_DESCRIPTION")}= : +
+ + "/>"/>'"> +
+ +
+

+
- = = = Property changes on: branches/JBoss_Portal_Branch_2_6/core-cms/src/resource= s/portal-cms-war/WEB-INF/jsp/cms/admin/confirmcreatecollection.jsp ___________________________________________________________________ Name: svn:keywords + LastChangedDate LastChangedBy LastChangedRevision Id Modified: branches/JBoss_Portal_Branch_2_6/core-cms/src/resources/portal-cm= s-war/WEB-INF/jsp/cms/admin/confirmdelete.jsp =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/core-cms/src/resources/portal-cms-war/= WEB-INF/jsp/cms/admin/confirmdelete.jsp 2007-10-27 23:01:46 UTC (rev 8784) +++ branches/JBoss_Portal_Branch_2_6/core-cms/src/resources/portal-cms-war/= WEB-INF/jsp/cms/admin/confirmdelete.jsp 2007-10-28 01:09:21 UTC (rev 8785) @@ -9,34 +9,35 @@
-<% - String sCurrPath =3D (String)request.getAttribute("currpath"); - String sBackPath =3D NodeUtil.getParentPath(sCurrPath); -%> + <% + String sCurrPath =3D (String)request.getAttribute("currpath"); + String sBackPath =3D NodeUtil.getParentPath(sCurrPath); + %> = -
+ "= /> "/> " method=3D"post"> - - - - - - - - -

${n:i18n("TITLE_DELETECONFIRM")}

=
- ${n:i18n("CMS_DELETEPATH")} <%=3D= sCurrPath %> - -

- ${n:i18n("= CMS_DELETEWARN1")} -

- ${n:i18n("CMS_DELETEWARN2")}
-
- "/>"/>'"> -
- -
-
\ No newline at end of file + + + + + + + + +

${n:i18n("TITLE_DELETECONFIRM")= }

+ ${n:i18n("CMS_DELETEPATH")}= <%=3D sCurrPath %> + +

+ ${n:= i18n("CMS_DELETEWARN1")} +

+ ${n:i18n("CMS_DELETEWARN2")= }
+
+ = "/>"/>'"> +
+ + + \ No newline at end of file Property changes on: branches/JBoss_Portal_Branch_2_6/core-cms/src/resource= s/portal-cms-war/WEB-INF/jsp/cms/admin/confirmdelete.jsp ___________________________________________________________________ Name: svn:keywords + LastChangedDate LastChangedBy LastChangedRevision Id Modified: branches/JBoss_Portal_Branch_2_6/core-cms/src/resources/portal-cm= s-war/WEB-INF/jsp/cms/admin/confirmmove.jsp =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/core-cms/src/resources/portal-cms-war/= WEB-INF/jsp/cms/admin/confirmmove.jsp 2007-10-27 23:01:46 UTC (rev 8784) +++ branches/JBoss_Portal_Branch_2_6/core-cms/src/resources/portal-cms-war/= WEB-INF/jsp/cms/admin/confirmmove.jsp 2007-10-28 01:09:21 UTC (rev 8785) @@ -13,48 +13,50 @@
- - - - - + +

${n:i18n("TITLE_MOVECONFIR= M")}

- <%@ include file=3D"folderlist.jsp" %> - -
+ + + + + - -

${n:i18n("TITLE_MOVE= CONFIRM")}

+ <%@ include file=3D"folderlist.jsp" %> + + = "/> "/> "/> " method=3D"post"> - - - - - - - - - - - - - - -
${n:i18n("CMS_SOURCE")}:<%=3D sCurrPath %> -
- ${n:i18n("CMS_DESTINATION")}: - - -
- - "/>"/>'"> -
- -
-

+ + + + + + + + + + + + + + +
${n:i18n("CMS_SOURCE")}:<%=3D sCurrPath %> +
+ ${n:i18n("CMS_DESTINATION")}: + + +
+ + "/>"/>'"> +
+ +
+

= = -
-
\ No newline at end of file + + \ No newline at end of file Property changes on: branches/JBoss_Portal_Branch_2_6/core-cms/src/resource= s/portal-cms-war/WEB-INF/jsp/cms/admin/confirmmove.jsp ___________________________________________________________________ Name: svn:keywords + LastChangedDate LastChangedBy LastChangedRevision Id Modified: branches/JBoss_Portal_Branch_2_6/core-cms/src/resources/portal-cm= s-war/WEB-INF/jsp/cms/admin/create.jsp =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/core-cms/src/resources/portal-cms-war/= WEB-INF/jsp/cms/admin/create.jsp 2007-10-27 23:01:46 UTC (rev 8784) +++ branches/JBoss_Portal_Branch_2_6/core-cms/src/resources/portal-cms-war/= WEB-INF/jsp/cms/admin/create.jsp 2007-10-28 01:09:21 UTC (rev 8785) @@ -13,27 +13,27 @@ String[] langs =3D Locale.getISOLanguages(); String sDocBase =3D (String)request.getAttribute("document_base_url"); String sCSSURL =3D (String)request.getAttribute("css_url"); - = + //validation handling related data String sContent =3D (String)request.getAttribute("error:content"); String description =3D (String)request.getAttribute("error:description"= ); String title =3D (String)request.getAttribute("error:title"); String language =3D (String)request.getAttribute("error:language"); - if(sContent =3D=3D null) + if (sContent =3D=3D null) { - sContent =3D ""; + sContent =3D ""; } - if(description =3D=3D null) + if (description =3D=3D null) { - description =3D ""; + description =3D ""; } - if(title =3D=3D null) + if (title =3D=3D null) { - title =3D ""; + title =3D ""; } - if(language =3D=3D null) + if (language =3D=3D null) { - language =3D ""; + language =3D ""; } %> = @@ -42,52 +42,53 @@ src=3D"<%=3D renderRequest.getContextPath() + CMSAdminConstants.DE= FAULT_IMAGES_PATH %>/tiny_mce/tiny_mce_src.js"> =
@@ -95,85 +96,97 @@ "/> "> - "> +"> = - - - - - - - <% - } - }else{%> + } +} +else +{%> = - - - + + + = <% } Property changes on: branches/JBoss_Portal_Branch_2_6/core-cms/src/resource= s/portal-cms-war/WEB-INF/jsp/cms/admin/main.jsp ___________________________________________________________________ Name: svn:keywords + LastChangedDate LastChangedBy LastChangedRevision Id Modified: branches/JBoss_Portal_Branch_2_6/core-cms/src/resources/portal-cm= s-war/WEB-INF/jsp/cms/admin/pending_items.jsp =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/core-cms/src/resources/portal-cms-war/= WEB-INF/jsp/cms/admin/pending_items.jsp 2007-10-27 23:01:46 UTC (rev 8784) +++ branches/JBoss_Portal_Branch_2_6/core-cms/src/resources/portal-cms-war/= WEB-INF/jsp/cms/admin/pending_items.jsp 2007-10-28 01:09:21 UTC (rev 8785) @@ -22,7 +22,7 @@ = =

-${n:i18n("CMS_MAIN_USE")} + ${n:i18n("CMS_MAIN_USE")}

= = @@ -34,52 +34,57 @@ ">Home = = -<% - StringTokenizer parser =3D new StringTokenizer(sCurrPath, "/"); - String sPathBuilder =3D ""; - while (parser.hasMoreTokens()) - { - String sPathChunk =3D parser.nextToken(); - sPathBuilder +=3D "/" + sPathChunk; - if (parser.hasMoreTokens()) + <% + StringTokenizer parser =3D new StringTokenizer(sCurrPath, "/"); + String sPathBuilder =3D ""; + while (parser.hasMoreTokens()) { -%> + String sPathChunk =3D parser.nextToken(); + sPathBuilder +=3D "/" + sPathChunk; + if (parser.hasMoreTokens()) + { + %>
  • 3D"">
  • -
  • "= /> "/> "><%=3D sPathChunk %> - -
  • -<% -} -else -{ -%> -
  • 3D"">
  • -
  • <%=3D sPathChunk %>
  • -<% + + + <% + } + else + { + %> +
  • 3D"">
  • +
  • <%=3D sPathChunk %> +
  • + <% + } } - } -%> + %>
    -<%if(exception!=3Dnull && exception.trim().length()>0){%> +<% + if (exception !=3D null && exception.trim().length() > 0) + { +%>

    ${n:i18n("TITLE_CREATE")}

    - - - - - - - - - - - - - - - - - - - - @@ -193,11 +206,14 @@
    ${n:i18n("CMS_CREATEFILEINDIR")}: - <%=3D sCurrPath %> -
    ${n:i18n("CMS_FILENAME")}: - - : Required -
    ${n:i18n("CMS_DESCRIPTION")}:" - class=3D"portlet-form-input-field"/>
    - ${n:i18n("CMS_TITLE")}: - " - class=3D"portlet-form-input-field"/> -
    - ${n:i18n("CMS_LANGUAGE")}: - + + + + + + + %> + <% + for (int i =3D 0; i < langs.length; i++) + { + %> + + <% + } + %> + <%}%> + + + + + + + +

    ${n:i18n("TITLE_CREATE")}

    + + + + + + + + + + + + + + + + + + + + - - - - - -
    ${n:i18n("CMS_CREATEFILEINDIR")}: + <%=3D sCurrPath %> +
    ${n:i18n("CMS_FILENAME")}: + + : Required +
    ${n:i18n("CMS_DESCRIPTION")}:" + class=3D"portlet-form-input-field"/>
    + ${n:i18n("CMS_TITLE")}: + " + class=3D"portlet-form-input-field"/> +
    + ${n:i18n("CMS_LANGUAGE")}: + -
    - ${n:i18n("CMS_WYSIWYG")}: - - -
    -
    + ${n:i18n("CMS_WYSIWYG")}: + + +
    +
    - +
    - + - "/>"/>'"> + "/>"/>'">
    Property changes on: branches/JBoss_Portal_Branch_2_6/core-cms/src/resource= s/portal-cms-war/WEB-INF/jsp/cms/admin/create.jsp ___________________________________________________________________ Name: svn:keywords + LastChangedDate LastChangedBy LastChangedRevision Id Modified: branches/JBoss_Portal_Branch_2_6/core-cms/src/resources/portal-cm= s-war/WEB-INF/jsp/cms/admin/edit.jsp =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/core-cms/src/resources/portal-cms-war/= WEB-INF/jsp/cms/admin/edit.jsp 2007-10-27 23:01:46 UTC (rev 8784) +++ branches/JBoss_Portal_Branch_2_6/core-cms/src/resources/portal-cms-war/= WEB-INF/jsp/cms/admin/edit.jsp 2007-10-28 01:09:21 UTC (rev 8785) @@ -23,38 +23,39 @@ - = @@ -65,108 +66,110 @@ "> = - - - - - - + + + + + + + + + + + + + + + + + + +

    ${n:i18n("TITLE_EDIT")}

    +

    ${n:i18n("TITLE_EDIT")}

    +
    + + + + + + - + + - + - + + - + + + + + +
    ${n:i18n("CMS_EDITING")}: + <%=3D sCurrPath %> +
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    ${n:i18n("CMS_EDITING")}: - <%=3D sCurrPath %> -
    - ${n:i18n("CMS_DESCRIPTION")}: - " - class=3D"portlet-form-input-field"/> -
    - ${n:i18n("CMS_TITLE")}: - " - class=3D"portlet-form-input-field"/> -
    - ${n:i18n("CMS_LANGUAGE")}: - <%=3D new Locale(sLanguage).getDisplayLanguage() = %> -
    - ${n:i18n("CMS_LIVE")}: - -
    - ${n:i18n("CMS_VERSION")}: - <%=3D sVersion %> -
    - ${n:i18n("CMS_WYSIWYG")}: - - -
    + ${n:i18n("CMS_DESCRIPTION")}:
    " + class=3D"portlet-form-input-field"/> +
    + ${n:i18n("CMS_TITLE")}: + " + class=3D"portlet-form-input-field"/> +
    - /info.gif" - border=3D"0" - alt=3D"Info"> Links to resources within this portal sh= ould be absolute. For example: A link to an - image - located in default/images/back.gif - should be typed in exactly as shown here. - Do not prefix a slash (/) to the path of the resource. You = can verify the link is correct by clicking - on - the - preview button in the editor. + + ${n:i18n("CMS_LANGUAGE")}: <%=3D new Locale(sLanguage).getDisplayLanguage() %> +
    + ${n:i18n("CMS_LIVE")}: + +
    - -
    - - - "/>"/>'"> +
    + ${n:i18n("CMS_VERSION")}: <%=3D sVersion %> +
    + ${n:i18n("CMS_WYSIWYG")}: + + +
    +
    + /info.gif" + border=3D"0" + alt=3D"Info"> Links to resources within this portal should be a= bsolute. For example: A link to an + image + located in default/images/back.gif + should be typed in exactly as shown here. + Do not prefix a slash (/) to the path of the resource. You can verif= y the link is correct by clicking + on + the + preview button in the editor. +
    + +
    + + + "/>"/>'"> +
    = Property changes on: branches/JBoss_Portal_Branch_2_6/core-cms/src/resource= s/portal-cms-war/WEB-INF/jsp/cms/admin/edit.jsp ___________________________________________________________________ Name: svn:keywords + LastChangedDate LastChangedBy LastChangedRevision Id Modified: branches/JBoss_Portal_Branch_2_6/core-cms/src/resources/portal-cm= s-war/WEB-INF/jsp/cms/admin/editbinary.jsp =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/core-cms/src/resources/portal-cms-war/= WEB-INF/jsp/cms/admin/editbinary.jsp 2007-10-27 23:01:46 UTC (rev 8784) +++ branches/JBoss_Portal_Branch_2_6/core-cms/src/resources/portal-cms-war/= WEB-INF/jsp/cms/admin/editbinary.jsp 2007-10-28 01:09:21 UTC (rev 8785) @@ -8,60 +8,63 @@
    -<% - String sCurrPath =3D (String)request.getAttribute("currpath"); - String sLanguage =3D (String)request.getAttribute("language"); -%> + <% + String sCurrPath =3D (String)request.getAttribute("currpath"); + String sLanguage =3D (String)request.getAttribute("language"); + %> = -
    + "/> "> - = "> - "> - - - - - -

    ${n:i18n("TITLE_UPLOAD"= )}

    - - - - - - - - - - - - - - - - - - - - -
    - ${n:i18n("CMS_EDITING")}: - <%=3D sCurrPath %> -
    - ${n:i18n("CMS_DESCRIPTION")}: -
    - ${n:i18n("CMS_TITLE")}: -
    ${n:i18n("CMS_LIVE")}:
    - -
    - - "/>"/>'"> -
    -
    - + "> + "> + + + + + +

    ${n:i18n("TITLE_U= PLOAD")}

    + + + + + + + + + + + + + + + + + + + + +
    + ${n:i18n("CMS_EDITING")}: + <%=3D sCurrPath %> +
    + ${n:i18n("CMS_DESCRIPTION")}: +
    + ${n:i18n("CMS_TITLE")}: +
    ${n:i18n("CMS_LIVE")}:
    + +
    + + "/>"/>'"> +
    +
    + = -
    +
    \ No newline at end of file Property changes on: branches/JBoss_Portal_Branch_2_6/core-cms/src/resource= s/portal-cms-war/WEB-INF/jsp/cms/admin/editbinary.jsp ___________________________________________________________________ Name: svn:keywords + LastChangedDate LastChangedBy LastChangedRevision Id Modified: branches/JBoss_Portal_Branch_2_6/core-cms/src/resources/portal-cm= s-war/WEB-INF/jsp/cms/admin/exportarchive.jsp =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/core-cms/src/resources/portal-cms-war/= WEB-INF/jsp/cms/admin/exportarchive.jsp 2007-10-27 23:01:46 UTC (rev 8784) +++ branches/JBoss_Portal_Branch_2_6/core-cms/src/resources/portal-cms-war/= WEB-INF/jsp/cms/admin/exportarchive.jsp 2007-10-28 01:09:21 UTC (rev 8785) @@ -1,4 +1,3 @@ -<%@ page import=3D"java.util.Locale" %> <%@ page language=3D"java" extends=3D"org.jboss.portal.core.servlet.jsp.Po= rtalJsp" %> <%@ taglib uri=3D"http://java.sun.com/portlet" prefix=3D"portlet" %> <%@ taglib uri=3D"/WEB-INF/portal-lib.tld" prefix=3D"n" %> @@ -13,58 +12,60 @@ %>
    -
    + "/> "> - = "> - - - - - - -

    ${n:i18n("CMS_EXPORTARC= HIVE")}

    - <%@ include file=3D"folderlist.jsp" %> - - - - - - - - - - - - - -
    - ${n:i18n("CMS_EXPORTARCHIVE")}: - - " - class=3D"portlet-form-input-field"/>
    - ${n:i18n("CMS_LANGUAGE")}: - -
    -

    - - "/>"/>'"> -
    -
    - -
    + "> + + + + + + +

    ${n:i18n("CMS_EXP= ORTARCHIVE")}

    + <%@ include file=3D"folderlist.jsp" %> + + + + + + + + + + + + + +
    + ${n:i18n("CMS_EXPORTARCHIVE")}: + + " + class=3D"portlet-form-input-field"/>
    + ${n:i18n("CMS_LANGUAGE")}: + +
    +

    + + "/>"/>'"> +
    +
    + +
    \ No newline at end of file Property changes on: branches/JBoss_Portal_Branch_2_6/core-cms/src/resource= s/portal-cms-war/WEB-INF/jsp/cms/admin/exportarchive.jsp ___________________________________________________________________ Name: svn:keywords + LastChangedDate LastChangedBy LastChangedRevision Id Modified: branches/JBoss_Portal_Branch_2_6/core-cms/src/resources/portal-cm= s-war/WEB-INF/jsp/cms/admin/exportarchive_pickup.jsp =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/core-cms/src/resources/portal-cms-war/= WEB-INF/jsp/cms/admin/exportarchive_pickup.jsp 2007-10-27 23:01:46 UTC (rev= 8784) +++ branches/JBoss_Portal_Branch_2_6/core-cms/src/resources/portal-cms-war/= WEB-INF/jsp/cms/admin/exportarchive_pickup.jsp 2007-10-28 01:09:21 UTC (rev= 8785) @@ -8,34 +8,39 @@
    -<% - String sCurrPath =3D (String) request.getAttribute("currpath"); -%> + <% + String sCurrPath =3D (String)request.getAttribute("currpath"); + %> = - - - - - -

    ${n:i18n("CMS_EXPORTARCHIVE")}

    - - - - - - - - -
    - Your export of <%=3D sCurrPath %> is ready for do= wnload. -
     
    - /cmsexport?o= g" target=3D"_blank">/export_pickup.gif" - alt=3D"${n:i18n("CMS_DELETE")}" border=3D"0"><= br/> - /cmsexport?o= g" target=3D"_blank">Click to Download -
    - "/>"/>'"> -
    -
    + + + + + +

    ${n:i18n("CMS_EXPORTARCHIVE")}

    + + + + + + + + + + +
    + Your export of <%=3D sCurrPath %> + is ready for download. +
     
    + /cmsex= port?og" target=3D"_blank">/export_pickup.gif" + alt=3D"${n:i18n("CMS_DELETE")}" border=3D"0">
    +
    /cmsex= port?og" target=3D"_blank">Click to Download +
    + "/>"/>'"> +
    +
    +
    - Property changes on: branches/JBoss_Portal_Branch_2_6/core-cms/src/resource= s/portal-cms-war/WEB-INF/jsp/cms/admin/exportarchive_pickup.jsp ___________________________________________________________________ Name: svn:keywords + LastChangedDate LastChangedBy LastChangedRevision Id Modified: branches/JBoss_Portal_Branch_2_6/core-cms/src/resources/portal-cm= s-war/WEB-INF/jsp/cms/admin/exportarchive_pickup_error.jsp =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/core-cms/src/resources/portal-cms-war/= WEB-INF/jsp/cms/admin/exportarchive_pickup_error.jsp 2007-10-27 23:01:46 UT= C (rev 8784) +++ branches/JBoss_Portal_Branch_2_6/core-cms/src/resources/portal-cms-war/= WEB-INF/jsp/cms/admin/exportarchive_pickup_error.jsp 2007-10-28 01:09:21 UT= C (rev 8785) @@ -8,24 +8,27 @@
    -<% - String sCurrPath =3D (String)request.getAttribute("currpath"); -%> + <% + String sCurrPath =3D (String)request.getAttribute("currpath"); + %> = - - - - - -

    ${n:i18n("CMS_EXPORTARCHIVE")}

    - - - - - - - -
    ERROR processing e= xport request!
    "/>"/>'">
    -
    -
    + + + + + +

    ${n:i18n("CMS_EXPORTARCHIVE")}

    + + + + + + + +
    ERROR proces= sing export request!
    "/>"/>'"> +
    +
    +
    \ No newline at end of file Property changes on: branches/JBoss_Portal_Branch_2_6/core-cms/src/resource= s/portal-cms-war/WEB-INF/jsp/cms/admin/exportarchive_pickup_error.jsp ___________________________________________________________________ Name: svn:keywords + LastChangedDate LastChangedBy LastChangedRevision Id Modified: branches/JBoss_Portal_Branch_2_6/core-cms/src/resources/portal-cm= s-war/WEB-INF/jsp/cms/admin/folderlist.jsp =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/core-cms/src/resources/portal-cms-war/= WEB-INF/jsp/cms/admin/folderlist.jsp 2007-10-27 23:01:46 UTC (rev 8784) +++ branches/JBoss_Portal_Branch_2_6/core-cms/src/resources/portal-cms-war/= WEB-INF/jsp/cms/admin/folderlist.jsp 2007-10-28 01:09:21 UTC (rev 8785) @@ -2,6 +2,7 @@ <%@ page import=3D"org.jboss.portal.cms.util.NodeUtil" %> <%@ page import=3D"org.jboss.portal.core.cms.ui.admin.CMSAdminConstants" %> <%@ page import=3D"java.util.List" %> +<%@ page import=3D"java.util.Locale" %> <%@ page import=3D"java.util.StringTokenizer" %> <%@ page isELIgnored=3D"false" %> <%@ taglib uri=3D"http://java.sun.com/portlet" prefix=3D"portlet" %> @@ -15,8 +16,8 @@ = @@ -100,7 +101,7 @@ ">/plus.gif" border=3D"0" alt=3D"Expand"/> ')"><%=3D - folder.getBasePath().substring(folder.getBasePath().lastIndexOf("/") + = 1, folder.getBasePath().length()) %> +folder.getBasePath().substring(folder.getBasePath().lastIndexOf("/") + 1, = folder.getBasePath().length()) %>
    = <% Property changes on: branches/JBoss_Portal_Branch_2_6/core-cms/src/resource= s/portal-cms-war/WEB-INF/jsp/cms/admin/folderlist.jsp ___________________________________________________________________ Name: svn:keywords + LastChangedDate LastChangedBy LastChangedRevision Id Property changes on: branches/JBoss_Portal_Branch_2_6/core-cms/src/resource= s/portal-cms-war/WEB-INF/jsp/cms/admin/help.jsp ___________________________________________________________________ Name: svn:keywords + LastChangedDate LastChangedBy LastChangedRevision Id Modified: branches/JBoss_Portal_Branch_2_6/core-cms/src/resources/portal-cm= s-war/WEB-INF/jsp/cms/admin/main.jsp =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/core-cms/src/resources/portal-cms-war/= WEB-INF/jsp/cms/admin/main.jsp 2007-10-27 23:01:46 UTC (rev 8784) +++ branches/JBoss_Portal_Branch_2_6/core-cms/src/resources/portal-cms-war/= WEB-INF/jsp/cms/admin/main.jsp 2007-10-28 01:09:21 UTC (rev 8785) @@ -25,7 +25,7 @@

    -${n:i18n("CMS_MANAGE")} + ${n:i18n("CMS_MANAGE")}

    = @@ -36,94 +36,98 @@ ">Home = = -<% - StringTokenizer parser =3D new StringTokenizer(sCurrPath, "/"); - String sPathBuilder =3D ""; - while (parser.hasMoreTokens()) - { - String sPathChunk =3D parser.nextToken(); - sPathBuilder +=3D "/" + sPathChunk; - if (parser.hasMoreTokens()) + <% + StringTokenizer parser =3D new StringTokenizer(sCurrPath, "/"); + String sPathBuilder =3D ""; + while (parser.hasMoreTokens()) { -%> + String sPathChunk =3D parser.nextToken(); + sPathBuilder +=3D "/" + sPathChunk; + if (parser.hasMoreTokens()) + { + %>
  • 3D"">
  • -
  • "= /> "/> "><%=3D sPathChunk %> - -
  • -<% -} -else -{ -%> -
  • 3D"">
  • -
  • <%=3D sPathChunk %>
  • -<% + + + <% + } + else + { + %> +
  • 3D"">
  • +
  • <%=3D sPathChunk %> +
  • + <% + } } - } -%> + %>
    - + +
    = @@ -134,16 +138,17 @@ "/> "> = - - + + =

    +
    <% = @@ -278,14 +283,16 @@
    -

    This folder is empty.

    -
    +

    This folder is empty.

    +
    - - - - + + + +

    Error:

    - - <%=3Dexception%> - -

    Error:

    + + <%=3Dexception%> + +


    -"/= >'"> +"/>'"> <%}%> = @@ -98,7 +103,7 @@ for (Iterator itr =3D pendingQueue.iterator(); itr.hasNext();) { %> - <% = + <% org.jboss.portal.cms.workflow.Content cour =3D (org.jboss.portal.cms= .workflow.Content)itr.next(); = String linkPath =3D cour.getPath().substring(0, cour.getPath().lastI= ndexOf("/")); Property changes on: branches/JBoss_Portal_Branch_2_6/core-cms/src/resource= s/portal-cms-war/WEB-INF/jsp/cms/admin/pending_items.jsp ___________________________________________________________________ Name: svn:keywords + LastChangedDate LastChangedBy LastChangedRevision Id Modified: branches/JBoss_Portal_Branch_2_6/core-cms/src/resources/portal-cm= s-war/WEB-INF/jsp/cms/admin/searchResults.jsp =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/core-cms/src/resources/portal-cms-war/= WEB-INF/jsp/cms/admin/searchResults.jsp 2007-10-27 23:01:46 UTC (rev 8784) +++ branches/JBoss_Portal_Branch_2_6/core-cms/src/resources/portal-cms-war/= WEB-INF/jsp/cms/admin/searchResults.jsp 2007-10-28 01:09:21 UTC (rev 8785) @@ -15,7 +15,7 @@

    -${n:i18n("CMS_MANAGE")} + ${n:i18n("CMS_MANAGE")}

      @@ -27,22 +27,21 @@
      =
      -
      + "/> "> - " - /> - - + " + /> + +
      = = - <% List files =3D (List)request.getAttribute("files"); String createDate =3D ""; @@ -52,74 +51,75 @@ { %> -<% + <% for (int i =3D 0; i < files.size(); i++) { File file =3D (File)files.get(i); -%> - - + - + - - - -<% + + + + + + + + <% } -%> + %>
      /file.gif" - alt=3D"${n:i18n("CMS_FILE")}" - border=3D"0">  + %> +
      /file.gif" + alt=3D"${n:i18n("CMS_FILE")}" + border=3D"0">  "/> "/> "><%=3D - file.getBasePath().substring(file.getBasePath().lastIndexOf("/") + 1, f= ile.getBasePath().length()) %> - - -
      + file.getBasePath().substring(file.getBasePath().lastIndexOf("/") + 1= , file.getBasePath().length()) %> + +
      + "/> "> - - - - - <% - if (file.getCreationDate() !=3D null) - { - Format formatter; - formatter =3D new SimpleDateFormat("MM/dd/yy HH:mm"); - createDate =3D formatter.format(file.getCreationDate()); - } - %> - <%=3D createDate %> - - <% - if (file.getLastModified() !=3D null) - { - Format formatter; - formatter =3D new SimpleDateFormat("MM/dd/yy HH:mm"); - modifiedDate =3D formatter.format(file.getLastModified()); - } - %> - <%=3D modifiedDate %> -
      + <% + if (file.getCreationDate() !=3D null) + { + Format formatter; + formatter =3D new SimpleDateFormat("MM/dd/yy HH:mm"); + createDate =3D formatter.format(file.getCreationDate()); + } + %> + <%=3D createDate %> + + <% + if (file.getLastModified() !=3D null) + { + Format formatter; + formatter =3D new SimpleDateFormat("MM/dd/yy HH:mm"); + modifiedDate =3D formatter.format(file.getLastModified()); + } + %> + <%=3D modifiedDate %> +
      <% +} +else +{ +%> +

      ${n:i18n("CMS_SEARCHNORESULT")}

      +<% } - else - { -%> = -

      ${n:i18n("CMS_SEARCHNORESULT")}

      -<% = - } %> -"/>'"> +"/>'"> =
    \ No newline at end of file Property changes on: branches/JBoss_Portal_Branch_2_6/core-cms/src/resource= s/portal-cms-war/WEB-INF/jsp/cms/admin/searchResults.jsp ___________________________________________________________________ Name: svn:keywords + LastChangedDate LastChangedBy LastChangedRevision Id Modified: branches/JBoss_Portal_Branch_2_6/core-cms/src/resources/portal-cm= s-war/WEB-INF/jsp/cms/admin/securenode.jsp =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/core-cms/src/resources/portal-cms-war/= WEB-INF/jsp/cms/admin/securenode.jsp 2007-10-27 23:01:46 UTC (rev 8784) +++ branches/JBoss_Portal_Branch_2_6/core-cms/src/resources/portal-cms-war/= WEB-INF/jsp/cms/admin/securenode.jsp 2007-10-28 01:09:21 UTC (rev 8785) @@ -1,7 +1,5 @@ +<%@ page import=3D"org.jboss.portal.cms.security.AuthorizationManager" %> <%@ page import=3D"org.jboss.portal.core.cms.ui.admin.CMSAdminConstants" %> -<%@ page import=3D"org.jboss.portal.identity.Role" %> -<%@ page import=3D"org.jboss.portal.identity.User" %> -<%@ page import=3D"org.jboss.portal.cms.security.AuthorizationManager" %> <%@ page import=3D"java.util.Iterator" %> <%@ page import=3D"java.util.Set" %> <%@ page language=3D"java" extends=3D"org.jboss.portal.core.servlet.jsp.Po= rtalJsp" %> @@ -10,14 +8,14 @@ <%@ page isELIgnored=3D"false" %> = - + <% String sCurrPath =3D (String)request.getAttribute("currpath"); Set roleSet =3D (Set)request.getAttribute("roles"); Set userSet =3D (Set)request.getAttribute("users"); String sConfirm =3D (String)request.getAttribute("confirm"); String returnOp =3D (String)request.getAttribute("returnOp"); - = + Set readRoleSet =3D (Set)request.getAttribute("readRoleSet"); Set readUserSet =3D (Set)request.getAttribute("readUserSet"); Set writeRoleSet =3D (Set)request.getAttribute("writeRoleSet"); @@ -65,8 +63,9 @@ - <% iterator =3D roleSet.iterator(); @@ -135,7 +136,7 @@ Role role =3D (Role)iterator.next(); %> <% } @@ -158,8 +159,9 @@ { User user =3D (User)iteratorUser.next(); %> - <% } @@ -185,8 +187,9 @@ - "/>"/>'"> - + "/>"/>'"> + Property changes on: branches/JBoss_Portal_Branch_2_6/core-cms/src/resource= s/portal-cms-war/WEB-INF/jsp/cms/admin/securenode.jsp ___________________________________________________________________ Name: svn:keywords + LastChangedDate LastChangedBy LastChangedRevision Id Modified: branches/JBoss_Portal_Branch_2_6/core-cms/src/resources/portal-cm= s-war/WEB-INF/jsp/cms/admin/upload.jsp =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/core-cms/src/resources/portal-cms-war/= WEB-INF/jsp/cms/admin/upload.jsp 2007-10-27 23:01:46 UTC (rev 8784) +++ branches/JBoss_Portal_Branch_2_6/core-cms/src/resources/portal-cms-war/= WEB-INF/jsp/cms/admin/upload.jsp 2007-10-28 01:09:21 UTC (rev 8785) @@ -1,4 +1,3 @@ -<%@ page import=3D"java.util.Locale" %> <%@ page language=3D"java" extends=3D"org.jboss.portal.core.servlet.jsp.Po= rtalJsp" %> <%@ taglib uri=3D"http://java.sun.com/portlet" prefix=3D"portlet" %> <%@ taglib uri=3D"/WEB-INF/portal-lib.tld" prefix=3D"n" %> @@ -13,72 +12,75 @@ %>
    -
    + "/> "> - = "> - - - - - - -

    ${n:i18n("TITLE_UPLOAD"= )}

    - <%@ include file=3D"folderlist.jsp" %> - - - - - - - - - - - - - - - - - - - - - -
    - ${n:i18n("CMS_DESTINATION")}: - - " - class=3D"portlet-form-input-field"/>
    - ${n:i18n("CMS_DESCRIPTION")}: -
    - ${n:i18n("CMS_TITLE")}: -
    - ${n:i18n("CMS_LANGUAGE")}: - -
    - -

    - - "/>"/>'"> -
    -
    - -
    + "> + + + + + + +

    ${n:i18n("TITLE_U= PLOAD")}

    + <%@ include file=3D"folderlist.jsp" %> + + + + + + + + + + + + + + + + + + + +
    + ${n:i18n("CMS_DESTINATION")}: + + " + class=3D"portlet-form-input-field"/>
    + ${n:i18n("CMS_DESCRIPTION")}: + +
    + ${n:i18n("CMS_TITLE")}: + +
    + ${n:i18n("CMS_LANGUAGE")}: + +
    + +

    + + "/>"/>'"> +
    +
    + +
    \ No newline at end of file Property changes on: branches/JBoss_Portal_Branch_2_6/core-cms/src/resource= s/portal-cms-war/WEB-INF/jsp/cms/admin/upload.jsp ___________________________________________________________________ Name: svn:keywords + LastChangedDate LastChangedBy LastChangedRevision Id Modified: branches/JBoss_Portal_Branch_2_6/core-cms/src/resources/portal-cm= s-war/WEB-INF/jsp/cms/admin/uploadarchive.jsp =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/core-cms/src/resources/portal-cms-war/= WEB-INF/jsp/cms/admin/uploadarchive.jsp 2007-10-27 23:01:46 UTC (rev 8784) +++ branches/JBoss_Portal_Branch_2_6/core-cms/src/resources/portal-cms-war/= WEB-INF/jsp/cms/admin/uploadarchive.jsp 2007-10-28 01:09:21 UTC (rev 8785) @@ -1,4 +1,3 @@ -<%@ page import=3D"java.util.Locale" %> <%@ page language=3D"java" extends=3D"org.jboss.portal.core.servlet.jsp.Po= rtalJsp" %> <%@ taglib uri=3D"http://java.sun.com/portlet" prefix=3D"portlet" %> <%@ taglib uri=3D"/WEB-INF/portal-lib.tld" prefix=3D"n" %> @@ -9,7 +8,7 @@
    <% - String sCurrPath =3D (String) request.getAttribute("currpath"); + String sCurrPath =3D (String)request.getAttribute("currpath"); String OP =3D CMSAdminConstants.OP_UPLOADARCHIVECONFIRM; String[] langs =3D Locale.getISOLanguages(); %> @@ -43,7 +42,8 @@ value=3D"<%=3D Locale.getDefault().getL= anguage() %>"><%=3D Locale.getDefault().getDisplayLanguage() %> <% - for (int i =3D 0; i < langs.length; i++) { + for (int i =3D 0; i < langs.length; i++) + { %> Property changes on: branches/JBoss_Portal_Branch_2_6/core-cms/src/resource= s/portal-cms-war/WEB-INF/jsp/cms/admin/uploadarchive.jsp ___________________________________________________________________ Name: svn:keywords + LastChangedDate LastChangedBy LastChangedRevision Id Modified: branches/JBoss_Portal_Branch_2_6/core-cms/src/resources/portal-cm= s-war/WEB-INF/jsp/cms/admin/viewfile.jsp =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/core-cms/src/resources/portal-cms-war/= WEB-INF/jsp/cms/admin/viewfile.jsp 2007-10-27 23:01:46 UTC (rev 8784) +++ branches/JBoss_Portal_Branch_2_6/core-cms/src/resources/portal-cms-war/= WEB-INF/jsp/cms/admin/viewfile.jsp 2007-10-28 01:09:21 UTC (rev 8785) @@ -20,19 +20,21 @@
    <% - String sCurrPath =3D (String) request.getAttribute("currpath"); - Vector vContents =3D (Vector) request.getAttribute("contents"); - Collection pendingQueue =3D (Collection) request.getAttribute("pendingQ= ueue"); + String sCurrPath =3D (String)request.getAttribute("currpath"); + Vector vContents =3D (Vector)request.getAttribute("contents"); + Collection pendingQueue =3D (Collection)request.getAttribute("pendingQu= eue"); = String sType =3D ""; - if (vContents.size() > 0) { - List contentList =3D (List) vContents.elementAt(0); - if (contentList.size() > 0) { - Content content =3D (Content) contentList.get(0); + if (vContents.size() > 0) + { + List contentList =3D (List)vContents.elementAt(0); + if (contentList.size() > 0) + { + Content content =3D (Content)contentList.get(0); sType =3D content.getMimeType(); } } - String sPreviewPath =3D (String) request.getAttribute("previewpath"); + String sPreviewPath =3D (String)request.getAttribute("previewpath"); = String createDate =3D ""; String modifiedDate =3D ""; @@ -40,7 +42,7 @@ String rowClass =3D "portlet-section-body"; = String exception =3D request.getParameter("exception"); - Boolean manageWorkflowAccessible =3D (Boolean) request.getAttribute("ma= nageWorkflowAccessible"); + Boolean manageWorkflowAccessible =3D (Boolean)request.getAttribute("man= ageWorkflowAccessible"); %> =

    @@ -58,10 +60,12 @@ <% StringTokenizer parser =3D new StringTokenizer(sCurrPath, "/"); String sPathBuilder =3D ""; - while (parser.hasMoreTokens()) { + while (parser.hasMoreTokens()) + { String sPathChunk =3D parser.nextToken(); sPathBuilder +=3D "/" + sPathChunk; - if (parser.hasMoreTokens()) { + if (parser.hasMoreTokens()) + { %>
  • 3D"">
  • <% - } else { + } + else + { %>
  • 3D"">
  • <%=3D sPathChunk %> @@ -91,14 +97,17 @@ editListRoleMembers'= ].submit();" - value=3D"${n:i18n("Search")}"/> -  -cancelEditListRoleMe= mbers'].submit();" - value=3D"${n:i18n("Cancel")}"/> + editListRoleMembe= rs'].submit();" + value=3D"${n:i18n("Search")}"/> +   + cancelEditListRol= eMembers'].submit();" + value=3D"${n:i18n("Cancel")}"/>

    +
    cancelEditListRoleMembers" - action=3D"" - method=3D"post"/> + name=3D"cancelEditListRoleMembers" + action=3D"" + method=3D"post"/> Property changes on: branches/JBoss_Portal_Branch_2_6/core/src/resources/po= rtal-core-war/WEB-INF/jsp/role/editListRoleMembers.jsp ___________________________________________________________________ Name: svn:keywords - Author Date Id Revision + LastChangedDate LastChangedBy LastChangedRevision Id Modified: branches/JBoss_Portal_Branch_2_6/core/src/resources/portal-core-w= ar/WEB-INF/jsp/role/editRole.jsp =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/core/src/resources/portal-core-war/WEB= -INF/jsp/role/editRole.jsp 2007-10-28 01:09:21 UTC (rev 8785) +++ branches/JBoss_Portal_Branch_2_6/core/src/resources/portal-core-war/WEB= -INF/jsp/role/editRole.jsp 2007-10-28 01:14:48 UTC (rev 8786) @@ -12,13 +12,14 @@ =

    - = +

    cancelEditRole" - action=3D"" method=3D"post"> + action=3D"" + method=3D"post">

    <%@ taglib uri=3D"/WEB-INF/portal-lib.tld" prefix=3D"n" %> <%@ taglib uri=3D"http://java.sun.com/portlet" prefix=3D"portlet" %> -<%@ page isELIgnored =3D"false" %> = +<%@ page isELIgnored=3D"false" %> =

    -
    " method= =3D"post"> - - - - = - - - - - - - - - - - - - - - -
    - /images/= role/role.gif" align=3D"absmiddle"/>  - ${n:i18n("MENU_EDITROLEMEMBERS")}
    ${n:i18n("ROLE_SELECTONETOMODI= FY")}: - -
    ${n:i18n("LIST_USERNAMECONTAINS")}= : - -
    ${n:i18n("LIST_USERSPERPAGE")}: - -
    - -
    - +
    " + method=3D"post"> + + + + + + + + + + + + + + + + + + + +
    + /images/role/role.gif" align=3D"absmiddle"/>  + ${n:i18n("MENU_EDITROLEMEMBERS")}
    ${n:i18n("ROLE_SELECTONETOM= ODIFY")}: + +
    ${n:i18n("LIST_USERNAMECONT= AINS")}: + +
    ${n:i18n("LIST_USERSPERPAGE= ")}: + +
    + +
    +
    Property changes on: branches/JBoss_Portal_Branch_2_6/core/src/resources/po= rtal-core-war/WEB-INF/jsp/role/editRoleMembers.jsp ___________________________________________________________________ Name: svn:keywords - Author Date Id Revision + LastChangedDate LastChangedBy LastChangedRevision Id Modified: branches/JBoss_Portal_Branch_2_6/core/src/resources/portal-core-w= ar/WEB-INF/jsp/role/editUserRoles.jsp =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/core/src/resources/portal-core-war/WEB= -INF/jsp/role/editUserRoles.jsp 2007-10-28 01:09:21 UTC (rev 8785) +++ branches/JBoss_Portal_Branch_2_6/core/src/resources/portal-core-war/WEB= -INF/jsp/role/editUserRoles.jsp 2007-10-28 01:14:48 UTC (rev 8786) @@ -24,7 +24,7 @@ = - + = @@ -52,8 +52,10 @@ = = -
    +
    + + editRole= s'].submit();" Property changes on: branches/JBoss_Portal_Branch_2_6/core/src/resources/po= rtal-core-war/WEB-INF/jsp/role/editUserRoles.jsp ___________________________________________________________________ Name: svn:keywords - Author Date Id Revision + LastChangedDate LastChangedBy LastChangedRevision Id Modified: branches/JBoss_Portal_Branch_2_6/core/src/resources/portal-core-w= ar/WEB-INF/jsp/role/menu.jsp =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/core/src/resources/portal-core-war/WEB= -INF/jsp/role/menu.jsp 2007-10-28 01:09:21 UTC (rev 8785) +++ branches/JBoss_Portal_Branch_2_6/core/src/resources/portal-core-war/WEB= -INF/jsp/role/menu.jsp 2007-10-28 01:14:48 UTC (rev 8786) @@ -29,7 +29,8 @@ " - onClick=3D"javascript:return confirm('${n:i18n("ROLE_CONFIRM_D= ELETE")}')">Delete
    + onClick=3D"javascript= :return confirm('${n:i18n("ROLE_CONFIRM_DELETE")}')">Delete + Property changes on: branches/JBoss_Portal_Branch_2_6/core/src/resources/po= rtal-core-war/WEB-INF/jsp/role/menu.jsp ___________________________________________________________________ Name: svn:keywords - Author Date Id Revision + LastChangedDate LastChangedBy LastChangedRevision Id Modified: branches/JBoss_Portal_Branch_2_6/core/src/resources/portal-core-w= ar/WEB-INF/jsp/test/testIf01.jsp =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/core/src/resources/portal-core-war/WEB= -INF/jsp/test/testIf01.jsp 2007-10-28 01:09:21 UTC (rev 8785) +++ branches/JBoss_Portal_Branch_2_6/core/src/resources/portal-core-war/WEB= -INF/jsp/test/testIf01.jsp 2007-10-28 01:14:48 UTC (rev 8786) @@ -1,5 +1,5 @@ <%@ page language=3D"java" extends=3D"org.jboss.portal.core.servlet.jsp.Po= rtalJsp" %> <%@ taglib uri=3D"/WEB-INF/portal-lib.tld" prefix=3D"n" %> <%@ taglib uri=3D"http://java.sun.com/portlet" prefix=3D"portlet" %> -<%@ page isELIgnored =3D"false" %> = +<%@ page isELIgnored=3D"false" %> Some text \ No newline at end of file Property changes on: branches/JBoss_Portal_Branch_2_6/core/src/resources/po= rtal-core-war/WEB-INF/jsp/test/testIf01.jsp ___________________________________________________________________ Name: svn:keywords - Author Date Id Revision + LastChangedDate LastChangedBy LastChangedRevision Id Modified: branches/JBoss_Portal_Branch_2_6/core/src/resources/portal-core-w= ar/WEB-INF/jsp/test/testInclude01.jsp =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/core/src/resources/portal-core-war/WEB= -INF/jsp/test/testInclude01.jsp 2007-10-28 01:09:21 UTC (rev 8785) +++ branches/JBoss_Portal_Branch_2_6/core/src/resources/portal-core-war/WEB= -INF/jsp/test/testInclude01.jsp 2007-10-28 01:14:48 UTC (rev 8786) @@ -1,5 +1,5 @@ <%@ page language=3D"java" extends=3D"org.jboss.portal.core.servlet.jsp.Po= rtalJsp" %> <%@ taglib uri=3D"/WEB-INF/portal-lib.tld" prefix=3D"n" %> <%@ taglib uri=3D"http://java.sun.com/portlet" prefix=3D"portlet" %> -<%@ page isELIgnored =3D"false" %> = +<%@ page isELIgnored=3D"false" %> BeginInclude::EndInclude \ No newline at end of file Property changes on: branches/JBoss_Portal_Branch_2_6/core/src/resources/po= rtal-core-war/WEB-INF/jsp/test/testInclude01.jsp ___________________________________________________________________ Name: svn:keywords - Author Date Id Revision + LastChangedDate LastChangedBy LastChangedRevision Id Property changes on: branches/JBoss_Portal_Branch_2_6/core/src/resources/po= rtal-core-war/WEB-INF/jsp/test/testInclude02.jsp ___________________________________________________________________ Name: svn:keywords - Author Date Id Revision + LastChangedDate LastChangedBy LastChangedRevision Id Modified: branches/JBoss_Portal_Branch_2_6/core/src/resources/portal-core-w= ar/WEB-INF/jsp/test/testInclude03.jsp =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/core/src/resources/portal-core-war/WEB= -INF/jsp/test/testInclude03.jsp 2007-10-28 01:09:21 UTC (rev 8785) +++ branches/JBoss_Portal_Branch_2_6/core/src/resources/portal-core-war/WEB= -INF/jsp/test/testInclude03.jsp 2007-10-28 01:14:48 UTC (rev 8786) @@ -1,5 +1,5 @@ <%@ page language=3D"java" extends=3D"org.jboss.portal.core.servlet.jsp.Po= rtalJsp" %> <%@ taglib uri=3D"/WEB-INF/portal-lib.tld" prefix=3D"n" %> <%@ taglib uri=3D"http://java.sun.com/portlet" prefix=3D"portlet" %> -<%@ page isELIgnored =3D"false" %> = +<%@ page isELIgnored=3D"false" %> Foo::Bar \ No newline at end of file Property changes on: branches/JBoss_Portal_Branch_2_6/core/src/resources/po= rtal-core-war/WEB-INF/jsp/test/testInclude03.jsp ___________________________________________________________________ Name: svn:keywords - Author Date Id Revision + LastChangedDate LastChangedBy LastChangedRevision Id Modified: branches/JBoss_Portal_Branch_2_6/core/src/resources/portal-core-w= ar/WEB-INF/jsp/test/testIterate01.jsp =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/core/src/resources/portal-core-war/WEB= -INF/jsp/test/testIterate01.jsp 2007-10-28 01:09:21 UTC (rev 8785) +++ branches/JBoss_Portal_Branch_2_6/core/src/resources/portal-core-war/WEB= -INF/jsp/test/testIterate01.jsp 2007-10-28 01:14:48 UTC (rev 8786) @@ -1,5 +1,5 @@ <%@ page language=3D"java" extends=3D"org.jboss.portal.core.servlet.jsp.Po= rtalJsp" %> <%@ taglib uri=3D"/WEB-INF/portal-lib.tld" prefix=3D"n" %> <%@ taglib uri=3D"http://java.sun.com/portlet" prefix=3D"portlet" %> -<%@ page isELIgnored =3D"false" %> = +<%@ page isELIgnored=3D"false" %> Some text \ No newline at end of file Property changes on: branches/JBoss_Portal_Branch_2_6/core/src/resources/po= rtal-core-war/WEB-INF/jsp/test/testIterate01.jsp ___________________________________________________________________ Name: svn:keywords - Author Date Id Revision + LastChangedDate LastChangedBy LastChangedRevision Id Modified: branches/JBoss_Portal_Branch_2_6/core/src/resources/portal-core-w= ar/WEB-INF/jsp/test/testIterate02.jsp =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/core/src/resources/portal-core-war/WEB= -INF/jsp/test/testIterate02.jsp 2007-10-28 01:09:21 UTC (rev 8785) +++ branches/JBoss_Portal_Branch_2_6/core/src/resources/portal-core-war/WEB= -INF/jsp/test/testIterate02.jsp 2007-10-28 01:14:48 UTC (rev 8786) @@ -1,5 +1,5 @@ <%@ page language=3D"java" extends=3D"org.jboss.portal.core.servlet.jsp.Po= rtalJsp" %> <%@ taglib uri=3D"/WEB-INF/portal-lib.tld" prefix=3D"n" %> <%@ taglib uri=3D"http://java.sun.com/portlet" prefix=3D"portlet" %> -<%@ page isELIgnored =3D"false" %> = +<%@ page isELIgnored=3D"false" %> ABC \ No newline at end of file Property changes on: branches/JBoss_Portal_Branch_2_6/core/src/resources/po= rtal-core-war/WEB-INF/jsp/test/testIterate02.jsp ___________________________________________________________________ Name: svn:keywords - Author Date Id Revision + LastChangedDate LastChangedBy LastChangedRevision Id Modified: branches/JBoss_Portal_Branch_2_6/core/src/resources/portal-core-w= ar/WEB-INF/jsp/test/testIterate03.jsp =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/core/src/resources/portal-core-war/WEB= -INF/jsp/test/testIterate03.jsp 2007-10-28 01:09:21 UTC (rev 8785) +++ branches/JBoss_Portal_Branch_2_6/core/src/resources/portal-core-war/WEB= -INF/jsp/test/testIterate03.jsp 2007-10-28 01:14:48 UTC (rev 8786) @@ -1,5 +1,5 @@ <%@ page language=3D"java" extends=3D"org.jboss.portal.core.servlet.jsp.Po= rtalJsp" %> <%@ taglib uri=3D"/WEB-INF/portal-lib.tld" prefix=3D"n" %> <%@ taglib uri=3D"http://java.sun.com/portlet" prefix=3D"portlet" %> -<%@ page isELIgnored =3D"false" %> = +<%@ page isELIgnored=3D"false" %> ABCD \ No newline at end of file Property changes on: branches/JBoss_Portal_Branch_2_6/core/src/resources/po= rtal-core-war/WEB-INF/jsp/test/testIterate03.jsp ___________________________________________________________________ Name: svn:keywords - Author Date Id Revision + LastChangedDate LastChangedBy LastChangedRevision Id Modified: branches/JBoss_Portal_Branch_2_6/core/src/resources/portal-core-w= ar/WEB-INF/jsp/test/testTaglib01.jsp =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/core/src/resources/portal-core-war/WEB= -INF/jsp/test/testTaglib01.jsp 2007-10-28 01:09:21 UTC (rev 8785) +++ branches/JBoss_Portal_Branch_2_6/core/src/resources/portal-core-war/WEB= -INF/jsp/test/testTaglib01.jsp 2007-10-28 01:14:48 UTC (rev 8786) @@ -1,5 +1,5 @@ <%@ page language=3D"java" extends=3D"org.jboss.portal.core.servlet.jsp.Po= rtalJsp" %> <%@ taglib uri=3D"/WEB-INF/portal-lib.tld" prefix=3D"n" %> <%@ taglib uri=3D"http://java.sun.com/portlet" prefix=3D"portlet" %> -<%@ page isELIgnored =3D"false" %> = +<%@ page isELIgnored=3D"false" %> ${n:out("foo")}::${n:out("bar")} Property changes on: branches/JBoss_Portal_Branch_2_6/core/src/resources/po= rtal-core-war/WEB-INF/jsp/test/testTaglib01.jsp ___________________________________________________________________ Name: svn:keywords - Author Date Id Revision + LastChangedDate LastChangedBy LastChangedRevision Id Modified: branches/JBoss_Portal_Branch_2_6/core/src/resources/portal-core-w= ar/WEB-INF/jsp/test/testTaglib02.jsp =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/core/src/resources/portal-core-war/WEB= -INF/jsp/test/testTaglib02.jsp 2007-10-28 01:09:21 UTC (rev 8785) +++ branches/JBoss_Portal_Branch_2_6/core/src/resources/portal-core-war/WEB= -INF/jsp/test/testTaglib02.jsp 2007-10-28 01:14:48 UTC (rev 8786) @@ -1,9 +1,9 @@ <%@ page language=3D"java" extends=3D"org.jboss.portal.core.servlet.jsp.Po= rtalJsp" %> <%@ taglib uri=3D"/WEB-INF/portal-lib.tld" prefix=3D"n" %> <%@ taglib uri=3D"http://java.sun.com/portlet" prefix=3D"portlet" %> -<%@ page isELIgnored =3D"false" %> = +<%@ page isELIgnored=3D"false" %> ${n:out("foo")}: -${n:out("row1.value1")}: + ${n:out("row1.value1")}: ${n:out("bar")} Property changes on: branches/JBoss_Portal_Branch_2_6/core/src/resources/po= rtal-core-war/WEB-INF/jsp/test/testTaglib02.jsp ___________________________________________________________________ Name: svn:keywords - Author Date Id Revision + LastChangedDate LastChangedBy LastChangedRevision Id Modified: branches/JBoss_Portal_Branch_2_6/core/src/resources/portal-core-w= ar/WEB-INF/jsp/user/editProfile.jsp =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/core/src/resources/portal-core-war/WEB= -INF/jsp/user/editProfile.jsp 2007-10-28 01:09:21 UTC (rev 8785) +++ branches/JBoss_Portal_Branch_2_6/core/src/resources/portal-core-war/WEB= -INF/jsp/user/editProfile.jsp 2007-10-28 01:14:48 UTC (rev 8786) @@ -8,7 +8,8 @@
    = -save" action=3D"" method= =3D"post"> +save" + action=3D"" method=3D"post"> Property changes on: branches/JBoss_Portal_Branch_2_6/core/src/resources/po= rtal-core-war/WEB-INF/jsp/user/editProfile.jsp ___________________________________________________________________ Name: svn:keywords - Author Date Id Revision + LastChangedDate LastChangedBy LastChangedRevision Id Modified: branches/JBoss_Portal_Branch_2_6/core/src/resources/portal-core-w= ar/WEB-INF/jsp/user/editUserRoles.jsp =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D (Binary files differ) Property changes on: branches/JBoss_Portal_Branch_2_6/core/src/resources/po= rtal-core-war/WEB-INF/jsp/user/editUserRoles.jsp ___________________________________________________________________ Name: svn:keywords + LastChangedDate LastChangedBy LastChangedRevision Id Modified: branches/JBoss_Portal_Branch_2_6/core/src/resources/portal-core-w= ar/WEB-INF/jsp/user/listUsers.jsp =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/core/src/resources/portal-core-war/WEB= -INF/jsp/user/listUsers.jsp 2007-10-28 01:09:21 UTC (rev 8785) +++ branches/JBoss_Portal_Branch_2_6/core/src/resources/portal-core-war/WEB= -INF/jsp/user/listUsers.jsp 2007-10-28 01:14:48 UTC (rev 8786) @@ -57,6 +57,7 @@ =
    + searchUsers" action=3D"" @@ -74,12 +75,13 @@
    searchUsers'].sub= mit();" - value=3D"${n:i18n("Search")}"/> -   - cancel'].submit()= ;" - value=3D"${n:i18n("Cancel")}"/> + onclick=3D"document.forms['searchUsers'].submit= ();" + value=3D"${n:i18n("Search")}"/> +  +cancel'].submit();" + value=3D"${n:i18n("Cancel")}"/> +
    cancel" action=3D"" Property changes on: branches/JBoss_Portal_Branch_2_6/core/src/resources/po= rtal-core-war/WEB-INF/jsp/user/listUsers.jsp ___________________________________________________________________ Name: svn:keywords - Author Date Id Revision + LastChangedDate LastChangedBy LastChangedRevision Id Modified: branches/JBoss_Portal_Branch_2_6/core/src/resources/portal-core-w= ar/WEB-INF/jsp/user/login.jsp =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/core/src/resources/portal-core-war/WEB= -INF/jsp/user/login.jsp 2007-10-28 01:09:21 UTC (rev 8785) +++ branches/JBoss_Portal_Branch_2_6/core/src/resources/portal-core-war/WEB= -INF/jsp/user/login.jsp 2007-10-28 01:14:48 UTC (rev 8786) @@ -1,4 +1,3 @@ -<%@ page import=3D"org.jboss.portal.core.CoreConstants" %> <%@ page language=3D"java" extends=3D"org.jboss.portal.core.servlet.jsp.Po= rtalJsp" %> <%@ taglib uri=3D"/WEB-INF/portal-lib.tld" prefix=3D"n" %> <%@ taglib uri=3D"http://java.sun.com/portlet" prefix=3D"portlet" %> @@ -6,15 +5,15 @@ =
    -

    ${n:i18n("REGISTER_BASICINFO")}

    - - + +
    + + + - -
    ${n:i18n("REGISTER_NOT_LOGGED_IN")} =

    ">${n:i18= n("REGISTER_REGISTER")}
    -
    +
  • \ No newline at end of file Property changes on: branches/JBoss_Portal_Branch_2_6/core/src/resources/po= rtal-core-war/WEB-INF/jsp/user/login.jsp ___________________________________________________________________ Name: svn:keywords - Author Date Id Revision + LastChangedDate LastChangedBy LastChangedRevision Id Modified: branches/JBoss_Portal_Branch_2_6/core/src/resources/portal-core-w= ar/WEB-INF/jsp/user/menu.jsp =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D (Binary files differ) Property changes on: branches/JBoss_Portal_Branch_2_6/core/src/resources/po= rtal-core-war/WEB-INF/jsp/user/menu.jsp ___________________________________________________________________ Name: svn:keywords + LastChangedDate LastChangedBy LastChangedRevision Id Modified: branches/JBoss_Portal_Branch_2_6/core/src/resources/portal-core-w= ar/WEB-INF/jsp/user/register.jsp =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/core/src/resources/portal-core-war/WEB= -INF/jsp/user/register.jsp 2007-10-28 01:09:21 UTC (rev 8785) +++ branches/JBoss_Portal_Branch_2_6/core/src/resources/portal-core-war/WEB= -INF/jsp/user/register.jsp 2007-10-28 01:14:48 UTC (rev 8786) @@ -7,67 +7,67 @@

    * ${n:i18n("REQUIRED")}


    - register" - action=3D"" method=3D"post"> - - - - + register" + action=3D"" method=3D"post"> + + + + = - - - - - - + + + + + + = - - - - - - - - + + + + + + + + = - - - - - - - - + + + + + + + + = - - - - - - - - - - + + + + + + + + + +

    ${n:i18n("REGISTER_BASICINFO")}

    ${n:i18n("REGISTER_BASICINFO")}

    =
    ${n:i18n("USERNAME")}<= span class=3D"requiredfield">* - -
    ${n:i18n("REGISTER_REA= LEMAIL")}* - - - ${n:i18n("USERNAME")}* + +
    ${n:i18n("REGISTER_REALEM= AIL")}* + + + Allow - other users to view my real e-mail address -
    ${n:i18n("REGISTER_FAK= EEMAIL")}
    ${n:i18n("PASSWORD")}<= span class=3D"requiredfield">*Allow + other users to view my real e-mail address +
    ${n:i18n("REGISTER_FAKEEM= AIL")}
    ${n:i18n("PASSWORD")}* - -
    ${n:i18n("REGISTER_PAS= SWORDAGAIN")}* - -
    ${n:i18n("REGISTER_QUEST= ION")} + +
    ${n:i18n("REGISTER_PASSWO= RDAGAIN")}* + +
    ${n:i18n("REGISTER_QUESTI= ON")} -
    ${n:i18n("REGISTER_ANSWE= R")} -
    - -   - -
    +
    ${n:i18n("REGISTER_ANSWER= ")} +
    + +   + +
    \ No newline at end of file Property changes on: branches/JBoss_Portal_Branch_2_6/core/src/resources/po= rtal-core-war/WEB-INF/jsp/user/register.jsp ___________________________________________________________________ Name: svn:keywords - Author Date Id Revision + LastChangedDate LastChangedBy LastChangedRevision Id Property changes on: branches/JBoss_Portal_Branch_2_6/core/src/resources/po= rtal-core-war/WEB-INF/jsp/user/registerUser.jsp ___________________________________________________________________ Name: svn:keywords + LastChangedDate LastChangedBy LastChangedRevision Id Modified: branches/JBoss_Portal_Branch_2_6/core/src/resources/portal-core-w= ar/WEB-INF/jsp/user/registerUser_admin.jsp =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/core/src/resources/portal-core-war/WEB= -INF/jsp/user/registerUser_admin.jsp 2007-10-28 01:09:21 UTC (rev 8785) +++ branches/JBoss_Portal_Branch_2_6/core/src/resources/portal-core-war/WEB= -INF/jsp/user/registerUser_admin.jsp 2007-10-28 01:14:48 UTC (rev 8786) @@ -1,4 +1,3 @@ -<%@ page import=3D"org.jboss.portal.core.CoreConstants" %> <%@ page language=3D"java" extends=3D"org.jboss.portal.core.servlet.jsp.Po= rtalJsp" %> <%@ taglib uri=3D"/WEB-INF/portal-lib.tld" prefix=3D"n" %> <%@ taglib uri=3D"http://java.sun.com/portlet" prefix=3D"portlet" %> Property changes on: branches/JBoss_Portal_Branch_2_6/core/src/resources/po= rtal-core-war/WEB-INF/jsp/user/registerUser_admin.jsp ___________________________________________________________________ Name: svn:keywords + LastChangedDate LastChangedBy LastChangedRevision Id Modified: branches/JBoss_Portal_Branch_2_6/core/src/resources/portal-core-w= ar/WEB-INF/jsp/user/register_ty.jsp =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/core/src/resources/portal-core-war/WEB= -INF/jsp/user/register_ty.jsp 2007-10-28 01:09:21 UTC (rev 8785) +++ branches/JBoss_Portal_Branch_2_6/core/src/resources/portal-core-war/WEB= -INF/jsp/user/register_ty.jsp 2007-10-28 01:14:48 UTC (rev 8786) @@ -1,19 +1,18 @@ -<%@ page import=3D"org.jboss.portal.core.CoreConstants" %> -<%@ page language=3D"java" extends=3D"org.jboss.portal.core.servlet.jsp.Po= rtalJsp" %> -<%@ taglib uri=3D"/WEB-INF/portal-lib.tld" prefix=3D"n" %> -<%@ taglib uri=3D"http://java.sun.com/portlet" prefix=3D"portlet" %> -<%@ page isELIgnored=3D"false" %> - - - -
    - - - - -
    ${n:i18n("REGISTER_TY")}
    +<%@ page language=3D"java" extends=3D"org.jboss.portal.core.servlet.jsp.Po= rtalJsp" %> +<%@ taglib uri=3D"/WEB-INF/portal-lib.tld" prefix=3D"n" %> +<%@ taglib uri=3D"http://java.sun.com/portlet" prefix=3D"portlet" %> +<%@ page isELIgnored=3D"false" %> + + + +
    + + + + +
    ${n:i18n("REGISTER_TY")}


    ">${n:i18n("REGISTER_SHO= WMENU")} + href=3D"">${n:i18n("REGISTER_SHOWME= NU")} Property changes on: branches/JBoss_Portal_Branch_2_6/core/src/resources/po= rtal-core-war/WEB-INF/jsp/user/register_ty.jsp ___________________________________________________________________ Name: svn:keywords + LastChangedDate LastChangedBy LastChangedRevision Id Modified: branches/JBoss_Portal_Branch_2_6/core/src/resources/portal-core-w= ar/WEB-INF/jsp/user/viewProfile.jsp =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/core/src/resources/portal-core-war/WEB= -INF/jsp/user/viewProfile.jsp 2007-10-28 01:09:21 UTC (rev 8785) +++ branches/JBoss_Portal_Branch_2_6/core/src/resources/portal-core-war/WEB= -INF/jsp/user/viewProfile.jsp 2007-10-28 01:14:48 UTC (rev 8786) @@ -5,30 +5,30 @@ = = - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + +
    ${n:i18n("LIST_USERNAME")}${n:out("username")}
    ${n:i18n("REGISTER_GIVENNAME")}${n:out("GIVENNAME")}
    ${n:i18n("REGISTER_FAMILYNAME")}${n:out("FAMILYNAME")}
    ${n:i18n("REGISTER_FAKEEMAIL")}${n:out("FAKEEMAIL")}
    ${n:i18n("REGISTER_HOMEPAGE")}${n:out("HOMEPAGE")}
    ${n:i18n("REGISTER_LOCATION")}${n:out("LOCATION")}
    ${n:i18n("LIST_USERNAME")}${n:out("username")}
    ${n:i18n("REGISTER_GIVENNAME")}${n:out("GIVENNAME")}
    ${n:i18n("REGISTER_FAMILYNAME")} + ${n:out("FAMILYNAME")}
    ${n:i18n("REGISTER_FAKEEMAIL")}${n:out("FAKEEMAIL")}
    ${n:i18n("REGISTER_HOMEPAGE")}${n:out("HOMEPAGE")}
    ${n:i18n("REGISTER_LOCATION")}${n:out("LOCATION")}
    =
    = = <% - /* response.sendRedirect(request.getContextPath() + "/josso_login/"); */ + /* response.sendRedirect(request.getContextPath() + "/josso_login/"); */ %> = @@ -39,6 +39,7 @@ body { background-color: #FFFFFF; } + td { color: #000000; font-family: verdana, arial, sans-serif; @@ -50,61 +51,63 @@ = = - +
    Property changes on: branches/JBoss_Portal_Branch_2_6/core/src/resources/po= rtal-server-war/error.jsp ___________________________________________________________________ Name: svn:keywords - Author Date Id Revision + LastChangedDate LastChangedBy LastChangedRevision Id Modified: branches/JBoss_Portal_Branch_2_6/core/src/resources/portal-server= -war/login.jsp =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/core/src/resources/portal-server-war/l= ogin.jsp 2007-10-28 01:09:21 UTC (rev 8785) +++ branches/JBoss_Portal_Branch_2_6/core/src/resources/portal-server-war/l= ogin.jsp 2007-10-28 01:14:48 UTC (rev 8786) @@ -25,12 +25,12 @@ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> = = <% - /* response.sendRedirect(request.getContextPath() + "/josso_login/"); */ + /* response.sendRedirect(request.getContextPath() + "/josso_login/"); */ %> = = @@ -40,6 +40,7 @@ body { background-color: #FFFFFF; } + td { color: #000000; font-family: verdana, arial, sans-serif; @@ -51,58 +52,58 @@ = = -
    " name=3D"loginform" id=3D"loginForm"> = <% String prefix =3D request.getContextPath(); %> = - - - - - - - - - - + + + + + + + + +
    /images/login_top_left.png" />/images/login_top.pn= g')">/images/login_top_right.png" />
    /images/login_left.p= ng')"> - JBoss Portal Login

    -

    <%=3D request.getAttribute("org.jboss.portal.l= oginError") %>

    - - - - - - - - - - - - -
    - Username:  - - -
    - Password:  - - -
    - -
    + + + + + + + + + + - - - - - - - - -
    /images/login_top_left.pn= g"/>/image= s/login_top.png')">/images/login_top_right.p= ng"/>
    /image= s/login_left.png')"> + JBoss Portal Login

    = -
    /images/login_right.= png')">
    /images/login_bottom_left.png" />/images/login_bottom= .png')">/images/login_bottom_right.png" />
    +

    <%=3D request.getAttribute("or= g.jboss.portal.loginError") %> +

    + + + + + + + + + + + + +
    + Username:  + + +
    + Password:  + + +
    + +
    = +
    /image= s/login_right.png')">
    /images/login_bottom_left= .png"/>/image= s/login_bottom.png')">/images/login_bottom_righ= t.png"/>
    = + =
    +
    " name=3D"loginform" id=3D"loginForm"> = <% String prefix =3D request.getContextPath(); %> = - - - - - - - - - - + + + + + + + + +
    /images/login_top_left.png" />/images/login_top.pn= g')">/images/login_top_right.png" />
    /images/login_left.p= ng')"> - JBoss Portal Login

    - - - - - - - - - - - - -
    - Username:  - - -
    - Password:  - - -
    - -
    + + + + + + + + + + - - - - - - - - -
    /images/login_top_left.pn= g"/>/image= s/login_top.png')">/images/login_top_right.p= ng"/>
    /image= s/login_left.png')"> + JBoss Portal Login

    + + + + + + + + + + + + +
    + Username:  + + +
    + Password:  + + +
    + +
    = -
    /images/login_right.= png')">
    /images/login_bottom_left.png" />/images/login_bottom= .png')">/images/login_bottom_right.png" />
    +
    /image= s/login_right.png')">
    /images/login_bottom_left= .png"/>/image= s/login_bottom.png')">/images/login_bottom_righ= t.png"/>
    = =
    Property changes on: branches/JBoss_Portal_Branch_2_6/core/src/resources/po= rtal-server-war/login.jsp ___________________________________________________________________ Name: svn:keywords - Author Date Id Revision + LastChangedDate LastChangedBy LastChangedRevision Id Property changes on: branches/JBoss_Portal_Branch_2_6/core/src/resources/se= tup/portal-ds.xml ___________________________________________________________________ Name: svn:keywords - Author Date Id Revision + LastChangedDate LastChangedBy LastChangedRevision Id Property changes on: branches/JBoss_Portal_Branch_2_6/core/src/resources/se= tup/setup.sql ___________________________________________________________________ Name: svn:keywords - Author Date Id Revision + LastChangedDate LastChangedBy LastChangedRevision Id Property changes on: branches/JBoss_Portal_Branch_2_6/core/src/resources/te= st/cache/domain.xml ___________________________________________________________________ Name: svn:keywords - Author Date Id Revision + LastChangedDate LastChangedBy LastChangedRevision Id Property changes on: branches/JBoss_Portal_Branch_2_6/core/src/resources/te= st/cache/local.xml ___________________________________________________________________ Name: svn:keywords - Author Date Id Revision + LastChangedDate LastChangedBy LastChangedRevision Id Property changes on: branches/JBoss_Portal_Branch_2_6/core/src/resources/te= st/cache/replicated.xml ___________________________________________________________________ Name: svn:keywords - Author Date Id Revision + LastChangedDate LastChangedBy LastChangedRevision Id Property changes on: branches/JBoss_Portal_Branch_2_6/core/src/resources/te= st/datarole.xml ___________________________________________________________________ Name: svn:keywords - Author Date Id Revision + LastChangedDate LastChangedBy LastChangedRevision Id Property changes on: branches/JBoss_Portal_Branch_2_6/core/src/resources/te= st/datarolecreated.xml ___________________________________________________________________ Name: svn:keywords - Author Date Id Revision + LastChangedDate LastChangedBy LastChangedRevision Id Property changes on: branches/JBoss_Portal_Branch_2_6/core/src/resources/te= st/dataroledeleted.xml ___________________________________________________________________ Name: svn:keywords - Author Date Id Revision + LastChangedDate LastChangedBy LastChangedRevision Id Property changes on: branches/JBoss_Portal_Branch_2_6/core/src/resources/te= st/dataroleedited.xml ___________________________________________________________________ Name: svn:keywords - Author Date Id Revision + LastChangedDate LastChangedBy LastChangedRevision Id Modified: branches/JBoss_Portal_Branch_2_6/core/src/resources/test/deployme= nt/jboss-portlet.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/core/src/resources/test/deployment/jbo= ss-portlet.xml 2007-10-28 01:09:21 UTC (rev 8785) +++ branches/JBoss_Portal_Branch_2_6/core/src/resources/test/deployment/jbo= ss-portlet.xml 2007-10-28 01:14:48 UTC (rev 8786) @@ -20,7 +20,8 @@ ~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA = ~ ~ 02110-1301 USA, or see the FSF site: http://www.fsf.org. = ~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~= ~~~--> - + Portlet1 Property changes on: branches/JBoss_Portal_Branch_2_6/core/src/resources/te= st/deployment/jboss-portlet.xml ___________________________________________________________________ Name: svn:keywords - Author Date Id Revision + LastChangedDate LastChangedBy LastChangedRevision Id Property changes on: branches/JBoss_Portal_Branch_2_6/core/src/resources/te= st/deployment/portlet-instances.xml ___________________________________________________________________ Name: svn:keywords + LastChangedDate LastChangedBy LastChangedRevision Id Property changes on: branches/JBoss_Portal_Branch_2_6/core/src/resources/te= st/hibernate.properties ___________________________________________________________________ Name: svn:keywords - Author Date Id Revision + LastChangedDate LastChangedBy LastChangedRevision Id Property changes on: branches/JBoss_Portal_Branch_2_6/core/src/resources/te= st/log4j.properties ___________________________________________________________________ Name: svn:keywords - Author Date Id Revision + LastChangedDate LastChangedBy LastChangedRevision Id Property changes on: branches/JBoss_Portal_Branch_2_6/core/src/resources/te= st/theme.xml ___________________________________________________________________ Name: svn:keywords - Author Date Id Revision + LastChangedDate LastChangedBy LastChangedRevision Id --===============7299433683999747927==-- From portal-commits at lists.jboss.org Sun Oct 28 17:57:30 2007 Content-Type: multipart/mixed; boundary="===============7636360690575382466==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8787 - modules/test/trunk/unit/src/main/java/org/jboss/unit. Date: Sun, 28 Oct 2007 17:57:29 -0400 Message-ID: --===============7636360690575382466== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: julien(a)jboss.com Date: 2007-10-28 17:57:29 -0400 (Sun, 28 Oct 2007) New Revision: 8787 Modified: modules/test/trunk/unit/src/main/java/org/jboss/unit/Failure.java modules/test/trunk/unit/src/main/java/org/jboss/unit/FailureType.java modules/test/trunk/unit/src/main/java/org/jboss/unit/TestId.java Log: minor javadoc Modified: modules/test/trunk/unit/src/main/java/org/jboss/unit/Failure.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/java/org/jboss/unit/Failure.java 2007-= 10-28 01:14:48 UTC (rev 8786) +++ modules/test/trunk/unit/src/main/java/org/jboss/unit/Failure.java 2007-= 10-28 21:57:29 UTC (rev 8787) @@ -23,7 +23,7 @@ package org.jboss.unit; = /** - * A failure. + * A failure, contains the description of a failure. * * @author Julien Viet * @version $Revision: 1.1 $ Modified: modules/test/trunk/unit/src/main/java/org/jboss/unit/FailureType.= java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/java/org/jboss/unit/FailureType.java 2= 007-10-28 01:14:48 UTC (rev 8786) +++ modules/test/trunk/unit/src/main/java/org/jboss/unit/FailureType.java 2= 007-10-28 21:57:29 UTC (rev 8787) @@ -31,7 +31,7 @@ public enum FailureType { /** - * A failure that is not expected + * A failure that is not expected and produced an error. */ ERROR, = Modified: modules/test/trunk/unit/src/main/java/org/jboss/unit/TestId.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/java/org/jboss/unit/TestId.java 2007-1= 0-28 01:14:48 UTC (rev 8786) +++ modules/test/trunk/unit/src/main/java/org/jboss/unit/TestId.java 2007-1= 0-28 21:57:29 UTC (rev 8787) @@ -28,7 +28,8 @@ import java.util.Collection; = /** - * A test id made of a sequence of non null names. + * A test id made of a sequence of non null names. As the name same it uni= quely identity a test in the + * of a test driver. * * @author Julien Viet * @version $Revision: 1.1 $ --===============7636360690575382466==-- From portal-commits at lists.jboss.org Sun Oct 28 18:00:11 2007 Content-Type: multipart/mixed; boundary="===============3875382463528418713==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8788 - modules/test/trunk/unit/src/main/java/org/jboss/unit. Date: Sun, 28 Oct 2007 18:00:11 -0400 Message-ID: --===============3875382463528418713== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: julien(a)jboss.com Date: 2007-10-28 18:00:11 -0400 (Sun, 28 Oct 2007) New Revision: 8788 Modified: modules/test/trunk/unit/src/main/java/org/jboss/unit/TestId.java Log: typo Modified: modules/test/trunk/unit/src/main/java/org/jboss/unit/TestId.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/test/trunk/unit/src/main/java/org/jboss/unit/TestId.java 2007-1= 0-28 21:57:29 UTC (rev 8787) +++ modules/test/trunk/unit/src/main/java/org/jboss/unit/TestId.java 2007-1= 0-28 22:00:11 UTC (rev 8788) @@ -28,7 +28,7 @@ import java.util.Collection; = /** - * A test id made of a sequence of non null names. As the name same it uni= quely identity a test in the + * A test id made of a sequence of non null names. As the name indicates i= t uniquely identity a test in the * of a test driver. * * @author Julien Viet --===============3875382463528418713==-- From portal-commits at lists.jboss.org Mon Oct 29 06:12:00 2007 Content-Type: multipart/mixed; boundary="===============4184924683252710699==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8789 - in branches/JBoss_Portal_Branch_2_6/core-wsrp: .settings and 1 other directory. Date: Mon, 29 Oct 2007 06:12:00 -0400 Message-ID: --===============4184924683252710699== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: thomas.heute(a)jboss.com Date: 2007-10-29 06:12:00 -0400 (Mon, 29 Oct 2007) New Revision: 8789 Removed: branches/JBoss_Portal_Branch_2_6/core-wsrp/.settings/org.eclipse.jdt.cor= e.prefs Modified: branches/JBoss_Portal_Branch_2_6/core-wsrp/.classpath Log: Update eclipse files Modified: branches/JBoss_Portal_Branch_2_6/core-wsrp/.classpath =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/core-wsrp/.classpath 2007-10-28 22:00:= 11 UTC (rev 8788) +++ branches/JBoss_Portal_Branch_2_6/core-wsrp/.classpath 2007-10-29 10:12:= 00 UTC (rev 8789) @@ -1,11 +1,17 @@ - + + + + + + + Deleted: branches/JBoss_Portal_Branch_2_6/core-wsrp/.settings/org.eclipse.j= dt.core.prefs =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/core-wsrp/.settings/org.eclipse.jdt.co= re.prefs 2007-10-28 22:00:11 UTC (rev 8788) +++ branches/JBoss_Portal_Branch_2_6/core-wsrp/.settings/org.eclipse.jdt.co= re.prefs 2007-10-29 10:12:00 UTC (rev 8789) @@ -1,12 +0,0 @@ -#Wed Jul 11 10:53:04 CEST 2007 -eclipse.preferences.version=3D1 -org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=3Ddisabled -org.eclipse.jdt.core.compiler.codegen.targetPlatform=3D1.2 -org.eclipse.jdt.core.compiler.codegen.unusedLocal=3Dpreserve -org.eclipse.jdt.core.compiler.compliance=3D1.4 -org.eclipse.jdt.core.compiler.debug.lineNumber=3Dgenerate -org.eclipse.jdt.core.compiler.debug.localVariable=3Dgenerate -org.eclipse.jdt.core.compiler.debug.sourceFile=3Dgenerate -org.eclipse.jdt.core.compiler.problem.assertIdentifier=3Dwarning -org.eclipse.jdt.core.compiler.problem.enumIdentifier=3Dwarning -org.eclipse.jdt.core.compiler.source=3D1.3 --===============4184924683252710699==-- From portal-commits at lists.jboss.org Mon Oct 29 07:25:03 2007 Content-Type: multipart/mixed; boundary="===============9042476977553778626==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8790 - in branches/JBoss_Portal_Branch_2_6: core-cms and 1 other directory. Date: Mon, 29 Oct 2007 07:25:02 -0400 Message-ID: --===============9042476977553778626== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: thomas.heute(a)jboss.com Date: 2007-10-29 07:25:02 -0400 (Mon, 29 Oct 2007) New Revision: 8790 Modified: branches/JBoss_Portal_Branch_2_6/cms/build.xml branches/JBoss_Portal_Branch_2_6/core-cms/build.xml Log: Remove jboss-cache and jgroups from the binaries (Since they are part of JB= oss AS) Modified: branches/JBoss_Portal_Branch_2_6/cms/build.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/cms/build.xml 2007-10-29 10:12:00 UTC = (rev 8789) +++ branches/JBoss_Portal_Branch_2_6/cms/build.xml 2007-10-29 11:25:02 UTC = (rev 8790) @@ -205,9 +205,6 @@ = - - = - = = = @@ -231,10 +228,7 @@ = - - - = - = + = @@ -264,16 +258,6 @@ - - - - - = - - = --===============9042476977553778626==-- From portal-commits at lists.jboss.org Mon Oct 29 09:44:25 2007 Content-Type: multipart/mixed; boundary="===============4875732041242821327==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8791 - in branches/JBoss_Portal_Branch_2_6: core-cms and 1 other directory. Date: Mon, 29 Oct 2007 09:44:24 -0400 Message-ID: --===============4875732041242821327== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: thomas.heute(a)jboss.com Date: 2007-10-29 09:44:24 -0400 (Mon, 29 Oct 2007) New Revision: 8791 Modified: branches/JBoss_Portal_Branch_2_6/cms/build.xml branches/JBoss_Portal_Branch_2_6/core-cms/build.xml Log: Put back jgroups lib which is only available in 'all' Modified: branches/JBoss_Portal_Branch_2_6/cms/build.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/cms/build.xml 2007-10-29 11:25:02 UTC = (rev 8790) +++ branches/JBoss_Portal_Branch_2_6/cms/build.xml 2007-10-29 13:44:24 UTC = (rev 8791) @@ -115,8 +115,8 @@ - - + + = @@ -132,11 +132,11 @@ - + - - - + + + = = @@ -202,9 +202,11 @@ = - + = + = + = = = @@ -227,24 +229,26 @@ = - - + + + = + = = - - - - - - + + + = + + + @@ -258,25 +262,23 @@ + = + + + = - - - - - - - - + = + + = + = @@ -284,16 +286,16 @@ description=3D"UnDeploy." depends=3D"output"> = - - - - + + + = + = @@ -395,11 +397,11 @@ --> - - + + @@ -425,15 +427,15 @@ = = = - + = = - - + + = - - - - + = + = + + = @@ -477,11 +479,11 @@ - - + + - - + + Modified: branches/JBoss_Portal_Branch_2_6/core-cms/build.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/core-cms/build.xml 2007-10-29 11:25:02= UTC (rev 8790) +++ branches/JBoss_Portal_Branch_2_6/core-cms/build.xml 2007-10-29 13:44:24= UTC (rev 8791) @@ -262,6 +262,7 @@ = + = --===============4875732041242821327==-- From portal-commits at lists.jboss.org Mon Oct 29 12:04:20 2007 Content-Type: multipart/mixed; boundary="===============2438297108584844186==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8792 - in branches/JBoss_Portal_Branch_2_6: core-samples/src/resources/portal-jsp-samples-war/WEB-INF/jsp/jsp and 1 other directory. Date: Mon, 29 Oct 2007 12:02:40 -0400 Message-ID: --===============2438297108584844186== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: thomas.heute(a)jboss.com Date: 2007-10-29 12:02:40 -0400 (Mon, 29 Oct 2007) New Revision: 8792 Modified: branches/JBoss_Portal_Branch_2_6/core-samples/src/resources/portal-jsp-s= amples-war/WEB-INF/jsp/jsp/view.jsp branches/JBoss_Portal_Branch_2_6/core/src/resources/portal-core-war/WEB-= INF/jsp/header/header.jsp Log: Put back the removed imports Modified: branches/JBoss_Portal_Branch_2_6/core/src/resources/portal-core-w= ar/WEB-INF/jsp/header/header.jsp =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/core/src/resources/portal-core-war/WEB= -INF/jsp/header/header.jsp 2007-10-29 13:44:24 UTC (rev 8791) +++ branches/JBoss_Portal_Branch_2_6/core/src/resources/portal-core-war/WEB= -INF/jsp/header/header.jsp 2007-10-29 16:02:40 UTC (rev 8792) @@ -1,7 +1,9 @@ <%@ page import=3D"org.jboss.portal.api.PortalURL" %> +<%@ page import=3D"org.jboss.portal.identity.User" %> = <% User user =3D (User)request.getAttribute("org.jboss.portal.header.USER"= ); + PortalURL dashboardURL =3D (PortalURL)request.getAttribute("org.jboss.p= ortal.header.DASHBOARD_URL"); PortalURL loginURL =3D (PortalURL)request.getAttribute("org.jboss.porta= l.header.LOGIN_URL"); PortalURL defaultPortalURL =3D (PortalURL)request.getAttribute("org.jbo= ss.portal.header.DEFAULT_PORTAL_URL"); Modified: branches/JBoss_Portal_Branch_2_6/core-samples/src/resources/porta= l-jsp-samples-war/WEB-INF/jsp/jsp/view.jsp =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/core-samples/src/resources/portal-jsp-= samples-war/WEB-INF/jsp/jsp/view.jsp 2007-10-29 13:44:24 UTC (rev 8791) +++ branches/JBoss_Portal_Branch_2_6/core-samples/src/resources/portal-jsp-= samples-war/WEB-INF/jsp/jsp/view.jsp 2007-10-29 16:02:40 UTC (rev 8792) @@ -1,3 +1,4 @@ +<%@ page import=3D"org.jboss.portal.server.PortalConstants" %> <%--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~= ~~~~ ~ JBoss, a division of Red Hat = ~ ~ Copyright 2006, Red Hat Middleware, LLC, and individual = ~ --===============2438297108584844186==-- From portal-commits at lists.jboss.org Mon Oct 29 14:24:53 2007 Content-Type: multipart/mixed; boundary="===============8633178735989745025==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8793 - in branches/JBoss_Portal_Branch_2_6/core/src/resources/portal-core-war/WEB-INF/jsp: error and 2 other directories. Date: Mon, 29 Oct 2007 14:24:53 -0400 Message-ID: --===============8633178735989745025== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: chris.laprun(a)jboss.com Date: 2007-10-29 14:24:53 -0400 (Mon, 29 Oct 2007) New Revision: 8793 Modified: branches/JBoss_Portal_Branch_2_6/core/src/resources/portal-core-war/WEB-= INF/jsp/catalog/index.jsp branches/JBoss_Portal_Branch_2_6/core/src/resources/portal-core-war/WEB-= INF/jsp/catalog/sitemap.jsp branches/JBoss_Portal_Branch_2_6/core/src/resources/portal-core-war/WEB-= INF/jsp/error/page.jsp branches/JBoss_Portal_Branch_2_6/core/src/resources/portal-core-war/WEB-= INF/jsp/error/portal.jsp branches/JBoss_Portal_Branch_2_6/core/src/resources/portal-core-war/WEB-= INF/jsp/header/header.jsp branches/JBoss_Portal_Branch_2_6/core/src/resources/portal-core-war/WEB-= INF/jsp/header/tabs.jsp branches/JBoss_Portal_Branch_2_6/core/src/resources/portal-core-war/WEB-= INF/jsp/user/login.jsp branches/JBoss_Portal_Branch_2_6/core/src/resources/portal-core-war/WEB-= INF/jsp/user/registerUser_admin.jsp branches/JBoss_Portal_Branch_2_6/core/src/resources/portal-core-war/WEB-= INF/jsp/user/register_ty.jsp Log: Reverted to version without optimized imports. Modified: branches/JBoss_Portal_Branch_2_6/core/src/resources/portal-core-w= ar/WEB-INF/jsp/catalog/index.jsp =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/core/src/resources/portal-core-war/WEB= -INF/jsp/catalog/index.jsp 2007-10-29 16:02:40 UTC (rev 8792) +++ branches/JBoss_Portal_Branch_2_6/core/src/resources/portal-core-war/WEB= -INF/jsp/catalog/index.jsp 2007-10-29 18:24:53 UTC (rev 8793) @@ -1,3 +1,4 @@ +<%@ page import=3D"org.jboss.portal.api.node.PortalNode" %> <%@ page import=3D"org.jboss.portal.api.node.PortalNodeURL" %> <%@ page import=3D"java.util.HashMap" %> <%@ page import=3D"java.util.Iterator" %> Modified: branches/JBoss_Portal_Branch_2_6/core/src/resources/portal-core-w= ar/WEB-INF/jsp/catalog/sitemap.jsp =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/core/src/resources/portal-core-war/WEB= -INF/jsp/catalog/sitemap.jsp 2007-10-29 16:02:40 UTC (rev 8792) +++ branches/JBoss_Portal_Branch_2_6/core/src/resources/portal-core-war/WEB= -INF/jsp/catalog/sitemap.jsp 2007-10-29 18:24:53 UTC (rev 8793) @@ -1,7 +1,7 @@ +<%@ page import=3D"org.jboss.portlet.JBossRenderResponse" %> +<%@ page import=3D"java.util.Iterator" %> <%@ page import=3D"org.jboss.portal.api.node.PortalNode" %> <%@ page import=3D"org.jboss.portal.api.node.PortalNodeURL" %> -<%@ page import=3D"org.jboss.portlet.JBossRenderResponse" %> -<%@ page import=3D"java.util.Iterator" %> <%@ page language=3D"java" extends=3D"org.jboss.portal.core.servlet.jsp.Po= rtalJsp" %> <%@ taglib uri=3D"http://java.sun.com/portlet" prefix=3D"portlet" %> <%@ taglib uri=3D"/WEB-INF/portal-lib.tld" prefix=3D"n" %> Modified: branches/JBoss_Portal_Branch_2_6/core/src/resources/portal-core-w= ar/WEB-INF/jsp/error/page.jsp =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/core/src/resources/portal-core-war/WEB= -INF/jsp/error/page.jsp 2007-10-29 16:02:40 UTC (rev 8792) +++ branches/JBoss_Portal_Branch_2_6/core/src/resources/portal-core-war/WEB= -INF/jsp/error/page.jsp 2007-10-29 18:24:53 UTC (rev 8793) @@ -1,3 +1,4 @@ +<%@ page import=3D"java.lang.Throwable" %> <%@ page import=3D"org.jboss.portal.common.util.Exceptions" %> =

    <%=3D request.getAttribute("org.jboss.port= al.control.ERROR_TYPE") %> Modified: branches/JBoss_Portal_Branch_2_6/core/src/resources/portal-core-w= ar/WEB-INF/jsp/error/portal.jsp =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/core/src/resources/portal-core-war/WEB= -INF/jsp/error/portal.jsp 2007-10-29 16:02:40 UTC (rev 8792) +++ branches/JBoss_Portal_Branch_2_6/core/src/resources/portal-core-war/WEB= -INF/jsp/error/portal.jsp 2007-10-29 18:24:53 UTC (rev 8793) @@ -1,3 +1,4 @@ +<%@ page import=3D"java.lang.Throwable" %> <%@ page import=3D"org.jboss.portal.common.util.Exceptions" %> =

    <%=3D request.getAttribute("org.jboss.port= al.control.ERROR_TYPE") %> Modified: branches/JBoss_Portal_Branch_2_6/core/src/resources/portal-core-w= ar/WEB-INF/jsp/header/header.jsp =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/core/src/resources/portal-core-war/WEB= -INF/jsp/header/header.jsp 2007-10-29 16:02:40 UTC (rev 8792) +++ branches/JBoss_Portal_Branch_2_6/core/src/resources/portal-core-war/WEB= -INF/jsp/header/header.jsp 2007-10-29 18:24:53 UTC (rev 8793) @@ -3,7 +3,6 @@ = <% User user =3D (User)request.getAttribute("org.jboss.portal.header.USER"= ); - PortalURL dashboardURL =3D (PortalURL)request.getAttribute("org.jboss.p= ortal.header.DASHBOARD_URL"); PortalURL loginURL =3D (PortalURL)request.getAttribute("org.jboss.porta= l.header.LOGIN_URL"); PortalURL defaultPortalURL =3D (PortalURL)request.getAttribute("org.jbo= ss.portal.header.DEFAULT_PORTAL_URL"); Modified: branches/JBoss_Portal_Branch_2_6/core/src/resources/portal-core-w= ar/WEB-INF/jsp/header/tabs.jsp =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/core/src/resources/portal-core-war/WEB= -INF/jsp/header/tabs.jsp 2007-10-29 16:02:40 UTC (rev 8792) +++ branches/JBoss_Portal_Branch_2_6/core/src/resources/portal-core-war/WEB= -INF/jsp/header/tabs.jsp 2007-10-29 18:24:53 UTC (rev 8793) @@ -1,8 +1,8 @@ -<%@ page import=3D"org.jboss.portal.api.PortalRuntimeContext" %> +<%@ page import=3D"java.util.Iterator" %> <%@ page import=3D"org.jboss.portal.api.node.PortalNode" %> +<%@ page import=3D"java.util.Locale" %> <%@ page import=3D"java.util.ArrayList" %> -<%@ page import=3D"java.util.Iterator" %> -<%@ page import=3D"java.util.Locale" %> +<%@ page import=3D"org.jboss.portal.api.PortalRuntimeContext" %> = <% PortalNode root =3D (PortalNode)request.getAttribute("org.jboss.portal.= api.PORTAL_NODE"); Modified: branches/JBoss_Portal_Branch_2_6/core/src/resources/portal-core-w= ar/WEB-INF/jsp/user/login.jsp =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/core/src/resources/portal-core-war/WEB= -INF/jsp/user/login.jsp 2007-10-29 16:02:40 UTC (rev 8792) +++ branches/JBoss_Portal_Branch_2_6/core/src/resources/portal-core-war/WEB= -INF/jsp/user/login.jsp 2007-10-29 18:24:53 UTC (rev 8793) @@ -1,3 +1,4 @@ +<%@ page import=3D"org.jboss.portal.core.CoreConstants" %> <%@ page language=3D"java" extends=3D"org.jboss.portal.core.servlet.jsp.Po= rtalJsp" %> <%@ taglib uri=3D"/WEB-INF/portal-lib.tld" prefix=3D"n" %> <%@ taglib uri=3D"http://java.sun.com/portlet" prefix=3D"portlet" %> Modified: branches/JBoss_Portal_Branch_2_6/core/src/resources/portal-core-w= ar/WEB-INF/jsp/user/registerUser_admin.jsp =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/core/src/resources/portal-core-war/WEB= -INF/jsp/user/registerUser_admin.jsp 2007-10-29 16:02:40 UTC (rev 8792) +++ branches/JBoss_Portal_Branch_2_6/core/src/resources/portal-core-war/WEB= -INF/jsp/user/registerUser_admin.jsp 2007-10-29 18:24:53 UTC (rev 8793) @@ -1,3 +1,4 @@ +<%@ page import=3D"org.jboss.portal.core.CoreConstants" %> <%@ page language=3D"java" extends=3D"org.jboss.portal.core.servlet.jsp.Po= rtalJsp" %> <%@ taglib uri=3D"/WEB-INF/portal-lib.tld" prefix=3D"n" %> <%@ taglib uri=3D"http://java.sun.com/portlet" prefix=3D"portlet" %> Modified: branches/JBoss_Portal_Branch_2_6/core/src/resources/portal-core-w= ar/WEB-INF/jsp/user/register_ty.jsp =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/core/src/resources/portal-core-war/WEB= -INF/jsp/user/register_ty.jsp 2007-10-29 16:02:40 UTC (rev 8792) +++ branches/JBoss_Portal_Branch_2_6/core/src/resources/portal-core-war/WEB= -INF/jsp/user/register_ty.jsp 2007-10-29 18:24:53 UTC (rev 8793) @@ -1,3 +1,4 @@ +<%@ page import=3D"org.jboss.portal.core.CoreConstants" %> <%@ page language=3D"java" extends=3D"org.jboss.portal.core.servlet.jsp.Po= rtalJsp" %> <%@ taglib uri=3D"/WEB-INF/portal-lib.tld" prefix=3D"n" %> <%@ taglib uri=3D"http://java.sun.com/portlet" prefix=3D"portlet" %> --===============8633178735989745025==-- From portal-commits at lists.jboss.org Mon Oct 29 14:27:43 2007 Content-Type: multipart/mixed; boundary="===============5069903944731275269==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8794 - in branches/JBoss_Portal_Branch_2_6/core-cms/src/resources/portal-cms-war/WEB-INF/jsp/cms: editor and 1 other directory. Date: Mon, 29 Oct 2007 14:27:43 -0400 Message-ID: --===============5069903944731275269== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: chris.laprun(a)jboss.com Date: 2007-10-29 14:27:42 -0400 (Mon, 29 Oct 2007) New Revision: 8794 Modified: branches/JBoss_Portal_Branch_2_6/core-cms/src/resources/portal-cms-war/W= EB-INF/jsp/cms/admin/exportarchive.jsp branches/JBoss_Portal_Branch_2_6/core-cms/src/resources/portal-cms-war/W= EB-INF/jsp/cms/admin/folderlist.jsp branches/JBoss_Portal_Branch_2_6/core-cms/src/resources/portal-cms-war/W= EB-INF/jsp/cms/admin/securenode.jsp branches/JBoss_Portal_Branch_2_6/core-cms/src/resources/portal-cms-war/W= EB-INF/jsp/cms/admin/upload.jsp branches/JBoss_Portal_Branch_2_6/core-cms/src/resources/portal-cms-war/W= EB-INF/jsp/cms/admin/uploadarchive.jsp branches/JBoss_Portal_Branch_2_6/core-cms/src/resources/portal-cms-war/W= EB-INF/jsp/cms/editor/main.jsp Log: Reverted to version without optimized imports. Modified: branches/JBoss_Portal_Branch_2_6/core-cms/src/resources/portal-cm= s-war/WEB-INF/jsp/cms/admin/exportarchive.jsp =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/core-cms/src/resources/portal-cms-war/= WEB-INF/jsp/cms/admin/exportarchive.jsp 2007-10-29 18:24:53 UTC (rev 8793) +++ branches/JBoss_Portal_Branch_2_6/core-cms/src/resources/portal-cms-war/= WEB-INF/jsp/cms/admin/exportarchive.jsp 2007-10-29 18:27:42 UTC (rev 8794) @@ -1,3 +1,4 @@ +<%@ page import=3D"java.util.Locale" %> <%@ page language=3D"java" extends=3D"org.jboss.portal.core.servlet.jsp.Po= rtalJsp" %> <%@ taglib uri=3D"http://java.sun.com/portlet" prefix=3D"portlet" %> <%@ taglib uri=3D"/WEB-INF/portal-lib.tld" prefix=3D"n" %> Modified: branches/JBoss_Portal_Branch_2_6/core-cms/src/resources/portal-cm= s-war/WEB-INF/jsp/cms/admin/folderlist.jsp =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/core-cms/src/resources/portal-cms-war/= WEB-INF/jsp/cms/admin/folderlist.jsp 2007-10-29 18:24:53 UTC (rev 8793) +++ branches/JBoss_Portal_Branch_2_6/core-cms/src/resources/portal-cms-war/= WEB-INF/jsp/cms/admin/folderlist.jsp 2007-10-29 18:27:42 UTC (rev 8794) @@ -2,7 +2,6 @@ <%@ page import=3D"org.jboss.portal.cms.util.NodeUtil" %> <%@ page import=3D"org.jboss.portal.core.cms.ui.admin.CMSAdminConstants" %> <%@ page import=3D"java.util.List" %> -<%@ page import=3D"java.util.Locale" %> <%@ page import=3D"java.util.StringTokenizer" %> <%@ page isELIgnored=3D"false" %> <%@ taglib uri=3D"http://java.sun.com/portlet" prefix=3D"portlet" %> Modified: branches/JBoss_Portal_Branch_2_6/core-cms/src/resources/portal-cm= s-war/WEB-INF/jsp/cms/admin/securenode.jsp =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/core-cms/src/resources/portal-cms-war/= WEB-INF/jsp/cms/admin/securenode.jsp 2007-10-29 18:24:53 UTC (rev 8793) +++ branches/JBoss_Portal_Branch_2_6/core-cms/src/resources/portal-cms-war/= WEB-INF/jsp/cms/admin/securenode.jsp 2007-10-29 18:27:42 UTC (rev 8794) @@ -1,5 +1,7 @@ +<%@ page import=3D"org.jboss.portal.core.cms.ui.admin.CMSAdminConstants" %> +<%@ page import=3D"org.jboss.portal.identity.Role" %> +<%@ page import=3D"org.jboss.portal.identity.User" %> <%@ page import=3D"org.jboss.portal.cms.security.AuthorizationManager" %> -<%@ page import=3D"org.jboss.portal.core.cms.ui.admin.CMSAdminConstants" %> <%@ page import=3D"java.util.Iterator" %> <%@ page import=3D"java.util.Set" %> <%@ page language=3D"java" extends=3D"org.jboss.portal.core.servlet.jsp.Po= rtalJsp" %> Modified: branches/JBoss_Portal_Branch_2_6/core-cms/src/resources/portal-cm= s-war/WEB-INF/jsp/cms/admin/upload.jsp =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/core-cms/src/resources/portal-cms-war/= WEB-INF/jsp/cms/admin/upload.jsp 2007-10-29 18:24:53 UTC (rev 8793) +++ branches/JBoss_Portal_Branch_2_6/core-cms/src/resources/portal-cms-war/= WEB-INF/jsp/cms/admin/upload.jsp 2007-10-29 18:27:42 UTC (rev 8794) @@ -1,3 +1,4 @@ +<%@ page import=3D"java.util.Locale" %> <%@ page language=3D"java" extends=3D"org.jboss.portal.core.servlet.jsp.Po= rtalJsp" %> <%@ taglib uri=3D"http://java.sun.com/portlet" prefix=3D"portlet" %> <%@ taglib uri=3D"/WEB-INF/portal-lib.tld" prefix=3D"n" %> Modified: branches/JBoss_Portal_Branch_2_6/core-cms/src/resources/portal-cm= s-war/WEB-INF/jsp/cms/admin/uploadarchive.jsp =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/core-cms/src/resources/portal-cms-war/= WEB-INF/jsp/cms/admin/uploadarchive.jsp 2007-10-29 18:24:53 UTC (rev 8793) +++ branches/JBoss_Portal_Branch_2_6/core-cms/src/resources/portal-cms-war/= WEB-INF/jsp/cms/admin/uploadarchive.jsp 2007-10-29 18:27:42 UTC (rev 8794) @@ -1,3 +1,4 @@ +<%@ page import=3D"java.util.Locale" %> <%@ page language=3D"java" extends=3D"org.jboss.portal.core.servlet.jsp.Po= rtalJsp" %> <%@ taglib uri=3D"http://java.sun.com/portlet" prefix=3D"portlet" %> <%@ taglib uri=3D"/WEB-INF/portal-lib.tld" prefix=3D"n" %> Modified: branches/JBoss_Portal_Branch_2_6/core-cms/src/resources/portal-cm= s-war/WEB-INF/jsp/cms/editor/main.jsp =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/core-cms/src/resources/portal-cms-war/= WEB-INF/jsp/cms/editor/main.jsp 2007-10-29 18:24:53 UTC (rev 8793) +++ branches/JBoss_Portal_Branch_2_6/core-cms/src/resources/portal-cms-war/= WEB-INF/jsp/cms/editor/main.jsp 2007-10-29 18:27:42 UTC (rev 8794) @@ -1,9 +1,12 @@ -<%@ page import=3D"org.jboss.portal.cms.model.Content" %> <%@ page import=3D"org.jboss.portal.cms.model.File" %> <%@ page import=3D"org.jboss.portal.cms.model.Folder" %> +<%@ page import=3D"org.jboss.portal.cms.model.Content" %> <%@ page import=3D"org.jboss.portal.core.cms.ui.admin.CMSAdminConstants" %> +<%@ page import=3D"java.text.Format" %> +<%@ page import=3D"java.text.SimpleDateFormat" %> <%@ page import=3D"java.util.List" %> <%@ page import=3D"java.util.StringTokenizer" %> +<%@ page import=3D"javax.portlet.PortletURL" %> <%@ page language=3D"java" extends=3D"org.jboss.portal.core.servlet.jsp.Po= rtalJsp" %> <%@ taglib uri=3D"/WEB-INF/portal-lib.tld" prefix=3D"n" %> <%@ taglib uri=3D"http://java.sun.com/portlet" prefix=3D"portlet" %> --===============5069903944731275269==-- From portal-commits at lists.jboss.org Mon Oct 29 14:31:24 2007 Content-Type: multipart/mixed; boundary="===============8807262140313011380==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8795 - in branches/JBoss_Portal_Branch_2_6/core-samples/src/resources/portal-basic-samples-war/WEB-INF: classes and 2 other directories. Date: Mon, 29 Oct 2007 14:31:24 -0400 Message-ID: --===============8807262140313011380== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: chris.laprun(a)jboss.com Date: 2007-10-29 14:31:24 -0400 (Mon, 29 Oct 2007) New Revision: 8795 Modified: branches/JBoss_Portal_Branch_2_6/core-samples/src/resources/portal-basic= -samples-war/WEB-INF/classes/NewsResource.properties branches/JBoss_Portal_Branch_2_6/core-samples/src/resources/portal-basic= -samples-war/WEB-INF/classes/NewsResource_fr.properties branches/JBoss_Portal_Branch_2_6/core-samples/src/resources/portal-basic= -samples-war/WEB-INF/classes/NewsResource_it.properties branches/JBoss_Portal_Branch_2_6/core-samples/src/resources/portal-basic= -samples-war/WEB-INF/default-object.xml branches/JBoss_Portal_Branch_2_6/core-samples/src/resources/portal-basic= -samples-war/WEB-INF/jboss-app.xml branches/JBoss_Portal_Branch_2_6/core-samples/src/resources/portal-basic= -samples-war/WEB-INF/jboss-portlet.xml branches/JBoss_Portal_Branch_2_6/core-samples/src/resources/portal-basic= -samples-war/WEB-INF/jsp/event/view.jsp branches/JBoss_Portal_Branch_2_6/core-samples/src/resources/portal-basic= -samples-war/WEB-INF/jsp/theme/wsrpSelectorTest.jsp branches/JBoss_Portal_Branch_2_6/core-samples/src/resources/portal-basic= -samples-war/WEB-INF/portlet-instances.xml branches/JBoss_Portal_Branch_2_6/core-samples/src/resources/portal-basic= -samples-war/WEB-INF/portlet.xml branches/JBoss_Portal_Branch_2_6/core-samples/src/resources/portal-basic= -samples-war/WEB-INF/web.xml Log: Reverted to version without optimized imports. Property changes on: branches/JBoss_Portal_Branch_2_6/core-samples/src/reso= urces/portal-basic-samples-war/WEB-INF/classes/NewsResource.properties ___________________________________________________________________ Name: svn:keywords - = + LastChangedDate LastChangedBy LastChangedRevision Id Property changes on: branches/JBoss_Portal_Branch_2_6/core-samples/src/reso= urces/portal-basic-samples-war/WEB-INF/classes/NewsResource_fr.properties ___________________________________________________________________ Name: svn:keywords - = + LastChangedDate LastChangedBy LastChangedRevision Id Property changes on: branches/JBoss_Portal_Branch_2_6/core-samples/src/reso= urces/portal-basic-samples-war/WEB-INF/classes/NewsResource_it.properties ___________________________________________________________________ Name: svn:keywords - = + LastChangedDate LastChangedBy LastChangedRevision Id Property changes on: branches/JBoss_Portal_Branch_2_6/core-samples/src/reso= urces/portal-basic-samples-war/WEB-INF/default-object.xml ___________________________________________________________________ Name: svn:keywords - = + LastChangedDate LastChangedBy LastChangedRevision Id Property changes on: branches/JBoss_Portal_Branch_2_6/core-samples/src/reso= urces/portal-basic-samples-war/WEB-INF/jboss-app.xml ___________________________________________________________________ Name: svn:keywords - = + LastChangedDate LastChangedBy LastChangedRevision Id Property changes on: branches/JBoss_Portal_Branch_2_6/core-samples/src/reso= urces/portal-basic-samples-war/WEB-INF/jboss-portlet.xml ___________________________________________________________________ Name: svn:keywords - = + LastChangedDate LastChangedBy LastChangedRevision Id Modified: branches/JBoss_Portal_Branch_2_6/core-samples/src/resources/porta= l-basic-samples-war/WEB-INF/jsp/event/view.jsp =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/core-samples/src/resources/portal-basi= c-samples-war/WEB-INF/jsp/event/view.jsp 2007-10-29 18:27:42 UTC (rev 8794) +++ branches/JBoss_Portal_Branch_2_6/core-samples/src/resources/portal-basi= c-samples-war/WEB-INF/jsp/event/view.jsp 2007-10-29 18:31:24 UTC (rev 8795) @@ -1,3 +1,4 @@ +<%@ page import=3D"org.jboss.portal.server.PortalConstants" %> <%--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~= ~~~~ ~ JBoss, a division of Red Hat = ~ ~ Copyright 2006, Red Hat Middleware, LLC, and individual = ~ Property changes on: branches/JBoss_Portal_Branch_2_6/core-samples/src/reso= urces/portal-basic-samples-war/WEB-INF/jsp/event/view.jsp ___________________________________________________________________ Name: svn:keywords - = + LastChangedDate LastChangedBy LastChangedRevision Id Property changes on: branches/JBoss_Portal_Branch_2_6/core-samples/src/reso= urces/portal-basic-samples-war/WEB-INF/jsp/theme/wsrpSelectorTest.jsp ___________________________________________________________________ Name: svn:keywords - = + LastChangedDate LastChangedBy LastChangedRevision Id Property changes on: branches/JBoss_Portal_Branch_2_6/core-samples/src/reso= urces/portal-basic-samples-war/WEB-INF/portlet-instances.xml ___________________________________________________________________ Name: svn:keywords - = + LastChangedDate LastChangedBy LastChangedRevision Id Property changes on: branches/JBoss_Portal_Branch_2_6/core-samples/src/reso= urces/portal-basic-samples-war/WEB-INF/portlet.xml ___________________________________________________________________ Name: svn:keywords - = + LastChangedDate LastChangedBy LastChangedRevision Id Property changes on: branches/JBoss_Portal_Branch_2_6/core-samples/src/reso= urces/portal-basic-samples-war/WEB-INF/web.xml ___________________________________________________________________ Name: svn:keywords - = + LastChangedDate LastChangedBy LastChangedRevision Id --===============8807262140313011380==-- From portal-commits at lists.jboss.org Mon Oct 29 14:32:55 2007 Content-Type: multipart/mixed; boundary="===============6883942829335600453==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8796 - in branches/JBoss_Portal_Branch_2_6/core-samples/src/resources/portal-jsp-samples-war/WEB-INF: jsp/jsp and 1 other directory. Date: Mon, 29 Oct 2007 14:32:55 -0400 Message-ID: --===============6883942829335600453== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: chris.laprun(a)jboss.com Date: 2007-10-29 14:32:55 -0400 (Mon, 29 Oct 2007) New Revision: 8796 Modified: branches/JBoss_Portal_Branch_2_6/core-samples/src/resources/portal-jsp-s= amples-war/WEB-INF/jsp/jsp/view.jsp branches/JBoss_Portal_Branch_2_6/core-samples/src/resources/portal-jsp-s= amples-war/WEB-INF/portlet-instances.xml branches/JBoss_Portal_Branch_2_6/core-samples/src/resources/portal-jsp-s= amples-war/WEB-INF/portlet.xml Log: Reverted to version without optimized imports. Property changes on: branches/JBoss_Portal_Branch_2_6/core-samples/src/reso= urces/portal-jsp-samples-war/WEB-INF/jsp/jsp/view.jsp ___________________________________________________________________ Name: svn:keywords - = + LastChangedDate LastChangedBy LastChangedRevision Id Property changes on: branches/JBoss_Portal_Branch_2_6/core-samples/src/reso= urces/portal-jsp-samples-war/WEB-INF/portlet-instances.xml ___________________________________________________________________ Name: svn:keywords - = + LastChangedDate LastChangedBy LastChangedRevision Id Property changes on: branches/JBoss_Portal_Branch_2_6/core-samples/src/reso= urces/portal-jsp-samples-war/WEB-INF/portlet.xml ___________________________________________________________________ Name: svn:keywords - = + LastChangedDate LastChangedBy LastChangedRevision Id --===============6883942829335600453==-- From portal-commits at lists.jboss.org Mon Oct 29 14:51:36 2007 Content-Type: multipart/mixed; boundary="===============5123007518998324017==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8797 - in branches/JBoss_Portal_Branch_2_6/core-samples/src/resources/portal-users-samples-war/WEB-INF: classes and 1 other directories. Date: Mon, 29 Oct 2007 14:51:35 -0400 Message-ID: --===============5123007518998324017== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: chris.laprun(a)jboss.com Date: 2007-10-29 14:51:35 -0400 (Mon, 29 Oct 2007) New Revision: 8797 Modified: branches/JBoss_Portal_Branch_2_6/core-samples/src/resources/portal-users= -samples-war/WEB-INF/classes/Resource.properties branches/JBoss_Portal_Branch_2_6/core-samples/src/resources/portal-users= -samples-war/WEB-INF/classes/Resource_it.properties branches/JBoss_Portal_Branch_2_6/core-samples/src/resources/portal-users= -samples-war/WEB-INF/jboss-portlet.xml branches/JBoss_Portal_Branch_2_6/core-samples/src/resources/portal-users= -samples-war/WEB-INF/jsp/users/noUser.jsp branches/JBoss_Portal_Branch_2_6/core-samples/src/resources/portal-users= -samples-war/WEB-INF/jsp/users/oneUser.jsp branches/JBoss_Portal_Branch_2_6/core-samples/src/resources/portal-users= -samples-war/WEB-INF/jsp/users/users.jsp branches/JBoss_Portal_Branch_2_6/core-samples/src/resources/portal-users= -samples-war/WEB-INF/portal-lib.tld branches/JBoss_Portal_Branch_2_6/core-samples/src/resources/portal-users= -samples-war/WEB-INF/portlet-instances.xml branches/JBoss_Portal_Branch_2_6/core-samples/src/resources/portal-users= -samples-war/WEB-INF/portlet.xml Log: Reverted to version without optimized imports. Property changes on: branches/JBoss_Portal_Branch_2_6/core-samples/src/reso= urces/portal-users-samples-war/WEB-INF/classes/Resource.properties ___________________________________________________________________ Name: svn:keywords - = + LastChangedDate LastChangedBy LastChangedRevision Id Property changes on: branches/JBoss_Portal_Branch_2_6/core-samples/src/reso= urces/portal-users-samples-war/WEB-INF/classes/Resource_it.properties ___________________________________________________________________ Name: svn:keywords - = + LastChangedDate LastChangedBy LastChangedRevision Id Property changes on: branches/JBoss_Portal_Branch_2_6/core-samples/src/reso= urces/portal-users-samples-war/WEB-INF/jboss-portlet.xml ___________________________________________________________________ Name: svn:keywords - = + LastChangedDate LastChangedBy LastChangedRevision Id Modified: branches/JBoss_Portal_Branch_2_6/core-samples/src/resources/porta= l-users-samples-war/WEB-INF/jsp/users/noUser.jsp =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/core-samples/src/resources/portal-user= s-samples-war/WEB-INF/jsp/users/noUser.jsp 2007-10-29 18:32:55 UTC (rev 879= 6) +++ branches/JBoss_Portal_Branch_2_6/core-samples/src/resources/portal-user= s-samples-war/WEB-INF/jsp/users/noUser.jsp 2007-10-29 18:51:35 UTC (rev 879= 7) @@ -1,3 +1,4 @@ +<%@ page import=3D"org.jboss.portal.core.CoreConstants" %> <%--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~= ~~~~ ~ JBoss, a division of Red Hat = ~ ~ Copyright 2006, Red Hat Middleware, LLC, and individual = ~ Property changes on: branches/JBoss_Portal_Branch_2_6/core-samples/src/reso= urces/portal-users-samples-war/WEB-INF/jsp/users/noUser.jsp ___________________________________________________________________ Name: svn:keywords - = + LastChangedDate LastChangedBy LastChangedRevision Id Modified: branches/JBoss_Portal_Branch_2_6/core-samples/src/resources/porta= l-users-samples-war/WEB-INF/jsp/users/oneUser.jsp =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/core-samples/src/resources/portal-user= s-samples-war/WEB-INF/jsp/users/oneUser.jsp 2007-10-29 18:32:55 UTC (rev 87= 96) +++ branches/JBoss_Portal_Branch_2_6/core-samples/src/resources/portal-user= s-samples-war/WEB-INF/jsp/users/oneUser.jsp 2007-10-29 18:51:35 UTC (rev 87= 97) @@ -1,3 +1,4 @@ +<%@ page import=3D"org.jboss.portal.core.CoreConstants" %> <%--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~= ~~~~ ~ JBoss, a division of Red Hat = ~ ~ Copyright 2006, Red Hat Middleware, LLC, and individual = ~ Property changes on: branches/JBoss_Portal_Branch_2_6/core-samples/src/reso= urces/portal-users-samples-war/WEB-INF/jsp/users/oneUser.jsp ___________________________________________________________________ Name: svn:keywords - = + LastChangedDate LastChangedBy LastChangedRevision Id Modified: branches/JBoss_Portal_Branch_2_6/core-samples/src/resources/porta= l-users-samples-war/WEB-INF/jsp/users/users.jsp =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/core-samples/src/resources/portal-user= s-samples-war/WEB-INF/jsp/users/users.jsp 2007-10-29 18:32:55 UTC (rev 8796) +++ branches/JBoss_Portal_Branch_2_6/core-samples/src/resources/portal-user= s-samples-war/WEB-INF/jsp/users/users.jsp 2007-10-29 18:51:35 UTC (rev 8797) @@ -1,3 +1,4 @@ +<%@ page import=3D"org.jboss.portal.core.CoreConstants" %> <%--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~= ~~~~ ~ JBoss, a division of Red Hat = ~ ~ Copyright 2006, Red Hat Middleware, LLC, and individual = ~ Property changes on: branches/JBoss_Portal_Branch_2_6/core-samples/src/reso= urces/portal-users-samples-war/WEB-INF/jsp/users/users.jsp ___________________________________________________________________ Name: svn:keywords - = + LastChangedDate LastChangedBy LastChangedRevision Id Property changes on: branches/JBoss_Portal_Branch_2_6/core-samples/src/reso= urces/portal-users-samples-war/WEB-INF/portal-lib.tld ___________________________________________________________________ Name: svn:keywords - = + LastChangedDate LastChangedBy LastChangedRevision Id Property changes on: branches/JBoss_Portal_Branch_2_6/core-samples/src/reso= urces/portal-users-samples-war/WEB-INF/portlet-instances.xml ___________________________________________________________________ Name: svn:keywords - = + LastChangedDate LastChangedBy LastChangedRevision Id Property changes on: branches/JBoss_Portal_Branch_2_6/core-samples/src/reso= urces/portal-users-samples-war/WEB-INF/portlet.xml ___________________________________________________________________ Name: svn:keywords - = + LastChangedDate LastChangedBy LastChangedRevision Id --===============5123007518998324017==-- From portal-commits at lists.jboss.org Mon Oct 29 14:52:09 2007 Content-Type: multipart/mixed; boundary="===============0854086983040646485==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8798 - in branches/JBoss_Portal_Branch_2_6/core-samples/src/resources/portal-news-samples-war/WEB-INF: jsp/news and 1 other directories. Date: Mon, 29 Oct 2007 14:52:09 -0400 Message-ID: --===============0854086983040646485== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: chris.laprun(a)jboss.com Date: 2007-10-29 14:52:09 -0400 (Mon, 29 Oct 2007) New Revision: 8798 Modified: branches/JBoss_Portal_Branch_2_6/core-samples/src/resources/portal-news-= samples-war/WEB-INF/default-object.xml branches/JBoss_Portal_Branch_2_6/core-samples/src/resources/portal-news-= samples-war/WEB-INF/jboss-portlet.xml branches/JBoss_Portal_Branch_2_6/core-samples/src/resources/portal-news-= samples-war/WEB-INF/jsp/news/edit.jsp branches/JBoss_Portal_Branch_2_6/core-samples/src/resources/portal-news-= samples-war/WEB-INF/portlet-instances.xml branches/JBoss_Portal_Branch_2_6/core-samples/src/resources/portal-news-= samples-war/WEB-INF/portlet.xml branches/JBoss_Portal_Branch_2_6/core-samples/src/resources/portal-news-= samples-war/WEB-INF/xsl/news/Rss1.xsl branches/JBoss_Portal_Branch_2_6/core-samples/src/resources/portal-news-= samples-war/WEB-INF/xsl/news/Rss2.xsl Log: Reverted to version without optimized imports. Property changes on: branches/JBoss_Portal_Branch_2_6/core-samples/src/reso= urces/portal-news-samples-war/WEB-INF/default-object.xml ___________________________________________________________________ Name: svn:keywords - = + LastChangedDate LastChangedBy LastChangedRevision Id Property changes on: branches/JBoss_Portal_Branch_2_6/core-samples/src/reso= urces/portal-news-samples-war/WEB-INF/jboss-portlet.xml ___________________________________________________________________ Name: svn:keywords - = + LastChangedDate LastChangedBy LastChangedRevision Id Modified: branches/JBoss_Portal_Branch_2_6/core-samples/src/resources/porta= l-news-samples-war/WEB-INF/jsp/news/edit.jsp =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/core-samples/src/resources/portal-news= -samples-war/WEB-INF/jsp/news/edit.jsp 2007-10-29 18:51:35 UTC (rev 8797) +++ branches/JBoss_Portal_Branch_2_6/core-samples/src/resources/portal-news= -samples-war/WEB-INF/jsp/news/edit.jsp 2007-10-29 18:52:09 UTC (rev 8798) @@ -30,8 +30,7 @@
    Change News Feed URL: = -
    "> + = "> " size=3D"25" name=3D"newurl"> Property changes on: branches/JBoss_Portal_Branch_2_6/core-samples/src/reso= urces/portal-news-samples-war/WEB-INF/jsp/news/edit.jsp ___________________________________________________________________ Name: svn:keywords - = + LastChangedDate LastChangedBy LastChangedRevision Id Property changes on: branches/JBoss_Portal_Branch_2_6/core-samples/src/reso= urces/portal-news-samples-war/WEB-INF/portlet-instances.xml ___________________________________________________________________ Name: svn:keywords - = + LastChangedDate LastChangedBy LastChangedRevision Id Property changes on: branches/JBoss_Portal_Branch_2_6/core-samples/src/reso= urces/portal-news-samples-war/WEB-INF/portlet.xml ___________________________________________________________________ Name: svn:keywords - = + LastChangedDate LastChangedBy LastChangedRevision Id Property changes on: branches/JBoss_Portal_Branch_2_6/core-samples/src/reso= urces/portal-news-samples-war/WEB-INF/xsl/news/Rss1.xsl ___________________________________________________________________ Name: svn:keywords - = + LastChangedDate LastChangedBy LastChangedRevision Id Property changes on: branches/JBoss_Portal_Branch_2_6/core-samples/src/reso= urces/portal-news-samples-war/WEB-INF/xsl/news/Rss2.xsl ___________________________________________________________________ Name: svn:keywords - = + LastChangedDate LastChangedBy LastChangedRevision Id --===============0854086983040646485==-- From portal-commits at lists.jboss.org Mon Oct 29 14:53:43 2007 Content-Type: multipart/mixed; boundary="===============2722670425568850784==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8799 - in branches/JBoss_Portal_Branch_2_6/core-samples/src/resources/portal-weather-samples-war/WEB-INF: jsp/weather and 1 other directories. Date: Mon, 29 Oct 2007 14:53:42 -0400 Message-ID: --===============2722670425568850784== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: chris.laprun(a)jboss.com Date: 2007-10-29 14:53:42 -0400 (Mon, 29 Oct 2007) New Revision: 8799 Modified: branches/JBoss_Portal_Branch_2_6/core-samples/src/resources/portal-weath= er-samples-war/WEB-INF/default-object.xml branches/JBoss_Portal_Branch_2_6/core-samples/src/resources/portal-weath= er-samples-war/WEB-INF/jboss-portlet.xml branches/JBoss_Portal_Branch_2_6/core-samples/src/resources/portal-weath= er-samples-war/WEB-INF/jsp/weather/edit.jsp branches/JBoss_Portal_Branch_2_6/core-samples/src/resources/portal-weath= er-samples-war/WEB-INF/portlet-instances.xml branches/JBoss_Portal_Branch_2_6/core-samples/src/resources/portal-weath= er-samples-war/WEB-INF/portlet.xml branches/JBoss_Portal_Branch_2_6/core-samples/src/resources/portal-weath= er-samples-war/WEB-INF/xsl/weather/Rss.xsl Log: Reverted to version without optimized imports. Property changes on: branches/JBoss_Portal_Branch_2_6/core-samples/src/reso= urces/portal-weather-samples-war/WEB-INF/default-object.xml ___________________________________________________________________ Name: svn:keywords - = + LastChangedDate LastChangedBy LastChangedRevision Id Property changes on: branches/JBoss_Portal_Branch_2_6/core-samples/src/reso= urces/portal-weather-samples-war/WEB-INF/jboss-portlet.xml ___________________________________________________________________ Name: svn:keywords - = + LastChangedDate LastChangedBy LastChangedRevision Id Modified: branches/JBoss_Portal_Branch_2_6/core-samples/src/resources/porta= l-weather-samples-war/WEB-INF/jsp/weather/edit.jsp =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/core-samples/src/resources/portal-weat= her-samples-war/WEB-INF/jsp/weather/edit.jsp 2007-10-29 18:52:09 UTC (rev 8= 798) +++ branches/JBoss_Portal_Branch_2_6/core-samples/src/resources/portal-weat= her-samples-war/WEB-INF/jsp/weather/edit.jsp 2007-10-29 18:53:42 UTC (rev 8= 799) @@ -30,8 +30,7 @@
    Change Weather Location: = - "> + "> Zip Code:

    Property changes on: branches/JBoss_Portal_Branch_2_6/core-samples/src/reso= urces/portal-weather-samples-war/WEB-INF/jsp/weather/edit.jsp ___________________________________________________________________ Name: svn:keywords - = + LastChangedDate LastChangedBy LastChangedRevision Id Property changes on: branches/JBoss_Portal_Branch_2_6/core-samples/src/reso= urces/portal-weather-samples-war/WEB-INF/portlet-instances.xml ___________________________________________________________________ Name: svn:keywords - = + LastChangedDate LastChangedBy LastChangedRevision Id Property changes on: branches/JBoss_Portal_Branch_2_6/core-samples/src/reso= urces/portal-weather-samples-war/WEB-INF/portlet.xml ___________________________________________________________________ Name: svn:keywords - = + LastChangedDate LastChangedBy LastChangedRevision Id Property changes on: branches/JBoss_Portal_Branch_2_6/core-samples/src/reso= urces/portal-weather-samples-war/WEB-INF/xsl/weather/Rss.xsl ___________________________________________________________________ Name: svn:keywords - = + LastChangedDate LastChangedBy LastChangedRevision Id --===============2722670425568850784==-- From portal-commits at lists.jboss.org Mon Oct 29 14:58:34 2007 Content-Type: multipart/mixed; boundary="===============2668941702508037498==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8800 - branches/JBoss_Portal_Branch_2_6/widget/src/resources/portal-widget-war/WEB-INF/jsp. Date: Mon, 29 Oct 2007 14:58:34 -0400 Message-ID: --===============2668941702508037498== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: chris.laprun(a)jboss.com Date: 2007-10-29 14:58:34 -0400 (Mon, 29 Oct 2007) New Revision: 8800 Modified: branches/JBoss_Portal_Branch_2_6/widget/src/resources/portal-widget-war/= WEB-INF/jsp/edit.jsp Log: Reverted to version without optimized imports. Modified: branches/JBoss_Portal_Branch_2_6/widget/src/resources/portal-widg= et-war/WEB-INF/jsp/edit.jsp =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/widget/src/resources/portal-widget-war= /WEB-INF/jsp/edit.jsp 2007-10-29 18:53:42 UTC (rev 8799) +++ branches/JBoss_Portal_Branch_2_6/widget/src/resources/portal-widget-war= /WEB-INF/jsp/edit.jsp 2007-10-29 18:58:34 UTC (rev 8800) @@ -4,6 +4,7 @@ <%@ page import=3D"org.jboss.portal.widget.google.info.GGWidgetCategoryInf= o" %> <%@ page import=3D"org.jboss.portal.widget.google.provider.GGProvider" %> <%@ page import=3D"org.jboss.portal.widget.google.provider.GGQuery" %> +<%@ page import=3D"org.jboss.portal.widget.google.provider.GGQueryResult" = %> <%@ page import=3D"org.jboss.portal.widget.google.type.DataType" %> <%@ page import=3D"org.jboss.portal.widget.google.type.EnumType" %> <%@ page import=3D"javax.portlet.PortletURL" %> --===============2668941702508037498==-- From portal-commits at lists.jboss.org Mon Oct 29 19:07:32 2007 Content-Type: multipart/mixed; boundary="===============4474425487099857788==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8801 - in branches/JBoss_Portal_Branch_2_6/wsrp: src/resources and 1 other directories. Date: Mon, 29 Oct 2007 19:07:32 -0400 Message-ID: --===============4474425487099857788== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: chris.laprun(a)jboss.com Date: 2007-10-29 19:07:31 -0400 (Mon, 29 Oct 2007) New Revision: 8801 Added: branches/JBoss_Portal_Branch_2_6/wsrp/src/resources/portal-wsrp-war/ Removed: branches/JBoss_Portal_Branch_2_6/wsrp/src/resources/portal-wsrp-jse/ branches/JBoss_Portal_Branch_2_6/wsrp/src/resources/portal-wsrp-war/WEB-= INF/jboss-web.xml Modified: branches/JBoss_Portal_Branch_2_6/wsrp/build.xml Log: - JBPORTAL-1753: Renamed portal-wsrp.jse to portal-wsrp.war. Still need to = figure out the warnings... Modified: branches/JBoss_Portal_Branch_2_6/wsrp/build.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/wsrp/build.xml 2007-10-29 18:58:34 UTC= (rev 8800) +++ branches/JBoss_Portal_Branch_2_6/wsrp/build.xml 2007-10-29 23:07:31 UTC= (rev 8801) @@ -309,8 +309,8 @@ - - + + = @@ -320,7 +320,7 @@ - + = = Copied: branches/JBoss_Portal_Branch_2_6/wsrp/src/resources/portal-wsrp-war= (from rev 8792, branches/JBoss_Portal_Branch_2_6/wsrp/src/resources/portal= -wsrp-jse) Deleted: branches/JBoss_Portal_Branch_2_6/wsrp/src/resources/portal-wsrp-wa= r/WEB-INF/jboss-web.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/wsrp/src/resources/portal-wsrp-jse/WEB= -INF/jboss-web.xml 2007-10-29 16:02:40 UTC (rev 8792) +++ branches/JBoss_Portal_Branch_2_6/wsrp/src/resources/portal-wsrp-war/WEB= -INF/jboss-web.xml 2007-10-29 23:07:31 UTC (rev 8801) @@ -1,26 +0,0 @@ - - - - - \ No newline at end of file --===============4474425487099857788==-- From portal-commits at lists.jboss.org Tue Oct 30 01:52:15 2007 Content-Type: multipart/mixed; boundary="===============0832080423240636476==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8802 - in branches/JBoss_Portal_Branch_2_6/wsrp/src: main/org/jboss/portal/wsrp/producer and 2 other directories. Date: Tue, 30 Oct 2007 01:52:15 -0400 Message-ID: --===============0832080423240636476== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: chris.laprun(a)jboss.com Date: 2007-10-30 01:52:15 -0400 (Tue, 30 Oct 2007) New Revision: 8802 Removed: branches/JBoss_Portal_Branch_2_6/wsrp/src/resources/tests/test-wsrp-cons= umer-war/WEB-INF/jboss-web.xml branches/JBoss_Portal_Branch_2_6/wsrp/src/resources/tests/test-wsrp-prod= ucer-war/WEB-INF/jboss-web.xml Modified: branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/test/wsr= p/v1/producer/RegistrationTestCase.java branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/test/wsr= p/v1/producer/ReleaseSessionTestCase.java branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/test/wsr= p/v1/producer/ServiceDescriptionTestCase.java branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/test/wsr= p/v1/producer/V1ProducerBaseTest.java branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/wsrp/pro= ducer/RegistrationHandler.java Log: - Make registration operations fail if no registration is required and adde= d associated test cases. - Modified configuration of registration in V1ProducerBaseTest to allow for= proper wiring of policy associated objects which is normally done during p= roducer startup. = Might want to consider wiring a rejecting policy for added safety if none= is set-up (which is the case when the producer doesn't require registratio= n) as the policy = will be null in that case... This was causing a bunch of tests to fail. = - Adapted ReleaseSessionTestCase to work properly as it's not possible to c= all registerConsumer any time any more (it will fail if registration is not= required). - Removed unneeded jboss-web.xml files. Modified: branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/t= est/wsrp/v1/producer/RegistrationTestCase.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/test/ws= rp/v1/producer/RegistrationTestCase.java 2007-10-29 23:07:31 UTC (rev 8801) +++ branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/test/ws= rp/v1/producer/RegistrationTestCase.java 2007-10-30 05:52:15 UTC (rev 8802) @@ -35,6 +35,7 @@ import org.jboss.portal.wsrp.core.PropertyDescription; import org.jboss.portal.wsrp.core.RegistrationContext; import org.jboss.portal.wsrp.core.RegistrationData; +import org.jboss.portal.wsrp.core.MissingParametersFault; import org.jboss.portal.wsrp.registration.RegistrationPropertyDescription; = import javax.xml.namespace.QName; @@ -47,8 +48,7 @@ */ public class RegistrationTestCase extends V1ProducerBaseTest { - public RegistrationTestCase() - throws Exception + public RegistrationTestCase() throws Exception { super("RegistrationTestCase"); } @@ -75,7 +75,7 @@ */ public void testConsumerAgent() throws Exception { - configureRegistrationSettings(false); + configureRegistrationSettings(true, false); RegistrationData regData =3D createBaseRegData(); regData.setConsumerAgent("invalid consumer agent"); = @@ -96,7 +96,7 @@ public void testDeregister() throws Exception { // initiate registration - configureRegistrationSettings(false); + configureRegistrationSettings(true, false); RegistrationContext rc =3D registerConsumer(); = // deregister @@ -117,10 +117,10 @@ checkException(e, WSRPExceptionFactory.INVALID_REGISTRATION); } // reactivate check for exception once tests go through WS stack see= : JBPORTAL-1712 - /*catch (InvalidRegistrationFault invalidRegistrationFault) + //catch (InvalidRegistrationFault invalidRegistrationFault) { // expected - }*/ + } = // Get description with old registration context should fail GetServiceDescription gs =3D getNoRegistrationServiceDescriptionRequ= est(); @@ -137,10 +137,10 @@ checkException(e, WSRPExceptionFactory.INVALID_REGISTRATION); } // reactivate check for exception once tests go through WS stack see= : JBPORTAL-1712 - /*catch (InvalidRegistrationFault invalidRegistrationFault) + //catch (InvalidRegistrationFault invalidRegistrationFault) { // expected - }*/ + } = // Get description should still work without registration context gs =3D getNoRegistrationServiceDescriptionRequest(); @@ -151,7 +151,7 @@ public void testModifyRegistration() throws Exception { // initiate registration - configureRegistrationSettings(false); + configureRegistrationSettings(true, false); RegistrationContext rc =3D registerConsumer(); = // now modify Producer's set of required registration info @@ -177,12 +177,12 @@ checkException(e, WSRPExceptionFactory.INVALID_REGISTRATION); } // reactivate check for exception once tests go through WS stack see= : JBPORTAL-1712 - /*catch (InvalidRegistrationFault invalidRegistrationFault) + //catch (InvalidRegistrationFault invalidRegistrationFault) { // expected // WSRP primer recommends returning OperationFailedFault and NOT = InvalidRegistrationFault // kinda weird... will be replaced by ModifyRegistrationRequiredF= ault in WSRP 2.0 - }*/ + } = // Get description should return information just as if consumer was= n't registered GetServiceDescription gs =3D getNoRegistrationServiceDescriptionRequ= est(); @@ -199,12 +199,12 @@ checkException(e, WSRPExceptionFactory.INVALID_REGISTRATION); } // reactivate check for exception once tests go through WS stack see= : JBPORTAL-1712 - /*catch (InvalidRegistrationFault invalidRegistrationFault) + //catch (InvalidRegistrationFault invalidRegistrationFault) { // expected // WSRP primer recommends returning OperationFailedFault and NOT = InvalidRegistrationFault // kinda weird... will be replaced by ModifyRegistrationRequiredF= ault in WSRP 2.0 - }*/ + } = // remove registration context, try again and check that we get new = registration info gs.setRegistrationContext(null); @@ -228,7 +228,7 @@ = public void testRegister() throws Exception { - configureRegistrationSettings(false); + configureRegistrationSettings(true, false); = // service description request without registration info GetServiceDescription gs =3D getNoRegistrationServiceDescriptionRequ= est(); @@ -242,6 +242,66 @@ checkServiceDescriptionWithOnlyBasicPortlet(gs); } = + public void testRegisterWhenRegistrationNotRequired() throws Exception + { + configureRegistrationSettings(false, false); + + try + { + registerConsumer(); + ExtendedAssert.fail("Shouldn't be possible to register if no regi= stration is required."); + } + catch (RemoteException e) + { + checkException(e, WSRPExceptionFactory.OPERATION_FAILED); // expe= cted + } + // reactivate check for exception once tests go through WS stack see= : JBPORTAL-1712 + //catch (OperationFailedFault operationFailedFault) + { + // expected + } + } + + public void testDeregisterWhenRegistrationNotRequired() throws Exception + { + configureRegistrationSettings(false, false); + + try + { + registrationService.deregister(null); + ExtendedAssert.fail("Shouldn't be possible to deregister if no re= gistration is required."); + } + catch (RemoteException e) + { + checkException(e, WSRPExceptionFactory.OPERATION_FAILED); // expe= cted + } + // reactivate check for exception once tests go through WS stack see= : JBPORTAL-1712 + //catch (OperationFailedFault operationFailedFault) + { + // expected + } + } + + public void testModifyRegistrationWhenRegistrationNotRequired() throws = Exception + { + configureRegistrationSettings(false, false); + + try + { + registrationService.modifyRegistration(null); + ExtendedAssert.fail("Shouldn't be possible to modify registration= if no registration is required."); + } + catch (RemoteException e) + { + checkException(e, WSRPExceptionFactory.OPERATION_FAILED); // expe= cted + } + // reactivate check for exception once tests go through WS stack see= : JBPORTAL-1712 + //catch (OperationFailedFault operationFailedFault) + { + // expected + } + } + public void tearDown() throws Exception { producer.getProducerRegistrationRequirements().clearRegistrationProp= erties(); Modified: branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/t= est/wsrp/v1/producer/ReleaseSessionTestCase.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/test/ws= rp/v1/producer/ReleaseSessionTestCase.java 2007-10-29 23:07:31 UTC (rev 880= 1) +++ branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/test/ws= rp/v1/producer/ReleaseSessionTestCase.java 2007-10-30 05:52:15 UTC (rev 880= 2) @@ -69,7 +69,7 @@ { // possible registration contexts are: actual RegistrationContext, n= ull, and a made up value RegistrationContext fakeRegContext =3D WSRPTypeFactory.createRegistr= ationContext("Fake Registration Handle"); - RegistrationContext[] regContexts =3D new RegistrationContext[]{getR= egistrationContext(), null, fakeRegContext}; + RegistrationContext[] regContexts =3D new RegistrationContext[]{null= , null, fakeRegContext}; = // possible types of sessionIDs include null and a made up value. // Note: a valid session id cannot be used since the sessionID shoul= d never be sent to the consumer @@ -88,27 +88,30 @@ for (int j =3D 0; j < sessionIDs.length; j++) { ReleaseSessions releaseSession =3D new ReleaseSessions(regCont= exts[i], sessionIDs[j]); - releaseSessions(releaseSession, false); - releaseSessions(releaseSession, true); + releaseSessions(releaseSession, false, i); + releaseSessions(releaseSession, true, i); } } } = - private RegistrationContext getRegistrationContext() throws Exception + private void releaseSessions(ReleaseSessions releaseSessions, boolean u= seRegistration, int index) throws Exception { - return registerConsumer(); - } - - private void releaseSessions(ReleaseSessions releaseSessions, boolean u= seRegistration) throws Exception - { setUp(); try { - log.info(getSetupString(releaseSessions)); if (useRegistration) { - configureRegistrationSettings(false); + configureRegistrationSettings(true, false); + + // faking correct registration context when we're supposed to = have one... previous impl registered consumer + // all the time but this cannot be done anymore since we preve= nt registering if no registration is required + // so we need to wait for the proper case to init the registra= tion context... Hackish! :( + if (index =3D=3D 0) + { + releaseSessions.setRegistrationContext(registerConsumer()); + } } + log.info(getSetupString(releaseSessions)); markupService.releaseSessions(releaseSessions); ExtendedAssert.fail("ReleaseSessions did not thrown an OperationF= ailed Fault." + getSetupString(releaseSessions)); } Modified: branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/t= est/wsrp/v1/producer/ServiceDescriptionTestCase.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/test/ws= rp/v1/producer/ServiceDescriptionTestCase.java 2007-10-29 23:07:31 UTC (rev= 8801) +++ branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/test/ws= rp/v1/producer/ServiceDescriptionTestCase.java 2007-10-30 05:52:15 UTC (rev= 8802) @@ -70,7 +70,7 @@ = public void testGetServiceDescriptionRequiringRegistrationNoOfferedPort= lets() throws Throwable { - RegistrationPropertyDescription regProp =3D configureRegistrationSet= tings(false); + RegistrationPropertyDescription regProp =3D configureRegistrationSet= tings(true, false); = // service description request without registration info GetServiceDescription gs =3D getNoRegistrationServiceDescriptionRequ= est(); @@ -90,7 +90,7 @@ = public void testGetServiceDescriptionRequiringRegistrationOfferedPortle= ts() throws Throwable { - RegistrationPropertyDescription regProp =3D configureRegistrationSet= tings(true); + RegistrationPropertyDescription regProp =3D configureRegistrationSet= tings(true, true); = // service description request without registration info GetServiceDescription gs =3D getNoRegistrationServiceDescriptionRequ= est(); Modified: branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/t= est/wsrp/v1/producer/V1ProducerBaseTest.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/test/ws= rp/v1/producer/V1ProducerBaseTest.java 2007-10-29 23:07:31 UTC (rev 8801) +++ branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/test/ws= rp/v1/producer/V1ProducerBaseTest.java 2007-10-30 05:52:15 UTC (rev 8802) @@ -24,9 +24,13 @@ package org.jboss.portal.test.wsrp.v1.producer; = import org.jboss.portal.common.junit.ExtendedAssert; +import org.jboss.portal.registration.policies.DefaultRegistrationPolicy; +import org.jboss.portal.registration.policies.DefaultRegistrationPropertyV= alidator; +import org.jboss.portal.registration.RegistrationManager; import org.jboss.portal.test.wsrp.WSRPProducerBaseTest; import org.jboss.portal.wsrp.WSRPConstants; import org.jboss.portal.wsrp.WSRPTypeFactory; +import org.jboss.portal.wsrp.producer.config.ProducerRegistrationRequireme= nts; import org.jboss.portal.wsrp.core.GetServiceDescription; import org.jboss.portal.wsrp.core.LocalizedString; import org.jboss.portal.wsrp.core.MarkupType; @@ -159,25 +163,43 @@ return regData; } = - protected RegistrationPropertyDescription configureRegistrationSettings= (boolean provideUnregisteredFullDescription) + protected RegistrationPropertyDescription configureRegistrationSettings= (boolean requiresRegistration, boolean provideUnregisteredFullDescription) { // define expected registration infos - producer.getProducerRegistrationRequirements().setRegistrationRequir= ed(true); + producer.getProducerRegistrationRequirements().setRegistrationRequir= ed(requiresRegistration); producer.getProducerRegistrationRequirements().setRegistrationRequir= edForFullDescription(provideUnregisteredFullDescription); = - // fix-me: http://jira.jboss.com/jira/browse/JBPORTAL-821 - RegistrationPropertyDescription regProp =3D new RegistrationProperty= Description("regProp", - new QName("urn:oasis:names:tc:wsrp:v1:types", "LocalizedString", = "ns1")); - regProp.setDefaultLabel("Registration Property"); - producer.getProducerRegistrationRequirements().addRegistrationProper= ty(regProp); + if (requiresRegistration) + { + // fix-me: http://jira.jboss.com/jira/browse/JBPORTAL-821 + RegistrationPropertyDescription regProp =3D new RegistrationPrope= rtyDescription("regProp", + new QName("urn:oasis:names:tc:wsrp:v1:types", "LocalizedString= ", "ns1")); + regProp.setDefaultLabel("Registration Property"); + producer.getProducerRegistrationRequirements().addRegistrationPro= perty(regProp); = - return regProp; + // Use default registration policy: this wiring is normally handl= ed at the producer start, should maybe use a + // registration policy that is automatically configured when none= is provided to avoid having a null one? + DefaultRegistrationPolicy defaultRegistrationPolicy =3D new Defau= ltRegistrationPolicy(); + defaultRegistrationPolicy.setValidator(new DefaultRegistrationPro= pertyValidator()); + producer.getProducerRegistrationRequirements().setPolicy(defaultR= egistrationPolicy); + RegistrationManager registrationManager =3D producer.getRegistrat= ionManager(); + registrationManager.setPolicy(defaultRegistrationPolicy); + producer.getProducerRegistrationRequirements().addRegistrationPro= pertyChangeListeners(registrationManager); + + return regProp; + } + else + { + return null; + } } = protected void resetRegistrationInfo() { - producer.getProducerRegistrationRequirements().setRegistrationRequir= ed(false); - producer.getProducerRegistrationRequirements().clearRegistrationProp= erties(); + ProducerRegistrationRequirements registrationRequirements =3D produc= er.getProducerRegistrationRequirements(); + registrationRequirements.setRegistrationRequired(false); + registrationRequirements.clearRegistrationProperties(); + registrationRequirements.clearRegistrationPropertyChangeListeners(); } = protected GetServiceDescription getNoRegistrationServiceDescriptionRequ= est() Modified: branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/w= srp/producer/RegistrationHandler.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/wsrp/pr= oducer/RegistrationHandler.java 2007-10-29 23:07:31 UTC (rev 8801) +++ branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/wsrp/pr= oducer/RegistrationHandler.java 2007-10-30 05:52:15 UTC (rev 8802) @@ -69,34 +69,40 @@ public RegistrationContext register(RegistrationData registrationData) = throws MissingParametersFault, OperationFailedFault, RemoteException { - WSRPExceptionFactory.throwOperationFailedFaultIfValueIsMissing(regis= trationData, "RegistrationData"); - String consumerName =3D registrationData.getConsumerName(); - WSRPExceptionFactory.throwMissingParametersFaultIfValueIsMissing(con= sumerName, "consumer name", "RegistrationData"); + if (producer.getProducerRegistrationRequirements().isRegistrationReq= uired()) + { + WSRPExceptionFactory.throwOperationFailedFaultIfValueIsMissing(re= gistrationData, "RegistrationData"); + String consumerName =3D registrationData.getConsumerName(); + WSRPExceptionFactory.throwMissingParametersFaultIfValueIsMissing(= consumerName, "consumer name", "RegistrationData"); = - String consumerAgent =3D registrationData.getConsumerAgent(); - WSRPExceptionFactory.throwMissingParametersFaultIfValueIsMissing(con= sumerAgent, "consumer agent", "RegistrationData"); + String consumerAgent =3D registrationData.getConsumerAgent(); + WSRPExceptionFactory.throwMissingParametersFaultIfValueIsMissing(= consumerAgent, "consumer agent", "RegistrationData"); = - Registration registration; - try - { - log.debug("Attempting to register consumer named '" + consumerNam= e + "', agent '" + consumerAgent + "'."); + Registration registration; + try + { + log.debug("Attempting to register consumer named '" + consumer= Name + "', agent '" + consumerAgent + "'."); = - // check that the consumer agent is valid before trying to regist= er - RegistrationUtils.validateConsumerAgent(consumerAgent); + // check that the consumer agent is valid before trying to reg= ister + RegistrationUtils.validateConsumerAgent(consumerAgent); = - registration =3D producer.getRegistrationManager().addRegistratio= nTo(consumerName, createRegistrationProperties(registrationData), true); - updateRegistrationInformation(registration, registrationData); + registration =3D producer.getRegistrationManager().addRegistra= tionTo(consumerName, createRegistrationProperties(registrationData), true); + updateRegistrationInformation(registration, registrationData); + } + catch (Exception e) + { + log.debug(e); + throw WSRPExceptionFactory.throwSOAPFaultException(WSRPExcepti= onFactory.OPERATION_FAILED, + "Could not register consumer named '" + consumerName + "'",= e); + } + + RegistrationContext registrationContext =3D WSRPTypeFactory.creat= eRegistrationContext(registration.getId()); + log.debug("Registration completed without error."); + return registrationContext; } - catch (Exception e) - { - log.debug(e); - throw WSRPExceptionFactory.throwSOAPFaultException(WSRPExceptionF= actory.OPERATION_FAILED, - "Could not register consumer named '" + consumerName + "'", e); - } = - RegistrationContext registrationContext =3D WSRPTypeFactory.createRe= gistrationContext(registration.getId()); - log.debug("Registration completed without error."); - return registrationContext; + throw WSRPExceptionFactory.throwSOAPFaultException(WSRPExceptionFact= ory.OPERATION_FAILED, + "Registration shouldn't be attempted if registration is not requi= red", null); } = private void updateRegistrationInformation(Registration registration, R= egistrationData registrationData) @@ -142,78 +148,90 @@ public ReturnAny deregister(RegistrationContext deregister) throws Oper= ationFailedFault, InvalidRegistrationFault, RemoteException { - WSRPExceptionFactory.throwOperationFailedFaultIfValueIsMissing(dereg= ister, "RegistrationContext"); - - String registrationHandle =3D deregister.getRegistrationHandle(); - if (ParameterValidation.isNullOrEmpty(registrationHandle)) + if (producer.getProducerRegistrationRequirements().isRegistrationReq= uired()) { - throwInvalidRegistrationFault("Null or empty registration handle"= ); - } + WSRPExceptionFactory.throwOperationFailedFaultIfValueIsMissing(de= register, "RegistrationContext"); = - log.debug("Attempting to deregister registration with handle '" + re= gistrationHandle + "'"); + String registrationHandle =3D deregister.getRegistrationHandle(); + if (ParameterValidation.isNullOrEmpty(registrationHandle)) + { + throwInvalidRegistrationFault("Null or empty registration hand= le"); + } = - try - { - producer.getRegistrationManager().removeRegistration(registration= Handle); + log.debug("Attempting to deregister registration with handle '" += registrationHandle + "'"); + + try + { + producer.getRegistrationManager().removeRegistration(registrat= ionHandle); + } + catch (NoSuchRegistrationException e) + { + log.debug(e); + throwInvalidRegistrationFault(e.getLocalizedMessage()); + } + catch (RegistrationException e) + { + log.debug(e); + throw WSRPExceptionFactory.throwSOAPFaultException(WSRPExcepti= onFactory.OPERATION_FAILED, + "Could not deregister registration with handle '" + registr= ationHandle + "'", e); + } + + return new ReturnAny(); } - catch (NoSuchRegistrationException e) - { - log.debug(e); - throwInvalidRegistrationFault(e.getLocalizedMessage()); - } - catch (RegistrationException e) - { - log.debug(e); - throw WSRPExceptionFactory.throwSOAPFaultException(WSRPExceptionF= actory.OPERATION_FAILED, - "Could not deregister registration with handle '" + registrati= onHandle + "'", e); - } = - return new ReturnAny(); + throw WSRPExceptionFactory.throwSOAPFaultException(WSRPExceptionFact= ory.OPERATION_FAILED, + "Deregistration shouldn't be attempted if registration is not req= uired", null); } = public RegistrationState modifyRegistration(ModifyRegistration modifyRe= gistration) throws MissingParametersFault, OperationFailedFault, InvalidRegistrationFault, RemoteException { - WSRPExceptionFactory.throwOperationFailedFaultIfValueIsMissing(modif= yRegistration, "ModifyRegistration"); - - RegistrationContext registrationContext =3D modifyRegistration.getRe= gistrationContext(); - WSRPExceptionFactory.throwMissingParametersFaultIfValueIsMissing(reg= istrationContext, "RegistrationContext", "ModifyRegistration"); - String registrationHandle =3D registrationContext.getRegistrationHan= dle(); - if (ParameterValidation.isNullOrEmpty(registrationHandle)) + if (producer.getProducerRegistrationRequirements().isRegistrationReq= uired()) { - throwInvalidRegistrationFault("Null or empty registration handle"= ); - } + WSRPExceptionFactory.throwOperationFailedFaultIfValueIsMissing(mo= difyRegistration, "ModifyRegistration"); = - RegistrationData registrationData =3D modifyRegistration.getRegistra= tionData(); - WSRPExceptionFactory.throwMissingParametersFaultIfValueIsMissing(reg= istrationData, "RegistrationData", "ModifyRegistration"); + RegistrationContext registrationContext =3D modifyRegistration.ge= tRegistrationContext(); + WSRPExceptionFactory.throwMissingParametersFaultIfValueIsMissing(= registrationContext, "RegistrationContext", "ModifyRegistration"); + String registrationHandle =3D registrationContext.getRegistration= Handle(); + if (ParameterValidation.isNullOrEmpty(registrationHandle)) + { + throwInvalidRegistrationFault("Null or empty registration hand= le"); + } = - String consumerName =3D registrationData.getConsumerName(); - WSRPExceptionFactory.throwMissingParametersFaultIfValueIsMissing(con= sumerName, "consumer name", "RegistrationData"); + RegistrationData registrationData =3D modifyRegistration.getRegis= trationData(); + WSRPExceptionFactory.throwMissingParametersFaultIfValueIsMissing(= registrationData, "RegistrationData", "ModifyRegistration"); = - String consumerAgent =3D registrationData.getConsumerAgent(); - WSRPExceptionFactory.throwMissingParametersFaultIfValueIsMissing(con= sumerAgent, "consumer agent", "RegistrationData"); + String consumerName =3D registrationData.getConsumerName(); + WSRPExceptionFactory.throwMissingParametersFaultIfValueIsMissing(= consumerName, "consumer name", "RegistrationData"); = - log.debug("Attempting to modify registration with handle '" + regist= rationHandle + "'"); - try - { - Registration registration =3D producer.getRegistrationManager().g= etRegistration(registrationHandle); - registration.updateProperties(createRegistrationProperties(regist= rationData)); - updateRegistrationInformation(registration, registrationData); + String consumerAgent =3D registrationData.getConsumerAgent(); + WSRPExceptionFactory.throwMissingParametersFaultIfValueIsMissing(= consumerAgent, "consumer agent", "RegistrationData"); + + log.debug("Attempting to modify registration with handle '" + reg= istrationHandle + "'"); + try + { + Registration registration =3D producer.getRegistrationManager(= ).getRegistration(registrationHandle); + registration.updateProperties(createRegistrationProperties(reg= istrationData)); + updateRegistrationInformation(registration, registrationData); + } + catch (NoSuchRegistrationException e) + { + log.debug(e); + throwInvalidRegistrationFault(e.getLocalizedMessage()); + } + catch (RegistrationException e) + { + log.debug(e); + throw WSRPExceptionFactory.throwSOAPFaultException(WSRPExcepti= onFactory.OPERATION_FAILED, + "Could not modify registration with handle '" + registratio= nHandle + "'", e); + } + + + return null; } - catch (NoSuchRegistrationException e) - { - log.debug(e); - throwInvalidRegistrationFault(e.getLocalizedMessage()); - } - catch (RegistrationException e) - { - log.debug(e); - throw WSRPExceptionFactory.throwSOAPFaultException(WSRPExceptionF= actory.OPERATION_FAILED, - "Could not modify registration with handle '" + registrationHa= ndle + "'", e); - } = - - return null; + throw WSRPExceptionFactory.throwSOAPFaultException(WSRPExceptionFact= ory.OPERATION_FAILED, + "Modifying a registration shouldn't be attempted if registration = is not required", null); } = /** Deleted: branches/JBoss_Portal_Branch_2_6/wsrp/src/resources/tests/test-wsr= p-consumer-war/WEB-INF/jboss-web.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/wsrp/src/resources/tests/test-wsrp-con= sumer-war/WEB-INF/jboss-web.xml 2007-10-29 23:07:31 UTC (rev 8801) +++ branches/JBoss_Portal_Branch_2_6/wsrp/src/resources/tests/test-wsrp-con= sumer-war/WEB-INF/jboss-web.xml 2007-10-30 05:52:15 UTC (rev 8802) @@ -1,26 +0,0 @@ - - - - jboss.ws:service=3DWebServiceDeployerJSE - \ No newline at end of file Deleted: branches/JBoss_Portal_Branch_2_6/wsrp/src/resources/tests/test-wsr= p-producer-war/WEB-INF/jboss-web.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/wsrp/src/resources/tests/test-wsrp-pro= ducer-war/WEB-INF/jboss-web.xml 2007-10-29 23:07:31 UTC (rev 8801) +++ branches/JBoss_Portal_Branch_2_6/wsrp/src/resources/tests/test-wsrp-pro= ducer-war/WEB-INF/jboss-web.xml 2007-10-30 05:52:15 UTC (rev 8802) @@ -1,26 +0,0 @@ - - - - jboss.ws:service=3DWebServiceDeployerJSE - \ No newline at end of file --===============0832080423240636476==-- From portal-commits at lists.jboss.org Tue Oct 30 09:01:26 2007 Content-Type: multipart/mixed; boundary="===============8702574434415999958==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8803 - in branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-admin-war/WEB-INF/jsf: common and 1 other directory. Date: Tue, 30 Oct 2007 09:01:24 -0400 Message-ID: --===============8702574434415999958== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: wesleyhales Date: 2007-10-30 09:01:24 -0400 (Tue, 30 Oct 2007) New Revision: 8803 Modified: branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-admin-w= ar/WEB-INF/jsf/common/editProperties.xhtml branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-admin-w= ar/WEB-INF/jsf/editProperties.xhtml Log: JBPORTAL-1765 - touch up Modified: branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-= admin-war/WEB-INF/jsf/common/editProperties.xhtml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-admin-= war/WEB-INF/jsf/common/editProperties.xhtml 2007-10-30 05:52:15 UTC (rev 88= 02) +++ branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-admin-= war/WEB-INF/jsf/common/editProperties.xhtml 2007-10-30 13:01:24 UTC (rev 88= 03) @@ -3,7 +3,8 @@ xmlns:ui=3D"http://java.sun.com/jsf/facelets" xmlns:h=3D"http://java.sun.com/jsf/html" xmlns:f=3D"http://java.sun.com/jsf/core" - xmlns:c=3D"http://java.sun.com/jstl/core"> + xmlns:c=3D"http://java.sun.com/jstl/core" + style=3D"padding:5px"> =
    = @@ -27,6 +28,7 @@ + +
    Select @@ -43,6 +45,7 @@
    or
    Enter property Modified: branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-= admin-war/WEB-INF/jsf/editProperties.xhtml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-admin-= war/WEB-INF/jsf/editProperties.xhtml 2007-10-30 05:52:15 UTC (rev 8802) +++ branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-admin-= war/WEB-INF/jsf/editProperties.xhtml 2007-10-30 13:01:24 UTC (rev 8803) @@ -25,11 +25,9 @@ = -
    -
    =
    --===============7460853000847316445== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: chris.laprun(a)jboss.com Date: 2007-10-30 20:01:15 -0400 (Tue, 30 Oct 2007) New Revision: 8804 Added: branches/JBoss_Portal_Branch_2_6/build/ide/intellij/idea70/ branches/JBoss_Portal_Branch_2_6/build/ide/intellij/idea70/config/ branches/JBoss_Portal_Branch_2_6/build/ide/intellij/idea70/config/codest= yles/ branches/JBoss_Portal_Branch_2_6/build/ide/intellij/idea70/config/codest= yles/jboss.xml branches/JBoss_Portal_Branch_2_6/build/ide/intellij/idea70/config/fileTe= mplates/ branches/JBoss_Portal_Branch_2_6/build/ide/intellij/idea70/config/fileTe= mplates/StandartTestCasePortlet.java branches/JBoss_Portal_Branch_2_6/build/ide/intellij/idea70/config/fileTe= mplates/includes/ branches/JBoss_Portal_Branch_2_6/build/ide/intellij/idea70/config/fileTe= mplates/includes/Body Header.java branches/JBoss_Portal_Branch_2_6/build/ide/intellij/idea70/config/fileTe= mplates/includes/File Header.java branches/JBoss_Portal_Branch_2_6/build/ide/intellij/idea70/config/fileTe= mplates/internal/ branches/JBoss_Portal_Branch_2_6/build/ide/intellij/idea70/config/fileTe= mplates/internal/AnnotationType.java branches/JBoss_Portal_Branch_2_6/build/ide/intellij/idea70/config/fileTe= mplates/internal/Class.java branches/JBoss_Portal_Branch_2_6/build/ide/intellij/idea70/config/fileTe= mplates/internal/Enum.java branches/JBoss_Portal_Branch_2_6/build/ide/intellij/idea70/config/fileTe= mplates/internal/Interface.java branches/JBoss_Portal_Branch_2_6/build/ide/intellij/idea70/jboss-portal.= ipr branches/JBoss_Portal_Branch_2_6/build/ide/intellij/idea70/modules/ branches/JBoss_Portal_Branch_2_6/build/ide/intellij/idea70/modules/api/ branches/JBoss_Portal_Branch_2_6/build/ide/intellij/idea70/modules/api/a= pi.iml branches/JBoss_Portal_Branch_2_6/build/ide/intellij/idea70/modules/cms/ branches/JBoss_Portal_Branch_2_6/build/ide/intellij/idea70/modules/cms/c= ms.iml branches/JBoss_Portal_Branch_2_6/build/ide/intellij/idea70/modules/core-= admin/ branches/JBoss_Portal_Branch_2_6/build/ide/intellij/idea70/modules/core-= admin/core-admin.iml branches/JBoss_Portal_Branch_2_6/build/ide/intellij/idea70/modules/core-= cms/ branches/JBoss_Portal_Branch_2_6/build/ide/intellij/idea70/modules/core-= cms/core-cms.iml branches/JBoss_Portal_Branch_2_6/build/ide/intellij/idea70/modules/core-= identity/ branches/JBoss_Portal_Branch_2_6/build/ide/intellij/idea70/modules/core-= identity/core-identity.iml branches/JBoss_Portal_Branch_2_6/build/ide/intellij/idea70/modules/core-= management/ branches/JBoss_Portal_Branch_2_6/build/ide/intellij/idea70/modules/core-= management/core-management.iml branches/JBoss_Portal_Branch_2_6/build/ide/intellij/idea70/modules/core-= samples/ branches/JBoss_Portal_Branch_2_6/build/ide/intellij/idea70/modules/core-= samples/core-samples.iml branches/JBoss_Portal_Branch_2_6/build/ide/intellij/idea70/modules/core-= wsrp/ branches/JBoss_Portal_Branch_2_6/build/ide/intellij/idea70/modules/core-= wsrp/core-wsrp.iml branches/JBoss_Portal_Branch_2_6/build/ide/intellij/idea70/modules/core/ branches/JBoss_Portal_Branch_2_6/build/ide/intellij/idea70/modules/core/= core.iml branches/JBoss_Portal_Branch_2_6/build/ide/intellij/idea70/modules/demo/ branches/JBoss_Portal_Branch_2_6/build/ide/intellij/idea70/modules/demo/= demo.iml branches/JBoss_Portal_Branch_2_6/build/ide/intellij/idea70/modules/faces/ branches/JBoss_Portal_Branch_2_6/build/ide/intellij/idea70/modules/faces= /faces.iml branches/JBoss_Portal_Branch_2_6/build/ide/intellij/idea70/modules/forma= t/ branches/JBoss_Portal_Branch_2_6/build/ide/intellij/idea70/modules/forma= t/format.iml branches/JBoss_Portal_Branch_2_6/build/ide/intellij/idea70/modules/jems/ branches/JBoss_Portal_Branch_2_6/build/ide/intellij/idea70/modules/jems/= jems.iml branches/JBoss_Portal_Branch_2_6/build/ide/intellij/idea70/modules/migra= tion/ branches/JBoss_Portal_Branch_2_6/build/ide/intellij/idea70/modules/migra= tion/migration.iml branches/JBoss_Portal_Branch_2_6/build/ide/intellij/idea70/modules/portl= et-server/ branches/JBoss_Portal_Branch_2_6/build/ide/intellij/idea70/modules/portl= et-server/portlet-server.iml branches/JBoss_Portal_Branch_2_6/build/ide/intellij/idea70/modules/regis= tration/ branches/JBoss_Portal_Branch_2_6/build/ide/intellij/idea70/modules/regis= tration/registration.iml branches/JBoss_Portal_Branch_2_6/build/ide/intellij/idea70/modules/searc= h/ branches/JBoss_Portal_Branch_2_6/build/ide/intellij/idea70/modules/searc= h/search.iml branches/JBoss_Portal_Branch_2_6/build/ide/intellij/idea70/modules/secur= ity/ branches/JBoss_Portal_Branch_2_6/build/ide/intellij/idea70/modules/secur= ity/security.iml branches/JBoss_Portal_Branch_2_6/build/ide/intellij/idea70/modules/serve= r/ branches/JBoss_Portal_Branch_2_6/build/ide/intellij/idea70/modules/serve= r/server.iml branches/JBoss_Portal_Branch_2_6/build/ide/intellij/idea70/modules/tests= uite/ branches/JBoss_Portal_Branch_2_6/build/ide/intellij/idea70/modules/tests= uite/testsuite.iml branches/JBoss_Portal_Branch_2_6/build/ide/intellij/idea70/modules/theme/ branches/JBoss_Portal_Branch_2_6/build/ide/intellij/idea70/modules/theme= /theme.iml branches/JBoss_Portal_Branch_2_6/build/ide/intellij/idea70/modules/third= party/ branches/JBoss_Portal_Branch_2_6/build/ide/intellij/idea70/modules/third= party/thirdparty.iml branches/JBoss_Portal_Branch_2_6/build/ide/intellij/idea70/modules/tools/ branches/JBoss_Portal_Branch_2_6/build/ide/intellij/idea70/modules/tools= /tools.iml branches/JBoss_Portal_Branch_2_6/build/ide/intellij/idea70/modules/widge= t/ branches/JBoss_Portal_Branch_2_6/build/ide/intellij/idea70/modules/widge= t/widget.iml branches/JBoss_Portal_Branch_2_6/build/ide/intellij/idea70/modules/workf= low/ branches/JBoss_Portal_Branch_2_6/build/ide/intellij/idea70/modules/workf= low/workflow.iml branches/JBoss_Portal_Branch_2_6/build/ide/intellij/idea70/modules/wsrp/ branches/JBoss_Portal_Branch_2_6/build/ide/intellij/idea70/modules/wsrp/= wsrp.iml branches/JBoss_Portal_Branch_2_6/build/ide/intellij/idea70/readme.txt Log: - Added project files for IDEA 7 with (hopefully) proper link to module lib= raries. Project cannot currently be built because the detected web facets a= re not properly configured. Added: branches/JBoss_Portal_Branch_2_6/build/ide/intellij/idea70/config/co= destyles/jboss.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/build/ide/intellij/idea70/config/codes= tyles/jboss.xml (rev 0) +++ branches/JBoss_Portal_Branch_2_6/build/ide/intellij/idea70/config/codes= tyles/jboss.xml 2007-10-31 00:01:15 UTC (rev 8804) @@ -0,0 +1,31 @@ + + + + + Property changes on: branches/JBoss_Portal_Branch_2_6/build/ide/intellij/id= ea70/config/codestyles/jboss.xml ___________________________________________________________________ Name: svn:executable + * Added: branches/JBoss_Portal_Branch_2_6/build/ide/intellij/idea70/config/fi= leTemplates/StandartTestCasePortlet.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/build/ide/intellij/idea70/config/fileT= emplates/StandartTestCasePortlet.java (rev 0) +++ branches/JBoss_Portal_Branch_2_6/build/ide/intellij/idea70/config/fileT= emplates/StandartTestCasePortlet.java 2007-10-31 00:01:15 UTC (rev 8804) @@ -0,0 +1,128 @@ +/*************************************************************************= ***** + * JBoss, a division of Red Hat = * + * Copyright 2006, Red Hat Middleware, LLC, and individual = * + * contributors as indicated by the @authors tag. See the = * + * copyright.txt in the distribution for a full listing of = * + * individual contributors. = * + * = * + * This is free software; you can redistribute it and/or modify it = * + * under the terms of the GNU Lesser General Public License as = * + * published by the Free Software Foundation; either version 2.1 of = * + * the License, or (at your option) any later version. = * + * = * + * This software is distributed in the hope that it will be useful, = * + * but WITHOUT ANY WARRANTY; without even the implied warranty of = * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU = * + * Lesser General Public License for more details. = * + * = * + * You should have received a copy of the GNU Lesser General Public = * + * License along with this software; if not, write to the Free = * + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA = * + * 02110-1301 USA, or see the FSF site: http://www.fsf.org. = * + *************************************************************************= *****/ +package ${PACKAGE_NAME}; + +import org.jboss.portal.test.framework.container.server.result.AssertResul= t; +import org.jboss.portal.test.framework.container.server.result.InvokeGetRe= sult; +import org.jboss.portal.test.framework.container.server.result.FailureResu= lt; +import org.jboss.portal.test.framework.container.server.result.ServerResul= t; +import org.jboss.portal.test.framework.container.server.TestContext; +import org.jboss.portal.test.portlet.AbstractTestPortlet; + + +import javax.portlet.ActionRequest; +import javax.portlet.ActionResponse; +import javax.portlet.PortletException; +import javax.portlet.PortletSecurityException; +import javax.portlet.RenderRequest; +import javax.portlet.RenderResponse; +import javax.portlet.PortletPreferences; +import javax.portlet.ValidatorException; +import javax.portlet.PortletURL; +import java.io.IOException; + +/** + * @author Boleslaw Daw= idowicz + * @version $Revision: 1951 $ + + */ +public class ${NAME} extends AbstractTestPortlet +{ + + + private AssertResult ares; + + public void doProcessAction(final ActionRequest request, ActionResponse= response) throws PortletException, PortletSecurityException, IOException + { + int requestCount =3D TestContext.getCurrentRequestCount(); + if (ares =3D=3D null) + { + if (requestCount =3D=3D 1) + { + ares =3D new AssertResult(); + ares.execute(new AssertResult.Test() + { + public void run() throws Exception + { + + } + }); + } + } + else if (!ares.isFailed()) + { + if (requestCount =3D=3D 2) + { + ares.execute(new AssertResult.Test() + { + public void run() throws Exception + { + + } + }); + } + } + } + + public void doRender(final RenderRequest request, RenderResponse respon= se) throws PortletException, PortletSecurityException, IOException + { + ServerResult result =3D null; + + int requestCount =3D TestContext.getCurrentRequestCount(); + if (ares =3D=3D null) + { + if (requestCount =3D=3D 0) + { + PortletURL url =3D response.createActionURL(); + result =3D new InvokeGetResult(url.toString()); + AbstractTestPortlet.marshall(result, response, TestContext.get= CurrentTestCaseId()); + } + else + { + AbstractTestPortlet.marshall(new FailureResult("The assert res= ult was expected to be not null"), response, TestContext.getCurrentTestCase= Id()); + } + } + else if (ares.isFailed()) + { + AbstractTestPortlet.marshall(ares, response, TestContext.getCurre= ntTestCaseId()); + } + else + { + if (requestCount =3D=3D 0) + { + AbstractTestPortlet.marshall(new FailureResult("The assert res= ult was expected to be not null"), response, TestContext.getCurrentTestCase= Id()); + } + else if (requestCount =3D=3D 1) + { + PortletURL url =3D response.createActionURL(); + result =3D new InvokeGetResult(url.toString()); + AbstractTestPortlet.marshall(result, response, TestContext.get= CurrentTestCaseId()); + } + else if (requestCount =3D=3D 2) + { + AbstractTestPortlet.marshall(ares, response, TestContext.getCu= rrentTestCaseId()); + } + } + } + +} Property changes on: branches/JBoss_Portal_Branch_2_6/build/ide/intellij/id= ea70/config/fileTemplates/StandartTestCasePortlet.java ___________________________________________________________________ Name: svn:executable + * Name: svn:keywords + "Author Date Id Revision" Name: svn:eol-style + native Added: branches/JBoss_Portal_Branch_2_6/build/ide/intellij/idea70/config/fi= leTemplates/includes/Body Header.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/build/ide/intellij/idea70/config/fileT= emplates/includes/Body Header.java (rev 0) +++ branches/JBoss_Portal_Branch_2_6/build/ide/intellij/idea70/config/fileT= emplates/includes/Body Header.java 2007-10-31 00:01:15 UTC (rev 8804) @@ -0,0 +1,4 @@ +/** + * @author Julien Viet + * @version $Revision: 630 $ + */ Property changes on: branches/JBoss_Portal_Branch_2_6/build/ide/intellij/id= ea70/config/fileTemplates/includes/Body Header.java ___________________________________________________________________ Name: svn:executable + * Name: svn:keywords + "Author Date Id Revision" Name: svn:eol-style + native Added: branches/JBoss_Portal_Branch_2_6/build/ide/intellij/idea70/config/fi= leTemplates/includes/File Header.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/build/ide/intellij/idea70/config/fileT= emplates/includes/File Header.java (rev 0) +++ branches/JBoss_Portal_Branch_2_6/build/ide/intellij/idea70/config/fileT= emplates/includes/File Header.java 2007-10-31 00:01:15 UTC (rev 8804) @@ -0,0 +1,22 @@ +/*************************************************************************= ***** + * JBoss, a division of Red Hat = * + * Copyright 2006, Red Hat Middleware, LLC, and individual = * + * contributors as indicated by the @authors tag. See the = * + * copyright.txt in the distribution for a full listing of = * + * individual contributors. = * + * = * + * This is free software; you can redistribute it and/or modify it = * + * under the terms of the GNU Lesser General Public License as = * + * published by the Free Software Foundation; either version 2.1 of = * + * the License, or (at your option) any later version. = * + * = * + * This software is distributed in the hope that it will be useful, = * + * but WITHOUT ANY WARRANTY; without even the implied warranty of = * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU = * + * Lesser General Public License for more details. = * + * = * + * You should have received a copy of the GNU Lesser General Public = * + * License along with this software; if not, write to the Free = * + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA = * + * 02110-1301 USA, or see the FSF site: http://www.fsf.org. = * + *************************************************************************= *****/ \ No newline at end of file Property changes on: branches/JBoss_Portal_Branch_2_6/build/ide/intellij/id= ea70/config/fileTemplates/includes/File Header.java ___________________________________________________________________ Name: svn:executable + * Name: svn:keywords + "Author Date Id Revision" Name: svn:eol-style + native Added: branches/JBoss_Portal_Branch_2_6/build/ide/intellij/idea70/config/fi= leTemplates/internal/AnnotationType.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/build/ide/intellij/idea70/config/fileT= emplates/internal/AnnotationType.java (rev 0) +++ branches/JBoss_Portal_Branch_2_6/build/ide/intellij/idea70/config/fileT= emplates/internal/AnnotationType.java 2007-10-31 00:01:15 UTC (rev 8804) @@ -0,0 +1,5 @@ +#parse("File Header.java") +package ${PACKAGE_NAME}; +#parse("Body Header.java") +public @interface ${NAME} { +} Property changes on: branches/JBoss_Portal_Branch_2_6/build/ide/intellij/id= ea70/config/fileTemplates/internal/AnnotationType.java ___________________________________________________________________ Name: svn:executable + * Name: svn:keywords + "Author Date Id Revision" Name: svn:eol-style + native Added: branches/JBoss_Portal_Branch_2_6/build/ide/intellij/idea70/config/fi= leTemplates/internal/Class.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/build/ide/intellij/idea70/config/fileT= emplates/internal/Class.java (rev 0) +++ branches/JBoss_Portal_Branch_2_6/build/ide/intellij/idea70/config/fileT= emplates/internal/Class.java 2007-10-31 00:01:15 UTC (rev 8804) @@ -0,0 +1,5 @@ +#parse("File Header.java") +package ${PACKAGE_NAME}; +#parse("Body Header.java") +public class ${NAME} { +} Property changes on: branches/JBoss_Portal_Branch_2_6/build/ide/intellij/id= ea70/config/fileTemplates/internal/Class.java ___________________________________________________________________ Name: svn:executable + * Name: svn:keywords + "Author Date Id Revision" Name: svn:eol-style + native Added: branches/JBoss_Portal_Branch_2_6/build/ide/intellij/idea70/config/fi= leTemplates/internal/Enum.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/build/ide/intellij/idea70/config/fileT= emplates/internal/Enum.java (rev 0) +++ branches/JBoss_Portal_Branch_2_6/build/ide/intellij/idea70/config/fileT= emplates/internal/Enum.java 2007-10-31 00:01:15 UTC (rev 8804) @@ -0,0 +1,5 @@ +#parse("File Header.java") +package ${PACKAGE_NAME}; +#parse("Body Header.java") +public enum ${NAME} { +} Property changes on: branches/JBoss_Portal_Branch_2_6/build/ide/intellij/id= ea70/config/fileTemplates/internal/Enum.java ___________________________________________________________________ Name: svn:executable + * Name: svn:keywords + "Author Date Id Revision" Name: svn:eol-style + native Added: branches/JBoss_Portal_Branch_2_6/build/ide/intellij/idea70/config/fi= leTemplates/internal/Interface.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/build/ide/intellij/idea70/config/fileT= emplates/internal/Interface.java (rev 0) +++ branches/JBoss_Portal_Branch_2_6/build/ide/intellij/idea70/config/fileT= emplates/internal/Interface.java 2007-10-31 00:01:15 UTC (rev 8804) @@ -0,0 +1,5 @@ +#parse("File Header.java") +package ${PACKAGE_NAME}; +#parse("Body Header.java") +public interface ${NAME} { +} Property changes on: branches/JBoss_Portal_Branch_2_6/build/ide/intellij/id= ea70/config/fileTemplates/internal/Interface.java ___________________________________________________________________ Name: svn:executable + * Name: svn:keywords + "Author Date Id Revision" Name: svn:eol-style + native Added: branches/JBoss_Portal_Branch_2_6/build/ide/intellij/idea70/jboss-por= tal.ipr =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/build/ide/intellij/idea70/jboss-portal= .ipr (rev 0) +++ branches/JBoss_Portal_Branch_2_6/build/ide/intellij/idea70/jboss-portal= .ipr 2007-10-31 00:01:15 UTC (rev 8804) @@ -0,0 +1,501 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + $PROJECT_DIR$/wsrp/src/resources/t= est + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Added: branches/JBoss_Portal_Branch_2_6/build/ide/intellij/idea70/modules/a= pi/api.iml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/build/ide/intellij/idea70/modules/api/= api.iml (rev 0) +++ branches/JBoss_Portal_Branch_2_6/build/ide/intellij/idea70/modules/api/= api.iml 2007-10-31 00:01:15 UTC (rev 8804) @@ -0,0 +1,159 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Added: branches/JBoss_Portal_Branch_2_6/build/ide/intellij/idea70/modules/c= ms/cms.iml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/build/ide/intellij/idea70/modules/cms/= cms.iml (rev 0) +++ branches/JBoss_Portal_Branch_2_6/build/ide/intellij/idea70/modules/cms/= cms.iml 2007-10-31 00:01:15 UTC (rev 8804) @@ -0,0 +1,443 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Added: branches/JBoss_Portal_Branch_2_6/build/ide/intellij/idea70/modules/c= ore/core.iml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/build/ide/intellij/idea70/modules/core= /core.iml (rev 0) +++ branches/JBoss_Portal_Branch_2_6/build/ide/intellij/idea70/modules/core= /core.iml 2007-10-31 00:01:15 UTC (rev 8804) @@ -0,0 +1,611 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Added: branches/JBoss_Portal_Branch_2_6/build/ide/intellij/idea70/modules/c= ore-admin/core-admin.iml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/build/ide/intellij/idea70/modules/core= -admin/core-admin.iml (rev 0) +++ branches/JBoss_Portal_Branch_2_6/build/ide/intellij/idea70/modules/core= -admin/core-admin.iml 2007-10-31 00:01:15 UTC (rev 8804) @@ -0,0 +1,810 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + jar://$MODULE_DIR$/../../../../../../core-admin/src/etc/s= un-jsf/jsf-example.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/apache-co= llections/lib/commons-collections.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/apache-fi= leupload/lib/commons-fileupload.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/apache-ht= tpclient/lib/commons-httpclient.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/apache-lo= g4j/lib/log4j.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/apache-lo= gging/lib/commons-logging.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/apache-lu= cene/lib/lucene.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/apache-my= faces/lib/myfaces-api.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/apache-my= faces/lib/myfaces-impl.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/beanshell= /lib/bsh-1.3.0.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/dbunit/li= b/dbunit.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/dom4j/lib= /dom4j.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/el/lib/el= -api.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/facelets/= lib/jsf-facelets.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/freemarke= r/lib/freemarker.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/hibernate= /lib/hibernate3.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jackrabbi= t/lib/jackrabbit-core.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jakarta-c= actus/lib/cactus.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jakarta-i= o/lib/commons-io.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/javassist= /lib/javassist.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jboss-por= tal/modules/common/lib/portal-common-lib.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jboss-por= tal/modules/common/lib/portal-common-portal-lib.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jboss-por= tal/modules/identity/lib/portal-identity-lib.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jboss-por= tal/modules/portlet/lib/portal-portlet-bridge-lib.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jboss-por= tal/modules/portlet/lib/portal-portlet-federation-lib.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jboss-por= tal/modules/portlet/lib/portal-portlet-jsr168api-lib.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jboss-por= tal/modules/portlet/lib/portal-portlet-lib.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jboss-por= tal/modules/test/lib/portal-test-jboss-lib.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jboss-por= tal/modules/test/lib/portal-test-lib.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jboss-por= tal/modules/web/lib/portal-web-lib.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jboss/aop= /lib/jboss-aop.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jboss/bac= kport-concurrent/lib/jboss-backport-concurrent.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jboss/cac= he/lib/jboss-cache.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jboss/jbo= ssxb/lib/jboss-xml-binding.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jboss/mic= rocontainer/lib/jboss-container.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jboss/mic= rocontainer/lib/jboss-dependency.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jboss/mic= rocontainer/lib/jboss-microcontainer.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jboss-aspect-library.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jboss-common-client.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jboss-common-jdbc-wrapper.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jboss-common.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jboss-hibernate.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jboss-j2ee.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jboss-jaxrpc.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jboss-jca.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jboss-jmx.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jboss-local-jdbc.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jboss-saaj.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jboss-system.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jboss-transaction.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jboss-xml-binding.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jboss.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jbossha.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jbosssx.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jmx-invoker-adaptor-client.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jnp-client.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jnpserver.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/namespace.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbpm/jaro= nly/lib/jbpm-identity.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbpm/jaro= nly/lib/jbpm.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jcr/lib/j= cr-1.0.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jgroups/l= ib/jgroups.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/junit/lib= /junit.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jwebunit/= lib/jwebunit-1.2.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/oswego-co= ncurrent/lib/concurrent.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/slf4j/lib= /slf4j-log4j12.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/sun-jaf/l= ib/activation.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/sun-javam= ail/lib/mail.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/sun-opend= s/lib/OpenDS.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/sun-servl= et/lib/jsp-api.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/sun-servl= et/lib/servlet-api.jar!/ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Added: branches/JBoss_Portal_Branch_2_6/build/ide/intellij/idea70/modules/c= ore-cms/core-cms.iml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/build/ide/intellij/idea70/modules/core= -cms/core-cms.iml (rev 0) +++ branches/JBoss_Portal_Branch_2_6/build/ide/intellij/idea70/modules/core= -cms/core-cms.iml 2007-10-31 00:01:15 UTC (rev 8804) @@ -0,0 +1,331 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Added: branches/JBoss_Portal_Branch_2_6/build/ide/intellij/idea70/modules/c= ore-identity/core-identity.iml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/build/ide/intellij/idea70/modules/core= -identity/core-identity.iml (rev 0) +++ branches/JBoss_Portal_Branch_2_6/build/ide/intellij/idea70/modules/core= -identity/core-identity.iml 2007-10-31 00:01:15 UTC (rev 8804) @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + Added: branches/JBoss_Portal_Branch_2_6/build/ide/intellij/idea70/modules/c= ore-management/core-management.iml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/build/ide/intellij/idea70/modules/core= -management/core-management.iml (rev 0) +++ branches/JBoss_Portal_Branch_2_6/build/ide/intellij/idea70/modules/core= -management/core-management.iml 2007-10-31 00:01:15 UTC (rev 8804) @@ -0,0 +1,231 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Added: branches/JBoss_Portal_Branch_2_6/build/ide/intellij/idea70/modules/c= ore-samples/core-samples.iml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/build/ide/intellij/idea70/modules/core= -samples/core-samples.iml (rev 0) +++ branches/JBoss_Portal_Branch_2_6/build/ide/intellij/idea70/modules/core= -samples/core-samples.iml 2007-10-31 00:01:15 UTC (rev 8804) @@ -0,0 +1,282 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Added: branches/JBoss_Portal_Branch_2_6/build/ide/intellij/idea70/modules/c= ore-wsrp/core-wsrp.iml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/build/ide/intellij/idea70/modules/core= -wsrp/core-wsrp.iml (rev 0) +++ branches/JBoss_Portal_Branch_2_6/build/ide/intellij/idea70/modules/core= -wsrp/core-wsrp.iml 2007-10-31 00:01:15 UTC (rev 8804) @@ -0,0 +1,287 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Added: branches/JBoss_Portal_Branch_2_6/build/ide/intellij/idea70/modules/d= emo/demo.iml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/build/ide/intellij/idea70/modules/demo= /demo.iml (rev 0) +++ branches/JBoss_Portal_Branch_2_6/build/ide/intellij/idea70/modules/demo= /demo.iml 2007-10-31 00:01:15 UTC (rev 8804) @@ -0,0 +1,188 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Added: branches/JBoss_Portal_Branch_2_6/build/ide/intellij/idea70/modules/f= aces/faces.iml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/build/ide/intellij/idea70/modules/face= s/faces.iml (rev 0) +++ branches/JBoss_Portal_Branch_2_6/build/ide/intellij/idea70/modules/face= s/faces.iml 2007-10-31 00:01:15 UTC (rev 8804) @@ -0,0 +1,300 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Added: branches/JBoss_Portal_Branch_2_6/build/ide/intellij/idea70/modules/f= ormat/format.iml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/build/ide/intellij/idea70/modules/form= at/format.iml (rev 0) +++ branches/JBoss_Portal_Branch_2_6/build/ide/intellij/idea70/modules/form= at/format.iml 2007-10-31 00:01:15 UTC (rev 8804) @@ -0,0 +1,241 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Added: branches/JBoss_Portal_Branch_2_6/build/ide/intellij/idea70/modules/j= ems/jems.iml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/build/ide/intellij/idea70/modules/jems= /jems.iml (rev 0) +++ branches/JBoss_Portal_Branch_2_6/build/ide/intellij/idea70/modules/jems= /jems.iml 2007-10-31 00:01:15 UTC (rev 8804) @@ -0,0 +1,426 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Added: branches/JBoss_Portal_Branch_2_6/build/ide/intellij/idea70/modules/m= igration/migration.iml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/build/ide/intellij/idea70/modules/migr= ation/migration.iml (rev 0) +++ branches/JBoss_Portal_Branch_2_6/build/ide/intellij/idea70/modules/migr= ation/migration.iml 2007-10-31 00:01:15 UTC (rev 8804) @@ -0,0 +1,314 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Added: branches/JBoss_Portal_Branch_2_6/build/ide/intellij/idea70/modules/p= ortlet-server/portlet-server.iml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/build/ide/intellij/idea70/modules/port= let-server/portlet-server.iml (rev 0) +++ branches/JBoss_Portal_Branch_2_6/build/ide/intellij/idea70/modules/port= let-server/portlet-server.iml 2007-10-31 00:01:15 UTC (rev 8804) @@ -0,0 +1,351 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Added: branches/JBoss_Portal_Branch_2_6/build/ide/intellij/idea70/modules/r= egistration/registration.iml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/build/ide/intellij/idea70/modules/regi= stration/registration.iml (rev 0) +++ branches/JBoss_Portal_Branch_2_6/build/ide/intellij/idea70/modules/regi= stration/registration.iml 2007-10-31 00:01:15 UTC (rev 8804) @@ -0,0 +1,239 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Added: branches/JBoss_Portal_Branch_2_6/build/ide/intellij/idea70/modules/s= earch/search.iml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/build/ide/intellij/idea70/modules/sear= ch/search.iml (rev 0) +++ branches/JBoss_Portal_Branch_2_6/build/ide/intellij/idea70/modules/sear= ch/search.iml 2007-10-31 00:01:15 UTC (rev 8804) @@ -0,0 +1,240 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Added: branches/JBoss_Portal_Branch_2_6/build/ide/intellij/idea70/modules/s= ecurity/security.iml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/build/ide/intellij/idea70/modules/secu= rity/security.iml (rev 0) +++ branches/JBoss_Portal_Branch_2_6/build/ide/intellij/idea70/modules/secu= rity/security.iml 2007-10-31 00:01:15 UTC (rev 8804) @@ -0,0 +1,295 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Added: branches/JBoss_Portal_Branch_2_6/build/ide/intellij/idea70/modules/s= erver/server.iml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/build/ide/intellij/idea70/modules/serv= er/server.iml (rev 0) +++ branches/JBoss_Portal_Branch_2_6/build/ide/intellij/idea70/modules/serv= er/server.iml 2007-10-31 00:01:15 UTC (rev 8804) @@ -0,0 +1,429 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Added: branches/JBoss_Portal_Branch_2_6/build/ide/intellij/idea70/modules/t= estsuite/testsuite.iml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/build/ide/intellij/idea70/modules/test= suite/testsuite.iml (rev 0) +++ branches/JBoss_Portal_Branch_2_6/build/ide/intellij/idea70/modules/test= suite/testsuite.iml 2007-10-31 00:01:15 UTC (rev 8804) @@ -0,0 +1,191 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Added: branches/JBoss_Portal_Branch_2_6/build/ide/intellij/idea70/modules/t= heme/theme.iml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/build/ide/intellij/idea70/modules/them= e/theme.iml (rev 0) +++ branches/JBoss_Portal_Branch_2_6/build/ide/intellij/idea70/modules/them= e/theme.iml 2007-10-31 00:01:15 UTC (rev 8804) @@ -0,0 +1,368 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Added: branches/JBoss_Portal_Branch_2_6/build/ide/intellij/idea70/modules/t= hirdparty/thirdparty.iml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/build/ide/intellij/idea70/modules/thir= dparty/thirdparty.iml (rev 0) +++ branches/JBoss_Portal_Branch_2_6/build/ide/intellij/idea70/modules/thir= dparty/thirdparty.iml 2007-10-31 00:01:15 UTC (rev 8804) @@ -0,0 +1,244 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Added: branches/JBoss_Portal_Branch_2_6/build/ide/intellij/idea70/modules/t= ools/tools.iml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/build/ide/intellij/idea70/modules/tool= s/tools.iml (rev 0) +++ branches/JBoss_Portal_Branch_2_6/build/ide/intellij/idea70/modules/tool= s/tools.iml 2007-10-31 00:01:15 UTC (rev 8804) @@ -0,0 +1,200 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Added: branches/JBoss_Portal_Branch_2_6/build/ide/intellij/idea70/modules/w= idget/widget.iml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/build/ide/intellij/idea70/modules/widg= et/widget.iml (rev 0) +++ branches/JBoss_Portal_Branch_2_6/build/ide/intellij/idea70/modules/widg= et/widget.iml 2007-10-31 00:01:15 UTC (rev 8804) @@ -0,0 +1,287 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Added: branches/JBoss_Portal_Branch_2_6/build/ide/intellij/idea70/modules/w= orkflow/workflow.iml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/build/ide/intellij/idea70/modules/work= flow/workflow.iml (rev 0) +++ branches/JBoss_Portal_Branch_2_6/build/ide/intellij/idea70/modules/work= flow/workflow.iml 2007-10-31 00:01:15 UTC (rev 8804) @@ -0,0 +1,256 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Added: branches/JBoss_Portal_Branch_2_6/build/ide/intellij/idea70/modules/w= srp/wsrp.iml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/build/ide/intellij/idea70/modules/wsrp= /wsrp.iml (rev 0) +++ branches/JBoss_Portal_Branch_2_6/build/ide/intellij/idea70/modules/wsrp= /wsrp.iml 2007-10-31 00:01:15 UTC (rev 8804) @@ -0,0 +1,9866 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/apache-co= llections/lib/commons-collections.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/apache-fi= leupload/lib/commons-fileupload.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/apache-ht= tpclient/lib/commons-httpclient.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/apache-lo= g4j/lib/log4j.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/apache-lo= gging/lib/commons-logging.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/apache-lu= cene/lib/lucene.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/apache-my= faces/lib/myfaces-api.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/beanshell= /lib/bsh-1.3.0.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/dbunit/li= b/dbunit.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/dom4j/lib= /dom4j.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/el/lib/el= -api.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/facelets/= lib/jsf-facelets.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/freemarke= r/lib/freemarker.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/hibernate= /lib/hibernate3.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/ibm-wsdl4= j/lib/wsdl4j.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jackrabbi= t/lib/jackrabbit-core.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jakarta-c= actus/lib/cactus.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jakarta-i= o/lib/commons-io.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/javassist= /lib/javassist.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jboss-por= tal/modules/common/lib/portal-common-lib.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jboss-por= tal/modules/common/lib/portal-common-portal-lib.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jboss-por= tal/modules/portlet/lib/portal-portlet-bridge-lib.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jboss-por= tal/modules/portlet/lib/portal-portlet-federation-lib.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jboss-por= tal/modules/portlet/lib/portal-portlet-jsr168api-lib.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jboss-por= tal/modules/portlet/lib/portal-portlet-lib.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jboss-por= tal/modules/test/lib/portal-test-jboss-lib.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jboss-por= tal/modules/test/lib/portal-test-lib.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jboss-por= tal/modules/web/lib/portal-web-lib.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jboss/aop= /lib/jboss-aop.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jboss/bac= kport-concurrent/lib/jboss-backport-concurrent.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jboss/cac= he/lib/jboss-cache.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jboss/jbo= ssxb/lib/jboss-xml-binding.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jboss/mic= rocontainer/lib/jboss-container.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jboss/mic= rocontainer/lib/jboss-dependency.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jboss/mic= rocontainer/lib/jboss-microcontainer.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jboss-aspect-library.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jboss-common-client.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jboss-common-jdbc-wrapper.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jboss-common.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jboss-hibernate.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jboss-j2ee.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jboss-jaxrpc.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jboss-jca.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jboss-jmx.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jboss-local-jdbc.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jboss-saaj.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jboss-system.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jboss-transaction.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jboss-xml-binding.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jboss.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jbossha.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jbosssx.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jmx-invoker-adaptor-client.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jnp-client.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jnpserver.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/namespace.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbpm/jaro= nly/lib/jbpm-identity.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbpm/jaro= nly/lib/jbpm.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jcr/lib/j= cr-1.0.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jgroups/l= ib/jgroups.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/junit/lib= /junit.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jwebunit/= lib/jwebunit-1.2.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/oswego-co= ncurrent/lib/concurrent.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/slf4j/lib= /slf4j-log4j12.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/sun-jaf/l= ib/activation.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/sun-javam= ail/lib/mail.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/sun-opend= s/lib/OpenDS.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/sun-servl= et/lib/jsp-api.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/sun-servl= et/lib/servlet-api.jar!/ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/apache-co= llections/lib/commons-collections.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/apache-fi= leupload/lib/commons-fileupload.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/apache-ht= tpclient/lib/commons-httpclient.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/apache-lo= g4j/lib/log4j.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/apache-lo= gging/lib/commons-logging.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/apache-lu= cene/lib/lucene.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/apache-my= faces/lib/myfaces-api.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/beanshell= /lib/bsh-1.3.0.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/dbunit/li= b/dbunit.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/dom4j/lib= /dom4j.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/el/lib/el= -api.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/facelets/= lib/jsf-facelets.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/freemarke= r/lib/freemarker.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/hibernate= /lib/hibernate3.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/ibm-wsdl4= j/lib/wsdl4j.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jackrabbi= t/lib/jackrabbit-core.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jakarta-c= actus/lib/cactus.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jakarta-i= o/lib/commons-io.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/javassist= /lib/javassist.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jboss-por= tal/modules/common/lib/portal-common-lib.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jboss-por= tal/modules/common/lib/portal-common-portal-lib.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jboss-por= tal/modules/portlet/lib/portal-portlet-bridge-lib.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jboss-por= tal/modules/portlet/lib/portal-portlet-federation-lib.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jboss-por= tal/modules/portlet/lib/portal-portlet-jsr168api-lib.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jboss-por= tal/modules/portlet/lib/portal-portlet-lib.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jboss-por= tal/modules/test/lib/portal-test-jboss-lib.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jboss-por= tal/modules/test/lib/portal-test-lib.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jboss-por= tal/modules/web/lib/portal-web-lib.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jboss/aop= /lib/jboss-aop.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jboss/bac= kport-concurrent/lib/jboss-backport-concurrent.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jboss/cac= he/lib/jboss-cache.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jboss/jbo= ssxb/lib/jboss-xml-binding.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jboss/mic= rocontainer/lib/jboss-container.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jboss/mic= rocontainer/lib/jboss-dependency.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jboss/mic= rocontainer/lib/jboss-microcontainer.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jboss-aspect-library.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jboss-common-client.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jboss-common-jdbc-wrapper.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jboss-common.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jboss-hibernate.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jboss-j2ee.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jboss-jaxrpc.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jboss-jca.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jboss-jmx.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jboss-local-jdbc.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jboss-saaj.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jboss-system.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jboss-transaction.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jboss-xml-binding.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jboss.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jbossha.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jbosssx.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jmx-invoker-adaptor-client.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jnp-client.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jnpserver.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/namespace.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbpm/jaro= nly/lib/jbpm-identity.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbpm/jaro= nly/lib/jbpm.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jcr/lib/j= cr-1.0.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jgroups/l= ib/jgroups.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/junit/lib= /junit.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jwebunit/= lib/jwebunit-1.2.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/oswego-co= ncurrent/lib/concurrent.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/slf4j/lib= /slf4j-log4j12.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/sun-jaf/l= ib/activation.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/sun-javam= ail/lib/mail.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/sun-opend= s/lib/OpenDS.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/sun-servl= et/lib/jsp-api.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/sun-servl= et/lib/servlet-api.jar!/ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/apache-co= llections/lib/commons-collections.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/apache-fi= leupload/lib/commons-fileupload.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/apache-ht= tpclient/lib/commons-httpclient.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/apache-lo= g4j/lib/log4j.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/apache-lo= gging/lib/commons-logging.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/apache-lu= cene/lib/lucene.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/apache-my= faces/lib/myfaces-api.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/beanshell= /lib/bsh-1.3.0.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/dbunit/li= b/dbunit.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/dom4j/lib= /dom4j.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/el/lib/el= -api.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/facelets/= lib/jsf-facelets.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/freemarke= r/lib/freemarker.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/hibernate= /lib/hibernate3.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/ibm-wsdl4= j/lib/wsdl4j.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jackrabbi= t/lib/jackrabbit-core.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jakarta-c= actus/lib/cactus.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jakarta-i= o/lib/commons-io.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/javassist= /lib/javassist.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jboss-por= tal/modules/common/lib/portal-common-lib.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jboss-por= tal/modules/common/lib/portal-common-portal-lib.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jboss-por= tal/modules/portlet/lib/portal-portlet-bridge-lib.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jboss-por= tal/modules/portlet/lib/portal-portlet-federation-lib.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jboss-por= tal/modules/portlet/lib/portal-portlet-jsr168api-lib.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jboss-por= tal/modules/portlet/lib/portal-portlet-lib.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jboss-por= tal/modules/test/lib/portal-test-jboss-lib.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jboss-por= tal/modules/test/lib/portal-test-lib.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jboss-por= tal/modules/web/lib/portal-web-lib.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jboss/aop= /lib/jboss-aop.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jboss/bac= kport-concurrent/lib/jboss-backport-concurrent.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jboss/cac= he/lib/jboss-cache.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jboss/jbo= ssxb/lib/jboss-xml-binding.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jboss/mic= rocontainer/lib/jboss-container.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jboss/mic= rocontainer/lib/jboss-dependency.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jboss/mic= rocontainer/lib/jboss-microcontainer.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jboss-aspect-library.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jboss-common-client.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jboss-common-jdbc-wrapper.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jboss-common.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jboss-hibernate.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jboss-j2ee.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jboss-jaxrpc.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jboss-jca.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jboss-jmx.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jboss-local-jdbc.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jboss-saaj.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jboss-system.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jboss-transaction.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jboss-xml-binding.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jboss.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jbossha.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jbosssx.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jmx-invoker-adaptor-client.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jnp-client.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jnpserver.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/namespace.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbpm/jaro= nly/lib/jbpm-identity.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbpm/jaro= nly/lib/jbpm.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jcr/lib/j= cr-1.0.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jgroups/l= ib/jgroups.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/junit/lib= /junit.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jwebunit/= lib/jwebunit-1.2.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/oswego-co= ncurrent/lib/concurrent.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/slf4j/lib= /slf4j-log4j12.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/sun-jaf/l= ib/activation.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/sun-javam= ail/lib/mail.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/sun-opend= s/lib/OpenDS.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/sun-servl= et/lib/jsp-api.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/sun-servl= et/lib/servlet-api.jar!/ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/apache-co= llections/lib/commons-collections.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/apache-fi= leupload/lib/commons-fileupload.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/apache-ht= tpclient/lib/commons-httpclient.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/apache-lo= g4j/lib/log4j.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/apache-lo= gging/lib/commons-logging.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/apache-lu= cene/lib/lucene.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/apache-my= faces/lib/myfaces-api.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/beanshell= /lib/bsh-1.3.0.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/dbunit/li= b/dbunit.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/dom4j/lib= /dom4j.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/el/lib/el= -api.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/facelets/= lib/jsf-facelets.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/freemarke= r/lib/freemarker.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/hibernate= /lib/hibernate3.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/ibm-wsdl4= j/lib/wsdl4j.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jackrabbi= t/lib/jackrabbit-core.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jakarta-c= actus/lib/cactus.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jakarta-i= o/lib/commons-io.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/javassist= /lib/javassist.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jboss-por= tal/modules/common/lib/portal-common-lib.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jboss-por= tal/modules/common/lib/portal-common-portal-lib.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jboss-por= tal/modules/portlet/lib/portal-portlet-bridge-lib.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jboss-por= tal/modules/portlet/lib/portal-portlet-federation-lib.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jboss-por= tal/modules/portlet/lib/portal-portlet-jsr168api-lib.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jboss-por= tal/modules/portlet/lib/portal-portlet-lib.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jboss-por= tal/modules/test/lib/portal-test-jboss-lib.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jboss-por= tal/modules/test/lib/portal-test-lib.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jboss-por= tal/modules/web/lib/portal-web-lib.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jboss/aop= /lib/jboss-aop.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jboss/bac= kport-concurrent/lib/jboss-backport-concurrent.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jboss/cac= he/lib/jboss-cache.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jboss/jbo= ssxb/lib/jboss-xml-binding.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jboss/mic= rocontainer/lib/jboss-container.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jboss/mic= rocontainer/lib/jboss-dependency.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jboss/mic= rocontainer/lib/jboss-microcontainer.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jboss-aspect-library.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jboss-common-client.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jboss-common-jdbc-wrapper.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jboss-common.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jboss-hibernate.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jboss-j2ee.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jboss-jaxrpc.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jboss-jca.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jboss-jmx.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jboss-local-jdbc.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jboss-saaj.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jboss-system.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jboss-transaction.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jboss-xml-binding.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jboss.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jbossha.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jbosssx.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jmx-invoker-adaptor-client.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jnp-client.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jnpserver.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/namespace.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbpm/jaro= nly/lib/jbpm-identity.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbpm/jaro= nly/lib/jbpm.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jcr/lib/j= cr-1.0.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jgroups/l= ib/jgroups.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/junit/lib= /junit.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jwebunit/= lib/jwebunit-1.2.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/oswego-co= ncurrent/lib/concurrent.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/slf4j/lib= /slf4j-log4j12.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/sun-jaf/l= ib/activation.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/sun-javam= ail/lib/mail.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/sun-opend= s/lib/OpenDS.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/sun-servl= et/lib/jsp-api.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/sun-servl= et/lib/servlet-api.jar!/ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/apache-co= llections/lib/commons-collections.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/apache-fi= leupload/lib/commons-fileupload.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/apache-ht= tpclient/lib/commons-httpclient.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/apache-lo= g4j/lib/log4j.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/apache-lo= gging/lib/commons-logging.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/apache-lu= cene/lib/lucene.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/apache-my= faces/lib/myfaces-api.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/beanshell= /lib/bsh-1.3.0.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/dbunit/li= b/dbunit.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/dom4j/lib= /dom4j.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/el/lib/el= -api.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/facelets/= lib/jsf-facelets.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/freemarke= r/lib/freemarker.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/hibernate= /lib/hibernate3.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/ibm-wsdl4= j/lib/wsdl4j.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jackrabbi= t/lib/jackrabbit-core.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jakarta-c= actus/lib/cactus.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jakarta-i= o/lib/commons-io.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/javassist= /lib/javassist.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jboss-por= tal/modules/common/lib/portal-common-lib.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jboss-por= tal/modules/common/lib/portal-common-portal-lib.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jboss-por= tal/modules/portlet/lib/portal-portlet-bridge-lib.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jboss-por= tal/modules/portlet/lib/portal-portlet-federation-lib.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jboss-por= tal/modules/portlet/lib/portal-portlet-jsr168api-lib.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jboss-por= tal/modules/portlet/lib/portal-portlet-lib.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jboss-por= tal/modules/test/lib/portal-test-jboss-lib.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jboss-por= tal/modules/test/lib/portal-test-lib.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jboss-por= tal/modules/web/lib/portal-web-lib.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jboss/aop= /lib/jboss-aop.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jboss/bac= kport-concurrent/lib/jboss-backport-concurrent.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jboss/cac= he/lib/jboss-cache.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jboss/jbo= ssxb/lib/jboss-xml-binding.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jboss/mic= rocontainer/lib/jboss-container.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jboss/mic= rocontainer/lib/jboss-dependency.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jboss/mic= rocontainer/lib/jboss-microcontainer.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jboss-aspect-library.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jboss-common-client.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jboss-common-jdbc-wrapper.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jboss-common.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jboss-hibernate.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jboss-j2ee.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jboss-jaxrpc.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jboss-jca.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jboss-jmx.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jboss-local-jdbc.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jboss-saaj.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jboss-system.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jboss-transaction.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jboss-xml-binding.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jboss.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jbossha.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jbosssx.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jmx-invoker-adaptor-client.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jnp-client.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jnpserver.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/namespace.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbpm/jaro= nly/lib/jbpm-identity.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbpm/jaro= nly/lib/jbpm.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jcr/lib/j= cr-1.0.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jgroups/l= ib/jgroups.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/junit/lib= /junit.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jwebunit/= lib/jwebunit-1.2.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/oswego-co= ncurrent/lib/concurrent.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/slf4j/lib= /slf4j-log4j12.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/sun-jaf/l= ib/activation.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/sun-javam= ail/lib/mail.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/sun-opend= s/lib/OpenDS.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/sun-servl= et/lib/jsp-api.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/sun-servl= et/lib/servlet-api.jar!/ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/apache-co= llections/lib/commons-collections.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/apache-fi= leupload/lib/commons-fileupload.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/apache-ht= tpclient/lib/commons-httpclient.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/apache-lo= g4j/lib/log4j.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/apache-lo= gging/lib/commons-logging.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/apache-lu= cene/lib/lucene.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/apache-my= faces/lib/myfaces-api.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/beanshell= /lib/bsh-1.3.0.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/dbunit/li= b/dbunit.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/dom4j/lib= /dom4j.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/el/lib/el= -api.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/facelets/= lib/jsf-facelets.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/freemarke= r/lib/freemarker.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/hibernate= /lib/hibernate3.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/ibm-wsdl4= j/lib/wsdl4j.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jackrabbi= t/lib/jackrabbit-core.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jakarta-c= actus/lib/cactus.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jakarta-i= o/lib/commons-io.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/javassist= /lib/javassist.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jboss-por= tal/modules/common/lib/portal-common-lib.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jboss-por= tal/modules/common/lib/portal-common-portal-lib.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jboss-por= tal/modules/portlet/lib/portal-portlet-bridge-lib.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jboss-por= tal/modules/portlet/lib/portal-portlet-federation-lib.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jboss-por= tal/modules/portlet/lib/portal-portlet-jsr168api-lib.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jboss-por= tal/modules/portlet/lib/portal-portlet-lib.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jboss-por= tal/modules/test/lib/portal-test-jboss-lib.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jboss-por= tal/modules/test/lib/portal-test-lib.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jboss-por= tal/modules/web/lib/portal-web-lib.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jboss/aop= /lib/jboss-aop.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jboss/bac= kport-concurrent/lib/jboss-backport-concurrent.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jboss/cac= he/lib/jboss-cache.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jboss/jbo= ssxb/lib/jboss-xml-binding.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jboss/mic= rocontainer/lib/jboss-container.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jboss/mic= rocontainer/lib/jboss-dependency.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jboss/mic= rocontainer/lib/jboss-microcontainer.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jboss-aspect-library.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jboss-common-client.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jboss-common-jdbc-wrapper.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jboss-common.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jboss-hibernate.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jboss-j2ee.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jboss-jaxrpc.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jboss-jca.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jboss-jmx.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jboss-local-jdbc.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jboss-saaj.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jboss-system.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jboss-transaction.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jboss-xml-binding.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jboss.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jbossha.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jbosssx.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jmx-invoker-adaptor-client.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jnp-client.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jnpserver.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/namespace.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbpm/jaro= nly/lib/jbpm-identity.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbpm/jaro= nly/lib/jbpm.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jcr/lib/j= cr-1.0.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jgroups/l= ib/jgroups.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/junit/lib= /junit.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jwebunit/= lib/jwebunit-1.2.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/oswego-co= ncurrent/lib/concurrent.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/slf4j/lib= /slf4j-log4j12.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/sun-jaf/l= ib/activation.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/sun-javam= ail/lib/mail.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/sun-opend= s/lib/OpenDS.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/sun-servl= et/lib/jsp-api.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/sun-servl= et/lib/servlet-api.jar!/ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/apache-co= llections/lib/commons-collections.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/apache-fi= leupload/lib/commons-fileupload.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/apache-ht= tpclient/lib/commons-httpclient.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/apache-lo= g4j/lib/log4j.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/apache-lo= gging/lib/commons-logging.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/apache-lu= cene/lib/lucene.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/apache-my= faces/lib/myfaces-api.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/beanshell= /lib/bsh-1.3.0.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/dbunit/li= b/dbunit.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/dom4j/lib= /dom4j.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/el/lib/el= -api.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/facelets/= lib/jsf-facelets.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/freemarke= r/lib/freemarker.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/hibernate= /lib/hibernate3.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/ibm-wsdl4= j/lib/wsdl4j.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jackrabbi= t/lib/jackrabbit-core.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jakarta-c= actus/lib/cactus.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jakarta-i= o/lib/commons-io.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/javassist= /lib/javassist.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jboss-por= tal/modules/common/lib/portal-common-lib.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jboss-por= tal/modules/common/lib/portal-common-portal-lib.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jboss-por= tal/modules/portlet/lib/portal-portlet-bridge-lib.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jboss-por= tal/modules/portlet/lib/portal-portlet-federation-lib.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jboss-por= tal/modules/portlet/lib/portal-portlet-jsr168api-lib.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jboss-por= tal/modules/portlet/lib/portal-portlet-lib.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jboss-por= tal/modules/test/lib/portal-test-jboss-lib.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jboss-por= tal/modules/test/lib/portal-test-lib.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jboss-por= tal/modules/web/lib/portal-web-lib.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jboss/aop= /lib/jboss-aop.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jboss/bac= kport-concurrent/lib/jboss-backport-concurrent.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jboss/cac= he/lib/jboss-cache.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jboss/jbo= ssxb/lib/jboss-xml-binding.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jboss/mic= rocontainer/lib/jboss-container.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jboss/mic= rocontainer/lib/jboss-dependency.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jboss/mic= rocontainer/lib/jboss-microcontainer.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jboss-aspect-library.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jboss-common-client.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jboss-common-jdbc-wrapper.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jboss-common.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jboss-hibernate.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jboss-j2ee.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jboss-jaxrpc.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jboss-jca.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jboss-jmx.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jboss-local-jdbc.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jboss-saaj.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jboss-system.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jboss-transaction.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jboss-xml-binding.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jboss.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jbossha.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jbosssx.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jmx-invoker-adaptor-client.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jnp-client.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jnpserver.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/namespace.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbpm/jaro= nly/lib/jbpm-identity.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbpm/jaro= nly/lib/jbpm.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jcr/lib/j= cr-1.0.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jgroups/l= ib/jgroups.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/junit/lib= /junit.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jwebunit/= lib/jwebunit-1.2.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/oswego-co= ncurrent/lib/concurrent.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/slf4j/lib= /slf4j-log4j12.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/sun-jaf/l= ib/activation.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/sun-javam= ail/lib/mail.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/sun-opend= s/lib/OpenDS.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/sun-servl= et/lib/jsp-api.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/sun-servl= et/lib/servlet-api.jar!/ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/apache-co= llections/lib/commons-collections.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/apache-fi= leupload/lib/commons-fileupload.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/apache-ht= tpclient/lib/commons-httpclient.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/apache-lo= g4j/lib/log4j.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/apache-lo= gging/lib/commons-logging.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/apache-lu= cene/lib/lucene.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/apache-my= faces/lib/myfaces-api.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/beanshell= /lib/bsh-1.3.0.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/dbunit/li= b/dbunit.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/dom4j/lib= /dom4j.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/el/lib/el= -api.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/facelets/= lib/jsf-facelets.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/freemarke= r/lib/freemarker.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/hibernate= /lib/hibernate3.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/ibm-wsdl4= j/lib/wsdl4j.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jackrabbi= t/lib/jackrabbit-core.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jakarta-c= actus/lib/cactus.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jakarta-i= o/lib/commons-io.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/javassist= /lib/javassist.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jboss-por= tal/modules/common/lib/portal-common-lib.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jboss-por= tal/modules/common/lib/portal-common-portal-lib.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jboss-por= tal/modules/portlet/lib/portal-portlet-bridge-lib.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jboss-por= tal/modules/portlet/lib/portal-portlet-federation-lib.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jboss-por= tal/modules/portlet/lib/portal-portlet-jsr168api-lib.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jboss-por= tal/modules/portlet/lib/portal-portlet-lib.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jboss-por= tal/modules/test/lib/portal-test-jboss-lib.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jboss-por= tal/modules/test/lib/portal-test-lib.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jboss-por= tal/modules/web/lib/portal-web-lib.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jboss/aop= /lib/jboss-aop.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jboss/bac= kport-concurrent/lib/jboss-backport-concurrent.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jboss/cac= he/lib/jboss-cache.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jboss/jbo= ssxb/lib/jboss-xml-binding.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jboss/mic= rocontainer/lib/jboss-container.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jboss/mic= rocontainer/lib/jboss-dependency.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jboss/mic= rocontainer/lib/jboss-microcontainer.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jboss-aspect-library.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jboss-common-client.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jboss-common-jdbc-wrapper.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jboss-common.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jboss-hibernate.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jboss-j2ee.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jboss-jaxrpc.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jboss-jca.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jboss-jmx.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jboss-local-jdbc.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jboss-saaj.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jboss-system.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jboss-transaction.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jboss-xml-binding.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jboss.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jbossha.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jbosssx.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jmx-invoker-adaptor-client.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jnp-client.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jnpserver.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/namespace.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbpm/jaro= nly/lib/jbpm-identity.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbpm/jaro= nly/lib/jbpm.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jcr/lib/j= cr-1.0.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jgroups/l= ib/jgroups.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/junit/lib= /junit.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jwebunit/= lib/jwebunit-1.2.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/oswego-co= ncurrent/lib/concurrent.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/slf4j/lib= /slf4j-log4j12.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/sun-jaf/l= ib/activation.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/sun-javam= ail/lib/mail.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/sun-opend= s/lib/OpenDS.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/sun-servl= et/lib/jsp-api.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/sun-servl= et/lib/servlet-api.jar!/ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/apache-co= llections/lib/commons-collections.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/apache-fi= leupload/lib/commons-fileupload.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/apache-ht= tpclient/lib/commons-httpclient.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/apache-lo= g4j/lib/log4j.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/apache-lo= gging/lib/commons-logging.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/apache-lu= cene/lib/lucene.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/apache-my= faces/lib/myfaces-api.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/beanshell= /lib/bsh-1.3.0.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/dbunit/li= b/dbunit.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/dom4j/lib= /dom4j.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/el/lib/el= -api.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/facelets/= lib/jsf-facelets.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/freemarke= r/lib/freemarker.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/hibernate= /lib/hibernate3.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/ibm-wsdl4= j/lib/wsdl4j.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jackrabbi= t/lib/jackrabbit-core.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jakarta-c= actus/lib/cactus.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jakarta-i= o/lib/commons-io.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/javassist= /lib/javassist.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jboss-por= tal/modules/common/lib/portal-common-lib.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jboss-por= tal/modules/common/lib/portal-common-portal-lib.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jboss-por= tal/modules/portlet/lib/portal-portlet-bridge-lib.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jboss-por= tal/modules/portlet/lib/portal-portlet-federation-lib.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jboss-por= tal/modules/portlet/lib/portal-portlet-jsr168api-lib.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jboss-por= tal/modules/portlet/lib/portal-portlet-lib.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jboss-por= tal/modules/test/lib/portal-test-jboss-lib.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jboss-por= tal/modules/test/lib/portal-test-lib.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jboss-por= tal/modules/web/lib/portal-web-lib.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jboss/aop= /lib/jboss-aop.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jboss/bac= kport-concurrent/lib/jboss-backport-concurrent.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jboss/cac= he/lib/jboss-cache.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jboss/jbo= ssxb/lib/jboss-xml-binding.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jboss/mic= rocontainer/lib/jboss-container.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jboss/mic= rocontainer/lib/jboss-dependency.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jboss/mic= rocontainer/lib/jboss-microcontainer.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jboss-aspect-library.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jboss-common-client.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jboss-common-jdbc-wrapper.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jboss-common.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jboss-hibernate.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jboss-j2ee.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jboss-jaxrpc.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jboss-jca.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jboss-jmx.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jboss-local-jdbc.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jboss-saaj.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jboss-system.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jboss-transaction.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jboss-xml-binding.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jboss.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jbossha.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jbosssx.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jmx-invoker-adaptor-client.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jnp-client.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jnpserver.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/namespace.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbpm/jaro= nly/lib/jbpm-identity.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbpm/jaro= nly/lib/jbpm.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jcr/lib/j= cr-1.0.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jgroups/l= ib/jgroups.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/junit/lib= /junit.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jwebunit/= lib/jwebunit-1.2.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/oswego-co= ncurrent/lib/concurrent.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/slf4j/lib= /slf4j-log4j12.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/sun-jaf/l= ib/activation.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/sun-javam= ail/lib/mail.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/sun-opend= s/lib/OpenDS.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/sun-servl= et/lib/jsp-api.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/sun-servl= et/lib/servlet-api.jar!/ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/apache-co= llections/lib/commons-collections.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/apache-fi= leupload/lib/commons-fileupload.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/apache-ht= tpclient/lib/commons-httpclient.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/apache-lo= g4j/lib/log4j.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/apache-lo= gging/lib/commons-logging.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/apache-lu= cene/lib/lucene.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/apache-my= faces/lib/myfaces-api.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/beanshell= /lib/bsh-1.3.0.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/dbunit/li= b/dbunit.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/dom4j/lib= /dom4j.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/el/lib/el= -api.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/facelets/= lib/jsf-facelets.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/freemarke= r/lib/freemarker.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/hibernate= /lib/hibernate3.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/ibm-wsdl4= j/lib/wsdl4j.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jackrabbi= t/lib/jackrabbit-core.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jakarta-c= actus/lib/cactus.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jakarta-i= o/lib/commons-io.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/javassist= /lib/javassist.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jboss-por= tal/modules/common/lib/portal-common-lib.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jboss-por= tal/modules/common/lib/portal-common-portal-lib.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jboss-por= tal/modules/portlet/lib/portal-portlet-bridge-lib.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jboss-por= tal/modules/portlet/lib/portal-portlet-federation-lib.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jboss-por= tal/modules/portlet/lib/portal-portlet-jsr168api-lib.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jboss-por= tal/modules/portlet/lib/portal-portlet-lib.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jboss-por= tal/modules/test/lib/portal-test-jboss-lib.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jboss-por= tal/modules/test/lib/portal-test-lib.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jboss-por= tal/modules/web/lib/portal-web-lib.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jboss/aop= /lib/jboss-aop.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jboss/bac= kport-concurrent/lib/jboss-backport-concurrent.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jboss/cac= he/lib/jboss-cache.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jboss/jbo= ssxb/lib/jboss-xml-binding.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jboss/mic= rocontainer/lib/jboss-container.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jboss/mic= rocontainer/lib/jboss-dependency.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jboss/mic= rocontainer/lib/jboss-microcontainer.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jboss-aspect-library.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jboss-common-client.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jboss-common-jdbc-wrapper.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jboss-common.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jboss-hibernate.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jboss-j2ee.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jboss-jaxrpc.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jboss-jca.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jboss-jmx.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jboss-local-jdbc.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jboss-saaj.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jboss-system.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jboss-transaction.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jboss-xml-binding.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jboss.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jbossha.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jbosssx.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jmx-invoker-adaptor-client.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jnp-client.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jnpserver.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/namespace.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbpm/jaro= nly/lib/jbpm-identity.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbpm/jaro= nly/lib/jbpm.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jcr/lib/j= cr-1.0.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jgroups/l= ib/jgroups.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/junit/lib= /junit.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jwebunit/= lib/jwebunit-1.2.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/oswego-co= ncurrent/lib/concurrent.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/slf4j/lib= /slf4j-log4j12.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/sun-jaf/l= ib/activation.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/sun-javam= ail/lib/mail.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/sun-opend= s/lib/OpenDS.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/sun-servl= et/lib/jsp-api.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/sun-servl= et/lib/servlet-api.jar!/ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/apache-co= llections/lib/commons-collections.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/apache-fi= leupload/lib/commons-fileupload.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/apache-ht= tpclient/lib/commons-httpclient.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/apache-lo= g4j/lib/log4j.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/apache-lo= gging/lib/commons-logging.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/apache-lu= cene/lib/lucene.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/apache-my= faces/lib/myfaces-api.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/beanshell= /lib/bsh-1.3.0.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/dbunit/li= b/dbunit.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/dom4j/lib= /dom4j.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/el/lib/el= -api.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/facelets/= lib/jsf-facelets.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/freemarke= r/lib/freemarker.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/hibernate= /lib/hibernate3.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/ibm-wsdl4= j/lib/wsdl4j.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jackrabbi= t/lib/jackrabbit-core.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jakarta-c= actus/lib/cactus.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jakarta-i= o/lib/commons-io.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/javassist= /lib/javassist.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jboss-por= tal/modules/common/lib/portal-common-lib.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jboss-por= tal/modules/common/lib/portal-common-portal-lib.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jboss-por= tal/modules/portlet/lib/portal-portlet-bridge-lib.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jboss-por= tal/modules/portlet/lib/portal-portlet-federation-lib.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jboss-por= tal/modules/portlet/lib/portal-portlet-jsr168api-lib.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jboss-por= tal/modules/portlet/lib/portal-portlet-lib.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jboss-por= tal/modules/test/lib/portal-test-jboss-lib.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jboss-por= tal/modules/test/lib/portal-test-lib.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jboss-por= tal/modules/web/lib/portal-web-lib.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jboss/aop= /lib/jboss-aop.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jboss/bac= kport-concurrent/lib/jboss-backport-concurrent.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jboss/cac= he/lib/jboss-cache.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jboss/jbo= ssxb/lib/jboss-xml-binding.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jboss/mic= rocontainer/lib/jboss-container.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jboss/mic= rocontainer/lib/jboss-dependency.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jboss/mic= rocontainer/lib/jboss-microcontainer.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jboss-aspect-library.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jboss-common-client.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jboss-common-jdbc-wrapper.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jboss-common.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jboss-hibernate.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jboss-j2ee.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jboss-jaxrpc.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jboss-jca.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jboss-jmx.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jboss-local-jdbc.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jboss-saaj.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jboss-system.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jboss-transaction.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jboss-xml-binding.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jboss.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jbossha.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jbosssx.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jmx-invoker-adaptor-client.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jnp-client.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jnpserver.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/namespace.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbpm/jaro= nly/lib/jbpm-identity.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbpm/jaro= nly/lib/jbpm.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jcr/lib/j= cr-1.0.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jgroups/l= ib/jgroups.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/junit/lib= /junit.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jwebunit/= lib/jwebunit-1.2.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/oswego-co= ncurrent/lib/concurrent.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/slf4j/lib= /slf4j-log4j12.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/sun-jaf/l= ib/activation.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/sun-javam= ail/lib/mail.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/sun-opend= s/lib/OpenDS.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/sun-servl= et/lib/jsp-api.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/sun-servl= et/lib/servlet-api.jar!/ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/apache-co= llections/lib/commons-collections.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/apache-fi= leupload/lib/commons-fileupload.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/apache-ht= tpclient/lib/commons-httpclient.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/apache-lo= g4j/lib/log4j.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/apache-lo= gging/lib/commons-logging.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/apache-lu= cene/lib/lucene.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/apache-my= faces/lib/myfaces-api.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/beanshell= /lib/bsh-1.3.0.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/dbunit/li= b/dbunit.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/dom4j/lib= /dom4j.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/el/lib/el= -api.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/facelets/= lib/jsf-facelets.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/freemarke= r/lib/freemarker.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/hibernate= /lib/hibernate3.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/ibm-wsdl4= j/lib/wsdl4j.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jackrabbi= t/lib/jackrabbit-core.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jakarta-c= actus/lib/cactus.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jakarta-i= o/lib/commons-io.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/javassist= /lib/javassist.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jboss-por= tal/modules/common/lib/portal-common-lib.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jboss-por= tal/modules/common/lib/portal-common-portal-lib.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jboss-por= tal/modules/portlet/lib/portal-portlet-bridge-lib.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jboss-por= tal/modules/portlet/lib/portal-portlet-federation-lib.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jboss-por= tal/modules/portlet/lib/portal-portlet-jsr168api-lib.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jboss-por= tal/modules/portlet/lib/portal-portlet-lib.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jboss-por= tal/modules/test/lib/portal-test-jboss-lib.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jboss-por= tal/modules/test/lib/portal-test-lib.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jboss-por= tal/modules/web/lib/portal-web-lib.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jboss/aop= /lib/jboss-aop.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jboss/bac= kport-concurrent/lib/jboss-backport-concurrent.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jboss/cac= he/lib/jboss-cache.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jboss/jbo= ssxb/lib/jboss-xml-binding.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jboss/mic= rocontainer/lib/jboss-container.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jboss/mic= rocontainer/lib/jboss-dependency.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jboss/mic= rocontainer/lib/jboss-microcontainer.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jboss-aspect-library.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jboss-common-client.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jboss-common-jdbc-wrapper.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jboss-common.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jboss-hibernate.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jboss-j2ee.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jboss-jaxrpc.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jboss-jca.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jboss-jmx.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jboss-local-jdbc.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jboss-saaj.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jboss-system.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jboss-transaction.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jboss-xml-binding.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jboss.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jbossha.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jbosssx.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jmx-invoker-adaptor-client.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jnp-client.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jnpserver.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/namespace.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbpm/jaro= nly/lib/jbpm-identity.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbpm/jaro= nly/lib/jbpm.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jcr/lib/j= cr-1.0.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jgroups/l= ib/jgroups.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/junit/lib= /junit.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jwebunit/= lib/jwebunit-1.2.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/oswego-co= ncurrent/lib/concurrent.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/slf4j/lib= /slf4j-log4j12.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/sun-jaf/l= ib/activation.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/sun-javam= ail/lib/mail.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/sun-opend= s/lib/OpenDS.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/sun-servl= et/lib/jsp-api.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/sun-servl= et/lib/servlet-api.jar!/ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/apache-co= llections/lib/commons-collections.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/apache-fi= leupload/lib/commons-fileupload.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/apache-ht= tpclient/lib/commons-httpclient.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/apache-lo= g4j/lib/log4j.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/apache-lo= gging/lib/commons-logging.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/apache-lu= cene/lib/lucene.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/apache-my= faces/lib/myfaces-api.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/beanshell= /lib/bsh-1.3.0.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/dbunit/li= b/dbunit.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/dom4j/lib= /dom4j.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/el/lib/el= -api.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/facelets/= lib/jsf-facelets.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/freemarke= r/lib/freemarker.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/hibernate= /lib/hibernate3.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/ibm-wsdl4= j/lib/wsdl4j.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jackrabbi= t/lib/jackrabbit-core.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jakarta-c= actus/lib/cactus.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jakarta-i= o/lib/commons-io.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/javassist= /lib/javassist.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jboss-por= tal/modules/common/lib/portal-common-lib.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jboss-por= tal/modules/common/lib/portal-common-portal-lib.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jboss-por= tal/modules/portlet/lib/portal-portlet-bridge-lib.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jboss-por= tal/modules/portlet/lib/portal-portlet-federation-lib.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jboss-por= tal/modules/portlet/lib/portal-portlet-jsr168api-lib.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jboss-por= tal/modules/portlet/lib/portal-portlet-lib.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jboss-por= tal/modules/test/lib/portal-test-jboss-lib.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jboss-por= tal/modules/test/lib/portal-test-lib.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jboss-por= tal/modules/web/lib/portal-web-lib.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jboss/aop= /lib/jboss-aop.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jboss/bac= kport-concurrent/lib/jboss-backport-concurrent.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jboss/cac= he/lib/jboss-cache.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jboss/jbo= ssxb/lib/jboss-xml-binding.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jboss/mic= rocontainer/lib/jboss-container.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jboss/mic= rocontainer/lib/jboss-dependency.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jboss/mic= rocontainer/lib/jboss-microcontainer.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jboss-aspect-library.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jboss-common-client.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jboss-common-jdbc-wrapper.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jboss-common.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jboss-hibernate.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jboss-j2ee.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jboss-jaxrpc.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jboss-jca.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jboss-jmx.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jboss-local-jdbc.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jboss-saaj.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jboss-system.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jboss-transaction.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jboss-xml-binding.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jboss.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jbossha.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jbosssx.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jmx-invoker-adaptor-client.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jnp-client.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jnpserver.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/namespace.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbpm/jaro= nly/lib/jbpm-identity.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbpm/jaro= nly/lib/jbpm.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jcr/lib/j= cr-1.0.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jgroups/l= ib/jgroups.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/junit/lib= /junit.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jwebunit/= lib/jwebunit-1.2.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/oswego-co= ncurrent/lib/concurrent.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/slf4j/lib= /slf4j-log4j12.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/sun-jaf/l= ib/activation.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/sun-javam= ail/lib/mail.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/sun-opend= s/lib/OpenDS.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/sun-servl= et/lib/jsp-api.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/sun-servl= et/lib/servlet-api.jar!/ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/apache-co= llections/lib/commons-collections.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/apache-fi= leupload/lib/commons-fileupload.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/apache-ht= tpclient/lib/commons-httpclient.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/apache-lo= g4j/lib/log4j.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/apache-lo= gging/lib/commons-logging.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/apache-lu= cene/lib/lucene.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/apache-my= faces/lib/myfaces-api.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/beanshell= /lib/bsh-1.3.0.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/dbunit/li= b/dbunit.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/dom4j/lib= /dom4j.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/el/lib/el= -api.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/facelets/= lib/jsf-facelets.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/freemarke= r/lib/freemarker.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/hibernate= /lib/hibernate3.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/ibm-wsdl4= j/lib/wsdl4j.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jackrabbi= t/lib/jackrabbit-core.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jakarta-c= actus/lib/cactus.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jakarta-i= o/lib/commons-io.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/javassist= /lib/javassist.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jboss-por= tal/modules/common/lib/portal-common-lib.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jboss-por= tal/modules/common/lib/portal-common-portal-lib.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jboss-por= tal/modules/portlet/lib/portal-portlet-bridge-lib.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jboss-por= tal/modules/portlet/lib/portal-portlet-federation-lib.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jboss-por= tal/modules/portlet/lib/portal-portlet-jsr168api-lib.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jboss-por= tal/modules/portlet/lib/portal-portlet-lib.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jboss-por= tal/modules/test/lib/portal-test-jboss-lib.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jboss-por= tal/modules/test/lib/portal-test-lib.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jboss-por= tal/modules/web/lib/portal-web-lib.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jboss/aop= /lib/jboss-aop.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jboss/bac= kport-concurrent/lib/jboss-backport-concurrent.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jboss/cac= he/lib/jboss-cache.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jboss/jbo= ssxb/lib/jboss-xml-binding.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jboss/mic= rocontainer/lib/jboss-container.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jboss/mic= rocontainer/lib/jboss-dependency.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jboss/mic= rocontainer/lib/jboss-microcontainer.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jboss-aspect-library.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jboss-common-client.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jboss-common-jdbc-wrapper.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jboss-common.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jboss-hibernate.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jboss-j2ee.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jboss-jaxrpc.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jboss-jca.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jboss-jmx.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jboss-local-jdbc.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jboss-saaj.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jboss-system.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jboss-transaction.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jboss-xml-binding.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jboss.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jbossha.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jbosssx.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jmx-invoker-adaptor-client.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jnp-client.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jnpserver.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/namespace.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbpm/jaro= nly/lib/jbpm-identity.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbpm/jaro= nly/lib/jbpm.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jcr/lib/j= cr-1.0.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jgroups/l= ib/jgroups.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/junit/lib= /junit.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jwebunit/= lib/jwebunit-1.2.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/oswego-co= ncurrent/lib/concurrent.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/slf4j/lib= /slf4j-log4j12.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/sun-jaf/l= ib/activation.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/sun-javam= ail/lib/mail.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/sun-opend= s/lib/OpenDS.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/sun-servl= et/lib/jsp-api.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/sun-servl= et/lib/servlet-api.jar!/ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/apache-co= llections/lib/commons-collections.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/apache-fi= leupload/lib/commons-fileupload.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/apache-ht= tpclient/lib/commons-httpclient.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/apache-lo= g4j/lib/log4j.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/apache-lo= gging/lib/commons-logging.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/apache-lu= cene/lib/lucene.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/apache-my= faces/lib/myfaces-api.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/beanshell= /lib/bsh-1.3.0.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/dbunit/li= b/dbunit.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/dom4j/lib= /dom4j.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/el/lib/el= -api.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/facelets/= lib/jsf-facelets.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/freemarke= r/lib/freemarker.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/hibernate= /lib/hibernate3.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/ibm-wsdl4= j/lib/wsdl4j.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jackrabbi= t/lib/jackrabbit-core.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jakarta-c= actus/lib/cactus.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jakarta-i= o/lib/commons-io.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/javassist= /lib/javassist.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jboss-por= tal/modules/common/lib/portal-common-lib.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jboss-por= tal/modules/common/lib/portal-common-portal-lib.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jboss-por= tal/modules/portlet/lib/portal-portlet-bridge-lib.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jboss-por= tal/modules/portlet/lib/portal-portlet-federation-lib.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jboss-por= tal/modules/portlet/lib/portal-portlet-jsr168api-lib.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jboss-por= tal/modules/portlet/lib/portal-portlet-lib.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jboss-por= tal/modules/test/lib/portal-test-jboss-lib.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jboss-por= tal/modules/test/lib/portal-test-lib.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jboss-por= tal/modules/web/lib/portal-web-lib.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jboss/aop= /lib/jboss-aop.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jboss/bac= kport-concurrent/lib/jboss-backport-concurrent.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jboss/cac= he/lib/jboss-cache.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jboss/jbo= ssxb/lib/jboss-xml-binding.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jboss/mic= rocontainer/lib/jboss-container.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jboss/mic= rocontainer/lib/jboss-dependency.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jboss/mic= rocontainer/lib/jboss-microcontainer.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jboss-aspect-library.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jboss-common-client.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jboss-common-jdbc-wrapper.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jboss-common.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jboss-hibernate.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jboss-j2ee.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jboss-jaxrpc.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jboss-jca.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jboss-jmx.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jboss-local-jdbc.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jboss-saaj.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jboss-system.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jboss-transaction.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jboss-xml-binding.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jboss.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jbossha.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jbosssx.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jmx-invoker-adaptor-client.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jnp-client.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/jnpserver.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbossas/c= ore-libs/lib/namespace.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbpm/jaro= nly/lib/jbpm-identity.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jbpm/jaro= nly/lib/jbpm.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jcr/lib/j= cr-1.0.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jgroups/l= ib/jgroups.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/junit/lib= /junit.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/jwebunit/= lib/jwebunit-1.2.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/oswego-co= ncurrent/lib/concurrent.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/slf4j/lib= /slf4j-log4j12.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/sun-jaf/l= ib/activation.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/sun-javam= ail/lib/mail.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/sun-opend= s/lib/OpenDS.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/sun-servl= et/lib/jsp-api.jar!/ + + + + + jar://$MODULE_DIR$/../../../../../../thirdparty/sun-servl= et/lib/servlet-api.jar!/ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Added: branches/JBoss_Portal_Branch_2_6/build/ide/intellij/idea70/readme.txt =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/build/ide/intellij/idea70/readme.txt = (rev 0) +++ branches/JBoss_Portal_Branch_2_6/build/ide/intellij/idea70/readme.txt 2= 007-10-31 00:01:15 UTC (rev 8804) @@ -0,0 +1,10 @@ +- Main project file and modules: +Copy jboss-portal.ipr to the root of the Portal source directory. You migh= t need to change the JDK to use but +it should otherwise work out the box. Alternatively, you can create a new = project file at the root of your Portal +installation and import the module files (*.iml) found in the modules dire= ctory manually. + +- Codestyles and headers: = +The config directory contains standard settings for the JBoss Portal proje= ct regarding headers and code style. If +you intend to commit code to JBoss Portal, you need to update your IDEA in= stallation to use these files. Please +refer to the IDEA manual on how to precisely do it, the short version bein= g that you can replace the files found +in your IDEA preference directory by the ones found in the config director= y. Property changes on: branches/JBoss_Portal_Branch_2_6/build/ide/intellij/id= ea70/readme.txt ___________________________________________________________________ Name: svn:executable + * Name: svn:eol-style + native --===============7460853000847316445==-- From portal-commits at lists.jboss.org Tue Oct 30 20:05:17 2007 Content-Type: multipart/mixed; boundary="===============8205178277169842840==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8805 - branches/JBoss_Portal_Branch_2_6/core-management/src/main/org/jboss/portal/core/management. Date: Tue, 30 Oct 2007 20:05:16 -0400 Message-ID: --===============8205178277169842840== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: chris.laprun(a)jboss.com Date: 2007-10-30 20:05:16 -0400 (Tue, 30 Oct 2007) New Revision: 8805 Modified: branches/JBoss_Portal_Branch_2_6/core-management/src/main/org/jboss/port= al/core/management/PortalImpl.java Log: - Minor. Modified: branches/JBoss_Portal_Branch_2_6/core-management/src/main/org/jbo= ss/portal/core/management/PortalImpl.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/core-management/src/main/org/jboss/por= tal/core/management/PortalImpl.java 2007-10-31 00:01:15 UTC (rev 8804) +++ branches/JBoss_Portal_Branch_2_6/core-management/src/main/org/jboss/por= tal/core/management/PortalImpl.java 2007-10-31 00:05:16 UTC (rev 8805) @@ -26,11 +26,6 @@ import org.jboss.portal.jems.as.system.AbstractJBossService; = import javax.naming.InitialContext; -import javax.transaction.HeuristicMixedException; -import javax.transaction.HeuristicRollbackException; -import javax.transaction.NotSupportedException; -import javax.transaction.RollbackException; -import javax.transaction.SystemException; import javax.transaction.UserTransaction; = /** --===============8205178277169842840==-- From portal-commits at lists.jboss.org Wed Oct 31 05:08:46 2007 Content-Type: multipart/mixed; boundary="===============7530324517997464392==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8806 - in branches/JBoss_Portal_Branch_2_6: core-admin/src/resources/portal-admin-war/WEB-INF and 5 other directories. Date: Wed, 31 Oct 2007 05:08:46 -0400 Message-ID: --===============7530324517997464392== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: thomas.heute(a)jboss.com Date: 2007-10-31 05:08:45 -0400 (Wed, 31 Oct 2007) New Revision: 8806 Modified: branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-admin-w= ar/WEB-INF/portlet-instances.xml branches/JBoss_Portal_Branch_2_6/core-samples/src/resources/portal-jsp-s= amples-war/WEB-INF/portlet-instances.xml branches/JBoss_Portal_Branch_2_6/core-samples/src/resources/portal-news-= samples-war/WEB-INF/portlet-instances.xml branches/JBoss_Portal_Branch_2_6/core-samples/src/resources/portal-users= -samples-war/WEB-INF/portlet-instances.xml branches/JBoss_Portal_Branch_2_6/core-samples/src/resources/portal-weath= er-samples-war/WEB-INF/portlet-instances.xml branches/JBoss_Portal_Branch_2_6/core-wsrp/src/resources/portal-wsrp-adm= in-war/WEB-INF/portlet-instances.xml branches/JBoss_Portal_Branch_2_6/core/src/resources/portal-core-war/WEB-= INF/portlet-instances.xml Log: Localize portlet instances names in French and English Modified: branches/JBoss_Portal_Branch_2_6/core/src/resources/portal-core-w= ar/WEB-INF/portlet-instances.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/core/src/resources/portal-core-war/WEB= -INF/portlet-instances.xml 2007-10-31 00:05:16 UTC (rev 8805) +++ branches/JBoss_Portal_Branch_2_6/core/src/resources/portal-core-war/WEB= -INF/portlet-instances.xml 2007-10-31 09:08:45 UTC (rev 8806) @@ -29,18 +29,24 @@ + User portlet + Portlet utilisateur UserPortletInstance UserPortlet + Role portlet + Portlet role RolePortletInstance RolePortlet + Catalog portlet + Portlet catalogue CatalogPortletInstance CatalogPortlet Modified: branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-= admin-war/WEB-INF/portlet-instances.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-admin-= war/WEB-INF/portlet-instances.xml 2007-10-31 00:05:16 UTC (rev 8805) +++ branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-admin-= war/WEB-INF/portlet-instances.xml 2007-10-31 09:08:45 UTC (rev 8806) @@ -29,6 +29,8 @@ + Administration portlet + Portlet d'administration AdminPortletInstance AdminPortlet Modified: branches/JBoss_Portal_Branch_2_6/core-samples/src/resources/porta= l-jsp-samples-war/WEB-INF/portlet-instances.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/core-samples/src/resources/portal-jsp-= samples-war/WEB-INF/portlet-instances.xml 2007-10-31 00:05:16 UTC (rev 8805) +++ branches/JBoss_Portal_Branch_2_6/core-samples/src/resources/portal-jsp-= samples-war/WEB-INF/portlet-instances.xml 2007-10-31 09:08:45 UTC (rev 8806) @@ -29,6 +29,8 @@ + Welcome portlet + Portlet de bienvenue JSPPortletInstance JSPPortlet Modified: branches/JBoss_Portal_Branch_2_6/core-samples/src/resources/porta= l-news-samples-war/WEB-INF/portlet-instances.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/core-samples/src/resources/portal-news= -samples-war/WEB-INF/portlet-instances.xml 2007-10-31 00:05:16 UTC (rev 880= 5) +++ branches/JBoss_Portal_Branch_2_6/core-samples/src/resources/portal-news= -samples-war/WEB-INF/portlet-instances.xml 2007-10-31 09:08:45 UTC (rev 880= 6) @@ -29,6 +29,8 @@ + RSS portlet JBoss Portal + Portlet RSS de JBoss Portal NewsPortletInstance NewsPortlet @@ -36,6 +38,8 @@ overwrite + RSS portlet Yahoo finance RHT + Portlet RSS de Yahoo Finance RHT NewsPortletInstance2 NewsPortlet Modified: branches/JBoss_Portal_Branch_2_6/core-samples/src/resources/porta= l-users-samples-war/WEB-INF/portlet-instances.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/core-samples/src/resources/portal-user= s-samples-war/WEB-INF/portlet-instances.xml 2007-10-31 00:05:16 UTC (rev 88= 05) +++ branches/JBoss_Portal_Branch_2_6/core-samples/src/resources/portal-user= s-samples-war/WEB-INF/portlet-instances.xml 2007-10-31 09:08:45 UTC (rev 88= 06) @@ -29,6 +29,7 @@ + Who's online portlet CurrentUsersPortletInstance CurrentUsersPortlet Modified: branches/JBoss_Portal_Branch_2_6/core-samples/src/resources/porta= l-weather-samples-war/WEB-INF/portlet-instances.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/core-samples/src/resources/portal-weat= her-samples-war/WEB-INF/portlet-instances.xml 2007-10-31 00:05:16 UTC (rev = 8805) +++ branches/JBoss_Portal_Branch_2_6/core-samples/src/resources/portal-weat= her-samples-war/WEB-INF/portlet-instances.xml 2007-10-31 09:08:45 UTC (rev = 8806) @@ -29,6 +29,8 @@ + Weather portlet + Portlet m=C3=A9t=C3=A9o WeatherPortletInstance WeatherPortlet Modified: branches/JBoss_Portal_Branch_2_6/core-wsrp/src/resources/portal-w= srp-admin-war/WEB-INF/portlet-instances.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/core-wsrp/src/resources/portal-wsrp-ad= min-war/WEB-INF/portlet-instances.xml 2007-10-31 00:05:16 UTC (rev 8805) +++ branches/JBoss_Portal_Branch_2_6/core-wsrp/src/resources/portal-wsrp-ad= min-war/WEB-INF/portlet-instances.xml 2007-10-31 09:08:45 UTC (rev 8806) @@ -25,6 +25,8 @@ + WSRP admin portlet + Portlet d'administration WSRP WSRPConfigurationPortletInstance WSRPConfigurationPortlet --===============7530324517997464392==-- From portal-commits at lists.jboss.org Wed Oct 31 08:29:23 2007 Content-Type: multipart/mixed; boundary="===============5484893081476959031==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8807 - branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/core/identity/service and 1 other directories. Date: Wed, 31 Oct 2007 08:29:22 -0400 Message-ID: --===============5484893081476959031== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: thomas.heute(a)jboss.com Date: 2007-10-31 08:29:22 -0400 (Wed, 31 Oct 2007) New Revision: 8807 Modified: branches/JBoss_Portal_Branch_2_6/build/build-thirdparty.xml branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/core/ide= ntity/service/IdentityServiceControllerImpl.java modules/identity/trunk/identity/src/main/org/jboss/portal/identity/boot/= IdentityServiceLoader.java Log: JBPORTAL-1730: unregister Service mbean before registering if necessary Modified: branches/JBoss_Portal_Branch_2_6/build/build-thirdparty.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/build/build-thirdparty.xml 2007-10-31 = 09:08:45 UTC (rev 8806) +++ branches/JBoss_Portal_Branch_2_6/build/build-thirdparty.xml 2007-10-31 = 12:29:22 UTC (rev 8807) @@ -47,11 +47,11 @@ are pushed to the http://repository.jboss.com site. --> = - + - + Modified: branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/c= ore/identity/service/IdentityServiceControllerImpl.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/core/id= entity/service/IdentityServiceControllerImpl.java 2007-10-31 09:08:45 UTC (= rev 8806) +++ branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/core/id= entity/service/IdentityServiceControllerImpl.java 2007-10-31 12:29:22 UTC (= rev 8807) @@ -134,6 +134,14 @@ getServer().registerMBean(mbean, new ObjectName(serviceName= )); } = + protected void unregisterMBean(String serviceName) throws Exce= ption + { + ObjectName on =3D new ObjectName(serviceName); + if (getServer().isRegistered(on)) + { + getServer().unregisterMBean(on); + } + } = protected ServiceJNDIBinder getServiceJNDIBinder() throws Exce= ption { Modified: modules/identity/trunk/identity/src/main/org/jboss/portal/identit= y/boot/IdentityServiceLoader.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/identity/trunk/identity/src/main/org/jboss/portal/identity/boot= /IdentityServiceLoader.java 2007-10-31 09:08:45 UTC (rev 8806) +++ modules/identity/trunk/identity/src/main/org/jboss/portal/identity/boot= /IdentityServiceLoader.java 2007-10-31 12:29:22 UTC (rev 8807) @@ -97,12 +97,9 @@ //register as an mbean if (isRegisterMBeans() && (ds.getServiceName() !=3D null)) { - + unregisterMBean(ds.getServiceName()); registerMBean(ds.getServiceName(), datasource); - } - - } } = @@ -149,11 +146,10 @@ //register as an mbean if (isRegisterMBeans() && (module.getServiceName() !=3D null)) { + unregisterMBean(module.getServiceName()); registerMBean(module.getServiceName(), moduleServiceObject); - } } - } = /** @@ -167,6 +163,16 @@ } = /** + * Should be extended to provide mbean registration + * @param serviceName + * @param serviceObject + */ + protected void unregisterMBean(String serviceName) throws Exception + { + //does nothing + } + + /** * Should be extended to provide JNDI binder * @return */ --===============5484893081476959031==-- From portal-commits at lists.jboss.org Wed Oct 31 18:52:11 2007 Content-Type: multipart/mixed; boundary="===============0591613024172199675==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8808 - in branches/JBoss_Portal_Branch_2_6/wsrp: src/main/org/jboss/portal/test/wsrp and 6 other directories. Date: Wed, 31 Oct 2007 18:52:11 -0400 Message-ID: --===============0591613024172199675== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: chris.laprun(a)jboss.com Date: 2007-10-31 18:52:11 -0400 (Wed, 31 Oct 2007) New Revision: 8808 Modified: branches/JBoss_Portal_Branch_2_6/wsrp/build.xml branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/test/wsr= p/WSRPProducerBaseTest.java branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/test/wsr= p/v1/producer/PortletManagementTestCase.java branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/test/wsr= p/v1/producer/RegistrationTestCase.java branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/test/wsr= p/v1/producer/V1ProducerBaseTest.java branches/JBoss_Portal_Branch_2_6/wsrp/src/resources/tests/test-wsrp-prod= ucer-markup-sar/META-INF/jboss-service.xml branches/JBoss_Portal_Branch_2_6/wsrp/src/resources/tests/test-wsrp-prod= ucer-portletmanagement-sar/META-INF/jboss-service.xml branches/JBoss_Portal_Branch_2_6/wsrp/src/resources/tests/test-wsrp-prod= ucer-registration-sar/META-INF/jboss-service.xml branches/JBoss_Portal_Branch_2_6/wsrp/src/resources/tests/test-wsrp-prod= ucer-sar/META-INF/jboss-service.xml branches/JBoss_Portal_Branch_2_6/wsrp/src/resources/tests/test-wsrp-prod= ucer-servicedescription-sar/META-INF/jboss-service.xml Log: - Fixed tests to use non-unmarshalled versions of exceptions (this addresse= s JBPORTAL-1712). - Removed need to set ServiceFactory for the tests. - Make tests use WSDL, this could be used to check our expectations against= other producers. Modified: branches/JBoss_Portal_Branch_2_6/wsrp/build.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/wsrp/build.xml 2007-10-31 12:29:22 UTC= (rev 8807) +++ branches/JBoss_Portal_Branch_2_6/wsrp/build.xml 2007-10-31 22:52:11 UTC= (rev 8808) @@ -382,8 +382,8 @@ = - - = + + = Modified: branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/t= est/wsrp/WSRPProducerBaseTest.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/test/ws= rp/WSRPProducerBaseTest.java 2007-10-31 12:29:22 UTC (rev 8807) +++ branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/test/ws= rp/WSRPProducerBaseTest.java 2007-10-31 22:52:11 UTC (rev 8808) @@ -25,6 +25,7 @@ = import org.jboss.portal.wsrp.WSRPProducer; import org.jboss.portal.wsrp.services.ServiceFactory; +import org.jboss.portal.wsrp.services.RemoteSOAPInvokerServiceFactory; = /** * @author Boleslaw Daw= idowicz @@ -36,8 +37,8 @@ /** . */ protected WSRPProducer producer; = - /** . */ - protected ServiceFactory serviceFactory; + private ServiceFactory serviceFactory; + private String wsdlURL; = protected WSRPProducerBaseTest(String name) throws Exception { @@ -56,11 +57,29 @@ = public ServiceFactory getServiceFactory() { + if (serviceFactory =3D=3D null) + { + serviceFactory =3D new RemoteSOAPInvokerServiceFactory(); + try + { + ((RemoteSOAPInvokerServiceFactory)serviceFactory).setWsdlDefin= itionURL(wsdlURL); + } + catch (Exception e) + { + throw new RuntimeException("Couldn't retrieve WSDL definition!= ", e); + } + } + return serviceFactory; } = - public void setServiceFactory(ServiceFactory serviceFactory) + public String getWsdlURL() { - this.serviceFactory =3D serviceFactory; + return wsdlURL; } + + public void setWsdlURL(String wsdlURL) + { + this.wsdlURL =3D wsdlURL; + } } Modified: branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/t= est/wsrp/v1/producer/PortletManagementTestCase.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/test/ws= rp/v1/producer/PortletManagementTestCase.java 2007-10-31 12:29:22 UTC (rev = 8807) +++ branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/test/ws= rp/v1/producer/PortletManagementTestCase.java 2007-10-31 22:52:11 UTC (rev = 8808) @@ -26,6 +26,7 @@ import org.jboss.portal.common.junit.ExtendedAssert; import org.jboss.portal.wsrp.WSRPConstants; import org.jboss.portal.wsrp.WSRPTypeFactory; +import org.jboss.portal.wsrp.WSRPExceptionFactory; import org.jboss.portal.wsrp.core.ClonePortlet; import org.jboss.portal.wsrp.core.DestroyFailed; import org.jboss.portal.wsrp.core.DestroyPortlets; @@ -46,6 +47,7 @@ = import javax.xml.soap.SOAPElement; import java.util.Arrays; +import java.rmi.RemoteException; = /** * @author Chris Laprun @@ -197,9 +199,15 @@ response =3D portletManagementService.setPortletProperties(setPor= tletProperties); ExtendedAssert.fail("Setting properties on Producer-Offered Portl= et should fail..."); } - catch (InconsistentParametersFault expected) + catch (RemoteException e) { + //expected + checkException(e, WSRPExceptionFactory.INCONSISTENT_PARAMETERS); } + // reactivate check for exception once tests go through WS stack see= : JBPORTAL-1712 + // catch (InconsistentParametersFault expected) + { + } } = private Property[] checkGetPropertiesResponse(PropertyList response, Pr= operty[] expected) Modified: branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/t= est/wsrp/v1/producer/RegistrationTestCase.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/test/ws= rp/v1/producer/RegistrationTestCase.java 2007-10-31 12:29:22 UTC (rev 8807) +++ branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/test/ws= rp/v1/producer/RegistrationTestCase.java 2007-10-31 22:52:11 UTC (rev 8808) @@ -84,11 +84,18 @@ registrationService.register(regData); ExtendedAssert.fail("Trying to register with an invalid consumer = agent String should fail."); } - catch (OperationFailedFault operationFailedFault) + catch (RemoteException e) { // expected + checkException(e, WSRPExceptionFactory.OPERATION_FAILED); } + // reactivate check for exception once tests go through WS stack see= : JBPORTAL-1712 + // catch (OperationFailedFault operationFailedFault) + { + // expected + } = + regData.setConsumerAgent(WSRPConstants.CONSUMER_AGENT); registrationService.register(regData); } Modified: branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/t= est/wsrp/v1/producer/V1ProducerBaseTest.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/test/ws= rp/v1/producer/V1ProducerBaseTest.java 2007-10-31 12:29:22 UTC (rev 8807) +++ branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/test/ws= rp/v1/producer/V1ProducerBaseTest.java 2007-10-31 22:52:11 UTC (rev 8808) @@ -79,15 +79,19 @@ { super.setUp(); = - // - serviceDescriptionService =3D (WSRP_v1_ServiceDescription_PortType)s= erviceFactory.getService(WSRP_v1_ServiceDescription_PortType.class); - markupService =3D (WSRP_v1_Markup_PortType)serviceFactory.getService= (WSRP_v1_Markup_PortType.class); - registrationService =3D (WSRP_v1_Registration_PortType)serviceFactor= y.getService(WSRP_v1_Registration_PortType.class); - portletManagementService =3D (WSRP_v1_PortletManagement_PortType)ser= viceFactory.getService(WSRP_v1_PortletManagement_PortType.class); + serviceDescriptionService =3D getService(WSRP_v1_ServiceDescription_= PortType.class); + markupService =3D getService(WSRP_v1_Markup_PortType.class); + registrationService =3D getService(WSRP_v1_Registration_PortType.cla= ss); + portletManagementService =3D getService(WSRP_v1_PortletManagement_Po= rtType.class); = resetRegistrationInfo(); } = + private T getService(Class serviceClass) throws Exception + { + return (T)getServiceFactory().getService(serviceClass); + } + public void tearDown() throws Exception { resetRegistrationInfo(); Modified: branches/JBoss_Portal_Branch_2_6/wsrp/src/resources/tests/test-ws= rp-producer-markup-sar/META-INF/jboss-service.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/wsrp/src/resources/tests/test-wsrp-pro= ducer-markup-sar/META-INF/jboss-service.xml 2007-10-31 12:29:22 UTC (rev 88= 07) +++ branches/JBoss_Portal_Branch_2_6/wsrp/src/resources/tests/test-wsrp-pro= ducer-markup-sar/META-INF/jboss-service.xml 2007-10-31 22:52:11 UTC (rev 88= 08) @@ -29,10 +29,9 @@ xmbean-dd=3D"" xmbean-code=3D"org.jboss.portal.jems.as.system.JBossServiceModelMBea= n"> + http://localhost:8080/test-wsrp-producer= /MarkupService?wsdl portal.test:service=3DTestDriverSe= rver - portal.wsrp:service=3DCachingServi= ceFactory portal.wsrp:service=3DWSRPProducer + http://localhost:8080/test-wsrp-producer= /MarkupService?wsdl portal.test:service=3DTestDriverSe= rver - portal.wsrp:service=3DCachingServi= ceFactory portal.wsrp:service=3DWSRPProducer Modified: branches/JBoss_Portal_Branch_2_6/wsrp/src/resources/tests/test-ws= rp-producer-portletmanagement-sar/META-INF/jboss-service.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/wsrp/src/resources/tests/test-wsrp-pro= ducer-portletmanagement-sar/META-INF/jboss-service.xml 2007-10-31 12:29:22 = UTC (rev 8807) +++ branches/JBoss_Portal_Branch_2_6/wsrp/src/resources/tests/test-wsrp-pro= ducer-portletmanagement-sar/META-INF/jboss-service.xml 2007-10-31 22:52:11 = UTC (rev 8808) @@ -29,10 +29,9 @@ xmbean-dd=3D"" xmbean-code=3D"org.jboss.portal.jems.as.system.JBossServiceModelMBea= n"> + http://localhost:8080/test-wsrp-producer= /MarkupService?wsdl portal.test:service=3DTestDriverSe= rver - portal.wsrp:service=3DCachingServi= ceFactory portal.wsrp:service=3DWSRPProducer Modified: branches/JBoss_Portal_Branch_2_6/wsrp/src/resources/tests/test-ws= rp-producer-registration-sar/META-INF/jboss-service.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/wsrp/src/resources/tests/test-wsrp-pro= ducer-registration-sar/META-INF/jboss-service.xml 2007-10-31 12:29:22 UTC (= rev 8807) +++ branches/JBoss_Portal_Branch_2_6/wsrp/src/resources/tests/test-wsrp-pro= ducer-registration-sar/META-INF/jboss-service.xml 2007-10-31 22:52:11 UTC (= rev 8808) @@ -29,10 +29,9 @@ xmbean-dd=3D"" xmbean-code=3D"org.jboss.portal.jems.as.system.JBossServiceModelMBea= n"> + http://localhost:8080/test-wsrp-producer= /MarkupService?wsdl portal.test:service=3DTestDriverSe= rver - portal.wsrp:service=3DCachingServi= ceFactory portal.wsrp:service=3DWSRPProducer Modified: branches/JBoss_Portal_Branch_2_6/wsrp/src/resources/tests/test-ws= rp-producer-sar/META-INF/jboss-service.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/wsrp/src/resources/tests/test-wsrp-pro= ducer-sar/META-INF/jboss-service.xml 2007-10-31 12:29:22 UTC (rev 8807) +++ branches/JBoss_Portal_Branch_2_6/wsrp/src/resources/tests/test-wsrp-pro= ducer-sar/META-INF/jboss-service.xml 2007-10-31 22:52:11 UTC (rev 8808) @@ -31,9 +31,7 @@ xmbean-dd=3D"" xmbean-code=3D"org.jboss.portal.jems.as.system.JBossServiceModelMBea= n"> - portal.test:service=3DAgent + = portal.test:service=3DAgent = @@ -53,14 +51,11 @@ xmbean-code=3D"org.jboss.portal.jems.as.system.JBossServiceModelMBea= n"> portal:deployer=3DPortalWebApp + optional-attribute-name=3D"Deployer" proxy-type=3D"attribute">por= tal:deployer=3DPortalWebApp portal:service=3DWebAppRegistry + optional-attribute-name=3D"WebAppRegistry" proxy-type=3D"attribut= e">portal:service=3DWebAppRegistry portal:service=3DServerConfig + optional-attribute-name=3D"Config" proxy-type=3D"attribute">porta= l:service=3DServerConfig = @@ -142,11 +137,9 @@ optional-attribute-name=3D"PortletInvoker" proxy-type=3D"attribute">portal:service=3DPortletInvoker,type=3DC= ontainer portal:service=3DPersistenceManager,type= =3DProducer + optional-attribute-name=3D"PersistenceManager" proxy-type=3D"attr= ibute">portal:service=3DPersistenceManager,type=3DProducer portal:service=3DStateManagementPolicy,t= ype=3DProducer + optional-attribute-name=3D"StateManagementPolicy" proxy-type=3D"a= ttribute">portal:service=3DStateManagementPolicy,type=3DProducer portal:service=3DStateConverter,type=3DP= roducer @@ -215,40 +208,4 @@ xmbean-code=3D"org.jboss.portal.jems.as.system.JBossServiceModelMBea= n"> - - - - - http://localhost:8080/test-wsrp-pr= oducer/ServiceDescriptionService - http://localhost:8080/test-wsrp-produc= er/MarkupService - http://localhost:8080/test-wsrp-= producer/RegistrationService - http://localhost:8080/test-wsrp-pro= ducer/PortletManagementService - - java.naming.factory.initial=3Dorg.jnp.interfaces.NamingContextFac= tory - java.naming.provider.url=3Djnp://localhost:1099 - java.naming.factory.url.pkgs=3Dorg.jboss.naming.client - j2ee.clientName=3Dwsrp-client - - - org.jboss.portal.wsrp.core.WSRP_v1_ServiceDescription_PortType=3D= java:comp/env/service/ServiceDescriptionService - org.jboss.portal.wsrp.core.WSRP_v1_Markup_PortType=3Djava:comp/en= v/service/MarkupService - org.jboss.portal.wsrp.core.WSRP_v1_Registration_PortType=3Djava:c= omp/env/service/RegistrationService - org.jboss.portal.wsrp.core.WSRP_v1_PortletManagement_PortType=3Dj= ava:comp/env/service/PortletManagementService - - - - - portal.wsrp:service=3DServiceFactory - - Modified: branches/JBoss_Portal_Branch_2_6/wsrp/src/resources/tests/test-ws= rp-producer-servicedescription-sar/META-INF/jboss-service.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/wsrp/src/resources/tests/test-wsrp-pro= ducer-servicedescription-sar/META-INF/jboss-service.xml 2007-10-31 12:29:22= UTC (rev 8807) +++ branches/JBoss_Portal_Branch_2_6/wsrp/src/resources/tests/test-wsrp-pro= ducer-servicedescription-sar/META-INF/jboss-service.xml 2007-10-31 22:52:11= UTC (rev 8808) @@ -29,10 +29,9 @@ xmbean-dd=3D"" xmbean-code=3D"org.jboss.portal.jems.as.system.JBossServiceModelMBea= n"> + http://localhost:8080/test-wsrp-producer= /MarkupService?wsdl portal.test:service=3DTestDriverSe= rver - portal.wsrp:service=3DCachingServi= ceFactory portal.wsrp:service=3DWSRPProducer --===============0591613024172199675==-- From portal-commits at lists.jboss.org Wed Oct 31 19:53:29 2007 Content-Type: multipart/mixed; boundary="===============6422628642564499683==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8809 - modules/common/trunk/common/src/main/java/org/jboss/portal/common/net. Date: Wed, 31 Oct 2007 19:53:29 -0400 Message-ID: --===============6422628642564499683== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: chris.laprun(a)jboss.com Date: 2007-10-31 19:53:29 -0400 (Wed, 31 Oct 2007) New Revision: 8809 Modified: modules/common/trunk/common/src/main/java/org/jboss/portal/common/net/UR= LTools.java Log: - Added getInputStreamFor and internalGetInputStreamFor methods and retro-f= itted performGET to use internalGetInputStreamFor (needed to get an input s= tream for WSRP WSDL handling). - Versioning for @since tags? Modified: modules/common/trunk/common/src/main/java/org/jboss/portal/common= /net/URLTools.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/common/trunk/common/src/main/java/org/jboss/portal/common/net/U= RLTools.java 2007-10-31 22:52:11 UTC (rev 8808) +++ modules/common/trunk/common/src/main/java/org/jboss/portal/common/net/U= RLTools.java 2007-10-31 23:53:29 UTC (rev 8809) @@ -73,10 +73,70 @@ * @param soTimeoutMillis the socket connection timeout in millis * @param connTimeoutMillis the connection timeout in millis * @return the retrieved byte array - * @throws IllegalArgumentException if the URL is null or any time out = value is negative = + * @throws IllegalArgumentException if the URL is null or any time out = value is negative */ public static byte[] performGET(URL url, int soTimeoutMillis, int connT= imeoutMillis) throws IllegalArgumentException { + InputStream in =3D null; + try + { + in =3D internalGetInputStreamFor(url, soTimeoutMillis, connTimeou= tMillis); + return IOTools.getBytes(in); + } + catch (IOException e) + { + return null; + } + finally + { + IOTools.safeClose(in); + } + } + + /** + * Fetches content from URL as an InputStream. The timeout values must = not be negative integers, when it is equals to + * zero it means that it does not setup a timeout and use the default v= alues. + * + * @param url the URL the URL of the resource + * @param soTimeoutMillis the socket connection timeout in millis + * @param connTimeoutMillis the connection timeout in millis + * @return the buffered content for the URL + * @throws IllegalArgumentException if the URL is null or any time out = value is negative + * @since 1.1 + */ + public static InputStream getInputStreamFor(URL url, int soTimeoutMilli= s, int connTimeoutMillis) + { + // + InputStream in =3D null; + try + { + in =3D internalGetInputStreamFor(url, soTimeoutMillis, connTimeou= tMillis); + return in; + } + catch (SocketTimeoutException e) + { + return null; + } + catch (IOException e) + { + return null; + } + finally + { + IOTools.safeClose(in); + } + } + + /** + * @param url + * @param soTimeoutMillis + * @param connTimeoutMillis + * @return + * @throws IOException + * @since 1.1 + */ + private static InputStream internalGetInputStreamFor(URL url, int soTim= eoutMillis, int connTimeoutMillis) throws IOException + { if (url =3D=3D null) { throw new IllegalArgumentException(); @@ -105,26 +165,8 @@ conn.setConnectTimeout(soTimeoutMillis); conn.setReadTimeout(connTimeoutMillis); = - // - InputStream in =3D null; - try - { - conn.connect(); - in =3D new BufferedInputStream(conn.getInputStream()); - return IOTools.getBytes(in); - } - catch (SocketTimeoutException e) - { - return null; - } - catch (IOException e) - { - return null; - } - finally - { - IOTools.safeClose(in); - } + conn.connect(); + return new BufferedInputStream(conn.getInputStream()); } = /** @@ -257,14 +299,13 @@ } = /** - * to remove : an API should not try to accomodate the client for that= kind of situation, - * why not also something like forbidStringLengthToDivisib= leBy3 ? - + * to remove : an API should not try to accomodate the client for that= kind of situation, why not also something + * like forbidStringLengthToDivisibleBy3 ? + * * @param stringURL - * @param allowNull true if passing null wi= ll be ignored and just return - * false, false to throw a= n {@link IllegalArgumentException} is the - * given URL is null. - * + * @param allowNull true if passing null will= be ignored and just return + * false, false to throw an = {@link IllegalArgumentException} is the given + * URL is null. * @return * @since 2.4.2 */ --===============6422628642564499683==--