Picketlink SVN: r950 - in idm/trunk: example/auth and 22 other directories.
by picketlink-commits@lists.jboss.org
Author: bdaw
Date: 2011-05-17 16:46:39 -0400 (Tue, 17 May 2011)
New Revision: 950
Modified:
idm/trunk/assembly/pom.xml
idm/trunk/example/auth-simple/pom.xml
idm/trunk/example/auth/pom.xml
idm/trunk/example/simple/pom.xml
idm/trunk/integration/deployer/pom.xml
idm/trunk/integration/jboss5/pom.xml
idm/trunk/integration/pom.xml
idm/trunk/parent/pom.xml
idm/trunk/picketlink-idm-api/pom.xml
idm/trunk/picketlink-idm-auth/pom.xml
idm/trunk/picketlink-idm-cache/pom.xml
idm/trunk/picketlink-idm-common/pom.xml
idm/trunk/picketlink-idm-core/pom.xml
idm/trunk/picketlink-idm-docs/ReferenceGuide/pom.xml
idm/trunk/picketlink-idm-docs/pom.xml
idm/trunk/picketlink-idm-hibernate/pom.xml
idm/trunk/picketlink-idm-jpa/pom.xml
idm/trunk/picketlink-idm-ldap/pom.xml
idm/trunk/picketlink-idm-spi/pom.xml
idm/trunk/picketlink-idm-testsuite/common/pom.xml
idm/trunk/picketlink-idm-testsuite/integration/ldap/pom.xml
idm/trunk/picketlink-idm-testsuite/integration/ldap2/pom.xml
idm/trunk/picketlink-idm-testsuite/integration/pom.xml
idm/trunk/picketlink-idm-testsuite/performance/pom.xml
Log:
- toto
Modified: idm/trunk/assembly/pom.xml
===================================================================
--- idm/trunk/assembly/pom.xml 2011-05-17 20:08:16 UTC (rev 949)
+++ idm/trunk/assembly/pom.xml 2011-05-17 20:46:39 UTC (rev 950)
@@ -8,7 +8,7 @@
<parent>
<groupId>org.picketlink.idm</groupId>
<artifactId>picketlink-idm-parent</artifactId>
- <version>1.3.0.Alpha01-SNAPSHOT</version>
+ <version>1.3.0.Alpha01</version>
<relativePath>../parent</relativePath>
</parent>
Modified: idm/trunk/example/auth/pom.xml
===================================================================
--- idm/trunk/example/auth/pom.xml 2011-05-17 20:08:16 UTC (rev 949)
+++ idm/trunk/example/auth/pom.xml 2011-05-17 20:46:39 UTC (rev 950)
@@ -1,7 +1,7 @@
<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.picketlink.idm.example</groupId>
- <version>1.3.0.Alpha01-SNAPSHOT</version>
+ <version>1.3.0.Alpha01</version>
<artifactId>example-auth</artifactId>
<packaging>jar</packaging>
<name>Example - JEE authentication</name>
Modified: idm/trunk/example/auth-simple/pom.xml
===================================================================
--- idm/trunk/example/auth-simple/pom.xml 2011-05-17 20:08:16 UTC (rev 949)
+++ idm/trunk/example/auth-simple/pom.xml 2011-05-17 20:46:39 UTC (rev 950)
@@ -1,7 +1,7 @@
<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.picketlink.idm.example</groupId>
- <version>1.3.0.Alpha01-SNAPSHOT</version>
+ <version>1.3.0.Alpha01</version>
<artifactId>example-auth-simple</artifactId>
<packaging>jar</packaging>
<name>Example - JEE authentication (using deployer)</name>
Modified: idm/trunk/example/simple/pom.xml
===================================================================
--- idm/trunk/example/simple/pom.xml 2011-05-17 20:08:16 UTC (rev 949)
+++ idm/trunk/example/simple/pom.xml 2011-05-17 20:46:39 UTC (rev 950)
@@ -1,7 +1,7 @@
<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.picketlink.idm.example</groupId>
- <version>1.3.0.Alpha01-SNAPSHOT</version>
+ <version>1.3.0.Alpha01</version>
<artifactId>example-simple</artifactId>
<packaging>jar</packaging>
<name>Example - Simple PicketLink IDM Maven2 project</name>
Modified: idm/trunk/integration/deployer/pom.xml
===================================================================
--- idm/trunk/integration/deployer/pom.xml 2011-05-17 20:08:16 UTC (rev 949)
+++ idm/trunk/integration/deployer/pom.xml 2011-05-17 20:46:39 UTC (rev 950)
@@ -10,7 +10,7 @@
<parent>
<groupId>org.picketlink.idm</groupId>
<artifactId>picketlink-idm-integration</artifactId>
- <version>1.3.0.Alpha01-SNAPSHOT</version>
+ <version>1.3.0.Alpha01</version>
</parent>
<properties>
Modified: idm/trunk/integration/jboss5/pom.xml
===================================================================
--- idm/trunk/integration/jboss5/pom.xml 2011-05-17 20:08:16 UTC (rev 949)
+++ idm/trunk/integration/jboss5/pom.xml 2011-05-17 20:46:39 UTC (rev 950)
@@ -10,7 +10,7 @@
<parent>
<groupId>org.picketlink.idm</groupId>
<artifactId>picketlink-idm-integration</artifactId>
- <version>1.3.0.Alpha01-SNAPSHOT</version>
+ <version>1.3.0.Alpha01</version>
</parent>
<dependencies>
Modified: idm/trunk/integration/pom.xml
===================================================================
--- idm/trunk/integration/pom.xml 2011-05-17 20:08:16 UTC (rev 949)
+++ idm/trunk/integration/pom.xml 2011-05-17 20:46:39 UTC (rev 950)
@@ -6,14 +6,14 @@
<description>PicketLink IDM Integration</description>
<groupId>org.picketlink.idm</groupId>
<artifactId>picketlink-idm-integration</artifactId>
- <version>1.3.0.Alpha01-SNAPSHOT</version>
+ <version>1.3.0.Alpha01</version>
<packaging>pom</packaging>
<!-- Parent -->
<parent>
<groupId>org.picketlink.idm</groupId>
<artifactId>picketlink-idm-parent</artifactId>
- <version>1.3.0.Alpha01-SNAPSHOT</version>
+ <version>1.3.0.Alpha01</version>
<relativePath>../parent/pom.xml</relativePath>
</parent>
Modified: idm/trunk/parent/pom.xml
===================================================================
--- idm/trunk/parent/pom.xml 2011-05-17 20:08:16 UTC (rev 949)
+++ idm/trunk/parent/pom.xml 2011-05-17 20:46:39 UTC (rev 950)
@@ -8,7 +8,7 @@
<groupId>org.picketlink.idm</groupId>
<artifactId>picketlink-idm-parent</artifactId>
<packaging>pom</packaging>
- <version>1.3.0.Alpha01-SNAPSHOT</version>
+ <version>1.3.0.Alpha01</version>
<name>PicketLink IDM- Parent</name>
<description>PicketLink is a cross-cutting project that handles identity needs for the JEMS projects</description>
<licenses>
@@ -519,4 +519,10 @@
</dependency>
</dependencies>
</dependencyManagement>
+
+ <scm>
+ <connection>scm:svn:http://anonsvn.jboss.org/repos/maven/poms/jboss-parent-pom/tags/1...</connection>
+ <developerConnection>scm:svn:https://svn.jboss.org/repos/maven/poms/jboss-parent-pom/tags/1.3....</developerConnection>
+ <url>http://anonsvn.jboss.org/repos/maven/poms/jboss-parent-pom/tags/1.3.0.Alp...</url>
+ </scm>
</project>
Modified: idm/trunk/picketlink-idm-api/pom.xml
===================================================================
--- idm/trunk/picketlink-idm-api/pom.xml 2011-05-17 20:08:16 UTC (rev 949)
+++ idm/trunk/picketlink-idm-api/pom.xml 2011-05-17 20:46:39 UTC (rev 950)
@@ -2,12 +2,12 @@
<parent>
<groupId>org.picketlink.idm</groupId>
<artifactId>picketlink-idm-parent</artifactId>
- <version>1.3.0.Alpha01-SNAPSHOT</version>
+ <version>1.3.0.Alpha01</version>
<relativePath>../parent</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>picketlink-idm-api</artifactId>
- <version>1.3.0.Alpha01-SNAPSHOT</version>
+ <version>1.3.0.Alpha01</version>
<packaging>jar</packaging>
<name>PicketLink IDM API</name>
<description>PicketLink IDM API contains the API to interact with the Identity Model.</description>
Modified: idm/trunk/picketlink-idm-auth/pom.xml
===================================================================
--- idm/trunk/picketlink-idm-auth/pom.xml 2011-05-17 20:08:16 UTC (rev 949)
+++ idm/trunk/picketlink-idm-auth/pom.xml 2011-05-17 20:46:39 UTC (rev 950)
@@ -2,12 +2,12 @@
<parent>
<groupId>org.picketlink.idm</groupId>
<artifactId>picketlink-idm-parent</artifactId>
- <version>1.3.0.Alpha01-SNAPSHOT</version>
+ <version>1.3.0.Alpha01</version>
<relativePath>../parent</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>picketlink-idm-auth</artifactId>
- <version>1.3.0.Alpha01-SNAPSHOT</version>
+ <version>1.3.0.Alpha01</version>
<packaging>jar</packaging>
<name>PicketLink IDM Auth</name>
<url>http://labs.jboss.org/portal/jbosssecurity/</url>
Modified: idm/trunk/picketlink-idm-cache/pom.xml
===================================================================
--- idm/trunk/picketlink-idm-cache/pom.xml 2011-05-17 20:08:16 UTC (rev 949)
+++ idm/trunk/picketlink-idm-cache/pom.xml 2011-05-17 20:46:39 UTC (rev 950)
@@ -2,12 +2,12 @@
<parent>
<groupId>org.picketlink.idm</groupId>
<artifactId>picketlink-idm-parent</artifactId>
- <version>1.3.0.Alpha01-SNAPSHOT</version>
+ <version>1.3.0.Alpha01</version>
<relativePath>../parent</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>picketlink-idm-cache</artifactId>
- <version>1.3.0.Alpha01-SNAPSHOT</version>
+ <version>1.3.0.Alpha01</version>
<packaging>jar</packaging>
<name>PicketLink IDM Cache</name>
<description>PicketLink IDM Cache</description>
Modified: idm/trunk/picketlink-idm-common/pom.xml
===================================================================
--- idm/trunk/picketlink-idm-common/pom.xml 2011-05-17 20:08:16 UTC (rev 949)
+++ idm/trunk/picketlink-idm-common/pom.xml 2011-05-17 20:46:39 UTC (rev 950)
@@ -2,12 +2,12 @@
<parent>
<groupId>org.picketlink.idm</groupId>
<artifactId>picketlink-idm-parent</artifactId>
- <version>1.3.0.Alpha01-SNAPSHOT</version>
+ <version>1.3.0.Alpha01</version>
<relativePath>../parent</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>picketlink-idm-common</artifactId>
- <version>1.3.0.Alpha01-SNAPSHOT</version>
+ <version>1.3.0.Alpha01</version>
<packaging>jar</packaging>
<name>PicketLink IDM Common</name>
<description>PicketLink IDM Common</description>
Modified: idm/trunk/picketlink-idm-core/pom.xml
===================================================================
--- idm/trunk/picketlink-idm-core/pom.xml 2011-05-17 20:08:16 UTC (rev 949)
+++ idm/trunk/picketlink-idm-core/pom.xml 2011-05-17 20:46:39 UTC (rev 950)
@@ -2,12 +2,12 @@
<parent>
<groupId>org.picketlink.idm</groupId>
<artifactId>picketlink-idm-parent</artifactId>
- <version>1.3.0.Alpha01-SNAPSHOT</version>
+ <version>1.3.0.Alpha01</version>
<relativePath>../parent</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>picketlink-idm-core</artifactId>
- <version>1.3.0.Alpha01-SNAPSHOT</version>
+ <version>1.3.0.Alpha01</version>
<packaging>jar</packaging>
<name>PicketLink IDM Implementation</name>
<description>PicketLink IDM IMPL contains the implementation of the API and the Identity Model.</description>
Modified: idm/trunk/picketlink-idm-docs/ReferenceGuide/pom.xml
===================================================================
--- idm/trunk/picketlink-idm-docs/ReferenceGuide/pom.xml 2011-05-17 20:08:16 UTC (rev 949)
+++ idm/trunk/picketlink-idm-docs/ReferenceGuide/pom.xml 2011-05-17 20:46:39 UTC (rev 950)
@@ -2,14 +2,14 @@
<parent>
<groupId>org.picketlink.idm</groupId>
<artifactId>picketlink-idm-parent</artifactId>
- <version>1.3.0.Alpha01-SNAPSHOT</version>
+ <version>1.3.0.Alpha01</version>
<relativePath>../../parent</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>Reference-Guide-${translation}</artifactId>
- <version>1.3.0.Alpha01-SNAPSHOT</version>
+ <version>1.3.0.Alpha01</version>
<packaging>jdocbook</packaging>
<name>User Guide (${translation})</name>
Modified: idm/trunk/picketlink-idm-docs/pom.xml
===================================================================
--- idm/trunk/picketlink-idm-docs/pom.xml 2011-05-17 20:08:16 UTC (rev 949)
+++ idm/trunk/picketlink-idm-docs/pom.xml 2011-05-17 20:46:39 UTC (rev 950)
@@ -2,13 +2,13 @@
<parent>
<groupId>org.picketlink.idm</groupId>
<artifactId>picketlink-idm-parent</artifactId>
- <version>1.3.0.Alpha01-SNAPSHOT</version>
+ <version>1.3.0.Alpha01</version>
<relativePath>../parent</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.picketlink.docs</groupId>
<artifactId>picketlink-idm-docs</artifactId>
- <version>1.3.0.Alpha01-SNAPSHOT</version>
+ <version>1.3.0.Alpha01</version>
<packaging>pom</packaging>
<name>PicketLink IDM Docs</name>
<url>http://www.jboss.com/products/jbossidentity</url>
Modified: idm/trunk/picketlink-idm-hibernate/pom.xml
===================================================================
--- idm/trunk/picketlink-idm-hibernate/pom.xml 2011-05-17 20:08:16 UTC (rev 949)
+++ idm/trunk/picketlink-idm-hibernate/pom.xml 2011-05-17 20:46:39 UTC (rev 950)
@@ -2,12 +2,12 @@
<parent>
<groupId>org.picketlink.idm</groupId>
<artifactId>picketlink-idm-parent</artifactId>
- <version>1.3.0.Alpha01-SNAPSHOT</version>
+ <version>1.3.0.Alpha01</version>
<relativePath>../parent</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>picketlink-idm-hibernate</artifactId>
- <version>1.3.0.Alpha01-SNAPSHOT</version>
+ <version>1.3.0.Alpha01</version>
<packaging>jar</packaging>
<name>PicketLink IDM Hibernate</name>
<url>http://labs.jboss.org/portal/jbosssecurity/</url>
Modified: idm/trunk/picketlink-idm-jpa/pom.xml
===================================================================
--- idm/trunk/picketlink-idm-jpa/pom.xml 2011-05-17 20:08:16 UTC (rev 949)
+++ idm/trunk/picketlink-idm-jpa/pom.xml 2011-05-17 20:46:39 UTC (rev 950)
@@ -2,12 +2,12 @@
<parent>
<groupId>org.picketlink.idm</groupId>
<artifactId>picketlink-idm-parent</artifactId>
- <version>1.3.0.Alpha01-SNAPSHOT</version>
+ <version>1.3.0.Alpha01</version>
<relativePath>../parent</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>picketlink-idm-jpa</artifactId>
- <version>1.3.0.Alpha01-SNAPSHOT</version>
+ <version>1.3.0.Alpha01</version>
<packaging>jar</packaging>
<name>PicketLink IDM JPA</name>
<description>PicketLink IDM JPA</description>
Modified: idm/trunk/picketlink-idm-ldap/pom.xml
===================================================================
--- idm/trunk/picketlink-idm-ldap/pom.xml 2011-05-17 20:08:16 UTC (rev 949)
+++ idm/trunk/picketlink-idm-ldap/pom.xml 2011-05-17 20:46:39 UTC (rev 950)
@@ -2,12 +2,12 @@
<parent>
<groupId>org.picketlink.idm</groupId>
<artifactId>picketlink-idm-parent</artifactId>
- <version>1.3.0.Alpha01-SNAPSHOT</version>
+ <version>1.3.0.Alpha01</version>
<relativePath>../parent</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>picketlink-idm-ldap</artifactId>
- <version>1.3.0.Alpha01-SNAPSHOT</version>
+ <version>1.3.0.Alpha01</version>
<packaging>jar</packaging>
<name>PicketLink IDM LDAP</name>
<description>PicketLink IDM LDAP</description>
Modified: idm/trunk/picketlink-idm-spi/pom.xml
===================================================================
--- idm/trunk/picketlink-idm-spi/pom.xml 2011-05-17 20:08:16 UTC (rev 949)
+++ idm/trunk/picketlink-idm-spi/pom.xml 2011-05-17 20:46:39 UTC (rev 950)
@@ -2,12 +2,12 @@
<parent>
<groupId>org.picketlink.idm</groupId>
<artifactId>picketlink-idm-parent</artifactId>
- <version>1.3.0.Alpha01-SNAPSHOT</version>
+ <version>1.3.0.Alpha01</version>
<relativePath>../parent</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>picketlink-idm-spi</artifactId>
- <version>1.3.0.Alpha01-SNAPSHOT</version>
+ <version>1.3.0.Alpha01</version>
<packaging>jar</packaging>
<name>PicketLink IDM SPI</name>
<description>PicketLink SPI</description>
Modified: idm/trunk/picketlink-idm-testsuite/common/pom.xml
===================================================================
--- idm/trunk/picketlink-idm-testsuite/common/pom.xml 2011-05-17 20:08:16 UTC (rev 949)
+++ idm/trunk/picketlink-idm-testsuite/common/pom.xml 2011-05-17 20:46:39 UTC (rev 950)
@@ -2,13 +2,13 @@
<parent>
<groupId>org.picketlink.idm</groupId>
<artifactId>picketlink-idm-parent</artifactId>
- <version>1.3.0.Alpha01-SNAPSHOT</version>
+ <version>1.3.0.Alpha01</version>
<relativePath>../../parent</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.picketlink.idm.testsuite</groupId>
<artifactId>common</artifactId>
- <version>1.3.0.Alpha01-SNAPSHOT</version>
+ <version>1.3.0.Alpha01</version>
<packaging>jar</packaging>
<name>PicketLink IDM Testsuite Common</name>
<url>http://labs.jboss.org/portal/jbosssecurity/</url>
Modified: idm/trunk/picketlink-idm-testsuite/integration/ldap/pom.xml
===================================================================
--- idm/trunk/picketlink-idm-testsuite/integration/ldap/pom.xml 2011-05-17 20:08:16 UTC (rev 949)
+++ idm/trunk/picketlink-idm-testsuite/integration/ldap/pom.xml 2011-05-17 20:46:39 UTC (rev 950)
@@ -2,13 +2,13 @@
<parent>
<groupId>org.picketlink.idm</groupId>
<artifactId>picketlink-idm-parent</artifactId>
- <version>1.3.0.Alpha01-SNAPSHOT</version>
+ <version>1.3.0.Alpha01</version>
<relativePath>../parent</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.picketlink.idm.testsuite</groupId>
<artifactId>ldap</artifactId>
- <version>1.3.0.Alpha01-SNAPSHOT</version>
+ <version>1.3.0.Alpha01</version>
<packaging>jar</packaging>
<name>PicketLink IDM Integration Testsuite - LDAP</name>
<url>http://labs.jboss.org/portal/jbosssecurity/</url>
Modified: idm/trunk/picketlink-idm-testsuite/integration/ldap2/pom.xml
===================================================================
--- idm/trunk/picketlink-idm-testsuite/integration/ldap2/pom.xml 2011-05-17 20:08:16 UTC (rev 949)
+++ idm/trunk/picketlink-idm-testsuite/integration/ldap2/pom.xml 2011-05-17 20:46:39 UTC (rev 950)
@@ -2,13 +2,13 @@
<parent>
<groupId>org.picketlink.idm</groupId>
<artifactId>picketlink-idm-parent</artifactId>
- <version>1.3.0.Alpha01-SNAPSHOT</version>
+ <version>1.3.0.Alpha01</version>
<relativePath>../parent</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.picketlink.idm.testsuite</groupId>
<artifactId>ldap2</artifactId>
- <version>1.3.0.Alpha01-SNAPSHOT</version>
+ <version>1.3.0.Alpha01</version>
<packaging>jar</packaging>
<name>PicketLink IDM Integration Testsuite - 2 LDAPs</name>
<url>http://labs.jboss.org/portal/jbosssecurity/</url>
Modified: idm/trunk/picketlink-idm-testsuite/integration/pom.xml
===================================================================
--- idm/trunk/picketlink-idm-testsuite/integration/pom.xml 2011-05-17 20:08:16 UTC (rev 949)
+++ idm/trunk/picketlink-idm-testsuite/integration/pom.xml 2011-05-17 20:46:39 UTC (rev 950)
@@ -2,14 +2,14 @@
<parent>
<groupId>org.picketlink.idm</groupId>
<artifactId>picketlink-idm-parent</artifactId>
- <version>1.3.0.Alpha01-SNAPSHOT</version>
+ <version>1.3.0.Alpha01</version>
<relativePath>../../parent</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.picketlink.idm.testsuite</groupId>
<artifactId>integration</artifactId>
- <version>1.3.0.Alpha01-SNAPSHOT</version>
+ <version>1.3.0.Alpha01</version>
<name>PicketLink IDM Integration Testsuite</name>
<description>PicketLink IDM Integration Testsuite</description>
<packaging>pom</packaging>
Modified: idm/trunk/picketlink-idm-testsuite/performance/pom.xml
===================================================================
--- idm/trunk/picketlink-idm-testsuite/performance/pom.xml 2011-05-17 20:08:16 UTC (rev 949)
+++ idm/trunk/picketlink-idm-testsuite/performance/pom.xml 2011-05-17 20:46:39 UTC (rev 950)
@@ -2,7 +2,7 @@
<parent>
<groupId>org.picketlink.idm</groupId>
<artifactId>picketlink-idm-parent</artifactId>
- <version>1.3.0.Alpha01-SNAPSHOT</version>
+ <version>1.3.0.Alpha01</version>
<relativePath>../../parent</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
13 years, 7 months
Picketlink SVN: r949 - idm/trunk/picketlink-idm-ldap.
by picketlink-commits@lists.jboss.org
Author: bdaw
Date: 2011-05-17 16:08:16 -0400 (Tue, 17 May 2011)
New Revision: 949
Modified:
idm/trunk/picketlink-idm-ldap/pom.xml
Log:
- remove snapshot deps
Modified: idm/trunk/picketlink-idm-ldap/pom.xml
===================================================================
--- idm/trunk/picketlink-idm-ldap/pom.xml 2011-05-17 20:05:27 UTC (rev 948)
+++ idm/trunk/picketlink-idm-ldap/pom.xml 2011-05-17 20:08:16 UTC (rev 949)
@@ -37,8 +37,8 @@
</dependency>
<dependency>
- <groupId>staxnav</groupId>
- <artifactId>staxnav</artifactId>
+ <groupId>org.staxnav</groupId>
+ <artifactId>staxnav.core</artifactId>
<version>0.9.0</version>
</dependency>
13 years, 7 months
Picketlink SVN: r948 - idm/trunk/picketlink-idm-ldap.
by picketlink-commits@lists.jboss.org
Author: bdaw
Date: 2011-05-17 16:05:27 -0400 (Tue, 17 May 2011)
New Revision: 948
Modified:
idm/trunk/picketlink-idm-ldap/pom.xml
Log:
- remove snapshot deps
Modified: idm/trunk/picketlink-idm-ldap/pom.xml
===================================================================
--- idm/trunk/picketlink-idm-ldap/pom.xml 2011-05-17 19:45:51 UTC (rev 947)
+++ idm/trunk/picketlink-idm-ldap/pom.xml 2011-05-17 20:05:27 UTC (rev 948)
@@ -39,7 +39,7 @@
<dependency>
<groupId>staxnav</groupId>
<artifactId>staxnav</artifactId>
- <version>1.1-SNAPSHOT</version>
+ <version>0.9.0</version>
</dependency>
<dependency>
13 years, 7 months
Picketlink SVN: r947 - in idm/trunk/picketlink-idm-hibernate/src/main/resources: sybase-mappings and 1 other directory.
by picketlink-commits@lists.jboss.org
Author: bdaw
Date: 2011-05-17 15:45:51 -0400 (Tue, 17 May 2011)
New Revision: 947
Modified:
idm/trunk/picketlink-idm-hibernate/src/main/resources/mappings/HibernateIdentityObject.hbm.xml
idm/trunk/picketlink-idm-hibernate/src/main/resources/mappings/HibernateIdentityObjectAttribute.hbm.xml
idm/trunk/picketlink-idm-hibernate/src/main/resources/sybase-mappings/HibernateIdentityObject.hbm.xml
idm/trunk/picketlink-idm-hibernate/src/main/resources/sybase-mappings/HibernateIdentityObjectAttribute.hbm.xml
Log:
- small perf optimizations in mappings
Modified: idm/trunk/picketlink-idm-hibernate/src/main/resources/mappings/HibernateIdentityObject.hbm.xml
===================================================================
--- idm/trunk/picketlink-idm-hibernate/src/main/resources/mappings/HibernateIdentityObject.hbm.xml 2011-05-17 19:37:59 UTC (rev 946)
+++ idm/trunk/picketlink-idm-hibernate/src/main/resources/mappings/HibernateIdentityObject.hbm.xml 2011-05-17 19:45:51 UTC (rev 947)
@@ -12,6 +12,7 @@
<generator class="native"/>
</id>
<set name="attributes"
+ batch-size="20"
inverse="true"
cascade="all, delete-orphan"
lazy="extra"
Modified: idm/trunk/picketlink-idm-hibernate/src/main/resources/mappings/HibernateIdentityObjectAttribute.hbm.xml
===================================================================
--- idm/trunk/picketlink-idm-hibernate/src/main/resources/mappings/HibernateIdentityObjectAttribute.hbm.xml 2011-05-17 19:37:59 UTC (rev 946)
+++ idm/trunk/picketlink-idm-hibernate/src/main/resources/mappings/HibernateIdentityObjectAttribute.hbm.xml 2011-05-17 19:45:51 UTC (rev 947)
@@ -35,8 +35,9 @@
table="jbid_io_attr_text_values"
cascade="all, delete-orphan"
access="field"
- lazy="extra"
- fetch="subselect">
+ lazy="false"
+ fetch="join"
+ batch-size="20">
<cache usage="read-write"/>
<key column="TEXT_ATTR_VALUE_ID"/>
<element type="string"
Modified: idm/trunk/picketlink-idm-hibernate/src/main/resources/sybase-mappings/HibernateIdentityObject.hbm.xml
===================================================================
--- idm/trunk/picketlink-idm-hibernate/src/main/resources/sybase-mappings/HibernateIdentityObject.hbm.xml 2011-05-17 19:37:59 UTC (rev 946)
+++ idm/trunk/picketlink-idm-hibernate/src/main/resources/sybase-mappings/HibernateIdentityObject.hbm.xml 2011-05-17 19:45:51 UTC (rev 947)
@@ -12,6 +12,7 @@
<generator class="native"/>
</id>
<set name="attributes"
+ batch-size="20"
inverse="true"
cascade="all, delete-orphan"
lazy="extra"
Modified: idm/trunk/picketlink-idm-hibernate/src/main/resources/sybase-mappings/HibernateIdentityObjectAttribute.hbm.xml
===================================================================
--- idm/trunk/picketlink-idm-hibernate/src/main/resources/sybase-mappings/HibernateIdentityObjectAttribute.hbm.xml 2011-05-17 19:37:59 UTC (rev 946)
+++ idm/trunk/picketlink-idm-hibernate/src/main/resources/sybase-mappings/HibernateIdentityObjectAttribute.hbm.xml 2011-05-17 19:45:51 UTC (rev 947)
@@ -35,8 +35,9 @@
table="jbid_io_attr_text_values"
cascade="all, delete-orphan"
access="field"
- lazy="extra"
- fetch="subselect">
+ lazy="false"
+ fetch="join"
+ batch-size="20">
<cache usage="read-write"/>
<key column="TEXT_ATTR_VALUE_ID"/>
<element type="string"
13 years, 7 months
Picketlink SVN: r946 - in idm/trunk: picketlink-idm-cache/src/main/java/org/picketlink/idm/impl/cache and 8 other directories.
by picketlink-commits@lists.jboss.org
Author: bdaw
Date: 2011-05-17 15:37:59 -0400 (Tue, 17 May 2011)
New Revision: 946
Modified:
idm/trunk/picketlink-idm-cache/src/main/java/org/picketlink/idm/impl/cache/JBossCacheAPICacheProviderImpl.java
idm/trunk/picketlink-idm-cache/src/main/java/org/picketlink/idm/impl/cache/JBossCacheIdentityStoreCacheProviderImpl.java
idm/trunk/picketlink-idm-core/src/main/java/org/picketlink/idm/impl/api/session/managers/RelationshipManagerImpl.java
idm/trunk/picketlink-idm-core/src/main/java/org/picketlink/idm/impl/cache/JBossCacheIdentityStoreWrapper.java
idm/trunk/picketlink-idm-core/src/main/java/org/picketlink/idm/impl/repository/FallbackIdentityStoreRepository.java
idm/trunk/picketlink-idm-core/src/main/java/org/picketlink/idm/impl/repository/WrapperIdentityStoreRepository.java
idm/trunk/picketlink-idm-hibernate/pom.xml
idm/trunk/picketlink-idm-hibernate/src/main/java/org/picketlink/idm/impl/store/hibernate/HibernateIdentityStoreImpl.java
idm/trunk/picketlink-idm-jpa/src/main/java/org/picketlink/idm/impl/store/jpa/JpaIdentityStore.java
idm/trunk/picketlink-idm-ldap/src/main/java/org/picketlink/idm/impl/store/ldap/LDAPIdentityStoreImpl.java
idm/trunk/picketlink-idm-spi/src/main/java/org/picketlink/idm/spi/store/IdentityStore.java
idm/trunk/pom.xml
Log:
- Merge setExpiration() usage in cache impl.
- Many smaller performance optimizations
Modified: idm/trunk/picketlink-idm-cache/src/main/java/org/picketlink/idm/impl/cache/JBossCacheAPICacheProviderImpl.java
===================================================================
--- idm/trunk/picketlink-idm-cache/src/main/java/org/picketlink/idm/impl/cache/JBossCacheAPICacheProviderImpl.java 2011-05-17 15:03:46 UTC (rev 945)
+++ idm/trunk/picketlink-idm-cache/src/main/java/org/picketlink/idm/impl/cache/JBossCacheAPICacheProviderImpl.java 2011-05-17 19:37:59 UTC (rev 946)
@@ -29,6 +29,7 @@
import org.picketlink.idm.api.query.RoleQuery;
import org.picketlink.idm.impl.api.model.GroupKey;
import org.jboss.cache.*;
+import org.jboss.cache.eviction.ExpirationAlgorithmConfig;
import java.io.InputStream;
import java.util.List;
@@ -112,6 +113,8 @@
public static final String MAIN_ROOT = "NODE_MAIN_ROOT";
+ private int expiration = -1;
+
private Fqn getRootNode()
{
return Fqn.fromString("/" + MAIN_ROOT);
@@ -258,6 +261,7 @@
if (ioNode != null)
{
+ setExpiration(ioNode);
ioNode.put(NODE_OBJECT_KEY, user);
if (log.isLoggable(Level.FINER))
@@ -308,6 +312,7 @@
if (ioNode != null)
{
+ setExpiration(ioNode);
ioNode.put(NODE_OBJECT_KEY, unmodifiableCollection(users));
if (log.isLoggable(Level.FINER))
@@ -362,6 +367,7 @@
if (ioNode != null)
{
+ setExpiration(ioNode);
ioNode.put(NODE_OBJECT_KEY, count);
if (log.isLoggable(Level.FINER))
@@ -414,6 +420,7 @@
if (ioNode != null)
{
+ setExpiration(ioNode);
ioNode.put(NODE_OBJECT_KEY, group);
if (log.isLoggable(Level.FINER))
@@ -465,6 +472,7 @@
if (ioNode != null)
{
+ setExpiration(ioNode);
ioNode.put(NODE_OBJECT_KEY, unmodifiableCollection(groups));
if (log.isLoggable(Level.FINER))
@@ -518,6 +526,7 @@
if (ioNode != null)
{
+ setExpiration(ioNode);
ioNode.put(NODE_OBJECT_KEY, count);
if (log.isLoggable(Level.FINER))
@@ -572,6 +581,7 @@
if (ioNode != null)
{
+ setExpiration(ioNode);
ioNode.put(NODE_OBJECT_KEY, role);
if (log.isLoggable(Level.FINER))
@@ -616,6 +626,7 @@
if (ioNode != null)
{
+ setExpiration(ioNode);
ioNode.put(NODE_OBJECT_KEY, role);
if (log.isLoggable(Level.FINER))
@@ -659,6 +670,7 @@
if (ioNode != null)
{
+ setExpiration(ioNode);
ioNode.put(NODE_OBJECT_KEY, Collections.unmodifiableMap(attributes));
if (log.isLoggable(Level.FINER))
@@ -717,6 +729,7 @@
if (ioNode != null)
{
+ setExpiration(ioNode);
ioNode.put(NODE_OBJECT_KEY, Collections.unmodifiableMap(properties));
if (log.isLoggable(Level.FINER))
@@ -775,6 +788,7 @@
if (ioNode != null)
{
+ setExpiration(ioNode);
ioNode.put(NODE_OBJECT_KEY, Collections.unmodifiableMap(properties));
if (log.isLoggable(Level.FINER))
@@ -851,6 +865,7 @@
if (ioNode != null)
{
+ setExpiration(ioNode);
ioNode.put(NODE_OBJECT_KEY, unmodifiableCollection(results));
if (log.isLoggable(Level.FINER))
@@ -891,6 +906,7 @@
if (ioNode != null)
{
+ setExpiration(ioNode);
ioNode.put(NODE_OBJECT_KEY, unmodifiableCollection(results));
if (log.isLoggable(Level.FINER))
@@ -929,6 +945,7 @@
if (ioNode == null)
{
+ setExpiration(ioNode);
ioNode.put(NODE_OBJECT_KEY, result);
if (log.isLoggable(Level.FINER))
@@ -967,6 +984,7 @@
if (ioNode != null)
{
+ setExpiration(ioNode);
ioNode.put(NODE_OBJECT_KEY, unmodifiableCollection(results));
if (log.isLoggable(Level.FINER))
@@ -1005,6 +1023,7 @@
if (ioNode != null)
{
+ setExpiration(ioNode);
ioNode.put(NODE_OBJECT_KEY, unmodifiableCollection(results));
if (log.isLoggable(Level.FINER))
@@ -1055,6 +1074,7 @@
if (ioNode != null)
{
+ setExpiration(ioNode);
ioNode.put(NODE_QUERY_KEY, results);
if (log.isLoggable(Level.FINER))
@@ -1073,6 +1093,7 @@
if (ioNode != null)
{
+ setExpiration(ioNode);
ioNode.put(NODE_QUERY_UNIQUE_KEY, user);
if (log.isLoggable(Level.FINER))
@@ -1143,6 +1164,7 @@
if (ioNode != null)
{
+ setExpiration(ioNode);
ioNode.put(NODE_QUERY_KEY, unmodifiableCollection(results));
if (log.isLoggable(Level.FINER))
@@ -1161,6 +1183,7 @@
if (ioNode != null)
{
+ setExpiration(ioNode);
ioNode.put(NODE_QUERY_UNIQUE_KEY, group);
if (log.isLoggable(Level.FINER))
@@ -1231,6 +1254,7 @@
if (ioNode != null)
{
+ setExpiration(ioNode);
ioNode.put(NODE_QUERY_KEY, results);
if (log.isLoggable(Level.FINER))
@@ -1249,6 +1273,7 @@
if (ioNode != null)
{
+ setExpiration(ioNode);
ioNode.put(NODE_QUERY_UNIQUE_KEY, role);
if (log.isLoggable(Level.FINER))
@@ -1332,4 +1357,23 @@
return Collections.unmodifiableCollection(collection);
}
+
+ public void setExpiration(Node node)
+ {
+ if (expiration != -1 && expiration > 0)
+ {
+ Long future = new Long(System.currentTimeMillis() + expiration);
+ node.put(ExpirationAlgorithmConfig.EXPIRATION_KEY, future);
+ }
+ }
+
+ public int getExpiration()
+ {
+ return expiration;
+ }
+
+ public void setExpiration(int expiration)
+ {
+ this.expiration = expiration;
+ }
}
Modified: idm/trunk/picketlink-idm-cache/src/main/java/org/picketlink/idm/impl/cache/JBossCacheIdentityStoreCacheProviderImpl.java
===================================================================
--- idm/trunk/picketlink-idm-cache/src/main/java/org/picketlink/idm/impl/cache/JBossCacheIdentityStoreCacheProviderImpl.java 2011-05-17 15:03:46 UTC (rev 945)
+++ idm/trunk/picketlink-idm-cache/src/main/java/org/picketlink/idm/impl/cache/JBossCacheIdentityStoreCacheProviderImpl.java 2011-05-17 19:37:59 UTC (rev 946)
@@ -23,6 +23,7 @@
package org.picketlink.idm.impl.cache;
import org.jboss.cache.*;
+import org.jboss.cache.eviction.ExpirationAlgorithmConfig;
import org.picketlink.idm.spi.configuration.IdentityConfigurationContext;
import org.picketlink.idm.spi.model.IdentityObject;
@@ -91,6 +92,8 @@
public static final String MAIN_ROOT = "NODE_MAIN_ROOT";
+ private int expiration = -1;
+
private Fqn getRootNode()
{
return Fqn.fromString("/" + MAIN_ROOT);
@@ -248,6 +251,7 @@
if (ioNode != null)
{
+ setExpiration(ioNode);
ioNode.put(NODE_OBJECT_KEY, count);
if (log.isLoggable(Level.FINER))
@@ -303,6 +307,7 @@
if (ioNode != null)
{
+ setExpiration(ioNode);
ioNode.put(NODE_OBJECT_KEY, safeCopyIO(results));
if (log.isLoggable(Level.FINER))
@@ -352,6 +357,7 @@
if (ioNode != null)
{
+ setExpiration(ioNode);
ioNode.put(NODE_OBJECT_KEY, safeCopyIOR(results));
if (log.isLoggable(Level.FINER))
@@ -401,6 +407,7 @@
if (ioNode != null)
{
+ setExpiration(ioNode);
ioNode.put(NODE_OBJECT_KEY, results);
if (log.isLoggable(Level.FINER))
@@ -450,6 +457,7 @@
if (ioNode != null)
{
+ setExpiration(ioNode);
ioNode.put(NODE_OBJECT_KEY, properties);
if (log.isLoggable(Level.FINER))
@@ -518,6 +526,7 @@
if (ioNode != null)
{
+ setExpiration(ioNode);
ioNode.put(NODE_OBJECT_KEY, properties);
if (log.isLoggable(Level.FINER))
@@ -579,6 +588,7 @@
if (ioNode != null)
{
+ setExpiration(ioNode);
ioNode.put(NODE_OBJECT_KEY, safeCopyAttr(attributes));
if (log.isLoggable(Level.FINER))
@@ -637,6 +647,7 @@
if (ioNode != null)
{
+ setExpiration(ioNode);
ioNode.put(NODE_OBJECT_KEY, value);
if (log.isLoggable(Level.FINER))
@@ -729,5 +740,23 @@
return nr;
}
+ public void setExpiration(Node node)
+ {
+ if (expiration != -1 && expiration > 0)
+ {
+ Long future = new Long(System.currentTimeMillis() + expiration);
+ node.put(ExpirationAlgorithmConfig.EXPIRATION_KEY, future);
+ }
+ }
+ public int getExpiration()
+ {
+ return expiration;
+ }
+
+ public void setExpiration(int expiration)
+ {
+ this.expiration = expiration;
+ }
+
}
Modified: idm/trunk/picketlink-idm-core/src/main/java/org/picketlink/idm/impl/api/session/managers/RelationshipManagerImpl.java
===================================================================
--- idm/trunk/picketlink-idm-core/src/main/java/org/picketlink/idm/impl/api/session/managers/RelationshipManagerImpl.java 2011-05-17 15:03:46 UTC (rev 945)
+++ idm/trunk/picketlink-idm-core/src/main/java/org/picketlink/idm/impl/api/session/managers/RelationshipManagerImpl.java 2011-05-17 19:37:59 UTC (rev 946)
@@ -903,6 +903,8 @@
IdentityObjectType iot = groupType != null ? getIdentityObjectType(groupType) : null;
+ Collection excludes = new HashSet<IdentityObjectType>();
+ excludes.add(getUserObjectType());
if (cascade)
{
@@ -928,8 +930,16 @@
else
{
- Collection<IdentityObject> ios = getRepository().findIdentityObject(getInvocationContext(), createIdentityObject(group), MEMBER, parent, convertSearchControls(criteria));
+ Collection<IdentityObject> ios = getRepository().
+ findIdentityObject(
+ getInvocationContext(),
+ createIdentityObject(group),
+ MEMBER,
+ excludes,
+ parent,
+ convertSearchControls(criteria));
+
for (IdentityObject io : ios)
{
if ((iot == null && !io.getIdentityType().getName().equals(getUserObjectType().getName())) ||
@@ -1009,8 +1019,18 @@
IdentityObjectType iot = groupType != null ? getIdentityObjectType(groupType) : null;
- Collection<IdentityObject> ios = getRepository().findIdentityObject(getInvocationContext(), createIdentityObject(user), MEMBER, false, convertSearchControls(criteria));
+ Collection excludes = new HashSet<IdentityObjectType>();
+ excludes.add(getUserObjectType());
+ Collection<IdentityObject> ios = getRepository().
+ findIdentityObject(
+ getInvocationContext(),
+ createIdentityObject(user),
+ MEMBER,
+ excludes,
+ false,
+ convertSearchControls(criteria));
+
for (IdentityObject io : ios)
{
if (iot == null || io.getIdentityType().getName().equals(iot.getName()))
@@ -1082,9 +1102,19 @@
List<Group> identities = new LinkedList<Group>();
- Collection<IdentityObject> ios = getRepository().findIdentityObject(getInvocationContext(), createIdentityObject(user), MEMBER, false, convertSearchControls(criteria));
+ Collection excludes = new HashSet<IdentityObjectType>();
+ excludes.add(getUserObjectType());
+ Collection<IdentityObject> ios = getRepository().
+ findIdentityObject(
+ getInvocationContext(),
+ createIdentityObject(user),
+ MEMBER,
+ excludes,
+ false,
+ convertSearchControls(criteria));
+
String userTypeName = getUserObjectType().getName();
for (IdentityObject io : ios)
Modified: idm/trunk/picketlink-idm-core/src/main/java/org/picketlink/idm/impl/cache/JBossCacheIdentityStoreWrapper.java
===================================================================
--- idm/trunk/picketlink-idm-core/src/main/java/org/picketlink/idm/impl/cache/JBossCacheIdentityStoreWrapper.java 2011-05-17 15:03:46 UTC (rev 945)
+++ idm/trunk/picketlink-idm-core/src/main/java/org/picketlink/idm/impl/cache/JBossCacheIdentityStoreWrapper.java 2011-05-17 19:37:59 UTC (rev 946)
@@ -245,13 +245,22 @@
}
-
+ public Collection<IdentityObject> findIdentityObject(IdentityStoreInvocationContext invocationCxt,
+ IdentityObject identity,
+ IdentityObjectRelationshipType relationshipType,
+ boolean parent,
+ IdentityObjectSearchCriteria criteria) throws IdentityException
+ {
+ return findIdentityObject(invocationCxt, identity, relationshipType, null, parent, criteria);
+ }
+
public Collection<IdentityObject> findIdentityObject(IdentityStoreInvocationContext invocationCtx,
IdentityObject identity,
IdentityObjectRelationshipType relationshipType,
+ Collection<IdentityObjectType> excludes,
boolean parent,
- IdentityObjectSearchCriteria criteria) throws IdentityException
+ IdentityObjectSearchCriteria criteria) throws IdentityException
{
IdentityObjectSearchImpl search = new IdentityObjectSearchImpl();
Modified: idm/trunk/picketlink-idm-core/src/main/java/org/picketlink/idm/impl/repository/FallbackIdentityStoreRepository.java
===================================================================
--- idm/trunk/picketlink-idm-core/src/main/java/org/picketlink/idm/impl/repository/FallbackIdentityStoreRepository.java 2011-05-17 15:03:46 UTC (rev 945)
+++ idm/trunk/picketlink-idm-core/src/main/java/org/picketlink/idm/impl/repository/FallbackIdentityStoreRepository.java 2011-05-17 19:37:59 UTC (rev 946)
@@ -834,7 +834,18 @@
boolean parent,
IdentityObjectSearchCriteria criteria) throws IdentityException
{
+ return findIdentityObject(invocationCxt, identity, relationshipType, null, parent, criteria);
+ }
+
+ public Collection<IdentityObject> findIdentityObject(IdentityStoreInvocationContext invocationCxt,
+ IdentityObject identity,
+ IdentityObjectRelationshipType relationshipType,
+ Collection<IdentityObjectType> excludes,
+ boolean parent,
+ IdentityObjectSearchCriteria criteria) throws IdentityException
+ {
+
try
{
List<IdentityStore> mappedStores = resolveIdentityStores(identity.getIdentityType());
Modified: idm/trunk/picketlink-idm-core/src/main/java/org/picketlink/idm/impl/repository/WrapperIdentityStoreRepository.java
===================================================================
--- idm/trunk/picketlink-idm-core/src/main/java/org/picketlink/idm/impl/repository/WrapperIdentityStoreRepository.java 2011-05-17 15:03:46 UTC (rev 945)
+++ idm/trunk/picketlink-idm-core/src/main/java/org/picketlink/idm/impl/repository/WrapperIdentityStoreRepository.java 2011-05-17 19:37:59 UTC (rev 946)
@@ -187,9 +187,19 @@
public Collection<IdentityObject> findIdentityObject(IdentityStoreInvocationContext invocationCtx,
IdentityObject identity,
IdentityObjectRelationshipType relationshipType,
+ Collection<IdentityObjectType> excludes,
boolean parent,
IdentityObjectSearchCriteria criteria) throws IdentityException
{
+ return defaultIdentityStore.findIdentityObject(resolveIdentityStoreInvocationContext(invocationCtx), identity, relationshipType, excludes, parent, criteria);
+ }
+
+ public Collection<IdentityObject> findIdentityObject(IdentityStoreInvocationContext invocationCtx,
+ IdentityObject identity,
+ IdentityObjectRelationshipType relationshipType,
+ boolean parent,
+ IdentityObjectSearchCriteria criteria) throws IdentityException
+ {
return defaultIdentityStore.findIdentityObject(resolveIdentityStoreInvocationContext(invocationCtx), identity, relationshipType, parent, criteria);
}
Modified: idm/trunk/picketlink-idm-hibernate/pom.xml
===================================================================
--- idm/trunk/picketlink-idm-hibernate/pom.xml 2011-05-17 15:03:46 UTC (rev 945)
+++ idm/trunk/picketlink-idm-hibernate/pom.xml 2011-05-17 19:37:59 UTC (rev 946)
@@ -81,7 +81,7 @@
<artifactId>junit</artifactId>
<scope>test</scope>
</dependency>
-
+
</dependencies>
Modified: idm/trunk/picketlink-idm-hibernate/src/main/java/org/picketlink/idm/impl/store/hibernate/HibernateIdentityStoreImpl.java
===================================================================
--- idm/trunk/picketlink-idm-hibernate/src/main/java/org/picketlink/idm/impl/store/hibernate/HibernateIdentityStoreImpl.java 2011-05-17 15:03:46 UTC (rev 945)
+++ idm/trunk/picketlink-idm-hibernate/src/main/java/org/picketlink/idm/impl/store/hibernate/HibernateIdentityStoreImpl.java 2011-05-17 19:37:59 UTC (rev 946)
@@ -26,6 +26,7 @@
import org.picketlink.idm.impl.helper.Tools;
import org.picketlink.idm.impl.model.hibernate.*;
import org.picketlink.idm.impl.store.FeaturesMetaDataImpl;
+import org.picketlink.idm.impl.types.SimpleIdentityObject;
import org.picketlink.idm.spi.configuration.IdentityStoreConfigurationContext;
import org.picketlink.idm.spi.configuration.metadata.IdentityObjectAttributeMetaData;
import org.picketlink.idm.spi.configuration.metadata.IdentityObjectTypeMetaData;
@@ -662,32 +663,8 @@
checkIOType(type);
- HibernateIdentityObjectType hibernateType = getHibernateIdentityObjectType(ctx, type);
+ HibernateIdentityObject hibernateObject = safeGet(ctx, new SimpleIdentityObject(name, type));
- HibernateIdentityObject hibernateObject = null;
-
- try
- {
- hibernateObject = (HibernateIdentityObject)getHibernateSession(ctx).
- createCriteria(HibernateIdentityObject.class)
- .add(Restrictions.eq("name", name))
- .createAlias("realm", "rm")
- .add(Restrictions.eq("rm.name", getRealmName(ctx)))
- .createAlias("identityType", "type")
- .add(Restrictions.eq("type.name", hibernateType.getName()))
- .setCacheable(true)
- .uniqueResult();
- }
- catch (Exception e)
- {
- if (log.isLoggable(Level.FINER))
- {
- log.log(Level.FINER, "Exception occurred: ", e);
- }
-
- throw new IdentityException("Cannot find IdentityObject with name '" + name + "' and type '" + type.getName() + "'", e);
- }
-
// Check result with case sensitive compare:
if (isAllowNotCaseSensitiveSearch())
{
@@ -738,6 +715,7 @@
checkIOType(identityType);
HibernateIdentityObjectType hibernateType = getHibernateIdentityObjectType(ctx, identityType);
+ HibernateRealm realm = getRealm(getHibernateSession(ctx),ctx);
List<IdentityObject> results;
@@ -748,10 +726,8 @@
Criteria hc = hibernateSession.createCriteria(HibernateIdentityObject.class)
.setCacheable(true)
- .createAlias("realm", "rm")
- .add(Restrictions.eq("rm.name", getRealmName(ctx)))
- .createAlias("identityType", "type")
- .add(Restrictions.eq("type.name", hibernateType.getName()));
+ .add(Restrictions.eq("realm", realm))
+ .add(Restrictions.eq("identityType", hibernateType));
if (criteria != null && criteria.isSorted())
{
@@ -821,11 +797,22 @@
@SuppressWarnings("unchecked")
+ public Collection<IdentityObject> findIdentityObject(IdentityStoreInvocationContext invocationCxt,
+ IdentityObject identity,
+ IdentityObjectRelationshipType relationshipType,
+ boolean parent,
+ IdentityObjectSearchCriteria criteria) throws IdentityException
+ {
+ return findIdentityObject(invocationCxt, identity, relationshipType, null, parent, criteria);
+ }
+
+ @SuppressWarnings("unchecked")
public Collection<IdentityObject> findIdentityObject(IdentityStoreInvocationContext ctx,
IdentityObject identity,
IdentityObjectRelationshipType relationshipType,
+ Collection<IdentityObjectType> excludes,
boolean parent,
- IdentityObjectSearchCriteria criteria) throws IdentityException
+ IdentityObjectSearchCriteria criteria) throws IdentityException
{
//TODO:test
@@ -865,6 +852,18 @@
hqlString.append("select distinct ior.toIdentityObject from HibernateIdentityObjectRelationship ior where " +
"ior.toIdentityObject.name like :nameFilter and ior.fromIdentityObject = :identity");
}
+
+ if (excludes != null && excludes.size() > 0)
+ {
+
+ int i = 0;
+ for (IdentityObjectType exclude : excludes)
+ {
+ hqlString.append(" and ior.toIdentityObject.identityType.name != ")
+ .append(":exclude" + i++);
+ }
+ }
+
if (orderByName)
{
hqlString.append(" order by ior.toIdentityObject.name");
@@ -887,9 +886,19 @@
"ior.fromIdentityObject.name like :nameFilter and ior.toIdentityObject = :identity");
}
+ if (excludes != null && excludes.size() > 0)
+ {
+ int i = 0;
+ for (IdentityObjectType exclude : excludes)
+ {
+ hqlString.append(" and ior.fromIdentityObject.identityType.name != ")
+ .append(":exclude" + i++);
+ }
+ }
+
if (orderByName)
{
- hqlString.append(" order by ior.toIdentityObject.name");
+ hqlString.append(" order by ior.fromIdentityObject.name");
if (ascending)
{
hqlString.append(" asc");
@@ -916,7 +925,14 @@
q.setParameter("nameFilter", "%");
}
-
+ if (excludes != null && excludes.size() > 0)
+ {
+ int i = 0;
+ for (IdentityObjectType exclude : excludes)
+ {
+ q.setParameter("exclude" + i++, exclude.getName());
+ }
+ }
if (criteria != null && criteria.isPaged() && !criteria.isFiltered())
{
q.setFirstResult(criteria.getFirstResult());
@@ -991,6 +1007,7 @@
}
HibernateIdentityObjectRelationship relationship = null;
+ HibernateRealm hibernateRealm = getRealm(getHibernateSession(ctx),ctx);
if (name != null)
{
@@ -999,9 +1016,8 @@
(HibernateIdentityObjectRelationshipName)getHibernateSession(ctx).
createCriteria(HibernateIdentityObjectRelationshipName.class).
setCacheable(true).
- createAlias("realm", "r").
add(Restrictions.eq("name", name)).
- add(Restrictions.eq("r.name", realm.getName())).
+ add(Restrictions.eq("realm", hibernateRealm)).
uniqueResult();
if (relationshipName == null)
@@ -1245,6 +1261,9 @@
criteria.add(Restrictions.eq("toIdentityObject", hio));
}
+ criteria.setFetchMode("fromIdentityObject", FetchMode.JOIN);
+ criteria.setFetchMode("toIdentityObject", FetchMode.JOIN);
+
List<HibernateIdentityObjectRelationship> results = criteria.list();
Hibernate.initialize(results);
@@ -1811,22 +1830,23 @@
public Map<String, IdentityObjectAttribute> getAttributes(IdentityStoreInvocationContext ctx, IdentityObject identity) throws IdentityException
{
- HibernateIdentityObject hibernateObject = safeGet(ctx, identity);
+ HibernateRealm realm = getRealm(getHibernateSession(ctx), ctx);
+ HibernateIdentityObjectType hibernateType = getHibernateIdentityObjectType(ctx, identity.getIdentityType());
-
-
Map<String, IdentityObjectAttribute> result = new HashMap<String, IdentityObjectAttribute>();
- if (hibernateObject == null)
- {
- return result;
- }
+ Criteria criteria = getHibernateSession(ctx).
+ createCriteria(HibernateIdentityObjectAttribute.class)
+ .setCacheable(true)
+ .setFetchMode("textValues", FetchMode.JOIN)
+ .setFetchSize(20)
+ .createAlias("identityObject", "io")
+ .add(Restrictions.eq("io.name", identity.getName()))
+ .add(Restrictions.eq("io.realm", realm))
+ .add(Restrictions.eq("io.identityType", hibernateType));
- Set<HibernateIdentityObjectAttribute> storeAttributes = hibernateObject.getAttributes();
+ Collection<HibernateIdentityObjectAttribute> storeAttributes = (Collection<HibernateIdentityObjectAttribute>)criteria.list();
- Hibernate.initialize(storeAttributes);
-
-
// Remap the names
for (HibernateIdentityObjectAttribute attribute : storeAttributes)
{
@@ -2604,6 +2624,8 @@
{
HibernateIdentityObject hibernateObject = null;
+ HibernateIdentityObjectType hibernateType = getHibernateIdentityObjectType(ctx, io.getIdentityType());
+ HibernateRealm realm = getRealm(getHibernateSession(ctx),ctx);
Session hibernateSession = getHibernateSession(ctx);
@@ -2612,10 +2634,8 @@
hibernateObject = (HibernateIdentityObject)hibernateSession.createCriteria(HibernateIdentityObject.class)
.add(Restrictions.eq("name", io.getName()))
- .createAlias("identityType", "type")
- .add(Restrictions.eq("type.name", io.getIdentityType().getName()))
- .createAlias("realm", "rm")
- .add(Restrictions.eq("rm.name", getRealmName(ctx)))
+ .add(Restrictions.eq("identityType", hibernateType))
+ .add(Restrictions.eq("realm", realm))
.setCacheable(true)
.uniqueResult();
Modified: idm/trunk/picketlink-idm-jpa/src/main/java/org/picketlink/idm/impl/store/jpa/JpaIdentityStore.java
===================================================================
--- idm/trunk/picketlink-idm-jpa/src/main/java/org/picketlink/idm/impl/store/jpa/JpaIdentityStore.java 2011-05-17 15:03:46 UTC (rev 945)
+++ idm/trunk/picketlink-idm-jpa/src/main/java/org/picketlink/idm/impl/store/jpa/JpaIdentityStore.java 2011-05-17 19:37:59 UTC (rev 946)
@@ -1319,11 +1319,25 @@
return objs;
}
- public Collection<IdentityObject> findIdentityObject(
- IdentityStoreInvocationContext invocationCxt, IdentityObject identity,
- IdentityObjectRelationshipType relationshipType, boolean parent,
- IdentityObjectSearchCriteria criteria) throws IdentityException
+
+
+ public Collection<IdentityObject> findIdentityObject(IdentityStoreInvocationContext invocationCxt,
+ IdentityObject identity,
+ IdentityObjectRelationshipType relationshipType,
+ boolean parent,
+ IdentityObjectSearchCriteria criteria) throws IdentityException
{
+ return findIdentityObject(invocationCxt, identity, relationshipType, null, parent, criteria);
+ }
+
+
+ public Collection<IdentityObject> findIdentityObject(IdentityStoreInvocationContext invocationCxt,
+ IdentityObject identity,
+ IdentityObjectRelationshipType relationshipType,
+ Collection<IdentityObjectType> excludes,
+ boolean parent,
+ IdentityObjectSearchCriteria criteria) throws IdentityException
+ {
List<IdentityObject> objs = new ArrayList<IdentityObject>();
System.out.println("*** Invoked unimplemented method findIdentityObject()");
Modified: idm/trunk/picketlink-idm-ldap/src/main/java/org/picketlink/idm/impl/store/ldap/LDAPIdentityStoreImpl.java
===================================================================
--- idm/trunk/picketlink-idm-ldap/src/main/java/org/picketlink/idm/impl/store/ldap/LDAPIdentityStoreImpl.java 2011-05-17 15:03:46 UTC (rev 945)
+++ idm/trunk/picketlink-idm-ldap/src/main/java/org/picketlink/idm/impl/store/ldap/LDAPIdentityStoreImpl.java 2011-05-17 19:37:59 UTC (rev 946)
@@ -1111,12 +1111,26 @@
}
+ public Collection<IdentityObject> findIdentityObject(IdentityStoreInvocationContext invocationCxt,
+ IdentityObject identity,
+ IdentityObjectRelationshipType relationshipType,
+ boolean parent,
+ IdentityObjectSearchCriteria criteria) throws IdentityException
+ {
+ return findIdentityObject(invocationCxt, identity, relationshipType, null, parent, criteria);
+ }
+
+
public Collection<IdentityObject> findIdentityObject(IdentityStoreInvocationContext ctx,
IdentityObject identity,
IdentityObjectRelationshipType relationshipType,
+ Collection<IdentityObjectType> excludes,
boolean parent,
- IdentityObjectSearchCriteria criteria) throws IdentityException
+ IdentityObjectSearchCriteria criteria) throws IdentityException
{
+
+ //TODO: implement excludes
+
if (log.isLoggable(Level.FINER))
{
Tools.logMethodIn(
Modified: idm/trunk/picketlink-idm-spi/src/main/java/org/picketlink/idm/spi/store/IdentityStore.java
===================================================================
--- idm/trunk/picketlink-idm-spi/src/main/java/org/picketlink/idm/spi/store/IdentityStore.java 2011-05-17 15:03:46 UTC (rev 945)
+++ idm/trunk/picketlink-idm-spi/src/main/java/org/picketlink/idm/spi/store/IdentityStore.java 2011-05-17 19:37:59 UTC (rev 946)
@@ -168,6 +168,24 @@
boolean parent,
IdentityObjectSearchCriteria criteria) throws IdentityException;
+ /**
+ * Find identites that have relationship with given identity. Relationships are directional (from parent to child).
+ *
+ * @param invocationCxt
+ * @param identity
+ * @param relationshipType
+ * @param excludes list of object types to not include in search
+ * @param parent defines if given identity is parent or child side in the
+ * relationship - default is true (parent)
+ * @param criteria
+ * @return
+ * @throws IdentityException
+ */
+ Collection<IdentityObject> findIdentityObject(IdentityStoreInvocationContext invocationCxt, IdentityObject identity,
+ IdentityObjectRelationshipType relationshipType,
+ Collection<IdentityObjectType> excludes,
+ boolean parent,
+ IdentityObjectSearchCriteria criteria) throws IdentityException;
/**
Modified: idm/trunk/pom.xml
===================================================================
--- idm/trunk/pom.xml 2011-05-17 15:03:46 UTC (rev 945)
+++ idm/trunk/pom.xml 2011-05-17 19:37:59 UTC (rev 946)
@@ -45,6 +45,26 @@
</modules>
</profile>
<profile>
+ <id>dev</id>
+ <activation>
+ <activeByDefault>true</activeByDefault>
+ </activation>
+ <modules>
+ <module>parent</module>
+ <module>picketlink-idm-common</module>
+ <module>picketlink-idm-spi</module>
+ <module>picketlink-idm-api</module>
+ <module>picketlink-idm-core</module>
+ <module>picketlink-idm-testsuite/common</module>
+ <module>picketlink-idm-hibernate</module>
+ <module>picketlink-idm-jpa</module>
+ <module>picketlink-idm-ldap</module>
+ <module>picketlink-idm-cache</module>
+ <module>picketlink-idm-auth</module>
+ <module>picketlink-idm-testsuite/integration</module>
+ </modules>
+ </profile>
+ <profile>
<id>all</id>
<modules>
<module>parent</module>
13 years, 7 months
Picketlink SVN: r945 - federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/parsers/wst.
by picketlink-commits@lists.jboss.org
Author: anil.saldhana(a)jboss.com
Date: 2011-05-17 11:03:46 -0400 (Tue, 17 May 2011)
New Revision: 945
Modified:
federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/parsers/wst/WSTRequestSecurityTokenParser.java
federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/parsers/wst/WSTRequestSecurityTokenResponseParser.java
federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/parsers/wst/WSTrustOnBehalfOfParser.java
Log:
add some logging
Modified: federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/parsers/wst/WSTRequestSecurityTokenParser.java
===================================================================
--- federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/parsers/wst/WSTRequestSecurityTokenParser.java 2011-05-17 14:55:04 UTC (rev 944)
+++ federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/parsers/wst/WSTRequestSecurityTokenParser.java 2011-05-17 15:03:46 UTC (rev 945)
@@ -31,6 +31,7 @@
import javax.xml.stream.events.StartElement;
import javax.xml.stream.events.XMLEvent;
+import org.apache.log4j.Logger;
import org.picketlink.identity.federation.core.exceptions.ParsingException;
import org.picketlink.identity.federation.core.parsers.ParserController;
import org.picketlink.identity.federation.core.parsers.ParserNamespaceSupport;
@@ -60,6 +61,10 @@
*/
public class WSTRequestSecurityTokenParser implements ParserNamespaceSupport
{
+ protected Logger log = Logger.getLogger(WSTRequestSecurityTokenParser.class);
+
+ protected boolean trace = log.isTraceEnabled();
+
public static final String X509CERTIFICATE = "X509Certificate";
public static final String KEYVALUE = "KeyValue";
@@ -298,6 +303,10 @@
else
{
QName qname = subEvent.getName();
+ if (trace)
+ {
+ log.trace("Looking for Parser for :" + qname);
+ }
ParserNamespaceSupport parser = ParserController.get(qname);
if (parser == null)
throw new RuntimeException("Cannot parse " + qname);
Modified: federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/parsers/wst/WSTRequestSecurityTokenResponseParser.java
===================================================================
--- federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/parsers/wst/WSTRequestSecurityTokenResponseParser.java 2011-05-17 14:55:04 UTC (rev 944)
+++ federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/parsers/wst/WSTRequestSecurityTokenResponseParser.java 2011-05-17 15:03:46 UTC (rev 945)
@@ -27,6 +27,7 @@
import javax.xml.stream.events.StartElement;
import javax.xml.stream.events.XMLEvent;
+import org.apache.log4j.Logger;
import org.picketlink.identity.federation.core.exceptions.ParsingException;
import org.picketlink.identity.federation.core.parsers.ParserController;
import org.picketlink.identity.federation.core.parsers.ParserNamespaceSupport;
@@ -52,13 +53,17 @@
import org.w3c.dom.Element;
/**
- * Parse the WS-Trust RequestSecurityToken
+ * Parse the WS-Trust RequestSecurityTokenResponse
*
* @author Anil.Saldhana(a)redhat.com
* @since Oct 11, 2010
*/
public class WSTRequestSecurityTokenResponseParser implements ParserNamespaceSupport
{
+ protected Logger log = Logger.getLogger(WSTRequestSecurityTokenResponseParser.class);
+
+ protected boolean trace = log.isTraceEnabled();
+
public static final String X509CERTIFICATE = "X509Certificate";
public static final String KEYVALUE = "KeyValue";
@@ -92,7 +97,7 @@
if (endElementTag.equals(WSTrustConstants.RSTR))
break;
else
- throw new RuntimeException( "Unknown End Element:" + endElementTag );
+ throw new RuntimeException("Unknown End Element:" + endElementTag);
}
try
@@ -216,7 +221,7 @@
}
responseToken.setEntropy(entropy);
EndElement endElement = StaxParserUtil.getNextEndElement(xmlEventReader);
- StaxParserUtil.validate(endElement, WSTrustConstants.ENTROPY );
+ StaxParserUtil.validate(endElement, WSTrustConstants.ENTROPY);
}
else if (tag.equals(WSTrustConstants.USE_KEY))
{
@@ -275,7 +280,7 @@
}
responseToken.setRequestedProofToken(requestedProofToken);
EndElement endElement = StaxParserUtil.getNextEndElement(xmlEventReader);
- StaxParserUtil.validate(endElement, WSTrustConstants.REQUESTED_PROOF_TOKEN );
+ StaxParserUtil.validate(endElement, WSTrustConstants.REQUESTED_PROOF_TOKEN);
}
else if (tag.equals(WSTrustConstants.REQUESTED_TOKEN))
{
@@ -292,6 +297,10 @@
else
{
QName qname = subEvent.getName();
+ if (trace)
+ {
+ log.trace("Looking for Parser for :" + qname);
+ }
ParserNamespaceSupport parser = ParserController.get(qname);
if (parser == null)
throw new RuntimeException("Cannot parse " + qname);
@@ -336,13 +345,13 @@
if (xmlEvent instanceof EndElement)
{
String endElementTag = StaxParserUtil.getEndElementName((EndElement) xmlEvent);
- if ( endElementTag.equals(WSTrustConstants.STATUS))
+ if (endElementTag.equals(WSTrustConstants.STATUS))
{
xmlEvent = StaxParserUtil.getNextEndElement(xmlEventReader);
break;
- }
+ }
else
- throw new RuntimeException( "unknown end element:" + endElementTag );
+ throw new RuntimeException("unknown end element:" + endElementTag);
}
startElement = (StartElement) xmlEvent;
String tag = StaxParserUtil.getStartElementName(startElement);
@@ -383,14 +392,14 @@
xmlEvent = StaxParserUtil.peek(xmlEventReader);
if (xmlEvent instanceof EndElement)
{
- String endElementTag = StaxParserUtil.getEndElementName( (EndElement) xmlEvent );
- if ( endElementTag.equals(WSTrustConstants.REQUESTED_TOKEN))
+ String endElementTag = StaxParserUtil.getEndElementName((EndElement) xmlEvent);
+ if (endElementTag.equals(WSTrustConstants.REQUESTED_TOKEN))
{
xmlEvent = StaxParserUtil.getNextEndElement(xmlEventReader);
break;
}
else
- throw new RuntimeException( "unknown end element:" + endElementTag );
+ throw new RuntimeException("unknown end element:" + endElementTag);
}
Element tokenElement = StaxParserUtil.getDOMElement(xmlEventReader);
requestedSecurityTokenType.setAny(tokenElement);
Modified: federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/parsers/wst/WSTrustOnBehalfOfParser.java
===================================================================
--- federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/parsers/wst/WSTrustOnBehalfOfParser.java 2011-05-17 14:55:04 UTC (rev 944)
+++ federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/parsers/wst/WSTrustOnBehalfOfParser.java 2011-05-17 15:03:46 UTC (rev 945)
@@ -39,28 +39,29 @@
* @since Oct 18, 2010
*/
public class WSTrustOnBehalfOfParser implements ParserNamespaceSupport
-{
+{
/**
* @see {@link ParserNamespaceSupport#parse(XMLEventReader)}
*/
public Object parse(XMLEventReader xmlEventReader) throws ParsingException
- {
+ {
OnBehalfOfType onBehalfType = new OnBehalfOfType();
- StartElement startElement = StaxParserUtil.peekNextStartElement( xmlEventReader );
- String tag = StaxParserUtil.getStartElementName( startElement );
-
- if( tag.equals( WSTrustConstants.WSSE.USERNAME_TOKEN ) )
+ StartElement startElement = StaxParserUtil.peekNextStartElement(xmlEventReader);
+ String tag = StaxParserUtil.getStartElementName(startElement);
+
+ if (tag.equals(WSTrustConstants.WSSE.USERNAME_TOKEN))
{
WSSecurityParser wsseParser = new WSSecurityParser();
-
- UsernameTokenType userNameToken = (UsernameTokenType) wsseParser.parse( xmlEventReader );
- onBehalfType.setAny( userNameToken );
+
+ UsernameTokenType userNameToken = (UsernameTokenType) wsseParser.parse(xmlEventReader);
+ onBehalfType.setAny(userNameToken);
}
-
+ else
+ throw new RuntimeException("Unknown tag:" + tag);
+
return onBehalfType;
}
-
/**
* @see {@link ParserNamespaceSupport#supports(QName)}
*/
@@ -68,8 +69,7 @@
{
String nsURI = qname.getNamespaceURI();
String localPart = qname.getLocalPart();
-
- return WSTrustConstants.BASE_NAMESPACE.equals( nsURI )
- && WSTrustConstants.ON_BEHALF_OF.equals( localPart );
- }
+
+ return WSTrustConstants.BASE_NAMESPACE.equals(nsURI) && WSTrustConstants.ON_BEHALF_OF.equals(localPart);
+ }
}
\ No newline at end of file
13 years, 7 months
Picketlink SVN: r944 - in federation/trunk: picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/wstrust and 3 other directories.
by picketlink-commits@lists.jboss.org
Author: anil.saldhana(a)jboss.com
Date: 2011-05-17 10:55:04 -0400 (Tue, 17 May 2011)
New Revision: 944
Added:
federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/ws/addressing/AnyAddressingType.java
federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/ws/addressing/BaseAddressingType.java
Removed:
federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/ws/addressing/ObjectFactory.java
federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/ws/policy/ObjectFactory.java
federation/trunk/picketlink-fed-model/src/test/java/org/picketlink/test/identity/federation/ws/trust/UnmarshallingTestCase.java
Modified:
federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/parsers/wsp/WSPolicyParser.java
federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/wstrust/WSTrustUtil.java
federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/ws/addressing/AttributedQNameType.java
federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/ws/addressing/AttributedURIType.java
federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/ws/addressing/AttributedUnsignedLongType.java
federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/ws/addressing/EndpointReferenceType.java
federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/ws/addressing/MetadataType.java
federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/ws/addressing/ProblemActionType.java
federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/ws/addressing/ReferenceParametersType.java
federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/ws/addressing/RelatesToType.java
federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/ws/addressing/package-info.java
federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/ws/policy/AppliesTo.java
federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/ws/policy/OperatorContentType.java
federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/ws/policy/Policy.java
federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/ws/policy/PolicyAttachment.java
federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/ws/policy/PolicyReference.java
federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/ws/policy/package-info.java
Log:
remove JAXB from the addressing/policy object model
Modified: federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/parsers/wsp/WSPolicyParser.java
===================================================================
--- federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/parsers/wsp/WSPolicyParser.java 2011-05-17 05:03:58 UTC (rev 943)
+++ federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/parsers/wsp/WSPolicyParser.java 2011-05-17 14:55:04 UTC (rev 944)
@@ -46,59 +46,59 @@
* @since Oct 14, 2010
*/
public class WSPolicyParser extends AbstractParser
-{
+{
/**
* @see {@link ParserNamespaceSupport#parse(XMLEventReader)}
*/
public Object parse(XMLEventReader xmlEventReader) throws ParsingException
- {
- while( xmlEventReader.hasNext() )
+ {
+ while (xmlEventReader.hasNext())
{
- XMLEvent xmlEvent = StaxParserUtil.peek( xmlEventReader );
+ XMLEvent xmlEvent = StaxParserUtil.peek(xmlEventReader);
- if( xmlEvent instanceof StartElement )
+ if (xmlEvent instanceof StartElement)
{
StartElement startElement = (StartElement) xmlEvent;
- String elementName = StaxParserUtil.getStartElementName( startElement );
- if( elementName.equalsIgnoreCase( WSPolicyConstants.APPLIES_TO ))
+ String elementName = StaxParserUtil.getStartElementName(startElement);
+ if (elementName.equalsIgnoreCase(WSPolicyConstants.APPLIES_TO))
{
//Get the AppliesTo element
startElement = StaxParserUtil.getNextStartElement(xmlEventReader);
-
- AppliesTo appliesTo = new AppliesTo();
-
+
+ AppliesTo appliesTo = new AppliesTo();
+
//Now we do not do anything to the applies to element. We go further
startElement = StaxParserUtil.peekNextStartElement(xmlEventReader);
-
+
QName qname = startElement.getName();
- ParserNamespaceSupport parser = ParserController.get( qname );
- if( parser == null )
- throw new RuntimeException( "Unable to parse:" + qname );
-
- Object parsedObject = parser.parse( xmlEventReader );
- appliesTo.getAny().add( parsedObject );
-
+ ParserNamespaceSupport parser = ParserController.get(qname);
+ if (parser == null)
+ throw new RuntimeException("Unable to parse:" + qname);
+
+ Object parsedObject = parser.parse(xmlEventReader);
+ appliesTo.addAny(parsedObject);
+
EndElement endElement = StaxParserUtil.getNextEndElement(xmlEventReader);
- StaxParserUtil.validate(endElement, WSPolicyConstants.APPLIES_TO );
+ StaxParserUtil.validate(endElement, WSPolicyConstants.APPLIES_TO);
return appliesTo;
- }
+ }
}
else
{
- StaxParserUtil.getNextEvent(xmlEventReader);
+ StaxParserUtil.getNextEvent(xmlEventReader);
}
}
- throw new RuntimeException( "WSPolicy Parsing has failed" );
+ throw new RuntimeException("WSPolicy Parsing has failed");
}
-
+
/**
* @see {@link ParserNamespaceSupport#supports(QName)}
*/
public boolean supports(QName qname)
{
- String nsURI = qname.getNamespaceURI();
-
- return WSTrustConstants.WSP_NS.equals( nsURI );
+ String nsURI = qname.getNamespaceURI();
+
+ return WSTrustConstants.WSP_NS.equals(nsURI);
}
}
\ No newline at end of file
Modified: federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/wstrust/WSTrustUtil.java
===================================================================
--- federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/wstrust/WSTrustUtil.java 2011-05-17 05:03:58 UTC (rev 943)
+++ federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/wstrust/WSTrustUtil.java 2011-05-17 14:55:04 UTC (rev 944)
@@ -135,7 +135,7 @@
EndpointReferenceType reference = new EndpointReferenceType();
reference.setAddress(attributedURI);
AppliesTo appliesTo = new AppliesTo();
- appliesTo.getAny().add(reference);
+ appliesTo.addAny(reference);
return appliesTo;
}
Added: federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/ws/addressing/AnyAddressingType.java
===================================================================
--- federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/ws/addressing/AnyAddressingType.java (rev 0)
+++ federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/ws/addressing/AnyAddressingType.java 2011-05-17 14:55:04 UTC (rev 944)
@@ -0,0 +1,61 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.picketlink.identity.federation.ws.addressing;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+
+import org.w3c.dom.Element;
+
+/**
+ * @author Anil.Saldhana(a)redhat.com
+ * @since May 17, 2011
+ */
+public class AnyAddressingType extends BaseAddressingType
+{
+ protected List<Object> any = new ArrayList<Object>();
+
+ /**
+ * Gets the value of the any property.
+ *
+ * <p>
+ * Objects of the following type(s) are allowed in the list
+ * {@link Object }
+ * {@link Element }
+ *
+ */
+ public List<Object> getAny()
+ {
+ return Collections.unmodifiableList(this.any);
+ }
+
+ /**
+ * Add an any
+ * @param obj
+ */
+ public void addAny(Object obj)
+ {
+ this.any.add(obj);
+ }
+
+}
\ No newline at end of file
Modified: federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/ws/addressing/AttributedQNameType.java
===================================================================
--- federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/ws/addressing/AttributedQNameType.java 2011-05-17 05:03:58 UTC (rev 943)
+++ federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/ws/addressing/AttributedQNameType.java 2011-05-17 14:55:04 UTC (rev 944)
@@ -1,24 +1,28 @@
-//
-// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-661
-// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
-// Any modifications to this file will be lost upon recompilation of the source schema.
-// Generated on: 2008.12.17 at 12:32:20 PM CST
-//
-
-
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2011, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
package org.picketlink.identity.federation.ws.addressing;
-import java.util.HashMap;
-import java.util.Map;
-
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlAnyAttribute;
-import javax.xml.bind.annotation.XmlType;
-import javax.xml.bind.annotation.XmlValue;
import javax.xml.namespace.QName;
-
/**
* <p>Java class for AttributedQNameType complex type.
*
@@ -35,57 +39,34 @@
*
*
*/
-(a)XmlAccessorType(XmlAccessType.FIELD)
-@XmlType(name = "AttributedQNameType", propOrder = {
- "value"
-})
-public class AttributedQNameType {
+public class AttributedQNameType extends BaseAddressingType
+{
- @XmlValue
- protected QName value;
- @XmlAnyAttribute
- private Map<QName, String> otherAttributes = new HashMap<QName, String>();
+ protected QName value;
- /**
- * Gets the value of the value property.
- *
- * @return
- * possible object is
- * {@link QName }
- *
- */
- public QName getValue() {
- return value;
- }
+ /**
+ * Gets the value of the value property.
+ *
+ * @return
+ * possible object is
+ * {@link QName }
+ *
+ */
+ public QName getValue()
+ {
+ return value;
+ }
- /**
- * Sets the value of the value property.
- *
- * @param value
- * allowed object is
- * {@link QName }
- *
- */
- public void setValue(QName value) {
- this.value = value;
- }
-
- /**
- * Gets a map that contains attributes that aren't bound to any typed property on this class.
- *
- * <p>
- * the map is keyed by the name of the attribute and
- * the value is the string value of the attribute.
- *
- * the map returned by this method is live, and you can add new attribute
- * by updating the map directly. Because of this design, there's no setter.
- *
- *
- * @return
- * always non-null
- */
- public Map<QName, String> getOtherAttributes() {
- return otherAttributes;
- }
-
-}
+ /**
+ * Sets the value of the value property.
+ *
+ * @param value
+ * allowed object is
+ * {@link QName }
+ *
+ */
+ public void setValue(QName value)
+ {
+ this.value = value;
+ }
+}
\ No newline at end of file
Modified: federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/ws/addressing/AttributedURIType.java
===================================================================
--- federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/ws/addressing/AttributedURIType.java 2011-05-17 05:03:58 UTC (rev 943)
+++ federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/ws/addressing/AttributedURIType.java 2011-05-17 14:55:04 UTC (rev 944)
@@ -5,21 +5,8 @@
// Generated on: 2008.12.17 at 12:32:20 PM CST
//
-
package org.picketlink.identity.federation.ws.addressing;
-import java.util.HashMap;
-import java.util.Map;
-
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlAnyAttribute;
-import javax.xml.bind.annotation.XmlSchemaType;
-import javax.xml.bind.annotation.XmlType;
-import javax.xml.bind.annotation.XmlValue;
-import javax.xml.namespace.QName;
-
-
/**
* <p>Java class for AttributedURIType complex type.
*
@@ -36,58 +23,34 @@
*
*
*/
-(a)XmlAccessorType(XmlAccessType.FIELD)
-@XmlType(name = "AttributedURIType", propOrder = {
- "value"
-})
-public class AttributedURIType {
+public class AttributedURIType extends BaseAddressingType
+{
- @XmlValue
- @XmlSchemaType(name = "anyURI")
- protected String value;
- @XmlAnyAttribute
- private Map<QName, String> otherAttributes = new HashMap<QName, String>();
+ protected String value;
- /**
- * Gets the value of the value property.
- *
- * @return
- * possible object is
- * {@link String }
- *
- */
- public String getValue() {
- return value;
- }
+ /**
+ * Gets the value of the value property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getValue()
+ {
+ return value;
+ }
- /**
- * Sets the value of the value property.
- *
- * @param value
- * allowed object is
- * {@link String }
- *
- */
- public void setValue(String value) {
- this.value = value;
- }
-
- /**
- * Gets a map that contains attributes that aren't bound to any typed property on this class.
- *
- * <p>
- * the map is keyed by the name of the attribute and
- * the value is the string value of the attribute.
- *
- * the map returned by this method is live, and you can add new attribute
- * by updating the map directly. Because of this design, there's no setter.
- *
- *
- * @return
- * always non-null
- */
- public Map<QName, String> getOtherAttributes() {
- return otherAttributes;
- }
-
-}
+ /**
+ * Sets the value of the value property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setValue(String value)
+ {
+ this.value = value;
+ }
+}
\ No newline at end of file
Modified: federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/ws/addressing/AttributedUnsignedLongType.java
===================================================================
--- federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/ws/addressing/AttributedUnsignedLongType.java 2011-05-17 05:03:58 UTC (rev 943)
+++ federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/ws/addressing/AttributedUnsignedLongType.java 2011-05-17 14:55:04 UTC (rev 944)
@@ -1,26 +1,29 @@
-//
-// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-661
-// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
-// Any modifications to this file will be lost upon recompilation of the source schema.
-// Generated on: 2008.12.17 at 12:32:20 PM CST
-//
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2011, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
-
package org.picketlink.identity.federation.ws.addressing;
import java.math.BigInteger;
-import java.util.HashMap;
-import java.util.Map;
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlAnyAttribute;
-import javax.xml.bind.annotation.XmlSchemaType;
-import javax.xml.bind.annotation.XmlType;
-import javax.xml.bind.annotation.XmlValue;
-import javax.xml.namespace.QName;
-
-
/**
* <p>Java class for AttributedUnsignedLongType complex type.
*
@@ -37,58 +40,33 @@
*
*
*/
-(a)XmlAccessorType(XmlAccessType.FIELD)
-@XmlType(name = "AttributedUnsignedLongType", propOrder = {
- "value"
-})
-public class AttributedUnsignedLongType {
+public class AttributedUnsignedLongType extends BaseAddressingType
+{
+ protected BigInteger value;
- @XmlValue
- @XmlSchemaType(name = "unsignedLong")
- protected BigInteger value;
- @XmlAnyAttribute
- private Map<QName, String> otherAttributes = new HashMap<QName, String>();
+ /**
+ * Gets the value of the value property.
+ *
+ * @return
+ * possible object is
+ * {@link BigInteger }
+ *
+ */
+ public BigInteger getValue()
+ {
+ return value;
+ }
- /**
- * Gets the value of the value property.
- *
- * @return
- * possible object is
- * {@link BigInteger }
- *
- */
- public BigInteger getValue() {
- return value;
- }
-
- /**
- * Sets the value of the value property.
- *
- * @param value
- * allowed object is
- * {@link BigInteger }
- *
- */
- public void setValue(BigInteger value) {
- this.value = value;
- }
-
- /**
- * Gets a map that contains attributes that aren't bound to any typed property on this class.
- *
- * <p>
- * the map is keyed by the name of the attribute and
- * the value is the string value of the attribute.
- *
- * the map returned by this method is live, and you can add new attribute
- * by updating the map directly. Because of this design, there's no setter.
- *
- *
- * @return
- * always non-null
- */
- public Map<QName, String> getOtherAttributes() {
- return otherAttributes;
- }
-
-}
+ /**
+ * Sets the value of the value property.
+ *
+ * @param value
+ * allowed object is
+ * {@link BigInteger }
+ *
+ */
+ public void setValue(BigInteger value)
+ {
+ this.value = value;
+ }
+}
\ No newline at end of file
Added: federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/ws/addressing/BaseAddressingType.java
===================================================================
--- federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/ws/addressing/BaseAddressingType.java (rev 0)
+++ federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/ws/addressing/BaseAddressingType.java 2011-05-17 14:55:04 UTC (rev 944)
@@ -0,0 +1,66 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.picketlink.identity.federation.ws.addressing;
+
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.Map;
+
+import javax.xml.namespace.QName;
+
+/**
+ * @author Anil.Saldhana(a)redhat.com
+ * @since May 17, 2011
+ */
+public class BaseAddressingType
+{
+ protected final Map<QName, String> otherAttributes = new HashMap<QName, String>();
+
+ /**
+ * Add an other attribute
+ * @param qname
+ * @param str
+ */
+ public void addOtherAttribute(QName qname, String str)
+ {
+ otherAttributes.put(qname, str);
+ }
+
+ /**
+ * Gets a map that contains attributes that aren't bound to any typed property on this class.
+ *
+ * <p>
+ * the map is keyed by the name of the attribute and
+ * the value is the string value of the attribute.
+ *
+ * the map returned by this method is live, and you can add new attribute
+ * by updating the map directly. Because of this design, there's no setter.
+ *
+ *
+ * @return
+ * always non-null
+ */
+ public Map<QName, String> getOtherAttributes()
+ {
+ return Collections.unmodifiableMap(otherAttributes);
+ }
+}
\ No newline at end of file
Modified: federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/ws/addressing/EndpointReferenceType.java
===================================================================
--- federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/ws/addressing/EndpointReferenceType.java 2011-05-17 05:03:58 UTC (rev 943)
+++ federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/ws/addressing/EndpointReferenceType.java 2011-05-17 14:55:04 UTC (rev 944)
@@ -1,29 +1,32 @@
-//
-// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-661
-// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
-// Any modifications to this file will be lost upon recompilation of the source schema.
-// Generated on: 2008.12.17 at 12:32:20 PM CST
-//
-
-
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2011, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
package org.picketlink.identity.federation.ws.addressing;
import java.util.ArrayList;
-import java.util.HashMap;
+import java.util.Collections;
import java.util.List;
-import java.util.Map;
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlAnyAttribute;
-import javax.xml.bind.annotation.XmlAnyElement;
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlType;
-import javax.xml.namespace.QName;
-
import org.w3c.dom.Element;
-
/**
* <p>Java class for EndpointReferenceType complex type.
*
@@ -46,144 +49,115 @@
*
*
*/
-(a)XmlAccessorType(XmlAccessType.FIELD)
-@XmlType(name = "EndpointReferenceType", propOrder = {
- "address",
- "referenceParameters",
- "metadata",
- "any"
-})
-public class EndpointReferenceType {
+public class EndpointReferenceType extends BaseAddressingType
+{
+ protected AttributedURIType address;
- @XmlElement(name = "Address", required = true)
- protected AttributedURIType address;
- @XmlElement(name = "ReferenceParameters")
- protected ReferenceParametersType referenceParameters;
- @XmlElement(name = "Metadata")
- protected MetadataType metadata;
- @XmlAnyElement(lax = true)
- protected List<Object> any;
- @XmlAnyAttribute
- private Map<QName, String> otherAttributes = new HashMap<QName, String>();
+ protected ReferenceParametersType referenceParameters;
- /**
- * Gets the value of the address property.
- *
- * @return
- * possible object is
- * {@link AttributedURIType }
- *
- */
- public AttributedURIType getAddress() {
- return address;
- }
+ protected MetadataType metadata;
- /**
- * Sets the value of the address property.
- *
- * @param value
- * allowed object is
- * {@link AttributedURIType }
- *
- */
- public void setAddress(AttributedURIType value) {
- this.address = value;
- }
+ protected List<Object> any = new ArrayList<Object>();
- /**
- * Gets the value of the referenceParameters property.
- *
- * @return
- * possible object is
- * {@link ReferenceParametersType }
- *
- */
- public ReferenceParametersType getReferenceParameters() {
- return referenceParameters;
- }
+ /**
+ * Gets the value of the address property.
+ *
+ * @return
+ * possible object is
+ * {@link AttributedURIType }
+ *
+ */
+ public AttributedURIType getAddress()
+ {
+ return address;
+ }
- /**
- * Sets the value of the referenceParameters property.
- *
- * @param value
- * allowed object is
- * {@link ReferenceParametersType }
- *
- */
- public void setReferenceParameters(ReferenceParametersType value) {
- this.referenceParameters = value;
- }
+ /**
+ * Sets the value of the address property.
+ *
+ * @param value
+ * allowed object is
+ * {@link AttributedURIType }
+ *
+ */
+ public void setAddress(AttributedURIType value)
+ {
+ this.address = value;
+ }
- /**
- * Gets the value of the metadata property.
- *
- * @return
- * possible object is
- * {@link MetadataType }
- *
- */
- public MetadataType getMetadata() {
- return metadata;
- }
+ /**
+ * Gets the value of the referenceParameters property.
+ *
+ * @return
+ * possible object is
+ * {@link ReferenceParametersType }
+ *
+ */
+ public ReferenceParametersType getReferenceParameters()
+ {
+ return referenceParameters;
+ }
- /**
- * Sets the value of the metadata property.
- *
- * @param value
- * allowed object is
- * {@link MetadataType }
- *
- */
- public void setMetadata(MetadataType value) {
- this.metadata = value;
- }
+ /**
+ * Sets the value of the referenceParameters property.
+ *
+ * @param value
+ * allowed object is
+ * {@link ReferenceParametersType }
+ *
+ */
+ public void setReferenceParameters(ReferenceParametersType value)
+ {
+ this.referenceParameters = value;
+ }
- /**
- * Gets the value of the any property.
- *
- * <p>
- * This accessor method returns a reference to the live list,
- * not a snapshot. Therefore any modification you make to the
- * returned list will be present inside the JAXB object.
- * This is why there is not a <CODE>set</CODE> method for the any property.
- *
- * <p>
- * For example, to add a new item, do as follows:
- * <pre>
- * getAny().add(newItem);
- * </pre>
- *
- *
- * <p>
- * Objects of the following type(s) are allowed in the list
- * {@link Object }
- * {@link Element }
- *
- *
- */
- public List<Object> getAny() {
- if (any == null) {
- any = new ArrayList<Object>();
- }
- return this.any;
- }
+ /**
+ * Gets the value of the metadata property.
+ *
+ * @return
+ * possible object is
+ * {@link MetadataType }
+ *
+ */
+ public MetadataType getMetadata()
+ {
+ return metadata;
+ }
- /**
- * Gets a map that contains attributes that aren't bound to any typed property on this class.
- *
- * <p>
- * the map is keyed by the name of the attribute and
- * the value is the string value of the attribute.
- *
- * the map returned by this method is live, and you can add new attribute
- * by updating the map directly. Because of this design, there's no setter.
- *
- *
- * @return
- * always non-null
- */
- public Map<QName, String> getOtherAttributes() {
- return otherAttributes;
- }
+ /**
+ * Sets the value of the metadata property.
+ *
+ * @param value
+ * allowed object is
+ * {@link MetadataType }
+ *
+ */
+ public void setMetadata(MetadataType value)
+ {
+ this.metadata = value;
+ }
-}
+ /**
+ * Gets the value of the any property.
+ *
+ * <p>
+ * Objects of the following type(s) are allowed in the list
+ * {@link Object }
+ * {@link Element }
+ *
+ *
+ */
+ public List<Object> getAny()
+ {
+ return Collections.unmodifiableList(this.any);
+ }
+
+ /**
+ * Add an any
+ * @param obj
+ */
+ public void addAny(Object obj)
+ {
+ this.any.add(obj);
+ }
+}
\ No newline at end of file
Modified: federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/ws/addressing/MetadataType.java
===================================================================
--- federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/ws/addressing/MetadataType.java 2011-05-17 05:03:58 UTC (rev 943)
+++ federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/ws/addressing/MetadataType.java 2011-05-17 14:55:04 UTC (rev 944)
@@ -1,28 +1,27 @@
-//
-// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-661
-// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
-// Any modifications to this file will be lost upon recompilation of the source schema.
-// Generated on: 2008.12.17 at 12:32:20 PM CST
-//
-
-
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2011, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
package org.picketlink.identity.federation.ws.addressing;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlAnyAttribute;
-import javax.xml.bind.annotation.XmlAnyElement;
-import javax.xml.bind.annotation.XmlType;
-import javax.xml.namespace.QName;
-
-import org.w3c.dom.Element;
-
-
/**
* <p>Java class for MetadataType complex type.
*
@@ -42,63 +41,6 @@
*
*
*/
-(a)XmlAccessorType(XmlAccessType.FIELD)
-@XmlType(name = "MetadataType", propOrder = {
- "any"
-})
-public class MetadataType {
-
- @XmlAnyElement(lax = true)
- protected List<Object> any;
- @XmlAnyAttribute
- private Map<QName, String> otherAttributes = new HashMap<QName, String>();
-
- /**
- * Gets the value of the any property.
- *
- * <p>
- * This accessor method returns a reference to the live list,
- * not a snapshot. Therefore any modification you make to the
- * returned list will be present inside the JAXB object.
- * This is why there is not a <CODE>set</CODE> method for the any property.
- *
- * <p>
- * For example, to add a new item, do as follows:
- * <pre>
- * getAny().add(newItem);
- * </pre>
- *
- *
- * <p>
- * Objects of the following type(s) are allowed in the list
- * {@link Object }
- * {@link Element }
- *
- *
- */
- public List<Object> getAny() {
- if (any == null) {
- any = new ArrayList<Object>();
- }
- return this.any;
- }
-
- /**
- * Gets a map that contains attributes that aren't bound to any typed property on this class.
- *
- * <p>
- * the map is keyed by the name of the attribute and
- * the value is the string value of the attribute.
- *
- * the map returned by this method is live, and you can add new attribute
- * by updating the map directly. Because of this design, there's no setter.
- *
- *
- * @return
- * always non-null
- */
- public Map<QName, String> getOtherAttributes() {
- return otherAttributes;
- }
-
-}
+public class MetadataType extends AnyAddressingType
+{
+}
\ No newline at end of file
Deleted: federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/ws/addressing/ObjectFactory.java
===================================================================
--- federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/ws/addressing/ObjectFactory.java 2011-05-17 05:03:58 UTC (rev 943)
+++ federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/ws/addressing/ObjectFactory.java 2011-05-17 14:55:04 UTC (rev 944)
@@ -1,246 +0,0 @@
-//
-// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-661
-// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
-// Any modifications to this file will be lost upon recompilation of the source schema.
-// Generated on: 2008.12.17 at 12:32:20 PM CST
-//
-
-
-package org.picketlink.identity.federation.ws.addressing;
-
-import javax.xml.bind.JAXBElement;
-import javax.xml.bind.annotation.XmlElementDecl;
-import javax.xml.bind.annotation.XmlRegistry;
-import javax.xml.namespace.QName;
-
-
-/**
- * This object contains factory methods for each
- * Java content interface and Java element interface
- * generated in the org.w3._2005._08.addressing package.
- * <p>An ObjectFactory allows you to programatically
- * construct new instances of the Java representation
- * for XML content. The Java representation of XML
- * content can consist of schema derived interfaces
- * and classes representing the binding of schema
- * type definitions, element declarations and model
- * groups. Factory methods for each of these are
- * provided in this class.
- *
- */
-@XmlRegistry
-public class ObjectFactory {
-
- private final static QName _ProblemIRI_QNAME = new QName("http://www.w3.org/2005/08/addressing", "ProblemIRI");
- private final static QName _RelatesTo_QNAME = new QName("http://www.w3.org/2005/08/addressing", "RelatesTo");
- private final static QName _ProblemHeaderQName_QNAME = new QName("http://www.w3.org/2005/08/addressing", "ProblemHeaderQName");
- private final static QName _Action_QNAME = new QName("http://www.w3.org/2005/08/addressing", "Action");
- private final static QName _Metadata_QNAME = new QName("http://www.w3.org/2005/08/addressing", "Metadata");
- private final static QName _ReplyTo_QNAME = new QName("http://www.w3.org/2005/08/addressing", "ReplyTo");
- private final static QName _From_QNAME = new QName("http://www.w3.org/2005/08/addressing", "From");
- private final static QName _RetryAfter_QNAME = new QName("http://www.w3.org/2005/08/addressing", "RetryAfter");
- private final static QName _ReferenceParameters_QNAME = new QName("http://www.w3.org/2005/08/addressing", "ReferenceParameters");
- private final static QName _ProblemAction_QNAME = new QName("http://www.w3.org/2005/08/addressing", "ProblemAction");
- private final static QName _FaultTo_QNAME = new QName("http://www.w3.org/2005/08/addressing", "FaultTo");
- private final static QName _MessageID_QNAME = new QName("http://www.w3.org/2005/08/addressing", "MessageID");
- private final static QName _To_QNAME = new QName("http://www.w3.org/2005/08/addressing", "To");
- private final static QName _EndpointReference_QNAME = new QName("http://www.w3.org/2005/08/addressing", "EndpointReference");
-
- /**
- * Create a new ObjectFactory that can be used to create new instances of schema derived classes for package: org.w3._2005._08.addressing
- *
- */
- public ObjectFactory() {
- }
-
- /**
- * Create an instance of {@link AttributedURIType }
- *
- */
- public AttributedURIType createAttributedURIType() {
- return new AttributedURIType();
- }
-
- /**
- * Create an instance of {@link ReferenceParametersType }
- *
- */
- public ReferenceParametersType createReferenceParametersType() {
- return new ReferenceParametersType();
- }
-
- /**
- * Create an instance of {@link EndpointReferenceType }
- *
- */
- public EndpointReferenceType createEndpointReferenceType() {
- return new EndpointReferenceType();
- }
-
- /**
- * Create an instance of {@link RelatesToType }
- *
- */
- public RelatesToType createRelatesToType() {
- return new RelatesToType();
- }
-
- /**
- * Create an instance of {@link AttributedUnsignedLongType }
- *
- */
- public AttributedUnsignedLongType createAttributedUnsignedLongType() {
- return new AttributedUnsignedLongType();
- }
-
- /**
- * Create an instance of {@link AttributedQNameType }
- *
- */
- public AttributedQNameType createAttributedQNameType() {
- return new AttributedQNameType();
- }
-
- /**
- * Create an instance of {@link ProblemActionType }
- *
- */
- public ProblemActionType createProblemActionType() {
- return new ProblemActionType();
- }
-
- /**
- * Create an instance of {@link MetadataType }
- *
- */
- public MetadataType createMetadataType() {
- return new MetadataType();
- }
-
- /**
- * Create an instance of {@link JAXBElement }{@code <}{@link AttributedURIType }{@code >}}
- *
- */
- @XmlElementDecl(namespace = "http://www.w3.org/2005/08/addressing", name = "ProblemIRI")
- public JAXBElement<AttributedURIType> createProblemIRI(AttributedURIType value) {
- return new JAXBElement<AttributedURIType>(_ProblemIRI_QNAME, AttributedURIType.class, null, value);
- }
-
- /**
- * Create an instance of {@link JAXBElement }{@code <}{@link RelatesToType }{@code >}}
- *
- */
- @XmlElementDecl(namespace = "http://www.w3.org/2005/08/addressing", name = "RelatesTo")
- public JAXBElement<RelatesToType> createRelatesTo(RelatesToType value) {
- return new JAXBElement<RelatesToType>(_RelatesTo_QNAME, RelatesToType.class, null, value);
- }
-
- /**
- * Create an instance of {@link JAXBElement }{@code <}{@link AttributedQNameType }{@code >}}
- *
- */
- @XmlElementDecl(namespace = "http://www.w3.org/2005/08/addressing", name = "ProblemHeaderQName")
- public JAXBElement<AttributedQNameType> createProblemHeaderQName(AttributedQNameType value) {
- return new JAXBElement<AttributedQNameType>(_ProblemHeaderQName_QNAME, AttributedQNameType.class, null, value);
- }
-
- /**
- * Create an instance of {@link JAXBElement }{@code <}{@link AttributedURIType }{@code >}}
- *
- */
- @XmlElementDecl(namespace = "http://www.w3.org/2005/08/addressing", name = "Action")
- public JAXBElement<AttributedURIType> createAction(AttributedURIType value) {
- return new JAXBElement<AttributedURIType>(_Action_QNAME, AttributedURIType.class, null, value);
- }
-
- /**
- * Create an instance of {@link JAXBElement }{@code <}{@link MetadataType }{@code >}}
- *
- */
- @XmlElementDecl(namespace = "http://www.w3.org/2005/08/addressing", name = "Metadata")
- public JAXBElement<MetadataType> createMetadata(MetadataType value) {
- return new JAXBElement<MetadataType>(_Metadata_QNAME, MetadataType.class, null, value);
- }
-
- /**
- * Create an instance of {@link JAXBElement }{@code <}{@link EndpointReferenceType }{@code >}}
- *
- */
- @XmlElementDecl(namespace = "http://www.w3.org/2005/08/addressing", name = "ReplyTo")
- public JAXBElement<EndpointReferenceType> createReplyTo(EndpointReferenceType value) {
- return new JAXBElement<EndpointReferenceType>(_ReplyTo_QNAME, EndpointReferenceType.class, null, value);
- }
-
- /**
- * Create an instance of {@link JAXBElement }{@code <}{@link EndpointReferenceType }{@code >}}
- *
- */
- @XmlElementDecl(namespace = "http://www.w3.org/2005/08/addressing", name = "From")
- public JAXBElement<EndpointReferenceType> createFrom(EndpointReferenceType value) {
- return new JAXBElement<EndpointReferenceType>(_From_QNAME, EndpointReferenceType.class, null, value);
- }
-
- /**
- * Create an instance of {@link JAXBElement }{@code <}{@link AttributedUnsignedLongType }{@code >}}
- *
- */
- @XmlElementDecl(namespace = "http://www.w3.org/2005/08/addressing", name = "RetryAfter")
- public JAXBElement<AttributedUnsignedLongType> createRetryAfter(AttributedUnsignedLongType value) {
- return new JAXBElement<AttributedUnsignedLongType>(_RetryAfter_QNAME, AttributedUnsignedLongType.class, null, value);
- }
-
- /**
- * Create an instance of {@link JAXBElement }{@code <}{@link ReferenceParametersType }{@code >}}
- *
- */
- @XmlElementDecl(namespace = "http://www.w3.org/2005/08/addressing", name = "ReferenceParameters")
- public JAXBElement<ReferenceParametersType> createReferenceParameters(ReferenceParametersType value) {
- return new JAXBElement<ReferenceParametersType>(_ReferenceParameters_QNAME, ReferenceParametersType.class, null, value);
- }
-
- /**
- * Create an instance of {@link JAXBElement }{@code <}{@link ProblemActionType }{@code >}}
- *
- */
- @XmlElementDecl(namespace = "http://www.w3.org/2005/08/addressing", name = "ProblemAction")
- public JAXBElement<ProblemActionType> createProblemAction(ProblemActionType value) {
- return new JAXBElement<ProblemActionType>(_ProblemAction_QNAME, ProblemActionType.class, null, value);
- }
-
- /**
- * Create an instance of {@link JAXBElement }{@code <}{@link EndpointReferenceType }{@code >}}
- *
- */
- @XmlElementDecl(namespace = "http://www.w3.org/2005/08/addressing", name = "FaultTo")
- public JAXBElement<EndpointReferenceType> createFaultTo(EndpointReferenceType value) {
- return new JAXBElement<EndpointReferenceType>(_FaultTo_QNAME, EndpointReferenceType.class, null, value);
- }
-
- /**
- * Create an instance of {@link JAXBElement }{@code <}{@link AttributedURIType }{@code >}}
- *
- */
- @XmlElementDecl(namespace = "http://www.w3.org/2005/08/addressing", name = "MessageID")
- public JAXBElement<AttributedURIType> createMessageID(AttributedURIType value) {
- return new JAXBElement<AttributedURIType>(_MessageID_QNAME, AttributedURIType.class, null, value);
- }
-
- /**
- * Create an instance of {@link JAXBElement }{@code <}{@link AttributedURIType }{@code >}}
- *
- */
- @XmlElementDecl(namespace = "http://www.w3.org/2005/08/addressing", name = "To")
- public JAXBElement<AttributedURIType> createTo(AttributedURIType value) {
- return new JAXBElement<AttributedURIType>(_To_QNAME, AttributedURIType.class, null, value);
- }
-
- /**
- * Create an instance of {@link JAXBElement }{@code <}{@link EndpointReferenceType }{@code >}}
- *
- */
- @XmlElementDecl(namespace = "http://www.w3.org/2005/08/addressing", name = "EndpointReference")
- public JAXBElement<EndpointReferenceType> createEndpointReference(EndpointReferenceType value) {
- return new JAXBElement<EndpointReferenceType>(_EndpointReference_QNAME, EndpointReferenceType.class, null, value);
- }
-
-}
Modified: federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/ws/addressing/ProblemActionType.java
===================================================================
--- federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/ws/addressing/ProblemActionType.java 2011-05-17 05:03:58 UTC (rev 943)
+++ federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/ws/addressing/ProblemActionType.java 2011-05-17 14:55:04 UTC (rev 944)
@@ -5,21 +5,12 @@
// Generated on: 2008.12.17 at 12:32:20 PM CST
//
-
package org.picketlink.identity.federation.ws.addressing;
-import java.util.HashMap;
-import java.util.Map;
-
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlAnyAttribute;
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlSchemaType;
import javax.xml.bind.annotation.XmlType;
-import javax.xml.namespace.QName;
-
/**
* <p>Java class for ProblemActionType complex type.
*
@@ -41,84 +32,64 @@
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
-@XmlType(name = "ProblemActionType", propOrder = {
- "action",
- "soapAction"
-})
-public class ProblemActionType {
+@XmlType(name = "ProblemActionType", propOrder =
+{"action", "soapAction"})
+public class ProblemActionType extends BaseAddressingType
+{
- @XmlElement(name = "Action")
- protected AttributedURIType action;
- @XmlElement(name = "SoapAction")
- @XmlSchemaType(name = "anyURI")
- protected String soapAction;
- @XmlAnyAttribute
- private Map<QName, String> otherAttributes = new HashMap<QName, String>();
+ protected AttributedURIType action;
- /**
- * Gets the value of the action property.
- *
- * @return
- * possible object is
- * {@link AttributedURIType }
- *
- */
- public AttributedURIType getAction() {
- return action;
- }
+ protected String soapAction;
- /**
- * Sets the value of the action property.
- *
- * @param value
- * allowed object is
- * {@link AttributedURIType }
- *
- */
- public void setAction(AttributedURIType value) {
- this.action = value;
- }
+ /**
+ * Gets the value of the action property.
+ *
+ * @return
+ * possible object is
+ * {@link AttributedURIType }
+ *
+ */
+ public AttributedURIType getAction()
+ {
+ return action;
+ }
- /**
- * Gets the value of the soapAction property.
- *
- * @return
- * possible object is
- * {@link String }
- *
- */
- public String getSoapAction() {
- return soapAction;
- }
+ /**
+ * Sets the value of the action property.
+ *
+ * @param value
+ * allowed object is
+ * {@link AttributedURIType }
+ *
+ */
+ public void setAction(AttributedURIType value)
+ {
+ this.action = value;
+ }
- /**
- * Sets the value of the soapAction property.
- *
- * @param value
- * allowed object is
- * {@link String }
- *
- */
- public void setSoapAction(String value) {
- this.soapAction = value;
- }
+ /**
+ * Gets the value of the soapAction property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getSoapAction()
+ {
+ return soapAction;
+ }
- /**
- * Gets a map that contains attributes that aren't bound to any typed property on this class.
- *
- * <p>
- * the map is keyed by the name of the attribute and
- * the value is the string value of the attribute.
- *
- * the map returned by this method is live, and you can add new attribute
- * by updating the map directly. Because of this design, there's no setter.
- *
- *
- * @return
- * always non-null
- */
- public Map<QName, String> getOtherAttributes() {
- return otherAttributes;
- }
-
-}
+ /**
+ * Sets the value of the soapAction property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setSoapAction(String value)
+ {
+ this.soapAction = value;
+ }
+}
\ No newline at end of file
Modified: federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/ws/addressing/ReferenceParametersType.java
===================================================================
--- federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/ws/addressing/ReferenceParametersType.java 2011-05-17 05:03:58 UTC (rev 943)
+++ federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/ws/addressing/ReferenceParametersType.java 2011-05-17 14:55:04 UTC (rev 944)
@@ -1,28 +1,27 @@
-//
-// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-661
-// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
-// Any modifications to this file will be lost upon recompilation of the source schema.
-// Generated on: 2008.12.17 at 12:32:20 PM CST
-//
-
-
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2011, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
package org.picketlink.identity.federation.ws.addressing;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlAnyAttribute;
-import javax.xml.bind.annotation.XmlAnyElement;
-import javax.xml.bind.annotation.XmlType;
-import javax.xml.namespace.QName;
-
-import org.w3c.dom.Element;
-
-
/**
* <p>Java class for ReferenceParametersType complex type.
*
@@ -42,63 +41,6 @@
*
*
*/
-(a)XmlAccessorType(XmlAccessType.FIELD)
-@XmlType(name = "ReferenceParametersType", propOrder = {
- "any"
-})
-public class ReferenceParametersType {
-
- @XmlAnyElement(lax = true)
- protected List<Object> any;
- @XmlAnyAttribute
- private Map<QName, String> otherAttributes = new HashMap<QName, String>();
-
- /**
- * Gets the value of the any property.
- *
- * <p>
- * This accessor method returns a reference to the live list,
- * not a snapshot. Therefore any modification you make to the
- * returned list will be present inside the JAXB object.
- * This is why there is not a <CODE>set</CODE> method for the any property.
- *
- * <p>
- * For example, to add a new item, do as follows:
- * <pre>
- * getAny().add(newItem);
- * </pre>
- *
- *
- * <p>
- * Objects of the following type(s) are allowed in the list
- * {@link Object }
- * {@link Element }
- *
- *
- */
- public List<Object> getAny() {
- if (any == null) {
- any = new ArrayList<Object>();
- }
- return this.any;
- }
-
- /**
- * Gets a map that contains attributes that aren't bound to any typed property on this class.
- *
- * <p>
- * the map is keyed by the name of the attribute and
- * the value is the string value of the attribute.
- *
- * the map returned by this method is live, and you can add new attribute
- * by updating the map directly. Because of this design, there's no setter.
- *
- *
- * @return
- * always non-null
- */
- public Map<QName, String> getOtherAttributes() {
- return otherAttributes;
- }
-
-}
+public class ReferenceParametersType extends AnyAddressingType
+{
+}
\ No newline at end of file
Modified: federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/ws/addressing/RelatesToType.java
===================================================================
--- federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/ws/addressing/RelatesToType.java 2011-05-17 05:03:58 UTC (rev 943)
+++ federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/ws/addressing/RelatesToType.java 2011-05-17 14:55:04 UTC (rev 944)
@@ -1,26 +1,26 @@
-//
-// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-661
-// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
-// Any modifications to this file will be lost upon recompilation of the source schema.
-// Generated on: 2008.12.17 at 12:32:20 PM CST
-//
-
-
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2011, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
package org.picketlink.identity.federation.ws.addressing;
-import java.util.HashMap;
-import java.util.Map;
-
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlAnyAttribute;
-import javax.xml.bind.annotation.XmlAttribute;
-import javax.xml.bind.annotation.XmlSchemaType;
-import javax.xml.bind.annotation.XmlType;
-import javax.xml.bind.annotation.XmlValue;
-import javax.xml.namespace.QName;
-
-
/**
* <p>Java class for RelatesToType complex type.
*
@@ -38,88 +38,68 @@
*
*
*/
-(a)XmlAccessorType(XmlAccessType.FIELD)
-@XmlType(name = "RelatesToType", propOrder = {
- "value"
-})
-public class RelatesToType {
+public class RelatesToType extends BaseAddressingType
+{
+ protected String value;
- @XmlValue
- @XmlSchemaType(name = "anyURI")
- protected String value;
- @XmlAttribute(name = "RelationshipType")
- protected String relationshipType;
- @XmlAnyAttribute
- private Map<QName, String> otherAttributes = new HashMap<QName, String>();
+ protected String relationshipType;
- /**
- * Gets the value of the value property.
- *
- * @return
- * possible object is
- * {@link String }
- *
- */
- public String getValue() {
- return value;
- }
+ /**
+ * Gets the value of the value property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getValue()
+ {
+ return value;
+ }
- /**
- * Sets the value of the value property.
- *
- * @param value
- * allowed object is
- * {@link String }
- *
- */
- public void setValue(String value) {
- this.value = value;
- }
+ /**
+ * Sets the value of the value property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setValue(String value)
+ {
+ this.value = value;
+ }
- /**
- * Gets the value of the relationshipType property.
- *
- * @return
- * possible object is
- * {@link String }
- *
- */
- public String getRelationshipType() {
- if (relationshipType == null) {
- return "http://www.w3.org/2005/08/addressing/reply";
- } else {
- return relationshipType;
- }
- }
+ /**
+ * Gets the value of the relationshipType property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getRelationshipType()
+ {
+ if (relationshipType == null)
+ {
+ return "http://www.w3.org/2005/08/addressing/reply";
+ }
+ else
+ {
+ return relationshipType;
+ }
+ }
- /**
- * Sets the value of the relationshipType property.
- *
- * @param value
- * allowed object is
- * {@link String }
- *
- */
- public void setRelationshipType(String value) {
- this.relationshipType = value;
- }
-
- /**
- * Gets a map that contains attributes that aren't bound to any typed property on this class.
- *
- * <p>
- * the map is keyed by the name of the attribute and
- * the value is the string value of the attribute.
- *
- * the map returned by this method is live, and you can add new attribute
- * by updating the map directly. Because of this design, there's no setter.
- *
- *
- * @return
- * always non-null
- */
- public Map<QName, String> getOtherAttributes() {
- return otherAttributes;
- }
-
-}
+ /**
+ * Sets the value of the relationshipType property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setRelationshipType(String value)
+ {
+ this.relationshipType = value;
+ }
+}
\ No newline at end of file
Modified: federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/ws/addressing/package-info.java
===================================================================
--- federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/ws/addressing/package-info.java 2011-05-17 05:03:58 UTC (rev 943)
+++ federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/ws/addressing/package-info.java 2011-05-17 14:55:04 UTC (rev 944)
@@ -1,9 +1,23 @@
-//
-// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-661
-// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
-// Any modifications to this file will be lost upon recompilation of the source schema.
-// Generated on: 2008.12.17 at 12:32:20 PM CST
-//
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2011, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.picketlink.identity.federation.ws.addressing;
-(a)javax.xml.bind.annotation.XmlSchema(namespace = "http://www.w3.org/2005/08/addressing", elementFormDefault = javax.xml.bind.annotation.XmlNsForm.QUALIFIED)
-package org.picketlink.identity.federation.ws.addressing;
Modified: federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/ws/policy/AppliesTo.java
===================================================================
--- federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/ws/policy/AppliesTo.java 2011-05-17 05:03:58 UTC (rev 943)
+++ federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/ws/policy/AppliesTo.java 2011-05-17 14:55:04 UTC (rev 944)
@@ -1,29 +1,28 @@
-//
-// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-661
-// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
-// Any modifications to this file will be lost upon recompilation of the source schema.
-// Generated on: 2008.12.17 at 12:32:20 PM CST
-//
-
-
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
package org.picketlink.identity.federation.ws.policy;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
+import org.picketlink.identity.federation.ws.addressing.AnyAddressingType;
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlAnyAttribute;
-import javax.xml.bind.annotation.XmlAnyElement;
-import javax.xml.bind.annotation.XmlRootElement;
-import javax.xml.bind.annotation.XmlType;
-import javax.xml.namespace.QName;
-
-import org.w3c.dom.Element;
-
-
/**
* <p>Java class for anonymous complex type.
*
@@ -43,64 +42,6 @@
*
*
*/
-(a)XmlAccessorType(XmlAccessType.FIELD)
-@XmlType(name = "", propOrder = {
- "any"
-})
-@XmlRootElement(name = "AppliesTo")
-public class AppliesTo {
-
- @XmlAnyElement(lax = true)
- protected List<Object> any;
- @XmlAnyAttribute
- private Map<QName, String> otherAttributes = new HashMap<QName, String>();
-
- /**
- * Gets the value of the any property.
- *
- * <p>
- * This accessor method returns a reference to the live list,
- * not a snapshot. Therefore any modification you make to the
- * returned list will be present inside the JAXB object.
- * This is why there is not a <CODE>set</CODE> method for the any property.
- *
- * <p>
- * For example, to add a new item, do as follows:
- * <pre>
- * getAny().add(newItem);
- * </pre>
- *
- *
- * <p>
- * Objects of the following type(s) are allowed in the list
- * {@link Object }
- * {@link Element }
- *
- *
- */
- public List<Object> getAny() {
- if (any == null) {
- any = new ArrayList<Object>();
- }
- return this.any;
- }
-
- /**
- * Gets a map that contains attributes that aren't bound to any typed property on this class.
- *
- * <p>
- * the map is keyed by the name of the attribute and
- * the value is the string value of the attribute.
- *
- * the map returned by this method is live, and you can add new attribute
- * by updating the map directly. Because of this design, there's no setter.
- *
- *
- * @return
- * always non-null
- */
- public Map<QName, String> getOtherAttributes() {
- return otherAttributes;
- }
-
-}
+public class AppliesTo extends AnyAddressingType
+{
+}
\ No newline at end of file
Deleted: federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/ws/policy/ObjectFactory.java
===================================================================
--- federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/ws/policy/ObjectFactory.java 2011-05-17 05:03:58 UTC (rev 943)
+++ federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/ws/policy/ObjectFactory.java 2011-05-17 14:55:04 UTC (rev 944)
@@ -1,102 +0,0 @@
-//
-// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-661
-// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
-// Any modifications to this file will be lost upon recompilation of the source schema.
-// Generated on: 2008.12.17 at 12:32:20 PM CST
-//
-
-
-package org.picketlink.identity.federation.ws.policy;
-
-import javax.xml.bind.JAXBElement;
-import javax.xml.bind.annotation.XmlElementDecl;
-import javax.xml.bind.annotation.XmlRegistry;
-import javax.xml.namespace.QName;
-
-
-/**
- * This object contains factory methods for each
- * Java content interface and Java element interface
- * generated in the org.xmlsoap.schemas.ws._2004._09.policy package.
- * <p>An ObjectFactory allows you to programatically
- * construct new instances of the Java representation
- * for XML content. The Java representation of XML
- * content can consist of schema derived interfaces
- * and classes representing the binding of schema
- * type definitions, element declarations and model
- * groups. Factory methods for each of these are
- * provided in this class.
- *
- */
-@XmlRegistry
-public class ObjectFactory {
-
- private final static QName _ExactlyOne_QNAME = new QName("http://schemas.xmlsoap.org/ws/2004/09/policy", "ExactlyOne");
- private final static QName _All_QNAME = new QName("http://schemas.xmlsoap.org/ws/2004/09/policy", "All");
-
- /**
- * Create a new ObjectFactory that can be used to create new instances of schema derived classes for package: org.xmlsoap.schemas.ws._2004._09.policy
- *
- */
- public ObjectFactory() {
- }
-
- /**
- * Create an instance of {@link PolicyAttachment }
- *
- */
- public PolicyAttachment createPolicyAttachment() {
- return new PolicyAttachment();
- }
-
- /**
- * Create an instance of {@link OperatorContentType }
- *
- */
- public OperatorContentType createOperatorContentType() {
- return new OperatorContentType();
- }
-
- /**
- * Create an instance of {@link Policy }
- *
- */
- public Policy createPolicy() {
- return new Policy();
- }
-
- /**
- * Create an instance of {@link PolicyReference }
- *
- */
- public PolicyReference createPolicyReference() {
- return new PolicyReference();
- }
-
- /**
- * Create an instance of {@link AppliesTo }
- *
- */
- public AppliesTo createAppliesTo() {
- return new AppliesTo();
- }
-
- /**
- * Create an instance of {@link JAXBElement }{@code <}{@link OperatorContentType }{@code >}}
- *
- */
- @XmlElementDecl(namespace = "http://schemas.xmlsoap.org/ws/2004/09/policy", name = "ExactlyOne")
- public JAXBElement<OperatorContentType> createExactlyOne(OperatorContentType value) {
- return new JAXBElement<OperatorContentType>(_ExactlyOne_QNAME, OperatorContentType.class, null, value);
- }
-
- /**
- * Create an instance of {@link JAXBElement }{@code <}{@link OperatorContentType }{@code >}}
- *
- */
- @XmlElementDecl(namespace = "http://schemas.xmlsoap.org/ws/2004/09/policy", name = "All")
- public JAXBElement<OperatorContentType> createAll(OperatorContentType value) {
- return new JAXBElement<OperatorContentType>(_All_QNAME, OperatorContentType.class, null, value);
- }
-
-}
Modified: federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/ws/policy/OperatorContentType.java
===================================================================
--- federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/ws/policy/OperatorContentType.java 2011-05-17 05:03:58 UTC (rev 943)
+++ federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/ws/policy/OperatorContentType.java 2011-05-17 14:55:04 UTC (rev 944)
@@ -1,11 +1,24 @@
-//
-// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-661
-// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
-// Any modifications to this file will be lost upon recompilation of the source schema.
-// Generated on: 2008.12.17 at 12:32:20 PM CST
-//
-
-
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
package org.picketlink.identity.federation.ws.policy;
import java.util.ArrayList;
@@ -22,7 +35,6 @@
import org.w3c.dom.Element;
-
/**
* <p>Java class for OperatorContentType complex type.
*
@@ -49,55 +61,56 @@
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
-@XmlType(name = "OperatorContentType", propOrder = {
- "policyOrAllOrExactlyOne"
-})
-@XmlSeeAlso({
- Policy.class
-})
-public class OperatorContentType {
+@XmlType(name = "OperatorContentType", propOrder =
+{"policyOrAllOrExactlyOne"})
+@XmlSeeAlso(
+{Policy.class})
+public class OperatorContentType
+{
- @XmlElementRefs({
- @XmlElementRef(name = "Policy", namespace = "http://schemas.xmlsoap.org/ws/2004/09/policy", type = Policy.class),
- @XmlElementRef(name = "PolicyReference", namespace = "http://schemas.xmlsoap.org/ws/2004/09/policy", type = PolicyReference.class),
- @XmlElementRef(name = "ExactlyOne", namespace = "http://schemas.xmlsoap.org/ws/2004/09/policy", type = JAXBElement.class),
- @XmlElementRef(name = "All", namespace = "http://schemas.xmlsoap.org/ws/2004/09/policy", type = JAXBElement.class)
- })
- @XmlAnyElement(lax = true)
- protected List<Object> policyOrAllOrExactlyOne;
+ @XmlElementRefs(
+ {
+ @XmlElementRef(name = "Policy", namespace = "http://schemas.xmlsoap.org/ws/2004/09/policy", type = Policy.class),
+ @XmlElementRef(name = "PolicyReference", namespace = "http://schemas.xmlsoap.org/ws/2004/09/policy", type = PolicyReference.class),
+ @XmlElementRef(name = "ExactlyOne", namespace = "http://schemas.xmlsoap.org/ws/2004/09/policy", type = JAXBElement.class),
+ @XmlElementRef(name = "All", namespace = "http://schemas.xmlsoap.org/ws/2004/09/policy", type = JAXBElement.class)})
+ @XmlAnyElement(lax = true)
+ protected List<Object> policyOrAllOrExactlyOne;
- /**
- * Gets the value of the policyOrAllOrExactlyOne property.
- *
- * <p>
- * This accessor method returns a reference to the live list,
- * not a snapshot. Therefore any modification you make to the
- * returned list will be present inside the JAXB object.
- * This is why there is not a <CODE>set</CODE> method for the policyOrAllOrExactlyOne property.
- *
- * <p>
- * For example, to add a new item, do as follows:
- * <pre>
- * getPolicyOrAllOrExactlyOne().add(newItem);
- * </pre>
- *
- *
- * <p>
- * Objects of the following type(s) are allowed in the list
- * {@link PolicyReference }
- * {@link Element }
- * {@link JAXBElement }{@code <}{@link OperatorContentType }{@code >}
- * {@link Policy }
- * {@link Object }
- * {@link JAXBElement }{@code <}{@link OperatorContentType }{@code >}
- *
- *
- */
- public List<Object> getPolicyOrAllOrExactlyOne() {
- if (policyOrAllOrExactlyOne == null) {
- policyOrAllOrExactlyOne = new ArrayList<Object>();
- }
- return this.policyOrAllOrExactlyOne;
- }
+ /**
+ * Gets the value of the policyOrAllOrExactlyOne property.
+ *
+ * <p>
+ * This accessor method returns a reference to the live list,
+ * not a snapshot. Therefore any modification you make to the
+ * returned list will be present inside the JAXB object.
+ * This is why there is not a <CODE>set</CODE> method for the policyOrAllOrExactlyOne property.
+ *
+ * <p>
+ * For example, to add a new item, do as follows:
+ * <pre>
+ * getPolicyOrAllOrExactlyOne().add(newItem);
+ * </pre>
+ *
+ *
+ * <p>
+ * Objects of the following type(s) are allowed in the list
+ * {@link PolicyReference }
+ * {@link Element }
+ * {@link JAXBElement }{@code <}{@link OperatorContentType }{@code >}
+ * {@link Policy }
+ * {@link Object }
+ * {@link JAXBElement }{@code <}{@link OperatorContentType }{@code >}
+ *
+ *
+ */
+ public List<Object> getPolicyOrAllOrExactlyOne()
+ {
+ if (policyOrAllOrExactlyOne == null)
+ {
+ policyOrAllOrExactlyOne = new ArrayList<Object>();
+ }
+ return this.policyOrAllOrExactlyOne;
+ }
}
Modified: federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/ws/policy/Policy.java
===================================================================
--- federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/ws/policy/Policy.java 2011-05-17 05:03:58 UTC (rev 943)
+++ federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/ws/policy/Policy.java 2011-05-17 14:55:04 UTC (rev 944)
@@ -1,29 +1,32 @@
-//
-// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-661
-// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
-// Any modifications to this file will be lost upon recompilation of the source schema.
-// Generated on: 2008.12.17 at 12:32:20 PM CST
-//
-
-
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
package org.picketlink.identity.federation.ws.policy;
+import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlAnyAttribute;
-import javax.xml.bind.annotation.XmlAttribute;
-import javax.xml.bind.annotation.XmlID;
-import javax.xml.bind.annotation.XmlRootElement;
-import javax.xml.bind.annotation.XmlSchemaType;
-import javax.xml.bind.annotation.XmlType;
-import javax.xml.bind.annotation.adapters.CollapsedStringAdapter;
-import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
import javax.xml.namespace.QName;
-
/**
* <p>Java class for anonymous complex type.
*
@@ -42,88 +45,94 @@
*
*
*/
-(a)XmlAccessorType(XmlAccessType.FIELD)
-@XmlType(name = "")
-@XmlRootElement(name = "Policy")
-public class Policy
- extends OperatorContentType
+public class Policy extends OperatorContentType
{
- @XmlAttribute(name = "Name")
- @XmlSchemaType(name = "anyURI")
- protected String name;
- @XmlAttribute(name = "Id", namespace = "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utilit...")
- @XmlJavaTypeAdapter(CollapsedStringAdapter.class)
- @XmlID
- @XmlSchemaType(name = "ID")
- protected String id;
- @XmlAnyAttribute
- private Map<QName, String> otherAttributes = new HashMap<QName, String>();
+ protected String name;
- /**
- * Gets the value of the name property.
- *
- * @return
- * possible object is
- * {@link String }
- *
- */
- public String getName() {
- return name;
- }
+ protected String id;
- /**
- * Sets the value of the name property.
- *
- * @param value
- * allowed object is
- * {@link String }
- *
- */
- public void setName(String value) {
- this.name = value;
- }
+ private final Map<QName, String> otherAttributes = new HashMap<QName, String>();
- /**
- * Gets the value of the id property.
- *
- * @return
- * possible object is
- * {@link String }
- *
- */
- public String getId() {
- return id;
- }
+ /**
+ * Gets the value of the name property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getName()
+ {
+ return name;
+ }
- /**
- * Sets the value of the id property.
- *
- * @param value
- * allowed object is
- * {@link String }
- *
- */
- public void setId(String value) {
- this.id = value;
- }
+ /**
+ * Sets the value of the name property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setName(String value)
+ {
+ this.name = value;
+ }
- /**
- * Gets a map that contains attributes that aren't bound to any typed property on this class.
- *
- * <p>
- * the map is keyed by the name of the attribute and
- * the value is the string value of the attribute.
- *
- * the map returned by this method is live, and you can add new attribute
- * by updating the map directly. Because of this design, there's no setter.
- *
- *
- * @return
- * always non-null
- */
- public Map<QName, String> getOtherAttributes() {
- return otherAttributes;
- }
+ /**
+ * Gets the value of the id property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getId()
+ {
+ return id;
+ }
+ /**
+ * Sets the value of the id property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setId(String value)
+ {
+ this.id = value;
+ }
+
+ /**
+ * Add an other attribute
+ * @param qname
+ * @param str
+ */
+ public void addOtherAttribute(QName qname, String str)
+ {
+ otherAttributes.put(qname, str);
+ }
+
+ /**
+ * Gets a map that contains attributes that aren't bound to any typed property on this class.
+ *
+ * <p>
+ * the map is keyed by the name of the attribute and
+ * the value is the string value of the attribute.
+ *
+ * the map returned by this method is live, and you can add new attribute
+ * by updating the map directly. Because of this design, there's no setter.
+ *
+ *
+ * @return
+ * always non-null
+ */
+ public Map<QName, String> getOtherAttributes()
+ {
+ return Collections.unmodifiableMap(otherAttributes);
+ }
+
}
Modified: federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/ws/policy/PolicyAttachment.java
===================================================================
--- federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/ws/policy/PolicyAttachment.java 2011-05-17 05:03:58 UTC (rev 943)
+++ federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/ws/policy/PolicyAttachment.java 2011-05-17 14:55:04 UTC (rev 944)
@@ -1,31 +1,38 @@
-//
-// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-661
-// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
-// Any modifications to this file will be lost upon recompilation of the source schema.
-// Generated on: 2008.12.17 at 12:32:20 PM CST
-//
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
-
package org.picketlink.identity.federation.ws.policy;
import java.util.ArrayList;
-import java.util.HashMap;
+import java.util.Collections;
import java.util.List;
-import java.util.Map;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlAnyAttribute;
-import javax.xml.bind.annotation.XmlAnyElement;
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlElements;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlType;
-import javax.xml.namespace.QName;
-import org.w3c.dom.Element;
+import org.picketlink.identity.federation.ws.addressing.AnyAddressingType;
-
/**
* <p>Java class for anonymous complex type.
*
@@ -51,126 +58,87 @@
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
-@XmlType(name = "", propOrder = {
- "appliesTo",
- "policyOrPolicyReference",
- "any"
-})
+@XmlType(name = "", propOrder =
+{"appliesTo", "policyOrPolicyReference", "any"})
@XmlRootElement(name = "PolicyAttachment")
-public class PolicyAttachment {
+public class PolicyAttachment extends AnyAddressingType
+{
+ protected AppliesTo appliesTo;
- @XmlElement(name = "AppliesTo", required = true)
- protected AppliesTo appliesTo;
- @XmlElements({
- @XmlElement(name = "PolicyReference", type = PolicyReference.class),
- @XmlElement(name = "Policy", type = Policy.class)
- })
- protected List<Object> policyOrPolicyReference;
- @XmlAnyElement(lax = true)
- protected List<Object> any;
- @XmlAnyAttribute
- private Map<QName, String> otherAttributes = new HashMap<QName, String>();
+ protected List<PolicyChoice> theChoices = new ArrayList<PolicyChoice>();
- /**
- * Gets the value of the appliesTo property.
- *
- * @return
- * possible object is
- * {@link AppliesTo }
- *
- */
- public AppliesTo getAppliesTo() {
- return appliesTo;
- }
+ public static class PolicyChoice
+ {
+ private Policy thePolicy;
- /**
- * Sets the value of the appliesTo property.
- *
- * @param value
- * allowed object is
- * {@link AppliesTo }
- *
- */
- public void setAppliesTo(AppliesTo value) {
- this.appliesTo = value;
- }
+ private PolicyReference thePolicyRef;
- /**
- * Gets the value of the policyOrPolicyReference property.
- *
- * <p>
- * This accessor method returns a reference to the live list,
- * not a snapshot. Therefore any modification you make to the
- * returned list will be present inside the JAXB object.
- * This is why there is not a <CODE>set</CODE> method for the policyOrPolicyReference property.
- *
- * <p>
- * For example, to add a new item, do as follows:
- * <pre>
- * getPolicyOrPolicyReference().add(newItem);
- * </pre>
- *
- *
- * <p>
- * Objects of the following type(s) are allowed in the list
- * {@link PolicyReference }
- * {@link Policy }
- *
- *
- */
- public List<Object> getPolicyOrPolicyReference() {
- if (policyOrPolicyReference == null) {
- policyOrPolicyReference = new ArrayList<Object>();
- }
- return this.policyOrPolicyReference;
- }
+ public PolicyChoice(Policy p)
+ {
+ thePolicy = p;
+ }
- /**
- * Gets the value of the any property.
- *
- * <p>
- * This accessor method returns a reference to the live list,
- * not a snapshot. Therefore any modification you make to the
- * returned list will be present inside the JAXB object.
- * This is why there is not a <CODE>set</CODE> method for the any property.
- *
- * <p>
- * For example, to add a new item, do as follows:
- * <pre>
- * getAny().add(newItem);
- * </pre>
- *
- *
- * <p>
- * Objects of the following type(s) are allowed in the list
- * {@link Object }
- * {@link Element }
- *
- *
- */
- public List<Object> getAny() {
- if (any == null) {
- any = new ArrayList<Object>();
- }
- return this.any;
- }
+ public PolicyChoice(PolicyReference pr)
+ {
+ thePolicyRef = pr;
+ }
- /**
- * Gets a map that contains attributes that aren't bound to any typed property on this class.
- *
- * <p>
- * the map is keyed by the name of the attribute and
- * the value is the string value of the attribute.
- *
- * the map returned by this method is live, and you can add new attribute
- * by updating the map directly. Because of this design, there's no setter.
- *
- *
- * @return
- * always non-null
- */
- public Map<QName, String> getOtherAttributes() {
- return otherAttributes;
- }
+ public Policy getPolicy()
+ {
+ return thePolicy;
+ }
-}
+ public PolicyReference getPolicyReference()
+ {
+ return thePolicyRef;
+ }
+ }
+
+ /**
+ * Gets the value of the appliesTo property.
+ *
+ * @return
+ * possible object is
+ * {@link AppliesTo }
+ *
+ */
+ public AppliesTo getAppliesTo()
+ {
+ return appliesTo;
+ }
+
+ /**
+ * Sets the value of the appliesTo property.
+ *
+ * @param value
+ * allowed object is
+ * {@link AppliesTo }
+ *
+ */
+ public void setAppliesTo(AppliesTo value)
+ {
+ this.appliesTo = value;
+ }
+
+ /**
+ * Add a {@link PolicyChoice}
+ * @param pc
+ */
+ public void addChoice(PolicyChoice pc)
+ {
+ this.theChoices.add(pc);
+ }
+
+ /**
+ * Gets the value of the policyOrPolicyReference property.
+ *
+ * <p>
+ * Objects of the following type(s) are allowed in the list
+ * {@link PolicyReference }
+ * {@link Policy }
+ */
+ public List<PolicyChoice> getPolicyOrPolicyReference()
+ {
+ return Collections.unmodifiableList(this.theChoices);
+ }
+}
\ No newline at end of file
Modified: federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/ws/policy/PolicyReference.java
===================================================================
--- federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/ws/policy/PolicyReference.java 2011-05-17 05:03:58 UTC (rev 943)
+++ federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/ws/policy/PolicyReference.java 2011-05-17 14:55:04 UTC (rev 944)
@@ -1,26 +1,29 @@
-//
-// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-661
-// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
-// Any modifications to this file will be lost upon recompilation of the source schema.
-// Generated on: 2008.12.17 at 12:32:20 PM CST
-//
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
-
package org.picketlink.identity.federation.ws.policy;
-import java.util.HashMap;
-import java.util.Map;
+import org.picketlink.identity.federation.ws.addressing.BaseAddressingType;
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlAnyAttribute;
-import javax.xml.bind.annotation.XmlAttribute;
-import javax.xml.bind.annotation.XmlRootElement;
-import javax.xml.bind.annotation.XmlSchemaType;
-import javax.xml.bind.annotation.XmlType;
-import javax.xml.namespace.QName;
-
-
/**
* <p>Java class for anonymous complex type.
*
@@ -40,112 +43,95 @@
*
*
*/
-(a)XmlAccessorType(XmlAccessType.FIELD)
-@XmlType(name = "")
-@XmlRootElement(name = "PolicyReference")
-public class PolicyReference {
+public class PolicyReference extends BaseAddressingType
+{
- @XmlAttribute(name = "URI", required = true)
- @XmlSchemaType(name = "anyURI")
- protected String uri;
- @XmlAttribute(name = "Digest")
- protected byte[] digest;
- @XmlAttribute(name = "DigestAlgorithm")
- @XmlSchemaType(name = "anyURI")
- protected String digestAlgorithm;
- @XmlAnyAttribute
- private Map<QName, String> otherAttributes = new HashMap<QName, String>();
+ protected String uri;
- /**
- * Gets the value of the uri property.
- *
- * @return
- * possible object is
- * {@link String }
- *
- */
- public String getURI() {
- return uri;
- }
+ protected byte[] digest;
- /**
- * Sets the value of the uri property.
- *
- * @param value
- * allowed object is
- * {@link String }
- *
- */
- public void setURI(String value) {
- this.uri = value;
- }
+ protected String digestAlgorithm;
- /**
- * Gets the value of the digest property.
- *
- * @return
- * possible object is
- * byte[]
- */
- public byte[] getDigest() {
- return digest;
- }
+ /**
+ * Gets the value of the uri property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getURI()
+ {
+ return uri;
+ }
- /**
- * Sets the value of the digest property.
- *
- * @param value
- * allowed object is
- * byte[]
- */
- public void setDigest(byte[] value) {
- this.digest = ((byte[]) value);
- }
+ /**
+ * Sets the value of the uri property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setURI(String value)
+ {
+ this.uri = value;
+ }
- /**
- * Gets the value of the digestAlgorithm property.
- *
- * @return
- * possible object is
- * {@link String }
- *
- */
- public String getDigestAlgorithm() {
- if (digestAlgorithm == null) {
- return "http://schemas.xmlsoap.org/ws/2004/09/policy/Sha1Exc";
- } else {
- return digestAlgorithm;
- }
- }
+ /**
+ * Gets the value of the digest property.
+ *
+ * @return
+ * possible object is
+ * byte[]
+ */
+ public byte[] getDigest()
+ {
+ return digest;
+ }
- /**
- * Sets the value of the digestAlgorithm property.
- *
- * @param value
- * allowed object is
- * {@link String }
- *
- */
- public void setDigestAlgorithm(String value) {
- this.digestAlgorithm = value;
- }
+ /**
+ * Sets the value of the digest property.
+ *
+ * @param value
+ * allowed object is
+ * byte[]
+ */
+ public void setDigest(byte[] value)
+ {
+ this.digest = (value);
+ }
- /**
- * Gets a map that contains attributes that aren't bound to any typed property on this class.
- *
- * <p>
- * the map is keyed by the name of the attribute and
- * the value is the string value of the attribute.
- *
- * the map returned by this method is live, and you can add new attribute
- * by updating the map directly. Because of this design, there's no setter.
- *
- *
- * @return
- * always non-null
- */
- public Map<QName, String> getOtherAttributes() {
- return otherAttributes;
- }
+ /**
+ * Gets the value of the digestAlgorithm property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getDigestAlgorithm()
+ {
+ if (digestAlgorithm == null)
+ {
+ return "http://schemas.xmlsoap.org/ws/2004/09/policy/Sha1Exc";
+ }
+ else
+ {
+ return digestAlgorithm;
+ }
+ }
-}
+ /**
+ * Sets the value of the digestAlgorithm property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setDigestAlgorithm(String value)
+ {
+ this.digestAlgorithm = value;
+ }
+}
\ No newline at end of file
Modified: federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/ws/policy/package-info.java
===================================================================
--- federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/ws/policy/package-info.java 2011-05-17 05:03:58 UTC (rev 943)
+++ federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/ws/policy/package-info.java 2011-05-17 14:55:04 UTC (rev 944)
@@ -1,9 +1,23 @@
-//
-// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-661
-// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
-// Any modifications to this file will be lost upon recompilation of the source schema.
-// Generated on: 2008.12.17 at 12:32:20 PM CST
-//
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.picketlink.identity.federation.ws.policy;
-(a)javax.xml.bind.annotation.XmlSchema(namespace = "http://schemas.xmlsoap.org/ws/2004/09/policy", elementFormDefault = javax.xml.bind.annotation.XmlNsForm.QUALIFIED)
-package org.picketlink.identity.federation.ws.policy;
Deleted: federation/trunk/picketlink-fed-model/src/test/java/org/picketlink/test/identity/federation/ws/trust/UnmarshallingTestCase.java
===================================================================
--- federation/trunk/picketlink-fed-model/src/test/java/org/picketlink/test/identity/federation/ws/trust/UnmarshallingTestCase.java 2011-05-17 05:03:58 UTC (rev 943)
+++ federation/trunk/picketlink-fed-model/src/test/java/org/picketlink/test/identity/federation/ws/trust/UnmarshallingTestCase.java 2011-05-17 14:55:04 UTC (rev 944)
@@ -1,131 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2008, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.picketlink.test.identity.federation.ws.trust;
-
-import java.io.File;
-import java.net.URI;
-import java.util.List;
-
-import javax.xml.bind.JAXBContext;
-import javax.xml.bind.JAXBElement;
-import javax.xml.bind.Unmarshaller;
-
-import junit.framework.TestCase;
-
-import org.picketlink.identity.federation.ws.trust.RequestSecurityTokenCollectionType;
-import org.picketlink.identity.federation.ws.trust.RequestSecurityTokenType;
-
-/**
- * <p>
- * A {@code TestCase} that validates the unmarshalling of ws-trust messages.
- * </p>
- *
- * @author <a href="mailto:sguilhen@redhat.com">Stefan Guilhen</a>
- */
-public class UnmarshallingTestCase extends TestCase
-{
-
- /**
- * <p>
- * Tests unmarshalling a simple ws-trust security token request.
- * </p>
- *
- * @throws Exception if an error occurs while running the test.
- */
- @SuppressWarnings("unchecked")
- public void testUnmarshallTokenRequest() throws Exception
- {
- JAXBContext context = JAXBContext.newInstance("org.picketlink.identity.federation.ws.policy:org.picketlink.identity.federation.ws.trust");
- Unmarshaller unmarshaller = context.createUnmarshaller();
- // this.setValidatingSchema("/schema/wstrust/v1_3/ws-trust-1.3.xsd", unmarshaller);
-
- // unmarshall the sample security token request.
- URI sampleURI = this.getClass().getResource("/wstrust/simple-request.xml").toURI();
- Object object = unmarshaller.unmarshal(new File(sampleURI));
- assertNotNull("Unexpected null object", object);
- assertTrue("Unexpected object type", object instanceof JAXBElement);
-
- JAXBElement element = (JAXBElement) object;
- assertEquals("Invalid element name", "RequestSecurityToken", element.getName().getLocalPart());
- assertEquals("Invalid element type", RequestSecurityTokenType.class, element.getDeclaredType());
-
- // validate the request contents.
- RequestSecurityTokenType request = (RequestSecurityTokenType) element.getValue();
- List<Object> contents = request.getAny();
- assertNotNull("Unexpected null value for the request contents", contents);
- assertEquals("Unexpected number of contents", 2, contents.size());
-
- // first element should be TokenType.
- JAXBElement<String> tokenType = (JAXBElement<String>) contents.get(0);
- assertEquals("TokenType", tokenType.getName().getLocalPart());
- assertEquals("http://example.org/mySpecialToken", tokenType.getValue());
-
- // second element should be RequestType.
- JAXBElement<String> requestType = (JAXBElement<String>) contents.get(1);
- assertEquals("RequestType", requestType.getName().getLocalPart());
- assertEquals("http://docs.oasis-open.org/ws-sx/ws-trust/200512/Issue", requestType.getValue());
- }
-
- /**
- * <p>
- * Tests unmarshalling a ws-trust request for a collection of security tokens.
- * </p>
- *
- * @throws Exception if an error occurs while running the test.
- */
- @SuppressWarnings("unchecked")
- public void testUnmarshallTokenCollectionRequest() throws Exception
- {
- JAXBContext context = JAXBContext.newInstance("org.picketlink.identity.federation.ws.trust");
- Unmarshaller unmarshaller = context.createUnmarshaller();
- // this.setValidatingSchema("/schema/wstrust/v1_3/ws-trust-1.3.xsd", unmarshaller);
-
- // unmarshall the sample security token request.
- URI sampleURI = this.getClass().getResource("/wstrust/collection-request.xml").toURI();
- Object object = unmarshaller.unmarshal(new File(sampleURI));
- assertNotNull("Unexpected null object", object);
- assertTrue("Unexpected object type", object instanceof JAXBElement);
-
- JAXBElement element = (JAXBElement) object;
- assertEquals("Invalid element name", "RequestSecurityTokenCollection", element.getName().getLocalPart());
- assertEquals("Invalid element type", RequestSecurityTokenCollectionType.class, element.getDeclaredType());
-
- List<RequestSecurityTokenType> requests = ((RequestSecurityTokenCollectionType) element.getValue())
- .getRequestSecurityToken();
- assertNotNull("Unexpected null request list", requests);
- assertEquals("Unexpected number of requests", 2, requests.size());
-
- // first request must have the http://www.example.com/1 context.
- RequestSecurityTokenType request = requests.get(0);
- assertEquals("Invalid context id", "http://www.example.com/1", request.getContext());
- List<Object> contents = request.getAny();
- assertNotNull("Unexpected null value for the request contents", contents);
- assertEquals("Unexpected number of contents", 4, contents.size());
-
- // second request must have the http://www.example.com/2 context.
- request = requests.get(1);
- assertEquals("Invalid context id", "http://www.example.com/2", request.getContext());
- contents = request.getAny();
- assertNotNull("Unexpected null value for the request contents", contents);
- assertEquals("Unexpected number of contents", 4, contents.size());
- }
-}
\ No newline at end of file
13 years, 7 months
Picketlink SVN: r943 - in integration-tests/trunk: common-dist/files and 1 other directories.
by picketlink-commits@lists.jboss.org
Author: anil.saldhana(a)jboss.com
Date: 2011-05-17 01:03:58 -0400 (Tue, 17 May 2011)
New Revision: 943
Added:
integration-tests/trunk/common-dist/files/war-deployers-jboss-beans.xml
Modified:
integration-tests/trunk/ant-scripts/ant-build.xml
integration-tests/trunk/picketlink-trust-tests/src/test/resources/domains/sts-jboss-beans.xml
Log:
support the JBWS Token Issuing LM and BinaryTokenHandler
Modified: integration-tests/trunk/ant-scripts/ant-build.xml
===================================================================
--- integration-tests/trunk/ant-scripts/ant-build.xml 2011-05-17 05:01:03 UTC (rev 942)
+++ integration-tests/trunk/ant-scripts/ant-build.xml 2011-05-17 05:03:58 UTC (rev 943)
@@ -3,6 +3,7 @@
<classpath path="${depclasspath}"/>
</taskdef>
<property name="JBAS5_DEPLOY" location="${basedir}/target/jboss-5.1.0.GA/server/default/deploy/" />
+ <property name="JBAS5_DEPLOYER" location="${basedir}/target/jboss-5.1.0.GA/server/default/deployers/" />
<property name="JBAS6_DEPLOY" location="${basedir}/target/jboss-6.0.0.Final/server/default/deploy/" />
<property name="TOMCAT6" location="${basedir}/target/apache-tomcat-6.0.26/" />
<property name="TOMCAT6_DEPLOY" location="${basedir}/target/apache-tomcat-6.0.26/webapps/" />
@@ -111,9 +112,11 @@
<copy file="${basedir}/../picketlink-trust-tests/src/test/resources/domains/sts-jboss-beans.xml" todir="${JBAS5_DEPLOY}/picketlink" />
<copy file="${basedir}/../picketlink-trust-tests/target/picketlink-wstest-tests.jar" todir="${JBAS5_DEPLOY}/picketlink" />
<copy file="${basedir}/../picketlink-trust-tests/target/pojo-test.war" todir="${JBAS5_DEPLOY}/picketlink" />
+ <copy file="${basedir}/../picketlink-trust-tests/target/binary-test.war" todir="${JBAS5_DEPLOY}/picketlink" />
<copy file="${basedir}/../picketlink-trust-tests/src/test/resources/props/sts-users.properties" todir="${JBAS5_DEPLOY}/../conf" />
<copy file="${basedir}/../picketlink-trust-tests/src/test/resources/props/sts-roles.properties" todir="${JBAS5_DEPLOY}/../conf" />
- <copy file="${localRepository}/org/picketlink/picketlink-trust-jbossws/${version}/picketlink-trust-jbossws-${version}.jar" todir="${JBAS5_DEPLOY}/picketlink"/>
+ <copy file="${localRepository}/org/picketlink/picketlink-trust-jbossws/${version}/picketlink-trust-jbossws-${version}.jar" todir="${JBAS5_DEPLOY}/picketlink"/>
+ <copy file="${basedir}/../common-dist/files/war-deployers-jboss-beans.xml" todir="${JBAS5_DEPLOYER}/jbossweb.deployer/META-INF" />
</target>
<target name="start-jboss" depends="stop-jboss">
Added: integration-tests/trunk/common-dist/files/war-deployers-jboss-beans.xml
===================================================================
--- integration-tests/trunk/common-dist/files/war-deployers-jboss-beans.xml (rev 0)
+++ integration-tests/trunk/common-dist/files/war-deployers-jboss-beans.xml 2011-05-17 05:03:58 UTC (rev 943)
@@ -0,0 +1,256 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+Web application deployers
+$Id: war-deployers-jboss-beans.xml 88877 2009-05-14 15:36:29Z alesj $
+-->
+<deployment xmlns="urn:jboss:bean-deployer:2.0">
+
+ <!-- WAR Structure -->
+ <bean name="WARStructure" class="org.jboss.web.deployers.WARStructure">
+ <property name="webInfLibFilter">
+ <!-- We accept all .jar files in WEB-INF/lib -->
+ <bean name="WebInfLibFilter" class="org.jboss.virtual.plugins.vfs.helpers.SuffixMatchFilter">
+ <constructor><parameter class="java.lang.String">.jar</parameter></constructor>
+ </bean>
+ </property>
+ <property name="includeWebInfInClasspath">true</property>
+ <property name="contextInfoOrder">1000</property>
+ </bean>
+
+ <!-- web.xml parsing deployer -->
+ <bean name="WebAppParsingDeployer" class="org.jboss.deployment.WebAppParsingDeployer">
+ <property name="relativeOrder">2000</property>
+ </bean>
+ <bean name="JBossWebAppParsingDeployer" class="org.jboss.deployment.JBossWebAppParsingDeployer">
+ <property name="relativeOrder">2001</property>
+ </bean>
+
+ <!-- See JBAS-6062 -->
+ <bean name="WebXmlLessDeployer" class="org.jboss.deployment.LegacyWebXmlLessDeployer"/>
+
+ <!-- Allow for war local class loaders: in testing -->
+ <bean name="WarClassLoaderDeployer" class="org.jboss.web.tomcat.service.deployers.WarClassLoaderDeployer">
+ <property name="relativeOrder">-1</property>
+ <property name="filteredPackages">javax.servlet,org.apache.commons.logging</property>
+ </bean>
+
+ <!--
+ Injects default clustering metadata.
+ TODO. A better approach is to use a jboss-web.xml equivalent to conf/web.xml
+ and conf/standardjboss.xml as the source for defaults.
+ -->
+ <bean name="WebAppClusteringDefaultsDeployer"
+ class="org.jboss.web.tomcat.service.deployers.ClusteringDefaultsDeployer">
+
+ <!-- Default session cache config used by distributable webapps -->
+ <property name="cacheName">standard-session-cache</property>
+ <!-- Default session cache config used by FIELD granularity distributable webapps -->
+ <property name="fieldGranularityCacheName">field-granularity-session-cache</property>
+
+ <!--
+ The following two properties define when sessions are replicated to
+ the other nodes.
+ The default value, "instant", uses the request thread to replicate changes
+ to the other nodes at the end of requests. In this case, the
+ "SnapshotInterval" property is not used.
+ The "interval" mode uses a background thread that periodically checks for
+ modified sessions and replicates them. The "SnapshotInterval"
+ property controls how often (in milliseconds) the background thread
+ should run.
+
+ Note that this property is not in effect if the replication-granularity
+ is set to FIELD. If it is FIELD, it will be per http request (that is,
+ "instant" mode.)
+ -->
+ <property name="snapshotMode">INSTANT</property>
+ <property name="snapshotInterval">1000</property>
+
+ <property name="replicationGranularity">SESSION</property>
+ <property name="replicationTrigger">SET_AND_NON_PRIMITIVE_GET</property>
+ <property name="replicationFieldBatchMode">true</property>
+
+ <!--
+ Whether by default to add special session handling to coordinate use
+ with mod_jk or other JK connector variants.
+ If a JK connector is used, you will need to set the JvmRoute inside
+ JBossWeb, e.g. configure,
+ Engine name="jboss.web" jvmRoute="Node1" defaultHost="localhost"
+ in server.xml.
+
+ This value can be configured per webapp in the webapp's jboss.xml.
+
+ If not set, the default will be to add the special session handling
+ if a jvmRoute is configured on the Engine. So, generally the only reason
+ to configure this overall default is to set it to 'false' and thus force
+ per webapp configuration.
+ -->
+ <!--
+ <property name="useJK">false</property>
+
+ <property name="useSessionPassivation">false</property>
+ <property name="passivationMaxIdleTime">-1</property>
+ <property name="passivationMinIdleTime">-1</property>
+ -->
+
+ <!--
+ Determines the maximum interval between requests, in seconds, after
+ which a request will trigger replication of the session's timestamp
+ regardless of whether the request has otherwise made the session dirty.
+ Such replication ensures that other nodes in the cluster are aware of
+ the most recent value for the session's timestamp and won't incorrectly
+ expire an unreplicated session upon failover. It also results in correct
+ values for HttpSession.getLastAccessedTime() calls following failover.
+
+ The cost of timestamp replication is considerably lower in JBoss AS 5
+ than it is in earlier versions since replicating a timestamp does not
+ necessitate replicating any other data.
+
+ A value of 0 means the metadata will be replicated whenever the session is
+ accessed. A value of -1 means the metadata will be replicated only if some
+ other activity during the request (e.g. modifying an attribute) has
+ resulted in other replication work involving the session. A positive value
+ greater than the HttpSession.getMaxInactiveInterval() value will be treated
+ as a likely misconfiguration and converted to 0; i.e. replicate the
+ metadata on every request.
+ -->
+ <property name="maxUnreplicatedInterval">60</property>
+
+ </bean>
+
+ <!-- The WebMetaData to service mbean deployer -->
+ <bean name="WarDeployer" class="org.jboss.web.tomcat.service.deployers.TomcatDeployer">
+ <install bean="ManagedDeploymentCreator" method="addAttachmentType">
+ <parameter>
+ <value>org.jboss.metadata.web.jboss.JBossWebMetaData</value>
+ </parameter>
+ <parameter>
+ <value>war</value>
+ </parameter>
+ </install>
+ <uninstall bean="ManagedDeploymentCreator" method="removeAttachmentType">
+ <parameter>
+ <value>org.jboss.metadata.web.jboss.JBossWebMetaData</value>
+ </parameter>
+ </uninstall>
+
+ <!-- Inject the MainDeployer for resolving cross deployment refs -->
+ <property name="mainDeployer"><inject bean="MainDeployer" /></property>
+
+ <property name="relativeOrder">2003</property>
+
+ <!-- FIXME Get this moved to TomcatService in deploy -->
+ <property name="configFile">
+ <value-factory bean="ServiceBindingManager" method="getResourceBinding">
+ <parameter>jboss.web:service=WebServer</parameter>
+ <parameter>${jboss.server.home.url}${/}deploy${/}jbossweb.sar${/}server.xml</parameter>
+ </value-factory>
+ </property>
+
+ <!-- You can configure a set of authenticators keyed by http-auth method
+ used. This will apply the same set of authenticators across all web
+ applications. You can override the set of authenticators at the web
+ application level by adding <authenticators> element to the respective
+ jboss-web.xml
+ -->
+ <property name="authenticators">
+ <map class="java.util.Properties" keyClass="java.lang.String" valueClass="java.lang.String">
+ <entry>
+ <key>BASIC</key>
+ <value>org.apache.catalina.authenticator.BasicAuthenticator</value>
+ </entry>
+ <entry>
+ <key>CLIENT-CERT</key>
+ <value>org.apache.catalina.authenticator.SSLAuthenticator</value>
+ </entry>
+ <entry>
+ <key>DIGEST</key>
+ <value>org.apache.catalina.authenticator.DigestAuthenticator</value>
+ </entry>
+ <entry>
+ <key>FORM</key>
+ <value>org.apache.catalina.authenticator.FormAuthenticator</value>
+ </entry>
+ <entry>
+ <key>NONE</key>
+ <value>org.apache.catalina.authenticator.NonLoginAuthenticator</value>
+ </entry>
+ <entry>
+ <key>SECURITY_DOMAIN</key>
+ <value>org.picketlink.identity.federation.bindings.tomcat.PicketLinkAuthenticator</value>
+ </entry>
+ </map>
+ </property>
+
+ <!-- The JAAS security domain to use in the absense of an explicit
+ security-domain specification in the war WEB-INF/jboss-web.xml
+ -->
+ <property name="defaultSecurityDomain">java:/jaas/jboss-web-policy</property>
+
+ <!-- Get the flag indicating if the normal Java2 parent first class
+ loading model should be used over the servlet 2.3 web container first
+ model.
+ -->
+ <property name="java2ClassLoadingCompliance">false</property>
+
+ <!-- This is NO LONGER supported this way and it will be completely removed for 6.x.
+ See JBAS-6914 for how you can achieve the same in 5.x with new MC JBossCL layer.
+
+ A flag indicating if the JBoss Loader should be used. This loader
+ uses a unified class loader as the class loader rather than the tomcat
+ specific class loader.
+ The default is false to ensure that wars have isolated class loading
+ for duplicate jars and jsp files.
+ <property name="useJBossWebLoader">false</property>
+ -->
+
+ <!-- The list of package prefixes that should not be loaded without
+ delegating to the parent class loader before trying the web app
+ class loader. The packages listed here are those tha are used by
+ the web container implementation and cannot be overriden. The format
+ is a comma separated list of the package names. There cannot be any
+ whitespace between the package prefixes.
+ This setting only applies when UseJBossWebLoader=false.
+ -->
+ <property name="filteredPackages">javax.servlet,org.apache.commons.logging</property>
+
+ <property name="lenientEjbLink">true</property>
+
+ <!--Flag to delete the Work Dir on Context Destroy -->
+ <property name="deleteWorkDirOnContextDestroy">false</property>
+
+ <!--
+ Class of the session manager (used if context is marked as 'distributable'. Currently allowed values:
+ - org.jboss.web.tomcat.service.session.JBossCacheManager
+ -->
+ <property name="managerClass">org.jboss.web.tomcat.service.session.JBossCacheManager</property>
+
+ <!-- The name of the request property under with the authenticated JAAS
+ Subject is stored on successful authentication. If null or empty then
+ the Subject will not be stored.
+ -->
+ <!--
+ <property name="subjectAttributeName">j_subject</property>
+ -->
+
+ <!-- The SessionIdAlphabet is the set of characters used to create a session Id
+ It must be made up of exactly 65 unique characters
+ <property name="sessionIdAlphabet">ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-_</property>
+ -->
+
+ <property name="domain">jboss.web</property>
+ <!-- Specify a Bean for JBoss Security PolicyRegistration -->
+ <property name="policyRegistrationName">JBossSecurityPolicyRegistration</property>
+
+ <!-- Specify a SecurityManagement Wrapper -->
+ <property name="securityManagementName">JNDIBasedSecurityManagement</property>
+
+ <!-- Specify a SecurityContext FQN class name -->
+ <property name="securityContextClassName">org.jboss.security.plugins.JBossSecurityContext</property>
+ </bean>
+
+ <bean name="MergedJBossWebMetaDataDeployer"
+ class="org.jboss.web.deployers.MergedJBossWebMetaDataDeployer">
+ </bean>
+
+</deployment>
Modified: integration-tests/trunk/picketlink-trust-tests/src/test/resources/domains/sts-jboss-beans.xml
===================================================================
--- integration-tests/trunk/picketlink-trust-tests/src/test/resources/domains/sts-jboss-beans.xml 2011-05-17 05:01:03 UTC (rev 942)
+++ integration-tests/trunk/picketlink-trust-tests/src/test/resources/domains/sts-jboss-beans.xml 2011-05-17 05:03:58 UTC (rev 943)
@@ -31,6 +31,7 @@
<module-option name="useOptionsCredentials">true</module-option>
<module-option name="overrideDispatch">true</module-option>
<module-option name="wspAppliesTo">http://services.testcorp.org/provider1</module-option>
+ <module-option name="wsaIssuer">http://something</module-option>
<module-option name="password-stacking">useFirstPass</module-option>
</login-module>
@@ -61,4 +62,4 @@
</bean>
-</deployment>
\ No newline at end of file
+</deployment>
13 years, 7 months
Picketlink SVN: r942 - in federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/wstrust: auth and 1 other directory.
by picketlink-commits@lists.jboss.org
Author: anil.saldhana(a)jboss.com
Date: 2011-05-17 01:01:03 -0400 (Tue, 17 May 2011)
New Revision: 942
Modified:
federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/wstrust/STSClient.java
federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/wstrust/STSClientConfig.java
federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/wstrust/auth/AbstractSTSLoginModule.java
Log:
handle wst:issuer and RST batch request issue
Modified: federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/wstrust/STSClient.java
===================================================================
--- federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/wstrust/STSClient.java 2011-05-17 04:58:37 UTC (rev 941)
+++ federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/wstrust/STSClient.java 2011-05-17 05:01:03 UTC (rev 942)
@@ -67,6 +67,11 @@
private String wspAppliesTo;
/**
+ * Indicates whether the request is a batch request - will be read from the {@link STSClientConfig}
+ */
+ private boolean isBatch = false;
+
+ /**
* Constructor
* @see {@link #setDispatch(Dispatch)} for the setting of the {@link Dispatch} object
*/
@@ -89,6 +94,8 @@
QName service = new QName(targetNS, config.getServiceName());
QName portName = new QName(targetNS, config.getPortName());
+ isBatch = config.isBatch();
+
wsaIssuerAddress = config.getWsaIssuer();
wspAppliesTo = config.getWspAppliesTo();
@@ -156,6 +163,10 @@
public Element issueTokenForEndpoint(String endpointURI) throws WSTrustException
{
RequestSecurityToken request = new RequestSecurityToken();
+ if (wsaIssuerAddress != null)
+ {
+ request.setIssuer(WSTrustUtil.createIssuer(wsaIssuerAddress));
+ }
setAppliesTo(endpointURI, request);
return issueToken(request);
}
@@ -180,6 +191,10 @@
throw new IllegalArgumentException("One of endpointURI or tokenType must be provided.");
RequestSecurityToken request = new RequestSecurityToken();
+ if (wsaIssuerAddress != null)
+ {
+ request.setIssuer(WSTrustUtil.createIssuer(wsaIssuerAddress));
+ }
setAppliesTo(endpointURI, request);
setTokenType(tokenType, request);
return issueToken(request);
@@ -210,6 +225,10 @@
throw new IllegalArgumentException("One of endpointURI or tokenType must be provided.");
RequestSecurityToken request = new RequestSecurityToken();
+ if (wsaIssuerAddress != null)
+ {
+ request.setIssuer(WSTrustUtil.createIssuer(wsaIssuerAddress));
+ }
setAppliesTo(endpointURI, request);
setTokenType(tokenType, request);
setOnBehalfOf(principal, request);
@@ -250,7 +269,13 @@
public Element issueToken(RequestSecurityToken request) throws WSTrustException
{
if (request.getRequestType() == null)
- request.setRequestType(URI.create(WSTrustConstants.ISSUE_REQUEST));
+ {
+ if (isBatch)
+ request.setRequestType(URI.create(WSTrustConstants.BATCH_ISSUE_REQUEST));
+ else
+ request.setRequestType(URI.create(WSTrustConstants.ISSUE_REQUEST));
+ }
+
if (request.getContext() == null)
request.setContext("default-context");
Modified: federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/wstrust/STSClientConfig.java
===================================================================
--- federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/wstrust/STSClientConfig.java 2011-05-17 04:58:37 UTC (rev 941)
+++ federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/wstrust/STSClientConfig.java 2011-05-17 05:01:03 UTC (rev 942)
@@ -73,6 +73,8 @@
public static final String WSP_APPLIES_TO = "wspAppliesTo";
+ public static final String IS_BATCH = "isBatch";
+
private final String serviceName;
private final String portName;
@@ -87,6 +89,8 @@
private final String wspAppliesTo;
+ private boolean isBatch = false; //Is the RST a batch request?
+
private STSClientConfig(final Builder builder)
{
serviceName = builder.serviceName;
@@ -94,6 +98,7 @@
endpointAddress = builder.endpointAddress;
username = builder.username;
password = builder.password;
+ isBatch = builder.isBatch;
wsaIssuer = builder.wsaIssuer;
wspAppliesTo = builder.wspAppliesTo;
}
@@ -133,6 +138,11 @@
return wspAppliesTo;
}
+ public boolean isBatch()
+ {
+ return isBatch;
+ }
+
public String toString()
{
return getClass().getSimpleName() + "[serviceName=" + serviceName + ", portName=" + portName
@@ -155,6 +165,8 @@
private String wspAppliesTo;
+ private boolean isBatch;
+
public Builder()
{
}
@@ -231,6 +243,16 @@
return password;
}
+ public boolean isBatch()
+ {
+ return isBatch;
+ }
+
+ public void setBatch(boolean isBatch)
+ {
+ this.isBatch = isBatch;
+ }
+
public STSClientConfig build()
{
validate(this);
@@ -258,6 +280,8 @@
this.password = properties.getProperty(PASSWORD);
this.wsaIssuer = properties.getProperty(WSA_ISSUER);
this.wspAppliesTo = properties.getProperty(WSP_APPLIES_TO);
+ String batchStr = properties.getProperty(IS_BATCH);
+ this.isBatch = StringUtil.isNotNull(batchStr) ? Boolean.parseBoolean(batchStr) : false;
if (this.password.startsWith(PicketLinkFederationConstants.PASS_MASK_PREFIX))
{
Modified: federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/wstrust/auth/AbstractSTSLoginModule.java
===================================================================
--- federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/wstrust/auth/AbstractSTSLoginModule.java 2011-05-17 04:58:37 UTC (rev 941)
+++ federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/wstrust/auth/AbstractSTSLoginModule.java 2011-05-17 05:01:03 UTC (rev 942)
@@ -223,6 +223,11 @@
public static final String PASSWORD_KEY = "password";
/**
+ * Key to specify whether this batch issue request
+ */
+ public static final String IS_BATCH = "isBatch";
+
+ /**
* The subject to be populated.
*/
protected Subject subject;
@@ -284,6 +289,11 @@
protected String securityDomain = null;
/**
+ * Value to indicate whether the RST is a batch request
+ */
+ protected boolean isBatch = false;
+
+ /**
* Initialized this login module. Simple stores the passed in fields and
* also validates the options.
*
@@ -333,6 +343,12 @@
{
this.injectCallerPrincipalGroup = Boolean.parseBoolean(callerPrincipalGroup);
}
+
+ String batchIssueString = (String) options.get(IS_BATCH);
+ if (StringUtil.isNotNull(batchIssueString))
+ {
+ this.isBatch = Boolean.parseBoolean(batchIssueString);
+ }
}
/**
@@ -442,6 +458,8 @@
builder.portName((String) options.get(PORT_NAME)).serviceName((String) options.get(SERVICE_NAME));
builder.username((String) options.get(USERNAME_KEY)).password((String) options.get(PASSWORD_KEY));
+ builder.setBatch(isBatch);
+
String passwordString = (String) options.get(PASSWORD_KEY);
if (passwordString != null && passwordString.startsWith(PicketLinkFederationConstants.PASS_MASK_PREFIX))
{
13 years, 7 months
Picketlink SVN: r941 - in federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core: wstrust/writers and 1 other directory.
by picketlink-commits@lists.jboss.org
Author: anil.saldhana(a)jboss.com
Date: 2011-05-17 00:58:37 -0400 (Tue, 17 May 2011)
New Revision: 941
Modified:
federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/parsers/wst/WSTRequestSecurityTokenParser.java
federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/wstrust/writers/WSTrustRequestWriter.java
Log:
parse/write RST Issuer
Modified: federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/parsers/wst/WSTRequestSecurityTokenParser.java
===================================================================
--- federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/parsers/wst/WSTRequestSecurityTokenParser.java 2011-05-17 04:57:46 UTC (rev 940)
+++ federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/parsers/wst/WSTRequestSecurityTokenParser.java 2011-05-17 04:58:37 UTC (rev 941)
@@ -35,9 +35,12 @@
import org.picketlink.identity.federation.core.parsers.ParserController;
import org.picketlink.identity.federation.core.parsers.ParserNamespaceSupport;
import org.picketlink.identity.federation.core.parsers.util.StaxParserUtil;
+import org.picketlink.identity.federation.core.wsa.WSAddressingConstants;
import org.picketlink.identity.federation.core.wstrust.WSTrustConstants;
import org.picketlink.identity.federation.core.wstrust.wrappers.Lifetime;
import org.picketlink.identity.federation.core.wstrust.wrappers.RequestSecurityToken;
+import org.picketlink.identity.federation.ws.addressing.AttributedURIType;
+import org.picketlink.identity.federation.ws.addressing.EndpointReferenceType;
import org.picketlink.identity.federation.ws.policy.AppliesTo;
import org.picketlink.identity.federation.ws.trust.BinarySecretType;
import org.picketlink.identity.federation.ws.trust.CancelTargetType;
@@ -56,68 +59,69 @@
* @since Oct 11, 2010
*/
public class WSTRequestSecurityTokenParser implements ParserNamespaceSupport
-{
+{
public static final String X509CERTIFICATE = "X509Certificate";
+
public static final String KEYVALUE = "KeyValue";
/**
* @see {@link ParserNamespaceSupport#parse(XMLEventReader)}
*/
public Object parse(XMLEventReader xmlEventReader) throws ParsingException
- {
- StartElement startElement = StaxParserUtil.getNextStartElement( xmlEventReader );
+ {
+ StartElement startElement = StaxParserUtil.getNextStartElement(xmlEventReader);
RequestSecurityToken requestToken = new RequestSecurityToken();
- QName contextQName = new QName( "", WSTrustConstants.RST_CONTEXT );
- Attribute contextAttribute = startElement.getAttributeByName( contextQName );
+ QName contextQName = new QName("", WSTrustConstants.RST_CONTEXT);
+ Attribute contextAttribute = startElement.getAttributeByName(contextQName);
if (contextAttribute != null)
{
String contextValue = StaxParserUtil.getAttributeValue(contextAttribute);
requestToken.setContext(contextValue);
}
- while( xmlEventReader.hasNext() )
+ while (xmlEventReader.hasNext())
{
- XMLEvent xmlEvent = StaxParserUtil.peek( xmlEventReader );
- if( xmlEvent == null )
+ XMLEvent xmlEvent = StaxParserUtil.peek(xmlEventReader);
+ if (xmlEvent == null)
break;
- if( xmlEvent instanceof EndElement )
+ if (xmlEvent instanceof EndElement)
{
- xmlEvent = StaxParserUtil.getNextEvent( xmlEventReader );
+ xmlEvent = StaxParserUtil.getNextEvent(xmlEventReader);
EndElement endElement = (EndElement) xmlEvent;
- String endElementTag = StaxParserUtil.getEndElementName( endElement );
- if( endElementTag.equals( WSTrustConstants.RST ) )
+ String endElementTag = StaxParserUtil.getEndElementName(endElement);
+ if (endElementTag.equals(WSTrustConstants.RST))
break;
else
- throw new RuntimeException( "Unknown End Element:" + endElementTag );
+ throw new RuntimeException("Unknown End Element:" + endElementTag);
}
try
{
- StartElement subEvent = StaxParserUtil.peekNextStartElement( xmlEventReader );
- if( subEvent == null )
+ StartElement subEvent = StaxParserUtil.peekNextStartElement(xmlEventReader);
+ if (subEvent == null)
break;
- String tag = StaxParserUtil.getStartElementName( subEvent );
- if( tag.equals( WSTrustConstants.REQUEST_TYPE ))
- {
+ String tag = StaxParserUtil.getStartElementName(subEvent);
+ if (tag.equals(WSTrustConstants.REQUEST_TYPE))
+ {
subEvent = StaxParserUtil.getNextStartElement(xmlEventReader);
- if( !StaxParserUtil.hasTextAhead( xmlEventReader ))
- throw new ParsingException( "request type is expected ahead" );
+ if (!StaxParserUtil.hasTextAhead(xmlEventReader))
+ throw new ParsingException("request type is expected ahead");
String value = StaxParserUtil.getElementText(xmlEventReader);
- requestToken.setRequestType( new URI( value ));
+ requestToken.setRequestType(new URI(value));
}
- else if( tag.equals( WSTrustConstants.TOKEN_TYPE ))
+ else if (tag.equals(WSTrustConstants.TOKEN_TYPE))
{
subEvent = StaxParserUtil.getNextStartElement(xmlEventReader);
- if( !StaxParserUtil.hasTextAhead( xmlEventReader ))
- throw new ParsingException( "token type is expected ahead" );
+ if (!StaxParserUtil.hasTextAhead(xmlEventReader))
+ throw new ParsingException("token type is expected ahead");
String value = StaxParserUtil.getElementText(xmlEventReader);
- requestToken.setTokenType( new URI( value ));
+ requestToken.setTokenType(new URI(value));
}
else if (tag.equals(WSTrustConstants.LIFETIME))
{
@@ -150,145 +154,165 @@
EndElement lifeTimeElement = StaxParserUtil.getNextEndElement(xmlEventReader);
StaxParserUtil.validate(lifeTimeElement, WSTrustConstants.LIFETIME);
}
- else if( tag.equals( WSTrustConstants.CANCEL_TARGET ))
+ else if (tag.equals(WSTrustConstants.CANCEL_TARGET))
{
subEvent = StaxParserUtil.getNextStartElement(xmlEventReader);
- StaxParserUtil.validate(subEvent, WSTrustConstants.CANCEL_TARGET );
+ StaxParserUtil.validate(subEvent, WSTrustConstants.CANCEL_TARGET);
WSTCancelTargetParser wstCancelTargetParser = new WSTCancelTargetParser();
- CancelTargetType cancelTarget = (CancelTargetType) wstCancelTargetParser.parse( xmlEventReader );
- requestToken.setCancelTarget( cancelTarget );
+ CancelTargetType cancelTarget = (CancelTargetType) wstCancelTargetParser.parse(xmlEventReader);
+ requestToken.setCancelTarget(cancelTarget);
EndElement cancelTargetEndElement = StaxParserUtil.getNextEndElement(xmlEventReader);
- StaxParserUtil.validate( cancelTargetEndElement, WSTrustConstants.CANCEL_TARGET ) ;
+ StaxParserUtil.validate(cancelTargetEndElement, WSTrustConstants.CANCEL_TARGET);
}
- else if( tag.equals( WSTrustConstants.VALIDATE_TARGET ))
+ else if (tag.equals(WSTrustConstants.VALIDATE_TARGET))
{
subEvent = StaxParserUtil.getNextStartElement(xmlEventReader);
WSTValidateTargetParser wstValidateTargetParser = new WSTValidateTargetParser();
- ValidateTargetType validateTarget = (ValidateTargetType) wstValidateTargetParser.parse( xmlEventReader );
- requestToken.setValidateTarget( validateTarget );
+ ValidateTargetType validateTarget = (ValidateTargetType) wstValidateTargetParser.parse(xmlEventReader);
+ requestToken.setValidateTarget(validateTarget);
EndElement validateTargetEndElement = StaxParserUtil.getNextEndElement(xmlEventReader);
- StaxParserUtil.validate( validateTargetEndElement, WSTrustConstants.VALIDATE_TARGET ) ;
- }
- else if( tag.equals( WSTrustConstants.RENEW_TARGET ))
+ StaxParserUtil.validate(validateTargetEndElement, WSTrustConstants.VALIDATE_TARGET);
+ }
+ else if (tag.equals(WSTrustConstants.RENEW_TARGET))
{
subEvent = StaxParserUtil.getNextStartElement(xmlEventReader);
WSTRenewTargetParser wstValidateTargetParser = new WSTRenewTargetParser();
- RenewTargetType validateTarget = (RenewTargetType) wstValidateTargetParser.parse( xmlEventReader );
- requestToken.setRenewTarget( validateTarget );
+ RenewTargetType validateTarget = (RenewTargetType) wstValidateTargetParser.parse(xmlEventReader);
+ requestToken.setRenewTarget(validateTarget);
EndElement validateTargetEndElement = StaxParserUtil.getNextEndElement(xmlEventReader);
- StaxParserUtil.validate( validateTargetEndElement, WSTrustConstants.RENEW_TARGET ) ;
- }
- else if( tag.equals( WSTrustConstants.ON_BEHALF_OF ))
+ StaxParserUtil.validate(validateTargetEndElement, WSTrustConstants.RENEW_TARGET);
+ }
+ else if (tag.equals(WSTrustConstants.ON_BEHALF_OF))
{
subEvent = StaxParserUtil.getNextStartElement(xmlEventReader);
- WSTrustOnBehalfOfParser wstOnBehalfOfParser = new WSTrustOnBehalfOfParser();
- OnBehalfOfType onBehalfOf = (OnBehalfOfType) wstOnBehalfOfParser.parse(xmlEventReader);
+ WSTrustOnBehalfOfParser wstOnBehalfOfParser = new WSTrustOnBehalfOfParser();
+ OnBehalfOfType onBehalfOf = (OnBehalfOfType) wstOnBehalfOfParser.parse(xmlEventReader);
requestToken.setOnBehalfOf(onBehalfOf);
EndElement onBehalfOfEndElement = StaxParserUtil.getNextEndElement(xmlEventReader);
- StaxParserUtil.validate( onBehalfOfEndElement, WSTrustConstants.ON_BEHALF_OF ) ;
- }
- else if( tag.equals( WSTrustConstants.KEY_TYPE ))
+ StaxParserUtil.validate(onBehalfOfEndElement, WSTrustConstants.ON_BEHALF_OF);
+ }
+ else if (tag.equals(WSTrustConstants.KEY_TYPE))
{
subEvent = StaxParserUtil.getNextStartElement(xmlEventReader);
- if( !StaxParserUtil.hasTextAhead( xmlEventReader ))
- throw new ParsingException( "key type is expected ahead" );
+ if (!StaxParserUtil.hasTextAhead(xmlEventReader))
+ throw new ParsingException("key type is expected ahead");
String keyType = StaxParserUtil.getElementText(xmlEventReader);
try
{
- URI keyTypeURI = new URI( keyType );
- requestToken.setKeyType( keyTypeURI );
+ URI keyTypeURI = new URI(keyType);
+ requestToken.setKeyType(keyTypeURI);
}
- catch( URISyntaxException e )
+ catch (URISyntaxException e)
{
- throw new ParsingException( e );
- }
- }
- else if( tag.equals( WSTrustConstants.KEY_SIZE ))
+ throw new ParsingException(e);
+ }
+ }
+ else if (tag.equals(WSTrustConstants.KEY_SIZE))
{
subEvent = StaxParserUtil.getNextStartElement(xmlEventReader);
- if( !StaxParserUtil.hasTextAhead( xmlEventReader ))
- throw new ParsingException( "key size is expected ahead" );
+ if (!StaxParserUtil.hasTextAhead(xmlEventReader))
+ throw new ParsingException("key size is expected ahead");
String keySize = StaxParserUtil.getElementText(xmlEventReader);
try
- {
- requestToken.setKeySize(Long.parseLong( keySize ));
+ {
+ requestToken.setKeySize(Long.parseLong(keySize));
}
- catch( NumberFormatException e )
+ catch (NumberFormatException e)
{
- throw new ParsingException( e );
- }
- }
- else if( tag.equals( WSTrustConstants.ENTROPY ))
+ throw new ParsingException(e);
+ }
+ }
+ else if (tag.equals(WSTrustConstants.ENTROPY))
{
- subEvent = StaxParserUtil.getNextStartElement(xmlEventReader);
+ subEvent = StaxParserUtil.getNextStartElement(xmlEventReader);
EntropyType entropy = new EntropyType();
subEvent = StaxParserUtil.getNextStartElement(xmlEventReader);
- if( StaxParserUtil.matches(subEvent, WSTrustConstants.BINARY_SECRET ))
+ if (StaxParserUtil.matches(subEvent, WSTrustConstants.BINARY_SECRET))
{
BinarySecretType binarySecret = new BinarySecretType();
- Attribute typeAttribute = subEvent.getAttributeByName( new QName( "", "Type" ));
- binarySecret.setType( StaxParserUtil.getAttributeValue( typeAttribute ));
+ Attribute typeAttribute = subEvent.getAttributeByName(new QName("", "Type"));
+ binarySecret.setType(StaxParserUtil.getAttributeValue(typeAttribute));
- if( !StaxParserUtil.hasTextAhead( xmlEventReader ))
- throw new ParsingException( "binary secret value is expected ahead" );
+ if (!StaxParserUtil.hasTextAhead(xmlEventReader))
+ throw new ParsingException("binary secret value is expected ahead");
- binarySecret.setValue( StaxParserUtil.getElementText(xmlEventReader).getBytes() );
- entropy.getAny().add( binarySecret );
+ binarySecret.setValue(StaxParserUtil.getElementText(xmlEventReader).getBytes());
+ entropy.getAny().add(binarySecret);
}
requestToken.setEntropy(entropy);
EndElement endElement = StaxParserUtil.getNextEndElement(xmlEventReader);
- StaxParserUtil.validate(endElement, WSTrustConstants.ENTROPY );
+ StaxParserUtil.validate(endElement, WSTrustConstants.ENTROPY);
}
- else if( tag.equals( WSTrustConstants.USE_KEY ))
+ else if (tag.equals(WSTrustConstants.ISSUER))
{
- subEvent = StaxParserUtil.getNextStartElement(xmlEventReader);
- UseKeyType useKeyType = new UseKeyType();
- StaxParserUtil.validate( subEvent, WSTrustConstants.USE_KEY ) ;
+ subEvent = StaxParserUtil.getNextStartElement(xmlEventReader);
+ StaxParserUtil.validate(subEvent, WSTrustConstants.ISSUER);
+ //Look for addressing
+ subEvent = StaxParserUtil.getNextStartElement(xmlEventReader);
+ StaxParserUtil.validate(subEvent, WSAddressingConstants.ADDRESS);
+ String addressValue = StaxParserUtil.getElementText(xmlEventReader);
+
+ EndpointReferenceType endpointRef = new EndpointReferenceType();
+ AttributedURIType attrURI = new AttributedURIType();
+ attrURI.setValue(addressValue);
+ endpointRef.setAddress(new AttributedURIType());
+ requestToken.setIssuer(endpointRef);
+
+ EndElement endElement = StaxParserUtil.getNextEndElement(xmlEventReader);
+ StaxParserUtil.validate(endElement, WSTrustConstants.ISSUER);
+ }
+ else if (tag.equals(WSTrustConstants.USE_KEY))
+ {
+ subEvent = StaxParserUtil.getNextStartElement(xmlEventReader);
+ UseKeyType useKeyType = new UseKeyType();
+ StaxParserUtil.validate(subEvent, WSTrustConstants.USE_KEY);
+
//We peek at the next start element as the stax source has to be in the START_ELEMENT mode
- subEvent = StaxParserUtil.peekNextStartElement(xmlEventReader);
- if( StaxParserUtil.matches(subEvent, X509CERTIFICATE ))
+ subEvent = StaxParserUtil.peekNextStartElement(xmlEventReader);
+ if (StaxParserUtil.matches(subEvent, X509CERTIFICATE))
{
Element domElement = StaxParserUtil.getDOMElement(xmlEventReader);
//Element domElement = getX509CertificateAsDomElement( subEvent, xmlEventReader );
- useKeyType.setAny( domElement );
- requestToken.setUseKey( useKeyType );
- }
- else if( StaxParserUtil.matches(subEvent, KEYVALUE ))
+ useKeyType.setAny(domElement);
+ requestToken.setUseKey(useKeyType);
+ }
+ else if (StaxParserUtil.matches(subEvent, KEYVALUE))
{
//Element domElement = getKeyValueAsDomElement( subEvent, xmlEventReader );
Element domElement = StaxParserUtil.getDOMElement(xmlEventReader);//
- useKeyType.setAny( domElement );
- requestToken.setUseKey( useKeyType );
+ useKeyType.setAny(domElement);
+ requestToken.setUseKey(useKeyType);
EndElement endElement = StaxParserUtil.getNextEndElement(xmlEventReader);
- StaxParserUtil.validate(endElement, WSTrustConstants.USE_KEY );
+ StaxParserUtil.validate(endElement, WSTrustConstants.USE_KEY);
}
- else throw new RuntimeException( "unsupported " + StaxParserUtil.getStartElementName( subEvent ));
- }
+ else
+ throw new RuntimeException("unsupported " + StaxParserUtil.getStartElementName(subEvent));
+ }
else
{
QName qname = subEvent.getName();
- ParserNamespaceSupport parser = ParserController.get( qname );
- if( parser == null )
- throw new RuntimeException( "Cannot parse " + qname );
+ ParserNamespaceSupport parser = ParserController.get(qname);
+ if (parser == null)
+ throw new RuntimeException("Cannot parse " + qname);
- Object parsedObject = parser.parse( xmlEventReader );
- if( parsedObject instanceof AppliesTo )
+ Object parsedObject = parser.parse(xmlEventReader);
+ if (parsedObject instanceof AppliesTo)
{
- requestToken.setAppliesTo( (AppliesTo) parsedObject );
+ requestToken.setAppliesTo((AppliesTo) parsedObject);
}
}
- }
+ }
catch (URISyntaxException e)
{
- throw new ParsingException( e );
- }
+ throw new ParsingException(e);
+ }
}
return requestToken;
@@ -298,11 +322,10 @@
* @see {@link ParserNamespaceSupport#supports(QName)}
*/
public boolean supports(QName qname)
- {
+ {
String nsURI = qname.getNamespaceURI();
String localPart = qname.getLocalPart();
- return WSTrustConstants.BASE_NAMESPACE.equals( nsURI )
- && WSTrustConstants.RST.equals( localPart );
- }
+ return WSTrustConstants.BASE_NAMESPACE.equals(nsURI) && WSTrustConstants.RST.equals(localPart);
+ }
}
\ No newline at end of file
Modified: federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/wstrust/writers/WSTrustRequestWriter.java
===================================================================
--- federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/wstrust/writers/WSTrustRequestWriter.java 2011-05-17 04:57:46 UTC (rev 940)
+++ federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/wstrust/writers/WSTrustRequestWriter.java 2011-05-17 04:58:37 UTC (rev 941)
@@ -37,11 +37,13 @@
import org.picketlink.identity.federation.core.exceptions.ProcessingException;
import org.picketlink.identity.federation.core.saml.v2.writers.SAMLAssertionWriter;
import org.picketlink.identity.federation.core.util.StaxUtil;
+import org.picketlink.identity.federation.core.wsa.WSAddressingConstants;
import org.picketlink.identity.federation.core.wstrust.WSTrustConstants;
import org.picketlink.identity.federation.core.wstrust.wrappers.Lifetime;
import org.picketlink.identity.federation.core.wstrust.wrappers.RequestSecurityToken;
-import org.picketlink.identity.federation.core.wstrust.wrappers.RequestSecurityTokenCollection;
+import org.picketlink.identity.federation.core.wstrust.wrappers.RequestSecurityTokenCollection;
import org.picketlink.identity.federation.newmodel.saml.v2.assertion.AssertionType;
+import org.picketlink.identity.federation.ws.addressing.EndpointReferenceType;
import org.picketlink.identity.federation.ws.policy.AppliesTo;
import org.picketlink.identity.federation.ws.trust.BinarySecretType;
import org.picketlink.identity.federation.ws.trust.CancelTargetType;
@@ -62,8 +64,8 @@
*/
public class WSTrustRequestWriter
{
- private XMLStreamWriter writer;
-
+ private final XMLStreamWriter writer;
+
/**
* <p>
* Creates a {@code WSTrustRequestWriter} that writes {@code RequestSecurityToken} instances to the specified
@@ -104,56 +106,68 @@
{
this.writer = writer;
}
-
+
/**
* Write the {@code RequestSecurityTokenCollection} into the {@code OutputStream}
* @param requestTokenCollection
* @param out
* @throws ProcessingException
*/
- public void write( RequestSecurityTokenCollection requestTokenCollection) throws ProcessingException
+ public void write(RequestSecurityTokenCollection requestTokenCollection) throws ProcessingException
{
- StaxUtil.writeStartElement( writer, PREFIX, RST_COLLECTION, BASE_NAMESPACE);
- StaxUtil.writeNameSpace( writer, PREFIX, BASE_NAMESPACE );
-
+ StaxUtil.writeStartElement(writer, PREFIX, RST_COLLECTION, BASE_NAMESPACE);
+ StaxUtil.writeNameSpace(writer, PREFIX, BASE_NAMESPACE);
+
List<RequestSecurityToken> tokenList = requestTokenCollection.getRequestSecurityTokens();
- if( tokenList == null )
- throw new ProcessingException( "RST list is null" );
-
- for( RequestSecurityToken token: tokenList )
+ if (tokenList == null)
+ throw new ProcessingException("RST list is null");
+
+ for (RequestSecurityToken token : tokenList)
{
write(token);
}
- StaxUtil.writeEndElement( writer );
- StaxUtil.flush( writer );
+ StaxUtil.writeEndElement(writer);
+ StaxUtil.flush(writer);
}
-
+
/**
* Write the {@code RequestSecurityToken} into the {@code OutputStream}
* @param requestToken
* @param out
* @throws ProcessingException
*/
- public void write( RequestSecurityToken requestToken ) throws ProcessingException
+ public void write(RequestSecurityToken requestToken) throws ProcessingException
{
- StaxUtil.writeStartElement( writer, PREFIX, RST, BASE_NAMESPACE);
- StaxUtil.writeNameSpace( writer, PREFIX, BASE_NAMESPACE );
+ StaxUtil.writeStartElement(writer, PREFIX, RST, BASE_NAMESPACE);
+ StaxUtil.writeNameSpace(writer, PREFIX, BASE_NAMESPACE);
String context = requestToken.getContext();
- StaxUtil.writeAttribute( writer, RST_CONTEXT, context );
-
+ StaxUtil.writeAttribute(writer, RST_CONTEXT, context);
+
URI requestType = requestToken.getRequestType();
- if( requestType != null )
+ if (requestType != null)
{
- writeRequestType( writer, requestType );
+ writeRequestType(writer, requestType);
}
-
+
URI tokenType = requestToken.getTokenType();
- if( tokenType != null )
+ if (tokenType != null)
{
- writeTokenType( writer, tokenType );
+ writeTokenType(writer, tokenType);
}
-
+
+ //Deal with Issuer
+ EndpointReferenceType endpoint = requestToken.getIssuer();
+ if (endpoint != null)
+ {
+ StaxUtil.writeStartElement(writer, PREFIX, WSTrustConstants.ISSUER, BASE_NAMESPACE);
+ StaxUtil.writeStartElement(writer, WSAddressingConstants.WSA_PREFIX, WSAddressingConstants.ADDRESS,
+ WSAddressingConstants.WSA_NS);
+ StaxUtil.writeCharacters(writer, endpoint.getAddress().getValue());
+ StaxUtil.writeEndElement(writer);
+ StaxUtil.writeEndElement(writer);
+ }
+
// deal with the token lifetime.
if (requestToken.getLifetime() != null)
{
@@ -163,15 +177,15 @@
new WSSecurityWriter(this.writer).writeLifetime(lifetime.getCreated(), lifetime.getExpires());
StaxUtil.writeEndElement(this.writer);
}
-
+
//Deal with AppliesTo
AppliesTo appliesTo = requestToken.getAppliesTo();
- if( appliesTo != null )
+ if (appliesTo != null)
{
WSPolicyWriter wsPolicyWriter = new WSPolicyWriter(this.writer);
- wsPolicyWriter.write( appliesTo );
+ wsPolicyWriter.write(appliesTo);
}
-
+
long keySize = requestToken.getKeySize();
if (keySize != 0)
{
@@ -179,52 +193,52 @@
StaxUtil.writeCharacters(writer, Long.toString(keySize));
StaxUtil.writeEndElement(writer);
}
-
+
URI keyType = requestToken.getKeyType();
- if( keyType != null )
+ if (keyType != null)
{
- StaxUtil.writeStartElement( writer, PREFIX, WSTrustConstants.KEY_TYPE, BASE_NAMESPACE);
- StaxUtil.writeCharacters(writer, keyType.toString() );
- StaxUtil.writeEndElement( writer );
+ StaxUtil.writeStartElement(writer, PREFIX, WSTrustConstants.KEY_TYPE, BASE_NAMESPACE);
+ StaxUtil.writeCharacters(writer, keyType.toString());
+ StaxUtil.writeEndElement(writer);
}
EntropyType entropy = requestToken.getEntropy();
- if( entropy != null )
+ if (entropy != null)
{
- writeEntropyType(entropy);
+ writeEntropyType(entropy);
}
-
+
UseKeyType useKeyType = requestToken.getUseKey();
- if( useKeyType != null )
+ if (useKeyType != null)
{
writeUseKeyType(useKeyType);
}
-
+
OnBehalfOfType onBehalfOf = requestToken.getOnBehalfOf();
- if( onBehalfOf != null )
- {
- writeOnBehalfOfType(onBehalfOf);
+ if (onBehalfOf != null)
+ {
+ writeOnBehalfOfType(onBehalfOf);
}
-
+
ValidateTargetType validateTarget = requestToken.getValidateTarget();
- if( validateTarget != null )
+ if (validateTarget != null)
{
- writeValidateTargetType(validateTarget);
+ writeValidateTargetType(validateTarget);
}
-
+
CancelTargetType cancelTarget = requestToken.getCancelTarget();
- if( cancelTarget != null )
+ if (cancelTarget != null)
{
writeCancelTargetType(cancelTarget);
}
-
+
RenewTargetType renewTarget = requestToken.getRenewTarget();
if (renewTarget != null)
{
writeRenewTargetType(renewTarget);
}
-
- StaxUtil.writeEndElement( writer );
- StaxUtil.flush( writer );
+
+ StaxUtil.writeEndElement(writer);
+ StaxUtil.flush(writer);
}
/**
@@ -234,21 +248,21 @@
*/
private void writeEntropyType(EntropyType entropy) throws ProcessingException
{
- StaxUtil.writeStartElement( writer, PREFIX, WSTrustConstants.ENTROPY, BASE_NAMESPACE);
-
+ StaxUtil.writeStartElement(writer, PREFIX, WSTrustConstants.ENTROPY, BASE_NAMESPACE);
+
List<Object> entropyList = entropy.getAny();
- if( entropyList != null )
+ if (entropyList != null)
{
- for( Object entropyObj: entropyList )
+ for (Object entropyObj : entropyList)
{
- if( entropyObj instanceof BinarySecretType )
+ if (entropyObj instanceof BinarySecretType)
{
BinarySecretType binarySecret = (BinarySecretType) entropyObj;
- writeBinarySecretType( writer, binarySecret );
+ writeBinarySecretType(writer, binarySecret);
}
}
}
- StaxUtil.writeEndElement( writer );
+ StaxUtil.writeEndElement(writer);
}
/**
@@ -258,20 +272,20 @@
*/
private void writeUseKeyType(UseKeyType useKeyType) throws ProcessingException
{
- StaxUtil.writeStartElement( writer, PREFIX, WSTrustConstants.USE_KEY, BASE_NAMESPACE);
+ StaxUtil.writeStartElement(writer, PREFIX, WSTrustConstants.USE_KEY, BASE_NAMESPACE);
Object useKeyTypeValue = useKeyType.getAny();
- if( useKeyTypeValue instanceof Element )
+ if (useKeyTypeValue instanceof Element)
{
Element domElement = (Element) useKeyTypeValue;
- StaxUtil.writeDOMElement( writer, domElement );
+ StaxUtil.writeDOMElement(writer, domElement);
}
else if (useKeyTypeValue instanceof byte[])
{
byte[] certificate = (byte[]) useKeyTypeValue;
- StaxUtil.writeStartElement(writer, WSTrustConstants.XMLDSig.DSIG_PREFIX , WSTrustConstants.XMLDSig.X509CERT,
+ StaxUtil.writeStartElement(writer, WSTrustConstants.XMLDSig.DSIG_PREFIX, WSTrustConstants.XMLDSig.X509CERT,
WSTrustConstants.DSIG_NS);
- StaxUtil.writeNameSpace( writer, WSTrustConstants.XMLDSig.DSIG_PREFIX , WSTrustConstants.DSIG_NS);
+ StaxUtil.writeNameSpace(writer, WSTrustConstants.XMLDSig.DSIG_PREFIX, WSTrustConstants.DSIG_NS);
StaxUtil.writeCharacters(writer, new String(certificate));
StaxUtil.writeEndElement(writer);
}
@@ -280,18 +294,19 @@
writeKeyValueType((KeyValueType) useKeyTypeValue);
}
else
- throw new RuntimeException( " Unknown use key type:" + useKeyTypeValue.getClass().getName() );
-
+ throw new RuntimeException(" Unknown use key type:" + useKeyTypeValue.getClass().getName());
+
StaxUtil.writeEndElement(writer);
}
private void writeKeyValueType(KeyValueType type) throws ProcessingException
{
- StaxUtil.writeStartElement(writer, WSTrustConstants.XMLDSig.DSIG_PREFIX , WSTrustConstants.XMLDSig.KEYVALUE, WSTrustConstants.DSIG_NS);
- StaxUtil.writeNameSpace(writer, WSTrustConstants.XMLDSig.DSIG_PREFIX , WSTrustConstants.DSIG_NS);
+ StaxUtil.writeStartElement(writer, WSTrustConstants.XMLDSig.DSIG_PREFIX, WSTrustConstants.XMLDSig.KEYVALUE,
+ WSTrustConstants.DSIG_NS);
+ StaxUtil.writeNameSpace(writer, WSTrustConstants.XMLDSig.DSIG_PREFIX, WSTrustConstants.DSIG_NS);
if (type.getContent().size() == 0)
throw new ProcessingException("KeyValueType must contain at least one value");
-
+
for (Object obj : type.getContent())
{
if (obj instanceof RSAKeyValueType)
@@ -302,24 +317,25 @@
}
StaxUtil.writeEndElement(writer);
}
-
+
private void writeRSAKeyValueType(RSAKeyValueType type) throws ProcessingException
{
- StaxUtil.writeStartElement(writer, "dsig", WSTrustConstants.XMLDSig.RSA_KEYVALUE , WSTrustConstants.DSIG_NS);
+ StaxUtil.writeStartElement(writer, "dsig", WSTrustConstants.XMLDSig.RSA_KEYVALUE, WSTrustConstants.DSIG_NS);
// write the rsa key modulus.
byte[] modulus = type.getModulus();
- StaxUtil.writeStartElement(writer, "dsig", WSTrustConstants.XMLDSig.MODULUS , WSTrustConstants.DSIG_NS);
+ StaxUtil.writeStartElement(writer, "dsig", WSTrustConstants.XMLDSig.MODULUS, WSTrustConstants.DSIG_NS);
StaxUtil.writeCharacters(writer, new String(modulus));
StaxUtil.writeEndElement(writer);
-
+
// write the rsa key exponent.
byte[] exponent = type.getExponent();
- StaxUtil.writeStartElement(writer, "dsig", WSTrustConstants.XMLDSig.EXPONENT , WSTrustConstants.DSIG_NS);
+ StaxUtil.writeStartElement(writer, "dsig", WSTrustConstants.XMLDSig.EXPONENT, WSTrustConstants.DSIG_NS);
StaxUtil.writeCharacters(writer, new String(exponent));
StaxUtil.writeEndElement(writer);
-
+
StaxUtil.writeEndElement(writer);
}
+
/**
* Write an {@code OnBehalfOfType} to stream
* @param onBehalfOf
@@ -328,11 +344,11 @@
*/
private void writeOnBehalfOfType(OnBehalfOfType onBehalfOf) throws ProcessingException
{
- StaxUtil.writeStartElement( writer, PREFIX, WSTrustConstants.ON_BEHALF_OF, BASE_NAMESPACE);
- UsernameTokenType usernameToken = (UsernameTokenType) onBehalfOf.getAny();
+ StaxUtil.writeStartElement(writer, PREFIX, WSTrustConstants.ON_BEHALF_OF, BASE_NAMESPACE);
+ UsernameTokenType usernameToken = (UsernameTokenType) onBehalfOf.getAny();
WSSecurityWriter wsseWriter = new WSSecurityWriter(this.writer);
- wsseWriter.write( usernameToken );
- StaxUtil.writeEndElement( writer );
+ wsseWriter.write(usernameToken);
+ StaxUtil.writeEndElement(writer);
}
/**
@@ -343,8 +359,8 @@
*/
private void writeValidateTargetType(ValidateTargetType validateTarget) throws ProcessingException
{
- StaxUtil.writeStartElement( writer, PREFIX, WSTrustConstants.VALIDATE_TARGET, BASE_NAMESPACE);
-
+ StaxUtil.writeStartElement(writer, PREFIX, WSTrustConstants.VALIDATE_TARGET, BASE_NAMESPACE);
+
Object validateTargetObj = validateTarget.getAny();
if (validateTargetObj != null)
{
@@ -361,13 +377,13 @@
else
throw new ProcessingException("Unknown validate target type=" + validateTargetObj.getClass().getName());
}
- StaxUtil.writeEndElement( writer );
+ StaxUtil.writeEndElement(writer);
}
private void writeRenewTargetType(RenewTargetType renewTarget) throws ProcessingException
{
- StaxUtil.writeStartElement( writer, PREFIX, WSTrustConstants.RENEW_TARGET, BASE_NAMESPACE);
-
+ StaxUtil.writeStartElement(writer, PREFIX, WSTrustConstants.RENEW_TARGET, BASE_NAMESPACE);
+
Object renewTargetObj = renewTarget.getAny();
if (renewTargetObj != null)
{
@@ -384,7 +400,7 @@
else
throw new ProcessingException("Unknown renew target type=" + renewTargetObj.getClass().getName());
}
- StaxUtil.writeEndElement( writer );
+ StaxUtil.writeEndElement(writer);
}
/**
@@ -395,8 +411,8 @@
*/
private void writeCancelTargetType(CancelTargetType cancelTarget) throws ProcessingException
{
- StaxUtil.writeStartElement( writer, PREFIX, WSTrustConstants.CANCEL_TARGET, BASE_NAMESPACE);
-
+ StaxUtil.writeStartElement(writer, PREFIX, WSTrustConstants.CANCEL_TARGET, BASE_NAMESPACE);
+
Object cancelTargetObj = cancelTarget.getAny();
if (cancelTargetObj != null)
{
@@ -412,48 +428,48 @@
}
else
throw new ProcessingException("Unknown cancel target type=" + cancelTargetObj.getClass().getName());
- }
- StaxUtil.writeEndElement( writer );
+ }
+ StaxUtil.writeEndElement(writer);
}
-
+
/**
* Write a {@code BinarySecretType} to stream
* @param writer
* @param binarySecret
* @throws ProcessingException
*/
- private void writeBinarySecretType( XMLStreamWriter writer, BinarySecretType binarySecret ) throws ProcessingException
+ private void writeBinarySecretType(XMLStreamWriter writer, BinarySecretType binarySecret) throws ProcessingException
{
- StaxUtil.writeStartElement( writer, PREFIX, WSTrustConstants.BINARY_SECRET, BASE_NAMESPACE );
- String type = binarySecret.getType();
- StaxUtil.writeAttribute(writer, WSTrustConstants.TYPE, type );
- StaxUtil.writeCharacters(writer, new String( binarySecret.getValue() ) );
- StaxUtil.writeEndElement(writer);
+ StaxUtil.writeStartElement(writer, PREFIX, WSTrustConstants.BINARY_SECRET, BASE_NAMESPACE);
+ String type = binarySecret.getType();
+ StaxUtil.writeAttribute(writer, WSTrustConstants.TYPE, type);
+ StaxUtil.writeCharacters(writer, new String(binarySecret.getValue()));
+ StaxUtil.writeEndElement(writer);
}
-
+
/**
* Write a Request Type
* @param writer
* @param uri
* @throws ProcessingException
*/
- private void writeRequestType( XMLStreamWriter writer , URI uri ) throws ProcessingException
+ private void writeRequestType(XMLStreamWriter writer, URI uri) throws ProcessingException
{
- StaxUtil.writeStartElement( writer, PREFIX, WSTrustConstants.REQUEST_TYPE, BASE_NAMESPACE );
- StaxUtil.writeCharacters(writer, uri.toASCIIString() );
+ StaxUtil.writeStartElement(writer, PREFIX, WSTrustConstants.REQUEST_TYPE, BASE_NAMESPACE);
+ StaxUtil.writeCharacters(writer, uri.toASCIIString());
StaxUtil.writeEndElement(writer);
}
-
+
/**
* Write Token Type
* @param writer
* @param uri
* @throws ProcessingException
*/
- private void writeTokenType( XMLStreamWriter writer , URI uri ) throws ProcessingException
+ private void writeTokenType(XMLStreamWriter writer, URI uri) throws ProcessingException
{
- StaxUtil.writeStartElement( writer, PREFIX, WSTrustConstants.TOKEN_TYPE, BASE_NAMESPACE );
- StaxUtil.writeCharacters(writer, uri.toASCIIString() );
+ StaxUtil.writeStartElement(writer, PREFIX, WSTrustConstants.TOKEN_TYPE, BASE_NAMESPACE);
+ StaxUtil.writeCharacters(writer, uri.toASCIIString());
StaxUtil.writeEndElement(writer);
}
}
\ No newline at end of file
13 years, 7 months