JBoss Portal SVN: r8547 - in modules/common/trunk: portal and 1 other directory.
by portal-commits@lists.jboss.org
Author: julien(a)jboss.com
Date: 2007-10-05 12:37:23 -0400 (Fri, 05 Oct 2007)
New Revision: 8547
Modified:
modules/common/trunk/pom.xml
modules/common/trunk/portal/pom.xml
Log:
revert changes
Modified: modules/common/trunk/pom.xml
===================================================================
--- modules/common/trunk/pom.xml 2007-10-05 16:26:22 UTC (rev 8546)
+++ modules/common/trunk/pom.xml 2007-10-05 16:37:23 UTC (rev 8547)
@@ -1,25 +1,127 @@
<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</groupId>
- <artifactId>jboss-portal</artifactId>
- <version>1.1.0-SNAPSHOT</version>
- </parent>
--->
<modelVersion>4.0.0</modelVersion>
<groupId>org.jboss.portal.common</groupId>
<artifactId>jboss-portal-modules-common-root</artifactId>
<packaging>pom</packaging>
<name>JBoss Portal Modules Common</name>
<version>1.1.0-SNAPSHOT</version>
+ <url>http://labs.jboss.com/jbossportal</url>
<dependencies/>
- <build/>
+ <repositories>
+ <repository>
+ <id>repository.maven.org</id>
+ <name>Maven Repository</name>
+ <layout>default</layout>
+ <url>http://repo1.maven.org/maven2/</url>
+ <snapshots>
+ <enabled>false</enabled>
+ </snapshots>
+ </repository>
+ <repository>
+ <id>repository.jboss.org</id>
+ <name>JBoss Repository</name>
+ <layout>default</layout>
+ <url>http://repository.jboss.org/maven2/</url>
+ <snapshots>
+ <enabled>false</enabled>
+ </snapshots>
+ </repository>
+ <repository>
+ <id>snapshots.jboss.org</id>
+ <name>JBoss Snapshots Repository</name>
+ <layout>default</layout>
+ <url>http://snapshots.jboss.org/maven2/</url>
+ <snapshots>
+ <enabled>true</enabled>
+ </snapshots>
+ <releases>
+ <enabled>false</enabled>
+ </releases>
+ </repository>
+ </repositories>
- <distributionManagement/>
+ <build>
+ <extensions>
+ <extension>
+ <groupId>org.apache.maven.wagon</groupId>
+ <artifactId>wagon-webdav</artifactId>
+ <version>1.0-beta-2</version>
+ </extension>
+ </extensions>
+ <pluginManagement>
+ <plugins>
+ <plugin>
+ <inherited>true</inherited>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <configuration>
+ <source>1.5</source>
+ <target>1.5</target>
+ <showDeprecation>true</showDeprecation>
+ <showWarnings>true</showWarnings>
+ <optimize>true</optimize>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-jar-plugin</artifactId>
+ <configuration>
+ <archive>
+ <manifest>
+ <addClasspath>true</addClasspath>
+ </manifest>
+ </archive>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>jboss-packaging-maven-plugin</artifactId>
+ <version>2.0-SNAPSHOT</version>
+ <extensions>true</extensions>
+ </plugin>
+ <plugin>
+ <artifactId>maven-idea-plugin</artifactId>
+ <configuration>
+ <downloadSources>true</downloadSources>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.jboss.maven.plugins</groupId>
+ <artifactId>maven-jboss-deploy-plugin</artifactId>
+ <version>1.3</version>
+ <executions>
+ <execution>
+ <goals>
+ <goal>jboss-deploy</goal>
+ </goals>
+ </execution>
+ </executions>
+ <configuration>
+ <jbossDeployRoot>${jboss.repository.root}</jbossDeployRoot>
+ </configuration>
+ </plugin>
+ </plugins>
+ </pluginManagement>
+ </build>
+ <distributionManagement>
+ <!--<repository>-->
+ <!--Copy the distribution jar file to a local checkout of the maven repository
+ - This variable can be set in $MAVEN_HOME/conf/settings.xml-->
+ <!--<id>repository.jboss.org</id>-->
+ <!--<url>file://${jboss.repository.root}</url>-->
+ <!--</repository>-->
+ <snapshotRepository>
+ <id>snapshots.jboss.org</id>
+ <name>JBoss Snapshot Repository</name>
+ <url>dav:https://snapshots.jboss.org/maven2</url>
+ <uniqueVersion>true</uniqueVersion>
+ </snapshotRepository>
+ </distributionManagement>
+
<modules>
<module>common</module>
<module>mc</module>
@@ -27,6 +129,30 @@
</modules>
+ <issueManagement>
+ <system>JIRA</system>
+ <url>http://jira.jboss.com/jira/browse/JBPORTAL</url>
+ </issueManagement>
+ <ciManagement>
+ <system>cruisecontrol</system>
+ </ciManagement>
+
+ <licenses>
+ <license>
+ <name>LGPL 2.1</name>
+ <url>http://www.gnu.org/licenses/lgpl.html</url>
+ <distribution>repo</distribution>
+ <comments>
+ GNU LESSER GENERAL PUBLIC LICENSE Version 2.1
+ </comments>
+ </license>
+ </licenses>
+ <scm>
+ <connection>scm:svn:http://anonsvn.jboss.org/repos/portal/trunk</connection>
+ <developerConnection>scm:svn:https://svn.jboss.org/repos/portal/trunk</developerConnection>
+ <url>https://svn.jboss.org/repos/portal/trunk</url>
+ </scm>
+
<reporting>
<plugins>
<plugin>
@@ -61,4 +187,4 @@
<properties/>
-</project>
+</project>
\ No newline at end of file
Modified: modules/common/trunk/portal/pom.xml
===================================================================
--- modules/common/trunk/portal/pom.xml 2007-10-05 16:26:22 UTC (rev 8546)
+++ modules/common/trunk/portal/pom.xml 2007-10-05 16:37:23 UTC (rev 8547)
@@ -8,7 +8,7 @@
<modelVersion>4.0.0</modelVersion>
<artifactId>jboss-portal-modules-common-portal</artifactId>
<packaging>jar</packaging>
- <name>JBoss Portal Modules Common Portal</name>
+ <name>Jboss Portal Modules Common Portal</name>
<dependencies/>
16 years, 8 months
JBoss Portal SVN: r8546 - modules/common/trunk.
by portal-commits@lists.jboss.org
Author: julien(a)jboss.com
Date: 2007-10-05 12:26:22 -0400 (Fri, 05 Oct 2007)
New Revision: 8546
Modified:
modules/common/trunk/pom.xml
Log:
had to comment the parent, it is not able to obtain it and make compilation fail
Modified: modules/common/trunk/pom.xml
===================================================================
--- modules/common/trunk/pom.xml 2007-10-05 16:16:06 UTC (rev 8545)
+++ modules/common/trunk/pom.xml 2007-10-05 16:26:22 UTC (rev 8546)
@@ -1,10 +1,12 @@
<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</groupId>
<artifactId>jboss-portal</artifactId>
<version>1.1.0-SNAPSHOT</version>
</parent>
+-->
<modelVersion>4.0.0</modelVersion>
<groupId>org.jboss.portal.common</groupId>
<artifactId>jboss-portal-modules-common-root</artifactId>
@@ -59,4 +61,4 @@
<properties/>
-</project>
\ No newline at end of file
+</project>
16 years, 8 months
JBoss Portal SVN: r8545 - in modules/common/trunk: portal and 1 other directory.
by portal-commits@lists.jboss.org
Author: wesleyhales
Date: 2007-10-05 12:16:06 -0400 (Fri, 05 Oct 2007)
New Revision: 8545
Modified:
modules/common/trunk/pom.xml
modules/common/trunk/portal/pom.xml
Log:
naming changes
Modified: modules/common/trunk/pom.xml
===================================================================
--- modules/common/trunk/pom.xml 2007-10-05 16:14:25 UTC (rev 8544)
+++ modules/common/trunk/pom.xml 2007-10-05 16:16:06 UTC (rev 8545)
@@ -1,127 +1,23 @@
<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</groupId>
+ <artifactId>jboss-portal</artifactId>
+ <version>1.1.0-SNAPSHOT</version>
+ </parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.jboss.portal.common</groupId>
<artifactId>jboss-portal-modules-common-root</artifactId>
<packaging>pom</packaging>
<name>JBoss Portal Modules Common</name>
<version>1.1.0-SNAPSHOT</version>
- <url>http://labs.jboss.com/jbossportal</url>
<dependencies/>
- <repositories>
- <repository>
- <id>repository.maven.org</id>
- <name>Maven Repository</name>
- <layout>default</layout>
- <url>http://repo1.maven.org/maven2/</url>
- <snapshots>
- <enabled>false</enabled>
- </snapshots>
- </repository>
- <repository>
- <id>repository.jboss.org</id>
- <name>JBoss Repository</name>
- <layout>default</layout>
- <url>http://repository.jboss.org/maven2/</url>
- <snapshots>
- <enabled>false</enabled>
- </snapshots>
- </repository>
- <repository>
- <id>snapshots.jboss.org</id>
- <name>JBoss Snapshots Repository</name>
- <layout>default</layout>
- <url>http://snapshots.jboss.org/maven2/</url>
- <snapshots>
- <enabled>true</enabled>
- </snapshots>
- <releases>
- <enabled>false</enabled>
- </releases>
- </repository>
- </repositories>
+ <build/>
- <build>
- <extensions>
- <extension>
- <groupId>org.apache.maven.wagon</groupId>
- <artifactId>wagon-webdav</artifactId>
- <version>1.0-beta-2</version>
- </extension>
- </extensions>
- <pluginManagement>
- <plugins>
- <plugin>
- <inherited>true</inherited>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-compiler-plugin</artifactId>
- <configuration>
- <source>1.5</source>
- <target>1.5</target>
- <showDeprecation>true</showDeprecation>
- <showWarnings>true</showWarnings>
- <optimize>true</optimize>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-jar-plugin</artifactId>
- <configuration>
- <archive>
- <manifest>
- <addClasspath>true</addClasspath>
- </manifest>
- </archive>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>jboss-packaging-maven-plugin</artifactId>
- <version>2.0-SNAPSHOT</version>
- <extensions>true</extensions>
- </plugin>
- <plugin>
- <artifactId>maven-idea-plugin</artifactId>
- <configuration>
- <downloadSources>true</downloadSources>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.jboss.maven.plugins</groupId>
- <artifactId>maven-jboss-deploy-plugin</artifactId>
- <version>1.3</version>
- <executions>
- <execution>
- <goals>
- <goal>jboss-deploy</goal>
- </goals>
- </execution>
- </executions>
- <configuration>
- <jbossDeployRoot>${jboss.repository.root}</jbossDeployRoot>
- </configuration>
- </plugin>
- </plugins>
- </pluginManagement>
- </build>
+ <distributionManagement/>
- <distributionManagement>
- <!--<repository>-->
- <!--Copy the distribution jar file to a local checkout of the maven repository
- - This variable can be set in $MAVEN_HOME/conf/settings.xml-->
- <!--<id>repository.jboss.org</id>-->
- <!--<url>file://${jboss.repository.root}</url>-->
- <!--</repository>-->
- <snapshotRepository>
- <id>snapshots.jboss.org</id>
- <name>JBoss Snapshot Repository</name>
- <url>dav:https://snapshots.jboss.org/maven2</url>
- <uniqueVersion>true</uniqueVersion>
- </snapshotRepository>
- </distributionManagement>
-
<modules>
<module>common</module>
<module>mc</module>
@@ -129,30 +25,6 @@
</modules>
- <issueManagement>
- <system>JIRA</system>
- <url>http://jira.jboss.com/jira/browse/JBPORTAL</url>
- </issueManagement>
- <ciManagement>
- <system>cruisecontrol</system>
- </ciManagement>
-
- <licenses>
- <license>
- <name>LGPL 2.1</name>
- <url>http://www.gnu.org/licenses/lgpl.html</url>
- <distribution>repo</distribution>
- <comments>
- GNU LESSER GENERAL PUBLIC LICENSE Version 2.1
- </comments>
- </license>
- </licenses>
- <scm>
- <connection>scm:svn:http://anonsvn.jboss.org/repos/portal/trunk</connection>
- <developerConnection>scm:svn:https://svn.jboss.org/repos/portal/trunk</developerConnection>
- <url>https://svn.jboss.org/repos/portal/trunk</url>
- </scm>
-
<reporting>
<plugins>
<plugin>
Modified: modules/common/trunk/portal/pom.xml
===================================================================
--- modules/common/trunk/portal/pom.xml 2007-10-05 16:14:25 UTC (rev 8544)
+++ modules/common/trunk/portal/pom.xml 2007-10-05 16:16:06 UTC (rev 8545)
@@ -8,7 +8,7 @@
<modelVersion>4.0.0</modelVersion>
<artifactId>jboss-portal-modules-common-portal</artifactId>
<packaging>jar</packaging>
- <name>Jboss Portal Modules Common Portal</name>
+ <name>JBoss Portal Modules Common Portal</name>
<dependencies/>
16 years, 8 months
JBoss Portal SVN: r8544 - maven.
by portal-commits@lists.jboss.org
Author: wesleyhales
Date: 2007-10-05 12:14:25 -0400 (Fri, 05 Oct 2007)
New Revision: 8544
Modified:
maven/pom.xml
Log:
changes to parent
Modified: maven/pom.xml
===================================================================
--- maven/pom.xml 2007-10-05 16:09:21 UTC (rev 8543)
+++ maven/pom.xml 2007-10-05 16:14:25 UTC (rev 8544)
@@ -12,6 +12,15 @@
<repositories>
<repository>
+ <id>repository.maven.org</id>
+ <name>Maven Repository</name>
+ <layout>default</layout>
+ <url>http://repo1.maven.org/maven2/</url>
+ <snapshots>
+ <enabled>false</enabled>
+ </snapshots>
+ </repository>
+ <repository>
<id>repository.jboss.org</id>
<name>JBoss Repository</name>
<layout>default</layout>
@@ -57,6 +66,17 @@
</configuration>
</plugin>
<plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-jar-plugin</artifactId>
+ <configuration>
+ <archive>
+ <manifest>
+ <addClasspath>true</addClasspath>
+ </manifest>
+ </archive>
+ </configuration>
+ </plugin>
+ <plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>jboss-packaging-maven-plugin</artifactId>
<version>2.0-SNAPSHOT</version>
@@ -103,9 +123,9 @@
</distributionManagement>
- <!--<modules>
- <module>modules/common</module>
- </modules>-->
+ <modules>
+ <module>../modules/common/trunk</module>
+ </modules>
<issueManagement>
16 years, 8 months
JBoss Portal SVN: r8543 - in modules/common/trunk: common and 1 other directories.
by portal-commits@lists.jboss.org
Author: julien(a)jboss.com
Date: 2007-10-05 12:09:21 -0400 (Fri, 05 Oct 2007)
New Revision: 8543
Modified:
modules/common/trunk/common/pom.xml
modules/common/trunk/mc/pom.xml
modules/common/trunk/pom.xml
Log:
fixed typo in pom
Modified: modules/common/trunk/common/pom.xml
===================================================================
--- modules/common/trunk/common/pom.xml 2007-10-05 16:04:06 UTC (rev 8542)
+++ modules/common/trunk/common/pom.xml 2007-10-05 16:09:21 UTC (rev 8543)
@@ -8,7 +8,7 @@
<modelVersion>4.0.0</modelVersion>
<artifactId>jboss-portal-modules-common</artifactId>
<packaging>jar</packaging>
- <name>Jboss Portal Modules Common</name>
+ <name>JBoss Portal Modules Common</name>
<dependencies>
Modified: modules/common/trunk/mc/pom.xml
===================================================================
--- modules/common/trunk/mc/pom.xml 2007-10-05 16:04:06 UTC (rev 8542)
+++ modules/common/trunk/mc/pom.xml 2007-10-05 16:09:21 UTC (rev 8543)
@@ -8,7 +8,7 @@
<modelVersion>4.0.0</modelVersion>
<artifactId>jboss-portal-modules-common-mc</artifactId>
<packaging>jar</packaging>
- <name>Jboss Portal Modules Common MC</name>
+ <name>JBoss Portal Modules Common MC</name>
<dependencies>
Modified: modules/common/trunk/pom.xml
===================================================================
--- modules/common/trunk/pom.xml 2007-10-05 16:04:06 UTC (rev 8542)
+++ modules/common/trunk/pom.xml 2007-10-05 16:09:21 UTC (rev 8543)
@@ -4,7 +4,7 @@
<groupId>org.jboss.portal.common</groupId>
<artifactId>jboss-portal-modules-common-root</artifactId>
<packaging>pom</packaging>
- <name>Jboss Portal Modules Common</name>
+ <name>JBoss Portal Modules Common</name>
<version>1.1.0-SNAPSHOT</version>
<url>http://labs.jboss.com/jbossportal</url>
16 years, 8 months
JBoss Portal SVN: r8542 - in trunk: core-wsrp/src/resources/portal-wsrp-admin-war/WEB-INF and 5 other directories.
by portal-commits@lists.jboss.org
Author: chris.laprun(a)jboss.com
Date: 2007-10-05 12:04:06 -0400 (Fri, 05 Oct 2007)
New Revision: 8542
Added:
trunk/wsrp/src/main/org/jboss/portal/wsrp/producer/config/ProducerConfigurationProvider.java
trunk/wsrp/src/resources/portal-wsrp-sar/xsd/
trunk/wsrp/src/resources/portal-wsrp-sar/xsd/jboss-wsrp-producer_2_6.xsd
Removed:
trunk/wsrp/src/resources/portal-wsrp-sar/xsd/jboss-wsrp-producer_2_6.xsd
Modified:
trunk/core-wsrp/src/main/org/jboss/portal/wsrp/admin/ui/ManagedBean.java
trunk/core-wsrp/src/main/org/jboss/portal/wsrp/admin/ui/ProducerBean.java
trunk/core-wsrp/src/resources/portal-wsrp-admin-war/WEB-INF/faces-config.xml
trunk/wsrp/build.xml
trunk/wsrp/src/main/org/jboss/portal/wsrp/producer/config/ProducerConfigurationService.java
trunk/wsrp/src/main/org/jboss/portal/wsrp/producer/config/impl/ProducerConfigurationServiceImpl.java
trunk/wsrp/src/main/org/jboss/portal/wsrp/producer/config/impl/ProducerRegistrationRequirementsImpl.java
Log:
- JBPORTAL-1715: Added support for saving producer configuration (finally figured out that you can't use a FileWriter directly to marshall objects with XB).
- Added XML Schema version of the producer configuration file format (required for XB marshalling to work properly, haven't been able to use the DTD for that purpose).
- Added logging to ManagedBean.
Modified: trunk/core-wsrp/src/main/org/jboss/portal/wsrp/admin/ui/ManagedBean.java
===================================================================
--- trunk/core-wsrp/src/main/org/jboss/portal/wsrp/admin/ui/ManagedBean.java 2007-10-05 15:50:22 UTC (rev 8541)
+++ trunk/core-wsrp/src/main/org/jboss/portal/wsrp/admin/ui/ManagedBean.java 2007-10-05 16:04:06 UTC (rev 8542)
@@ -23,6 +23,9 @@
package org.jboss.portal.wsrp.admin.ui;
+import org.jboss.logging.Logger;
+
+
/**
* @author <a href="mailto:chris.laprun@jboss.com">Chris Laprun</a>
* @version $Revision: 7509 $
@@ -30,6 +33,8 @@
*/
public class ManagedBean
{
+ protected Logger log = Logger.getLogger(getClass());
+
protected BeanContext beanContext;
public void setBeanContext(BeanContext beanContext)
Modified: trunk/core-wsrp/src/main/org/jboss/portal/wsrp/admin/ui/ProducerBean.java
===================================================================
--- trunk/core-wsrp/src/main/org/jboss/portal/wsrp/admin/ui/ProducerBean.java 2007-10-05 15:50:22 UTC (rev 8541)
+++ trunk/core-wsrp/src/main/org/jboss/portal/wsrp/admin/ui/ProducerBean.java 2007-10-05 16:04:06 UTC (rev 8542)
@@ -26,6 +26,7 @@
import org.jboss.portal.registration.RegistrationPolicy;
import org.jboss.portal.registration.policies.DefaultRegistrationPolicy;
import org.jboss.portal.wsrp.producer.config.ProducerConfiguration;
+import org.jboss.portal.wsrp.producer.config.ProducerConfigurationService;
import org.jboss.portal.wsrp.producer.config.ProducerRegistrationRequirements;
import org.jboss.portal.wsrp.registration.RegistrationPropertyDescription;
@@ -43,20 +44,25 @@
*/
public class ProducerBean extends ManagedBean
{
- private ProducerConfiguration configuration;
+ private ProducerConfigurationService configurationService;
private String policyClassName;
private String validatorClassName;
- public ProducerConfiguration getConfiguration()
+ public ProducerConfigurationService getConfigurationService()
{
- return configuration;
+ return configurationService;
}
- public void setConfiguration(ProducerConfiguration configuration)
+ public void setConfigurationService(ProducerConfigurationService configurationService)
{
- this.configuration = configuration;
+ this.configurationService = configurationService;
}
+ public ProducerConfiguration getConfiguration()
+ {
+ return configurationService.getConfiguration();
+ }
+
public boolean isRegistrationRequiredForFullDescription()
{
return getRegRequirements().isRegistrationRequiredForFullDescription();
@@ -64,7 +70,7 @@
private ProducerRegistrationRequirements getRegRequirements()
{
- return configuration.getRegistrationRequirements();
+ return getConfiguration().getRegistrationRequirements();
}
public void setRegistrationRequiredForFullDescription(boolean requireRegForFullDescription)
@@ -139,4 +145,18 @@
{
return Collections.singletonList(new SelectItem("xsd:string"));
}
+
+ public String save()
+ {
+ try
+ {
+ configurationService.saveConfiguration();
+ }
+ catch (Exception e)
+ {
+ log.debug(e);
+ beanContext.createErrorMessage("status", "Couldn't save producer configuration. Cause: " + e.getLocalizedMessage());
+ }
+ return null;
+ }
}
Modified: trunk/core-wsrp/src/resources/portal-wsrp-admin-war/WEB-INF/faces-config.xml
===================================================================
--- trunk/core-wsrp/src/resources/portal-wsrp-admin-war/WEB-INF/faces-config.xml 2007-10-05 15:50:22 UTC (rev 8541)
+++ trunk/core-wsrp/src/resources/portal-wsrp-admin-war/WEB-INF/faces-config.xml 2007-10-05 16:04:06 UTC (rev 8542)
@@ -85,9 +85,9 @@
<managed-bean-class>org.jboss.portal.wsrp.admin.ui.ProducerBean</managed-bean-class>
<managed-bean-scope>session</managed-bean-scope>
<managed-property>
- <property-name>configuration</property-name>
- <property-class>org.jboss.portal.wsrp.producer.config.ProducerConfiguration</property-class>
- <value>#{applicationScope.ProducerConfigurationService.configuration}</value>
+ <property-name>configurationService</property-name>
+ <property-class>org.jboss.portal.wsrp.producer.config.ProducerConfigurationService</property-class>
+ <value>#{applicationScope.ProducerConfigurationService}</value>
</managed-property>
<managed-property>
<property-name>beanContext</property-name>
Modified: trunk/wsrp/build.xml
===================================================================
--- trunk/wsrp/build.xml 2007-10-05 15:50:22 UTC (rev 8541)
+++ trunk/wsrp/build.xml 2007-10-05 16:04:06 UTC (rev 8542)
@@ -133,6 +133,7 @@
<!-- needed to compile on JDK 1.4 -->
<pathelement path="${jbossas/core.libs.lib}/namespace.jar"/>
+ <path refid="apache.xerces.classpath"/>
<path refid="ibm.wsdl4j.classpath"/>
<path refid="jboss.jbossxb.classpath"/>
<path refid="apache.httpclient.classpath"/>
@@ -158,12 +159,12 @@
<pathelement path="${jboss.deploy.lib.dir}/jboss-transaction.jar"/>
<path refid="jboss.serialization.classpath"/>
<path refid="jboss.remoting.classpath"/>
-
+
<path refid="apache.logging.classpath"/>
</path>
<!-- Configure modules -->
- <call target="configure-modules"/>
+ <call target="configure-modules"/>
<path id="dependentmodule.classpath">
<path refid="jboss.portal-common.classpath"/>
@@ -319,13 +320,14 @@
<!-- Build Admin GUI... -->
<ant inheritAll="false" antfile="../core-wsrp/build.xml" output="output.log" dir="../core-wsrp" target="output">
- <property name="build.lib" value="${build.lib}"/>
- <property name="build.resources" value="${build.resources}"/>
+ <property name="build.lib" value="${build.lib}"/>
+ <property name="build.resources" value="${build.resources}"/>
</ant>
<copy todir="${build.resources}/portal-wsrp-sar" overwrite="true">
<fileset dir="${build.lib}" includes="portal-wsrp-client.jar"/>
<fileset dir="${build.lib}" includes="portal-wsrp.jse"/>
</copy>
+
<copy todir="${build.resources}/portal-wsrp-sar" overwrite="true">
<fileset dir="${build.lib}" includes="portal-wsrp-lib.jar"/>
<fileset dir="./output/lib" includes="portal-wsrp-admin.war"/>
@@ -860,11 +862,11 @@
<x-classpath>
<fileset dir="${build.lib}" includes="portal-wsrp-lib.jar"/>
<fileset dir="${build.lib.test}" includes="test-other-lib.jar"/>
- <path refid="tests.classpath"/>
+ <path refid="tests.classpath"/>
<path refid="jboss.portal-server.classpath"/>
<path refid="jboss.portal-portlet.classpath"/>
- <path refid="jboss.portlet-api.classpath"/>
+ <path refid="jboss.portlet-api.classpath"/>
</x-classpath>
</execute-tests>
</target>
Copied: trunk/wsrp/src/main/org/jboss/portal/wsrp/producer/config/ProducerConfigurationProvider.java (from rev 8541, branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/wsrp/producer/config/ProducerConfigurationProvider.java)
===================================================================
--- trunk/wsrp/src/main/org/jboss/portal/wsrp/producer/config/ProducerConfigurationProvider.java (rev 0)
+++ trunk/wsrp/src/main/org/jboss/portal/wsrp/producer/config/ProducerConfigurationProvider.java 2007-10-05 16:04:06 UTC (rev 8542)
@@ -0,0 +1,147 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2007, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+
+package org.jboss.portal.wsrp.producer.config;
+
+import org.jboss.portal.registration.RegistrationPolicy;
+import org.jboss.portal.registration.policies.DefaultRegistrationPolicy;
+import org.jboss.portal.wsrp.producer.config.impl.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$
+ * @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 ("fullServiceDescriptionRequiresRegistration".equals(localName))
+ {
+ return configuration.getRegistrationRequirements().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 = propertyDescription.getLabel();
+ }
+ else if ("hint".equals(localName))
+ {
+ value = propertyDescription.getHint();
+ }
+ return value;
+ }
+
+ public Object getAttributeValue(LocalizedString localizedString, String namespaceUri, String localName)
+ {
+ Object value = null;
+ if ("lang".equals(localName))
+ {
+ value = localizedString.getLocale().getCountry();
+ }
+ else if ("resourceName".equals(localName))
+ {
+ value = localizedString.getResourceName();
+ }
+ return value;
+ }
+}
Modified: trunk/wsrp/src/main/org/jboss/portal/wsrp/producer/config/ProducerConfigurationService.java
===================================================================
--- trunk/wsrp/src/main/org/jboss/portal/wsrp/producer/config/ProducerConfigurationService.java 2007-10-05 15:50:22 UTC (rev 8541)
+++ trunk/wsrp/src/main/org/jboss/portal/wsrp/producer/config/ProducerConfigurationService.java 2007-10-05 16:04:06 UTC (rev 8542)
@@ -31,4 +31,20 @@
public interface ProducerConfigurationService
{
public ProducerConfiguration getConfiguration();
+
+ /**
+ * Reloads the producer configuration from persistent storage.
+ *
+ * @throws Exception
+ * @since 2.6.3
+ */
+ void reloadConfiguration() throws Exception;
+
+ /**
+ * Saves the producer configuration to persistent storage.
+ *
+ * @throws Exception
+ * @since 2.6.3
+ */
+ void saveConfiguration() throws Exception;
}
Modified: trunk/wsrp/src/main/org/jboss/portal/wsrp/producer/config/impl/ProducerConfigurationServiceImpl.java
===================================================================
--- trunk/wsrp/src/main/org/jboss/portal/wsrp/producer/config/impl/ProducerConfigurationServiceImpl.java 2007-10-05 15:50:22 UTC (rev 8541)
+++ trunk/wsrp/src/main/org/jboss/portal/wsrp/producer/config/impl/ProducerConfigurationServiceImpl.java 2007-10-05 16:04:06 UTC (rev 8542)
@@ -23,15 +23,32 @@
package org.jboss.portal.wsrp.producer.config.impl;
+import org.jboss.mx.util.MBeanServerLocator;
+import org.jboss.mx.util.ObjectNameFactory;
import org.jboss.portal.common.net.URLTools;
import org.jboss.portal.jems.as.system.AbstractJBossService;
import org.jboss.portal.wsrp.producer.config.ProducerConfiguration;
import org.jboss.portal.wsrp.producer.config.ProducerConfigurationFactory;
+import org.jboss.portal.wsrp.producer.config.ProducerConfigurationProvider;
import org.jboss.portal.wsrp.producer.config.ProducerConfigurationService;
+import org.jboss.xb.binding.JBossXBException;
import org.jboss.xb.binding.ObjectModelFactory;
+import org.jboss.xb.binding.ObjectModelProvider;
import org.jboss.xb.binding.Unmarshaller;
import org.jboss.xb.binding.UnmarshallerFactory;
+import org.jboss.xb.binding.XercesXsMarshaller;
+import javax.management.MBeanServer;
+import javax.management.ObjectName;
+import java.io.BufferedWriter;
+import java.io.File;
+import java.io.FileWriter;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.io.Reader;
+import java.io.StringWriter;
+import java.io.Writer;
import java.net.URL;
import java.util.Enumeration;
@@ -45,6 +62,10 @@
private String configLocation;
private ProducerConfiguration configuration;
+
+ private File dataDir;
+ private File config;
+
public String getConfigLocation()
{
return configLocation;
@@ -63,32 +84,119 @@
protected void startService() throws Exception
{
- // Setup URLs
- if (configLocation == null)
+ MBeanServer server = MBeanServerLocator.locateJBoss();
+ ObjectName oname = ObjectNameFactory.create("jboss.system:type=ServerConfig");
+ try
{
- throw new Exception("The config location is null");
+ dataDir = (File)server.getAttribute(oname, "ServerDataDir");
}
-
- // 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())
+ catch (Exception e)
{
- configURL = (URL)resources.nextElement();
+ throw new RuntimeException("Couldn't locate server data dir!", e);
}
+ config = new File(dataDir, "portal/wsrp-producer-config.xml");
- if (configURL == null)
+ reloadConfiguration();
+ }
+
+ public void reloadConfiguration() throws Exception
+ {
+ URL configURL = getConfigLocationURL();
+
+ try
{
- throw new Exception("The config " + configLocation + " does not exist");
+ loadConfigurationAt(configURL);
}
- if (!URLTools.exists(configURL))
+ catch (Exception e)
{
- throw new Exception("The config " + configURL + " does not exist");
+ if (config.exists())
+ {
+ log.debug("Configuration saved at " + config.getCanonicalPath()
+ + " is not loading properly. Falling back to default 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();
configuration = (ProducerConfiguration)unmarshaller.unmarshal(configURL.openStream(), factory, null);
}
+
+ 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.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/jboss-wsrp-producer_2_6.xsd");
+
+ Reader xsReader = new InputStreamReader(is);
+
+ // create an instance of XML Schema marshaller
+ XercesXsMarshaller marshaller = new XercesXsMarshaller();
+
+ // we need to specify what elements are top most (roots) providing namespace URI, prefix and local name
+ marshaller.addRootElement("urn:jboss:portal:wsrp:producer:v2_6", "", "producer-configuration");
+
+ // declare default namespace
+ marshaller.declareNamespace(null, "urn:jboss:portal:wsrp:producer:v2_6");
+
+ // add schema location by declaring xsi namespace and adding xsi:schemaLocation attribute
+ marshaller.declareNamespace("xsi", "http://www.w3.org/2001/XMLSchema-instance");
+ marshaller.addAttribute("xsi", "schemaLocation", "string", "urn:jboss:portal:wsrp:producer:v2_6 xsd/jboss-wsrp-producer_2_6.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();
+ }
}
Modified: trunk/wsrp/src/main/org/jboss/portal/wsrp/producer/config/impl/ProducerRegistrationRequirementsImpl.java
===================================================================
--- trunk/wsrp/src/main/org/jboss/portal/wsrp/producer/config/impl/ProducerRegistrationRequirementsImpl.java 2007-10-05 15:50:22 UTC (rev 8541)
+++ trunk/wsrp/src/main/org/jboss/portal/wsrp/producer/config/impl/ProducerRegistrationRequirementsImpl.java 2007-10-05 16:04:06 UTC (rev 8542)
@@ -192,9 +192,11 @@
if (policy != null)
{
policyClassName = policy.getClass().getName();
- if (DEFAULT_POLICY_CLASS_NAME.equals(policyClassName))
+
+ if (policy instanceof DefaultRegistrationPolicy)
{
- validatorClassName = ((DefaultRegistrationPolicy)policy).getValidator().getClass().getName();
+ DefaultRegistrationPolicy registrationPolicy = (DefaultRegistrationPolicy)policy;
+ validatorClassName = registrationPolicy.getValidator().getClass().getName();
}
}
}
@@ -212,7 +214,7 @@
public void reloadPolicyFrom(String policyClassName, String validatorClassName)
{
- if (policyClassName != null)
+ if (policyClassName != null && !DEFAULT_POLICY_CLASS_NAME.equals(policyClassName))
{
log.debug("Using registration policy: " + policyClassName);
ClassLoader loader = Thread.currentThread().getContextClassLoader();
Copied: trunk/wsrp/src/resources/portal-wsrp-sar/xsd (from rev 8541, branches/JBoss_Portal_Branch_2_6/wsrp/src/resources/portal-wsrp-sar/xsd)
Deleted: trunk/wsrp/src/resources/portal-wsrp-sar/xsd/jboss-wsrp-producer_2_6.xsd
===================================================================
--- branches/JBoss_Portal_Branch_2_6/wsrp/src/resources/portal-wsrp-sar/xsd/jboss-wsrp-producer_2_6.xsd 2007-10-05 15:50:22 UTC (rev 8541)
+++ trunk/wsrp/src/resources/portal-wsrp-sar/xsd/jboss-wsrp-producer_2_6.xsd 2007-10-05 16:04:06 UTC (rev 8542)
@@ -1,67 +0,0 @@
-<?xml version="1.0"?>
-
-<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- ~ JBoss, a division of Red Hat ~
- ~ Copyright 2007, Red Hat Middleware, LLC, and individual ~
- ~ contributors as indicated by the @authors tag. See the ~
- ~ copyright.txt in the distribution for a full listing of ~
- ~ individual contributors. ~
- ~ ~
- ~ This is free software; you can redistribute it and/or modify it ~
- ~ under the terms of the GNU Lesser General Public License as ~
- ~ published by the Free Software Foundation; either version 2.1 of ~
- ~ the License, or (at your option) any later version. ~
- ~ ~
- ~ This software is distributed in the hope that it will be useful, ~
- ~ but WITHOUT ANY WARRANTY; without even the implied warranty of ~
- ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ~
- ~ Lesser General Public License for more details. ~
- ~ ~
- ~ You should have received a copy of the GNU Lesser General Public ~
- ~ License along with this software; if not, write to the Free ~
- ~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA ~
- ~ 02110-1301 USA, or see the FSF site: http://www.fsf.org. ~
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
-<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
- targetNamespace="urn:jboss:portal:wsrp:producer:v2_6"
- xmlns="urn:jboss:portal:wsrp:producer:v2_6"
- xmlns:xml="http://www.w3.org/XML/1998/namespace">
-
- <xs:import namespace="http://www.w3.org/XML/1998/namespace" schemaLocation="http://www.w3.org/2001/xml.xsd"/>
-
- <xs:element name="producer-configuration">
- <xs:complexType>
- <xs:sequence>
- <xs:element name="registration-configuration" type="RegistrationConfiguration"/>
- </xs:sequence>
- <xs:attribute name="fullServiceDescriptionRequiresRegistration" type="xs:boolean" default="false"/>
- </xs:complexType>
- </xs:element>
-
- <xs:complexType name="RegistrationConfiguration">
- <xs:sequence>
- <xs:element name="registration-policy" type="xs:string" minOccurs="0"/>
- <xs:element name="registration-property-validator" type="xs:string" minOccurs="0"/>
- <xs:element name="registration-property-description" type="RegistrationPropertyDescription" minOccurs="0"
- maxOccurs="unbounded"/>
- </xs:sequence>
- </xs:complexType>
-
- <xs:complexType name="RegistrationPropertyDescription">
- <xs:sequence>
- <xs:element name="name" type="xs:string"/>
- <xs:element name="type" type="xs:string"/>
- <xs:element name="label" type="LocalizedString"/>
- <xs:element name="hint" type="LocalizedString" minOccurs="0"/>
- </xs:sequence>
- </xs:complexType>
-
- <xs:complexType name="LocalizedString">
- <xs:simpleContent>
- <xs:extension base="xs:string">
- <xs:attribute ref="xml:lang" use="required"/>
- <xs:attribute name="resourceName" type="xs:string" use="optional"/>
- </xs:extension>
- </xs:simpleContent>
- </xs:complexType>
-</xs:schema>
Copied: trunk/wsrp/src/resources/portal-wsrp-sar/xsd/jboss-wsrp-producer_2_6.xsd (from rev 8541, branches/JBoss_Portal_Branch_2_6/wsrp/src/resources/portal-wsrp-sar/xsd/jboss-wsrp-producer_2_6.xsd)
===================================================================
--- trunk/wsrp/src/resources/portal-wsrp-sar/xsd/jboss-wsrp-producer_2_6.xsd (rev 0)
+++ trunk/wsrp/src/resources/portal-wsrp-sar/xsd/jboss-wsrp-producer_2_6.xsd 2007-10-05 16:04:06 UTC (rev 8542)
@@ -0,0 +1,67 @@
+<?xml version="1.0"?>
+
+<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ ~ JBoss, a division of Red Hat ~
+ ~ Copyright 2007, Red Hat Middleware, LLC, and individual ~
+ ~ contributors as indicated by the @authors tag. See the ~
+ ~ copyright.txt in the distribution for a full listing of ~
+ ~ individual contributors. ~
+ ~ ~
+ ~ This is free software; you can redistribute it and/or modify it ~
+ ~ under the terms of the GNU Lesser General Public License as ~
+ ~ published by the Free Software Foundation; either version 2.1 of ~
+ ~ the License, or (at your option) any later version. ~
+ ~ ~
+ ~ This software is distributed in the hope that it will be useful, ~
+ ~ but WITHOUT ANY WARRANTY; without even the implied warranty of ~
+ ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ~
+ ~ Lesser General Public License for more details. ~
+ ~ ~
+ ~ You should have received a copy of the GNU Lesser General Public ~
+ ~ License along with this software; if not, write to the Free ~
+ ~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA ~
+ ~ 02110-1301 USA, or see the FSF site: http://www.fsf.org. ~
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
+ targetNamespace="urn:jboss:portal:wsrp:producer:v2_6"
+ xmlns="urn:jboss:portal:wsrp:producer:v2_6"
+ xmlns:xml="http://www.w3.org/XML/1998/namespace">
+
+ <xs:import namespace="http://www.w3.org/XML/1998/namespace" schemaLocation="http://www.w3.org/2001/xml.xsd"/>
+
+ <xs:element name="producer-configuration">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="registration-configuration" type="RegistrationConfiguration"/>
+ </xs:sequence>
+ <xs:attribute name="fullServiceDescriptionRequiresRegistration" type="xs:boolean" default="false"/>
+ </xs:complexType>
+ </xs:element>
+
+ <xs:complexType name="RegistrationConfiguration">
+ <xs:sequence>
+ <xs:element name="registration-policy" type="xs:string" minOccurs="0"/>
+ <xs:element name="registration-property-validator" type="xs:string" minOccurs="0"/>
+ <xs:element name="registration-property-description" type="RegistrationPropertyDescription" minOccurs="0"
+ maxOccurs="unbounded"/>
+ </xs:sequence>
+ </xs:complexType>
+
+ <xs:complexType name="RegistrationPropertyDescription">
+ <xs:sequence>
+ <xs:element name="name" type="xs:string"/>
+ <xs:element name="type" type="xs:string"/>
+ <xs:element name="label" type="LocalizedString"/>
+ <xs:element name="hint" type="LocalizedString" minOccurs="0"/>
+ </xs:sequence>
+ </xs:complexType>
+
+ <xs:complexType name="LocalizedString">
+ <xs:simpleContent>
+ <xs:extension base="xs:string">
+ <xs:attribute ref="xml:lang" use="required"/>
+ <xs:attribute name="resourceName" type="xs:string" use="optional"/>
+ </xs:extension>
+ </xs:simpleContent>
+ </xs:complexType>
+</xs:schema>
16 years, 8 months
JBoss Portal SVN: r8541 - in branches/JBoss_Portal_Branch_2_6: core-wsrp/src/resources/portal-wsrp-admin-war/WEB-INF and 5 other directories.
by portal-commits@lists.jboss.org
Author: chris.laprun(a)jboss.com
Date: 2007-10-05 11:50:22 -0400 (Fri, 05 Oct 2007)
New Revision: 8541
Added:
branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/wsrp/producer/config/ProducerConfigurationProvider.java
branches/JBoss_Portal_Branch_2_6/wsrp/src/resources/portal-wsrp-sar/xsd/
branches/JBoss_Portal_Branch_2_6/wsrp/src/resources/portal-wsrp-sar/xsd/jboss-wsrp-producer_2_6.xsd
Modified:
branches/JBoss_Portal_Branch_2_6/core-wsrp/src/main/org/jboss/portal/wsrp/admin/ui/ManagedBean.java
branches/JBoss_Portal_Branch_2_6/core-wsrp/src/main/org/jboss/portal/wsrp/admin/ui/ProducerBean.java
branches/JBoss_Portal_Branch_2_6/core-wsrp/src/resources/portal-wsrp-admin-war/WEB-INF/faces-config.xml
branches/JBoss_Portal_Branch_2_6/wsrp/build.xml
branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/wsrp/producer/config/ProducerConfigurationService.java
branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/wsrp/producer/config/impl/ProducerConfigurationServiceImpl.java
branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/wsrp/producer/config/impl/ProducerRegistrationRequirementsImpl.java
Log:
- JBPORTAL-1715: Added support for saving producer configuration (finally figured out that you can't use a FileWriter directly to marshall objects with XB).
- Added XML Schema version of the producer configuration file format (required for XB marshalling to work properly, haven't been able to use the DTD for that purpose).
- Added logging to ManagedBean.
Modified: branches/JBoss_Portal_Branch_2_6/core-wsrp/src/main/org/jboss/portal/wsrp/admin/ui/ManagedBean.java
===================================================================
--- branches/JBoss_Portal_Branch_2_6/core-wsrp/src/main/org/jboss/portal/wsrp/admin/ui/ManagedBean.java 2007-10-05 15:42:10 UTC (rev 8540)
+++ branches/JBoss_Portal_Branch_2_6/core-wsrp/src/main/org/jboss/portal/wsrp/admin/ui/ManagedBean.java 2007-10-05 15:50:22 UTC (rev 8541)
@@ -23,6 +23,9 @@
package org.jboss.portal.wsrp.admin.ui;
+import org.jboss.logging.Logger;
+
+
/**
* @author <a href="mailto:chris.laprun@jboss.com">Chris Laprun</a>
* @version $Revision: 7509 $
@@ -30,6 +33,8 @@
*/
public class ManagedBean
{
+ protected Logger log = Logger.getLogger(getClass());
+
protected BeanContext beanContext;
public void setBeanContext(BeanContext beanContext)
Modified: branches/JBoss_Portal_Branch_2_6/core-wsrp/src/main/org/jboss/portal/wsrp/admin/ui/ProducerBean.java
===================================================================
--- branches/JBoss_Portal_Branch_2_6/core-wsrp/src/main/org/jboss/portal/wsrp/admin/ui/ProducerBean.java 2007-10-05 15:42:10 UTC (rev 8540)
+++ branches/JBoss_Portal_Branch_2_6/core-wsrp/src/main/org/jboss/portal/wsrp/admin/ui/ProducerBean.java 2007-10-05 15:50:22 UTC (rev 8541)
@@ -26,6 +26,7 @@
import org.jboss.portal.registration.RegistrationPolicy;
import org.jboss.portal.registration.policies.DefaultRegistrationPolicy;
import org.jboss.portal.wsrp.producer.config.ProducerConfiguration;
+import org.jboss.portal.wsrp.producer.config.ProducerConfigurationService;
import org.jboss.portal.wsrp.producer.config.ProducerRegistrationRequirements;
import org.jboss.portal.wsrp.registration.RegistrationPropertyDescription;
@@ -43,20 +44,25 @@
*/
public class ProducerBean extends ManagedBean
{
- private ProducerConfiguration configuration;
+ private ProducerConfigurationService configurationService;
private String policyClassName;
private String validatorClassName;
- public ProducerConfiguration getConfiguration()
+ public ProducerConfigurationService getConfigurationService()
{
- return configuration;
+ return configurationService;
}
- public void setConfiguration(ProducerConfiguration configuration)
+ public void setConfigurationService(ProducerConfigurationService configurationService)
{
- this.configuration = configuration;
+ this.configurationService = configurationService;
}
+ public ProducerConfiguration getConfiguration()
+ {
+ return configurationService.getConfiguration();
+ }
+
public boolean isRegistrationRequiredForFullDescription()
{
return getRegRequirements().isRegistrationRequiredForFullDescription();
@@ -64,7 +70,7 @@
private ProducerRegistrationRequirements getRegRequirements()
{
- return configuration.getRegistrationRequirements();
+ return getConfiguration().getRegistrationRequirements();
}
public void setRegistrationRequiredForFullDescription(boolean requireRegForFullDescription)
@@ -139,4 +145,18 @@
{
return Collections.singletonList(new SelectItem("xsd:string"));
}
+
+ public String save()
+ {
+ try
+ {
+ configurationService.saveConfiguration();
+ }
+ catch (Exception e)
+ {
+ log.debug(e);
+ beanContext.createErrorMessage("status", "Couldn't save producer configuration. Cause: " + e.getLocalizedMessage());
+ }
+ return null;
+ }
}
Modified: branches/JBoss_Portal_Branch_2_6/core-wsrp/src/resources/portal-wsrp-admin-war/WEB-INF/faces-config.xml
===================================================================
--- branches/JBoss_Portal_Branch_2_6/core-wsrp/src/resources/portal-wsrp-admin-war/WEB-INF/faces-config.xml 2007-10-05 15:42:10 UTC (rev 8540)
+++ branches/JBoss_Portal_Branch_2_6/core-wsrp/src/resources/portal-wsrp-admin-war/WEB-INF/faces-config.xml 2007-10-05 15:50:22 UTC (rev 8541)
@@ -85,9 +85,9 @@
<managed-bean-class>org.jboss.portal.wsrp.admin.ui.ProducerBean</managed-bean-class>
<managed-bean-scope>session</managed-bean-scope>
<managed-property>
- <property-name>configuration</property-name>
- <property-class>org.jboss.portal.wsrp.producer.config.ProducerConfiguration</property-class>
- <value>#{applicationScope.ProducerConfigurationService.configuration}</value>
+ <property-name>configurationService</property-name>
+ <property-class>org.jboss.portal.wsrp.producer.config.ProducerConfigurationService</property-class>
+ <value>#{applicationScope.ProducerConfigurationService}</value>
</managed-property>
<managed-property>
<property-name>beanContext</property-name>
Modified: branches/JBoss_Portal_Branch_2_6/wsrp/build.xml
===================================================================
--- branches/JBoss_Portal_Branch_2_6/wsrp/build.xml 2007-10-05 15:42:10 UTC (rev 8540)
+++ branches/JBoss_Portal_Branch_2_6/wsrp/build.xml 2007-10-05 15:50:22 UTC (rev 8541)
@@ -135,7 +135,8 @@
<!-- needed to compile on JDK 1.4 -->
<pathelement path="${jbossas/core.libs.lib}/namespace.jar"/>
-
+
+ <path refid="apache.xerces.classpath"/>
<path refid="ibm.wsdl4j.classpath"/>
<path refid="jboss.jbossxb.classpath"/>
<path refid="apache.httpclient.classpath"/>
@@ -314,13 +315,14 @@
<!-- Build Admin GUI... -->
<ant inheritAll="false" antfile="../core-wsrp/build.xml" output="output.log" dir="../core-wsrp" target="output">
- <property name="build.lib" value="${build.lib}"/>
- <property name="build.resources" value="${build.resources}"/>
+ <property name="build.lib" value="${build.lib}"/>
+ <property name="build.resources" value="${build.resources}"/>
</ant>
<copy todir="${build.resources}/portal-wsrp-sar" overwrite="true">
<fileset dir="${build.lib}" includes="portal-wsrp-client.jar"/>
<fileset dir="${build.lib}" includes="portal-wsrp.jse"/>
- </copy>
+ </copy>
+
<copy todir="${build.resources}/portal-wsrp-sar" overwrite="true">
<fileset dir="${build.lib}" includes="portal-wsrp-lib.jar"/>
<fileset dir="./output/lib" includes="portal-wsrp-admin.war"/>
Added: branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/wsrp/producer/config/ProducerConfigurationProvider.java
===================================================================
--- branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/wsrp/producer/config/ProducerConfigurationProvider.java (rev 0)
+++ branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/wsrp/producer/config/ProducerConfigurationProvider.java 2007-10-05 15:50:22 UTC (rev 8541)
@@ -0,0 +1,147 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2007, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+
+package org.jboss.portal.wsrp.producer.config;
+
+import org.jboss.portal.registration.RegistrationPolicy;
+import org.jboss.portal.registration.policies.DefaultRegistrationPolicy;
+import org.jboss.portal.wsrp.producer.config.impl.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$
+ * @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 ("fullServiceDescriptionRequiresRegistration".equals(localName))
+ {
+ return configuration.getRegistrationRequirements().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 = propertyDescription.getLabel();
+ }
+ else if ("hint".equals(localName))
+ {
+ value = propertyDescription.getHint();
+ }
+ return value;
+ }
+
+ public Object getAttributeValue(LocalizedString localizedString, String namespaceUri, String localName)
+ {
+ Object value = null;
+ if ("lang".equals(localName))
+ {
+ value = localizedString.getLocale().getCountry();
+ }
+ else if ("resourceName".equals(localName))
+ {
+ value = localizedString.getResourceName();
+ }
+ return value;
+ }
+}
Property changes on: branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/wsrp/producer/config/ProducerConfigurationProvider.java
___________________________________________________________________
Name: svn:keywords
+ Author Date Id Revision
Name: svn:eol-style
+ native
Modified: branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/wsrp/producer/config/ProducerConfigurationService.java
===================================================================
--- branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/wsrp/producer/config/ProducerConfigurationService.java 2007-10-05 15:42:10 UTC (rev 8540)
+++ branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/wsrp/producer/config/ProducerConfigurationService.java 2007-10-05 15:50:22 UTC (rev 8541)
@@ -31,4 +31,20 @@
public interface ProducerConfigurationService
{
public ProducerConfiguration getConfiguration();
+
+ /**
+ * Reloads the producer configuration from persistent storage.
+ *
+ * @throws Exception
+ * @since 2.6.3
+ */
+ void reloadConfiguration() throws Exception;
+
+ /**
+ * Saves the producer configuration to persistent storage.
+ *
+ * @throws Exception
+ * @since 2.6.3
+ */
+ void saveConfiguration() throws Exception;
}
Modified: branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/wsrp/producer/config/impl/ProducerConfigurationServiceImpl.java
===================================================================
--- branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/wsrp/producer/config/impl/ProducerConfigurationServiceImpl.java 2007-10-05 15:42:10 UTC (rev 8540)
+++ branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/wsrp/producer/config/impl/ProducerConfigurationServiceImpl.java 2007-10-05 15:50:22 UTC (rev 8541)
@@ -23,15 +23,32 @@
package org.jboss.portal.wsrp.producer.config.impl;
+import org.jboss.mx.util.MBeanServerLocator;
+import org.jboss.mx.util.ObjectNameFactory;
import org.jboss.portal.common.net.URLTools;
import org.jboss.portal.jems.as.system.AbstractJBossService;
import org.jboss.portal.wsrp.producer.config.ProducerConfiguration;
import org.jboss.portal.wsrp.producer.config.ProducerConfigurationFactory;
+import org.jboss.portal.wsrp.producer.config.ProducerConfigurationProvider;
import org.jboss.portal.wsrp.producer.config.ProducerConfigurationService;
+import org.jboss.xb.binding.JBossXBException;
import org.jboss.xb.binding.ObjectModelFactory;
+import org.jboss.xb.binding.ObjectModelProvider;
import org.jboss.xb.binding.Unmarshaller;
import org.jboss.xb.binding.UnmarshallerFactory;
+import org.jboss.xb.binding.XercesXsMarshaller;
+import javax.management.MBeanServer;
+import javax.management.ObjectName;
+import java.io.BufferedWriter;
+import java.io.File;
+import java.io.FileWriter;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.io.Reader;
+import java.io.StringWriter;
+import java.io.Writer;
import java.net.URL;
import java.util.Enumeration;
@@ -45,6 +62,10 @@
private String configLocation;
private ProducerConfiguration configuration;
+
+ private File dataDir;
+ private File config;
+
public String getConfigLocation()
{
return configLocation;
@@ -63,32 +84,119 @@
protected void startService() throws Exception
{
- // Setup URLs
- if (configLocation == null)
+ MBeanServer server = MBeanServerLocator.locateJBoss();
+ ObjectName oname = ObjectNameFactory.create("jboss.system:type=ServerConfig");
+ try
{
- throw new Exception("The config location is null");
+ dataDir = (File)server.getAttribute(oname, "ServerDataDir");
}
-
- // 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())
+ catch (Exception e)
{
- configURL = (URL)resources.nextElement();
+ throw new RuntimeException("Couldn't locate server data dir!", e);
}
+ config = new File(dataDir, "portal/wsrp-producer-config.xml");
- if (configURL == null)
+ reloadConfiguration();
+ }
+
+ public void reloadConfiguration() throws Exception
+ {
+ URL configURL = getConfigLocationURL();
+
+ try
{
- throw new Exception("The config " + configLocation + " does not exist");
+ loadConfigurationAt(configURL);
}
- if (!URLTools.exists(configURL))
+ catch (Exception e)
{
- throw new Exception("The config " + configURL + " does not exist");
+ if (config.exists())
+ {
+ log.debug("Configuration saved at " + config.getCanonicalPath()
+ + " is not loading properly. Falling back to default 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();
configuration = (ProducerConfiguration)unmarshaller.unmarshal(configURL.openStream(), factory, null);
}
+
+ 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.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/jboss-wsrp-producer_2_6.xsd");
+
+ Reader xsReader = new InputStreamReader(is);
+
+ // create an instance of XML Schema marshaller
+ XercesXsMarshaller marshaller = new XercesXsMarshaller();
+
+ // we need to specify what elements are top most (roots) providing namespace URI, prefix and local name
+ marshaller.addRootElement("urn:jboss:portal:wsrp:producer:v2_6", "", "producer-configuration");
+
+ // declare default namespace
+ marshaller.declareNamespace(null, "urn:jboss:portal:wsrp:producer:v2_6");
+
+ // add schema location by declaring xsi namespace and adding xsi:schemaLocation attribute
+ marshaller.declareNamespace("xsi", "http://www.w3.org/2001/XMLSchema-instance");
+ marshaller.addAttribute("xsi", "schemaLocation", "string", "urn:jboss:portal:wsrp:producer:v2_6 xsd/jboss-wsrp-producer_2_6.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();
+ }
}
Modified: branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/wsrp/producer/config/impl/ProducerRegistrationRequirementsImpl.java
===================================================================
--- branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/wsrp/producer/config/impl/ProducerRegistrationRequirementsImpl.java 2007-10-05 15:42:10 UTC (rev 8540)
+++ branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/wsrp/producer/config/impl/ProducerRegistrationRequirementsImpl.java 2007-10-05 15:50:22 UTC (rev 8541)
@@ -192,9 +192,11 @@
if (policy != null)
{
policyClassName = policy.getClass().getName();
- if (DEFAULT_POLICY_CLASS_NAME.equals(policyClassName))
+
+ if (policy instanceof DefaultRegistrationPolicy)
{
- validatorClassName = ((DefaultRegistrationPolicy)policy).getValidator().getClass().getName();
+ DefaultRegistrationPolicy registrationPolicy = (DefaultRegistrationPolicy)policy;
+ validatorClassName = registrationPolicy.getValidator().getClass().getName();
}
}
}
@@ -212,7 +214,7 @@
public void reloadPolicyFrom(String policyClassName, String validatorClassName)
{
- if (policyClassName != null)
+ if (policyClassName != null && !DEFAULT_POLICY_CLASS_NAME.equals(policyClassName))
{
log.debug("Using registration policy: " + policyClassName);
ClassLoader loader = Thread.currentThread().getContextClassLoader();
Added: branches/JBoss_Portal_Branch_2_6/wsrp/src/resources/portal-wsrp-sar/xsd/jboss-wsrp-producer_2_6.xsd
===================================================================
--- branches/JBoss_Portal_Branch_2_6/wsrp/src/resources/portal-wsrp-sar/xsd/jboss-wsrp-producer_2_6.xsd (rev 0)
+++ branches/JBoss_Portal_Branch_2_6/wsrp/src/resources/portal-wsrp-sar/xsd/jboss-wsrp-producer_2_6.xsd 2007-10-05 15:50:22 UTC (rev 8541)
@@ -0,0 +1,67 @@
+<?xml version="1.0"?>
+
+<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ ~ JBoss, a division of Red Hat ~
+ ~ Copyright 2007, Red Hat Middleware, LLC, and individual ~
+ ~ contributors as indicated by the @authors tag. See the ~
+ ~ copyright.txt in the distribution for a full listing of ~
+ ~ individual contributors. ~
+ ~ ~
+ ~ This is free software; you can redistribute it and/or modify it ~
+ ~ under the terms of the GNU Lesser General Public License as ~
+ ~ published by the Free Software Foundation; either version 2.1 of ~
+ ~ the License, or (at your option) any later version. ~
+ ~ ~
+ ~ This software is distributed in the hope that it will be useful, ~
+ ~ but WITHOUT ANY WARRANTY; without even the implied warranty of ~
+ ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ~
+ ~ Lesser General Public License for more details. ~
+ ~ ~
+ ~ You should have received a copy of the GNU Lesser General Public ~
+ ~ License along with this software; if not, write to the Free ~
+ ~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA ~
+ ~ 02110-1301 USA, or see the FSF site: http://www.fsf.org. ~
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
+ targetNamespace="urn:jboss:portal:wsrp:producer:v2_6"
+ xmlns="urn:jboss:portal:wsrp:producer:v2_6"
+ xmlns:xml="http://www.w3.org/XML/1998/namespace">
+
+ <xs:import namespace="http://www.w3.org/XML/1998/namespace" schemaLocation="http://www.w3.org/2001/xml.xsd"/>
+
+ <xs:element name="producer-configuration">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="registration-configuration" type="RegistrationConfiguration"/>
+ </xs:sequence>
+ <xs:attribute name="fullServiceDescriptionRequiresRegistration" type="xs:boolean" default="false"/>
+ </xs:complexType>
+ </xs:element>
+
+ <xs:complexType name="RegistrationConfiguration">
+ <xs:sequence>
+ <xs:element name="registration-policy" type="xs:string" minOccurs="0"/>
+ <xs:element name="registration-property-validator" type="xs:string" minOccurs="0"/>
+ <xs:element name="registration-property-description" type="RegistrationPropertyDescription" minOccurs="0"
+ maxOccurs="unbounded"/>
+ </xs:sequence>
+ </xs:complexType>
+
+ <xs:complexType name="RegistrationPropertyDescription">
+ <xs:sequence>
+ <xs:element name="name" type="xs:string"/>
+ <xs:element name="type" type="xs:string"/>
+ <xs:element name="label" type="LocalizedString"/>
+ <xs:element name="hint" type="LocalizedString" minOccurs="0"/>
+ </xs:sequence>
+ </xs:complexType>
+
+ <xs:complexType name="LocalizedString">
+ <xs:simpleContent>
+ <xs:extension base="xs:string">
+ <xs:attribute ref="xml:lang" use="required"/>
+ <xs:attribute name="resourceName" type="xs:string" use="optional"/>
+ </xs:extension>
+ </xs:simpleContent>
+ </xs:complexType>
+</xs:schema>
16 years, 8 months
JBoss Portal SVN: r8540 - maven and 1 other directory.
by portal-commits@lists.jboss.org
Author: julien(a)jboss.com
Date: 2007-10-05 11:42:10 -0400 (Fri, 05 Oct 2007)
New Revision: 8540
Added:
maven/
maven/pom.xml
Removed:
pom.xml
Log:
moving default pom to /maven to avoid entire tree checkout
Copied: maven/pom.xml (from rev 8539, pom.xml)
===================================================================
--- maven/pom.xml (rev 0)
+++ maven/pom.xml 2007-10-05 15:42:10 UTC (rev 8540)
@@ -0,0 +1,205 @@
+<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">
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.jboss.portal</groupId>
+ <artifactId>jboss-portal</artifactId>
+ <packaging>pom</packaging>
+ <name>JBoss Portal</name>
+ <version>1.1.0-SNAPSHOT</version>
+ <url>http://labs.jboss.com/jbossportal</url>
+
+ <dependencies/>
+
+ <repositories>
+ <repository>
+ <id>repository.jboss.org</id>
+ <name>JBoss Repository</name>
+ <layout>default</layout>
+ <url>http://repository.jboss.org/maven2/</url>
+ <snapshots>
+ <enabled>false</enabled>
+ </snapshots>
+ </repository>
+ <repository>
+ <id>snapshots.jboss.org</id>
+ <name>JBoss Snapshots Repository</name>
+ <layout>default</layout>
+ <url>http://snapshots.jboss.org/maven2/</url>
+ <snapshots>
+ <enabled>true</enabled>
+ </snapshots>
+ <releases>
+ <enabled>false</enabled>
+ </releases>
+ </repository>
+ </repositories>
+
+ <build>
+ <extensions>
+ <extension>
+ <groupId>org.apache.maven.wagon</groupId>
+ <artifactId>wagon-webdav</artifactId>
+ <version>1.0-beta-2</version>
+ </extension>
+ </extensions>
+ <pluginManagement>
+ <plugins>
+ <plugin>
+ <inherited>true</inherited>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <configuration>
+ <source>1.5</source>
+ <target>1.5</target>
+ <showDeprecation>true</showDeprecation>
+ <showWarnings>true</showWarnings>
+ <optimize>true</optimize>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>jboss-packaging-maven-plugin</artifactId>
+ <version>2.0-SNAPSHOT</version>
+ <extensions>true</extensions>
+ </plugin>
+ <plugin>
+ <artifactId>maven-idea-plugin</artifactId>
+ <configuration>
+ <downloadSources>true</downloadSources>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.jboss.maven.plugins</groupId>
+ <artifactId>maven-jboss-deploy-plugin</artifactId>
+ <version>1.3</version>
+ <executions>
+ <execution>
+ <goals>
+ <goal>jboss-deploy</goal>
+ </goals>
+ </execution>
+ </executions>
+ <configuration>
+ <jbossDeployRoot>${jboss.repository.root}</jbossDeployRoot>
+ </configuration>
+ </plugin>
+ </plugins>
+ </pluginManagement>
+ </build>
+
+ <distributionManagement>
+ <!--<repository>-->
+ <!--Copy the distribution jar file to a local checkout of the maven repository
+ - This variable can be set in $MAVEN_HOME/conf/settings.xml-->
+ <!--<id>repository.jboss.org</id>-->
+ <!--<url>file://${jboss.repository.root}</url>-->
+ <!--</repository>-->
+ <snapshotRepository>
+ <id>snapshots.jboss.org</id>
+ <name>JBoss Snapshot Repository</name>
+ <url>dav:https://snapshots.jboss.org/maven2</url>
+ <uniqueVersion>true</uniqueVersion>
+ </snapshotRepository>
+ </distributionManagement>
+
+
+ <!--<modules>
+ <module>modules/common</module>
+ </modules>-->
+
+
+ <issueManagement>
+ <system>JIRA</system>
+ <url>http://jira.jboss.com/jira/browse/JBPORTAL</url>
+ </issueManagement>
+ <ciManagement>
+ <system>cruisecontrol</system>
+ </ciManagement>
+ <developers>
+ <developer>
+ <id>jviet</id>
+ <name>Julien Viet</name>
+ <email>jviet(a)redhat.com</email>
+ <organization>JBoss a division of Red Hat</organization>
+ <organizationUrl>http://www.jboss.org</organizationUrl>
+ <roles>
+ <role>lead</role>
+ </roles>
+ <timezone>+1</timezone>
+ </developer>
+ <developer>
+ <id>whales</id>
+ <name>Wesley Hales</name>
+ <email>whales(a)redhat.com</email>
+ <organization>JBoss a division of Red Hat</organization>
+ <organizationUrl>http://www.jboss.org</organizationUrl>
+ <roles>
+ <role>ui</role>
+ <role>developer</role>
+ </roles>
+ <timezone>-4</timezone>
+ </developer>
+ <!--TODO: Add rest of team-->
+ <!--developer>
+ <id></id>
+ <name></name>
+ <email></email>
+ <organization>JBoss a division of Red Hat</organization>
+ <organizationUrl>http://www.jboss.org</organizationUrl>
+ <roles>
+ <role></role>
+ </roles>
+ <timezone></timezone>
+ </developer-->
+ </developers>
+ <licenses>
+ <license>
+ <name>LGPL 2.1</name>
+ <url>http://www.gnu.org/licenses/lgpl.html</url>
+ <distribution>repo</distribution>
+ <comments>
+ GNU LESSER GENERAL PUBLIC LICENSE Version 2.1
+ </comments>
+ </license>
+ </licenses>
+ <scm>
+ <connection>scm:svn:http://anonsvn.jboss.org/repos/portal/trunk</connection>
+ <developerConnection>scm:svn:https://svn.jboss.org/repos/portal/trunk</developerConnection>
+ <url>https://svn.jboss.org/repos/portal/trunk</url>
+ </scm>
+
+ <reporting>
+ <plugins>
+ <plugin>
+ <artifactId>maven-changes-plugin</artifactId>
+ </plugin>
+ <plugin>
+ <artifactId>maven-checkstyle-plugin</artifactId>
+ </plugin>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>cobertura-maven-plugin</artifactId>
+ <version>2.0</version>
+ </plugin>
+ <plugin>
+ <artifactId>maven-javadoc-plugin</artifactId>
+ </plugin>
+ <plugin>
+ <artifactId>maven-jxr-plugin</artifactId>
+ </plugin>
+ <plugin>
+ <artifactId>maven-pmd-plugin</artifactId>
+ <configuration>
+ <linkXref>true</linkXref>
+ <targetJdk>1.5</targetJdk>
+ </configuration>
+ </plugin>
+ <plugin>
+ <artifactId>maven-surefire-report-plugin</artifactId>
+ </plugin>
+ </plugins>
+ </reporting>
+
+ <properties/>
+
+</project>
Deleted: pom.xml
===================================================================
--- pom.xml 2007-10-05 15:39:15 UTC (rev 8539)
+++ pom.xml 2007-10-05 15:42:10 UTC (rev 8540)
@@ -1,205 +0,0 @@
-<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">
- <modelVersion>4.0.0</modelVersion>
- <groupId>org.jboss.portal</groupId>
- <artifactId>jboss-portal</artifactId>
- <packaging>pom</packaging>
- <name>JBoss Portal</name>
- <version>1.1.0-SNAPSHOT</version>
- <url>http://labs.jboss.com/jbossportal</url>
-
- <dependencies/>
-
- <repositories>
- <repository>
- <id>repository.jboss.org</id>
- <name>JBoss Repository</name>
- <layout>default</layout>
- <url>http://repository.jboss.org/maven2/</url>
- <snapshots>
- <enabled>false</enabled>
- </snapshots>
- </repository>
- <repository>
- <id>snapshots.jboss.org</id>
- <name>JBoss Snapshots Repository</name>
- <layout>default</layout>
- <url>http://snapshots.jboss.org/maven2/</url>
- <snapshots>
- <enabled>true</enabled>
- </snapshots>
- <releases>
- <enabled>false</enabled>
- </releases>
- </repository>
- </repositories>
-
- <build>
- <extensions>
- <extension>
- <groupId>org.apache.maven.wagon</groupId>
- <artifactId>wagon-webdav</artifactId>
- <version>1.0-beta-2</version>
- </extension>
- </extensions>
- <pluginManagement>
- <plugins>
- <plugin>
- <inherited>true</inherited>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-compiler-plugin</artifactId>
- <configuration>
- <source>1.5</source>
- <target>1.5</target>
- <showDeprecation>true</showDeprecation>
- <showWarnings>true</showWarnings>
- <optimize>true</optimize>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>jboss-packaging-maven-plugin</artifactId>
- <version>2.0-SNAPSHOT</version>
- <extensions>true</extensions>
- </plugin>
- <plugin>
- <artifactId>maven-idea-plugin</artifactId>
- <configuration>
- <downloadSources>true</downloadSources>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.jboss.maven.plugins</groupId>
- <artifactId>maven-jboss-deploy-plugin</artifactId>
- <version>1.3</version>
- <executions>
- <execution>
- <goals>
- <goal>jboss-deploy</goal>
- </goals>
- </execution>
- </executions>
- <configuration>
- <jbossDeployRoot>${jboss.repository.root}</jbossDeployRoot>
- </configuration>
- </plugin>
- </plugins>
- </pluginManagement>
- </build>
-
- <distributionManagement>
- <!--<repository>-->
- <!--Copy the distribution jar file to a local checkout of the maven repository
- - This variable can be set in $MAVEN_HOME/conf/settings.xml-->
- <!--<id>repository.jboss.org</id>-->
- <!--<url>file://${jboss.repository.root}</url>-->
- <!--</repository>-->
- <snapshotRepository>
- <id>snapshots.jboss.org</id>
- <name>JBoss Snapshot Repository</name>
- <url>dav:https://snapshots.jboss.org/maven2</url>
- <uniqueVersion>true</uniqueVersion>
- </snapshotRepository>
- </distributionManagement>
-
-
- <!--<modules>
- <module>modules/common</module>
- </modules>-->
-
-
- <issueManagement>
- <system>JIRA</system>
- <url>http://jira.jboss.com/jira/browse/JBPORTAL</url>
- </issueManagement>
- <ciManagement>
- <system>cruisecontrol</system>
- </ciManagement>
- <developers>
- <developer>
- <id>jviet</id>
- <name>Julien Viet</name>
- <email>jviet(a)redhat.com</email>
- <organization>JBoss a division of Red Hat</organization>
- <organizationUrl>http://www.jboss.org</organizationUrl>
- <roles>
- <role>lead</role>
- </roles>
- <timezone>+1</timezone>
- </developer>
- <developer>
- <id>whales</id>
- <name>Wesley Hales</name>
- <email>whales(a)redhat.com</email>
- <organization>JBoss a division of Red Hat</organization>
- <organizationUrl>http://www.jboss.org</organizationUrl>
- <roles>
- <role>ui</role>
- <role>developer</role>
- </roles>
- <timezone>-4</timezone>
- </developer>
- <!--TODO: Add rest of team-->
- <!--developer>
- <id></id>
- <name></name>
- <email></email>
- <organization>JBoss a division of Red Hat</organization>
- <organizationUrl>http://www.jboss.org</organizationUrl>
- <roles>
- <role></role>
- </roles>
- <timezone></timezone>
- </developer-->
- </developers>
- <licenses>
- <license>
- <name>LGPL 2.1</name>
- <url>http://www.gnu.org/licenses/lgpl.html</url>
- <distribution>repo</distribution>
- <comments>
- GNU LESSER GENERAL PUBLIC LICENSE Version 2.1
- </comments>
- </license>
- </licenses>
- <scm>
- <connection>scm:svn:http://anonsvn.jboss.org/repos/portal/trunk</connection>
- <developerConnection>scm:svn:https://svn.jboss.org/repos/portal/trunk</developerConnection>
- <url>https://svn.jboss.org/repos/portal/trunk</url>
- </scm>
-
- <reporting>
- <plugins>
- <plugin>
- <artifactId>maven-changes-plugin</artifactId>
- </plugin>
- <plugin>
- <artifactId>maven-checkstyle-plugin</artifactId>
- </plugin>
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>cobertura-maven-plugin</artifactId>
- <version>2.0</version>
- </plugin>
- <plugin>
- <artifactId>maven-javadoc-plugin</artifactId>
- </plugin>
- <plugin>
- <artifactId>maven-jxr-plugin</artifactId>
- </plugin>
- <plugin>
- <artifactId>maven-pmd-plugin</artifactId>
- <configuration>
- <linkXref>true</linkXref>
- <targetJdk>1.5</targetJdk>
- </configuration>
- </plugin>
- <plugin>
- <artifactId>maven-surefire-report-plugin</artifactId>
- </plugin>
- </plugins>
- </reporting>
-
- <properties/>
-
-</project>
16 years, 8 months
JBoss Portal SVN: r8539 - /.
by portal-commits@lists.jboss.org
Author: julien(a)jboss.com
Date: 2007-10-05 11:39:15 -0400 (Fri, 05 Oct 2007)
New Revision: 8539
Modified:
pom.xml
Log:
fixed a few typos
Modified: pom.xml
===================================================================
--- pom.xml 2007-10-04 23:21:17 UTC (rev 8538)
+++ pom.xml 2007-10-05 15:39:15 UTC (rev 8539)
@@ -4,7 +4,7 @@
<groupId>org.jboss.portal</groupId>
<artifactId>jboss-portal</artifactId>
<packaging>pom</packaging>
- <name>Jboss Portal</name>
+ <name>JBoss Portal</name>
<version>1.1.0-SNAPSHOT</version>
<url>http://labs.jboss.com/jbossportal</url>
@@ -120,10 +120,10 @@
<id>jviet</id>
<name>Julien Viet</name>
<email>jviet(a)redhat.com</email>
- <organization>Jboss a division of Red Hat</organization>
+ <organization>JBoss a division of Red Hat</organization>
<organizationUrl>http://www.jboss.org</organizationUrl>
<roles>
- <role>Portal lead</role>
+ <role>lead</role>
</roles>
<timezone>+1</timezone>
</developer>
@@ -131,7 +131,7 @@
<id>whales</id>
<name>Wesley Hales</name>
<email>whales(a)redhat.com</email>
- <organization>Jboss a division of Red Hat</organization>
+ <organization>JBoss a division of Red Hat</organization>
<organizationUrl>http://www.jboss.org</organizationUrl>
<roles>
<role>ui</role>
@@ -144,7 +144,7 @@
<id></id>
<name></name>
<email></email>
- <organization>Jboss a division of Red Hat</organization>
+ <organization>JBoss a division of Red Hat</organization>
<organizationUrl>http://www.jboss.org</organizationUrl>
<roles>
<role></role>
@@ -202,4 +202,4 @@
<properties/>
-</project>
\ No newline at end of file
+</project>
16 years, 8 months
JBoss Portal SVN: r8538 - in modules/common/trunk: build/ide/intellij/idea60/modules/mc and 2 other directories.
by portal-commits@lists.jboss.org
Author: julien(a)jboss.com
Date: 2007-10-04 19:21:17 -0400 (Thu, 04 Oct 2007)
New Revision: 8538
Removed:
modules/common/trunk/common/src/resources/
Modified:
modules/common/trunk/build/ide/intellij/idea60/modules/common/common.iml
modules/common/trunk/build/ide/intellij/idea60/modules/mc/mc.iml
modules/common/trunk/build/ide/intellij/idea60/modules/portal/portal.iml
Log:
remove empty dirs
Modified: modules/common/trunk/build/ide/intellij/idea60/modules/common/common.iml
===================================================================
--- modules/common/trunk/build/ide/intellij/idea60/modules/common/common.iml 2007-10-04 22:41:52 UTC (rev 8537)
+++ modules/common/trunk/build/ide/intellij/idea60/modules/common/common.iml 2007-10-04 23:21:17 UTC (rev 8538)
@@ -225,7 +225,6 @@
<sourceFolder url="file://$MODULE_DIR$/../../../../../../common/src/main/resources" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/../../../../../../common/src/test/java" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/../../../../../../common/src/test/resources" isTestSource="false" />
- <excludeFolder url="file://$MODULE_DIR$/../../../../../../common/output" />
<excludeFolder url="file://$MODULE_DIR$/../../../../../../common/target" />
</content>
<orderEntry type="inheritedJdk" />
Modified: modules/common/trunk/build/ide/intellij/idea60/modules/mc/mc.iml
===================================================================
--- modules/common/trunk/build/ide/intellij/idea60/modules/mc/mc.iml 2007-10-04 22:41:52 UTC (rev 8537)
+++ modules/common/trunk/build/ide/intellij/idea60/modules/mc/mc.iml 2007-10-04 23:21:17 UTC (rev 8538)
@@ -5,6 +5,7 @@
<exclude-output />
<content url="file://$MODULE_DIR$/../../../../../../mc">
<sourceFolder url="file://$MODULE_DIR$/../../../../../../mc/src/main/java" isTestSource="false" />
+ <excludeFolder url="file://$MODULE_DIR$/../../../../../../mc/target" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
Modified: modules/common/trunk/build/ide/intellij/idea60/modules/portal/portal.iml
===================================================================
--- modules/common/trunk/build/ide/intellij/idea60/modules/portal/portal.iml 2007-10-04 22:41:52 UTC (rev 8537)
+++ modules/common/trunk/build/ide/intellij/idea60/modules/portal/portal.iml 2007-10-04 23:21:17 UTC (rev 8538)
@@ -5,6 +5,7 @@
<exclude-output />
<content url="file://$MODULE_DIR$/../../../../../../portal">
<sourceFolder url="file://$MODULE_DIR$/../../../../../../portal/src/main/java" isTestSource="false" />
+ <excludeFolder url="file://$MODULE_DIR$/../../../../../../portal/target" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
16 years, 8 months