JBoss Portal SVN: r8627 - in modules/test/trunk/unit/src/main/org/jboss/unit: runner/impl and 4 other directories.
by portal-commits@lists.jboss.org
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/TestRunnerContextSupport.java
modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/composite/CompositeTestRunner.java
modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/generic/GenericTestRunner.java
modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/pojo/POJOTestRunner.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/TestRunnerContext.java
===================================================================
--- modules/test/trunk/unit/src/main/org/jboss/unit/runner/TestRunnerContext.java 2007-10-13 01:34:14 UTC (rev 8626)
+++ modules/test/trunk/unit/src/main/org/jboss/unit/runner/TestRunnerContext.java 2007-10-13 12:13:10 UTC (rev 8627)
@@ -33,6 +33,8 @@
Map<String,String> getProperties();
+ Map<String,String> getParameters();
+
TestFilter getFilter();
TestRunnerEventListener getEventListener();
Modified: modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/TestRunnerContextSupport.java
===================================================================
--- modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/TestRunnerContextSupport.java 2007-10-13 01:34:14 UTC (rev 8626)
+++ modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/TestRunnerContextSupport.java 2007-10-13 12:13:10 UTC (rev 8627)
@@ -40,6 +40,9 @@
private Map<String,String> properties;
/** . */
+ private Map<String,String> parameters;
+
+ /** . */
private TestFilter filter;
/** . */
@@ -48,17 +51,18 @@
public TestRunnerContextSupport(TestRunnerEventListener eventListener)
{
- this(new HashMap<String, String>(), NullFilter.getInstance(), eventListener);
+ this(new HashMap<String, String>(), new HashMap<String, String>(), NullFilter.getInstance(), eventListener);
}
public TestRunnerContextSupport()
{
- this(new HashMap<String, String>(), NullFilter.getInstance(), new TestRunnerEventBroadcaster());
+ this(new HashMap<String, String>(), new HashMap<String, String>(), NullFilter.getInstance(), new TestRunnerEventBroadcaster());
}
- public TestRunnerContextSupport(Map<String, String> properties, TestFilter filter, TestRunnerEventListener eventListener)
+ public TestRunnerContextSupport(Map<String, String> properties, Map<String, String> parameters, TestFilter filter, TestRunnerEventListener eventListener)
{
this.properties = properties;
+ this.parameters = parameters;
this.filter = filter;
this.eventListener = eventListener;
}
@@ -68,6 +72,11 @@
return properties;
}
+ public Map<String, String> getParameters()
+ {
+ return parameters;
+ }
+
public TestFilter getFilter()
{
return filter;
Modified: modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/composite/CompositeTestRunner.java
===================================================================
--- modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/composite/CompositeTestRunner.java 2007-10-13 01:34:14 UTC (rev 8626)
+++ modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/composite/CompositeTestRunner.java 2007-10-13 12:13:10 UTC (rev 8627)
@@ -55,7 +55,7 @@
// Setup intermediate event filtering
TestRunnerEventBroadcaster tmp = new TestRunnerEventBroadcaster();
tmp.addListener(new TestRunnerLifeCycleFilter(context.getEventListener()));
- TestRunnerContextSupport nestedContext = new TestRunnerContextSupport(context.getProperties(), context.getFilter(), tmp);
+ TestRunnerContextSupport nestedContext = new TestRunnerContextSupport(context.getProperties(), context.getParameters(), context.getFilter(), tmp);
for (TestRunner runner : runners)
{
Modified: modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/generic/GenericTestRunner.java
===================================================================
--- modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/generic/GenericTestRunner.java 2007-10-13 01:34:14 UTC (rev 8626)
+++ modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/generic/GenericTestRunner.java 2007-10-13 12:13:10 UTC (rev 8627)
@@ -61,7 +61,7 @@
// Setup intermediate event filtering
TestRunnerEventBroadcaster tmp = new TestRunnerEventBroadcaster();
tmp.addListener(new TestRunnerLifeCycleFilter(context.getEventListener()));
- TestRunnerContextSupport nestedContext = new TestRunnerContextSupport(context.getProperties(), context.getFilter(), tmp);
+ TestRunnerContextSupport nestedContext = new TestRunnerContextSupport(context.getProperties(), context.getParameters(), context.getFilter(), tmp);
//
try
Modified: modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/pojo/POJOTestRunner.java
===================================================================
--- modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/pojo/POJOTestRunner.java 2007-10-13 01:34:14 UTC (rev 8626)
+++ modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/pojo/POJOTestRunner.java 2007-10-13 12:13:10 UTC (rev 8627)
@@ -62,7 +62,7 @@
// Setup intermediate event filtering
TestRunnerEventBroadcaster tmp = new TestRunnerEventBroadcaster();
tmp.addListener(new TestRunnerLifeCycleFilter(context.getEventListener()));
- TestRunnerContextSupport nestedContext = new TestRunnerContextSupport(context.getProperties(), context.getFilter(), tmp);
+ TestRunnerContextSupport nestedContext = new TestRunnerContextSupport(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
===================================================================
--- 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 = new TestRunnerContextSupport(properties, mainFilter, broadcaster);
+ TestRunnerContextSupport runnerContext = new TestRunnerContextSupport(properties, new HashMap<String, String>(), mainFilter, broadcaster);
runner.run(runnerContext);
}
16 years, 11 months
JBoss Portal SVN: r8626 - in docs: branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules and 2 other directories.
by portal-commits@lists.jboss.org
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/errorhandling/errorHandlingUI.png
docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/errorhandling.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/errorhandling/errorHandlingUI.png
===================================================================
(Binary files differ)
Modified: docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/errorhandling.xml
===================================================================
--- docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/errorhandling.xml 2007-10-13 00:08:20 UTC (rev 8625)
+++ docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/errorhandling.xml 2007-10-13 01:34:14 UTC (rev 8626)
@@ -8,18 +8,19 @@
</author>
</chapterinfo>
<title>Error handling configuration</title>
- <para>JBoss Portal request pipeline provides configuring of the error handling policy. At runtime when an error
- occurs it is possible to configure how the portal behaves in a fine grained and dynamic manner.</para>
+ <para>JBoss Portal's request pipeline allows for fine-grained, dynamic configuration of how Portal will behave when
+ an error occurs at runtime.</para>
<sect1>
<title>Error types</title>
- <para>There are several kind of errors that can be happen during a request.</para>
- <itemizedlist>
- <listitem>Access denied: the user does not have the security rights to access a resource</listitem>
- <listitem>Error: an expected error, like a portlet threw an exception</listitem>
- <listitem>Internal error: an unexpected error</listitem>
- <listitem>Resource not found: a resource is not found</listitem>
- <listitem>Resource not available: a resource is found but is not serviceable</listitem>
- </itemizedlist>
+ <para>There are several kind of errors that can happen during a request:
+ <itemizedlist>
+ <listitem>Access denied: the user does not have the security rights to access a resource</listitem>
+ <listitem>Error: an anticipated error as when a portlet throws an exception</listitem>
+ <listitem>Internal error: an unexpected error</listitem>
+ <listitem>Resource not found: a resource is not found</listitem>
+ <listitem>Resource not available: a resource is found but is not serviceable</listitem>
+ </itemizedlist>
+ </para>
</sect1>
<sect1>
<title>Control policies</title>
@@ -28,29 +29,30 @@
<sect2>
<title>Policy delegation and cascading</title>
<para>Whenever a control policy is invoked it is given the opportunity 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 error. For instance, if a portlet part of a page
- produces an exception, the following reactions are possible:</para>
- <itemizedlist>
- <listitem>The error is displayed in the window</listitem>
- <listitem>The window is removed from the aggregation</listitem>
- <listitem>An portal error page is displayed</listitem>
- <listitem>An HTTP 500 error response is sent to the browser</listitem>
- </itemizedlist>
+ 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 error. For instance, if a portlet part of a
+ page produces an exception, the following reactions are possible:
+ <itemizedlist>
+ <listitem>The error is displayed in the window</listitem>
+ <listitem>The window is removed from the aggregation</listitem>
+ <listitem>An portal error page is displayed</listitem>
+ <listitem>An HTTP 500 error response is sent to the browser</listitem>
+ </itemizedlist>
+ </para>
</sect2>
<sect2>
<title>Default policy</title>
<para>The default policy applies when error are not handled at other level. By default errors are translated
into the most appropriate HTTP response:
+ <itemizedlist>
+ <listitem>Access denied: HTTP 403 Forbidden response</listitem>
+ <listitem>Error: HTTP 500 Internal Server Error response</listitem>
+ <listitem>Internal error: HTTP 500 Internal Server Error response</listitem>
+ <listitem>Resource not found: HTTP 404 Not Found response</listitem>
+ <listitem>Resource not available: HTTP 404 Not Found response</listitem>
+ </itemizedlist>
</para>
- <itemizedlist>
- <listitem>Access denied: HTTP 403 Forbidden response</listitem>
- <listitem>Error: HTTP 500 Internal Server Error response</listitem>
- <listitem>Internal error: HTTP 500 Internal Server Error response</listitem>
- <listitem>Resource not found: HTTP 404 Not Found response</listitem>
- <listitem>Resource not available: HTTP 404 Not Found response</listitem>
- </itemizedlist>
</sect2>
<sect2>
<title>Portal policy</title>
@@ -61,14 +63,15 @@
</sect2>
<sect2>
<title>Page policy</title>
- <para>Window error policy controls how the page reacts to aggregation 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 that are possible upon an error are:</para>
- <itemizedlist>
- <listitem>Remove the window from the aggregation</listitem>
- <listitem>Replace the markup of the window by a redirection to a JSP page</listitem>
- </itemizedlist>
+ <para>Window error policy controls how the page reacts to aggregation 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 that are possible upon an error are:
+ <itemizedlist>
+ <listitem>Remove the window from the aggregation</listitem>
+ <listitem>Replace the markup of the window by a redirection to a JSP page</listitem>
+ </itemizedlist>
+ </para>
</sect2>
</sect1>
<sect1>
@@ -310,11 +313,10 @@
clicking on the Properties link on each of these pages. You can also specify how dashboards should behave with
respect to error handling by clicking on the Dashboards tab of the Portal management application.
</para>
- <para>Screenshot:</para>
- <para>
- <imageobject>
- <imagedata fileref="images/errorhandling/errorHandlingUI.png" format="png"/>
- </imageobject>
+ <para>Screenshot:
+ <imageobject>
+ <imagedata fileref="images/errorhandling/errorHandlingUI.png" format="png" align="center"/>
+ </imageobject>
</para>
</sect1>
</chapter>
\ No newline at end of file
Modified: docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/wsrp.xml
===================================================================
--- docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/wsrp.xml 2007-10-13 00:08:20 UTC (rev 8625)
+++ docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/wsrp.xml 2007-10-13 01:34:14 UTC (rev 8626)
@@ -70,7 +70,7 @@
<para>
JBoss Portal provides a complete support of WSRP 1.0 standard interfaces and offers
both consumer and producer services. WSRP support is provided by the <emphasis>portal-wsrp.sar</emphasis>
- service archive, included in the main <emphasis>jboss-portal.sar</emphasis> service archive, if you've
+ service archive, included in the main <emphasis>jboss-portal.sar</emphasis> service archive, if you've
obtained JBoss Portal from a binary distribution. If you don't intend on using WSRP, we recommend that you
remove the <emphasis>portal-wspr.sar</emphasis> from the main <emphasis>jboss-portal.sar</emphasis> service
archive.</para>
@@ -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 portlet providers. If all went well,
you should see something similar to this:
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/wsrp/portlets.png" format="png" align="center" valign="middle"/>
- </imageobject>
- </mediaobject>
- </para>
- <para>
- We have 3 available portlet providers: <emphasis>local, self</emphasis> and <emphasis>bea</emphasis>. 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 should now see something similar to:
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/wsrp/bea.png" format="png" align="center" valign="middle"/>
- </imageobject>
- </mediaobject>
- </para>
- <para>
- From there on out, you should be able to configure WSRP portlets just as any other. In particular, you
- can create an instance of one of the remote portlets offered 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:
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/wsrp/result.png" format="png" align="center" valign="middle"/>
- </imageobject>
- </mediaobject>
- </para>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/wsrp/portlets.png" format="png" align="center" valign="middle"/>
+ </imageobject>
+ </mediaobject>
+ </para>
+ <para>
+ We have 3 available portlet providers: <emphasis>local, self</emphasis> and <emphasis>bea</emphasis>. 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 should now see something similar to:
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/wsrp/bea.png" format="png" align="center" valign="middle"/>
+ </imageobject>
+ </mediaobject>
+ </para>
+ <para>
+ From there on out, you should be able to configure WSRP portlets just as any other. In particular, you
+ can create an instance of one of the remote portlets offered 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:
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/wsrp/result.png" format="png" align="center" valign="middle"/>
+ </imageobject>
+ </mediaobject>
+ </para>
</sect3>
</sect2>
@@ -487,7 +487,7 @@
<para>
<programlisting><![CDATA[
-<?xml version="1.0" encoding="UTF-8"?>
+<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE deployments PUBLIC "-//JBoss Portal//DTD WSRP Remote Producer Configuration 2.6//EN"
"http://www.jboss.org/portal/dtd/jboss-wsrp-consumer_2_6.dtd">
@@ -526,7 +526,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE deployments PUBLIC "-//JBoss Portal//DTD WSRP Remote Producer Configuration 2.6//EN"
"http://www.jboss.org/portal/dtd/jboss-wsrp-consumer_2_6.dtd">
-
+
<deployments>
<deployment>
<wsrp-producer id="MyProducer" expiration-cache="120">
@@ -557,7 +557,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE deployments PUBLIC "-//JBoss Portal//DTD WSRP Remote Producer Configuration 2.6//EN"
"http://www.jboss.org/portal/dtd/jboss-wsrp-consumer_2_6.dtd">
-
+
<deployments>
<deployment>
<wsrp-producer id="AnotherProducer" expiration-cache="60">
@@ -702,7 +702,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE producer-configuration PUBLIC "-//JBoss Portal//DTD WSRP Local Producer Configuration 2.6//EN"
"http://www.jboss.org/portal/dtd/jboss-wsrp-producer_2_6.dtd">
-
+
<producer-configuration>
<registration-configuration fullServiceDescriptionRequiresRegistration="true">
<registration-policy>com.example.portal.SomeCustomRegistrationPolicy</registration-policy>
Modified: docs/trunk/referenceGuide/en/images/errorhandling/errorHandlingUI.png
===================================================================
(Binary files differ)
Modified: docs/trunk/referenceGuide/en/modules/errorhandling.xml
===================================================================
--- 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 @@
</author>
</chapterinfo>
<title>Error handling configuration</title>
- <para>JBoss Portal request pipeline provides configuring of the error handling policy. At runtime when an error
- occurs it is possible to configure how the portal behaves in a fine grained and dynamic manner.</para>
+ <para>JBoss Portal's request pipeline allows for fine-grained, dynamic configuration of how Portal will behave when
+ an error occurs at runtime.</para>
<sect1>
<title>Error types</title>
- <para>There are several kind of errors that can be happen during a request.</para>
- <itemizedlist>
- <listitem>Access denied: the user does not have the security rights to access a resource</listitem>
- <listitem>Error: an expected error, like a portlet threw an exception</listitem>
- <listitem>Internal error: an unexpected error</listitem>
- <listitem>Resource not found: a resource is not found</listitem>
- <listitem>Resource not available: a resource is found but is not serviceable</listitem>
- </itemizedlist>
+ <para>There are several kind of errors that can happen during a request:
+ <itemizedlist>
+ <listitem>Access denied: the user does not have the security rights to access a resource</listitem>
+ <listitem>Error: an anticipated error as when a portlet throws an exception</listitem>
+ <listitem>Internal error: an unexpected error</listitem>
+ <listitem>Resource not found: a resource is not found</listitem>
+ <listitem>Resource not available: a resource is found but is not serviceable</listitem>
+ </itemizedlist>
+ </para>
</sect1>
<sect1>
<title>Control policies</title>
@@ -28,29 +29,30 @@
<sect2>
<title>Policy delegation and cascading</title>
<para>Whenever a control policy is invoked it is given the opportunity 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 error. For instance, if a portlet part of a page
- produces an exception, the following reactions are possible:</para>
- <itemizedlist>
- <listitem>The error is displayed in the window</listitem>
- <listitem>The window is removed from the aggregation</listitem>
- <listitem>An portal error page is displayed</listitem>
- <listitem>An HTTP 500 error response is sent to the browser</listitem>
- </itemizedlist>
+ 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 error. For instance, if a portlet part of a
+ page produces an exception, the following reactions are possible:
+ <itemizedlist>
+ <listitem>The error is displayed in the window</listitem>
+ <listitem>The window is removed from the aggregation</listitem>
+ <listitem>An portal error page is displayed</listitem>
+ <listitem>An HTTP 500 error response is sent to the browser</listitem>
+ </itemizedlist>
+ </para>
</sect2>
<sect2>
<title>Default policy</title>
<para>The default policy applies when error are not handled at other level. By default errors are translated
into the most appropriate HTTP response:
+ <itemizedlist>
+ <listitem>Access denied: HTTP 403 Forbidden response</listitem>
+ <listitem>Error: HTTP 500 Internal Server Error response</listitem>
+ <listitem>Internal error: HTTP 500 Internal Server Error response</listitem>
+ <listitem>Resource not found: HTTP 404 Not Found response</listitem>
+ <listitem>Resource not available: HTTP 404 Not Found response</listitem>
+ </itemizedlist>
</para>
- <itemizedlist>
- <listitem>Access denied: HTTP 403 Forbidden response</listitem>
- <listitem>Error: HTTP 500 Internal Server Error response</listitem>
- <listitem>Internal error: HTTP 500 Internal Server Error response</listitem>
- <listitem>Resource not found: HTTP 404 Not Found response</listitem>
- <listitem>Resource not available: HTTP 404 Not Found response</listitem>
- </itemizedlist>
</sect2>
<sect2>
<title>Portal policy</title>
@@ -61,14 +63,15 @@
</sect2>
<sect2>
<title>Page policy</title>
- <para>Window error policy controls how the page reacts to aggregation 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 that are possible upon an error are:</para>
- <itemizedlist>
- <listitem>Remove the window from the aggregation</listitem>
- <listitem>Replace the markup of the window by a redirection to a JSP page</listitem>
- </itemizedlist>
+ <para>Window error policy controls how the page reacts to aggregation 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 that are possible upon an error are:
+ <itemizedlist>
+ <listitem>Remove the window from the aggregation</listitem>
+ <listitem>Replace the markup of the window by a redirection to a JSP page</listitem>
+ </itemizedlist>
+ </para>
</sect2>
</sect1>
<sect1>
@@ -310,11 +313,10 @@
clicking on the Properties link on each of these pages. You can also specify how dashboards should behave with
respect to error handling by clicking on the Dashboards tab of the Portal management application.
</para>
- <para>Screenshot:</para>
- <para>
- <imageobject>
- <imagedata fileref="images/errorhandling/errorHandlingUI.png" format="png"/>
- </imageobject>
- </para>
+ <para>Screenshot:
+ <imageobject>
+ <imagedata fileref="images/errorhandling/errorHandlingUI.png" format="png" align="center"/>
+ </imageobject>
+ </para>
</sect1>
</chapter>
\ No newline at end of file
Modified: docs/trunk/referenceGuide/en/modules/wsrp.xml
===================================================================
--- 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 portlet providers. If all went well,
you should see something similar to this:
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/wsrp/portlets.png" format="png" align="center" valign="middle"/>
- </imageobject>
- </mediaobject>
- </para>
- <para>
- We have 3 available portlet providers: <emphasis>local, self</emphasis> and <emphasis>bea</emphasis>. 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 should now see something similar to:
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/wsrp/bea.png" format="png" align="center" valign="middle"/>
- </imageobject>
- </mediaobject>
- </para>
- <para>
- From there on out, you should be able to configure WSRP portlets just as any other. In particular, you
- can create an instance of one of the remote portlets offered 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:
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/wsrp/result.png" format="png" align="center" valign="middle"/>
- </imageobject>
- </mediaobject>
- </para>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/wsrp/portlets.png" format="png" align="center" valign="middle"/>
+ </imageobject>
+ </mediaobject>
+ </para>
+ <para>
+ We have 3 available portlet providers: <emphasis>local, self</emphasis> and <emphasis>bea</emphasis>. 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 should now see something similar to:
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/wsrp/bea.png" format="png" align="center" valign="middle"/>
+ </imageobject>
+ </mediaobject>
+ </para>
+ <para>
+ From there on out, you should be able to configure WSRP portlets just as any other. In particular, you
+ can create an instance of one of the remote portlets offered 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:
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/wsrp/result.png" format="png" align="center" valign="middle"/>
+ </imageobject>
+ </mediaobject>
+ </para>
</sect3>
</sect2>
16 years, 11 months
JBoss Portal SVN: r8625 - in docs: trunk/referenceGuide/en/modules and 1 other directory.
by portal-commits@lists.jboss.org
Author: chris.laprun(a)jboss.com
Date: 2007-10-12 20:08:20 -0400 (Fri, 12 Oct 2007)
New Revision: 8625
Modified:
docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/urls.xml
docs/trunk/referenceGuide/en/modules/urls.xml
Log:
- Minor content improvements.
Modified: docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/urls.xml
===================================================================
--- docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/urls.xml 2007-10-12 23:40:19 UTC (rev 8624)
+++ docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/urls.xml 2007-10-13 00:08:20 UTC (rev 8625)
@@ -31,71 +31,74 @@
<sect1>
<title>Accessing a portal</title>
<para>Each portal container can contains multiple portals, also there is one special portal
- which is the default portal, i.e the one used when no portal is specified in particular.
- <itemizedlist> The following examples show you how the selection is done.
- <listitem>"/", will point to the default page of the default portal.</listitem>
- <listitem>"/portal/portalname/" will point to the default page of the portal
- <literal>portalname</literal>
- </listitem>
- </itemizedlist>
+ which is the default portal, i.e the one used when no portal is specified in particular.
+ <itemizedlist> The following examples show you how the selection is done.
+ <listitem>"/portal", will point to the default page of the default portal.</listitem>
+ <listitem>"/portal/portalname/" will point to the default page of the portal
+ <literal>portalname</literal>
+ </listitem>
+ </itemizedlist>
</para>
</sect1>
<sect1>
<title>Accessing a page</title>
<para>It is possible to have multiple pages per portal. As for portal there is a default
- page for a given portal. Once the portal has been selected, then a page must be used and
- all the windows present in that page will be rendered. The page selection mechanism is
- the following. <itemizedlist>
- <listitem>"/portal/default/pageName" will render the <literal>pageName</literal>
- page.</listitem>
- </itemizedlist>
+ page for a given portal. Once the portal has been selected, then a page must be used and
+ all the windows present in that page will be rendered. The page selection mechanism is
+ the following.
+ <itemizedlist>
+ <listitem>"/portal/default/pageName" will render the <literal>pageName</literal>
+ page.</listitem>
+ </itemizedlist>
</para>
</sect1>
<sect1>
<title>Accessing CMS Content</title>
<para>The CMSPortlet delivers content transparently, without modifying 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 the portal.</para>
- <itemizedlist>
- <listitem>
- <literal>"/content/default/images/jboss_logo.gif"</literal> will display the
- <literal>jboss_logo.gif</literal> outside of the portal. This is accomplished as
- the portal interprets any path beginning with <literal>/content</literal> as a
- request for CMS content. As long as the mime-type is not text/html or text/text, it
- will be rendered independant of the portal. </listitem>
- </itemizedlist>
+ 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 the portal.
+ <itemizedlist>
+ <listitem>
+ <literal>"/content/default/images/jboss_logo.gif"</literal> will display the
+ <literal>jboss_logo.gif</literal> outside of the portal. This is accomplished as
+ the portal interprets any path beginning with <literal>/content</literal> as a
+ request for CMS content. As long as the mime-type is not <literal>text/html</literal>
+ or <literal>text/text</literal>, it will be rendered independently of the portal.
+ </listitem>
+ </itemizedlist>
+ </para>
</sect1>
-<!--
- <sect1>
- <title>Advanced portal urls</title>
- <para>JBoss Portal can consume and produce URLs in a very flexible manner. Consuming means
- that an URL is accepted by the portal, translated into some action and send a response to the
- browser. Producing means to create an URL for a particular action when the portal needs one.
- This part is an advanced topic explaining the internal mechanisms developped in JBoss Portal to
- produce and consumer URLs. It should be readen with care as it exposes internals of JBoss Portal
- that may change in later releases of the product.</para>
- <para>JBoss Portal url handling mechanism is based on several design patterns.</para>
- <sect2>
- <title>Portal Commands</title>
- <para></para>
- </sect2>
- <sect2>
- <title>Portal urls</title>
- <para>At runtime portal commands are converted back and forth into portal urls. Creation
- of urls and decoding of urls is now known at compile time, otherwise that would lead
- to a very inflexible portal since changing the behavior would imply to update the source
- code and recompile the portal, that would not be an acceptable solution. There is
- a well known design pattern which provides an elegant and powerful solution to this problem and
- is called Chain of Responsibility.</para>
- <para>Portal commands have a state which parameterizes them. For instance there is a command
- called <emphasis>ViewPageCommand</emphasis> which displays a portal page in the browser. The state
- of that command consist in the id of the page. There is a bidirectionnal mapping between portal urls
- and portal commands. Portal commands are created from URL using a service called <emphasis>CommandFactory</emphasis>,
- which takes a request object and provides a portal command. Conversely, portal urls are created from
- portal commands using a service called <emphasis>URLFactory</emphasis>.</para>
- <para>The task of decoding urls is performed by a set of command factories which are wired
- together in the configuration file. We can dist</para>
- </sect2>
- </sect1>
--->
+ <!--
+ <sect1>
+ <title>Advanced portal urls</title>
+ <para>JBoss Portal can consume and produce URLs in a very flexible manner. Consuming means
+ that an URL is accepted by the portal, translated into some action and send a response to the
+ browser. Producing means to create an URL for a particular action when the portal needs one.
+ This part is an advanced topic explaining the internal mechanisms developped in JBoss Portal to
+ produce and consumer URLs. It should be readen with care as it exposes internals of JBoss Portal
+ that may change in later releases of the product.</para>
+ <para>JBoss Portal url handling mechanism is based on several design patterns.</para>
+ <sect2>
+ <title>Portal Commands</title>
+ <para></para>
+ </sect2>
+ <sect2>
+ <title>Portal urls</title>
+ <para>At runtime portal commands are converted back and forth into portal urls. Creation
+ of urls and decoding of urls is now known at compile time, otherwise that would lead
+ to a very inflexible portal since changing the behavior would imply to update the source
+ code and recompile the portal, that would not be an acceptable solution. There is
+ a well known design pattern which provides an elegant and powerful solution to this problem and
+ is called Chain of Responsibility.</para>
+ <para>Portal commands have a state which parameterizes them. For instance there is a command
+ called <emphasis>ViewPageCommand</emphasis> which displays a portal page in the browser. The state
+ of that command consist in the id of the page. There is a bidirectionnal mapping between portal urls
+ and portal commands. Portal commands are created from URL using a service called <emphasis>CommandFactory</emphasis>,
+ which takes a request object and provides a portal command. Conversely, portal urls are created from
+ portal commands using a service called <emphasis>URLFactory</emphasis>.</para>
+ <para>The task of decoding urls is performed by a set of command factories which are wired
+ together in the configuration file. We can dist</para>
+ </sect2>
+ </sect1>
+ -->
</chapter>
Modified: docs/trunk/referenceGuide/en/modules/urls.xml
===================================================================
--- 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 @@
<sect1>
<title>Accessing a portal</title>
<para>Each portal container can contains multiple portals, also there is one special portal
- which is the default portal, i.e the one used when no portal is specified in particular.
- <itemizedlist> The following examples show you how the selection is done.
- <listitem>"/", will point to the default page of the default portal.</listitem>
- <listitem>"/portal/portalname/" will point to the default page of the portal
- <literal>portalname</literal>
- </listitem>
- </itemizedlist>
+ which is the default portal, i.e the one used when no portal is specified in particular.
+ <itemizedlist> The following examples show you how the selection is done.
+ <listitem>"/portal", will point to the default page of the default portal.</listitem>
+ <listitem>"/portal/portalname/" will point to the default page of the portal
+ <literal>portalname</literal>
+ </listitem>
+ </itemizedlist>
</para>
</sect1>
<sect1>
<title>Accessing a page</title>
<para>It is possible to have multiple pages per portal. As for portal there is a default
- page for a given portal. Once the portal has been selected, then a page must be used and
- all the windows present in that page will be rendered. The page selection mechanism is
- the following. <itemizedlist>
- <listitem>"/portal/default/pageName" will render the <literal>pageName</literal>
- page.</listitem>
- </itemizedlist>
+ page for a given portal. Once the portal has been selected, then a page must be used and
+ all the windows present in that page will be rendered. The page selection mechanism is
+ the following.
+ <itemizedlist>
+ <listitem>"/portal/default/pageName" will render the <literal>pageName</literal>
+ page.</listitem>
+ </itemizedlist>
</para>
</sect1>
<sect1>
<title>Accessing CMS Content</title>
<para>The CMSPortlet delivers content transparently, without modifying 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 the portal.</para>
- <itemizedlist>
- <listitem>
- <literal>"/content/default/images/jboss_logo.gif"</literal> will display the
- <literal>jboss_logo.gif</literal> outside of the portal. This is accomplished as
- the portal interprets any path beginning with <literal>/content</literal> as a
- request for CMS content. As long as the mime-type is not text/html or text/text, it
- will be rendered independant of the portal. </listitem>
- </itemizedlist>
+ 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 the portal.
+ <itemizedlist>
+ <listitem>
+ <literal>"/content/default/images/jboss_logo.gif"</literal> will display the
+ <literal>jboss_logo.gif</literal> outside of the portal. This is accomplished as
+ the portal interprets any path beginning with <literal>/content</literal> as a
+ request for CMS content. As long as the mime-type is not <literal>text/html</literal>
+ or <literal>text/text</literal>, it will be rendered independently of the portal.
+ </listitem>
+ </itemizedlist>
+ </para>
</sect1>
-<!--
- <sect1>
- <title>Advanced portal urls</title>
- <para>JBoss Portal can consume and produce URLs in a very flexible manner. Consuming means
- that an URL is accepted by the portal, translated into some action and send a response to the
- browser. Producing means to create an URL for a particular action when the portal needs one.
- This part is an advanced topic explaining the internal mechanisms developped in JBoss Portal to
- produce and consumer URLs. It should be readen with care as it exposes internals of JBoss Portal
- that may change in later releases of the product.</para>
- <para>JBoss Portal url handling mechanism is based on several design patterns.</para>
- <sect2>
- <title>Portal Commands</title>
- <para></para>
- </sect2>
- <sect2>
- <title>Portal urls</title>
- <para>At runtime portal commands are converted back and forth into portal urls. Creation
- of urls and decoding of urls is now known at compile time, otherwise that would lead
- to a very inflexible portal since changing the behavior would imply to update the source
- code and recompile the portal, that would not be an acceptable solution. There is
- a well known design pattern which provides an elegant and powerful solution to this problem and
- is called Chain of Responsibility.</para>
- <para>Portal commands have a state which parameterizes them. For instance there is a command
- called <emphasis>ViewPageCommand</emphasis> which displays a portal page in the browser. The state
- of that command consist in the id of the page. There is a bidirectionnal mapping between portal urls
- and portal commands. Portal commands are created from URL using a service called <emphasis>CommandFactory</emphasis>,
- which takes a request object and provides a portal command. Conversely, portal urls are created from
- portal commands using a service called <emphasis>URLFactory</emphasis>.</para>
- <para>The task of decoding urls is performed by a set of command factories which are wired
- together in the configuration file. We can dist</para>
- </sect2>
- </sect1>
--->
+ <!--
+ <sect1>
+ <title>Advanced portal urls</title>
+ <para>JBoss Portal can consume and produce URLs in a very flexible manner. Consuming means
+ that an URL is accepted by the portal, translated into some action and send a response to the
+ browser. Producing means to create an URL for a particular action when the portal needs one.
+ This part is an advanced topic explaining the internal mechanisms developped in JBoss Portal to
+ produce and consumer URLs. It should be readen with care as it exposes internals of JBoss Portal
+ that may change in later releases of the product.</para>
+ <para>JBoss Portal url handling mechanism is based on several design patterns.</para>
+ <sect2>
+ <title>Portal Commands</title>
+ <para></para>
+ </sect2>
+ <sect2>
+ <title>Portal urls</title>
+ <para>At runtime portal commands are converted back and forth into portal urls. Creation
+ of urls and decoding of urls is now known at compile time, otherwise that would lead
+ to a very inflexible portal since changing the behavior would imply to update the source
+ code and recompile the portal, that would not be an acceptable solution. There is
+ a well known design pattern which provides an elegant and powerful solution to this problem and
+ is called Chain of Responsibility.</para>
+ <para>Portal commands have a state which parameterizes them. For instance there is a command
+ called <emphasis>ViewPageCommand</emphasis> which displays a portal page in the browser. The state
+ of that command consist in the id of the page. There is a bidirectionnal mapping between portal urls
+ and portal commands. Portal commands are created from URL using a service called <emphasis>CommandFactory</emphasis>,
+ which takes a request object and provides a portal command. Conversely, portal urls are created from
+ portal commands using a service called <emphasis>URLFactory</emphasis>.</para>
+ <para>The task of decoding urls is performed by a set of command factories which are wired
+ together in the configuration file. We can dist</para>
+ </sect2>
+ </sect1>
+ -->
</chapter>
16 years, 11 months
JBoss Portal SVN: r8624 - in docs: trunk/referenceGuide/en/modules and 1 other directory.
by portal-commits@lists.jboss.org
Author: chris.laprun(a)jboss.com
Date: 2007-10-12 19:40:19 -0400 (Fri, 12 Oct 2007)
New Revision: 8624
Modified:
docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/xmldescriptors.xml
docs/trunk/referenceGuide/en/modules/xmldescriptors.xml
Log:
- Minor content improvements.
Modified: docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/xmldescriptors.xml
===================================================================
--- docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/xmldescriptors.xml 2007-10-12 21:06:39 UTC (rev 8623)
+++ docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/xmldescriptors.xml 2007-10-12 23:40:19 UTC (rev 8624)
@@ -607,9 +607,13 @@
The *-object.xml file is used to define: portal instances, pages, windows, window layout. Additionally,
you can also specify the themes and layouts used for specific portal instances, pages, and windows. The
description below, only defines a portlet window being added to the default page in the default portal. For
- advanced functionality, using this descriptor, please read
- <xref linkend="desc_examples"/>
- .
+ advanced functionality, using this descriptor, please read <xref linkend="desc_examples"/>.
+
+ <note>
+ <emphasis>Is this descriptor mandatory?</emphasis>
+ Technically, no, as you can define your portal object hierarchy (create portals, pages, instances and
+ organize them as you see fit) from the management portlet accessible to Portal administrators.
+ </note>
<programlisting><![CDATA[
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE deployments PUBLIC
@@ -725,9 +729,8 @@
several times with different preference parameters.
<note>
<emphasis>Is this descriptor mandatory?</emphasis>
- Technically, no, as you can deploy your portlet without this descriptor AND without the *-object.xml and
- then use the management portlet to create instances, assign the instances to windows, and then assign the
- windows to pages.
+ Technically, no, as you can define your portal object hierarchy (create portals, pages, instances and
+ organize them as you see fit) from the management portlet accessible to Portal administrators.
</note>
Our example, below, has us instantiating two separate instances of the
<emphasis>NewsPortlet</emphasis>
@@ -904,8 +907,13 @@
</sect2>
<sect2>
<title>jboss-portlet.xml</title>
- <para>This descriptor is not mandatory, but is useful when having to add JBoss-Specific contexts to your
- portlet descriptor. It would normally be packaged inside your portlet war, alongside the other descriptors
+ <note>
+ <emphasis>Is this descriptor mandatory?</emphasis>
+ Technically, no, but might be required to access JBoss-specific functionality that is not covered by the
+ Portlet specification.
+ </note>
+ <para>This descriptor is useful when you need to access JBoss-specific functionality within your portlet
+ application. It would normally be packaged inside your portlet war, alongside the other descriptors
in this section.</para>
<sect3>
<title>Injecting Header Content</title>
@@ -943,7 +951,7 @@
<service-ref>:service=Module,type=User</service-ref>
</service>
</portlet-app>]]></programlisting>
- Injects the UserModule service in to the portlet context, allowing a portlet to then leverage the
+ Injects the UserModule service as an attribute to the portlet context, allowing a portlet to then leverage the
service. For example:
<programlisting><![CDATA[
UserModule userModule = (UserModule) getPortletContext().getAttribute("UserModule");
@@ -953,18 +961,39 @@
</para>
</sect3>
<sect3>
+ <title>Defining extra portlet information</title>
+ <para>Since JBoss Portal 2.6.3, icons can be defined for a portlet.
+ <programlisting><![CDATA[
+<?xml version="1.0" standalone="yes"?>
+<!DOCTYPE portlet-app PUBLIC
+ "-//JBoss Portal//DTD JBoss Portlet 2.6//EN"
+ "http://www.jboss.org/portal/dtd/jboss-portlet_2_6.dtd">
+<portlet-app>
+ <portlet>
+ <portlet-name>ManagementPortlet</portlet-name>
+ <portlet-info>
+ <icon>
+ <small-icon>/images/smallIcon.png</small-icon>
+ <large-icon>/images/largeIcon.png</small-icon>
+ </icon>
+ </portlet-info>
+ </portlet>
+</portlet-app>]]></programlisting>
+ The reference can be absolute (http://www.example.com/images/smallIcon.png) or relative to the webapp
+ context if starting with a '/'. Those icons can be used by different parts of the portal User Interface.
+ </para>
+ </sect3>
+ <sect3>
<title>Portlet Session Replication in a Clustered Environment</title>
</sect3>
- <para>See
- <xref linkend="portlet_session_replication"/>
- </para>
+ <para>See <xref linkend="portlet_session_replication"/>.</para>
</sect2>
<sect2>
<title>portlet.xml</title>
<para>This is the standard portlet descriptor covered by the JSR-168 Specification. It is
advisable that developers read the specification items covering proper use of this descriptor, as it is only
- covered here briefly. For example purposes, we use an editted version of our JBoss Portal UserPortlet
- definition. Normally, you would package this descriptor in your portlet war.
+ covered here briefly. For example purposes, we use an edited version of our JBoss Portal UserPortlet
+ definition. Normally, you would package this descriptor in your portlet WAR file.
<programlisting><![CDATA[
<?xml version="1.0" encoding="UTF-8"?>
<portlet-app
@@ -1002,68 +1031,60 @@
<listitem>
<para>
<programlisting><![CDATA[<portlet-app>...</portlet-app>]]></programlisting>
- The
- <emphasis>portlet-app</emphasis>
- tag, encapsulates the entire document. You may specify more than one portlet, within this tag.
+ The <emphasis>portlet-app</emphasis> tag, encapsulates the entire document. You may specify more
+ than one portlet, within this tag.
</para>
</listitem>
<listitem>
<para>
<programlisting><![CDATA[<portlet>...</portlet>]]></programlisting>
- The
- <emphasis>portlet</emphasis>
- tag is used to define one portlet that is deployed withing this archive.
+ The <emphasis>portlet</emphasis> tag is used to define one portlet that is deployed within
+ this archive.
</para>
</listitem>
<listitem>
<para>
<programlisting><![CDATA[<description>...</description>]]></programlisting>
- A verbal description of tis portlet's function.
+ A verbal description of this portlet's function.
</para>
</listitem>
<listitem>
<para>
<programlisting><![CDATA[<portlet-name>...</portlet-name>]]></programlisting>
- The name of this portlet, usually the class name
+ The name of this portlet, usually the class name, though it doesn't have to be.
</para>
</listitem>
<listitem>
<para>
<programlisting><![CDATA[<portlet-class>...</portlet-class>]]></programlisting>
- The fully-qualified-name of this portlet class.
+ The fully-qualified name of this portlet class.
</para>
</listitem>
<listitem>
<para>
<programlisting><![CDATA[<init-param><name>...</name><value>...</value></init-param>]]></programlisting>
- Using the
- <emphasis>init-param</emphasis>
- tag, you can specify initialization parameters to create initial state inside your portlet class.
- Normally, they would be used in the portlet's
- <emphasis>init()</emphasis>
- method. You can specify more than one init-param.
+ Using the <emphasis>init-param</emphasis> tag, you can specify initialization parameters to create
+ initial state inside your portlet class. Normally, they would be used in the portlet's
+ <emphasis>init()</emphasis> method. You can specify more than one init-param.
</para>
</listitem>
<listitem>
<para>
<programlisting><![CDATA[<supports>...</supports>]]></programlisting>
- Here, you would advertise the supported
- <emphasis>mime-type</emphasis>
- and supported
- <emphasis>portlet-modes</emphasis>
- for this portlet.
+ Here, you would advertise the supported <emphasis>mime-type</emphasis> and supported
+ <emphasis>portlet-modes</emphasis> for this portlet.
</para>
</listitem>
<listitem>
<para>
<programlisting><![CDATA[<supported-locale>...</supported-locale>]]></programlisting>
- Here, you would advertise the supported locales for this portlet. You can specify many.
+ Here, you would advertise the supported locales for this portlet. Several locales can be specified.
</para>
</listitem>
<listitem>
<para>
<programlisting><![CDATA[<resource-bundle>...</resource-bundle>]]></programlisting>
- The resource bundle that will back the locales specified.
+ The resource bundle that will containing the localized information for the specified locales.
</para>
</listitem>
<listitem>
Modified: docs/trunk/referenceGuide/en/modules/xmldescriptors.xml
===================================================================
--- docs/trunk/referenceGuide/en/modules/xmldescriptors.xml 2007-10-12 21:06:39 UTC (rev 8623)
+++ docs/trunk/referenceGuide/en/modules/xmldescriptors.xml 2007-10-12 23:40:19 UTC (rev 8624)
@@ -607,9 +607,13 @@
The *-object.xml file is used to define: portal instances, pages, windows, window layout. Additionally,
you can also specify the themes and layouts used for specific portal instances, pages, and windows. The
description below, only defines a portlet window being added to the default page in the default portal. For
- advanced functionality, using this descriptor, please read
- <xref linkend="desc_examples"/>
- .
+ advanced functionality, using this descriptor, please read <xref linkend="desc_examples"/>.
+
+ <note>
+ <emphasis>Is this descriptor mandatory?</emphasis>
+ Technically, no, as you can define your portal object hierarchy (create portals, pages, instances and
+ organize them as you see fit) from the management portlet accessible to Portal administrators.
+ </note>
<programlisting><![CDATA[
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE deployments PUBLIC
@@ -725,9 +729,8 @@
several times with different preference parameters.
<note>
<emphasis>Is this descriptor mandatory?</emphasis>
- Technically, no, as you can deploy your portlet without this descriptor AND without the *-object.xml and
- then use the management portlet to create instances, assign the instances to windows, and then assign the
- windows to pages.
+ Technically, no, as you can define your portal object hierarchy (create portals, pages, instances and
+ organize them as you see fit) from the management portlet accessible to Portal administrators.
</note>
Our example, below, has us instantiating two separate instances of the
<emphasis>NewsPortlet</emphasis>
@@ -904,8 +907,13 @@
</sect2>
<sect2>
<title>jboss-portlet.xml</title>
- <para>This descriptor is not mandatory, but is useful when having to add JBoss-Specific contexts to your
- portlet descriptor. It would normally be packaged inside your portlet war, alongside the other descriptors
+ <note>
+ <emphasis>Is this descriptor mandatory?</emphasis>
+ Technically, no, but might be required to access JBoss-specific functionality that is not covered by the
+ Portlet specification.
+ </note>
+ <para>This descriptor is useful when you need to access JBoss-specific functionality within your portlet
+ application. It would normally be packaged inside your portlet war, alongside the other descriptors
in this section.</para>
<sect3>
<title>Injecting Header Content</title>
@@ -943,7 +951,7 @@
<service-ref>:service=Module,type=User</service-ref>
</service>
</portlet-app>]]></programlisting>
- Injects the UserModule service in to the portlet context, allowing a portlet to then leverage the
+ Injects the UserModule service as an attribute to the portlet context, allowing a portlet to then leverage the
service. For example:
<programlisting><![CDATA[
UserModule userModule = (UserModule) getPortletContext().getAttribute("UserModule");
@@ -971,24 +979,21 @@
</portlet-info>
</portlet>
</portlet-app>]]></programlisting>
- The reference can be absolute (http://www.example.com/images/smallIcon.png) or relative to the
- webapp context if starting with a '/'.
- Those icons can be used by different part of the portal User Interface.
+ The reference can be absolute (http://www.example.com/images/smallIcon.png) or relative to the webapp
+ context if starting with a '/'. Those icons can be used by different parts of the portal User Interface.
</para>
</sect3>
<sect3>
<title>Portlet Session Replication in a Clustered Environment</title>
</sect3>
- <para>See
- <xref linkend="portlet_session_replication"/>
- </para>
+ <para>See <xref linkend="portlet_session_replication"/>.</para>
</sect2>
<sect2>
<title>portlet.xml</title>
<para>This is the standard portlet descriptor covered by the JSR-168 Specification. It is
advisable that developers read the specification items covering proper use of this descriptor, as it is only
- covered here briefly. For example purposes, we use an editted version of our JBoss Portal UserPortlet
- definition. Normally, you would package this descriptor in your portlet war.
+ covered here briefly. For example purposes, we use an edited version of our JBoss Portal UserPortlet
+ definition. Normally, you would package this descriptor in your portlet WAR file.
<programlisting><![CDATA[
<?xml version="1.0" encoding="UTF-8"?>
<portlet-app
@@ -1026,68 +1031,60 @@
<listitem>
<para>
<programlisting><![CDATA[<portlet-app>...</portlet-app>]]></programlisting>
- The
- <emphasis>portlet-app</emphasis>
- tag, encapsulates the entire document. You may specify more than one portlet, within this tag.
+ The <emphasis>portlet-app</emphasis> tag, encapsulates the entire document. You may specify more
+ than one portlet, within this tag.
</para>
</listitem>
<listitem>
<para>
<programlisting><![CDATA[<portlet>...</portlet>]]></programlisting>
- The
- <emphasis>portlet</emphasis>
- tag is used to define one portlet that is deployed withing this archive.
+ The <emphasis>portlet</emphasis> tag is used to define one portlet that is deployed within
+ this archive.
</para>
</listitem>
<listitem>
<para>
<programlisting><![CDATA[<description>...</description>]]></programlisting>
- A verbal description of tis portlet's function.
+ A verbal description of this portlet's function.
</para>
</listitem>
<listitem>
<para>
<programlisting><![CDATA[<portlet-name>...</portlet-name>]]></programlisting>
- The name of this portlet, usually the class name
+ The name of this portlet, usually the class name, though it doesn't have to be.
</para>
</listitem>
<listitem>
<para>
<programlisting><![CDATA[<portlet-class>...</portlet-class>]]></programlisting>
- The fully-qualified-name of this portlet class.
+ The fully-qualified name of this portlet class.
</para>
</listitem>
<listitem>
<para>
<programlisting><![CDATA[<init-param><name>...</name><value>...</value></init-param>]]></programlisting>
- Using the
- <emphasis>init-param</emphasis>
- tag, you can specify initialization parameters to create initial state inside your portlet class.
- Normally, they would be used in the portlet's
- <emphasis>init()</emphasis>
- method. You can specify more than one init-param.
+ Using the <emphasis>init-param</emphasis> tag, you can specify initialization parameters to create
+ initial state inside your portlet class. Normally, they would be used in the portlet's
+ <emphasis>init()</emphasis> method. You can specify more than one init-param.
</para>
</listitem>
<listitem>
<para>
<programlisting><![CDATA[<supports>...</supports>]]></programlisting>
- Here, you would advertise the supported
- <emphasis>mime-type</emphasis>
- and supported
- <emphasis>portlet-modes</emphasis>
- for this portlet.
+ Here, you would advertise the supported <emphasis>mime-type</emphasis> and supported
+ <emphasis>portlet-modes</emphasis> for this portlet.
</para>
</listitem>
<listitem>
<para>
<programlisting><![CDATA[<supported-locale>...</supported-locale>]]></programlisting>
- Here, you would advertise the supported locales for this portlet. You can specify many.
+ Here, you would advertise the supported locales for this portlet. Several locales can be specified.
</para>
</listitem>
<listitem>
<para>
<programlisting><![CDATA[<resource-bundle>...</resource-bundle>]]></programlisting>
- The resource bundle that will back the locales specified.
+ The resource bundle that will containing the localized information for the specified locales.
</para>
</listitem>
<listitem>
16 years, 11 months
JBoss Portal SVN: r8623 - in docs: trunk/referenceGuide/en/modules and 1 other directory.
by portal-commits@lists.jboss.org
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/tutorials.xml
docs/trunk/referenceGuide/en/modules/tutorials.xml
Log:
- Minor content improvements.
Modified: docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/tutorials.xml
===================================================================
--- docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/tutorials.xml 2007-10-12 14:55:57 UTC (rev 8622)
+++ docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/tutorials.xml 2007-10-12 21:06:39 UTC (rev 8623)
@@ -282,11 +282,11 @@
</instance>
</deployment>
</deployments>]]></programlisting>
- This is a JBoss Portal specific descriptor that allows you create an instance of a portlet. The
+ This is a JBoss Portal specific descriptor that allows you to create instances of portlets. The
<literal>portlet-ref</literal> value must match the <literal>portlet-name</literal> value
given in the packaged <literal>portlet.xml</literal>. The <literal>instance-id</literal>
- value can be named anything, but it must match the <literal>instance-ref</literal> value given
- in the <literal>*-object.xml</literal> file we will explore below.
+ value can be named anything, but it must match <literal>instance-ref</literal> values given
+ in <literal>*-object.xml</literal> files as we shall below.
</para>
</listitem>
<listitem>
@@ -309,7 +309,7 @@
</deployments>]]></programlisting>
<literal>*-object.xml</literal> files are JBoss Portal 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 <literal>HelloWorldPortletInstance</literal> portlet instance, assign it to the
<literal>default.default</literal> page, and specify where it should appear on that page.
@@ -343,8 +343,8 @@
<listitem>
<para>
<programlisting><![CDATA[<instance-ref>HelloWorldPortletInstance</instance-ref>]]></programlisting>
- The value of <literal>instance-ref</literal> must match the value of
- <literal>instance-id</literal> found in the <literal>portlet-instances.xml</literal>.
+ The value of <literal>instance-ref</literal> must match the value of one of the
+ <literal>instance-id</literal> found in <literal>portlet-instances.xml</literal>.
</para>
</listitem>
<listitem>
Modified: docs/trunk/referenceGuide/en/modules/tutorials.xml
===================================================================
--- 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 <literal>render</literal> method. This is accomplish via the
<literal>mime-type</literal> element, which is <emphasis>required</emphasis> for every
portlet. Of course, the declared MIME types must match the capability of the portlet.
-
+
It also allows you to pair
which modes and window states are supported for each markup type. In out case, as all
portlets must support the VIEW portlet mode, we didn't have to declare it. We did need
@@ -282,11 +282,11 @@
</instance>
</deployment>
</deployments>]]></programlisting>
- This is a JBoss Portal specific descriptor that allows you create an instance of a portlet. The
+ This is a JBoss Portal specific descriptor that allows you to create instances of portlets. The
<literal>portlet-ref</literal> value must match the <literal>portlet-name</literal> value
given in the packaged <literal>portlet.xml</literal>. The <literal>instance-id</literal>
- value can be named anything, but it must match the <literal>instance-ref</literal> value given
- in the <literal>*-object.xml</literal> file we will explore below.
+ value can be named anything, but it must match <literal>instance-ref</literal> values given
+ in <literal>*-object.xml</literal> files as we shall below.
</para>
</listitem>
<listitem>
@@ -309,11 +309,11 @@
</deployments>]]></programlisting>
<literal>*-object.xml</literal> files are JBoss Portal 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 <literal>HelloWorldPortletInstance</literal> portlet instance, assign it to the
+ generated by the <literal>HelloWorldPortletInstance</literal> portlet instance, assign it to the
<literal>default.default</literal> page, and specify where it should appear on that page.
-
+
<itemizedlist>
<listitem>
<para>
@@ -343,8 +343,8 @@
<listitem>
<para>
<programlisting><![CDATA[<instance-ref>HelloWorldPortletInstance</instance-ref>]]></programlisting>
- The value of <literal>instance-ref</literal> must match the value of
- <literal>instance-id</literal> found in the <literal>portlet-instances.xml</literal>.
+ The value of <literal>instance-ref</literal> must match the value of one of the
+ <literal>instance-id</literal> found in <literal>portlet-instances.xml</literal>.
</para>
</listitem>
<listitem>
@@ -368,7 +368,7 @@
</imageobject>
</mediaobject>
</para>
-
+
<para>
Portal 2.6 introduces the notion of <emphasis>content type</emphasis>, which is a generic mechanism to
specify which content will be displayed by a given portlet window. The <literal>window</literal> section
@@ -438,7 +438,7 @@
easily modify the XML descriptors, resources files, JSF/JSP pages. A simple <literal>touch</literal>
operation (or equivalent) on the <literal>web.xml</literal> file will let any live JBoss Application
Server instance know that it needs to hot-redeploy your web application.
- </para>
+ </para>
</sect3>
<sect3>
<title>Deploying your portlet</title>
@@ -612,7 +612,7 @@
</listitem>
</itemizedlist>
</para>
- </sect3>
+ </sect3>
<sect3>
<title>JSP files and the portlet taglib</title>
<para>
@@ -709,7 +709,7 @@
</imageobject>
</mediaobject>
</para>
- </sect3>
+ </sect3>
</sect2>
<sect2 id="sunri_42x">
<title>A simple Sun's JSF Reference Implementation (RI) portlet on JBoss AS 4.2.x</title>
@@ -720,7 +720,7 @@
from PortletSwap.com, using this link:
<ulink url="http://anonsvn.jboss.org/repos/portletswap/portlets/2_6/bundles/HelloWorl...">http://anonsvn.jboss.org/repos/portletswap/portlets/2_6/bundles/HelloWorl...</ulink>.
</para>
- </sect3>
+ </sect3>
<sect3>
<title>Package Content</title>
<para>
@@ -847,7 +847,7 @@
</para>
</listitem>
<listitem>
- <para><literal>jsf-portlet.jar</literal> This library that can be downloaded here: <ulink url="https://jsfportletbridge.dev.java.net/servlets/ProjectDocumentList">https://jsfportletbridge.dev.java.net/servlets/ProjectDocumentList</ulink>
+ <para><literal>jsf-portlet.jar</literal> This library that can be downloaded here: <ulink url="https://jsfportletbridge.dev.java.net/servlets/ProjectDocumentList">https://jsfportletbridge.dev.java.net/servlets/ProjectDocumentList</ulink>
contains the classes for the JSF-Portlet bridge. Since 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.</para>
@@ -855,7 +855,7 @@
</itemizedlist>
</para>
</sect3>
- <!--
+ <!--
<sect3>
<title>JSP files</title>
<para>TODO!!</para>
@@ -868,7 +868,7 @@
<literal>helloworldjspportlet.war</literal> file in a way similar to what we saw in
<xref linkend="first_portlet_build"/>.
</para>
- <!--
+ <!--
<para>
The <literal>explode</literal> target will produce the following:
<mediaobject>
@@ -888,7 +888,7 @@
</imageobject>
</mediaobject>
</para>
- </sect3>
+ </sect3>
</sect2>
<sect2 id="myfaces_40x">
<title>A simple MyFaces JSF Portlet on JBoss AS 4.0.5+</title>
@@ -899,7 +899,7 @@
from PortletSwap.com, using this link:
<ulink url="http://anonsvn.jboss.org/repos/portletswap/portlets/2_6/bundles/HelloWorl...">http://anonsvn.jboss.org/repos/portletswap/portlets/2_6/bundles/HelloWorl...</ulink>.
</para>
- </sect3>
+ </sect3>
<sect3>
<title>Package Content</title>
<para>
@@ -1005,7 +1005,7 @@
</itemizedlist>
</para>
</sect3>
- <!--
+ <!--
<sect3>
<title>JSP files</title>
<para>TODO!!</para>
@@ -1018,7 +1018,7 @@
<literal>helloworldjsfportlet.war</literal> file in a way similar to what we saw in
<xref linkend="first_portlet_build"/>.
</para>
- <!--
+ <!--
<para>
The <literal>explode</literal> target will produce the following:
<mediaobject>
@@ -1038,7 +1038,7 @@
</imageobject>
</mediaobject>
</para>
- </sect3>
+ </sect3>
</sect2>
<sect2>
<title>Adapting MyFaces JSF Portlet to work on JBoss AS 4.2.x</title>
16 years, 11 months
JBoss Portal SVN: r8622 - trunk/wsrp/src/resources/portal-wsrp-sar/conf/hibernate/consumer.
by portal-commits@lists.jboss.org
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/hibernate.cfg.xml
Log:
- Point to the appropriate domain.hbm.xml. I thought I had committed this already (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
===================================================================
--- trunk/wsrp/src/resources/portal-wsrp-sar/conf/hibernate/consumer/hibernate.cfg.xml 2007-10-12 14:54:19 UTC (rev 8621)
+++ trunk/wsrp/src/resources/portal-wsrp-sar/conf/hibernate/consumer/hibernate.cfg.xml 2007-10-12 14:55:57 UTC (rev 8622)
@@ -53,6 +53,6 @@
-->
<!-- Mapping files -->
- <mapping resource="conf/consumer/hibernate/domain.hbm.xml"/>
+ <mapping resource="conf/hibernate/consumer/domain.hbm.xml"/>
</session-factory>
</hibernate-configuration>
\ No newline at end of file
16 years, 11 months
JBoss Portal SVN: r8621 - branches/JBoss_Portal_Branch_2_6/wsrp/src/resources/portal-wsrp-sar/conf/hibernate/consumer.
by portal-commits@lists.jboss.org
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 already (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-sar/conf/hibernate/consumer/hibernate.cfg.xml
===================================================================
--- branches/JBoss_Portal_Branch_2_6/wsrp/src/resources/portal-wsrp-sar/conf/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/conf/hibernate/consumer/hibernate.cfg.xml 2007-10-12 14:54:19 UTC (rev 8621)
@@ -53,6 +53,6 @@
-->
<!-- Mapping files -->
- <mapping resource="conf/consumer/hibernate/domain.hbm.xml"/>
+ <mapping resource="conf/hibernate/consumer/domain.hbm.xml"/>
</session-factory>
</hibernate-configuration>
\ No newline at end of file
16 years, 11 months
JBoss Portal SVN: r8620 - in modules/test/trunk/unit/src/main/org/jboss: test/unit/runner/event and 5 other directories.
by portal-commits@lists.jboss.org
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/TestRunnerEventBroadcaster.java
Removed:
modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/TestRunnerEventBroadcasterSupport.java
Modified:
modules/test/trunk/unit/src/main/org/jboss/test/unit/blah/BlahTestTwo.java
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/TestRunnerEventBroadcasterSupportTests.java
modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/TestRunnerContextSupport.java
modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/composite/CompositeTestRunner.java
modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/generic/GenericTestRunner.java
modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/pojo/POJOTestRunner.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/BlahTestTwo.java
===================================================================
--- modules/test/trunk/unit/src/main/org/jboss/test/unit/blah/BlahTestTwo.java 2007-10-12 14:28:31 UTC (rev 8619)
+++ modules/test/trunk/unit/src/main/org/jboss/test/unit/blah/BlahTestTwo.java 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 = new JUnitReporter("output", BlahTestTwo.class.getName());
// add listeners
- TestRunnerEventBroadcasterSupport broadcaster = new TestRunnerEventBroadcasterSupport();
+ TestRunnerEventBroadcaster broadcaster = new TestRunnerEventBroadcaster();
broadcaster.addListener(junitReporter);
broadcaster.addListener(new PrintListener());
Modified: modules/test/trunk/unit/src/main/org/jboss/test/unit/blah/BlahTests.java
===================================================================
--- modules/test/trunk/unit/src/main/org/jboss/test/unit/blah/BlahTests.java 2007-10-12 14:28:31 UTC (rev 8619)
+++ modules/test/trunk/unit/src/main/org/jboss/test/unit/blah/BlahTests.java 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 = suite.createRunner();
- TestRunnerEventBroadcasterSupport broadcaster = new TestRunnerEventBroadcasterSupport();
+ TestRunnerEventBroadcaster broadcaster = new TestRunnerEventBroadcaster();
broadcaster.addListener(new PrintListener());
runner.run(new TestRunnerContextSupport(broadcaster));
Modified: modules/test/trunk/unit/src/main/org/jboss/test/unit/runner/event/TestRunnerEventBroadcasterSupportTests.java
===================================================================
--- modules/test/trunk/unit/src/main/org/jboss/test/unit/runner/event/TestRunnerEventBroadcasterSupportTests.java 2007-10-12 14:28:31 UTC (rev 8619)
+++ modules/test/trunk/unit/src/main/org/jboss/test/unit/runner/event/TestRunnerEventBroadcasterSupportTests.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 = new TestRunnerEventBroadcasterSupport();
+ private TestRunnerEventBroadcaster support = new TestRunnerEventBroadcaster();
/** . */
private MyListener listener1 = new MyListener();
Modified: modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/TestRunnerContextSupport.java
===================================================================
--- modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/TestRunnerContextSupport.java 2007-10-12 14:28:31 UTC (rev 8619)
+++ modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/TestRunnerContextSupport.java 2007-10-12 14:29:27 UTC (rev 8620)
@@ -53,7 +53,7 @@
public TestRunnerContextSupport()
{
- this(new HashMap<String, String>(), NullFilter.getInstance(), new TestRunnerEventBroadcasterSupport());
+ this(new HashMap<String, String>(), NullFilter.getInstance(), new TestRunnerEventBroadcaster());
}
public TestRunnerContextSupport(Map<String, String> properties, TestFilter filter, TestRunnerEventListener eventListener)
Copied: modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/TestRunnerEventBroadcaster.java (from rev 8619, modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/TestRunnerEventBroadcasterSupport.java)
===================================================================
--- modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/TestRunnerEventBroadcaster.java (rev 0)
+++ modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/TestRunnerEventBroadcaster.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 <code>fireEvent(TestRunnerEvent event)</code> 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 <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 1.1 $
+ */
+public class TestRunnerEventBroadcaster implements TestRunnerEventListener
+{
+
+ /** . */
+ private List<TestRunnerEventListener> listeners = new ArrayList<TestRunnerEventListener>();
+
+ /**
+ * 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 IllegalArgumentException
+ {
+ if (listener == 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 == null)
+ {
+ throw new IllegalArgumentException("No null listener accepted");
+ }
+ if (listeners.contains(listener))
+ {
+ listeners.remove(listener);
+ }
+ }
+
+ public void onEvent(TestRunnerEvent event)
+ {
+ if (event == 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/TestRunnerEventBroadcasterSupport.java
===================================================================
--- modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/TestRunnerEventBroadcasterSupport.java 2007-10-12 14:28:31 UTC (rev 8619)
+++ modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/TestRunnerEventBroadcasterSupport.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 <code>fireEvent(TestRunnerEvent event)</code> 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 <a href="mailto:julien@jboss.org">Julien Viet</a>
- * @version $Revision: 1.1 $
- */
-public class TestRunnerEventBroadcasterSupport implements TestRunnerEventListener
-{
-
- /** . */
- private List<TestRunnerEventListener> listeners = new ArrayList<TestRunnerEventListener>();
-
- /**
- * 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 IllegalArgumentException
- {
- if (listener == 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 == null)
- {
- throw new IllegalArgumentException("No null listener accepted");
- }
- if (listeners.contains(listener))
- {
- listeners.remove(listener);
- }
- }
-
- public void onEvent(TestRunnerEvent event)
- {
- if (event == 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/composite/CompositeTestRunner.java
===================================================================
--- modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/composite/CompositeTestRunner.java 2007-10-12 14:28:31 UTC (rev 8619)
+++ modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/composite/CompositeTestRunner.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 = new TestRunnerEventBroadcasterSupport();
+ TestRunnerEventBroadcaster tmp = new TestRunnerEventBroadcaster();
tmp.addListener(new TestRunnerLifeCycleFilter(context.getEventListener()));
TestRunnerContextSupport nestedContext = new TestRunnerContextSupport(context.getProperties(), context.getFilter(), tmp);
Modified: modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/generic/GenericTestRunner.java
===================================================================
--- modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/generic/GenericTestRunner.java 2007-10-12 14:28:31 UTC (rev 8619)
+++ modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/generic/GenericTestRunner.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 = def.getClassName();
// Setup intermediate event filtering
- TestRunnerEventBroadcasterSupport tmp = new TestRunnerEventBroadcasterSupport();
+ TestRunnerEventBroadcaster tmp = new TestRunnerEventBroadcaster();
tmp.addListener(new TestRunnerLifeCycleFilter(context.getEventListener()));
TestRunnerContextSupport nestedContext = new TestRunnerContextSupport(context.getProperties(), context.getFilter(), tmp);
Modified: modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/pojo/POJOTestRunner.java
===================================================================
--- modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/pojo/POJOTestRunner.java 2007-10-12 14:28:31 UTC (rev 8619)
+++ modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/pojo/POJOTestRunner.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 = new TestRunnerEventBroadcasterSupport();
+ TestRunnerEventBroadcaster tmp = new TestRunnerEventBroadcaster();
tmp.addListener(new TestRunnerLifeCycleFilter(context.getEventListener()));
TestRunnerContextSupport nestedContext = new TestRunnerContextSupport(context.getProperties(), context.getFilter(), tmp);
Modified: modules/test/trunk/unit/src/main/org/jboss/unit/tooling/Main.java
===================================================================
--- 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<String,String> properties;
- private final TestRunnerEventBroadcasterSupport broadcaster;
+ private final TestRunnerEventBroadcaster broadcaster;
// public static final String JBOSS_UNIT_NAMES = "jboss.unit.names";
//
@@ -122,7 +122,7 @@
options_no_arg = Collections.unmodifiableSet(opts);
}
- public Main(TestRunner runner, MainTestFilter mainFilter, TestRunnerEventBroadcasterSupport broadcaster, TestSuiteDef suiteDef, Map<String,String> properties)
+ public Main(TestRunner runner, MainTestFilter mainFilter, TestRunnerEventBroadcaster broadcaster, TestSuiteDef suiteDef, Map<String,String> properties)
{
if (runner == null)
{
Modified: modules/test/trunk/unit/src/main/org/jboss/unit/tooling/MainBuilder.java
===================================================================
--- modules/test/trunk/unit/src/main/org/jboss/unit/tooling/MainBuilder.java 2007-10-12 14:28:31 UTC (rev 8619)
+++ modules/test/trunk/unit/src/main/org/jboss/unit/tooling/MainBuilder.java 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 = new ModelBuilder(source);
TestSuiteDef suite = builder.build();
TestRunner runner = suite.createRunner();
- TestRunnerEventBroadcasterSupport broadcaster = new TestRunnerEventBroadcasterSupport();
+ TestRunnerEventBroadcaster broadcaster = new TestRunnerEventBroadcaster();
// Add listeners
16 years, 11 months
JBoss Portal SVN: r8619 - in modules/test/trunk/unit/src/main/org/jboss: test/unit/runner/event and 7 other directories.
by portal-commits@lists.jboss.org
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/TestRunnerEventFilter.java
Removed:
modules/test/trunk/unit/src/main/org/jboss/unit/runner/TestRunnerEventBroadcaster.java
Modified:
modules/test/trunk/unit/src/main/org/jboss/test/unit/runner/CompositeTestRunnerTests.java
modules/test/trunk/unit/src/main/org/jboss/test/unit/runner/TestDriverRunnerTests.java
modules/test/trunk/unit/src/main/org/jboss/test/unit/runner/event/TestRunnerEventBroadcasterSupportTests.java
modules/test/trunk/unit/src/main/org/jboss/test/unit/runner/event/TestRunnerLifeCycleFilterTests.java
modules/test/trunk/unit/src/main/org/jboss/unit/runner/AbstractTestRunner.java
modules/test/trunk/unit/src/main/org/jboss/unit/runner/TestRunnerContext.java
modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/TestRunnerContextSupport.java
modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/TestRunnerEventBroadcasterSupport.java
modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/TestRunnerLifeCycleFilter.java
modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/composite/CompositeTestRunner.java
modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/driver/TestDriverRunner.java
modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/event/EventDrivenTestRunner.java
modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/generic/GenericTestRunner.java
modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/pojo/POJOTestRunner.java
Log:
simplified a bit and removed TestRunnerEventBroadcaster interface
Modified: modules/test/trunk/unit/src/main/org/jboss/test/unit/runner/CompositeTestRunnerTests.java
===================================================================
--- modules/test/trunk/unit/src/main/org/jboss/test/unit/runner/CompositeTestRunnerTests.java 2007-10-12 14:11:01 UTC (rev 8618)
+++ modules/test/trunk/unit/src/main/org/jboss/test/unit/runner/CompositeTestRunnerTests.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<TestRunnerEvent> events = new ArrayList<TestRunnerEvent>();
- private static TestRunnerEventBroadcaster listener = new TestRunnerEventBroadcaster()
+ private static TestRunnerEventListener listener = new TestRunnerEventListener()
{
- public void fireEvent(TestRunnerEvent event) throws IllegalArgumentException
+ public void onEvent(TestRunnerEvent event)
{
events.add(event);
}
@@ -180,7 +180,7 @@
protected void internalRun(TestRunnerContext context)
{
invoked = true;
- context.getEventBroadcaster().fireEvent(event);
+ context.getEventListener().onEvent(event);
}
}
Modified: modules/test/trunk/unit/src/main/org/jboss/test/unit/runner/TestDriverRunnerTests.java
===================================================================
--- modules/test/trunk/unit/src/main/org/jboss/test/unit/runner/TestDriverRunnerTests.java 2007-10-12 14:11:01 UTC (rev 8618)
+++ modules/test/trunk/unit/src/main/org/jboss/test/unit/runner/TestDriverRunnerTests.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<TestRunnerEvent> events = new ArrayList<TestRunnerEvent>();
- public void fireEvent(TestRunnerEvent event) throws IllegalArgumentException
+ public void onEvent(TestRunnerEvent event)
{
events.add(event);
}
Modified: modules/test/trunk/unit/src/main/org/jboss/test/unit/runner/event/TestRunnerEventBroadcasterSupportTests.java
===================================================================
--- modules/test/trunk/unit/src/main/org/jboss/test/unit/runner/event/TestRunnerEventBroadcasterSupportTests.java 2007-10-12 14:11:01 UTC (rev 8618)
+++ modules/test/trunk/unit/src/main/org/jboss/test/unit/runner/event/TestRunnerEventBroadcasterSupportTests.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 = 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 = new MyEvent();
support.addListener(listener1);
- support.fireEvent(event);
+ support.onEvent(event);
assertEquals(list(event), listener1.events);
}
@@ -117,7 +117,7 @@
MyEvent event = 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 = 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 = new RuntimeException();
- support.fireEvent(event);
+ support.onEvent(event);
assertEquals(list(event), listener2.events);
//
@@ -147,7 +147,7 @@
listener2.events.clear();
listener1.throwable = null;
listener2.throwable = new RuntimeException();
- support.fireEvent(event);
+ support.onEvent(event);
assertEquals(list(event), listener1.events);
//
@@ -160,7 +160,7 @@
listener2.throwable = null;
try
{
- support.fireEvent(event);
+ support.onEvent(event);
fail("Was expecting an error");
}
catch (Error expected)
@@ -176,7 +176,7 @@
listener2.throwable = 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
===================================================================
--- modules/test/trunk/unit/src/main/org/jboss/test/unit/runner/event/TestRunnerLifeCycleFilterTests.java 2007-10-12 14:11:01 UTC (rev 8618)
+++ modules/test/trunk/unit/src/main/org/jboss/test/unit/runner/event/TestRunnerLifeCycleFilterTests.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 = new TestRunnerEventBroadcaster()
+ TestRunnerEventListener broadcaster = new TestRunnerEventListener()
{
- public void fireEvent(TestRunnerEvent event)
+ public void onEvent(TestRunnerEvent event)
{
TestRunnerLifeCycleFilterTests.event = event;
}
Modified: modules/test/trunk/unit/src/main/org/jboss/unit/runner/AbstractTestRunner.java
===================================================================
--- modules/test/trunk/unit/src/main/org/jboss/unit/runner/AbstractTestRunner.java 2007-10-12 14:11:01 UTC (rev 8618)
+++ modules/test/trunk/unit/src/main/org/jboss/unit/runner/AbstractTestRunner.java 2007-10-12 14:28:31 UTC (rev 8619)
@@ -38,10 +38,10 @@
public final void run(TestRunnerContext context)
{
- TestRunnerEventBroadcaster broadcaster = context.getEventBroadcaster();
- broadcaster.fireEvent(new StartRunnerEvent());
+ TestRunnerEventListener broadcaster = 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/TestRunnerContext.java
===================================================================
--- modules/test/trunk/unit/src/main/org/jboss/unit/runner/TestRunnerContext.java 2007-10-12 14:11:01 UTC (rev 8618)
+++ modules/test/trunk/unit/src/main/org/jboss/unit/runner/TestRunnerContext.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/TestRunnerEventBroadcaster.java
===================================================================
--- modules/test/trunk/unit/src/main/org/jboss/unit/runner/TestRunnerEventBroadcaster.java 2007-10-12 14:11:01 UTC (rev 8618)
+++ modules/test/trunk/unit/src/main/org/jboss/unit/runner/TestRunnerEventBroadcaster.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 <a href="mailto:julien@jboss.org">Julien Viet</a>
- * @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/TestRunnerEventFilter.java
===================================================================
--- modules/test/trunk/unit/src/main/org/jboss/unit/runner/TestRunnerEventFilter.java (rev 0)
+++ modules/test/trunk/unit/src/main/org/jboss/unit/runner/TestRunnerEventFilter.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 <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 1.1 $
+ */
+public abstract class TestRunnerEventFilter implements TestRunnerEventListener
+{
+
+ /** . */
+ private final TestRunnerEventListener broadcaster;
+
+ protected TestRunnerEventFilter(TestRunnerEventListener broadcaster)
+ {
+ if (broadcaster == null)
+ {
+ throw new IllegalArgumentException();
+ }
+ this.broadcaster = 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/TestRunnerContextSupport.java
===================================================================
--- modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/TestRunnerContextSupport.java 2007-10-12 14:11:01 UTC (rev 8618)
+++ modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/TestRunnerContextSupport.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 eventBroadcaster)
+ public TestRunnerContextSupport(TestRunnerEventListener eventListener)
{
- this(new HashMap<String, String>(), NullFilter.getInstance(), eventBroadcaster);
+ this(new HashMap<String, String>(), NullFilter.getInstance(), eventListener);
}
public TestRunnerContextSupport()
@@ -58,11 +56,11 @@
this(new HashMap<String, String>(), NullFilter.getInstance(), new TestRunnerEventBroadcasterSupport());
}
- public TestRunnerContextSupport(Map<String, String> properties, TestFilter filter, TestRunnerEventBroadcaster eventBroadcaster)
+ public TestRunnerContextSupport(Map<String, String> properties, TestFilter filter, TestRunnerEventListener eventListener)
{
this.properties = properties;
this.filter = filter;
- this.eventBroadcaster = eventBroadcaster;
+ this.eventListener = eventListener;
}
public Map<String, String> 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/TestRunnerEventBroadcasterSupport.java
===================================================================
--- modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/TestRunnerEventBroadcasterSupport.java 2007-10-12 14:11:01 UTC (rev 8618)
+++ modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/TestRunnerEventBroadcasterSupport.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 <a href="mailto:julien@jboss.org">Julien Viet</a>
* @version $Revision: 1.1 $
*/
-public class TestRunnerEventBroadcasterSupport implements TestRunnerEventBroadcaster
+public class TestRunnerEventBroadcasterSupport implements TestRunnerEventListener
{
/** . */
@@ -79,7 +78,7 @@
}
}
- public void fireEvent(TestRunnerEvent event)
+ public void onEvent(TestRunnerEvent event)
{
if (event == null)
{
Modified: modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/TestRunnerLifeCycleFilter.java
===================================================================
--- modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/TestRunnerLifeCycleFilter.java 2007-10-12 14:11:01 UTC (rev 8618)
+++ modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/TestRunnerLifeCycleFilter.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 <a href="mailto:julien@jboss.org">Julien Viet</a>
* @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 = broadcaster;
+ super(listener);
}
- public void onEvent(TestRunnerEvent event)
+ protected boolean filter(TestRunnerEvent event)
{
- if (event instanceof StartRunnerEvent || event instanceof EndRunnerEvent)
- {
- return;
- }
- broadcaster.fireEvent(event);
+ return event instanceof StartRunnerEvent || event instanceof EndRunnerEvent;
}
}
Modified: modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/composite/CompositeTestRunner.java
===================================================================
--- modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/composite/CompositeTestRunner.java 2007-10-12 14:11:01 UTC (rev 8618)
+++ modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/composite/CompositeTestRunner.java 2007-10-12 14:28:31 UTC (rev 8619)
@@ -54,7 +54,7 @@
{
// Setup intermediate event filtering
TestRunnerEventBroadcasterSupport tmp = new TestRunnerEventBroadcasterSupport();
- tmp.addListener(new TestRunnerLifeCycleFilter(context.getEventBroadcaster()));
+ tmp.addListener(new TestRunnerLifeCycleFilter(context.getEventListener()));
TestRunnerContextSupport nestedContext = new TestRunnerContextSupport(context.getProperties(), context.getFilter(), tmp);
for (TestRunner runner : runners)
Modified: modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/driver/TestDriverRunner.java
===================================================================
--- modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/driver/TestDriverRunner.java 2007-10-12 14:11:01 UTC (rev 8618)
+++ modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/driver/TestDriverRunner.java 2007-10-12 14:28:31 UTC (rev 8619)
@@ -103,7 +103,7 @@
{
if (testId == null)
{
- context.getEventBroadcaster().fireEvent(new RunnerFailureEvent(Failure.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(Failure.createErrorFailure("Was not able to start the test driver properly", e)));
return;
}
@@ -163,7 +163,7 @@
TestCaseInfo testCaseInfo = (TestCaseInfo)testInfo;
for (Map<String,String> parametrization : parametrizationSet.enumerate(testCaseInfo.getParameters().keySet()))
{
- context.getEventBroadcaster().fireEvent(new StartTestEvent(testId, testCaseInfo));
+ context.getEventListener().onEvent(new StartTestEvent(testId, testCaseInfo));
//
StartTestCommand command = new StartTestCommand(parametrization);
@@ -200,7 +200,7 @@
}
//
- context.getEventBroadcaster().fireEvent(new EndTestEvent(testId, result));
+ context.getEventListener().onEvent(new EndTestEvent(testId, result));
}
}
}
Modified: modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/event/EventDrivenTestRunner.java
===================================================================
--- modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/event/EventDrivenTestRunner.java 2007-10-12 14:11:01 UTC (rev 8618)
+++ modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/event/EventDrivenTestRunner.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/generic/GenericTestRunner.java
===================================================================
--- modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/generic/GenericTestRunner.java 2007-10-12 14:11:01 UTC (rev 8618)
+++ modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/generic/GenericTestRunner.java 2007-10-12 14:28:31 UTC (rev 8619)
@@ -60,7 +60,7 @@
// Setup intermediate event filtering
TestRunnerEventBroadcasterSupport tmp = new TestRunnerEventBroadcasterSupport();
- tmp.addListener(new TestRunnerLifeCycleFilter(context.getEventBroadcaster()));
+ tmp.addListener(new TestRunnerLifeCycleFilter(context.getEventListener()));
TestRunnerContextSupport nestedContext = new TestRunnerContextSupport(context.getProperties(), context.getFilter(), tmp);
//
@@ -93,7 +93,7 @@
}
catch (Exception e)
{
- nestedContext.getEventBroadcaster().fireEvent(new RunnerFailureEvent(Failure.createErrorFailure("Cannot execute test class " + className,e)));
+ nestedContext.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
===================================================================
--- modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/pojo/POJOTestRunner.java 2007-10-12 14:11:01 UTC (rev 8618)
+++ modules/test/trunk/unit/src/main/org/jboss/unit/runner/impl/pojo/POJOTestRunner.java 2007-10-12 14:28:31 UTC (rev 8619)
@@ -61,7 +61,7 @@
{
// Setup intermediate event filtering
TestRunnerEventBroadcasterSupport tmp = new TestRunnerEventBroadcasterSupport();
- tmp.addListener(new TestRunnerLifeCycleFilter(context.getEventBroadcaster()));
+ tmp.addListener(new TestRunnerLifeCycleFilter(context.getEventListener()));
TestRunnerContextSupport nestedContext = new TestRunnerContextSupport(context.getProperties(), context.getFilter(), tmp);
//
@@ -106,7 +106,7 @@
}
catch (Exception e)
{
- nestedContext.getEventBroadcaster().fireEvent(new RunnerFailureEvent(Failure.createErrorFailure("Cannot execute test class " + className,e)));
+ nestedContext.getEventListener().onEvent(new RunnerFailureEvent(Failure.createErrorFailure("Cannot execute test class " + className,e)));
}
}
}
16 years, 11 months