JBoss Portal SVN: r9347 - branches/JBoss_Portal_Branch_2_6/core-admin/src/main/org/jboss/portal/core/admin/ui.
by portal-commits@lists.jboss.org
Author: chris.laprun(a)jboss.com
Date: 2007-12-14 10:42:57 -0500 (Fri, 14 Dec 2007)
New Revision: 9347
Modified:
branches/JBoss_Portal_Branch_2_6/core-admin/src/main/org/jboss/portal/core/admin/ui/AdminPropertyResolver.java
Log:
- JBPORTAL-1843: Fixed NPE if there is no display name available.
Modified: branches/JBoss_Portal_Branch_2_6/core-admin/src/main/org/jboss/portal/core/admin/ui/AdminPropertyResolver.java
===================================================================
--- branches/JBoss_Portal_Branch_2_6/core-admin/src/main/org/jboss/portal/core/admin/ui/AdminPropertyResolver.java 2007-12-14 15:23:52 UTC (rev 9346)
+++ branches/JBoss_Portal_Branch_2_6/core-admin/src/main/org/jboss/portal/core/admin/ui/AdminPropertyResolver.java 2007-12-14 15:42:57 UTC (rev 9347)
@@ -214,7 +214,6 @@
});
instanceDecorator.setProperty("displayName", new InstanceDisplayNamePropertyDecorator());
registerDecorator(Instance.class, instanceDecorator);
-
//
SimpleBeanDecorator portalObjectDecorator = new SimpleBeanDecorator()
@@ -439,9 +438,16 @@
private String getValueForRequestLocale(LocalizedString string)
{
- FacesContext ctx = FacesContext.getCurrentInstance();
- Locale locale = ctx.getExternalContext().getRequestLocale();
- return string.getString(locale, true);
+ if (string != null)
+ {
+ FacesContext ctx = FacesContext.getCurrentInstance();
+ Locale locale = ctx.getExternalContext().getRequestLocale();
+ return string.getString(locale, true);
+ }
+ else
+ {
+ return null;
+ }
}
private static class PortletIconPropertyDecorator extends AbstractPropertyDecorator
18 years, 4 months
JBoss Portal SVN: r9346 - demo/trunk/conf.
by portal-commits@lists.jboss.org
Author: thomas.heute(a)jboss.com
Date: 2007-12-14 10:23:52 -0500 (Fri, 14 Dec 2007)
New Revision: 9346
Modified:
demo/trunk/conf/default-object.xml
Log:
Instance-id has changed
Modified: demo/trunk/conf/default-object.xml
===================================================================
--- demo/trunk/conf/default-object.xml 2007-12-14 15:18:59 UTC (rev 9345)
+++ demo/trunk/conf/default-object.xml 2007-12-14 15:23:52 UTC (rev 9346)
@@ -552,8 +552,8 @@
</property>
</properties>
<window>
- <window-name>WSRPConsumersConfigurationPortletWindow</window-name>
- <instance-ref>WSRPConsumersConfigurationPortletInstance</instance-ref>
+ <window-name>WSRPConfigurationPortletInstance</window-name>
+ <instance-ref>WSRPConfigurationPortletInstance</instance-ref>
<region>center</region>
<height>0</height>
<properties>
18 years, 4 months
JBoss Portal SVN: r9345 - branches/JBoss_Portal_Branch_2_6/core-samples.
by portal-commits@lists.jboss.org
Author: sviluppatorefico
Date: 2007-12-14 10:18:59 -0500 (Fri, 14 Dec 2007)
New Revision: 9345
Modified:
branches/JBoss_Portal_Branch_2_6/core-samples/.classpath
Log:
added servlet-api.jar into classpath
Modified: branches/JBoss_Portal_Branch_2_6/core-samples/.classpath
===================================================================
--- branches/JBoss_Portal_Branch_2_6/core-samples/.classpath 2007-12-14 13:53:40 UTC (rev 9344)
+++ branches/JBoss_Portal_Branch_2_6/core-samples/.classpath 2007-12-14 15:18:59 UTC (rev 9345)
@@ -16,5 +16,6 @@
<classpathentry kind="lib" path="/thirdparty/jbossas/core-libs/lib/jboss-jmx.jar" sourcepath="/JBoss_AS_4.0.5/jmx/src/main"/>
<classpathentry kind="lib" path="/thirdparty/jboss-portal/modules/portlet/lib/portal-portlet-jsr168api-lib.jar"/>
<classpathentry kind="lib" path="/thirdparty/jboss-portal/modules/portlet/lib/portal-portlet-lib.jar"/>
+ <classpathentry kind="lib" path="/thirdparty/sun-servlet/lib/servlet-api.jar"/>
<classpathentry kind="output" path="bin"/>
</classpath>
18 years, 4 months
JBoss Portal SVN: r9344 - in modules/portlet/trunk/test/src/resources: metadata/customPortletMode and 3 other directories.
by portal-commits@lists.jboss.org
Author: emuckenhuber
Date: 2007-12-14 08:53:40 -0500 (Fri, 14 Dec 2007)
New Revision: 9344
Added:
modules/portlet/trunk/test/src/resources/metadata/general/portlet-app_1_0.xml
modules/portlet/trunk/test/src/resources/metadata/general/portlet-app_2_0.xml
Modified:
modules/portlet/trunk/test/src/resources/metadata/customPortletMode/portlet2.xml
modules/portlet/trunk/test/src/resources/metadata/general/portlet2-jsr286.xml
modules/portlet/trunk/test/src/resources/metadata/portlet-app_2_0.xsd
modules/portlet/trunk/test/src/resources/metadata/portlet/portlet2-jsr286.xml
modules/portlet/trunk/test/src/resources/test/local-jboss-unit.xml
Log:
- xsd update to rev.30 and xml updates
Modified: modules/portlet/trunk/test/src/resources/metadata/customPortletMode/portlet2.xml
===================================================================
--- modules/portlet/trunk/test/src/resources/metadata/customPortletMode/portlet2.xml 2007-12-14 13:51:58 UTC (rev 9343)
+++ modules/portlet/trunk/test/src/resources/metadata/customPortletMode/portlet2.xml 2007-12-14 13:53:40 UTC (rev 9344)
@@ -31,14 +31,11 @@
<description xml:lang="de">eigener portlet modus</description>
<portlet-mode>Custom</portlet-mode>
<portal-managed>true</portal-managed>
- <decoration-name>Portlet Mode One</decoration-name>
- <decoration-name xml:lang="de">Eigener Portlet Modus Eins</decoration-name>
</custom-portlet-mode>
<custom-portlet-mode>
<portlet-mode>Custom2</portlet-mode>
<portal-managed>false</portal-managed>
- <decoration-name>Portlet Mode One</decoration-name>
</custom-portlet-mode>
<custom-portlet-mode>
Added: modules/portlet/trunk/test/src/resources/metadata/general/portlet-app_1_0.xml
===================================================================
--- modules/portlet/trunk/test/src/resources/metadata/general/portlet-app_1_0.xml (rev 0)
+++ modules/portlet/trunk/test/src/resources/metadata/general/portlet-app_1_0.xml 2007-12-14 13:53:40 UTC (rev 9344)
@@ -0,0 +1,65 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<portlet-app xmlns="http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd"
+ version="1.0"
+ id="id">
+ <portlet id="id">
+ <description xml:lang="en">description</description>
+ <portlet-name>portlet-name</portlet-name>
+ <display-name xml:lang="en">display-name</display-name>
+ <portlet-class>portlet-class</portlet-class>
+ <init-param id="id">
+ <description xml:lang="en">description</description>
+ <name>name</name>
+ <value>value</value>
+ </init-param>
+ <expiration-cache>0</expiration-cache>
+ <supports id="id">
+ <mime-type>mime-type</mime-type>
+ <portlet-mode>portlet-mode</portlet-mode>
+ </supports>
+ <supported-locale>supported-locale</supported-locale>
+ <resource-bundle>resource-bundle</resource-bundle>
+ <portlet-info id="id">
+ <title>title</title>
+ <short-title>short-title</short-title>
+ <keywords>keywords</keywords>
+ </portlet-info>
+ <portlet-preferences id="id">
+ <preference id="id">
+ <name>name</name>
+ <value>value</value>
+ <read-only>true</read-only>
+ </preference>
+ <preferences-validator>preferences-validator</preferences-validator>
+ </portlet-preferences>
+ <security-role-ref id="id">
+ <description xml:lang="">description</description>
+ <role-name>NMTOKEN</role-name>
+ <role-link>role-link</role-link>
+ </security-role-ref>
+ </portlet>
+ <custom-portlet-mode id="id">
+ <description xml:lang="en">description</description>
+ <portlet-mode>portlet-mode</portlet-mode>
+ </custom-portlet-mode>
+ <custom-window-state id="id">
+ <description xml:lang="en">description</description>
+ <window-state>window-state</window-state>
+ </custom-window-state>
+ <user-attribute id="">
+ <description xml:lang="en">description</description>
+ <name>name</name>
+ </user-attribute>
+ <security-constraint id="id">
+ <display-name xml:lang="en">display-name</display-name>
+ <portlet-collection>
+ <portlet-name>portlet-name</portlet-name>
+ </portlet-collection>
+ <user-data-constraint id="">
+ <description xml:lang="">description</description>
+ <transport-guarantee>NONE</transport-guarantee>
+ </user-data-constraint>
+ </security-constraint>
+</portlet-app>
Added: modules/portlet/trunk/test/src/resources/metadata/general/portlet-app_2_0.xml
===================================================================
--- modules/portlet/trunk/test/src/resources/metadata/general/portlet-app_2_0.xml (rev 0)
+++ modules/portlet/trunk/test/src/resources/metadata/general/portlet-app_2_0.xml 2007-12-14 13:53:40 UTC (rev 9344)
@@ -0,0 +1,118 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<portlet-app xmlns="http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd"
+ version="2.0"
+ id="id">
+ <portlet id="id">
+ <description xml:lang="en">description</description>
+ <portlet-name>portlet-name</portlet-name>
+ <display-name xml:lang="en">display-name</display-name>
+ <portlet-class>portlet-class</portlet-class>
+ <init-param id="id">
+ <description xml:lang="en">description</description>
+ <name>name</name>
+ <value>value</value>
+ </init-param>
+ <expiration-cache>0</expiration-cache>
+ <cache-scope>PRIVATE</cache-scope>
+ <supports id="id">
+ <mime-type>mime-type</mime-type>
+ <portlet-mode>portlet-mode</portlet-mode>
+ <window-state>window-state</window-state>
+ </supports>
+ <supported-locale>supported-locale</supported-locale>
+ <resource-bundle>resource-bundle</resource-bundle>
+ <portlet-info id="id">
+ <title>title</title>
+ <short-title>short-title</short-title>
+ <keywords>keywords</keywords>
+ </portlet-info>
+ <portlet-preferences id="id">
+ <preference id="id">
+ <name>name</name>
+ <value>value</value>
+ <read-only>true</read-only>
+ </preference>
+ <preferences-validator>preferences-validator</preferences-validator>
+ </portlet-preferences>
+ <security-role-ref id="id">
+ <description xml:lang="en">description</description>
+ <role-name>NMTOKEN</role-name>
+ <role-link>role-link</role-link>
+ </security-role-ref>
+ <supported-processing-event id="id">
+ <qname>QName</qname>
+ </supported-processing-event>
+ <supported-publishing-event id="id">
+ <qname>QName</qname>
+ </supported-publishing-event>
+ <supported-public-render-parameter>supported-public-render-parameter</supported-public-render-parameter>
+ <container-runtime-option>
+ <name>name</name>
+ <value>value</value>
+ </container-runtime-option>
+ </portlet>
+ <custom-portlet-mode id="id">
+ <description xml:lang="en">description</description>
+ <portlet-mode>portlet-mode</portlet-mode>
+ <portal-managed>true</portal-managed>
+ </custom-portlet-mode>
+ <custom-window-state id="id">
+ <description xml:lang="en">description</description>
+ <window-state>window-state</window-state>
+ </custom-window-state>
+ <user-attribute id="id">
+ <description xml:lang="en">description</description>
+ <name>name</name>
+ </user-attribute>
+ <security-constraint id="id">
+ <display-name xml:lang="en">display-name</display-name>
+ <portlet-collection>
+ <portlet-name>portlet-name</portlet-name>
+ </portlet-collection>
+ <user-data-constraint id="id">
+ <description xml:lang="en">description</description>
+ <transport-guarantee>CONFIDENTIAL</transport-guarantee>
+ </user-data-constraint>
+ </security-constraint>
+ <resource-bundle>resource-bundle</resource-bundle>
+ <filter>
+ <description xml:lang="en">description</description>
+ <display-name xml:lang="en">display-name</display-name>
+ <filter-name>filter-name</filter-name>
+ <filter-class>filter-class</filter-class>
+ <lifecycle>lifecycle</lifecycle>
+ <init-param id="">
+ <description xml:lang="en">description</description>
+ <name>name</name>
+ <value>value</value>
+ </init-param>
+ </filter>
+ <filter-mapping>
+ <filter-name>filter-name</filter-name>
+ <portlet-name>portlet-name</portlet-name>
+ </filter-mapping>
+ <default-namespace>http://tempuri.org</default-namespace>
+ <event-definition id="id">
+ <description xml:lang="en">description</description>
+ <qname>QName</qname>
+ <alias>QName</alias>
+ <value-type>value-type</value-type>
+ </event-definition>
+ <public-render-parameter id="id">
+ <description xml:lang="en">description</description>
+ <identifier>identifier</identifier>
+ <qname>QName</qname>
+ <alias>QName</alias>
+ </public-render-parameter>
+ <listener id="id">
+ <description xml:lang="en">description</description>
+ <display-name xml:lang="en">display-name</display-name>
+ <listener-class>listener-class</listener-class>
+ </listener>
+ <container-runtime-option>
+ <name>name</name>
+ <value>value</value>
+ </container-runtime-option>
+</portlet-app>
Modified: modules/portlet/trunk/test/src/resources/metadata/general/portlet2-jsr286.xml
===================================================================
--- modules/portlet/trunk/test/src/resources/metadata/general/portlet2-jsr286.xml 2007-12-14 13:51:58 UTC (rev 9343)
+++ modules/portlet/trunk/test/src/resources/metadata/general/portlet2-jsr286.xml 2007-12-14 13:53:40 UTC (rev 9344)
@@ -344,6 +344,19 @@
<alias>Parameter1</alias>
<alias>Parameter2</alias>
</public-render-parameter>
+
+ <listener id="myListener1">
+ <description>Description EN</description>
+ <description xml:lang="de">Beschreibung</description>
+ <display-name>My Listener One</display-name>
+ <display-name xml:lang="de">Mein Zuhörer Eins</display-name>
+ <listener-class>org.jboss.portal.portlet.test.listener.MyListener</listener-class>
+ </listener>
+
+ <listener id="myListener2">
+ <display-name>My Listener Two</display-name>
+ <listener-class>org.jboss.portal.portlet.test.listener.MyListenerTwo</listener-class>
+ </listener>
<container-runtime-option>
<name>foo</name>
Modified: modules/portlet/trunk/test/src/resources/metadata/portlet/portlet2-jsr286.xml
===================================================================
--- modules/portlet/trunk/test/src/resources/metadata/portlet/portlet2-jsr286.xml 2007-12-14 13:51:58 UTC (rev 9343)
+++ modules/portlet/trunk/test/src/resources/metadata/portlet/portlet2-jsr286.xml 2007-12-14 13:53:40 UTC (rev 9344)
@@ -93,14 +93,6 @@
<supported-public-render-parameter>bar</supported-public-render-parameter>
<supported-public-render-parameter>foo2</supported-public-render-parameter>
<supported-public-render-parameter>foo2bar</supported-public-render-parameter>
-
- <url-generation-listener>
- org.jboss.portal.test.url.generation.listener
- </url-generation-listener>
- <url-generation-listener>
- org.jboss.portal.test.url.generation.listener.foo
- </url-generation-listener>
-
<container-runtime-option>
<name>option1</name>
<value>value1</value>
Modified: modules/portlet/trunk/test/src/resources/metadata/portlet-app_2_0.xsd
===================================================================
--- modules/portlet/trunk/test/src/resources/metadata/portlet-app_2_0.xsd 2007-12-14 13:51:58 UTC (rev 9343)
+++ modules/portlet/trunk/test/src/resources/metadata/portlet-app_2_0.xsd 2007-12-14 13:53:40 UTC (rev 9344)
@@ -1,13 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<schema xmlns="http://www.w3.org/2001/XMLSchema"
- xmlns:portlet="http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd"
- xmlns:xs="http://www.w3.org/2001/XMLSchema"
- targetNamespace="http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd"
- elementFormDefault="qualified"
- attributeFormDefault="unqualified"
- version="2.0"
- xml:lang="en">
-
+<schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:portlet="http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd" xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd" elementFormDefault="qualified" attributeFormDefault="unqualified" version="2.0" xml:lang="en">
<annotation>
<documentation>
This is the XML Schema for the Portlet 2.0 deployment descriptor.
@@ -144,10 +136,11 @@
<element name="default-namespace" type="xs:anyURI" minOccurs="0"/>
<element name="event-definition" type="portlet:event-definitionType" minOccurs="0" maxOccurs="unbounded"/>
<element name="public-render-parameter" type="portlet:public-render-parameterType" minOccurs="0" maxOccurs="unbounded"/>
+ <element name="listener" type="portlet:listenerType" minOccurs="0" maxOccurs="unbounded"/>
<element name="container-runtime-option" type="portlet:container-runtime-optionType" minOccurs="0" maxOccurs="unbounded"/>
</sequence>
- <attribute name="version" type="string" use="required"/>
- <attribute name="id" type="string" use="optional"/>
+ <attribute name="version" type="portlet:string" use="required"/>
+ <attribute name="id" type="portlet:string" use="optional"/>
</complexType>
<complexType name="cache-scopeType">
<annotation>
@@ -159,7 +152,7 @@
</documentation>
</annotation>
<simpleContent>
- <extension base="string"/>
+ <extension base="portlet:string"/>
</simpleContent>
</complexType>
<complexType name="custom-portlet-modeType">
@@ -170,12 +163,6 @@
If the portal does not need to provide some management functionality
for this portlet mode, the portal-managed element needs to be set
to "false", otherwise to "true". Default is "true".
- If the portlet provides a decoration-name for this portlet mode the portal is
- encouraged to use the provided name as key under which in the portlet
- resource bundle the localized value of the decoration name is available.
- If the portlet does not provide a resource bundle the portal should use
- the name provided with the decoration-name tag.
- decorations.
Used in: portlet-app
</documentation>
</annotation>
@@ -183,9 +170,8 @@
<element name="description" type="portlet:descriptionType" minOccurs="0" maxOccurs="unbounded"/>
<element name="portlet-mode" type="portlet:portlet-modeType"/>
<element name="portal-managed" type="portlet:portal-managedType" minOccurs="0"/>
- <element name="decoration-name" type="portlet:display-nameType" minOccurs="0" maxOccurs="unbounded"/>
</sequence>
- <attribute name="id" type="string" use="optional"/>
+ <attribute name="id" type="portlet:string" use="optional"/>
</complexType>
<complexType name="custom-window-stateType">
<annotation>
@@ -199,12 +185,12 @@
<element name="description" type="portlet:descriptionType" minOccurs="0" maxOccurs="unbounded"/>
<element name="window-state" type="portlet:window-stateType"/>
</sequence>
- <attribute name="id" type="string" use="optional"/>
+ <attribute name="id" type="portlet:string" use="optional"/>
</complexType>
<complexType name="expiration-cacheType">
<annotation>
<documentation>
- Expriation-time defines the time in seconds after which the portlet output expires.
+ Expiration-time defines the time in seconds after which the portlet output expires.
-1 indicates that the output never expires.
Used in: portlet
</documentation>
@@ -226,7 +212,7 @@
<element name="name" type="portlet:nameType"/>
<element name="value" type="portlet:valueType"/>
</sequence>
- <attribute name="id" type="string" use="optional"/>
+ <attribute name="id" type="portlet:string" use="optional"/>
</complexType>
<complexType name="keywordsType">
<annotation>
@@ -237,7 +223,7 @@
</documentation>
</annotation>
<simpleContent>
- <extension base="string"/>
+ <extension base="portlet:string"/>
</simpleContent>
</complexType>
<complexType name="mime-typeType">
@@ -250,7 +236,7 @@
</documentation>
</annotation>
<simpleContent>
- <extension base="string"/>
+ <extension base="portlet:string"/>
</simpleContent>
</complexType>
<complexType name="nameType">
@@ -261,7 +247,7 @@
</documentation>
</annotation>
<simpleContent>
- <extension base="string"/>
+ <extension base="portlet:string"/>
</simpleContent>
</complexType>
<complexType name="portletType">
@@ -281,22 +267,16 @@
<element name="cache-scope" type="portlet:cache-scopeType" minOccurs="0"/>
<element name="supports" type="portlet:supportsType" maxOccurs="unbounded"/>
<element name="supported-locale" type="portlet:supported-localeType" minOccurs="0" maxOccurs="unbounded"/>
- <choice>
- <sequence>
- <element name="resource-bundle" type="portlet:resource-bundleType"/>
- <element name="portlet-info" type="portlet:portlet-infoType" minOccurs="0"/>
- </sequence>
- <element name="portlet-info" type="portlet:portlet-infoType"/>
- </choice>
+ <element name="resource-bundle" type="portlet:resource-bundleType" minOccurs="0"/>
+ <element name="portlet-info" type="portlet:portlet-infoType" minOccurs="0"/>
<element name="portlet-preferences" type="portlet:portlet-preferencesType" minOccurs="0"/>
<element name="security-role-ref" type="portlet:security-role-refType" minOccurs="0" maxOccurs="unbounded"/>
<element name="supported-processing-event" type="portlet:event-definition-referenceType" minOccurs="0" maxOccurs="unbounded"/>
<element name="supported-publishing-event" type="portlet:event-definition-referenceType" minOccurs="0" maxOccurs="unbounded"/>
- <element name="supported-public-render-parameter" type="string" minOccurs="0" maxOccurs="unbounded"/>
- <element name="url-generation-listener" type="portlet:fully-qualified-classType" minOccurs="0" maxOccurs="unbounded"/>
+ <element name="supported-public-render-parameter" type="portlet:string" minOccurs="0" maxOccurs="unbounded"/>
<element name="container-runtime-option" type="portlet:container-runtime-optionType" minOccurs="0" maxOccurs="unbounded"/>
</sequence>
- <attribute name="id" type="string" use="optional"/>
+ <attribute name="id" type="portlet:string" use="optional"/>
</complexType>
<simpleType name="portlet-classType">
<annotation>
@@ -368,7 +348,7 @@
<element name="display-name" type="portlet:display-nameType" minOccurs="0" maxOccurs="unbounded"/>
<element name="filter-name" type="portlet:filter-nameType"/>
<element name="filter-class" type="portlet:fully-qualified-classType"/>
- <element name="lifecycle" type="string" maxOccurs="unbounded"/>
+ <element name="lifecycle" type="portlet:string" maxOccurs="unbounded"/>
<element name="init-param" type="portlet:init-paramType" minOccurs="0" maxOccurs="unbounded"/>
</sequence>
</complexType>
@@ -399,34 +379,48 @@
<element name="description" type="portlet:descriptionType" minOccurs="0" maxOccurs="unbounded"/>
<choice>
<element name="qname" type="xs:QName"/>
- <element name="name" type="string"/>
+ <element name="name" type="xs:NCName"/>
</choice>
<element name="alias" type="xs:QName" minOccurs="0" maxOccurs="unbounded"/>
<element name="value-type" type="portlet:fully-qualified-classType" minOccurs="0"/>
</sequence>
- <attribute name="id" type="string" use="optional"/>
+ <attribute name="id" type="portlet:string" use="optional"/>
</complexType>
<complexType name="event-definition-referenceType">
<annotation>
<documentation>
- The event-definition-referenceType is used to refernece events
- declared with the event-definition element on application level.
+ The event-definition-referenceType is used to reference events
+ declared with the event-definition element at application level.
Used in: portlet
</documentation>
</annotation>
<choice>
<element name="qname" type="xs:QName"/>
- <element name="name" type="string"/>
+ <element name="name" type="xs:NCName"/>
</choice>
- <attribute name="id" type="string" use="optional"/>
+ <attribute name="id" type="portlet:string" use="optional"/>
</complexType>
+ <complexType name="listenerType">
+ <annotation>
+ <documentation>
+ The listenerType is used to declare listeners for this portlet application.
+ Used in: portlet-app
+ </documentation>
+ </annotation>
+ <sequence>
+ <element name="description" type="portlet:descriptionType" minOccurs="0" maxOccurs="unbounded"/>
+ <element name="display-name" type="portlet:display-nameType" minOccurs="0" maxOccurs="unbounded"/>
+ <element name="listener-class" type="portlet:fully-qualified-classType"/>
+ </sequence>
+ <attribute name="id" type="portlet:string" use="optional"/>
+ </complexType>
<complexType name="portlet-infoType">
<sequence>
<element name="title" type="portlet:titleType" minOccurs="0"/>
<element name="short-title" type="portlet:short-titleType" minOccurs="0"/>
<element name="keywords" type="portlet:keywordsType" minOccurs="0"/>
</sequence>
- <attribute name="id" type="string" use="optional"/>
+ <attribute name="id" type="portlet:string" use="optional"/>
</complexType>
<simpleType name="portal-managedType">
<annotation>
@@ -456,7 +450,7 @@
</documentation>
</annotation>
<simpleContent>
- <extension base="string"/>
+ <extension base="portlet:string"/>
</simpleContent>
</complexType>
<complexType name="portlet-nameType">
@@ -469,7 +463,7 @@
</documentation>
</annotation>
<simpleContent>
- <extension base="string"/>
+ <extension base="portlet:string"/>
</simpleContent>
</complexType>
<complexType name="portlet-preferencesType">
@@ -483,7 +477,7 @@
<element name="preference" type="portlet:preferenceType" minOccurs="0" maxOccurs="unbounded"/>
<element name="preferences-validator" type="portlet:preferences-validatorType" minOccurs="0"/>
</sequence>
- <attribute name="id" type="string" use="optional"/>
+ <attribute name="id" type="portlet:string" use="optional"/>
</complexType>
<complexType name="preferenceType">
<annotation>
@@ -498,7 +492,7 @@
<element name="value" type="portlet:valueType" minOccurs="0" maxOccurs="unbounded"/>
<element name="read-only" type="portlet:read-onlyType" minOccurs="0"/>
</sequence>
- <attribute name="id" type="string" use="optional"/>
+ <attribute name="id" type="portlet:string" use="optional"/>
</complexType>
<simpleType name="preferences-validatorType">
<annotation>
@@ -539,7 +533,7 @@
</documentation>
</annotation>
<simpleContent>
- <extension base="string"/>
+ <extension base="portlet:string"/>
</simpleContent>
</complexType>
<complexType name="role-linkType">
@@ -552,7 +546,7 @@
</documentation>
</annotation>
<simpleContent>
- <extension base="string"/>
+ <extension base="portlet:string"/>
</simpleContent>
</complexType>
<complexType name="security-constraintType">
@@ -568,7 +562,7 @@
<element name="portlet-collection" type="portlet:portlet-collectionType"/>
<element name="user-data-constraint" type="portlet:user-data-constraintType"/>
</sequence>
- <attribute name="id" type="string" use="optional"/>
+ <attribute name="id" type="portlet:string" use="optional"/>
</complexType>
<complexType name="security-role-refType">
<annotation>
@@ -591,7 +585,7 @@
<element name="role-name" type="portlet:role-nameType"/>
<element name="role-link" type="portlet:role-linkType" minOccurs="0"/>
</sequence>
- <attribute name="id" type="string" use="optional"/>
+ <attribute name="id" type="portlet:string" use="optional"/>
</complexType>
<complexType name="public-render-parameterType">
<annotation>
@@ -604,14 +598,14 @@
</annotation>
<sequence>
<element name="description" type="portlet:descriptionType" minOccurs="0" maxOccurs="unbounded"/>
- <element name="identifier" type="string"/>
+ <element name="identifier" type="portlet:string"/>
<choice>
<element name="qname" type="xs:QName"/>
- <element name="name" type="string"/>
+ <element name="name" type="xs:NCName"/>
</choice>
<element name="alias" type="xs:QName" minOccurs="0" maxOccurs="unbounded"/>
</sequence>
- <attribute name="id" type="string" use="optional"/>
+ <attribute name="id" type="portlet:string" use="optional"/>
</complexType>
<complexType name="short-titleType">
<annotation>
@@ -621,7 +615,7 @@
</documentation>
</annotation>
<simpleContent>
- <extension base="string"/>
+ <extension base="portlet:string"/>
</simpleContent>
</complexType>
<complexType name="supportsType">
@@ -638,7 +632,7 @@
<element name="portlet-mode" type="portlet:portlet-modeType" minOccurs="0" maxOccurs="unbounded"/>
<element name="window-state" type="portlet:window-stateType" minOccurs="0" maxOccurs="unbounded"/>
</sequence>
- <attribute name="id" type="string" use="optional"/>
+ <attribute name="id" type="portlet:string" use="optional"/>
</complexType>
<complexType name="supported-localeType">
<annotation>
@@ -648,7 +642,7 @@
</documentation>
</annotation>
<simpleContent>
- <extension base="string"/>
+ <extension base="portlet:string"/>
</simpleContent>
</complexType>
<complexType name="titleType">
@@ -659,7 +653,7 @@
</documentation>
</annotation>
<simpleContent>
- <extension base="string"/>
+ <extension base="portlet:string"/>
</simpleContent>
</complexType>
<simpleType name="transport-guaranteeType">
@@ -703,7 +697,7 @@
<element name="description" type="portlet:descriptionType" minOccurs="0" maxOccurs="unbounded"/>
<element name="name" type="portlet:nameType"/>
</sequence>
- <attribute name="id" type="string" use="optional"/>
+ <attribute name="id" type="portlet:string" use="optional"/>
</complexType>
<complexType name="user-data-constraintType">
<annotation>
@@ -718,7 +712,7 @@
<element name="description" type="portlet:descriptionType" minOccurs="0" maxOccurs="unbounded"/>
<element name="transport-guarantee" type="portlet:transport-guaranteeType"/>
</sequence>
- <attribute name="id" type="string" use="optional"/>
+ <attribute name="id" type="portlet:string" use="optional"/>
</complexType>
<complexType name="valueType">
<annotation>
@@ -728,7 +722,7 @@
</documentation>
</annotation>
<simpleContent>
- <extension base="string"/>
+ <extension base="portlet:string"/>
</simpleContent>
</complexType>
<complexType name="window-stateType">
@@ -739,7 +733,7 @@
</documentation>
</annotation>
<simpleContent>
- <extension base="string"/>
+ <extension base="portlet:string"/>
</simpleContent>
</complexType>
<!--- everything below is copied from j2ee_1_4.xsd -->
@@ -761,7 +755,7 @@
</documentation>
</annotation>
<simpleContent>
- <extension base="string">
+ <extension base="portlet:string">
<attribute ref="xml:lang"/>
</extension>
</simpleContent>
@@ -810,7 +804,7 @@
<simpleType name="string">
<annotation>
<documentation>
- This is a special string datatype that is defined by J2EE
+ This is a special string datatype that is defined by JavaEE
as a base type for defining collapsed strings. When
schemas require trailing/leading space elimination as
well as collapsing the existing whitespace, this base
Modified: modules/portlet/trunk/test/src/resources/test/local-jboss-unit.xml
===================================================================
--- modules/portlet/trunk/test/src/resources/test/local-jboss-unit.xml 2007-12-14 13:51:58 UTC (rev 9343)
+++ modules/portlet/trunk/test/src/resources/test/local-jboss-unit.xml 2007-12-14 13:53:40 UTC (rev 9344)
@@ -21,30 +21,66 @@
</test>
<test>
<class name="org.jboss.portal.portlet.test.metadata.CustomPortletModeTestEverythingTestCase" />
+ <parameter name="parser">
+ <value>annotation</value>
+ <value>factory</value>
+ </parameter>
</test>
<test>
<class name="org.jboss.portal.portlet.test.metadata.CustomWindowStateTestEverythingTestCase" />
+ <parameter name="parser">
+ <value>annotation</value>
+ <value>factory</value>
+ </parameter>
</test>
<test>
<class name="org.jboss.portal.portlet.test.metadata.EventTestEverythingTestCase" />
+ <parameter name="parser">
+ <value>annotation</value>
+ <value>factory</value>
+ </parameter>
</test>
<test>
<class name="org.jboss.portal.portlet.test.metadata.FilterTestEverythingTestCase" />
+ <parameter name="parser">
+ <value>annotation</value>
+ <value>factory</value>
+ </parameter>
</test>
<test>
<class name="org.jboss.portal.portlet.test.metadata.GeneralMetaDataTestCase" />
+ <parameter name="parser">
+ <value>annotation</value>
+ <value>factory</value>
+ </parameter>
</test>
<test>
<class name="org.jboss.portal.portlet.test.metadata.PortletTestEverythingTestCase" />
+ <parameter name="parser">
+ <value>annotation</value>
+ <value>factory</value>
+ </parameter>
</test>
<test>
<class name="org.jboss.portal.portlet.test.metadata.RenderParameterTestEverythingTestCase" />
+ <parameter name="parser">
+ <value>annotation</value>
+ <value>factory</value>
+ </parameter>
</test>
<test>
<class name="org.jboss.portal.portlet.test.metadata.SecurityConstraintTestEverythingTestCase" />
+ <parameter name="parser">
+ <value>annotation</value>
+ <value>factory</value>
+ </parameter>
</test>
<test>
<class name="org.jboss.portal.portlet.test.metadata.UserAttributeTestEverythingTestCase" />
+ <parameter name="parser">
+ <value>annotation</value>
+ <value>factory</value>
+ </parameter>
</test>
</pojo>
</jboss-unit>
18 years, 4 months
JBoss Portal SVN: r9343 - in modules/portlet/trunk/test/src/main/org/jboss/portal/portlet/test/metadata: factory and 7 other directories.
by portal-commits@lists.jboss.org
Author: emuckenhuber
Date: 2007-12-14 08:51:58 -0500 (Fri, 14 Dec 2007)
New Revision: 9343
Added:
modules/portlet/trunk/test/src/main/org/jboss/portal/portlet/test/metadata/factory/
modules/portlet/trunk/test/src/main/org/jboss/portal/portlet/test/metadata/factory/LocalizedStringBuilder.java
modules/portlet/trunk/test/src/main/org/jboss/portal/portlet/test/metadata/factory/PortletApplicationModelFactory.java
modules/portlet/trunk/test/src/main/org/jboss/portal/portlet/test/metadata/impl/ListenerMetaData.java
modules/portlet/trunk/test/src/main/org/jboss/portal/portlet/test/metadata/impl/adapter/CustomPortletModeAdapter.java
modules/portlet/trunk/test/src/main/org/jboss/portal/portlet/test/metadata/impl/adapter/CustomWindowStateAdapter.java
modules/portlet/trunk/test/src/main/org/jboss/portal/portlet/test/metadata/impl/common/DescribableMetaData.java
Removed:
modules/portlet/trunk/test/src/main/org/jboss/portal/portlet/test/metadata/SimplePortletTestCase.java
modules/portlet/trunk/test/src/main/org/jboss/portal/portlet/test/metadata/impl/common/DescribeableMetaData.java
Modified:
modules/portlet/trunk/test/src/main/org/jboss/portal/portlet/test/metadata/AbstractMetaDataTestCase.java
modules/portlet/trunk/test/src/main/org/jboss/portal/portlet/test/metadata/CustomPortletModeTestEverythingTestCase.java
modules/portlet/trunk/test/src/main/org/jboss/portal/portlet/test/metadata/CustomWindowStateTestEverythingTestCase.java
modules/portlet/trunk/test/src/main/org/jboss/portal/portlet/test/metadata/EventTestEverythingTestCase.java
modules/portlet/trunk/test/src/main/org/jboss/portal/portlet/test/metadata/FilterTestEverythingTestCase.java
modules/portlet/trunk/test/src/main/org/jboss/portal/portlet/test/metadata/GeneralMetaDataTestCase.java
modules/portlet/trunk/test/src/main/org/jboss/portal/portlet/test/metadata/PortletTestEverythingTestCase.java
modules/portlet/trunk/test/src/main/org/jboss/portal/portlet/test/metadata/RenderParameterTestEverythingTestCase.java
modules/portlet/trunk/test/src/main/org/jboss/portal/portlet/test/metadata/SecurityConstraintTestEverythingTestCase.java
modules/portlet/trunk/test/src/main/org/jboss/portal/portlet/test/metadata/UserAttributeTestEverythingTestCase.java
modules/portlet/trunk/test/src/main/org/jboss/portal/portlet/test/metadata/ValidationErrorHandler.java
modules/portlet/trunk/test/src/main/org/jboss/portal/portlet/test/metadata/impl/CustomPortletModeMetaData.java
modules/portlet/trunk/test/src/main/org/jboss/portal/portlet/test/metadata/impl/CustomWindowStateMetaData.java
modules/portlet/trunk/test/src/main/org/jboss/portal/portlet/test/metadata/impl/PortletApplication10MetaData.java
modules/portlet/trunk/test/src/main/org/jboss/portal/portlet/test/metadata/impl/PortletApplication20MetaData.java
modules/portlet/trunk/test/src/main/org/jboss/portal/portlet/test/metadata/impl/PortletApplicationMetaData.java
modules/portlet/trunk/test/src/main/org/jboss/portal/portlet/test/metadata/impl/PortletMetaDataConstants.java
modules/portlet/trunk/test/src/main/org/jboss/portal/portlet/test/metadata/impl/PublicRenderParameterMetaData.java
modules/portlet/trunk/test/src/main/org/jboss/portal/portlet/test/metadata/impl/UserAttributeMetaData.java
modules/portlet/trunk/test/src/main/org/jboss/portal/portlet/test/metadata/impl/adapter/ContainerRuntimeAdapter.java
modules/portlet/trunk/test/src/main/org/jboss/portal/portlet/test/metadata/impl/adapter/FilterMappingAdapter.java
modules/portlet/trunk/test/src/main/org/jboss/portal/portlet/test/metadata/impl/adapter/LocalizedStringAdapter.java
modules/portlet/trunk/test/src/main/org/jboss/portal/portlet/test/metadata/impl/adapter/UserAttributeAdapter.java
modules/portlet/trunk/test/src/main/org/jboss/portal/portlet/test/metadata/impl/common/ContainerRuntimeMetaData.java
modules/portlet/trunk/test/src/main/org/jboss/portal/portlet/test/metadata/impl/common/InitParamMetaData.java
modules/portlet/trunk/test/src/main/org/jboss/portal/portlet/test/metadata/impl/common/LocalizedDescriptionMetaData.java
modules/portlet/trunk/test/src/main/org/jboss/portal/portlet/test/metadata/impl/event/EventDefinitionMetaData.java
modules/portlet/trunk/test/src/main/org/jboss/portal/portlet/test/metadata/impl/event/EventDefinitionReferenceMetaData.java
modules/portlet/trunk/test/src/main/org/jboss/portal/portlet/test/metadata/impl/filter/FilterMappingMetaData.java
modules/portlet/trunk/test/src/main/org/jboss/portal/portlet/test/metadata/impl/filter/FilterMetaData.java
modules/portlet/trunk/test/src/main/org/jboss/portal/portlet/test/metadata/impl/portlet/PortletInfoMetaData.java
modules/portlet/trunk/test/src/main/org/jboss/portal/portlet/test/metadata/impl/portlet/PortletMetaData.java
modules/portlet/trunk/test/src/main/org/jboss/portal/portlet/test/metadata/impl/portlet/PortletPreferenceMetaData.java
modules/portlet/trunk/test/src/main/org/jboss/portal/portlet/test/metadata/impl/portlet/PortletPreferencesMetaData.java
modules/portlet/trunk/test/src/main/org/jboss/portal/portlet/test/metadata/impl/portlet/SecurityRoleRefMetaData.java
modules/portlet/trunk/test/src/main/org/jboss/portal/portlet/test/metadata/impl/portlet/SupportsMetaData.java
modules/portlet/trunk/test/src/main/org/jboss/portal/portlet/test/metadata/impl/security/PortletCollectionMetaData.java
modules/portlet/trunk/test/src/main/org/jboss/portal/portlet/test/metadata/impl/security/SecurityConstraintMetaData.java
modules/portlet/trunk/test/src/main/org/jboss/portal/portlet/test/metadata/impl/security/UserDataConstraintMetaData.java
Log:
- update metadata to spec rev. 30
- parsing now with annotation or objectmodelfactory
Modified: modules/portlet/trunk/test/src/main/org/jboss/portal/portlet/test/metadata/AbstractMetaDataTestCase.java
===================================================================
--- modules/portlet/trunk/test/src/main/org/jboss/portal/portlet/test/metadata/AbstractMetaDataTestCase.java 2007-12-13 23:18:58 UTC (rev 9342)
+++ modules/portlet/trunk/test/src/main/org/jboss/portal/portlet/test/metadata/AbstractMetaDataTestCase.java 2007-12-14 13:51:58 UTC (rev 9343)
@@ -23,31 +23,23 @@
package org.jboss.portal.portlet.test.metadata;
import java.io.IOException;
+import java.io.InputStream;
import java.net.URL;
-import java.util.HashMap;
-import java.util.Map;
-import javax.xml.XMLConstants;
-import javax.xml.parsers.DocumentBuilder;
-import javax.xml.parsers.DocumentBuilderFactory;
-import javax.xml.parsers.ParserConfigurationException;
-import javax.xml.transform.dom.DOMSource;
-import javax.xml.validation.Schema;
-import javax.xml.validation.SchemaFactory;
-import javax.xml.validation.Validator;
-
+import org.jboss.portal.portlet.test.deployment.ValueTrimmingFilter;
+import org.jboss.portal.portlet.test.metadata.factory.PortletApplicationModelFactory;
import org.jboss.portal.portlet.test.metadata.impl.PortletApplication10MetaData;
import org.jboss.portal.portlet.test.metadata.impl.PortletApplication20MetaData;
import org.jboss.portal.portlet.test.metadata.impl.PortletApplicationMetaData;
+
import static org.jboss.portal.portlet.test.metadata.impl.PortletMetaDataConstants.*;
-import org.jboss.util.xml.JBossEntityResolver;
+import org.jboss.unit.api.pojo.annotations.Parameter;
import org.jboss.xb.binding.JBossXBException;
import org.jboss.xb.binding.Unmarshaller;
import org.jboss.xb.binding.UnmarshallerFactory;
import org.jboss.xb.binding.sunday.unmarshalling.DefaultSchemaResolver;
import org.jboss.xb.binding.sunday.unmarshalling.SingletonSchemaResolverFactory;
-import org.w3c.dom.Document;
import org.xml.sax.SAXException;
import static org.jboss.unit.api.Assert.*;
@@ -58,89 +50,94 @@
public abstract class AbstractMetaDataTestCase
{
- /** The schema resolver factory */
+ /** Test parameter for using xml binding annotation. */
+ public static final String ANNOTATION_BINDING = "annotation";
+
+ /** Test parameter for using the ObjectModelFactory. */
+ public static final String FACTORY_BINDING = "factory";
+
+ /** The schema resolver factory. */
protected static SingletonSchemaResolverFactory factory;
- /** The schema resolver */
+ /** The schema resolver. */
protected static DefaultSchemaResolver resolver;
- /** The unmarshaller */
- protected static Unmarshaller unmarshaller;
+ /** The unmarshaller. */
+ protected Unmarshaller unmarshaller = null;
- /** some Suff */
-// private static Map<String, Validator> cachedXSDs = new HashMap<String, Validator>();
-
+ /** Annotation or ObjectModelFactory parsing. */
+ private String parser;
+
+ @Parameter(name = "parser")
+ public void setParser(String parser)
+ {
+ this.parser = parser;
+ }
+
static
{
try
{
-// cachedXSDs.put(PORTLET_JSR_286_NS, getValidator(PORTLET_JSR_286_NS));
-// cachedXSDs.put(PORTLET_JSR_168_NS, getValidator(PORTLET_JSR_168_NS));
-
factory = SingletonSchemaResolverFactory.getInstance();
resolver = (DefaultSchemaResolver) factory.getSchemaBindingResolver();
- unmarshaller = UnmarshallerFactory.newInstance().newUnmarshaller();
- unmarshaller.setNamespaceAware(true);
- unmarshaller.setSchemaValidation(true);
- unmarshaller.setValidation(true);
- // SchemaResolver
+
+ /** SchemaResolver */
resolver.addSchemaLocation(PORTLET_JSR_168_NS, "portlet-app_1_0.xsd");
resolver.addSchemaLocation(PORTLET_JSR_286_NS, "portlet-app_2_0.xsd");
resolver.addClassBinding(PORTLET_JSR_286_NS, PortletApplication20MetaData.class);
resolver.addClassBinding(PORTLET_JSR_168_NS, PortletApplication10MetaData.class);
-
}
- catch(Exception e)
+ catch (Exception e)
{
e.printStackTrace();
}
}
- protected <T> T unmarshall(String file, String nameSpace, Class<T> clazz) throws JBossXBException, SAXException,
- ParserConfigurationException, IOException
+ protected PortletApplicationMetaData unmarshall(String file) throws JBossXBException, SAXException, IOException
{
+ if (ANNOTATION_BINDING.equals(parser))
+ {
+ return this.unmarshallAnnotation(file);
+ }
+ else if (FACTORY_BINDING.equals(parser))
+ {
+ return this.unmarshallWithFactory(file);
+ }
+ else
+ {
+ throw new IllegalArgumentException("Wrong parameter for parser.");
+ }
+ }
+
+ private PortletApplicationMetaData unmarshallAnnotation(String file) throws JBossXBException, SAXException,
+ IOException
+ {
/** validate */
-// this.validateFile(file, nameSpace);
+ unmarshaller = UnmarshallerFactory.newInstance().newUnmarshaller();
+ unmarshaller.setNamespaceAware(true);
+ unmarshaller.setSchemaValidation(true);
unmarshaller.setValidation(true);
/** unmarshal */
- return (T) unmarshaller.unmarshal(getPath(file), resolver);
+ return (PortletApplicationMetaData) unmarshaller.unmarshal(getPath(file), resolver);
}
- protected PortletApplicationMetaData unmarshall(String file) throws JBossXBException, SAXException,
- ParserConfigurationException, IOException
+ private PortletApplicationMetaData unmarshallWithFactory(String file) throws JBossXBException
{
+ /** validate */
+ unmarshaller = UnmarshallerFactory.newInstance().newUnmarshaller();
+ unmarshaller.setNamespaceAware(true);
+ unmarshaller.setSchemaValidation(true);
unmarshaller.setValidation(true);
- unmarshaller.setNamespaceAware(true);
- // unmarshaller.setSchemaValidation(true);
- return (PortletApplicationMetaData) unmarshaller.unmarshal(getPath(file), resolver);
- }
-/*
- public void validateFile(String file, String namespace) throws SAXException, ParserConfigurationException,
- IOException
- {
- Validator validator = cachedXSDs.get(namespace);
- URL xmlFile = Thread.currentThread().getContextClassLoader().getResource(file);
- DocumentBuilder db = DocumentBuilderFactory.newInstance().newDocumentBuilder();
- Document d = db.parse(xmlFile.openStream());
- validator.validate(new DOMSource(d));
+ PortletApplicationModelFactory factory = new PortletApplicationModelFactory();
+ /** unmarshal */
+ return (PortletApplicationMetaData) unmarshaller.unmarshal(getStream(file), new ValueTrimmingFilter(factory),
+ null);
}
- private static Validator getValidator(String namespace) throws SAXException
+ protected String getPath(String file)
{
- String xsdFile = PORTLET_JSR_168_NS.equals(namespace) ? "portlet-app_1_0.xsd" : "portlet-app_2_0.xsd";
- URL schemaFile = Thread.currentThread().getContextClassLoader().getResource(xsdFile);
-
- SchemaFactory sf = SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI);
- Schema schema = sf.newSchema(schemaFile);
- Validator validator = schema.newValidator();
- validator.setErrorHandler(new ValidationErrorHandler());
- return validator;
- }
-*/
- public String getPath(String file)
- {
URL url = Thread.currentThread().getContextClassLoader().getResource(file);
if (url == null)
{
@@ -149,4 +146,9 @@
return url.toString();
}
+ protected InputStream getStream(String file)
+ {
+ return Thread.currentThread().getContextClassLoader().getResourceAsStream(file);
+ }
+
}
Modified: modules/portlet/trunk/test/src/main/org/jboss/portal/portlet/test/metadata/CustomPortletModeTestEverythingTestCase.java
===================================================================
--- modules/portlet/trunk/test/src/main/org/jboss/portal/portlet/test/metadata/CustomPortletModeTestEverythingTestCase.java 2007-12-13 23:18:58 UTC (rev 9342)
+++ modules/portlet/trunk/test/src/main/org/jboss/portal/portlet/test/metadata/CustomPortletModeTestEverythingTestCase.java 2007-12-14 13:51:58 UTC (rev 9343)
@@ -27,7 +27,7 @@
import org.jboss.portal.portlet.test.metadata.impl.CustomPortletModeMetaData;
import org.jboss.portal.portlet.test.metadata.impl.PortletApplication10MetaData;
import org.jboss.portal.portlet.test.metadata.impl.PortletApplication20MetaData;
-import org.jboss.portal.portlet.test.metadata.impl.PortletMetaDataConstants;
+import org.jboss.portal.portlet.test.metadata.impl.PortletApplicationMetaData;
import org.jboss.unit.api.pojo.annotations.Test;
import static org.jboss.unit.api.Assert.*;
@@ -39,26 +39,28 @@
public class CustomPortletModeTestEverythingTestCase extends AbstractMetaDataTestCase
{
+
@Test
public void test01()
{
try
{
String xmlFile = "customPortletMode/portlet1.xml";
- String namespace = PortletMetaDataConstants.PORTLET_JSR_168_NS;
- PortletApplication10MetaData md = unmarshall(xmlFile, namespace, PortletApplication10MetaData.class);
+ PortletApplicationMetaData md = unmarshall(xmlFile);
+ assertNotNull(md);
+ assertTrue(md instanceof PortletApplication10MetaData);
assertEquals("1.0", md.getVersion());
+ assertNotNull(md.getCustomPortletModes());
- CustomPortletModeMetaData cmd1 = md.getCustomPortletMode().get(0);
+ CustomPortletModeMetaData cmd1 = md.getCustomPortletModes().get("Custom");
assertNotNull(cmd1);
+ assertEquals("mode1", cmd1.getId());
assertEquals("Custom", cmd1.getPortletMode());
assertEquals("portletMode1", cmd1.getDescription().getDefaultString());
assertEquals("eigener portlet modus", cmd1.getDescription().getString(new Locale("de"), false));
- assertEquals("mode1", cmd1.getId());
- assertNotNull(md.getCustomPortletMode().get(1));
-
+ assertNotNull(md.getCustomPortletModes().get("Custom2"));
}
catch (Exception e)
{
@@ -74,35 +76,34 @@
{
String xmlFile = "customPortletMode/portlet2.xml";
- String namespace = PortletMetaDataConstants.PORTLET_JSR_286_NS;
- PortletApplication20MetaData md = unmarshall(xmlFile, namespace, PortletApplication20MetaData.class);
+ PortletApplicationMetaData md = unmarshall(xmlFile);
assertNotNull(md);
+ assertTrue(md instanceof PortletApplication20MetaData);
assertEquals("2.0", md.getVersion());
- CustomPortletModeMetaData cmd1 = md.getCustomPortletMode().get(0);
+ CustomPortletModeMetaData cmd1 = md.getCustomPortletModes().get("Custom");
assertNotNull(cmd1);
assertEquals("Custom", cmd1.getPortletMode());
+ assertEquals("portletMode1", cmd1.getDescription().getDefaultString());
+ assertEquals(true, cmd1.isPortalManaged());
assertEquals("cmode1", cmd1.getId());
- assertEquals(true, cmd1.isPortalManaged());
- assertEquals("portletMode1", cmd1.getDescription().getDefaultString());
- assertEquals("eigener portlet modus", cmd1.getDescription().getString(new Locale("de"), false));
- assertEquals("Portlet Mode One", cmd1.getDecorationName().getDefaultString());
- assertEquals("Eigener Portlet Modus Eins", cmd1.getDecorationName().getString(new Locale("de"), false));
-
- CustomPortletModeMetaData cmd2 = md.getCustomPortletMode().get(1);
+
+ CustomPortletModeMetaData cmd2 = md.getCustomPortletModes().get("Custom2");
assertNotNull(cmd2);
assertEquals("Custom2", cmd2.getPortletMode());
- assertEquals("Portlet Mode One", cmd2.getDecorationName().getDefaultString());
assertEquals(false, cmd2.isPortalManaged());
- CustomPortletModeMetaData cmd3 = md.getCustomPortletMode().get(2);
+ CustomPortletModeMetaData cmd3 = md.getCustomPortletModes().get("Custom3");
assertNotNull(cmd3);
assertEquals("Custom3", cmd3.getPortletMode());
- assertEquals("Portlet Mode Three", cmd3.getDescription().getDefaultString());
+
// default value
assertEquals(true, cmd3.isPortalManaged());
+ assertEquals("eigener portlet modus", cmd1.getDescription().getString(new Locale("de"), false));
+ assertEquals("Portlet Mode Three", cmd3.getDescription().getDefaultString());
+
}
catch (Exception e)
{
@@ -118,9 +119,8 @@
{
String xmlFile = "customPortletMode/portlet1-fail.xml";
- String namespace = PortletMetaDataConstants.PORTLET_JSR_168_NS;
- PortletApplication10MetaData md = unmarshall(xmlFile, namespace, PortletApplication10MetaData.class);
+ PortletApplicationMetaData md = unmarshall(xmlFile);
fail("portlet 2.0 properties are not allowed");
}
catch (Exception e)
Modified: modules/portlet/trunk/test/src/main/org/jboss/portal/portlet/test/metadata/CustomWindowStateTestEverythingTestCase.java
===================================================================
--- modules/portlet/trunk/test/src/main/org/jboss/portal/portlet/test/metadata/CustomWindowStateTestEverythingTestCase.java 2007-12-13 23:18:58 UTC (rev 9342)
+++ modules/portlet/trunk/test/src/main/org/jboss/portal/portlet/test/metadata/CustomWindowStateTestEverythingTestCase.java 2007-12-14 13:51:58 UTC (rev 9343)
@@ -27,7 +27,7 @@
import org.jboss.portal.portlet.test.metadata.impl.CustomWindowStateMetaData;
import org.jboss.portal.portlet.test.metadata.impl.PortletApplication10MetaData;
import org.jboss.portal.portlet.test.metadata.impl.PortletApplication20MetaData;
-import org.jboss.portal.portlet.test.metadata.impl.PortletMetaDataConstants;
+import org.jboss.portal.portlet.test.metadata.impl.PortletApplicationMetaData;
import org.jboss.unit.api.pojo.annotations.Test;
import static org.jboss.unit.api.Assert.*;
@@ -38,7 +38,6 @@
*/
public class CustomWindowStateTestEverythingTestCase extends AbstractMetaDataTestCase
{
-
@Test
public void test01()
{
@@ -46,23 +45,22 @@
{
String xmlFile = "customWindowState/portlet1.xml";
- String namespace = PortletMetaDataConstants.PORTLET_JSR_168_NS;
- PortletApplication10MetaData md = unmarshall(xmlFile, namespace, PortletApplication10MetaData.class);
+ PortletApplicationMetaData md = unmarshall(xmlFile);
+ assertNotNull(md);
+ assertTrue(md instanceof PortletApplication10MetaData);
assertEquals("1.0", md.getVersion());
- CustomWindowStateMetaData cws1 = md.getCustomWindowState().get(0);
- assertEquals("foo", cws1.getId());
+ CustomWindowStateMetaData cws1 = md.getCustomWindowStates().get("windowState1");
assertEquals("WindowState", cws1.getDescription().getDefaultString());
assertEquals("windowState1", cws1.getWindowState());
assertEquals("Offenes Fenster", cws1.getDescription().getString(new Locale("de"), false));
-
- CustomWindowStateMetaData cws2 = md.getCustomWindowState().get(1);
+ assertEquals("foo", cws1.getId());
+ CustomWindowStateMetaData cws2 = md.getCustomWindowStates().get("windowState2");
assertNotNull(cws2);
- CustomWindowStateMetaData cws3 = md.getCustomWindowState().get(2);
+ CustomWindowStateMetaData cws3 = md.getCustomWindowStates().get("windowState3");
assertEquals("drei", cws3.getId());
-
}
catch (Exception e)
{
@@ -78,23 +76,23 @@
{
String xmlFile = "customWindowState/portlet2.xml";
- String namespace = PortletMetaDataConstants.PORTLET_JSR_286_NS;
- PortletApplication20MetaData md = unmarshall(xmlFile, namespace, PortletApplication20MetaData.class);
+ PortletApplicationMetaData md = unmarshall(xmlFile);
+ assertNotNull(md);
+ assertTrue(md instanceof PortletApplication20MetaData);
assertEquals("2.0", md.getVersion());
- CustomWindowStateMetaData cws1 = md.getCustomWindowState().get(0);
- assertEquals("foo", cws1.getId());
- assertEquals("windowState1", cws1.getWindowState());
+ CustomWindowStateMetaData cws1 = md.getCustomWindowStates().get("windowState1");
assertEquals("WindowState", cws1.getDescription().getDefaultString());
+ assertEquals("windowState1", cws1.getWindowState());
assertEquals("Offenes Fenster", cws1.getDescription().getString(new Locale("de"), false));
-
- CustomWindowStateMetaData cws2 = md.getCustomWindowState().get(1);
+ assertEquals("foo", cws1.getId());
+
+ CustomWindowStateMetaData cws2 = md.getCustomWindowStates().get("windowState2");
assertNotNull(cws2);
- CustomWindowStateMetaData cws3 = md.getCustomWindowState().get(2);
+ CustomWindowStateMetaData cws3 = md.getCustomWindowStates().get("windowState3");
assertEquals("drei", cws3.getId());
-
}
catch (Exception e)
{
Modified: modules/portlet/trunk/test/src/main/org/jboss/portal/portlet/test/metadata/EventTestEverythingTestCase.java
===================================================================
--- modules/portlet/trunk/test/src/main/org/jboss/portal/portlet/test/metadata/EventTestEverythingTestCase.java 2007-12-13 23:18:58 UTC (rev 9342)
+++ modules/portlet/trunk/test/src/main/org/jboss/portal/portlet/test/metadata/EventTestEverythingTestCase.java 2007-12-14 13:51:58 UTC (rev 9343)
@@ -26,10 +26,8 @@
import javax.xml.namespace.QName;
-import org.jboss.portal.portlet.test.metadata.impl.PortletApplication10MetaData;
import org.jboss.portal.portlet.test.metadata.impl.PortletApplication20MetaData;
import org.jboss.portal.portlet.test.metadata.impl.PortletApplicationMetaData;
-import org.jboss.portal.portlet.test.metadata.impl.PortletMetaDataConstants;
import org.jboss.portal.portlet.test.metadata.impl.event.EventDefinitionMetaData;
import org.jboss.portal.portlet.test.metadata.impl.event.EventDefinitionReferenceMetaData;
import org.jboss.portal.portlet.test.metadata.impl.portlet.PortletMetaData;
@@ -51,9 +49,8 @@
{
String xmlFile = "event/portlet-event1.xml";
- String namespace = PortletMetaDataConstants.PORTLET_JSR_168_NS;
- PortletApplication10MetaData md = unmarshall(xmlFile, namespace, PortletApplication10MetaData.class);
+ unmarshall(xmlFile);
fail();
}
catch (Exception e)
@@ -69,15 +66,14 @@
{
String xmlFile = "event/portlet-event2.xml";
- String namespace = PortletMetaDataConstants.PORTLET_JSR_286_NS;
- PortletApplication20MetaData md = unmarshall(xmlFile, namespace, PortletApplication20MetaData.class);
+ PortletApplicationMetaData md = unmarshall(xmlFile);
assertNotNull(md);
+ assertTrue(md instanceof PortletApplication20MetaData);
assertEquals("2.0", md.getVersion());
EventDefinitionMetaData emd = md.getEvents().get(0);
QName qname = emd.getQname();
-
assertEquals("eventID", emd.getId());
assertEquals("http://example.com/testEvents", qname.getNamespaceURI());
assertEquals("portletEvent", qname.getLocalPart());
@@ -89,7 +85,6 @@
EventDefinitionMetaData emd2 = md.getEvents().get(1);
- // TODO - choice is not checked correctly
assertNull(emd2.getQname());
assertEquals("hellouh", emd2.getName());
assertEquals("hello", emd2.getAlias().get(0).getLocalPart());
@@ -116,7 +111,6 @@
assertNotNull(ermd4);
assertEquals("hellouh", ermd4.getName());
-
}
catch (Exception e)
{
@@ -137,11 +131,8 @@
assertNotNull(md);
assertEquals("2.0", md.getVersion());
- EventDefinitionMetaData edm = md.getEvents().get(0);
+// EventDefinitionMetaData edm = md.getEvents().get(0);
- System.out.println(edm.getName());
- System.out.println(edm.getQname());
-
fail("Should fail: choice and qname defined!");
}
catch (Exception e)
Modified: modules/portlet/trunk/test/src/main/org/jboss/portal/portlet/test/metadata/FilterTestEverythingTestCase.java
===================================================================
--- modules/portlet/trunk/test/src/main/org/jboss/portal/portlet/test/metadata/FilterTestEverythingTestCase.java 2007-12-13 23:18:58 UTC (rev 9342)
+++ modules/portlet/trunk/test/src/main/org/jboss/portal/portlet/test/metadata/FilterTestEverythingTestCase.java 2007-12-14 13:51:58 UTC (rev 9343)
@@ -24,9 +24,8 @@
import java.util.Locale;
-import org.jboss.portal.portlet.test.metadata.impl.PortletApplication10MetaData;
import org.jboss.portal.portlet.test.metadata.impl.PortletApplication20MetaData;
-import org.jboss.portal.portlet.test.metadata.impl.PortletMetaDataConstants;
+import org.jboss.portal.portlet.test.metadata.impl.PortletApplicationMetaData;
import org.jboss.portal.portlet.test.metadata.impl.common.InitParamMetaData;
import org.jboss.portal.portlet.test.metadata.impl.filter.FilterMetaData;
import org.jboss.unit.api.pojo.annotations.Test;
@@ -45,8 +44,7 @@
{
try
{
- PortletApplication10MetaData md = unmarshall("filter/portlet-filter1.xml",
- PortletMetaDataConstants.PORTLET_JSR_168_NS, PortletApplication10MetaData.class);
+ unmarshall("filter/portlet-filter1.xml");
// no filters in jsr 168
fail();
}
@@ -62,44 +60,47 @@
try
{
String xmlFile = "filter/portlet-filter2.xml";
- String namespace = PortletMetaDataConstants.PORTLET_JSR_286_NS;
- PortletApplication20MetaData md = unmarshall(xmlFile, namespace, PortletApplication20MetaData.class);
+ PortletApplicationMetaData md = unmarshall(xmlFile);
+ assertNotNull(md);
+ assertTrue(md instanceof PortletApplication20MetaData);
FilterMetaData filter = md.getFilter("testFilter");
+ assertNotNull(filter);
assertEquals("org.jboss.portal.meta.NoExistingClass", filter.getFilterClass());
assertEquals("testFilter", filter.getFilterName());
assertEquals("ACTION_PHASE", filter.getLifecycle().get(0));
assertEquals("RENDER_PHASE", filter.getLifecycle().get(1));
+
assertEquals("test", filter.getDescription().getDefaultString());
assertEquals("bla", filter.getDescription().getString(new Locale("de"), false));
+
assertEquals("foo", filter.getDisplayName().getString(new Locale("fr"), false));
assertEquals("foobar", filter.getDisplayName().getDefaultString());
-
+
InitParamMetaData ip = filter.getInitParams().get(0);
assertEquals("eins", ip.getId());
assertEquals("foo", ip.getName());
assertEquals("bar", ip.getValue());
assertNotNull(ip.getDescription());
-
+
InitParamMetaData ip2 = filter.getInitParams().get(1);
- assertNull(ip2.getId());
assertEquals("test", ip2.getName());
assertEquals("testing", ip2.getValue());
-
+ assertNull(ip2.getId());
+
//
FilterMetaData filter2 = md.getFilter("testFilterZwei");
assertEquals("testFilterZwei", filter2.getFilterName());
assertEquals("ACTION_PHASE", filter2.getLifecycle().get(0));
-
- // Filter mapping
-
+
+ // Filter mapping
assertTrue(md.getFilterMapping().containsKey("testFilter"));
- assertEquals("Portlet1", md.getFilterMapping().get("testFilter").get(0));
- assertEquals("Portlet2", md.getFilterMapping().get("testFilter").get(1));
+ assertEquals("Portlet1", md.getFilterMapping().get("testFilter").getPortletNames().get(0));
+ assertEquals("Portlet2", md.getFilterMapping().get("testFilter").getPortletNames().get(1));
assertTrue(md.getFilterMapping().containsKey("testFilterZwei"));
- assertEquals("Portlet2", md.getFilterMapping().get("testFilterZwei").get(0));
+ assertEquals("Portlet2", md.getFilterMapping().get("testFilterZwei").getPortletNames().get(0));
}
catch (Exception e)
Modified: modules/portlet/trunk/test/src/main/org/jboss/portal/portlet/test/metadata/GeneralMetaDataTestCase.java
===================================================================
--- modules/portlet/trunk/test/src/main/org/jboss/portal/portlet/test/metadata/GeneralMetaDataTestCase.java 2007-12-13 23:18:58 UTC (rev 9342)
+++ modules/portlet/trunk/test/src/main/org/jboss/portal/portlet/test/metadata/GeneralMetaDataTestCase.java 2007-12-14 13:51:58 UTC (rev 9343)
@@ -23,14 +23,17 @@
package org.jboss.portal.portlet.test.metadata;
import java.net.URI;
-import java.util.List;
+import java.util.Locale;
+import org.jboss.portal.portlet.test.metadata.impl.ListenerMetaData;
+import org.jboss.portal.portlet.test.metadata.impl.PortletApplication10MetaData;
+import org.jboss.portal.portlet.test.metadata.impl.PortletApplication20MetaData;
import org.jboss.portal.portlet.test.metadata.impl.PortletApplicationMetaData;
import org.jboss.portal.portlet.test.metadata.impl.PublicRenderParameterMetaData;
-import org.jboss.portal.portlet.test.metadata.impl.common.ContainerRuntimeMetaData;
import org.jboss.unit.api.pojo.annotations.Test;
import static org.jboss.unit.api.Assert.*;
+
/**
* @author <a href="mailto:emuckenh@redhat.com">Emanuel Muckenhuber</a>
* @version $Revision$
@@ -44,12 +47,14 @@
try
{
PortletApplicationMetaData md = this.unmarshall("general/portlet1.xml");
+ assertNotNull(md);
+ assertTrue(md instanceof PortletApplication10MetaData);
assertEquals("1.0", md.getVersion());
}
catch (Exception e)
{
e.printStackTrace();
- fail();
+ fail("No exception expected");
}
}
@@ -59,6 +64,8 @@
try
{
PortletApplicationMetaData md = this.unmarshall("general/portlet2.xml");
+ assertNotNull(md);
+ assertTrue(md instanceof PortletApplication20MetaData);
assertEquals("2.0", md.getVersion());
}
catch (Exception e)
@@ -75,21 +82,30 @@
{
PortletApplicationMetaData md = (PortletApplicationMetaData) this.unmarshall("general/portlet2-jsr286.xml");
assertEquals("2.0", md.getVersion());
+ assertTrue(md instanceof PortletApplication20MetaData);
assertEquals("MyResourceBundle", md.getResourceBundle());
assertEquals(new URI("foobar"), md.getDefaultNamespace());
PublicRenderParameterMetaData prp1 = md.getPublicRenderParameters().get(0);
+
+ assertEquals("Public render parameter one", prp1.getDescription().getDefaultString());
assertEquals("param1", prp1.getId());
- assertEquals("Public render parameter one", prp1.getDescription().getDefaultString());
assertEquals("param1", prp1.getName());
assertEquals("Parameter1", prp1.getAlias().get(0).getLocalPart());
assertEquals("Parameter2", prp1.getAlias().get(1).getLocalPart());
assertEquals("blub", prp1.getIdentifier());
- assertEquals("foobar", md.getContainerRuntimeOption("foo").get(0));
- assertEquals("foobar2", md.getContainerRuntimeOption("foo").get(1));
-
+ assertEquals("foobar", md.getContainerRuntimeOption("foo").getValues().get(0));
+ assertEquals("foobar2", md.getContainerRuntimeOption("foo").getValues().get(1));
+
+ ListenerMetaData listener1 = md.getListeners().get(0);
+ assertNotNull(listener1);
+ assertEquals("org.jboss.portal.portlet.test.listener.MyListener", listener1.getListenerClass());
+ assertEquals("Mein Zuhörer Eins", listener1.getDisplayName().getString(new Locale("de"), false));
+ assertEquals("Beschreibung", listener1.getDescription().getString(new Locale("de"), false));
+
+ assertNotNull(md.getListeners().get(1));
}
catch (Exception e)
{
@@ -97,4 +113,40 @@
fail();
}
}
+
+ @Test
+ public void test01_generated()
+ {
+ try
+ {
+ PortletApplicationMetaData md = unmarshall("general/portlet-app_1_0.xml");
+
+ assertNotNull(md);
+ assertTrue(md instanceof PortletApplication10MetaData);
+ assertEquals("1.0", md.getVersion());
+ assertNotNull(md.getCustomPortletModes());
+
+ }
+ catch(Exception e)
+ {
+ e.printStackTrace();
+ fail();
+ }
+ }
+
+ @Test
+ public void test02_generated()
+ {
+ try
+ {
+ PortletApplicationMetaData md = (PortletApplicationMetaData) this.unmarshall("general/portlet-app_2_0.xml");
+ assertEquals("2.0", md.getVersion());
+ assertTrue(md instanceof PortletApplication20MetaData);
+ }
+ catch(Exception e)
+ {
+ e.printStackTrace();
+ fail();
+ }
+ }
}
Modified: modules/portlet/trunk/test/src/main/org/jboss/portal/portlet/test/metadata/PortletTestEverythingTestCase.java
===================================================================
--- modules/portlet/trunk/test/src/main/org/jboss/portal/portlet/test/metadata/PortletTestEverythingTestCase.java 2007-12-13 23:18:58 UTC (rev 9342)
+++ modules/portlet/trunk/test/src/main/org/jboss/portal/portlet/test/metadata/PortletTestEverythingTestCase.java 2007-12-14 13:51:58 UTC (rev 9343)
@@ -40,6 +40,7 @@
import org.jboss.unit.api.pojo.annotations.Test;
import static org.jboss.unit.api.Assert.*;
+
/**
* @author <a href="mailto:emuckenh@redhat.com">Emanuel Muckenhuber</a>
* @version $Revision$
@@ -53,10 +54,11 @@
try
{
String xmlFile = "portlet/portlet1.xml";
- String namespace = PortletMetaDataConstants.PORTLET_JSR_168_NS;
- PortletApplication10MetaData md = unmarshall(xmlFile, namespace, PortletApplication10MetaData.class);
+ PortletApplicationMetaData md = unmarshall(xmlFile);
assertNotNull(md);
+ assertTrue(md instanceof PortletApplication10MetaData);
+ assertEquals("1.0", md.getVersion());
Locale fr = new Locale("fr");
Locale default_locale = new Locale(PortletMetaDataConstants.DEFAULT_LOCALE);
@@ -101,12 +103,12 @@
assertEquals("VIEW", smd2.getPortletModes().get(0).getPortletMode());
assertEquals("HELP", smd2.getPortletModes().get(1).getPortletMode());
+ assertEquals("MyResourceBundle", p1.getResourceBundle());
+
List<SupportedLocaleMetaData> localeList = p1.getSupportedLocale();
assertEquals("en", localeList.get(0).getLocale());
assertEquals("fr", localeList.get(1).getLocale());
- assertEquals("MyResourceBundle", p1.getResourceBundle());
-
PortletInfoMetaData pimd = p1.getPortletInfo();
assertNotNull(pimd);
assertEquals("very long portlet title", pimd.getTitle());
@@ -115,6 +117,7 @@
PortletPreferencesMetaData ppmd = p1.getPortletPreferences();
assertNotNull(ppmd);
+
assertEquals("MyValidator", ppmd.getPreferenceValidator());
assertEquals("1", ppmd.getPortletPreferences().get("one").getValue().get(0));
assertEquals("2", ppmd.getPortletPreferences().get("two").getValue().get(0));
@@ -191,6 +194,7 @@
PortletMetaData p13 = md.getPortlet("Portlet13");
assertNotNull(p13);
+
}
catch (Exception e)
{
@@ -205,11 +209,11 @@
try
{
String xmlFile = "portlet/portlet2.xml";
-// String namespace = PortletMetaDataConstants.PORTLET_JSR_286_NS;
- PortletApplicationMetaData md = unmarshall(xmlFile);
- //unmarshall(xmlFile, namespace, PortletApplication20MetaData.class);
+ PortletApplicationMetaData md = unmarshall(xmlFile);
assertNotNull(md);
+ assertTrue(md instanceof PortletApplication20MetaData);
+ assertEquals("2.0", md.getVersion());
Locale fr = new Locale("fr");
Locale default_locale = new Locale(PortletMetaDataConstants.DEFAULT_LOCALE);
@@ -347,7 +351,6 @@
PortletMetaData p13 = md.getPortlet("Portlet13");
assertNotNull(p13);
-
}
catch (Exception e)
{
@@ -362,11 +365,12 @@
try
{
String xmlFile = "portlet/portlet2-jsr286.xml";
- String namespace = PortletMetaDataConstants.PORTLET_JSR_286_NS;
- PortletApplication20MetaData md = unmarshall(xmlFile, namespace, PortletApplication20MetaData.class);
+ PortletApplicationMetaData md = unmarshall(xmlFile);
assertNotNull(md);
-
+ assertTrue(md instanceof PortletApplication20MetaData);
+ assertEquals("2.0", md.getVersion());
+
Locale fr = new Locale("fr");
Locale default_locale = new Locale(PortletMetaDataConstants.DEFAULT_LOCALE);
@@ -465,14 +469,12 @@
assertEquals("foo2", p1.getSupportedPublicRenderParameters().get(2));
assertEquals("foo2bar", p1.getSupportedPublicRenderParameters().get(3));
- assertEquals("org.jboss.portal.test.url.generation.listener", p1.getUrlGenerationListener().get(0));
- assertEquals("org.jboss.portal.test.url.generation.listener.foo", p1.getUrlGenerationListener().get(1));
-
assertTrue(p1.getContainerRuntimeOptions().containsKey("option1"));
assertTrue(p1.getContainerRuntimeOptions().containsKey("option2"));
- assertEquals("value1", p1.getContainerRuntimeOptions().get("option1").get(0));
- assertEquals("value2", p1.getContainerRuntimeOptions().get("option1").get(1));
- assertEquals("value3", p1.getContainerRuntimeOptions().get("option2").get(0));
+ assertEquals("value1", p1.getContainerRuntimeOptions().get("option1").getValues().get(0));
+ assertEquals("value2", p1.getContainerRuntimeOptions().get("option1").getValues().get(1));
+ assertEquals("value3", p1.getContainerRuntimeOptions().get("option2").getValues().get(0));
+
}
catch (Exception e)
{
Modified: modules/portlet/trunk/test/src/main/org/jboss/portal/portlet/test/metadata/RenderParameterTestEverythingTestCase.java
===================================================================
--- modules/portlet/trunk/test/src/main/org/jboss/portal/portlet/test/metadata/RenderParameterTestEverythingTestCase.java 2007-12-13 23:18:58 UTC (rev 9342)
+++ modules/portlet/trunk/test/src/main/org/jboss/portal/portlet/test/metadata/RenderParameterTestEverythingTestCase.java 2007-12-14 13:51:58 UTC (rev 9343)
@@ -22,6 +22,7 @@
******************************************************************************/
package org.jboss.portal.portlet.test.metadata;
+import org.jboss.portal.portlet.test.metadata.impl.PortletApplication20MetaData;
import org.jboss.portal.portlet.test.metadata.impl.PortletApplicationMetaData;
import org.jboss.portal.portlet.test.metadata.impl.PublicRenderParameterMetaData;
import org.jboss.unit.api.pojo.annotations.Test;
@@ -41,26 +42,32 @@
{
String xmlFile = "renderParameter/portlet2.xml";
-// String namespace = PortletMetaDataConstants.PORTLET_JSR_286_NS;
- PortletApplicationMetaData md = unmarshall(xmlFile); //, namespace, PortletApplication20MetaData.class);
+ PortletApplicationMetaData md = unmarshall(xmlFile);
assertNotNull(md);
+ assertTrue(md instanceof PortletApplication20MetaData);
assertEquals("2.0", md.getVersion());
PublicRenderParameterMetaData prp1 = md.getPublicRenderParameters().get(0);
+ assertNotNull(prp1);
+
assertEquals("blah", prp1.getIdentifier());
assertEquals("renderParameter1", prp1.getName());
- assertEquals("fooo", prp1.getAlias().get(0).getLocalPart());
- assertEquals("rP1", prp1.getAlias().get(1).getLocalPart());
- assertEquals("render parameter foo", prp1.getDescription().getDefaultString());
-
+
+
PublicRenderParameterMetaData prp2 = md.getPublicRenderParameters().get(1);
assertEquals("foo", prp2.getQname().getLocalPart());
assertEquals("x", prp2.getQname().getPrefix());
assertEquals("http://someurl.com", prp2.getQname().getNamespaceURI());
+
+ assertEquals("fooo", prp1.getAlias().get(0).getLocalPart());
+ assertEquals("rP1", prp1.getAlias().get(1).getLocalPart());
+
assertEquals("foo", prp2.getAlias().get(0).getLocalPart());
assertEquals("http://someurl.alias.com", prp2.getAlias().get(0).getNamespaceURI());
assertEquals("s", prp2.getAlias().get(0).getPrefix());
+
+ assertEquals("render parameter foo", prp1.getDescription().getDefaultString());
}
catch (Exception e)
Modified: modules/portlet/trunk/test/src/main/org/jboss/portal/portlet/test/metadata/SecurityConstraintTestEverythingTestCase.java
===================================================================
--- modules/portlet/trunk/test/src/main/org/jboss/portal/portlet/test/metadata/SecurityConstraintTestEverythingTestCase.java 2007-12-13 23:18:58 UTC (rev 9342)
+++ modules/portlet/trunk/test/src/main/org/jboss/portal/portlet/test/metadata/SecurityConstraintTestEverythingTestCase.java 2007-12-14 13:51:58 UTC (rev 9343)
@@ -27,7 +27,6 @@
import org.jboss.portal.portlet.test.metadata.impl.PortletApplication10MetaData;
import org.jboss.portal.portlet.test.metadata.impl.PortletApplication20MetaData;
import org.jboss.portal.portlet.test.metadata.impl.PortletApplicationMetaData;
-import org.jboss.portal.portlet.test.metadata.impl.PortletMetaDataConstants;
import org.jboss.portal.portlet.test.metadata.impl.portlet.PortletMetaData;
import org.jboss.portal.portlet.test.metadata.impl.security.SecurityConstraintMetaData;
import org.jboss.portal.portlet.test.metadata.impl.security.TransportGuaranteeEnum;
@@ -48,27 +47,29 @@
{
String xmlFile = "security/portlet1.xml";
- String namespace = PortletMetaDataConstants.PORTLET_JSR_168_NS;
PortletApplicationMetaData md = unmarshall(xmlFile);
+ assertNotNull(md);
+ assertTrue(md instanceof PortletApplication10MetaData);
assertEquals("1.0", md.getVersion());
SecurityConstraintMetaData scd1 = md.getSecurityConstraints().get(0);
assertNotNull(scd1);
-
- assertEquals("foo", scd1.getId());
assertEquals("test", scd1.getDisplayName().getDefaultString());
assertEquals("Test", scd1.getDisplayName().getString(new Locale("de"), false));
assertEquals(TransportGuaranteeEnum.NONE, scd1.getUserDataConstraint().getTransportQuarantee());
- assertEquals("fooConstraint", scd1.getUserDataConstraint().getDescription().getDefaultString());
- assertEquals("FooConstraint", scd1.getUserDataConstraint().getDescription().getString(new Locale("de"), false));
+
assertEquals("foo", scd1.getPortletList().getPortletNames().get(0));
assertEquals("foobar", scd1.getPortletList().getPortletNames().get(1));
-
+ assertEquals("foo", scd1.getId());
+
SecurityConstraintMetaData scd2 = md.getSecurityConstraints().get(1);
assertNotNull(scd2);
assertEquals(TransportGuaranteeEnum.INTEGRAL, scd2.getUserDataConstraint().getTransportQuarantee());
assertEquals("foo", scd2.getPortletList().getPortletNames().get(0));
+ assertEquals("fooConstraint", scd1.getUserDataConstraint().getDescription().getDefaultString());
+ assertEquals("FooConstraint", scd1.getUserDataConstraint().getDescription().getString(new Locale("de"), false));
+
try
{
scd2.getPortletList().getPortletNames().get(1);
@@ -84,7 +85,6 @@
PortletMetaData pmd2 = md.getPortlet("foobar");
assertNotNull(pmd2);
-
}
catch (Exception e)
{
@@ -137,26 +137,30 @@
{
String xmlFile = "security/portlet2.xml";
- String namespace = PortletMetaDataConstants.PORTLET_JSR_286_NS;
- PortletApplication20MetaData md = unmarshall(xmlFile, namespace, PortletApplication20MetaData.class);
+ PortletApplicationMetaData md = unmarshall( xmlFile);
+ assertNotNull(md);
+ assertTrue(md instanceof PortletApplication20MetaData);
assertEquals("2.0", md.getVersion());
SecurityConstraintMetaData scd1 = md.getSecurityConstraints().get(0);
assertNotNull(scd1);
- assertEquals("foo", scd1.getId());
assertEquals("test", scd1.getDisplayName().getDefaultString());
assertEquals("Test", scd1.getDisplayName().getString(new Locale("de"), false));
+ assertEquals("foo", scd1.getId());
+
assertEquals(TransportGuaranteeEnum.NONE, scd1.getUserDataConstraint().getTransportQuarantee());
- assertEquals("fooConstraint", scd1.getUserDataConstraint().getDescription().getDefaultString());
- assertEquals("FooConstraint", scd1.getUserDataConstraint().getDescription().getString(new Locale("de"), false));
assertEquals("foo", scd1.getPortletList().getPortletNames().get(0));
assertEquals("foobar", scd1.getPortletList().getPortletNames().get(1));
+
SecurityConstraintMetaData scd2 = md.getSecurityConstraints().get(1);
assertNotNull(scd2);
assertEquals(TransportGuaranteeEnum.INTEGRAL, scd2.getUserDataConstraint().getTransportQuarantee());
assertEquals("foo", scd2.getPortletList().getPortletNames().get(0));
+ assertEquals("fooConstraint", scd1.getUserDataConstraint().getDescription().getDefaultString());
+ assertEquals("FooConstraint", scd1.getUserDataConstraint().getDescription().getString(new Locale("de"), false));
+
try
{
scd2.getPortletList().getPortletNames().get(1);
@@ -166,16 +170,7 @@
{
// expected java.lang.IndexOutOfBoundsException
}
- /*
- PortletMetaData pmd1 = md.getPortlet("foo");
- assertNotNull(pmd1);
- assertTrue(pmd1.getTransportGuarantee().containsGuarantee(TransportGuaranteeEnum.NONE));
- assertTrue(pmd1.getTransportGuarantee().containsGuarantee(TransportGuaranteeEnum.INTEGRAL));
-
- PortletMetaData pmd2 = md.getPortlet("foobar");
- assertNotNull(pmd2);
- assertTrue(pmd2.getTransportGuarantee().containsGuarantee(TransportGuaranteeEnum.NONE));
- */
+
}
catch (Exception e)
{
Deleted: modules/portlet/trunk/test/src/main/org/jboss/portal/portlet/test/metadata/SimplePortletTestCase.java
===================================================================
--- modules/portlet/trunk/test/src/main/org/jboss/portal/portlet/test/metadata/SimplePortletTestCase.java 2007-12-13 23:18:58 UTC (rev 9342)
+++ modules/portlet/trunk/test/src/main/org/jboss/portal/portlet/test/metadata/SimplePortletTestCase.java 2007-12-14 13:51:58 UTC (rev 9343)
@@ -1,52 +0,0 @@
-/******************************************************************************
- * JBoss, a division of Red Hat *
- * Copyright 2006, Red Hat Middleware, LLC, and individual *
- * contributors as indicated by the @authors tag. See the *
- * copyright.txt in the distribution for a full listing of *
- * individual contributors. *
- * *
- * This is free software; you can redistribute it and/or modify it *
- * under the terms of the GNU Lesser General Public License as *
- * published by the Free Software Foundation; either version 2.1 of *
- * the License, or (at your option) any later version. *
- * *
- * This software is distributed in the hope that it will be useful, *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
- * Lesser General Public License for more details. *
- * *
- * You should have received a copy of the GNU Lesser General Public *
- * License along with this software; if not, write to the Free *
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
- ******************************************************************************/
-package org.jboss.portal.portlet.test.metadata;
-
-import org.jboss.portal.portlet.test.metadata.impl.PortletApplication10MetaData;
-import org.jboss.portal.portlet.test.metadata.impl.PortletApplicationMetaData;
-import org.jboss.portal.portlet.test.metadata.impl.PortletMetaDataConstants;
-import org.jboss.unit.api.pojo.annotations.Test;
-
-import static org.jboss.unit.api.Assert.*;
-/**
- * @author <a href="mailto:emuckenh@redhat.com">Emanuel Muckenhuber</a>
- * @version $Revision$
- */
-public class SimplePortletTestCase extends AbstractMetaDataTestCase
-{
-
- @Test
- public void test02()
- {
- try
- {
- PortletApplicationMetaData md = unmarshall("portlet/portlet1-simple.xml");
- fail();
- }
- catch (Exception e)
- {
- // OK
- }
- }
-
-}
Modified: modules/portlet/trunk/test/src/main/org/jboss/portal/portlet/test/metadata/UserAttributeTestEverythingTestCase.java
===================================================================
--- modules/portlet/trunk/test/src/main/org/jboss/portal/portlet/test/metadata/UserAttributeTestEverythingTestCase.java 2007-12-13 23:18:58 UTC (rev 9342)
+++ modules/portlet/trunk/test/src/main/org/jboss/portal/portlet/test/metadata/UserAttributeTestEverythingTestCase.java 2007-12-14 13:51:58 UTC (rev 9343)
@@ -26,11 +26,12 @@
import org.jboss.portal.portlet.test.metadata.impl.PortletApplication10MetaData;
import org.jboss.portal.portlet.test.metadata.impl.PortletApplication20MetaData;
-import org.jboss.portal.portlet.test.metadata.impl.PortletMetaDataConstants;
+import org.jboss.portal.portlet.test.metadata.impl.PortletApplicationMetaData;
import org.jboss.portal.portlet.test.metadata.impl.UserAttributeMetaData;
import org.jboss.unit.api.pojo.annotations.Test;
import static org.jboss.unit.api.Assert.*;
+
/**
* @author <a href="mailto:emuckenh@redhat.com">Emanuel Muckenhuber</a>
* @version $Revision$
@@ -44,10 +45,10 @@
try
{
String xmlFile = "userAttribute/portlet1.xml";
- String namespace = PortletMetaDataConstants.PORTLET_JSR_168_NS;
- PortletApplication10MetaData md = unmarshall(xmlFile, namespace, PortletApplication10MetaData.class);
+ PortletApplicationMetaData md = unmarshall(xmlFile);
assertNotNull(md);
+ assertTrue(md instanceof PortletApplication10MetaData);
UserAttributeMetaData umb = md.getUserAttributes().get("blub");
assertNotNull(umb);
@@ -59,6 +60,7 @@
assertEquals("realFoo", umd.getId());
assertEquals("foobar", umd.getDescription().getDefaultString());
assertEquals("fuhbar", umd.getDescription().getString(new Locale("de"), true));
+
}
catch (Exception e)
{
@@ -73,10 +75,11 @@
try
{
String xmlFile = "userAttribute/portlet2.xml";
- String namespace = PortletMetaDataConstants.PORTLET_JSR_286_NS;
- PortletApplication20MetaData md = unmarshall(xmlFile, namespace, PortletApplication20MetaData.class);
+ PortletApplicationMetaData md = unmarshall(xmlFile);
assertNotNull(md);
+ assertTrue(md instanceof PortletApplication20MetaData);
+
UserAttributeMetaData umb = md.getUserAttributes().get("blub");
assertNotNull(umb);
assertEquals("notFoo", umb.getId());
@@ -87,7 +90,6 @@
assertEquals("realFoo", umd.getId());
assertEquals("foobar", umd.getDescription().getDefaultString());
assertEquals("fuhbar", umd.getDescription().getString(new Locale("de"), true));
-
}
catch (Exception e)
{
Modified: modules/portlet/trunk/test/src/main/org/jboss/portal/portlet/test/metadata/ValidationErrorHandler.java
===================================================================
--- modules/portlet/trunk/test/src/main/org/jboss/portal/portlet/test/metadata/ValidationErrorHandler.java 2007-12-13 23:18:58 UTC (rev 9342)
+++ modules/portlet/trunk/test/src/main/org/jboss/portal/portlet/test/metadata/ValidationErrorHandler.java 2007-12-14 13:51:58 UTC (rev 9343)
@@ -25,7 +25,6 @@
import org.xml.sax.ErrorHandler;
import org.xml.sax.SAXException;
import org.xml.sax.SAXParseException;
-import static org.jboss.unit.api.Assert.*;
/**
* @author <a href="mailto:emuckenh@redhat.com">Emanuel Muckenhuber</a>
* @version $Revision$
@@ -47,7 +46,7 @@
public void warning(SAXParseException e) throws SAXException
{
- // TODO
+ // TODO - maybe logging or similar stuff
}
}
\ No newline at end of file
Added: modules/portlet/trunk/test/src/main/org/jboss/portal/portlet/test/metadata/factory/LocalizedStringBuilder.java
===================================================================
--- modules/portlet/trunk/test/src/main/org/jboss/portal/portlet/test/metadata/factory/LocalizedStringBuilder.java (rev 0)
+++ modules/portlet/trunk/test/src/main/org/jboss/portal/portlet/test/metadata/factory/LocalizedStringBuilder.java 2007-12-14 13:51:58 UTC (rev 9343)
@@ -0,0 +1,88 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.portlet.test.metadata.factory;
+
+import java.util.ArrayList;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.apache.log4j.Logger;
+import org.jboss.portal.common.i18n.LocalizedString;
+import org.jboss.portal.portlet.test.metadata.impl.adapter.LocalizedStringAdapter;
+import org.jboss.portal.portlet.test.metadata.impl.common.LocalizedDescriptionMetaData;
+
+/**
+ * @author <a href="mailto:emuckenh@redhat.com">Emanuel Muckenhuber</a>
+ * @version $Revision$
+ */
+public class LocalizedStringBuilder
+{
+
+ /** The object to localized meta data. */
+ private Map<Object, LocalizedMetaDataContainer> map = new LinkedHashMap<Object, LocalizedMetaDataContainer>();
+
+ /** The logger. */
+ private static final Logger log = Logger.getLogger(LocalizedStringBuilder.class);
+
+ public void put(Object object, LocalizedDescriptionMetaData description)
+ {
+ LocalizedMetaDataContainer container = map.get(object);
+ if (container == null)
+ {
+ container = new LocalizedMetaDataContainer();
+ map.put(object, container);
+ }
+ container.addLocalizedDescription(description);
+ }
+
+ public LocalizedString getLocalizedString(Object key)
+ {
+ try
+ {
+ return this.map.get(key) != null ? this.map.get(key).getLocalizedString() : null;
+ }
+ catch (Exception e)
+ {
+ log.error("could not generate localized string.", e);
+ return null;
+ }
+ }
+
+ private static class LocalizedMetaDataContainer
+ {
+ /** The list of localiezd meta data */
+ private List<LocalizedDescriptionMetaData> list = new ArrayList<LocalizedDescriptionMetaData>();
+
+ public void addLocalizedDescription(LocalizedDescriptionMetaData description)
+ {
+ this.list.add(description);
+ }
+
+ public LocalizedString getLocalizedString() throws Exception
+ {
+ LocalizedStringAdapter adapter = new LocalizedStringAdapter();
+ return adapter.unmarshal(list);
+ }
+ }
+}
Added: modules/portlet/trunk/test/src/main/org/jboss/portal/portlet/test/metadata/factory/PortletApplicationModelFactory.java
===================================================================
--- modules/portlet/trunk/test/src/main/org/jboss/portal/portlet/test/metadata/factory/PortletApplicationModelFactory.java (rev 0)
+++ modules/portlet/trunk/test/src/main/org/jboss/portal/portlet/test/metadata/factory/PortletApplicationModelFactory.java 2007-12-14 13:51:58 UTC (rev 9343)
@@ -0,0 +1,836 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.portlet.test.metadata.factory;
+
+import java.net.URI;
+import java.net.URISyntaxException;
+
+import org.apache.log4j.Logger;
+import org.jboss.portal.common.i18n.LocalizedString;
+import org.jboss.portal.portlet.test.metadata.impl.CustomPortletModeMetaData;
+import org.jboss.portal.portlet.test.metadata.impl.CustomWindowStateMetaData;
+import org.jboss.portal.portlet.test.metadata.impl.ListenerMetaData;
+import org.jboss.portal.portlet.test.metadata.impl.PortletApplication10MetaData;
+import org.jboss.portal.portlet.test.metadata.impl.PortletApplication20MetaData;
+import org.jboss.portal.portlet.test.metadata.impl.PortletApplicationMetaData;
+import org.jboss.portal.portlet.test.metadata.impl.PublicRenderParameterMetaData;
+import org.jboss.portal.portlet.test.metadata.impl.UserAttributeMetaData;
+import org.jboss.portal.portlet.test.metadata.impl.common.ContainerRuntimeMetaData;
+import org.jboss.portal.portlet.test.metadata.impl.common.DescribableMetaData;
+import org.jboss.portal.portlet.test.metadata.impl.common.InitParamMetaData;
+import org.jboss.portal.portlet.test.metadata.impl.common.LocalizedDescriptionMetaData;
+import org.jboss.portal.portlet.test.metadata.impl.event.EventDefinitionMetaData;
+import org.jboss.portal.portlet.test.metadata.impl.event.EventDefinitionReferenceMetaData;
+import org.jboss.portal.portlet.test.metadata.impl.filter.FilterMappingMetaData;
+import org.jboss.portal.portlet.test.metadata.impl.filter.FilterMetaData;
+import org.jboss.portal.portlet.test.metadata.impl.portlet.PortletCacheScopeEnum;
+import org.jboss.portal.portlet.test.metadata.impl.portlet.PortletInfoMetaData;
+import org.jboss.portal.portlet.test.metadata.impl.portlet.PortletMetaData;
+import org.jboss.portal.portlet.test.metadata.impl.portlet.PortletModeMetaData;
+import org.jboss.portal.portlet.test.metadata.impl.portlet.PortletPreferenceMetaData;
+import org.jboss.portal.portlet.test.metadata.impl.portlet.PortletPreferencesMetaData;
+import org.jboss.portal.portlet.test.metadata.impl.portlet.SecurityRoleRefMetaData;
+import org.jboss.portal.portlet.test.metadata.impl.portlet.SupportedLocaleMetaData;
+import org.jboss.portal.portlet.test.metadata.impl.portlet.SupportsMetaData;
+import org.jboss.portal.portlet.test.metadata.impl.portlet.WindowStateMetaData;
+import org.jboss.portal.portlet.test.metadata.impl.security.PortletCollectionMetaData;
+import org.jboss.portal.portlet.test.metadata.impl.security.SecurityConstraintMetaData;
+import org.jboss.portal.portlet.test.metadata.impl.security.TransportGuaranteeEnum;
+import org.jboss.portal.portlet.test.metadata.impl.security.UserDataConstraintMetaData;
+import org.jboss.xb.binding.GenericObjectModelFactory;
+import org.jboss.xb.binding.UnmarshallingContext;
+import org.xml.sax.Attributes;
+
+import static org.jboss.portal.portlet.test.metadata.impl.PortletMetaDataConstants.*;
+
+/**
+ * @author <a href="mailto:emuckenh@redhat.com">Emanuel Muckenhuber</a>
+ * @version $Revision$
+ */
+public class PortletApplicationModelFactory implements GenericObjectModelFactory
+{
+
+ /** LocalizedDescriptionMetaData container for descriptions */
+ private LocalizedStringBuilder descriptions = new LocalizedStringBuilder();
+
+ /** LocalizedDescriptionMetaData container for displayNames */
+ private LocalizedStringBuilder displayNames = new LocalizedStringBuilder();
+
+ /** Guess what? The logger. */
+ private static final Logger log = Logger.getLogger(PortletApplicationModelFactory.class);
+
+ public Object newRoot(Object root, UnmarshallingContext nav, String nsURI, String localName, Attributes attrs)
+ {
+
+ String version = attrs.getValue("version");
+ String id = attrs.getValue("id");
+
+ // portlet-app 2.0 or 1.0
+ PortletApplicationMetaData md = PORTLET_JSR_286_NS.equals(nsURI)
+ ? new PortletApplication20MetaData()
+ : new PortletApplication10MetaData();
+
+ // Set portlet-app id
+ md.setId(id);
+ // Set portlet-app version
+ md.setVersion(version);
+ // return
+ return md;
+ }
+
+ public Object completeRoot(Object root, UnmarshallingContext ctx, String nsURI, String name)
+ {
+ return root;
+ }
+
+ public Object newChild(Object object, UnmarshallingContext nav, String nsURI, String localName, Attributes attrs)
+ {
+ String id = attrs.getValue("id");
+ if (object instanceof DescribableMetaData)
+ {
+
+ if ("description".equals(localName))
+ {
+ String locale = attrs.getValue("xml:lang") != null ? attrs.getValue("xml:lang") : DEFAULT_LOCALE;
+ LocalizedDescriptionMetaData localized = new LocalizedDescriptionMetaData(locale);
+ this.descriptions.put(object, localized);
+ return localized;
+ }
+ }
+
+ // portlet-app
+ if (object instanceof PortletApplicationMetaData)
+ {
+ if ("portlet".equals(localName))
+ {
+ return new PortletMetaData(id);
+ }
+ else if ("custom-portlet-mode".equals(localName))
+ {
+ return new CustomPortletModeMetaData(id);
+ }
+ else if ("custom-window-state".equals(localName))
+ {
+ return new CustomWindowStateMetaData(id);
+ }
+ else if ("user-attribute".equals(localName))
+ {
+ return new UserAttributeMetaData(id);
+ }
+ else if ("security-constraint".equals(localName))
+ {
+ return new SecurityConstraintMetaData(id);
+ }
+ }
+
+ // portlet-app 2.0
+ if (object instanceof PortletApplication20MetaData && PORTLET_JSR_286_NS.equals(nsURI))
+ {
+ if ("public-render-parameter".equals(localName))
+ {
+ return new PublicRenderParameterMetaData(id);
+ }
+ else if ("event-definition".equals(localName))
+ {
+ return new EventDefinitionMetaData(id);
+ }
+ else if ("filter".equals(localName))
+ {
+ return new FilterMetaData();
+ }
+ else if ("filter-mapping".equals(localName))
+ {
+ return new FilterMappingMetaData();
+ }
+ else if ("listener".equals(localName))
+ {
+ return new ListenerMetaData(id);
+ }
+ else if ("container-runtime-option".equals(localName))
+ {
+ return new ContainerRuntimeMetaData();
+ }
+ }
+
+ // portlet
+ if (object instanceof PortletMetaData)
+ {
+ if ("init-param".equals(localName))
+ {
+ return new InitParamMetaData(id);
+ }
+ else if ("display-name".equals(localName))
+ {
+ String locale = attrs.getValue("xml:lang") != null ? attrs.getValue("xml:lang") : DEFAULT_LOCALE;
+ LocalizedDescriptionMetaData localized = new LocalizedDescriptionMetaData(locale);
+ this.displayNames.put(object, localized);
+ return localized;
+ }
+ else if ("supports".equals(localName))
+ {
+ return new SupportsMetaData(id);
+ }
+ else if ("supported-locale".equals(localName))
+ {
+ return new SupportedLocaleMetaData();
+ }
+ else if ("portlet-info".equals(localName))
+ {
+ return new PortletInfoMetaData(id);
+ }
+ else if ("portlet-preferences".equals(localName))
+ {
+ return new PortletPreferencesMetaData(id);
+ }
+ else if ("security-role-ref".equals(localName))
+ {
+ return new SecurityRoleRefMetaData(id);
+ }
+ else if ("supported-processing-event".equals(localName) && PORTLET_JSR_286_NS.equals(nsURI))
+ {
+ return new EventDefinitionReferenceMetaData(id);
+ }
+ else if ("supported-publishing-event".equals(localName) && PORTLET_JSR_286_NS.equals(nsURI))
+ {
+ return new EventDefinitionReferenceMetaData(id);
+ }
+ else if ("container-runtime-option".equals(localName) && PORTLET_JSR_286_NS.equals(nsURI))
+ {
+ return new ContainerRuntimeMetaData();
+ }
+ }
+
+ // security-constraint
+ if (object instanceof SecurityConstraintMetaData)
+ {
+ if ("portlet-collection".equals(localName))
+ {
+ return new PortletCollectionMetaData();
+ }
+ else if ("user-data-constraint".equals(localName))
+ {
+ return new UserDataConstraintMetaData(id);
+ }
+ else if ("display-name".equals(localName))
+ {
+ String locale = attrs.getValue("xml:lang") != null ? attrs.getValue("xml:lang") : DEFAULT_LOCALE;
+ LocalizedDescriptionMetaData localized = new LocalizedDescriptionMetaData(locale);
+ this.displayNames.put(object, localized);
+ return localized;
+ }
+ }
+
+ // supports
+ if (object instanceof SupportsMetaData)
+ {
+ if ("portlet-mode".equals(localName))
+ {
+ return new PortletModeMetaData();
+ }
+ else if ("window-state".equals(localName) && PORTLET_JSR_286_NS.equals(nsURI))
+ {
+ return new WindowStateMetaData();
+ }
+ }
+
+ // preference (in portlet-preferences)
+ if (object instanceof PortletPreferencesMetaData)
+ {
+ if ("preference".equals(localName))
+ {
+ return new PortletPreferenceMetaData(id);
+ }
+ }
+
+ // filter
+ if (object instanceof FilterMetaData)
+ {
+ if ("init-param".equals(localName))
+ {
+ return new InitParamMetaData(id);
+ }
+ else if ("display-name".equals(localName))
+ {
+ String locale = attrs.getValue("xml:lang") != null ? attrs.getValue("xml:lang") : DEFAULT_LOCALE;
+ LocalizedDescriptionMetaData localized = new LocalizedDescriptionMetaData(locale);
+ this.displayNames.put(object, localized);
+ return localized;
+ }
+ }
+
+ // listener
+ if (object instanceof ListenerMetaData)
+ {
+ if ("display-name".equals(localName))
+ {
+ String locale = attrs.getValue("xml:lang") != null ? attrs.getValue("xml:lang") : DEFAULT_LOCALE;
+ LocalizedDescriptionMetaData localized = new LocalizedDescriptionMetaData(locale);
+ this.displayNames.put(object, localized);
+ return localized;
+ }
+ }
+
+ return null;
+ }
+
+ public void addChild(Object parent, Object child, UnmarshallingContext nav, String nsURI, String localName)
+ {
+
+ if (child instanceof DescribableMetaData)
+ {
+ DescribableMetaData md = (DescribableMetaData) child;
+ LocalizedString d = this.descriptions.getLocalizedString(md);
+ md.setDescription(d);
+ }
+
+ // portlet app
+ if (parent instanceof PortletApplicationMetaData)
+ {
+ PortletApplicationMetaData md = (PortletApplicationMetaData) parent;
+ // add portlet
+ if (child instanceof PortletMetaData)
+ {
+ PortletMetaData portlet = (PortletMetaData) child;
+ portlet.setDisplayName(this.displayNames.getLocalizedString(portlet));
+ md.addPortlet(portlet);
+ }
+ // add custom-portlet-mode
+ else if (child instanceof CustomPortletModeMetaData)
+ {
+ md.addCustomPortletMode((CustomPortletModeMetaData) child);
+ }
+ // add custom window state
+ else if (child instanceof CustomWindowStateMetaData)
+ {
+ md.addCustomWindowState((CustomWindowStateMetaData) child);
+ }
+ // add user-attribute
+ else if (child instanceof UserAttributeMetaData)
+ {
+ md.addUserAttribute((UserAttributeMetaData) child);
+ }
+ // add security-constraint
+ else if (child instanceof SecurityConstraintMetaData)
+ {
+ SecurityConstraintMetaData security = (SecurityConstraintMetaData) child;
+ // display-name
+ security.setDisplayName(this.displayNames.getLocalizedString(security));
+ md.addSecurityConstraint(security);
+ }
+ }
+
+ // portlet-app 2.0
+ if (parent instanceof PortletApplication20MetaData)
+ {
+ PortletApplication20MetaData md = (PortletApplication20MetaData) parent;
+ // add public-render-parameter
+ if (child instanceof PublicRenderParameterMetaData)
+ {
+ md.addPublicRenderParameter((PublicRenderParameterMetaData) child);
+ }
+ // add event-defintion
+ else if (child instanceof EventDefinitionMetaData)
+ {
+ md.addEventDefinition((EventDefinitionMetaData) child);
+ }
+ // add filter
+ else if (child instanceof FilterMetaData)
+ {
+ FilterMetaData filter = (FilterMetaData) child;
+ filter.setDisplayName(this.displayNames.getLocalizedString(filter));
+ md.addFilter(filter);
+ }
+ // add filter-mapping
+ else if (child instanceof FilterMappingMetaData)
+ {
+ md.addFilterMapping((FilterMappingMetaData) child);
+ }
+ // add container-runtime-option
+ else if (child instanceof ContainerRuntimeMetaData)
+ {
+ md.addContainerRuntime((ContainerRuntimeMetaData) child);
+ }
+ // add listener
+ else if (child instanceof ListenerMetaData)
+ {
+ ListenerMetaData listener = (ListenerMetaData) child;
+ listener.setDisplayName(this.displayNames.getLocalizedString(listener));
+ md.addListener(listener);
+ }
+ }
+
+ // portlet
+ if (parent instanceof PortletMetaData)
+ {
+ PortletMetaData md = (PortletMetaData) parent;
+ // init-param
+ if (child instanceof InitParamMetaData)
+ {
+ md.addInitParam((InitParamMetaData) child);
+ }
+ // supports
+ else if (child instanceof SupportsMetaData)
+ {
+ md.addSupport((SupportsMetaData) child);
+ }
+ // supported-locale
+ else if (child instanceof SupportedLocaleMetaData)
+ {
+ md.addSupportedLocale((SupportedLocaleMetaData) child);
+ }
+ // portlet-info
+ else if (child instanceof PortletInfoMetaData)
+ {
+ md.setPortletInfo((PortletInfoMetaData) child);
+ }
+ // portlet-preferences
+ else if (child instanceof PortletPreferencesMetaData)
+ {
+ md.setPortletPreferences((PortletPreferencesMetaData) child);
+ }
+ // security-role-ref
+ else if (child instanceof SecurityRoleRefMetaData)
+ {
+ md.addSecurityRoleRef((SecurityRoleRefMetaData) child);
+ }
+ // supported-events
+ else if (child instanceof EventDefinitionReferenceMetaData)
+ {
+ if ("supported-processing-event".equals(localName))
+ {
+ md.addSupportedProcessingEvent((EventDefinitionReferenceMetaData) child);
+ }
+ else if ("supported-publishing-event".equals(localName))
+ {
+ md.addSupportedPublishingEvent((EventDefinitionReferenceMetaData) child);
+ }
+ }
+ // container-runtime-option
+ else if (child instanceof ContainerRuntimeMetaData)
+ {
+ md.addContainerRuntime((ContainerRuntimeMetaData) child);
+ }
+ }
+
+ // adding user-data-constraint and portlet-name(s) to security-constraint
+ if (parent instanceof SecurityConstraintMetaData)
+ {
+ SecurityConstraintMetaData md = (SecurityConstraintMetaData) parent;
+ // add user-data-constraint
+ if (child instanceof UserDataConstraintMetaData)
+ {
+ md.setUserDataConstraint((UserDataConstraintMetaData) child);
+ }
+ // add portlet-collection
+ else if (child instanceof PortletCollectionMetaData)
+ {
+ md.setPortletList((PortletCollectionMetaData) child);
+ }
+ }
+
+ // filter
+ if (parent instanceof FilterMetaData)
+ {
+ FilterMetaData md = (FilterMetaData) parent;
+ // add init-param
+ if (child instanceof InitParamMetaData)
+ {
+ md.addInitParam((InitParamMetaData) child);
+ }
+ }
+
+ // add portlet-mode and window-state
+ if (parent instanceof SupportsMetaData)
+ {
+ SupportsMetaData md = (SupportsMetaData) parent;
+ if (child instanceof PortletModeMetaData)
+ {
+ md.addPortletMode((PortletModeMetaData) child);
+ }
+ else if (child instanceof WindowStateMetaData)
+ {
+ md.addWindowState((WindowStateMetaData) child);
+ }
+ }
+
+ // add preference
+ if (parent instanceof PortletPreferencesMetaData)
+ {
+ PortletPreferencesMetaData md = (PortletPreferencesMetaData) parent;
+ if (child instanceof PortletPreferenceMetaData)
+ {
+ md.addPortletPreference((PortletPreferenceMetaData) child);
+ }
+ }
+ }
+
+ public void setValue(Object object, UnmarshallingContext nav, String nsURI, String localName, String value)
+ {
+
+ // JSR 286 portlet-app attributes - default-namespace and resource-bundle.
+ if (object instanceof PortletApplication20MetaData)
+ {
+ PortletApplication20MetaData md = (PortletApplication20MetaData) object;
+ if ("resource-bundle".equals(localName))
+ {
+ md.setResourceBundle(value);
+ }
+ else if ("default-namespace".equals(localName))
+ {
+ try
+ {
+ md.setDefaultNamespace(new URI(value));
+ }
+ catch (URISyntaxException e)
+ {
+ log.error("Invalid syntax for default-namespace: " + value);
+ }
+ }
+ }
+
+ // portlet
+ if (object instanceof PortletMetaData)
+ {
+ PortletMetaData md = (PortletMetaData) object;
+ if ("portlet-name".equals(localName))
+ {
+ md.setPortletName(value);
+ }
+ else if ("portlet-class".equals(localName))
+ {
+ md.setPortletClass(value);
+ }
+ else if ("cache-scope".equals(localName) && PORTLET_JSR_286_NS.equals(nsURI))
+ {
+ md.setCacheScope(PortletCacheScopeEnum.valueOf(value));
+ }
+ else if ("expiration-cache".equals(localName))
+ {
+ md.setExpirationCache(Integer.valueOf(value));
+ }
+ else if ("resource-bundle".equals(localName))
+ {
+ md.setResourceBundle(value);
+ }
+ else if ("supported-public-render-parameter".equals(localName) && PORTLET_JSR_286_NS.equals(nsURI))
+ {
+ md.addSupportedPublicRenderParameter(value);
+ }
+ }
+
+ if (object instanceof LocalizedDescriptionMetaData)
+ {
+ LocalizedDescriptionMetaData localized = (LocalizedDescriptionMetaData) object;
+ if ("description".equals(localName))
+ {
+ localized.setDescription(value);
+ }
+ else if ("display-name".equals(localName))
+ {
+ localized.setDescription(value);
+ }
+ }
+
+ // init-param
+ if (object instanceof InitParamMetaData)
+ {
+ InitParamMetaData md = (InitParamMetaData) object;
+ if ("name".equals(localName))
+ {
+ md.setName(value);
+ }
+ else if ("value".equals(localName))
+ {
+ md.setValue(value);
+ }
+ }
+
+ // supports
+ if (object instanceof SupportsMetaData)
+ {
+ SupportsMetaData md = (SupportsMetaData) object;
+ if ("mime-type".equals(localName))
+ {
+ md.setMimeType(value);
+ }
+ }
+
+ // supports --- portlet-mode
+ if (object instanceof PortletModeMetaData)
+ {
+ PortletModeMetaData md = (PortletModeMetaData) object;
+ if ("portlet-mode".equals(localName))
+ {
+ md.setPortletMode(value);
+ }
+ }
+
+ // supports --- window-state
+ if (object instanceof WindowStateMetaData)
+ {
+ WindowStateMetaData md = (WindowStateMetaData) object;
+ if ("window-state".equals(localName))
+ {
+ md.setWindowState(value);
+ }
+ }
+
+ // supported-locale
+ if (object instanceof SupportedLocaleMetaData)
+ {
+ SupportedLocaleMetaData md = (SupportedLocaleMetaData) object;
+ if ("supported-locale".equals(localName))
+ {
+ md.setLocale(value);
+ }
+ }
+
+ // portlet-info
+ if (object instanceof PortletInfoMetaData)
+ {
+ PortletInfoMetaData md = (PortletInfoMetaData) object;
+ if ("title".equals(localName))
+ {
+ md.setTitle(value);
+ }
+ else if ("short-title".equals(localName))
+ {
+ md.setShortTitle(value);
+ }
+ else if ("keywords".equals(localName))
+ {
+ md.setKeywords(value);
+ }
+ }
+
+ // portlet-preferences
+ if (object instanceof PortletPreferencesMetaData)
+ {
+ PortletPreferencesMetaData md = (PortletPreferencesMetaData) object;
+ if ("preferences-validator".equals(localName))
+ {
+ md.setPreferenceValidator(value);
+ }
+ }
+
+ // preference
+ if (object instanceof PortletPreferenceMetaData)
+ {
+ PortletPreferenceMetaData md = (PortletPreferenceMetaData) object;
+ if ("name".equals(localName))
+ {
+ md.setName(value);
+ }
+ else if ("value".equals(localName))
+ {
+ md.addValue(value);
+ }
+ else if ("read-only".equals(localName))
+ {
+ md.setReadOnly(Boolean.valueOf(value));
+ }
+ }
+
+ // security-role-ref
+ if (object instanceof SecurityRoleRefMetaData)
+ {
+ SecurityRoleRefMetaData md = (SecurityRoleRefMetaData) object;
+ if ("role-name".equals(localName))
+ {
+ md.setRoleName(value);
+ }
+ else if ("role-link".equals(localName))
+ {
+ md.setRoleLink(value);
+ }
+ }
+
+ // supported events
+ if (object instanceof EventDefinitionReferenceMetaData)
+ {
+ EventDefinitionReferenceMetaData md = (EventDefinitionReferenceMetaData) object;
+ if ("qname".equals(localName))
+ {
+ md.setQname(nav.resolveQName(value));
+ }
+ else if ("name".equals(localName))
+ {
+ md.setName(value);
+ }
+ }
+
+ // custom-portlet-mode
+ if (object instanceof CustomPortletModeMetaData)
+ {
+ CustomPortletModeMetaData mode = (CustomPortletModeMetaData) object;
+ if ("portlet-mode".equals(localName))
+ {
+ mode.setPortletMode(value);
+ }
+ else if ("portal-managed".equals(localName) && PORTLET_JSR_286_NS.equals(nsURI))
+ {
+ mode.setPortalManaged(Boolean.parseBoolean(value));
+ }
+ }
+
+ // custom-window-state
+ if (object instanceof CustomWindowStateMetaData)
+ {
+ CustomWindowStateMetaData md = (CustomWindowStateMetaData) object;
+ if ("window-state".equals(localName))
+ {
+ md.setWindowState(value);
+ }
+ }
+
+ // user-attribute
+ if (object instanceof UserAttributeMetaData)
+ {
+ UserAttributeMetaData md = (UserAttributeMetaData) object;
+ if ("name".equals(localName))
+ {
+ md.setName(value);
+ }
+ }
+
+ // user-data-constraint
+ if (object instanceof UserDataConstraintMetaData)
+ {
+ UserDataConstraintMetaData md = (UserDataConstraintMetaData) object;
+ if ("transport-guarantee".equals(localName))
+ {
+ md.setTransportQuarantee(TransportGuaranteeEnum.valueOf(value));
+ }
+ }
+
+ // portlet-collection in security-constraint
+ if (object instanceof PortletCollectionMetaData)
+ {
+ PortletCollectionMetaData md = (PortletCollectionMetaData) object;
+ if ("portlet-name".equals(localName))
+ {
+ md.addPortletname(value);
+ }
+ }
+
+ // filter
+ if (object instanceof FilterMetaData && PORTLET_JSR_286_NS.equals(nsURI))
+ {
+ FilterMetaData md = (FilterMetaData) object;
+ if ("filter-class".equals(localName))
+ {
+ md.setFilterClass(value);
+ }
+ else if ("filter-name".equals(localName))
+ {
+ md.setFilterName(value);
+ }
+ else if ("lifecycle".equals(localName))
+ {
+ md.addLifecycle(value);
+ }
+ }
+
+ // filter-mapping
+ if (object instanceof FilterMappingMetaData && PORTLET_JSR_286_NS.equals(nsURI))
+ {
+ FilterMappingMetaData md = (FilterMappingMetaData) object;
+ if ("filter-name".equals(localName))
+ {
+ md.setName(value);
+ }
+ if ("portlet-name".equals(localName))
+ {
+ md.addPortletName(value);
+ }
+ }
+
+ // event-defintion
+ if (object instanceof EventDefinitionMetaData && PORTLET_JSR_286_NS.equals(nsURI))
+ {
+ EventDefinitionMetaData md = (EventDefinitionMetaData) object;
+ if ("name".equals(localName))
+ {
+ md.setName(value);
+ }
+ else if ("qname".equals(localName))
+ {
+ md.setQname(nav.resolveQName(value));
+ }
+ else if ("value-type".equals(localName))
+ {
+ md.setValueType(value);
+ }
+ else if ("alias".equals(localName))
+ {
+ md.addAlias(nav.resolveQName(value));
+ }
+ }
+
+ // public-render-parameter
+ if (object instanceof PublicRenderParameterMetaData && PORTLET_JSR_286_NS.equals(nsURI))
+ {
+ PublicRenderParameterMetaData md = (PublicRenderParameterMetaData) object;
+ if ("identifier".equals(localName))
+ {
+ md.setIdentifier(value);
+ }
+ else if ("name".equals(localName))
+ {
+ md.setName(value);
+ }
+ else if ("qname".equals(localName))
+ {
+ md.setQname(nav.resolveQName(value));
+ }
+ else if ("alias".equals(localName))
+ {
+ md.addAlias(nav.resolveQName(value));
+ }
+ }
+
+ // container-runtime-option
+ if (object instanceof ContainerRuntimeMetaData && PORTLET_JSR_286_NS.equals(nsURI))
+ {
+ ContainerRuntimeMetaData md = (ContainerRuntimeMetaData) object;
+ if ("name".equals(localName))
+ {
+ md.setName(value);
+ }
+ else if ("value".equals(localName))
+ {
+ md.addValue(value);
+ }
+ }
+
+ // listener
+ if (object instanceof ListenerMetaData && PORTLET_JSR_286_NS.equals(nsURI))
+ {
+ ListenerMetaData md = (ListenerMetaData) object;
+ if ("listener-class".equals(localName))
+ {
+ md.setListenerClass(value);
+ }
+ }
+ }
+}
Modified: modules/portlet/trunk/test/src/main/org/jboss/portal/portlet/test/metadata/impl/CustomPortletModeMetaData.java
===================================================================
--- modules/portlet/trunk/test/src/main/org/jboss/portal/portlet/test/metadata/impl/CustomPortletModeMetaData.java 2007-12-13 23:18:58 UTC (rev 9342)
+++ modules/portlet/trunk/test/src/main/org/jboss/portal/portlet/test/metadata/impl/CustomPortletModeMetaData.java 2007-12-14 13:51:58 UTC (rev 9343)
@@ -25,18 +25,15 @@
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlType;
-import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
-import org.jboss.portal.common.i18n.LocalizedString;
-import org.jboss.portal.portlet.test.metadata.impl.adapter.LocalizedStringAdapter;
-import org.jboss.portal.portlet.test.metadata.impl.common.DescribeableMetaData;
+import org.jboss.portal.portlet.test.metadata.impl.common.DescribableMetaData;
/**
* @author <a href="mailto:emuckenh@redhat.com">Emanuel Muckenhuber</a>
* @version $Revision$
*/
@XmlType(name = "custom-portlet-modeType")
-public class CustomPortletModeMetaData extends DescribeableMetaData
+public class CustomPortletModeMetaData extends DescribableMetaData
{
/** The custom portlet mode id*/
@@ -48,9 +45,13 @@
/** Is portal managed */
private boolean portalManaged = true;
- /** The decoration name */
- private LocalizedString decorationName;
-
+ public CustomPortletModeMetaData() {}
+
+ public CustomPortletModeMetaData(String id)
+ {
+ this.id = id;
+ }
+
@XmlAttribute(name = "id")
public String getId()
{
@@ -83,17 +84,5 @@
{
this.portalManaged = portalManaged;
}
-
- @XmlElement(name = "decoration-name", namespace = PortletMetaDataConstants.PORTLET_JSR_286_NS)
- @XmlJavaTypeAdapter(LocalizedStringAdapter.class)
- public LocalizedString getDecorationName()
- {
- return decorationName;
- }
-
- public void setDecorationName(LocalizedString decorationName)
- {
- this.decorationName = decorationName;
- }
-
+
}
Modified: modules/portlet/trunk/test/src/main/org/jboss/portal/portlet/test/metadata/impl/CustomWindowStateMetaData.java
===================================================================
--- modules/portlet/trunk/test/src/main/org/jboss/portal/portlet/test/metadata/impl/CustomWindowStateMetaData.java 2007-12-13 23:18:58 UTC (rev 9342)
+++ modules/portlet/trunk/test/src/main/org/jboss/portal/portlet/test/metadata/impl/CustomWindowStateMetaData.java 2007-12-14 13:51:58 UTC (rev 9343)
@@ -26,14 +26,14 @@
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlType;
-import org.jboss.portal.portlet.test.metadata.impl.common.DescribeableMetaData;
+import org.jboss.portal.portlet.test.metadata.impl.common.DescribableMetaData;
/**
* @author <a href="mailto:emuckenh@redhat.com">Emanuel Muckenhuber</a>
* @version $Revision$
*/
@XmlType(name = "custom-window-stateType")
-public class CustomWindowStateMetaData extends DescribeableMetaData
+public class CustomWindowStateMetaData extends DescribableMetaData
{
/** The window state id */
@@ -42,6 +42,13 @@
/** The window state */
private String windowState;
+ public CustomWindowStateMetaData() {}
+
+ public CustomWindowStateMetaData(String id)
+ {
+ this.id = id;
+ }
+
@XmlAttribute(name = "id")
public String getId()
{
Added: modules/portlet/trunk/test/src/main/org/jboss/portal/portlet/test/metadata/impl/ListenerMetaData.java
===================================================================
--- modules/portlet/trunk/test/src/main/org/jboss/portal/portlet/test/metadata/impl/ListenerMetaData.java (rev 0)
+++ modules/portlet/trunk/test/src/main/org/jboss/portal/portlet/test/metadata/impl/ListenerMetaData.java 2007-12-14 13:51:58 UTC (rev 9343)
@@ -0,0 +1,95 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.portlet.test.metadata.impl;
+
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlType;
+import javax.xml.bind.annotation.adapters.CollapsedStringAdapter;
+import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
+
+import org.jboss.portal.common.i18n.LocalizedString;
+import org.jboss.portal.portlet.test.metadata.impl.adapter.LocalizedStringAdapter;
+import org.jboss.portal.portlet.test.metadata.impl.common.DescribableMetaData;
+
+/**
+ * @author <a href="mailto:emuckenh@redhat.com">Emanuel Muckenhuber</a>
+ * @version $Revision$
+ */
+@XmlType(name = "listenerType")
+public class ListenerMetaData extends DescribableMetaData
+{
+
+ /** The id */
+ private String id;
+
+ /** The display name */
+ private LocalizedString displayName;
+
+ /** The listener class */
+ private String listenerClass;
+
+ public ListenerMetaData() {}
+
+ public ListenerMetaData(String id)
+ {
+ this.id = id;
+ }
+
+ @XmlAttribute(name = "id")
+ public String getId()
+ {
+ return id;
+ }
+
+ public void setId(String id)
+ {
+ this.id = id;
+ }
+
+ @XmlElement(name = "display-name")
+ @XmlJavaTypeAdapter(LocalizedStringAdapter.class)
+ public LocalizedString getDisplayName()
+ {
+ return displayName;
+ }
+
+ public void setDisplayName(LocalizedString displayName)
+ {
+ this.displayName = displayName;
+ }
+
+ @XmlElement(name = "listener-class")
+ @XmlJavaTypeAdapter(CollapsedStringAdapter.class)
+ public String getListenerClass()
+ {
+ return listenerClass;
+ }
+
+ public void setListenerClass(String listenerClass)
+ {
+ this.listenerClass = listenerClass;
+ }
+
+}
+
Modified: modules/portlet/trunk/test/src/main/org/jboss/portal/portlet/test/metadata/impl/PortletApplication10MetaData.java
===================================================================
--- modules/portlet/trunk/test/src/main/org/jboss/portal/portlet/test/metadata/impl/PortletApplication10MetaData.java 2007-12-13 23:18:58 UTC (rev 9342)
+++ modules/portlet/trunk/test/src/main/org/jboss/portal/portlet/test/metadata/impl/PortletApplication10MetaData.java 2007-12-14 13:51:58 UTC (rev 9343)
@@ -23,7 +23,10 @@
package org.jboss.portal.portlet.test.metadata.impl;
import java.net.URI;
+import java.util.ArrayList;
import java.util.Collection;
+import java.util.HashMap;
+import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import java.util.Set;
@@ -36,12 +39,13 @@
import javax.xml.bind.annotation.XmlNs;
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
-import org.jboss.portal.portlet.test.metadata.impl.adapter.ContainerRuntimeAdapter;
-import org.jboss.portal.portlet.test.metadata.impl.adapter.FilterAdapter;
-import org.jboss.portal.portlet.test.metadata.impl.adapter.FilterMappingAdapter;
+import org.jboss.portal.portlet.test.metadata.impl.adapter.CustomPortletModeAdapter;
+import org.jboss.portal.portlet.test.metadata.impl.adapter.CustomWindowStateAdapter;
import org.jboss.portal.portlet.test.metadata.impl.adapter.PortletListAdapter;
import org.jboss.portal.portlet.test.metadata.impl.adapter.UserAttributeAdapter;
+import org.jboss.portal.portlet.test.metadata.impl.common.ContainerRuntimeMetaData;
import org.jboss.portal.portlet.test.metadata.impl.event.EventDefinitionMetaData;
+import org.jboss.portal.portlet.test.metadata.impl.filter.FilterMappingMetaData;
import org.jboss.portal.portlet.test.metadata.impl.filter.FilterMetaData;
import org.jboss.portal.portlet.test.metadata.impl.portlet.PortletMetaData;
import org.jboss.portal.portlet.test.metadata.impl.security.SecurityConstraintMetaData;
@@ -60,48 +64,27 @@
@XmlType(name = "portlet-appType")
public class PortletApplication10MetaData implements PortletApplicationMetaData
{
- /** The portlet application id */
+ /** The portlet application id. */
private String id;
- /** The portlet application version */
+ /** The portlet application version. */
private String version;
- /** A bunch of portlets */
+ /** A bunch of portlets. */
private Map<String, PortletMetaData> portlets;
- /** The user attributes */
+ /** The user attributes. */
private Map<String, UserAttributeMetaData> userAttributes;
- /** The custom portlet mode */
- private List<CustomPortletModeMetaData> customPortletMode;
+ /** The custom portlet mode. */
+ private Map<String, CustomPortletModeMetaData> customPortletModes;
- /** The custom window states */
- private List<CustomWindowStateMetaData> customWindowState;
+ /** The custom window states. */
+ private Map<String, CustomWindowStateMetaData> customWindowStates;
/** The security constraints */
private List<SecurityConstraintMetaData> securityConstraints;
- /** The resource bundle (JSR 286) */
- private String resourceBundle;
-
- /** The default namespace URI (JSR 286) */
- private URI defaultNamespace;
-
- /** The filters (JSR 286) */
- private Map<String, FilterMetaData> filters;
-
- /** The filter mapping (JSR 286) */
- private Map<String, List<String>> filterMapping;
-
- /** The events (JSR 286) */
- private List<EventDefinitionMetaData> events;
-
- /** The public render parameters */
- private List<PublicRenderParameterMetaData> publicRenderParameters;
-
- /** The container runtime options */
- private Map<String, List<String>> containerRuntimeOptions;
-
@XmlAttribute(name = "id")
public String getId()
{
@@ -145,6 +128,15 @@
{
return portlets.get(portletName);
}
+
+ public void addPortlet(PortletMetaData portlet)
+ {
+ if(this.portlets == null)
+ {
+ this.portlets = new LinkedHashMap<String, PortletMetaData>();
+ }
+ this.portlets.put(portlet.getPortletName(), portlet);
+ }
@XmlElement(name = "user-attribute")
@XmlJavaTypeAdapter(UserAttributeAdapter.class)
@@ -157,28 +149,57 @@
{
this.userAttributes = userAttributes;
}
+
+ public void addUserAttribute(UserAttributeMetaData userAttribute)
+ {
+ if( this.userAttributes == null )
+ {
+ this.userAttributes = new HashMap<String, UserAttributeMetaData>();
+ }
+ this.userAttributes.put(userAttribute.getName(), userAttribute);
+ }
@XmlElement(name = "custom-portlet-mode")
- public List<CustomPortletModeMetaData> getCustomPortletMode()
+ @XmlJavaTypeAdapter(CustomPortletModeAdapter.class)
+ public Map<String, CustomPortletModeMetaData> getCustomPortletModes()
{
- return customPortletMode;
+ return customPortletModes;
}
- public void setCustomPortletMode(List<CustomPortletModeMetaData> customPortletMode)
+ public void setCustomPortletModes(Map<String, CustomPortletModeMetaData> customPortletMode)
{
- this.customPortletMode = customPortletMode;
+ this.customPortletModes = customPortletMode;
}
+
+ public void addCustomPortletMode(CustomPortletModeMetaData portletMode)
+ {
+ if ( this.customPortletModes == null)
+ {
+ this.customPortletModes = new HashMap<String, CustomPortletModeMetaData>();
+ }
+ this.customPortletModes.put(portletMode.getPortletMode(), portletMode);
+ }
@XmlElement(name = "custom-window-state")
- public List<CustomWindowStateMetaData> getCustomWindowState()
+ @XmlJavaTypeAdapter(CustomWindowStateAdapter.class)
+ public Map<String, CustomWindowStateMetaData> getCustomWindowStates()
{
- return customWindowState;
+ return customWindowStates;
}
- public void setCustomWindowState(List<CustomWindowStateMetaData> customWindowState)
+ public void setCustomWindowStates(Map<String, CustomWindowStateMetaData> customWindowState)
{
- this.customWindowState = customWindowState;
+ this.customWindowStates = customWindowState;
}
+
+ public void addCustomWindowState(CustomWindowStateMetaData windowState)
+ {
+ if( this.customWindowStates == null )
+ {
+ this.customWindowStates = new HashMap<String, CustomWindowStateMetaData>();
+ }
+ this.customWindowStates.put(windowState.getWindowState(), windowState);
+ }
@XmlElement(name = "security-constraint")
public List<SecurityConstraintMetaData> getSecurityConstraints()
@@ -190,104 +211,64 @@
{
this.securityConstraints = securityConstraints;
}
-
- @XmlElement(name = "resource-bundle", namespace = PortletMetaDataConstants.PORTLET_JSR_286_NS)
- public String getResourceBundle()
+
+ public void addSecurityConstraint(SecurityConstraintMetaData securityConstraint)
{
- return resourceBundle;
+ if(this.securityConstraints == null)
+ {
+ this.securityConstraints = new ArrayList<SecurityConstraintMetaData>();
+ }
+ this.securityConstraints.add(securityConstraint);
}
- public void setResourceBundle(String resourceBundle)
+ public String getResourceBundle()
{
- this.resourceBundle = resourceBundle;
+ return null;
}
- @XmlElement(name = "default-namespace")
- public URI getDefaultNamespace()
+ public ContainerRuntimeMetaData getContainerRuntimeOption(String option)
{
- return defaultNamespace;
+ return null;
}
- public void setDefaultNamespace(URI defaultNamespace)
+ public Set<String> getContainerRuntimeOptionSet()
{
- this.defaultNamespace = defaultNamespace;
+ return null;
}
- @XmlElement(name = "filter", namespace = PortletMetaDataConstants.PORTLET_JSR_286_NS)
- @XmlJavaTypeAdapter(FilterAdapter.class)
- public Map<String, FilterMetaData> getFilters()
+ public URI getDefaultNamespace()
{
- return this.filters;
+ return null;
}
- public void setFilters(Map<String, FilterMetaData> filters)
+ public List<EventDefinitionMetaData> getEvents()
{
- this.filters = filters;
+ return null;
}
- public Collection<FilterMetaData> getFilterCollection()
- {
- return this.filters != null ? this.filters.values() : null;
- }
-
public FilterMetaData getFilter(String filterName)
{
- return this.filters.get(filterName);
+ return null;
}
- @XmlElement(name = "filter-mapping")
- @XmlJavaTypeAdapter(FilterMappingAdapter.class)
- public Map<String, List<String>> getFilterMapping()
+ public Collection<FilterMetaData> getFilterCollection()
{
- return filterMapping;
+ return null;
}
- public void setFilterMapping(Map<String, List<String>> filterMapping)
+ public Map<String, FilterMappingMetaData> getFilterMapping()
{
- this.filterMapping = filterMapping;
+ return null;
}
- @XmlElement(name = "event-definition", namespace = PortletMetaDataConstants.PORTLET_JSR_286_NS)
- public List<EventDefinitionMetaData> getEvents()
+ public List<ListenerMetaData> getListeners()
{
- return events;
+ return null;
}
- public void setEvents(List<EventDefinitionMetaData> events)
- {
- this.events = events;
- }
-
- @XmlElement(name = "public-render-parameter")
public List<PublicRenderParameterMetaData> getPublicRenderParameters()
{
- return publicRenderParameters;
+ return null;
}
- public void setPublicRenderParameters(List<PublicRenderParameterMetaData> publicRenderParameters)
- {
- this.publicRenderParameters = publicRenderParameters;
- }
-
- @XmlElement(name = "container-runtime-option")
- @XmlJavaTypeAdapter(ContainerRuntimeAdapter.class)
- public Map<String, List<String>> getContainerRuntimeOptions()
- {
- return containerRuntimeOptions;
- }
-
- public void setContainerRuntimeOptions(Map<String, List<String>> containerRuntimeOptions)
- {
- this.containerRuntimeOptions = containerRuntimeOptions;
- }
-
- public List<String> getContainerRuntimeOption(String option)
- {
- return this.containerRuntimeOptions.get(option);
- }
-
- public Set<String> getContainerRuntimeOptionSet()
- {
- return this.containerRuntimeOptions != null ? this.containerRuntimeOptions.keySet() : null;
- }
}
Modified: modules/portlet/trunk/test/src/main/org/jboss/portal/portlet/test/metadata/impl/PortletApplication20MetaData.java
===================================================================
--- modules/portlet/trunk/test/src/main/org/jboss/portal/portlet/test/metadata/impl/PortletApplication20MetaData.java 2007-12-13 23:18:58 UTC (rev 9342)
+++ modules/portlet/trunk/test/src/main/org/jboss/portal/portlet/test/metadata/impl/PortletApplication20MetaData.java 2007-12-14 13:51:58 UTC (rev 9343)
@@ -23,7 +23,10 @@
package org.jboss.portal.portlet.test.metadata.impl;
import java.net.URI;
+import java.util.ArrayList;
import java.util.Collection;
+import java.util.HashMap;
+import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import java.util.Set;
@@ -37,11 +40,15 @@
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
import org.jboss.portal.portlet.test.metadata.impl.adapter.ContainerRuntimeAdapter;
+import org.jboss.portal.portlet.test.metadata.impl.adapter.CustomPortletModeAdapter;
+import org.jboss.portal.portlet.test.metadata.impl.adapter.CustomWindowStateAdapter;
import org.jboss.portal.portlet.test.metadata.impl.adapter.FilterAdapter;
import org.jboss.portal.portlet.test.metadata.impl.adapter.FilterMappingAdapter;
import org.jboss.portal.portlet.test.metadata.impl.adapter.PortletListAdapter;
import org.jboss.portal.portlet.test.metadata.impl.adapter.UserAttributeAdapter;
+import org.jboss.portal.portlet.test.metadata.impl.common.ContainerRuntimeMetaData;
import org.jboss.portal.portlet.test.metadata.impl.event.EventDefinitionMetaData;
+import org.jboss.portal.portlet.test.metadata.impl.filter.FilterMappingMetaData;
import org.jboss.portal.portlet.test.metadata.impl.filter.FilterMetaData;
import org.jboss.portal.portlet.test.metadata.impl.portlet.PortletMetaData;
import org.jboss.portal.portlet.test.metadata.impl.security.SecurityConstraintMetaData;
@@ -73,10 +80,10 @@
private Map<String, UserAttributeMetaData> userAttributes;
/** The custom portlet mode */
- private List<CustomPortletModeMetaData> customPortletMode;
+ private Map<String, CustomPortletModeMetaData> customPortletModes;
/** The custom window states */
- private List<CustomWindowStateMetaData> customWindowState;
+ private Map<String, CustomWindowStateMetaData> customWindowStates;
/** The security constraints */
private List<SecurityConstraintMetaData> securityConstraints;
@@ -91,16 +98,19 @@
private Map<String, FilterMetaData> filters;
/** The filter mapping (JSR 286) */
- private Map<String, List<String>> filterMapping;
+ private Map<String, FilterMappingMetaData> filterMapping;
/** The events (JSR 286) */
private List<EventDefinitionMetaData> events;
/** The public render parameters */
private List<PublicRenderParameterMetaData> publicRenderParameters;
+
+ /** The url generation listener */
+ private List<ListenerMetaData> listeners;
/** The container runtime options */
- private Map<String, List<String>> containerRuntimeOptions;
+ private Map<String, ContainerRuntimeMetaData> containerRuntimeOptions;
@XmlAttribute(name = "id")
public String getId()
@@ -146,6 +156,15 @@
{
return portlets.get(portletName);
}
+
+ public void addPortlet(PortletMetaData portlet)
+ {
+ if(this.portlets == null)
+ {
+ this.portlets = new LinkedHashMap<String, PortletMetaData>();
+ }
+ this.portlets.put(portlet.getPortletName(), portlet);
+ }
@XmlElement(name = "user-attribute")
@XmlJavaTypeAdapter(UserAttributeAdapter.class)
@@ -158,28 +177,57 @@
{
this.userAttributes = userAttributes;
}
+
+ public void addUserAttribute(UserAttributeMetaData userAttribute)
+ {
+ if( this.userAttributes == null )
+ {
+ this.userAttributes = new HashMap<String, UserAttributeMetaData>();
+ }
+ this.userAttributes.put(userAttribute.getName(), userAttribute);
+ }
@XmlElement(name = "custom-portlet-mode")
- public List<CustomPortletModeMetaData> getCustomPortletMode()
+ @XmlJavaTypeAdapter(CustomPortletModeAdapter.class)
+ public Map<String, CustomPortletModeMetaData> getCustomPortletModes()
{
- return customPortletMode;
+ return customPortletModes;
}
- public void setCustomPortletMode(List<CustomPortletModeMetaData> customPortletMode)
+ public void setCustomPortletModes(Map<String, CustomPortletModeMetaData> customPortletMode)
{
- this.customPortletMode = customPortletMode;
+ this.customPortletModes = customPortletMode;
}
+
+ public void addCustomPortletMode(CustomPortletModeMetaData portletMode)
+ {
+ if ( this.customPortletModes == null)
+ {
+ this.customPortletModes = new HashMap<String, CustomPortletModeMetaData>();
+ }
+ this.customPortletModes.put(portletMode.getPortletMode(), portletMode);
+ }
@XmlElement(name = "custom-window-state")
- public List<CustomWindowStateMetaData> getCustomWindowState()
+ @XmlJavaTypeAdapter(CustomWindowStateAdapter.class)
+ public Map<String, CustomWindowStateMetaData> getCustomWindowStates()
{
- return customWindowState;
+ return customWindowStates;
}
- public void setCustomWindowState(List<CustomWindowStateMetaData> customWindowState)
+ public void setCustomWindowStates(Map<String, CustomWindowStateMetaData> customWindowState)
{
- this.customWindowState = customWindowState;
+ this.customWindowStates = customWindowState;
}
+
+ public void addCustomWindowState(CustomWindowStateMetaData windowState)
+ {
+ if( this.customWindowStates == null )
+ {
+ this.customWindowStates = new HashMap<String, CustomWindowStateMetaData>();
+ }
+ this.customWindowStates.put(windowState.getWindowState(), windowState);
+ }
@XmlElement(name = "security-constraint")
public List<SecurityConstraintMetaData> getSecurityConstraints()
@@ -191,6 +239,15 @@
{
this.securityConstraints = securityConstraints;
}
+
+ public void addSecurityConstraint(SecurityConstraintMetaData securityConstraint)
+ {
+ if(this.securityConstraints == null)
+ {
+ this.securityConstraints = new ArrayList<SecurityConstraintMetaData>();
+ }
+ this.securityConstraints.add(securityConstraint);
+ }
@XmlElement(name = "resource-bundle", namespace = PortletMetaDataConstants.PORTLET_JSR_286_NS)
public String getResourceBundle()
@@ -235,19 +292,37 @@
{
return this.filters.get(filterName);
}
+
+ public void addFilter(FilterMetaData filter)
+ {
+ if ( this.filters == null)
+ {
+ this.filters = new LinkedHashMap<String, FilterMetaData>();
+ }
+ this.filters.put(filter.getFilterName(), filter);
+ }
- @XmlElement(name = "filter-mapping")
+ @XmlElement(name = "filter-mapping", namespace = PortletMetaDataConstants.PORTLET_JSR_286_NS)
@XmlJavaTypeAdapter(FilterMappingAdapter.class)
- public Map<String, List<String>> getFilterMapping()
+ public Map<String, FilterMappingMetaData> getFilterMapping()
{
return filterMapping;
}
- public void setFilterMapping(Map<String, List<String>> filterMapping)
+ public void setFilterMapping(Map<String, FilterMappingMetaData> filterMapping)
{
this.filterMapping = filterMapping;
}
-
+
+ public void addFilterMapping(FilterMappingMetaData filterMapping)
+ {
+ if(this.filterMapping == null)
+ {
+ this.filterMapping = new HashMap<String, FilterMappingMetaData>();
+ }
+ this.filterMapping.put(filterMapping.getName(), filterMapping);
+ }
+
@XmlElement(name = "event-definition", namespace = PortletMetaDataConstants.PORTLET_JSR_286_NS)
public List<EventDefinitionMetaData> getEvents()
{
@@ -258,8 +333,17 @@
{
this.events = events;
}
+
+ public void addEventDefinition(EventDefinitionMetaData eventDefinition)
+ {
+ if(this.events == null)
+ {
+ this.events = new ArrayList<EventDefinitionMetaData>();
+ }
+ this.events.add(eventDefinition);
+ }
- @XmlElement(name = "public-render-parameter")
+ @XmlElement(name = "public-render-parameter", namespace = PortletMetaDataConstants.PORTLET_JSR_286_NS)
public List<PublicRenderParameterMetaData> getPublicRenderParameters()
{
return publicRenderParameters;
@@ -269,20 +353,50 @@
{
this.publicRenderParameters = publicRenderParameters;
}
+
+ public void addPublicRenderParameter(PublicRenderParameterMetaData renderParameter)
+ {
+ if( this.publicRenderParameters == null)
+ {
+ this.publicRenderParameters = new ArrayList<PublicRenderParameterMetaData>();
+ }
+ this.publicRenderParameters.add(renderParameter);
+ }
+
+ @XmlElement(name = "listener", namespace = PortletMetaDataConstants.PORTLET_JSR_286_NS)
+ public List<ListenerMetaData> getListeners()
+ {
+ return listeners;
+ }
+
+ public void setListeners(List<ListenerMetaData> listeners)
+ {
+ this.listeners = listeners;
+ }
+
+ public void addListener(ListenerMetaData listener)
+ {
+ if (this.listeners == null)
+ {
+ this.listeners = new ArrayList<ListenerMetaData>();
+ }
+ this.listeners.add(listener);
+ }
- @XmlElement(name = "container-runtime-option")
+ @XmlElement(name = "container-runtime-option",
+ namespace = PortletMetaDataConstants.PORTLET_JSR_286_NS)
@XmlJavaTypeAdapter(ContainerRuntimeAdapter.class)
- public Map<String, List<String>> getContainerRuntimeOptions()
+ public Map<String, ContainerRuntimeMetaData> getContainerRuntimeOptions()
{
return containerRuntimeOptions;
}
- public void setContainerRuntimeOptions(Map<String, List<String>> containerRuntimeOptions)
+ public void setContainerRuntimeOptions(Map<String, ContainerRuntimeMetaData> containerRuntimeOptions)
{
this.containerRuntimeOptions = containerRuntimeOptions;
}
- public List<String> getContainerRuntimeOption(String option)
+ public ContainerRuntimeMetaData getContainerRuntimeOption(String option)
{
return this.containerRuntimeOptions.get(option);
}
@@ -291,4 +405,13 @@
{
return this.containerRuntimeOptions != null ? this.containerRuntimeOptions.keySet() : null;
}
+
+ public void addContainerRuntime(ContainerRuntimeMetaData option)
+ {
+ if (this.containerRuntimeOptions == null)
+ {
+ this.containerRuntimeOptions = new HashMap<String, ContainerRuntimeMetaData>();
+ }
+ this.containerRuntimeOptions.put(option.getName(), option);
+ }
}
Modified: modules/portlet/trunk/test/src/main/org/jboss/portal/portlet/test/metadata/impl/PortletApplicationMetaData.java
===================================================================
--- modules/portlet/trunk/test/src/main/org/jboss/portal/portlet/test/metadata/impl/PortletApplicationMetaData.java 2007-12-13 23:18:58 UTC (rev 9342)
+++ modules/portlet/trunk/test/src/main/org/jboss/portal/portlet/test/metadata/impl/PortletApplicationMetaData.java 2007-12-14 13:51:58 UTC (rev 9343)
@@ -28,7 +28,9 @@
import java.util.Map;
import java.util.Set;
+import org.jboss.portal.portlet.test.metadata.impl.common.ContainerRuntimeMetaData;
import org.jboss.portal.portlet.test.metadata.impl.event.EventDefinitionMetaData;
+import org.jboss.portal.portlet.test.metadata.impl.filter.FilterMappingMetaData;
import org.jboss.portal.portlet.test.metadata.impl.filter.FilterMetaData;
import org.jboss.portal.portlet.test.metadata.impl.portlet.PortletMetaData;
import org.jboss.portal.portlet.test.metadata.impl.security.SecurityConstraintMetaData;
@@ -40,21 +42,46 @@
public interface PortletApplicationMetaData
{
public String getId();
+
+ public void setId(String id);
public String getVersion();
+
+ public void setVersion(String version);
+
+ // portlet
public Collection<PortletMetaData> getPortletCollection();
public PortletMetaData getPortlet(String portletName);
+
+ public void addPortlet(PortletMetaData portlet);
+
+ // user-attribute
public Map<String, UserAttributeMetaData> getUserAttributes();
+
+ public void addUserAttribute(UserAttributeMetaData userAttribute);
- public List<CustomPortletModeMetaData> getCustomPortletMode();
+
+ // custom-portlet-mode
+ public Map<String, CustomPortletModeMetaData> getCustomPortletModes();
+
+ public void addCustomPortletMode(CustomPortletModeMetaData portletMode);
- public List<CustomWindowStateMetaData> getCustomWindowState();
+
+ // custom-window-state
+ public Map<String, CustomWindowStateMetaData> getCustomWindowStates();
+
+ public void addCustomWindowState(CustomWindowStateMetaData windowState);
+
+ // security-constraint
public List<SecurityConstraintMetaData> getSecurityConstraints();
-
+
+ public void addSecurityConstraint(SecurityConstraintMetaData securityConstraint);
+
+
public String getResourceBundle();
public URI getDefaultNamespace();
@@ -63,15 +90,15 @@
public FilterMetaData getFilter(String filterName);
- public Map<String, List<String>> getFilterMapping();
+ public Map<String, FilterMappingMetaData> getFilterMapping();
public List<EventDefinitionMetaData> getEvents();
- public void setEvents(List<EventDefinitionMetaData> events);
-
public List<PublicRenderParameterMetaData> getPublicRenderParameters();
public Set<String> getContainerRuntimeOptionSet();
- public List<String> getContainerRuntimeOption(String option);
+ public ContainerRuntimeMetaData getContainerRuntimeOption(String option);
+
+ public List<ListenerMetaData> getListeners();
}
Modified: modules/portlet/trunk/test/src/main/org/jboss/portal/portlet/test/metadata/impl/PortletMetaDataConstants.java
===================================================================
--- modules/portlet/trunk/test/src/main/org/jboss/portal/portlet/test/metadata/impl/PortletMetaDataConstants.java 2007-12-13 23:18:58 UTC (rev 9342)
+++ modules/portlet/trunk/test/src/main/org/jboss/portal/portlet/test/metadata/impl/PortletMetaDataConstants.java 2007-12-14 13:51:58 UTC (rev 9343)
@@ -22,6 +22,8 @@
******************************************************************************/
package org.jboss.portal.portlet.test.metadata.impl;
+import static javax.xml.XMLConstants.*;
+
/**
* @author <a href="mailto:emuckenh@redhat.com">Emanuel Muckenhuber</a>
* @version $Revision$
@@ -36,7 +38,7 @@
public final static String PORTLET_JSR_286_NS = "http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd";
/** The xml namespace */
- public final static String NS_XML_NAMESPACE = "http://www.w3.org/XML/1998/namespace";
+ public final static String NS_XML_NAMESPACE = XML_NS_URI;
/** The default locale */
public final static String DEFAULT_LOCALE = "en";
Modified: modules/portlet/trunk/test/src/main/org/jboss/portal/portlet/test/metadata/impl/PublicRenderParameterMetaData.java
===================================================================
--- modules/portlet/trunk/test/src/main/org/jboss/portal/portlet/test/metadata/impl/PublicRenderParameterMetaData.java 2007-12-13 23:18:58 UTC (rev 9342)
+++ modules/portlet/trunk/test/src/main/org/jboss/portal/portlet/test/metadata/impl/PublicRenderParameterMetaData.java 2007-12-14 13:51:58 UTC (rev 9343)
@@ -22,6 +22,7 @@
******************************************************************************/
package org.jboss.portal.portlet.test.metadata.impl;
+import java.util.ArrayList;
import java.util.List;
import javax.xml.bind.annotation.XmlAttribute;
@@ -29,14 +30,14 @@
import javax.xml.bind.annotation.XmlType;
import javax.xml.namespace.QName;
-import org.jboss.portal.portlet.test.metadata.impl.common.DescribeableMetaData;
+import org.jboss.portal.portlet.test.metadata.impl.common.DescribableMetaData;
/**
* @author <a href="mailto:emuckenh@redhat.com">Emanuel Muckenhuber</a>
* @version $Revision$
*/
@XmlType(name = "public-render-parameterType")
-public class PublicRenderParameterMetaData extends DescribeableMetaData
+public class PublicRenderParameterMetaData extends DescribableMetaData
{
/** The public render parameter id */
@@ -54,6 +55,13 @@
/** The public render parameter alias */
private List<QName> alias;
+ public PublicRenderParameterMetaData() {}
+
+ public PublicRenderParameterMetaData(String id)
+ {
+ this.id = id;
+ }
+
@XmlAttribute(name = "id")
public String getId()
{
@@ -108,4 +116,14 @@
{
this.alias = alias;
}
+
+ public void addAlias(QName alias)
+ {
+ if(this.alias == null)
+ {
+ this.alias = new ArrayList<QName>();
+ }
+ this.alias.add(alias);
+ }
+
}
Modified: modules/portlet/trunk/test/src/main/org/jboss/portal/portlet/test/metadata/impl/UserAttributeMetaData.java
===================================================================
--- modules/portlet/trunk/test/src/main/org/jboss/portal/portlet/test/metadata/impl/UserAttributeMetaData.java 2007-12-13 23:18:58 UTC (rev 9342)
+++ modules/portlet/trunk/test/src/main/org/jboss/portal/portlet/test/metadata/impl/UserAttributeMetaData.java 2007-12-14 13:51:58 UTC (rev 9343)
@@ -26,14 +26,14 @@
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlType;
-import org.jboss.portal.portlet.test.metadata.impl.common.DescribeableMetaData;
+import org.jboss.portal.portlet.test.metadata.impl.common.DescribableMetaData;
/**
* @author <a href="mailto:emuckenh@redhat.com">Emanuel Muckenhuber</a>
* @version $Revision$
*/
@XmlType(name = "user-attributeType")
-public class UserAttributeMetaData extends DescribeableMetaData
+public class UserAttributeMetaData extends DescribableMetaData
{
/** The id */
@@ -42,6 +42,13 @@
/** The name */
private String name;
+ public UserAttributeMetaData() {}
+
+ public UserAttributeMetaData(String id)
+ {
+ this.id = id;
+ }
+
@XmlAttribute(name = "id")
public String getId()
{
Modified: modules/portlet/trunk/test/src/main/org/jboss/portal/portlet/test/metadata/impl/adapter/ContainerRuntimeAdapter.java
===================================================================
--- modules/portlet/trunk/test/src/main/org/jboss/portal/portlet/test/metadata/impl/adapter/ContainerRuntimeAdapter.java 2007-12-13 23:18:58 UTC (rev 9342)
+++ modules/portlet/trunk/test/src/main/org/jboss/portal/portlet/test/metadata/impl/adapter/ContainerRuntimeAdapter.java 2007-12-14 13:51:58 UTC (rev 9343)
@@ -35,22 +35,22 @@
* @version $Revision$
*/
public class ContainerRuntimeAdapter
- extends XmlAdapter<List<ContainerRuntimeMetaData>, java.util.Map<String, List<String>>>
+ extends XmlAdapter<List<ContainerRuntimeMetaData>, java.util.Map<String, ContainerRuntimeMetaData>>
{
@Override
- public List<ContainerRuntimeMetaData> marshal(Map<String, List<String>> map) throws Exception
+ public List<ContainerRuntimeMetaData> marshal(Map<String, ContainerRuntimeMetaData> map) throws Exception
{
throw new RuntimeException("Not yet implemented.");
}
@Override
- public Map<String, List<String>> unmarshal(List<ContainerRuntimeMetaData> list) throws Exception
+ public Map<String, ContainerRuntimeMetaData> unmarshal(List<ContainerRuntimeMetaData> list) throws Exception
{
- Map<String, List<String>> map = new HashMap<String, List<String>>();
+ Map<String, ContainerRuntimeMetaData> map = new HashMap<String, ContainerRuntimeMetaData>();
for (ContainerRuntimeMetaData c : list)
{
- map.put(c.getName(), c.getValues());
+ map.put(c.getName(), c);
}
return map;
}
Added: modules/portlet/trunk/test/src/main/org/jboss/portal/portlet/test/metadata/impl/adapter/CustomPortletModeAdapter.java
===================================================================
--- modules/portlet/trunk/test/src/main/org/jboss/portal/portlet/test/metadata/impl/adapter/CustomPortletModeAdapter.java (rev 0)
+++ modules/portlet/trunk/test/src/main/org/jboss/portal/portlet/test/metadata/impl/adapter/CustomPortletModeAdapter.java 2007-12-14 13:51:58 UTC (rev 9343)
@@ -0,0 +1,59 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.portlet.test.metadata.impl.adapter;
+
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
+
+import javax.xml.bind.annotation.adapters.XmlAdapter;
+
+import org.jboss.portal.portlet.test.metadata.impl.CustomPortletModeMetaData;
+
+/**
+ * @author <a href="mailto:emuckenh@redhat.com">Emanuel Muckenhuber</a>
+ * @version $Revision$
+ */
+public class CustomPortletModeAdapter extends XmlAdapter<List<CustomPortletModeMetaData>, Map<String, CustomPortletModeMetaData>>
+{
+
+ @Override
+ public List<CustomPortletModeMetaData> marshal(Map<String, CustomPortletModeMetaData> map) throws Exception
+ {
+ // FIXME marshal
+ return null;
+ }
+
+ @Override
+ public Map<String, CustomPortletModeMetaData> unmarshal(List<CustomPortletModeMetaData> list) throws Exception
+ {
+ Map<String, CustomPortletModeMetaData> map = new LinkedHashMap<String, CustomPortletModeMetaData>();
+ for (CustomPortletModeMetaData md : list)
+ {
+ map.put(md.getPortletMode(), md);
+ }
+ return map;
+ }
+
+}
+
Added: modules/portlet/trunk/test/src/main/org/jboss/portal/portlet/test/metadata/impl/adapter/CustomWindowStateAdapter.java
===================================================================
--- modules/portlet/trunk/test/src/main/org/jboss/portal/portlet/test/metadata/impl/adapter/CustomWindowStateAdapter.java (rev 0)
+++ modules/portlet/trunk/test/src/main/org/jboss/portal/portlet/test/metadata/impl/adapter/CustomWindowStateAdapter.java 2007-12-14 13:51:58 UTC (rev 9343)
@@ -0,0 +1,59 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.portlet.test.metadata.impl.adapter;
+
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
+
+import javax.xml.bind.annotation.adapters.XmlAdapter;
+
+import org.jboss.portal.portlet.test.metadata.impl.CustomWindowStateMetaData;
+
+/**
+ * @author <a href="mailto:emuckenh@redhat.com">Emanuel Muckenhuber</a>
+ * @version $Revision$
+ */
+public class CustomWindowStateAdapter extends XmlAdapter<List<CustomWindowStateMetaData>, Map<String, CustomWindowStateMetaData>>
+{
+
+ @Override
+ public List<CustomWindowStateMetaData> marshal(Map<String, CustomWindowStateMetaData> map) throws Exception
+ {
+ // FIXME marshal
+ return null;
+ }
+
+ @Override
+ public Map<String, CustomWindowStateMetaData> unmarshal(List<CustomWindowStateMetaData> list) throws Exception
+ {
+ Map<String, CustomWindowStateMetaData> map = new LinkedHashMap<String, CustomWindowStateMetaData>();
+ for(CustomWindowStateMetaData md : list)
+ {
+ map.put(md.getWindowState(), md);
+ }
+ return map;
+ }
+
+}
+
Modified: modules/portlet/trunk/test/src/main/org/jboss/portal/portlet/test/metadata/impl/adapter/FilterMappingAdapter.java
===================================================================
--- modules/portlet/trunk/test/src/main/org/jboss/portal/portlet/test/metadata/impl/adapter/FilterMappingAdapter.java 2007-12-13 23:18:58 UTC (rev 9342)
+++ modules/portlet/trunk/test/src/main/org/jboss/portal/portlet/test/metadata/impl/adapter/FilterMappingAdapter.java 2007-12-14 13:51:58 UTC (rev 9343)
@@ -35,22 +35,22 @@
* @version $Revision$
*/
public class FilterMappingAdapter
- extends XmlAdapter<List<FilterMappingMetaData>, Map<String, List<String>>>
+ extends XmlAdapter<List<FilterMappingMetaData>, Map<String, FilterMappingMetaData>>
{
@Override
- public List<FilterMappingMetaData> marshal(Map<String, List<String>> arg0) throws Exception
+ public List<FilterMappingMetaData> marshal(Map<String, FilterMappingMetaData> arg0) throws Exception
{
throw new RuntimeException("Not yet implemented.");
}
@Override
- public Map<String, List<String>> unmarshal(List<FilterMappingMetaData> list) throws Exception
+ public Map<String, FilterMappingMetaData> unmarshal(List<FilterMappingMetaData> list) throws Exception
{
- Map<String, List<String>> map = new HashMap<String, List<String>>();
+ Map<String, FilterMappingMetaData> map = new HashMap<String, FilterMappingMetaData>();
for (FilterMappingMetaData f : list)
{
- map.put(f.getName(), f.getPortletNames());
+ map.put(f.getName(), f);
}
return map;
}
Modified: modules/portlet/trunk/test/src/main/org/jboss/portal/portlet/test/metadata/impl/adapter/LocalizedStringAdapter.java
===================================================================
--- modules/portlet/trunk/test/src/main/org/jboss/portal/portlet/test/metadata/impl/adapter/LocalizedStringAdapter.java 2007-12-13 23:18:58 UTC (rev 9342)
+++ modules/portlet/trunk/test/src/main/org/jboss/portal/portlet/test/metadata/impl/adapter/LocalizedStringAdapter.java 2007-12-14 13:51:58 UTC (rev 9343)
@@ -29,8 +29,9 @@
import javax.xml.bind.annotation.adapters.XmlAdapter;
+import org.jboss.portal.common.i18n.LocaleFormat;
import org.jboss.portal.common.i18n.LocalizedString;
-import org.jboss.portal.portlet.test.metadata.impl.PortletMetaDataConstants;
+import static org.jboss.portal.portlet.test.metadata.impl.PortletMetaDataConstants.*;
import org.jboss.portal.portlet.test.metadata.impl.common.LocalizedDescriptionMetaData;
/**
@@ -53,9 +54,10 @@
Map<Locale, String> map = new LinkedHashMap<Locale, String>();
for (LocalizedDescriptionMetaData d : descriptionList)
{
- map.put(new Locale(d.getLang()), d.getDescription());
+ Locale locale = LocaleFormat.DEFAULT.getLocale(d.getLang());
+ map.put(locale, d.getDescription());
}
- return new LocalizedString(map, new Locale(PortletMetaDataConstants.DEFAULT_LOCALE));
+ return new LocalizedString(map, new Locale(DEFAULT_LOCALE));
}
}
Modified: modules/portlet/trunk/test/src/main/org/jboss/portal/portlet/test/metadata/impl/adapter/UserAttributeAdapter.java
===================================================================
--- modules/portlet/trunk/test/src/main/org/jboss/portal/portlet/test/metadata/impl/adapter/UserAttributeAdapter.java 2007-12-13 23:18:58 UTC (rev 9342)
+++ modules/portlet/trunk/test/src/main/org/jboss/portal/portlet/test/metadata/impl/adapter/UserAttributeAdapter.java 2007-12-14 13:51:58 UTC (rev 9343)
@@ -24,6 +24,7 @@
import java.util.HashMap;
import java.util.List;
+import java.util.Map;
import javax.xml.bind.annotation.adapters.XmlAdapter;
@@ -35,17 +36,17 @@
*/
public class UserAttributeAdapter
- extends XmlAdapter<List<UserAttributeMetaData>, HashMap<String, UserAttributeMetaData>>
+ extends XmlAdapter<List<UserAttributeMetaData>, Map<String, UserAttributeMetaData>>
{
@Override
- public List<UserAttributeMetaData> marshal(HashMap<String, UserAttributeMetaData> arg0) throws Exception
+ public List<UserAttributeMetaData> marshal(Map<String, UserAttributeMetaData> arg0) throws Exception
{
throw new RuntimeException("Not yet implemented.");
}
@Override
- public HashMap<String, UserAttributeMetaData> unmarshal(List<UserAttributeMetaData> list) throws Exception
+ public Map<String, UserAttributeMetaData> unmarshal(List<UserAttributeMetaData> list) throws Exception
{
HashMap<String, UserAttributeMetaData> m = new HashMap<String, UserAttributeMetaData>();
for (UserAttributeMetaData a : list)
Modified: modules/portlet/trunk/test/src/main/org/jboss/portal/portlet/test/metadata/impl/common/ContainerRuntimeMetaData.java
===================================================================
--- modules/portlet/trunk/test/src/main/org/jboss/portal/portlet/test/metadata/impl/common/ContainerRuntimeMetaData.java 2007-12-13 23:18:58 UTC (rev 9342)
+++ modules/portlet/trunk/test/src/main/org/jboss/portal/portlet/test/metadata/impl/common/ContainerRuntimeMetaData.java 2007-12-14 13:51:58 UTC (rev 9343)
@@ -22,6 +22,7 @@
******************************************************************************/
package org.jboss.portal.portlet.test.metadata.impl.common;
+import java.util.ArrayList;
import java.util.List;
import javax.xml.bind.annotation.XmlElement;
@@ -63,4 +64,12 @@
this.values = values;
}
+ public void addValue(String value)
+ {
+ if( this.values == null)
+ {
+ this.values = new ArrayList<String>();
+ }
+ this.values.add(value);
+ }
}
Copied: modules/portlet/trunk/test/src/main/org/jboss/portal/portlet/test/metadata/impl/common/DescribableMetaData.java (from rev 9242, modules/portlet/trunk/test/src/main/org/jboss/portal/portlet/test/metadata/impl/common/DescribeableMetaData.java)
===================================================================
--- modules/portlet/trunk/test/src/main/org/jboss/portal/portlet/test/metadata/impl/common/DescribableMetaData.java (rev 0)
+++ modules/portlet/trunk/test/src/main/org/jboss/portal/portlet/test/metadata/impl/common/DescribableMetaData.java 2007-12-14 13:51:58 UTC (rev 9343)
@@ -0,0 +1,53 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.portlet.test.metadata.impl.common;
+
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
+
+import org.jboss.portal.common.i18n.LocalizedString;
+import org.jboss.portal.portlet.test.metadata.impl.adapter.LocalizedStringAdapter;
+
+/**
+ * @author <a href="mailto:emuckenh@redhat.com">Emanuel Muckenhuber</a>
+ * @version $Revision$
+ */
+public abstract class DescribableMetaData
+{
+
+ /** The description */
+ private LocalizedString description;
+
+ @XmlElement(name = "description")
+ @XmlJavaTypeAdapter(value=LocalizedStringAdapter.class, type=LocalizedString.class)
+ public LocalizedString getDescription()
+ {
+ return description;
+ }
+
+ public void setDescription(LocalizedString description)
+ {
+ this.description = description;
+ }
+
+}
Deleted: modules/portlet/trunk/test/src/main/org/jboss/portal/portlet/test/metadata/impl/common/DescribeableMetaData.java
===================================================================
--- modules/portlet/trunk/test/src/main/org/jboss/portal/portlet/test/metadata/impl/common/DescribeableMetaData.java 2007-12-13 23:18:58 UTC (rev 9342)
+++ modules/portlet/trunk/test/src/main/org/jboss/portal/portlet/test/metadata/impl/common/DescribeableMetaData.java 2007-12-14 13:51:58 UTC (rev 9343)
@@ -1,53 +0,0 @@
-/******************************************************************************
- * JBoss, a division of Red Hat *
- * Copyright 2006, Red Hat Middleware, LLC, and individual *
- * contributors as indicated by the @authors tag. See the *
- * copyright.txt in the distribution for a full listing of *
- * individual contributors. *
- * *
- * This is free software; you can redistribute it and/or modify it *
- * under the terms of the GNU Lesser General Public License as *
- * published by the Free Software Foundation; either version 2.1 of *
- * the License, or (at your option) any later version. *
- * *
- * This software is distributed in the hope that it will be useful, *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
- * Lesser General Public License for more details. *
- * *
- * You should have received a copy of the GNU Lesser General Public *
- * License along with this software; if not, write to the Free *
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
- ******************************************************************************/
-package org.jboss.portal.portlet.test.metadata.impl.common;
-
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
-
-import org.jboss.portal.common.i18n.LocalizedString;
-import org.jboss.portal.portlet.test.metadata.impl.adapter.LocalizedStringAdapter;
-
-/**
- * @author <a href="mailto:emuckenh@redhat.com">Emanuel Muckenhuber</a>
- * @version $Revision$
- */
-public abstract class DescribeableMetaData
-{
-
- /** The description */
- private LocalizedString description;
-
- @XmlElement(name = "description")
- @XmlJavaTypeAdapter(LocalizedStringAdapter.class)
- public LocalizedString getDescription()
- {
- return description;
- }
-
- public void setDescription(LocalizedString description)
- {
- this.description = description;
- }
-
-}
Modified: modules/portlet/trunk/test/src/main/org/jboss/portal/portlet/test/metadata/impl/common/InitParamMetaData.java
===================================================================
--- modules/portlet/trunk/test/src/main/org/jboss/portal/portlet/test/metadata/impl/common/InitParamMetaData.java 2007-12-13 23:18:58 UTC (rev 9342)
+++ modules/portlet/trunk/test/src/main/org/jboss/portal/portlet/test/metadata/impl/common/InitParamMetaData.java 2007-12-14 13:51:58 UTC (rev 9343)
@@ -33,7 +33,7 @@
* @version $Revision$
*/
@XmlType(name = "init-paramType")
-public class InitParamMetaData extends DescribeableMetaData
+public class InitParamMetaData extends DescribableMetaData
{
/** The init param id */
@@ -44,6 +44,13 @@
/** The init param value */
private String value;
+
+ public InitParamMetaData() {}
+
+ public InitParamMetaData(String id)
+ {
+ this.id = id;
+ }
@XmlAttribute
public String getId()
Modified: modules/portlet/trunk/test/src/main/org/jboss/portal/portlet/test/metadata/impl/common/LocalizedDescriptionMetaData.java
===================================================================
--- modules/portlet/trunk/test/src/main/org/jboss/portal/portlet/test/metadata/impl/common/LocalizedDescriptionMetaData.java 2007-12-13 23:18:58 UTC (rev 9342)
+++ modules/portlet/trunk/test/src/main/org/jboss/portal/portlet/test/metadata/impl/common/LocalizedDescriptionMetaData.java 2007-12-14 13:51:58 UTC (rev 9343)
@@ -42,6 +42,13 @@
/** The description */
private String description;
+
+ public LocalizedDescriptionMetaData() {}
+
+ public LocalizedDescriptionMetaData(String lang)
+ {
+ this.lang = lang;
+ }
@XmlAttribute(name = "lang",
namespace = PortletMetaDataConstants.NS_XML_NAMESPACE)
Modified: modules/portlet/trunk/test/src/main/org/jboss/portal/portlet/test/metadata/impl/event/EventDefinitionMetaData.java
===================================================================
--- modules/portlet/trunk/test/src/main/org/jboss/portal/portlet/test/metadata/impl/event/EventDefinitionMetaData.java 2007-12-13 23:18:58 UTC (rev 9342)
+++ modules/portlet/trunk/test/src/main/org/jboss/portal/portlet/test/metadata/impl/event/EventDefinitionMetaData.java 2007-12-14 13:51:58 UTC (rev 9343)
@@ -22,24 +22,24 @@
******************************************************************************/
package org.jboss.portal.portlet.test.metadata.impl.event;
+import java.util.ArrayList;
import java.util.List;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlElements;
import javax.xml.bind.annotation.XmlType;
import javax.xml.bind.annotation.adapters.CollapsedStringAdapter;
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
import javax.xml.namespace.QName;
-import org.jboss.portal.portlet.test.metadata.impl.common.DescribeableMetaData;
+import org.jboss.portal.portlet.test.metadata.impl.common.DescribableMetaData;
/**
* @author <a href="mailto:emuckenh@redhat.com">Emanuel Muckenhuber</a>
* @version $Revision$
*/
@XmlType(name = "event-definitionType")
-public class EventDefinitionMetaData extends DescribeableMetaData
+public class EventDefinitionMetaData extends DescribableMetaData
{
/** The event definition id */
private String id;
@@ -55,6 +55,13 @@
/** The alias */
private List<QName> alias;
+
+ public EventDefinitionMetaData() {}
+
+ public EventDefinitionMetaData(String id)
+ {
+ this.id = id;
+ }
@XmlAttribute(name = "id")
public String getId()
@@ -111,5 +118,13 @@
{
this.alias = alias;
}
-
+
+ public void addAlias(QName alias)
+ {
+ if (this.alias == null)
+ {
+ this.alias = new ArrayList<QName>();
+ }
+ this.alias.add(alias);
+ }
}
Modified: modules/portlet/trunk/test/src/main/org/jboss/portal/portlet/test/metadata/impl/event/EventDefinitionReferenceMetaData.java
===================================================================
--- modules/portlet/trunk/test/src/main/org/jboss/portal/portlet/test/metadata/impl/event/EventDefinitionReferenceMetaData.java 2007-12-13 23:18:58 UTC (rev 9342)
+++ modules/portlet/trunk/test/src/main/org/jboss/portal/portlet/test/metadata/impl/event/EventDefinitionReferenceMetaData.java 2007-12-14 13:51:58 UTC (rev 9343)
@@ -24,7 +24,6 @@
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlElements;
import javax.xml.bind.annotation.XmlType;
import javax.xml.namespace.QName;
@@ -44,6 +43,13 @@
/** The name */
private String name;
+
+ public EventDefinitionReferenceMetaData() {}
+
+ public EventDefinitionReferenceMetaData(String id)
+ {
+ this.id = id;
+ }
@XmlAttribute(name = "id")
public String getId()
Modified: modules/portlet/trunk/test/src/main/org/jboss/portal/portlet/test/metadata/impl/filter/FilterMappingMetaData.java
===================================================================
--- modules/portlet/trunk/test/src/main/org/jboss/portal/portlet/test/metadata/impl/filter/FilterMappingMetaData.java 2007-12-13 23:18:58 UTC (rev 9342)
+++ modules/portlet/trunk/test/src/main/org/jboss/portal/portlet/test/metadata/impl/filter/FilterMappingMetaData.java 2007-12-14 13:51:58 UTC (rev 9343)
@@ -22,6 +22,7 @@
******************************************************************************/
package org.jboss.portal.portlet.test.metadata.impl.filter;
+import java.util.ArrayList;
import java.util.List;
import javax.xml.bind.annotation.XmlElement;
@@ -63,5 +64,14 @@
{
this.portletNames = portletNames;
}
+
+ public void addPortletName(String portletName)
+ {
+ if( this.portletNames == null)
+ {
+ this.portletNames = new ArrayList<String>();
+ }
+ this.portletNames.add(portletName);
+ }
}
Modified: modules/portlet/trunk/test/src/main/org/jboss/portal/portlet/test/metadata/impl/filter/FilterMetaData.java
===================================================================
--- modules/portlet/trunk/test/src/main/org/jboss/portal/portlet/test/metadata/impl/filter/FilterMetaData.java 2007-12-13 23:18:58 UTC (rev 9342)
+++ modules/portlet/trunk/test/src/main/org/jboss/portal/portlet/test/metadata/impl/filter/FilterMetaData.java 2007-12-14 13:51:58 UTC (rev 9343)
@@ -22,6 +22,7 @@
******************************************************************************/
package org.jboss.portal.portlet.test.metadata.impl.filter;
+import java.util.ArrayList;
import java.util.List;
import javax.xml.bind.annotation.XmlElement;
@@ -32,7 +33,7 @@
import org.jboss.portal.common.i18n.LocalizedString;
import org.jboss.portal.portlet.test.metadata.impl.PortletMetaDataConstants;
import org.jboss.portal.portlet.test.metadata.impl.adapter.LocalizedStringAdapter;
-import org.jboss.portal.portlet.test.metadata.impl.common.DescribeableMetaData;
+import org.jboss.portal.portlet.test.metadata.impl.common.DescribableMetaData;
import org.jboss.portal.portlet.test.metadata.impl.common.InitParamMetaData;
/**
@@ -42,7 +43,7 @@
@XmlType(name = "filterType", namespace = PortletMetaDataConstants.PORTLET_JSR_286_NS,
propOrder = {"description", "displayName", "filterName", "filterClass", "lifecycle", "initParams"})
-public class FilterMetaData extends DescribeableMetaData
+public class FilterMetaData extends DescribableMetaData
{
/** The filter name */
private String filterName;
@@ -95,6 +96,15 @@
{
this.lifecycle = lifecycle;
}
+
+ public void addLifecycle(String lifecycle)
+ {
+ if( this.lifecycle == null)
+ {
+ this.lifecycle = new ArrayList<String>();
+ }
+ this.lifecycle.add(lifecycle);
+ }
@XmlElement(name = "display-name")
@XmlJavaTypeAdapter(LocalizedStringAdapter.class)
@@ -118,5 +128,14 @@
{
this.initParams = initParams;
}
+
+ public void addInitParam(InitParamMetaData initParam)
+ {
+ if(this.initParams == null)
+ {
+ this.initParams = new ArrayList<InitParamMetaData>();
+ }
+ this.initParams.add(initParam);
+ }
}
\ No newline at end of file
Modified: modules/portlet/trunk/test/src/main/org/jboss/portal/portlet/test/metadata/impl/portlet/PortletInfoMetaData.java
===================================================================
--- modules/portlet/trunk/test/src/main/org/jboss/portal/portlet/test/metadata/impl/portlet/PortletInfoMetaData.java 2007-12-13 23:18:58 UTC (rev 9342)
+++ modules/portlet/trunk/test/src/main/org/jboss/portal/portlet/test/metadata/impl/portlet/PortletInfoMetaData.java 2007-12-14 13:51:58 UTC (rev 9343)
@@ -22,13 +22,11 @@
******************************************************************************/
package org.jboss.portal.portlet.test.metadata.impl.portlet;
-import java.util.List;
-
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlType;
-import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
+
/**
* @author <a href="mailto:emuckenh@redhat.com">Emanuel Muckenhuber</a>
* @version $Revision$
@@ -48,6 +46,13 @@
/* The portlet keywords*/
private String keywords;
+
+ public PortletInfoMetaData() {}
+
+ public PortletInfoMetaData(String id)
+ {
+ this.id = id;
+ }
@XmlAttribute(name = "id")
public String getId()
Modified: modules/portlet/trunk/test/src/main/org/jboss/portal/portlet/test/metadata/impl/portlet/PortletMetaData.java
===================================================================
--- modules/portlet/trunk/test/src/main/org/jboss/portal/portlet/test/metadata/impl/portlet/PortletMetaData.java 2007-12-13 23:18:58 UTC (rev 9342)
+++ modules/portlet/trunk/test/src/main/org/jboss/portal/portlet/test/metadata/impl/portlet/PortletMetaData.java 2007-12-14 13:51:58 UTC (rev 9343)
@@ -22,8 +22,9 @@
******************************************************************************/
package org.jboss.portal.portlet.test.metadata.impl.portlet;
+import java.util.ArrayList;
+import java.util.HashMap;
import java.util.List;
-import java.util.Locale;
import java.util.Map;
import javax.xml.bind.annotation.XmlAttribute;
@@ -36,7 +37,8 @@
import org.jboss.portal.portlet.test.metadata.impl.PortletMetaDataConstants;
import org.jboss.portal.portlet.test.metadata.impl.adapter.ContainerRuntimeAdapter;
import org.jboss.portal.portlet.test.metadata.impl.adapter.LocalizedStringAdapter;
-import org.jboss.portal.portlet.test.metadata.impl.common.DescribeableMetaData;
+import org.jboss.portal.portlet.test.metadata.impl.common.ContainerRuntimeMetaData;
+import org.jboss.portal.portlet.test.metadata.impl.common.DescribableMetaData;
import org.jboss.portal.portlet.test.metadata.impl.common.InitParamMetaData;
import org.jboss.portal.portlet.test.metadata.impl.event.EventDefinitionReferenceMetaData;
@@ -48,8 +50,8 @@
propOrder = {"id", "description", "portletName", "displayName", "portletClass", "initParams", "expirationCache", "cacheScope",
"supports", "supportedLocale", "resourceBundle", "portletInfo", "portletPreferences", "securityRoleRef",
"supportedProcessingEvent", "supportedPublishingEvent", "supportedPublicRenderParameters",
- "urlGenerationListener", "containerRuntimeOptions"})
-public class PortletMetaData extends DescribeableMetaData
+ "containerRuntimeOptions"})
+public class PortletMetaData extends DescribableMetaData
{
/** The portlet id */
@@ -100,12 +102,16 @@
/** The portlet supported public render parameters */
private List<String> supportedPublicRenderParameters;
- /** The url generation listener */
- private List<String> urlGenerationListener;
-
/** The portlet container runtime options */
- private Map<String, List<String>> containerRuntimeOptions;
+ private Map<String, ContainerRuntimeMetaData> containerRuntimeOptions;
+ public PortletMetaData() {}
+
+ public PortletMetaData(String id)
+ {
+ this.id = id;
+ }
+
@XmlAttribute(name = "id")
public String getId()
{
@@ -165,6 +171,15 @@
{
this.initParams = initParams;
}
+
+ public void addInitParam(InitParamMetaData initParam)
+ {
+ if (this.initParams == null)
+ {
+ this.initParams = new ArrayList<InitParamMetaData>();
+ }
+ this.initParams.add(initParam);
+ }
@XmlElement(name = "expiration-cache")
public int getExpirationCache()
@@ -200,6 +215,15 @@
{
this.supports = supports;
}
+
+ public void addSupport(SupportsMetaData support)
+ {
+ if (this.supports == null)
+ {
+ this.supports = new ArrayList<SupportsMetaData>();
+ }
+ this.supports.add(support);
+ }
@XmlElement(name = "supported-locale")
// @XmlJavaTypeAdapter(SupportedLocaleAdapter.class)
@@ -212,6 +236,15 @@
{
this.supportedLocale = supportedLocale;
}
+
+ public void addSupportedLocale(SupportedLocaleMetaData supportedLocale)
+ {
+ if(this.supportedLocale == null)
+ {
+ this.supportedLocale = new ArrayList<SupportedLocaleMetaData>();
+ }
+ this.supportedLocale.add(supportedLocale);
+ }
@XmlElement(name = "resource-bundle")
@XmlJavaTypeAdapter(CollapsedStringAdapter.class)
@@ -257,6 +290,15 @@
{
this.securityRoleRef = securityRoleRef;
}
+
+ public void addSecurityRoleRef(SecurityRoleRefMetaData securityRoleRef)
+ {
+ if (this.securityRoleRef == null)
+ {
+ this.securityRoleRef = new ArrayList<SecurityRoleRefMetaData>();
+ }
+ this.securityRoleRef.add(securityRoleRef);
+ }
@XmlElement(name = "supported-processing-event",
namespace = PortletMetaDataConstants.PORTLET_JSR_286_NS)
@@ -269,6 +311,15 @@
{
this.supportedProcessingEvent = supportedProcessingEvent;
}
+
+ public void addSupportedProcessingEvent(EventDefinitionReferenceMetaData eventRef)
+ {
+ if (this.supportedProcessingEvent == null)
+ {
+ this.supportedProcessingEvent = new ArrayList<EventDefinitionReferenceMetaData>();
+ }
+ this.supportedProcessingEvent.add(eventRef);
+ }
@XmlElement(name = "supported-publishing-event",
namespace = PortletMetaDataConstants.PORTLET_JSR_286_NS)
@@ -281,6 +332,15 @@
{
this.supportedPublishingEvent = supportedPublishingEvent;
}
+
+ public void addSupportedPublishingEvent(EventDefinitionReferenceMetaData eventRef)
+ {
+ if(this.supportedPublishingEvent == null)
+ {
+ this.supportedPublishingEvent = new ArrayList<EventDefinitionReferenceMetaData>();
+ }
+ this.supportedPublishingEvent.add(eventRef);
+ }
@XmlElement(name = "supported-public-render-parameter",
namespace = PortletMetaDataConstants.PORTLET_JSR_286_NS)
@@ -293,30 +353,35 @@
{
this.supportedPublicRenderParameters = supportedPublicRenderParameters;
}
-
- @XmlElement(name = "url-generation-listener",
- namespace = PortletMetaDataConstants.PORTLET_JSR_286_NS)
-// @XmlJavaTypeAdapter(CollapsedStringListAdapter.class)
- public List<String> getUrlGenerationListener()
+
+ public void addSupportedPublicRenderParameter(String parameter)
{
- return urlGenerationListener;
+ if (this.supportedPublicRenderParameters == null)
+ {
+ this.supportedPublicRenderParameters = new ArrayList<String>();
+ }
+ this.supportedPublicRenderParameters.add(parameter);
}
- public void setUrlGenerationListener(List<String> urlGenerationListener)
- {
- this.urlGenerationListener = urlGenerationListener;
- }
-
@XmlElement(name = "container-runtime-option",
namespace = PortletMetaDataConstants.PORTLET_JSR_286_NS)
@XmlJavaTypeAdapter(ContainerRuntimeAdapter.class)
- public Map<String, List<String>> getContainerRuntimeOptions()
+ public Map<String, ContainerRuntimeMetaData> getContainerRuntimeOptions()
{
return containerRuntimeOptions;
}
- public void setContainerRuntimeOptions(Map<String, List<String>> containerRuntimeOptions)
+ public void setContainerRuntimeOptions(Map<String, ContainerRuntimeMetaData> containerRuntimeOptions)
{
this.containerRuntimeOptions = containerRuntimeOptions;
}
+
+ public void addContainerRuntime(ContainerRuntimeMetaData containerRuntimeOption)
+ {
+ if ( this.containerRuntimeOptions == null)
+ {
+ this.containerRuntimeOptions = new HashMap<String, ContainerRuntimeMetaData>();
+ }
+ this.containerRuntimeOptions.put(containerRuntimeOption.getName(), containerRuntimeOption);
+ }
}
Modified: modules/portlet/trunk/test/src/main/org/jboss/portal/portlet/test/metadata/impl/portlet/PortletPreferenceMetaData.java
===================================================================
--- modules/portlet/trunk/test/src/main/org/jboss/portal/portlet/test/metadata/impl/portlet/PortletPreferenceMetaData.java 2007-12-13 23:18:58 UTC (rev 9342)
+++ modules/portlet/trunk/test/src/main/org/jboss/portal/portlet/test/metadata/impl/portlet/PortletPreferenceMetaData.java 2007-12-14 13:51:58 UTC (rev 9343)
@@ -22,6 +22,7 @@
******************************************************************************/
package org.jboss.portal.portlet.test.metadata.impl.portlet;
+import java.util.ArrayList;
import java.util.List;
import javax.xml.bind.annotation.XmlAttribute;
@@ -47,6 +48,13 @@
/** Is read only */
private boolean readOnly;
+
+ public PortletPreferenceMetaData() {}
+
+ public PortletPreferenceMetaData(String id)
+ {
+ this.id = id;
+ }
@XmlAttribute(name = "id")
public String getId()
@@ -80,6 +88,15 @@
{
this.value = value;
}
+
+ public void addValue(String value)
+ {
+ if (this.value == null)
+ {
+ this.value = new ArrayList<String>();
+ }
+ this.value.add(value);
+ }
@XmlElement(name = "read-only")
public boolean isReadOnly()
Modified: modules/portlet/trunk/test/src/main/org/jboss/portal/portlet/test/metadata/impl/portlet/PortletPreferencesMetaData.java
===================================================================
--- modules/portlet/trunk/test/src/main/org/jboss/portal/portlet/test/metadata/impl/portlet/PortletPreferencesMetaData.java 2007-12-13 23:18:58 UTC (rev 9342)
+++ modules/portlet/trunk/test/src/main/org/jboss/portal/portlet/test/metadata/impl/portlet/PortletPreferencesMetaData.java 2007-12-14 13:51:58 UTC (rev 9343)
@@ -22,6 +22,7 @@
******************************************************************************/
package org.jboss.portal.portlet.test.metadata.impl.portlet;
+import java.util.HashMap;
import java.util.Map;
import javax.xml.bind.annotation.XmlAttribute;
@@ -49,6 +50,13 @@
/** The portlet preference validator */
private String preferenceValidator;
+ public PortletPreferencesMetaData() {}
+
+ public PortletPreferencesMetaData(String id)
+ {
+ this.id = id;
+ }
+
@XmlAttribute(name = "id")
public String getId()
{
@@ -71,6 +79,15 @@
{
this.portletPreferences = portletPreferences;
}
+
+ public void addPortletPreference(PortletPreferenceMetaData preference)
+ {
+ if(this.portletPreferences == null)
+ {
+ this.portletPreferences = new HashMap<String, PortletPreferenceMetaData>();
+ }
+ this.portletPreferences.put(preference.getName(), preference);
+ }
@XmlElement(name = "preferences-validator")
@XmlJavaTypeAdapter(CollapsedStringAdapter.class)
Modified: modules/portlet/trunk/test/src/main/org/jboss/portal/portlet/test/metadata/impl/portlet/SecurityRoleRefMetaData.java
===================================================================
--- modules/portlet/trunk/test/src/main/org/jboss/portal/portlet/test/metadata/impl/portlet/SecurityRoleRefMetaData.java 2007-12-13 23:18:58 UTC (rev 9342)
+++ modules/portlet/trunk/test/src/main/org/jboss/portal/portlet/test/metadata/impl/portlet/SecurityRoleRefMetaData.java 2007-12-14 13:51:58 UTC (rev 9343)
@@ -26,7 +26,7 @@
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlType;
-import org.jboss.portal.portlet.test.metadata.impl.common.DescribeableMetaData;
+import org.jboss.portal.portlet.test.metadata.impl.common.DescribableMetaData;
/**
@@ -35,7 +35,7 @@
*/
@XmlType(name = "security-role-refType")
-public class SecurityRoleRefMetaData extends DescribeableMetaData
+public class SecurityRoleRefMetaData extends DescribableMetaData
{
/** The security role ref id */
@@ -47,6 +47,13 @@
/** The role link */
private String roleLink;
+ public SecurityRoleRefMetaData() {}
+
+ public SecurityRoleRefMetaData(String id)
+ {
+ this.id = id;
+ }
+
@XmlAttribute(name = "id")
public String getId()
{
Modified: modules/portlet/trunk/test/src/main/org/jboss/portal/portlet/test/metadata/impl/portlet/SupportsMetaData.java
===================================================================
--- modules/portlet/trunk/test/src/main/org/jboss/portal/portlet/test/metadata/impl/portlet/SupportsMetaData.java 2007-12-13 23:18:58 UTC (rev 9342)
+++ modules/portlet/trunk/test/src/main/org/jboss/portal/portlet/test/metadata/impl/portlet/SupportsMetaData.java 2007-12-14 13:51:58 UTC (rev 9343)
@@ -22,6 +22,8 @@
******************************************************************************/
package org.jboss.portal.portlet.test.metadata.impl.portlet;
+import java.util.ArrayList;
+import java.util.Collections;
import java.util.List;
import javax.xml.bind.annotation.XmlAttribute;
@@ -50,6 +52,13 @@
/** The window states */
private List<WindowStateMetaData> windowStates;
+
+ public SupportsMetaData() {}
+
+ public SupportsMetaData(String id)
+ {
+ this.id = id;
+ }
@XmlAttribute(name = "id")
public String getId()
@@ -76,19 +85,28 @@
@XmlElement(name = "portlet-mode")
public List<PortletModeMetaData> getPortletModes()
{
- return portletModes;
+ return this.portletModes;
}
public void setPortletModes(List<PortletModeMetaData> portletModes)
{
this.portletModes = portletModes;
}
+
+ public void addPortletMode(PortletModeMetaData portletMode)
+ {
+ if (this.portletModes == null)
+ {
+ this.portletModes = new ArrayList<PortletModeMetaData>();
+ }
+ this.portletModes.add(portletMode);
+ }
@XmlElement(name = "window-state",
namespace = PortletMetaDataConstants.PORTLET_JSR_286_NS)
public List<WindowStateMetaData> getWindowStates()
{
- return windowStates;
+ return this.windowStates;
}
public void setWindowStates(List<WindowStateMetaData> windowStates)
@@ -96,4 +114,12 @@
this.windowStates = windowStates;
}
+ public void addWindowState(WindowStateMetaData windowState)
+ {
+ if (this.windowStates == null)
+ {
+ this.windowStates = new ArrayList<WindowStateMetaData>();
+ }
+ this.windowStates.add(windowState);
+ }
}
Modified: modules/portlet/trunk/test/src/main/org/jboss/portal/portlet/test/metadata/impl/security/PortletCollectionMetaData.java
===================================================================
--- modules/portlet/trunk/test/src/main/org/jboss/portal/portlet/test/metadata/impl/security/PortletCollectionMetaData.java 2007-12-13 23:18:58 UTC (rev 9342)
+++ modules/portlet/trunk/test/src/main/org/jboss/portal/portlet/test/metadata/impl/security/PortletCollectionMetaData.java 2007-12-14 13:51:58 UTC (rev 9343)
@@ -22,6 +22,7 @@
******************************************************************************/
package org.jboss.portal.portlet.test.metadata.impl.security;
+import java.util.ArrayList;
import java.util.List;
import javax.xml.bind.annotation.XmlElement;
@@ -47,4 +48,13 @@
{
this.portletNames = portletNames;
}
+
+ public void addPortletname(String portletName)
+ {
+ if( this.portletNames == null )
+ {
+ this.portletNames = new ArrayList<String>();
+ }
+ this.portletNames.add(portletName);
+ }
}
Modified: modules/portlet/trunk/test/src/main/org/jboss/portal/portlet/test/metadata/impl/security/SecurityConstraintMetaData.java
===================================================================
--- modules/portlet/trunk/test/src/main/org/jboss/portal/portlet/test/metadata/impl/security/SecurityConstraintMetaData.java 2007-12-13 23:18:58 UTC (rev 9342)
+++ modules/portlet/trunk/test/src/main/org/jboss/portal/portlet/test/metadata/impl/security/SecurityConstraintMetaData.java 2007-12-14 13:51:58 UTC (rev 9343)
@@ -22,8 +22,6 @@
******************************************************************************/
package org.jboss.portal.portlet.test.metadata.impl.security;
-import java.util.List;
-
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlType;
@@ -51,6 +49,13 @@
/** The user data constraints */
private UserDataConstraintMetaData userDataConstraint;
+
+ public SecurityConstraintMetaData() {}
+
+ public SecurityConstraintMetaData(String id)
+ {
+ this.id = id;
+ }
@XmlAttribute(name = "id")
public String getId()
@@ -76,7 +81,6 @@
}
@XmlElement(name = "portlet-collection")
-// @XmlJavaTypeAdapter(PortletCollectionAdapter.class)
public PortletCollectionMetaData getPortletList()
{
return portletList;
Modified: modules/portlet/trunk/test/src/main/org/jboss/portal/portlet/test/metadata/impl/security/UserDataConstraintMetaData.java
===================================================================
--- modules/portlet/trunk/test/src/main/org/jboss/portal/portlet/test/metadata/impl/security/UserDataConstraintMetaData.java 2007-12-13 23:18:58 UTC (rev 9342)
+++ modules/portlet/trunk/test/src/main/org/jboss/portal/portlet/test/metadata/impl/security/UserDataConstraintMetaData.java 2007-12-14 13:51:58 UTC (rev 9343)
@@ -26,14 +26,14 @@
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlType;
-import org.jboss.portal.portlet.test.metadata.impl.common.DescribeableMetaData;
+import org.jboss.portal.portlet.test.metadata.impl.common.DescribableMetaData;
/**
* @author <a href="mailto:emuckenh@redhat.com">Emanuel Muckenhuber</a>
* @version $Revision$
*/
@XmlType(name = "user-data-constraint")
-public class UserDataConstraintMetaData extends DescribeableMetaData
+public class UserDataConstraintMetaData extends DescribableMetaData
{
/** The user data constraint id */
@@ -41,6 +41,13 @@
/** The user transport quarantee */
private TransportGuaranteeEnum transportQuarantee;
+
+ public UserDataConstraintMetaData() {}
+
+ public UserDataConstraintMetaData(String id)
+ {
+ this.id = id;
+ }
@XmlAttribute(name = "id")
public String getId()
18 years, 4 months
JBoss Portal SVN: r9342 - in branches/presentation/presentation/src/main/org/jboss/portal/presentation: ajax/client/protocol and 1 other directories.
by portal-commits@lists.jboss.org
Author: sohil.shah(a)jboss.com
Date: 2007-12-13 18:18:58 -0500 (Thu, 13 Dec 2007)
New Revision: 9342
Added:
branches/presentation/presentation/src/main/org/jboss/portal/presentation/ajax/client/Util.java
branches/presentation/presentation/src/main/org/jboss/portal/presentation/ajax/client/protocol/
branches/presentation/presentation/src/main/org/jboss/portal/presentation/ajax/client/protocol/Caller.java
branches/presentation/presentation/src/main/org/jboss/portal/presentation/ajax/client/protocol/ClientAction.java
branches/presentation/presentation/src/main/org/jboss/portal/presentation/ajax/client/protocol/UIObjectAction.java
branches/presentation/presentation/src/main/org/jboss/portal/presentation/ajax/client/protocol/ViewUIObjectAction.java
Modified:
branches/presentation/presentation/src/main/org/jboss/portal/presentation/ajax/client/Portal.java
branches/presentation/presentation/src/main/org/jboss/portal/presentation/client/controller/AjaxUIController.java
Log:
ajax user agent refactoring
Modified: branches/presentation/presentation/src/main/org/jboss/portal/presentation/ajax/client/Portal.java
===================================================================
--- branches/presentation/presentation/src/main/org/jboss/portal/presentation/ajax/client/Portal.java 2007-12-13 23:01:28 UTC (rev 9341)
+++ branches/presentation/presentation/src/main/org/jboss/portal/presentation/ajax/client/Portal.java 2007-12-13 23:18:58 UTC (rev 9342)
@@ -22,24 +22,11 @@
******************************************************************************/
package org.jboss.portal.presentation.ajax.client;
-import java.util.List;
-import java.util.ArrayList;
-
-import com.google.gwt.core.client.GWT;
import com.google.gwt.core.client.EntryPoint;
-import com.google.gwt.user.client.rpc.ServiceDefTarget;
-import com.google.gwt.user.client.rpc.AsyncCallback;
-
-import org.jboss.portal.presentation.ajax.client.service.PortalRPC;
-import org.jboss.portal.presentation.ajax.client.service.PortalRPCAsync;
-import org.jboss.portal.presentation.ajax.client.widget.PortletWindow;
-import org.jboss.portal.presentation.ajax.client.layout.LayoutManager;
-import org.jboss.portal.presentation.ajax.client.model.UIContext;
import org.jboss.portal.presentation.ajax.client.model.UIPage;
-import org.jboss.portal.presentation.ajax.client.model.UIPortal;
-import org.jboss.portal.presentation.ajax.client.model.UIWindow;
-import org.jboss.portal.presentation.ajax.client.model.UIObject;
+import org.jboss.portal.presentation.ajax.client.protocol.Caller;
+import org.jboss.portal.presentation.ajax.client.protocol.ViewUIObjectAction;
/**
* This is the Entry Point of the client-side Ajax agent of the Presentation Framework
@@ -47,52 +34,26 @@
* @author <a href="mailto:sshah@redhat.com">Sohil Shah</a>
*
*/
-public class Portal implements EntryPoint
+public class Portal implements EntryPoint, Caller
{
/**
* This is the entry point method.
*/
public void onModuleLoad()
{
- PortalRPCAsync portalRPC = (PortalRPCAsync)GWT.create(PortalRPC.class);
- ((ServiceDefTarget)portalRPC).setServiceEntryPoint(GWT.getModuleBaseURL()+"/portalrpc");
- AsyncCallback callback = new AsyncCallback()
- {
- public void onSuccess(Object result)
- {
- UIObject uiObject = (UIObject)result;
- Session.getInstance().getUiContext().addObject(uiObject);
- displayPortalPage((UIPage)uiObject);
- }
-
- public void onFailure(Throwable caught)
- {
- }
- };
- portalRPC.loadObject("/default/default", callback);
- }
+ //Load the default page of the default portal upon loading the user agent
+ ViewUIObjectAction action = new ViewUIObjectAction("/default/default");
+ action.execute(this);
+ }
/**
*
- * @param portalPage
*/
- private void displayPortalPage(UIPage portalPage)
- {
- //Dispalying the fully aggregated page
- List windows = portalPage.getChildren();
- if(windows != null)
+ public void callback(Object result)
+ {
+ if(result instanceof UIPage)
{
- List displayWindows = new ArrayList();
- for(int i=0; i<windows.size(); i++)
- {
- UIWindow pageWindow = (UIWindow)windows.get(i);
- if(pageWindow.isVisible())
- {
- PortletWindow portletWindow = new PortletWindow(pageWindow);
- displayWindows.add(portletWindow);
- }
- }
- LayoutManager.doLayout(displayWindows);
- }
- }
+ Util.displayPortalPage((UIPage)result);
+ }
+ }
}
Added: branches/presentation/presentation/src/main/org/jboss/portal/presentation/ajax/client/Util.java
===================================================================
--- branches/presentation/presentation/src/main/org/jboss/portal/presentation/ajax/client/Util.java (rev 0)
+++ branches/presentation/presentation/src/main/org/jboss/portal/presentation/ajax/client/Util.java 2007-12-13 23:18:58 UTC (rev 9342)
@@ -0,0 +1,62 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.presentation.ajax.client;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.jboss.portal.presentation.ajax.client.layout.LayoutManager;
+import org.jboss.portal.presentation.ajax.client.model.UIPage;
+import org.jboss.portal.presentation.ajax.client.model.UIWindow;
+import org.jboss.portal.presentation.ajax.client.widget.PortletWindow;
+
+/**
+ * @author <a href="mailto:sshah@redhat.com">Sohil Shah</a>
+ *
+ */
+public class Util
+{
+ /**
+ *
+ * @param portalPage
+ */
+ public static void displayPortalPage(UIPage portalPage)
+ {
+ //Dispalying the fully aggregated page
+ List windows = portalPage.getChildren();
+ if(windows != null)
+ {
+ List displayWindows = new ArrayList();
+ for(int i=0; i<windows.size(); i++)
+ {
+ UIWindow pageWindow = (UIWindow)windows.get(i);
+ if(pageWindow.isVisible())
+ {
+ PortletWindow portletWindow = new PortletWindow(pageWindow);
+ displayWindows.add(portletWindow);
+ }
+ }
+ LayoutManager.doLayout(displayWindows);
+ }
+ }
+}
Added: branches/presentation/presentation/src/main/org/jboss/portal/presentation/ajax/client/protocol/Caller.java
===================================================================
--- branches/presentation/presentation/src/main/org/jboss/portal/presentation/ajax/client/protocol/Caller.java (rev 0)
+++ branches/presentation/presentation/src/main/org/jboss/portal/presentation/ajax/client/protocol/Caller.java 2007-12-13 23:18:58 UTC (rev 9342)
@@ -0,0 +1,36 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.presentation.ajax.client.protocol;
+
+/**
+ * @author <a href="mailto:sshah@redhat.com">Sohil Shah</a>
+ *
+ */
+public interface Caller
+{
+ /**
+ *
+ * @param result
+ */
+ public void callback(Object result);
+}
Added: branches/presentation/presentation/src/main/org/jboss/portal/presentation/ajax/client/protocol/ClientAction.java
===================================================================
--- branches/presentation/presentation/src/main/org/jboss/portal/presentation/ajax/client/protocol/ClientAction.java (rev 0)
+++ branches/presentation/presentation/src/main/org/jboss/portal/presentation/ajax/client/protocol/ClientAction.java 2007-12-13 23:18:58 UTC (rev 9342)
@@ -0,0 +1,32 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.presentation.ajax.client.protocol;
+
+/**
+ * @author <a href="mailto:sshah@redhat.com">Sohil Shah</a>
+ *
+ */
+public abstract class ClientAction
+{
+ public abstract void execute(Caller caller);
+}
Added: branches/presentation/presentation/src/main/org/jboss/portal/presentation/ajax/client/protocol/UIObjectAction.java
===================================================================
--- branches/presentation/presentation/src/main/org/jboss/portal/presentation/ajax/client/protocol/UIObjectAction.java (rev 0)
+++ branches/presentation/presentation/src/main/org/jboss/portal/presentation/ajax/client/protocol/UIObjectAction.java 2007-12-13 23:18:58 UTC (rev 9342)
@@ -0,0 +1,53 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.presentation.ajax.client.protocol;
+
+/**
+ * @author <a href="mailto:sshah@redhat.com">Sohil Shah</a>
+ *
+ */
+public abstract class UIObjectAction extends ClientAction
+{
+ /**
+ *
+ */
+ private final String targetId;
+
+ /**
+ *
+ * @param targetId
+ */
+ public UIObjectAction(String targetId)
+ {
+ this.targetId = targetId;
+ }
+
+ /**
+ *
+ * @return
+ */
+ public String getTargetId()
+ {
+ return targetId;
+ }
+}
Added: branches/presentation/presentation/src/main/org/jboss/portal/presentation/ajax/client/protocol/ViewUIObjectAction.java
===================================================================
--- branches/presentation/presentation/src/main/org/jboss/portal/presentation/ajax/client/protocol/ViewUIObjectAction.java (rev 0)
+++ branches/presentation/presentation/src/main/org/jboss/portal/presentation/ajax/client/protocol/ViewUIObjectAction.java 2007-12-13 23:18:58 UTC (rev 9342)
@@ -0,0 +1,71 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.presentation.ajax.client.protocol;
+
+import org.jboss.portal.presentation.ajax.client.Session;
+import org.jboss.portal.presentation.ajax.client.model.UIObject;
+import org.jboss.portal.presentation.ajax.client.service.PortalRPC;
+import org.jboss.portal.presentation.ajax.client.service.PortalRPCAsync;
+
+import com.google.gwt.core.client.GWT;
+import com.google.gwt.user.client.rpc.AsyncCallback;
+import com.google.gwt.user.client.rpc.ServiceDefTarget;
+
+/**
+ * @author <a href="mailto:sshah@redhat.com">Sohil Shah</a>
+ *
+ */
+public class ViewUIObjectAction extends UIObjectAction
+{
+ /**
+ *
+ * @param targetId
+ */
+ public ViewUIObjectAction(String targetId)
+ {
+ super(targetId);
+ }
+
+ /**
+ *
+ */
+ public void execute(final Caller caller)
+ {
+ PortalRPCAsync portalRPC = (PortalRPCAsync)GWT.create(PortalRPC.class);
+ ((ServiceDefTarget)portalRPC).setServiceEntryPoint(GWT.getModuleBaseURL()+"/portalrpc");
+ AsyncCallback callback = new AsyncCallback()
+ {
+ public void onSuccess(Object result)
+ {
+ UIObject uiObject = (UIObject)result;
+ Session.getInstance().getUiContext().addObject(uiObject);
+ caller.callback(uiObject);
+ }
+
+ public void onFailure(Throwable caught)
+ {
+ }
+ };
+ portalRPC.loadObject(this.getTargetId(), callback);
+ }
+}
Modified: branches/presentation/presentation/src/main/org/jboss/portal/presentation/client/controller/AjaxUIController.java
===================================================================
--- branches/presentation/presentation/src/main/org/jboss/portal/presentation/client/controller/AjaxUIController.java 2007-12-13 23:01:28 UTC (rev 9341)
+++ branches/presentation/presentation/src/main/org/jboss/portal/presentation/client/controller/AjaxUIController.java 2007-12-13 23:18:58 UTC (rev 9342)
@@ -121,15 +121,7 @@
{
ShowUIObjectResponse show = (ShowUIObjectResponse)serverResponse;
String targetId = show.getTargetId();
-
- //Load the objects in the UITree
- UIObject uiObject = presentationContext.getUIContext().getObject(targetId);
-
- if(uiObject instanceof UIPage)
- {
- //
- render(invocation, presentationContext, targetId);
- }
+ render(invocation, presentationContext, targetId);
}
}
catch(Exception e)
18 years, 4 months
JBoss Portal SVN: r9341 - in branches/JBoss_Portal_Branch_2_6/wsrp/src: resources/tests/test-wsrp-producer-sar and 1 other directories.
by portal-commits@lists.jboss.org
Author: chris.laprun(a)jboss.com
Date: 2007-12-13 18:01:28 -0500 (Thu, 13 Dec 2007)
New Revision: 9341
Added:
branches/JBoss_Portal_Branch_2_6/wsrp/src/resources/tests/test-wsrp-producer-sar/xsd/
branches/JBoss_Portal_Branch_2_6/wsrp/src/resources/tests/test-wsrp-producer-sar/xsd/xml.xsd
Modified:
branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/wsrp/services/RemoteSOAPInvokerServiceFactory.java
Log:
- Use local xml.xsd instead of retrieving it over the network each time. Should also help when using WSRP behind firewall/proxy.
Modified: branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/wsrp/services/RemoteSOAPInvokerServiceFactory.java
===================================================================
--- branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/wsrp/services/RemoteSOAPInvokerServiceFactory.java 2007-12-13 22:07:55 UTC (rev 9340)
+++ branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/wsrp/services/RemoteSOAPInvokerServiceFactory.java 2007-12-13 23:01:28 UTC (rev 9341)
@@ -198,6 +198,9 @@
private final Logger log = Logger.getLogger(getClass());
private static final int TIME_OUT_MS = 10000;
+ private static final String XML_XSD = "http://www.w3.org/2001/xml.xsd";
+ private static final String LOCAL_XML_XSD = "xsd/xml.xsd";
+
public WSDLLocatorImpl(URL wsdlFile)
{
ParameterValidation.throwIllegalArgExceptionIfNull(wsdlFile, "WSDL URL");
@@ -251,6 +254,12 @@
if (resource.startsWith("http://") || resource.startsWith("https://"))
{
wsdlImport = resource;
+ if (XML_XSD.equals(resource))
+ {
+ InputStream is = Thread.currentThread().getContextClassLoader().getResourceAsStream(LOCAL_XML_XSD);
+ log.debug("Using local xml.xsd");
+ return getWSDLImport(wsdlImport, is);
+ }
}
// Absolute path
@@ -283,15 +292,7 @@
try
{
- log.info("Resolved to: " + wsdlImport);
- InputStream is = IOTools.safeBufferedWrapper(new URL(wsdlImport).openStream());
- if (is == null)
- {
- throw new IllegalArgumentException("Cannot import wsdl from [" + wsdlImport + "]");
- }
-
- latestImportURI = wsdlImport;
- return new InputSource(is);
+ return getWSDLImport(wsdlImport, new URL(wsdlImport).openStream());
}
catch (IOException e)
{
@@ -299,6 +300,19 @@
}
}
+ private InputSource getWSDLImport(String wsdlImport, InputStream inputStream)
+ {
+ log.debug("Resolved to: " + wsdlImport);
+ InputStream is = IOTools.safeBufferedWrapper(inputStream);
+ if (is == null)
+ {
+ throw new IllegalArgumentException("Cannot import wsdl from [" + wsdlImport + "]");
+ }
+
+ latestImportURI = wsdlImport;
+ return new InputSource(is);
+ }
+
public String getLatestImportURI()
{
return latestImportURI;
Copied: branches/JBoss_Portal_Branch_2_6/wsrp/src/resources/tests/test-wsrp-producer-sar/xsd/xml.xsd (from rev 9340, branches/JBoss_Portal_Branch_2_6/wsrp/src/resources/portal-wsrp-sar/xsd/xml.xsd)
===================================================================
--- branches/JBoss_Portal_Branch_2_6/wsrp/src/resources/tests/test-wsrp-producer-sar/xsd/xml.xsd (rev 0)
+++ branches/JBoss_Portal_Branch_2_6/wsrp/src/resources/tests/test-wsrp-producer-sar/xsd/xml.xsd 2007-12-13 23:01:28 UTC (rev 9341)
@@ -0,0 +1,147 @@
+<?xml version='1.0'?>
+
+<xs:schema targetNamespace="http://www.w3.org/XML/1998/namespace" xmlns:xs="http://www.w3.org/2001/XMLSchema"
+ xml:lang="en">
+
+ <xs:annotation>
+ <xs:documentation>
+ See http://www.w3.org/XML/1998/namespace.html and
+ http://www.w3.org/TR/REC-xml for information about this namespace.
+
+ This schema document describes the XML namespace, in a form
+ suitable for import by other schema documents.
+
+ Note that local names in this namespace are intended to be defined
+ only by the World Wide Web Consortium or its subgroups. The
+ following names are currently defined in this namespace and should
+ not be used with conflicting semantics by any Working Group,
+ specification, or document instance:
+
+ base (as an attribute name): denotes an attribute whose value
+ provides a URI to be used as the base for interpreting any
+ relative URIs in the scope of the element on which it
+ appears; its value is inherited. This name is reserved
+ by virtue of its definition in the XML Base specification.
+
+ id (as an attribute name): denotes an attribute whose value
+ should be interpreted as if declared to be of type ID.
+ This name is reserved by virtue of its definition in the
+ xml:id specification.
+
+ lang (as an attribute name): denotes an attribute whose value
+ is a language code for the natural language of the content of
+ any element; its value is inherited. This name is reserved
+ by virtue of its definition in the XML specification.
+
+ space (as an attribute name): denotes an attribute whose
+ value is a keyword indicating what whitespace processing
+ discipline is intended for the content of the element; its
+ value is inherited. This name is reserved by virtue of its
+ definition in the XML specification.
+
+ Father (in any context at all): denotes Jon Bosak, the chair of
+ the original XML Working Group. This name is reserved by
+ the following decision of the W3C XML Plenary and
+ XML Coordination groups:
+
+ In appreciation for his vision, leadership and dedication
+ the W3C XML Plenary on this 10th day of February, 2000
+ reserves for Jon Bosak in perpetuity the XML name
+ xml:Father
+ </xs:documentation>
+ </xs:annotation>
+
+ <xs:annotation>
+ <xs:documentation>This schema defines attributes and an attribute group
+ suitable for use by
+ schemas wishing to allow xml:base, xml:lang, xml:space or xml:id
+ attributes on elements they define.
+
+ To enable this, such a schema must import this schema
+ for the XML namespace, e.g. as follows:
+ <schema . . .>
+ . . .
+ <import namespace="http://www.w3.org/XML/1998/namespace"
+ schemaLocation="http://www.w3.org/2001/xml.xsd"/>
+
+ Subsequently, qualified reference to any of the attributes
+ or the group defined below will have the desired effect, e.g.
+
+ <type . . .>
+ . . .
+ <attributeGroup ref="xml:specialAttrs"/>
+
+ will define a type which will schema-validate an instance
+ element with any of those attributes</xs:documentation>
+ </xs:annotation>
+
+ <xs:annotation>
+ <xs:documentation>In keeping with the XML Schema WG's standard versioning
+ policy, this schema document will persist at
+ http://www.w3.org/2007/08/xml.xsd.
+ At the date of issue it can also be found at
+ http://www.w3.org/2001/xml.xsd.
+ The schema document at that URI may however change in the future,
+ in order to remain compatible with the latest version of XML Schema
+ itself, or with the XML namespace itself. In other words, if the XML
+ Schema or XML namespaces change, the version of this document at
+ http://www.w3.org/2001/xml.xsd will change
+ accordingly; the version at
+ http://www.w3.org/2007/08/xml.xsd will not change.
+ </xs:documentation>
+ </xs:annotation>
+
+ <xs:attribute name="lang">
+ <xs:annotation>
+ <xs:documentation>Attempting to install the relevant ISO 2- and 3-letter
+ codes as the enumerated possible values is probably never
+ going to be a realistic possibility. See
+ RFC 3066 at http://www.ietf.org/rfc/rfc3066.txt and the IANA registry
+ at http://www.iana.org/assignments/lang-tag-apps.htm for
+ further information.
+
+ The union allows for the 'un-declaration' of xml:lang with
+ the empty string.</xs:documentation>
+ </xs:annotation>
+ <xs:simpleType>
+ <xs:union memberTypes="xs:language">
+ <xs:simpleType>
+ <xs:restriction base="xs:string">
+ <xs:enumeration value=""/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:union>
+ </xs:simpleType>
+ </xs:attribute>
+
+ <xs:attribute name="space">
+ <xs:simpleType>
+ <xs:restriction base="xs:NCName">
+ <xs:enumeration value="default"/>
+ <xs:enumeration value="preserve"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+
+ <xs:attribute name="base" type="xs:anyURI">
+ <xs:annotation>
+ <xs:documentation>See http://www.w3.org/TR/xmlbase/ for
+ information about this attribute.</xs:documentation>
+ </xs:annotation>
+ </xs:attribute>
+
+ <xs:attribute name="id" type="xs:ID">
+ <xs:annotation>
+ <xs:documentation>See http://www.w3.org/TR/xml-id/ for
+ information about this attribute.</xs:documentation>
+ </xs:annotation>
+ </xs:attribute>
+
+ <xs:attributeGroup name="specialAttrs">
+ <xs:attribute ref="xml:base"/>
+ <xs:attribute ref="xml:lang"/>
+ <xs:attribute ref="xml:space"/>
+ <xs:attribute ref="xml:id"/>
+ </xs:attributeGroup>
+
+</xs:schema>
18 years, 4 months
JBoss Portal SVN: r9340 - branches/JBoss_Portal_Branch_2_6/build.
by portal-commits@lists.jboss.org
Author: sohil.shah(a)jboss.com
Date: 2007-12-13 17:07:55 -0500 (Thu, 13 Dec 2007)
New Revision: 9340
Modified:
branches/JBoss_Portal_Branch_2_6/build/build.xml
Log:
fixing the build...my bad
Modified: branches/JBoss_Portal_Branch_2_6/build/build.xml
===================================================================
--- branches/JBoss_Portal_Branch_2_6/build/build.xml 2007-12-13 18:24:13 UTC (rev 9339)
+++ branches/JBoss_Portal_Branch_2_6/build/build.xml 2007-12-13 22:07:55 UTC (rev 9340)
@@ -108,7 +108,9 @@
<!-- Sets up the module configuration. -->
<moduleconfig property="modules" selected="${groups}">
+
<!-- Modules -->
+
<module name="jems"/>
<module name="security"/>
<module name="faces"/>
@@ -116,48 +118,28 @@
<module name="server"/>
<module name="portlet-server"/>
<module name="theme"/>
- <module name="format"/>
- <module name="core"/>
- <module name="registration"/>
- <module name="presentation"/>
- <module name="core-presentation"/>
- <module name="core-samples"/>
-
- <!--
- <module name="search"/>
- <module name="workflow"/>
- <module name="cms"/>
- <module name="core-cms"/>
- -->
- <!--
+ <module name="cms"/>
+ <module name="format"/>
+ <module name="core"/>
+ <module name="core-cms"/>
<module name="core-management"/>
<module name="core-identity"/>
<module name="core-admin"/>
- -->
- <!--
<module name="core-wsrp"/>
- -->
- <!--
<module name="search"/>
- -->
- <!--
<module name="core-samples"/>
- -->
- <!--
<module name="wsrp"/>
- -->
- <!--
+ <module name="registration"/>
<module name="workflow"/>
- -->
- <!--
<module name="widget"/>
- -->
<!--<module name="core-admin"/>-->
+
<!-- Module groups -->
+
<group name="portal">
<include
- modules="api, jems, server, security, format, portlet-server, faces, theme,registration, presentation, core, core-presentation, core-samples"/>
+ modules="api, jems, server, security, search, format, portlet-server, faces, theme, workflow, cms, registration, core, wsrp, core-admin, core-cms, core-management, core-identity, core-samples, widget"/>
</group>
<group name="cms">
@@ -556,4 +538,4 @@
<setproxy proxyhost="${proxy.host}" proxyport="${proxy.port}" proxyuser="${proxy.username}" proxypassword="${proxy.password}"/>
</target>
-</project>
+</project>
\ No newline at end of file
18 years, 4 months
JBoss Portal SVN: r9339 - in branches: presentation and 13 other directories.
by portal-commits@lists.jboss.org
Author: sohil.shah(a)jboss.com
Date: 2007-12-13 13:24:13 -0500 (Thu, 13 Dec 2007)
New Revision: 9339
Added:
branches/presentation/presentation/src/main/org/jboss/portal/presentation/ajax/client/Session.java
branches/presentation/presentation/src/main/org/jboss/portal/presentation/ajax/client/model/
branches/presentation/presentation/src/main/org/jboss/portal/presentation/ajax/client/model/UIContainer.java
branches/presentation/presentation/src/main/org/jboss/portal/presentation/ajax/client/model/UIContext.java
branches/presentation/presentation/src/main/org/jboss/portal/presentation/ajax/client/model/UIObject.java
branches/presentation/presentation/src/main/org/jboss/portal/presentation/ajax/client/model/UIPage.java
branches/presentation/presentation/src/main/org/jboss/portal/presentation/ajax/client/model/UIPortal.java
branches/presentation/presentation/src/main/org/jboss/portal/presentation/ajax/client/model/UIWindow.java
branches/presentation/presentation/src/main/org/jboss/portal/presentation/client/controller/AjaxUIController.java
Removed:
branches/presentation/presentation/src/main/org/jboss/portal/presentation/ajax/client/protocol/
Modified:
branches/JBoss_Portal_Branch_2_6/build/build.xml
branches/presentation/
branches/presentation/core-presentation/
branches/presentation/core-presentation/src/resources/presentation-sar/META-INF/jboss-service.xml
branches/presentation/presentation/build.xml
branches/presentation/presentation/gwt-dev-env/MyGWT(uiserver).launch
branches/presentation/presentation/gwt-dev-env/Portal(uiserver).launch
branches/presentation/presentation/gwt-dev-env/mozilla-1.7.12/components/xpti.dat
branches/presentation/presentation/src/main/org/jboss/portal/presentation/ajax/client/AsyncPages.java
branches/presentation/presentation/src/main/org/jboss/portal/presentation/ajax/client/PartialRefresh.java
branches/presentation/presentation/src/main/org/jboss/portal/presentation/ajax/client/Portal.java
branches/presentation/presentation/src/main/org/jboss/portal/presentation/ajax/client/PortletService.java
branches/presentation/presentation/src/main/org/jboss/portal/presentation/ajax/client/model/Page.java
branches/presentation/presentation/src/main/org/jboss/portal/presentation/ajax/client/model/Window.java
branches/presentation/presentation/src/main/org/jboss/portal/presentation/ajax/client/service/PortalRPC.java
branches/presentation/presentation/src/main/org/jboss/portal/presentation/ajax/client/service/PortalRPCAsync.java
branches/presentation/presentation/src/main/org/jboss/portal/presentation/ajax/client/widget/PortletWindow.java
branches/presentation/presentation/src/main/org/jboss/portal/presentation/impl/ajax/entry/PortalEntryPoint.java
branches/presentation/presentation/src/main/org/jboss/portal/presentation/test/ajax/HostedModeProxy.java
branches/presentation/presentation/src/main/org/jboss/portal/presentation/test/ajax/PortletServiceImpl.java
branches/presentation/presentation/src/resources/presentation-war/WEB-INF/web.xml
Log:
ajax user agent integration
Modified: branches/JBoss_Portal_Branch_2_6/build/build.xml
===================================================================
--- branches/JBoss_Portal_Branch_2_6/build/build.xml 2007-12-12 17:54:17 UTC (rev 9338)
+++ branches/JBoss_Portal_Branch_2_6/build/build.xml 2007-12-13 18:24:13 UTC (rev 9339)
@@ -108,9 +108,7 @@
<!-- Sets up the module configuration. -->
<moduleconfig property="modules" selected="${groups}">
-
<!-- Modules -->
-
<module name="jems"/>
<module name="security"/>
<module name="faces"/>
@@ -118,27 +116,48 @@
<module name="server"/>
<module name="portlet-server"/>
<module name="theme"/>
- <module name="cms"/>
- <module name="format"/>
- <module name="core"/>
- <module name="core-cms"/>
+ <module name="format"/>
+ <module name="core"/>
+ <module name="registration"/>
+ <module name="presentation"/>
+ <module name="core-presentation"/>
+ <module name="core-samples"/>
+
+ <!--
+ <module name="search"/>
+ <module name="workflow"/>
+ <module name="cms"/>
+ <module name="core-cms"/>
+ -->
+ <!--
<module name="core-management"/>
<module name="core-identity"/>
<module name="core-admin"/>
+ -->
+ <!--
<module name="core-wsrp"/>
+ -->
+ <!--
<module name="search"/>
+ -->
+ <!--
<module name="core-samples"/>
+ -->
+ <!--
<module name="wsrp"/>
- <module name="registration"/>
+ -->
+ <!--
<module name="workflow"/>
+ -->
+ <!--
<module name="widget"/>
+ -->
<!--<module name="core-admin"/>-->
<!-- Module groups -->
-
<group name="portal">
<include
- modules="api, jems, server, security, search, format, portlet-server, faces, theme, workflow, cms, registration, core, wsrp, core-admin, core-cms, core-management, core-identity, core-samples, widget"/>
+ modules="api, jems, server, security, format, portlet-server, faces, theme,registration, presentation, core, core-presentation, core-samples"/>
</group>
<group name="cms">
Property changes on: branches/presentation
___________________________________________________________________
Name: svn:ignore
+ thirdparty
.classpath
.project
.settings
core-samples
Property changes on: branches/presentation/core-presentation
___________________________________________________________________
Name: svn:ignore
+ output
Modified: branches/presentation/core-presentation/src/resources/presentation-sar/META-INF/jboss-service.xml
===================================================================
--- branches/presentation/core-presentation/src/resources/presentation-sar/META-INF/jboss-service.xml 2007-12-12 17:54:17 UTC (rev 9338)
+++ branches/presentation/core-presentation/src/resources/presentation-sar/META-INF/jboss-service.xml 2007-12-13 18:24:13 UTC (rev 9339)
@@ -33,6 +33,14 @@
<depends optional-attribute-name="PresentationServer" proxy-type="attribute">portal:service=PresentationServer</depends>
</mbean>
<mbean
+ code="org.jboss.portal.presentation.client.controller.AjaxUIController"
+ name="portal:service=Controller,type=Ajax/Presentation"
+ xmbean-dd=""
+ xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
+ <xmbean/>
+ <depends optional-attribute-name="PresentationServer" proxy-type="attribute">portal:service=PresentationServer</depends>
+ </mbean>
+ <mbean
code="org.jboss.portal.server.impl.RequestControllerFactoryImpl"
name="portal:service=ControllerFactory,type=Presentation"
xmbean-dd=""
@@ -43,6 +51,16 @@
proxy-type="attribute">portal:service=Controller,type=Presentation</depends>
</mbean>
<mbean
+ code="org.jboss.portal.server.impl.RequestControllerFactoryImpl"
+ name="portal:service=ControllerFactory,type=Ajax/Presentation"
+ xmbean-dd=""
+ xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
+ <xmbean/>
+ <depends
+ optional-attribute-name="Controller"
+ proxy-type="attribute">portal:service=Controller,type=Ajax/Presentation</depends>
+ </mbean>
+ <mbean
code="org.jboss.portal.core.presentation.server.PresentationServerImpl"
name="portal:service=PresentationServer"
xmbean-dd=""
Modified: branches/presentation/presentation/build.xml
===================================================================
--- branches/presentation/presentation/build.xml 2007-12-12 17:54:17 UTC (rev 9338)
+++ branches/presentation/presentation/build.xml 2007-12-13 18:24:13 UTC (rev 9339)
@@ -246,24 +246,19 @@
<path refid="gwt.gwt.classpath"/>
<path refid="mygwt.mygwt.classpath"/>
</path>
- <delete dir="${build.resources}/presentation-war/org.jboss.portal.presentation.ajax.Portal"/>
+ <delete dir="${build.lib}/ajax"/>
<java classpathref="full.gwt.classpath" fork="true" classname="com.google.gwt.dev.GWTCompiler">
<classpath>
<pathelement path="src/main"/>
<pathelement path="src/resources/client/ajax/src"/>
</classpath>
- <arg line="-out ${build.resources}/presentation-war/"/>
+ <arg line="-out ${build.lib}/ajax/"/>
<arg line="org.jboss.portal.presentation.ajax.Portal"/>
</java>
<jar jarfile="${build.lib}/presentation.war">
<fileset dir="${build.resources}/presentation-war"></fileset>
- </jar>
- <copy todir="${build.resources}/presentation-war">
- <fileset dir="${build.resources}/presentation-war/org.jboss.portal.presentation.ajax.Portal"/>
- </copy>
- <delete dir="${build.resources}/presentation-war/org.jboss.portal.presentation.ajax.Portal"/>
-
-
+ <fileset dir="${build.lib}/ajax/org.jboss.portal.presentation.ajax.Portal"></fileset>
+ </jar>
</target>
<target name="output" depends="artifacts">
Modified: branches/presentation/presentation/gwt-dev-env/MyGWT(uiserver).launch
===================================================================
--- branches/presentation/presentation/gwt-dev-env/MyGWT(uiserver).launch 2007-12-12 17:54:17 UTC (rev 9338)
+++ branches/presentation/presentation/gwt-dev-env/MyGWT(uiserver).launch 2007-12-13 18:24:13 UTC (rev 9339)
@@ -6,22 +6,22 @@
<listEntry value="4"/>
</listAttribute>
<listAttribute key="org.eclipse.jdt.launching.CLASSPATH">
-<listEntry value="<?xml version="1.0" encoding="UTF-8"?> <runtimeClasspathEntry containerPath="org.eclipse.jdt.launching.JRE_CONTAINER" javaProject="UIServer" path="1" type="4"/> "/>
-<listEntry value="<?xml version="1.0" encoding="UTF-8"?> <runtimeClasspathEntry internalArchive="/UIServer/uiserver/src/main" path="3" type="2"/> "/>
-<listEntry value="<?xml version="1.0" encoding="UTF-8"?> <runtimeClasspathEntry internalArchive="/UIServer/uiserver/gwt-dev-env/src" path="3" type="2"/> "/>
-<listEntry value="<?xml version="1.0" encoding="UTF-8"?> <runtimeClasspathEntry internalArchive="/UIServer/uiserver/src/resources/client/ajax/src" path="3" type="2"/> "/>
-<listEntry value="<?xml version="1.0" encoding="UTF-8"?> <runtimeClasspathEntry id="org.eclipse.jdt.launching.classpathentry.defaultClasspath"> <memento exportedEntriesOnly="false" project="UIServer"/> </runtimeClasspathEntry> "/>
-<listEntry value="<?xml version="1.0" encoding="UTF-8"?> <runtimeClasspathEntry internalArchive="/UIServer/uiserver/gwt-dev-env/gwt-dev-linux.jar" path="3" type="2"/> "/>
-<listEntry value="<?xml version="1.0" encoding="UTF-8"?> <runtimeClasspathEntry internalArchive="/UIServer/uiserver/gwt-dev-env/mygwt.jar" path="3" type="2"/> "/>
+<listEntry value="<?xml version="1.0" encoding="UTF-8"?> <runtimeClasspathEntry containerPath="org.eclipse.jdt.launching.JRE_CONTAINER" javaProject="PresentationServer" path="1" type="4"/> "/>
+<listEntry value="<?xml version="1.0" encoding="UTF-8"?> <runtimeClasspathEntry internalArchive="/PresentationServer/presentation/src/main" path="3" type="2"/> "/>
+<listEntry value="<?xml version="1.0" encoding="UTF-8"?> <runtimeClasspathEntry internalArchive="/PresentationServer/presentation/gwt-dev-env/src" path="3" type="2"/> "/>
+<listEntry value="<?xml version="1.0" encoding="UTF-8"?> <runtimeClasspathEntry internalArchive="/PresentationServer/presentation/src/resources/client/ajax/src" path="3" type="2"/> "/>
+<listEntry value="<?xml version="1.0" encoding="UTF-8"?> <runtimeClasspathEntry id="org.eclipse.jdt.launching.classpathentry.defaultClasspath"> <memento exportedEntriesOnly="false" project="PresentationServer"/> </runtimeClasspathEntry> "/>
+<listEntry value="<?xml version="1.0" encoding="UTF-8"?> <runtimeClasspathEntry internalArchive="/PresentationServer/presentation/gwt-dev-env/gwt-dev-linux.jar" path="3" type="2"/> "/>
+<listEntry value="<?xml version="1.0" encoding="UTF-8"?> <runtimeClasspathEntry internalArchive="/PresentationServer/presentation/gwt-dev-env/mygwt.jar" path="3" type="2"/> "/>
</listAttribute>
<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-out www org.jboss.portal.presentation.ajax.MyGWT/mygwt.html"/>
-<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="UIServer"/>
+<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="PresentationServer"/>
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
-<listEntry value="/UIServer"/>
+<listEntry value="/PresentationServer"/>
</listAttribute>
<mapAttribute key="org.eclipse.debug.core.environmentVariables">
<mapEntry key="GWT_EXTERNAL_BROWSER" value="/home/soshah/firefox/firefox"/>
</mapAttribute>
-<stringAttribute key="org.eclipse.jdt.launching.WORKING_DIRECTORY" value="${workspace_loc:UIServer/uiserver/gwt-dev-env}"/>
+<stringAttribute key="org.eclipse.jdt.launching.WORKING_DIRECTORY" value="${workspace_loc:PresentationServer/presentation/gwt-dev-env}"/>
<booleanAttribute key="org.eclipse.debug.core.appendEnvironmentVariables" value="true"/>
</launchConfiguration>
Modified: branches/presentation/presentation/gwt-dev-env/Portal(uiserver).launch
===================================================================
--- branches/presentation/presentation/gwt-dev-env/Portal(uiserver).launch 2007-12-12 17:54:17 UTC (rev 9338)
+++ branches/presentation/presentation/gwt-dev-env/Portal(uiserver).launch 2007-12-13 18:24:13 UTC (rev 9339)
@@ -6,21 +6,21 @@
<listEntry value="4"/>
</listAttribute>
<listAttribute key="org.eclipse.jdt.launching.CLASSPATH">
-<listEntry value="<?xml version="1.0" encoding="UTF-8"?> <runtimeClasspathEntry containerPath="org.eclipse.jdt.launching.JRE_CONTAINER" javaProject="UIServer" path="1" type="4"/> "/>
-<listEntry value="<?xml version="1.0" encoding="UTF-8"?> <runtimeClasspathEntry internalArchive="/UIServer/uiserver/src/main" path="3" type="2"/> "/>
-<listEntry value="<?xml version="1.0" encoding="UTF-8"?> <runtimeClasspathEntry internalArchive="/UIServer/uiserver/src/resources/client/ajax/src" path="3" type="2"/> "/>
-<listEntry value="<?xml version="1.0" encoding="UTF-8"?> <runtimeClasspathEntry internalArchive="/UIServer/uiserver/gwt-dev-env/src" path="3" type="2"/> "/>
-<listEntry value="<?xml version="1.0" encoding="UTF-8"?> <runtimeClasspathEntry id="org.eclipse.jdt.launching.classpathentry.defaultClasspath"> <memento exportedEntriesOnly="false" project="UIServer"/> </runtimeClasspathEntry> "/>
-<listEntry value="<?xml version="1.0" encoding="UTF-8"?> <runtimeClasspathEntry internalArchive="/UIServer/uiserver/gwt-dev-env/gwt-dev-linux.jar" path="3" type="2"/> "/>
+<listEntry value="<?xml version="1.0" encoding="UTF-8"?> <runtimeClasspathEntry containerPath="org.eclipse.jdt.launching.JRE_CONTAINER" javaProject="PresentationServer" path="1" type="4"/> "/>
+<listEntry value="<?xml version="1.0" encoding="UTF-8"?> <runtimeClasspathEntry internalArchive="/PresentationServer/presentation/src/main" path="3" type="2"/> "/>
+<listEntry value="<?xml version="1.0" encoding="UTF-8"?> <runtimeClasspathEntry internalArchive="/PresentationServer/presentation/src/resources/client/ajax/src" path="3" type="2"/> "/>
+<listEntry value="<?xml version="1.0" encoding="UTF-8"?> <runtimeClasspathEntry internalArchive="/PresentationServer/presentation/gwt-dev-env/src" path="3" type="2"/> "/>
+<listEntry value="<?xml version="1.0" encoding="UTF-8"?> <runtimeClasspathEntry id="org.eclipse.jdt.launching.classpathentry.defaultClasspath"> <memento exportedEntriesOnly="false" project="PresentationServer"/> </runtimeClasspathEntry> "/>
+<listEntry value="<?xml version="1.0" encoding="UTF-8"?> <runtimeClasspathEntry internalArchive="/PresentationServer/presentation/gwt-dev-env/gwt-dev-linux.jar" path="3" type="2"/> "/>
</listAttribute>
<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-out www org.jboss.portal.presentation.ajax.Portal/index.html"/>
-<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="UIServer"/>
+<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="PresentationServer"/>
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
-<listEntry value="/UIServer"/>
+<listEntry value="/PresentationServer"/>
</listAttribute>
<mapAttribute key="org.eclipse.debug.core.environmentVariables">
<mapEntry key="GWT_EXTERNAL_BROWSER" value="/home/soshah/firefox/firefox"/>
</mapAttribute>
-<stringAttribute key="org.eclipse.jdt.launching.WORKING_DIRECTORY" value="${workspace_loc:UIServer/uiserver/gwt-dev-env}"/>
+<stringAttribute key="org.eclipse.jdt.launching.WORKING_DIRECTORY" value="${workspace_loc:PresentationServer/presentation/gwt-dev-env}"/>
<booleanAttribute key="org.eclipse.debug.core.appendEnvironmentVariables" value="true"/>
</launchConfiguration>
Modified: branches/presentation/presentation/gwt-dev-env/mozilla-1.7.12/components/xpti.dat
===================================================================
--- branches/presentation/presentation/gwt-dev-env/mozilla-1.7.12/components/xpti.dat 2007-12-12 17:54:17 UTC (rev 9338)
+++ branches/presentation/presentation/gwt-dev-env/mozilla-1.7.12/components/xpti.dat 2007-12-13 18:24:13 UTC (rev 9339)
@@ -2,152 +2,152 @@
[Header,2]
0,Version,2,0
-1,AppDir,/home/soshah/projects/jboss-portal/UIServer/uiserver/gwt-dev-env/mozilla-1.7.12
+1,AppDir,/home/soshah/projects/jboss-portal/branches/presentation/presentation/gwt-dev-env/mozilla-1.7.12
[Directories,3]
-0,/home/soshah/projects/jboss-portal/UIServer/uiserver/gwt-dev-env/mozilla-1.7.12/components
+0,/home/soshah/projects/jboss-portal/branches/presentation/presentation/gwt-dev-env/mozilla-1.7.12/components
1,/home/soshah/.mozilla/plugins
-2,/home/soshah/projects/jboss-portal/UIServer/uiserver/gwt-dev-env/mozilla-1.7.12/plugins
+2,/home/soshah/projects/jboss-portal/branches/presentation/presentation/gwt-dev-env/mozilla-1.7.12/plugins
[Files,139]
-0,msgbase.xpt,0,32371,1191268627000
-1,dom_html.xpt,0,17387,1191268629000
-2,msgimap.xpt,0,15733,1191268627000
-3,addrbook.xpt,0,15591,1191268627000
-4,websrvcs.xpt,0,14664,1191268628000
-5,necko.xpt,0,12564,1191268631000
-6,msgcompose.xpt,0,11998,1191268627000
-7,dom_css.xpt,0,11187,1191268629000
-8,editor.xpt,0,10902,1191268630000
-9,pipnss.xpt,0,10289,1191268627000
-10,msgsearch.xpt,0,9543,1191268630000
-11,accessibility.xpt,0,8851,1191268630000
-12,docshell.xpt,0,8837,1191268627000
-13,gfx.xpt,0,8771,1191268628000
-14,xpcom_ds.xpt,0,8634,1191268627000
-15,dom_base.xpt,0,7775,1191268630000
-16,content_base.xpt,0,6900,1191268627000
-17,xpconnect.xpt,0,6834,1191268629000
-18,msgdb.xpt,0,6716,1191268630000
-19,xpcom_io.xpt,0,6515,1191268630000
-20,dom_core.xpt,0,6377,1191268628000
-21,dom_xul.xpt,0,6231,1191268628000
-22,dom_events.xpt,0,5979,1191268630000
-23,jsdservice.xpt,0,5953,1191268631000
-24,msgnews.xpt,0,5519,1191268627000
-25,widget.xpt,0,5401,1191268630000
-26,webBrowser_core.xpt,0,5287,1191268627000
-27,rdf.xpt,0,4533,1191268629000
-28,msglocal.xpt,0,4244,1191268629000
-29,mozldap.xpt,0,3929,1191268627000
-30,caps.xpt,0,3921,1191268628000
-31,appshell.xpt,0,3645,1191268630000
-32,xpcom_components.xpt,0,3624,1191268631000
-33,xpcom_obsolete.xpt,0,3399,1191268627000
-34,import.xpt,0,3234,1191268628000
-35,pref.xpt,0,3145,1191268629000
-36,uriloader.xpt,0,3095,1191268627000
-37,mime.xpt,0,3076,1191268630000
-38,inspector.xpt,0,2980,1191268628000
-39,layout_xul_tree.xpt,0,2797,1191268629000
-40,xpcom_threads.xpt,0,2664,1191268627000
-41,dom_loadsave.xpt,0,2621,1191268627000
-42,xpcom_base.xpt,0,2543,1191268628000
-43,accessibility-atk.xpt,0,2500,1191268627000
-44,shistory.xpt,0,2257,1191268627000
-45,necko_cache.xpt,0,2180,1191268631000
-46,windowwatcher.xpt,0,2167,1191268627000
-47,layout_xul.xpt,0,2154,1191268627000
-48,imglib2.xpt,0,2152,1191268631000
-49,necko_http.xpt,0,2081,1191268627000
-50,locale.xpt,0,1959,1191268631000
-51,webbrowserpersist.xpt,0,1876,1191268627000
-52,profile.xpt,0,1860,1191268631000
-53,autocomplete.xpt,0,1835,1191268631000
-54,commandhandler.xpt,0,1789,1191268627000
-55,necko_cookie.xpt,0,1666,1191268629000
-56,xpcom_xpti.xpt,0,1560,1191268632000
-57,mimetype.xpt,0,1467,1191268630000
-58,xmlextras.xpt,0,1458,1191268628000
-59,necko_strconv.xpt,0,1409,1191268627000
-60,dom_range.xpt,0,1397,1191268631000
-61,xultmpl.xpt,0,1376,1191268631000
-62,uconv.xpt,0,1339,1191268629000
-63,dom_xpath.xpt,0,1312,1191268630000
-64,dom_traversal.xpt,0,1282,1191268627000
-65,xuldoc.xpt,0,1269,1191268631000
-66,txmgr.xpt,0,1258,1191268627000
-67,webshell_idls.xpt,0,1191,1191268628000
-68,exthandler.xpt,0,1147,1191268631000
-69,unicharutil.xpt,0,1146,1191268629000
-70,xpinstall.xpt,0,1137,1191268627000
-71,oji.xpt,0,1120,1191268627000
-72,search.xpt,0,1119,1191268630000
-73,spellchecker.xpt,0,1060,1191268627000
-74,downloadmanager.xpt,0,1050,1191268627000
-75,find.xpt,0,1036,1191268631000
-76,bookmarks.xpt,0,992,1191268628000
-77,xml-rpc.xpt,0,989,1191268629000
-78,necko_socket.xpt,0,980,1191268627000
-79,wallet.xpt,0,968,1191268631000
-80,jar.xpt,0,941,1191268630000
-81,mozfind.xpt,0,845,1191268632000
-82,necko_dns.xpt,0,793,1191268627000
-83,content_xslt.xpt,0,766,1191268629000
-84,msgsmime.xpt,0,766,1191268627000
-85,dom_stylesheets.xpt,0,728,1191268627000
-86,cookie.xpt,0,705,1191268629000
-87,content_xmldoc.xpt,0,693,1191268627000
-88,composer.xpt,0,690,1191268628000
-89,chardet.xpt,0,676,1191268630000
-90,intl.xpt,0,645,1191268631000
-91,pipboot.xpt,0,628,1191268627000
-92,p3p.xpt,0,625,1191268628000
-93,dom.xpt,0,604,1191268631000
-94,content_html.xpt,0,564,1191268631000
-95,mailview.xpt,0,550,1191268627000
-96,prefmigr.xpt,0,505,1191268627000
-97,dom_xbl.xpt,0,498,1191268628000
-98,necko_jar.xpt,0,485,1191268627000
-99,filepicker.xpt,0,482,1191268631000
-100,mozbrwsr.xpt,0,463,1191268630000
-101,content_htmldoc.xpt,0,449,1191268627000
-102,typeaheadfind.xpt,0,426,1191268627000
-103,htmlparser.xpt,0,416,1191268631000
-104,ipcd.xpt,0,413,1191268629000
-105,necko_file.xpt,0,408,1191268631000
-106,embed_base.xpt,0,390,1191268628000
-107,proxyObjInst.xpt,0,388,1191268631000
-108,pippki.xpt,0,377,1191268630000
-109,directory.xpt,0,373,1191268630000
-110,necko_about.xpt,0,357,1191268628000
-111,xremoteservice.xpt,0,342,1191268629000
-112,history.xpt,0,336,1191268628000
-113,autoconfig.xpt,0,334,1191268629000
-114,layout_base.xpt,0,303,1191268628000
-115,helperAppDlg.xpt,0,292,1191268631000
-116,necko_ftp.xpt,0,287,1191268630000
-117,progressDlg.xpt,0,286,1191268628000
-118,necko_res.xpt,0,285,1191268630000
-119,signonviewer.xpt,0,252,1191268627000
-120,jsurl.xpt,0,237,1191268630000
-121,dom_views.xpt,0,226,1191268631000
-122,walletpreview.xpt,0,223,1191268627000
-123,walleteditor.xpt,0,215,1191268630000
-124,windowds.xpt,0,212,1191268627000
-125,sidebar.xpt,0,207,1191268628000
-126,mailnews.xpt,0,205,1191268630000
-127,profilesharingsetup.xpt,0,203,1191268629000
-128,prefetch.xpt,0,192,1191268627000
-129,necko_viewsource.xpt,0,188,1191268632000
-130,txtsvc.xpt,0,188,1191268630000
-131,jsconsole.xpt,0,186,1191268628000
-132,urlbarhistory.xpt,0,183,1191268627000
-133,impComm4xMail.xpt,0,178,1191268627000
-134,lwbrk.xpt,0,174,1191268630000
-135,related.xpt,0,159,1191268630000
-136,qfaservices.xpt,0,144,1191268631000
-137,necko_data.xpt,0,122,1191268627000
+0,msgbase.xpt,0,32371,1196044679000
+1,dom_html.xpt,0,17387,1196044679000
+2,msgimap.xpt,0,15733,1196044679000
+3,addrbook.xpt,0,15591,1196044679000
+4,websrvcs.xpt,0,14664,1196044679000
+5,necko.xpt,0,12564,1196044679000
+6,msgcompose.xpt,0,11998,1196044679000
+7,dom_css.xpt,0,11187,1196044679000
+8,editor.xpt,0,10902,1196044679000
+9,pipnss.xpt,0,10289,1196044679000
+10,msgsearch.xpt,0,9543,1196044679000
+11,accessibility.xpt,0,8851,1196044679000
+12,docshell.xpt,0,8837,1196044679000
+13,gfx.xpt,0,8771,1196044679000
+14,xpcom_ds.xpt,0,8634,1196044679000
+15,dom_base.xpt,0,7775,1196044679000
+16,content_base.xpt,0,6900,1196044679000
+17,xpconnect.xpt,0,6834,1196044679000
+18,msgdb.xpt,0,6716,1196044679000
+19,xpcom_io.xpt,0,6515,1196044679000
+20,dom_core.xpt,0,6377,1196044679000
+21,dom_xul.xpt,0,6231,1196044679000
+22,dom_events.xpt,0,5979,1196044679000
+23,jsdservice.xpt,0,5953,1196044679000
+24,msgnews.xpt,0,5519,1196044679000
+25,widget.xpt,0,5401,1196044679000
+26,webBrowser_core.xpt,0,5287,1196044679000
+27,rdf.xpt,0,4533,1196044679000
+28,msglocal.xpt,0,4244,1196044679000
+29,mozldap.xpt,0,3929,1196044679000
+30,caps.xpt,0,3921,1196044679000
+31,appshell.xpt,0,3645,1196044679000
+32,xpcom_components.xpt,0,3624,1196044679000
+33,xpcom_obsolete.xpt,0,3399,1196044679000
+34,import.xpt,0,3234,1196044679000
+35,pref.xpt,0,3145,1196044679000
+36,uriloader.xpt,0,3095,1196044679000
+37,mime.xpt,0,3076,1196044679000
+38,inspector.xpt,0,2980,1196044679000
+39,layout_xul_tree.xpt,0,2797,1196044679000
+40,xpcom_threads.xpt,0,2664,1196044679000
+41,dom_loadsave.xpt,0,2621,1196044679000
+42,xpcom_base.xpt,0,2543,1196044679000
+43,accessibility-atk.xpt,0,2500,1196044679000
+44,shistory.xpt,0,2257,1196044679000
+45,necko_cache.xpt,0,2180,1196044679000
+46,windowwatcher.xpt,0,2167,1196044679000
+47,layout_xul.xpt,0,2154,1196044679000
+48,imglib2.xpt,0,2152,1196044679000
+49,necko_http.xpt,0,2081,1196044679000
+50,locale.xpt,0,1959,1196044679000
+51,webbrowserpersist.xpt,0,1876,1196044679000
+52,profile.xpt,0,1860,1196044679000
+53,autocomplete.xpt,0,1835,1196044679000
+54,commandhandler.xpt,0,1789,1196044679000
+55,necko_cookie.xpt,0,1666,1196044679000
+56,xpcom_xpti.xpt,0,1560,1196044679000
+57,mimetype.xpt,0,1467,1196044679000
+58,xmlextras.xpt,0,1458,1196044679000
+59,necko_strconv.xpt,0,1409,1196044679000
+60,dom_range.xpt,0,1397,1196044679000
+61,xultmpl.xpt,0,1376,1196044679000
+62,uconv.xpt,0,1339,1196044679000
+63,dom_xpath.xpt,0,1312,1196044679000
+64,dom_traversal.xpt,0,1282,1196044679000
+65,xuldoc.xpt,0,1269,1196044679000
+66,txmgr.xpt,0,1258,1196044679000
+67,webshell_idls.xpt,0,1191,1196044679000
+68,exthandler.xpt,0,1147,1196044679000
+69,unicharutil.xpt,0,1146,1196044679000
+70,xpinstall.xpt,0,1137,1196044679000
+71,oji.xpt,0,1120,1196044679000
+72,search.xpt,0,1119,1196044679000
+73,spellchecker.xpt,0,1060,1196044679000
+74,downloadmanager.xpt,0,1050,1196044679000
+75,find.xpt,0,1036,1196044679000
+76,bookmarks.xpt,0,992,1196044679000
+77,xml-rpc.xpt,0,989,1196044679000
+78,necko_socket.xpt,0,980,1196044679000
+79,wallet.xpt,0,968,1196044679000
+80,jar.xpt,0,941,1196044679000
+81,mozfind.xpt,0,845,1196044679000
+82,necko_dns.xpt,0,793,1196044679000
+83,content_xslt.xpt,0,766,1196044679000
+84,msgsmime.xpt,0,766,1196044679000
+85,dom_stylesheets.xpt,0,728,1196044679000
+86,cookie.xpt,0,705,1196044679000
+87,content_xmldoc.xpt,0,693,1196044679000
+88,composer.xpt,0,690,1196044679000
+89,chardet.xpt,0,676,1196044679000
+90,intl.xpt,0,645,1196044679000
+91,pipboot.xpt,0,628,1196044679000
+92,p3p.xpt,0,625,1196044679000
+93,dom.xpt,0,604,1196044679000
+94,content_html.xpt,0,564,1196044679000
+95,mailview.xpt,0,550,1196044679000
+96,prefmigr.xpt,0,505,1196044679000
+97,dom_xbl.xpt,0,498,1196044679000
+98,necko_jar.xpt,0,485,1196044679000
+99,filepicker.xpt,0,482,1196044679000
+100,mozbrwsr.xpt,0,463,1196044679000
+101,content_htmldoc.xpt,0,449,1196044679000
+102,typeaheadfind.xpt,0,426,1196044679000
+103,htmlparser.xpt,0,416,1196044679000
+104,ipcd.xpt,0,413,1196044679000
+105,necko_file.xpt,0,408,1196044679000
+106,embed_base.xpt,0,390,1196044679000
+107,proxyObjInst.xpt,0,388,1196044679000
+108,pippki.xpt,0,377,1196044679000
+109,directory.xpt,0,373,1196044679000
+110,necko_about.xpt,0,357,1196044679000
+111,xremoteservice.xpt,0,342,1196044679000
+112,history.xpt,0,336,1196044679000
+113,autoconfig.xpt,0,334,1196044679000
+114,layout_base.xpt,0,303,1196044679000
+115,helperAppDlg.xpt,0,292,1196044679000
+116,necko_ftp.xpt,0,287,1196044679000
+117,progressDlg.xpt,0,286,1196044679000
+118,necko_res.xpt,0,285,1196044679000
+119,signonviewer.xpt,0,252,1196044679000
+120,jsurl.xpt,0,237,1196044679000
+121,dom_views.xpt,0,226,1196044679000
+122,walletpreview.xpt,0,223,1196044679000
+123,walleteditor.xpt,0,215,1196044679000
+124,windowds.xpt,0,212,1196044679000
+125,sidebar.xpt,0,207,1196044679000
+126,mailnews.xpt,0,205,1196044679000
+127,profilesharingsetup.xpt,0,203,1196044679000
+128,prefetch.xpt,0,192,1196044679000
+129,necko_viewsource.xpt,0,188,1196044679000
+130,txtsvc.xpt,0,188,1196044679000
+131,jsconsole.xpt,0,186,1196044679000
+132,urlbarhistory.xpt,0,183,1196044679000
+133,impComm4xMail.xpt,0,178,1196044679000
+134,lwbrk.xpt,0,174,1196044679000
+135,related.xpt,0,159,1196044679000
+136,qfaservices.xpt,0,144,1196044679000
+137,necko_data.xpt,0,122,1196044679000
138,flashplayer.xpt,1,856,1166208660000
[ArchiveItems,0]
Modified: branches/presentation/presentation/src/main/org/jboss/portal/presentation/ajax/client/AsyncPages.java
===================================================================
--- branches/presentation/presentation/src/main/org/jboss/portal/presentation/ajax/client/AsyncPages.java 2007-12-12 17:54:17 UTC (rev 9338)
+++ branches/presentation/presentation/src/main/org/jboss/portal/presentation/ajax/client/AsyncPages.java 2007-12-13 18:24:13 UTC (rev 9339)
@@ -50,8 +50,8 @@
import net.mygwt.ui.client.event.Listener;
import net.mygwt.ui.client.event.BaseEvent;
-import org.jboss.portal.presentation.ajax.client.protocol.Page;
-import org.jboss.portal.presentation.ajax.client.protocol.Window;
+import org.jboss.portal.presentation.ajax.client.model.Page;
+import org.jboss.portal.presentation.ajax.client.model.Window;
/**
* Used for Prototyping Async Page Management
Modified: branches/presentation/presentation/src/main/org/jboss/portal/presentation/ajax/client/PartialRefresh.java
===================================================================
--- branches/presentation/presentation/src/main/org/jboss/portal/presentation/ajax/client/PartialRefresh.java 2007-12-12 17:54:17 UTC (rev 9338)
+++ branches/presentation/presentation/src/main/org/jboss/portal/presentation/ajax/client/PartialRefresh.java 2007-12-13 18:24:13 UTC (rev 9339)
@@ -42,8 +42,8 @@
import com.google.gwt.user.client.rpc.ServiceDefTarget;
import com.google.gwt.user.client.rpc.AsyncCallback;
-import org.jboss.portal.presentation.ajax.client.protocol.Page;
-import org.jboss.portal.presentation.ajax.client.protocol.Window;
+import org.jboss.portal.presentation.ajax.client.model.Page;
+import org.jboss.portal.presentation.ajax.client.model.Window;
/**
* Used for Prototyping Partial Refresh feature
Modified: branches/presentation/presentation/src/main/org/jboss/portal/presentation/ajax/client/Portal.java
===================================================================
--- branches/presentation/presentation/src/main/org/jboss/portal/presentation/ajax/client/Portal.java 2007-12-12 17:54:17 UTC (rev 9338)
+++ branches/presentation/presentation/src/main/org/jboss/portal/presentation/ajax/client/Portal.java 2007-12-13 18:24:13 UTC (rev 9339)
@@ -33,10 +33,13 @@
import org.jboss.portal.presentation.ajax.client.service.PortalRPC;
import org.jboss.portal.presentation.ajax.client.service.PortalRPCAsync;
-import org.jboss.portal.presentation.ajax.client.protocol.Page;
-import org.jboss.portal.presentation.ajax.client.protocol.Window;
import org.jboss.portal.presentation.ajax.client.widget.PortletWindow;
import org.jboss.portal.presentation.ajax.client.layout.LayoutManager;
+import org.jboss.portal.presentation.ajax.client.model.UIContext;
+import org.jboss.portal.presentation.ajax.client.model.UIPage;
+import org.jboss.portal.presentation.ajax.client.model.UIPortal;
+import org.jboss.portal.presentation.ajax.client.model.UIWindow;
+import org.jboss.portal.presentation.ajax.client.model.UIObject;
/**
* This is the Entry Point of the client-side Ajax agent of the Presentation Framework
@@ -57,31 +60,32 @@
{
public void onSuccess(Object result)
{
- Page portalPage = (Page)result;
- displayPortalPage(portalPage);
+ UIObject uiObject = (UIObject)result;
+ Session.getInstance().getUiContext().addObject(uiObject);
+ displayPortalPage((UIPage)uiObject);
}
public void onFailure(Throwable caught)
{
}
};
- portalRPC.loadPortal(callback);
+ portalRPC.loadObject("/default/default", callback);
}
/**
*
* @param portalPage
*/
- private void displayPortalPage(Page portalPage)
+ private void displayPortalPage(UIPage portalPage)
{
//Dispalying the fully aggregated page
- Window[] windows = portalPage.getWindows();
- if(windows != null && windows.length>0)
+ List windows = portalPage.getChildren();
+ if(windows != null)
{
List displayWindows = new ArrayList();
- for(int i=0; i<windows.length; i++)
+ for(int i=0; i<windows.size(); i++)
{
- Window pageWindow = windows[i];
+ UIWindow pageWindow = (UIWindow)windows.get(i);
if(pageWindow.isVisible())
{
PortletWindow portletWindow = new PortletWindow(pageWindow);
Modified: branches/presentation/presentation/src/main/org/jboss/portal/presentation/ajax/client/PortletService.java
===================================================================
--- branches/presentation/presentation/src/main/org/jboss/portal/presentation/ajax/client/PortletService.java 2007-12-12 17:54:17 UTC (rev 9338)
+++ branches/presentation/presentation/src/main/org/jboss/portal/presentation/ajax/client/PortletService.java 2007-12-13 18:24:13 UTC (rev 9339)
@@ -24,7 +24,7 @@
import com.google.gwt.user.client.rpc.RemoteService;
-import org.jboss.portal.presentation.ajax.client.protocol.Page;
+import org.jboss.portal.presentation.ajax.client.model.Page;
/**
* A Protototype RPC service
Added: branches/presentation/presentation/src/main/org/jboss/portal/presentation/ajax/client/Session.java
===================================================================
--- branches/presentation/presentation/src/main/org/jboss/portal/presentation/ajax/client/Session.java (rev 0)
+++ branches/presentation/presentation/src/main/org/jboss/portal/presentation/ajax/client/Session.java 2007-12-13 18:24:13 UTC (rev 9339)
@@ -0,0 +1,84 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.presentation.ajax.client;
+
+import org.jboss.portal.presentation.ajax.client.model.UIContext;
+
+/**
+ * This is the client side Session. This is a singleton since there should only be one session for each client
+ *
+ * @author <a href="mailto:sshah@redhat.com">Sohil Shah</a>
+ *
+ */
+public class Session
+{
+ /**
+ *
+ */
+ private static Session singleton = null;
+
+ /**
+ *
+ */
+ private UIContext uiContext = null;
+
+ /**
+ *
+ *
+ */
+ private Session()
+ {
+ this.uiContext = new UIContext();
+ }
+
+ /**
+ *
+ * @return
+ */
+ public static Session getInstance()
+ {
+ if(Session.singleton == null)
+ {
+ Session.singleton = new Session();
+ }
+ return Session.singleton;
+ }
+
+ /**
+ *
+ * @return
+ */
+ public UIContext getUiContext()
+ {
+ return this.uiContext;
+ }
+
+ /**
+ *
+ * @param uiContext
+ */
+ public void setUiContext(UIContext uiContext)
+ {
+ this.uiContext = uiContext;
+ }
+}
Copied: branches/presentation/presentation/src/main/org/jboss/portal/presentation/ajax/client/model (from rev 9312, branches/presentation/presentation/src/main/org/jboss/portal/presentation/ajax/client/protocol)
Modified: branches/presentation/presentation/src/main/org/jboss/portal/presentation/ajax/client/model/Page.java
===================================================================
--- branches/presentation/presentation/src/main/org/jboss/portal/presentation/ajax/client/protocol/Page.java 2007-12-06 15:59:09 UTC (rev 9312)
+++ branches/presentation/presentation/src/main/org/jboss/portal/presentation/ajax/client/model/Page.java 2007-12-13 18:24:13 UTC (rev 9339)
@@ -20,7 +20,7 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
* 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
******************************************************************************/
-package org.jboss.portal.presentation.ajax.client.protocol;
+package org.jboss.portal.presentation.ajax.client.model;
import com.google.gwt.user.client.rpc.IsSerializable;
Added: branches/presentation/presentation/src/main/org/jboss/portal/presentation/ajax/client/model/UIContainer.java
===================================================================
--- branches/presentation/presentation/src/main/org/jboss/portal/presentation/ajax/client/model/UIContainer.java (rev 0)
+++ branches/presentation/presentation/src/main/org/jboss/portal/presentation/ajax/client/model/UIContainer.java 2007-12-13 18:24:13 UTC (rev 9339)
@@ -0,0 +1,32 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.presentation.ajax.client.model;
+
+/**
+ * @author <a href="mailto:sshah@redhat.com">Sohil Shah</a>
+ *
+ */
+public final class UIContainer extends UIObject
+{
+
+}
Added: branches/presentation/presentation/src/main/org/jboss/portal/presentation/ajax/client/model/UIContext.java
===================================================================
--- branches/presentation/presentation/src/main/org/jboss/portal/presentation/ajax/client/model/UIContext.java (rev 0)
+++ branches/presentation/presentation/src/main/org/jboss/portal/presentation/ajax/client/model/UIContext.java 2007-12-13 18:24:13 UTC (rev 9339)
@@ -0,0 +1,83 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.presentation.ajax.client.model;
+
+import java.util.Map;
+import java.util.HashMap;
+
+/**
+ * @author <a href="mailto:sshah@redhat.com">Sohil Shah</a>
+ *
+ */
+public final class UIContext extends UIObject
+{
+ /**
+ * @gwt.typeArgs <java.lang.String, org.jboss.portal.presentation.ajax.client.model.UIObject>
+ */
+ private Map objectTree = new HashMap();
+
+ /**
+ *
+ * @param id
+ * @return
+ */
+ public UIObject getObject(String id)
+ {
+ UIObject object = null;
+
+ if(this.objectTree.containsKey(id))
+ {
+ object = (UIObject)this.objectTree.get(id);
+ }
+
+ return object;
+ }
+
+ /**
+ *
+ * @param id
+ */
+ public void addObject(UIObject object)
+ {
+ object.setContext(this);
+ this.objectTree.put(object.getId(), object);
+ }
+
+ /**
+ *
+ * @return
+ */
+ public Map getObjectTree()
+ {
+ return objectTree;
+ }
+
+ /**
+ *
+ * @param objectTree
+ */
+ public void setObjectTree(Map objectTree)
+ {
+ this.objectTree = objectTree;
+ }
+}
Added: branches/presentation/presentation/src/main/org/jboss/portal/presentation/ajax/client/model/UIObject.java
===================================================================
--- branches/presentation/presentation/src/main/org/jboss/portal/presentation/ajax/client/model/UIObject.java (rev 0)
+++ branches/presentation/presentation/src/main/org/jboss/portal/presentation/ajax/client/model/UIObject.java 2007-12-13 18:24:13 UTC (rev 9339)
@@ -0,0 +1,181 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.presentation.ajax.client.model;
+
+import java.util.List;
+
+import com.google.gwt.user.client.rpc.IsSerializable;
+
+/**
+ * @author <a href="mailto:sshah@redhat.com">Sohil Shah</a>
+ *
+ */
+public abstract class UIObject implements IsSerializable
+{
+ /**
+ *
+ */
+ public static final int STATUS_VALID = 0;
+ public static final int STATUS_INVALID = 1;
+ public static final int STATUS_STALE = 2;
+
+ /**
+ *
+ */
+ protected String id = null;
+
+ /**
+ *
+ */
+ protected String name = null;
+
+ /**
+ *
+ */
+ protected int status = STATUS_VALID;
+
+ /**
+ *
+ */
+ protected UIObject parent = null;
+
+ /**
+ * @gwt.typeArgs <org.jboss.portal.presentation.ajax.client.model.UIObject>
+ */
+ protected List children = null;
+
+ /**
+ *
+ */
+ protected UIContext context = null;
+ //----------------------------------------------------------------------------------------------------------------------------------------------------------
+
+ /**
+ *
+ * @return
+ */
+ public String getId()
+ {
+ return this.id;
+ }
+
+ /**
+ *
+ * @return
+ */
+ public String getName()
+ {
+ return this.name;
+ }
+
+ /**
+ *
+ * @return
+ */
+ public int getStatus()
+ {
+ return this.status;
+ }
+
+ /**
+ *
+ * @return
+ */
+ public UIObject getParent()
+ {
+ return this.parent;
+ }
+
+ /**
+ *
+ * @return
+ */
+ public List getChildren()
+ {
+ return this.children;
+ }
+
+ /**
+ *
+ * @param name
+ * @return
+ */
+ public UIObject getChild(String name)
+ {
+ UIObject child = null;
+
+ if(this.children != null)
+ {
+ for(int i=0; i<this.children.size(); i++)
+ {
+ UIObject cour = (UIObject)this.children.get(i);
+ if(cour.getName().equals(name))
+ {
+ child = cour;
+ break;
+ }
+ }
+ }
+
+ return child;
+ }
+
+ public UIContext getContext()
+ {
+ return context;
+ }
+
+ public void setContext(UIContext context)
+ {
+ this.context = context;
+ }
+
+ /**
+ *
+ * @param children
+ */
+ public void setChildren(List children)
+ {
+ this.children = children;
+ }
+
+ public void setId(String id)
+ {
+ this.id = id;
+ }
+
+ public void setName(String name)
+ {
+ this.name = name;
+ }
+
+ public void setParent(UIObject parent)
+ {
+ this.parent = parent;
+ }
+
+ public void setStatus(int status)
+ {
+ this.status = status;
+ }
+}
Added: branches/presentation/presentation/src/main/org/jboss/portal/presentation/ajax/client/model/UIPage.java
===================================================================
--- branches/presentation/presentation/src/main/org/jboss/portal/presentation/ajax/client/model/UIPage.java (rev 0)
+++ branches/presentation/presentation/src/main/org/jboss/portal/presentation/ajax/client/model/UIPage.java 2007-12-13 18:24:13 UTC (rev 9339)
@@ -0,0 +1,33 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.presentation.ajax.client.model;
+
+import java.util.List;
+
+/**
+ * @author <a href="mailto:sshah@redhat.com">Sohil Shah</a>
+ *
+ */
+public final class UIPage extends UIObject
+{
+}
Added: branches/presentation/presentation/src/main/org/jboss/portal/presentation/ajax/client/model/UIPortal.java
===================================================================
--- branches/presentation/presentation/src/main/org/jboss/portal/presentation/ajax/client/model/UIPortal.java (rev 0)
+++ branches/presentation/presentation/src/main/org/jboss/portal/presentation/ajax/client/model/UIPortal.java 2007-12-13 18:24:13 UTC (rev 9339)
@@ -0,0 +1,32 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.presentation.ajax.client.model;
+
+/**
+ * @author <a href="mailto:sshah@redhat.com">Sohil Shah</a>
+ *
+ */
+public final class UIPortal extends UIObject
+{
+
+}
Added: branches/presentation/presentation/src/main/org/jboss/portal/presentation/ajax/client/model/UIWindow.java
===================================================================
--- branches/presentation/presentation/src/main/org/jboss/portal/presentation/ajax/client/model/UIWindow.java (rev 0)
+++ branches/presentation/presentation/src/main/org/jboss/portal/presentation/ajax/client/model/UIWindow.java 2007-12-13 18:24:13 UTC (rev 9339)
@@ -0,0 +1,117 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.presentation.ajax.client.model;
+
+import java.util.List;
+
+/**
+ * @author <a href="mailto:sshah@redhat.com">Sohil Shah</a>
+ *
+ */
+public final class UIWindow extends UIObject
+{
+ public static final String NORMAL = "NORMAL";
+ public static final String MAXIMIZED = "MAXIMIZED";
+ public static final String MINIMIZED = "MINIMIZED";
+ public static final String EDIT = "EDIT";
+ public static final String VIEW = "VIEW";
+
+ private String content = null;
+ private String mode = VIEW;
+ private String state = NORMAL;
+ private boolean isVisible = true;
+
+
+ /**
+ *
+ * @return
+ */
+ public String getContent()
+ {
+ return content;
+ }
+
+ /**
+ *
+ * @param content
+ */
+ public void setContent(String content)
+ {
+ this.content = content;
+ }
+
+ /**
+ *
+ * @return
+ */
+ public boolean isVisible()
+ {
+ return isVisible;
+ }
+
+ /**
+ *
+ * @param isVisible
+ */
+ public void setVisible(boolean isVisible)
+ {
+ this.isVisible = isVisible;
+ }
+
+ /**
+ *
+ * @return
+ */
+ public String getMode()
+ {
+ return mode;
+ }
+
+ /**
+ *
+ * @param mode
+ */
+ public void setMode(String mode)
+ {
+ this.mode = mode;
+ }
+
+
+ /**
+ *
+ * @return
+ */
+ public String getState()
+ {
+ return state;
+ }
+
+ /**
+ *
+ * @param state
+ */
+ public void setState(String state)
+ {
+ this.state = state;
+ }
+}
Modified: branches/presentation/presentation/src/main/org/jboss/portal/presentation/ajax/client/model/Window.java
===================================================================
--- branches/presentation/presentation/src/main/org/jboss/portal/presentation/ajax/client/protocol/Window.java 2007-12-06 15:59:09 UTC (rev 9312)
+++ branches/presentation/presentation/src/main/org/jboss/portal/presentation/ajax/client/model/Window.java 2007-12-13 18:24:13 UTC (rev 9339)
@@ -20,7 +20,7 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
* 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
******************************************************************************/
-package org.jboss.portal.presentation.ajax.client.protocol;
+package org.jboss.portal.presentation.ajax.client.model;
import com.google.gwt.user.client.rpc.IsSerializable;
Modified: branches/presentation/presentation/src/main/org/jboss/portal/presentation/ajax/client/service/PortalRPC.java
===================================================================
--- branches/presentation/presentation/src/main/org/jboss/portal/presentation/ajax/client/service/PortalRPC.java 2007-12-12 17:54:17 UTC (rev 9338)
+++ branches/presentation/presentation/src/main/org/jboss/portal/presentation/ajax/client/service/PortalRPC.java 2007-12-13 18:24:13 UTC (rev 9339)
@@ -24,7 +24,7 @@
import com.google.gwt.user.client.rpc.RemoteService;
-import org.jboss.portal.presentation.ajax.client.protocol.Page;
+import org.jboss.portal.presentation.ajax.client.model.UIObject;
/**
* RPC service used for Asynchronous communication between the client-side agent and the Portal Server
@@ -35,14 +35,9 @@
public interface PortalRPC extends RemoteService
{
/**
- * Loads the initial Portal Page at the start of a Portal session
+ * Asynchronously loads the specified object from the server
*
- * @return The Initial Portal Page
+ * @return
*/
- public Page loadPortal();
-
- /**
- * @return The Page of the Portal that should be currently displayed
- */
- public Page getCurrentPage();
+ public UIObject loadObject(String objectId);
}
Modified: branches/presentation/presentation/src/main/org/jboss/portal/presentation/ajax/client/service/PortalRPCAsync.java
===================================================================
--- branches/presentation/presentation/src/main/org/jboss/portal/presentation/ajax/client/service/PortalRPCAsync.java 2007-12-12 17:54:17 UTC (rev 9338)
+++ branches/presentation/presentation/src/main/org/jboss/portal/presentation/ajax/client/service/PortalRPCAsync.java 2007-12-13 18:24:13 UTC (rev 9339)
@@ -33,12 +33,7 @@
public interface PortalRPCAsync
{
/**
- * Loads the initial Portal Page at the start of a Portal session
+ * Asynchronously loads the specified object from the server
*/
- public void loadPortal(AsyncCallback callback);
-
- /**
- * Loads the Page of the Portal that should be currently displayed
- */
- public void getCurrentPage(AsyncCallback callback);
+ public void loadObject(String objectId, AsyncCallback callback);
}
Modified: branches/presentation/presentation/src/main/org/jboss/portal/presentation/ajax/client/widget/PortletWindow.java
===================================================================
--- branches/presentation/presentation/src/main/org/jboss/portal/presentation/ajax/client/widget/PortletWindow.java 2007-12-12 17:54:17 UTC (rev 9338)
+++ branches/presentation/presentation/src/main/org/jboss/portal/presentation/ajax/client/widget/PortletWindow.java 2007-12-13 18:24:13 UTC (rev 9339)
@@ -47,7 +47,7 @@
import net.mygwt.ui.client.event.Listener;
import net.mygwt.ui.client.event.BaseEvent;
-import org.jboss.portal.presentation.ajax.client.protocol.Window;
+import org.jboss.portal.presentation.ajax.client.model.UIWindow;
/**
* @author <a href="mailto:sshah@redhat.com">Sohil Shah</a>
@@ -58,13 +58,13 @@
/**
*
*/
- private Window window = null;
+ private UIWindow window = null;
/**
*
*
*/
- public PortletWindow(Window window)
+ public PortletWindow(UIWindow window)
{
this.window = window;
}
Added: branches/presentation/presentation/src/main/org/jboss/portal/presentation/client/controller/AjaxUIController.java
===================================================================
--- branches/presentation/presentation/src/main/org/jboss/portal/presentation/client/controller/AjaxUIController.java (rev 0)
+++ branches/presentation/presentation/src/main/org/jboss/portal/presentation/client/controller/AjaxUIController.java 2007-12-13 18:24:13 UTC (rev 9339)
@@ -0,0 +1,329 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.presentation.client.controller;
+
+import org.jboss.portal.presentation.client.PresentationContext;
+import org.jboss.portal.presentation.impl.PresentationContextImpl;
+import org.jboss.portal.presentation.model.UIObject;
+import org.jboss.portal.presentation.model.UIPage;
+import org.jboss.portal.presentation.model.UIWindow;
+import org.jboss.portal.presentation.model.content.WindowContent;
+import org.jboss.portal.presentation.protocol.GetActivation;
+import org.jboss.portal.presentation.protocol.PostActivation;
+import org.jboss.portal.presentation.protocol.ServerAction;
+import org.jboss.portal.presentation.protocol.ServerResponse;
+import org.jboss.portal.presentation.protocol.ShowUIObjectResponse;
+import org.jboss.portal.presentation.protocol.ViewUIObjectAction;
+import org.jboss.portal.presentation.server.PresentationServer;
+import org.jboss.portal.presentation.server.ProcessorRequest;
+import org.jboss.portal.presentation.server.ProcessorResponse;
+import org.jboss.portal.server.RequestController;
+import org.jboss.portal.server.ServerException;
+import org.jboss.portal.server.ServerInvocation;
+import org.jboss.portal.server.ServerInvocationContext;
+import org.jboss.portal.server.impl.ServerInvocationContextImpl;
+import org.jboss.portal.web.WebRequest;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.util.List;
+import java.util.ArrayList;
+
+/**
+ * The UIServer is responsible for generating the output that is sent back to the client based on the Portal state of a particular Portal Request
+ *
+ * The UIServer provides various UI level services like Page Aggregation, Page Layout, Web 2.0 client interactions etc.
+ *
+ * Typically the Core component of the Portal delegates all UI specific functions to this component
+ *
+ * @author <a href="mailto:sshah@redhat.com">Sohil Shah</a>
+ *
+ */
+public class AjaxUIController implements RequestController
+{
+
+ /** . */
+ private PresentationServer presentationServer = null;
+
+
+ public AjaxUIController()
+ {
+ }
+
+
+ /**
+ * handle is the entry point for handling an incoming Portal request. The request is handed over
+ * from the Http Layer via the main Portal Servlet
+ */
+ public void handle(ServerInvocation invocation) throws ServerException
+ {
+ try
+ {
+ HttpServletRequest request = invocation.getServerContext().getClientRequest();
+
+ /**
+ * TODO: decouple the implementation via factory pattern
+ */
+ PresentationContext presentationContext = new PresentationContextImpl(this.presentationServer,
+ invocation);
+ request.setAttribute("requestContext", presentationContext);
+
+ /**
+ * TODO: move this functionality to another component like a UIPresenter etc
+ */
+ ServerAction serverAction = this.getServerAction(presentationContext, invocation);
+
+ ProcessorRequest processorRequest = new ProcessorRequest(serverAction);
+ ProcessorResponse processorResponse = this.presentationServer.getProcessor().process(presentationContext,
+ processorRequest);
+
+ //Process the response from the Processor
+ ServerResponse serverResponse = processorResponse.getResponse();
+ this.handle(presentationContext, serverResponse, invocation);
+ }
+ catch(Exception e)
+ {
+ throw new ServerException(e);
+ }
+ }
+
+ /**
+ *
+ * @param serverResponse
+ * @throws ServerException
+ */
+ private void handle(PresentationContext presentationContext, ServerResponse serverResponse, ServerInvocation invocation) throws ServerException
+ {
+ try
+ {
+ HttpServletResponse response = invocation.getServerContext().getClientResponse();
+ if(serverResponse instanceof ShowUIObjectResponse)
+ {
+ ShowUIObjectResponse show = (ShowUIObjectResponse)serverResponse;
+ String targetId = show.getTargetId();
+
+ //Load the objects in the UITree
+ UIObject uiObject = presentationContext.getUIContext().getObject(targetId);
+
+ if(uiObject instanceof UIPage)
+ {
+ //
+ render(invocation, presentationContext, targetId);
+ }
+ }
+ }
+ catch(Exception e)
+ {
+ throw new ServerException(e);
+ }
+ }
+
+ /**
+ *
+ * @param presentationContext
+ * @param targetId
+ */
+ private void render(ServerInvocation invocation,PresentationContext presentationContext, String targetId)
+ {
+ UIObject uiObject = presentationContext.getUIContext().getObject(targetId);
+
+ //Display the page to the client
+ if(uiObject instanceof UIPage)
+ {
+ UIPage page = (UIPage)uiObject;
+
+ org.jboss.portal.presentation.ajax.client.model.UIPage clientPage = new org.jboss.portal.presentation.ajax.client.model.UIPage();
+ clientPage.setId(page.getId());
+ clientPage.setName(page.getName());
+ //TODO: set proper status
+ //TODO: set proper parent reference
+
+ List<UIObject> windows = page.getChildren();
+ List clientWindows = new ArrayList();
+ for(int i=0; i<windows.size(); i++)
+ {
+ UIObject cour = windows.get(i);
+ if(cour instanceof UIWindow)
+ {
+ UIWindow window = (UIWindow)cour;
+ try
+ {
+ WindowContent windowContent = this.presentationServer.render(presentationContext, window);
+
+ org.jboss.portal.presentation.ajax.client.model.UIWindow clientWindow = new org.jboss.portal.presentation.ajax.client.model.UIWindow();
+
+ clientWindow.setId(window.getId());
+ clientWindow.setName(windowContent.getTitle());
+ clientWindow.setParent(clientPage);
+ //TODO: set proper status
+
+ clientWindow.setContent(windowContent.getMarkup());
+ if(window.getMode() != null)
+ {
+ clientWindow.setMode(window.getMode().toString());
+ }
+ if(window.getWindowState() != null)
+ {
+ clientWindow.setState(window.getWindowState().toString());
+ }
+ //TODO: set proper visibility status
+
+ clientWindows.add(clientWindow);
+ }
+ catch (Exception e)
+ {
+ e.printStackTrace();
+ }
+ }
+ }
+ clientPage.setChildren(clientWindows);
+
+ invocation.getServerContext().getClientRequest().setAttribute("uiObject", clientPage);
+ }
+ }
+
+ /**
+ *
+ *
+ */
+ public void start()
+ {
+
+ }
+
+ /**
+ *
+ *
+ */
+ public void stop()
+ {
+
+ }
+ //-----------------------------------------------------------------------------------------------------------------------------------------------------------
+ /**
+ *
+ */
+ public PresentationServer getPresentationServer()
+ {
+ return presentationServer;
+ }
+
+ /**
+ *
+ * @param presentationServer
+ */
+ public void setPresentationServer(PresentationServer presentationServer)
+ {
+ this.presentationServer = presentationServer;
+ }
+ //--------------------------------------------------------------------------------------------------------------------------------------------------------------
+ /**
+ *
+ */
+ private ServerAction getServerAction(PresentationContext presentationContext, ServerInvocation invocation)
+ {
+
+ //Just use ViewUIObject command for now until URL interpretation/mapping
+ //to ServiceAction is implemented
+ return new ViewUIObjectAction("/default/default");
+
+ /*ServerInvocationContext invocationContext = invocation.getServerContext();
+ String requestPath = invocation.getServerContext().getPortalRequestPath();
+
+ //
+ if (requestPath.startsWith("/invoke/"))
+ {
+ UIObject target = presentationContext.getUIContext();
+
+ //
+ int from = "/invoke/".length();
+ while (true)
+ {
+ int pos = requestPath.indexOf('/', from);
+ if (pos == -1)
+ {
+ String name = requestPath.substring(from);
+ target = target.getChild(name);
+ break;
+ }
+ else
+ {
+ String name = requestPath.substring(from, pos);
+ target = target.getChild(name);
+ }
+ if (target == null)
+ {
+ break;
+ }
+ from = pos + 1;
+ }
+
+ // I know but it will go away later when we remove dependency on server module
+ WebRequest webReq = ((ServerInvocationContextImpl)invocation.getContext()).getWebRequest();
+
+ //
+ if (target != null)
+ {
+ if ("GET".equals(webReq.getMethod()))
+ {
+ return new GetActivation(target.getId(), webReq.getQueryParameterMap());
+ }
+ else if ("POST".equals(webReq.getMethod()))
+ {
+ return new PostActivation(target.getId(), webReq.getQueryParameterMap(), webReq.getBody());
+ }
+ }
+ }
+
+
+
+ if(targetPortalObject instanceof UIPage)
+ {
+ serverAction = new ViewUIObjectAction(targetPortalObject.getId());
+ }
+ else if(targetPortalObject instanceof UIWindow)
+ {
+ if(request.getMethod().equals("GET"))
+ {
+ GetActivation get = new GetActivation();
+ get.setUrl(request.getRequestURL().toString());
+ get.setContentType(invocationContext.getMediaType());
+ get.setQueryParameters(invocationContext.getQueryParameterMap());
+ get.setPortal(targetPortal);
+ get.setTarget(targetPortalObject);
+ serverAction = get;
+ }
+ else if(request.getMethod().equals("POST"))
+ {
+ PostActivation post = new PostActivation();
+ post.setUrl(request.getRequestURL().toString());
+ post.setContentType(invocationContext.getMediaType());
+ post.setQueryParameters(invocationContext.getQueryParameterMap());
+ post.setBodyParameters(invocationContext.getBodyParameterMap());
+ post.setPortal(targetPortal);
+ post.setTarget(targetPortalObject);
+ serverAction = post;
+ }
+ }*/
+ }
+}
Modified: branches/presentation/presentation/src/main/org/jboss/portal/presentation/impl/ajax/entry/PortalEntryPoint.java
===================================================================
--- branches/presentation/presentation/src/main/org/jboss/portal/presentation/impl/ajax/entry/PortalEntryPoint.java 2007-12-12 17:54:17 UTC (rev 9338)
+++ branches/presentation/presentation/src/main/org/jboss/portal/presentation/impl/ajax/entry/PortalEntryPoint.java 2007-12-13 18:24:13 UTC (rev 9339)
@@ -28,10 +28,15 @@
import org.jboss.portal.server.ServerInvocation;
import org.jboss.portal.server.RequestController;
import org.jboss.portal.server.RequestControllerDispatcher;
+import org.jboss.portal.web.WebRequest;
import org.jboss.portal.presentation.ajax.client.service.PortalRPC;
-import org.jboss.portal.presentation.ajax.client.protocol.Page;
-import org.jboss.portal.presentation.ajax.client.protocol.Window;
+import org.jboss.portal.presentation.ajax.client.model.UIObject;
+import org.jboss.portal.presentation.ajax.client.model.UIPage;
+import org.jboss.portal.presentation.ajax.client.model.UIContext;
+import org.jboss.portal.presentation.ajax.client.model.UIPortal;
+import org.jboss.portal.presentation.ajax.client.model.Page;
+import org.jboss.portal.presentation.ajax.client.model.Window;
import org.jboss.portal.presentation.server.ProcessorResponse;
import com.google.gwt.user.client.rpc.SerializationException;
@@ -48,38 +53,59 @@
{
/** The logger. */
private Logger log = Logger.getLogger(getClass());
-
+
/**
*
*/
-// private EntryPoint entryPoint = null;
+ private RequestControllerFactory controllerFactory = null;
+
+ /** The interceptor stack. */
+ private InterceptorStackFactory interceptorStack = null;
+
+ /**
+ *
+ */
+ private Server portalServer = null;
+
/** Configure the as default servlet. */
public void init() throws ServletException
{
-// try
-// {
-// MBeanServer mbeanServer = MBeanServerLocator.locateJBoss();
-// this.entryPoint = (EntryPoint) MBeanProxy.get(EntryPoint.class, new ObjectName(
-// this.getInitParameter("entryPointServiceName")),
-// mbeanServer);
-// }
-// catch (Exception e)
-// {
-// this.entryPoint = null;
-// String msg = "Portal Entry Point could not be created";
-// log.error(msg, e);
-// throw new UnavailableException(msg);
-// }
+ try
+ {
+ MBeanServer mbeanServer = MBeanServerLocator.locateJBoss();
+
+ //Locate the request controller
+ this.controllerFactory = (RequestControllerFactory) MBeanProxy.get(RequestControllerFactory.class, new ObjectName(
+ this.getInitParameter("controllerFactoryName")),
+ mbeanServer);
+
+ //Locate the interceptor stack factory
+ this.interceptorStack = (InterceptorStackFactory) MBeanProxy.get(InterceptorStackFactory.class, new ObjectName(
+ this.getInitParameter("interceptorStackFactoryName")),
+ mbeanServer);
+
+ //Locate the portal server
+ this.portalServer = (Server) MBeanProxy.get(Server.class, new ObjectName(
+ this.getInitParameter("portalServerName")),
+ mbeanServer);
+
+ }
+ catch (Exception e)
+ {
+ this.controllerFactory = null;
+ this.interceptorStack = null;
+ String msg = "Ajax Portal Entry point could not be created";
+ log.error(msg, e);
+ throw new UnavailableException(msg);
+ }
}
-
+ //---------------------------------------------------------------------------------------------------------------------------------------------------------------------
/**
*
*/
public String processCall(String payload) throws SerializationException
- {
- HttpServletRequest request = this.getThreadLocalRequest();
-
+ {
//Perform the remote procedure call
String returnVal = super.processCall(payload);
@@ -90,89 +116,38 @@
}
// -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
/**
- * Loads the initial Portal Page at the start of a Portal session
+ * Asynchronously loads the specified object from the server
*
* @return The Initial Portal Page
*/
- public Page loadPortal()
+ public UIObject loadObject(String objectId)
{
try
{
- Page display = null;
+ UIObject uiObject = null;
+
HttpServletRequest request = this.getThreadLocalRequest();
- this.callPortalServer();
- display = this.getDisplay((ProcessorResponse)request.getAttribute("processorResponse"));
- return display;
+
+ //execute the call on the Portal
+ this.callPortalServer();
+
+ //Setup the initial UIContext for the client session
+ uiObject = (UIObject)request.getAttribute("uiObject");
+
+ return uiObject;
}
catch(Exception e)
{
throw new RuntimeException(e);
}
- }
-
+ }
+ //-------------------------------------------------------------------------------------------------------------------------------------------------------------------
/**
- * @return The Page of the Portal that should be currently displayed
- */
- public Page getCurrentPage()
- {
- Page currentPage = null;
-
- HttpServletRequest request = this.getThreadLocalRequest();
-
- ProcessorResponse processorResponse = (ProcessorResponse) request.getSession().getAttribute("processorResponse");
-
- currentPage = this.getDisplay(processorResponse);
-
- return currentPage;
- }
- //-------------------------------------------------------------------------------------------------------------------------------------------------------------------
- /**
*
- * @param processorResponse
- * @return
- */
- private Page getDisplay(ProcessorResponse processorResponse)
- {
- Page display = null;
-
- //Implement this with the new model
- /*
- org.jboss.portal.presentation.model.Page portalPage = processorResponse
- .findDisplayedPage();
-
- // Construct the ajax currentPage object from the portalPage that has been
- // chosen to be displayed
- if (portalPage != null)
- {
- display = new Page();
- display.setName(portalPage.getName());
- List pageWindows = portalPage.getWindows();
- if(pageWindows != null && pageWindows.size()>0)
- {
- Window[] windows = new Window[pageWindows.size()];
- display.setWindows(windows);
- for(int i=0; i<pageWindows.size(); i++)
- {
- org.jboss.portal.presentation.model.Window pageWindow = (org.jboss.portal.presentation.model.Window)pageWindows.get(i);
- Window window = new Window();
- window.setName(pageWindow.getName());
- window.setContent(pageWindow.getContent());
- windows[i] = window;
- }
- }
- }
- */
-
- return display;
- }
-
- /**
- *
*
*/
private void callPortalServer() throws Exception
{
-/*
HttpServletRequest req = this.getThreadLocalRequest();
HttpServletResponse resp = this.getThreadLocalResponse();
String requestURI = req.getRequestURI();
@@ -180,27 +155,24 @@
String portalHost = req.getServerName();
String portalRequestPath = requestURI.substring(contextPath.length());
String portalContextPath = requestURI.substring(0, contextPath.length());
- Map queryParameterMap = new HashMap();
URLContext urlContext = URLContext.newInstance(req.isSecure(), req.getRemoteUser() != null);
+
+ WebRequest webReq = new WebRequest(req);
- Server server = this.entryPoint.getPortalServer();
-
//
ServerInvocationContext invocationCtx = new ServerInvocationContextImpl(
req,
resp,
+ webReq,
portalHost,
portalRequestPath,
portalContextPath,
- queryParameterMap,
- null, //body parameter map is not applicable for asynchronous RPC calls
- urlContext,
- null //media type information is not applicable for asynchronous RPC calls
+ urlContext
);
//
ServerRequest request = new ServerRequest(invocationCtx);
- request.setServer(server);
+ request.setServer(this.portalServer);
//
ServerResponse response = new ServerResponse(request, invocationCtx);
@@ -210,13 +182,10 @@
invocation.setRequest(request);
invocation.setResponse(response);
- //
- RequestControllerFactory controllerFactory = this.entryPoint.getControllerFactory();
- RequestController controller = controllerFactory.createRequestController(invocation);
+ //
+ RequestController controller = this.controllerFactory.createRequestController(invocation);
invocation.setHandler(new RequestControllerDispatcher(controller));
-
- InterceptorStackFactory stack = this.entryPoint.getInterceptorStackFactory();
- invocation.invoke(stack.getInterceptorStack());
-*/
+
+ invocation.invoke(this.interceptorStack.getInterceptorStack());
}
}
Modified: branches/presentation/presentation/src/main/org/jboss/portal/presentation/test/ajax/HostedModeProxy.java
===================================================================
--- branches/presentation/presentation/src/main/org/jboss/portal/presentation/test/ajax/HostedModeProxy.java 2007-12-12 17:54:17 UTC (rev 9338)
+++ branches/presentation/presentation/src/main/org/jboss/portal/presentation/test/ajax/HostedModeProxy.java 2007-12-13 18:24:13 UTC (rev 9339)
@@ -71,7 +71,7 @@
//Proxy this rpc request over to the Portal server
WebRequest post = new PostMethodWebRequest(
- "http://localhost:8080/portal-uiserver/portalrpc",
+ "http://localhost:8080/presentation/portalrpc",
new ByteArrayInputStream(input.getBytes()),
"text/plain; charset=utf-8"
);
Modified: branches/presentation/presentation/src/main/org/jboss/portal/presentation/test/ajax/PortletServiceImpl.java
===================================================================
--- branches/presentation/presentation/src/main/org/jboss/portal/presentation/test/ajax/PortletServiceImpl.java 2007-12-12 17:54:17 UTC (rev 9338)
+++ branches/presentation/presentation/src/main/org/jboss/portal/presentation/test/ajax/PortletServiceImpl.java 2007-12-13 18:24:13 UTC (rev 9339)
@@ -5,8 +5,8 @@
import javax.servlet.http.HttpServletRequest;
import org.jboss.portal.presentation.ajax.client.PortletService;
-import org.jboss.portal.presentation.ajax.client.protocol.Page;
-import org.jboss.portal.presentation.ajax.client.protocol.Window;
+import org.jboss.portal.presentation.ajax.client.model.Page;
+import org.jboss.portal.presentation.ajax.client.model.Window;
import com.google.gwt.user.server.rpc.RemoteServiceServlet;
Modified: branches/presentation/presentation/src/resources/presentation-war/WEB-INF/web.xml
===================================================================
--- branches/presentation/presentation/src/resources/presentation-war/WEB-INF/web.xml 2007-12-12 17:54:17 UTC (rev 9338)
+++ branches/presentation/presentation/src/resources/presentation-war/WEB-INF/web.xml 2007-12-13 18:24:13 UTC (rev 9339)
@@ -27,16 +27,18 @@
"http://java.sun.com/dtd/web-app_2_3.dtd">
<web-app>
<!-- Add the GWT Client Filter to run the Portal in full Web 2.0 Ajax Mode. In turn, to run in Classic Html Mode, turn this filter off -->
- <!--
<filter>
<filter-name>GWTClientFilter</filter-name>
- <filter-class>org.jboss.portal.presentation.entry.GWTClientFilter</filter-class>
+ <filter-class>org.jboss.portal.presentation.impl.ajax.entry.GWTClientFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>GWTClientFilter</filter-name>
- <servlet-name>PortalEntryPoint</servlet-name>
+ <servlet-name>PortalServletWithPathMapping</servlet-name>
</filter-mapping>
- -->
+ <filter-mapping>
+ <filter-name>GWTClientFilter</filter-name>
+ <servlet-name>PortalServletWithDefaultServletMapping</servlet-name>
+ </filter-mapping>
<!-- The portal servlet is the main entrance point -->
<servlet>
@@ -107,17 +109,22 @@
<!-- Asynchronous service request processor -->
<servlet>
<servlet-name>AjaxPortalEntryPoint</servlet-name>
- <servlet-class>org.jboss.portal.presentation.impl.ajax.entry.PortalEntryPoint</servlet-class>
+ <servlet-class>org.jboss.portal.presentation.impl.ajax.entry.PortalEntryPoint</servlet-class>
<init-param>
- <param-name>asDefaultServlet</param-name>
- <param-value>false</param-value>
- <description>The servlet needs to know wether it is set as a default servlet or not</description>
+ <param-name>controllerFactoryName</param-name>
+ <param-value>portal:service=ControllerFactory,type=Ajax/Presentation</param-value>
+ <description>The request controller factory for the portal servlet</description>
</init-param>
<init-param>
- <param-name>entryPointServiceName</param-name>
- <param-value>portal:service=EntryPoint</param-value>
- <description>Entry Point Service</description>
+ <param-name>interceptorStackFactoryName</param-name>
+ <param-value>portal:service=InterceptorStackFactory,type=Server</param-value>
+ <description>The request controller factory for the portal servlet</description>
</init-param>
+ <init-param>
+ <param-name>portalServerName</param-name>
+ <param-value>portal:service=Server</param-value>
+ <description>The request controller factory for the portal servlet</description>
+ </init-param>
<load-on-startup>0</load-on-startup>
</servlet>
<servlet-mapping>
18 years, 4 months
JBoss Portal SVN: r9338 - branches/JBoss_Portal_Branch_2_6/core-cms/src/resources/portal-cms-war/WEB-INF/classes.
by portal-commits@lists.jboss.org
Author: lucboudreau
Date: 2007-12-12 12:54:17 -0500 (Wed, 12 Dec 2007)
New Revision: 9338
Modified:
branches/JBoss_Portal_Branch_2_6/core-cms/src/resources/portal-cms-war/WEB-INF/classes/Resource_fr.properties
Log:
Updated french bundle.
Modified: branches/JBoss_Portal_Branch_2_6/core-cms/src/resources/portal-cms-war/WEB-INF/classes/Resource_fr.properties
===================================================================
--- branches/JBoss_Portal_Branch_2_6/core-cms/src/resources/portal-cms-war/WEB-INF/classes/Resource_fr.properties 2007-12-11 23:16:09 UTC (rev 9337)
+++ branches/JBoss_Portal_Branch_2_6/core-cms/src/resources/portal-cms-war/WEB-INF/classes/Resource_fr.properties 2007-12-12 17:54:17 UTC (rev 9338)
@@ -98,6 +98,8 @@
CMS_PATH = Emplacement
+CMS_PREVIEW = Pr\u00E9visualiser
+
CMS_RESET = R\u00E9initialiser
CMS_SEARCH = Rechercher
18 years, 4 months