JBoss Portal SVN: r13588 - branches/JBoss_Portal_Branch_2_7/theme/src/resources/test/theme-test-war/WEB-INF/theme.
by portal-commits@lists.jboss.org
Author: sviluppatorefico
Date: 2009-07-22 19:03:30 -0400 (Wed, 22 Jul 2009)
New Revision: 13588
Modified:
branches/JBoss_Portal_Branch_2_7/theme/src/resources/test/theme-test-war/WEB-INF/theme/portal-layout.tld
Log:
JBPORTAL-2430 it lets drag and drop and partial refresh in a region
Modified: branches/JBoss_Portal_Branch_2_7/theme/src/resources/test/theme-test-war/WEB-INF/theme/portal-layout.tld
===================================================================
--- branches/JBoss_Portal_Branch_2_7/theme/src/resources/test/theme-test-war/WEB-INF/theme/portal-layout.tld 2009-07-22 20:25:22 UTC (rev 13587)
+++ branches/JBoss_Portal_Branch_2_7/theme/src/resources/test/theme-test-war/WEB-INF/theme/portal-layout.tld 2009-07-22 23:03:30 UTC (rev 13588)
@@ -43,6 +43,12 @@
<attribute>
<name>regionID</name>
</attribute>
+ <attribute>
+ <name>dndEnabled</name>
+ </attribute>
+ <attribute>
+ <name>partialRefreshEnabled</name>
+ </attribute>
</tag>
<tag>
<name>portlet</name>
14 years, 10 months
JBoss Portal SVN: r13587 - in modules/wsrp/trunk: build and 23 other directories.
by portal-commits@lists.jboss.org
Author: chris.laprun(a)jboss.com
Date: 2009-07-22 16:25:22 -0400 (Wed, 22 Jul 2009)
New Revision: 13587
Added:
modules/wsrp/trunk/producer/
modules/wsrp/trunk/producer/pom.xml
modules/wsrp/trunk/producer/src/
modules/wsrp/trunk/producer/src/assemble/
modules/wsrp/trunk/producer/src/assemble/wsrp-producer-war.xml
modules/wsrp/trunk/producer/src/main/
modules/wsrp/trunk/producer/src/main/java/
modules/wsrp/trunk/producer/src/main/java/org/
modules/wsrp/trunk/producer/src/main/java/org/jboss/
modules/wsrp/trunk/producer/src/main/java/org/jboss/portal/
modules/wsrp/trunk/producer/src/main/java/org/jboss/portal/wsrp/
modules/wsrp/trunk/producer/src/main/java/org/jboss/portal/wsrp/WSRPProducer.java
modules/wsrp/trunk/producer/src/main/java/org/jboss/portal/wsrp/producer/
modules/wsrp/trunk/producer/src/main/java/org/jboss/portal/wsrp/producer/AbsoluteURLReplacementGenerator.java
modules/wsrp/trunk/producer/src/main/java/org/jboss/portal/wsrp/producer/ActionRequestProcessor.java
modules/wsrp/trunk/producer/src/main/java/org/jboss/portal/wsrp/producer/MarkupHandler.java
modules/wsrp/trunk/producer/src/main/java/org/jboss/portal/wsrp/producer/MarkupRequest.java
modules/wsrp/trunk/producer/src/main/java/org/jboss/portal/wsrp/producer/PortletManagementHandler.java
modules/wsrp/trunk/producer/src/main/java/org/jboss/portal/wsrp/producer/RegistrationHandler.java
modules/wsrp/trunk/producer/src/main/java/org/jboss/portal/wsrp/producer/RenderRequestProcessor.java
modules/wsrp/trunk/producer/src/main/java/org/jboss/portal/wsrp/producer/RequestProcessor.java
modules/wsrp/trunk/producer/src/main/java/org/jboss/portal/wsrp/producer/ServiceDescriptionHandler.java
modules/wsrp/trunk/producer/src/main/java/org/jboss/portal/wsrp/producer/ServiceHandler.java
modules/wsrp/trunk/producer/src/main/java/org/jboss/portal/wsrp/producer/WSRPInstanceContext.java
modules/wsrp/trunk/producer/src/main/java/org/jboss/portal/wsrp/producer/WSRPPortletInvocationContext.java
modules/wsrp/trunk/producer/src/main/java/org/jboss/portal/wsrp/producer/WSRPProducerImpl.java
modules/wsrp/trunk/producer/src/main/java/org/jboss/portal/wsrp/producer/WSRPRequestContext.java
modules/wsrp/trunk/producer/src/main/java/org/jboss/portal/wsrp/producer/WSRPValidator.java
modules/wsrp/trunk/producer/src/main/java/org/jboss/portal/wsrp/producer/config/
modules/wsrp/trunk/producer/src/main/java/org/jboss/portal/wsrp/producer/config/ProducerConfiguration.java
modules/wsrp/trunk/producer/src/main/java/org/jboss/portal/wsrp/producer/config/ProducerConfigurationChangeListener.java
modules/wsrp/trunk/producer/src/main/java/org/jboss/portal/wsrp/producer/config/ProducerConfigurationFactory.java
modules/wsrp/trunk/producer/src/main/java/org/jboss/portal/wsrp/producer/config/ProducerConfigurationProvider.java
modules/wsrp/trunk/producer/src/main/java/org/jboss/portal/wsrp/producer/config/ProducerConfigurationService.java
modules/wsrp/trunk/producer/src/main/java/org/jboss/portal/wsrp/producer/config/ProducerRegistrationRequirements.java
modules/wsrp/trunk/producer/src/main/java/org/jboss/portal/wsrp/producer/config/impl/
modules/wsrp/trunk/producer/src/main/java/org/jboss/portal/wsrp/producer/config/impl/ProducerConfigurationImpl.java
modules/wsrp/trunk/producer/src/main/java/org/jboss/portal/wsrp/producer/config/impl/ProducerConfigurationServiceImpl.java
modules/wsrp/trunk/producer/src/main/java/org/jboss/portal/wsrp/producer/config/impl/ProducerRegistrationRequirementsImpl.java
modules/wsrp/trunk/producer/src/main/java/org/jboss/portal/wsrp/producer/interceptors/
modules/wsrp/trunk/producer/src/main/java/org/jboss/portal/wsrp/producer/interceptors/JBossPortletInterceptorStack.java
modules/wsrp/trunk/producer/src/main/java/org/jboss/portal/wsrp/producer/interceptors/JBossPortletInterceptorStackFactory.java
modules/wsrp/trunk/producer/src/main/java/org/jboss/portal/wsrp/producer/interceptors/PortletInterceptorStack.java
modules/wsrp/trunk/producer/src/main/java/org/jboss/portal/wsrp/producer/interceptors/PortletInterceptorStackFactory.java
modules/wsrp/trunk/producer/src/main/java/org/jboss/portal/wsrp/registration/
modules/wsrp/trunk/producer/src/main/java/org/jboss/portal/wsrp/registration/LocalizedString.java
modules/wsrp/trunk/producer/src/main/java/org/jboss/portal/wsrp/registration/RegistrationPropertyDescription.java
modules/wsrp/trunk/producer/src/main/java/org/jboss/portal/wsrp/state/
modules/wsrp/trunk/producer/src/main/java/org/jboss/portal/wsrp/state/LocalPortletInvoker.java
modules/wsrp/trunk/producer/src/main/java/org/jboss/portal/wsrp/state/PersistentConsumer.java
modules/wsrp/trunk/producer/src/main/java/org/jboss/portal/wsrp/state/PersistentConsumerCapabilities.java
modules/wsrp/trunk/producer/src/main/java/org/jboss/portal/wsrp/state/PersistentConsumerGroup.java
modules/wsrp/trunk/producer/src/main/java/org/jboss/portal/wsrp/state/PersistentPortletState.java
modules/wsrp/trunk/producer/src/main/java/org/jboss/portal/wsrp/state/PersistentPortletStateEntry.java
modules/wsrp/trunk/producer/src/main/java/org/jboss/portal/wsrp/state/PersistentPortletStatePersistenceManager.java
modules/wsrp/trunk/producer/src/main/java/org/jboss/portal/wsrp/state/PersistentRegistration.java
modules/wsrp/trunk/producer/src/main/java/org/jboss/portal/wsrp/state/ProducerPortletInvoker.java
modules/wsrp/trunk/producer/src/main/java/org/jboss/portal/wsrp/state/RegistrationStatusUserType.java
modules/wsrp/trunk/producer/src/main/java/org/jboss/portal/wsrp/state/StateManagementPolicyImpl.java
modules/wsrp/trunk/producer/src/main/java/org/jboss/portal/wsrp/state/TypedStringArray.java
modules/wsrp/trunk/producer/src/main/java/org/jboss/portal/wsrp/state/ValueManager.java
modules/wsrp/trunk/producer/src/main/webapp/
modules/wsrp/trunk/producer/src/main/webapp/WEB-INF/
modules/wsrp/trunk/producer/src/main/webapp/WEB-INF/jaxrpc-mappings.xml
modules/wsrp/trunk/producer/src/main/webapp/WEB-INF/web.xml
modules/wsrp/trunk/producer/src/main/webapp/WEB-INF/webservices.xml
modules/wsrp/trunk/producer/src/main/webapp/WEB-INF/wsdl/
modules/wsrp/trunk/producer/src/main/webapp/WEB-INF/wsdl/wsrp_services.wsdl
modules/wsrp/trunk/producer/src/main/webapp/WEB-INF/wsdl/wsrp_v1_bindings.wsdl
modules/wsrp/trunk/producer/src/main/webapp/WEB-INF/wsdl/wsrp_v1_interfaces.wsdl
modules/wsrp/trunk/producer/src/main/webapp/WEB-INF/wsdl/wsrp_v1_types.xsd
Modified:
modules/wsrp/trunk/build/pom.xml
modules/wsrp/trunk/core/pom.xml
modules/wsrp/trunk/pom.xml
modules/wsrp/trunk/service/pom.xml
modules/wsrp/trunk/service/src/main/resources/META-INF/jboss-service.xml
modules/wsrp/trunk/test-support/pom.xml
modules/wsrp/trunk/wsrp1-rpc/pom.xml
Log:
- JBPORTAL-2186: Focused on getting producer working, all the pieces are in place, service deploys. Needs to be tested with a consumer.
+ Extracted producer code into a different sub=module.
+ Extracted state management code from Portal into state package in producer module.
+ Re-worked service definition so that the service now deploys without problems.
+ Use scope to prevent bundling too many jars.
Modified: modules/wsrp/trunk/build/pom.xml
===================================================================
--- modules/wsrp/trunk/build/pom.xml 2009-07-22 13:28:29 UTC (rev 13586)
+++ modules/wsrp/trunk/build/pom.xml 2009-07-22 20:25:22 UTC (rev 13587)
@@ -50,9 +50,11 @@
<properties>
<version.portlet>trunk-SNAPSHOT</version.portlet>
<version.common>trunk-SNAPSHOT</version.common>
+ <version.web>1.2.0-SNAPSHOT</version.web>
<version.jaxrpc>1.1</version.jaxrpc>
<version.slf4j>1.5.6</version.slf4j>
<version.jbossas>4.2.3.GA</version.jbossas>
+ <version.jbossxb>2.0.0.GA</version.jbossxb>
</properties>
Modified: modules/wsrp/trunk/core/pom.xml
===================================================================
--- modules/wsrp/trunk/core/pom.xml 2009-07-22 13:28:29 UTC (rev 13586)
+++ modules/wsrp/trunk/core/pom.xml 2009-07-22 20:25:22 UTC (rev 13587)
@@ -49,11 +49,13 @@
<groupId>org.jboss.portal.common</groupId>
<artifactId>common-common</artifactId>
<version>${version.common}</version>
+ <scope>provided</scope>
</dependency>
<dependency>
<groupId>org.jboss.portal.common</groupId>
<artifactId>common-portal</artifactId>
<version>${version.common}</version>
+ <scope>provided</scope>
</dependency>
<dependency>
<groupId>org.jboss.portal.registration</groupId>
@@ -64,11 +66,13 @@
<groupId>org.jboss.portal.portlet</groupId>
<artifactId>portlet-portlet</artifactId>
<version>${version.portlet}</version>
+ <scope>provided</scope>
</dependency>
<dependency>
<groupId>org.jboss.portal.portlet</groupId>
<artifactId>portlet-federation</artifactId>
<version>${version.portlet}</version>
+ <scope>provided</scope>
</dependency>
<dependency>
<groupId>org.jboss.portal.jems</groupId>
@@ -81,22 +85,26 @@
<groupId>jboss</groupId>
<artifactId>jboss-common</artifactId>
<version>${version.jbossas}</version>
+ <scope>provided</scope>
</dependency>
<dependency>
<groupId>org.jboss</groupId>
<artifactId>jbossxb</artifactId>
- <version>2.0.1.GA</version>
+ <version>${version.jbossxb}</version>
+ <scope>provided</scope>
</dependency>
<dependency>
<groupId>jboss</groupId>
<artifactId>jboss-system</artifactId>
<version>${version.jbossas}</version>
+ <scope>provided</scope>
</dependency>
<!-- For JBoss AOP -->
<dependency>
<groupId>jboss</groupId>
<artifactId>jboss-jmx</artifactId>
<version>${version.jbossas}</version>
+ <scope>provided</scope>
</dependency>
<!-- Services & Hibernate dependencies -->
<dependency>
@@ -111,6 +119,7 @@
<groupId>javax.xml</groupId>
<artifactId>jaxrpc-api</artifactId>
<version>${version.jaxrpc}</version>
+ <scope>provided</scope>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
@@ -126,11 +135,13 @@
<groupId>javax.mail</groupId>
<artifactId>mail</artifactId>
<version>1.4.1</version>
+ <scope>provided</scope>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-core</artifactId>
<version>3.3.1.GA</version>
+ <scope>provided</scope>
</dependency>
<dependency>
<groupId>wsdl4j</groupId>
@@ -141,7 +152,6 @@
<build>
<finalName>portal-wsrp</finalName>
- <sourceDirectory>src/main</sourceDirectory>
<resources>
<resource>
@@ -173,7 +183,7 @@
<configuration>
<descriptors>
<descriptor>src/assemble/portal-wsrp-client-jar.xml</descriptor>
- <descriptor>src/assemble/portal-wsrp-war.xml</descriptor>
+ <!--<descriptor>src/assemble/portal-wsrp-war.xml</descriptor>-->
<!--<descriptor>src/assemble/portal-wsrp-tests-jar.xml</descriptor>-->
</descriptors>
</configuration>
Modified: modules/wsrp/trunk/pom.xml
===================================================================
--- modules/wsrp/trunk/pom.xml 2009-07-22 13:28:29 UTC (rev 13586)
+++ modules/wsrp/trunk/pom.xml 2009-07-22 20:25:22 UTC (rev 13587)
@@ -52,6 +52,7 @@
<module>api</module>
<module>wsrp1-rpc</module>
<module>core</module>
+ <module>producer</module>
<module>test-support</module>
<module>admin-gui</module>
<module>service</module>
Added: modules/wsrp/trunk/producer/pom.xml
===================================================================
--- modules/wsrp/trunk/producer/pom.xml (rev 0)
+++ modules/wsrp/trunk/producer/pom.xml 2009-07-22 20:25:22 UTC (rev 13587)
@@ -0,0 +1,192 @@
+<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ ~ JBoss, a division of Red Hat ~
+ ~ Copyright 2009, Red Hat Middleware, LLC, and individual
+ ~ contributors as indicated by the @authors tag. See the
+ ~ copyright.txt in the distribution for a full listing of
+ ~ individual contributors.
+ ~
+ ~ This is free software; you can redistribute it and/or modify it
+ ~ under the terms of the GNU Lesser General Public License as
+ ~ published by the Free Software Foundation; either version 2.1 of
+ ~ the License, or (at your option) any later version.
+ ~
+ ~ This software is distributed in the hope that it will be useful,
+ ~ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ ~ Lesser General Public License for more details.
+ ~
+ ~ You should have received a copy of the GNU Lesser General Public
+ ~ License along with this software; if not, write to the Free
+ ~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ ~ 02110-1301 USA, or see the FSF site: http://www.fsf.org. ~
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <parent>
+ <groupId>org.jboss.portal.wsrp</groupId>
+ <artifactId>module-parent</artifactId>
+ <version>1.0.0-SNAPSHOT</version>
+ <relativePath>../build/pom.xml</relativePath>
+ </parent>
+ <modelVersion>4.0.0</modelVersion>
+ <artifactId>producer</artifactId>
+ <packaging>jar</packaging>
+ <name>JBoss Portal WSRP Producer</name>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.jboss.portal.wsrp</groupId>
+ <artifactId>wsrp1-rpc</artifactId>
+ <version>${project.version}</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.portal.wsrp</groupId>
+ <artifactId>wsrp-core</artifactId>
+ <version>${project.version}</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.portal.common</groupId>
+ <artifactId>common-common</artifactId>
+ <version>${version.common}</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.portal.common</groupId>
+ <artifactId>common-portal</artifactId>
+ <version>${version.common}</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.portal.registration</groupId>
+ <artifactId>registration-api</artifactId>
+ <version>1.0.0-SNAPSHOT</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.portal.portlet</groupId>
+ <artifactId>portlet-portlet</artifactId>
+ <version>${version.portlet}</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.portal.portlet</groupId>
+ <artifactId>portlet-federation</artifactId>
+ <version>${version.portlet}</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.portal.jems</groupId>
+ <artifactId>jems</artifactId>
+ <version>1.0.0-SNAPSHOT</version>
+ <scope>provided</scope>
+ </dependency>
+
+ <!-- JBoss dependencies -->
+ <!--<dependency>
+ <groupId>jboss</groupId>
+ <artifactId>jboss-common</artifactId>
+ <version>${version.jbossas}</version>
+ </dependency>-->
+ <!--<dependency>
+ <groupId>jboss</groupId>
+ <artifactId>jboss-system</artifactId>
+ <version>${version.jbossas}</version>
+ </dependency>-->
+ <!-- For JBoss AOP -->
+ <!--<dependency>
+ <groupId>jboss</groupId>
+ <artifactId>jboss-jmx</artifactId>
+ <version>${version.jbossas}</version>
+ </dependency>-->
+ <!-- Services & Hibernate dependencies -->
+ <!--<dependency>
+ <groupId>org.jboss.portal.jems</groupId>
+ <artifactId>jems</artifactId>
+ <version>1.0.0-SNAPSHOT</version>
+ </dependency>-->
+
+
+ <!-- other dependencies -->
+ <dependency>
+ <groupId>javax.xml</groupId>
+ <artifactId>jaxrpc-api</artifactId>
+ <version>${version.jaxrpc}</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-api</artifactId>
+ <version>${version.slf4j}</version>
+ </dependency>
+ <dependency>
+ <groupId>commons-fileupload</groupId>
+ <artifactId>commons-fileupload</artifactId>
+ <version>1.2.1</version>
+ </dependency>
+ <dependency>
+ <groupId>javax.mail</groupId>
+ <artifactId>mail</artifactId>
+ <version>1.4.1</version>
+ <scope>provided</scope>
+ </dependency>
+
+ <!-- JBoss XB 2.0.0+ is required for portlet-mc -->
+ <dependency>
+ <groupId>org.jboss</groupId>
+ <artifactId>jbossxb</artifactId>
+ <version>${version.jbossxb}</version>
+ </dependency>
+
+ <!-- Hibernate for persisting portlet and registration states -->
+ <dependency>
+ <groupId>org.hibernate</groupId>
+ <artifactId>hibernate-core</artifactId>
+ <version>3.3.2.GA</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.hibernate</groupId>
+ <artifactId>hibernate-ehcache</artifactId>
+ <version>3.3.2.GA</version>
+ <scope>provided</scope>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <finalName>wsrp-producer</finalName>
+
+ <plugins>
+ <plugin>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <configuration>
+ <source>1.5</source>
+ <target>1.5</target>
+ </configuration>
+ </plugin>
+
+ <plugin>
+ <artifactId>maven-assembly-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>make-assembly</id>
+ <goals>
+ <goal>single</goal>
+ </goals>
+ <phase>package</phase>
+ <configuration>
+ <descriptors>
+ <!--<descriptor>src/assemble/portal-wsrp-client-jar.xml</descriptor>-->
+ <descriptor>src/assemble/wsrp-producer-war.xml</descriptor>
+ <!--<descriptor>src/assemble/portal-wsr p-tests-jar.xml</descriptor>-->
+ </descriptors>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+
+</project>
\ No newline at end of file
Added: modules/wsrp/trunk/producer/src/assemble/wsrp-producer-war.xml
===================================================================
--- modules/wsrp/trunk/producer/src/assemble/wsrp-producer-war.xml (rev 0)
+++ modules/wsrp/trunk/producer/src/assemble/wsrp-producer-war.xml 2009-07-22 20:25:22 UTC (rev 13587)
@@ -0,0 +1,39 @@
+<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ ~ JBoss, a division of Red Hat ~
+ ~ Copyright 2009, Red Hat Middleware, LLC, and individual
+ ~ contributors as indicated by the @authors tag. See the
+ ~ copyright.txt in the distribution for a full listing of
+ ~ individual contributors.
+ ~
+ ~ This is free software; you can redistribute it and/or modify it
+ ~ under the terms of the GNU Lesser General Public License as
+ ~ published by the Free Software Foundation; either version 2.1 of
+ ~ the License, or (at your option) any later version.
+ ~
+ ~ This software is distributed in the hope that it will be useful,
+ ~ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ ~ Lesser General Public License for more details.
+ ~
+ ~ You should have received a copy of the GNU Lesser General Public
+ ~ License along with this software; if not, write to the Free
+ ~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ ~ 02110-1301 USA, or see the FSF site: http://www.fsf.org. ~
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
+<assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.1"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.1 http://maven.apache.org/xsd/assembly-1.1.1.xsd">
+ <id>server</id>
+ <formats>
+ <format>war</format>
+ </formats>
+ <includeBaseDirectory>false</includeBaseDirectory>
+
+ <fileSets>
+ <fileSet>
+ <directory>src/main/webapp</directory>
+ <outputDirectory>/</outputDirectory>
+ </fileSet>
+ </fileSets>
+</assembly>
+
Added: modules/wsrp/trunk/producer/src/main/java/org/jboss/portal/wsrp/WSRPProducer.java
===================================================================
--- modules/wsrp/trunk/producer/src/main/java/org/jboss/portal/wsrp/WSRPProducer.java (rev 0)
+++ modules/wsrp/trunk/producer/src/main/java/org/jboss/portal/wsrp/WSRPProducer.java 2009-07-22 20:25:22 UTC (rev 13587)
@@ -0,0 +1,112 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2009, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+
+package org.jboss.portal.wsrp;
+
+import org.jboss.portal.registration.RegistrationManager;
+import org.jboss.portal.wsrp.core.CookieProtocol;
+import org.jboss.portal.wsrp.core.WSRP_v1_Markup_PortType;
+import org.jboss.portal.wsrp.core.WSRP_v1_PortletManagement_PortType;
+import org.jboss.portal.wsrp.core.WSRP_v1_Registration_PortType;
+import org.jboss.portal.wsrp.core.WSRP_v1_ServiceDescription_PortType;
+import org.jboss.portal.wsrp.producer.config.ProducerConfiguration;
+import org.jboss.portal.wsrp.producer.config.ProducerConfigurationChangeListener;
+import org.jboss.portal.wsrp.producer.config.ProducerRegistrationRequirements;
+
+/**
+ * @author <a href="mailto:chris.laprun@jboss.com">Chris Laprun</a>
+ * @version $Revision: 12020 $
+ * @since 2.4
+ */
+public interface WSRPProducer
+ extends WSRP_v1_ServiceDescription_PortType, WSRP_v1_Markup_PortType, WSRP_v1_Registration_PortType,
+ WSRP_v1_PortletManagement_PortType, ProducerConfigurationChangeListener
+{
+ /** The default session expiration time in mili seconds. */
+ int DEFAULT_SESSION_EXPIRATION_TIME = 300000;
+
+ /** The value used to specify that a session will never expire. */
+ int INFINITE_SESSION_EXPIRATION_TIME = -1;
+
+ /**
+ * Indicates whether or not the Producer requires the Consumer to assist with cookie support of the HTTP protocol.
+ * Supported values and semantics: <ul> <li>{@link org.jboss.portal.wsrp.core.CookieProtocol#none}: The Producer does
+ * not need the Consumer to ever invoke {@link org.jboss.portal.wsrp.core.WSRP_v1_Markup_PortType#initCookie(org.jboss.portal.wsrp.core.InitCookie)}.</li>
+ * <li>{@link org.jboss.portal.wsrp.core.CookieProtocol#perUser}: The Consumer MUST invoke {@link
+ * org.jboss.portal.wsrp.core.WSRP_v1_Markup_PortType#initCookie(org.jboss.portal.wsrp.core.InitCookie)} once per
+ * user of the Consumer, and associate any returned cookies with subsequent invocations on behalf of that user.</li>
+ * <li>{@link org.jboss.portal.wsrp.core.CookieProtocol#perGroup}: The Consumer MUST invoke {@link
+ * org.jboss.portal.wsrp.core.WSRP_v1_Markup_PortType#initCookie(org.jboss.portal.wsrp.core.InitCookie)} once per
+ * unique groupID from the PortletDescriptions for the Portlets it is aggregating on a page for each user of the
+ * Consumer, and associate any returned cookies with subsequent invocations on behalf of that user targeting Portlets
+ * with identical groupIDs.</li> </ul>
+ *
+ * @return the level of cookie support required from the Consumer
+ */
+ CookieProtocol getRequiresInitCookie();
+
+ /**
+ * Sets the level of cookie support required by the Consumer.
+ *
+ * @param requiresInitCookie either {@link org.jboss.portal.wsrp.core.CookieProtocol#none}, {@link
+ * org.jboss.portal.wsrp.core.CookieProtocol#perUser} or {@link
+ * org.jboss.portal.wsrp.core.CookieProtocol#perGroup}
+ */
+ void setRequiresInitCookie(CookieProtocol requiresInitCookie);
+
+ /**
+ * Maximum number of seconds between invocations referencing a session ID before this Producer will schedule
+ * releasing the related resources. {@link #INFINITE_SESSION_EXPIRATION_TIME} indicates that the sessionID will never
+ * expire.
+ *
+ * @return the expiration time (in seconds) of session associated resources
+ */
+ int getSessionExpirationTime();
+
+ /**
+ * Sets the expiration time (in seconds) of session associated resources.
+ *
+ * @param sessionExpirationTime the maximum number of seconds between invocations referencing a session ID before
+ * this Producer will schedule releasing the related resources. If {@link
+ * #INFINITE_SESSION_EXPIRATION_TIME} is passed, then the session will never expire.
+ */
+ void setSessionExpirationTime(int sessionExpirationTime);
+
+ /**
+ * @return
+ * @since 2.6
+ */
+ ProducerRegistrationRequirements getProducerRegistrationRequirements();
+
+ /**
+ * @return
+ * @since 2.6
+ */
+ RegistrationManager getRegistrationManager();
+
+ /**
+ * @return
+ * @since 2.6
+ */
+ ProducerConfiguration getProducerConfiguration();
+}
Property changes on: modules/wsrp/trunk/producer/src/main/java/org/jboss/portal/wsrp/WSRPProducer.java
___________________________________________________________________
Name: svn:executable
+ *
Added: modules/wsrp/trunk/producer/src/main/java/org/jboss/portal/wsrp/producer/AbsoluteURLReplacementGenerator.java
===================================================================
--- modules/wsrp/trunk/producer/src/main/java/org/jboss/portal/wsrp/producer/AbsoluteURLReplacementGenerator.java (rev 0)
+++ modules/wsrp/trunk/producer/src/main/java/org/jboss/portal/wsrp/producer/AbsoluteURLReplacementGenerator.java 2009-07-22 20:25:22 UTC (rev 13587)
@@ -0,0 +1,84 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2009, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+
+package org.jboss.portal.wsrp.producer;
+
+import org.jboss.portal.common.net.URLTools;
+import org.jboss.portal.wsrp.WSRPRewritingConstants;
+
+import javax.servlet.http.HttpServletRequest;
+
+/**
+ * @author <a href="mailto:chris.laprun@jboss.com">Chris Laprun</a>
+ * @version $Revision$
+ */
+public class AbsoluteURLReplacementGenerator extends URLTools.URLReplacementGenerator
+{
+ private String serverAddress;
+ public static final String SCH_END = "://";
+ public static final String PORT_END = ":";
+ public static final String SLASH = "/";
+
+ public AbsoluteURLReplacementGenerator(HttpServletRequest request)
+ {
+ String scheme = request.getScheme();
+ String host = request.getServerName();
+ int port = request.getServerPort();
+
+ serverAddress = scheme + SCH_END + host + PORT_END + port;
+ }
+
+ public String getReplacementFor(int i, URLTools.URLMatch urlMatch)
+ {
+ return getAbsoluteURLFor(urlMatch.getURLAsString());
+ }
+
+ /**
+ * todo: public only for tests
+ *
+ * @param url
+ * @return
+ */
+ public String getAbsoluteURLFor(String url)
+ {
+ return getAbsoluteURLFor(url, true);
+ }
+
+ String getAbsoluteURLFor(String url, boolean checkWSRPToken)
+ {
+ // We don't encode URL through this API when it is a wsrp URL
+ if (checkWSRPToken && url.startsWith(WSRPRewritingConstants.BEGIN_WSRP_REWRITE))
+ {
+ return url;
+ }
+
+ if (!URLTools.isNetworkURL(url) && url.startsWith(SLASH))
+ {
+ return serverAddress + url;
+ }
+ else
+ {
+ return url;
+ }
+ }
+}
Added: modules/wsrp/trunk/producer/src/main/java/org/jboss/portal/wsrp/producer/ActionRequestProcessor.java
===================================================================
--- modules/wsrp/trunk/producer/src/main/java/org/jboss/portal/wsrp/producer/ActionRequestProcessor.java (rev 0)
+++ modules/wsrp/trunk/producer/src/main/java/org/jboss/portal/wsrp/producer/ActionRequestProcessor.java 2009-07-22 20:25:22 UTC (rev 13587)
@@ -0,0 +1,160 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2009, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+
+package org.jboss.portal.wsrp.producer;
+
+import org.jboss.portal.portlet.StateString;
+import org.jboss.portal.portlet.invocation.ActionInvocation;
+import org.jboss.portal.portlet.invocation.PortletInvocation;
+import org.jboss.portal.portlet.invocation.response.HTTPRedirectionResponse;
+import org.jboss.portal.portlet.invocation.response.PortletInvocationResponse;
+import org.jboss.portal.portlet.invocation.response.UpdateNavigationalStateResponse;
+import org.jboss.portal.portlet.state.AccessMode;
+import org.jboss.portal.wsrp.WSRPExceptionFactory;
+import org.jboss.portal.wsrp.WSRPTypeFactory;
+import org.jboss.portal.wsrp.WSRPUtils;
+import org.jboss.portal.wsrp.core.InteractionParams;
+import org.jboss.portal.wsrp.core.InvalidHandleFault;
+import org.jboss.portal.wsrp.core.InvalidRegistrationFault;
+import org.jboss.portal.wsrp.core.MarkupParams;
+import org.jboss.portal.wsrp.core.MissingParametersFault;
+import org.jboss.portal.wsrp.core.OperationFailedFault;
+import org.jboss.portal.wsrp.core.PerformBlockingInteraction;
+import org.jboss.portal.wsrp.core.PortletContext;
+import org.jboss.portal.wsrp.core.RegistrationContext;
+import org.jboss.portal.wsrp.core.RuntimeContext;
+import org.jboss.portal.wsrp.core.StateChange;
+import org.jboss.portal.wsrp.core.UnsupportedMimeTypeFault;
+import org.jboss.portal.wsrp.core.UnsupportedModeFault;
+import org.jboss.portal.wsrp.core.UnsupportedWindowStateFault;
+import org.jboss.portal.wsrp.core.UpdateResponse;
+
+/**
+ * @author <a href="mailto:chris.laprun@jboss.com">Chris Laprun</a>
+ * @version $Revision: 13121 $
+ * @since 2.6
+ */
+class ActionRequestProcessor extends RequestProcessor
+{
+ private final PerformBlockingInteraction performBlockingInteraction;
+ private final InteractionParams interactionParams;
+
+ public ActionRequestProcessor(WSRPProducerImpl producer, PerformBlockingInteraction performBlockingInteraction, InteractionParams interactionParams)
+ throws UnsupportedMimeTypeFault, UnsupportedWindowStateFault, InvalidHandleFault, UnsupportedModeFault,
+ MissingParametersFault, InvalidRegistrationFault, OperationFailedFault
+ {
+ super(producer);
+ this.performBlockingInteraction = performBlockingInteraction;
+ this.interactionParams = interactionParams;
+ prepareInvocation();
+ }
+
+ RegistrationContext getRegistrationContext()
+ {
+ return performBlockingInteraction.getRegistrationContext();
+ }
+
+ RuntimeContext getRuntimeContext()
+ {
+ return performBlockingInteraction.getRuntimeContext();
+ }
+
+ MarkupParams getMarkupParams()
+ {
+ return performBlockingInteraction.getMarkupParams();
+ }
+
+ PortletContext getPortletContext()
+ {
+ return performBlockingInteraction.getPortletContext();
+ }
+
+ org.jboss.portal.wsrp.core.UserContext getUserContext()
+ {
+ return performBlockingInteraction.getUserContext();
+ }
+
+ String getContextName()
+ {
+ return MarkupHandler.PBI;
+ }
+
+ AccessMode getAccessMode()
+ {
+ StateChange stateChange = interactionParams.getPortletStateChange();
+ WSRPExceptionFactory.throwMissingParametersFaultIfValueIsMissing(stateChange, "portletStateChange", "InteractionParams");
+ return WSRPUtils.getAccessModeFromStateChange(stateChange);
+ }
+
+ PortletInvocation initInvocation(WSRPPortletInvocationContext context)
+ {
+ ActionInvocation invocation = new ActionInvocation(context);
+
+ // Request context
+ WSRPRequestContext requestContext = WSRPRequestContext.createRequestContext(markupRequest, interactionParams);
+ invocation.setRequestContext(requestContext);
+
+ // Interaction state, navigational state is already taken care of in RequestProcessor.prepareInvocation
+ StateString interactionState = createNavigationalState(interactionParams.getInteractionState());
+ invocation.setInteractionState(interactionState);
+
+ // Form parameters
+ invocation.setForm(requestContext.getForm());
+
+ return invocation;
+ }
+
+ Object processResponse(PortletInvocationResponse response)
+ {
+ if (response instanceof UpdateNavigationalStateResponse)
+ {
+ UpdateNavigationalStateResponse renderResult = (UpdateNavigationalStateResponse)response;
+ UpdateResponse updateResponse = WSRPTypeFactory.createUpdateResponse();
+ updateResponse.setNewMode(WSRPUtils.convertJSR168PortletModeNameToWSRPName(getNewStateOrNull(renderResult, true)));
+ updateResponse.setNewWindowState(WSRPUtils.convertJSR168WindowStateNameToWSRPName(getNewStateOrNull(renderResult, false)));
+ StateString ns = renderResult.getNavigationalState();
+ updateResponse.setNavigationalState(ns != null ? ns.getStringValue() : null);
+
+ // deal with implicit cloning and state modification
+ if (instanceContext.wasModified())
+ {
+ PortletContext updatedPortletContext = WSRPUtils.convertToWSRPPortletContext(instanceContext.getPortletContext());
+ updateResponse.setPortletContext(updatedPortletContext);
+ }
+
+ return WSRPTypeFactory.createBlockingInteractionResponse(updateResponse);
+ }
+ else
+ {
+ // result should be HTTPRedirectionResult
+ HTTPRedirectionResponse redirectionResult = (HTTPRedirectionResponse)response;
+ return WSRPTypeFactory.createBlockingInteractionResponse(redirectionResult.getLocation());
+ }
+ }
+
+ private String getNewStateOrNull(UpdateNavigationalStateResponse renderResult, boolean forMode)
+ {
+ Object state = forMode ? renderResult.getMode() : renderResult.getWindowState();
+ return state != null ? state.toString() : null;
+ }
+}
Added: modules/wsrp/trunk/producer/src/main/java/org/jboss/portal/wsrp/producer/MarkupHandler.java
===================================================================
--- modules/wsrp/trunk/producer/src/main/java/org/jboss/portal/wsrp/producer/MarkupHandler.java (rev 0)
+++ modules/wsrp/trunk/producer/src/main/java/org/jboss/portal/wsrp/producer/MarkupHandler.java 2009-07-22 20:25:22 UTC (rev 13587)
@@ -0,0 +1,204 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2009, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+
+package org.jboss.portal.wsrp.producer;
+
+import org.jboss.portal.portlet.PortletInvokerException;
+import org.jboss.portal.portlet.invocation.response.ErrorResponse;
+import org.jboss.portal.portlet.invocation.response.FragmentResponse;
+import org.jboss.portal.portlet.invocation.response.HTTPRedirectionResponse;
+import org.jboss.portal.portlet.invocation.response.PortletInvocationResponse;
+import org.jboss.portal.portlet.invocation.response.UpdateNavigationalStateResponse;
+import org.jboss.portal.portlet.state.producer.PortletStateChangeRequiredException;
+import org.jboss.portal.wsrp.WSRPExceptionFactory;
+import org.jboss.portal.wsrp.core.AccessDeniedFault;
+import org.jboss.portal.wsrp.core.BlockingInteractionResponse;
+import org.jboss.portal.wsrp.core.GetMarkup;
+import org.jboss.portal.wsrp.core.InconsistentParametersFault;
+import org.jboss.portal.wsrp.core.InitCookie;
+import org.jboss.portal.wsrp.core.InteractionParams;
+import org.jboss.portal.wsrp.core.InvalidCookieFault;
+import org.jboss.portal.wsrp.core.InvalidHandleFault;
+import org.jboss.portal.wsrp.core.InvalidRegistrationFault;
+import org.jboss.portal.wsrp.core.InvalidSessionFault;
+import org.jboss.portal.wsrp.core.InvalidUserCategoryFault;
+import org.jboss.portal.wsrp.core.MarkupResponse;
+import org.jboss.portal.wsrp.core.MissingParametersFault;
+import org.jboss.portal.wsrp.core.OperationFailedFault;
+import org.jboss.portal.wsrp.core.PerformBlockingInteraction;
+import org.jboss.portal.wsrp.core.PortletStateChangeRequiredFault;
+import org.jboss.portal.wsrp.core.ReleaseSessions;
+import org.jboss.portal.wsrp.core.ReturnAny;
+import org.jboss.portal.wsrp.core.UnsupportedLocaleFault;
+import org.jboss.portal.wsrp.core.UnsupportedMimeTypeFault;
+import org.jboss.portal.wsrp.core.UnsupportedModeFault;
+import org.jboss.portal.wsrp.core.UnsupportedWindowStateFault;
+import org.jboss.portal.wsrp.core.WSRP_v1_Markup_PortType;
+import org.jboss.portal.wsrp.servlet.ServletAccess;
+
+import javax.portlet.PortletModeException;
+import javax.portlet.WindowStateException;
+import java.rmi.RemoteException;
+
+/**
+ * @author <a href="mailto:chris.laprun@jboss.com">Chris Laprun</a>
+ * @version $Revision: 10090 $
+ * @since 2.4
+ */
+class MarkupHandler extends ServiceHandler implements WSRP_v1_Markup_PortType
+{
+ static final String PBI = "PerformBlockingInteraction";
+ static final String GET_MARKUP = "GetMarkup";
+
+ MarkupHandler(WSRPProducerImpl producer)
+ {
+ super(producer);
+ }
+
+ // Markup implementation ********************************************************************************************
+
+ public MarkupResponse getMarkup(GetMarkup getMarkup)
+ throws UnsupportedWindowStateFault, InvalidCookieFault, InvalidSessionFault, AccessDeniedFault,
+ InconsistentParametersFault, InvalidHandleFault, UnsupportedLocaleFault, UnsupportedModeFault,
+ OperationFailedFault, MissingParametersFault, InvalidUserCategoryFault, InvalidRegistrationFault,
+ UnsupportedMimeTypeFault, RemoteException
+ {
+ WSRPExceptionFactory.throwOperationFailedFaultIfValueIsMissing(getMarkup, GET_MARKUP);
+
+ RequestProcessor requestProcessor = new RenderRequestProcessor(producer, getMarkup);
+
+ String handle = requestProcessor.getPortletContext().getPortletHandle();
+ PortletInvocationResponse response;
+ try
+ {
+ log.debug("RenderInvocation on portlet '" + handle + "'");
+ response = producer.getInvoker().invoke(requestProcessor.getInvocation());
+ log.debug("RenderInvocation done");
+ }
+ catch (PortletInvokerException e)
+ {
+ throw WSRPExceptionFactory.throwSOAPFaultException(WSRPExceptionFactory.OPERATION_FAILED,
+ "Could not render portlet '" + handle + "'", e);
+ }
+
+ checkForError(response);
+
+ return (MarkupResponse)requestProcessor.processResponse(response);
+ }
+
+ public BlockingInteractionResponse performBlockingInteraction(PerformBlockingInteraction performBlockingInteraction)
+ throws InvalidSessionFault, UnsupportedModeFault, UnsupportedMimeTypeFault, OperationFailedFault,
+ UnsupportedWindowStateFault, UnsupportedLocaleFault, AccessDeniedFault, PortletStateChangeRequiredFault,
+ InvalidRegistrationFault, MissingParametersFault, InvalidUserCategoryFault, InconsistentParametersFault,
+ InvalidHandleFault, InvalidCookieFault, RemoteException
+ {
+ WSRPExceptionFactory.throwOperationFailedFaultIfValueIsMissing(performBlockingInteraction, PBI);
+ final InteractionParams interactionParams = performBlockingInteraction.getInteractionParams();
+ WSRPExceptionFactory.throwMissingParametersFaultIfValueIsMissing(interactionParams, "InteractionParams", PBI);
+
+ RequestProcessor requestProcessor = new ActionRequestProcessor(producer, performBlockingInteraction, interactionParams);
+
+ PortletInvocationResponse response;
+ String handle = requestProcessor.getPortletContext().getPortletHandle();
+ try
+ {
+ log.debug("ActionInvocation on portlet '" + handle + "'");
+ response = producer.getInvoker().invoke(requestProcessor.getInvocation());
+ log.debug("ActionInvocation done");
+ }
+ catch (PortletStateChangeRequiredException e)
+ {
+ throw WSRPExceptionFactory.throwSOAPFaultException(WSRPExceptionFactory.PORTLET_STATE_CHANGE_REQUIRED,
+ e.getLocalizedMessage(), e);
+ }
+ catch (PortletInvokerException e)
+ {
+ throw WSRPExceptionFactory.throwSOAPFaultException(WSRPExceptionFactory.OPERATION_FAILED,
+ "Could not perform action on portlet '" + handle + "'", e);
+ }
+
+ checkForError(response);
+
+ return (BlockingInteractionResponse)requestProcessor.processResponse(response);
+ }
+
+ public ReturnAny releaseSessions(ReleaseSessions releaseSessions)
+ throws InvalidRegistrationFault, OperationFailedFault, MissingParametersFault, AccessDeniedFault, RemoteException
+ {
+ // our producer never sends session ids so a Consumer trying to release sessions is an error condition
+ throwOperationFaultOnSessionOperation();
+ return null;
+ }
+
+ public ReturnAny initCookie(InitCookie initCookie)
+ throws AccessDeniedFault, OperationFailedFault, InvalidRegistrationFault, RemoteException
+ {
+ WSRPExceptionFactory.throwOperationFailedFaultIfValueIsMissing(initCookie, "InitCookie");
+ producer.getRegistrationOrFailIfInvalid(initCookie.getRegistrationContext());
+
+ // Force HTTP session creation... this is required for BEA Weblogic version < 9.2.
+ // See http://jira.jboss.com/jira/browse/JBPORTAL-1220
+ String sessionId = ServletAccess.getRequest().getSession().getId();
+ log.debug("Got init cookie operation, created a session with id " + sessionId);
+
+ return new ReturnAny();
+ }
+
+ static void throwOperationFaultOnSessionOperation()
+ {
+ throw WSRPExceptionFactory.throwSOAPFaultException(WSRPExceptionFactory.OPERATION_FAILED, "JBoss Portal's Producer" +
+ " manages sessions completely on the server side, passing or trying to release sessionIDs is therefore an error.",
+ null);
+ }
+
+ private void checkForError(PortletInvocationResponse response)
+ throws UnsupportedModeFault, OperationFailedFault, UnsupportedWindowStateFault
+ {
+ if (response instanceof ErrorResponse)
+ {
+ ErrorResponse errorResult = (ErrorResponse)response;
+ Throwable cause = errorResult.getCause();
+ if (cause instanceof PortletModeException)
+ {
+ throw WSRPExceptionFactory.throwSOAPFaultException(WSRPExceptionFactory.UNSUPPORTED_MODE,
+ "Unsupported mode: " + ((PortletModeException)cause).getMode(), null);
+ }
+ if (cause instanceof WindowStateException)
+ {
+ throw WSRPExceptionFactory.throwSOAPFaultException(WSRPExceptionFactory.UNSUPPORTED_WINDOW_STATE,
+ "Unsupported window state: " + ((WindowStateException)cause).getState(), null);
+ }
+ // todo: deal with other exceptions
+
+ // we're not sure what happened so throw an OperationFailedFault
+ throw WSRPExceptionFactory.throwSOAPFaultException(WSRPExceptionFactory.OPERATION_FAILED,
+ errorResult.getMessage(), cause);
+
+ }
+ else if (!(response instanceof HTTPRedirectionResponse || response instanceof FragmentResponse || response instanceof UpdateNavigationalStateResponse))
+ {
+ throw WSRPExceptionFactory.throwSOAPFaultException(WSRPExceptionFactory.OPERATION_FAILED,
+ "Unsupported result type: " + response.getClass().getName(), null);
+ }
+ }
+}
Property changes on: modules/wsrp/trunk/producer/src/main/java/org/jboss/portal/wsrp/producer/MarkupHandler.java
___________________________________________________________________
Name: svn:executable
+ *
Added: modules/wsrp/trunk/producer/src/main/java/org/jboss/portal/wsrp/producer/MarkupRequest.java
===================================================================
--- modules/wsrp/trunk/producer/src/main/java/org/jboss/portal/wsrp/producer/MarkupRequest.java (rev 0)
+++ modules/wsrp/trunk/producer/src/main/java/org/jboss/portal/wsrp/producer/MarkupRequest.java 2009-07-22 20:25:22 UTC (rev 13587)
@@ -0,0 +1,131 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2009, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+
+package org.jboss.portal.wsrp.producer;
+
+import org.jboss.portal.Mode;
+import org.jboss.portal.WindowState;
+import org.jboss.portal.portlet.Portlet;
+import org.jboss.portal.wsrp.WSRPUtils;
+import org.jboss.portal.wsrp.core.MarkupType;
+
+import java.util.HashSet;
+import java.util.Locale;
+import java.util.Set;
+
+/**
+ * Wrapper around information needed to perform a Markup invocation.
+ *
+ * @author <a href="mailto:chris.laprun@jboss.com">Chris Laprun</a>
+ * @since 2.6
+ */
+class MarkupRequest
+{
+ private String mode;
+ private String windowState;
+ private MarkupType markupType;
+ private String characterSet;
+ private Portlet portlet;
+ private static final String CHARSET_SEPARATOR = "; charset=";
+
+ public MarkupRequest(MarkupType markupType, String mode, String windowState, String characterSet, Portlet portlet)
+ {
+ this.characterSet = characterSet;
+ this.markupType = markupType;
+ this.mode = mode;
+ this.windowState = windowState;
+ this.portlet = portlet;
+ }
+
+ public String getMediaTypeWithCharset()
+ {
+ return getMediaType() + CHARSET_SEPARATOR + getCharacterSet();
+ }
+
+ public String getMediaType()
+ {
+ return markupType.getMimeType();
+ }
+
+ public String getLocale()
+ {
+ String[] locales = markupType.getLocales();
+ if (locales != null && locales.length != 0)
+ {
+ return locales[0];
+ }
+ else
+ {
+ return WSRPUtils.toString(Locale.ENGLISH); // no locale was provided, use English...
+ }
+ }
+
+ public String getMode()
+ {
+ return mode;
+ }
+
+ public String getWindowState()
+ {
+ return windowState;
+ }
+
+ public MarkupType getMarkupType()
+ {
+ return markupType;
+ }
+
+ public String getCharacterSet()
+ {
+ return characterSet;
+ }
+
+ public Portlet getPortlet()
+ {
+ return portlet;
+ }
+
+ public Set<Mode> getSupportedModes()
+ {
+ String[] modes = markupType.getModes();
+ int length = modes.length;
+ Set<Mode> result = new HashSet<Mode>(length);
+ for (int i = 0; i < length; i++)
+ {
+ result.add(WSRPUtils.getJSR168PortletModeFromWSRPName(modes[i]));
+ }
+ return result;
+ }
+
+ public Set<WindowState> getSupportedWindowStates()
+ {
+ String[] states = markupType.getWindowStates();
+ int length = states.length;
+ Set<WindowState> result = new HashSet<WindowState>(length);
+ for (int i = 0; i < length; i++)
+ {
+ result.add(WSRPUtils.getJSR168WindowStateFromWSRPName(states[i]));
+ }
+ return result;
+ }
+}
Added: modules/wsrp/trunk/producer/src/main/java/org/jboss/portal/wsrp/producer/PortletManagementHandler.java
===================================================================
--- modules/wsrp/trunk/producer/src/main/java/org/jboss/portal/wsrp/producer/PortletManagementHandler.java (rev 0)
+++ modules/wsrp/trunk/producer/src/main/java/org/jboss/portal/wsrp/producer/PortletManagementHandler.java 2009-07-22 20:25:22 UTC (rev 13587)
@@ -0,0 +1,480 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2009, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+
+package org.jboss.portal.wsrp.producer;
+
+import org.jboss.portal.common.i18n.LocalizedString;
+import org.jboss.portal.common.util.Tools;
+import org.jboss.portal.portlet.InvalidPortletIdException;
+import org.jboss.portal.portlet.NoSuchPortletException;
+import org.jboss.portal.portlet.Portlet;
+import org.jboss.portal.portlet.PortletInvokerException;
+import org.jboss.portal.portlet.info.PortletInfo;
+import org.jboss.portal.portlet.info.PreferenceInfo;
+import org.jboss.portal.portlet.info.PreferencesInfo;
+import org.jboss.portal.portlet.state.DestroyCloneFailure;
+import org.jboss.portal.portlet.state.PropertyChange;
+import org.jboss.portal.portlet.state.PropertyMap;
+import org.jboss.portal.registration.Registration;
+import org.jboss.portal.registration.RegistrationLocal;
+import org.jboss.portal.wsrp.WSRPConstants;
+import org.jboss.portal.wsrp.WSRPExceptionFactory;
+import org.jboss.portal.wsrp.WSRPTypeFactory;
+import org.jboss.portal.wsrp.WSRPUtils;
+import org.jboss.portal.wsrp.core.AccessDeniedFault;
+import org.jboss.portal.wsrp.core.ClonePortlet;
+import org.jboss.portal.wsrp.core.DestroyFailed;
+import org.jboss.portal.wsrp.core.DestroyPortlets;
+import org.jboss.portal.wsrp.core.DestroyPortletsResponse;
+import org.jboss.portal.wsrp.core.GetPortletDescription;
+import org.jboss.portal.wsrp.core.GetPortletProperties;
+import org.jboss.portal.wsrp.core.GetPortletPropertyDescription;
+import org.jboss.portal.wsrp.core.InconsistentParametersFault;
+import org.jboss.portal.wsrp.core.InvalidHandleFault;
+import org.jboss.portal.wsrp.core.InvalidRegistrationFault;
+import org.jboss.portal.wsrp.core.InvalidUserCategoryFault;
+import org.jboss.portal.wsrp.core.MissingParametersFault;
+import org.jboss.portal.wsrp.core.OperationFailedFault;
+import org.jboss.portal.wsrp.core.PortletContext;
+import org.jboss.portal.wsrp.core.PortletDescription;
+import org.jboss.portal.wsrp.core.PortletDescriptionResponse;
+import org.jboss.portal.wsrp.core.PortletPropertyDescriptionResponse;
+import org.jboss.portal.wsrp.core.Property;
+import org.jboss.portal.wsrp.core.PropertyDescription;
+import org.jboss.portal.wsrp.core.PropertyList;
+import org.jboss.portal.wsrp.core.ResetProperty;
+import org.jboss.portal.wsrp.core.SetPortletProperties;
+import org.jboss.portal.wsrp.core.UserContext;
+import org.jboss.portal.wsrp.core.WSRP_v1_PortletManagement_PortType;
+
+import javax.xml.soap.SOAPElement;
+import java.rmi.RemoteException;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+/**
+ * @author <a href="mailto:chris.laprun@jboss.com">Chris Laprun</a>
+ * @version $Revision: 11147 $
+ * @since 2.4
+ */
+class PortletManagementHandler extends ServiceHandler implements WSRP_v1_PortletManagement_PortType
+{
+ private static final String GET_PORTLET_PROPERTY_DESCRIPTION = "GetPortletPropertyDescription";
+ private static final String GET_PORTLET_PROPERTIES = "GetPortletProperties";
+ private static final String PORTLET_CONTEXT = "PortletContext";
+ private static final String GET_PORTLET_DESCRIPTION = "GetPortletDescription";
+
+ PortletManagementHandler(WSRPProducerImpl producer)
+ {
+ super(producer);
+ }
+
+ public PortletDescriptionResponse getPortletDescription(GetPortletDescription getPortletDescription)
+ throws AccessDeniedFault, InvalidHandleFault, InvalidUserCategoryFault, InconsistentParametersFault,
+ MissingParametersFault, InvalidRegistrationFault, OperationFailedFault, RemoteException
+ {
+ WSRPExceptionFactory.throwOperationFailedFaultIfValueIsMissing(getPortletDescription, GET_PORTLET_DESCRIPTION);
+ Registration registration = producer.getRegistrationOrFailIfInvalid(getPortletDescription.getRegistrationContext());
+
+ PortletContext portletContext = getPortletDescription.getPortletContext();
+ WSRPExceptionFactory.throwMissingParametersFaultIfValueIsMissing(portletContext, PORTLET_CONTEXT, GET_PORTLET_DESCRIPTION);
+
+ UserContext userContext = getPortletDescription.getUserContext();
+ checkUserAuthorization(userContext);
+
+ // RegistrationLocal.setRegistration is called further down the invocation in ServiceDescriptionHandler.getPortletDescription
+ PortletDescription description = producer.getPortletDescription(portletContext, getPortletDescription.getDesiredLocales(), registration);
+ return WSRPTypeFactory.createPortletDescriptionResponse(description);
+ }
+
+ public PortletPropertyDescriptionResponse getPortletPropertyDescription(GetPortletPropertyDescription getPortletPropertyDescription)
+ throws MissingParametersFault, InconsistentParametersFault, InvalidUserCategoryFault, InvalidRegistrationFault,
+ AccessDeniedFault, InvalidHandleFault, OperationFailedFault, RemoteException
+ {
+ WSRPExceptionFactory.throwOperationFailedFaultIfValueIsMissing(getPortletPropertyDescription, GET_PORTLET_PROPERTY_DESCRIPTION);
+
+ PortletContext portletContext = getPortletPropertyDescription.getPortletContext();
+ WSRPExceptionFactory.throwMissingParametersFaultIfValueIsMissing(portletContext, PORTLET_CONTEXT, GET_PORTLET_PROPERTY_DESCRIPTION);
+
+ Registration registration = producer.getRegistrationOrFailIfInvalid(getPortletPropertyDescription.getRegistrationContext());
+
+ UserContext userContext = getPortletPropertyDescription.getUserContext();
+ checkUserAuthorization(userContext);
+
+ String[] desiredLocales = getPortletPropertyDescription.getDesiredLocales();
+ Portlet portlet = getPortletFrom(portletContext, registration);
+ PortletInfo info = portlet.getInfo();
+ PreferencesInfo prefsInfo = info.getPreferences();
+
+ PropertyDescription[] descs = null;
+ if (prefsInfo != null)
+ {
+ Set keySet = prefsInfo.getKeys();
+ descs = new PropertyDescription[keySet.size()];
+ int index = 0;
+ for (Object key : keySet)
+ {
+ PreferenceInfo prefInfo = prefsInfo.getPreference((String)key);
+
+ // WSRP Spec 8.7: return only the portion of the Portlet's persistent state the user is allowed to modify
+ // if read only status is not determined, we consider it as being read-only to be safe
+ Boolean readOnly = prefInfo.isReadOnly();
+ if (readOnly != null && !readOnly)
+ {
+ //todo: check what we should use key
+ //todo: right now we only support String properties
+ PropertyDescription desc = WSRPTypeFactory.createPropertyDescription(prefInfo.getKey(), WSRPConstants.XSD_STRING);
+ desc.setLabel(WSRPUtils.convertToWSRPLocalizedString(prefInfo.getDisplayName(), desiredLocales));
+ desc.setHint(WSRPUtils.convertToWSRPLocalizedString(prefInfo.getDescription(), desiredLocales));
+ descs[index++] = desc;
+ }
+ }
+ }
+
+ return WSRPTypeFactory.createPortletPropertyDescriptionResponse(descs);
+ }
+
+ public PortletContext clonePortlet(ClonePortlet clonePortlet) throws InvalidUserCategoryFault, AccessDeniedFault,
+ OperationFailedFault, InvalidHandleFault, InvalidRegistrationFault, InconsistentParametersFault,
+ MissingParametersFault, RemoteException
+ {
+ WSRPExceptionFactory.throwOperationFailedFaultIfValueIsMissing(clonePortlet, "ClonePortlet");
+
+ PortletContext portletContext = clonePortlet.getPortletContext();
+ WSRPExceptionFactory.throwMissingParametersFaultIfValueIsMissing(portletContext, "PortletContext", "ClonePortlet");
+
+ Registration registration = producer.getRegistrationOrFailIfInvalid(clonePortlet.getRegistrationContext());
+
+ UserContext userContext = clonePortlet.getUserContext();
+ checkUserAuthorization(userContext);
+
+ org.jboss.portal.portlet.PortletContext portalPC = WSRPUtils.convertToPortalPortletContext(portletContext);
+ try
+ {
+ RegistrationLocal.setRegistration(registration);
+ org.jboss.portal.portlet.PortletContext response = producer.getInvoker().createClone(portalPC);
+ return WSRPUtils.convertToWSRPPortletContext(response);
+ }
+ catch (NoSuchPortletException e)
+ {
+ throw WSRPExceptionFactory.throwSOAPFaultException(WSRPExceptionFactory.INVALID_HANDLE,
+ "Failed to create clone for portlet '" + portletContext.getPortletHandle(), e);
+ }
+ catch (InvalidPortletIdException e)
+ {
+ throw WSRPExceptionFactory.throwSOAPFaultException(WSRPExceptionFactory.INCONSISTENT_PARAMETERS,
+ "Failed to create clone for portlet '" + portletContext.getPortletHandle(), e);
+ }
+ catch (PortletInvokerException e)
+ {
+ throw WSRPExceptionFactory.throwSOAPFaultException(WSRPExceptionFactory.OPERATION_FAILED,
+ "Failed to create clone for portlet '" + portletContext.getPortletHandle(), e);
+ }
+ finally
+ {
+ RegistrationLocal.setRegistration(null);
+ }
+ }
+
+ public DestroyPortletsResponse destroyPortlets(DestroyPortlets destroyPortlets) throws InconsistentParametersFault,
+ MissingParametersFault, InvalidRegistrationFault, OperationFailedFault, RemoteException
+ {
+ WSRPExceptionFactory.throwOperationFailedFaultIfValueIsMissing(destroyPortlets, "DestroyPortlets");
+
+ String[] handles = destroyPortlets.getPortletHandles();
+ WSRPExceptionFactory.throwMissingParametersFaultIfValueIsMissing(handles, "portlet handles to be destroyed", "DestroyPortlets");
+
+ Registration registration = producer.getRegistrationOrFailIfInvalid(destroyPortlets.getRegistrationContext());
+
+ List portletContexts = new ArrayList(handles.length);
+ for (int i = 0; i < handles.length; i++)
+ {
+ portletContexts.add(org.jboss.portal.portlet.PortletContext.createPortletContext(handles[i]));
+ }
+
+ try
+ {
+ RegistrationLocal.setRegistration(registration);
+ List failuresList = producer.getInvoker().destroyClones(portletContexts);
+ int failuresNumber = failuresList.size();
+ DestroyFailed[] destroyFailed;
+ if (failuresNumber > 0)
+ {
+ destroyFailed = new DestroyFailed[failuresNumber];
+ int i = 0;
+ for (Object aFailuresList : failuresList)
+ {
+ DestroyCloneFailure failure = (DestroyCloneFailure)aFailuresList;
+ destroyFailed[i++] = WSRPTypeFactory.createDestroyFailed(failure.getPortletId(), failure.getMessage());
+ }
+ }
+ else
+ {
+ destroyFailed = null;
+ }
+
+ return WSRPTypeFactory.createDestroyPortletsResponse(destroyFailed);
+ }
+ catch (PortletInvokerException e)
+ {
+ throw WSRPExceptionFactory.throwSOAPFaultException(WSRPExceptionFactory.OPERATION_FAILED,
+ "Failed to destroy clones", e);
+ }
+ finally
+ {
+ RegistrationLocal.setRegistration(null);
+ }
+ }
+
+ public PortletContext setPortletProperties(SetPortletProperties setPortletProperties) throws OperationFailedFault,
+ InvalidHandleFault, MissingParametersFault, InconsistentParametersFault, InvalidUserCategoryFault,
+ AccessDeniedFault, InvalidRegistrationFault, RemoteException
+ {
+ WSRPExceptionFactory.throwOperationFailedFaultIfValueIsMissing(setPortletProperties, "SetPortletProperties");
+
+ PortletContext portletContext = setPortletProperties.getPortletContext();
+ WSRPExceptionFactory.throwMissingParametersFaultIfValueIsMissing(portletContext, "PortletContext", "SetPortletProperties");
+
+ PropertyList propertyList = setPortletProperties.getPropertyList();
+ WSRPExceptionFactory.throwMissingParametersFaultIfValueIsMissing(propertyList, "PropertyList", "SetPortletProperties");
+
+ Registration registration = producer.getRegistrationOrFailIfInvalid(setPortletProperties.getRegistrationContext());
+
+ checkUserAuthorization(setPortletProperties.getUserContext());
+
+ Property[] properties = propertyList.getProperties();
+ ResetProperty[] resetProperties = propertyList.getResetProperties();
+ int changesCount = 0;
+ if (properties != null)
+ {
+ changesCount += properties.length;
+ }
+ if (resetProperties != null)
+ {
+ changesCount += resetProperties.length;
+ }
+
+ if (changesCount > 0)
+ {
+ List changes = new ArrayList(changesCount);
+
+ if (properties != null)
+ {
+ for (int i = 0; i < properties.length; i++)
+ {
+ Property property = properties[i];
+ String value = property.getStringValue();
+
+ // todo: deal with XML values...
+ SOAPElement[] values = property.get_any();
+ String lang = property.getLang(); // todo: deal with language?
+
+ changes.add(PropertyChange.newUpdate(property.getName(), value));
+ }
+ }
+
+ if (resetProperties != null)
+ {
+ for (int i = 0; i < resetProperties.length; i++)
+ {
+ ResetProperty resetProperty = resetProperties[i];
+ changes.add(PropertyChange.newReset(resetProperty.getName()));
+ }
+ }
+
+ try
+ {
+ RegistrationLocal.setRegistration(registration);
+ org.jboss.portal.portlet.PortletContext resultContext =
+ producer.getInvoker().setProperties(WSRPUtils.convertToPortalPortletContext(portletContext),
+ (PropertyChange[])changes.toArray(new PropertyChange[0]));
+ return WSRPUtils.convertToWSRPPortletContext(resultContext);
+ }
+ catch (NoSuchPortletException e)
+ {
+ throw WSRPExceptionFactory.throwSOAPFaultException(WSRPExceptionFactory.INVALID_HANDLE,
+ "Failed to set properties for portlet '" + portletContext.getPortletHandle() + "'", e);
+ }
+ catch (InvalidPortletIdException e)
+ {
+ throw WSRPExceptionFactory.throwSOAPFaultException(WSRPExceptionFactory.INCONSISTENT_PARAMETERS,
+ "Failed to set properties for portlet '" + portletContext.getPortletHandle() + "'", e);
+ }
+ catch (PortletInvokerException e)
+ {
+ throw WSRPExceptionFactory.throwSOAPFaultException(WSRPExceptionFactory.OPERATION_FAILED,
+ "Failed to set properties for portlet '" + portletContext.getPortletHandle() + "'", e);
+ }
+ finally
+ {
+ RegistrationLocal.setRegistration(null);
+ }
+ }
+
+ return portletContext;
+ }
+
+ public PropertyList getPortletProperties(GetPortletProperties getPortletProperties) throws InvalidHandleFault,
+ MissingParametersFault, InvalidRegistrationFault, AccessDeniedFault, OperationFailedFault,
+ InconsistentParametersFault, InvalidUserCategoryFault, RemoteException
+ {
+ WSRPExceptionFactory.throwOperationFailedFaultIfValueIsMissing(getPortletProperties, GET_PORTLET_PROPERTIES);
+
+ PortletContext portletContext = getPortletProperties.getPortletContext();
+ WSRPExceptionFactory.throwMissingParametersFaultIfValueIsMissing(portletContext, PORTLET_CONTEXT, GET_PORTLET_PROPERTIES);
+
+ Registration registration = producer.getRegistrationOrFailIfInvalid(getPortletProperties.getRegistrationContext());
+
+ UserContext userContext = getPortletProperties.getUserContext();
+ checkUserAuthorization(userContext);
+
+ String[] names = getPortletProperties.getNames();
+ Set<String> keys = getKeysFromNames(names);
+
+ try
+ {
+ PropertyMap properties;
+ org.jboss.portal.portlet.PortletContext jbpContext = WSRPUtils.convertToPortalPortletContext(portletContext);
+
+ RegistrationLocal.setRegistration(registration);
+ if (keys != null)
+ {
+ properties = producer.getInvoker().getProperties(jbpContext, keys);
+ }
+ else
+ {
+ properties = producer.getInvoker().getProperties(jbpContext);
+ }
+
+ //todo: we need to check that the user can actually modify the properties
+ Portlet portlet = getPortletFrom(portletContext, registration);
+ PortletInfo info = portlet.getInfo();
+
+ PropertyList result = WSRPTypeFactory.createPropertyList();
+ int propertyNb = properties.size();
+
+ if (propertyNb > 0)
+ {
+ Property[] resProperties = new Property[propertyNb];
+ int i = 0;
+ PreferenceInfo prefInfo;
+ String key;
+ List<String> values;
+ LocalizedString displayName;
+
+ for (Iterator entries = properties.entrySet().iterator(); entries.hasNext(); i++)
+ {
+ Map.Entry entry = (Map.Entry)entries.next();
+ key = (String)entry.getKey();
+ values = (List<String>)entry.getValue();
+ prefInfo = info.getPreferences().getPreference(key);
+ displayName = prefInfo.getDisplayName();
+ String lang = WSRPUtils.toString(displayName.getDefaultLocale());
+
+ // todo: support multi-valued properties
+ if (values.size() != 1)
+ {
+ throw new UnsupportedOperationException("Currently doesn't support multi-valued properties!");
+ }
+ resProperties[i] = WSRPTypeFactory.createProperty(key, lang, values.get(0)); //todo: check what we should use key
+ }
+
+ result.setProperties(resProperties);
+ }
+
+ return result;
+ }
+ catch (PortletInvokerException e)
+ {
+ throw WSRPExceptionFactory.throwSOAPFaultException(WSRPExceptionFactory.INVALID_HANDLE,
+ "Could not retrieve properties for portlet '" + portletContext + "'", e);
+ }
+ finally
+ {
+ RegistrationLocal.setRegistration(null);
+ }
+ }
+
+ private void checkUserAuthorization(UserContext userContext)
+ {
+ //todo: implement
+ if (userContext != null)
+ {
+
+ }
+ }
+
+ private Set<String> getKeysFromNames(String[] names)
+ {
+ Set<String> keys = null;
+ if (names != null)
+ {
+ if (names.length == 0)
+ {
+ keys = Collections.emptySet();
+ }
+ else
+ {
+ // todo fix-me we need to work around http://jira.jboss.com/jira/browse/JBWS-1300 for now:
+ boolean allNamesNull = true;
+ for (int i = 0; i < names.length && allNamesNull; i++)
+ {
+ allNamesNull = (names[i] == null);
+ }
+ if (allNamesNull)
+ {
+ keys = null;
+ }
+ else
+ {
+ keys = Tools.toSet(names);
+ }
+ }
+ }
+ return keys;
+ }
+
+ private Portlet getPortletFrom(PortletContext portletContext, Registration registration) throws InvalidHandleFault
+ {
+ Portlet portlet;
+ try
+ {
+ RegistrationLocal.setRegistration(registration);
+ portlet = producer.getInvoker().getPortlet(WSRPUtils.convertToPortalPortletContext(portletContext));
+ return portlet;
+ }
+ catch (PortletInvokerException e)
+ {
+ throw WSRPExceptionFactory.throwSOAPFaultException(WSRPExceptionFactory.INVALID_HANDLE,
+ "Could not retrieve portlet '" + portletContext.getPortletHandle() + "'", e);
+ }
+ finally
+ {
+ RegistrationLocal.setRegistration(null);
+ }
+ }
+}
Property changes on: modules/wsrp/trunk/producer/src/main/java/org/jboss/portal/wsrp/producer/PortletManagementHandler.java
___________________________________________________________________
Name: svn:executable
+ *
Added: modules/wsrp/trunk/producer/src/main/java/org/jboss/portal/wsrp/producer/RegistrationHandler.java
===================================================================
--- modules/wsrp/trunk/producer/src/main/java/org/jboss/portal/wsrp/producer/RegistrationHandler.java (rev 0)
+++ modules/wsrp/trunk/producer/src/main/java/org/jboss/portal/wsrp/producer/RegistrationHandler.java 2009-07-22 20:25:22 UTC (rev 13587)
@@ -0,0 +1,393 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2009, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+
+package org.jboss.portal.wsrp.producer;
+
+import org.jboss.portal.common.util.ParameterValidation;
+import org.jboss.portal.registration.Consumer;
+import org.jboss.portal.registration.ConsumerCapabilities;
+import org.jboss.portal.registration.NoSuchRegistrationException;
+import org.jboss.portal.registration.Registration;
+import org.jboss.portal.registration.RegistrationException;
+import org.jboss.portal.registration.RegistrationStatus;
+import org.jboss.portal.registration.RegistrationUtils;
+import org.jboss.portal.wsrp.WSRPExceptionFactory;
+import org.jboss.portal.wsrp.WSRPTypeFactory;
+import org.jboss.portal.wsrp.WSRPUtils;
+import org.jboss.portal.wsrp.core.InvalidRegistrationFault;
+import org.jboss.portal.wsrp.core.MissingParametersFault;
+import org.jboss.portal.wsrp.core.ModifyRegistration;
+import org.jboss.portal.wsrp.core.OperationFailedFault;
+import org.jboss.portal.wsrp.core.Property;
+import org.jboss.portal.wsrp.core.RegistrationContext;
+import org.jboss.portal.wsrp.core.RegistrationData;
+import org.jboss.portal.wsrp.core.RegistrationState;
+import org.jboss.portal.wsrp.core.ReturnAny;
+import org.jboss.portal.wsrp.core.WSRP_v1_Registration_PortType;
+import org.jboss.portal.wsrp.producer.config.ProducerRegistrationRequirements;
+
+import javax.xml.namespace.QName;
+import java.rmi.RemoteException;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @author <a href="mailto:chris.laprun@jboss.com">Chris Laprun</a>
+ * @version $Revision: 13202 $
+ * @since 2.4
+ */
+class RegistrationHandler extends ServiceHandler implements WSRP_v1_Registration_PortType
+{
+ RegistrationHandler(WSRPProducerImpl producer)
+ {
+ super(producer);
+ }
+
+ public RegistrationContext register(RegistrationData registrationData) throws MissingParametersFault, OperationFailedFault,
+ RemoteException
+ {
+ if (producer.getProducerRegistrationRequirements().isRegistrationRequired())
+ {
+ WSRPExceptionFactory.throwOperationFailedFaultIfValueIsMissing(registrationData, "RegistrationData");
+ String consumerName = registrationData.getConsumerName();
+ WSRPExceptionFactory.throwMissingParametersFaultIfValueIsMissing(consumerName, "consumer name", "RegistrationData");
+
+ String consumerAgent = registrationData.getConsumerAgent();
+ WSRPExceptionFactory.throwMissingParametersFaultIfValueIsMissing(consumerAgent, "consumer agent", "RegistrationData");
+
+ Registration registration;
+ try
+ {
+ log.debug("Attempting to register consumer named '" + consumerName + "', agent '" + consumerAgent + "'.");
+
+ // check that the consumer agent is valid before trying to register
+ RegistrationUtils.validateConsumerAgent(consumerAgent);
+
+ registration = producer.getRegistrationManager().addRegistrationTo(consumerName, createRegistrationProperties(registrationData), true);
+ updateRegistrationInformation(registration, registrationData);
+ }
+ catch (Exception e)
+ {
+ String msg = "Could not register consumer named '" + consumerName + "'";
+ log.debug(msg, e);
+ throw WSRPExceptionFactory.throwSOAPFaultException(WSRPExceptionFactory.OPERATION_FAILED,
+ msg, e);
+ }
+
+ RegistrationContext registrationContext = WSRPTypeFactory.createRegistrationContext(registration.getId());
+ log.debug("Registration completed without error.");
+ return registrationContext;
+ }
+
+ throw WSRPExceptionFactory.throwSOAPFaultException(WSRPExceptionFactory.OPERATION_FAILED,
+ "Registration shouldn't be attempted if registration is not required", null);
+ }
+
+ private void updateRegistrationInformation(Registration registration, RegistrationData registrationData)
+ {
+ registration.setStatus(RegistrationStatus.VALID);
+ Consumer consumer = registration.getConsumer();
+ consumer.setConsumerAgent(registrationData.getConsumerAgent());
+ ConsumerCapabilities capabilities = consumer.getCapabilities();
+
+ String[] modeStrings = registrationData.getConsumerModes();
+ if (modeStrings != null && modeStrings.length > 0)
+ {
+ List modes = new ArrayList(modeStrings.length);
+ for (int i = 0; i < modeStrings.length; i++)
+ {
+ modes.add(WSRPUtils.getJSR168PortletModeFromWSRPName(modeStrings[i]));
+ }
+ capabilities.setSupportedModes(modes);
+ }
+
+ String[] wsStrings = registrationData.getConsumerWindowStates();
+ if (wsStrings != null && wsStrings.length > 0)
+ {
+ List windowStates = new ArrayList(wsStrings.length);
+ for (int i = 0; i < wsStrings.length; i++)
+ {
+ windowStates.add(WSRPUtils.getJSR168WindowStateFromWSRPName(wsStrings[i]));
+ }
+ capabilities.setSupportedWindowStates(windowStates);
+ }
+
+ //
+ String[] customUserProfileData = registrationData.getCustomUserProfileData();
+ String[] consumerUserScopes = registrationData.getConsumerUserScopes();
+ boolean isMethodGetSupported = registrationData.isMethodGetSupported();
+
+ //
+ capabilities.setSupportedUserProfileData(getListFromArray(customUserProfileData, false));
+ capabilities.setSupportedUserScopes(getListFromArray(consumerUserScopes, false));
+ capabilities.setSupportsGetMethod(isMethodGetSupported);
+ }
+
+ public ReturnAny deregister(RegistrationContext deregister) throws OperationFailedFault, InvalidRegistrationFault,
+ RemoteException
+ {
+ if (producer.getProducerRegistrationRequirements().isRegistrationRequired())
+ {
+ WSRPExceptionFactory.throwOperationFailedFaultIfValueIsMissing(deregister, "RegistrationContext");
+
+ String registrationHandle = deregister.getRegistrationHandle();
+ if (ParameterValidation.isNullOrEmpty(registrationHandle))
+ {
+ throwInvalidRegistrationFault("Null or empty registration handle");
+ }
+
+ log.debug("Attempting to deregister registration with handle '" + registrationHandle + "'");
+
+ String msg = "Could not deregister registration with handle '" + registrationHandle + "'";
+ try
+ {
+ producer.getRegistrationManager().removeRegistration(registrationHandle);
+ }
+ catch (NoSuchRegistrationException e)
+ {
+ log.debug(msg, e);
+ throwInvalidRegistrationFault(e.getLocalizedMessage());
+ }
+ catch (RegistrationException e)
+ {
+ log.debug(msg, e);
+ throw WSRPExceptionFactory.throwSOAPFaultException(WSRPExceptionFactory.OPERATION_FAILED,
+ msg, e);
+ }
+
+ return new ReturnAny();
+ }
+
+ throw WSRPExceptionFactory.throwSOAPFaultException(WSRPExceptionFactory.OPERATION_FAILED,
+ "Deregistration shouldn't be attempted if registration is not required", null);
+ }
+
+ public RegistrationState modifyRegistration(ModifyRegistration modifyRegistration) throws MissingParametersFault,
+ OperationFailedFault, InvalidRegistrationFault, RemoteException
+ {
+ if (producer.getProducerRegistrationRequirements().isRegistrationRequired())
+ {
+ WSRPExceptionFactory.throwOperationFailedFaultIfValueIsMissing(modifyRegistration, "ModifyRegistration");
+
+ RegistrationContext registrationContext = modifyRegistration.getRegistrationContext();
+ WSRPExceptionFactory.throwMissingParametersFaultIfValueIsMissing(registrationContext, "RegistrationContext", "ModifyRegistration");
+ String registrationHandle = registrationContext.getRegistrationHandle();
+ if (ParameterValidation.isNullOrEmpty(registrationHandle))
+ {
+ throwInvalidRegistrationFault("Null or empty registration handle");
+ }
+
+ RegistrationData registrationData = modifyRegistration.getRegistrationData();
+ WSRPExceptionFactory.throwMissingParametersFaultIfValueIsMissing(registrationData, "RegistrationData", "ModifyRegistration");
+
+ String consumerName = registrationData.getConsumerName();
+ WSRPExceptionFactory.throwMissingParametersFaultIfValueIsMissing(consumerName, "consumer name", "RegistrationData");
+
+ String consumerAgent = registrationData.getConsumerAgent();
+ WSRPExceptionFactory.throwMissingParametersFaultIfValueIsMissing(consumerAgent, "consumer agent", "RegistrationData");
+
+ log.debug("Attempting to modify registration with handle '" + registrationHandle + "'");
+ String msg = "Could not modify registration with handle '" + registrationHandle + "'";
+ try
+ {
+ Registration registration = producer.getRegistrationManager().getRegistration(registrationHandle);
+
+ Map properties = createRegistrationProperties(registrationData);
+
+ // check that the given registration properties are acceptable according to expectations and policy
+ ProducerRegistrationRequirements req = producer.getProducerRegistrationRequirements();
+ req.getPolicy().validateRegistrationDataFor(properties, consumerName);
+
+ registration.updateProperties(properties);
+ updateRegistrationInformation(registration, registrationData);
+ }
+ catch (NoSuchRegistrationException e)
+ {
+ log.debug(msg, e);
+ throwInvalidRegistrationFault(e.getLocalizedMessage());
+ }
+ catch (RegistrationException e)
+ {
+ log.debug(msg, e);
+ throw WSRPExceptionFactory.throwSOAPFaultException(WSRPExceptionFactory.OPERATION_FAILED,
+ msg, e);
+ }
+
+
+ log.debug("Modified registration with handle '" + registrationHandle + "'");
+ return null;
+ }
+
+ throw WSRPExceptionFactory.throwSOAPFaultException(WSRPExceptionFactory.OPERATION_FAILED,
+ "Modifying a registration shouldn't be attempted if registration is not required", null);
+ }
+
+ /**
+ * @param reg
+ * @param throwExceptionIfInvalid
+ * @return
+ * @since 2.6.2
+ */
+ boolean isRegistrationValid(Registration reg, boolean throwExceptionIfInvalid) throws InvalidRegistrationFault
+ {
+ if (reg == null)
+ {
+ if (producer.getProducerRegistrationRequirements().isRegistrationRequired())
+ {
+ log.debug("Registration is required yet no RegistrationContext was provided: registration invalid!");
+ if (throwExceptionIfInvalid)
+ {
+ throwInvalidRegistrationFault("registration is required yet no RegistrationContext was provided!");
+ }
+ return false;
+ }
+
+ log.debug("Registration not required, no registration: registration valid!");
+ return true;
+ }
+ else
+ {
+ boolean isValid = RegistrationStatus.VALID.equals(reg.getStatus());
+ boolean isPending = RegistrationStatus.PENDING.equals(reg.getStatus());
+ log.debug("Registration required: registration is " + (isValid ? "valid!" : (isPending ? "pending!" : "invalid!")));
+
+ if (throwExceptionIfInvalid)
+ {
+ if (isPending)
+ {
+ throwOperationFailedFault("Registration with handle '" + reg.getRegistrationHandle()
+ + "' is pending. Consumer needs to call modifyRegistration().", null);
+ }
+ else
+ {
+ if (!isValid)
+ {
+ throwInvalidRegistrationFault("registration with handle '" + reg.getRegistrationHandle() + "' is not valid!");
+ }
+ }
+ }
+
+ return isValid;
+ }
+ }
+
+ /**
+ * @param registrationContext
+ * @return
+ * @since 2.6.2
+ */
+ Registration getRegistrationFrom(RegistrationContext registrationContext)
+ {
+ if (producer.getProducerRegistrationRequirements().isRegistrationRequired())
+ {
+ if (registrationContext == null)
+ {
+ throwInvalidRegistrationFault("registration context is missing but registration is required");
+ }
+
+ String regHandle = registrationContext.getRegistrationHandle();
+ if (regHandle == null)
+ {
+ throwInvalidRegistrationFault("registration handle is missing but registration is required");
+ }
+
+ try
+ {
+ Registration registration = producer.getRegistrationManager().getRegistration(regHandle);
+ if (registration == null)
+ {
+ throwInvalidRegistrationFault("provided registration handle '" + regHandle + "' is not registered with this producer");
+ }
+ return registration;
+ }
+ catch (RegistrationException e)
+ {
+ throwOperationFailedFault("Failed to retrieve registration information associated with handle " + regHandle, e);
+ return null;
+ }
+ }
+ else
+ {
+ if (registrationContext != null)
+ {
+ throwInvalidRegistrationFault("no registration necessary yet one was provided!");
+ }
+ return null;
+ }
+ }
+
+ private void throwOperationFailedFault(String message, RegistrationException e)
+ {
+ throw WSRPExceptionFactory.throwSOAPFaultException(WSRPExceptionFactory.OPERATION_FAILED, message, e);
+ }
+
+ boolean throwInvalidRegistrationFault(String message)
+ {
+ throw WSRPExceptionFactory.throwSOAPFaultException(WSRPExceptionFactory.INVALID_REGISTRATION,
+ "Invalid registration: " + message, null);
+ }
+
+ private Map<QName, Object> createRegistrationProperties(RegistrationData registrationData)
+ {
+ Property[] regProperties = registrationData.getRegistrationProperties();
+ Map<QName, Object> properties;
+ if (regProperties != null)
+ {
+ properties = new HashMap<QName, Object>(regProperties.length);
+ for (Property property : regProperties)
+ {
+ // todo: should be more detailed here... use the language, allow other value types...
+ QName propName = new QName(property.getName());
+ String propValue = property.getStringValue();
+ if (producer.getProducerRegistrationRequirements().acceptValueFor(propName, propValue))
+ {
+ properties.put(propName, propValue);
+ }
+ else
+ {
+ throw new IllegalArgumentException("Registration properties named '" + propName + "' with value '"
+ + propValue + "' was rejected by the WSRP producer.");
+ }
+ }
+ }
+ else
+ {
+ properties = Collections.emptyMap();
+ }
+
+ return properties;
+ }
+
+ private List getListFromArray(String[] array, boolean useEmptyForNull)
+ {
+ if (array == null)
+ {
+ return useEmptyForNull ? Collections.EMPTY_LIST : null;
+ }
+ return Arrays.asList(array);
+ }
+}
Added: modules/wsrp/trunk/producer/src/main/java/org/jboss/portal/wsrp/producer/RenderRequestProcessor.java
===================================================================
--- modules/wsrp/trunk/producer/src/main/java/org/jboss/portal/wsrp/producer/RenderRequestProcessor.java (rev 0)
+++ modules/wsrp/trunk/producer/src/main/java/org/jboss/portal/wsrp/producer/RenderRequestProcessor.java 2009-07-22 20:25:22 UTC (rev 13587)
@@ -0,0 +1,178 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2009, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+
+package org.jboss.portal.wsrp.producer;
+
+import org.jboss.portal.common.net.URLTools;
+import org.jboss.portal.portlet.impl.jsr168.PortletUtils;
+import org.jboss.portal.portlet.invocation.PortletInvocation;
+import org.jboss.portal.portlet.invocation.RenderInvocation;
+import org.jboss.portal.portlet.invocation.response.FragmentResponse;
+import org.jboss.portal.portlet.invocation.response.PortletInvocationResponse;
+import org.jboss.portal.portlet.state.AccessMode;
+import org.jboss.portal.wsrp.WSRPConstants;
+import org.jboss.portal.wsrp.WSRPRewritingConstants;
+import org.jboss.portal.wsrp.WSRPTypeFactory;
+import org.jboss.portal.wsrp.core.GetMarkup;
+import org.jboss.portal.wsrp.core.InvalidHandleFault;
+import org.jboss.portal.wsrp.core.InvalidRegistrationFault;
+import org.jboss.portal.wsrp.core.MarkupContext;
+import org.jboss.portal.wsrp.core.MarkupParams;
+import org.jboss.portal.wsrp.core.MarkupResponse;
+import org.jboss.portal.wsrp.core.MissingParametersFault;
+import org.jboss.portal.wsrp.core.OperationFailedFault;
+import org.jboss.portal.wsrp.core.PortletContext;
+import org.jboss.portal.wsrp.core.RegistrationContext;
+import org.jboss.portal.wsrp.core.RuntimeContext;
+import org.jboss.portal.wsrp.core.UnsupportedMimeTypeFault;
+import org.jboss.portal.wsrp.core.UnsupportedModeFault;
+import org.jboss.portal.wsrp.core.UnsupportedWindowStateFault;
+import org.jboss.portal.wsrp.servlet.ServletAccess;
+
+/**
+ * @author <a href="mailto:chris.laprun@jboss.com">Chris Laprun</a>
+ * @version $Revision: 13121 $
+ * @since 2.6
+ */
+public class RenderRequestProcessor extends RequestProcessor
+{
+ private static final String EMPTY = "";
+ private final GetMarkup getMarkup;
+ private String namespace;
+
+ public RenderRequestProcessor(WSRPProducerImpl producer, GetMarkup getMarkup) throws UnsupportedMimeTypeFault,
+ UnsupportedWindowStateFault, InvalidHandleFault, UnsupportedModeFault, MissingParametersFault,
+ InvalidRegistrationFault, OperationFailedFault
+ {
+ super(producer);
+ this.getMarkup = getMarkup;
+ prepareInvocation();
+ }
+
+ RegistrationContext getRegistrationContext()
+ {
+ return getMarkup.getRegistrationContext();
+ }
+
+ RuntimeContext getRuntimeContext()
+ {
+ return getMarkup.getRuntimeContext();
+ }
+
+ MarkupParams getMarkupParams()
+ {
+ return getMarkup.getMarkupParams();
+ }
+
+ PortletContext getPortletContext()
+ {
+ return getMarkup.getPortletContext();
+ }
+
+ org.jboss.portal.wsrp.core.UserContext getUserContext()
+ {
+ return getMarkup.getUserContext();
+ }
+
+ String getContextName()
+ {
+ return MarkupHandler.GET_MARKUP;
+ }
+
+ AccessMode getAccessMode()
+ {
+ return AccessMode.READ_ONLY;
+ }
+
+ PortletInvocation initInvocation(WSRPPortletInvocationContext context)
+ {
+ // MUST match namespace generation used in PortletResponseImpl.getNamespace in portlet module...
+ namespace = PortletUtils.generateNamespaceFrom(context.getWindowContext().getId());
+
+ return new RenderInvocation(context);
+ }
+
+ Object processResponse(PortletInvocationResponse response)
+ {
+ FragmentResponse fragment = (FragmentResponse)response;
+ String markupString = null;
+ byte[] markupBinary = null;
+ switch (fragment.getType())
+ {
+ case FragmentResponse.TYPE_CHARS:
+ markupString = processFragmentString(fragment.getChars());
+ break;
+ case FragmentResponse.TYPE_BYTES:
+ markupBinary = fragment.getBytes(); // fix-me: might need to convert to Base64?
+ break;
+ case FragmentResponse.TYPE_EMPTY:
+ markupString = EMPTY;
+ break;
+ }
+
+
+ MarkupContext markupContext;
+ if (markupString != null)
+ {
+ markupContext = WSRPTypeFactory.createMarkupContext(markupRequest.getMediaType(), markupString);
+ }
+ else
+ {
+ markupContext = WSRPTypeFactory.createMarkupContext(markupRequest.getMediaTypeWithCharset(), markupBinary);
+ }
+ markupContext.setLocale(markupRequest.getLocale());
+ markupContext.setRequiresUrlRewriting(Boolean.TRUE);
+ markupContext.setPreferredTitle(portletDescription.getTitle().getValue());
+
+ // cache information
+ int expires = fragment.getCacheControl().getExpirationSecs();
+ // only create a CacheControl if expiration time is not 0
+ if (expires != 0)
+ {
+ // if expires is negative, replace by -1 to make sure
+ if (expires < 0)
+ {
+ expires = -1;
+ }
+
+ markupContext.setCacheControl(WSRPTypeFactory.createCacheControl(expires, WSRPConstants.CACHE_PER_USER));
+ }
+
+ return new MarkupResponse(markupContext, null, null);
+ }
+
+ /**
+ * Process String returned from RenderResult to add rewriting token if necessary, replacing namespaces by the WSRP
+ * rewrite token. fix-me: need to check for producer rewriting
+ *
+ * @param renderString the String to be processed for rewriting marking
+ * @return a String processed to add rewriting tokens as necessary
+ */
+ private String processFragmentString(String renderString)
+ {
+ String result = renderString.replaceAll(namespace, WSRPRewritingConstants.WSRP_REWRITE_TOKEN);
+
+ result = URLTools.replaceURLsBy(result, new AbsoluteURLReplacementGenerator(ServletAccess.getRequest()));
+ return result;
+ }
+}
Added: modules/wsrp/trunk/producer/src/main/java/org/jboss/portal/wsrp/producer/RequestProcessor.java
===================================================================
--- modules/wsrp/trunk/producer/src/main/java/org/jboss/portal/wsrp/producer/RequestProcessor.java (rev 0)
+++ modules/wsrp/trunk/producer/src/main/java/org/jboss/portal/wsrp/producer/RequestProcessor.java 2009-07-22 20:25:22 UTC (rev 13587)
@@ -0,0 +1,508 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2009, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+
+package org.jboss.portal.wsrp.producer;
+
+import org.jboss.portal.Mode;
+import org.jboss.portal.WindowState;
+import org.jboss.portal.common.net.media.MediaType;
+import org.jboss.portal.common.util.MarkupInfo;
+import org.jboss.portal.common.util.Tools;
+import org.jboss.portal.portlet.Portlet;
+import org.jboss.portal.portlet.PortletInvokerException;
+import org.jboss.portal.portlet.StateString;
+import org.jboss.portal.portlet.invocation.PortletInvocation;
+import org.jboss.portal.portlet.invocation.response.PortletInvocationResponse;
+import org.jboss.portal.portlet.spi.PortalContext;
+import org.jboss.portal.portlet.spi.SecurityContext;
+import org.jboss.portal.portlet.spi.UserContext;
+import org.jboss.portal.portlet.spi.WindowContext;
+import org.jboss.portal.portlet.state.AccessMode;
+import org.jboss.portal.registration.Registration;
+import org.jboss.portal.wsrp.UserContextConverter;
+import org.jboss.portal.wsrp.WSRPConstants;
+import org.jboss.portal.wsrp.WSRPExceptionFactory;
+import org.jboss.portal.wsrp.WSRPUtils;
+import org.jboss.portal.wsrp.core.InvalidHandleFault;
+import org.jboss.portal.wsrp.core.InvalidRegistrationFault;
+import org.jboss.portal.wsrp.core.MarkupParams;
+import org.jboss.portal.wsrp.core.MarkupType;
+import org.jboss.portal.wsrp.core.OperationFailedFault;
+import org.jboss.portal.wsrp.core.PortletContext;
+import org.jboss.portal.wsrp.core.PortletDescription;
+import org.jboss.portal.wsrp.core.RegistrationContext;
+import org.jboss.portal.wsrp.core.RuntimeContext;
+import org.jboss.portal.wsrp.core.UnsupportedMimeTypeFault;
+import org.jboss.portal.wsrp.core.UnsupportedModeFault;
+import org.jboss.portal.wsrp.core.UnsupportedWindowStateFault;
+
+import java.security.Principal;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+/**
+ * @author <a href="mailto:chris.laprun@jboss.com">Chris Laprun</a>
+ * @version $Revision: 13121 $
+ * @since 2.6
+ */
+public abstract class RequestProcessor
+{
+ private static final String WINDOW_STATE = "window state";
+ private static final String PORTLET_MODE = "portlet mode";
+
+ protected PortletInvocation invocation;
+ protected MarkupRequest markupRequest;
+ protected PortletDescription portletDescription;
+ protected Portlet portlet;
+ protected WSRPInstanceContext instanceContext;
+ protected WSRPProducerImpl producer;
+
+
+ protected RequestProcessor(WSRPProducerImpl producer)
+ {
+ this.producer = producer;
+ }
+
+ void prepareInvocation() throws InvalidRegistrationFault, OperationFailedFault, InvalidHandleFault,
+ UnsupportedMimeTypeFault, UnsupportedWindowStateFault, UnsupportedModeFault
+ {
+ Registration registration = producer.getRegistrationOrFailIfInvalid(getRegistrationContext());
+
+ // get session information and deal with it
+ final RuntimeContext runtimeContext = getRuntimeContext();
+ WSRPExceptionFactory.throwMissingParametersFaultIfValueIsMissing(runtimeContext, "RuntimeContext", getContextName());
+
+ checkForSessionIDs(runtimeContext);
+
+ // get markup parameters
+ final MarkupParams params = getMarkupParams();
+ WSRPExceptionFactory.throwMissingParametersFaultIfValueIsMissing(params, "MarkupParams", getContextName());
+
+ // get portlet handle
+ PortletContext wsrpPC = getPortletContext();
+ WSRPExceptionFactory.throwMissingParametersFaultIfValueIsMissing(wsrpPC, "PortletContext", getContextName());
+ org.jboss.portal.portlet.PortletContext portletContext = WSRPUtils.convertToPortalPortletContext(wsrpPC);
+
+ // retrieve the portlet
+ try
+ {
+ // calls RegistrationLocal.setRegistration so no need to here
+ portlet = producer.getPortletWith(portletContext, registration);
+ }
+ catch (PortletInvokerException e)
+ {
+ throw WSRPExceptionFactory.throwSOAPFaultException(WSRPExceptionFactory.OPERATION_FAILED,
+ "Could not retrieve portlet '" + portletContext + "'", e);
+ }
+
+ // get portlet description for the desired portlet...
+ final String[] desiredLocales = params.getLocales();
+ portletDescription = producer.getPortletDescription(portlet, desiredLocales);
+ if (Boolean.TRUE.equals(portletDescription.getUsesMethodGet()))
+ {
+ throw WSRPExceptionFactory.throwSOAPFaultException(WSRPExceptionFactory.OPERATION_FAILED,
+ "Portlets using GET method in forms are not currently supported.", null);
+ }
+ MarkupType[] markupTypes = portletDescription.getMarkupTypes();
+
+ // based on the markup parameters and portlet description generate the most appropriate markup request
+ markupRequest = createMarkupRequestFrom(markupTypes, params, portlet);
+
+ // prepare information for invocation
+ StateString navigationalState = createNavigationalState(params.getNavigationalState());
+
+ final org.jboss.portal.wsrp.core.UserContext wsrpUserContext = getUserContext();
+ checkUserContext(wsrpUserContext);
+
+ SecurityContext securityContext = createSecurityContext(params, runtimeContext, wsrpUserContext);
+ MarkupInfo streamInfo = createStreamInfo(markupRequest);
+ PortalContext portalContext = createPortalContext(params, markupRequest);
+ UserContext userContext = createUserContext(wsrpUserContext, markupRequest.getLocale(), desiredLocales);
+ instanceContext = createInstanceContext(portletContext, getAccessMode(), runtimeContext.getPortletInstanceKey());
+ WindowContext windowContext = createWindowContext(portletContext.getId(), runtimeContext);
+
+ // prepare the invocation
+ WSRPPortletInvocationContext context = new WSRPPortletInvocationContext(streamInfo, securityContext, portalContext, userContext, instanceContext, windowContext);
+ PortletInvocation invocation = initInvocation(context);
+
+ invocation.setTarget(portlet.getContext());
+ invocation.setWindowState(WSRPUtils.getJSR168WindowStateFromWSRPName(markupRequest.getWindowState()));
+ invocation.setMode(WSRPUtils.getJSR168PortletModeFromWSRPName(markupRequest.getMode()));
+ invocation.setNavigationalState(navigationalState);
+
+ context.contextualize(invocation);
+ setInvocation(invocation);
+ }
+
+ abstract RegistrationContext getRegistrationContext();
+
+ abstract RuntimeContext getRuntimeContext();
+
+ abstract MarkupParams getMarkupParams();
+
+ abstract PortletContext getPortletContext();
+
+ abstract org.jboss.portal.wsrp.core.UserContext getUserContext();
+
+ abstract String getContextName();
+
+ abstract AccessMode getAccessMode();
+
+ abstract PortletInvocation initInvocation(WSRPPortletInvocationContext context);
+
+ abstract Object processResponse(PortletInvocationResponse response);
+
+
+ /**
+ * Returns the most appropriate information to base markup generation on based on a Portlet's specified markup types
+ * and a markup request parameters.
+ *
+ * @param markupTypes the Portlet's specified markup types
+ * @param params the markup request parameters
+ * @param portlet
+ * @return a MarkupRequest containing the most appropriate information to base markup generation for this request
+ */
+ private MarkupRequest createMarkupRequestFrom(MarkupType[] markupTypes, MarkupParams params, Portlet portlet)
+ throws UnsupportedMimeTypeFault, UnsupportedModeFault, UnsupportedWindowStateFault
+ {
+ String[] desiredMIMETypes = params.getMimeTypes();
+ MarkupType markupType = null;
+
+ // Get the MIME type to use
+ for (int i = 0; markupType == null && i < desiredMIMETypes.length; i++)
+ {
+ String desiredMIMEType = desiredMIMETypes[i];
+ for (MarkupType type : markupTypes)
+ {
+ if (desiredMIMEType.equals(type.getMimeType()))
+ {
+ markupType = type;
+ break;
+ }
+ }
+ }
+
+ // no MIME type was found: error!
+ if (markupType == null)
+ {
+ throw WSRPExceptionFactory.throwSOAPFaultException(WSRPExceptionFactory.UNSUPPORTED_MIME_TYPE,
+ "None of the specified MIME types are supported by portlet '" + portlet.getContext().getId() + "'", null);
+ }
+
+ // use user-desired locales
+ String[] locales = params.getLocales();
+ String[] supportedLocales = markupType.getLocales();
+ if (supportedLocales != null)
+ {
+ // reset markup type locales
+ markupType.setLocales(null);
+ boolean found = false;
+
+ // find the best match
+ for (String locale : locales)
+ {
+ for (String supportedLocale : supportedLocales)
+ {
+ if (locale.equals(supportedLocale))
+ {
+ markupType.setLocales(new String[]{locale});
+ found = true;
+ break;
+ }
+ }
+
+ if (found)
+ {
+ break;
+ }
+ }
+
+ // if no best match was found, use whatever the user gave us
+ if (!found)
+ {
+ markupType.setLocales(locales);
+ }
+ }
+ else
+ {
+ markupType.setLocales(locales);
+ }
+
+ // get the mode
+ String mode;
+ try
+ {
+ mode = getMatchingOrFailFrom(markupType.getModes(), params.getMode(), PORTLET_MODE);
+ }
+ catch (IllegalArgumentException e)
+ {
+ throw WSRPExceptionFactory.throwSOAPFaultException(WSRPExceptionFactory.UNSUPPORTED_MODE,
+ "Unsupported mode '" + params.getMode() + "'", e);
+ }
+
+ // get the window state
+ String windowState;
+ try
+ {
+ windowState = getMatchingOrFailFrom(markupType.getWindowStates(), params.getWindowState(), WINDOW_STATE);
+ }
+ catch (IllegalArgumentException e)
+ {
+ throw WSRPExceptionFactory.throwSOAPFaultException(WSRPExceptionFactory.UNSUPPORTED_WINDOW_STATE,
+ "Unsupported window state '" + params.getMode() + "'", e);
+ }
+
+ // get the character set
+ String characterSet = getMatchingOrDefaultFrom(new String[0], params.getMarkupCharacterSets(), WSRPConstants.DEFAULT_CHARACTER_SET);
+
+ return new MarkupRequest(markupType, mode, windowState, characterSet, portlet);
+ }
+
+ /**
+ * Retrieves the desired value from the set of possible values if such value exists or throw an
+ * <code>IllegalArgumentException</code>.
+ *
+ * @param possibleValues the set of supported values
+ * @param desired the desired value
+ * @param valueType a name identifying the type of the desired value (for error reporting purpose)
+ * @return the desired value
+ * @throws IllegalArgumentException if the desired value is not found in the set of possible values
+ */
+ private String getMatchingOrFailFrom(String[] possibleValues, String desired, String valueType) throws IllegalArgumentException
+ {
+ List possibleList = Arrays.asList(possibleValues);
+ if (possibleList.contains(desired))
+ {
+ return desired;
+ }
+ throw new IllegalArgumentException(desired + " is not a supported " + valueType);
+ }
+
+ /**
+ * Retrieves the best matching value from a set of possible values based on an ordered set of preferred values or the
+ * given default value if no matching value is found.
+ *
+ * @param possibleValues the set of possible values
+ * @param preferredValues the ordered (according to user preferences) set of preferred values
+ * @param defaultValue the default value to be used if no match can be found
+ * @return the first match in the set of possible values from the ordered set of preferred values or the default
+ * value if no such value can be found
+ */
+ private String getMatchingOrDefaultFrom(String[] possibleValues, String[] preferredValues, String defaultValue)
+ {
+ if (preferredValues != null && possibleValues != null)
+ {
+ List possibleList = Arrays.asList(possibleValues);
+
+ for (String preferredValue : preferredValues)
+ {
+ if (possibleList.contains(preferredValue))
+ {
+ return preferredValue;
+ }
+ }
+ }
+
+ return defaultValue;
+ }
+
+ private void checkUserContext(org.jboss.portal.wsrp.core.UserContext wsrpUserContext)
+ {
+ if (wsrpUserContext != null)
+ {
+ WSRPExceptionFactory.throwMissingParametersFaultIfValueIsMissing(wsrpUserContext.getUserContextKey(), "User Context Key", "UserContext");
+ }
+ }
+
+
+ private void checkForSessionIDs(RuntimeContext runtimeContext)
+ {
+ if (runtimeContext.getSessionID() != null)
+ {
+ MarkupHandler.throwOperationFaultOnSessionOperation();
+ }
+ }
+
+ protected StateString createNavigationalState(String navigationalState)
+ {
+ if (navigationalState == null)
+ {
+ return null;
+ }
+ else
+ {
+ return StateString.create(navigationalState);
+ }
+ }
+
+ private WSRPInstanceContext createInstanceContext(org.jboss.portal.portlet.PortletContext portletContext, final AccessMode accessMode, String instanceId)
+ {
+ return new WSRPInstanceContext(portletContext, accessMode, instanceId);
+ }
+
+ private WindowContext createWindowContext(final String portletHandle, final RuntimeContext runtimeContext)
+ {
+ return new WindowContext()
+ {
+ public String getId()
+ {
+ String prefix = runtimeContext.getNamespacePrefix();
+ if (prefix != null && prefix.length() > 0)
+ {
+ return prefix;
+ }
+ else
+ {
+ // No provided namespace prefix for portlet, using portlet handle instead
+ return portletHandle;
+ }
+ }
+ };
+ }
+
+ private UserContext createUserContext(final org.jboss.portal.wsrp.core.UserContext userContext,
+ String preferredLocale, final String[] supportedLocales)
+ {
+ // todo: investigate ways to cache this information?
+ // fix-me: should getInformations be put in the request attribute PortletRequest.USER_INFO?
+ return UserContextConverter.createPortalUserContextFrom(userContext, supportedLocales, preferredLocale);
+ }
+
+ private PortalContext createPortalContext(final MarkupParams params, final MarkupRequest markupRequest)
+ {
+ return new PortalContext()
+ {
+
+ public String getInfo()
+ {
+ return PortalContext.VERSION.toString();
+ }
+
+ public Set<WindowState> getWindowStates()
+ {
+ String[] validNewWindowStates = params.getValidNewWindowStates();
+ if (validNewWindowStates != null)
+ {
+ Set<WindowState> states = new HashSet<WindowState>(validNewWindowStates.length);
+ for (String state : validNewWindowStates)
+ {
+ states.add(WSRPUtils.getJSR168WindowStateFromWSRPName(state));
+ }
+ return states;
+ }
+ return markupRequest.getSupportedWindowStates();
+ }
+
+ public Set<Mode> getModes()
+ {
+ String[] validNewModes = params.getValidNewModes();
+ if (validNewModes != null)
+ {
+ Set<Mode> modes = new HashSet<Mode>(validNewModes.length);
+ for (String mode : validNewModes)
+ {
+ modes.add(WSRPUtils.getJSR168PortletModeFromWSRPName(mode));
+ }
+ return modes;
+ }
+ return markupRequest.getSupportedModes();
+ }
+
+ public Map<String, String> getProperties()
+ {
+ return Collections.emptyMap();
+ }
+ };
+ }
+
+ private MarkupInfo createStreamInfo(MarkupRequest markupRequest)
+ {
+ MarkupInfo markupInfo;
+ try
+ {
+ markupInfo = new MarkupInfo(MediaType.create(markupRequest.getMediaType()), markupRequest.getCharacterSet());
+ }
+ catch (IllegalArgumentException e)
+ {
+ throw WSRPExceptionFactory.throwSOAPFaultException(WSRPExceptionFactory.UNSUPPORTED_MIME_TYPE,
+ e.getLocalizedMessage(), e);
+ }
+ return markupInfo;
+ }
+
+ // fix-me: check that the correct semantics is used.
+ private SecurityContext createSecurityContext(final MarkupParams params, final RuntimeContext runtimeContext,
+ final org.jboss.portal.wsrp.core.UserContext wsrpUserContext)
+ {
+ return new SecurityContext()
+ {
+ public boolean isSecure()
+ {
+ return params.isSecureClientCommunication();
+ }
+
+ public String getAuthType()
+ {
+ return runtimeContext.getUserAuthentication();
+ }
+
+ public String getRemoteUser()
+ {
+ if (wsrpUserContext != null)
+ {
+ return wsrpUserContext.getUserContextKey();
+ }
+ return null;
+ }
+
+ public Principal getUserPrincipal()
+ {
+ return null;
+ }
+
+ public boolean isUserInRole(String roleName)
+ {
+ return wsrpUserContext != null && Tools.isContainedIn(roleName, wsrpUserContext.getUserCategories());
+ }
+
+ public boolean isAuthenticated()
+ {
+ return wsrpUserContext != null;
+ }
+ };
+ }
+
+ public PortletInvocation getInvocation()
+ {
+ return invocation;
+ }
+
+ public void setInvocation(PortletInvocation invocation)
+ {
+ this.invocation = invocation;
+ }
+}
Added: modules/wsrp/trunk/producer/src/main/java/org/jboss/portal/wsrp/producer/ServiceDescriptionHandler.java
===================================================================
--- modules/wsrp/trunk/producer/src/main/java/org/jboss/portal/wsrp/producer/ServiceDescriptionHandler.java (rev 0)
+++ modules/wsrp/trunk/producer/src/main/java/org/jboss/portal/wsrp/producer/ServiceDescriptionHandler.java 2009-07-22 20:25:22 UTC (rev 13587)
@@ -0,0 +1,302 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2009, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+
+package org.jboss.portal.wsrp.producer;
+
+import org.jboss.portal.common.net.media.MediaType;
+import org.jboss.portal.common.util.ParameterValidation;
+import org.jboss.portal.portlet.Portlet;
+import org.jboss.portal.portlet.PortletInvokerException;
+import org.jboss.portal.portlet.info.CapabilitiesInfo;
+import org.jboss.portal.portlet.info.MetaInfo;
+import org.jboss.portal.portlet.info.ModeInfo;
+import org.jboss.portal.portlet.info.PortletInfo;
+import org.jboss.portal.portlet.info.WindowStateInfo;
+import org.jboss.portal.registration.Registration;
+import org.jboss.portal.wsrp.WSRPExceptionFactory;
+import org.jboss.portal.wsrp.WSRPTypeFactory;
+import org.jboss.portal.wsrp.WSRPUtils;
+import org.jboss.portal.wsrp.core.CookieProtocol;
+import org.jboss.portal.wsrp.core.GetServiceDescription;
+import org.jboss.portal.wsrp.core.InvalidHandleFault;
+import org.jboss.portal.wsrp.core.InvalidRegistrationFault;
+import org.jboss.portal.wsrp.core.MarkupType;
+import org.jboss.portal.wsrp.core.ModelDescription;
+import org.jboss.portal.wsrp.core.OperationFailedFault;
+import org.jboss.portal.wsrp.core.PortletContext;
+import org.jboss.portal.wsrp.core.PortletDescription;
+import org.jboss.portal.wsrp.core.RegistrationContext;
+import org.jboss.portal.wsrp.core.ServiceDescription;
+import org.jboss.portal.wsrp.core.WSRP_v1_ServiceDescription_PortType;
+import org.jboss.portal.wsrp.producer.config.ProducerRegistrationRequirements;
+
+import java.rmi.RemoteException;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.Locale;
+import java.util.Map;
+import java.util.Set;
+
+/**
+ * @author <a href="mailto:chris.laprun@jboss.com">Chris Laprun</a>
+ * @version $Revision: 12017 $
+ * @since 2.4
+ */
+class ServiceDescriptionHandler extends ServiceHandler implements WSRP_v1_ServiceDescription_PortType
+{
+ // JBPORTAL-1220: force call to initCookie... Required so that BEA version < 9.2 will behave properly as a Consumer
+ private final CookieProtocol BEA_8_CONSUMER_FIX = CookieProtocol.perUser;
+
+ ServiceDescriptionHandler(WSRPProducerImpl producer)
+ {
+ super(producer);
+ }
+
+ public ServiceDescription getServiceDescription(GetServiceDescription gs)
+ throws InvalidRegistrationFault, OperationFailedFault, RemoteException
+ {
+ WSRPExceptionFactory.throwOperationFailedFaultIfValueIsMissing(gs, "GetServiceDescription");
+
+ RegistrationContext registrationContext = gs.getRegistrationContext();
+
+ ProducerRegistrationRequirements requirements = producer.getProducerRegistrationRequirements();
+ PortletDescription[] offeredPortlets;
+ ServiceDescription serviceDescription = WSRPTypeFactory.createServiceDescription(requirements.isRegistrationRequired());
+ serviceDescription.setRequiresInitCookie(BEA_8_CONSUMER_FIX);
+ serviceDescription.setLocales(producer.getSupportedLocales());
+
+ // if a RegistrationContext is provided, we need to validate the registration information
+ Registration registration = null;
+ if (registrationContext != null)
+ {
+ registration = producer.getRegistrationOrFailIfInvalid(registrationContext);
+ }
+
+ // get the portlet descriptions based on registration information
+ offeredPortlets = getPortletDescriptions(gs.getDesiredLocales(), registration);
+ serviceDescription.setOfferedPortlets(offeredPortlets);
+
+ // if we don't have registration information but a registration is required, send registration props information
+ if (registration == null && requirements.isRegistrationRequired())
+ {
+ log.debug("Unregistered consumer while registration is required. Sending registration information.");
+
+ // do not create a ModelDescription if there is no registration properties
+ Map info = requirements.getRegistrationProperties();
+ ModelDescription description = null;
+ if (info != null && !info.isEmpty())
+ {
+ description = WSRPUtils.convertRegistrationPropertiesToModelDescription(info);
+ }
+
+ serviceDescription.setRegistrationPropertyDescription(description);
+ }
+
+ serviceDescription.setOfferedPortlets(offeredPortlets);
+ return serviceDescription;
+ }
+
+
+ public Set<PortletDescription> getOfferedPortletDescriptions(String[] desiredLocales)
+ {
+ Set<Portlet> portlets;
+ try
+ {
+ portlets = producer.getRemotablePortlets();
+ }
+ catch (PortletInvokerException e)
+ {
+ log.warn("Could not retrieve portlets. Reason:\n\t" + e.getLocalizedMessage());
+ return Collections.emptySet();
+ }
+
+ Set<PortletDescription> offeredPortletDescriptions = new HashSet<PortletDescription>(portlets.size());
+
+ for (Portlet portlet : portlets)
+ {
+ PortletDescription desc = getPortletDescription(portlet, desiredLocales);
+ offeredPortletDescriptions.add(desc);
+ }
+
+ return offeredPortletDescriptions;
+ }
+
+ public PortletDescription getPortletDescription(PortletContext portletContext, String[] desiredLocales, Registration registration) throws InvalidHandleFault, OperationFailedFault
+ {
+ ParameterValidation.throwIllegalArgExceptionIfNull(portletContext, "portlet context");
+ Portlet portlet;
+ try
+ {
+ portlet = producer.getPortletWith(WSRPUtils.convertToPortalPortletContext(portletContext), registration);
+ return getPortletDescription(portlet, desiredLocales);
+ }
+ catch (PortletInvokerException e)
+ {
+ throw WSRPExceptionFactory.throwSOAPFaultException(WSRPExceptionFactory.OPERATION_FAILED,
+ "Could not retrieve portlet '" + portletContext + "'", e);
+ }
+ }
+
+ /**
+ * @param desiredLocales the locales in which the portlet descriptions must be provided (best effort)
+ * @param registration used to filter offered portlet lists
+ * @return an array of portlet descriptions offered by this producer (which could be filtered based on the
+ * registration information) or <code>null</code> if no registration is provided and the producer requires
+ * registration to access the full service description.
+ */
+ private PortletDescription[] getPortletDescriptions(String[] desiredLocales, Registration registration)
+ {
+ ProducerRegistrationRequirements registrationReq = producer.getProducerRegistrationRequirements();
+ if (registration == null && registrationReq.isRegistrationRequired() && registrationReq.isRegistrationRequiredForFullDescription())
+ {
+ return null;
+ }
+
+ Set<PortletDescription> descriptions = getOfferedPortletDescriptions(desiredLocales);
+ return descriptions.toArray(new PortletDescription[descriptions.size()]);
+ }
+
+ /**
+ * Creates a PortletDescription based on the user desired locales (ordered according to user preferences) for the
+ * specified component.
+ *
+ * @param portlet
+ * @param desiredLocales the user desired locales (ordered according to user preferences) to use for the description
+ * @return a PortletDescription describing the specified portlet
+ */
+ PortletDescription getPortletDescription(Portlet portlet, String[] desiredLocales)
+ {
+ String id = portlet.getContext().getId();
+ PortletInfo info = portlet.getInfo();
+ log.debug("Constructing portlet description for: " + id);
+
+ CapabilitiesInfo capInfo = info.getCapabilities();
+ Collection<MediaType> allMediaTypes = capInfo.getMediaTypes();
+ MarkupType[] markupTypes = new MarkupType[allMediaTypes.size()];
+ Iterator<MediaType> mediaTypes = allMediaTypes.iterator();
+ for (int i = 0; mediaTypes.hasNext(); i++)
+ {
+ MediaType mimeType = mediaTypes.next();
+ markupTypes[i] = new MarkupType(
+ mimeType.getValue(),
+ getModeNamesFrom(capInfo.getModes(mimeType)),
+ getWindowStateNamesFrom(capInfo.getWindowStates(mimeType)),
+ getLocaleNamesFrom(capInfo.getLocales(mimeType)),
+ null);
+ }
+
+ //todo generate a valid and better portlet handle
+ PortletDescription desc = WSRPTypeFactory.createPortletDescription(id, markupTypes);
+
+ // todo: group ID
+
+ MetaInfo metaInfo = info.getMeta();
+
+ // description
+ desc.setDescription(WSRPUtils.convertToWSRPLocalizedString(metaInfo.getMetaValue(MetaInfo.DESCRIPTION), desiredLocales));
+
+ // short title
+ desc.setShortTitle(WSRPUtils.convertToWSRPLocalizedString(metaInfo.getMetaValue(MetaInfo.SHORT_TITLE), desiredLocales));
+
+ // title
+ desc.setTitle(WSRPUtils.convertToWSRPLocalizedString(metaInfo.getMetaValue(MetaInfo.TITLE), desiredLocales));
+
+ // display name
+ desc.setDisplayName(WSRPUtils.convertToWSRPLocalizedString(metaInfo.getMetaValue(MetaInfo.DISPLAY_NAME), desiredLocales));
+
+ // keywords
+ // metaInfo contains comma-separated keywords: we need to extract them into an array
+ org.jboss.portal.wsrp.core.LocalizedString concatenatedKeywords =
+ WSRPUtils.convertToWSRPLocalizedString(metaInfo.getMetaValue(MetaInfo.KEYWORDS), desiredLocales);
+ if (concatenatedKeywords != null)
+ {
+ String commaSeparatedKeywords = concatenatedKeywords.getValue();
+ if (commaSeparatedKeywords != null && commaSeparatedKeywords.length() > 0)
+ {
+ String lang = concatenatedKeywords.getLang();
+ String[] keywordArray = commaSeparatedKeywords.split(",");
+ org.jboss.portal.wsrp.core.LocalizedString[] keywords =
+ new org.jboss.portal.wsrp.core.LocalizedString[keywordArray.length];
+ for (int i = 0; i < keywordArray.length; i++)
+ {
+ keywords[i] = WSRPTypeFactory.createLocalizedString(lang, null, keywordArray[i].trim()); // fix-me: resource name
+ }
+ desc.setKeywords(keywords);
+ }
+ }
+
+ /* todo:
+ * [O] string userCategories[]
+ * [O] string userProfileItems[]
+ * [O] boolean usesMethodGet
+ * [O] boolean defaultMarkupSecure
+ * [O] boolean onlySecure
+ * [O] boolean userContextStoredInSession
+ * [O] boolean templatesStoredInSession
+ * [O] boolean hasUserSpecificState
+ * [O] boolean doesUrlTemplateProcessing
+ * [O] Extension extensions
+ */
+ return desc;
+ }
+
+ private String[] getLocaleNamesFrom(Collection<Locale> locales)
+ {
+ if (locales == null || locales.isEmpty())
+ {
+ return null;
+ }
+
+ String[] localeNames = new String[locales.size()];
+ int i = 0;
+ for (Locale locale : locales)
+ {
+ localeNames[i++] = WSRPUtils.toString(locale);
+ }
+ return localeNames;
+ }
+
+ private String[] getWindowStateNamesFrom(Collection<WindowStateInfo> windowStates)
+ {
+ String[] result = new String[windowStates.size()];
+ int i = 0;
+ for (WindowStateInfo windowStateInfo : windowStates)
+ {
+ result[i++] = WSRPUtils.convertJSR168WindowStateNameToWSRPName(windowStateInfo.getWindowStateName());
+ }
+ return result;
+ }
+
+ private String[] getModeNamesFrom(Collection<ModeInfo> modes)
+ {
+ String[] result = new String[modes.size()];
+ int i = 0;
+ for (ModeInfo modeInfo : modes)
+ {
+ result[i++] = WSRPUtils.convertJSR168PortletModeNameToWSRPName(modeInfo.getModeName());
+ }
+ return result;
+ }
+}
Property changes on: modules/wsrp/trunk/producer/src/main/java/org/jboss/portal/wsrp/producer/ServiceDescriptionHandler.java
___________________________________________________________________
Name: svn:executable
+ *
Added: modules/wsrp/trunk/producer/src/main/java/org/jboss/portal/wsrp/producer/ServiceHandler.java
===================================================================
--- modules/wsrp/trunk/producer/src/main/java/org/jboss/portal/wsrp/producer/ServiceHandler.java (rev 0)
+++ modules/wsrp/trunk/producer/src/main/java/org/jboss/portal/wsrp/producer/ServiceHandler.java 2009-07-22 20:25:22 UTC (rev 13587)
@@ -0,0 +1,43 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2009, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+
+package org.jboss.portal.wsrp.producer;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * @author <a href="mailto:chris.laprun@jboss.com">Chris Laprun</a>
+ * @version $Revision: 8784 $
+ * @since 2.4
+ */
+class ServiceHandler
+{
+ protected WSRPProducerImpl producer;
+ protected static final Logger log = LoggerFactory.getLogger(ServiceHandler.class);
+
+ ServiceHandler(WSRPProducerImpl producer)
+ {
+ this.producer = producer;
+ }
+}
Added: modules/wsrp/trunk/producer/src/main/java/org/jboss/portal/wsrp/producer/WSRPInstanceContext.java
===================================================================
--- modules/wsrp/trunk/producer/src/main/java/org/jboss/portal/wsrp/producer/WSRPInstanceContext.java (rev 0)
+++ modules/wsrp/trunk/producer/src/main/java/org/jboss/portal/wsrp/producer/WSRPInstanceContext.java 2009-07-22 20:25:22 UTC (rev 13587)
@@ -0,0 +1,89 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2009, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+
+package org.jboss.portal.wsrp.producer;
+
+import org.jboss.portal.common.util.ParameterValidation;
+import org.jboss.portal.portlet.PortletContext;
+import org.jboss.portal.portlet.StateEvent;
+import org.jboss.portal.portlet.spi.InstanceContext;
+import org.jboss.portal.portlet.state.AccessMode;
+
+/**
+ * @author <a href="mailto:chris.laprun@jboss.com">Chris Laprun</a>
+ * @version $Revision: 8784 $
+ * @since 2.6
+ */
+class WSRPInstanceContext implements InstanceContext
+{
+ private PortletContext context;
+ private String instanceId;
+ private final AccessMode accessMode;
+ private boolean wasModified = false;
+
+ public WSRPInstanceContext(PortletContext portletContext, AccessMode accessMode, String instanceId)
+ {
+ ParameterValidation.throwIllegalArgExceptionIfNull(portletContext, "portlet context");
+ ParameterValidation.throwIllegalArgExceptionIfNull(accessMode, "AccessMode");
+
+ this.context = portletContext;
+ this.accessMode = accessMode;
+
+ if (instanceId != null && instanceId.length() > 0)
+ {
+ this.instanceId = instanceId;
+ }
+ else
+ {
+ this.instanceId = portletContext.getId();
+ }
+ }
+
+ public String getId()
+ {
+ return instanceId;
+ }
+
+ public AccessMode getAccessMode()
+ {
+ return accessMode;
+ }
+
+ public void onStateEvent(StateEvent event)
+ {
+ PortletContext portletContext = event.getPortletContext();
+ ParameterValidation.throwIllegalArgExceptionIfNull(portletContext, "PortletContext");
+ wasModified = true;
+ context = portletContext;
+ }
+
+ public boolean wasModified()
+ {
+ return wasModified;
+ }
+
+ public PortletContext getPortletContext()
+ {
+ return context;
+ }
+}
Added: modules/wsrp/trunk/producer/src/main/java/org/jboss/portal/wsrp/producer/WSRPPortletInvocationContext.java
===================================================================
--- modules/wsrp/trunk/producer/src/main/java/org/jboss/portal/wsrp/producer/WSRPPortletInvocationContext.java (rev 0)
+++ modules/wsrp/trunk/producer/src/main/java/org/jboss/portal/wsrp/producer/WSRPPortletInvocationContext.java 2009-07-22 20:25:22 UTC (rev 13587)
@@ -0,0 +1,168 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2009, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+
+package org.jboss.portal.wsrp.producer;
+
+import org.jboss.portal.common.NotYetImplemented;
+import org.jboss.portal.common.net.URLTools;
+import org.jboss.portal.common.util.MarkupInfo;
+import org.jboss.portal.portlet.ContainerURL;
+import org.jboss.portal.portlet.PortletURL;
+import org.jboss.portal.portlet.ResourceURL;
+import org.jboss.portal.portlet.URLFormat;
+import org.jboss.portal.portlet.impl.spi.AbstractClientContext;
+import org.jboss.portal.portlet.impl.spi.AbstractPortletInvocationContext;
+import org.jboss.portal.portlet.impl.spi.AbstractServerContext;
+import org.jboss.portal.portlet.invocation.PortletInvocation;
+import org.jboss.portal.portlet.spi.InstanceContext;
+import org.jboss.portal.portlet.spi.PortalContext;
+import org.jboss.portal.portlet.spi.PortletInvocationContext;
+import org.jboss.portal.portlet.spi.SecurityContext;
+import org.jboss.portal.portlet.spi.UserContext;
+import org.jboss.portal.portlet.spi.WindowContext;
+import org.jboss.portal.wsrp.WSRPPortletURL;
+import org.jboss.portal.wsrp.WSRPRewritingConstants;
+import org.jboss.portal.wsrp.servlet.ServletAccess;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @author <a href="mailto:chris.laprun@jboss.com">Chris Laprun</a>
+ * @version $Revision: 13121 $
+ */
+class WSRPPortletInvocationContext extends AbstractPortletInvocationContext implements PortletInvocationContext
+{
+ private SecurityContext securityContext;
+ private PortalContext portalContext;
+ private UserContext userContext;
+ private InstanceContext instanceContext;
+ private WindowContext windowContext;
+
+ private static final String EQ = "=";
+ private static final String AMP = "&";
+ private static final String EQ_TRUE = "=true";
+ private HttpServletRequest request;
+ private HttpServletResponse response;
+
+ public WSRPPortletInvocationContext(MarkupInfo markupInfo, SecurityContext securityContext, PortalContext portalContext, UserContext userContext,
+ InstanceContext instanceContext, WindowContext windowContext)
+ {
+ super(markupInfo);
+
+ this.securityContext = securityContext;
+ this.portalContext = portalContext;
+ this.userContext = userContext;
+ this.instanceContext = instanceContext;
+ this.windowContext = windowContext;
+
+ request = ServletAccess.getRequest();
+ response = ServletAccess.getResponse();
+ }
+
+ public HttpServletRequest getClientRequest()
+ {
+ return request;
+ }
+
+ public HttpServletResponse getClientResponse()
+ {
+ return response;
+ }
+
+ /** Override the default behavior in order to avoid to encode when it is producer written URL. */
+ public String encodeResourceURL(String url)
+ {
+ if (url != null && !url.startsWith(WSRPRewritingConstants.BEGIN_WSRP_REWRITE))
+ {
+ // make root relative URLs absolute. Optimization: we don't recheck the precense of the WSRP token.
+ url = new AbsoluteURLReplacementGenerator(getClientRequest()).getAbsoluteURLFor(url, false);
+
+ // properly encode the URL
+ url = URLTools.encodeXWWWFormURL(url);
+
+ // build the WSRP resource URL with rewrite tokens
+ StringBuffer sb = new StringBuffer(url.length() * 2);
+ sb.append(WSRPRewritingConstants.BEGIN_WSRP_REWRITE).append(WSRPRewritingConstants.URL_TYPE_NAME)
+ .append(EQ).append(WSRPRewritingConstants.URL_TYPE_RESOURCE).append(AMP)
+ .append(WSRPRewritingConstants.RESOURCE_URL).append(EQ).append(url)
+ .append(AMP).append(WSRPRewritingConstants.RESOURCE_REQUIRES_REWRITE)
+ .append(EQ_TRUE).append(WSRPRewritingConstants.END_WSRP_REWRITE);
+ return sb.toString();
+ }
+
+ return url;
+ }
+
+ /**
+ * <p>URL to be re-written are of the form: <code>wsrp_rewrite?wsrp-urlType=value&amp;name1=value1&amp;name2=value2
+ * .../wsrp_rewrite</code> </p> <ul>Examples: <li>Load a resource http://test.com/images/test.gif: <br/>
+ * <code>wsrp_rewrite?wsrp-urlType=resource&amp;wsrp-url=http%3A%2F%2Ftest.com%2Fimages%2Ftest.gif&amp;wsrp-requiresRewrite=true/wsrp_rewrite</code></li>
+ * <li>Declare a secure interaction back to the Portlet:<br/> <code>wsrp_rewrite?wsrp-urlType=blockingAction&amp;wsrp-secureURL=true&amp;wsrp-navigationalState=a8h4K5JD9&amp;wsrp-interactionState=fg4h923mdk/wsrp_rewrite</code></li>
+ * <li>Request the Consumer render the Portlet in a different mode and window state:
+ * <code>wsrp_rewrite?wsrp-urlType=render&amp;wsrp-mode=help&amp;wsrp-windowState=maximized/wsrp_rewrite</code></li>
+ * </ul>
+ *
+ * @param containerURL
+ * @param urlFormat
+ * @return
+ */
+ public String renderURL(ContainerURL containerURL, URLFormat urlFormat)
+ {
+ if (containerURL != null)
+ {
+ if (containerURL instanceof PortletURL)
+ {
+ PortletURL portletURL = (PortletURL)containerURL;
+
+ Boolean wantSecureBool = urlFormat.getWantSecure();
+ boolean wantSecure = (wantSecureBool != null ? wantSecureBool : false);
+ return WSRPPortletURL.create(portletURL, wantSecure).toString();
+ }
+ else if (containerURL instanceof ResourceURL)
+ {
+ ResourceURL resourceURL = (ResourceURL)containerURL;
+ throw new NotYetImplemented("ResourceURL support not implemented. Requested URL: " + resourceURL);
+ }
+ }
+ return null;
+ }
+
+ public void contextualize(PortletInvocation invocation)
+ {
+ invocation.setClientContext(new AbstractClientContext(request));
+ invocation.setServerContext(new AbstractServerContext(request, response));
+
+ invocation.setSecurityContext(securityContext);
+ invocation.setInstanceContext(instanceContext);
+ invocation.setWindowContext(windowContext);
+ invocation.setPortalContext(portalContext);
+ invocation.setUserContext(userContext);
+ }
+
+ WindowContext getWindowContext()
+ {
+ return windowContext;
+ }
+}
Property changes on: modules/wsrp/trunk/producer/src/main/java/org/jboss/portal/wsrp/producer/WSRPPortletInvocationContext.java
___________________________________________________________________
Name: svn:executable
+ *
Added: modules/wsrp/trunk/producer/src/main/java/org/jboss/portal/wsrp/producer/WSRPProducerImpl.java
===================================================================
--- modules/wsrp/trunk/producer/src/main/java/org/jboss/portal/wsrp/producer/WSRPProducerImpl.java (rev 0)
+++ modules/wsrp/trunk/producer/src/main/java/org/jboss/portal/wsrp/producer/WSRPProducerImpl.java 2009-07-22 20:25:22 UTC (rev 13587)
@@ -0,0 +1,511 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2009, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+
+package org.jboss.portal.wsrp.producer;
+
+import org.jboss.portal.jems.as.system.AbstractJBossService;
+import org.jboss.portal.portlet.NoSuchPortletException;
+import org.jboss.portal.portlet.Portlet;
+import org.jboss.portal.portlet.PortletInvoker;
+import org.jboss.portal.portlet.PortletInvokerException;
+import org.jboss.portal.portlet.info.RuntimeOptionInfo;
+import org.jboss.portal.registration.Registration;
+import org.jboss.portal.registration.RegistrationLocal;
+import org.jboss.portal.registration.RegistrationManager;
+import org.jboss.portal.wsrp.ResponseDebugFactory;
+import org.jboss.portal.wsrp.WSRPConstants;
+import org.jboss.portal.wsrp.WSRPExceptionFactory;
+import org.jboss.portal.wsrp.WSRPProducer;
+import org.jboss.portal.wsrp.core.AccessDeniedFault;
+import org.jboss.portal.wsrp.core.BlockingInteractionResponse;
+import org.jboss.portal.wsrp.core.ClonePortlet;
+import org.jboss.portal.wsrp.core.CookieProtocol;
+import org.jboss.portal.wsrp.core.DestroyPortlets;
+import org.jboss.portal.wsrp.core.DestroyPortletsResponse;
+import org.jboss.portal.wsrp.core.GetMarkup;
+import org.jboss.portal.wsrp.core.GetPortletDescription;
+import org.jboss.portal.wsrp.core.GetPortletProperties;
+import org.jboss.portal.wsrp.core.GetPortletPropertyDescription;
+import org.jboss.portal.wsrp.core.GetServiceDescription;
+import org.jboss.portal.wsrp.core.InconsistentParametersFault;
+import org.jboss.portal.wsrp.core.InitCookie;
+import org.jboss.portal.wsrp.core.InvalidCookieFault;
+import org.jboss.portal.wsrp.core.InvalidHandleFault;
+import org.jboss.portal.wsrp.core.InvalidRegistrationFault;
+import org.jboss.portal.wsrp.core.InvalidSessionFault;
+import org.jboss.portal.wsrp.core.InvalidUserCategoryFault;
+import org.jboss.portal.wsrp.core.MarkupResponse;
+import org.jboss.portal.wsrp.core.MissingParametersFault;
+import org.jboss.portal.wsrp.core.ModifyRegistration;
+import org.jboss.portal.wsrp.core.OperationFailedFault;
+import org.jboss.portal.wsrp.core.PerformBlockingInteraction;
+import org.jboss.portal.wsrp.core.PortletContext;
+import org.jboss.portal.wsrp.core.PortletDescription;
+import org.jboss.portal.wsrp.core.PortletDescriptionResponse;
+import org.jboss.portal.wsrp.core.PortletPropertyDescriptionResponse;
+import org.jboss.portal.wsrp.core.PortletStateChangeRequiredFault;
+import org.jboss.portal.wsrp.core.PropertyList;
+import org.jboss.portal.wsrp.core.RegistrationContext;
+import org.jboss.portal.wsrp.core.RegistrationData;
+import org.jboss.portal.wsrp.core.RegistrationState;
+import org.jboss.portal.wsrp.core.ReleaseSessions;
+import org.jboss.portal.wsrp.core.ReturnAny;
+import org.jboss.portal.wsrp.core.ServiceDescription;
+import org.jboss.portal.wsrp.core.SetPortletProperties;
+import org.jboss.portal.wsrp.core.UnsupportedLocaleFault;
+import org.jboss.portal.wsrp.core.UnsupportedMimeTypeFault;
+import org.jboss.portal.wsrp.core.UnsupportedModeFault;
+import org.jboss.portal.wsrp.core.UnsupportedWindowStateFault;
+import org.jboss.portal.wsrp.producer.config.ProducerConfiguration;
+import org.jboss.portal.wsrp.producer.config.ProducerConfigurationService;
+import org.jboss.portal.wsrp.producer.config.ProducerRegistrationRequirements;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.rmi.RemoteException;
+import java.util.Collections;
+import java.util.HashSet;
+import java.util.Map;
+import java.util.Set;
+
+/**
+ * @author <a href="mailto:chris.laprun@jboss.com">Chris Laprun</a>
+ * @version $Revision: 12286 $
+ * @since 2.4
+ */
+public class WSRPProducerImpl extends AbstractJBossService implements WSRPProducer
+{
+ /** logger used for logging ;) */
+ private static final Logger log = LoggerFactory.getLogger(WSRPProducerImpl.class);
+
+ /** The invoker used to retrieve portlet information and invoke methods. */
+ private PortletInvoker invoker;
+
+ /** Handles Markup interface calls. */
+ private MarkupHandler markupHandler;
+
+ /** Handles ServiceDescription interface calls. */
+ private ServiceDescriptionHandler serviceDescriptionHandler;
+
+ /** Handles Registration interface calls. */
+ private RegistrationHandler registrationHandler;
+
+ /** Handles Portlet Management interface calls. */
+ private PortletManagementHandler portletManagementHandler;
+
+ /** Registration Manager */
+ private RegistrationManager registrationManager;
+
+ private int sessionExpirationTime = DEFAULT_SESSION_EXPIRATION_TIME;
+
+ private CookieProtocol requiresInitCookie = CookieProtocol.none;
+
+ /** Supported locales. */
+ private String[] supportedLocales = WSRPConstants.getDefaultLocales();
+
+ /** configuration service */
+ private ProducerConfigurationService configurationService;
+
+ public WSRPProducerImpl()
+ {
+ markupHandler = new MarkupHandler(this);
+ serviceDescriptionHandler = new ServiceDescriptionHandler(this);
+ registrationHandler = new RegistrationHandler(this);
+ portletManagementHandler = new PortletManagementHandler(this);
+ }
+
+ public ProducerRegistrationRequirements getProducerRegistrationRequirements()
+ {
+ return getProducerConfiguration().getRegistrationRequirements();
+ }
+
+ // ServiceDescription implementation ********************************************************************************
+
+ public ServiceDescription getServiceDescription(GetServiceDescription gs)
+ throws InvalidRegistrationFault, OperationFailedFault, RemoteException
+ {
+ log.debug("getServiceDescription invoked");
+ ServiceDescription sd = serviceDescriptionHandler.getServiceDescription(gs);
+
+ //to avoid unnesessary processing
+ if (log.isDebugEnabled())
+ {
+ //catch all exceptions as we don't wan't to blow producer flow
+ try
+ {
+ log.debug("getServiceDescription() response data: ");
+ log.debug(ResponseDebugFactory.extractServiceDescription(sd).toString());
+ }
+ catch (Exception e)
+ {
+ e.printStackTrace();
+ }
+ }
+
+ log.debug("end getServiceDescription");
+ return sd;
+ }
+
+ // MarkupService implementation *************************************************************************************
+
+ public MarkupResponse getMarkup(GetMarkup getMarkup)
+ throws UnsupportedWindowStateFault, InvalidCookieFault, InvalidSessionFault, AccessDeniedFault,
+ InconsistentParametersFault, InvalidHandleFault, UnsupportedLocaleFault, UnsupportedModeFault,
+ OperationFailedFault, MissingParametersFault, InvalidUserCategoryFault, InvalidRegistrationFault,
+ UnsupportedMimeTypeFault, RemoteException
+ {
+ log.debug("getMarkup invoked");
+ MarkupResponse response = markupHandler.getMarkup(getMarkup);
+ log.debug("end getMarkup");
+ return response;
+ }
+
+ public BlockingInteractionResponse performBlockingInteraction(PerformBlockingInteraction performBlockingInteraction)
+ throws InvalidSessionFault, UnsupportedModeFault, UnsupportedMimeTypeFault, OperationFailedFault,
+ UnsupportedWindowStateFault, UnsupportedLocaleFault, AccessDeniedFault, PortletStateChangeRequiredFault,
+ InvalidRegistrationFault, MissingParametersFault, InvalidUserCategoryFault, InconsistentParametersFault,
+ InvalidHandleFault, InvalidCookieFault, RemoteException
+ {
+ log.debug("performBlockingInteraction invoked");
+ BlockingInteractionResponse interactionResponse = markupHandler.performBlockingInteraction(performBlockingInteraction);
+ log.debug("end performBlockingInteraction");
+ return interactionResponse;
+ }
+
+ public ReturnAny releaseSessions(ReleaseSessions releaseSessions)
+ throws InvalidRegistrationFault, OperationFailedFault, MissingParametersFault, AccessDeniedFault, RemoteException
+ {
+ log.debug("releaseSessions invoked");
+ ReturnAny returnAny = markupHandler.releaseSessions(releaseSessions);
+ log.debug("end releaseSessions");
+ return returnAny;
+ }
+
+ public ReturnAny initCookie(InitCookie initCookie)
+ throws AccessDeniedFault, OperationFailedFault, InvalidRegistrationFault, RemoteException
+ {
+ log.debug("initCookie invoked");
+ ReturnAny returnAny = markupHandler.initCookie(initCookie);
+ log.debug("end initCookie");
+ return returnAny;
+ }
+
+ // Registration implementation **************************************************************************************
+
+ public RegistrationContext register(RegistrationData register) throws MissingParametersFault, OperationFailedFault,
+ RemoteException
+ {
+ log.debug("register invoked");
+ RegistrationContext registrationContext = registrationHandler.register(register);
+ log.debug("end register");
+ return registrationContext;
+ }
+
+ public ReturnAny deregister(RegistrationContext deregister) throws OperationFailedFault, InvalidRegistrationFault,
+ RemoteException
+ {
+ log.debug("deregister invoked");
+ ReturnAny returnAny = registrationHandler.deregister(deregister);
+ log.debug("end deregister");
+ return returnAny;
+ }
+
+ public RegistrationState modifyRegistration(ModifyRegistration modifyRegistration) throws MissingParametersFault,
+ OperationFailedFault, InvalidRegistrationFault, RemoteException
+ {
+ log.debug("modifyRegistration invoked");
+ RegistrationState registrationState = registrationHandler.modifyRegistration(modifyRegistration);
+ log.debug("end modifyRegistration");
+ return registrationState;
+ }
+
+ public ProducerConfiguration getProducerConfiguration()
+ {
+ return configurationService.getConfiguration();
+ }
+
+ public RegistrationManager getRegistrationManager()
+ {
+ return registrationManager;
+ }
+
+ public void setRegistrationManager(RegistrationManager registrationManager)
+ {
+ this.registrationManager = registrationManager;
+ }
+
+ public void setProducerConfigurationService(ProducerConfigurationService configurationService)
+ {
+ this.configurationService = configurationService;
+ }
+
+ public ProducerConfigurationService getConfigurationService()
+ {
+ return configurationService;
+ }
+
+ protected void startService() throws Exception
+ {
+ super.startService();
+
+ ProducerConfiguration configuration = configurationService.getConfiguration();
+
+ // register to listen to changes in configuration and get initial state
+ configuration.addChangeListener(this);
+ usingStrictModeChangedTo(configuration.isUsingStrictMode());
+
+ ProducerRegistrationRequirements registrationRequirements = getProducerRegistrationRequirements();
+ registrationRequirements.addRegistrationPolicyChangeListener(registrationManager);
+ registrationRequirements.addRegistrationPropertyChangeListener(registrationManager);
+
+ if (registrationRequirements.isRegistrationRequired())
+ {
+ registrationManager.setPolicy(registrationRequirements.getPolicy());
+ }
+ }
+
+ protected void stopService() throws Exception
+ {
+ ProducerRegistrationRequirements registrationRequirements = getProducerRegistrationRequirements();
+ registrationRequirements.removeRegistrationPropertyChangeListener(registrationManager);
+ registrationRequirements.removeRegistrationPolicyChangeListener(registrationManager);
+
+ getProducerConfiguration().removeChangeListener(this);
+
+ super.stopService();
+ }
+
+ // PortletManagement implementation *********************************************************************************
+
+ public PortletDescriptionResponse getPortletDescription(GetPortletDescription getPortletDescription)
+ throws AccessDeniedFault, InvalidHandleFault, InvalidUserCategoryFault, InconsistentParametersFault,
+ MissingParametersFault, InvalidRegistrationFault, OperationFailedFault, RemoteException
+ {
+ log.debug("getPortletDescription invoked");
+ PortletDescriptionResponse description = portletManagementHandler.getPortletDescription(getPortletDescription);
+ log.debug("end getPortletDescription");
+ return description;
+ }
+
+ public PortletContext clonePortlet(ClonePortlet clonePortlet) throws InvalidUserCategoryFault, AccessDeniedFault,
+ OperationFailedFault, InvalidHandleFault, InvalidRegistrationFault, InconsistentParametersFault,
+ MissingParametersFault, RemoteException
+ {
+ log.debug("clonePortlet invoked");
+ PortletContext portletContext = portletManagementHandler.clonePortlet(clonePortlet);
+ log.debug("end clonePortlet");
+ return portletContext;
+ }
+
+ public DestroyPortletsResponse destroyPortlets(DestroyPortlets destroyPortlets) throws InconsistentParametersFault,
+ MissingParametersFault, InvalidRegistrationFault, OperationFailedFault, RemoteException
+ {
+ log.debug("destroyPortlets invoked");
+ DestroyPortletsResponse destroyPortletsResponse = portletManagementHandler.destroyPortlets(destroyPortlets);
+ log.debug("end destroyPortlets");
+ return destroyPortletsResponse;
+ }
+
+ public PortletContext setPortletProperties(SetPortletProperties setPortletProperties) throws OperationFailedFault,
+ InvalidHandleFault, MissingParametersFault, InconsistentParametersFault, InvalidUserCategoryFault,
+ AccessDeniedFault, InvalidRegistrationFault, RemoteException
+ {
+ log.debug("setPortletProperties invoked");
+ PortletContext portletContext = portletManagementHandler.setPortletProperties(setPortletProperties);
+ log.debug("end setPortletProperties");
+ return portletContext;
+ }
+
+ public PropertyList getPortletProperties(GetPortletProperties getPortletProperties) throws InvalidHandleFault,
+ MissingParametersFault, InvalidRegistrationFault, AccessDeniedFault, OperationFailedFault,
+ InconsistentParametersFault, InvalidUserCategoryFault, RemoteException
+ {
+ log.debug("getPortletProperties invoked");
+ PropertyList list = portletManagementHandler.getPortletProperties(getPortletProperties);
+ log.debug("end getPortletProperties");
+ return list;
+ }
+
+ public PortletPropertyDescriptionResponse getPortletPropertyDescription(GetPortletPropertyDescription getPortletPropertyDescription)
+ throws MissingParametersFault, InconsistentParametersFault, InvalidUserCategoryFault, InvalidRegistrationFault,
+ AccessDeniedFault, InvalidHandleFault, OperationFailedFault, RemoteException
+ {
+ log.debug("getPortletPropertyDescription invoked");
+ PortletPropertyDescriptionResponse descriptionResponse = portletManagementHandler.getPortletPropertyDescription(getPortletPropertyDescription);
+ log.debug("end getPortletPropertyDescription");
+ return descriptionResponse;
+ }
+
+ // Producer implementation ******************************************************************************************
+
+ public CookieProtocol getRequiresInitCookie()
+ {
+ return requiresInitCookie;
+ }
+
+ public void setRequiresInitCookie(CookieProtocol requiresInitCookie)
+ {
+ this.requiresInitCookie = requiresInitCookie;
+ }
+
+ // Session management ***********************************************************************************************
+ public int getSessionExpirationTime()
+ {
+ return sessionExpirationTime;
+ }
+
+ public void setSessionExpirationTime(int sessionExpirationTime)
+ {
+ this.sessionExpirationTime = sessionExpirationTime;
+ }
+
+ public PortletInvoker getInvoker()
+ {
+ return invoker;
+ }
+
+ public void setInvoker(PortletInvoker invoker)
+ {
+ this.invoker = invoker;
+ }
+
+ Portlet getPortletWith(org.jboss.portal.portlet.PortletContext portletContext, Registration registration) throws InvalidHandleFault, PortletInvokerException
+ {
+ Portlet portlet;
+ try
+ {
+ RegistrationLocal.setRegistration(registration);
+ portlet = invoker.getPortlet(portletContext);
+ }
+ catch (NoSuchPortletException e)
+ {
+ throw WSRPExceptionFactory.throwSOAPFaultException(WSRPExceptionFactory.INVALID_HANDLE,
+ "Couldn't find portlet with handle '" + portletContext.getId() + "'", null);
+ }
+ finally
+ {
+ RegistrationLocal.setRegistration(null);
+ }
+
+ if (!isRemotable(portlet))
+ {
+ throw WSRPExceptionFactory.throwSOAPFaultException(WSRPExceptionFactory.INVALID_HANDLE,
+ "Portlet '" + portletContext.getId() + "' is not remotely available.", null);
+ }
+
+ return portlet;
+ }
+
+ Set<Portlet> getRemotablePortlets() throws PortletInvokerException
+ {
+ log.debug("Retrieving remotable portlets");
+ Set<Portlet> allPortlets = invoker.getPortlets();
+ int portletNumber = allPortlets.size();
+ Set<Portlet> remotablePortlets = Collections.emptySet();
+ if (portletNumber > 0)
+ {
+ remotablePortlets = new HashSet<Portlet>(portletNumber);
+ for (Portlet portlet : allPortlets)
+ {
+ log.debug("Found portlet: " + portlet.getContext());
+ if (isRemotable(portlet))
+ {
+ remotablePortlets.add(portlet);
+ log.debug("Adding remotable portlet to set: " + portlet.getContext());
+ }
+ }
+ }
+ return remotablePortlets;
+ }
+
+ public PortletDescription getPortletDescription(PortletContext portletContext, String[] locales, Registration registration) throws InvalidHandleFault, OperationFailedFault
+ {
+ return serviceDescriptionHandler.getPortletDescription(portletContext, locales, registration);
+ }
+
+ public PortletDescription getPortletDescription(Portlet portlet, String[] locales)
+ {
+ return serviceDescriptionHandler.getPortletDescription(portlet, locales);
+ }
+
+ /**
+ * @param registrationContext
+ * @return
+ * @throws InvalidRegistrationFault
+ * @throws OperationFailedFault
+ * @since 2.6.2
+ */
+ Registration getRegistrationOrFailIfInvalid(RegistrationContext registrationContext) throws InvalidRegistrationFault, OperationFailedFault
+ {
+ Registration registration = registrationHandler.getRegistrationFrom(registrationContext);
+ registrationHandler.isRegistrationValid(registration, true);
+
+ return registration;
+ }
+
+ private Boolean remotableByDefault;
+
+ public Boolean isRemotableByDefault()
+ {
+ return remotableByDefault;
+ }
+
+ public void setRemotableByDefault(Boolean remotableByDefault)
+ {
+ this.remotableByDefault = remotableByDefault;
+ }
+
+ private boolean isRemotable(Portlet portlet)
+ {
+ Map<String, RuntimeOptionInfo> runtimeOptions = portlet.getInfo().getRuntimeOptionsInfo();
+ RuntimeOptionInfo runtimeOptionInfo = runtimeOptions.get(RuntimeOptionInfo.ORG_JBOSS_PORTLETCONTAINER_REMOTABLE);
+
+ return runtimeOptionInfo != null && "true".equals(runtimeOptionInfo.getValues().get(0));
+
+ /*WSRPInfo wsrpInfo = portletInfo.getAttachment(WSRPInfo.class);
+ if (wsrpInfo != null)
+ {
+ Boolean remotable = wsrpInfo.isRemotable();
+ log.debug("Portlet " + portlet.getContext() + " remotable: " + remotable);
+ if (remotable != null)
+ {
+ return remotable.booleanValue();
+ }
+ }
+ if (isRemotableByDefault() != null)
+ {
+ return isRemotableByDefault().booleanValue();
+ }
+ return false;*/
+ }
+
+ public String[] getSupportedLocales()
+ {
+ return supportedLocales; // todo: avoid hardcoding this at some point...
+ }
+
+ public void usingStrictModeChangedTo(boolean strictMode)
+ {
+ WSRPValidator.setStrict(strictMode);
+ }
+}
Added: modules/wsrp/trunk/producer/src/main/java/org/jboss/portal/wsrp/producer/WSRPRequestContext.java
===================================================================
--- modules/wsrp/trunk/producer/src/main/java/org/jboss/portal/wsrp/producer/WSRPRequestContext.java (rev 0)
+++ modules/wsrp/trunk/producer/src/main/java/org/jboss/portal/wsrp/producer/WSRPRequestContext.java 2009-07-22 20:25:22 UTC (rev 13587)
@@ -0,0 +1,256 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2009, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+
+package org.jboss.portal.wsrp.producer;
+
+import org.apache.commons.fileupload.FileUpload;
+import org.jboss.portal.common.util.ParameterMap;
+import org.jboss.portal.portlet.spi.RequestContext;
+import org.jboss.portal.wsrp.core.InteractionParams;
+import org.jboss.portal.wsrp.core.NamedString;
+import org.jboss.portal.wsrp.core.UploadContext;
+
+import javax.mail.MessagingException;
+import javax.mail.internet.InternetHeaders;
+import javax.mail.internet.MimeBodyPart;
+import javax.mail.internet.MimeMultipart;
+import java.io.BufferedReader;
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 10337 $
+ */
+abstract class WSRPRequestContext implements RequestContext, org.apache.commons.fileupload.RequestContext
+{
+ protected String characterEncoding;
+
+ protected WSRPRequestContext(String characterEncoding)
+ {
+ this.characterEncoding = characterEncoding;
+ }
+
+ public String getCharacterEncoding()
+ {
+ return characterEncoding;
+ }
+
+ public int getContentLength()
+ {
+ throw new UnsupportedOperationException("Not currently supported");
+ }
+
+ public BufferedReader getReader() throws IOException
+ {
+ throw new UnsupportedOperationException("Not currently supported");
+ }
+
+ public InputStream getInputStream() throws IOException
+ {
+ throw new UnsupportedOperationException("Not currently supported");
+ }
+
+ public abstract ParameterMap getForm();
+
+ static class WSRPSimpleRequestContext extends WSRPRequestContext
+ {
+ private ParameterMap formParameters;
+ private String contentType;
+
+ protected WSRPSimpleRequestContext(String characterEncoding, String contentType, NamedString[] formParams)
+ {
+ super(characterEncoding);
+ this.contentType = contentType;
+
+ if (formParams != null && formParams.length > 0)
+ {
+ int length = formParams.length;
+ Map params = new HashMap(length);
+ for (int i = 0; i < length; i++)
+ {
+ NamedString formParam = formParams[i];
+ String paramName = formParam.getName();
+ String paramValue = formParam.getValue();
+ if (params.containsKey(paramName))
+ {
+ // handle multi-valued parameters...
+ String[] oldValues = (String[])params.get(paramName);
+ int valuesLength = oldValues.length;
+ String[] newValues = new String[valuesLength + 1];
+ System.arraycopy(oldValues, 0, newValues, 0, valuesLength);
+ newValues[valuesLength] = paramValue;
+ params.put(paramName, newValues);
+ }
+ else
+ {
+ params.put(paramName, new String[]{paramValue});
+ }
+ }
+ formParameters = new ParameterMap(params);
+ }
+ else
+ {
+ formParameters = new ParameterMap();
+ }
+
+ }
+
+ public ParameterMap getForm()
+ {
+ return formParameters;
+ }
+
+ public String getContentType()
+ {
+ return contentType;
+ }
+ }
+
+ static class WSRPMultiRequestContext extends WSRPRequestContext
+ {
+ private byte[] content;
+ private boolean usingStream;
+ private boolean usingReader;
+ private String contentType;
+
+ protected WSRPMultiRequestContext(String characterEncoding, NamedString[] formParams, UploadContext[] uploadContexts) throws IOException, MessagingException
+ {
+ super(characterEncoding);
+
+ MimeMultipart parts = new MimeMultipart();
+ if (uploadContexts != null && uploadContexts.length > 0)
+ {
+ for (UploadContext uploadContext : uploadContexts)
+ {
+ InternetHeaders headers = new InternetHeaders();
+ headers.addHeader(FileUpload.CONTENT_TYPE, uploadContext.getMimeType());
+
+ NamedString[] attributes = uploadContext.getMimeAttributes();
+ if (attributes != null && attributes.length > 0)
+ {
+ for (NamedString attribute : attributes)
+ {
+ headers.addHeader(attribute.getName(), attribute.getValue());
+ }
+ }
+
+ MimeBodyPart mimeBodyPart = new MimeBodyPart(headers, uploadContext.getUploadData());
+ parts.addBodyPart(mimeBodyPart);
+ }
+ }
+
+ final String paramContentDispositionHeader = FileUpload.FORM_DATA + "; name=\"";
+ if (formParams != null)
+ {
+ for (NamedString formParam : formParams)
+ {
+ InternetHeaders headers = new InternetHeaders();
+
+ StringBuffer paramContentDisposition = new StringBuffer(paramContentDispositionHeader);
+ paramContentDisposition.append(formParam.getName()).append("\"");
+
+ headers.addHeader(FileUpload.CONTENT_DISPOSITION, paramContentDisposition.toString());
+
+ MimeBodyPart mimeBodyPart = new MimeBodyPart(headers, formParam.getValue().getBytes());
+ parts.addBodyPart(mimeBodyPart);
+ }
+ }
+
+ ByteArrayOutputStream baos = new ByteArrayOutputStream();
+ parts.writeTo(baos);
+ content = baos.toByteArray();
+ contentType = parts.getContentType();
+ }
+
+ public ParameterMap getForm()
+ {
+ return new ParameterMap();
+ }
+
+ public String getContentType()
+ {
+ return contentType;
+ }
+
+ public int getContentLength()
+ {
+ return content.length;
+ }
+
+ public BufferedReader getReader() throws IOException
+ {
+ if (usingStream)
+ {
+ throw new IllegalStateException("getInputStream has already been called on this ActionContext!");
+ }
+ usingReader = true;
+ return new BufferedReader(new InputStreamReader(getInputStreamFromContent()));
+ }
+
+ public InputStream getInputStream() throws IOException
+ {
+ if (usingReader)
+ {
+ throw new IllegalStateException("getReader has already been called on this ActionContext!");
+ }
+ usingStream = true;
+ return getInputStreamFromContent();
+ }
+
+
+ private InputStream getInputStreamFromContent()
+ {
+ return new ByteArrayInputStream(content);
+ }
+ }
+
+ public static WSRPRequestContext createRequestContext(MarkupRequest markupRequest, InteractionParams interactionParams)
+ {
+ NamedString[] formParams = interactionParams.getFormParameters();
+ UploadContext[] uploadContexts = interactionParams.getUploadContexts();
+
+
+ if (uploadContexts != null && uploadContexts.length > 0)
+ {
+ try
+ {
+ return new WSRPMultiRequestContext(markupRequest.getCharacterSet(), formParams, uploadContexts);
+ }
+ catch (Exception e)
+ {
+ throw new IllegalArgumentException("Invalid upload contexts", e);
+ }
+ }
+ else
+ {
+ return new WSRPSimpleRequestContext(markupRequest.getCharacterSet(), markupRequest.getMediaType(), formParams);
+
+ }
+ }
+}
Property changes on: modules/wsrp/trunk/producer/src/main/java/org/jboss/portal/wsrp/producer/WSRPRequestContext.java
___________________________________________________________________
Name: svn:executable
+ *
Added: modules/wsrp/trunk/producer/src/main/java/org/jboss/portal/wsrp/producer/WSRPValidator.java
===================================================================
--- modules/wsrp/trunk/producer/src/main/java/org/jboss/portal/wsrp/producer/WSRPValidator.java (rev 0)
+++ modules/wsrp/trunk/producer/src/main/java/org/jboss/portal/wsrp/producer/WSRPValidator.java 2009-07-22 20:25:22 UTC (rev 13587)
@@ -0,0 +1,50 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2009, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+
+package org.jboss.portal.wsrp.producer;
+
+import org.jboss.portal.registration.RegistrationUtils;
+import org.jboss.portal.wsrp.WSRPPortletURL;
+import org.jboss.portal.wsrp.WSRPUtils;
+
+/**
+ * @author <a href="mailto:chris.laprun@jboss.com">Chris Laprun</a>
+ * @version $Revision$
+ */
+public class WSRPValidator
+{
+ private static boolean strict = true;
+
+ public static void setStrict(boolean strictMode)
+ {
+ strict = strictMode;
+ RegistrationUtils.setStrict(strict);
+ WSRPUtils.setStrict(strict);
+ WSRPPortletURL.setStrict(strict);
+ }
+
+ public static boolean isStrict()
+ {
+ return strict;
+ }
+}
Added: modules/wsrp/trunk/producer/src/main/java/org/jboss/portal/wsrp/producer/config/ProducerConfiguration.java
===================================================================
--- modules/wsrp/trunk/producer/src/main/java/org/jboss/portal/wsrp/producer/config/ProducerConfiguration.java (rev 0)
+++ modules/wsrp/trunk/producer/src/main/java/org/jboss/portal/wsrp/producer/config/ProducerConfiguration.java 2009-07-22 20:25:22 UTC (rev 13587)
@@ -0,0 +1,53 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2009, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+
+package org.jboss.portal.wsrp.producer.config;
+
+import java.util.List;
+
+/**
+ * @author <a href="mailto:chris.laprun@jboss.com">Chris Laprun</a>
+ * @version $Revision: 12017 $
+ * @since 2.6
+ */
+public interface ProducerConfiguration
+{
+ ProducerRegistrationRequirements getRegistrationRequirements();
+
+ /**
+ * Is the associated producer using strict WSRP data validation? Strict validation means that even minor
+ * non-compliance will cause a failure. Lenient validation relaxes the checks that are performed to improve
+ * compatibility with some non-completely compliant consumers.
+ *
+ * @return <code>true</code> if strict validation is in effect, <code>false</code> otherwise.
+ */
+ boolean isUsingStrictMode();
+
+ void setUsingStrictMode(boolean strict);
+
+ void addChangeListener(ProducerConfigurationChangeListener listener);
+
+ void removeChangeListener(ProducerConfigurationChangeListener listener);
+
+ List<ProducerConfigurationChangeListener> getChangeListeners();
+}
Added: modules/wsrp/trunk/producer/src/main/java/org/jboss/portal/wsrp/producer/config/ProducerConfigurationChangeListener.java
===================================================================
--- modules/wsrp/trunk/producer/src/main/java/org/jboss/portal/wsrp/producer/config/ProducerConfigurationChangeListener.java (rev 0)
+++ modules/wsrp/trunk/producer/src/main/java/org/jboss/portal/wsrp/producer/config/ProducerConfigurationChangeListener.java 2009-07-22 20:25:22 UTC (rev 13587)
@@ -0,0 +1,33 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2009, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+
+package org.jboss.portal.wsrp.producer.config;
+
+/**
+ * @author <a href="mailto:chris.laprun@jboss.com">Chris Laprun</a>
+ * @version $Revision$
+ */
+public interface ProducerConfigurationChangeListener
+{
+ void usingStrictModeChangedTo(boolean strictMode);
+}
Added: modules/wsrp/trunk/producer/src/main/java/org/jboss/portal/wsrp/producer/config/ProducerConfigurationFactory.java
===================================================================
--- modules/wsrp/trunk/producer/src/main/java/org/jboss/portal/wsrp/producer/config/ProducerConfigurationFactory.java (rev 0)
+++ modules/wsrp/trunk/producer/src/main/java/org/jboss/portal/wsrp/producer/config/ProducerConfigurationFactory.java 2009-07-22 20:25:22 UTC (rev 13587)
@@ -0,0 +1,281 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2009, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+
+package org.jboss.portal.wsrp.producer.config;
+
+import org.jboss.portal.common.util.ParameterValidation;
+import org.jboss.portal.wsrp.WSRPConstants;
+import org.jboss.portal.wsrp.WSRPUtils;
+import org.jboss.portal.wsrp.producer.config.impl.ProducerConfigurationImpl;
+import org.jboss.portal.wsrp.producer.config.impl.ProducerRegistrationRequirementsImpl;
+import org.jboss.portal.wsrp.registration.LocalizedString;
+import org.jboss.portal.wsrp.registration.RegistrationPropertyDescription;
+import org.jboss.util.StringPropertyReplacer;
+import org.jboss.xb.binding.ObjectModelFactory;
+import org.jboss.xb.binding.UnmarshallingContext;
+import org.xml.sax.Attributes;
+
+import javax.xml.namespace.QName;
+import java.util.Locale;
+
+/**
+ * @author <a href="mailto:chris.laprun@jboss.com">Chris Laprun</a>
+ * @version $Revision: 10408 $
+ * @since 2.6
+ */
+public class ProducerConfigurationFactory implements ObjectModelFactory
+{
+ private static final String REGISTRATION_CONFIG = "registration-configuration";
+ private static final boolean DEBUG = false;
+ private boolean registrationDone = false;
+
+ // kept to support old-style type
+ private static final String LEGACY_XSD_STRING = "xsd:string";
+
+ public Object newRoot(Object root, UnmarshallingContext nav, String nsURI, String localName, Attributes attrs)
+ {
+ if (DEBUG)
+ {
+ System.out.println("newRoot " + localName);
+ }
+
+ if ("producer-configuration".equals(localName))
+ {
+ ProducerConfiguration producerConfiguration = new ProducerConfigurationImpl();
+ producerConfiguration.setUsingStrictMode(getBooleanAttributeValue(attrs, "useStrictMode", true));
+ return producerConfiguration;
+ }
+ throw new IllegalArgumentException("The processed file doesn't seem to have the proper format, " +
+ "was expecting producer-configuration, instead got " + localName);
+ }
+
+ public Object newChild(ProducerConfigurationImpl producerConfiguration, UnmarshallingContext nav, String nsURI, String localName, Attributes attrs)
+ {
+ if (DEBUG)
+ {
+ System.out.println("newChild prodConf " + localName);
+ }
+
+ if (REGISTRATION_CONFIG.equals(localName))
+ {
+ // check that we don't have several registration-configuration elements.
+ if (registrationDone)
+ {
+ throw new IllegalArgumentException("Only one registration-configuration element can be defined!");
+ }
+
+ ProducerRegistrationRequirements registrationRequirements = new ProducerRegistrationRequirementsImpl();
+ registrationRequirements.setRegistrationRequired(true);
+ registrationRequirements.setRegistrationRequiredForFullDescription(getBooleanAttributeValue(attrs, "fullServiceDescriptionRequiresRegistration", false));
+ registrationDone = true;
+ return registrationRequirements;
+ }
+ return null;
+ }
+
+ public Object completeRoot(Object root, UnmarshallingContext nav, String nsURI, String localName)
+ {
+ return root;
+ }
+
+ public Object newChild(ProducerRegistrationRequirementsImpl regReq, UnmarshallingContext nav, String nsURI,
+ String localName, Attributes attrs)
+ {
+ if (DEBUG)
+ {
+ System.out.println("newChild regReq " + localName);
+ }
+
+ if ("registration-property-description".equals(localName))
+ {
+ return new RegistrationPropertyDescription();
+ }
+ else
+ {
+ return null;
+ }
+ }
+
+ public void setValue(ProducerRegistrationRequirementsImpl regReq, UnmarshallingContext nav, String nsURI,
+ String localName, String value)
+ {
+ if ("registration-policy".equals(localName))
+ {
+ value = StringPropertyReplacer.replaceProperties(value);
+ regReq.setPolicyClassName(value);
+ }
+ else if ("registration-property-validator".equals(localName))
+ {
+ value = StringPropertyReplacer.replaceProperties(value);
+ regReq.setValidatorClassName(value);
+ }
+ }
+
+ public void setValue(RegistrationPropertyDescription desc, UnmarshallingContext nav, String nsURI,
+ String localName, String value)
+ {
+ if (DEBUG)
+ {
+ System.out.println("setvalue desc " + localName);
+ }
+
+ if ("name".equals(localName))
+ {
+ value = StringPropertyReplacer.replaceProperties(value);
+ desc.setName(new QName(value));
+ }
+ else if ("type".equals(localName))
+ {
+ value = StringPropertyReplacer.replaceProperties(value);
+
+ // first check that we still support type as "xsd:string"...
+ if (!LEGACY_XSD_STRING.equals(value))
+ {
+ QName type = nav.resolveQName(value);
+ if (!WSRPConstants.XSD_STRING.equals(type))
+ {
+ throw new IllegalArgumentException("'" + value + "' is not a supported type. Currently, only 'xsd:string' is supported.");
+ }
+ }
+
+ desc.setType(WSRPConstants.XSD_STRING);
+ }
+ }
+
+ public Object newChild(RegistrationPropertyDescription desc, UnmarshallingContext nav, String nsURI, String localName,
+ Attributes attrs)
+ {
+ if (DEBUG)
+ {
+ System.out.println("newchild desc " + localName);
+ }
+
+ if ("hint".equals(localName) || "label".equals(localName) || "description".equals(localName))
+ {
+ String lang = attrs.getValue("xml:lang");
+ ParameterValidation.throwIllegalArgExceptionIfNullOrEmpty(lang, "xml:lang", localName);
+ Locale locale = WSRPUtils.getLocale(lang);
+
+ String resourceName = attrs.getValue("resourceName");
+
+ LocalizedString string = new LocalizedString();
+ string.setLocale(locale);
+
+ if (resourceName != null && resourceName.length() > 0)
+ {
+ string.setResourceName(resourceName);
+ }
+
+ return string;
+ }
+
+ return null;
+ }
+
+ public void setValue(LocalizedString string, UnmarshallingContext nav, String nsURI, String localName, String value)
+ {
+ if (DEBUG)
+ {
+ System.out.println("setvalue string " + localName);
+ }
+
+ value = StringPropertyReplacer.replaceProperties(value);
+ string.setValue(value);
+ }
+
+ public void addChild(ProducerConfigurationImpl conf, ProducerRegistrationRequirementsImpl regReq,
+ UnmarshallingContext nav, String nsURI, String localName)
+ {
+ if (DEBUG)
+ {
+ System.out.println("addchild conf regReq " + localName);
+ }
+
+ if (!ProducerRegistrationRequirementsImpl.DEFAULT_POLICY_CLASS_NAME.equals(regReq.getPolicyClassName()) && regReq.getValidatorClassName() != null)
+ {
+ throw new IllegalStateException("Doesn't make sense to define a property validator without using DefaultRegistrationPolicy!");
+ }
+
+ conf.setRegistrationRequirements(regReq);
+ }
+
+ public void addChild(ProducerRegistrationRequirementsImpl regReq, RegistrationPropertyDescription desc,
+ UnmarshallingContext nav, String nsURI, String localName)
+ {
+ if (DEBUG)
+ {
+ System.out.println("addchild regreq desc " + localName);
+ }
+
+ regReq.addRegistrationProperty(desc);
+ }
+
+ public void addChild(RegistrationPropertyDescription desc, LocalizedString string, UnmarshallingContext nav,
+ String nsURI, String localName)
+ {
+ if (DEBUG)
+ {
+ System.out.println("addchild desc string " + localName);
+ }
+
+ if ("hint".equals(localName))
+ {
+ desc.setHint(string);
+ }
+ else if ("label".equals(localName))
+ {
+ desc.setLabel(string);
+ }
+ else if ("description".equals(localName))
+ {
+ desc.setDescription(string);
+ }
+ }
+
+ private boolean getBooleanAttributeValue(Attributes attrs, String attributeName, boolean defaultValue)
+ {
+ String value = attrs.getValue(attributeName);
+
+ // figure out which is the default value
+ String defaultString = "false";
+ String other = "true";
+ if (defaultValue)
+ {
+ defaultString = "true";
+ other = "false";
+ }
+
+ if (other.equals(value))
+ {
+ return !defaultValue;
+ }
+ else if (value == null || defaultString.equals(value))
+ {
+ return defaultValue;
+ }
+ else
+ {
+ throw new IllegalArgumentException("Invalid value for " + attributeName + " attribute. Acceptable values are: true, false.");
+ }
+ }
+}
Added: modules/wsrp/trunk/producer/src/main/java/org/jboss/portal/wsrp/producer/config/ProducerConfigurationProvider.java
===================================================================
--- modules/wsrp/trunk/producer/src/main/java/org/jboss/portal/wsrp/producer/config/ProducerConfigurationProvider.java (rev 0)
+++ modules/wsrp/trunk/producer/src/main/java/org/jboss/portal/wsrp/producer/config/ProducerConfigurationProvider.java 2009-07-22 20:25:22 UTC (rev 13587)
@@ -0,0 +1,187 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2009, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+
+package org.jboss.portal.wsrp.producer.config;
+
+import org.jboss.portal.registration.RegistrationPolicy;
+import org.jboss.portal.registration.policies.DefaultRegistrationPolicy;
+import org.jboss.portal.wsrp.WSRPUtils;
+import org.jboss.portal.wsrp.producer.config.impl.ProducerConfigurationImpl;
+import org.jboss.portal.wsrp.producer.config.impl.ProducerRegistrationRequirementsImpl;
+import org.jboss.portal.wsrp.registration.LocalizedString;
+import org.jboss.portal.wsrp.registration.RegistrationPropertyDescription;
+import org.jboss.xb.binding.MarshallingContext;
+import org.jboss.xb.binding.ObjectModelProvider;
+
+/**
+ * @author <a href="mailto:chris.laprun@jboss.com">Chris Laprun</a>
+ * @version $Revision: 10408 $
+ * @since 2.6.3
+ */
+public class ProducerConfigurationProvider implements ObjectModelProvider
+{
+ public Object getRoot(Object o, MarshallingContext marshallingContext, String s, String s1)
+ {
+ return o;
+ }
+
+ public Object getChildren(ProducerConfigurationImpl configuration, String namespaceUri, String localName)
+ {
+ if ("registration-configuration".equals(localName))
+ {
+ ProducerRegistrationRequirements registrationRequirements = configuration.getRegistrationRequirements();
+ if (registrationRequirements != null && registrationRequirements.isRegistrationRequired())
+ {
+ return registrationRequirements;
+ }
+ }
+ else if ("producer-configuration".equals(localName))
+ {
+ return configuration;
+ }
+
+ return null;
+ }
+
+ public Object getChildren(ProducerRegistrationRequirementsImpl regReq, String namespaceUri, String localName)
+ {
+ if ("registration-property-description".equals(localName))
+ {
+ return regReq.getRegistrationProperties().values();
+ }
+
+ return null;
+ }
+
+ public Object getAttributeValue(ProducerConfigurationImpl configuration, String namespaceUri, String localName)
+ {
+ if ("useStrictMode".equals(localName))
+ {
+ return configuration.isUsingStrictMode();
+ }
+
+ return null;
+ }
+
+ public Object getAttributeValue(ProducerRegistrationRequirementsImpl regReq, String namespaceUri, String localName)
+ {
+ if ("fullServiceDescriptionRequiresRegistration".equals(localName))
+ {
+ return regReq.isRegistrationRequiredForFullDescription();
+ }
+
+ return null;
+ }
+
+ public Object getElementValue(ProducerRegistrationRequirementsImpl regReq, String namespaceUri, String localName)
+ {
+ Object value = null;
+ if ("registration-policy".equals(localName))
+ {
+ RegistrationPolicy policy = regReq.getPolicy();
+ if (policy != null)
+ {
+ value = policy.getClass().getName();
+ }
+ }
+ else if ("registration-property-validator".equals(localName))
+ {
+ RegistrationPolicy policy = regReq.getPolicy();
+ if (policy instanceof DefaultRegistrationPolicy)
+ {
+ DefaultRegistrationPolicy defaultRegistrationPolicy = (DefaultRegistrationPolicy)policy;
+ value = defaultRegistrationPolicy.getValidator().getClass().getName();
+ }
+ }
+ else
+ {
+ value = null;
+ }
+ return value;
+ }
+
+ public Object getElementValue(RegistrationPropertyDescription propertyDescription, String namespaceUri, String localName)
+ {
+ Object value = null;
+ if ("name".equals(localName))
+ {
+ value = propertyDescription.getName();
+ }
+ else if ("type".equals(localName))
+ {
+ value = propertyDescription.getType();
+ }
+ else if ("label".equals(localName))
+ {
+ value = getLocalizedStringOrNull(propertyDescription.getLabel());
+ }
+ else if ("hint".equals(localName))
+ {
+ value = getLocalizedStringOrNull(propertyDescription.getHint());
+ }
+ else if ("description".equals(localName))
+ {
+ value = getLocalizedStringOrNull(propertyDescription.getDescription());
+ }
+ return value;
+ }
+
+ private LocalizedString getLocalizedStringOrNull(LocalizedString string)
+ {
+ if (string != null)
+ {
+ String value = string.getValue();
+ if (value == null || value.length() == 0)
+ {
+ return null;
+ }
+ else
+ {
+ return string;
+ }
+ }
+ else
+ {
+ return null;
+ }
+ }
+
+ public Object getAttributeValue(LocalizedString localizedString, String namespaceUri, String localName)
+ {
+ Object value = null;
+ if ("lang".equals(localName))
+ {
+ value = WSRPUtils.toString(localizedString.getLocale());
+ }
+ else if ("resourceName".equals(localName))
+ {
+ value = localizedString.getResourceName();
+ }
+ return value;
+ }
+
+ public Object getElementValue(LocalizedString localizedString, String namespaceUri, String localName)
+ {
+ return localizedString.getValue();
+ }
+}
Added: modules/wsrp/trunk/producer/src/main/java/org/jboss/portal/wsrp/producer/config/ProducerConfigurationService.java
===================================================================
--- modules/wsrp/trunk/producer/src/main/java/org/jboss/portal/wsrp/producer/config/ProducerConfigurationService.java (rev 0)
+++ modules/wsrp/trunk/producer/src/main/java/org/jboss/portal/wsrp/producer/config/ProducerConfigurationService.java 2009-07-22 20:25:22 UTC (rev 13587)
@@ -0,0 +1,50 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2009, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+
+package org.jboss.portal.wsrp.producer.config;
+
+/**
+ * @author <a href="mailto:chris.laprun@jboss.com">Chris Laprun</a>
+ * @version $Revision: 8784 $
+ * @since 2.6
+ */
+public interface ProducerConfigurationService
+{
+ public ProducerConfiguration getConfiguration();
+
+ /**
+ * Reloads the producer configuration from persistent storage.
+ *
+ * @throws Exception
+ * @since 2.6.3
+ */
+ void reloadConfiguration() throws Exception;
+
+ /**
+ * Saves the producer configuration to persistent storage.
+ *
+ * @throws Exception
+ * @since 2.6.3
+ */
+ void saveConfiguration() throws Exception;
+}
Added: modules/wsrp/trunk/producer/src/main/java/org/jboss/portal/wsrp/producer/config/ProducerRegistrationRequirements.java
===================================================================
--- modules/wsrp/trunk/producer/src/main/java/org/jboss/portal/wsrp/producer/config/ProducerRegistrationRequirements.java (rev 0)
+++ modules/wsrp/trunk/producer/src/main/java/org/jboss/portal/wsrp/producer/config/ProducerRegistrationRequirements.java 2009-07-22 20:25:22 UTC (rev 13587)
@@ -0,0 +1,116 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2009, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+
+package org.jboss.portal.wsrp.producer.config;
+
+import org.jboss.portal.registration.RegistrationPolicy;
+import org.jboss.portal.registration.RegistrationPolicyChangeListener;
+import org.jboss.portal.registration.RegistrationPropertyChangeListener;
+import org.jboss.portal.wsrp.registration.RegistrationPropertyDescription;
+
+import javax.xml.namespace.QName;
+import java.util.Map;
+import java.util.Set;
+
+/**
+ * @author <a href="mailto:chris.laprun@jboss.com">Chris Laprun</a>
+ * @version $Revision:5865 $
+ * @since 2.6
+ */
+public interface ProducerRegistrationRequirements
+{
+ String DEFAULT_POLICY_CLASS_NAME = "org.jboss.portal.registration.policies.DefaultRegistrationPolicy";
+ String DEFAULT_VALIDATOR_CLASS_NAME = "org.jboss.portal.registration.policies.DefaultRegistrationPropertyValidator";
+
+ boolean isRegistrationRequired();
+
+ void setRegistrationRequired(boolean requiresRegistration);
+
+ boolean isRegistrationRequiredForFullDescription();
+
+ void setRegistrationRequiredForFullDescription(boolean fullServiceDescriptionRequiresRegistration);
+
+ Map getRegistrationProperties();
+
+ void addRegistrationProperty(RegistrationPropertyDescription propertyDescription);
+
+ void removeRegistrationProperty(String propertyName);
+
+ void removeRegistrationProperty(QName propertyName);
+
+ void clearRegistrationProperties();
+
+ boolean acceptValueFor(QName propertyName, Object value);
+
+ boolean acceptValueFor(String propertyName, Object value);
+
+ RegistrationPropertyDescription getRegistrationPropertyWith(String name);
+
+ RegistrationPropertyDescription getRegistrationPropertyWith(QName name);
+
+ void notifyRegistrationPropertyChangeListeners();
+
+ void addRegistrationPropertyChangeListener(RegistrationPropertyChangeListener listener);
+
+ void clearRegistrationPropertyChangeListeners();
+
+ void removeRegistrationPropertyChangeListener(RegistrationPropertyChangeListener listener);
+
+ void setPolicy(RegistrationPolicy policy);
+
+ RegistrationPolicy getPolicy();
+
+ void reloadPolicyFrom(String policyClassName, String validatorClassName);
+
+ /**
+ * @param propertyDescription
+ * @param oldName
+ * @since 2.6.3
+ */
+ void propertyHasBeenRenamed(RegistrationPropertyDescription propertyDescription, QName oldName);
+
+ /**
+ * @param name
+ * @since 2.6.3
+ */
+ void addEmptyRegistrationProperty(String name);
+
+ /**
+ * @param listener
+ * @since 2.6.3
+ */
+ void addRegistrationPolicyChangeListener(RegistrationPolicyChangeListener listener);
+
+ /**
+ * @param listener
+ * @since 2.6.3
+ */
+ void removeRegistrationPolicyChangeListener(RegistrationPolicyChangeListener listener);
+
+ /** @since 2.6.3 */
+ void clearRegistrationPolicyChangeListeners();
+
+ Set<RegistrationPropertyChangeListener> getPropertyChangeListeners();
+
+ Set<RegistrationPolicyChangeListener> getPolicyChangeListeners();
+}
Added: modules/wsrp/trunk/producer/src/main/java/org/jboss/portal/wsrp/producer/config/impl/ProducerConfigurationImpl.java
===================================================================
--- modules/wsrp/trunk/producer/src/main/java/org/jboss/portal/wsrp/producer/config/impl/ProducerConfigurationImpl.java (rev 0)
+++ modules/wsrp/trunk/producer/src/main/java/org/jboss/portal/wsrp/producer/config/impl/ProducerConfigurationImpl.java 2009-07-22 20:25:22 UTC (rev 13587)
@@ -0,0 +1,96 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2009, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+
+package org.jboss.portal.wsrp.producer.config.impl;
+
+import org.jboss.portal.common.util.ParameterValidation;
+import org.jboss.portal.wsrp.producer.config.ProducerConfiguration;
+import org.jboss.portal.wsrp.producer.config.ProducerConfigurationChangeListener;
+import org.jboss.portal.wsrp.producer.config.ProducerRegistrationRequirements;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * @author <a href="mailto:chris.laprun@jboss.com">Chris Laprun</a>
+ * @version $Revision: 12017 $
+ * @since 2.6
+ */
+public class ProducerConfigurationImpl implements ProducerConfiguration
+{
+ private ProducerRegistrationRequirements requirements;
+
+ // use strict mode by default
+ private boolean strictMode = true;
+
+ private List<ProducerConfigurationChangeListener> listeners = new ArrayList<ProducerConfigurationChangeListener>(7);
+
+ public ProducerRegistrationRequirements getRegistrationRequirements()
+ {
+ if (requirements == null)
+ {
+ requirements = new ProducerRegistrationRequirementsImpl(false, false, false);
+ }
+
+ return requirements;
+ }
+
+ public boolean isUsingStrictMode()
+ {
+ return strictMode;
+ }
+
+ public void setUsingStrictMode(boolean strict)
+ {
+ if (strictMode != strict)
+ {
+ strictMode = strict;
+ for (ProducerConfigurationChangeListener listener : listeners)
+ {
+ listener.usingStrictModeChangedTo(strict);
+ }
+ }
+ }
+
+ public void addChangeListener(ProducerConfigurationChangeListener listener)
+ {
+ ParameterValidation.throwIllegalArgExceptionIfNull(listener, "ProducerConfigurationChangeListener");
+ listeners.add(listener);
+ }
+
+ public void removeChangeListener(ProducerConfigurationChangeListener listener)
+ {
+ ParameterValidation.throwIllegalArgExceptionIfNull(listener, "ProducerConfigurationChangeListener");
+ listeners.remove(listener);
+ }
+
+ public List<ProducerConfigurationChangeListener> getChangeListeners()
+ {
+ return listeners;
+ }
+
+ public void setRegistrationRequirements(ProducerRegistrationRequirements requirements)
+ {
+ this.requirements = requirements;
+ }
+}
Added: modules/wsrp/trunk/producer/src/main/java/org/jboss/portal/wsrp/producer/config/impl/ProducerConfigurationServiceImpl.java
===================================================================
--- modules/wsrp/trunk/producer/src/main/java/org/jboss/portal/wsrp/producer/config/impl/ProducerConfigurationServiceImpl.java (rev 0)
+++ modules/wsrp/trunk/producer/src/main/java/org/jboss/portal/wsrp/producer/config/impl/ProducerConfigurationServiceImpl.java 2009-07-22 20:25:22 UTC (rev 13587)
@@ -0,0 +1,289 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2009, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+
+package org.jboss.portal.wsrp.producer.config.impl;
+
+import org.jboss.mx.util.MBeanServerLocator;
+import org.jboss.mx.util.ObjectNameFactory;
+import org.jboss.portal.common.net.URLTools;
+import org.jboss.portal.jems.as.system.AbstractJBossService;
+import org.jboss.portal.registration.RegistrationPolicyChangeListener;
+import org.jboss.portal.registration.RegistrationPropertyChangeListener;
+import org.jboss.portal.wsrp.producer.config.ProducerConfiguration;
+import org.jboss.portal.wsrp.producer.config.ProducerConfigurationChangeListener;
+import org.jboss.portal.wsrp.producer.config.ProducerConfigurationFactory;
+import org.jboss.portal.wsrp.producer.config.ProducerConfigurationProvider;
+import org.jboss.portal.wsrp.producer.config.ProducerConfigurationService;
+import org.jboss.portal.wsrp.producer.config.ProducerRegistrationRequirements;
+import org.jboss.xb.binding.JBossXBException;
+import org.jboss.xb.binding.ObjectModelFactory;
+import org.jboss.xb.binding.ObjectModelProvider;
+import org.jboss.xb.binding.Unmarshaller;
+import org.jboss.xb.binding.UnmarshallerFactory;
+import org.jboss.xb.binding.XercesXsMarshaller;
+import org.jboss.xb.binding.sunday.unmarshalling.DefaultSchemaResolver;
+
+import javax.management.MBeanServer;
+import javax.management.ObjectName;
+import java.io.BufferedWriter;
+import java.io.File;
+import java.io.FileWriter;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.io.Reader;
+import java.io.StringWriter;
+import java.io.Writer;
+import java.net.URL;
+import java.util.Enumeration;
+import java.util.List;
+import java.util.Set;
+
+/**
+ * @author <a href="mailto:chris.laprun@jboss.com">Chris Laprun</a>
+ * @version $Revision: 12276 $
+ * @since 2.6
+ */
+public class ProducerConfigurationServiceImpl extends AbstractJBossService implements ProducerConfigurationService
+{
+ private String configLocation;
+ private ProducerConfiguration configuration;
+
+ private File config;
+
+ private static DefaultSchemaResolver RESOLVER;
+
+ private static final String PRODUCER_NAMESPACE = "urn:jboss:portal:wsrp:producer:v2_7";
+ private static final String PRODUCER_XSD = "jboss-wsrp-producer_2_7.xsd";
+
+ static
+ {
+ RESOLVER = new DefaultSchemaResolver();
+ RESOLVER.setCacheResolvedSchemas(true);
+ RESOLVER.addSchemaLocation("http://www.w3.org/XML/1998/namespace", "xsd/xml.xsd");
+ RESOLVER.addSchemaLocation("urn:jboss:portal:wsrp:producer:v2_6", "xsd/jboss-wsrp-producer_2_6.xsd");
+ RESOLVER.addSchemaLocation(PRODUCER_NAMESPACE, "xsd/" + PRODUCER_XSD);
+ }
+
+ public String getConfigLocation()
+ {
+ return configLocation;
+ }
+
+ public void setConfigLocation(String configLocation)
+ {
+ this.configLocation = configLocation;
+ }
+
+
+ public ProducerConfiguration getConfiguration()
+ {
+ return configuration;
+ }
+
+ protected void startService() throws Exception
+ {
+ MBeanServer server = MBeanServerLocator.locateJBoss();
+ ObjectName oname = ObjectNameFactory.create("jboss.system:type=ServerConfig");
+ File dataDir;
+ try
+ {
+ dataDir = (File)server.getAttribute(oname, "ServerDataDir");
+ }
+ catch (Exception e)
+ {
+ throw new RuntimeException("Couldn't locate server data dir!", e);
+ }
+
+ // if "portal" directory doesn't exist already in data, create it (JBPORTAL-2229)
+ File portalDir = new File(dataDir, "portal");
+ if (!portalDir.exists())
+ {
+ if (!portalDir.mkdir())
+ {
+ throw new RuntimeException("Couldn't create 'portal' directory in " + dataDir.getAbsolutePath());
+ }
+ }
+ else
+ {
+ if (!portalDir.isDirectory())
+ {
+ throw new RuntimeException("Was expecting a directory named 'portal' in " + dataDir.getAbsolutePath()
+ + ", not a simple file! Cannot continue.");
+ }
+ }
+
+ config = new File(portalDir, "wsrp-producer-config.xml");
+
+ reloadConfiguration();
+ }
+
+ public void reloadConfiguration() throws Exception
+ {
+ URL configURL = getConfigLocationURL();
+
+ try
+ {
+ loadConfigurationAt(configURL);
+ }
+ catch (Exception e)
+ {
+ if (config.exists())
+ {
+ log.debug("Configuration saved at " + config.getCanonicalPath()
+ + " is not loading properly. Falling back to default configuration.");
+ config.delete(); // delete improper config so that we retrieve the default configuration
+ loadConfigurationAt(getConfigLocationURL());
+ }
+ }
+ }
+
+ private void loadConfigurationAt(URL configURL) throws JBossXBException, IOException
+ {
+ log.debug("About to parse producer configuration " + configURL);
+ Unmarshaller unmarshaller = UnmarshallerFactory.newInstance().newUnmarshaller();
+ ObjectModelFactory factory = new ProducerConfigurationFactory();
+
+ // save listeners if we already have a configuration
+ List<ProducerConfigurationChangeListener> listeners = null;
+ Set<RegistrationPolicyChangeListener> policyListeners = null;
+ Set<RegistrationPropertyChangeListener> propertyListeners = null;
+ ProducerRegistrationRequirements registrationRequirements;
+ if (configuration != null)
+ {
+ listeners = configuration.getChangeListeners();
+ registrationRequirements = configuration.getRegistrationRequirements();
+ if (registrationRequirements != null)
+ {
+ policyListeners = registrationRequirements.getPolicyChangeListeners();
+ propertyListeners = registrationRequirements.getPropertyChangeListeners();
+ }
+ }
+
+ // reload
+ configuration = (ProducerConfiguration)unmarshaller.unmarshal(configURL.openStream(), factory, null);
+
+ // restore listeners
+ if (listeners != null)
+ {
+ for (ProducerConfigurationChangeListener listener : listeners)
+ {
+ configuration.addChangeListener(listener);
+ }
+ }
+ registrationRequirements = configuration.getRegistrationRequirements();
+ if (registrationRequirements != null)
+ {
+ if (propertyListeners != null)
+ {
+ for (RegistrationPropertyChangeListener listener : propertyListeners)
+ {
+ registrationRequirements.addRegistrationPropertyChangeListener(listener);
+ }
+ }
+ if (policyListeners != null)
+ {
+ for (RegistrationPolicyChangeListener listener : policyListeners)
+ {
+ registrationRequirements.addRegistrationPolicyChangeListener(listener);
+ }
+ }
+ }
+ }
+
+ private URL getConfigLocationURL() throws Exception
+ {
+ if (!config.exists())
+ {
+ // Setup URLs
+ if (configLocation == null)
+ {
+ throw new Exception("The config location is null");
+ }
+
+ // make sure we pick the furthest down the path in case there's several similarly named resources in the path
+ Enumeration resources = Thread.currentThread().getContextClassLoader().getResources(configLocation);
+ URL configURL = null;
+ while (resources.hasMoreElements())
+ {
+ configURL = (URL)resources.nextElement();
+ }
+
+ if (configURL == null)
+ {
+ throw new Exception("The config " + configLocation + " does not exist");
+ }
+ if (!URLTools.exists(configURL))
+ {
+ throw new Exception("The config " + configURL + " does not exist");
+ }
+ return configURL;
+ }
+ else
+ {
+ return config.toURI().toURL();
+ }
+ }
+
+ public void saveConfiguration() throws Exception
+ {
+ // get the output writer to write the XML content
+ StringWriter xmlOutput = new StringWriter();
+
+ // get the XML Schema source
+ InputStream is = Thread.currentThread().getContextClassLoader().getResourceAsStream("xsd/" + PRODUCER_XSD);
+
+ Reader xsReader = new InputStreamReader(is);
+
+ // create an instance of XML Schema marshaller
+ XercesXsMarshaller marshaller = new XercesXsMarshaller();
+
+ marshaller.setSchemaResolver(RESOLVER);
+
+ // we need to specify what elements are top most (roots) providing namespace URI, prefix and local name
+ marshaller.addRootElement(PRODUCER_NAMESPACE, "", "producer-configuration");
+
+ // declare default namespace
+ marshaller.declareNamespace("wpc", PRODUCER_NAMESPACE);
+
+ // add schema location by declaring xsi namespace and adding xsi:schemaLocation attribute
+ marshaller.declareNamespace("xsi", "http://www.w3.org/2001/XMLSchema-instance");
+ marshaller.addAttribute("xsi", "schemaLocation", "string",
+ PRODUCER_NAMESPACE + " http://www.jboss.org/portal/xsd/" + PRODUCER_XSD);
+
+ // create an instance of Object Model Provider
+ ObjectModelProvider provider = new ProducerConfigurationProvider();
+
+ marshaller.setProperty("org.jboss.xml.binding.marshalling.indent", "true");
+ marshaller.marshal(xsReader, provider, configuration, xmlOutput);
+
+ // close XML Schema reader
+ xsReader.close();
+
+ config.createNewFile();
+ Writer configFile = new BufferedWriter(new FileWriter(config));
+ configFile.write(xmlOutput.toString());
+ configFile.flush();
+ configFile.close();
+ }
+}
Added: modules/wsrp/trunk/producer/src/main/java/org/jboss/portal/wsrp/producer/config/impl/ProducerRegistrationRequirementsImpl.java
===================================================================
--- modules/wsrp/trunk/producer/src/main/java/org/jboss/portal/wsrp/producer/config/impl/ProducerRegistrationRequirementsImpl.java (rev 0)
+++ modules/wsrp/trunk/producer/src/main/java/org/jboss/portal/wsrp/producer/config/impl/ProducerRegistrationRequirementsImpl.java 2009-07-22 20:25:22 UTC (rev 13587)
@@ -0,0 +1,383 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2009, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+
+package org.jboss.portal.wsrp.producer.config.impl;
+
+import org.jboss.portal.common.util.ParameterValidation;
+import org.jboss.portal.registration.RegistrationPolicy;
+import org.jboss.portal.registration.RegistrationPolicyChangeListener;
+import org.jboss.portal.registration.RegistrationPropertyChangeListener;
+import org.jboss.portal.registration.policies.DefaultRegistrationPolicy;
+import org.jboss.portal.registration.policies.DefaultRegistrationPropertyValidator;
+import org.jboss.portal.registration.policies.RegistrationPropertyValidator;
+import org.jboss.portal.wsrp.WSRPConstants;
+import org.jboss.portal.wsrp.producer.config.ProducerRegistrationRequirements;
+import org.jboss.portal.wsrp.registration.RegistrationPropertyDescription;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import javax.xml.namespace.QName;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Map;
+import java.util.Set;
+
+/**
+ * @author <a href="mailto:chris.laprun@jboss.com">Chris Laprun</a>
+ * @version $Revision: 12017 $
+ * @since 2.6
+ */
+public class ProducerRegistrationRequirementsImpl implements ProducerRegistrationRequirements
+{
+ private static final Logger log = LoggerFactory.getLogger(ProducerRegistrationRequirementsImpl.class);
+
+ private boolean requiresRegistration;
+ private boolean fullServiceDescriptionRequiresRegistration;
+ private RegistrationPolicy policy;
+ private String policyClassName;
+ private String validatorClassName;
+
+ private Map<QName, RegistrationPropertyDescription> registrationProperties;
+
+ private Set<RegistrationPropertyChangeListener> propertyChangeListeners = new HashSet<RegistrationPropertyChangeListener>(3);
+ private Set<RegistrationPolicyChangeListener> policyChangeListeners = new HashSet<RegistrationPolicyChangeListener>(3);
+
+ public ProducerRegistrationRequirementsImpl(boolean requiresMarshalling, boolean requiresRegistration, boolean fullServiceDescriptionRequiresRegistration)
+ {
+ this();
+ this.requiresRegistration = requiresRegistration;
+ this.fullServiceDescriptionRequiresRegistration = fullServiceDescriptionRequiresRegistration;
+ }
+
+ public ProducerRegistrationRequirementsImpl()
+ {
+ registrationProperties = new HashMap<QName, RegistrationPropertyDescription>(7);
+ }
+
+ public boolean isRegistrationRequired()
+ {
+ return requiresRegistration;
+ }
+
+ public void setRegistrationRequired(boolean requiresRegistration)
+ {
+ // if we switch from requiring registration to no registration, erase registration properties
+ if (this.requiresRegistration && !requiresRegistration)
+ {
+ clearRegistrationProperties();
+ }
+
+ this.requiresRegistration = requiresRegistration;
+ }
+
+ public boolean isRegistrationRequiredForFullDescription()
+ {
+ return fullServiceDescriptionRequiresRegistration;
+ }
+
+ public void setRegistrationRequiredForFullDescription(boolean fullServiceDescriptionRequiresRegistration)
+ {
+ this.fullServiceDescriptionRequiresRegistration = fullServiceDescriptionRequiresRegistration;
+ }
+
+ public Map getRegistrationProperties()
+ {
+ return Collections.unmodifiableMap(registrationProperties);
+ }
+
+ public void addRegistrationProperty(RegistrationPropertyDescription propertyDescription)
+ {
+ ParameterValidation.throwIllegalArgExceptionIfNull(propertyDescription, "PropertyDescription");
+ QName name = propertyDescription.getName();
+ ParameterValidation.throwIllegalArgExceptionIfNull(name, "Property name");
+
+ registrationProperties.put(name, propertyDescription);
+ propertyDescription.setParent(this);
+ notifyRegistrationPropertyChangeListeners();
+ }
+
+ public void addEmptyRegistrationProperty(String name)
+ {
+ ParameterValidation.throwIllegalArgExceptionIfNull(name, "Property name");
+ RegistrationPropertyDescription reg = new RegistrationPropertyDescription(name, WSRPConstants.XSD_STRING);
+
+ addRegistrationProperty(reg);
+ }
+
+ public boolean acceptValueFor(QName propertyName, Object value)
+ {
+ ParameterValidation.throwIllegalArgExceptionIfNull(propertyName, "Property name");
+
+ QName type = getPropertyDescription(propertyName).getType();
+ // todo: decide if type is actually compatible with value...
+ return true;
+ }
+
+ public boolean acceptValueFor(String propertyName, Object value)
+ {
+ return acceptValueFor(new QName(propertyName), value);
+ }
+
+ public RegistrationPropertyDescription getRegistrationPropertyWith(String name)
+ {
+ ParameterValidation.throwIllegalArgExceptionIfNullOrEmpty(name, "Property name", null);
+ return getRegistrationPropertyWith(new QName(name));
+ }
+
+
+ public RegistrationPropertyDescription getRegistrationPropertyWith(QName name)
+ {
+ ParameterValidation.throwIllegalArgExceptionIfNull(name, "Property name");
+ return registrationProperties.get(name);
+ }
+
+ private RegistrationPropertyDescription getPropertyDescription(QName propertyName)
+ {
+ // copy to ensure immutability
+ return new RegistrationPropertyDescription(registrationProperties.get(propertyName));
+ }
+
+ public void removeRegistrationProperty(QName propertyName)
+ {
+ ParameterValidation.throwIllegalArgExceptionIfNull(propertyName, "Property name");
+ registrationProperties.remove(propertyName);
+ notifyRegistrationPropertyChangeListeners();
+ }
+
+ public void clearRegistrationProperties()
+ {
+ registrationProperties.clear();
+ notifyRegistrationPropertyChangeListeners();
+ }
+
+ public void removeRegistrationProperty(String propertyName)
+ {
+ removeRegistrationProperty(new QName(propertyName));
+ }
+
+ /*
+ * == RegistrationPropertyChangeListeners handling ==
+ */
+
+ public void notifyRegistrationPropertyChangeListeners()
+ {
+ for (RegistrationPropertyChangeListener listener : propertyChangeListeners)
+ {
+ listener.propertiesHaveChanged(registrationProperties);
+ }
+ }
+
+ public void clearRegistrationPropertyChangeListeners()
+ {
+ propertyChangeListeners.clear();
+ }
+
+ public void addRegistrationPropertyChangeListener(RegistrationPropertyChangeListener listener)
+ {
+ ParameterValidation.throwIllegalArgExceptionIfNull(listener, "RegistrationPropertyChangeListener");
+ propertyChangeListeners.add(listener);
+ }
+
+ public void removeRegistrationPropertyChangeListener(RegistrationPropertyChangeListener listener)
+ {
+ ParameterValidation.throwIllegalArgExceptionIfNull(listener, "RegistrationPropertyChangeListener");
+ propertyChangeListeners.remove(listener);
+ }
+
+ public Set<RegistrationPropertyChangeListener> getPropertyChangeListeners()
+ {
+ return propertyChangeListeners;
+ }
+
+ /*
+ * == RegistrationPolicyChangeListeners handling
+ */
+
+ public void addRegistrationPolicyChangeListener(RegistrationPolicyChangeListener listener)
+ {
+ ParameterValidation.throwIllegalArgExceptionIfNull(listener, "RegistrationPolicyChangeListener");
+ policyChangeListeners.add(listener);
+ }
+
+ public void removeRegistrationPolicyChangeListener(RegistrationPolicyChangeListener listener)
+ {
+ ParameterValidation.throwIllegalArgExceptionIfNull(listener, "RegistrationPolicyChangeListener");
+ policyChangeListeners.remove(listener);
+ }
+
+ public void clearRegistrationPolicyChangeListeners()
+ {
+ policyChangeListeners.clear();
+ }
+
+ public void notifyRegistrationPolicyChangeListeners()
+ {
+ for (RegistrationPolicyChangeListener listener : policyChangeListeners)
+ {
+ listener.policyUpdatedTo(policy);
+ }
+ }
+
+ public Set<RegistrationPolicyChangeListener> getPolicyChangeListeners()
+ {
+ return policyChangeListeners;
+ }
+
+ public void setPolicy(RegistrationPolicy policy)
+ {
+ this.policy = policy;
+
+ if (policy != null)
+ {
+ policyClassName = policy.getClass().getName();
+
+ if (policy instanceof DefaultRegistrationPolicy)
+ {
+ DefaultRegistrationPolicy registrationPolicy = (DefaultRegistrationPolicy)policy;
+ validatorClassName = registrationPolicy.getValidator().getClass().getName();
+ }
+
+ this.policy.setExpectations(registrationProperties);
+ }
+
+ notifyRegistrationPolicyChangeListeners();
+ }
+
+ public RegistrationPolicy getPolicy()
+ {
+ if (policy == null && requiresRegistration)
+ {
+ reloadPolicyFrom(policyClassName, validatorClassName);
+ }
+
+ return policy;
+ }
+
+ public void reloadPolicyFrom(String policyClassName, String validatorClassName)
+ {
+ if (policyClassName != null && !DEFAULT_POLICY_CLASS_NAME.equals(policyClassName))
+ {
+ log.debug("Using registration policy: " + policyClassName);
+ ClassLoader loader = Thread.currentThread().getContextClassLoader();
+ try
+ {
+ Class policyClass = loader.loadClass(policyClassName);
+ Class expectedInterface = loader.loadClass("org.jboss.portal.registration.RegistrationPolicy");
+ if (!expectedInterface.isAssignableFrom(policyClass))
+ {
+ throw new IllegalArgumentException("Policy class does not implement RegistrationPolicy!");
+ }
+ RegistrationPolicy policy = (RegistrationPolicy)policyClass.newInstance();
+ setPolicy(policy);
+ }
+ catch (ClassNotFoundException e)
+ {
+ throw new IllegalArgumentException("Couldn't find policy class " + policyClassName + ".", e);
+ }
+ catch (Exception e)
+ {
+ throw new IllegalArgumentException("Couldn't instantiate policy class.", e);
+ }
+ }
+ else
+ {
+ log.debug("Using default registration policy: " + DEFAULT_POLICY_CLASS_NAME);
+ RegistrationPropertyValidator validator;
+ if (validatorClassName != null)
+ {
+ log.debug("Using registration property validator: " + validatorClassName);
+ ClassLoader loader = Thread.currentThread().getContextClassLoader();
+ try
+ {
+ Class validatorClass = loader.loadClass(validatorClassName);
+ Class expectedInterface = loader.loadClass("org.jboss.portal.registration.policies.RegistrationPropertyValidator");
+ if (!expectedInterface.isAssignableFrom(validatorClass))
+ {
+ throw new IllegalArgumentException("Validator class does not implement RegistrationPropertyValidator!");
+ }
+ validator = (RegistrationPropertyValidator)validatorClass.newInstance();
+ }
+ catch (ClassNotFoundException e)
+ {
+ throw new IllegalArgumentException("Couldn't find validator class " + validatorClassName + ".", e);
+ }
+ catch (Exception e)
+ {
+ throw new IllegalArgumentException("Couldn't instantiate validator class.", e);
+ }
+ }
+ else
+ {
+ log.debug("Using default registration property validator: " + DEFAULT_VALIDATOR_CLASS_NAME);
+ validator = new DefaultRegistrationPropertyValidator();
+ }
+
+
+ DefaultRegistrationPolicy policy = new DefaultRegistrationPolicy();
+ policy.setValidator(validator);
+ setPolicy(policy);
+ }
+ }
+
+ public void propertyHasBeenRenamed(RegistrationPropertyDescription propertyDescription, QName oldName)
+ {
+ ParameterValidation.throwIllegalArgExceptionIfNull(propertyDescription, "RegistrationPropertyDescription");
+ ParameterValidation.throwIllegalArgExceptionIfNull(oldName, "property old name");
+
+ if (registrationProperties.containsKey(oldName))
+ {
+ synchronized (this)
+ {
+ registrationProperties.remove(oldName);
+ registrationProperties.put(propertyDescription.getName(), propertyDescription);
+ }
+ }
+ }
+
+
+ public void setPolicyClassName(String policyClassName)
+ {
+ this.policyClassName = policyClassName;
+ }
+
+ public String getPolicyClassName()
+ {
+ if (policyClassName == null)
+ {
+ return DEFAULT_POLICY_CLASS_NAME;
+ }
+
+ return policyClassName;
+ }
+
+ public void setValidatorClassName(String validatorClassName)
+ {
+ this.validatorClassName = validatorClassName;
+ }
+
+ public String getValidatorClassName()
+ {
+ return validatorClassName;
+ }
+}
Added: modules/wsrp/trunk/producer/src/main/java/org/jboss/portal/wsrp/producer/interceptors/JBossPortletInterceptorStack.java
===================================================================
--- modules/wsrp/trunk/producer/src/main/java/org/jboss/portal/wsrp/producer/interceptors/JBossPortletInterceptorStack.java (rev 0)
+++ modules/wsrp/trunk/producer/src/main/java/org/jboss/portal/wsrp/producer/interceptors/JBossPortletInterceptorStack.java 2009-07-22 20:25:22 UTC (rev 13587)
@@ -0,0 +1,64 @@
+/*
+* JBoss, a division of Red Hat
+* Copyright 2008, Red Hat Middleware, LLC, and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+
+package org.jboss.portal.wsrp.producer.interceptors;
+
+import org.jboss.portal.portlet.PortletInvokerInterceptor;
+
+/**
+ * @author <a href="mailto:theute@jboss.org">Thomas Heute</a>
+ * @version $Revision$
+ */
+public class JBossPortletInterceptorStack implements PortletInterceptorStack
+{
+
+ /** . */
+ public static final PortletInterceptorStack EMPTY_STACK = new JBossPortletInterceptorStack(new PortletInvokerInterceptor[0]);
+
+ /** . */
+ private final PortletInvokerInterceptor[] interceptors;
+
+ public JBossPortletInterceptorStack(PortletInvokerInterceptor interceptor)
+ {
+ this.interceptors = new PortletInvokerInterceptor[]{interceptor};
+ }
+
+ public JBossPortletInterceptorStack(PortletInvokerInterceptor[] interceptors)
+ {
+ if (interceptors == null)
+ {
+ throw new IllegalArgumentException();
+ }
+ this.interceptors = interceptors;
+ }
+
+ public int getLength()
+ {
+ return interceptors.length;
+ }
+
+ public PortletInvokerInterceptor getInterceptor(int index) throws ArrayIndexOutOfBoundsException
+ {
+ return interceptors[index];
+ }
+}
+
Added: modules/wsrp/trunk/producer/src/main/java/org/jboss/portal/wsrp/producer/interceptors/JBossPortletInterceptorStackFactory.java
===================================================================
--- modules/wsrp/trunk/producer/src/main/java/org/jboss/portal/wsrp/producer/interceptors/JBossPortletInterceptorStackFactory.java (rev 0)
+++ modules/wsrp/trunk/producer/src/main/java/org/jboss/portal/wsrp/producer/interceptors/JBossPortletInterceptorStackFactory.java 2009-07-22 20:25:22 UTC (rev 13587)
@@ -0,0 +1,155 @@
+/*
+* JBoss, a division of Red Hat
+* Copyright 2008, Red Hat Middleware, LLC, and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+
+package org.jboss.portal.wsrp.producer.interceptors;
+
+import org.jboss.portal.jems.as.system.AbstractJBossService;
+import org.jboss.portal.portlet.PortletInvokerInterceptor;
+
+import javax.management.ObjectName;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 8784 $
+ */
+public class JBossPortletInterceptorStackFactory extends AbstractJBossService implements PortletInterceptorStackFactory
+{
+
+ /** . */
+ protected List<ObjectName> interceptorNames;
+
+ /** . */
+ protected List<ObjectName> dynamicInterceptorNames;
+
+ /** . */
+ protected PortletInterceptorStack stack;
+
+ public JBossPortletInterceptorStackFactory()
+ {
+ interceptorNames = null;
+ dynamicInterceptorNames = new ArrayList<ObjectName>();
+ }
+
+ public List<ObjectName> getInterceptorNames()
+ {
+ return interceptorNames;
+ }
+
+ public void setInterceptorNames(List<ObjectName> interceptorNames)
+ {
+ this.interceptorNames = interceptorNames;
+ }
+
+ public List<ObjectName> getDynamicInterceptorNames()
+ {
+ return Collections.unmodifiableList(dynamicInterceptorNames);
+ }
+
+ /**
+ * Add's the supplied name to the list of interceptor names.
+ *
+ * @param name the intercptor's ObjectName.
+ * @throws Exception
+ */
+ public void addInterceptor(ObjectName name) throws Exception
+ {
+ dynamicInterceptorNames.add(name);
+ }
+
+ /**
+ * Remove's the supplied name from the list of interceptor names.
+ *
+ * @param name the intercptor's ObjectName.
+ * @throws Exception
+ */
+ public void removeInterceptor(ObjectName name) throws Exception
+ {
+ dynamicInterceptorNames.remove(name);
+ }
+
+ public void startService() throws Exception
+ {
+ rebuild();
+ }
+
+ /** Rebuild the interceptor stack. */
+ public void rebuild() throws Exception
+ {
+ List<ObjectName> names = new ArrayList<ObjectName>();
+
+ //
+ if (interceptorNames != null && !interceptorNames.isEmpty())
+ {
+ names.addAll(interceptorNames);
+ }
+
+ int size = names.size();
+ if (dynamicInterceptorNames != null && !dynamicInterceptorNames.isEmpty())
+ {
+ // insert dynamic interceptors in N - 1 position as last static interceptor terminates the stack
+ ObjectName last = names.remove(size - 1);
+ names.addAll(dynamicInterceptorNames);
+ names.add(last);
+ size = names.size();
+ }
+
+ //
+ log.debug("Building interceptor stack " + getName());
+ PortletInvokerInterceptor[] interceptors = new PortletInvokerInterceptor[size];
+ if (size == 1)
+ {
+ ObjectName name = names.get(0);
+ log.debug("Adding interceptor " + name + " to the stack");
+ PortletInvokerInterceptor a = (PortletInvokerInterceptor)server.getAttribute(name, "ManagedResource");
+ interceptors[0] = a;
+ }
+ for (int i = 0; i < size - 1; i++)
+ {
+ ObjectName name = names.get(i);
+ log.debug("Adding interceptor " + name + " to the stack");
+ PortletInvokerInterceptor a = (PortletInvokerInterceptor)server.getAttribute(name, "ManagedResource");
+ name = names.get(i + 1);
+ log.debug("Adding interceptor " + name + " to the stack");
+ PortletInvokerInterceptor b = (PortletInvokerInterceptor)server.getAttribute(name, "ManagedResource");
+ a.setNext(b);
+ interceptors[i] = a;
+ interceptors[i + 1] = b;
+ }
+
+ //
+ stack = new JBossPortletInterceptorStack(interceptors);
+
+ }
+
+ public void stopService()
+ {
+ this.stack = JBossPortletInterceptorStack.EMPTY_STACK;
+ }
+
+ public PortletInterceptorStack getInterceptorStack()
+ {
+ return stack;
+ }
+}
Added: modules/wsrp/trunk/producer/src/main/java/org/jboss/portal/wsrp/producer/interceptors/PortletInterceptorStack.java
===================================================================
--- modules/wsrp/trunk/producer/src/main/java/org/jboss/portal/wsrp/producer/interceptors/PortletInterceptorStack.java (rev 0)
+++ modules/wsrp/trunk/producer/src/main/java/org/jboss/portal/wsrp/producer/interceptors/PortletInterceptorStack.java 2009-07-22 20:25:22 UTC (rev 13587)
@@ -0,0 +1,48 @@
+/*
+* JBoss, a division of Red Hat
+* Copyright 2008, Red Hat Middleware, LLC, and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+
+package org.jboss.portal.wsrp.producer.interceptors;
+
+import org.jboss.portal.portlet.PortletInvokerInterceptor;
+
+/**
+ * @author <a href="mailto:chris.laprun@jboss.com">Chris Laprun</a>
+ * @version $Revision$
+ */
+public interface PortletInterceptorStack
+{
+ /**
+ * Returns the stack length.
+ *
+ * @return the length
+ */
+ int getLength();
+
+ /**
+ * Return the interceptor at the specified index.
+ *
+ * @param index the interceptor index in the stack
+ * @return the specified interceptor
+ * @throws ArrayIndexOutOfBoundsException if the index is not valid
+ */
+ PortletInvokerInterceptor getInterceptor(int index) throws ArrayIndexOutOfBoundsException;
+}
Added: modules/wsrp/trunk/producer/src/main/java/org/jboss/portal/wsrp/producer/interceptors/PortletInterceptorStackFactory.java
===================================================================
--- modules/wsrp/trunk/producer/src/main/java/org/jboss/portal/wsrp/producer/interceptors/PortletInterceptorStackFactory.java (rev 0)
+++ modules/wsrp/trunk/producer/src/main/java/org/jboss/portal/wsrp/producer/interceptors/PortletInterceptorStackFactory.java 2009-07-22 20:25:22 UTC (rev 13587)
@@ -0,0 +1,32 @@
+/*
+* JBoss, a division of Red Hat
+* Copyright 2008, Red Hat Middleware, LLC, and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+
+package org.jboss.portal.wsrp.producer.interceptors;
+
+/**
+ * @author <a href="mailto:chris.laprun@jboss.com">Chris Laprun</a>
+ * @version $Revision$
+ */
+public interface PortletInterceptorStackFactory
+{
+ PortletInterceptorStack getInterceptorStack();
+}
Added: modules/wsrp/trunk/producer/src/main/java/org/jboss/portal/wsrp/registration/LocalizedString.java
===================================================================
--- modules/wsrp/trunk/producer/src/main/java/org/jboss/portal/wsrp/registration/LocalizedString.java (rev 0)
+++ modules/wsrp/trunk/producer/src/main/java/org/jboss/portal/wsrp/registration/LocalizedString.java 2009-07-22 20:25:22 UTC (rev 13587)
@@ -0,0 +1,145 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2009, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+
+package org.jboss.portal.wsrp.registration;
+
+import org.jboss.portal.common.util.ParameterValidation;
+
+import java.util.Locale;
+
+/**
+ * @author <a href="mailto:chris.laprun@jboss.com">Chris Laprun</a>
+ * @version $Revision:5865 $
+ * @since 2.6
+ */
+public class LocalizedString
+{
+ private String value;
+ private Locale locale;
+ private String resourceName;
+
+
+ public LocalizedString(String value, Locale locale)
+ {
+ setValue(value);
+ this.locale = locale;
+ }
+
+
+ public LocalizedString(String value)
+ {
+ this(value, Locale.getDefault());
+ }
+
+ public LocalizedString()
+ {
+ }
+
+ public LocalizedString(LocalizedString other)
+ {
+ ParameterValidation.throwIllegalArgExceptionIfNull(other, "LocalizedString");
+ this.value = other.value;
+ this.locale = other.locale;
+ this.resourceName = other.resourceName;
+ }
+
+
+ public String toString()
+ {
+ return "LocalizedString{" +
+ "value='" + value + '\'' +
+ ", locale=" + locale +
+ ", resourceName='" + resourceName + '\'' +
+ '}';
+ }
+
+ public boolean equals(Object o)
+ {
+ if (this == o)
+ {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass())
+ {
+ return false;
+ }
+
+ LocalizedString that = (LocalizedString)o;
+
+ if (!locale.equals(that.locale))
+ {
+ return false;
+ }
+ if (resourceName != null ? !resourceName.equals(that.resourceName) : that.resourceName != null)
+ {
+ return false;
+ }
+ if (value != null ? !value.equals(that.value) : that.value != null)
+ {
+ return false;
+ }
+
+ return true;
+ }
+
+ public int hashCode()
+ {
+ int result;
+ result = (value != null ? value.hashCode() : 0);
+ result = 31 * result + locale.hashCode();
+ result = 31 * result + (resourceName != null ? resourceName.hashCode() : 0);
+ return result;
+ }
+
+ public String getValue()
+ {
+ return value;
+ }
+
+ public void setValue(String value)
+ {
+ ParameterValidation.throwIllegalArgExceptionIfNullOrEmpty(value, "value", "LocalizedString");
+ this.value = value;
+ }
+
+ public Locale getLocale()
+ {
+ return locale;
+ }
+
+ public void setLocale(Locale locale)
+ {
+ ParameterValidation.throwIllegalArgExceptionIfNull(locale, "locale");
+ this.locale = locale;
+ }
+
+ public String getResourceName()
+ {
+ return resourceName;
+ }
+
+ public void setResourceName(String resourceName)
+ {
+ this.resourceName = resourceName;
+ }
+}
Added: modules/wsrp/trunk/producer/src/main/java/org/jboss/portal/wsrp/registration/RegistrationPropertyDescription.java
===================================================================
--- modules/wsrp/trunk/producer/src/main/java/org/jboss/portal/wsrp/registration/RegistrationPropertyDescription.java (rev 0)
+++ modules/wsrp/trunk/producer/src/main/java/org/jboss/portal/wsrp/registration/RegistrationPropertyDescription.java 2009-07-22 20:25:22 UTC (rev 13587)
@@ -0,0 +1,387 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2009, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+
+package org.jboss.portal.wsrp.registration;
+
+import org.jboss.portal.common.util.ParameterValidation;
+import org.jboss.portal.registration.PropertyDescription;
+import org.jboss.portal.wsrp.producer.config.ProducerRegistrationRequirements;
+
+import javax.xml.namespace.QName;
+import java.net.URI;
+import java.net.URISyntaxException;
+import java.util.Arrays;
+import java.util.Locale;
+
+/**
+ * @author <a href="mailto:chris.laprun@jboss.com">Chris Laprun</a>
+ * @version $Revision:5865 $
+ * @since 2.6
+ */
+public class RegistrationPropertyDescription implements PropertyDescription
+{
+ private Long key;
+ private QName name;
+ private QName type;
+ private String schemaLocation;
+ private LocalizedString description;
+ private LocalizedString hint;
+ private LocalizedString label;
+ private String[] usages;
+ private QName[] aliases;
+
+ private transient ProducerRegistrationRequirements parent;
+
+ public RegistrationPropertyDescription(QName name, QName type)
+ {
+ this.name = name;
+ this.type = type;
+ }
+
+ public RegistrationPropertyDescription(String name, QName type)
+ {
+ this(new QName(name), type);
+ }
+
+ public RegistrationPropertyDescription()
+ {
+ }
+
+ public RegistrationPropertyDescription(RegistrationPropertyDescription other)
+ {
+ ParameterValidation.throwIllegalArgExceptionIfNull(other, "RegistrationPropertyDescription");
+
+ setName(new QName(other.name.toString()));
+ setType(new QName(other.type.toString()));
+
+ if (other.aliases != null)
+ {
+ aliases = new QName[other.aliases.length];
+ System.arraycopy(other.aliases, 0, aliases, 0, other.aliases.length);
+ }
+
+ if (other.description != null)
+ {
+ setDescription(new LocalizedString(other.description));
+ }
+ if (other.hint != null)
+ {
+ setHint(new LocalizedString(other.hint));
+ }
+ if (other.label != null)
+ {
+ setLabel(new LocalizedString(other.label));
+ }
+ if (other.schemaLocation != null)
+ {
+ setSchemaLocation(other.schemaLocation);
+ }
+
+ if (other.usages != null)
+ {
+ usages = new String[other.usages.length];
+ System.arraycopy(other.usages, 0, usages, 0, other.usages.length);
+ }
+
+ parent = other.parent;
+ }
+
+
+ public boolean equals(Object o)
+ {
+ if (this == o)
+ {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass())
+ {
+ return false;
+ }
+
+ RegistrationPropertyDescription that = (RegistrationPropertyDescription)o;
+
+ if (key != null ? !key.equals(that.key) : that.key != null)
+ {
+ return false;
+ }
+ if (!name.equals(that.name))
+ {
+ return false;
+ }
+ return type.equals(that.type);
+
+ }
+
+ public int hashCode()
+ {
+ int result;
+ result = (key != null ? key.hashCode() : 0);
+ result = 31 * result + name.hashCode();
+ result = 31 * result + type.hashCode();
+ return result;
+ }
+
+ public String toString()
+ {
+ return "Registration Property Description named '" + name +
+ "', type=" + type +
+ ", hint=" + hint +
+ ", label=" + label;
+ }
+
+
+ public Long getKey()
+ {
+ return key;
+ }
+
+ public void setKey(Long key)
+ {
+ this.key = key;
+ }
+
+ public QName getName()
+ {
+ return name;
+ }
+
+ public void setName(QName name)
+ {
+ if (valueWillBeUpdated(this.name, name))
+ {
+ QName oldName = this.name;
+ this.name = name;
+ if (parent != null)
+ {
+ parent.notifyRegistrationPropertyChangeListeners();
+ parent.propertyHasBeenRenamed(this, oldName);
+ }
+ }
+ }
+
+ public void setNameAsString(String name)
+ {
+ setName(new QName(name));
+ }
+
+ public String getNameAsString()
+ {
+ return getName().getLocalPart();
+ }
+
+ public QName getType()
+ {
+ return type;
+ }
+
+ public void setType(QName type)
+ {
+ this.type = (QName)modifyIfNeeded(this.type, type);
+ }
+
+ public String getSchemaLocation()
+ {
+ return schemaLocation;
+ }
+
+ public URI getSchemaLocationAsURI()
+ {
+ try
+ {
+ return new URI(schemaLocation);
+ }
+ catch (URISyntaxException e)
+ {
+ // shouldn't happen
+ throw new IllegalArgumentException("Invalid URI: " + schemaLocation + ". Cause: " + e.getLocalizedMessage());
+ }
+ }
+
+ public void setSchemaLocation(String schemaLocation)
+ {
+ //
+ if (schemaLocation != null)
+ {
+ // first check if schemaLocation is a valid URI
+ try
+ {
+ new URI(schemaLocation);
+ }
+ catch (URISyntaxException e)
+ {
+ throw new IllegalArgumentException("Invalid URI: " + schemaLocation + ". Cause: " + e.getLocalizedMessage());
+ }
+
+ this.schemaLocation = (String)modifyIfNeeded(this.schemaLocation, schemaLocation);
+ }
+ }
+
+ public LocalizedString getDescription()
+ {
+ return description;
+ }
+
+ public void setDescription(LocalizedString description)
+ {
+ this.description = (LocalizedString)modifyIfNeeded(this.description, description);
+ }
+
+ public void setDefaultDescription(String value)
+ {
+ setDescription(value == null ? null : new LocalizedString(value));
+ }
+
+ public LocalizedString getHint()
+ {
+ return hint;
+ }
+
+ public void setHint(LocalizedString hint)
+ {
+ this.hint = (LocalizedString)modifyIfNeeded(this.hint, hint);
+ }
+
+ public void setDefaultHint(String value)
+ {
+ setHint(value == null ? null : new LocalizedString(value));
+ }
+
+ public LocalizedString getLabel()
+ {
+ return label;
+ }
+
+ public void setLabel(LocalizedString label)
+ {
+ this.label = (LocalizedString)modifyIfNeeded(this.label, label);
+ }
+
+ public void setDefaultLabel(String value)
+ {
+ setLabel(value == null ? null : new LocalizedString(value));
+ }
+
+ public String[] getUsages()
+ {
+ return usages;
+ }
+
+ public void setUsages(String[] usages)
+ {
+ if (!Arrays.equals(this.usages, usages))
+ {
+ if (usages != null)
+ {
+ this.usages = new String[usages.length];
+ System.arraycopy(usages, 0, this.usages, 0, usages.length);
+ }
+ else
+ {
+ this.usages = null;
+ }
+ notifyParentOfChangeIfNeeded();
+ }
+ }
+
+ public QName[] getAliases()
+ {
+ return aliases;
+ }
+
+ public void setAliases(QName[] aliases)
+ {
+ if (!Arrays.equals(this.aliases, aliases))
+ {
+ if (aliases != null)
+ {
+ this.aliases = new QName[aliases.length];
+ System.arraycopy(aliases, 0, this.aliases, 0, aliases.length);
+ }
+ else
+ {
+ this.aliases = null;
+ }
+ notifyParentOfChangeIfNeeded();
+ }
+ }
+
+ public void setParent(ProducerRegistrationRequirements requirements)
+ {
+ this.parent = requirements;
+ }
+
+ private void notifyParentOfChangeIfNeeded()
+ {
+ if (parent != null)
+ {
+ parent.notifyRegistrationPropertyChangeListeners();
+ }
+ }
+
+ public Object modifyIfNeeded(Object oldValue, Object newValue)
+ {
+ if (valueWillBeUpdated(oldValue, newValue))
+ {
+ oldValue = newValue;
+ notifyParentOfChangeIfNeeded();
+ }
+
+ return oldValue;
+ }
+
+ private boolean valueWillBeUpdated(Object oldValue, Object newValue)
+ {
+ return (oldValue != null && !oldValue.equals(newValue)) || (oldValue == null && newValue != null);
+ }
+
+ /**
+ * Tries to heuristically determine the language for this RegistrationPropertyDescription
+ *
+ * @return
+ */
+ public Locale getLang()
+ {
+ Locale defaultLocale = Locale.getDefault();
+ Locale locale;
+
+ locale = label != null ? label.getLocale() : defaultLocale;
+ if (!defaultLocale.equals(locale))
+ {
+ return locale;
+ }
+
+ locale = hint != null ? hint.getLocale() : defaultLocale;
+ if (!defaultLocale.equals(locale))
+ {
+ return locale;
+ }
+
+ locale = description != null ? description.getLocale() : defaultLocale;
+ if (!defaultLocale.equals(locale))
+ {
+ return locale;
+ }
+
+ return defaultLocale;
+ }
+}
Added: modules/wsrp/trunk/producer/src/main/java/org/jboss/portal/wsrp/state/LocalPortletInvoker.java
===================================================================
--- modules/wsrp/trunk/producer/src/main/java/org/jboss/portal/wsrp/state/LocalPortletInvoker.java (rev 0)
+++ modules/wsrp/trunk/producer/src/main/java/org/jboss/portal/wsrp/state/LocalPortletInvoker.java 2009-07-22 20:25:22 UTC (rev 13587)
@@ -0,0 +1,184 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.wsrp.state;
+
+import org.jboss.portal.portlet.Portlet;
+import org.jboss.portal.portlet.PortletContext;
+import org.jboss.portal.portlet.PortletInvoker;
+import org.jboss.portal.portlet.PortletInvokerException;
+import org.jboss.portal.portlet.invocation.PortletInvocation;
+import org.jboss.portal.portlet.invocation.response.PortletInvocationResponse;
+import org.jboss.portal.portlet.state.PropertyChange;
+import org.jboss.portal.portlet.state.PropertyMap;
+
+import java.util.List;
+import java.util.Set;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 8786 $
+ */
+public class LocalPortletInvoker implements PortletInvoker
+{
+
+ /** . */
+ private static final ThreadLocal local = new ThreadLocal();
+
+ /** . */
+ private PortletInvoker portletInvoker;
+
+ public PortletInvoker getPortletInvoker()
+ {
+ return portletInvoker;
+ }
+
+ public void setPortletInvoker(PortletInvoker portletInvoker)
+ {
+ this.portletInvoker = portletInvoker;
+ }
+
+ public static boolean isLocal()
+ {
+ return Boolean.TRUE.equals(local.get());
+ }
+
+ public Set getPortlets() throws PortletInvokerException
+ {
+ try
+ {
+ local.set(Boolean.TRUE);
+
+ //
+ return portletInvoker.getPortlets();
+ }
+ finally
+ {
+ local.set(null);
+ }
+ }
+
+ public Portlet getPortlet(PortletContext portletContext) throws IllegalArgumentException, PortletInvokerException
+ {
+ try
+ {
+ local.set(Boolean.TRUE);
+
+ //
+ return portletInvoker.getPortlet(portletContext);
+ }
+ finally
+ {
+ local.set(null);
+ }
+ }
+
+ public PortletInvocationResponse invoke(PortletInvocation invocation) throws IllegalArgumentException, PortletInvokerException
+ {
+ try
+ {
+ local.set(Boolean.TRUE);
+
+ //
+ return portletInvoker.invoke(invocation);
+ }
+ finally
+ {
+ local.set(null);
+ }
+ }
+
+ public PortletContext createClone(PortletContext portletContext) throws IllegalArgumentException, PortletInvokerException, UnsupportedOperationException
+ {
+ try
+ {
+ local.set(Boolean.TRUE);
+
+ //
+ return portletInvoker.createClone(portletContext);
+ }
+ finally
+ {
+ local.set(null);
+ }
+ }
+
+ public List destroyClones(List portletContexts) throws IllegalArgumentException, PortletInvokerException, UnsupportedOperationException
+ {
+ try
+ {
+ local.set(Boolean.TRUE);
+
+ //
+ return portletInvoker.destroyClones(portletContexts);
+ }
+ finally
+ {
+ local.set(null);
+ }
+ }
+
+ public PropertyMap getProperties(PortletContext portletContext, Set keys) throws IllegalArgumentException, PortletInvokerException, UnsupportedOperationException
+ {
+ try
+ {
+ local.set(Boolean.TRUE);
+
+ //
+ return portletInvoker.getProperties(portletContext, keys);
+ }
+ finally
+ {
+ local.set(null);
+ }
+ }
+
+ public PropertyMap getProperties(PortletContext portletContext) throws IllegalArgumentException, PortletInvokerException, UnsupportedOperationException
+ {
+ try
+ {
+ local.set(Boolean.TRUE);
+
+ //
+ return portletInvoker.getProperties(portletContext);
+ }
+ finally
+ {
+ local.set(null);
+ }
+ }
+
+ public PortletContext setProperties(PortletContext portletContext, PropertyChange[] changes) throws IllegalArgumentException, PortletInvokerException, UnsupportedOperationException
+ {
+ try
+ {
+ local.set(Boolean.TRUE);
+
+ //
+ return portletInvoker.setProperties(portletContext, changes);
+ }
+ finally
+ {
+ local.set(null);
+ }
+ }
+}
Added: modules/wsrp/trunk/producer/src/main/java/org/jboss/portal/wsrp/state/PersistentConsumer.java
===================================================================
--- modules/wsrp/trunk/producer/src/main/java/org/jboss/portal/wsrp/state/PersistentConsumer.java (rev 0)
+++ modules/wsrp/trunk/producer/src/main/java/org/jboss/portal/wsrp/state/PersistentConsumer.java 2009-07-22 20:25:22 UTC (rev 13587)
@@ -0,0 +1,227 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.wsrp.state;
+
+import org.jboss.portal.registration.Consumer;
+import org.jboss.portal.registration.ConsumerCapabilities;
+import org.jboss.portal.registration.ConsumerGroup;
+import org.jboss.portal.registration.DuplicateRegistrationException;
+import org.jboss.portal.registration.RegistrationException;
+import org.jboss.portal.registration.RegistrationStatus;
+
+import java.util.Collection;
+import java.util.Collections;
+import java.util.HashSet;
+import java.util.Set;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 8786 $
+ */
+public class PersistentConsumer implements Consumer
+{
+
+ // Persistent fields
+
+ private Long key;
+ private String persistentId;
+ private String persistentName;
+ private RegistrationStatus persistentStatus;
+ private String persistentAgent;
+
+ // Relationships
+
+ private Set relatedRegistrations;
+ private PersistentConsumerGroup relatedGroup;
+
+ // Runtime state
+
+ private ConsumerCapabilities capabilities = new PersistentConsumerCapabilities();
+
+ /**
+ * Manager constructor.
+ *
+ * @param id
+ * @param name
+ */
+ public PersistentConsumer(String id, String name)
+ {
+ this.key = null;
+ this.persistentId = id;
+ this.persistentName = name;
+ this.persistentStatus = RegistrationStatus.PENDING;
+ this.relatedRegistrations = new HashSet();
+ this.relatedGroup = null;
+ this.persistentAgent = null;
+ }
+
+ /** Hibernate constructor. */
+ PersistentConsumer()
+ {
+ this.key = null;
+ this.persistentId = null;
+ this.persistentName = null;
+ this.persistentStatus = null;
+ this.relatedRegistrations = null;
+ this.relatedGroup = null;
+ this.persistentAgent = null;
+ }
+
+ // Hibernate
+
+ public Long getKey()
+ {
+ return key;
+ }
+
+ public void setKey(Long key)
+ {
+ this.key = key;
+ }
+
+ public String getPersistentId()
+ {
+ return persistentId;
+ }
+
+ public void setPersistentId(String persistentId)
+ {
+ this.persistentId = persistentId;
+ }
+
+ public String getPersistentName()
+ {
+ return persistentName;
+ }
+
+ public void setPersistentName(String persistentName)
+ {
+ this.persistentName = persistentName;
+ }
+
+ public RegistrationStatus getPersistentStatus()
+ {
+ return persistentStatus;
+ }
+
+ public void setPersistentStatus(RegistrationStatus persistentStatus)
+ {
+ this.persistentStatus = persistentStatus;
+ }
+
+ public String getPersistentAgent()
+ {
+ return persistentAgent;
+ }
+
+ public void setPersistentAgent(String persistentAgent)
+ {
+ this.persistentAgent = persistentAgent;
+ }
+
+ public Set getRelatedRegistrations()
+ {
+ return relatedRegistrations;
+ }
+
+ public void setRelatedRegistrations(Set relatedRegistrations)
+ {
+ this.relatedRegistrations = relatedRegistrations;
+ }
+
+ public PersistentConsumerGroup getRelatedGroup()
+ {
+ return relatedGroup;
+ }
+
+ public void setRelatedGroup(PersistentConsumerGroup relatedGroup)
+ {
+ this.relatedGroup = relatedGroup;
+ }
+
+ //
+
+ public String getName()
+ {
+ return persistentName;
+ }
+
+ public RegistrationStatus getStatus()
+ {
+ return persistentStatus;
+ }
+
+ public void setStatus(RegistrationStatus status)
+ {
+ this.persistentStatus = status;
+ }
+
+ public Collection getRegistrations() throws RegistrationException
+ {
+ return Collections.unmodifiableSet(relatedRegistrations);
+ }
+
+ public ConsumerGroup getGroup()
+ {
+ return relatedGroup;
+ }
+
+ public String getId()
+ {
+ return persistentId;
+ }
+
+ public ConsumerCapabilities getCapabilities()
+ {
+ return capabilities;
+ }
+
+ public void setCapabilities(ConsumerCapabilities capabilities)
+ {
+ this.capabilities = capabilities;
+ }
+
+ public void setGroup(ConsumerGroup group) throws RegistrationException, DuplicateRegistrationException
+ {
+ if (this.relatedGroup != null)
+ {
+ this.relatedGroup.removeConsumer(this);
+ }
+
+ //
+ if (group != null)
+ {
+ group.addConsumer(this);
+ }
+ }
+
+ public String getConsumerAgent()
+ {
+ return persistentAgent;
+ }
+
+ public void setConsumerAgent(String consumerAgent) throws IllegalArgumentException, IllegalStateException
+ {
+ this.persistentAgent = consumerAgent;
+ }
+}
Added: modules/wsrp/trunk/producer/src/main/java/org/jboss/portal/wsrp/state/PersistentConsumerCapabilities.java
===================================================================
--- modules/wsrp/trunk/producer/src/main/java/org/jboss/portal/wsrp/state/PersistentConsumerCapabilities.java (rev 0)
+++ modules/wsrp/trunk/producer/src/main/java/org/jboss/portal/wsrp/state/PersistentConsumerCapabilities.java 2009-07-22 20:25:22 UTC (rev 13587)
@@ -0,0 +1,90 @@
+/*
+* JBoss, a division of Red Hat
+* Copyright 2008, Red Hat Middleware, LLC, and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+
+package org.jboss.portal.wsrp.state;
+
+import org.jboss.portal.registration.ConsumerCapabilities;
+
+import java.util.List;
+
+/**
+ * @author <a href="mailto:chris.laprun@jboss.com">Chris Laprun</a>
+ * @version $Revision$
+ */
+public class PersistentConsumerCapabilities implements ConsumerCapabilities
+{
+ private boolean supportsGetMethod;
+ private List supportedModes;
+ private List supportedWindowStates;
+ private List supportedUserScopes;
+ private List supportedUserProfileData;
+
+ public boolean supportsGetMethod()
+ {
+ return supportsGetMethod;
+ }
+
+ public List getSupportedModes()
+ {
+ return supportedModes;
+ }
+
+ public List getSupportedWindowStates()
+ {
+ return supportedWindowStates;
+ }
+
+ public List getSupportedUserScopes()
+ {
+ return supportedUserScopes;
+ }
+
+ public List getSupportedUserProfileData()
+ {
+ return supportedUserProfileData;
+ }
+
+ public void setSupportsGetMethod(boolean supportsGetMethod)
+ {
+ this.supportsGetMethod = supportsGetMethod;
+ }
+
+ public void setSupportedModes(List supportedModes)
+ {
+ this.supportedModes = supportedModes;
+ }
+
+ public void setSupportedWindowStates(List supportedWindowStates)
+ {
+ this.supportedWindowStates = supportedWindowStates;
+ }
+
+ public void setSupportedUserScopes(List supportedUserScopes)
+ {
+ this.supportedUserScopes = supportedUserScopes;
+ }
+
+ public void setSupportedUserProfileData(List supportedUserProfileData)
+ {
+ this.supportedUserProfileData = supportedUserProfileData;
+ }
+}
Added: modules/wsrp/trunk/producer/src/main/java/org/jboss/portal/wsrp/state/PersistentConsumerGroup.java
===================================================================
--- modules/wsrp/trunk/producer/src/main/java/org/jboss/portal/wsrp/state/PersistentConsumerGroup.java (rev 0)
+++ modules/wsrp/trunk/producer/src/main/java/org/jboss/portal/wsrp/state/PersistentConsumerGroup.java 2009-07-22 20:25:22 UTC (rev 13587)
@@ -0,0 +1,215 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.wsrp.state;
+
+import org.hibernate.Session;
+import org.jboss.portal.jems.hibernate.ContextObject;
+import org.jboss.portal.registration.Consumer;
+import org.jboss.portal.registration.ConsumerGroup;
+import org.jboss.portal.registration.RegistrationException;
+import org.jboss.portal.registration.RegistrationStatus;
+
+import java.util.Collection;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 8786 $
+ */
+public class PersistentConsumerGroup implements ConsumerGroup, ContextObject
+{
+
+ // Persistent fields
+
+ private Long key;
+ private String persistentName;
+ private RegistrationStatus persistentStatus;
+
+ // Relationships
+
+ private Map relatedConsumers;
+
+ // Context
+
+ private PersistentPortletStatePersistenceManager context;
+
+ public PersistentConsumerGroup(PersistentPortletStatePersistenceManager context, String name)
+ {
+ this.key = null;
+ this.persistentName = name;
+ this.relatedConsumers = new HashMap();
+ this.persistentStatus = RegistrationStatus.PENDING;
+ this.context = context;
+ }
+
+ /** Hibernate constructor. */
+ PersistentConsumerGroup()
+ {
+ this.key = null;
+ this.persistentName = null;
+ this.persistentStatus = null;
+ this.relatedConsumers = null;
+ }
+
+ // ContextObject
+
+ public void setContext(Object context)
+ {
+ this.context = (PersistentPortletStatePersistenceManager)context;
+ }
+
+ // Hibernate
+
+ public Long getKey()
+ {
+ return key;
+ }
+
+ public void setKey(Long key)
+ {
+ this.key = key;
+ }
+
+ public String getPersistentName()
+ {
+ return persistentName;
+ }
+
+ public void setPersistentName(String persistentName)
+ {
+ this.persistentName = persistentName;
+ }
+
+ public RegistrationStatus getPersistentStatus()
+ {
+ return persistentStatus;
+ }
+
+ public void setPersistentStatus(RegistrationStatus persistentStatus)
+ {
+ this.persistentStatus = persistentStatus;
+ }
+
+ public Map getRelatedConsumers()
+ {
+ return relatedConsumers;
+ }
+
+ public void setRelatedConsumers(Map relatedConsumers)
+ {
+ this.relatedConsumers = relatedConsumers;
+ }
+
+ //
+
+ public String getName()
+ {
+ return persistentName;
+ }
+
+ public Collection getConsumers() throws RegistrationException
+ {
+ return Collections.unmodifiableCollection(relatedConsumers.values());
+ }
+
+ public Consumer getConsumer(String consumerId) throws IllegalArgumentException, RegistrationException
+ {
+ if (consumerId == null)
+ {
+ throw new IllegalArgumentException("No null consumer id accepted");
+ }
+
+ //
+ return (Consumer)relatedConsumers.get(consumerId);
+ }
+
+ public void addConsumer(Consumer consumer) throws RegistrationException
+ {
+ PersistentConsumer pconsumer = validateImplementation(consumer);
+
+ //
+ if (relatedConsumers.containsKey(consumer.getId()))
+ {
+ throw new IllegalArgumentException("Consumer already attached " + consumer.getId());
+ }
+
+ //
+ Session session = context.getCurrentSession();
+
+ // Create the relationship
+ relatedConsumers.put(consumer.getId(), pconsumer);
+ pconsumer.setRelatedGroup(this);
+ session.saveOrUpdate(this);
+ session.saveOrUpdate(consumer);
+ }
+
+ public void removeConsumer(Consumer consumer) throws RegistrationException
+ {
+ validateImplementation(consumer);
+
+ //
+ if (relatedConsumers.remove(consumer.getId()) == null)
+ {
+ throw new IllegalArgumentException();
+ }
+ }
+
+ public boolean contains(Consumer consumer)
+ {
+ validateImplementation(consumer);
+ return relatedConsumers.containsKey(consumer.getId());
+ }
+
+ private PersistentConsumer validateImplementation(Consumer consumer) throws IllegalArgumentException
+ {
+ if (consumer == null)
+ {
+ throw new IllegalArgumentException();
+ }
+ if (consumer instanceof PersistentConsumer)
+ {
+ return (PersistentConsumer)consumer;
+ }
+ else
+ {
+ throw new IllegalArgumentException();
+ }
+ }
+
+ public boolean isEmpty()
+ {
+ return relatedConsumers.isEmpty();
+ }
+
+ public RegistrationStatus getStatus()
+ {
+ return persistentStatus;
+ }
+
+ public void setStatus(RegistrationStatus status)
+ {
+ this.persistentStatus = status;
+ }
+}
Added: modules/wsrp/trunk/producer/src/main/java/org/jboss/portal/wsrp/state/PersistentPortletState.java
===================================================================
--- modules/wsrp/trunk/producer/src/main/java/org/jboss/portal/wsrp/state/PersistentPortletState.java (rev 0)
+++ modules/wsrp/trunk/producer/src/main/java/org/jboss/portal/wsrp/state/PersistentPortletState.java 2009-07-22 20:25:22 UTC (rev 13587)
@@ -0,0 +1,249 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.wsrp.state;
+
+import org.jboss.portal.common.util.TypedMap;
+import org.jboss.portal.portlet.state.AbstractPropertyMap;
+import org.jboss.portal.portlet.state.PropertyMap;
+import org.jboss.portal.portlet.state.producer.PortletState;
+import org.jboss.portal.portlet.state.producer.PortletStateContext;
+
+import java.util.Calendar;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 11068 $
+ */
+public class PersistentPortletState implements PortletStateContext
+{
+
+ /** The primary key. */
+ protected Long key;
+
+ /** The portlet id. */
+ protected String portletId;
+
+ /** The different entries. */
+ protected Map entries;
+
+ /** When the state has been created. */
+ protected Date creationTime;
+
+ /** When the state expires, a null value means there is no expiration date scheduled. */
+ protected Date terminationTime;
+
+ /** For now a registration id, later probably a one to many relationship with a registration entry. */
+ protected PersistentRegistration relatedRegistration;
+
+ /** The clones of this state. */
+ protected Set children;
+
+ /** The state that we cloned from. */
+ protected PersistentPortletState parent;
+
+ /** . */
+ private PortletState ctx;
+
+ public PersistentPortletState()
+ {
+ this.key = null;
+ this.portletId = null;
+ this.entries = null;
+ this.creationTime = null;
+ this.terminationTime = null;
+ this.relatedRegistration = null;
+ this.children = null;
+ this.parent = null;
+ this.ctx = null;
+ }
+
+ public PersistentPortletState(String portletId, PropertyMap propertyMap)
+ {
+ this.key = null;
+ this.portletId = portletId;
+ this.entries = new HashMap();
+ this.creationTime = Calendar.getInstance().getTime();
+ this.terminationTime = null;
+ this.relatedRegistration = null;
+ this.children = new HashSet();
+ this.parent = null;
+ this.ctx = null;
+
+ //
+ for (Iterator i = propertyMap.keySet().iterator(); i.hasNext();)
+ {
+ String key = (String)i.next();
+ List<String> value = propertyMap.getProperty(key);
+ entries.put(key, new PersistentPortletStateEntry(key, value));
+ }
+ }
+
+ public Long getKey()
+ {
+ return key;
+ }
+
+ public void setKey(Long key)
+ {
+ this.key = key;
+ }
+
+ public String getId()
+ {
+ return key.toString();
+ }
+
+ public String getPortletId()
+ {
+ return portletId;
+ }
+
+ public void setPortletId(String portletId)
+ {
+ this.portletId = portletId;
+ }
+
+ public Map getEntries()
+ {
+ return entries;
+ }
+
+ public void setEntries(Map entries)
+ {
+ this.entries = entries;
+ }
+
+ public Date getCreationTime()
+ {
+ return creationTime;
+ }
+
+ public void setCreationTime(Date creationTime)
+ {
+ this.creationTime = creationTime;
+ }
+
+ public Date getTerminationTime()
+ {
+ return terminationTime;
+ }
+
+ public void setTerminationTime(Date terminationTime)
+ {
+ this.terminationTime = terminationTime;
+ }
+
+ public PersistentRegistration getRelatedRegistration()
+ {
+ return relatedRegistration;
+ }
+
+ public void setRelatedRegistration(PersistentRegistration relatedRegistration)
+ {
+ this.relatedRegistration = relatedRegistration;
+ }
+
+ public Set getChildren()
+ {
+ return children;
+ }
+
+ public void setChildren(Set children)
+ {
+ this.children = children;
+ }
+
+ public PersistentPortletState getParent()
+ {
+ return parent;
+ }
+
+ public void setParent(PersistentPortletState parent)
+ {
+ this.parent = parent;
+ }
+
+ //
+
+ public PortletState getState()
+ {
+ if (ctx == null)
+ {
+ PropertyMap props = new AbstractPropertyMap(entries, KEY_CONVERTER, VALUE_CONVERTER);
+ ctx = new PortletState(portletId, props);
+ }
+ return ctx;
+ }
+
+ private static final TypedMap.Converter KEY_CONVERTER = new TypedMap.Converter()
+ {
+ protected Object getInternal(Object o) throws IllegalArgumentException, ClassCastException
+ {
+ if (!(o instanceof String))
+ {
+ throw new ClassCastException("Was expecting an instanceof " + String.class.getName() + " but was " + o.getClass().getName());
+ }
+ return o;
+ }
+
+ protected Object getExternal(Object o)
+ {
+ if (!(o instanceof String))
+ {
+ throw new ClassCastException("Was expecting an instanceof " + String.class.getName() + " but was " + o.getClass().getName());
+ }
+ return o;
+ }
+
+ protected boolean equals(Object o, Object o1)
+ {
+ return o.equals(o1);
+ }
+ };
+
+ private static TypedMap.Converter VALUE_CONVERTER = new TypedMap.Converter()
+ {
+ protected Object getInternal(Object o) throws IllegalArgumentException, ClassCastException
+ {
+ throw new IllegalArgumentException("Immutable");
+ }
+
+ protected Object getExternal(Object o)
+ {
+ return ((PersistentPortletStateEntry)o).getValue();
+ }
+
+ protected boolean equals(Object o, Object o1)
+ {
+ return o.equals(o1);
+ }
+ };
+
+}
Added: modules/wsrp/trunk/producer/src/main/java/org/jboss/portal/wsrp/state/PersistentPortletStateEntry.java
===================================================================
--- modules/wsrp/trunk/producer/src/main/java/org/jboss/portal/wsrp/state/PersistentPortletStateEntry.java (rev 0)
+++ modules/wsrp/trunk/producer/src/main/java/org/jboss/portal/wsrp/state/PersistentPortletStateEntry.java 2009-07-22 20:25:22 UTC (rev 13587)
@@ -0,0 +1,183 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.wsrp.state;
+
+import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 12318 $
+ */
+public class PersistentPortletStateEntry implements Serializable
+{
+
+ /** The primary key. */
+ private Long key;
+
+ /** The name. */
+ private String name;
+
+ /** The access mode. */
+ private boolean readOnly;
+
+ /** The preference type. */
+ private int type;
+
+ /** The preference values. */
+ private String[] strings;
+
+ private List<String> value;
+
+ // This flag is used because the value is made up of strings and type
+ // and it is not possible to update the value when strings or type
+ // is updated, so when strings of type is modified with set dirty
+ private boolean dirty;
+
+ public PersistentPortletStateEntry()
+ {
+ this.key = null;
+ this.name = null;
+ this.readOnly = false;
+ this.type = 0;
+ this.strings = null;
+ this.value = null;
+ this.dirty = false;
+ }
+
+ public PersistentPortletStateEntry(String name, List<String> value)
+ {
+ if (value == null)
+ {
+ throw new IllegalArgumentException();
+ }
+ this.key = null;
+ this.name = name;
+ this.readOnly = false;
+ this.type = 1;
+ this.strings = value.toArray(new String[value.size()]);
+ this.value = value;
+ this.dirty = false;
+ }
+
+ public Long getKey()
+ {
+ return key;
+ }
+
+ public void setKey(Long key)
+ {
+ this.key = key;
+ }
+
+ /**
+ *
+ */
+ public String getName()
+ {
+ return name;
+ }
+
+ /** Called by hibernate. */
+ public void setName(String name)
+ {
+ this.name = name;
+ }
+
+ /**
+ *
+ */
+ public int getType()
+ {
+ return type;
+ }
+
+ /** Called by hibernate. */
+ public void setType(int type)
+ {
+ this.type = type;
+ this.dirty = true;
+ }
+
+ public boolean isReadOnly()
+ {
+ return readOnly;
+ }
+
+ public void setReadOnly(boolean readOnly)
+ {
+ this.readOnly = readOnly;
+ }
+
+ /**
+ *
+ */
+ public String[] getStrings()
+ {
+ return strings;
+ }
+
+ /** Called by hibernate. */
+ public void setStrings(String[] strings)
+ {
+ this.strings = strings;
+ this.dirty = true;
+ }
+
+ public List<String> getValue()
+ {
+ if (dirty)
+ {
+ value = new ArrayList<String>();
+ for (int i = 0; i < strings.length; i++)
+ {
+ value.add(strings[i]);
+ }
+ dirty = false;
+ }
+ return value;
+ }
+
+ /** Provide a default impl. */
+ public String toString()
+ {
+ StringBuffer buffer = new StringBuffer("[").append(name).append(",");
+ if (strings == null)
+ {
+ buffer.append("null,");
+ }
+ else
+ {
+ buffer.append("(");
+ for (int i = 0; i < strings.length; i++)
+ {
+ String s = strings[i];
+ buffer.append(i > 0 ? "," : "").append(s);
+ }
+ buffer.append("),");
+ }
+ buffer.append("]");
+ return buffer.toString();
+ }
+}
Added: modules/wsrp/trunk/producer/src/main/java/org/jboss/portal/wsrp/state/PersistentPortletStatePersistenceManager.java
===================================================================
--- modules/wsrp/trunk/producer/src/main/java/org/jboss/portal/wsrp/state/PersistentPortletStatePersistenceManager.java (rev 0)
+++ modules/wsrp/trunk/producer/src/main/java/org/jboss/portal/wsrp/state/PersistentPortletStatePersistenceManager.java 2009-07-22 20:25:22 UTC (rev 13587)
@@ -0,0 +1,555 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.wsrp.state;
+
+import org.hibernate.Query;
+import org.hibernate.Session;
+import org.hibernate.SessionFactory;
+import org.jboss.portal.jems.as.system.AbstractJBossService;
+import org.jboss.portal.jems.hibernate.ObjectContextualizer;
+import org.jboss.portal.portlet.state.InvalidStateIdException;
+import org.jboss.portal.portlet.state.NoSuchStateException;
+import org.jboss.portal.portlet.state.PropertyMap;
+import org.jboss.portal.portlet.state.SimplePropertyMap;
+import org.jboss.portal.portlet.state.producer.PortletStateContext;
+import org.jboss.portal.portlet.state.producer.PortletStatePersistenceManager;
+import org.jboss.portal.registration.Consumer;
+import org.jboss.portal.registration.ConsumerGroup;
+import org.jboss.portal.registration.DuplicateRegistrationException;
+import org.jboss.portal.registration.NoSuchRegistrationException;
+import org.jboss.portal.registration.Registration;
+import org.jboss.portal.registration.RegistrationException;
+import org.jboss.portal.registration.RegistrationLocal;
+import org.jboss.portal.registration.RegistrationPersistenceManager;
+import org.jboss.portal.registration.RegistrationStatus;
+
+import javax.naming.InitialContext;
+import java.util.Collection;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 11068 $
+ */
+public class PersistentPortletStatePersistenceManager extends AbstractJBossService implements PortletStatePersistenceManager, RegistrationPersistenceManager
+{
+
+ /** . */
+ protected SessionFactory sessionFactory;
+
+ /** . */
+ protected String sessionFactoryJNDIName;
+
+ /** . */
+ protected ObjectContextualizer contextualizer;
+
+ public String getSessionFactoryJNDIName()
+ {
+ return sessionFactoryJNDIName;
+ }
+
+ public void setSessionFactoryJNDIName(String sessionFactoryJNDIName)
+ {
+ this.sessionFactoryJNDIName = sessionFactoryJNDIName;
+ }
+
+ public PortletStateContext loadState(String id) throws InvalidStateIdException, NoSuchStateException
+ {
+ Session session = getCurrentSession();
+ return loadState(session, id);
+ }
+
+ public String createState(String portletId, PropertyMap propertyMap)
+ {
+ if (portletId == null)
+ {
+ throw new IllegalArgumentException("id cannot be null");
+ }
+ if (propertyMap == null)
+ {
+ throw new IllegalArgumentException("No null value map accepted");
+ }
+
+ //
+ Session session = getCurrentSession();
+
+ // Create the persistent state
+ PersistentPortletState context = new PersistentPortletState(portletId, propertyMap);
+ session.persist(context);
+
+ // Create relationship with registration if it exists
+ PersistentRegistration registration = (PersistentRegistration)RegistrationLocal.getRegistration();
+ if (registration != null)
+ {
+ registration.getRelatedPortletStates().add(context);
+ context.setRelatedRegistration(registration);
+ }
+
+ //
+ session.flush();
+
+ //
+ return context.getId();
+ }
+
+ public String cloneState(String stateId, PropertyMap propertyMap) throws InvalidStateIdException, NoSuchStateException
+ {
+ if (stateId == null)
+ {
+ throw new IllegalArgumentException("id cannot be null");
+ }
+ if (propertyMap == null)
+ {
+ throw new IllegalArgumentException("value map cannot be null");
+ }
+
+ //
+ Session session = getCurrentSession();
+ PersistentPortletState parentContext = loadState(session, stateId);
+
+ // Create the persistent state
+ PersistentPortletState context = new PersistentPortletState(parentContext.getPortletId(), propertyMap);
+ session.persist(context);
+
+ // Make the association
+ context.setParent(parentContext);
+ parentContext.getChildren().add(context);
+ session.update(parentContext);
+
+ // Create relationship with registration if it exists
+ PersistentRegistration registration = (PersistentRegistration)RegistrationLocal.getRegistration();
+ if (registration != null)
+ {
+ registration.getRelatedPortletStates().add(context);
+ context.setRelatedRegistration(registration);
+ }
+
+ //
+ session.flush();
+
+ //
+ return context.getId();
+ }
+
+ public String cloneState(String stateId) throws IllegalArgumentException, NoSuchStateException, InvalidStateIdException
+ {
+ if (stateId == null)
+ {
+ throw new IllegalArgumentException("id cannot be null");
+ }
+
+ //
+ Session session = getCurrentSession();
+ PersistentPortletState parentContext = loadState(session, stateId);
+
+ // Create the persistent state
+ PersistentPortletState context = new PersistentPortletState(parentContext.getPortletId(), new SimplePropertyMap(parentContext.getState().getProperties()));
+ session.persist(context);
+
+ // Make the association
+ context.setParent(parentContext);
+ parentContext.getChildren().add(context);
+ session.update(parentContext);
+
+ // Create relationship with registration if it exists
+ PersistentRegistration registration = (PersistentRegistration)RegistrationLocal.getRegistration();
+ if (registration != null)
+ {
+ registration.getRelatedPortletStates().add(context);
+ context.setRelatedRegistration(registration);
+ }
+
+ //
+ session.flush();
+
+ //
+ return context.getId();
+ }
+
+ public void updateState(String stateId, PropertyMap propertyMap) throws InvalidStateIdException, NoSuchStateException
+ {
+ Session session = getCurrentSession();
+ PersistentPortletState context = loadState(session, stateId);
+
+ //
+ context.entries.clear();
+ for (Iterator i = propertyMap.keySet().iterator(); i.hasNext();)
+ {
+ String key = (String)i.next();
+ List<String> value = propertyMap.getProperty(key);
+ PersistentPortletStateEntry entry = new PersistentPortletStateEntry(key, value);
+ context.entries.put(key, entry);
+ }
+
+ //
+ session.update(context);
+ }
+
+ public void destroyState(String stateId) throws InvalidStateIdException, NoSuchStateException
+ {
+ if (stateId == null)
+ {
+ throw new IllegalArgumentException("No null state id accepted");
+ }
+
+ //
+ Session session = getCurrentSession();
+ PersistentPortletState context = loadState(session, stateId);
+
+ // Efficiently set the children parent to null
+ String update = "update PersistentPortletState p set p.parent=NULL where p.parent=:parent";
+ Query query = session.createQuery(update).setLong("parent", context.getKey().longValue());
+ query.executeUpdate();
+
+ // Destroy any relationship with registration
+ PersistentRegistration registration = context.getRelatedRegistration();
+ if (registration != null)
+ {
+ registration.getRelatedPortletStates().remove(context);
+ context.setRelatedRegistration(null);
+ }
+
+ // Delete the state
+ session.delete(context);
+ session.flush();
+ }
+
+ protected void startService() throws Exception
+ {
+ sessionFactory = (SessionFactory)new InitialContext().lookup(sessionFactoryJNDIName);
+ contextualizer = new ObjectContextualizer(this);
+ contextualizer.attach(sessionFactory);
+ }
+
+ protected void stopService() throws Exception
+ {
+ contextualizer = null;
+ sessionFactory = null;
+ }
+
+ protected Session getCurrentSession()
+ {
+ return sessionFactory.getCurrentSession();
+ }
+
+ private PersistentPortletState loadState(Session session, String stateId) throws NoSuchStateException, InvalidStateIdException
+ {
+ if (stateId == null)
+ {
+ throw new IllegalArgumentException("id cannot be null");
+ }
+
+ try
+ {
+ Long key = new Long(stateId);
+ PersistentPortletState context = (PersistentPortletState)session.get(PersistentPortletState.class, key);
+
+ //
+ if (context == null)
+ {
+ throw new NoSuchStateException(stateId);
+ }
+
+ //
+ return context;
+ }
+ catch (NumberFormatException e)
+ {
+ throw new InvalidStateIdException(e, stateId);
+ }
+ }
+
+ // RegistrationPersistenceManager ***********************************************************************************
+
+
+ public Consumer createConsumer(String consumerId, String consumerName) throws RegistrationException
+ {
+ if (consumerId == null)
+ {
+ throw new IllegalArgumentException("No null consumer id accepted");
+ }
+ if (consumerName == null)
+ {
+ throw new IllegalArgumentException("No null consumer name accepted");
+ }
+
+ // Get hibernate session
+ Session session = getCurrentSession();
+
+ //
+ PersistentConsumer consumer = new PersistentConsumer(consumerId, consumerName);
+ session.persist(consumer);
+
+ //
+ return consumer;
+ }
+
+ public ConsumerGroup getConsumerGroup(String name) throws RegistrationException
+ {
+ // Get hibernate session
+ Session session = getCurrentSession();
+
+ //
+ return findGroupByName(session, name);
+ }
+
+ public ConsumerGroup createConsumerGroup(String name) throws RegistrationException
+ {
+ if (name == null)
+ {
+ throw new IllegalArgumentException("No null name accepted");
+ }
+
+ // Get hibernate session
+ Session session = getCurrentSession();
+ PersistentConsumerGroup group = null;
+
+ // Detect duplicate
+ if (findGroupByName(session, name) != null)
+ {
+ throw new DuplicateRegistrationException("Group " + name + " already exists");
+ }
+
+ // Create and persist
+ group = new PersistentConsumerGroup(this, name);
+ session.persist(group);
+
+ //
+ return group;
+ }
+
+ public void removeConsumerGroup(String name) throws RegistrationException
+ {
+ // Get hibernate session
+ Session session = getCurrentSession();
+
+ //
+ PersistentConsumerGroup group = getGroupByName(session, name);
+
+ //
+ session.delete(group);
+ }
+
+ public void removeConsumer(String consumerId) throws RegistrationException
+ {
+ // Get hibernate session
+ Session session = getCurrentSession();
+
+ //
+ PersistentConsumer consumer = getConsumerById(session, consumerId);
+
+ //
+ session.delete(consumer);
+ }
+
+ public void removeRegistration(String registrationId) throws RegistrationException
+ {
+ if (registrationId == null)
+ {
+ throw new IllegalArgumentException("No null registration id accepted");
+ }
+
+ // Get hibernate session
+ Session session = getCurrentSession();
+
+ //
+ PersistentRegistration registration = getRegistrationById(session, registrationId);
+
+ // Get related consumer
+ PersistentConsumer consumer = registration.getRelatedConsumer();
+
+ // Destroy relationship
+ consumer.getRelatedRegistrations().remove(registration);
+ registration.setRelatedConsumer(null);
+
+ // Delete the registration
+ session.delete(registration);
+ session.flush();
+ }
+
+ public Consumer getConsumerById(String consumerId) throws RegistrationException
+ {
+ // Get hibernate session
+ Session session = getCurrentSession();
+
+ //
+ return findConsumerById(session, consumerId);
+ }
+
+ public Registration addRegistrationFor(String consumerId, Map registrationProperties) throws RegistrationException
+ {
+ if (registrationProperties == null)
+ {
+ throw new IllegalArgumentException("No null registration properties accepted");
+ }
+
+ // Get hibernate session
+ Session session = getCurrentSession();
+
+ // Perform lookup
+ PersistentConsumer consumer = getConsumerById(session, consumerId);
+
+ // Create and persist registration and build relationship
+ PersistentRegistration registration = new PersistentRegistration(registrationProperties, RegistrationStatus.PENDING);
+ registration.setRelatedConsumer(consumer);
+ consumer.getRelatedRegistrations().add(registration);
+ session.persist(registration);
+ session.saveOrUpdate(consumer);
+
+ //
+ return registration;
+ }
+
+ public Registration getRegistration(String registrationId)
+ {
+ // Get hibernate session
+ Session session = getCurrentSession();
+
+ //
+ return findRegistrationById(session, registrationId);
+ }
+
+ public Consumer addConsumerToGroupNamed(String consumerId, String groupName) throws RegistrationException
+ {
+ Consumer consumer = getConsumerById(consumerId);
+
+ // Build relationship
+ ConsumerGroup group = getConsumerGroup(groupName);
+ consumer.setGroup(group);
+
+ //
+ return consumer;
+ }
+
+ public Collection getConsumerGroups()
+ {
+ Session session = getCurrentSession();
+ Query query = session.createQuery("from PersistentConsumerGroup");
+ return query.list();
+ }
+
+ public Collection getConsumers()
+ {
+ Session session = getCurrentSession();
+ Query query = session.createQuery("from PersistentConsumer");
+ return query.list();
+ }
+
+ public Collection getRegistrations()
+ {
+ Session session = getCurrentSession();
+ Query query = session.createQuery("from PersistentRegistration");
+ return query.list();
+ }
+
+ private PersistentRegistration getRegistrationById(Session session, String registrationId) throws IllegalArgumentException, NoSuchRegistrationException
+ {
+ PersistentRegistration registration = findRegistrationById(session, registrationId);
+
+ //
+ if (registration == null)
+ {
+ throw new NoSuchRegistrationException("Cant find a consumer with the id " + registrationId);
+ }
+
+ //
+ return registration;
+ }
+
+ private PersistentRegistration findRegistrationById(Session session, String registrationId) throws IllegalArgumentException
+ {
+ if (registrationId == null)
+ {
+ throw new IllegalArgumentException("No null consumer id accepted");
+ }
+
+ try
+ {
+ // Parse the key
+ Long key = new Long(registrationId);
+
+ // Perform lookup
+ return (PersistentRegistration)session.get(PersistentRegistration.class, key);
+ }
+ catch (NumberFormatException e)
+ {
+ throw new IllegalArgumentException("Bad registration id format " + registrationId);
+ }
+ }
+
+ private PersistentConsumer getConsumerById(Session session, String consumerId) throws IllegalArgumentException, NoSuchRegistrationException
+ {
+ PersistentConsumer consumer = findConsumerById(session, consumerId);
+
+ //
+ if (consumer == null)
+ {
+ throw new NoSuchRegistrationException("Cant find a consumer with the id " + consumerId);
+ }
+
+ //
+ return consumer;
+ }
+
+ private PersistentConsumer findConsumerById(Session session, String consumerId) throws IllegalArgumentException
+ {
+ if (consumerId == null)
+ {
+ throw new IllegalArgumentException("No null consumer id accepted");
+ }
+
+ //
+ Query query = session.createQuery("from PersistentConsumer where persistentId=:consumerId");
+ query.setString("consumerId", consumerId);
+ return (PersistentConsumer)query.uniqueResult();
+ }
+
+ private PersistentConsumerGroup getGroupByName(Session session, String groupName) throws IllegalArgumentException, NoSuchRegistrationException
+ {
+ PersistentConsumerGroup group = findGroupByName(session, groupName);
+
+ //
+ if (group == null)
+ {
+ throw new NoSuchRegistrationException("Cant find a group with the name " + groupName);
+ }
+
+ //
+ return group;
+ }
+
+ private PersistentConsumerGroup findGroupByName(Session session, String groupName) throws IllegalArgumentException
+ {
+ if (groupName == null)
+ {
+ throw new IllegalArgumentException("No null group name accepted");
+ }
+
+ //
+ Query query = session.createQuery("from PersistentConsumerGroup where persistentName=:groupName");
+ query.setString("groupName", groupName);
+ return (PersistentConsumerGroup)query.uniqueResult();
+ }
+}
Added: modules/wsrp/trunk/producer/src/main/java/org/jboss/portal/wsrp/state/PersistentRegistration.java
===================================================================
--- modules/wsrp/trunk/producer/src/main/java/org/jboss/portal/wsrp/state/PersistentRegistration.java (rev 0)
+++ modules/wsrp/trunk/producer/src/main/java/org/jboss/portal/wsrp/state/PersistentRegistration.java 2009-07-22 20:25:22 UTC (rev 13587)
@@ -0,0 +1,382 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.wsrp.state;
+
+import org.jboss.portal.common.NotYetImplemented;
+import org.jboss.portal.common.util.LazyMap;
+import org.jboss.portal.common.util.MapAccessor;
+import org.jboss.portal.common.util.TypedMap;
+import org.jboss.portal.registration.Consumer;
+import org.jboss.portal.registration.Registration;
+import org.jboss.portal.registration.RegistrationStatus;
+
+import javax.xml.namespace.QName;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Map;
+import java.util.Set;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 10228 $
+ */
+public class PersistentRegistration implements Registration
+{
+
+ // Persistent fields
+
+ private Long key;
+ private String persistentHandle;
+ private RegistrationStatus persistentStatus;
+ private Map<String, Object> persistentProperties;
+
+ // Relationships
+
+ private PersistentConsumer relatedConsumer;
+ private Set relatedPortletStates;
+
+ // Wrapper
+
+ private Properties properties;
+
+ /** Hibernate constructor. */
+ PersistentRegistration()
+ {
+ this.key = null;
+ this.persistentHandle = null;
+ this.relatedConsumer = null;
+ this.persistentStatus = null;
+ this.persistentProperties = new HashMap<String, Object>();
+ this.properties = new Properties();
+ this.relatedPortletStates = null;
+ }
+
+ public PersistentRegistration(Map<String, Object> properties, RegistrationStatus status)
+ {
+ this.key = null;
+ this.persistentHandle = null;
+ this.relatedConsumer = null;
+ this.persistentStatus = status;
+ this.persistentProperties = properties;
+ this.properties = new Properties();
+ this.relatedPortletStates = new HashSet();
+
+ // Perform properties validation
+ this.properties.validate();
+ }
+
+ // Hibernate
+
+ public Long getKey()
+ {
+ return key;
+ }
+
+ public void setKey(Long key)
+ {
+ this.key = key;
+ }
+
+ public Set getRelatedPortletStates()
+ {
+ return relatedPortletStates;
+ }
+
+ public void setRelatedPortletStates(Set relatedPortletStates)
+ {
+ this.relatedPortletStates = relatedPortletStates;
+ }
+
+ public String getPersistentHandle()
+ {
+ return persistentHandle;
+ }
+
+ public void setPersistentHandle(String persistentHandle)
+ {
+ this.persistentHandle = persistentHandle;
+ }
+
+ public PersistentConsumer getRelatedConsumer()
+ {
+ return relatedConsumer;
+ }
+
+ public void setRelatedConsumer(PersistentConsumer relatedConsumer)
+ {
+ this.relatedConsumer = relatedConsumer;
+ }
+
+ public RegistrationStatus getPersistentStatus()
+ {
+ return persistentStatus;
+ }
+
+ public void setPersistentStatus(RegistrationStatus persistentStatus)
+ {
+ this.persistentStatus = persistentStatus;
+ }
+
+ public Map<String, Object> getPersistentProperties()
+ {
+ return persistentProperties;
+ }
+
+ public void setPersistentProperties(Map<String, Object> persistentProperties)
+ {
+ this.persistentProperties = persistentProperties;
+ }
+
+ //
+
+ public String getId()
+ {
+ if (key == null)
+ {
+ // If that ever happens it is a bug
+ throw new IllegalStateException("Transient registration object");
+ }
+ return key.toString();
+ }
+
+ public void setRegistrationHandle(String handle)
+ {
+ this.persistentHandle = handle;
+ }
+
+ public String getRegistrationHandle()
+ {
+ return persistentHandle;
+ }
+
+ public Consumer getConsumer()
+ {
+ return relatedConsumer;
+ }
+
+ public Map<String, Object> getProperties()
+ {
+ return Collections.unmodifiableMap(properties);
+ }
+
+ public void setPropertyValueFor(QName propertyName, Object value)
+ {
+ properties.setProperty(propertyName, value);
+ }
+
+ public void setPropertyValueFor(String propertyName, Object value)
+ {
+ properties.setProperty(propertyName, value);
+ }
+
+ public void removeProperty(QName propertyName)
+ {
+ properties.removeProperty(propertyName);
+ }
+
+ public void removeProperty(String propertyName)
+ {
+ properties.removeProperty(propertyName);
+ }
+
+ public Object getPropertyValueFor(QName propertyName)
+ {
+ return properties.getProperty(propertyName);
+ }
+
+ public Object getPropertyValueFor(String propertyName)
+ {
+ return properties.getProperty(propertyName);
+ }
+
+ public void updateProperties(Map registrationProperties)
+ {
+ properties.replace(registrationProperties);
+ }
+
+ public boolean hasEqualProperties(Registration registration)
+ {
+ if (registration != null)
+ {
+ PersistentRegistration preg = (PersistentRegistration)registration;
+
+ //
+ return hasEqualProperties(preg.persistentProperties);
+ }
+
+ //
+ return false;
+ }
+
+ public boolean hasEqualProperties(Map properties)
+ {
+ return this.properties.equals(properties);
+ }
+
+ public RegistrationStatus getStatus()
+ {
+ return persistentStatus;
+ }
+
+ public void setStatus(RegistrationStatus status)
+ {
+ this.persistentStatus = status;
+ }
+
+ public void clearAssociatedState()
+ {
+ throw new NotYetImplemented();
+ }
+
+ // ***********
+
+ private static final TypedMap.Converter KEY_CONVERTER = new TypedMap.Converter()
+ {
+ protected Object getInternal(Object o) throws IllegalArgumentException, ClassCastException
+ {
+ if (o instanceof QName == false)
+ {
+ throw new ClassCastException();
+ }
+ return o;
+ }
+
+ protected Object getExternal(Object o)
+ {
+ return o;
+ }
+
+ protected boolean equals(Object o, Object o1)
+ {
+ return o.equals(o1);
+ }
+ };
+
+ private static final TypedMap.Converter VALUE_CONVERTER = new TypedMap.Converter()
+ {
+ protected Object getInternal(Object o) throws IllegalArgumentException, ClassCastException
+ {
+ if (o instanceof String == false)
+ {
+ throw new ClassCastException();
+ }
+ return o;
+ }
+
+ protected Object getExternal(Object o)
+ {
+ return o;
+ }
+
+ protected boolean equals(Object o, Object o1)
+ {
+ return o.equals(o1);
+ }
+ };
+
+ private LazyMap<String, Object> lazyMap = new LazyMap<String, Object>(new MapAccessor<String, Object>()
+ {
+ public Map<String, Object> getMap(boolean writable)
+ {
+ return persistentProperties;
+ }
+
+ });
+
+ /** Implement registration properties semantics, mostly validation and equality. */
+ public class Properties extends TypedMap
+ {
+
+ public Properties()
+ {
+ super(lazyMap, KEY_CONVERTER, VALUE_CONVERTER);
+ }
+
+ public void setProperty(String propertyName, Object value)
+ {
+ if (propertyName == null)
+ {
+ throw new IllegalArgumentException("No null property name accepted");
+ }
+
+ //
+ setProperty(new QName(propertyName), value);
+ }
+
+ public void setProperty(QName propertyName, Object value)
+ {
+ if (propertyName == null)
+ {
+ throw new IllegalArgumentException("No null property name accepted");
+ }
+
+ //
+ put(propertyName, value);
+ }
+
+ public void removeProperty(QName propertyName)
+ {
+ if (propertyName == null)
+ {
+ throw new IllegalArgumentException("No null property name accepted");
+ }
+
+ //
+ remove(propertyName);
+ }
+
+ public void removeProperty(String propertyName)
+ {
+ if (propertyName == null)
+ {
+ throw new IllegalArgumentException("No null property name accepted");
+ }
+
+ //
+ removeProperty(new QName(propertyName));
+ }
+
+ public Object getProperty(QName propertyName)
+ {
+ if (propertyName == null)
+ {
+ throw new IllegalArgumentException("No null property name accepted");
+ }
+
+ //
+ return get(propertyName);
+ }
+
+ public Object getProperty(String propertyName)
+ {
+ if (propertyName == null)
+ {
+ throw new IllegalArgumentException("No null property name accepted");
+ }
+
+ //
+ return getProperty(new QName(propertyName));
+ }
+ }
+}
Added: modules/wsrp/trunk/producer/src/main/java/org/jboss/portal/wsrp/state/ProducerPortletInvoker.java
===================================================================
--- modules/wsrp/trunk/producer/src/main/java/org/jboss/portal/wsrp/state/ProducerPortletInvoker.java (rev 0)
+++ modules/wsrp/trunk/producer/src/main/java/org/jboss/portal/wsrp/state/ProducerPortletInvoker.java 2009-07-22 20:25:22 UTC (rev 13587)
@@ -0,0 +1,55 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.wsrp.state;
+
+import org.jboss.portal.common.invocation.InvocationException;
+import org.jboss.portal.portlet.PortletContext;
+import org.jboss.portal.portlet.PortletInvokerException;
+import org.jboss.portal.portlet.invocation.PortletInvocation;
+import org.jboss.portal.portlet.invocation.response.PortletInvocationResponse;
+
+import java.util.List;
+
+/**
+ * The subclass is used to be able to add AOP behavior.
+ *
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 8786 $
+ */
+public class ProducerPortletInvoker extends org.jboss.portal.portlet.state.producer.ProducerPortletInvoker
+{
+ public PortletContext createClone(PortletContext portletContext) throws IllegalArgumentException, PortletInvokerException, UnsupportedOperationException
+ {
+ return super.createClone(portletContext);
+ }
+
+ public List destroyClones(List portletIds) throws IllegalArgumentException, PortletInvokerException, UnsupportedOperationException
+ {
+ return super.destroyClones(portletIds);
+ }
+
+ public PortletInvocationResponse invoke(PortletInvocation invocation) throws PortletInvokerException, InvocationException
+ {
+ return super.invoke(invocation);
+ }
+}
Added: modules/wsrp/trunk/producer/src/main/java/org/jboss/portal/wsrp/state/RegistrationStatusUserType.java
===================================================================
--- modules/wsrp/trunk/producer/src/main/java/org/jboss/portal/wsrp/state/RegistrationStatusUserType.java (rev 0)
+++ modules/wsrp/trunk/producer/src/main/java/org/jboss/portal/wsrp/state/RegistrationStatusUserType.java 2009-07-22 20:25:22 UTC (rev 13587)
@@ -0,0 +1,142 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.wsrp.state;
+
+import org.hibernate.Hibernate;
+import org.hibernate.HibernateException;
+import org.hibernate.usertype.UserType;
+import org.jboss.portal.registration.RegistrationStatus;
+
+import java.io.Serializable;
+import java.sql.PreparedStatement;
+import java.sql.ResultSet;
+import java.sql.SQLException;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 8786 $
+ */
+public class RegistrationStatusUserType implements UserType
+{
+
+ /** . */
+ private static final int[] SQL_TYPES = {Hibernate.INTEGER.sqlType()};
+
+ public int[] sqlTypes()
+ {
+ return SQL_TYPES;
+ }
+
+ public Class returnedClass()
+ {
+ return RegistrationStatus.class;
+ }
+
+ public boolean equals(Object x, Object y) throws HibernateException
+ {
+ if (x == y)
+ {
+ return true;
+ }
+ else if (x == null || y == null)
+ {
+ return false;
+ }
+ else
+ {
+ return x.equals(y);
+ }
+ }
+
+ public int hashCode(Object x) throws HibernateException
+ {
+ return x.hashCode();
+ }
+
+ public Object nullSafeGet(ResultSet resultSet, String[] names, Object owner) throws HibernateException, SQLException
+ {
+ int value = resultSet.getInt(names[0]);
+ if (resultSet.wasNull())
+ {
+ return null;
+ }
+
+ //
+ switch (value)
+ {
+ case 1:
+ return RegistrationStatus.VALID;
+ case 2:
+ return RegistrationStatus.INVALID;
+ default:
+ return RegistrationStatus.PENDING;
+ }
+ }
+
+ public void nullSafeSet(PreparedStatement statement, Object value, int index) throws HibernateException, SQLException
+ {
+ if (value == null)
+ {
+ statement.setNull(index, SQL_TYPES[0]);
+ }
+ else
+ {
+ RegistrationStatus status = (RegistrationStatus)value;
+ int i = 0;
+ if (status == RegistrationStatus.VALID)
+ {
+ i = 1;
+ }
+ else if (status == RegistrationStatus.INVALID)
+ {
+ i = 2;
+ }
+ statement.setInt(index, i);
+ }
+ }
+
+ public Object deepCopy(Object value) throws HibernateException
+ {
+ return value;
+ }
+
+ public boolean isMutable()
+ {
+ return false;
+ }
+
+ public Serializable disassemble(Object value) throws HibernateException
+ {
+ return (RegistrationStatus)value;
+ }
+
+ public Object assemble(Serializable cached, Object owner) throws HibernateException
+ {
+ return cached;
+ }
+
+ public Object replace(Object original, Object target, Object owner) throws HibernateException
+ {
+ return original;
+ }
+}
Added: modules/wsrp/trunk/producer/src/main/java/org/jboss/portal/wsrp/state/StateManagementPolicyImpl.java
===================================================================
--- modules/wsrp/trunk/producer/src/main/java/org/jboss/portal/wsrp/state/StateManagementPolicyImpl.java (rev 0)
+++ modules/wsrp/trunk/producer/src/main/java/org/jboss/portal/wsrp/state/StateManagementPolicyImpl.java 2009-07-22 20:25:22 UTC (rev 13587)
@@ -0,0 +1,52 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.wsrp.state;
+
+import org.jboss.portal.portlet.state.StateManagementPolicy;
+import org.jboss.portal.registration.Registration;
+import org.jboss.portal.registration.RegistrationLocal;
+
+/**
+ * An implementation that rely on thread local context to make up its decision. State is locally persisted only for the
+ * local portal or for wsrp invocations in the context of a registration.
+ *
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 8786 $
+ */
+public class StateManagementPolicyImpl implements StateManagementPolicy
+{
+ public boolean persistLocally()
+ {
+ // Otherwise the optional registration from the wsrp layer
+ Registration registration = RegistrationLocal.getRegistration();
+
+ // Persist locally if we are in the scope of an existing registration
+ if (registration != null)
+ {
+ return true;
+ }
+
+ // Otherwise if this is a local call we persist locally
+ return LocalPortletInvoker.isLocal();
+ }
+}
Added: modules/wsrp/trunk/producer/src/main/java/org/jboss/portal/wsrp/state/TypedStringArray.java
===================================================================
--- modules/wsrp/trunk/producer/src/main/java/org/jboss/portal/wsrp/state/TypedStringArray.java (rev 0)
+++ modules/wsrp/trunk/producer/src/main/java/org/jboss/portal/wsrp/state/TypedStringArray.java 2009-07-22 20:25:22 UTC (rev 13587)
@@ -0,0 +1,60 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.wsrp.state;
+
+/**
+ * An immutable typed string array.
+ *
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 8786 $
+ */
+public class TypedStringArray
+{
+
+ /** The type. */
+ private final int type;
+
+ /** The strings. */
+ private final String[] strings;
+
+ /** @throws IllegalArgumentException if strings is null */
+ public TypedStringArray(int type, String[] strings) throws IllegalArgumentException
+ {
+ if (strings == null)
+ {
+ throw new IllegalArgumentException("strings cannot be null");
+ }
+ this.type = type;
+ this.strings = strings;
+ }
+
+ public int getType()
+ {
+ return type;
+ }
+
+ public String[] getStrings()
+ {
+ return strings;
+ }
+}
Added: modules/wsrp/trunk/producer/src/main/java/org/jboss/portal/wsrp/state/ValueManager.java
===================================================================
--- modules/wsrp/trunk/producer/src/main/java/org/jboss/portal/wsrp/state/ValueManager.java (rev 0)
+++ modules/wsrp/trunk/producer/src/main/java/org/jboss/portal/wsrp/state/ValueManager.java 2009-07-22 20:25:22 UTC (rev 13587)
@@ -0,0 +1,86 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.wsrp.state;
+
+import org.jboss.portal.common.value.BooleanValue;
+import org.jboss.portal.common.value.FloatValue;
+import org.jboss.portal.common.value.IntegerValue;
+import org.jboss.portal.common.value.StringValue;
+import org.jboss.portal.common.value.Value;
+
+/**
+ * A manager handling type conversion. For now we handle only basic types : java.lang.String, integer and boolean.
+ *
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 8786 $
+ */
+public class ValueManager
+{
+
+ /** Represents a string type. */
+ public static final int TYPE_STRING = 1;
+
+ /** Represents a integer type. */
+ public static final int TYPE_INTEGER = 2;
+
+ /** Represents a boolean type. */
+ public static final int TYPE_BOOLEAN = 3;
+
+ /** Represents a boolean type. */
+ public static final int TYPE_FLOAT = 4;
+
+ public static Value toValue(TypedStringArray tsa)
+ {
+ switch (tsa.getType())
+ {
+ case TYPE_INTEGER:
+ return new IntegerValue(tsa.getStrings());
+ case TYPE_BOOLEAN:
+ return new BooleanValue(tsa.getStrings());
+ case TYPE_FLOAT:
+ return new FloatValue(tsa.getStrings());
+ default:
+ return new StringValue(tsa.getStrings());
+ }
+ }
+
+ public static TypedStringArray toTypedStringArray(Value value)
+ {
+ if (value.isInstanceOf(Integer.class))
+ {
+ return new TypedStringArray(TYPE_INTEGER, value.asStringArray());
+ }
+ else if (value.isInstanceOf(Boolean.class))
+ {
+ return new TypedStringArray(TYPE_BOOLEAN, value.asStringArray());
+ }
+ else if (value.isInstanceOf(Float.class))
+ {
+ return new TypedStringArray(TYPE_FLOAT, value.asStringArray());
+ }
+ else
+ {
+ return new TypedStringArray(TYPE_STRING, value.asStringArray());
+ }
+ }
+}
Added: modules/wsrp/trunk/producer/src/main/webapp/WEB-INF/jaxrpc-mappings.xml
===================================================================
--- modules/wsrp/trunk/producer/src/main/webapp/WEB-INF/jaxrpc-mappings.xml (rev 0)
+++ modules/wsrp/trunk/producer/src/main/webapp/WEB-INF/jaxrpc-mappings.xml 2009-07-22 20:25:22 UTC (rev 13587)
@@ -0,0 +1,2052 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ ~ JBoss, a division of Red Hat ~
+ ~ Copyright 2009, Red Hat Middleware, LLC, and individual
+ ~ contributors as indicated by the @authors tag. See the
+ ~ copyright.txt in the distribution for a full listing of
+ ~ individual contributors.
+ ~
+ ~ This is free software; you can redistribute it and/or modify it
+ ~ under the terms of the GNU Lesser General Public License as
+ ~ published by the Free Software Foundation; either version 2.1 of
+ ~ the License, or (at your option) any later version.
+ ~
+ ~ This software is distributed in the hope that it will be useful,
+ ~ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ ~ Lesser General Public License for more details.
+ ~
+ ~ You should have received a copy of the GNU Lesser General Public
+ ~ License along with this software; if not, write to the Free
+ ~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ ~ 02110-1301 USA, or see the FSF site: http://www.fsf.org. ~
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
+
+<java-wsdl-mapping xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ version="1.1"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://www.ibm.com/webservices/xsd/j2ee_jaxrpc_mapping_1_1.xsd">
+ <package-mapping>
+ <package-type>org.jboss.portal.wsrp.core</package-type>
+ <namespaceURI>urn:oasis:names:tc:wsrp:v1:wsdl</namespaceURI>
+ </package-mapping>
+ <package-mapping>
+ <package-type>org.jboss.portal.wsrp.core</package-type>
+ <namespaceURI>urn:oasis:names:tc:wsrp:v1:types</namespaceURI>
+ </package-mapping>
+ <package-mapping>
+ <package-type>org.jboss.portal.wsrp.core</package-type>
+ <namespaceURI>urn:oasis:names:tc:wsrp:v1:intf</namespaceURI>
+ </package-mapping>
+ <java-xml-type-mapping>
+ <java-type>org.jboss.portal.wsrp.core.ClonePortlet</java-type>
+ <anonymous-type-qname>urn:oasis:names:tc:wsrp:v1:types:>clonePortlet</anonymous-type-qname>
+ <qname-scope>complexType</qname-scope>
+ <variable-mapping>
+ <java-variable-name>registrationContext</java-variable-name>
+ <xml-element-name>registrationContext</xml-element-name>
+ </variable-mapping>
+ <variable-mapping>
+ <java-variable-name>portletContext</java-variable-name>
+ <xml-element-name>portletContext</xml-element-name>
+ </variable-mapping>
+ <variable-mapping>
+ <java-variable-name>userContext</java-variable-name>
+ <xml-element-name>userContext</xml-element-name>
+ </variable-mapping>
+ </java-xml-type-mapping>
+ <java-xml-type-mapping>
+ <java-type>org.jboss.portal.wsrp.core.UpdateResponse</java-type>
+ <root-type-qname xmlns:typeNS="urn:oasis:names:tc:wsrp:v1:types">typeNS:UpdateResponse</root-type-qname>
+ <qname-scope>complexType</qname-scope>
+ <variable-mapping>
+ <java-variable-name>sessionContext</java-variable-name>
+ <xml-element-name>sessionContext</xml-element-name>
+ </variable-mapping>
+ <variable-mapping>
+ <java-variable-name>portletContext</java-variable-name>
+ <xml-element-name>portletContext</xml-element-name>
+ </variable-mapping>
+ <variable-mapping>
+ <java-variable-name>markupContext</java-variable-name>
+ <xml-element-name>markupContext</xml-element-name>
+ </variable-mapping>
+ <variable-mapping>
+ <java-variable-name>navigationalState</java-variable-name>
+ <xml-element-name>navigationalState</xml-element-name>
+ </variable-mapping>
+ <variable-mapping>
+ <java-variable-name>newWindowState</java-variable-name>
+ <xml-element-name>newWindowState</xml-element-name>
+ </variable-mapping>
+ <variable-mapping>
+ <java-variable-name>newMode</java-variable-name>
+ <xml-element-name>newMode</xml-element-name>
+ </variable-mapping>
+ </java-xml-type-mapping>
+ <java-xml-type-mapping>
+ <java-type>org.jboss.portal.wsrp.core.Contact</java-type>
+ <root-type-qname xmlns:typeNS="urn:oasis:names:tc:wsrp:v1:types">typeNS:Contact</root-type-qname>
+ <qname-scope>complexType</qname-scope>
+ <variable-mapping>
+ <java-variable-name>postal</java-variable-name>
+ <xml-element-name>postal</xml-element-name>
+ </variable-mapping>
+ <variable-mapping>
+ <java-variable-name>telecom</java-variable-name>
+ <xml-element-name>telecom</xml-element-name>
+ </variable-mapping>
+ <variable-mapping>
+ <java-variable-name>online</java-variable-name>
+ <xml-element-name>online</xml-element-name>
+ </variable-mapping>
+ <variable-mapping>
+ <java-variable-name>extensions</java-variable-name>
+ <xml-element-name>extensions</xml-element-name>
+ </variable-mapping>
+ </java-xml-type-mapping>
+ <java-xml-type-mapping>
+ <java-type>org.jboss.portal.wsrp.core.ModifyRegistration</java-type>
+ <anonymous-type-qname>urn:oasis:names:tc:wsrp:v1:types:>modifyRegistration</anonymous-type-qname>
+ <qname-scope>complexType</qname-scope>
+ <variable-mapping>
+ <java-variable-name>registrationContext</java-variable-name>
+ <xml-element-name>registrationContext</xml-element-name>
+ </variable-mapping>
+ <variable-mapping>
+ <java-variable-name>registrationData</java-variable-name>
+ <xml-element-name>registrationData</xml-element-name>
+ </variable-mapping>
+ </java-xml-type-mapping>
+ <java-xml-type-mapping>
+ <java-type>org.jboss.portal.wsrp.core.ModelDescription</java-type>
+ <root-type-qname xmlns:typeNS="urn:oasis:names:tc:wsrp:v1:types">typeNS:ModelDescription</root-type-qname>
+ <qname-scope>complexType</qname-scope>
+ <variable-mapping>
+ <java-variable-name>propertyDescriptions</java-variable-name>
+ <xml-element-name>propertyDescriptions</xml-element-name>
+ </variable-mapping>
+ <variable-mapping>
+ <java-variable-name>modelTypes</java-variable-name>
+ <xml-element-name>modelTypes</xml-element-name>
+ </variable-mapping>
+ <variable-mapping>
+ <java-variable-name>extensions</java-variable-name>
+ <xml-element-name>extensions</xml-element-name>
+ </variable-mapping>
+ </java-xml-type-mapping>
+ <java-xml-type-mapping>
+ <java-type>org.jboss.portal.wsrp.core.InitCookie</java-type>
+ <anonymous-type-qname>urn:oasis:names:tc:wsrp:v1:types:>initCookie</anonymous-type-qname>
+ <qname-scope>complexType</qname-scope>
+ <variable-mapping>
+ <java-variable-name>registrationContext</java-variable-name>
+ <xml-element-name>registrationContext</xml-element-name>
+ </variable-mapping>
+ </java-xml-type-mapping>
+ <java-xml-type-mapping>
+ <java-type>org.jboss.portal.wsrp.core.PortletPropertyDescriptionResponse</java-type>
+ <root-type-qname
+ xmlns:typeNS="urn:oasis:names:tc:wsrp:v1:types">typeNS:PortletPropertyDescriptionResponse
+ </root-type-qname>
+ <qname-scope>complexType</qname-scope>
+ <variable-mapping>
+ <java-variable-name>modelDescription</java-variable-name>
+ <xml-element-name>modelDescription</xml-element-name>
+ </variable-mapping>
+ <variable-mapping>
+ <java-variable-name>resourceList</java-variable-name>
+ <xml-element-name>resourceList</xml-element-name>
+ </variable-mapping>
+ <variable-mapping>
+ <java-variable-name>extensions</java-variable-name>
+ <xml-element-name>extensions</xml-element-name>
+ </variable-mapping>
+ </java-xml-type-mapping>
+ <java-xml-type-mapping>
+ <java-type>org.jboss.portal.wsrp.core.UserProfile</java-type>
+ <root-type-qname xmlns:typeNS="urn:oasis:names:tc:wsrp:v1:types">typeNS:UserProfile</root-type-qname>
+ <qname-scope>complexType</qname-scope>
+ <variable-mapping>
+ <java-variable-name>name</java-variable-name>
+ <xml-element-name>name</xml-element-name>
+ </variable-mapping>
+ <variable-mapping>
+ <java-variable-name>bdate</java-variable-name>
+ <xml-element-name>bdate</xml-element-name>
+ </variable-mapping>
+ <variable-mapping>
+ <java-variable-name>gender</java-variable-name>
+ <xml-element-name>gender</xml-element-name>
+ </variable-mapping>
+ <variable-mapping>
+ <java-variable-name>employerInfo</java-variable-name>
+ <xml-element-name>employerInfo</xml-element-name>
+ </variable-mapping>
+ <variable-mapping>
+ <java-variable-name>homeInfo</java-variable-name>
+ <xml-element-name>homeInfo</xml-element-name>
+ </variable-mapping>
+ <variable-mapping>
+ <java-variable-name>businessInfo</java-variable-name>
+ <xml-element-name>businessInfo</xml-element-name>
+ </variable-mapping>
+ <variable-mapping>
+ <java-variable-name>extensions</java-variable-name>
+ <xml-element-name>extensions</xml-element-name>
+ </variable-mapping>
+ </java-xml-type-mapping>
+ <java-xml-type-mapping>
+ <java-type>org.jboss.portal.wsrp.core.UnsupportedModeFault</java-type>
+ <root-type-qname xmlns:typeNS="urn:oasis:names:tc:wsrp:v1:types">typeNS:UnsupportedModeFault</root-type-qname>
+ <qname-scope>complexType</qname-scope>
+ </java-xml-type-mapping>
+ <java-xml-type-mapping>
+ <java-type>org.jboss.portal.wsrp.core.PortletStateChangeRequiredFault</java-type>
+ <root-type-qname
+ xmlns:typeNS="urn:oasis:names:tc:wsrp:v1:types">typeNS:PortletStateChangeRequiredFault
+ </root-type-qname>
+ <qname-scope>complexType</qname-scope>
+ </java-xml-type-mapping>
+ <java-xml-type-mapping>
+ <java-type>org.jboss.portal.wsrp.core.LocalizedString</java-type>
+ <root-type-qname xmlns:typeNS="urn:oasis:names:tc:wsrp:v1:types">typeNS:LocalizedString</root-type-qname>
+ <qname-scope>complexType</qname-scope>
+ <variable-mapping>
+ <java-variable-name>lang</java-variable-name>
+ <xml-attribute-name>lang</xml-attribute-name>
+ </variable-mapping>
+ <variable-mapping>
+ <java-variable-name>resourceName</java-variable-name>
+ <xml-attribute-name>resourceName</xml-attribute-name>
+ </variable-mapping>
+ <variable-mapping>
+ <java-variable-name>value</java-variable-name>
+ <xml-element-name>value</xml-element-name>
+ </variable-mapping>
+ </java-xml-type-mapping>
+ <java-xml-type-mapping>
+ <java-type>org.jboss.portal.wsrp.core.BlockingInteractionResponse</java-type>
+ <root-type-qname xmlns:typeNS="urn:oasis:names:tc:wsrp:v1:types">typeNS:BlockingInteractionResponse
+ </root-type-qname>
+ <qname-scope>complexType</qname-scope>
+ <variable-mapping>
+ <java-variable-name>updateResponse</java-variable-name>
+ <xml-element-name>updateResponse</xml-element-name>
+ </variable-mapping>
+ <variable-mapping>
+ <java-variable-name>redirectURL</java-variable-name>
+ <xml-element-name>redirectURL</xml-element-name>
+ </variable-mapping>
+ <variable-mapping>
+ <java-variable-name>extensions</java-variable-name>
+ <xml-element-name>extensions</xml-element-name>
+ </variable-mapping>
+ </java-xml-type-mapping>
+ <java-xml-type-mapping>
+ <java-type>org.jboss.portal.wsrp.core.SessionContext</java-type>
+ <root-type-qname xmlns:typeNS="urn:oasis:names:tc:wsrp:v1:types">typeNS:SessionContext</root-type-qname>
+ <qname-scope>complexType</qname-scope>
+ <variable-mapping>
+ <java-variable-name>sessionID</java-variable-name>
+ <xml-element-name>sessionID</xml-element-name>
+ </variable-mapping>
+ <variable-mapping>
+ <java-variable-name>expires</java-variable-name>
+ <xml-element-name>expires</xml-element-name>
+ </variable-mapping>
+ <variable-mapping>
+ <java-variable-name>extensions</java-variable-name>
+ <xml-element-name>extensions</xml-element-name>
+ </variable-mapping>
+ </java-xml-type-mapping>
+ <java-xml-type-mapping>
+ <java-type>org.jboss.portal.wsrp.core.Telecom</java-type>
+ <root-type-qname xmlns:typeNS="urn:oasis:names:tc:wsrp:v1:types">typeNS:Telecom</root-type-qname>
+ <qname-scope>complexType</qname-scope>
+ <variable-mapping>
+ <java-variable-name>telephone</java-variable-name>
+ <xml-element-name>telephone</xml-element-name>
+ </variable-mapping>
+ <variable-mapping>
+ <java-variable-name>fax</java-variable-name>
+ <xml-element-name>fax</xml-element-name>
+ </variable-mapping>
+ <variable-mapping>
+ <java-variable-name>mobile</java-variable-name>
+ <xml-element-name>mobile</xml-element-name>
+ </variable-mapping>
+ <variable-mapping>
+ <java-variable-name>pager</java-variable-name>
+ <xml-element-name>pager</xml-element-name>
+ </variable-mapping>
+ <variable-mapping>
+ <java-variable-name>extensions</java-variable-name>
+ <xml-element-name>extensions</xml-element-name>
+ </variable-mapping>
+ </java-xml-type-mapping>
+ <java-xml-type-mapping>
+ <java-type>org.jboss.portal.wsrp.core.OperationFailedFault</java-type>
+ <root-type-qname xmlns:typeNS="urn:oasis:names:tc:wsrp:v1:types">typeNS:OperationFailedFault</root-type-qname>
+ <qname-scope>complexType</qname-scope>
+ </java-xml-type-mapping>
+ <java-xml-type-mapping>
+ <java-type>org.jboss.portal.wsrp.core.PersonName</java-type>
+ <root-type-qname xmlns:typeNS="urn:oasis:names:tc:wsrp:v1:types">typeNS:PersonName</root-type-qname>
+ <qname-scope>complexType</qname-scope>
+ <variable-mapping>
+ <java-variable-name>prefix</java-variable-name>
+ <xml-element-name>prefix</xml-element-name>
+ </variable-mapping>
+ <variable-mapping>
+ <java-variable-name>given</java-variable-name>
+ <xml-element-name>given</xml-element-name>
+ </variable-mapping>
+ <variable-mapping>
+ <java-variable-name>family</java-variable-name>
+ <xml-element-name>family</xml-element-name>
+ </variable-mapping>
+ <variable-mapping>
+ <java-variable-name>middle</java-variable-name>
+ <xml-element-name>middle</xml-element-name>
+ </variable-mapping>
+ <variable-mapping>
+ <java-variable-name>suffix</java-variable-name>
+ <xml-element-name>suffix</xml-element-name>
+ </variable-mapping>
+ <variable-mapping>
+ <java-variable-name>nickname</java-variable-name>
+ <xml-element-name>nickname</xml-element-name>
+ </variable-mapping>
+ <variable-mapping>
+ <java-variable-name>extensions</java-variable-name>
+ <xml-element-name>extensions</xml-element-name>
+ </variable-mapping>
+ </java-xml-type-mapping>
+ <java-xml-type-mapping>
+ <java-type>org.jboss.portal.wsrp.core.ResourceList</java-type>
+ <root-type-qname xmlns:typeNS="urn:oasis:names:tc:wsrp:v1:types">typeNS:ResourceList</root-type-qname>
+ <qname-scope>complexType</qname-scope>
+ <variable-mapping>
+ <java-variable-name>resources</java-variable-name>
+ <xml-element-name>resources</xml-element-name>
+ </variable-mapping>
+ <variable-mapping>
+ <java-variable-name>extensions</java-variable-name>
+ <xml-element-name>extensions</xml-element-name>
+ </variable-mapping>
+ </java-xml-type-mapping>
+ <java-xml-type-mapping>
+ <java-type>org.jboss.portal.wsrp.core.InvalidRegistrationFault</java-type>
+ <root-type-qname xmlns:typeNS="urn:oasis:names:tc:wsrp:v1:types">typeNS:InvalidRegistrationFault</root-type-qname>
+ <qname-scope>complexType</qname-scope>
+ </java-xml-type-mapping>
+ <java-xml-type-mapping>
+ <java-type>org.jboss.portal.wsrp.core.InvalidHandleFault</java-type>
+ <root-type-qname xmlns:typeNS="urn:oasis:names:tc:wsrp:v1:types">typeNS:InvalidHandleFault</root-type-qname>
+ <qname-scope>complexType</qname-scope>
+ </java-xml-type-mapping>
+ <java-xml-type-mapping>
+ <java-type>org.jboss.portal.wsrp.core.MarkupType</java-type>
+ <root-type-qname xmlns:typeNS="urn:oasis:names:tc:wsrp:v1:types">typeNS:MarkupType</root-type-qname>
+ <qname-scope>complexType</qname-scope>
+ <variable-mapping>
+ <java-variable-name>mimeType</java-variable-name>
+ <xml-element-name>mimeType</xml-element-name>
+ </variable-mapping>
+ <variable-mapping>
+ <java-variable-name>modes</java-variable-name>
+ <xml-element-name>modes</xml-element-name>
+ </variable-mapping>
+ <variable-mapping>
+ <java-variable-name>windowStates</java-variable-name>
+ <xml-element-name>windowStates</xml-element-name>
+ </variable-mapping>
+ <variable-mapping>
+ <java-variable-name>locales</java-variable-name>
+ <xml-element-name>locales</xml-element-name>
+ </variable-mapping>
+ <variable-mapping>
+ <java-variable-name>extensions</java-variable-name>
+ <xml-element-name>extensions</xml-element-name>
+ </variable-mapping>
+ </java-xml-type-mapping>
+ <java-xml-type-mapping>
+ <java-type>org.jboss.portal.wsrp.core.RegistrationContext</java-type>
+ <root-type-qname xmlns:typeNS="urn:oasis:names:tc:wsrp:v1:types">typeNS:RegistrationContext</root-type-qname>
+ <qname-scope>complexType</qname-scope>
+ <variable-mapping>
+ <java-variable-name>registrationHandle</java-variable-name>
+ <xml-element-name>registrationHandle</xml-element-name>
+ </variable-mapping>
+ <variable-mapping>
+ <java-variable-name>registrationState</java-variable-name>
+ <xml-element-name>registrationState</xml-element-name>
+ </variable-mapping>
+ <variable-mapping>
+ <java-variable-name>extensions</java-variable-name>
+ <xml-element-name>extensions</xml-element-name>
+ </variable-mapping>
+ </java-xml-type-mapping>
+ <java-xml-type-mapping>
+ <java-type>org.jboss.portal.wsrp.core.Online</java-type>
+ <root-type-qname xmlns:typeNS="urn:oasis:names:tc:wsrp:v1:types">typeNS:Online</root-type-qname>
+ <qname-scope>complexType</qname-scope>
+ <variable-mapping>
+ <java-variable-name>email</java-variable-name>
+ <xml-element-name>email</xml-element-name>
+ </variable-mapping>
+ <variable-mapping>
+ <java-variable-name>uri</java-variable-name>
+ <xml-element-name>uri</xml-element-name>
+ </variable-mapping>
+ <variable-mapping>
+ <java-variable-name>extensions</java-variable-name>
+ <xml-element-name>extensions</xml-element-name>
+ </variable-mapping>
+ </java-xml-type-mapping>
+ <java-xml-type-mapping>
+ <java-type>org.jboss.portal.wsrp.core.ReturnAny</java-type>
+ <root-type-qname xmlns:typeNS="urn:oasis:names:tc:wsrp:v1:types">typeNS:ReturnAny</root-type-qname>
+ <qname-scope>complexType</qname-scope>
+ <variable-mapping>
+ <java-variable-name>extensions</java-variable-name>
+ <xml-element-name>extensions</xml-element-name>
+ </variable-mapping>
+ </java-xml-type-mapping>
+ <java-xml-type-mapping>
+ <java-type>org.jboss.portal.wsrp.core.GetPortletProperties</java-type>
+ <anonymous-type-qname>urn:oasis:names:tc:wsrp:v1:types:>getPortletProperties</anonymous-type-qname>
+ <qname-scope>complexType</qname-scope>
+ <variable-mapping>
+ <java-variable-name>registrationContext</java-variable-name>
+ <xml-element-name>registrationContext</xml-element-name>
+ </variable-mapping>
+ <variable-mapping>
+ <java-variable-name>portletContext</java-variable-name>
+ <xml-element-name>portletContext</xml-element-name>
+ </variable-mapping>
+ <variable-mapping>
+ <java-variable-name>userContext</java-variable-name>
+ <xml-element-name>userContext</xml-element-name>
+ </variable-mapping>
+ <variable-mapping>
+ <java-variable-name>names</java-variable-name>
+ <xml-element-name>names</xml-element-name>
+ </variable-mapping>
+ </java-xml-type-mapping>
+ <java-xml-type-mapping>
+ <java-type>org.jboss.portal.wsrp.core.InvalidSessionFault</java-type>
+ <root-type-qname xmlns:typeNS="urn:oasis:names:tc:wsrp:v1:types">typeNS:InvalidSessionFault</root-type-qname>
+ <qname-scope>complexType</qname-scope>
+ </java-xml-type-mapping>
+ <java-xml-type-mapping>
+ <java-type>org.jboss.portal.wsrp.core.PropertyList</java-type>
+ <root-type-qname xmlns:typeNS="urn:oasis:names:tc:wsrp:v1:types">typeNS:PropertyList</root-type-qname>
+ <qname-scope>complexType</qname-scope>
+ <variable-mapping>
+ <java-variable-name>properties</java-variable-name>
+ <xml-element-name>properties</xml-element-name>
+ </variable-mapping>
+ <variable-mapping>
+ <java-variable-name>resetProperties</java-variable-name>
+ <xml-element-name>resetProperties</xml-element-name>
+ </variable-mapping>
+ <variable-mapping>
+ <java-variable-name>extensions</java-variable-name>
+ <xml-element-name>extensions</xml-element-name>
+ </variable-mapping>
+ </java-xml-type-mapping>
+ <java-xml-type-mapping>
+ <java-type>org.jboss.portal.wsrp.core.PropertyDescription</java-type>
+ <root-type-qname xmlns:typeNS="urn:oasis:names:tc:wsrp:v1:types">typeNS:PropertyDescription</root-type-qname>
+ <qname-scope>complexType</qname-scope>
+ <variable-mapping>
+ <java-variable-name>name</java-variable-name>
+ <xml-attribute-name>name</xml-attribute-name>
+ </variable-mapping>
+ <variable-mapping>
+ <java-variable-name>type</java-variable-name>
+ <xml-attribute-name>type</xml-attribute-name>
+ </variable-mapping>
+ <variable-mapping>
+ <java-variable-name>label</java-variable-name>
+ <xml-element-name>label</xml-element-name>
+ </variable-mapping>
+ <variable-mapping>
+ <java-variable-name>hint</java-variable-name>
+ <xml-element-name>hint</xml-element-name>
+ </variable-mapping>
+ <variable-mapping>
+ <java-variable-name>extensions</java-variable-name>
+ <xml-element-name>extensions</xml-element-name>
+ </variable-mapping>
+ </java-xml-type-mapping>
+ <java-xml-type-mapping>
+ <java-type>org.jboss.portal.wsrp.core.GetPortletPropertyDescription</java-type>
+ <anonymous-type-qname>urn:oasis:names:tc:wsrp:v1:types:>getPortletPropertyDescription</anonymous-type-qname>
+ <qname-scope>complexType</qname-scope>
+ <variable-mapping>
+ <java-variable-name>registrationContext</java-variable-name>
+ <xml-element-name>registrationContext</xml-element-name>
+ </variable-mapping>
+ <variable-mapping>
+ <java-variable-name>portletContext</java-variable-name>
+ <xml-element-name>portletContext</xml-element-name>
+ </variable-mapping>
+ <variable-mapping>
+ <java-variable-name>userContext</java-variable-name>
+ <xml-element-name>userContext</xml-element-name>
+ </variable-mapping>
+ <variable-mapping>
+ <java-variable-name>desiredLocales</java-variable-name>
+ <xml-element-name>desiredLocales</xml-element-name>
+ </variable-mapping>
+ </java-xml-type-mapping>
+ <java-xml-type-mapping>
+ <java-type>org.jboss.portal.wsrp.core.PortletDescriptionResponse</java-type>
+ <root-type-qname xmlns:typeNS="urn:oasis:names:tc:wsrp:v1:types">typeNS:PortletDescriptionResponse
+ </root-type-qname>
+ <qname-scope>complexType</qname-scope>
+ <variable-mapping>
+ <java-variable-name>portletDescription</java-variable-name>
+ <xml-element-name>portletDescription</xml-element-name>
+ </variable-mapping>
+ <variable-mapping>
+ <java-variable-name>resourceList</java-variable-name>
+ <xml-element-name>resourceList</xml-element-name>
+ </variable-mapping>
+ <variable-mapping>
+ <java-variable-name>extensions</java-variable-name>
+ <xml-element-name>extensions</xml-element-name>
+ </variable-mapping>
+ </java-xml-type-mapping>
+ <java-xml-type-mapping>
+ <java-type>org.jboss.portal.wsrp.core.EmployerInfo</java-type>
+ <root-type-qname xmlns:typeNS="urn:oasis:names:tc:wsrp:v1:types">typeNS:EmployerInfo</root-type-qname>
+ <qname-scope>complexType</qname-scope>
+ <variable-mapping>
+ <java-variable-name>employer</java-variable-name>
+ <xml-element-name>employer</xml-element-name>
+ </variable-mapping>
+ <variable-mapping>
+ <java-variable-name>department</java-variable-name>
+ <xml-element-name>department</xml-element-name>
+ </variable-mapping>
+ <variable-mapping>
+ <java-variable-name>jobtitle</java-variable-name>
+ <xml-element-name>jobtitle</xml-element-name>
+ </variable-mapping>
+ <variable-mapping>
+ <java-variable-name>extensions</java-variable-name>
+ <xml-element-name>extensions</xml-element-name>
+ </variable-mapping>
+ </java-xml-type-mapping>
+ <java-xml-type-mapping>
+ <java-type>org.jboss.portal.wsrp.core.ResourceValue</java-type>
+ <root-type-qname xmlns:typeNS="urn:oasis:names:tc:wsrp:v1:types">typeNS:ResourceValue</root-type-qname>
+ <qname-scope>complexType</qname-scope>
+ <variable-mapping>
+ <java-variable-name>lang</java-variable-name>
+ <xml-attribute-name>lang</xml-attribute-name>
+ </variable-mapping>
+ <variable-mapping>
+ <java-variable-name>value</java-variable-name>
+ <xml-element-name>value</xml-element-name>
+ </variable-mapping>
+ <variable-mapping>
+ <java-variable-name>extensions</java-variable-name>
+ <xml-element-name>extensions</xml-element-name>
+ </variable-mapping>
+ </java-xml-type-mapping>
+ <java-xml-type-mapping>
+ <java-type>org.jboss.portal.wsrp.core.UploadContext</java-type>
+ <root-type-qname xmlns:typeNS="urn:oasis:names:tc:wsrp:v1:types">typeNS:UploadContext</root-type-qname>
+ <qname-scope>complexType</qname-scope>
+ <variable-mapping>
+ <java-variable-name>mimeType</java-variable-name>
+ <xml-element-name>mimeType</xml-element-name>
+ </variable-mapping>
+ <variable-mapping>
+ <java-variable-name>uploadData</java-variable-name>
+ <xml-element-name>uploadData</xml-element-name>
+ </variable-mapping>
+ <variable-mapping>
+ <java-variable-name>mimeAttributes</java-variable-name>
+ <xml-element-name>mimeAttributes</xml-element-name>
+ </variable-mapping>
+ <variable-mapping>
+ <java-variable-name>extensions</java-variable-name>
+ <xml-element-name>extensions</xml-element-name>
+ </variable-mapping>
+ </java-xml-type-mapping>
+ <java-xml-type-mapping>
+ <java-type>org.jboss.portal.wsrp.core.Templates</java-type>
+ <root-type-qname xmlns:typeNS="urn:oasis:names:tc:wsrp:v1:types">typeNS:Templates</root-type-qname>
+ <qname-scope>complexType</qname-scope>
+ <variable-mapping>
+ <java-variable-name>defaultTemplate</java-variable-name>
+ <xml-element-name>defaultTemplate</xml-element-name>
+ </variable-mapping>
+ <variable-mapping>
+ <java-variable-name>blockingActionTemplate</java-variable-name>
+ <xml-element-name>blockingActionTemplate</xml-element-name>
+ </variable-mapping>
+ <variable-mapping>
+ <java-variable-name>renderTemplate</java-variable-name>
+ <xml-element-name>renderTemplate</xml-element-name>
+ </variable-mapping>
+ <variable-mapping>
+ <java-variable-name>resourceTemplate</java-variable-name>
+ <xml-element-name>resourceTemplate</xml-element-name>
+ </variable-mapping>
+ <variable-mapping>
+ <java-variable-name>secureDefaultTemplate</java-variable-name>
+ <xml-element-name>secureDefaultTemplate</xml-element-name>
+ </variable-mapping>
+ <variable-mapping>
+ <java-variable-name>secureBlockingActionTemplate</java-variable-name>
+ <xml-element-name>secureBlockingActionTemplate</xml-element-name>
+ </variable-mapping>
+ <variable-mapping>
+ <java-variable-name>secureRenderTemplate</java-variable-name>
+ <xml-element-name>secureRenderTemplate</xml-element-name>
+ </variable-mapping>
+ <variable-mapping>
+ <java-variable-name>secureResourceTemplate</java-variable-name>
+ <xml-element-name>secureResourceTemplate</xml-element-name>
+ </variable-mapping>
+ <variable-mapping>
+ <java-variable-name>extensions</java-variable-name>
+ <xml-element-name>extensions</xml-element-name>
+ </variable-mapping>
+ </java-xml-type-mapping>
+ <java-xml-type-mapping>
+ <java-type>org.jboss.portal.wsrp.core.AccessDeniedFault</java-type>
+ <root-type-qname xmlns:typeNS="urn:oasis:names:tc:wsrp:v1:types">typeNS:AccessDeniedFault</root-type-qname>
+ <qname-scope>complexType</qname-scope>
+ </java-xml-type-mapping>
+ <java-xml-type-mapping>
+ <java-type>org.jboss.portal.wsrp.core.GetServiceDescription</java-type>
+ <anonymous-type-qname>urn:oasis:names:tc:wsrp:v1:types:>getServiceDescription</anonymous-type-qname>
+ <qname-scope>complexType</qname-scope>
+ <variable-mapping>
+ <java-variable-name>registrationContext</java-variable-name>
+ <xml-element-name>registrationContext</xml-element-name>
+ </variable-mapping>
+ <variable-mapping>
+ <java-variable-name>desiredLocales</java-variable-name>
+ <xml-element-name>desiredLocales</xml-element-name>
+ </variable-mapping>
+ </java-xml-type-mapping>
+ <java-xml-type-mapping>
+ <java-type>org.jboss.portal.wsrp.core.Extension</java-type>
+ <root-type-qname xmlns:typeNS="urn:oasis:names:tc:wsrp:v1:types">typeNS:Extension</root-type-qname>
+ <qname-scope>complexType</qname-scope>
+ <variable-mapping>
+ <java-variable-name>_any</java-variable-name>
+ <xml-wildcard/>
+ </variable-mapping>
+ </java-xml-type-mapping>
+ <java-xml-type-mapping>
+ <java-type>org.jboss.portal.wsrp.core.SetPortletProperties</java-type>
+ <anonymous-type-qname>urn:oasis:names:tc:wsrp:v1:types:>setPortletProperties</anonymous-type-qname>
+ <qname-scope>complexType</qname-scope>
+ <variable-mapping>
+ <java-variable-name>registrationContext</java-variable-name>
+ <xml-element-name>registrationContext</xml-element-name>
+ </variable-mapping>
+ <variable-mapping>
+ <java-variable-name>portletContext</java-variable-name>
+ <xml-element-name>portletContext</xml-element-name>
+ </variable-mapping>
+ <variable-mapping>
+ <java-variable-name>userContext</java-variable-name>
+ <xml-element-name>userContext</xml-element-name>
+ </variable-mapping>
+ <variable-mapping>
+ <java-variable-name>propertyList</java-variable-name>
+ <xml-element-name>propertyList</xml-element-name>
+ </variable-mapping>
+ </java-xml-type-mapping>
+ <java-xml-type-mapping>
+ <java-type>org.jboss.portal.wsrp.core.RegistrationState</java-type>
+ <root-type-qname xmlns:typeNS="urn:oasis:names:tc:wsrp:v1:types">typeNS:RegistrationState</root-type-qname>
+ <qname-scope>complexType</qname-scope>
+ <variable-mapping>
+ <java-variable-name>registrationState</java-variable-name>
+ <xml-element-name>registrationState</xml-element-name>
+ </variable-mapping>
+ <variable-mapping>
+ <java-variable-name>extensions</java-variable-name>
+ <xml-element-name>extensions</xml-element-name>
+ </variable-mapping>
+ </java-xml-type-mapping>
+ <java-xml-type-mapping>
+ <java-type>org.jboss.portal.wsrp.core.ResetProperty</java-type>
+ <root-type-qname xmlns:typeNS="urn:oasis:names:tc:wsrp:v1:types">typeNS:ResetProperty</root-type-qname>
+ <qname-scope>complexType</qname-scope>
+ <variable-mapping>
+ <java-variable-name>name</java-variable-name>
+ <xml-attribute-name>name</xml-attribute-name>
+ </variable-mapping>
+ </java-xml-type-mapping>
+ <java-xml-type-mapping>
+ <java-type>org.jboss.portal.wsrp.core.InvalidCookieFault</java-type>
+ <root-type-qname xmlns:typeNS="urn:oasis:names:tc:wsrp:v1:types">typeNS:InvalidCookieFault</root-type-qname>
+ <qname-scope>complexType</qname-scope>
+ </java-xml-type-mapping>
+ <java-xml-type-mapping>
+ <java-type>org.jboss.portal.wsrp.core.ReleaseSessions</java-type>
+ <anonymous-type-qname>urn:oasis:names:tc:wsrp:v1:types:>releaseSessions</anonymous-type-qname>
+ <qname-scope>complexType</qname-scope>
+ <variable-mapping>
+ <java-variable-name>registrationContext</java-variable-name>
+ <xml-element-name>registrationContext</xml-element-name>
+ </variable-mapping>
+ <variable-mapping>
+ <java-variable-name>sessionIDs</java-variable-name>
+ <xml-element-name>sessionIDs</xml-element-name>
+ </variable-mapping>
+ </java-xml-type-mapping>
+ <java-xml-type-mapping>
+ <java-type>org.jboss.portal.wsrp.core.Postal</java-type>
+ <root-type-qname xmlns:typeNS="urn:oasis:names:tc:wsrp:v1:types">typeNS:Postal</root-type-qname>
+ <qname-scope>complexType</qname-scope>
+ <variable-mapping>
+ <java-variable-name>name</java-variable-name>
+ <xml-element-name>name</xml-element-name>
+ </variable-mapping>
+ <variable-mapping>
+ <java-variable-name>street</java-variable-name>
+ <xml-element-name>street</xml-element-name>
+ </variable-mapping>
+ <variable-mapping>
+ <java-variable-name>city</java-variable-name>
+ <xml-element-name>city</xml-element-name>
+ </variable-mapping>
+ <variable-mapping>
+ <java-variable-name>stateprov</java-variable-name>
+ <xml-element-name>stateprov</xml-element-name>
+ </variable-mapping>
+ <variable-mapping>
+ <java-variable-name>postalcode</java-variable-name>
+ <xml-element-name>postalcode</xml-element-name>
+ </variable-mapping>
+ <variable-mapping>
+ <java-variable-name>country</java-variable-name>
+ <xml-element-name>country</xml-element-name>
+ </variable-mapping>
+ <variable-mapping>
+ <java-variable-name>organization</java-variable-name>
+ <xml-element-name>organization</xml-element-name>
+ </variable-mapping>
+ <variable-mapping>
+ <java-variable-name>extensions</java-variable-name>
+ <xml-element-name>extensions</xml-element-name>
+ </variable-mapping>
+ </java-xml-type-mapping>
+ <java-xml-type-mapping>
+ <java-type>org.jboss.portal.wsrp.core.UnsupportedMimeTypeFault</java-type>
+ <root-type-qname xmlns:typeNS="urn:oasis:names:tc:wsrp:v1:types">typeNS:UnsupportedMimeTypeFault</root-type-qname>
+ <qname-scope>complexType</qname-scope>
+ </java-xml-type-mapping>
+ <java-xml-type-mapping>
+ <java-type>org.jboss.portal.wsrp.core.UnsupportedLocaleFault</java-type>
+ <root-type-qname xmlns:typeNS="urn:oasis:names:tc:wsrp:v1:types">typeNS:UnsupportedLocaleFault</root-type-qname>
+ <qname-scope>complexType</qname-scope>
+ </java-xml-type-mapping>
+ <java-xml-type-mapping>
+ <java-type>org.jboss.portal.wsrp.core.MissingParametersFault</java-type>
+ <root-type-qname xmlns:typeNS="urn:oasis:names:tc:wsrp:v1:types">typeNS:MissingParametersFault</root-type-qname>
+ <qname-scope>complexType</qname-scope>
+ </java-xml-type-mapping>
+ <java-xml-type-mapping>
+ <java-type>org.jboss.portal.wsrp.core.RuntimeContext</java-type>
+ <root-type-qname xmlns:typeNS="urn:oasis:names:tc:wsrp:v1:types">typeNS:RuntimeContext</root-type-qname>
+ <qname-scope>complexType</qname-scope>
+ <variable-mapping>
+ <java-variable-name>userAuthentication</java-variable-name>
+ <xml-element-name>userAuthentication</xml-element-name>
+ </variable-mapping>
+ <variable-mapping>
+ <java-variable-name>portletInstanceKey</java-variable-name>
+ <xml-element-name>portletInstanceKey</xml-element-name>
+ </variable-mapping>
+ <variable-mapping>
+ <java-variable-name>namespacePrefix</java-variable-name>
+ <xml-element-name>namespacePrefix</xml-element-name>
+ </variable-mapping>
+ <variable-mapping>
+ <java-variable-name>templates</java-variable-name>
+ <xml-element-name>templates</xml-element-name>
+ </variable-mapping>
+ <variable-mapping>
+ <java-variable-name>sessionID</java-variable-name>
+ <xml-element-name>sessionID</xml-element-name>
+ </variable-mapping>
+ <variable-mapping>
+ <java-variable-name>extensions</java-variable-name>
+ <xml-element-name>extensions</xml-element-name>
+ </variable-mapping>
+ </java-xml-type-mapping>
+ <java-xml-type-mapping>
+ <java-type>org.jboss.portal.wsrp.core.UserContext</java-type>
+ <root-type-qname xmlns:typeNS="urn:oasis:names:tc:wsrp:v1:types">typeNS:UserContext</root-type-qname>
+ <qname-scope>complexType</qname-scope>
+ <variable-mapping>
+ <java-variable-name>userContextKey</java-variable-name>
+ <xml-element-name>userContextKey</xml-element-name>
+ </variable-mapping>
+ <variable-mapping>
+ <java-variable-name>userCategories</java-variable-name>
+ <xml-element-name>userCategories</xml-element-name>
+ </variable-mapping>
+ <variable-mapping>
+ <java-variable-name>profile</java-variable-name>
+ <xml-element-name>profile</xml-element-name>
+ </variable-mapping>
+ <variable-mapping>
+ <java-variable-name>extensions</java-variable-name>
+ <xml-element-name>extensions</xml-element-name>
+ </variable-mapping>
+ </java-xml-type-mapping>
+ <java-xml-type-mapping>
+ <java-type>org.jboss.portal.wsrp.core.Resource</java-type>
+ <root-type-qname xmlns:typeNS="urn:oasis:names:tc:wsrp:v1:types">typeNS:Resource</root-type-qname>
+ <qname-scope>complexType</qname-scope>
+ <variable-mapping>
+ <java-variable-name>resourceName</java-variable-name>
+ <xml-attribute-name>resourceName</xml-attribute-name>
+ </variable-mapping>
+ <variable-mapping>
+ <java-variable-name>values</java-variable-name>
+ <xml-element-name>values</xml-element-name>
+ </variable-mapping>
+ <variable-mapping>
+ <java-variable-name>extensions</java-variable-name>
+ <xml-element-name>extensions</xml-element-name>
+ </variable-mapping>
+ </java-xml-type-mapping>
+ <java-xml-type-mapping>
+ <java-type>org.jboss.portal.wsrp.core.ItemDescription</java-type>
+ <root-type-qname xmlns:typeNS="urn:oasis:names:tc:wsrp:v1:types">typeNS:ItemDescription</root-type-qname>
+ <qname-scope>complexType</qname-scope>
+ <variable-mapping>
+ <java-variable-name>itemName</java-variable-name>
+ <xml-attribute-name>itemName</xml-attribute-name>
+ </variable-mapping>
+ <variable-mapping>
+ <java-variable-name>description</java-variable-name>
+ <xml-element-name>description</xml-element-name>
+ </variable-mapping>
+ <variable-mapping>
+ <java-variable-name>extensions</java-variable-name>
+ <xml-element-name>extensions</xml-element-name>
+ </variable-mapping>
+ </java-xml-type-mapping>
+ <java-xml-type-mapping>
+ <java-type>org.jboss.portal.wsrp.core.InvalidUserCategoryFault</java-type>
+ <root-type-qname xmlns:typeNS="urn:oasis:names:tc:wsrp:v1:types">typeNS:InvalidUserCategoryFault</root-type-qname>
+ <qname-scope>complexType</qname-scope>
+ </java-xml-type-mapping>
+ <java-xml-type-mapping>
+ <java-type>org.jboss.portal.wsrp.core.PortletDescription</java-type>
+ <root-type-qname xmlns:typeNS="urn:oasis:names:tc:wsrp:v1:types">typeNS:PortletDescription</root-type-qname>
+ <qname-scope>complexType</qname-scope>
+ <variable-mapping>
+ <java-variable-name>portletHandle</java-variable-name>
+ <xml-element-name>portletHandle</xml-element-name>
+ </variable-mapping>
+ <variable-mapping>
+ <java-variable-name>markupTypes</java-variable-name>
+ <xml-element-name>markupTypes</xml-element-name>
+ </variable-mapping>
+ <variable-mapping>
+ <java-variable-name>groupID</java-variable-name>
+ <xml-element-name>groupID</xml-element-name>
+ </variable-mapping>
+ <variable-mapping>
+ <java-variable-name>description</java-variable-name>
+ <xml-element-name>description</xml-element-name>
+ </variable-mapping>
+ <variable-mapping>
+ <java-variable-name>shortTitle</java-variable-name>
+ <xml-element-name>shortTitle</xml-element-name>
+ </variable-mapping>
+ <variable-mapping>
+ <java-variable-name>title</java-variable-name>
+ <xml-element-name>title</xml-element-name>
+ </variable-mapping>
+ <variable-mapping>
+ <java-variable-name>displayName</java-variable-name>
+ <xml-element-name>displayName</xml-element-name>
+ </variable-mapping>
+ <variable-mapping>
+ <java-variable-name>keywords</java-variable-name>
+ <xml-element-name>keywords</xml-element-name>
+ </variable-mapping>
+ <variable-mapping>
+ <java-variable-name>userCategories</java-variable-name>
+ <xml-element-name>userCategories</xml-element-name>
+ </variable-mapping>
+ <variable-mapping>
+ <java-variable-name>userProfileItems</java-variable-name>
+ <xml-element-name>userProfileItems</xml-element-name>
+ </variable-mapping>
+ <variable-mapping>
+ <java-variable-name>usesMethodGet</java-variable-name>
+ <xml-element-name>usesMethodGet</xml-element-name>
+ </variable-mapping>
+ <variable-mapping>
+ <java-variable-name>defaultMarkupSecure</java-variable-name>
+ <xml-element-name>defaultMarkupSecure</xml-element-name>
+ </variable-mapping>
+ <variable-mapping>
+ <java-variable-name>onlySecure</java-variable-name>
+ <xml-element-name>onlySecure</xml-element-name>
+ </variable-mapping>
+ <variable-mapping>
+ <java-variable-name>userContextStoredInSession</java-variable-name>
+ <xml-element-name>userContextStoredInSession</xml-element-name>
+ </variable-mapping>
+ <variable-mapping>
+ <java-variable-name>templatesStoredInSession</java-variable-name>
+ <xml-element-name>templatesStoredInSession</xml-element-name>
+ </variable-mapping>
+ <variable-mapping>
+ <java-variable-name>hasUserSpecificState</java-variable-name>
+ <xml-element-name>hasUserSpecificState</xml-element-name>
+ </variable-mapping>
+ <variable-mapping>
+ <java-variable-name>doesUrlTemplateProcessing</java-variable-name>
+ <xml-element-name>doesUrlTemplateProcessing</xml-element-name>
+ </variable-mapping>
+ <variable-mapping>
+ <java-variable-name>extensions</java-variable-name>
+ <xml-element-name>extensions</xml-element-name>
+ </variable-mapping>
+ </java-xml-type-mapping>
+ <java-xml-type-mapping>
+ <java-type>org.jboss.portal.wsrp.core.RegistrationData</java-type>
+ <root-type-qname xmlns:typeNS="urn:oasis:names:tc:wsrp:v1:types">typeNS:RegistrationData</root-type-qname>
+ <qname-scope>complexType</qname-scope>
+ <variable-mapping>
+ <java-variable-name>consumerName</java-variable-name>
+ <xml-element-name>consumerName</xml-element-name>
+ </variable-mapping>
+ <variable-mapping>
+ <java-variable-name>consumerAgent</java-variable-name>
+ <xml-element-name>consumerAgent</xml-element-name>
+ </variable-mapping>
+ <variable-mapping>
+ <java-variable-name>methodGetSupported</java-variable-name>
+ <xml-element-name>methodGetSupported</xml-element-name>
+ </variable-mapping>
+ <variable-mapping>
+ <java-variable-name>consumerModes</java-variable-name>
+ <xml-element-name>consumerModes</xml-element-name>
+ </variable-mapping>
+ <variable-mapping>
+ <java-variable-name>consumerWindowStates</java-variable-name>
+ <xml-element-name>consumerWindowStates</xml-element-name>
+ </variable-mapping>
+ <variable-mapping>
+ <java-variable-name>consumerUserScopes</java-variable-name>
+ <xml-element-name>consumerUserScopes</xml-element-name>
+ </variable-mapping>
+ <variable-mapping>
+ <java-variable-name>customUserProfileData</java-variable-name>
+ <xml-element-name>customUserProfileData</xml-element-name>
+ </variable-mapping>
+ <variable-mapping>
+ <java-variable-name>registrationProperties</java-variable-name>
+ <xml-element-name>registrationProperties</xml-element-name>
+ </variable-mapping>
+ <variable-mapping>
+ <java-variable-name>extensions</java-variable-name>
+ <xml-element-name>extensions</xml-element-name>
+ </variable-mapping>
+ </java-xml-type-mapping>
+ <java-xml-type-mapping>
+ <java-type>org.jboss.portal.wsrp.core.ModelTypes</java-type>
+ <root-type-qname xmlns:typeNS="urn:oasis:names:tc:wsrp:v1:types">typeNS:ModelTypes</root-type-qname>
+ <qname-scope>complexType</qname-scope>
+ <variable-mapping>
+ <java-variable-name>_any</java-variable-name>
+ <xml-wildcard/>
+ </variable-mapping>
+ </java-xml-type-mapping>
+ <java-xml-type-mapping>
+ <java-type>org.jboss.portal.wsrp.core.InteractionParams</java-type>
+ <root-type-qname xmlns:typeNS="urn:oasis:names:tc:wsrp:v1:types">typeNS:InteractionParams</root-type-qname>
+ <qname-scope>complexType</qname-scope>
+ <variable-mapping>
+ <java-variable-name>portletStateChange</java-variable-name>
+ <xml-element-name>portletStateChange</xml-element-name>
+ </variable-mapping>
+ <variable-mapping>
+ <java-variable-name>interactionState</java-variable-name>
+ <xml-element-name>interactionState</xml-element-name>
+ </variable-mapping>
+ <variable-mapping>
+ <java-variable-name>formParameters</java-variable-name>
+ <xml-element-name>formParameters</xml-element-name>
+ </variable-mapping>
+ <variable-mapping>
+ <java-variable-name>uploadContexts</java-variable-name>
+ <xml-element-name>uploadContexts</xml-element-name>
+ </variable-mapping>
+ <variable-mapping>
+ <java-variable-name>extensions</java-variable-name>
+ <xml-element-name>extensions</xml-element-name>
+ </variable-mapping>
+ </java-xml-type-mapping>
+ <java-xml-type-mapping>
+ <java-type>org.jboss.portal.wsrp.core.NamedString</java-type>
+ <root-type-qname xmlns:typeNS="urn:oasis:names:tc:wsrp:v1:types">typeNS:NamedString</root-type-qname>
+ <qname-scope>complexType</qname-scope>
+ <variable-mapping>
+ <java-variable-name>name</java-variable-name>
+ <xml-attribute-name>name</xml-attribute-name>
+ </variable-mapping>
+ <variable-mapping>
+ <java-variable-name>value</java-variable-name>
+ <xml-element-name>value</xml-element-name>
+ </variable-mapping>
+ </java-xml-type-mapping>
+ <java-xml-type-mapping>
+ <java-type>org.jboss.portal.wsrp.core.MarkupParams</java-type>
+ <root-type-qname xmlns:typeNS="urn:oasis:names:tc:wsrp:v1:types">typeNS:MarkupParams</root-type-qname>
+ <qname-scope>complexType</qname-scope>
+ <variable-mapping>
+ <java-variable-name>secureClientCommunication</java-variable-name>
+ <xml-element-name>secureClientCommunication</xml-element-name>
+ </variable-mapping>
+ <variable-mapping>
+ <java-variable-name>locales</java-variable-name>
+ <xml-element-name>locales</xml-element-name>
+ </variable-mapping>
+ <variable-mapping>
+ <java-variable-name>mimeTypes</java-variable-name>
+ <xml-element-name>mimeTypes</xml-element-name>
+ </variable-mapping>
+ <variable-mapping>
+ <java-variable-name>mode</java-variable-name>
+ <xml-element-name>mode</xml-element-name>
+ </variable-mapping>
+ <variable-mapping>
+ <java-variable-name>windowState</java-variable-name>
+ <xml-element-name>windowState</xml-element-name>
+ </variable-mapping>
+ <variable-mapping>
+ <java-variable-name>clientData</java-variable-name>
+ <xml-element-name>clientData</xml-element-name>
+ </variable-mapping>
+ <variable-mapping>
+ <java-variable-name>navigationalState</java-variable-name>
+ <xml-element-name>navigationalState</xml-element-name>
+ </variable-mapping>
+ <variable-mapping>
+ <java-variable-name>markupCharacterSets</java-variable-name>
+ <xml-element-name>markupCharacterSets</xml-element-name>
+ </variable-mapping>
+ <variable-mapping>
+ <java-variable-name>validateTag</java-variable-name>
+ <xml-element-name>validateTag</xml-element-name>
+ </variable-mapping>
+ <variable-mapping>
+ <java-variable-name>validNewModes</java-variable-name>
+ <xml-element-name>validNewModes</xml-element-name>
+ </variable-mapping>
+ <variable-mapping>
+ <java-variable-name>validNewWindowStates</java-variable-name>
+ <xml-element-name>validNewWindowStates</xml-element-name>
+ </variable-mapping>
+ <variable-mapping>
+ <java-variable-name>extensions</java-variable-name>
+ <xml-element-name>extensions</xml-element-name>
+ </variable-mapping>
+ </java-xml-type-mapping>
+ <java-xml-type-mapping>
+ <java-type>org.jboss.portal.wsrp.core.ClientData</java-type>
+ <root-type-qname xmlns:typeNS="urn:oasis:names:tc:wsrp:v1:types">typeNS:ClientData</root-type-qname>
+ <qname-scope>complexType</qname-scope>
+ <variable-mapping>
+ <java-variable-name>userAgent</java-variable-name>
+ <xml-element-name>userAgent</xml-element-name>
+ </variable-mapping>
+ <variable-mapping>
+ <java-variable-name>extensions</java-variable-name>
+ <xml-element-name>extensions</xml-element-name>
+ </variable-mapping>
+ </java-xml-type-mapping>
+ <java-xml-type-mapping>
+ <java-type>org.jboss.portal.wsrp.core.PerformBlockingInteraction</java-type>
+ <anonymous-type-qname>urn:oasis:names:tc:wsrp:v1:types:>performBlockingInteraction</anonymous-type-qname>
+ <qname-scope>complexType</qname-scope>
+ <variable-mapping>
+ <java-variable-name>registrationContext</java-variable-name>
+ <xml-element-name>registrationContext</xml-element-name>
+ </variable-mapping>
+ <variable-mapping>
+ <java-variable-name>portletContext</java-variable-name>
+ <xml-element-name>portletContext</xml-element-name>
+ </variable-mapping>
+ <variable-mapping>
+ <java-variable-name>runtimeContext</java-variable-name>
+ <xml-element-name>runtimeContext</xml-element-name>
+ </variable-mapping>
+ <variable-mapping>
+ <java-variable-name>userContext</java-variable-name>
+ <xml-element-name>userContext</xml-element-name>
+ </variable-mapping>
+ <variable-mapping>
+ <java-variable-name>markupParams</java-variable-name>
+ <xml-element-name>markupParams</xml-element-name>
+ </variable-mapping>
+ <variable-mapping>
+ <java-variable-name>interactionParams</java-variable-name>
+ <xml-element-name>interactionParams</xml-element-name>
+ </variable-mapping>
+ </java-xml-type-mapping>
+ <java-xml-type-mapping>
+ <java-type>org.jboss.portal.wsrp.core.GetPortletDescription</java-type>
+ <anonymous-type-qname>urn:oasis:names:tc:wsrp:v1:types:>getPortletDescription</anonymous-type-qname>
+ <qname-scope>complexType</qname-scope>
+ <variable-mapping>
+ <java-variable-name>registrationContext</java-variable-name>
+ <xml-element-name>registrationContext</xml-element-name>
+ </variable-mapping>
+ <variable-mapping>
+ <java-variable-name>portletContext</java-variable-name>
+ <xml-element-name>portletContext</xml-element-name>
+ </variable-mapping>
+ <variable-mapping>
+ <java-variable-name>userContext</java-variable-name>
+ <xml-element-name>userContext</xml-element-name>
+ </variable-mapping>
+ <variable-mapping>
+ <java-variable-name>desiredLocales</java-variable-name>
+ <xml-element-name>desiredLocales</xml-element-name>
+ </variable-mapping>
+ </java-xml-type-mapping>
+ <java-xml-type-mapping>
+ <java-type>org.jboss.portal.wsrp.core.ServiceDescription</java-type>
+ <root-type-qname xmlns:typeNS="urn:oasis:names:tc:wsrp:v1:types">typeNS:ServiceDescription</root-type-qname>
+ <qname-scope>complexType</qname-scope>
+ <variable-mapping>
+ <java-variable-name>requiresRegistration</java-variable-name>
+ <xml-element-name>requiresRegistration</xml-element-name>
+ </variable-mapping>
+ <variable-mapping>
+ <java-variable-name>offeredPortlets</java-variable-name>
+ <xml-element-name>offeredPortlets</xml-element-name>
+ </variable-mapping>
+ <variable-mapping>
+ <java-variable-name>userCategoryDescriptions</java-variable-name>
+ <xml-element-name>userCategoryDescriptions</xml-element-name>
+ </variable-mapping>
+ <variable-mapping>
+ <java-variable-name>customUserProfileItemDescriptions</java-variable-name>
+ <xml-element-name>customUserProfileItemDescriptions</xml-element-name>
+ </variable-mapping>
+ <variable-mapping>
+ <java-variable-name>customWindowStateDescriptions</java-variable-name>
+ <xml-element-name>customWindowStateDescriptions</xml-element-name>
+ </variable-mapping>
+ <variable-mapping>
+ <java-variable-name>customModeDescriptions</java-variable-name>
+ <xml-element-name>customModeDescriptions</xml-element-name>
+ </variable-mapping>
+ <variable-mapping>
+ <java-variable-name>requiresInitCookie</java-variable-name>
+ <xml-element-name>requiresInitCookie</xml-element-name>
+ </variable-mapping>
+ <variable-mapping>
+ <java-variable-name>registrationPropertyDescription</java-variable-name>
+ <xml-element-name>registrationPropertyDescription</xml-element-name>
+ </variable-mapping>
+ <variable-mapping>
+ <java-variable-name>locales</java-variable-name>
+ <xml-element-name>locales</xml-element-name>
+ </variable-mapping>
+ <variable-mapping>
+ <java-variable-name>resourceList</java-variable-name>
+ <xml-element-name>resourceList</xml-element-name>
+ </variable-mapping>
+ <variable-mapping>
+ <java-variable-name>extensions</java-variable-name>
+ <xml-element-name>extensions</xml-element-name>
+ </variable-mapping>
+ </java-xml-type-mapping>
+ <java-xml-type-mapping>
+ <java-type>org.jboss.portal.wsrp.core.CacheControl</java-type>
+ <root-type-qname xmlns:typeNS="urn:oasis:names:tc:wsrp:v1:types">typeNS:CacheControl</root-type-qname>
+ <qname-scope>complexType</qname-scope>
+ <variable-mapping>
+ <java-variable-name>expires</java-variable-name>
+ <xml-element-name>expires</xml-element-name>
+ </variable-mapping>
+ <variable-mapping>
+ <java-variable-name>userScope</java-variable-name>
+ <xml-element-name>userScope</xml-element-name>
+ </variable-mapping>
+ <variable-mapping>
+ <java-variable-name>validateTag</java-variable-name>
+ <xml-element-name>validateTag</xml-element-name>
+ </variable-mapping>
+ <variable-mapping>
+ <java-variable-name>extensions</java-variable-name>
+ <xml-element-name>extensions</xml-element-name>
+ </variable-mapping>
+ </java-xml-type-mapping>
+ <java-xml-type-mapping>
+ <java-type>org.jboss.portal.wsrp.core.GetMarkup</java-type>
+ <anonymous-type-qname>urn:oasis:names:tc:wsrp:v1:types:>getMarkup</anonymous-type-qname>
+ <qname-scope>complexType</qname-scope>
+ <variable-mapping>
+ <java-variable-name>registrationContext</java-variable-name>
+ <xml-element-name>registrationContext</xml-element-name>
+ </variable-mapping>
+ <variable-mapping>
+ <java-variable-name>portletContext</java-variable-name>
+ <xml-element-name>portletContext</xml-element-name>
+ </variable-mapping>
+ <variable-mapping>
+ <java-variable-name>runtimeContext</java-variable-name>
+ <xml-element-name>runtimeContext</xml-element-name>
+ </variable-mapping>
+ <variable-mapping>
+ <java-variable-name>userContext</java-variable-name>
+ <xml-element-name>userContext</xml-element-name>
+ </variable-mapping>
+ <variable-mapping>
+ <java-variable-name>markupParams</java-variable-name>
+ <xml-element-name>markupParams</xml-element-name>
+ </variable-mapping>
+ </java-xml-type-mapping>
+ <java-xml-type-mapping>
+ <java-type>org.jboss.portal.wsrp.core.InconsistentParametersFault</java-type>
+ <root-type-qname xmlns:typeNS="urn:oasis:names:tc:wsrp:v1:types">typeNS:InconsistentParametersFault
+ </root-type-qname>
+ <qname-scope>complexType</qname-scope>
+ </java-xml-type-mapping>
+ <java-xml-type-mapping>
+ <java-type>org.jboss.portal.wsrp.core.DestroyFailed</java-type>
+ <root-type-qname xmlns:typeNS="urn:oasis:names:tc:wsrp:v1:types">typeNS:DestroyFailed</root-type-qname>
+ <qname-scope>complexType</qname-scope>
+ <variable-mapping>
+ <java-variable-name>portletHandle</java-variable-name>
+ <xml-element-name>portletHandle</xml-element-name>
+ </variable-mapping>
+ <variable-mapping>
+ <java-variable-name>reason</java-variable-name>
+ <xml-element-name>reason</xml-element-name>
+ </variable-mapping>
+ </java-xml-type-mapping>
+ <java-xml-type-mapping>
+ <java-type>org.jboss.portal.wsrp.core.TelephoneNum</java-type>
+ <root-type-qname xmlns:typeNS="urn:oasis:names:tc:wsrp:v1:types">typeNS:TelephoneNum</root-type-qname>
+ <qname-scope>complexType</qname-scope>
+ <variable-mapping>
+ <java-variable-name>intcode</java-variable-name>
+ <xml-element-name>intcode</xml-element-name>
+ </variable-mapping>
+ <variable-mapping>
+ <java-variable-name>loccode</java-variable-name>
+ <xml-element-name>loccode</xml-element-name>
+ </variable-mapping>
+ <variable-mapping>
+ <java-variable-name>number</java-variable-name>
+ <xml-element-name>number</xml-element-name>
+ </variable-mapping>
+ <variable-mapping>
+ <java-variable-name>ext</java-variable-name>
+ <xml-element-name>ext</xml-element-name>
+ </variable-mapping>
+ <variable-mapping>
+ <java-variable-name>comment</java-variable-name>
+ <xml-element-name>comment</xml-element-name>
+ </variable-mapping>
+ <variable-mapping>
+ <java-variable-name>extensions</java-variable-name>
+ <xml-element-name>extensions</xml-element-name>
+ </variable-mapping>
+ </java-xml-type-mapping>
+ <java-xml-type-mapping>
+ <java-type>org.jboss.portal.wsrp.core.PortletContext</java-type>
+ <root-type-qname xmlns:typeNS="urn:oasis:names:tc:wsrp:v1:types">typeNS:PortletContext</root-type-qname>
+ <qname-scope>complexType</qname-scope>
+ <variable-mapping>
+ <java-variable-name>portletHandle</java-variable-name>
+ <xml-element-name>portletHandle</xml-element-name>
+ </variable-mapping>
+ <variable-mapping>
+ <java-variable-name>portletState</java-variable-name>
+ <xml-element-name>portletState</xml-element-name>
+ </variable-mapping>
+ <variable-mapping>
+ <java-variable-name>extensions</java-variable-name>
+ <xml-element-name>extensions</xml-element-name>
+ </variable-mapping>
+ </java-xml-type-mapping>
+ <java-xml-type-mapping>
+ <java-type>org.jboss.portal.wsrp.core.Property</java-type>
+ <root-type-qname xmlns:typeNS="urn:oasis:names:tc:wsrp:v1:types">typeNS:Property</root-type-qname>
+ <qname-scope>complexType</qname-scope>
+ <variable-mapping>
+ <java-variable-name>name</java-variable-name>
+ <xml-attribute-name>name</xml-attribute-name>
+ </variable-mapping>
+ <variable-mapping>
+ <java-variable-name>lang</java-variable-name>
+ <xml-attribute-name>lang</xml-attribute-name>
+ </variable-mapping>
+ <variable-mapping>
+ <java-variable-name>stringValue</java-variable-name>
+ <xml-element-name>stringValue</xml-element-name>
+ </variable-mapping>
+ <variable-mapping>
+ <java-variable-name>_any</java-variable-name>
+ <xml-wildcard/>
+ </variable-mapping>
+ </java-xml-type-mapping>
+ <java-xml-type-mapping>
+ <java-type>org.jboss.portal.wsrp.core.UnsupportedWindowStateFault</java-type>
+ <root-type-qname xmlns:typeNS="urn:oasis:names:tc:wsrp:v1:types">typeNS:UnsupportedWindowStateFault
+ </root-type-qname>
+ <qname-scope>complexType</qname-scope>
+ </java-xml-type-mapping>
+ <java-xml-type-mapping>
+ <java-type>org.jboss.portal.wsrp.core.MarkupResponse</java-type>
+ <root-type-qname xmlns:typeNS="urn:oasis:names:tc:wsrp:v1:types">typeNS:MarkupResponse</root-type-qname>
+ <qname-scope>complexType</qname-scope>
+ <variable-mapping>
+ <java-variable-name>markupContext</java-variable-name>
+ <xml-element-name>markupContext</xml-element-name>
+ </variable-mapping>
+ <variable-mapping>
+ <java-variable-name>sessionContext</java-variable-name>
+ <xml-element-name>sessionContext</xml-element-name>
+ </variable-mapping>
+ <variable-mapping>
+ <java-variable-name>extensions</java-variable-name>
+ <xml-element-name>extensions</xml-element-name>
+ </variable-mapping>
+ </java-xml-type-mapping>
+ <java-xml-type-mapping>
+ <java-type>org.jboss.portal.wsrp.core.DestroyPortletsResponse</java-type>
+ <root-type-qname xmlns:typeNS="urn:oasis:names:tc:wsrp:v1:types">typeNS:DestroyPortletsResponse</root-type-qname>
+ <qname-scope>complexType</qname-scope>
+ <variable-mapping>
+ <java-variable-name>destroyFailed</java-variable-name>
+ <xml-element-name>destroyFailed</xml-element-name>
+ </variable-mapping>
+ <variable-mapping>
+ <java-variable-name>extensions</java-variable-name>
+ <xml-element-name>extensions</xml-element-name>
+ </variable-mapping>
+ </java-xml-type-mapping>
+ <java-xml-type-mapping>
+ <java-type>org.jboss.portal.wsrp.core.DestroyPortlets</java-type>
+ <anonymous-type-qname>urn:oasis:names:tc:wsrp:v1:types:>destroyPortlets</anonymous-type-qname>
+ <qname-scope>complexType</qname-scope>
+ <variable-mapping>
+ <java-variable-name>registrationContext</java-variable-name>
+ <xml-element-name>registrationContext</xml-element-name>
+ </variable-mapping>
+ <variable-mapping>
+ <java-variable-name>portletHandles</java-variable-name>
+ <xml-element-name>portletHandles</xml-element-name>
+ </variable-mapping>
+ </java-xml-type-mapping>
+ <java-xml-type-mapping>
+ <java-type>org.jboss.portal.wsrp.core.MarkupContext</java-type>
+ <root-type-qname xmlns:typeNS="urn:oasis:names:tc:wsrp:v1:types">typeNS:MarkupContext</root-type-qname>
+ <qname-scope>complexType</qname-scope>
+ <variable-mapping>
+ <java-variable-name>useCachedMarkup</java-variable-name>
+ <xml-element-name>useCachedMarkup</xml-element-name>
+ </variable-mapping>
+ <variable-mapping>
+ <java-variable-name>mimeType</java-variable-name>
+ <xml-element-name>mimeType</xml-element-name>
+ </variable-mapping>
+ <variable-mapping>
+ <java-variable-name>markupString</java-variable-name>
+ <xml-element-name>markupString</xml-element-name>
+ </variable-mapping>
+ <variable-mapping>
+ <java-variable-name>markupBinary</java-variable-name>
+ <xml-element-name>markupBinary</xml-element-name>
+ </variable-mapping>
+ <variable-mapping>
+ <java-variable-name>locale</java-variable-name>
+ <xml-element-name>locale</xml-element-name>
+ </variable-mapping>
+ <variable-mapping>
+ <java-variable-name>requiresUrlRewriting</java-variable-name>
+ <xml-element-name>requiresUrlRewriting</xml-element-name>
+ </variable-mapping>
+ <variable-mapping>
+ <java-variable-name>cacheControl</java-variable-name>
+ <xml-element-name>cacheControl</xml-element-name>
+ </variable-mapping>
+ <variable-mapping>
+ <java-variable-name>preferredTitle</java-variable-name>
+ <xml-element-name>preferredTitle</xml-element-name>
+ </variable-mapping>
+ <variable-mapping>
+ <java-variable-name>extensions</java-variable-name>
+ <xml-element-name>extensions</xml-element-name>
+ </variable-mapping>
+ </java-xml-type-mapping>
+ <java-xml-type-mapping>
+ <java-type>org.jboss.portal.wsrp.core.Extension[]</java-type>
+ <anonymous-type-qname>urn:oasis:names:tc:wsrp:v1:types:Contact>extensions[0,unbounded]</anonymous-type-qname>
+ <qname-scope>complexType</qname-scope>
+ </java-xml-type-mapping>
+ <java-xml-type-mapping>
+ <java-type>org.jboss.portal.wsrp.core.Extension[]</java-type>
+ <anonymous-type-qname>urn:oasis:names:tc:wsrp:v1:types:ModelDescription>extensions[0,unbounded]
+ </anonymous-type-qname>
+ <qname-scope>complexType</qname-scope>
+ </java-xml-type-mapping>
+ <java-xml-type-mapping>
+ <java-type>org.jboss.portal.wsrp.core.Extension[]</java-type>
+ <anonymous-type-qname>urn:oasis:names:tc:wsrp:v1:types:PortletPropertyDescriptionResponse>extensions[0,unbounded]</anonymous-type-qname>
+ <qname-scope>complexType</qname-scope>
+ </java-xml-type-mapping>
+ <java-xml-type-mapping>
+ <java-type>org.jboss.portal.wsrp.core.Extension[]</java-type>
+ <anonymous-type-qname>urn:oasis:names:tc:wsrp:v1:types:UserProfile>extensions[0,unbounded]
+ </anonymous-type-qname>
+ <qname-scope>complexType</qname-scope>
+ </java-xml-type-mapping>
+ <java-xml-type-mapping>
+ <java-type>org.jboss.portal.wsrp.core.Extension[]</java-type>
+ <anonymous-type-qname>urn:oasis:names:tc:wsrp:v1:types:BlockingInteractionResponse>extensions[0,unbounded]
+ </anonymous-type-qname>
+ <qname-scope>complexType</qname-scope>
+ </java-xml-type-mapping>
+ <java-xml-type-mapping>
+ <java-type>org.jboss.portal.wsrp.core.Extension[]</java-type>
+ <anonymous-type-qname>urn:oasis:names:tc:wsrp:v1:types:SessionContext>extensions[0,unbounded]
+ </anonymous-type-qname>
+ <qname-scope>complexType</qname-scope>
+ </java-xml-type-mapping>
+ <java-xml-type-mapping>
+ <java-type>org.jboss.portal.wsrp.core.Extension[]</java-type>
+ <anonymous-type-qname>urn:oasis:names:tc:wsrp:v1:types:Telecom>extensions[0,unbounded]</anonymous-type-qname>
+ <qname-scope>complexType</qname-scope>
+ </java-xml-type-mapping>
+ <java-xml-type-mapping>
+ <java-type>org.jboss.portal.wsrp.core.Extension[]</java-type>
+ <anonymous-type-qname>urn:oasis:names:tc:wsrp:v1:types:PersonName>extensions[0,unbounded]
+ </anonymous-type-qname>
+ <qname-scope>complexType</qname-scope>
+ </java-xml-type-mapping>
+ <java-xml-type-mapping>
+ <java-type>org.jboss.portal.wsrp.core.Extension[]</java-type>
+ <anonymous-type-qname>urn:oasis:names:tc:wsrp:v1:types:ResourceList>extensions[0,unbounded]
+ </anonymous-type-qname>
+ <qname-scope>complexType</qname-scope>
+ </java-xml-type-mapping>
+ <java-xml-type-mapping>
+ <java-type>org.jboss.portal.wsrp.core.Extension[]</java-type>
+ <anonymous-type-qname>urn:oasis:names:tc:wsrp:v1:types:MarkupType>extensions[0,unbounded]
+ </anonymous-type-qname>
+ <qname-scope>complexType</qname-scope>
+ </java-xml-type-mapping>
+ <java-xml-type-mapping>
+ <java-type>org.jboss.portal.wsrp.core.Extension[]</java-type>
+ <anonymous-type-qname>urn:oasis:names:tc:wsrp:v1:types:RegistrationContext>extensions[0,unbounded]
+ </anonymous-type-qname>
+ <qname-scope>complexType</qname-scope>
+ </java-xml-type-mapping>
+ <java-xml-type-mapping>
+ <java-type>org.jboss.portal.wsrp.core.Extension[]</java-type>
+ <anonymous-type-qname>urn:oasis:names:tc:wsrp:v1:types:Online>extensions[0,unbounded]</anonymous-type-qname>
+ <qname-scope>complexType</qname-scope>
+ </java-xml-type-mapping>
+ <java-xml-type-mapping>
+ <java-type>org.jboss.portal.wsrp.core.Extension[]</java-type>
+ <anonymous-type-qname>urn:oasis:names:tc:wsrp:v1:types:ReturnAny>extensions[0,unbounded]</anonymous-type-qname>
+ <qname-scope>complexType</qname-scope>
+ </java-xml-type-mapping>
+ <java-xml-type-mapping>
+ <java-type>java.lang.String[]</java-type>
+ <anonymous-type-qname>urn:oasis:names:tc:wsrp:v1:types:>getPortletProperties>names[1,unbounded]
+ </anonymous-type-qname>
+ <qname-scope>complexType</qname-scope>
+ </java-xml-type-mapping>
+ <java-xml-type-mapping>
+ <java-type>org.jboss.portal.wsrp.core.Extension[]</java-type>
+ <anonymous-type-qname>urn:oasis:names:tc:wsrp:v1:types:PropertyList>extensions[0,unbounded]
+ </anonymous-type-qname>
+ <qname-scope>complexType</qname-scope>
+ </java-xml-type-mapping>
+ <java-xml-type-mapping>
+ <java-type>org.jboss.portal.wsrp.core.Extension[]</java-type>
+ <anonymous-type-qname>urn:oasis:names:tc:wsrp:v1:types:PropertyDescription>extensions[0,unbounded]
+ </anonymous-type-qname>
+ <qname-scope>complexType</qname-scope>
+ </java-xml-type-mapping>
+ <java-xml-type-mapping>
+ <java-type>java.lang.String[]</java-type>
+ <anonymous-type-qname>urn:oasis:names:tc:wsrp:v1:types:>getPortletPropertyDescription>desiredLocales[0,unbounded]</anonymous-type-qname>
+ <qname-scope>complexType</qname-scope>
+ </java-xml-type-mapping>
+ <java-xml-type-mapping>
+ <java-type>org.jboss.portal.wsrp.core.Extension[]</java-type>
+ <anonymous-type-qname>urn:oasis:names:tc:wsrp:v1:types:PortletDescriptionResponse>extensions[0,unbounded]
+ </anonymous-type-qname>
+ <qname-scope>complexType</qname-scope>
+ </java-xml-type-mapping>
+ <java-xml-type-mapping>
+ <java-type>org.jboss.portal.wsrp.core.Extension[]</java-type>
+ <anonymous-type-qname>urn:oasis:names:tc:wsrp:v1:types:EmployerInfo>extensions[0,unbounded]
+ </anonymous-type-qname>
+ <qname-scope>complexType</qname-scope>
+ </java-xml-type-mapping>
+ <java-xml-type-mapping>
+ <java-type>org.jboss.portal.wsrp.core.Extension[]</java-type>
+ <anonymous-type-qname>urn:oasis:names:tc:wsrp:v1:types:ResourceValue>extensions[0,unbounded]
+ </anonymous-type-qname>
+ <qname-scope>complexType</qname-scope>
+ </java-xml-type-mapping>
+ <java-xml-type-mapping>
+ <java-type>org.jboss.portal.wsrp.core.Extension[]</java-type>
+ <anonymous-type-qname>urn:oasis:names:tc:wsrp:v1:types:UploadContext>extensions[0,unbounded]
+ </anonymous-type-qname>
+ <qname-scope>complexType</qname-scope>
+ </java-xml-type-mapping>
+ <java-xml-type-mapping>
+ <java-type>org.jboss.portal.wsrp.core.Extension[]</java-type>
+ <anonymous-type-qname>urn:oasis:names:tc:wsrp:v1:types:Templates>extensions[0,unbounded]</anonymous-type-qname>
+ <qname-scope>complexType</qname-scope>
+ </java-xml-type-mapping>
+ <java-xml-type-mapping>
+ <java-type>java.lang.String[]</java-type>
+ <anonymous-type-qname>urn:oasis:names:tc:wsrp:v1:types:>getServiceDescription>desiredLocales[0,unbounded]
+ </anonymous-type-qname>
+ <qname-scope>complexType</qname-scope>
+ </java-xml-type-mapping>
+ <java-xml-type-mapping>
+ <java-type>org.jboss.portal.wsrp.core.Extension[]</java-type>
+ <anonymous-type-qname>urn:oasis:names:tc:wsrp:v1:types:RegistrationState>extensions[0,unbounded]
+ </anonymous-type-qname>
+ <qname-scope>complexType</qname-scope>
+ </java-xml-type-mapping>
+ <java-xml-type-mapping>
+ <java-type>java.lang.String[]</java-type>
+ <anonymous-type-qname>urn:oasis:names:tc:wsrp:v1:types:>releaseSessions>sessionIDs[1,unbounded]
+ </anonymous-type-qname>
+ <qname-scope>complexType</qname-scope>
+ </java-xml-type-mapping>
+ <java-xml-type-mapping>
+ <java-type>org.jboss.portal.wsrp.core.Extension[]</java-type>
+ <anonymous-type-qname>urn:oasis:names:tc:wsrp:v1:types:Postal>extensions[0,unbounded]</anonymous-type-qname>
+ <qname-scope>complexType</qname-scope>
+ </java-xml-type-mapping>
+ <java-xml-type-mapping>
+ <java-type>org.jboss.portal.wsrp.core.Extension[]</java-type>
+ <anonymous-type-qname>urn:oasis:names:tc:wsrp:v1:types:RuntimeContext>extensions[0,unbounded]
+ </anonymous-type-qname>
+ <qname-scope>complexType</qname-scope>
+ </java-xml-type-mapping>
+ <java-xml-type-mapping>
+ <java-type>org.jboss.portal.wsrp.core.Extension[]</java-type>
+ <anonymous-type-qname>urn:oasis:names:tc:wsrp:v1:types:UserContext>extensions[0,unbounded]
+ </anonymous-type-qname>
+ <qname-scope>complexType</qname-scope>
+ </java-xml-type-mapping>
+ <java-xml-type-mapping>
+ <java-type>org.jboss.portal.wsrp.core.Extension[]</java-type>
+ <anonymous-type-qname>urn:oasis:names:tc:wsrp:v1:types:Resource>extensions[0,unbounded]</anonymous-type-qname>
+ <qname-scope>complexType</qname-scope>
+ </java-xml-type-mapping>
+ <java-xml-type-mapping>
+ <java-type>org.jboss.portal.wsrp.core.Extension[]</java-type>
+ <anonymous-type-qname>urn:oasis:names:tc:wsrp:v1:types:ItemDescription>extensions[0,unbounded]
+ </anonymous-type-qname>
+ <qname-scope>complexType</qname-scope>
+ </java-xml-type-mapping>
+ <java-xml-type-mapping>
+ <java-type>org.jboss.portal.wsrp.core.Extension[]</java-type>
+ <anonymous-type-qname>urn:oasis:names:tc:wsrp:v1:types:PortletDescription>extensions[0,unbounded]
+ </anonymous-type-qname>
+ <qname-scope>complexType</qname-scope>
+ </java-xml-type-mapping>
+ <java-xml-type-mapping>
+ <java-type>org.jboss.portal.wsrp.core.Extension[]</java-type>
+ <anonymous-type-qname>urn:oasis:names:tc:wsrp:v1:types:RegistrationData>extensions[0,unbounded]
+ </anonymous-type-qname>
+ <qname-scope>complexType</qname-scope>
+ </java-xml-type-mapping>
+ <java-xml-type-mapping>
+ <java-type>org.jboss.portal.wsrp.core.Extension[]</java-type>
+ <anonymous-type-qname>urn:oasis:names:tc:wsrp:v1:types:InteractionParams>extensions[0,unbounded]
+ </anonymous-type-qname>
+ <qname-scope>complexType</qname-scope>
+ </java-xml-type-mapping>
+ <java-xml-type-mapping>
+ <java-type>org.jboss.portal.wsrp.core.Extension[]</java-type>
+ <anonymous-type-qname>urn:oasis:names:tc:wsrp:v1:types:MarkupParams>extensions[0,unbounded]
+ </anonymous-type-qname>
+ <qname-scope>complexType</qname-scope>
+ </java-xml-type-mapping>
+ <java-xml-type-mapping>
+ <java-type>org.jboss.portal.wsrp.core.Extension[]</java-type>
+ <anonymous-type-qname>urn:oasis:names:tc:wsrp:v1:types:ClientData>extensions[0,unbounded]
+ </anonymous-type-qname>
+ <qname-scope>complexType</qname-scope>
+ </java-xml-type-mapping>
+ <java-xml-type-mapping>
+ <java-type>java.lang.String[]</java-type>
+ <anonymous-type-qname>urn:oasis:names:tc:wsrp:v1:types:>getPortletDescription>desiredLocales[0,unbounded]
+ </anonymous-type-qname>
+ <qname-scope>complexType</qname-scope>
+ </java-xml-type-mapping>
+ <java-xml-type-mapping>
+ <java-type>org.jboss.portal.wsrp.core.Extension[]</java-type>
+ <anonymous-type-qname>urn:oasis:names:tc:wsrp:v1:types:ServiceDescription>extensions[0,unbounded]
+ </anonymous-type-qname>
+ <qname-scope>complexType</qname-scope>
+ </java-xml-type-mapping>
+ <java-xml-type-mapping>
+ <java-type>org.jboss.portal.wsrp.core.Extension[]</java-type>
+ <anonymous-type-qname>urn:oasis:names:tc:wsrp:v1:types:CacheControl>extensions[0,unbounded]
+ </anonymous-type-qname>
+ <qname-scope>complexType</qname-scope>
+ </java-xml-type-mapping>
+ <java-xml-type-mapping>
+ <java-type>org.jboss.portal.wsrp.core.Extension[]</java-type>
+ <anonymous-type-qname>urn:oasis:names:tc:wsrp:v1:types:TelephoneNum>extensions[0,unbounded]
+ </anonymous-type-qname>
+ <qname-scope>complexType</qname-scope>
+ </java-xml-type-mapping>
+ <java-xml-type-mapping>
+ <java-type>org.jboss.portal.wsrp.core.Extension[]</java-type>
+ <anonymous-type-qname>urn:oasis:names:tc:wsrp:v1:types:PortletContext>extensions[0,unbounded]
+ </anonymous-type-qname>
+ <qname-scope>complexType</qname-scope>
+ </java-xml-type-mapping>
+ <java-xml-type-mapping>
+ <java-type>org.jboss.portal.wsrp.core.Extension[]</java-type>
+ <anonymous-type-qname>urn:oasis:names:tc:wsrp:v1:types:MarkupResponse>extensions[0,unbounded]
+ </anonymous-type-qname>
+ <qname-scope>complexType</qname-scope>
+ </java-xml-type-mapping>
+ <java-xml-type-mapping>
+ <java-type>org.jboss.portal.wsrp.core.Extension[]</java-type>
+ <anonymous-type-qname>urn:oasis:names:tc:wsrp:v1:types:DestroyPortletsResponse>extensions[0,unbounded]
+ </anonymous-type-qname>
+ <qname-scope>complexType</qname-scope>
+ </java-xml-type-mapping>
+ <java-xml-type-mapping>
+ <java-type>java.lang.String[]</java-type>
+ <anonymous-type-qname>urn:oasis:names:tc:wsrp:v1:types:>destroyPortlets>portletHandles[1,unbounded]
+ </anonymous-type-qname>
+ <qname-scope>complexType</qname-scope>
+ </java-xml-type-mapping>
+ <java-xml-type-mapping>
+ <java-type>org.jboss.portal.wsrp.core.Extension[]</java-type>
+ <anonymous-type-qname>urn:oasis:names:tc:wsrp:v1:types:MarkupContext>extensions[0,unbounded]
+ </anonymous-type-qname>
+ <qname-scope>complexType</qname-scope>
+ </java-xml-type-mapping>
+ <java-xml-type-mapping>
+ <java-type>org.jboss.portal.wsrp.core.StateChange</java-type>
+ <root-type-qname xmlns:typeNS="urn:oasis:names:tc:wsrp:v1:types">typeNS:StateChange</root-type-qname>
+ <qname-scope>simpleType</qname-scope>
+ </java-xml-type-mapping>
+ <java-xml-type-mapping>
+ <java-type>org.jboss.portal.wsrp.core.CookieProtocol</java-type>
+ <root-type-qname xmlns:typeNS="urn:oasis:names:tc:wsrp:v1:types">typeNS:CookieProtocol</root-type-qname>
+ <qname-scope>simpleType</qname-scope>
+ </java-xml-type-mapping>
+ <exception-mapping>
+ <exception-type>org.jboss.portal.wsrp.core.InvalidHandleFault</exception-type>
+ <wsdl-message xmlns:exMsgNS="urn:oasis:names:tc:wsrp:v1:intf">exMsgNS:InvalidHandle</wsdl-message>
+ </exception-mapping>
+ <exception-mapping>
+ <exception-type>org.jboss.portal.wsrp.core.InvalidSessionFault</exception-type>
+ <wsdl-message xmlns:exMsgNS="urn:oasis:names:tc:wsrp:v1:intf">exMsgNS:InvalidSession</wsdl-message>
+ </exception-mapping>
+ <exception-mapping>
+ <exception-type>org.jboss.portal.wsrp.core.MissingParametersFault</exception-type>
+ <wsdl-message xmlns:exMsgNS="urn:oasis:names:tc:wsrp:v1:intf">exMsgNS:MissingParameters</wsdl-message>
+ </exception-mapping>
+ <exception-mapping>
+ <exception-type>org.jboss.portal.wsrp.core.InvalidCookieFault</exception-type>
+ <wsdl-message xmlns:exMsgNS="urn:oasis:names:tc:wsrp:v1:intf">exMsgNS:InvalidCookie</wsdl-message>
+ </exception-mapping>
+ <exception-mapping>
+ <exception-type>org.jboss.portal.wsrp.core.InconsistentParametersFault</exception-type>
+ <wsdl-message xmlns:exMsgNS="urn:oasis:names:tc:wsrp:v1:intf">exMsgNS:InconsistentParameters</wsdl-message>
+ </exception-mapping>
+ <exception-mapping>
+ <exception-type>org.jboss.portal.wsrp.core.UnsupportedMimeTypeFault</exception-type>
+ <wsdl-message xmlns:exMsgNS="urn:oasis:names:tc:wsrp:v1:intf">exMsgNS:UnsupportedMimeType</wsdl-message>
+ </exception-mapping>
+ <exception-mapping>
+ <exception-type>org.jboss.portal.wsrp.core.AccessDeniedFault</exception-type>
+ <wsdl-message xmlns:exMsgNS="urn:oasis:names:tc:wsrp:v1:intf">exMsgNS:AccessDenied</wsdl-message>
+ </exception-mapping>
+ <exception-mapping>
+ <exception-type>org.jboss.portal.wsrp.core.PortletStateChangeRequiredFault</exception-type>
+ <wsdl-message xmlns:exMsgNS="urn:oasis:names:tc:wsrp:v1:intf">exMsgNS:PortletStateChangeRequired</wsdl-message>
+ </exception-mapping>
+ <exception-mapping>
+ <exception-type>org.jboss.portal.wsrp.core.InvalidRegistrationFault</exception-type>
+ <wsdl-message xmlns:exMsgNS="urn:oasis:names:tc:wsrp:v1:intf">exMsgNS:InvalidRegistration</wsdl-message>
+ </exception-mapping>
+ <exception-mapping>
+ <exception-type>org.jboss.portal.wsrp.core.OperationFailedFault</exception-type>
+ <wsdl-message xmlns:exMsgNS="urn:oasis:names:tc:wsrp:v1:intf">exMsgNS:OperationFailed</wsdl-message>
+ </exception-mapping>
+ <exception-mapping>
+ <exception-type>org.jboss.portal.wsrp.core.InvalidUserCategoryFault</exception-type>
+ <wsdl-message xmlns:exMsgNS="urn:oasis:names:tc:wsrp:v1:intf">exMsgNS:InvalidUserCategory</wsdl-message>
+ </exception-mapping>
+ <exception-mapping>
+ <exception-type>org.jboss.portal.wsrp.core.UnsupportedWindowStateFault</exception-type>
+ <wsdl-message xmlns:exMsgNS="urn:oasis:names:tc:wsrp:v1:intf">exMsgNS:UnsupportedWindowState</wsdl-message>
+ </exception-mapping>
+ <exception-mapping>
+ <exception-type>org.jboss.portal.wsrp.core.UnsupportedModeFault</exception-type>
+ <wsdl-message xmlns:exMsgNS="urn:oasis:names:tc:wsrp:v1:intf">exMsgNS:UnsupportedMode</wsdl-message>
+ </exception-mapping>
+ <exception-mapping>
+ <exception-type>org.jboss.portal.wsrp.core.UnsupportedLocaleFault</exception-type>
+ <wsdl-message xmlns:exMsgNS="urn:oasis:names:tc:wsrp:v1:intf">exMsgNS:UnsupportedLocale</wsdl-message>
+ </exception-mapping>
+ <service-interface-mapping>
+ <service-interface>org.jboss.portal.wsrp.core.WSRPService</service-interface>
+ <wsdl-service-name xmlns:serviceNS="urn:oasis:names:tc:wsrp:v1:wsdl">serviceNS:WSRPService</wsdl-service-name>
+ <port-mapping>
+ <port-name>WSRPMarkupService</port-name>
+ <java-port-name>WSRPMarkupService</java-port-name>
+ </port-mapping>
+ <port-mapping>
+ <port-name>WSRPServiceDescriptionService</port-name>
+ <java-port-name>WSRPServiceDescriptionService</java-port-name>
+ </port-mapping>
+ <port-mapping>
+ <port-name>WSRPRegistrationService</port-name>
+ <java-port-name>WSRPRegistrationService</java-port-name>
+ </port-mapping>
+ <port-mapping>
+ <port-name>WSRPPortletManagementService</port-name>
+ <java-port-name>WSRPPortletManagementService</java-port-name>
+ </port-mapping>
+ </service-interface-mapping>
+ <service-endpoint-interface-mapping>
+ <service-endpoint-interface>org.jboss.portal.wsrp.core.WSRP_v1_Markup_PortType</service-endpoint-interface>
+ <wsdl-port-type xmlns:portTypeNS="urn:oasis:names:tc:wsrp:v1:intf">portTypeNS:WSRP_v1_Markup_PortType
+ </wsdl-port-type>
+ <wsdl-binding xmlns:bindingNS="urn:oasis:names:tc:wsrp:v1:bind">bindingNS:WSRP_v1_Markup_Binding_SOAP
+ </wsdl-binding>
+ <service-endpoint-method-mapping>
+ <java-method-name>getMarkup</java-method-name>
+ <wsdl-operation>getMarkup</wsdl-operation>
+ <method-param-parts-mapping>
+ <param-position>0</param-position>
+ <param-type>org.jboss.portal.wsrp.core.GetMarkup</param-type>
+ <wsdl-message-mapping>
+ <wsdl-message xmlns:wsdlMsgNS="urn:oasis:names:tc:wsrp:v1:intf">wsdlMsgNS:getMarkup</wsdl-message>
+ <wsdl-message-part-name>getMarkup</wsdl-message-part-name>
+ <parameter-mode>IN</parameter-mode>
+ </wsdl-message-mapping>
+ </method-param-parts-mapping>
+ <wsdl-return-value-mapping>
+ <method-return-value>org.jboss.portal.wsrp.core.MarkupResponse</method-return-value>
+ <wsdl-message xmlns:wsdlMsgNS="urn:oasis:names:tc:wsrp:v1:intf">wsdlMsgNS:getMarkupResponse</wsdl-message>
+ <wsdl-message-part-name>getMarkupResponse</wsdl-message-part-name>
+ </wsdl-return-value-mapping>
+ </service-endpoint-method-mapping>
+ <service-endpoint-method-mapping>
+ <java-method-name>performBlockingInteraction</java-method-name>
+ <wsdl-operation>performBlockingInteraction</wsdl-operation>
+ <method-param-parts-mapping>
+ <param-position>0</param-position>
+ <param-type>org.jboss.portal.wsrp.core.PerformBlockingInteraction</param-type>
+ <wsdl-message-mapping>
+ <wsdl-message xmlns:wsdlMsgNS="urn:oasis:names:tc:wsrp:v1:intf">wsdlMsgNS:performBlockingInteraction
+ </wsdl-message>
+ <wsdl-message-part-name>performBlockingInteraction</wsdl-message-part-name>
+ <parameter-mode>IN</parameter-mode>
+ </wsdl-message-mapping>
+ </method-param-parts-mapping>
+ <wsdl-return-value-mapping>
+ <method-return-value>org.jboss.portal.wsrp.core.BlockingInteractionResponse</method-return-value>
+ <wsdl-message
+ xmlns:wsdlMsgNS="urn:oasis:names:tc:wsrp:v1:intf">wsdlMsgNS:performBlockingInteractionResponse
+ </wsdl-message>
+ <wsdl-message-part-name>performBlockingInteractionResponse</wsdl-message-part-name>
+ </wsdl-return-value-mapping>
+ </service-endpoint-method-mapping>
+ <service-endpoint-method-mapping>
+ <java-method-name>releaseSessions</java-method-name>
+ <wsdl-operation>releaseSessions</wsdl-operation>
+ <method-param-parts-mapping>
+ <param-position>0</param-position>
+ <param-type>org.jboss.portal.wsrp.core.ReleaseSessions</param-type>
+ <wsdl-message-mapping>
+ <wsdl-message xmlns:wsdlMsgNS="urn:oasis:names:tc:wsrp:v1:intf">wsdlMsgNS:releaseSessions</wsdl-message>
+ <wsdl-message-part-name>releaseSessions</wsdl-message-part-name>
+ <parameter-mode>IN</parameter-mode>
+ </wsdl-message-mapping>
+ </method-param-parts-mapping>
+ <wsdl-return-value-mapping>
+ <method-return-value>org.jboss.portal.wsrp.core.ReturnAny</method-return-value>
+ <wsdl-message xmlns:wsdlMsgNS="urn:oasis:names:tc:wsrp:v1:intf">wsdlMsgNS:releaseSessionsResponse
+ </wsdl-message>
+ <wsdl-message-part-name>releaseSessionsResponse</wsdl-message-part-name>
+ </wsdl-return-value-mapping>
+ </service-endpoint-method-mapping>
+ <service-endpoint-method-mapping>
+ <java-method-name>initCookie</java-method-name>
+ <wsdl-operation>initCookie</wsdl-operation>
+ <method-param-parts-mapping>
+ <param-position>0</param-position>
+ <param-type>org.jboss.portal.wsrp.core.InitCookie</param-type>
+ <wsdl-message-mapping>
+ <wsdl-message xmlns:wsdlMsgNS="urn:oasis:names:tc:wsrp:v1:intf">wsdlMsgNS:initCookie</wsdl-message>
+ <wsdl-message-part-name>initCookie</wsdl-message-part-name>
+ <parameter-mode>IN</parameter-mode>
+ </wsdl-message-mapping>
+ </method-param-parts-mapping>
+ <wsdl-return-value-mapping>
+ <method-return-value>org.jboss.portal.wsrp.core.ReturnAny</method-return-value>
+ <wsdl-message xmlns:wsdlMsgNS="urn:oasis:names:tc:wsrp:v1:intf">wsdlMsgNS:initCookieResponse</wsdl-message>
+ <wsdl-message-part-name>initCookieResponse</wsdl-message-part-name>
+ </wsdl-return-value-mapping>
+ </service-endpoint-method-mapping>
+ </service-endpoint-interface-mapping>
+ <service-endpoint-interface-mapping>
+ <service-endpoint-interface>org.jboss.portal.wsrp.core.WSRP_v1_ServiceDescription_PortType
+ </service-endpoint-interface>
+ <wsdl-port-type
+ xmlns:portTypeNS="urn:oasis:names:tc:wsrp:v1:intf">portTypeNS:WSRP_v1_ServiceDescription_PortType
+ </wsdl-port-type>
+ <wsdl-binding
+ xmlns:bindingNS="urn:oasis:names:tc:wsrp:v1:bind">bindingNS:WSRP_v1_ServiceDescription_Binding_SOAP
+ </wsdl-binding>
+ <service-endpoint-method-mapping>
+ <java-method-name>getServiceDescription</java-method-name>
+ <wsdl-operation>getServiceDescription</wsdl-operation>
+ <method-param-parts-mapping>
+ <param-position>0</param-position>
+ <param-type>org.jboss.portal.wsrp.core.GetServiceDescription</param-type>
+ <wsdl-message-mapping>
+ <wsdl-message xmlns:wsdlMsgNS="urn:oasis:names:tc:wsrp:v1:intf">wsdlMsgNS:getServiceDescription
+ </wsdl-message>
+ <wsdl-message-part-name>getServiceDescription</wsdl-message-part-name>
+ <parameter-mode>IN</parameter-mode>
+ </wsdl-message-mapping>
+ </method-param-parts-mapping>
+ <wsdl-return-value-mapping>
+ <method-return-value>org.jboss.portal.wsrp.core.ServiceDescription</method-return-value>
+ <wsdl-message xmlns:wsdlMsgNS="urn:oasis:names:tc:wsrp:v1:intf">wsdlMsgNS:getServiceDescriptionResponse
+ </wsdl-message>
+ <wsdl-message-part-name>getServiceDescriptionResponse</wsdl-message-part-name>
+ </wsdl-return-value-mapping>
+ </service-endpoint-method-mapping>
+ </service-endpoint-interface-mapping>
+ <service-endpoint-interface-mapping>
+ <service-endpoint-interface>org.jboss.portal.wsrp.core.WSRP_v1_Registration_PortType</service-endpoint-interface>
+ <wsdl-port-type
+ xmlns:portTypeNS="urn:oasis:names:tc:wsrp:v1:intf">portTypeNS:WSRP_v1_Registration_PortType
+ </wsdl-port-type>
+ <wsdl-binding
+ xmlns:bindingNS="urn:oasis:names:tc:wsrp:v1:bind">bindingNS:WSRP_v1_Registration_Binding_SOAP
+ </wsdl-binding>
+ <service-endpoint-method-mapping>
+ <java-method-name>register</java-method-name>
+ <wsdl-operation>register</wsdl-operation>
+ <method-param-parts-mapping>
+ <param-position>0</param-position>
+ <param-type>org.jboss.portal.wsrp.core.RegistrationData</param-type>
+ <wsdl-message-mapping>
+ <wsdl-message xmlns:wsdlMsgNS="urn:oasis:names:tc:wsrp:v1:intf">wsdlMsgNS:register</wsdl-message>
+ <wsdl-message-part-name>register</wsdl-message-part-name>
+ <parameter-mode>IN</parameter-mode>
+ </wsdl-message-mapping>
+ </method-param-parts-mapping>
+ <wsdl-return-value-mapping>
+ <method-return-value>org.jboss.portal.wsrp.core.RegistrationContext</method-return-value>
+ <wsdl-message xmlns:wsdlMsgNS="urn:oasis:names:tc:wsrp:v1:intf">wsdlMsgNS:registerResponse</wsdl-message>
+ <wsdl-message-part-name>registerResponse</wsdl-message-part-name>
+ </wsdl-return-value-mapping>
+ </service-endpoint-method-mapping>
+ <service-endpoint-method-mapping>
+ <java-method-name>deregister</java-method-name>
+ <wsdl-operation>deregister</wsdl-operation>
+ <method-param-parts-mapping>
+ <param-position>0</param-position>
+ <param-type>org.jboss.portal.wsrp.core.RegistrationContext</param-type>
+ <wsdl-message-mapping>
+ <wsdl-message xmlns:wsdlMsgNS="urn:oasis:names:tc:wsrp:v1:intf">wsdlMsgNS:deregister</wsdl-message>
+ <wsdl-message-part-name>deregister</wsdl-message-part-name>
+ <parameter-mode>IN</parameter-mode>
+ </wsdl-message-mapping>
+ </method-param-parts-mapping>
+ <wsdl-return-value-mapping>
+ <method-return-value>org.jboss.portal.wsrp.core.ReturnAny</method-return-value>
+ <wsdl-message xmlns:wsdlMsgNS="urn:oasis:names:tc:wsrp:v1:intf">wsdlMsgNS:deregisterResponse</wsdl-message>
+ <wsdl-message-part-name>deregisterResponse</wsdl-message-part-name>
+ </wsdl-return-value-mapping>
+ </service-endpoint-method-mapping>
+ <service-endpoint-method-mapping>
+ <java-method-name>modifyRegistration</java-method-name>
+ <wsdl-operation>modifyRegistration</wsdl-operation>
+ <method-param-parts-mapping>
+ <param-position>0</param-position>
+ <param-type>org.jboss.portal.wsrp.core.ModifyRegistration</param-type>
+ <wsdl-message-mapping>
+ <wsdl-message xmlns:wsdlMsgNS="urn:oasis:names:tc:wsrp:v1:intf">wsdlMsgNS:modifyRegistration
+ </wsdl-message>
+ <wsdl-message-part-name>modifyRegistration</wsdl-message-part-name>
+ <parameter-mode>IN</parameter-mode>
+ </wsdl-message-mapping>
+ </method-param-parts-mapping>
+ <wsdl-return-value-mapping>
+ <method-return-value>org.jboss.portal.wsrp.core.RegistrationState</method-return-value>
+ <wsdl-message xmlns:wsdlMsgNS="urn:oasis:names:tc:wsrp:v1:intf">wsdlMsgNS:modifyRegistrationResponse
+ </wsdl-message>
+ <wsdl-message-part-name>modifyRegistrationResponse</wsdl-message-part-name>
+ </wsdl-return-value-mapping>
+ </service-endpoint-method-mapping>
+ </service-endpoint-interface-mapping>
+ <service-endpoint-interface-mapping>
+ <service-endpoint-interface>org.jboss.portal.wsrp.core.WSRP_v1_PortletManagement_PortType
+ </service-endpoint-interface>
+ <wsdl-port-type
+ xmlns:portTypeNS="urn:oasis:names:tc:wsrp:v1:intf">portTypeNS:WSRP_v1_PortletManagement_PortType
+ </wsdl-port-type>
+ <wsdl-binding
+ xmlns:bindingNS="urn:oasis:names:tc:wsrp:v1:bind">bindingNS:WSRP_v1_PortletManagement_Binding_SOAP
+ </wsdl-binding>
+ <service-endpoint-method-mapping>
+ <java-method-name>getPortletDescription</java-method-name>
+ <wsdl-operation>getPortletDescription</wsdl-operation>
+ <method-param-parts-mapping>
+ <param-position>0</param-position>
+ <param-type>org.jboss.portal.wsrp.core.GetPortletDescription</param-type>
+ <wsdl-message-mapping>
+ <wsdl-message xmlns:wsdlMsgNS="urn:oasis:names:tc:wsrp:v1:intf">wsdlMsgNS:getPortletDescription
+ </wsdl-message>
+ <wsdl-message-part-name>getPortletDescription</wsdl-message-part-name>
+ <parameter-mode>IN</parameter-mode>
+ </wsdl-message-mapping>
+ </method-param-parts-mapping>
+ <wsdl-return-value-mapping>
+ <method-return-value>org.jboss.portal.wsrp.core.PortletDescriptionResponse</method-return-value>
+ <wsdl-message xmlns:wsdlMsgNS="urn:oasis:names:tc:wsrp:v1:intf">wsdlMsgNS:getPortletDescriptionResponse
+ </wsdl-message>
+ <wsdl-message-part-name>getPortletDescriptionResponse</wsdl-message-part-name>
+ </wsdl-return-value-mapping>
+ </service-endpoint-method-mapping>
+ <service-endpoint-method-mapping>
+ <java-method-name>clonePortlet</java-method-name>
+ <wsdl-operation>clonePortlet</wsdl-operation>
+ <method-param-parts-mapping>
+ <param-position>0</param-position>
+ <param-type>org.jboss.portal.wsrp.core.ClonePortlet</param-type>
+ <wsdl-message-mapping>
+ <wsdl-message xmlns:wsdlMsgNS="urn:oasis:names:tc:wsrp:v1:intf">wsdlMsgNS:clonePortlet</wsdl-message>
+ <wsdl-message-part-name>clonePortlet</wsdl-message-part-name>
+ <parameter-mode>IN</parameter-mode>
+ </wsdl-message-mapping>
+ </method-param-parts-mapping>
+ <wsdl-return-value-mapping>
+ <method-return-value>org.jboss.portal.wsrp.core.PortletContext</method-return-value>
+ <wsdl-message xmlns:wsdlMsgNS="urn:oasis:names:tc:wsrp:v1:intf">wsdlMsgNS:clonePortletResponse
+ </wsdl-message>
+ <wsdl-message-part-name>clonePortletResponse</wsdl-message-part-name>
+ </wsdl-return-value-mapping>
+ </service-endpoint-method-mapping>
+ <service-endpoint-method-mapping>
+ <java-method-name>destroyPortlets</java-method-name>
+ <wsdl-operation>destroyPortlets</wsdl-operation>
+ <method-param-parts-mapping>
+ <param-position>0</param-position>
+ <param-type>org.jboss.portal.wsrp.core.DestroyPortlets</param-type>
+ <wsdl-message-mapping>
+ <wsdl-message xmlns:wsdlMsgNS="urn:oasis:names:tc:wsrp:v1:intf">wsdlMsgNS:destroyPortlets</wsdl-message>
+ <wsdl-message-part-name>destroyPortlets</wsdl-message-part-name>
+ <parameter-mode>IN</parameter-mode>
+ </wsdl-message-mapping>
+ </method-param-parts-mapping>
+ <wsdl-return-value-mapping>
+ <method-return-value>org.jboss.portal.wsrp.core.DestroyPortletsResponse</method-return-value>
+ <wsdl-message xmlns:wsdlMsgNS="urn:oasis:names:tc:wsrp:v1:intf">wsdlMsgNS:destroyPortletsResponse
+ </wsdl-message>
+ <wsdl-message-part-name>destroyPortletsResponse</wsdl-message-part-name>
+ </wsdl-return-value-mapping>
+ </service-endpoint-method-mapping>
+ <service-endpoint-method-mapping>
+ <java-method-name>setPortletProperties</java-method-name>
+ <wsdl-operation>setPortletProperties</wsdl-operation>
+ <method-param-parts-mapping>
+ <param-position>0</param-position>
+ <param-type>org.jboss.portal.wsrp.core.SetPortletProperties</param-type>
+ <wsdl-message-mapping>
+ <wsdl-message xmlns:wsdlMsgNS="urn:oasis:names:tc:wsrp:v1:intf">wsdlMsgNS:setPortletProperties
+ </wsdl-message>
+ <wsdl-message-part-name>setPortletProperties</wsdl-message-part-name>
+ <parameter-mode>IN</parameter-mode>
+ </wsdl-message-mapping>
+ </method-param-parts-mapping>
+ <wsdl-return-value-mapping>
+ <method-return-value>org.jboss.portal.wsrp.core.PortletContext</method-return-value>
+ <wsdl-message xmlns:wsdlMsgNS="urn:oasis:names:tc:wsrp:v1:intf">wsdlMsgNS:setPortletPropertiesResponse
+ </wsdl-message>
+ <wsdl-message-part-name>setPortletPropertiesResponse</wsdl-message-part-name>
+ </wsdl-return-value-mapping>
+ </service-endpoint-method-mapping>
+ <service-endpoint-method-mapping>
+ <java-method-name>getPortletProperties</java-method-name>
+ <wsdl-operation>getPortletProperties</wsdl-operation>
+ <method-param-parts-mapping>
+ <param-position>0</param-position>
+ <param-type>org.jboss.portal.wsrp.core.GetPortletProperties</param-type>
+ <wsdl-message-mapping>
+ <wsdl-message xmlns:wsdlMsgNS="urn:oasis:names:tc:wsrp:v1:intf">wsdlMsgNS:getPortletProperties
+ </wsdl-message>
+ <wsdl-message-part-name>getPortletProperties</wsdl-message-part-name>
+ <parameter-mode>IN</parameter-mode>
+ </wsdl-message-mapping>
+ </method-param-parts-mapping>
+ <wsdl-return-value-mapping>
+ <method-return-value>org.jboss.portal.wsrp.core.PropertyList</method-return-value>
+ <wsdl-message xmlns:wsdlMsgNS="urn:oasis:names:tc:wsrp:v1:intf">wsdlMsgNS:getPortletPropertiesResponse
+ </wsdl-message>
+ <wsdl-message-part-name>getPortletPropertiesResponse</wsdl-message-part-name>
+ </wsdl-return-value-mapping>
+ </service-endpoint-method-mapping>
+ <service-endpoint-method-mapping>
+ <java-method-name>getPortletPropertyDescription</java-method-name>
+ <wsdl-operation>getPortletPropertyDescription</wsdl-operation>
+ <method-param-parts-mapping>
+ <param-position>0</param-position>
+ <param-type>org.jboss.portal.wsrp.core.GetPortletPropertyDescription</param-type>
+ <wsdl-message-mapping>
+ <wsdl-message xmlns:wsdlMsgNS="urn:oasis:names:tc:wsrp:v1:intf">wsdlMsgNS:getPortletPropertyDescription
+ </wsdl-message>
+ <wsdl-message-part-name>getPortletPropertyDescription</wsdl-message-part-name>
+ <parameter-mode>IN</parameter-mode>
+ </wsdl-message-mapping>
+ </method-param-parts-mapping>
+ <wsdl-return-value-mapping>
+ <method-return-value>org.jboss.portal.wsrp.core.PortletPropertyDescriptionResponse</method-return-value>
+ <wsdl-message
+ xmlns:wsdlMsgNS="urn:oasis:names:tc:wsrp:v1:intf">wsdlMsgNS:getPortletPropertyDescriptionResponse
+ </wsdl-message>
+ <wsdl-message-part-name>getPortletPropertyDescriptionResponse</wsdl-message-part-name>
+ </wsdl-return-value-mapping>
+ </service-endpoint-method-mapping>
+ </service-endpoint-interface-mapping>
+</java-wsdl-mapping>
Property changes on: modules/wsrp/trunk/producer/src/main/webapp/WEB-INF/jaxrpc-mappings.xml
___________________________________________________________________
Name: svn:executable
+ *
Added: modules/wsrp/trunk/producer/src/main/webapp/WEB-INF/web.xml
===================================================================
--- modules/wsrp/trunk/producer/src/main/webapp/WEB-INF/web.xml (rev 0)
+++ modules/wsrp/trunk/producer/src/main/webapp/WEB-INF/web.xml 2009-07-22 20:25:22 UTC (rev 13587)
@@ -0,0 +1,104 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ ~ JBoss, a division of Red Hat ~
+ ~ Copyright 2009, Red Hat Middleware, LLC, and individual
+ ~ contributors as indicated by the @authors tag. See the
+ ~ copyright.txt in the distribution for a full listing of
+ ~ individual contributors.
+ ~
+ ~ This is free software; you can redistribute it and/or modify it
+ ~ under the terms of the GNU Lesser General Public License as
+ ~ published by the Free Software Foundation; either version 2.1 of
+ ~ the License, or (at your option) any later version.
+ ~
+ ~ This software is distributed in the hope that it will be useful,
+ ~ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ ~ Lesser General Public License for more details.
+ ~
+ ~ You should have received a copy of the GNU Lesser General Public
+ ~ License along with this software; if not, write to the Free
+ ~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ ~ 02110-1301 USA, or see the FSF site: http://www.fsf.org. ~
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
+
+<web-app xmlns="http://java.sun.com/xml/ns/j2ee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
+ version="2.4">
+
+ <!-- Filter to put request and response in ServletAccess -->
+ <filter>
+ <filter-name>ServletAccessFilter</filter-name>
+ <filter-class>org.jboss.portal.wsrp.servlet.ServletAccessFilter</filter-class>
+ </filter>
+ <filter-mapping>
+ <filter-name>ServletAccessFilter</filter-name>
+ <url-pattern>/*</url-pattern>
+ </filter-mapping>
+
+ <!-- Wraps WSRP requests in transactions -->
+ <filter>
+ <filter-name>TransactionFilter</filter-name>
+ <filter-class>org.jboss.portal.wsrp.servlet.TransactionFilter</filter-class>
+ </filter>
+ <filter-mapping>
+ <filter-name>TransactionFilter</filter-name>
+ <url-pattern>/*</url-pattern>
+ </filter-mapping>
+
+ <!-- WSRP Endpoints -->
+ <servlet>
+ <servlet-name>ServiceDescriptionService</servlet-name>
+ <servlet-class>org.jboss.portal.wsrp.endpoints.ServiceDescriptionEndpoint</servlet-class>
+ <init-param>
+ <param-name>wsrp-interface</param-name>
+ <param-value>org.jboss.portal.wsrp.core.WSRP_v1_ServiceDescription_PortType</param-value>
+ </init-param>
+ </servlet>
+ <servlet>
+ <servlet-name>MarkupService</servlet-name>
+ <servlet-class>org.jboss.portal.wsrp.endpoints.MarkupEndpoint</servlet-class>
+ <init-param>
+ <param-name>wsrp-interface</param-name>
+ <param-value>org.jboss.portal.wsrp.core.WSRP_v1_Markup_PortType</param-value>
+ </init-param>
+ </servlet>
+ <servlet>
+ <servlet-name>RegistrationService</servlet-name>
+ <servlet-class>org.jboss.portal.wsrp.endpoints.RegistrationEndpoint</servlet-class>
+ <init-param>
+ <param-name>wsrp-interface</param-name>
+ <param-value>org.jboss.portal.wsrp.core.WSRP_v1_Registration_PortType</param-value>
+ </init-param>
+ </servlet>
+ <servlet>
+ <servlet-name>PortletManagementService</servlet-name>
+ <servlet-class>org.jboss.portal.wsrp.endpoints.PortletManagementEndpoint</servlet-class>
+ <init-param>
+ <param-name>wsrp-interface</param-name>
+ <param-value>org.jboss.portal.wsrp.core.WSRP_v1_PortletManagement_PortType</param-value>
+ </init-param>
+ </servlet>
+
+ <!-- WSRP endpoint mappings -->
+ <servlet-mapping>
+ <servlet-name>ServiceDescriptionService</servlet-name>
+ <url-pattern>/ServiceDescriptionService</url-pattern>
+ </servlet-mapping>
+ <servlet-mapping>
+ <servlet-name>MarkupService</servlet-name>
+ <url-pattern>/MarkupService</url-pattern>
+ </servlet-mapping>
+ <servlet-mapping>
+ <servlet-name>RegistrationService</servlet-name>
+ <url-pattern>/RegistrationService</url-pattern>
+ </servlet-mapping>
+ <servlet-mapping>
+ <servlet-name>PortletManagementService</servlet-name>
+ <url-pattern>/PortletManagementService</url-pattern>
+ </servlet-mapping>
+
+</web-app>
+
+
Property changes on: modules/wsrp/trunk/producer/src/main/webapp/WEB-INF/web.xml
___________________________________________________________________
Name: svn:executable
+ *
Added: modules/wsrp/trunk/producer/src/main/webapp/WEB-INF/webservices.xml
===================================================================
--- modules/wsrp/trunk/producer/src/main/webapp/WEB-INF/webservices.xml (rev 0)
+++ modules/wsrp/trunk/producer/src/main/webapp/WEB-INF/webservices.xml 2009-07-22 20:25:22 UTC (rev 13587)
@@ -0,0 +1,124 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ ~ JBoss, a division of Red Hat ~
+ ~ Copyright 2009, Red Hat Middleware, LLC, and individual
+ ~ contributors as indicated by the @authors tag. See the
+ ~ copyright.txt in the distribution for a full listing of
+ ~ individual contributors.
+ ~
+ ~ This is free software; you can redistribute it and/or modify it
+ ~ under the terms of the GNU Lesser General Public License as
+ ~ published by the Free Software Foundation; either version 2.1 of
+ ~ the License, or (at your option) any later version.
+ ~
+ ~ This software is distributed in the hope that it will be useful,
+ ~ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ ~ Lesser General Public License for more details.
+ ~
+ ~ You should have received a copy of the GNU Lesser General Public
+ ~ License along with this software; if not, write to the Free
+ ~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ ~ 02110-1301 USA, or see the FSF site: http://www.fsf.org. ~
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
+
+<webservices xmlns="http://java.sun.com/xml/ns/j2ee"
+ xmlns:impl="urn:oasis:names:tc:wsrp:v1:wsdl"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://www.ibm.com/webservices/xsd/j2ee_web_services_1_1.xsd"
+ version="1.1">
+
+ <webservice-description>
+ <webservice-description-name>WSRPService</webservice-description-name>
+ <wsdl-file>WEB-INF/wsdl/wsrp_services.wsdl</wsdl-file>
+ <jaxrpc-mapping-file>WEB-INF/jaxrpc-mappings.xml</jaxrpc-mapping-file>
+
+ <port-component>
+ <port-component-name>WSRPServiceDescriptionService</port-component-name>
+ <wsdl-port>impl:WSRPServiceDescriptionService</wsdl-port>
+ <service-endpoint-interface>org.jboss.portal.wsrp.core.WSRP_v1_ServiceDescription_PortType
+ </service-endpoint-interface>
+ <service-impl-bean>
+ <servlet-link>ServiceDescriptionService</servlet-link>
+ </service-impl-bean>
+ <handler>
+ <handler-name>ExtensionHandler</handler-name>
+ <handler-class>org.jboss.portal.wsrp.handler.WSRPExtensionHandler</handler-class>
+ <!--<init-param>
+ <param-name>debug</param-name>
+ <param-value>true</param-value>
+ </init-param>-->
+ <init-param>
+ <param-name>removeExtensions</param-name>
+ <param-value>true</param-value>
+ </init-param>
+ </handler>
+ </port-component>
+
+ <port-component>
+ <port-component-name>WSRPBaseService</port-component-name>
+ <wsdl-port>impl:WSRPBaseService</wsdl-port>
+ <service-endpoint-interface>org.jboss.portal.wsrp.core.WSRP_v1_Markup_PortType</service-endpoint-interface>
+ <service-impl-bean>
+ <servlet-link>MarkupService</servlet-link>
+ </service-impl-bean>
+ <handler>
+ <handler-name>ExtensionHandler</handler-name>
+ <handler-class>org.jboss.portal.wsrp.handler.WSRPExtensionHandler</handler-class>
+ <!--<init-param>
+ <param-name>debug</param-name>
+ <param-value>true</param-value>
+ </init-param>-->
+ <init-param>
+ <param-name>removeExtensions</param-name>
+ <param-value>true</param-value>
+ </init-param>
+ </handler>
+ </port-component>
+
+ <port-component>
+ <port-component-name>WSRPRegistrationService</port-component-name>
+ <wsdl-port>impl:WSRPRegistrationService</wsdl-port>
+ <service-endpoint-interface>org.jboss.portal.wsrp.core.WSRP_v1_Registration_PortType
+ </service-endpoint-interface>
+ <service-impl-bean>
+ <servlet-link>RegistrationService</servlet-link>
+ </service-impl-bean>
+ <handler>
+ <handler-name>ExtensionHandler</handler-name>
+ <handler-class>org.jboss.portal.wsrp.handler.WSRPExtensionHandler</handler-class>
+ <!--<init-param>
+ <param-name>debug</param-name>
+ <param-value>true</param-value>
+ </init-param>-->
+ <init-param>
+ <param-name>removeExtensions</param-name>
+ <param-value>true</param-value>
+ </init-param>
+ </handler>
+ </port-component>
+
+ <port-component>
+ <port-component-name>WSRPPortletManagementService</port-component-name>
+ <wsdl-port>impl:WSRPPortletManagementService</wsdl-port>
+ <service-endpoint-interface>org.jboss.portal.wsrp.core.WSRP_v1_PortletManagement_PortType
+ </service-endpoint-interface>
+ <service-impl-bean>
+ <servlet-link>PortletManagementService</servlet-link>
+ </service-impl-bean>
+ <handler>
+ <handler-name>ExtensionHandler</handler-name>
+ <handler-class>org.jboss.portal.wsrp.handler.WSRPExtensionHandler</handler-class>
+ <!--<init-param>
+ <param-name>debug</param-name>
+ <param-value>true</param-value>
+ </init-param>-->
+ <init-param>
+ <param-name>removeExtensions</param-name>
+ <param-value>true</param-value>
+ </init-param>
+ </handler>
+ </port-component>
+ </webservice-description>
+
+</webservices>
\ No newline at end of file
Property changes on: modules/wsrp/trunk/producer/src/main/webapp/WEB-INF/webservices.xml
___________________________________________________________________
Name: svn:executable
+ *
Added: modules/wsrp/trunk/producer/src/main/webapp/WEB-INF/wsdl/wsrp_services.wsdl
===================================================================
--- modules/wsrp/trunk/producer/src/main/webapp/WEB-INF/wsdl/wsrp_services.wsdl (rev 0)
+++ modules/wsrp/trunk/producer/src/main/webapp/WEB-INF/wsdl/wsrp_services.wsdl 2009-07-22 20:25:22 UTC (rev 13587)
@@ -0,0 +1,74 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ ~ JBoss, a division of Red Hat ~
+ ~ Copyright 2009, Red Hat Middleware, LLC, and individual
+ ~ contributors as indicated by the @authors tag. See the
+ ~ copyright.txt in the distribution for a full listing of
+ ~ individual contributors.
+ ~
+ ~ This is free software; you can redistribute it and/or modify it
+ ~ under the terms of the GNU Lesser General Public License as
+ ~ published by the Free Software Foundation; either version 2.1 of
+ ~ the License, or (at your option) any later version.
+ ~
+ ~ This software is distributed in the hope that it will be useful,
+ ~ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ ~ Lesser General Public License for more details.
+ ~
+ ~ You should have received a copy of the GNU Lesser General Public
+ ~ License along with this software; if not, write to the Free
+ ~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ ~ 02110-1301 USA, or see the FSF site: http://www.fsf.org. ~
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
+
+<wsdl:definitions targetNamespace="urn:oasis:names:tc:wsrp:v1:wsdl"
+ xmlns:bind="urn:oasis:names:tc:wsrp:v1:bind"
+ xmlns="http://schemas.xmlsoap.org/wsdl/"
+ xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
+ xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
+ xmlns:intf="urn:oasis:names:tc:wsrp:v1:intf"
+ xmlns:tns="urn:oasis:names:tc:wsrp:v1:wsdl">
+
+ <import namespace="urn:oasis:names:tc:wsrp:v1:bind" location="wsrp_v1_bindings.wsdl"/>
+
+ <wsdl:service name="WSRPService">
+ <wsdl:port binding="bind:WSRP_v1_Markup_Binding_SOAP" name="WSRPBaseService">
+ <soap:address location="REPLACE_WITH_ACTUAL_URL"/>
+ </wsdl:port>
+
+ <wsdl:port binding="bind:WSRP_v1_ServiceDescription_Binding_SOAP" name="WSRPServiceDescriptionService">
+ <soap:address location="REPLACE_WITH_ACTUAL_URL"/>
+ </wsdl:port>
+
+ <wsdl:port binding="bind:WSRP_v1_Registration_Binding_SOAP" name="WSRPRegistrationService">
+ <soap:address location="REPLACE_WITH_ACTUAL_URL"/>
+ </wsdl:port>
+
+ <wsdl:port binding="bind:WSRP_v1_PortletManagement_Binding_SOAP" name="WSRPPortletManagementService">
+ <soap:address location="REPLACE_WITH_ACTUAL_URL"/>
+ </wsdl:port>
+ </wsdl:service>
+
+ <!--
+ Uncomment to use HTTP+SSL after activating the appropriate Tomcat Connector and comment out the above service
+ definition. Adapt host name and port as appropriate.
+ <wsdl:service name="WSRPService">
+ <wsdl:port binding="bind:WSRP_v1_Markup_Binding_SOAP" name="WSRPBaseService">
+ <soap:address location="https://localhost:8443/portal-wsrp/ServiceDescriptionService"/>
+ </wsdl:port>
+
+ <wsdl:port binding="bind:WSRP_v1_ServiceDescription_Binding_SOAP" name="WSRPServiceDescriptionService">
+ <soap:address location="https://localhost:8443/portal-wsrp/MarkupService"/>
+ </wsdl:port>
+
+ <wsdl:port binding="bind:WSRP_v1_Registration_Binding_SOAP" name="WSRPRegistrationService">
+ <soap:address location="https://localhost:8443/portal-wsrp/RegistrationService"/>
+ </wsdl:port>
+
+ <wsdl:port binding="bind:WSRP_v1_PortletManagement_Binding_SOAP" name="WSRPPortletManagementService">
+ <soap:address location="https://localhost:8443/portal-wsrp/PortletManagementService"/>
+ </wsdl:port>
+ </wsdl:service>-->
+</wsdl:definitions>
Property changes on: modules/wsrp/trunk/producer/src/main/webapp/WEB-INF/wsdl/wsrp_services.wsdl
___________________________________________________________________
Name: svn:executable
+ *
Added: modules/wsrp/trunk/producer/src/main/webapp/WEB-INF/wsdl/wsrp_v1_bindings.wsdl
===================================================================
--- modules/wsrp/trunk/producer/src/main/webapp/WEB-INF/wsdl/wsrp_v1_bindings.wsdl (rev 0)
+++ modules/wsrp/trunk/producer/src/main/webapp/WEB-INF/wsdl/wsrp_v1_bindings.wsdl 2009-07-22 20:25:22 UTC (rev 13587)
@@ -0,0 +1,440 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ ~ JBoss, a division of Red Hat ~
+ ~ Copyright 2009, Red Hat Middleware, LLC, and individual
+ ~ contributors as indicated by the @authors tag. See the
+ ~ copyright.txt in the distribution for a full listing of
+ ~ individual contributors.
+ ~
+ ~ This is free software; you can redistribute it and/or modify it
+ ~ under the terms of the GNU Lesser General Public License as
+ ~ published by the Free Software Foundation; either version 2.1 of
+ ~ the License, or (at your option) any later version.
+ ~
+ ~ This software is distributed in the hope that it will be useful,
+ ~ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ ~ Lesser General Public License for more details.
+ ~
+ ~ You should have received a copy of the GNU Lesser General Public
+ ~ License along with this software; if not, write to the Free
+ ~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ ~ 02110-1301 USA, or see the FSF site: http://www.fsf.org. ~
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
+
+<wsdl:definitions targetNamespace="urn:oasis:names:tc:wsrp:v1:bind"
+ xmlns:bind="urn:oasis:names:tc:wsrp:v1:bind"
+ xmlns:intf="urn:oasis:names:tc:wsrp:v1:intf"
+ xmlns="http://schemas.xmlsoap.org/wsdl/"
+ xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
+ xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/">
+
+ <!-- This file reflects v1.0 of the specification -->
+
+
+ <import namespace="urn:oasis:names:tc:wsrp:v1:intf"
+ location="wsrp_v1_interfaces.wsdl"/>
+
+ <wsdl:binding name="WSRP_v1_Markup_Binding_SOAP" type="intf:WSRP_v1_Markup_PortType">
+ <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
+
+ <wsdl:operation name="getMarkup">
+ <soap:operation soapAction="urn:oasis:names:tc:wsrp:v1:getMarkup"/>
+ <wsdl:input name="getMarkup">
+ <soap:body use="literal"/>
+ </wsdl:input>
+ <wsdl:output name="getMarkupResponse">
+ <soap:body use="literal"/>
+ </wsdl:output>
+ <wsdl:fault name="AccessDenied">
+ <soap:fault name="AccessDenied" use="literal"/>
+ </wsdl:fault>
+ <wsdl:fault name="InvalidUserCategory">
+ <soap:fault name="InvalidUserCategory" use="literal"/>
+ </wsdl:fault>
+ <wsdl:fault name="InconsistentParameters">
+ <soap:fault name="InconsistentParameters" use="literal"/>
+ </wsdl:fault>
+ <wsdl:fault name="InvalidRegistration">
+ <soap:fault name="InvalidRegistration" use="literal"/>
+ </wsdl:fault>
+ <wsdl:fault name="MissingParameters">
+ <soap:fault name="MissingParameters" use="literal"/>
+ </wsdl:fault>
+ <wsdl:fault name="OperationFailed">
+ <soap:fault name="OperationFailed" use="literal"/>
+ </wsdl:fault>
+ <wsdl:fault name="InvalidHandle">
+ <soap:fault name="InvalidHandle" use="literal"/>
+ </wsdl:fault>
+ <wsdl:fault name="InvalidCookie">
+ <soap:fault name="InvalidCookie" use="literal"/>
+ </wsdl:fault>
+ <wsdl:fault name="InvalidSession">
+ <soap:fault name="InvalidSession" use="literal"/>
+ </wsdl:fault>
+ <wsdl:fault name="UnsupportedMode">
+ <soap:fault name="UnsupportedMode" use="literal"/>
+ </wsdl:fault>
+ <wsdl:fault name="UnsupportedWindowState">
+ <soap:fault name="UnsupportedWindowState" use="literal"/>
+ </wsdl:fault>
+ <wsdl:fault name="UnsupportedLocale">
+ <soap:fault name="UnsupportedLocale" use="literal"/>
+ </wsdl:fault>
+ <wsdl:fault name="UnsupportedMimeType">
+ <soap:fault name="UnsupportedMimeType" use="literal"/>
+ </wsdl:fault>
+ </wsdl:operation>
+
+ <wsdl:operation name="performBlockingInteraction">
+ <soap:operation soapAction="urn:oasis:names:tc:wsrp:v1:performBlockingInteraction"/>
+ <wsdl:input name="performBlockingInteraction">
+ <soap:body use="literal"/>
+ </wsdl:input>
+ <wsdl:output name="performBlockingInteractionResponse">
+ <soap:body use="literal"/>
+ </wsdl:output>
+ <wsdl:fault name="AccessDenied">
+ <soap:fault name="AccessDenied" use="literal"/>
+ </wsdl:fault>
+ <wsdl:fault name="InvalidUserCategory">
+ <soap:fault name="InvalidUserCategory" use="literal"/>
+ </wsdl:fault>
+ <wsdl:fault name="InconsistentParameters">
+ <soap:fault name="InconsistentParameters" use="literal"/>
+ </wsdl:fault>
+ <wsdl:fault name="InvalidRegistration">
+ <soap:fault name="InvalidRegistration" use="literal"/>
+ </wsdl:fault>
+ <wsdl:fault name="MissingParameters">
+ <soap:fault name="MissingParameters" use="literal"/>
+ </wsdl:fault>
+ <wsdl:fault name="OperationFailed">
+ <soap:fault name="OperationFailed" use="literal"/>
+ </wsdl:fault>
+ <wsdl:fault name="InvalidHandle">
+ <soap:fault name="InvalidHandle" use="literal"/>
+ </wsdl:fault>
+ <wsdl:fault name="PortletStateChangeRequired">
+ <soap:fault name="PortletStateChangeRequired" use="literal"/>
+ </wsdl:fault>
+ <wsdl:fault name="InvalidCookie">
+ <soap:fault name="InvalidCookie" use="literal"/>
+ </wsdl:fault>
+ <wsdl:fault name="InvalidSession">
+ <soap:fault name="InvalidSession" use="literal"/>
+ </wsdl:fault>
+ <wsdl:fault name="UnsupportedMode">
+ <soap:fault name="UnsupportedMode" use="literal"/>
+ </wsdl:fault>
+ <wsdl:fault name="UnsupportedWindowState">
+ <soap:fault name="UnsupportedWindowState" use="literal"/>
+ </wsdl:fault>
+ <wsdl:fault name="UnsupportedLocale">
+ <soap:fault name="UnsupportedLocale" use="literal"/>
+ </wsdl:fault>
+ <wsdl:fault name="UnsupportedMimeType">
+ <soap:fault name="UnsupportedMimeType" use="literal"/>
+ </wsdl:fault>
+ </wsdl:operation>
+
+ <wsdl:operation name="releaseSessions">
+ <soap:operation soapAction="urn:oasis:names:tc:wsrp:v1:releaseSessions"/>
+ <wsdl:input name="releaseSessions">
+ <soap:body use="literal"/>
+ </wsdl:input>
+ <wsdl:output name="releaseSessionsResponse">
+ <soap:body use="literal"/>
+ </wsdl:output>
+ <wsdl:fault name="AccessDenied">
+ <soap:fault name="AccessDenied" use="literal"/>
+ </wsdl:fault>
+ <wsdl:fault name="InvalidRegistration">
+ <soap:fault name="InvalidRegistration" use="literal"/>
+ </wsdl:fault>
+ <wsdl:fault name="MissingParameters">
+ <soap:fault name="MissingParameters" use="literal"/>
+ </wsdl:fault>
+ <wsdl:fault name="OperationFailed">
+ <soap:fault name="OperationFailed" use="literal"/>
+ </wsdl:fault>
+ </wsdl:operation>
+
+ <wsdl:operation name="initCookie">
+ <soap:operation soapAction="urn:oasis:names:tc:wsrp:v1:initCookie"/>
+ <wsdl:input name="initCookie">
+ <soap:body use="literal"/>
+ </wsdl:input>
+ <wsdl:output name="initCookieResponse">
+ <soap:body use="literal"/>
+ </wsdl:output>
+ <wsdl:fault name="AccessDenied">
+ <soap:fault name="AccessDenied" use="literal"/>
+ </wsdl:fault>
+ <wsdl:fault name="InvalidRegistration">
+ <soap:fault name="InvalidRegistration" use="literal"/>
+ </wsdl:fault>
+ <wsdl:fault name="OperationFailed">
+ <soap:fault name="OperationFailed" use="literal"/>
+ </wsdl:fault>
+ </wsdl:operation>
+ </wsdl:binding>
+
+
+ <wsdl:binding name="WSRP_v1_ServiceDescription_Binding_SOAP" type="intf:WSRP_v1_ServiceDescription_PortType">
+ <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
+
+ <wsdl:operation name="getServiceDescription">
+ <soap:operation soapAction="urn:oasis:names:tc:wsrp:v1:getServiceDescription"/>
+ <wsdl:input name="getServiceDescription">
+ <soap:body use="literal"/>
+ </wsdl:input>
+ <wsdl:output name="getServiceDescriptionResponse">
+ <soap:body use="literal"/>
+ </wsdl:output>
+ <wsdl:fault name="InvalidRegistration">
+ <soap:fault name="InvalidRegistration" use="literal"/>
+ </wsdl:fault>
+ <wsdl:fault name="OperationFailed">
+ <soap:fault name="OperationFailed" use="literal"/>
+ </wsdl:fault>
+ </wsdl:operation>
+ </wsdl:binding>
+
+ <wsdl:binding name="WSRP_v1_PortletManagement_Binding_SOAP" type="intf:WSRP_v1_PortletManagement_PortType">
+ <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
+
+ <wsdl:operation name="getPortletDescription">
+ <soap:operation soapAction="urn:oasis:names:tc:wsrp:v1:getPortletDescription"/>
+ <wsdl:input name="getPortletDescription">
+ <soap:body use="literal"/>
+ </wsdl:input>
+ <wsdl:output name="getPortletDescriptionResponse">
+ <soap:body use="literal"/>
+ </wsdl:output>
+ <wsdl:fault name="AccessDenied">
+ <soap:fault name="AccessDenied" use="literal"/>
+ </wsdl:fault>
+ <wsdl:fault name="InvalidUserCategory">
+ <soap:fault name="InvalidUserCategory" use="literal"/>
+ </wsdl:fault>
+ <wsdl:fault name="InconsistentParameters">
+ <soap:fault name="InconsistentParameters" use="literal"/>
+ </wsdl:fault>
+ <wsdl:fault name="InvalidRegistration">
+ <soap:fault name="InvalidRegistration" use="literal"/>
+ </wsdl:fault>
+ <wsdl:fault name="MissingParameters">
+ <soap:fault name="MissingParameters" use="literal"/>
+ </wsdl:fault>
+ <wsdl:fault name="OperationFailed">
+ <soap:fault name="OperationFailed" use="literal"/>
+ </wsdl:fault>
+ <wsdl:fault name="InvalidHandle">
+ <soap:fault name="InvalidHandle" use="literal"/>
+ </wsdl:fault>
+ </wsdl:operation>
+
+ <wsdl:operation name="clonePortlet">
+ <soap:operation soapAction="urn:oasis:names:tc:wsrp:v1:clonePortlet"/>
+ <wsdl:input name="clonePortlet">
+ <soap:body use="literal"/>
+ </wsdl:input>
+ <wsdl:output name="clonePortletResponse">
+ <soap:body use="literal"/>
+ </wsdl:output>
+ <wsdl:fault name="AccessDenied">
+ <soap:fault name="AccessDenied" use="literal"/>
+ </wsdl:fault>
+ <wsdl:fault name="InvalidUserCategory">
+ <soap:fault name="InvalidUserCategory" use="literal"/>
+ </wsdl:fault>
+ <wsdl:fault name="InconsistentParameters">
+ <soap:fault name="InconsistentParameters" use="literal"/>
+ </wsdl:fault>
+ <wsdl:fault name="InvalidRegistration">
+ <soap:fault name="InvalidRegistration" use="literal"/>
+ </wsdl:fault>
+ <wsdl:fault name="MissingParameters">
+ <soap:fault name="MissingParameters" use="literal"/>
+ </wsdl:fault>
+ <wsdl:fault name="OperationFailed">
+ <soap:fault name="OperationFailed" use="literal"/>
+ </wsdl:fault>
+ <wsdl:fault name="InvalidHandle">
+ <soap:fault name="InvalidHandle" use="literal"/>
+ </wsdl:fault>
+ </wsdl:operation>
+
+ <wsdl:operation name="destroyPortlets">
+ <soap:operation soapAction="urn:oasis:names:tc:wsrp:v1:destroyPortlets"/>
+ <wsdl:input name="destroyPortlets">
+ <soap:body use="literal"/>
+ </wsdl:input>
+ <wsdl:output name="destroyPortletsResponse">
+ <soap:body use="literal"/>
+ </wsdl:output>
+ <wsdl:fault name="InconsistentParameters">
+ <soap:fault name="InconsistentParameters" use="literal"/>
+ </wsdl:fault>
+ <wsdl:fault name="InvalidRegistration">
+ <soap:fault name="InvalidRegistration" use="literal"/>
+ </wsdl:fault>
+ <wsdl:fault name="MissingParameters">
+ <soap:fault name="MissingParameters" use="literal"/>
+ </wsdl:fault>
+ <wsdl:fault name="OperationFailed">
+ <soap:fault name="OperationFailed" use="literal"/>
+ </wsdl:fault>
+ </wsdl:operation>
+
+ <wsdl:operation name="setPortletProperties">
+ <soap:operation soapAction="urn:oasis:names:tc:wsrp:v1:setPortletProperties"/>
+ <wsdl:input name="setPortletProperties">
+ <soap:body use="literal"/>
+ </wsdl:input>
+ <wsdl:output name="setPortletPropertiesResponse">
+ <soap:body use="literal"/>
+ </wsdl:output>
+ <wsdl:fault name="AccessDenied">
+ <soap:fault name="AccessDenied" use="literal"/>
+ </wsdl:fault>
+ <wsdl:fault name="InvalidUserCategory">
+ <soap:fault name="InvalidUserCategory" use="literal"/>
+ </wsdl:fault>
+ <wsdl:fault name="InconsistentParameters">
+ <soap:fault name="InconsistentParameters" use="literal"/>
+ </wsdl:fault>
+ <wsdl:fault name="InvalidRegistration">
+ <soap:fault name="InvalidRegistration" use="literal"/>
+ </wsdl:fault>
+ <wsdl:fault name="MissingParameters">
+ <soap:fault name="MissingParameters" use="literal"/>
+ </wsdl:fault>
+ <wsdl:fault name="OperationFailed">
+ <soap:fault name="OperationFailed" use="literal"/>
+ </wsdl:fault>
+ <wsdl:fault name="InvalidHandle">
+ <soap:fault name="InvalidHandle" use="literal"/>
+ </wsdl:fault>
+ </wsdl:operation>
+
+ <wsdl:operation name="getPortletProperties">
+ <soap:operation soapAction="urn:oasis:names:tc:wsrp:v1:getPortletProperties"/>
+ <wsdl:input name="getPortletProperties">
+ <soap:body use="literal"/>
+ </wsdl:input>
+ <wsdl:output name="getPortletPropertiesResponse">
+ <soap:body use="literal"/>
+ </wsdl:output>
+ <wsdl:fault name="AccessDenied">
+ <soap:fault name="AccessDenied" use="literal"/>
+ </wsdl:fault>
+ <wsdl:fault name="InvalidUserCategory">
+ <soap:fault name="InvalidUserCategory" use="literal"/>
+ </wsdl:fault>
+ <wsdl:fault name="InconsistentParameters">
+ <soap:fault name="InconsistentParameters" use="literal"/>
+ </wsdl:fault>
+ <wsdl:fault name="InvalidRegistration">
+ <soap:fault name="InvalidRegistration" use="literal"/>
+ </wsdl:fault>
+ <wsdl:fault name="MissingParameters">
+ <soap:fault name="MissingParameters" use="literal"/>
+ </wsdl:fault>
+ <wsdl:fault name="OperationFailed">
+ <soap:fault name="OperationFailed" use="literal"/>
+ </wsdl:fault>
+ <wsdl:fault name="InvalidHandle">
+ <soap:fault name="InvalidHandle" use="literal"/>
+ </wsdl:fault>
+ </wsdl:operation>
+
+ <wsdl:operation name="getPortletPropertyDescription">
+ <soap:operation soapAction="urn:oasis:names:tc:wsrp:v1:getPortletPropertyDescription"/>
+ <wsdl:input name="getPortletPropertyDescription">
+ <soap:body use="literal"/>
+ </wsdl:input>
+ <wsdl:output name="getPortletPropertyDescriptionResponse">
+ <soap:body use="literal"/>
+ </wsdl:output>
+ <wsdl:fault name="AccessDenied">
+ <soap:fault name="AccessDenied" use="literal"/>
+ </wsdl:fault>
+ <wsdl:fault name="InvalidUserCategory">
+ <soap:fault name="InvalidUserCategory" use="literal"/>
+ </wsdl:fault>
+ <wsdl:fault name="InconsistentParameters">
+ <soap:fault name="InconsistentParameters" use="literal"/>
+ </wsdl:fault>
+ <wsdl:fault name="InvalidRegistration">
+ <soap:fault name="InvalidRegistration" use="literal"/>
+ </wsdl:fault>
+ <wsdl:fault name="MissingParameters">
+ <soap:fault name="MissingParameters" use="literal"/>
+ </wsdl:fault>
+ <wsdl:fault name="OperationFailed">
+ <soap:fault name="OperationFailed" use="literal"/>
+ </wsdl:fault>
+ <wsdl:fault name="InvalidHandle">
+ <soap:fault name="InvalidHandle" use="literal"/>
+ </wsdl:fault>
+ </wsdl:operation>
+ </wsdl:binding>
+
+ <wsdl:binding name="WSRP_v1_Registration_Binding_SOAP" type="intf:WSRP_v1_Registration_PortType">
+ <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
+
+ <wsdl:operation name="register">
+ <soap:operation soapAction="urn:oasis:names:tc:wsrp:v1:register"/>
+ <wsdl:input name="register">
+ <soap:body use="literal"/>
+ </wsdl:input>
+ <wsdl:output name="registerResponse">
+ <soap:body use="literal"/>
+ </wsdl:output>
+ <wsdl:fault name="MissingParameters">
+ <soap:fault name="MissingParameters" use="literal"/>
+ </wsdl:fault>
+ <wsdl:fault name="OperationFailed">
+ <soap:fault name="OperationFailed" use="literal"/>
+ </wsdl:fault>
+ </wsdl:operation>
+
+ <wsdl:operation name="deregister">
+ <soap:operation soapAction="urn:oasis:names:tc:wsrp:v1:deregister"/>
+ <wsdl:input name="deregister">
+ <soap:body use="literal"/>
+ </wsdl:input>
+ <wsdl:output name="deregisterResponse">
+ <soap:body use="literal"/>
+ </wsdl:output>
+ <wsdl:fault name="InvalidRegistration">
+ <soap:fault name="InvalidRegistration" use="literal"/>
+ </wsdl:fault>
+ <wsdl:fault name="OperationFailed">
+ <soap:fault name="OperationFailed" use="literal"/>
+ </wsdl:fault>
+ </wsdl:operation>
+
+ <wsdl:operation name="modifyRegistration">
+ <soap:operation soapAction="urn:oasis:names:tc:wsrp:v1:modifyRegistration"/>
+ <wsdl:input name="modifyRegistration">
+ <soap:body use="literal"/>
+ </wsdl:input>
+ <wsdl:output name="modifyRegistrationResponse">
+ <soap:body use="literal"/>
+ </wsdl:output>
+ <wsdl:fault name="InvalidRegistration">
+ <soap:fault name="InvalidRegistration" use="literal"/>
+ </wsdl:fault>
+ <wsdl:fault name="MissingParameters">
+ <soap:fault name="MissingParameters" use="literal"/>
+ </wsdl:fault>
+ <wsdl:fault name="OperationFailed">
+ <soap:fault name="OperationFailed" use="literal"/>
+ </wsdl:fault>
+ </wsdl:operation>
+ </wsdl:binding>
+</wsdl:definitions>
Property changes on: modules/wsrp/trunk/producer/src/main/webapp/WEB-INF/wsdl/wsrp_v1_bindings.wsdl
___________________________________________________________________
Name: svn:executable
+ *
Added: modules/wsrp/trunk/producer/src/main/webapp/WEB-INF/wsdl/wsrp_v1_interfaces.wsdl
===================================================================
--- modules/wsrp/trunk/producer/src/main/webapp/WEB-INF/wsdl/wsrp_v1_interfaces.wsdl (rev 0)
+++ modules/wsrp/trunk/producer/src/main/webapp/WEB-INF/wsdl/wsrp_v1_interfaces.wsdl 2009-07-22 20:25:22 UTC (rev 13587)
@@ -0,0 +1,372 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ ~ JBoss, a division of Red Hat ~
+ ~ Copyright 2009, Red Hat Middleware, LLC, and individual
+ ~ contributors as indicated by the @authors tag. See the
+ ~ copyright.txt in the distribution for a full listing of
+ ~ individual contributors.
+ ~
+ ~ This is free software; you can redistribute it and/or modify it
+ ~ under the terms of the GNU Lesser General Public License as
+ ~ published by the Free Software Foundation; either version 2.1 of
+ ~ the License, or (at your option) any later version.
+ ~
+ ~ This software is distributed in the hope that it will be useful,
+ ~ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ ~ Lesser General Public License for more details.
+ ~
+ ~ You should have received a copy of the GNU Lesser General Public
+ ~ License along with this software; if not, write to the Free
+ ~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ ~ 02110-1301 USA, or see the FSF site: http://www.fsf.org. ~
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
+
+<wsdl:definitions targetNamespace="urn:oasis:names:tc:wsrp:v1:intf"
+ xmlns:types="urn:oasis:names:tc:wsrp:v1:types"
+ xmlns:intf="urn:oasis:names:tc:wsrp:v1:intf"
+
+ xmlns="http://schemas.xmlsoap.org/wsdl/"
+
+ xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ >
+
+ <!-- This file reflects v1.0 of the specification -->
+
+ <wsdl:types>
+ <schema targetNamespace="urn:oasis:names:tc:wsrp:v1:intf"
+ xmlns="http://www.w3.org/2001/XMLSchema"
+ elementFormDefault="qualified">
+
+ <import namespace="urn:oasis:names:tc:wsrp:v1:types" schemaLocation="wsrp_v1_types.xsd"/>
+
+ </schema>
+ </wsdl:types>
+
+
+ <!-- - - - - - - - - -->
+ <!-- fault messages -->
+ <!-- - - - - - - - - -->
+
+ <wsdl:message name="AccessDenied">
+ <wsdl:part name="fault" element="types:AccessDenied"/>
+ </wsdl:message>
+
+ <wsdl:message name="InvalidUserCategory">
+ <wsdl:part name="fault" element="types:InvalidUserCategory"/>
+ </wsdl:message>
+
+ <wsdl:message name="InconsistentParameters">
+ <wsdl:part name="fault" element="types:InconsistentParameters"/>
+ </wsdl:message>
+
+ <wsdl:message name="InvalidRegistration">
+ <wsdl:part name="fault" element="types:InvalidRegistration"/>
+ </wsdl:message>
+
+ <wsdl:message name="MissingParameters">
+ <wsdl:part name="fault" element="types:MissingParameters"/>
+ </wsdl:message>
+
+ <wsdl:message name="OperationFailed">
+ <wsdl:part name="fault" element="types:OperationFailed"/>
+ </wsdl:message>
+
+ <wsdl:message name="InvalidHandle">
+ <wsdl:part name="fault" element="types:InvalidHandle"/>
+ </wsdl:message>
+
+ <wsdl:message name="PortletStateChangeRequired">
+ <wsdl:part name="fault" element="types:PortletStateChangeRequired"/>
+ </wsdl:message>
+
+ <wsdl:message name="InvalidCookie">
+ <wsdl:part name="fault" element="types:InvalidCookie"/>
+ </wsdl:message>
+
+ <wsdl:message name="InvalidSession">
+ <wsdl:part name="fault" element="types:InvalidSession"/>
+ </wsdl:message>
+
+ <wsdl:message name="UnsupportedMode">
+ <wsdl:part name="fault" element="types:UnsupportedMode"/>
+ </wsdl:message>
+
+ <wsdl:message name="UnsupportedWindowState">
+ <wsdl:part name="fault" element="types:UnsupportedWindowState"/>
+ </wsdl:message>
+
+ <wsdl:message name="UnsupportedLocale">
+ <wsdl:part name="fault" element="types:UnsupportedLocale"/>
+ </wsdl:message>
+
+ <wsdl:message name="UnsupportedMimeType">
+ <wsdl:part name="fault" element="types:UnsupportedMimeType"/>
+ </wsdl:message>
+
+
+ <!-- - - - - - - - - - - -->
+ <!-- Operations messages -->
+ <!-- - - - - - - - - - - -->
+
+ <wsdl:message name="getMarkup">
+ <wsdl:part name="getMarkup" element="types:getMarkup"/>
+ </wsdl:message>
+ <wsdl:message name="getMarkupResponse">
+ <wsdl:part name="getMarkupResponse" element="types:getMarkupResponse"/>
+ </wsdl:message>
+
+ <wsdl:message name="performBlockingInteraction">
+ <wsdl:part name="performBlockingInteraction" element="types:performBlockingInteraction"/>
+ </wsdl:message>
+ <wsdl:message name="performBlockingInteractionResponse">
+ <wsdl:part name="performBlockingInteractionResponse" element="types:performBlockingInteractionResponse"/>
+ </wsdl:message>
+
+ <wsdl:message name="getServiceDescription">
+ <wsdl:part name="getServiceDescription" element="types:getServiceDescription"/>
+ </wsdl:message>
+ <wsdl:message name="getServiceDescriptionResponse">
+ <wsdl:part name="getServiceDescriptionResponse" element="types:getServiceDescriptionResponse"/>
+ </wsdl:message>
+
+ <wsdl:message name="register">
+ <wsdl:part name="register" element="types:register"/>
+ </wsdl:message>
+ <wsdl:message name="registerResponse">
+ <wsdl:part name="registerResponse" element="types:registerResponse"/>
+ </wsdl:message>
+
+ <wsdl:message name="deregister">
+ <wsdl:part name="deregister" element="types:deregister"/>
+ </wsdl:message>
+ <wsdl:message name="deregisterResponse">
+ <wsdl:part name="deregisterResponse" element="types:deregisterResponse"/>
+ </wsdl:message>
+
+ <wsdl:message name="modifyRegistration">
+ <wsdl:part name="modifyRegistration" element="types:modifyRegistration"/>
+ </wsdl:message>
+ <wsdl:message name="modifyRegistrationResponse">
+ <wsdl:part name="modifyRegistrationResponse" element="types:modifyRegistrationResponse"/>
+ </wsdl:message>
+
+ <wsdl:message name="getPortletDescription">
+ <wsdl:part name="getPortletDescription" element="types:getPortletDescription"/>
+ </wsdl:message>
+ <wsdl:message name="getPortletDescriptionResponse">
+ <wsdl:part name="getPortletDescriptionResponse" element="types:getPortletDescriptionResponse"/>
+ </wsdl:message>
+
+ <wsdl:message name="clonePortlet">
+ <wsdl:part name="clonePortlet" element="types:clonePortlet"/>
+ </wsdl:message>
+ <wsdl:message name="clonePortletResponse">
+ <wsdl:part name="clonePortletResponse" element="types:clonePortletResponse"/>
+ </wsdl:message>
+
+ <wsdl:message name="destroyPortlets">
+ <wsdl:part name="destroyPortlets" element="types:destroyPortlets"/>
+ </wsdl:message>
+ <wsdl:message name="destroyPortletsResponse">
+ <wsdl:part name="destroyPortletsResponse" element="types:destroyPortletsResponse"/>
+ </wsdl:message>
+
+ <wsdl:message name="setPortletProperties">
+ <wsdl:part name="setPortletProperties" element="types:setPortletProperties"/>
+ </wsdl:message>
+ <wsdl:message name="setPortletPropertiesResponse">
+ <wsdl:part name="setPortletPropertiesResponse" element="types:setPortletPropertiesResponse"/>
+ </wsdl:message>
+
+ <wsdl:message name="getPortletProperties">
+ <wsdl:part name="getPortletProperties" element="types:getPortletProperties"/>
+ </wsdl:message>
+ <wsdl:message name="getPortletPropertiesResponse">
+ <wsdl:part name="getPortletPropertiesResponse" element="types:getPortletPropertiesResponse"/>
+ </wsdl:message>
+
+ <wsdl:message name="getPortletPropertyDescription">
+ <wsdl:part name="getPortletPropertyDescription" element="types:getPortletPropertyDescription"/>
+ </wsdl:message>
+ <wsdl:message name="getPortletPropertyDescriptionResponse">
+ <wsdl:part name="getPortletPropertyDescriptionResponse" element="types:getPortletPropertyDescriptionResponse"/>
+ </wsdl:message>
+
+ <wsdl:message name="releaseSessions">
+ <wsdl:part name="releaseSessions" element="types:releaseSessions"/>
+ </wsdl:message>
+ <wsdl:message name="releaseSessionsResponse">
+ <wsdl:part name="releaseSessionsResponse" element="types:releaseSessionsResponse"/>
+ </wsdl:message>
+
+ <wsdl:message name="initCookie">
+ <wsdl:part name="initCookie" element="types:initCookie"/>
+ </wsdl:message>
+ <wsdl:message name="initCookieResponse">
+ <wsdl:part name="initCookieResponse" element="types:initCookieResponse"/>
+ </wsdl:message>
+
+ <wsdl:portType name="WSRP_v1_Markup_PortType">
+ <wsdl:operation name="getMarkup">
+ <wsdl:input message="intf:getMarkup" name="getMarkup"/>
+ <wsdl:output message="intf:getMarkupResponse" name="getMarkupResponse"/>
+ <wsdl:fault message="intf:AccessDenied" name="AccessDenied"/>
+ <wsdl:fault message="intf:InvalidUserCategory" name="InvalidUserCategory"/>
+ <wsdl:fault message="intf:InconsistentParameters" name="InconsistentParameters"/>
+ <wsdl:fault message="intf:InvalidRegistration" name="InvalidRegistration"/>
+ <wsdl:fault message="intf:MissingParameters" name="MissingParameters"/>
+ <wsdl:fault message="intf:OperationFailed" name="OperationFailed"/>
+ <wsdl:fault message="intf:InvalidHandle" name="InvalidHandle"/>
+ <wsdl:fault message="intf:InvalidCookie" name="InvalidCookie"/>
+ <wsdl:fault message="intf:InvalidSession" name="InvalidSession"/>
+ <wsdl:fault message="intf:UnsupportedMode" name="UnsupportedMode"/>
+ <wsdl:fault message="intf:UnsupportedWindowState" name="UnsupportedWindowState"/>
+ <wsdl:fault message="intf:UnsupportedLocale" name="UnsupportedLocale"/>
+ <wsdl:fault message="intf:UnsupportedMimeType" name="UnsupportedMimeType"/>
+ </wsdl:operation>
+
+ <wsdl:operation name="performBlockingInteraction">
+ <wsdl:input message="intf:performBlockingInteraction" name="performBlockingInteraction"/>
+ <wsdl:output message="intf:performBlockingInteractionResponse" name="performBlockingInteractionResponse"/>
+ <wsdl:fault message="intf:AccessDenied" name="AccessDenied"/>
+ <wsdl:fault message="intf:InvalidUserCategory" name="InvalidUserCategory"/>
+ <wsdl:fault message="intf:InconsistentParameters" name="InconsistentParameters"/>
+ <wsdl:fault message="intf:InvalidRegistration" name="InvalidRegistration"/>
+ <wsdl:fault message="intf:MissingParameters" name="MissingParameters"/>
+ <wsdl:fault message="intf:OperationFailed" name="OperationFailed"/>
+ <wsdl:fault message="intf:InvalidHandle" name="InvalidHandle"/>
+ <wsdl:fault message="intf:PortletStateChangeRequired" name="PortletStateChangeRequired"/>
+ <wsdl:fault message="intf:InvalidCookie" name="InvalidCookie"/>
+ <wsdl:fault message="intf:InvalidSession" name="InvalidSession"/>
+ <wsdl:fault message="intf:UnsupportedMode" name="UnsupportedMode"/>
+ <wsdl:fault message="intf:UnsupportedWindowState" name="UnsupportedWindowState"/>
+ <wsdl:fault message="intf:UnsupportedLocale" name="UnsupportedLocale"/>
+ <wsdl:fault message="intf:UnsupportedMimeType" name="UnsupportedMimeType"/>
+ </wsdl:operation>
+
+ <wsdl:operation name="releaseSessions">
+ <wsdl:input message="intf:releaseSessions" name="releaseSessions"/>
+ <wsdl:output message="intf:releaseSessionsResponse" name="releaseSessionsResponse"/>
+ <wsdl:fault message="intf:AccessDenied" name="AccessDenied"/>
+ <wsdl:fault message="intf:InvalidRegistration" name="InvalidRegistration"/>
+ <wsdl:fault message="intf:MissingParameters" name="MissingParameters"/>
+ <wsdl:fault message="intf:OperationFailed" name="OperationFailed"/>
+ </wsdl:operation>
+
+ <wsdl:operation name="initCookie">
+ <wsdl:input message="intf:initCookie" name="initCookie"/>
+ <wsdl:output message="intf:initCookieResponse" name="initCookieResponse"/>
+ <wsdl:fault message="intf:AccessDenied" name="AccessDenied"/>
+ <wsdl:fault message="intf:InvalidRegistration" name="InvalidRegistration"/>
+ <wsdl:fault message="intf:OperationFailed" name="OperationFailed"/>
+ </wsdl:operation>
+ </wsdl:portType>
+
+ <wsdl:portType name="WSRP_v1_ServiceDescription_PortType">
+ <wsdl:operation name="getServiceDescription">
+ <wsdl:input message="intf:getServiceDescription" name="getServiceDescription"/>
+ <wsdl:output message="intf:getServiceDescriptionResponse" name="getServiceDescriptionResponse"/>
+ <wsdl:fault message="intf:InvalidRegistration" name="InvalidRegistration"/>
+ <wsdl:fault message="intf:OperationFailed" name="OperationFailed"/>
+ </wsdl:operation>
+ </wsdl:portType>
+
+ <wsdl:portType name="WSRP_v1_Registration_PortType">
+ <wsdl:operation name="register">
+ <wsdl:input message="intf:register" name="register"/>
+ <wsdl:output message="intf:registerResponse" name="registerResponse"/>
+ <wsdl:fault message="intf:MissingParameters" name="MissingParameters"/>
+ <wsdl:fault message="intf:OperationFailed" name="OperationFailed"/>
+ </wsdl:operation>
+
+ <wsdl:operation name="deregister">
+ <wsdl:input message="intf:deregister" name="deregister"/>
+ <wsdl:output message="intf:deregisterResponse" name="deregisterResponse"/>
+ <wsdl:fault message="intf:InvalidRegistration" name="InvalidRegistration"/>
+ <wsdl:fault message="intf:OperationFailed" name="OperationFailed"/>
+ </wsdl:operation>
+
+ <wsdl:operation name="modifyRegistration">
+ <wsdl:input message="intf:modifyRegistration" name="modifyRegistration"/>
+ <wsdl:output message="intf:modifyRegistrationResponse" name="modifyRegistrationResponse"/>
+ <wsdl:fault message="intf:InvalidRegistration" name="InvalidRegistration"/>
+ <wsdl:fault message="intf:MissingParameters" name="MissingParameters"/>
+ <wsdl:fault message="intf:OperationFailed" name="OperationFailed"/>
+ </wsdl:operation>
+ </wsdl:portType>
+
+ <wsdl:portType name="WSRP_v1_PortletManagement_PortType">
+ <wsdl:operation name="getPortletDescription">
+ <wsdl:input message="intf:getPortletDescription" name="getPortletDescription"/>
+ <wsdl:output message="intf:getPortletDescriptionResponse" name="getPortletDescriptionResponse"/>
+ <wsdl:fault message="intf:AccessDenied" name="AccessDenied"/>
+ <wsdl:fault message="intf:InvalidUserCategory" name="InvalidUserCategory"/>
+ <wsdl:fault message="intf:InconsistentParameters" name="InconsistentParameters"/>
+ <wsdl:fault message="intf:InvalidRegistration" name="InvalidRegistration"/>
+ <wsdl:fault message="intf:MissingParameters" name="MissingParameters"/>
+ <wsdl:fault message="intf:OperationFailed" name="OperationFailed"/>
+ <wsdl:fault message="intf:InvalidHandle" name="InvalidHandle"/>
+ </wsdl:operation>
+
+ <wsdl:operation name="clonePortlet">
+ <wsdl:input message="intf:clonePortlet" name="clonePortlet"/>
+ <wsdl:output message="intf:clonePortletResponse" name="clonePortletResponse"/>
+ <wsdl:fault message="intf:AccessDenied" name="AccessDenied"/>
+ <wsdl:fault message="intf:InvalidUserCategory" name="InvalidUserCategory"/>
+ <wsdl:fault message="intf:InconsistentParameters" name="InconsistentParameters"/>
+ <wsdl:fault message="intf:InvalidRegistration" name="InvalidRegistration"/>
+ <wsdl:fault message="intf:MissingParameters" name="MissingParameters"/>
+ <wsdl:fault message="intf:OperationFailed" name="OperationFailed"/>
+ <wsdl:fault message="intf:InvalidHandle" name="InvalidHandle"/>
+ </wsdl:operation>
+
+ <wsdl:operation name="destroyPortlets">
+ <wsdl:input message="intf:destroyPortlets" name="destroyPortlets"/>
+ <wsdl:output message="intf:destroyPortletsResponse" name="destroyPortletsResponse"/>
+ <wsdl:fault message="intf:InconsistentParameters" name="InconsistentParameters"/>
+ <wsdl:fault message="intf:InvalidRegistration" name="InvalidRegistration"/>
+ <wsdl:fault message="intf:MissingParameters" name="MissingParameters"/>
+ <wsdl:fault message="intf:OperationFailed" name="OperationFailed"/>
+ </wsdl:operation>
+
+ <wsdl:operation name="setPortletProperties">
+ <wsdl:input message="intf:setPortletProperties" name="setPortletProperties"/>
+ <wsdl:output message="intf:setPortletPropertiesResponse" name="setPortletPropertiesResponse"/>
+ <wsdl:fault message="intf:AccessDenied" name="AccessDenied"/>
+ <wsdl:fault message="intf:InvalidUserCategory" name="InvalidUserCategory"/>
+ <wsdl:fault message="intf:InconsistentParameters" name="InconsistentParameters"/>
+ <wsdl:fault message="intf:InvalidRegistration" name="InvalidRegistration"/>
+ <wsdl:fault message="intf:MissingParameters" name="MissingParameters"/>
+ <wsdl:fault message="intf:OperationFailed" name="OperationFailed"/>
+ <wsdl:fault message="intf:InvalidHandle" name="InvalidHandle"/>
+ </wsdl:operation>
+
+ <wsdl:operation name="getPortletProperties">
+ <wsdl:input message="intf:getPortletProperties" name="getPortletProperties"/>
+ <wsdl:output message="intf:getPortletPropertiesResponse" name="getPortletPropertiesResponse"/>
+ <wsdl:fault message="intf:AccessDenied" name="AccessDenied"/>
+ <wsdl:fault message="intf:InvalidUserCategory" name="InvalidUserCategory"/>
+ <wsdl:fault message="intf:InconsistentParameters" name="InconsistentParameters"/>
+ <wsdl:fault message="intf:InvalidRegistration" name="InvalidRegistration"/>
+ <wsdl:fault message="intf:MissingParameters" name="MissingParameters"/>
+ <wsdl:fault message="intf:OperationFailed" name="OperationFailed"/>
+ <wsdl:fault message="intf:InvalidHandle" name="InvalidHandle"/>
+ </wsdl:operation>
+
+ <wsdl:operation name="getPortletPropertyDescription">
+ <wsdl:input message="intf:getPortletPropertyDescription" name="getPortletPropertyDescription"/>
+ <wsdl:output message="intf:getPortletPropertyDescriptionResponse"
+ name="getPortletPropertyDescriptionResponse"/>
+ <wsdl:fault message="intf:AccessDenied" name="AccessDenied"/>
+ <wsdl:fault message="intf:InvalidUserCategory" name="InvalidUserCategory"/>
+ <wsdl:fault message="intf:InconsistentParameters" name="InconsistentParameters"/>
+ <wsdl:fault message="intf:InvalidRegistration" name="InvalidRegistration"/>
+ <wsdl:fault message="intf:MissingParameters" name="MissingParameters"/>
+ <wsdl:fault message="intf:OperationFailed" name="OperationFailed"/>
+ <wsdl:fault message="intf:InvalidHandle" name="InvalidHandle"/>
+ </wsdl:operation>
+ </wsdl:portType>
+</wsdl:definitions>
Property changes on: modules/wsrp/trunk/producer/src/main/webapp/WEB-INF/wsdl/wsrp_v1_interfaces.wsdl
___________________________________________________________________
Name: svn:executable
+ *
Added: modules/wsrp/trunk/producer/src/main/webapp/WEB-INF/wsdl/wsrp_v1_types.xsd
===================================================================
--- modules/wsrp/trunk/producer/src/main/webapp/WEB-INF/wsdl/wsrp_v1_types.xsd (rev 0)
+++ modules/wsrp/trunk/producer/src/main/webapp/WEB-INF/wsdl/wsrp_v1_types.xsd 2009-07-22 20:25:22 UTC (rev 13587)
@@ -0,0 +1,878 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ ~ JBoss, a division of Red Hat ~
+ ~ Copyright 2009, Red Hat Middleware, LLC, and individual
+ ~ contributors as indicated by the @authors tag. See the
+ ~ copyright.txt in the distribution for a full listing of
+ ~ individual contributors.
+ ~
+ ~ This is free software; you can redistribute it and/or modify it
+ ~ under the terms of the GNU Lesser General Public License as
+ ~ published by the Free Software Foundation; either version 2.1 of
+ ~ the License, or (at your option) any later version.
+ ~
+ ~ This software is distributed in the hope that it will be useful,
+ ~ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ ~ Lesser General Public License for more details.
+ ~
+ ~ You should have received a copy of the GNU Lesser General Public
+ ~ License along with this software; if not, write to the Free
+ ~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ ~ 02110-1301 USA, or see the FSF site: http://www.fsf.org. ~
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
+
+<schema targetNamespace="urn:oasis:names:tc:wsrp:v1:types"
+ xmlns:types="urn:oasis:names:tc:wsrp:v1:types"
+
+ xmlns="http://www.w3.org/2001/XMLSchema"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+
+ elementFormDefault="qualified">
+
+ <!-- This file reflects v1.0 of the specification -->
+
+ <import namespace="http://www.w3.org/XML/1998/namespace" schemaLocation="http://www.w3.org/2001/xml.xsd"/>
+
+ <!-- - - - - - - - - - - - - - - - - -->
+ <!-- General types used throughout -->
+ <!-- - - - - - - - - - - - - - - - - -->
+
+ <!-- This definition matches the WSRP v1 specification, but is not used throughout the
+ rest of these definitions as not all stacks are able to handle restrictions on strings
+ -->
+ <simpleType name="Handle">
+ <restriction base="xsd:string">
+ <xsd:minLength value="1"/>
+ <xsd:maxLength value="255"/>
+ </restriction>
+ </simpleType>
+ <element name="Handle" type="types:Handle"/>
+
+ <!-- This definition matches the WSRP v1 specification, but is not used throughout the
+ rest of these definitions as not all stacks are able to handle restrictions on strings
+ -->
+ <simpleType name="ID">
+ <restriction base="xsd:string">
+ <xsd:minLength value="1"/>
+ <xsd:maxLength value="4096"/>
+ </restriction>
+ </simpleType>
+ <element name="ID" type="types:ID"/>
+
+ <!-- This definition matches the WSRP v1 specification, but is not used throughout the
+ rest of these definitions as not all stacks are able to handle restrictions on strings
+ -->
+ <simpleType name="Key">
+ <restriction base="xsd:string">
+ <xsd:minLength value="1"/>
+ <xsd:maxLength value="255"/>
+ </restriction>
+ </simpleType>
+ <element name="Key" type="types:Key"/>
+
+ <complexType name="Extension">
+ <sequence>
+ <!-- JBoss modification: added processContents="skip" to better process extensions. -->
+ <any namespace="##other" processContents="skip"/>
+ </sequence>
+ </complexType>
+
+ <complexType name="LocalizedString">
+ <sequence>
+ <element name="value" type="xsd:string"/>
+ </sequence>
+ <attribute ref="xml:lang" use="required"/>
+ <attribute name="resourceName" type="xsd:string"/>
+ </complexType>
+
+ <complexType name="ResourceList">
+ <sequence>
+ <element name="resources" type="types:Resource" maxOccurs="unbounded"/>
+ <element name="extensions" type="types:Extension" minOccurs="0" maxOccurs="unbounded"/>
+ </sequence>
+ </complexType>
+
+ <complexType name="Resource">
+ <sequence>
+ <element name="values" type="types:ResourceValue" maxOccurs="unbounded"/>
+ <element name="extensions" type="types:Extension" minOccurs="0" maxOccurs="unbounded"/>
+ </sequence>
+ <attribute name="resourceName" type="xsd:string" use="required"/>
+ </complexType>
+
+ <complexType name="ResourceValue">
+ <sequence>
+ <element name="value" type="xsd:string"/>
+ <element name="extensions" type="types:Extension" minOccurs="0" maxOccurs="unbounded"/>
+ </sequence>
+ <attribute ref="xml:lang" use="required"/>
+ </complexType>
+
+ <complexType name="StringArray">
+ <sequence>
+ <element name="String" type="xsd:string" minOccurs="0" maxOccurs="unbounded"/>
+ </sequence>
+ </complexType>
+ <element name="StringArray" type="types:StringArray"/>
+
+ <complexType name="NamedString">
+ <sequence>
+ <element name="value" type="xsd:string"/>
+ </sequence>
+ <attribute name="name" type="xsd:string" use="required"/>
+ </complexType>
+
+ <complexType name="NamedStringArray">
+ <sequence>
+ <element name="NamedString" type="types:NamedString" minOccurs="0" maxOccurs="unbounded"/>
+ </sequence>
+ </complexType>
+ <element name="NamedStringArray" type="types:NamedStringArray"/>
+
+ <!-- - - - - - - - - -->
+ <!-- Producer types -->
+ <!-- - - - - - - - - -->
+
+ <complexType name="RegistrationData">
+ <sequence>
+ <element name="consumerName" type="xsd:string"/>
+ <element name="consumerAgent" type="xsd:string"/>
+ <element name="methodGetSupported" type="xsd:boolean"/>
+ <element name="consumerModes" type="xsd:string" minOccurs="0" maxOccurs="unbounded"/>
+ <element name="consumerWindowStates" type="xsd:string" minOccurs="0" maxOccurs="unbounded"/>
+ <element name="consumerUserScopes" type="xsd:string" minOccurs="0" maxOccurs="unbounded"/>
+ <element name="customUserProfileData" type="xsd:string" minOccurs="0" maxOccurs="unbounded"/>
+ <element name="registrationProperties" type="types:Property" minOccurs="0" maxOccurs="unbounded"/>
+ <element name="extensions" type="types:Extension" minOccurs="0" maxOccurs="unbounded"/>
+ </sequence>
+ </complexType>
+ <element name="RegistrationData" type="types:RegistrationData"/>
+
+ <complexType name="RegistrationState">
+ <sequence>
+ <element name="registrationState" type="xsd:base64Binary" minOccurs="0"/>
+ <element name="extensions" type="types:Extension" minOccurs="0" maxOccurs="unbounded"/>
+ </sequence>
+ </complexType>
+ <element name="RegistrationState" type="types:RegistrationState"/>
+
+ <complexType name="RegistrationContext">
+ <sequence>
+ <!-- <element name="registrationHandle" type="types:Handle"/>
+ JAX-RPC RI doesn't handle restrictions on xsd:string
+ -->
+ <element name="registrationHandle" type="xsd:string"/>
+ <element name="registrationState" type="xsd:base64Binary" minOccurs="0"/>
+ <element name="extensions" type="types:Extension" minOccurs="0" maxOccurs="unbounded"/>
+ </sequence>
+ </complexType>
+ <element name="RegistrationContext" type="types:RegistrationContext"/>
+
+ <complexType name="SessionContext">
+ <sequence>
+ <element name="sessionID" type="xsd:string"/>
+ <element name="expires" type="xsd:int"/>
+ <element name="extensions" type="types:Extension" minOccurs="0" maxOccurs="unbounded"/>
+ </sequence>
+ </complexType>
+ <element name="SessionContext" type="types:SessionContext"/>
+
+ <complexType name="RuntimeContext">
+ <sequence>
+ <element name="userAuthentication" type="xsd:string"/>
+ <element name="portletInstanceKey" type="xsd:string" minOccurs="0"/>
+ <element name="namespacePrefix" type="xsd:string" minOccurs="0"/>
+ <element name="templates" type="types:Templates" minOccurs="0"/>
+ <element name="sessionID" type="xsd:string" minOccurs="0"/>
+ <element name="extensions" type="types:Extension" minOccurs="0" maxOccurs="unbounded"/>
+ </sequence>
+ </complexType>
+ <element name="RuntimeContext" type="types:RuntimeContext"/>
+
+ <complexType name="ItemDescription">
+ <sequence>
+ <element name="description" type="types:LocalizedString"/>
+ <element name="extensions" type="types:Extension" minOccurs="0" maxOccurs="unbounded"/>
+ </sequence>
+ <attribute name="itemName" type="xsd:string" use="required"/>
+ </complexType>
+
+ <simpleType name="CookieProtocol">
+ <restriction base="xsd:string">
+ <enumeration value="none"/>
+ <enumeration value="perUser"/>
+ <enumeration value="perGroup"/>
+ </restriction>
+ </simpleType>
+
+ <complexType name="ServiceDescription">
+ <sequence>
+ <element name="requiresRegistration" type="xsd:boolean"/>
+ <element name="offeredPortlets" type="types:PortletDescription" minOccurs="0" maxOccurs="unbounded"/>
+ <element name="userCategoryDescriptions" type="types:ItemDescription" minOccurs="0" maxOccurs="unbounded"/>
+ <element name="customUserProfileItemDescriptions" type="types:ItemDescription" minOccurs="0"
+ maxOccurs="unbounded"/>
+ <element name="customWindowStateDescriptions" type="types:ItemDescription" minOccurs="0"
+ maxOccurs="unbounded"/>
+ <element name="customModeDescriptions" type="types:ItemDescription" minOccurs="0" maxOccurs="unbounded"/>
+ <element name="requiresInitCookie" type="types:CookieProtocol" default="none" minOccurs="0"/>
+ <element name="registrationPropertyDescription" type="types:ModelDescription" minOccurs="0"/>
+ <element name="locales" type="xsd:string" minOccurs="0" maxOccurs="unbounded"/>
+ <element name="resourceList" type="types:ResourceList" minOccurs="0"/>
+ <element name="extensions" type="types:Extension" minOccurs="0" maxOccurs="unbounded"/>
+ </sequence>
+ </complexType>
+ <element name="ServiceDescription" type="types:ServiceDescription"/>
+
+
+ <!-- - - - - - - - - - - - - - - - - - - -->
+ <!-- Portlet types (metadata and runtime) -->
+ <!-- - - - - - - - - - - - - - - - - - - -->
+
+ <complexType name="MarkupType">
+ <sequence>
+ <element name="mimeType" type="xsd:string"/>
+ <element name="modes" type="xsd:string" maxOccurs="unbounded"/>
+ <element name="windowStates" type="xsd:string" maxOccurs="unbounded"/>
+ <element name="locales" type="xsd:string" minOccurs="0" maxOccurs="unbounded"/>
+ <element name="extensions" type="types:Extension" minOccurs="0" maxOccurs="unbounded"/>
+ </sequence>
+ </complexType>
+
+ <complexType name="PortletDescription">
+ <sequence>
+ <!-- <element name="portletHandle" type="types:Handle"/> -->
+ <element name="portletHandle" type="xsd:string"/>
+ <element name="markupTypes" type="types:MarkupType" maxOccurs="unbounded"/>
+ <element name="groupID" type="xsd:string" minOccurs="0"/>
+ <element name="description" type="types:LocalizedString" minOccurs="0"/>
+ <element name="shortTitle" type="types:LocalizedString" minOccurs="0"/>
+ <element name="title" type="types:LocalizedString" minOccurs="0"/>
+ <element name="displayName" type="types:LocalizedString" minOccurs="0"/>
+ <element name="keywords" type="types:LocalizedString" minOccurs="0" maxOccurs="unbounded"/>
+ <element name="userCategories" type="xsd:string" minOccurs="0" maxOccurs="unbounded"/>
+ <element name="userProfileItems" type="xsd:string" minOccurs="0" maxOccurs="unbounded"/>
+ <element name="usesMethodGet" type="xsd:boolean" default="false" minOccurs="0"/>
+ <element name="defaultMarkupSecure" type="xsd:boolean" default="false" minOccurs="0"/>
+ <element name="onlySecure" type="xsd:boolean" default="false" minOccurs="0"/>
+ <element name="userContextStoredInSession" type="xsd:boolean" default="false" minOccurs="0"/>
+ <element name="templatesStoredInSession" type="xsd:boolean" default="false" minOccurs="0"/>
+ <element name="hasUserSpecificState" type="xsd:boolean" default="false" minOccurs="0"/>
+ <element name="doesUrlTemplateProcessing" type="xsd:boolean" default="false" minOccurs="0"/>
+ <element name="extensions" type="types:Extension" minOccurs="0" maxOccurs="unbounded"/>
+ </sequence>
+ </complexType>
+
+ <complexType name="PortletDescriptionResponse">
+ <sequence>
+ <element name="portletDescription" type="types:PortletDescription"/>
+ <element name="resourceList" type="types:ResourceList" minOccurs="0"/>
+ <element name="extensions" type="types:Extension" minOccurs="0" maxOccurs="unbounded"/>
+ </sequence>
+ </complexType>
+
+ <complexType name="PortletContext">
+ <sequence>
+ <!-- <element name="portletHandle" type="types:Handle"/> -->
+ <element name="portletHandle" type="xsd:string"/>
+ <element name="portletState" type="xsd:base64Binary" minOccurs="0"/>
+ <element name="extensions" type="types:Extension" minOccurs="0" maxOccurs="unbounded"/>
+ </sequence>
+ </complexType>
+ <element name="PortletContext" type="types:PortletContext"/>
+
+ <complexType name="DestroyFailed">
+ <sequence>
+ <element name="portletHandle" type="xsd:string"/>
+ <element name="reason" type="xsd:string"/>
+ </sequence>
+ </complexType>
+
+ <!-- - - - - - - - - - - - -->
+ <!-- Markup oriented types -->
+ <!-- - - - - - - - - - - - -->
+
+ <complexType name="ClientData">
+ <sequence>
+ <element name="userAgent" type="xsd:string" minOccurs="0"/>
+ <element name="extensions" type="types:Extension" minOccurs="0" maxOccurs="unbounded"/>
+ </sequence>
+ </complexType>
+ <element name="ClientData" type="types:ClientData"/>
+
+ <complexType name="CacheControl">
+ <sequence>
+ <element name="expires" type="xsd:int"/>
+ <element name="userScope" type="xsd:string"/>
+ <element name="validateTag" type="xsd:string" minOccurs="0"/>
+ <element name="extensions" type="types:Extension" minOccurs="0" maxOccurs="unbounded"/>
+ </sequence>
+ </complexType>
+
+ <complexType name="Templates">
+ <sequence>
+ <element name="defaultTemplate" type="xsd:string" nillable="true"/>
+ <element name="blockingActionTemplate" type="xsd:string" minOccurs="0"/>
+ <element name="renderTemplate" type="xsd:string" minOccurs="0"/>
+ <element name="resourceTemplate" type="xsd:string" minOccurs="0"/>
+ <element name="secureDefaultTemplate" type="xsd:string" nillable="true"/>
+ <element name="secureBlockingActionTemplate" type="xsd:string" minOccurs="0"/>
+ <element name="secureRenderTemplate" type="xsd:string" minOccurs="0"/>
+ <element name="secureResourceTemplate" type="xsd:string" minOccurs="0"/>
+ <element name="extensions" type="types:Extension" minOccurs="0" maxOccurs="unbounded"/>
+ </sequence>
+ </complexType>
+ <element name="Templates" type="types:Templates"/>
+
+ <complexType name="MarkupParams">
+ <sequence>
+ <element name="secureClientCommunication" type="xsd:boolean"/>
+ <element name="locales" type="xsd:string" maxOccurs="unbounded"/>
+ <element name="mimeTypes" type="xsd:string" maxOccurs="unbounded"/>
+ <element name="mode" type="xsd:string"/>
+ <element name="windowState" type="xsd:string"/>
+ <element name="clientData" type="types:ClientData" minOccurs="0"/>
+ <element name="navigationalState" type="xsd:string" minOccurs="0"/>
+ <element name="markupCharacterSets" type="xsd:string" minOccurs="0" maxOccurs="unbounded"/>
+ <element name="validateTag" type="xsd:string" minOccurs="0"/>
+ <element name="validNewModes" type="xsd:string" minOccurs="0" maxOccurs="unbounded"/>
+ <element name="validNewWindowStates" type="xsd:string" minOccurs="0" maxOccurs="unbounded"/>
+ <element name="extensions" type="types:Extension" minOccurs="0" maxOccurs="unbounded"/>
+ </sequence>
+ </complexType>
+ <element name="MarkupParams" type="types:MarkupParams"/>
+
+ <complexType name="MarkupResponse">
+ <sequence>
+ <element name="markupContext" type="types:MarkupContext"/>
+ <element name="sessionContext" type="types:SessionContext" minOccurs="0"/>
+ <element name="extensions" type="types:Extension" minOccurs="0" maxOccurs="unbounded"/>
+ </sequence>
+ </complexType>
+
+ <complexType name="MarkupContext">
+ <sequence>
+ <element name="useCachedMarkup" type="xsd:boolean" default="false" minOccurs="0"/>
+ <element name="mimeType" type="xsd:string" minOccurs="0"/>
+ <element name="markupString" type="xsd:string" minOccurs="0"/>
+ <element name="markupBinary" type="xsd:base64Binary" minOccurs="0"/>
+ <element name="locale" type="xsd:string" minOccurs="0"/>
+ <element name="requiresUrlRewriting" type="xsd:boolean" default="false" minOccurs="0"/>
+ <element name="cacheControl" type="types:CacheControl" minOccurs="0"/>
+ <element name="preferredTitle" type="xsd:string" minOccurs="0"/>
+ <element name="extensions" type="types:Extension" minOccurs="0" maxOccurs="unbounded"/>
+ </sequence>
+ </complexType>
+
+ <!-- - - - - - - - - - - - - - - -->
+ <!-- Interaction oriented types -->
+ <!-- - - - - - - - - - - - - - - -->
+
+ <simpleType name="StateChange">
+ <restriction base="xsd:string">
+ <enumeration value="readWrite"/>
+ <enumeration value="cloneBeforeWrite"/>
+ <enumeration value="readOnly"/>
+ </restriction>
+ </simpleType>
+
+ <complexType name="UploadContext">
+ <sequence>
+ <element name="mimeType" type="xsd:string"/>
+ <element name="uploadData" type="xsd:base64Binary"/>
+ <element name="mimeAttributes" type="types:NamedString" minOccurs="0" maxOccurs="unbounded"/>
+ <element name="extensions" type="types:Extension" minOccurs="0" maxOccurs="unbounded"/>
+ </sequence>
+ </complexType>
+
+ <complexType name="InteractionParams">
+ <sequence>
+ <element name="portletStateChange" type="types:StateChange"/>
+ <element name="interactionState" type="xsd:string" minOccurs="0"/>
+ <element name="formParameters" type="types:NamedString" minOccurs="0" maxOccurs="unbounded"/>
+ <element name="uploadContexts" type="types:UploadContext" minOccurs="0" maxOccurs="unbounded"/>
+ <element name="extensions" type="types:Extension" minOccurs="0" maxOccurs="unbounded"/>
+ </sequence>
+ </complexType>
+ <element name="InteractionParams" type="types:InteractionParams"/>
+
+ <complexType name="UpdateResponse">
+ <sequence>
+ <element name="sessionContext" type="types:SessionContext" minOccurs="0"/>
+ <element name="portletContext" type="types:PortletContext" minOccurs="0"/>
+ <element name="markupContext" type="types:MarkupContext" minOccurs="0"/>
+ <element name="navigationalState" type="xsd:string" nillable="true"/>
+ <element name="newWindowState" type="xsd:string" minOccurs="0"/>
+ <element name="newMode" type="xsd:string" minOccurs="0"/>
+ </sequence>
+ </complexType>
+
+ <complexType name="BlockingInteractionResponse">
+ <sequence>
+ <!-- Would prefer this to be a choice ... Axis and JAX-RPC failed to handle that -->
+ <element name="updateResponse" type="types:UpdateResponse" minOccurs="0"/>
+ <element name="redirectURL" type="xsd:string" minOccurs="0"/>
+ <!-- end prefer this to be a choice -->
+ <element name="extensions" type="types:Extension" minOccurs="0" maxOccurs="unbounded"/>
+ </sequence>
+ </complexType>
+ <element name="BlockingInteractionResponse" type="types:BlockingInteractionResponse"/>
+
+ <!-- - - - - - - - - - - -->
+ <!-- User Profile types -->
+ <!-- - - - - - - - - - - -->
+
+ <complexType name="Postal">
+ <sequence>
+ <element name="name" type="xsd:string" minOccurs="0"/>
+ <element name="street" type="xsd:string" minOccurs="0"/>
+ <element name="city" type="xsd:string" minOccurs="0"/>
+ <element name="stateprov" type="xsd:string" minOccurs="0"/>
+ <element name="postalcode" type="xsd:string" minOccurs="0"/>
+ <element name="country" type="xsd:string" minOccurs="0"/>
+ <element name="organization" type="xsd:string" minOccurs="0"/>
+ <element name="extensions" type="types:Extension" minOccurs="0" maxOccurs="unbounded"/>
+ </sequence>
+ </complexType>
+
+ <complexType name="TelephoneNum">
+ <sequence>
+ <element name="intcode" type="xsd:string" minOccurs="0"/>
+ <element name="loccode" type="xsd:string" minOccurs="0"/>
+ <element name="number" type="xsd:string" minOccurs="0"/>
+ <element name="ext" type="xsd:string" minOccurs="0"/>
+ <element name="comment" type="xsd:string" minOccurs="0"/>
+ <element name="extensions" type="types:Extension" minOccurs="0" maxOccurs="unbounded"/>
+ </sequence>
+ </complexType>
+
+ <complexType name="Telecom">
+ <sequence>
+ <element name="telephone" type="types:TelephoneNum" minOccurs="0"/>
+ <element name="fax" type="types:TelephoneNum" minOccurs="0"/>
+ <element name="mobile" type="types:TelephoneNum" minOccurs="0"/>
+ <element name="pager" type="types:TelephoneNum" minOccurs="0"/>
+ <element name="extensions" type="types:Extension" minOccurs="0" maxOccurs="unbounded"/>
+ </sequence>
+ </complexType>
+
+ <complexType name="Online">
+ <sequence>
+ <element name="email" type="xsd:string" minOccurs="0"/>
+ <element name="uri" type="xsd:string" minOccurs="0"/>
+ <element name="extensions" type="types:Extension" minOccurs="0" maxOccurs="unbounded"/>
+ </sequence>
+ </complexType>
+
+ <complexType name="Contact">
+ <sequence>
+ <element name="postal" type="types:Postal" minOccurs="0"/>
+ <element name="telecom" type="types:Telecom" minOccurs="0"/>
+ <element name="online" type="types:Online" minOccurs="0"/>
+ <element name="extensions" type="types:Extension" minOccurs="0" maxOccurs="unbounded"/>
+ </sequence>
+ </complexType>
+ <element name="Contact" type="types:Contact"/>
+
+ <complexType name="EmployerInfo">
+ <sequence>
+ <element name="employer" type="xsd:string" minOccurs="0"/>
+ <element name="department" type="xsd:string" minOccurs="0"/>
+ <element name="jobtitle" type="xsd:string" minOccurs="0"/>
+ <element name="extensions" type="types:Extension" minOccurs="0" maxOccurs="unbounded"/>
+ </sequence>
+ </complexType>
+
+ <complexType name="PersonName">
+ <sequence>
+ <element name="prefix" type="xsd:string" minOccurs="0"/>
+ <element name="given" type="xsd:string" minOccurs="0"/>
+ <element name="family" type="xsd:string" minOccurs="0"/>
+ <element name="middle" type="xsd:string" minOccurs="0"/>
+ <element name="suffix" type="xsd:string" minOccurs="0"/>
+ <element name="nickname" type="xsd:string" minOccurs="0"/>
+ <element name="extensions" type="types:Extension" minOccurs="0" maxOccurs="unbounded"/>
+ </sequence>
+ </complexType>
+
+ <complexType name="UserProfile">
+ <sequence>
+ <element name="name" type="types:PersonName" minOccurs="0"/>
+ <element name="bdate" type="xsd:dateTime" minOccurs="0"/>
+ <element name="gender" type="xsd:string" minOccurs="0"/>
+ <element name="employerInfo" type="types:EmployerInfo" minOccurs="0"/>
+ <element name="homeInfo" type="types:Contact" minOccurs="0"/>
+ <element name="businessInfo" type="types:Contact" minOccurs="0"/>
+ <element name="extensions" type="types:Extension" minOccurs="0" maxOccurs="unbounded"/>
+ </sequence>
+ </complexType>
+
+ <complexType name="UserContext">
+ <sequence>
+ <element name="userContextKey" type="xsd:string"/>
+ <element name="userCategories" type="xsd:string" minOccurs="0" maxOccurs="unbounded"/>
+ <element name="profile" type="types:UserProfile" minOccurs="0"/>
+ <element name="extensions" type="types:Extension" minOccurs="0" maxOccurs="unbounded"/>
+ </sequence>
+ </complexType>
+ <element name="UserContext" type="types:UserContext"/>
+
+ <!-- - - - - - - - - -->
+ <!-- Property types -->
+ <!-- - - - - - - - - -->
+
+ <complexType name="Property">
+ <sequence>
+ <!-- Would prefer this to be a choice ... Axis and JAX-RPC failed to handle that -->
+ <element name="stringValue" type="xsd:string" minOccurs="0"/>
+ <!-- JBoss modification: added processContents="skip" to better process extensions. -->
+ <any namespace="##other" minOccurs="0" maxOccurs="unbounded" processContents="skip"/>
+ <!-- end prefer this to be a choice -->
+ </sequence>
+ <attribute name="name" type="xsd:string" use="required"/>
+ <attribute ref="xml:lang"/>
+ </complexType>
+
+ <complexType name="ResetProperty">
+ <sequence/>
+ <attribute name="name" type="xsd:string" use="required"/>
+ </complexType>
+
+ <complexType name="PropertyList">
+ <sequence>
+ <element name="properties" type="types:Property" minOccurs="0" maxOccurs="unbounded"/>
+ <element name="resetProperties" type="types:ResetProperty" minOccurs="0" maxOccurs="unbounded"/>
+ <element name="extensions" type="types:Extension" minOccurs="0" maxOccurs="unbounded"/>
+ </sequence>
+ </complexType>
+ <element name="PropertyList" type="types:PropertyList"/>
+
+ <complexType name="PropertyDescription">
+ <sequence>
+ <element name="label" type="types:LocalizedString" minOccurs="0"/>
+ <element name="hint" type="types:LocalizedString" minOccurs="0"/>
+ <element name="extensions" type="types:Extension" minOccurs="0" maxOccurs="unbounded"/>
+ </sequence>
+ <attribute name="name" type="xsd:string" use="required"/>
+ <attribute name="type" type="xsd:QName" use="required"/>
+ </complexType>
+
+ <complexType name="ModelTypes">
+ <sequence>
+ <!-- JBoss modification: added processContents="skip" to better process extensions. -->
+ <any namespace="##other" processContents="skip"/>
+ </sequence>
+ </complexType>
+
+ <complexType name="ModelDescription">
+ <sequence>
+ <element name="propertyDescriptions" type="types:PropertyDescription" minOccurs="0" maxOccurs="unbounded"/>
+ <element name="modelTypes" type="types:ModelTypes" minOccurs="0"/>
+ <element name="extensions" type="types:Extension" minOccurs="0" maxOccurs="unbounded"/>
+ </sequence>
+ </complexType>
+ <element name="ModelDescription" type="types:ModelDescription"/>
+
+ <complexType name="PortletPropertyDescriptionResponse">
+ <sequence>
+ <element name="modelDescription" type="types:ModelDescription" minOccurs="0"/>
+ <element name="resourceList" type="types:ResourceList" minOccurs="0"/>
+ <element name="extensions" type="types:Extension" minOccurs="0" maxOccurs="unbounded"/>
+ </sequence>
+ </complexType>
+
+ <!-- - - - - - - - - - - - - -->
+ <!-- operation message types -->
+ <!-- - - - - - - - - - - - - -->
+
+ <complexType name="ReturnAny">
+ <sequence>
+ <element name="extensions" type="types:Extension" minOccurs="0" maxOccurs="unbounded"/>
+ </sequence>
+ </complexType>
+
+ <element name="getMarkup">
+ <complexType>
+ <sequence>
+ <element name="registrationContext" type="types:RegistrationContext" nillable="true"/>
+ <element name="portletContext" type="types:PortletContext"/>
+ <element name="runtimeContext" type="types:RuntimeContext"/>
+ <element name="userContext" type="types:UserContext" nillable="true"/>
+ <element name="markupParams" type="types:MarkupParams"/>
+ </sequence>
+ </complexType>
+ </element>
+ <element name="getMarkupResponse" type="types:MarkupResponse"/>
+
+ <element name="performBlockingInteraction">
+ <complexType>
+ <sequence>
+ <element name="registrationContext" type="types:RegistrationContext" nillable="true"/>
+ <element name="portletContext" type="types:PortletContext"/>
+ <element name="runtimeContext" type="types:RuntimeContext"/>
+ <element name="userContext" type="types:UserContext" nillable="true"/>
+ <element name="markupParams" type="types:MarkupParams"/>
+ <element name="interactionParams" type="types:InteractionParams"/>
+ </sequence>
+ </complexType>
+ </element>
+ <element name="performBlockingInteractionResponse" type="types:BlockingInteractionResponse"/>
+
+ <element name="getServiceDescription">
+ <complexType>
+ <sequence>
+ <element name="registrationContext" type="types:RegistrationContext" nillable="true"/>
+ <element name="desiredLocales" type="xsd:string" minOccurs="0" maxOccurs="unbounded"/>
+ </sequence>
+ </complexType>
+ </element>
+ <element name="getServiceDescriptionResponse" type="types:ServiceDescription"/>
+
+ <element name="register" type="types:RegistrationData"/>
+ <element name="registerResponse" type="types:RegistrationContext"/>
+
+ <element name="deregister" type="types:RegistrationContext"/>
+ <element name="deregisterResponse" type="types:ReturnAny"/>
+
+ <element name="modifyRegistration">
+ <complexType>
+ <sequence>
+ <element name="registrationContext" type="types:RegistrationContext" nillable="true"/>
+ <element name="registrationData" type="types:RegistrationData"/>
+ </sequence>
+ </complexType>
+ </element>
+ <element name="modifyRegistrationResponse" type="types:RegistrationState"/>
+
+ <element name="getPortletDescription">
+ <complexType>
+ <sequence>
+ <element name="registrationContext" type="types:RegistrationContext" nillable="true"/>
+ <element name="portletContext" type="types:PortletContext"/>
+ <element name="userContext" type="types:UserContext" nillable="true"/>
+ <element name="desiredLocales" type="xsd:string" minOccurs="0" maxOccurs="unbounded"/>
+ </sequence>
+ </complexType>
+ </element>
+ <element name="getPortletDescriptionResponse" type="types:PortletDescriptionResponse"/>
+
+ <element name="clonePortlet">
+ <complexType>
+ <sequence>
+ <element name="registrationContext" type="types:RegistrationContext" nillable="true"/>
+ <element name="portletContext" type="types:PortletContext"/>
+ <element name="userContext" type="types:UserContext" nillable="true"/>
+ </sequence>
+ </complexType>
+ </element>
+ <element name="clonePortletResponse" type="types:PortletContext"/>
+
+ <element name="destroyPortlets">
+ <complexType>
+ <sequence>
+ <element name="registrationContext" type="types:RegistrationContext" nillable="true"/>
+ <element name="portletHandles" type="xsd:string" maxOccurs="unbounded"/>
+ </sequence>
+ </complexType>
+ </element>
+ <complexType name="DestroyPortletsResponse">
+ <sequence>
+ <element name="destroyFailed" type="types:DestroyFailed" minOccurs="0" maxOccurs="unbounded"/>
+ <element name="extensions" type="types:Extension" minOccurs="0" maxOccurs="unbounded"/>
+ </sequence>
+ </complexType>
+ <element name="destroyPortletsResponse" type="types:DestroyPortletsResponse"/>
+
+ <element name="setPortletProperties">
+ <complexType>
+ <sequence>
+ <element name="registrationContext" type="types:RegistrationContext" nillable="true"/>
+ <element name="portletContext" type="types:PortletContext"/>
+ <element name="userContext" type="types:UserContext" nillable="true"/>
+ <element name="propertyList" type="types:PropertyList"/>
+ </sequence>
+ </complexType>
+ </element>
+ <element name="setPortletPropertiesResponse" type="types:PortletContext"/>
+
+ <element name="getPortletProperties">
+ <complexType>
+ <sequence>
+ <element name="registrationContext" type="types:RegistrationContext" nillable="true"/>
+ <element name="portletContext" type="types:PortletContext"/>
+ <element name="userContext" type="types:UserContext" nillable="true"/>
+ <element name="names" type="xsd:string" nillable="true" maxOccurs="unbounded"/>
+ </sequence>
+ </complexType>
+ </element>
+ <element name="getPortletPropertiesResponse" type="types:PropertyList"/>
+
+ <element name="getPortletPropertyDescription">
+ <complexType>
+ <sequence>
+ <element name="registrationContext" type="types:RegistrationContext" nillable="true"/>
+ <element name="portletContext" type="types:PortletContext"/>
+ <element name="userContext" type="types:UserContext" nillable="true"/>
+ <element name="desiredLocales" type="xsd:string" minOccurs="0" maxOccurs="unbounded"/>
+ </sequence>
+ </complexType>
+ </element>
+ <element name="getPortletPropertyDescriptionResponse" type="types:PortletPropertyDescriptionResponse"/>
+
+ <element name="releaseSessions">
+ <complexType>
+ <sequence>
+ <element name="registrationContext" type="types:RegistrationContext" nillable="true"/>
+ <element name="sessionIDs" type="xsd:string" maxOccurs="unbounded"/>
+ </sequence>
+ </complexType>
+ </element>
+ <element name="releaseSessionsResponse" type="types:ReturnAny"/>
+
+ <element name="initCookie">
+ <complexType>
+ <sequence>
+ <element name="registrationContext" type="types:RegistrationContext" nillable="true"/>
+ </sequence>
+ </complexType>
+ </element>
+ <element name="initCookieResponse" type="types:ReturnAny"/>
+
+ <!-- - - - - - - -->
+ <!-- fault types -->
+ <!-- - - - - - - -->
+
+ <complexType name="Fault">
+ <sequence/>
+ </complexType>
+
+ <complexType name="AccessDeniedFault">
+ <complexContent>
+ <extension base="types:Fault">
+ <sequence/>
+ </extension>
+ </complexContent>
+ </complexType>
+ <element name="AccessDenied" type="types:AccessDeniedFault"/>
+
+ <complexType name="InconsistentParametersFault">
+ <complexContent>
+ <extension base="types:Fault">
+ <sequence/>
+ </extension>
+ </complexContent>
+ </complexType>
+ <element name="InconsistentParameters" type="types:InconsistentParametersFault"/>
+
+ <complexType name="InvalidRegistrationFault">
+ <complexContent>
+ <extension base="types:Fault">
+ <sequence/>
+ </extension>
+ </complexContent>
+ </complexType>
+ <element name="InvalidRegistration" type="types:InvalidRegistrationFault"/>
+
+ <complexType name="MissingParametersFault">
+ <complexContent>
+ <extension base="types:Fault">
+ <sequence/>
+ </extension>
+ </complexContent>
+ </complexType>
+ <element name="MissingParameters" type="types:MissingParametersFault"/>
+
+ <complexType name="OperationFailedFault">
+ <complexContent>
+ <extension base="types:Fault">
+ <sequence/>
+ </extension>
+ </complexContent>
+ </complexType>
+ <element name="OperationFailed" type="types:OperationFailedFault"/>
+
+ <complexType name="InvalidHandleFault">
+ <complexContent>
+ <extension base="types:Fault">
+ <sequence/>
+ </extension>
+ </complexContent>
+ </complexType>
+ <element name="InvalidHandle" type="types:InvalidHandleFault"/>
+
+ <complexType name="InvalidUserCategoryFault">
+ <complexContent>
+ <extension base="types:Fault">
+ <sequence/>
+ </extension>
+ </complexContent>
+ </complexType>
+ <element name="InvalidUserCategory" type="types:InvalidUserCategoryFault"/>
+
+ <complexType name="PortletStateChangeRequiredFault">
+ <complexContent>
+ <extension base="types:Fault">
+ <sequence/>
+ </extension>
+ </complexContent>
+ </complexType>
+
+ <element name="PortletStateChangeRequired" type="types:PortletStateChangeRequiredFault"/>
+
+ <complexType name="InvalidCookieFault">
+ <complexContent>
+ <extension base="types:Fault">
+ <sequence/>
+ </extension>
+ </complexContent>
+ </complexType>
+
+ <element name="InvalidCookie" type="types:InvalidCookieFault"/>
+
+ <complexType name="InvalidSessionFault">
+ <complexContent>
+ <extension base="types:Fault">
+ <sequence/>
+ </extension>
+ </complexContent>
+ </complexType>
+
+ <element name="InvalidSession" type="types:InvalidSessionFault"/>
+
+ <complexType name="UnsupportedModeFault">
+ <complexContent>
+ <extension base="types:Fault">
+ <sequence/>
+ </extension>
+ </complexContent>
+ </complexType>
+ <element name="UnsupportedMode" type="types:UnsupportedModeFault"/>
+
+ <complexType name="UnsupportedWindowStateFault">
+ <complexContent>
+ <extension base="types:Fault">
+ <sequence/>
+ </extension>
+ </complexContent>
+ </complexType>
+ <element name="UnsupportedWindowState" type="types:UnsupportedWindowStateFault"/>
+
+ <complexType name="UnsupportedLocaleFault">
+ <complexContent>
+ <extension base="types:Fault">
+ <sequence/>
+ </extension>
+ </complexContent>
+ </complexType>
+ <element name="UnsupportedLocale" type="types:UnsupportedLocaleFault"/>
+
+ <complexType name="UnsupportedMimeTypeFault">
+ <complexContent>
+ <extension base="types:Fault">
+ <sequence/>
+ </extension>
+ </complexContent>
+ </complexType>
+ <element name="UnsupportedMimeType" type="types:UnsupportedMimeTypeFault"/>
+</schema>
Property changes on: modules/wsrp/trunk/producer/src/main/webapp/WEB-INF/wsdl/wsrp_v1_types.xsd
___________________________________________________________________
Name: svn:executable
+ *
Modified: modules/wsrp/trunk/service/pom.xml
===================================================================
--- modules/wsrp/trunk/service/pom.xml 2009-07-22 13:28:29 UTC (rev 13586)
+++ modules/wsrp/trunk/service/pom.xml 2009-07-22 20:25:22 UTC (rev 13587)
@@ -61,13 +61,12 @@
</artifactItem>
<artifactItem>
<groupId>org.jboss.portal.wsrp</groupId>
- <artifactId>wsrp-core</artifactId>
- <classifier>client</classifier>
+ <artifactId>producer</artifactId>
<version>${project.version}</version>
</artifactItem>
<artifactItem>
<groupId>org.jboss.portal.wsrp</groupId>
- <artifactId>wsrp-core</artifactId>
+ <artifactId>producer</artifactId>
<type>war</type>
<classifier>server</classifier>
<version>${project.version}</version>
@@ -105,10 +104,65 @@
<version>1.0.0-SNAPSHOT</version>
</artifactItem>
<artifactItem>
+ <groupId>org.jboss.portal.wsrp</groupId>
+ <artifactId>producer</artifactId>
+ <version>${project.version}</version>
+ </artifactItem>
+ <artifactItem>
<groupId>org.jboss.portal.jems</groupId>
<artifactId>jems</artifactId>
<version>1.0.0-SNAPSHOT</version>
</artifactItem>
+ <artifactItem>
+ <groupId>org.jboss.portal.common</groupId>
+ <artifactId>common-common</artifactId>
+ <version>${version.common}</version>
+ </artifactItem>
+ <artifactItem>
+ <groupId>org.jboss.portal.common</groupId>
+ <artifactId>common-portal</artifactId>
+ <version>${version.common}</version>
+ </artifactItem>
+ <artifactItem>
+ <groupId>org.jboss.portal.portlet</groupId>
+ <artifactId>portlet-portlet</artifactId>
+ <version>${version.portlet}</version>
+ </artifactItem>
+ <artifactItem>
+ <groupId>org.jboss.portal.portlet</groupId>
+ <artifactId>portlet-mc</artifactId>
+ <version>${version.portlet}</version>
+ </artifactItem>
+ <artifactItem>
+ <groupId>org.jboss.portal.web</groupId>
+ <artifactId>web-web</artifactId>
+ <version>${version.web}</version>
+ </artifactItem>
+ <artifactItem>
+ <groupId>org.jboss</groupId>
+ <artifactId>jbossxb</artifactId>
+ <version>${version.jbossxb}</version>
+ </artifactItem>
+ <artifactItem>
+ <groupId>javax.ccpp</groupId>
+ <artifactId>ccpp</artifactId>
+ <version>1.0</version>
+ </artifactItem>
+ <artifactItem>
+ <groupId>org.hibernate</groupId>
+ <artifactId>hibernate-core</artifactId>
+ <version>3.3.2.GA</version>
+ </artifactItem>
+ <artifactItem>
+ <groupId>org.hibernate</groupId>
+ <artifactId>hibernate-ehcache</artifactId>
+ <version>3.3.2.GA</version>
+ </artifactItem>
+ <artifactItem>
+ <groupId>net.sf.ehcache</groupId>
+ <artifactId>ehcache</artifactId>
+ <version>1.3.0</version>
+ </artifactItem>
</artifactItems>
<outputDirectory>${project.build.outputDirectory}/lib</outputDirectory>
</configuration>
Modified: modules/wsrp/trunk/service/src/main/resources/META-INF/jboss-service.xml
===================================================================
--- modules/wsrp/trunk/service/src/main/resources/META-INF/jboss-service.xml 2009-07-22 13:28:29 UTC (rev 13586)
+++ modules/wsrp/trunk/service/src/main/resources/META-INF/jboss-service.xml 2009-07-22 20:25:22 UTC (rev 13587)
@@ -23,74 +23,230 @@
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
<server>
- <!-- WSRP Producer implementation -->
- <mbean
- code="org.jboss.portal.wsrp.producer.WSRPProducerImpl"
- name="portal.wsrp:service=WSRPProducer"
- xmbean-dd=""
- xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
+
+ <!-- Override server classes: see http://www.jboss.org/community/wiki/ClassLoadingConfiguration -->
+ <loader-repository>
+ org.jboss:archive=jbossxb
+ <loader-repository-config>java2ParentDelegation=false</loader-repository-config>
+ </loader-repository>
+
+ <!-- **** Portlet application registry beans -->
+
+ <!-- Default servlet container (should ideally be obtained from a ServletContainerFactory but directly instantiated here) -->
+ <mbean code="org.jboss.portal.web.impl.DefaultServletContainer"
+ name="portletcontainer:service=ServletContainer" xmbean-dd=""
+ xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
<xmbean/>
- <depends optional-attribute-name="Invoker" proxy-type="attribute">portal:service=PortletInvoker,type=Producer
+ </mbean>
+
+ <mbean code="org.jboss.portal.web.impl.DefaultServletContainerFactory"
+ name="portletcontainer:service=ServletContainerFactory" xmbean-dd=""
+ xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
+ <xmbean/>
+ </mbean>
+
+ <!-- Portlet application registry -->
+ <mbean code="org.jboss.portal.portlet.mc.PortletApplicationDeployer"
+ name="portletcontainer:service=PortletApplicationRegistry" xmbean-dd=""
+ xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
+ <xmbean/>
+ <depends optional-attribute-name="ServletContainer" proxy-type="attribute">
+ portletcontainer:service=ServletContainer
</depends>
- <depends optional-attribute-name="RegistrationManager" proxy-type="attribute">
- portal.wsrp:service=RegistrationManager,type=Producer
+ <depends optional-attribute-name="ContainerPortletInvoker" proxy-type="attribute">
+ portletcontainer:service=PortletInvoker,type=Container
</depends>
- <depends optional-attribute-name="ProducerConfigurationService" proxy-type="attribute">
- portal.wsrp:service=ProducerConfiguration
+ </mbean>
+
+ <!-- **** Producer portlet invoker beans **** -->
+
+ <!-- Container stack -->
+ <mbean code="org.jboss.portal.portlet.aspects.portlet.ValveInterceptor"
+ name="portletcontainer:service=Interceptor,type=Portlet,name=Valve" xmbean-dd=""
+ xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
+ <xmbean/>
+ <!--<depends optional-attribute-name="PortletApplicationRegistry" proxy-type="attribute">
+ portletcontainer:service=PortletApplicationRegistry
</depends>
+ <depends optional-attribute-name="Next" proxy-type="attribute">
+ portletcontainer:service=Interceptor,type=Producer,name=SecureTransport
+ </depends>-->
</mbean>
+ <mbean code="org.jboss.portal.portlet.aspects.portlet.SecureTransportInterceptor"
+ name="portletcontainer:service=Interceptor,type=Producer,name=SecureTransport" xmbean-dd=""
+ xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
+ <xmbean/>
+ <!--<depends optional-attribute-name="Next" proxy-type="attribute">
+ portletcontainer:service=Interceptor,type=Producer,name=ContextDispatcher
+ </depends>-->
+ </mbean>
+ <mbean code="org.jboss.portal.portlet.aspects.portlet.ContextDispatcherInterceptor"
+ name="portletcontainer:service=Interceptor,type=Producer,name=ContextDispatcher" xmbean-dd=""
+ xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
+ <xmbean/>
+ <!--<depends optional-attribute-name="ServletContainerFactory" proxy-type="attribute">
+ portletcontainer:service=ServletContainerFactory
+ </depends>
+ <depends optional-attribute-name="Next" proxy-type="attribute">
+ portletcontainer:service=Interceptor,type=Producer,name=ProducerCache
+ </depends>-->
+ </mbean>
+ <mbean code="org.jboss.portal.portlet.aspects.portlet.ProducerCacheInterceptor"
+ name="portletcontainer:service=Interceptor,type=Producer,name=ProducerCache" xmbean-dd=""
+ xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
+ <xmbean/>
+ <!--<depends optional-attribute-name="Next" proxy-type="attribute">
+ portletcontainer:service=Interceptor,type=Producer,name=CCPP
+ </depends>-->
+ </mbean>
+ <mbean code="org.jboss.portal.portlet.aspects.portlet.CCPPInterceptor"
+ name="portletcontainer:service=Interceptor,type=Producer,name=CCPP" xmbean-dd=""
+ xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
+ <xmbean/>
+ <!--<depends optional-attribute-name="Next" proxy-type="attribute">
+ portletcontainer:service=Interceptor,type=Producer,name=RequestAttributeConversation
+ </depends>-->
+ </mbean>
+ <mbean code="org.jboss.portal.portlet.aspects.portlet.RequestAttributeConversationInterceptor"
+ name="portletcontainer:service=Interceptor,type=Producer,name=RequestAttributeConversation" xmbean-dd=""
+ xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
+ <xmbean/>
+ <!--<depends optional-attribute-name="Next" proxy-type="attribute">
+ portletcontainer:service=Interceptor,type=Producer,name=EventPayload
+ </depends>-->
+ </mbean>
+ <mbean code="org.jboss.portal.portlet.aspects.portlet.EventPayloadInterceptor"
+ name="portletcontainer:service=Interceptor,type=Producer,name=EventPayload" xmbean-dd=""
+ xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
+ <xmbean/>
+ <!--<depends optional-attribute-name="Next" proxy-type="attribute">
+ portletcontainer:service=Interceptor,type=Producer,name=PortletContainerDispatcher
+ </depends>-->
+ </mbean>
+ <mbean code="org.jboss.portal.portlet.container.ContainerPortletDispatcher"
+ name="portletcontainer:service=Interceptor,type=Producer,name=PortletContainerDispatcher" xmbean-dd=""
+ xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
+ <xmbean/>
+ </mbean>
- <!-- Registration manager -->
- <mbean code="org.jboss.portal.registration.impl.RegistrationManagerImpl"
- name="portal.wsrp:service=RegistrationManager,type=Producer" xmbean-dd=""
+ <mbean code="org.jboss.portal.wsrp.producer.interceptors.JBossPortletInterceptorStackFactory"
+ name="portletcontainer:service=InterceptorStackFactory,type=Producer" xmbean-dd=""
xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
<xmbean/>
- <depends optional-attribute-name="PersistenceManager" proxy-type="attribute">
- portal.wsrp:service=PersistenceManager
+ <depends-list optional-attribute-name="InterceptorNames">
+ <depends-list-element>portletcontainer:service=Interceptor,type=Portlet,name=Valve</depends-list-element>
+ <depends-list-element>portletcontainer:service=Interceptor,type=Producer,name=SecureTransport
+ </depends-list-element>
+ <depends-list-element>portletcontainer:service=Interceptor,type=Producer,name=ContextDispatcher
+ </depends-list-element>
+ <depends-list-element>portletcontainer:service=Interceptor,type=Producer,name=ProducerCache
+ </depends-list-element>
+ <depends-list-element>portletcontainer:service=Interceptor,type=Producer,name=CCPP</depends-list-element>
+ <depends-list-element>portletcontainer:service=Interceptor,type=Producer,name=RequestAttributeConversation
+ </depends-list-element>
+ <depends-list-element>portletcontainer:service=Interceptor,type=Producer,name=EventPayload
+ </depends-list-element>
+ <depends-list-element>portletcontainer:service=Interceptor,type=Producer,name=PortletContainerDispatcher
+ </depends-list-element>
+ </depends-list>
+ </mbean>
+
+ <!-- Portlet container invoker for producer invoker -->
+ <mbean code="org.jboss.portal.portlet.container.ContainerPortletInvoker"
+ name="portletcontainer:service=PortletInvoker,type=Container" xmbean-dd=""
+ xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
+ <xmbean/>
+ <depends optional-attribute-name="Next" proxy-type="attribute">
+ portletcontainer:service=Interceptor,type=Portlet,name=Valve
</depends>
+ <depends>portletcontainer:service=InterceptorStackFactory,type=Producer</depends>
</mbean>
- <!-- Persistence manager for registrations -->
- <mbean code="org.jboss.portal.core.impl.portlet.state.PersistentPortletStatePersistenceManager"
- name="portal.wsrp:service=PersistenceManager" xmbean-dd=""
+ <!-- State management policy for producer invoker -->
+ <mbean code="org.jboss.portal.portlet.impl.state.StateManagementPolicyService"
+ name="portletcontainer:service=StateManagementPolicy,type=Producer" xmbean-dd=""
xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
<xmbean/>
- <depends>portal:service=Hibernate,type=Portlet</depends>
- <attribute name="SessionFactoryJNDIName">java:/portal/PortletSessionFactory</attribute>
+ <attribute name="PersistLocally">true</attribute>
</mbean>
+ <!-- State converter for producer invoker -->
+ <mbean code="org.jboss.portal.portlet.impl.state.StateConverterV0"
+ name="portletcontainer:service=StateConverter,type=Producer"
+ xmbean-dd="" xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
+ <xmbean/>
+ </mbean>
+
+ <!-- State persistence manager for producer invoker -->
+ <mbean code="org.jboss.portal.wsrp.state.PersistentPortletStatePersistenceManager"
+ name="portletcontainer:service=PersistenceManager,type=Producer" xmbean-dd=""
+ xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
+ <xmbean/>
+ <depends>portletcontainer:service=Hibernate,type=Producer</depends>
+ <attribute name="SessionFactoryJNDIName">java:/portletcontainer/ProducerSessionFactory</attribute>
+ </mbean>
+
+ <!-- Producer invoker -->
+ <mbean code="org.jboss.portal.portlet.state.producer.ProducerPortletInvoker"
+ name="portletcontainer:service=PortletInvoker,type=Producer" xmbean-dd=""
+ xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
+ <xmbean/>
+ <depends optional-attribute-name="Next" proxy-type="attribute">
+ portletcontainer:service=PortletInvoker,type=Container
+ </depends>
+ <depends optional-attribute-name="PersistenceManager" proxy-type="attribute">
+ portletcontainer:service=PersistenceManager,type=Producer
+ </depends>
+ <depends optional-attribute-name="StateManagementPolicy" proxy-type="attribute">
+ portletcontainer:service=StateManagementPolicy,type=Producer
+ </depends>
+ <depends optional-attribute-name="StateConverter" proxy-type="attribute">
+ portletcontainer:service=StateConverter,type=Producer
+ </depends>
+ </mbean>
+
+ <!-- **** WSRP producer beans **** -->
+
<!-- Producer configuration service -->
<mbean code="org.jboss.portal.wsrp.producer.config.impl.ProducerConfigurationServiceImpl"
- name="portal.wsrp:service=ProducerConfiguration" xmbean-dd=""
+ name="portletcontainer.wsrp:service=ProducerConfiguration" xmbean-dd=""
xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
<xmbean/>
<attribute name="ConfigLocation">conf/producer/config.xml</attribute>
</mbean>
+ <!-- Registration manager for WSRP producer -->
+ <mbean code="org.jboss.portal.registration.impl.RegistrationManagerImpl"
+ name="portletcontainer.wsrp:service=RegistrationManager,type=Producer" xmbean-dd=""
+ xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
+ <xmbean/>
+ <depends optional-attribute-name="PersistenceManager" proxy-type="attribute">
+ portletcontainer:service=PersistenceManager,type=Producer
+ </depends>
+ </mbean>
+
+ <!-- WSRP Producer -->
<mbean
- code="org.jboss.portal.server.impl.xml.EntityResolverService"
- name="portal.wsrp:service=EntityResolver"
+ code="org.jboss.portal.wsrp.producer.WSRPProducerImpl"
+ name="portletcontainer.wsrp:service=WSRPProducer"
xmbean-dd=""
xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
<xmbean/>
- <attribute name="DTDMapping">
- <properties>
- <entry
- key="-//JBoss Portal//DTD WSRP Remote Producer Configuration 2.6//EN">
- dtd/jboss-wsrp-consumer_2_6.dtd
- </entry>
- <entry
- key="-//JBoss Portal//DTD WSRP Local Producer Configuration 2.6//EN">
- dtd/jboss-wsrp-producer_2_6.dtd
- </entry>
- <entry key="urn:jboss:portal:wsrp:consumer:v2_6">/xsd/jboss-wsrp-consumer_2_6.xsd</entry>
- <entry key="urn:jboss:portal:wsrp:producer:v2_6">/xsd/jboss-wsrp-consumer_2_6.xsd</entry>
- </properties>
- </attribute>
+ <depends optional-attribute-name="Invoker" proxy-type="attribute">
+ portletcontainer:service=PortletInvoker,type=Producer
+ </depends>
+ <depends optional-attribute-name="RegistrationManager" proxy-type="attribute">
+ portletcontainer.wsrp:service=RegistrationManager,type=Producer
+ </depends>
+ <depends optional-attribute-name="ProducerConfigurationService" proxy-type="attribute">
+ portletcontainer.wsrp:service=ProducerConfiguration
+ </depends>
</mbean>
+ <!-- **** Consumer beans **** -->
+
<!-- Deployer for *-wsrp.xml files. Deploys default-wsrp.xml which contains the 'self' consumer -->
- <mbean code="org.jboss.portal.wsrp.deployment.WSRPDeployer" name="portal.wsrp:service=WSRPDeployer">
+ <!--<mbean code="org.jboss.portal.wsrp.deployment.WSRPDeployer" name="portal.wsrp:service=WSRPDeployer">
<attribute name="DefaultWSRPLocation">default-wsrp.xml</attribute>
<depends>jboss.system:service=MainDeployer</depends>
<depends optional-attribute-name="ConsumerRegistry"
@@ -103,32 +259,67 @@
<mbean
code="org.jboss.portal.jems.hibernate.SessionFactoryBinder"
- name="portal:service=Hibernate,type=WSRPConsumer"
+ name="portletcontainer:service=Hibernate,type=WSRPConsumer"
xmbean-dd=""
xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
<xmbean/>
<depends>jboss.jca:service=DataSourceBinding,name=@portal.datasource.name@</depends>
- <!-- Uncomment in clustered mode : hibernate depends on its tree cache service @portal.single.xml.close@
+ <!– Uncomment in clustered mode : hibernate depends on its tree cache service @portal.single.xml.close@
<depends>portal:service=TreeCacheProvider,type=hibernate</depends>
- @portal.single.xml.open@ -->
+ @portal.single.xml.open@ –>
<attribute name="DoChecking">true</attribute>
<attribute name="ConfigLocation">conf/hibernate/consumer/hibernate.cfg.xml</attribute>
<attribute name="JNDIName">java:/portal/WSRPConsumerSessionFactory</attribute>
- </mbean>
+ </mbean>-->
<!-- Consumers registry for WSRP consumers -->
- <mbean code="org.jboss.portal.wsrp.consumer.ConsumerRegistryService"
+ <!--<mbean code="org.jboss.portal.wsrp.consumer.ConsumerRegistryService"
name="portal.wsrp:service=ConsumerRegistry"
xmbean-dd="" xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
<xmbean/>
- <depends>portal:service=Hibernate,type=WSRPConsumer</depends>
+ <depends>portletcontainer:service=Hibernate,type=WSRPConsumer</depends>
<attribute name="SessionFactoryJNDIName">java:/portal/WSRPConsumerSessionFactory</attribute>
<depends optional-attribute-name="FederatingPortletInvoker" proxy-type="attribute">
- portal:service=PortletInvoker,type=Federating
+ portletcontainer:service=PortletInvoker,type=Federating
</depends>
<depends optional-attribute-name="PortalEventListenerRegistry" proxy-type="attribute">
- portal:service=ListenerRegistry
+ portletcontainer:service=ListenerRegistry
</depends>
+ </mbean>-->
+
+ <!-- **** Other beans **** -->
+
+ <!-- Entity resolver -->
+ <!--<mbean
+ code="org.jboss.portal.server.impl.xml.EntityResolverService"
+ name="portal.wsrp:service=EntityResolver"
+ xmbean-dd=""
+ xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
+ <xmbean/>
+ <attribute name="DTDMapping">
+ <properties>
+ <entry
+ key="-//JBoss Portal//DTD WSRP Remote Producer Configuration 2.6//EN">
+ dtd/jboss-wsrp-consumer_2_6.dtd
+ </entry>
+ <entry
+ key="-//JBoss Portal//DTD WSRP Local Producer Configuration 2.6//EN">
+ dtd/jboss-wsrp-producer_2_6.dtd
+ </entry>
+ <entry key="urn:jboss:portal:wsrp:consumer:v2_6">/xsd/jboss-wsrp-consumer_2_6.xsd</entry>
+ <entry key="urn:jboss:portal:wsrp:producer:v2_6">/xsd/jboss-wsrp-consumer_2_6.xsd</entry>
+ </properties>
+ </attribute>
+ </mbean>-->
+
+ <!-- Hibernate session factory for persistence -->
+ <mbean code="org.jboss.portal.jems.hibernate.SessionFactoryBinder"
+ name="portletcontainer:service=Hibernate,type=Producer"
+ xmbean-dd="" xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
+ <xmbean/>
+ <depends>jboss.jca:service=DataSourceBinding,name=WSRPProducerDS</depends>
+ <attribute name="DoChecking">true</attribute>
+ <attribute name="ConfigLocation">conf/producer/hibernate/hibernate.cfg.xml</attribute>
+ <attribute name="JNDIName">java:/portletcontainer/ProducerSessionFactory</attribute>
</mbean>
-</server>
-
+</server>
\ No newline at end of file
Modified: modules/wsrp/trunk/test-support/pom.xml
===================================================================
--- modules/wsrp/trunk/test-support/pom.xml 2009-07-22 13:28:29 UTC (rev 13586)
+++ modules/wsrp/trunk/test-support/pom.xml 2009-07-22 20:25:22 UTC (rev 13587)
@@ -49,6 +49,19 @@
<groupId>org.jboss.portal.portlet</groupId>
<artifactId>portlet-portlet</artifactId>
<version>${version.portlet}</version>
+ <scope>provided</scope>
</dependency>
+ <dependency>
+ <groupId>org.jboss.portal.portlet</groupId>
+ <artifactId>portlet-federation</artifactId>
+ <version>${version.portlet}</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>javax.xml</groupId>
+ <artifactId>jaxrpc-api</artifactId>
+ <version>${version.jaxrpc}</version>
+ <scope>provided</scope>
+ </dependency>
</dependencies>
</project>
\ No newline at end of file
Modified: modules/wsrp/trunk/wsrp1-rpc/pom.xml
===================================================================
--- modules/wsrp/trunk/wsrp1-rpc/pom.xml 2009-07-22 13:28:29 UTC (rev 13586)
+++ modules/wsrp/trunk/wsrp1-rpc/pom.xml 2009-07-22 20:25:22 UTC (rev 13587)
@@ -39,6 +39,7 @@
<groupId>javax.xml</groupId>
<artifactId>jaxrpc-api</artifactId>
<version>${version.jaxrpc}</version>
+ <scope>provided</scope>
</dependency>
</dependencies>
14 years, 10 months
JBoss Portal SVN: r13586 - branches/Enterprise_Portal_Platform_4_3/core/src/main/org/jboss/portal/core/controller/portlet.
by portal-commits@lists.jboss.org
Author: thomas.heute(a)jboss.com
Date: 2009-07-22 09:28:29 -0400 (Wed, 22 Jul 2009)
New Revision: 13586
Modified:
branches/Enterprise_Portal_Platform_4_3/core/src/main/org/jboss/portal/core/controller/portlet/ControllerResponseFactory.java
Log:
JBEPP-92: Exception while calling removePublicRenderParameter on javax.portlet.actionResponse
[tentative fix, need proper testing]
Modified: branches/Enterprise_Portal_Platform_4_3/core/src/main/org/jboss/portal/core/controller/portlet/ControllerResponseFactory.java
===================================================================
--- branches/Enterprise_Portal_Platform_4_3/core/src/main/org/jboss/portal/core/controller/portlet/ControllerResponseFactory.java 2009-07-22 13:17:50 UTC (rev 13585)
+++ branches/Enterprise_Portal_Platform_4_3/core/src/main/org/jboss/portal/core/controller/portlet/ControllerResponseFactory.java 2009-07-22 13:28:29 UTC (rev 13586)
@@ -51,6 +51,7 @@
import java.io.ByteArrayInputStream;
import java.io.StringReader;
import java.util.HashMap;
+import java.util.Iterator;
import java.util.Map;
/**
@@ -94,8 +95,18 @@
Map<String, String[]> parameters = new HashMap<String, String[]>(stringMap);
- parameters.putAll(renderResult.getPublicNavigationalStateUpdates());
-
+ Map<String, String[]> test = renderResult.getPublicNavigationalStateUpdates();
+
+ Iterator<Map.Entry<String, String[]>> it = test.entrySet().iterator();
+ while (it.hasNext())
+ {
+ Map.Entry<String, String[]> entry = it.next();
+ if (entry.getValue().length != 0)
+ {
+ parameters.put(entry.getKey(), entry.getValue());
+ }
+ }
+
if (pns != null)
{
//
14 years, 10 months
JBoss Portal SVN: r13585 - modules/cms/trunk/cms-jackrabbit/src/main/java/org/jboss/portal/cms/security.
by portal-commits@lists.jboss.org
Author: thomas.heute(a)jboss.com
Date: 2009-07-22 09:17:50 -0400 (Wed, 22 Jul 2009)
New Revision: 13585
Modified:
modules/cms/trunk/cms-jackrabbit/src/main/java/org/jboss/portal/cms/security/AuthorizationProviderImpl.java
Log:
JBEPP-98: SQLException on user login if hibernate schema name is specified
Modified: modules/cms/trunk/cms-jackrabbit/src/main/java/org/jboss/portal/cms/security/AuthorizationProviderImpl.java
===================================================================
--- modules/cms/trunk/cms-jackrabbit/src/main/java/org/jboss/portal/cms/security/AuthorizationProviderImpl.java 2009-07-22 12:57:41 UTC (rev 13584)
+++ modules/cms/trunk/cms-jackrabbit/src/main/java/org/jboss/portal/cms/security/AuthorizationProviderImpl.java 2009-07-22 13:17:50 UTC (rev 13585)
@@ -38,6 +38,7 @@
import org.jboss.portal.identity.UserModule;
import org.jboss.portal.identity.db.HibernateUserModuleImpl;
import org.jboss.portal.jems.as.system.AbstractJBossService;
+import org.jboss.portal.jems.hibernate.HibernateProvider;
import org.jboss.portal.jems.hibernate.SessionFactoryBinder;
import org.jboss.portal.security.spi.provider.DomainConfigurator;
import org.jboss.portal.security.spi.provider.PermissionFactory;
@@ -64,7 +65,7 @@
{
private IdentityServiceController identityServiceController = null;
- private SessionFactoryBinder sessionFactoryBinder = null;
+ private HibernateProvider sessionFactoryBinder = null;
private MembershipModule membershipModule = null;
@@ -330,12 +331,12 @@
this.identityServiceController = identityServiceController;
}
- public SessionFactoryBinder getSessionFactoryBinder()
+ public HibernateProvider getSessionFactoryBinder()
{
return sessionFactoryBinder;
}
- public void setSessionFactoryBinder(SessionFactoryBinder sessionFactoryBinder)
+ public void setSessionFactoryBinder(HibernateProvider sessionFactoryBinder)
{
this.sessionFactoryBinder = sessionFactoryBinder;
}
14 years, 10 months
JBoss Portal SVN: r13584 - modules/cms/trunk/cms-jackrabbit/src/test/resources.
by portal-commits@lists.jboss.org
Author: thomas.heute(a)jboss.com
Date: 2009-07-22 08:57:41 -0400 (Wed, 22 Jul 2009)
New Revision: 13584
Modified:
modules/cms/trunk/cms-jackrabbit/src/test/resources/jboss-beans-security-test.xml
modules/cms/trunk/cms-jackrabbit/src/test/resources/jboss-beans-security.xml
Log:
JBEPP-98: SQLException on user login if hibernate schema name is specified
Modified: modules/cms/trunk/cms-jackrabbit/src/test/resources/jboss-beans-security-test.xml
===================================================================
--- modules/cms/trunk/cms-jackrabbit/src/test/resources/jboss-beans-security-test.xml 2009-07-22 11:28:09 UTC (rev 13583)
+++ modules/cms/trunk/cms-jackrabbit/src/test/resources/jboss-beans-security-test.xml 2009-07-22 12:57:41 UTC (rev 13584)
@@ -122,7 +122,7 @@
<bean name="SessionFactoryBinder" class="org.jboss.portal.jems.hibernate.SessionFactoryBinder">
<property name="doChecking">true</property>
- <property name="configLocation">conf/hibernate/cms/hibernate.cfg.xml</property>
+ <property name="configLocation">hibernate.cfg.xml</property>
<property name="JNDIName">java:/portal/cms/CMSSessionFactory</property>
</bean>
Modified: modules/cms/trunk/cms-jackrabbit/src/test/resources/jboss-beans-security.xml
===================================================================
--- modules/cms/trunk/cms-jackrabbit/src/test/resources/jboss-beans-security.xml 2009-07-22 11:28:09 UTC (rev 13583)
+++ modules/cms/trunk/cms-jackrabbit/src/test/resources/jboss-beans-security.xml 2009-07-22 12:57:41 UTC (rev 13584)
@@ -122,7 +122,7 @@
<bean name="SessionFactoryBinder" class="org.jboss.portal.jems.hibernate.SessionFactoryBinder">
<property name="doChecking">true</property>
- <property name="configLocation">conf/hibernate/cms/hibernate.cfg.xml</property>
+ <property name="configLocation">hibernate.cfg.xml</property>
<property name="JNDIName">java:/portal/cms/CMSSessionFactory</property>
</bean>
14 years, 10 months
JBoss Portal SVN: r13583 - modules/cms/trunk/cms-jackrabbit/src/test/resources.
by portal-commits@lists.jboss.org
Author: thomas.heute(a)jboss.com
Date: 2009-07-22 07:28:09 -0400 (Wed, 22 Jul 2009)
New Revision: 13583
Modified:
modules/cms/trunk/cms-jackrabbit/src/test/resources/jboss-beans-security-test.xml
modules/cms/trunk/cms-jackrabbit/src/test/resources/jboss-beans-security.xml
Log:
JBEPP-98: SQLException on user login if hibernate schema name is specified
Modified: modules/cms/trunk/cms-jackrabbit/src/test/resources/jboss-beans-security-test.xml
===================================================================
--- modules/cms/trunk/cms-jackrabbit/src/test/resources/jboss-beans-security-test.xml 2009-07-22 10:53:42 UTC (rev 13582)
+++ modules/cms/trunk/cms-jackrabbit/src/test/resources/jboss-beans-security-test.xml 2009-07-22 11:28:09 UTC (rev 13583)
@@ -120,9 +120,16 @@
<property name="identitySessionFactory">java:/SessionFactory</property>
</bean>
+ <bean name="SessionFactoryBinder" class="org.jboss.portal.jems.hibernate.SessionFactoryBinder">
+ <property name="doChecking">true</property>
+ <property name="configLocation">conf/hibernate/cms/hibernate.cfg.xml</property>
+ <property name="JNDIName">java:/portal/cms/CMSSessionFactory</property>
+ </bean>
+
<!-- setup for cms security testing -->
<bean name="AuthorizationProvider" class="org.jboss.portal.cms.security.AuthorizationProviderImpl">
<property name="identityServiceController"><inject bean="IdentityServiceController"/></property>
+ <property name="sessionFactoryBinder"><inject bean="SessionFactoryBinder"/></property>
<property name="cmsRootUserName">admin</property>
<property name="cmsSessionFactory">java:/SessionFactory</property>
</bean>
Modified: modules/cms/trunk/cms-jackrabbit/src/test/resources/jboss-beans-security.xml
===================================================================
--- modules/cms/trunk/cms-jackrabbit/src/test/resources/jboss-beans-security.xml 2009-07-22 10:53:42 UTC (rev 13582)
+++ modules/cms/trunk/cms-jackrabbit/src/test/resources/jboss-beans-security.xml 2009-07-22 11:28:09 UTC (rev 13583)
@@ -119,10 +119,17 @@
<property name="identityServiceController"><inject bean="IdentityServiceController"/></property>
<property name="identitySessionFactory">java:/SessionFactory</property>
</bean>
+
+ <bean name="SessionFactoryBinder" class="org.jboss.portal.jems.hibernate.SessionFactoryBinder">
+ <property name="doChecking">true</property>
+ <property name="configLocation">conf/hibernate/cms/hibernate.cfg.xml</property>
+ <property name="JNDIName">java:/portal/cms/CMSSessionFactory</property>
+ </bean>
<!-- setup for cms security testing -->
<bean name="AuthorizationProvider" class="org.jboss.portal.cms.security.AuthorizationProviderImpl">
<property name="identityServiceController"><inject bean="IdentityServiceController"/></property>
+ <property name="sessionFactoryBinder"><inject bean="SessionFactoryBinder"/></property>
<property name="cmsRootUserName">admin</property>
<property name="cmsSessionFactory">java:/SessionFactory</property>
</bean>
14 years, 10 months
JBoss Portal SVN: r13582 - branches/Enterprise_Portal_Platform_4_3/core-identity/src/resources/portal-identity-war/jsf/common.
by portal-commits@lists.jboss.org
Author: thomas.heute(a)jboss.com
Date: 2009-07-22 06:53:42 -0400 (Wed, 22 Jul 2009)
New Revision: 13582
Modified:
branches/Enterprise_Portal_Platform_4_3/core-identity/src/resources/portal-identity-war/jsf/common/userInfo.xhtml
Log:
JBEPP-89: a validation error message won't be highlighted In "Edit Profile" form
Modified: branches/Enterprise_Portal_Platform_4_3/core-identity/src/resources/portal-identity-war/jsf/common/userInfo.xhtml
===================================================================
--- branches/Enterprise_Portal_Platform_4_3/core-identity/src/resources/portal-identity-war/jsf/common/userInfo.xhtml 2009-07-22 09:37:08 UTC (rev 13581)
+++ branches/Enterprise_Portal_Platform_4_3/core-identity/src/resources/portal-identity-war/jsf/common/userInfo.xhtml 2009-07-22 10:53:42 UTC (rev 13582)
@@ -42,7 +42,7 @@
<h:inputText id="#{metadataservice.email.name}" value="#{manager.uiUser.attribute.email}" required="#{metadataservice.email.required}">
<f:validator validatorId="#{metadataservice.email.validator}" infoClass="portlet-msg-success" errorClass="portlet-msg-error" fatalClass="portlet-msg-error" warnClass="portlet-msg-alert"/>
</h:inputText>
- <h:message for="#{metadataservice.email.name}"/>
+ <h:message for="#{metadataservice.email.name}" infoClass="portlet-msg-success" errorClass="portlet-msg-error" fatalClass="portlet-msg-error" warnClass="portlet-msg-alert"/>
<c:choose>
<c:when test="#{portletPreferenceValue.resetPassword == true}">
14 years, 10 months
JBoss Portal SVN: r13581 - modules/cms/trunk/cms-jackrabbit/src/main/java/org/jboss/portal/cms/security and 1 other directory.
by portal-commits@lists.jboss.org
Author: thomas.heute(a)jboss.com
Date: 2009-07-22 05:37:08 -0400 (Wed, 22 Jul 2009)
New Revision: 13581
Modified:
branches/Enterprise_Portal_Platform_4_3/core-cms/src/resources/portal-cms-sar/META-INF/jboss-service.xml
modules/cms/trunk/cms-jackrabbit/src/main/java/org/jboss/portal/cms/security/AuthorizationProviderImpl.java
Log:
JBEPP-98: SQLException on user login if hibernate schema name is specified
Modified: branches/Enterprise_Portal_Platform_4_3/core-cms/src/resources/portal-cms-sar/META-INF/jboss-service.xml
===================================================================
--- branches/Enterprise_Portal_Platform_4_3/core-cms/src/resources/portal-cms-sar/META-INF/jboss-service.xml 2009-07-22 07:25:40 UTC (rev 13580)
+++ branches/Enterprise_Portal_Platform_4_3/core-cms/src/resources/portal-cms-sar/META-INF/jboss-service.xml 2009-07-22 09:37:08 UTC (rev 13581)
@@ -473,7 +473,8 @@
-->
<attribute name="CmsRootUserName">admin</attribute>
<attribute name="CmsSessionFactory">java:/portal/cms/CMSSessionFactory</attribute>
- <depends optional-attribute-name="IdentityServiceController" proxy-type="attribute">portal:service=Module,type=IdentityServiceController</depends>
+ <depends optional-attribute-name="IdentityServiceController" proxy-type="attribute">portal:service=Module,type=IdentityServiceController</depends>
+ <depends optional-attribute-name="SessionFactoryBinder" proxy-type="attribute">portal:service=Hibernate,type=CMS</depends>
</mbean>
<!-- ACL Security Interceptor -->
Modified: modules/cms/trunk/cms-jackrabbit/src/main/java/org/jboss/portal/cms/security/AuthorizationProviderImpl.java
===================================================================
--- modules/cms/trunk/cms-jackrabbit/src/main/java/org/jboss/portal/cms/security/AuthorizationProviderImpl.java 2009-07-22 07:25:40 UTC (rev 13580)
+++ modules/cms/trunk/cms-jackrabbit/src/main/java/org/jboss/portal/cms/security/AuthorizationProviderImpl.java 2009-07-22 09:37:08 UTC (rev 13581)
@@ -38,6 +38,7 @@
import org.jboss.portal.identity.UserModule;
import org.jboss.portal.identity.db.HibernateUserModuleImpl;
import org.jboss.portal.jems.as.system.AbstractJBossService;
+import org.jboss.portal.jems.hibernate.SessionFactoryBinder;
import org.jboss.portal.security.spi.provider.DomainConfigurator;
import org.jboss.portal.security.spi.provider.PermissionFactory;
import org.jboss.portal.security.spi.provider.PermissionRepository;
@@ -63,6 +64,8 @@
{
private IdentityServiceController identityServiceController = null;
+ private SessionFactoryBinder sessionFactoryBinder = null;
+
private MembershipModule membershipModule = null;
private UserModule userModule = null;
@@ -327,6 +330,16 @@
this.identityServiceController = identityServiceController;
}
+ public SessionFactoryBinder getSessionFactoryBinder()
+ {
+ return sessionFactoryBinder;
+ }
+
+ public void setSessionFactoryBinder(SessionFactoryBinder sessionFactoryBinder)
+ {
+ this.sessionFactoryBinder = sessionFactoryBinder;
+ }
+
// --------------------------------------------------------------------------------------------------------------
/**
* Stores a permission and its associations into peristent storage
@@ -435,12 +448,16 @@
userQuery.setString(0, userId);
userQuery.setCacheable(true);
permissions.addAll(userQuery.list());
-
+
if (this.userModule instanceof HibernateUserModuleImpl)
{
- // in case of a database version, use the cache optmized way to
+
+ String schemaName = sessionFactoryBinder.getConfig().getProperty("hibernate.default_schema");
+ String schemaPrefix = (schemaName!=null ? schemaName+"." : "");
+
+ // in case of a database version, use the cache optimized way to
// lookup the permissions
- String lookupByRole = "SELECT p.* from jbp_cms_perm p,jbp_cms_perm_role r,jbp_role_membership m,jbp_roles roles,jbp_users users WHERE "
+ String lookupByRole = "SELECT p.* from " + schemaPrefix + "jbp_cms_perm p," + schemaPrefix + "jbp_cms_perm_role r," + schemaPrefix + "jbp_role_membership m," + schemaPrefix + "jbp_roles roles," + schemaPrefix + "jbp_users users WHERE "
+ "p.id=r.cms_perm_id AND "
+ "r.role_id=roles.jbp_name AND "
+ "m.jbp_rid=roles.jbp_rid AND "
14 years, 10 months
JBoss Portal SVN: r13580 - branches/Enterprise_Portal_Platform_4_3/core/src/main/org/jboss/portal/core/impl/portlet/state.
by portal-commits@lists.jboss.org
Author: thomas.heute(a)jboss.com
Date: 2009-07-22 03:25:40 -0400 (Wed, 22 Jul 2009)
New Revision: 13580
Modified:
branches/Enterprise_Portal_Platform_4_3/core/src/main/org/jboss/portal/core/impl/portlet/state/PersistentPortletStatePersistenceManager.java
Log:
JBEPP-74: Preferences values are not getting replicated in clustered setup
Modified: branches/Enterprise_Portal_Platform_4_3/core/src/main/org/jboss/portal/core/impl/portlet/state/PersistentPortletStatePersistenceManager.java
===================================================================
--- branches/Enterprise_Portal_Platform_4_3/core/src/main/org/jboss/portal/core/impl/portlet/state/PersistentPortletStatePersistenceManager.java 2009-07-21 22:36:39 UTC (rev 13579)
+++ branches/Enterprise_Portal_Platform_4_3/core/src/main/org/jboss/portal/core/impl/portlet/state/PersistentPortletStatePersistenceManager.java 2009-07-22 07:25:40 UTC (rev 13580)
@@ -205,6 +205,8 @@
//
session.update(context);
+
+ session.flush();
}
public void destroyState(String stateId) throws InvalidStateIdException, NoSuchStateException
14 years, 10 months
JBoss Portal SVN: r13579 - in branches/Enterprise_Portal_Platform_4_3: faces/src/main/org/jboss/portal/faces/gui and 1 other directory.
by portal-commits@lists.jboss.org
Author: chris.laprun(a)jboss.com
Date: 2009-07-21 18:36:39 -0400 (Tue, 21 Jul 2009)
New Revision: 13579
Modified:
branches/Enterprise_Portal_Platform_4_3/core-wsrp/src/main/org/jboss/portal/wsrp/admin/ui/ConsumerBean.java
branches/Enterprise_Portal_Platform_4_3/core-wsrp/src/main/org/jboss/portal/wsrp/admin/ui/ProducerBean.java
branches/Enterprise_Portal_Platform_4_3/faces/src/main/org/jboss/portal/faces/gui/JSFBeanContext.java
Log:
- JBPORTAL-2428: Now properly validates inputs (including WSDL URL that wasn't properly validated by URL constructor due to a Java bug).
- JSFBeanContext now provides renderResponseImmediately method to bypass further processing in case of an error.
Modified: branches/Enterprise_Portal_Platform_4_3/core-wsrp/src/main/org/jboss/portal/wsrp/admin/ui/ConsumerBean.java
===================================================================
--- branches/Enterprise_Portal_Platform_4_3/core-wsrp/src/main/org/jboss/portal/wsrp/admin/ui/ConsumerBean.java 2009-07-21 22:28:45 UTC (rev 13578)
+++ branches/Enterprise_Portal_Platform_4_3/core-wsrp/src/main/org/jboss/portal/wsrp/admin/ui/ConsumerBean.java 2009-07-21 22:36:39 UTC (rev 13579)
@@ -23,6 +23,7 @@
package org.jboss.portal.wsrp.admin.ui;
+import org.jboss.portal.faces.gui.JSFBeanContext;
import org.jboss.portal.faces.gui.ManagedBean;
import org.jboss.portal.wsrp.WSRPConsumer;
import org.jboss.portal.wsrp.consumer.ConsumerRegistry;
@@ -32,10 +33,9 @@
import org.jboss.portal.wsrp.consumer.RegistrationInfo;
import org.jboss.portal.wsrp.consumer.RegistrationProperty;
-import javax.faces.context.FacesContext;
import javax.faces.event.ValueChangeEvent;
-import java.net.MalformedURLException;
-import java.net.URL;
+import java.net.URI;
+import java.net.URISyntaxException;
import java.util.Collections;
import java.util.LinkedList;
import java.util.List;
@@ -139,6 +139,10 @@
// we're not using modifyIfNeeded here to avoid double equality check, so we need to set modified manually
modified = true;
}
+ else
+ {
+ JSFBeanContext.renderResponseImmediately();
+ }
}
}
else
@@ -527,6 +531,9 @@
private Object modifyIfNeeded(Object oldValue, Object newValue, String target, boolean checkURL)
{
+ // prepend form id to target
+ target = "edit-cons-form:" + target;
+
if (isOldAndNewDifferent(oldValue, newValue))
{
if (checkURL)
@@ -534,13 +541,22 @@
try
{
// check that the new value is a valid URL
- new URL(newValue.toString());
+ new URI(newValue.toString());
}
- catch (MalformedURLException e)
+ catch (URISyntaxException e)
{
beanContext.createTargetedErrorMessage(target, MALFORMED_URL, newValue, e.getLocalizedMessage());
+ JSFBeanContext.renderResponseImmediately();
}
}
+ else
+ {
+ String newStringValue = checkValidity(newValue.toString(), target);
+ if (newStringValue == null)
+ {
+ JSFBeanContext.renderResponseImmediately();
+ }
+ }
oldValue = newValue;
modified = true;
@@ -555,8 +571,7 @@
{
useWSDL = (Boolean)modifyIfNeeded(useWSDL, event.getNewValue(), "wsdl", false);
- // bypass the rest of the life cycle and re-display page
- FacesContext.getCurrentInstance().renderResponse();
+ JSFBeanContext.renderResponseImmediately();
}
// todo: valueChangeListener not needed anymore when events on RegistrationProperties work
Modified: branches/Enterprise_Portal_Platform_4_3/core-wsrp/src/main/org/jboss/portal/wsrp/admin/ui/ProducerBean.java
===================================================================
--- branches/Enterprise_Portal_Platform_4_3/core-wsrp/src/main/org/jboss/portal/wsrp/admin/ui/ProducerBean.java 2009-07-21 22:28:45 UTC (rev 13578)
+++ branches/Enterprise_Portal_Platform_4_3/core-wsrp/src/main/org/jboss/portal/wsrp/admin/ui/ProducerBean.java 2009-07-21 22:36:39 UTC (rev 13579)
@@ -23,6 +23,7 @@
package org.jboss.portal.wsrp.admin.ui;
+import org.jboss.portal.faces.gui.JSFBeanContext;
import org.jboss.portal.faces.gui.ManagedBean;
import org.jboss.portal.registration.RegistrationPolicy;
import org.jboss.portal.registration.policies.DefaultRegistrationPolicy;
@@ -31,7 +32,6 @@
import org.jboss.portal.wsrp.producer.config.ProducerRegistrationRequirements;
import org.jboss.portal.wsrp.registration.RegistrationPropertyDescription;
-import javax.faces.context.FacesContext;
import javax.faces.event.ActionEvent;
import javax.faces.event.ValueChangeEvent;
import javax.faces.model.SelectItem;
@@ -281,8 +281,7 @@
{
setRegistrationRequired((Boolean)event.getNewValue());
- // bypass the rest of the life cycle and re-display page
- FacesContext.getCurrentInstance().renderResponse();
+ JSFBeanContext.renderResponseImmediately();
}
public void selectProperty(ActionEvent event)
Modified: branches/Enterprise_Portal_Platform_4_3/faces/src/main/org/jboss/portal/faces/gui/JSFBeanContext.java
===================================================================
--- branches/Enterprise_Portal_Platform_4_3/faces/src/main/org/jboss/portal/faces/gui/JSFBeanContext.java 2009-07-21 22:28:45 UTC (rev 13578)
+++ branches/Enterprise_Portal_Platform_4_3/faces/src/main/org/jboss/portal/faces/gui/JSFBeanContext.java 2009-07-21 22:36:39 UTC (rev 13579)
@@ -147,4 +147,10 @@
{
return FacesContext.getCurrentInstance().getExternalContext().getRequestLocale();
}
+
+ /** Bypasses the rest of the life cycle and re-displays page immediately. Useful for error reporting. */
+ public static void renderResponseImmediately()
+ {
+ FacesContext.getCurrentInstance().renderResponse();
+ }
}
14 years, 10 months