Seam SVN: r12756 - modules/jms/trunk.
by seam-commits@lists.jboss.org
Author: pete.muir(a)jboss.org
Date: 2010-05-19 14:18:17 -0400 (Wed, 19 May 2010)
New Revision: 12756
Modified:
modules/jms/trunk/pom.xml
Log:
Use -Drelease to trigger docs and distribution build
Modified: modules/jms/trunk/pom.xml
===================================================================
--- modules/jms/trunk/pom.xml 2010-05-19 01:13:39 UTC (rev 12755)
+++ modules/jms/trunk/pom.xml 2010-05-19 18:18:17 UTC (rev 12756)
@@ -37,12 +37,27 @@
<!-- Only build the distribution if requested explicitly -->
<profiles>
<profile>
- <id>distribution</id>
+ <id>dist</id>
+ <activation>
+ <property>
+ <name>release</name>
+ </property>
+ </activation>
<modules>
- <module>docs/reference</module>
<module>dist</module>
</modules>
</profile>
+ <profile>
+ <id>docs</id>
+ <activation>
+ <property>
+ <name>release</name>
+ </property>
+ </activation>
+ <modules>
+ <module>docs/reference</module>
+ </modules>
+ </profile>
<profile>
<id>code-coverage</id>
<build>
14 years
Seam SVN: r12755 - modules/security/trunk/impl/src/main/java/org/jboss/seam/security/jaas.
by seam-commits@lists.jboss.org
Author: shane.bryzak(a)jboss.com
Date: 2010-05-18 21:13:39 -0400 (Tue, 18 May 2010)
New Revision: 12755
Modified:
modules/security/trunk/impl/src/main/java/org/jboss/seam/security/jaas/SeamLoginModule.java
Log:
roles no longer passed through the subject
Modified: modules/security/trunk/impl/src/main/java/org/jboss/seam/security/jaas/SeamLoginModule.java
===================================================================
--- modules/security/trunk/impl/src/main/java/org/jboss/seam/security/jaas/SeamLoginModule.java 2010-05-19 00:55:10 UTC (rev 12754)
+++ modules/security/trunk/impl/src/main/java/org/jboss/seam/security/jaas/SeamLoginModule.java 2010-05-19 01:13:39 UTC (rev 12755)
@@ -50,25 +50,6 @@
public boolean commit() throws LoginException
{
subject.getPrincipals().add(new SimplePrincipal(username));
-
- Group roleGroup = null;
-
- for ( Group g : subject.getPrincipals(Group.class) )
- {
- if ( ROLES_GROUP.equalsIgnoreCase( g.getName() ) )
- {
- roleGroup = g;
- break;
- }
- }
-
- for (String role : roles)
- {
- roleGroup.addMember(new SimplePrincipal(role));
- }
-
- subject.getPrincipals().add(roleGroup);
-
return true;
}
14 years
Seam SVN: r12754 - in modules/security/trunk: impl/src/main/java/org/jboss/seam/security and 1 other directory.
by seam-commits@lists.jboss.org
Author: shane.bryzak(a)jboss.com
Date: 2010-05-18 20:55:10 -0400 (Tue, 18 May 2010)
New Revision: 12754
Modified:
modules/security/trunk/api/src/main/java/org/jboss/seam/security/Identity.java
modules/security/trunk/impl/src/main/java/org/jboss/seam/security/IdentityImpl.java
Log:
added identity group operations
Modified: modules/security/trunk/api/src/main/java/org/jboss/seam/security/Identity.java
===================================================================
--- modules/security/trunk/api/src/main/java/org/jboss/seam/security/Identity.java 2010-05-18 20:51:05 UTC (rev 12753)
+++ modules/security/trunk/api/src/main/java/org/jboss/seam/security/Identity.java 2010-05-19 00:55:10 UTC (rev 12754)
@@ -97,6 +97,33 @@
*/
boolean addRole(String role, String group, String groupType);
+ /**
+ * Checks if the authenticated user is a member of the specified group
+ *
+ * @param name The name of the group
+ * @param groupType The type of the group, e.g. "office", "department", "global role", etc
+ * @return true if the user is a member of the group
+ */
+ boolean inGroup(String name, String groupType);
+
+ /**
+ * Adds the user to the specified group. See hasRole() for semantics in
+ * relationship to the authenticated status of the user.
+ *
+ * @param name The name of the group
+ * @param groupType The type of the group
+ * @return true if the group was successfully added
+ */
+ boolean addGroup(String name, String groupType);
+
+ /**
+ * Removes the currently authenticated user from the specified group
+ *
+ * @param name The name of the group
+ * @param groupType The type of the group
+ */
+ void removeGroup(String name, String groupType);
+
/**
* Removes a role from the authenticated user
*
Modified: modules/security/trunk/impl/src/main/java/org/jboss/seam/security/IdentityImpl.java
===================================================================
--- modules/security/trunk/impl/src/main/java/org/jboss/seam/security/IdentityImpl.java 2010-05-18 20:51:05 UTC (rev 12753)
+++ modules/security/trunk/impl/src/main/java/org/jboss/seam/security/IdentityImpl.java 2010-05-19 00:55:10 UTC (rev 12754)
@@ -60,10 +60,10 @@
public static final String ROLES_GROUP = "Roles";
- Logger log = LoggerFactory.getLogger(Identity.class);
+ Logger log = LoggerFactory.getLogger(IdentityImpl.class);
@Inject private BeanManager manager;
- @Inject private CredentialsImpl credentials;
+ @Inject private Credentials credentials;
@Inject private PermissionMapper permissionMapper;
@Inject private IdentityManager identityManager;
@@ -74,12 +74,30 @@
private Subject subject;
private String jaasConfigName = null;
- // Contains a group name to group type:role list mapping of roles assigned during the authentication process
+ /**
+ * Contains a group name to group type:role list mapping of roles assigned
+ * during the authentication process
+ */
private Map<String,Map<String,List<String>>> preAuthenticationRoles = new HashMap<String,Map<String,List<String>>>();
- // Contains a group name to group type:role list mapping of roles granted after the authentication process has completed
+ /**
+ * Contains a group name to group type:role list mapping of roles granted
+ * after the authentication process has completed
+ */
private Map<String,Map<String,List<String>>> activeRoles = new HashMap<String,Map<String,List<String>>>();
+ /**
+ * Map of group name:group type group memberships assigned during the
+ * authentication process
+ */
+ private Map<String,List<String>> preAuthenticationGroups = new HashMap<String,List<String>>();
+
+ /**
+ * Map of group name:group type group memberships granted after the
+ * authentication process has completed
+ */
+ private Map<String,List<String>> activeGroups = new HashMap<String,List<String>>();
+
private transient ThreadLocal<Boolean> systemOp;
/**
@@ -295,8 +313,8 @@
}
finally
{
- // Set password to null whether authentication is successful or not
- credentials.setPassword(null);
+ // Set credential to null whether authentication is successful or not
+ credentials.setCredential(null);
authenticating = false;
}
}
@@ -332,23 +350,35 @@
}
}
- if (!preAuthenticationRoles.isEmpty() && isLoggedIn())
+ if (isLoggedIn())
{
- for (String group : preAuthenticationRoles.keySet())
+ if (!preAuthenticationRoles.isEmpty())
{
- Map<String,List<String>> groupTypeRoles = preAuthenticationRoles.get(group);
- for (String groupType : groupTypeRoles.keySet())
+ for (String group : preAuthenticationRoles.keySet())
{
- for (String roleType : groupTypeRoles.get(groupType))
+ Map<String,List<String>> groupTypeRoles = preAuthenticationRoles.get(group);
+ for (String groupType : groupTypeRoles.keySet())
{
- addRole(roleType, group, groupType);
+ for (String roleType : groupTypeRoles.get(groupType))
+ {
+ addRole(roleType, group, groupType);
+ }
}
}
+ preAuthenticationRoles.clear();
}
- preAuthenticationRoles.clear();
+
+ if (!preAuthenticationGroups.isEmpty())
+ {
+ for (String group : preAuthenticationGroups.keySet())
+ {
+ activeGroups.put(group, preAuthenticationGroups.get(group));
+ }
+ preAuthenticationGroups.clear();
+ }
}
- credentials.setPassword(null);
+ credentials.setCredential(null);
manager.fireEvent(new PostAuthenticateEvent());
}
@@ -420,8 +450,12 @@
}
else if (callbacks[i] instanceof PasswordCallback)
{
- ( (PasswordCallback) callbacks[i] ).setPassword( credentials.getPassword() != null ?
- credentials.getPassword().toCharArray() : null );
+ if (credentials.getCredential() instanceof PasswordCredential)
+ {
+ PasswordCredential credential = (PasswordCredential) credentials.getCredential();
+ ( (PasswordCallback) callbacks[i] ).setPassword( credential.getPassword() != null ?
+ credential.getPassword().toCharArray() : null );
+ }
}
else if (callbacks[i] instanceof IdentityCallback)
{
@@ -501,6 +535,42 @@
return roleTypes.add(roleType);
}
+
+ public boolean inGroup(String name, String groupType)
+ {
+ return activeGroups.containsKey(name) && activeGroups.get(name).contains(groupType);
+ }
+
+ public boolean addGroup(String name, String groupType)
+ {
+ if (name == null || "".equals(name) || groupType == null || "".equals(groupType))
+ {
+ return false;
+ }
+
+ Map<String,List<String>> groupMap = isLoggedIn() ? activeGroups : preAuthenticationGroups;
+
+ List<String> groupTypes = null;
+ if (groupMap.containsKey(name))
+ {
+ groupTypes = groupMap.get(name);
+ }
+ else
+ {
+ groupTypes = new ArrayList<String>();
+ groupMap.put(name, groupTypes);
+ }
+
+ return groupTypes.add(groupType);
+ }
+
+ public void removeGroup(String name, String groupType)
+ {
+ if (activeGroups.containsKey(name))
+ {
+ activeGroups.get(name).remove(groupType);
+ }
+ }
/**
* Removes a role from the authenticated user
14 years
Seam SVN: r12753 - modules/international/trunk.
by seam-commits@lists.jboss.org
Author: kenfinni
Date: 2010-05-18 16:51:05 -0400 (Tue, 18 May 2010)
New Revision: 12753
Modified:
modules/international/trunk/pom.xml
Log:
Added common-lang dependancy, changed xml module scope to test
Modified: modules/international/trunk/pom.xml
===================================================================
--- modules/international/trunk/pom.xml 2010-05-18 18:20:45 UTC (rev 12752)
+++ modules/international/trunk/pom.xml 2010-05-18 20:51:05 UTC (rev 12753)
@@ -1,223 +1,230 @@
<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>
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>org.jboss.weld</groupId>
- <artifactId>weld-parent</artifactId>
- <version>9</version>
- </parent>
+ <parent>
+ <groupId>org.jboss.weld</groupId>
+ <artifactId>weld-parent</artifactId>
+ <version>9</version>
+ </parent>
- <artifactId>seam-international-parent</artifactId>
- <groupId>org.jboss.seam.international</groupId>
- <version>3.0.0-SNAPSHOT</version>
+ <artifactId>seam-international-parent</artifactId>
+ <groupId>org.jboss.seam.international</groupId>
+ <version>3.0.0-SNAPSHOT</version>
- <packaging>pom</packaging>
- <name>Seam International Module Parent POM</name>
+ <packaging>pom</packaging>
+ <name>Seam International Module Parent POM</name>
- <description>The Parent for Seam International Module</description>
- <url>http://www.seamframework.org</url>
+ <description>The Parent for Seam International Module</description>
+ <url>http://www.seamframework.org</url>
- <modules>
- <module>api</module>
- <module>impl</module>
- <!--module>docs</module-->
- <!--module>examples/??</module-->
- </modules>
+ <modules>
+ <module>api</module>
+ <module>impl</module>
+ <!--module>docs</module-->
+ <!--module>examples/??</module-->
+ </modules>
- <properties>
- <arquillian.version>1.0.0-SNAPSHOT</arquillian.version>
- <seam.xml.version>3.0.0-SNAPSHOT</seam.xml.version>
- <weld.extensions.version>1.0.0.Alpha1</weld.extensions.version>
- <weld.api.version>1.0-SP1</weld.api.version>
- <junit.version>4.8.1</junit.version>
- <joda-time.version>1.6</joda-time.version>
- <pretty-time.version>1.0.6</pretty-time.version>
- <emma.maven.plugin.version>1.0-alpha-2</emma.maven.plugin.version>
- <emma4it.maven.plugin.version>1.3</emma4it.maven.plugin.version>
- <slf4j.version>1.5.10</slf4j.version>
- </properties>
+ <properties>
+ <arquillian.version>1.0.0-SNAPSHOT</arquillian.version>
+ <seam.xml.version>3.0.0-SNAPSHOT</seam.xml.version>
+ <weld.extensions.version>1.0.0.Alpha1</weld.extensions.version>
+ <weld.api.version>1.0-SP1</weld.api.version>
+ <junit.version>4.8.1</junit.version>
+ <slf4j.version>1.5.10</slf4j.version>
+ <joda-time.version>1.6</joda-time.version>
+ <pretty-time.version>1.0.6</pretty-time.version>
+ <commons-lang.version>2.5</commons-lang.version>
+ <emma.maven.plugin.version>1.0-alpha-2</emma.maven.plugin.version>
+ <emma4it.maven.plugin.version>1.3</emma4it.maven.plugin.version>
+ </properties>
- <dependencyManagement>
- <dependencies>
- <dependency>
- <groupId>org.jboss.weld</groupId>
- <artifactId>weld-api-bom</artifactId>
- <version>${weld.api.version}</version>
- <scope>import</scope>
- <type>pom</type>
- </dependency>
- </dependencies>
- </dependencyManagement>
+ <dependencyManagement>
+ <dependencies>
+ <dependency>
+ <groupId>org.jboss.weld</groupId>
+ <artifactId>weld-api-bom</artifactId>
+ <version>${weld.api.version}</version>
+ <scope>import</scope>
+ <type>pom</type>
+ </dependency>
+ </dependencies>
+ </dependencyManagement>
- <dependencies>
+ <dependencies>
- <!-- Environment Dependencies -->
- <dependency>
- <groupId>javax.el</groupId>
- <artifactId>el-api</artifactId>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>javax.enterprise</groupId>
- <artifactId>cdi-api</artifactId>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>org.jboss.weld</groupId>
- <artifactId>weld-extensions</artifactId>
- <version>${weld.extensions.version}</version>
- </dependency>
- <dependency>
- <groupId>joda-time</groupId>
- <artifactId>joda-time</artifactId>
- <version>${joda-time.version}</version>
- </dependency>
- <dependency>
- <groupId>com.ocpsoft</groupId>
- <artifactId>ocpsoft-pretty-time</artifactId>
- <version>${pretty-time.version}</version>
- </dependency>
- <dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-api</artifactId>
- <version>${slf4j.version}</version>
- <scope>provided</scope>
- </dependency>
+ <!-- Environment Dependencies -->
+ <dependency>
+ <groupId>javax.el</groupId>
+ <artifactId>el-api</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>javax.enterprise</groupId>
+ <artifactId>cdi-api</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.weld</groupId>
+ <artifactId>weld-extensions</artifactId>
+ <version>${weld.extensions.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-api</artifactId>
+ <version>${slf4j.version}</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>joda-time</groupId>
+ <artifactId>joda-time</artifactId>
+ <version>${joda-time.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>com.ocpsoft</groupId>
+ <artifactId>ocpsoft-pretty-time</artifactId>
+ <version>${pretty-time.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>commons-lang</groupId>
+ <artifactId>commons-lang</artifactId>
+ <version>${commons-lang.version}</version>
+ </dependency>
- <!-- Test Dependencies -->
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <version>${junit.version}</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.jboss.arquillian</groupId>
- <artifactId>arquillian-junit</artifactId>
- <version>${arquillian.version}</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.jboss.arquillian.container</groupId>
- <artifactId>arquillian-weld-embedded</artifactId>
- <version>${arquillian.version}</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.jboss.seam.xml</groupId>
- <artifactId>seam-xml-bean-config</artifactId>
- <version>${seam.xml.version}</version>
- </dependency>
- </dependencies>
+ <!-- Test Dependencies -->
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>${junit.version}</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.arquillian</groupId>
+ <artifactId>arquillian-junit</artifactId>
+ <version>${arquillian.version}</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.arquillian.container</groupId>
+ <artifactId>arquillian-weld-embedded</artifactId>
+ <version>${arquillian.version}</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.seam.xml</groupId>
+ <artifactId>seam-xml-bean-config</artifactId>
+ <version>${seam.xml.version}</version>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
- <developers>
- <developer>
- <name>Lincoln Baxter, III</name>
- <email>lincolnbaxter(a)gmail.com</email>
- <url>http://ocpsoft.com</url>
- <organization>JBoss, by Red Hat</organization>
- <organizationUrl>http://jboss.org</organizationUrl>
- <timezone>EST</timezone>
- <roles>
- <role>Project Lead</role>
- </roles>
- </developer>
- <developer>
- <name>Ken Finnigan</name>
- <timezone>GMT</timezone>
- <roles>
- <role>Project Lead</role>
- </roles>
- </developer>
- </developers>
+ <developers>
+ <developer>
+ <name>Lincoln Baxter, III</name>
+ <email>lincolnbaxter(a)gmail.com</email>
+ <url>http://ocpsoft.com</url>
+ <organization>JBoss, by Red Hat</organization>
+ <organizationUrl>http://jboss.org</organizationUrl>
+ <timezone>EST</timezone>
+ <roles>
+ <role>Project Lead</role>
+ </roles>
+ </developer>
+ <developer>
+ <name>Ken Finnigan</name>
+ <timezone>GMT</timezone>
+ <roles>
+ <role>Project Lead</role>
+ </roles>
+ </developer>
+ </developers>
- <scm>
- <connection>scm:svn:http://anonsvn.jboss.org/repos/seam/modules/international/trunk</connection>
- <developerConnection>scm:svn:https://svn.jboss.org/repos/seam/modules/international/trunk</developerConnection>
- <url>http://fisheye.jboss.org/browse/Seam/modules/international/trunk</url>
- </scm>
+ <scm>
+ <connection>scm:svn:http://anonsvn.jboss.org/repos/seam/modules/international/trunk</connection>
+ <developerConnection>scm:svn:https://svn.jboss.org/repos/seam/modules/international/trunk</developerConnection>
+ <url>http://fisheye.jboss.org/browse/Seam/modules/international/trunk</url>
+ </scm>
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-compiler-plugin</artifactId>
- <version>2.0.2</version>
- <configuration>
- <source>1.5</source>
- <target>1.5</target>
- </configuration>
- </plugin>
- </plugins>
- </build>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <version>2.0.2</version>
+ <configuration>
+ <source>1.5</source>
+ <target>1.5</target>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
- <profiles>
- <profile>
- <id>code-coverage</id>
- <build>
- <pluginManagement>
- <plugins>
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>emma-maven-plugin</artifactId>
- <version>${emma.maven.plugin.version}</version>
- <inherited>true</inherited>
- <executions>
- <execution>
- <id>instrumentation</id>
- <phase>process-classes</phase>
- <goals>
- <goal>instrument</goal>
- </goals>
- <configuration>
- <verbose>true</verbose>
- </configuration>
- </execution>
- <execution>
- <id>cleaning</id>
- <phase>clean</phase>
- <goals>
- <goal>clean</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
+ <profiles>
+ <profile>
+ <id>code-coverage</id>
+ <build>
+ <pluginManagement>
+ <plugins>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>emma-maven-plugin</artifactId>
+ <version>${emma.maven.plugin.version}</version>
+ <inherited>true</inherited>
+ <executions>
+ <execution>
+ <id>instrumentation</id>
+ <phase>process-classes</phase>
+ <goals>
+ <goal>instrument</goal>
+ </goals>
+ <configuration>
+ <verbose>true</verbose>
+ </configuration>
+ </execution>
+ <execution>
+ <id>cleaning</id>
+ <phase>clean</phase>
+ <goals>
+ <goal>clean</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-surefire-plugin</artifactId>
- <inherited>true</inherited>
- <configuration>
- <forkMode>once</forkMode>
- <classesDirectory>${project.build.directory}/generated-classes/emma/classes</classesDirectory>
- </configuration>
- </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <inherited>true</inherited>
+ <configuration>
+ <forkMode>once</forkMode>
+ <classesDirectory>${project.build.directory}/generated-classes/emma/classes</classesDirectory>
+ </configuration>
+ </plugin>
- <plugin>
- <groupId>org.sonatype.maven.plugin</groupId>
- <artifactId>emma4it-maven-plugin</artifactId>
- <version>${emma4it.maven.plugin.version}</version>
- <executions>
- <execution>
- <id>report</id>
- <phase>test</phase>
- <goals>
- <goal>report</goal>
- </goals>
- <configuration>
- <sourceSets>
- <sourceSet>
- <directory>${project.build.sourceDirectory}</directory>
- </sourceSet>
- </sourceSets>
- </configuration>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </pluginManagement>
- </build>
- </profile>
- </profiles>
+ <plugin>
+ <groupId>org.sonatype.maven.plugin</groupId>
+ <artifactId>emma4it-maven-plugin</artifactId>
+ <version>${emma4it.maven.plugin.version}</version>
+ <executions>
+ <execution>
+ <id>report</id>
+ <phase>test</phase>
+ <goals>
+ <goal>report</goal>
+ </goals>
+ <configuration>
+ <sourceSets>
+ <sourceSet>
+ <directory>${project.build.sourceDirectory}</directory>
+ </sourceSet>
+ </sourceSets>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </pluginManagement>
+ </build>
+ </profile>
+ </profiles>
</project>
14 years
Seam SVN: r12752 - in modules: international/trunk and 1 other directories.
by seam-commits@lists.jboss.org
Author: lincolnthree
Date: 2010-05-18 14:20:45 -0400 (Tue, 18 May 2010)
New Revision: 12752
Modified:
modules/faces/trunk/pom.xml
modules/international/trunk/pom.xml
modules/servlet/trunk/pom.xml
Log:
Removed too much. Re-added SLF4J-api provided scope dependency.
Modified: modules/faces/trunk/pom.xml
===================================================================
--- modules/faces/trunk/pom.xml 2010-05-18 17:41:18 UTC (rev 12751)
+++ modules/faces/trunk/pom.xml 2010-05-18 18:20:45 UTC (rev 12752)
@@ -38,6 +38,7 @@
<junit.version>4.8.1</junit.version>
<emma.maven.plugin.version>1.0-alpha-2</emma.maven.plugin.version>
<emma4it.maven.plugin.version>1.3</emma4it.maven.plugin.version>
+ <slf4j.version>1.5.10</slf4j.version>
</properties>
<dependencyManagement>
@@ -82,6 +83,12 @@
<artifactId>weld-extensions</artifactId>
<version>${weldx.version}</version>
</dependency>
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-api</artifactId>
+ <version>${slf4j.version}</version>
+ <scope>provided</scope>
+ </dependency>
<!-- Test Dependencies -->
<dependency>
Modified: modules/international/trunk/pom.xml
===================================================================
--- modules/international/trunk/pom.xml 2010-05-18 17:41:18 UTC (rev 12751)
+++ modules/international/trunk/pom.xml 2010-05-18 18:20:45 UTC (rev 12752)
@@ -1,216 +1,223 @@
<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>
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>org.jboss.weld</groupId>
- <artifactId>weld-parent</artifactId>
- <version>9</version>
- </parent>
+ <parent>
+ <groupId>org.jboss.weld</groupId>
+ <artifactId>weld-parent</artifactId>
+ <version>9</version>
+ </parent>
- <artifactId>seam-international-parent</artifactId>
- <groupId>org.jboss.seam.international</groupId>
- <version>3.0.0-SNAPSHOT</version>
+ <artifactId>seam-international-parent</artifactId>
+ <groupId>org.jboss.seam.international</groupId>
+ <version>3.0.0-SNAPSHOT</version>
- <packaging>pom</packaging>
- <name>Seam International Module Parent POM</name>
+ <packaging>pom</packaging>
+ <name>Seam International Module Parent POM</name>
- <description>The Parent for Seam International Module</description>
- <url>http://www.seamframework.org</url>
+ <description>The Parent for Seam International Module</description>
+ <url>http://www.seamframework.org</url>
- <modules>
- <module>api</module>
- <module>impl</module>
- <!--module>docs</module-->
- <!--module>examples/??</module-->
- </modules>
+ <modules>
+ <module>api</module>
+ <module>impl</module>
+ <!--module>docs</module-->
+ <!--module>examples/??</module-->
+ </modules>
- <properties>
- <arquillian.version>1.0.0-SNAPSHOT</arquillian.version>
- <seam.xml.version>3.0.0-SNAPSHOT</seam.xml.version>
- <weld.extensions.version>1.0.0.Alpha1</weld.extensions.version>
- <weld.api.version>1.0-SP1</weld.api.version>
- <junit.version>4.8.1</junit.version>
- <joda-time.version>1.6</joda-time.version>
- <pretty-time.version>1.0.6</pretty-time.version>
- <emma.maven.plugin.version>1.0-alpha-2</emma.maven.plugin.version>
- <emma4it.maven.plugin.version>1.3</emma4it.maven.plugin.version>
- </properties>
+ <properties>
+ <arquillian.version>1.0.0-SNAPSHOT</arquillian.version>
+ <seam.xml.version>3.0.0-SNAPSHOT</seam.xml.version>
+ <weld.extensions.version>1.0.0.Alpha1</weld.extensions.version>
+ <weld.api.version>1.0-SP1</weld.api.version>
+ <junit.version>4.8.1</junit.version>
+ <joda-time.version>1.6</joda-time.version>
+ <pretty-time.version>1.0.6</pretty-time.version>
+ <emma.maven.plugin.version>1.0-alpha-2</emma.maven.plugin.version>
+ <emma4it.maven.plugin.version>1.3</emma4it.maven.plugin.version>
+ <slf4j.version>1.5.10</slf4j.version>
+ </properties>
- <dependencyManagement>
- <dependencies>
- <dependency>
- <groupId>org.jboss.weld</groupId>
- <artifactId>weld-api-bom</artifactId>
- <version>${weld.api.version}</version>
- <scope>import</scope>
- <type>pom</type>
- </dependency>
- </dependencies>
- </dependencyManagement>
+ <dependencyManagement>
+ <dependencies>
+ <dependency>
+ <groupId>org.jboss.weld</groupId>
+ <artifactId>weld-api-bom</artifactId>
+ <version>${weld.api.version}</version>
+ <scope>import</scope>
+ <type>pom</type>
+ </dependency>
+ </dependencies>
+ </dependencyManagement>
- <dependencies>
+ <dependencies>
- <!-- Environment Dependencies -->
- <dependency>
- <groupId>javax.el</groupId>
- <artifactId>el-api</artifactId>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>javax.enterprise</groupId>
- <artifactId>cdi-api</artifactId>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>org.jboss.weld</groupId>
- <artifactId>weld-extensions</artifactId>
- <version>${weld.extensions.version}</version>
- </dependency>
- <dependency>
- <groupId>joda-time</groupId>
- <artifactId>joda-time</artifactId>
- <version>${joda-time.version}</version>
- </dependency>
- <dependency>
- <groupId>com.ocpsoft</groupId>
- <artifactId>ocpsoft-pretty-time</artifactId>
- <version>${pretty-time.version}</version>
- </dependency>
+ <!-- Environment Dependencies -->
+ <dependency>
+ <groupId>javax.el</groupId>
+ <artifactId>el-api</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>javax.enterprise</groupId>
+ <artifactId>cdi-api</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.weld</groupId>
+ <artifactId>weld-extensions</artifactId>
+ <version>${weld.extensions.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>joda-time</groupId>
+ <artifactId>joda-time</artifactId>
+ <version>${joda-time.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>com.ocpsoft</groupId>
+ <artifactId>ocpsoft-pretty-time</artifactId>
+ <version>${pretty-time.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-api</artifactId>
+ <version>${slf4j.version}</version>
+ <scope>provided</scope>
+ </dependency>
- <!-- Test Dependencies -->
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <version>${junit.version}</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.jboss.arquillian</groupId>
- <artifactId>arquillian-junit</artifactId>
- <version>${arquillian.version}</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.jboss.arquillian.container</groupId>
- <artifactId>arquillian-weld-embedded</artifactId>
- <version>${arquillian.version}</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.jboss.seam.xml</groupId>
- <artifactId>seam-xml-bean-config</artifactId>
- <version>${seam.xml.version}</version>
- </dependency>
- </dependencies>
+ <!-- Test Dependencies -->
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>${junit.version}</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.arquillian</groupId>
+ <artifactId>arquillian-junit</artifactId>
+ <version>${arquillian.version}</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.arquillian.container</groupId>
+ <artifactId>arquillian-weld-embedded</artifactId>
+ <version>${arquillian.version}</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.seam.xml</groupId>
+ <artifactId>seam-xml-bean-config</artifactId>
+ <version>${seam.xml.version}</version>
+ </dependency>
+ </dependencies>
- <developers>
- <developer>
- <name>Lincoln Baxter, III</name>
- <email>lincolnbaxter(a)gmail.com</email>
- <url>http://ocpsoft.com</url>
- <organization>JBoss, by Red Hat</organization>
- <organizationUrl>http://jboss.org</organizationUrl>
- <timezone>EST</timezone>
- <roles>
- <role>Project Lead</role>
- </roles>
- </developer>
- <developer>
- <name>Ken Finnigan</name>
- <timezone>GMT</timezone>
- <roles>
- <role>Project Lead</role>
- </roles>
- </developer>
- </developers>
+ <developers>
+ <developer>
+ <name>Lincoln Baxter, III</name>
+ <email>lincolnbaxter(a)gmail.com</email>
+ <url>http://ocpsoft.com</url>
+ <organization>JBoss, by Red Hat</organization>
+ <organizationUrl>http://jboss.org</organizationUrl>
+ <timezone>EST</timezone>
+ <roles>
+ <role>Project Lead</role>
+ </roles>
+ </developer>
+ <developer>
+ <name>Ken Finnigan</name>
+ <timezone>GMT</timezone>
+ <roles>
+ <role>Project Lead</role>
+ </roles>
+ </developer>
+ </developers>
- <scm>
- <connection>scm:svn:http://anonsvn.jboss.org/repos/seam/modules/international/trunk</connection>
- <developerConnection>scm:svn:https://svn.jboss.org/repos/seam/modules/international/trunk</developerConnection>
- <url>http://fisheye.jboss.org/browse/Seam/modules/international/trunk</url>
- </scm>
+ <scm>
+ <connection>scm:svn:http://anonsvn.jboss.org/repos/seam/modules/international/trunk</connection>
+ <developerConnection>scm:svn:https://svn.jboss.org/repos/seam/modules/international/trunk</developerConnection>
+ <url>http://fisheye.jboss.org/browse/Seam/modules/international/trunk</url>
+ </scm>
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-compiler-plugin</artifactId>
- <version>2.0.2</version>
- <configuration>
- <source>1.5</source>
- <target>1.5</target>
- </configuration>
- </plugin>
- </plugins>
- </build>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <version>2.0.2</version>
+ <configuration>
+ <source>1.5</source>
+ <target>1.5</target>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
- <profiles>
- <profile>
- <id>code-coverage</id>
- <build>
- <pluginManagement>
- <plugins>
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>emma-maven-plugin</artifactId>
- <version>${emma.maven.plugin.version}</version>
- <inherited>true</inherited>
- <executions>
- <execution>
- <id>instrumentation</id>
- <phase>process-classes</phase>
- <goals>
- <goal>instrument</goal>
- </goals>
- <configuration>
- <verbose>true</verbose>
- </configuration>
- </execution>
- <execution>
- <id>cleaning</id>
- <phase>clean</phase>
- <goals>
- <goal>clean</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
+ <profiles>
+ <profile>
+ <id>code-coverage</id>
+ <build>
+ <pluginManagement>
+ <plugins>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>emma-maven-plugin</artifactId>
+ <version>${emma.maven.plugin.version}</version>
+ <inherited>true</inherited>
+ <executions>
+ <execution>
+ <id>instrumentation</id>
+ <phase>process-classes</phase>
+ <goals>
+ <goal>instrument</goal>
+ </goals>
+ <configuration>
+ <verbose>true</verbose>
+ </configuration>
+ </execution>
+ <execution>
+ <id>cleaning</id>
+ <phase>clean</phase>
+ <goals>
+ <goal>clean</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-surefire-plugin</artifactId>
- <inherited>true</inherited>
- <configuration>
- <forkMode>once</forkMode>
- <classesDirectory>${project.build.directory}/generated-classes/emma/classes</classesDirectory>
- </configuration>
- </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <inherited>true</inherited>
+ <configuration>
+ <forkMode>once</forkMode>
+ <classesDirectory>${project.build.directory}/generated-classes/emma/classes</classesDirectory>
+ </configuration>
+ </plugin>
- <plugin>
- <groupId>org.sonatype.maven.plugin</groupId>
- <artifactId>emma4it-maven-plugin</artifactId>
- <version>${emma4it.maven.plugin.version}</version>
- <executions>
- <execution>
- <id>report</id>
- <phase>test</phase>
- <goals>
- <goal>report</goal>
- </goals>
- <configuration>
- <sourceSets>
- <sourceSet>
- <directory>${project.build.sourceDirectory}</directory>
- </sourceSet>
- </sourceSets>
- </configuration>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </pluginManagement>
- </build>
- </profile>
- </profiles>
+ <plugin>
+ <groupId>org.sonatype.maven.plugin</groupId>
+ <artifactId>emma4it-maven-plugin</artifactId>
+ <version>${emma4it.maven.plugin.version}</version>
+ <executions>
+ <execution>
+ <id>report</id>
+ <phase>test</phase>
+ <goals>
+ <goal>report</goal>
+ </goals>
+ <configuration>
+ <sourceSets>
+ <sourceSet>
+ <directory>${project.build.sourceDirectory}</directory>
+ </sourceSet>
+ </sourceSets>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </pluginManagement>
+ </build>
+ </profile>
+ </profiles>
</project>
Modified: modules/servlet/trunk/pom.xml
===================================================================
--- modules/servlet/trunk/pom.xml 2010-05-18 17:41:18 UTC (rev 12751)
+++ modules/servlet/trunk/pom.xml 2010-05-18 18:20:45 UTC (rev 12752)
@@ -54,6 +54,7 @@
<arquillian.version>1.0.0-SNAPSHOT</arquillian.version>
<weld.api.version>1.0-SP1</weld.api.version>
<weldx.version>1.0.0-SNAPSHOT</weldx.version>
+ <slf4j.version>1.5.10</slf4j.version>
</properties>
<dependencies>
@@ -64,7 +65,7 @@
<artifactId>weld-core</artifactId>
<version>1.0.1-Final</version>
<scope>provided</scope>
- <optional>true</optional>
+ <optional>true</optional>
</dependency>
<!-- Environment Dependencies -->
@@ -91,6 +92,12 @@
<version>${weldx.version}</version>
<scope>provided</scope>
</dependency>
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-api</artifactId>
+ <version>${slf4j.version}</version>
+ <scope>provided</scope>
+ </dependency>
<!-- Test Dependencies -->
<dependency>
14 years
Seam SVN: r12751 - in modules: international/trunk and 1 other directories.
by seam-commits@lists.jboss.org
Author: lincolnthree
Date: 2010-05-18 13:41:18 -0400 (Tue, 18 May 2010)
New Revision: 12751
Modified:
modules/faces/trunk/pom.xml
modules/international/trunk/pom.xml
modules/servlet/trunk/pom.xml
Log:
Removed SLF4J dependencies and bindings, since WELDX now includes a JBossAS compatible version of SLF4J
Modified: modules/faces/trunk/pom.xml
===================================================================
--- modules/faces/trunk/pom.xml 2010-05-18 17:37:36 UTC (rev 12750)
+++ modules/faces/trunk/pom.xml 2010-05-18 17:41:18 UTC (rev 12751)
@@ -36,7 +36,6 @@
<weldx.version>1.0.0-SNAPSHOT</weldx.version>
<weld.api.version>1.0-SP1</weld.api.version>
<junit.version>4.8.1</junit.version>
- <slf4j.version>1.5.9.RC1</slf4j.version>
<emma.maven.plugin.version>1.0-alpha-2</emma.maven.plugin.version>
<emma4it.maven.plugin.version>1.3</emma4it.maven.plugin.version>
</properties>
@@ -54,25 +53,7 @@
</dependencyManagement>
<dependencies>
- <!--
- The reason slf4j-jdk14 is included at runtime scope is because
- slf4j-api is compile scope and, without the JDK 1.4 bridge, JBoss AS
- will barf. This should be included by weld-extensions to make it easy
- to exclude if necessary.
- -->
- <dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-jdk14</artifactId>
- <version>${slf4j.version}</version>
- <scope>runtime</scope>
- </dependency>
- <dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-api</artifactId>
- <version>${slf4j.version}</version>
- </dependency>
-
<!-- Environment Dependencies -->
<dependency>
<!-- This is necessary until a new JSF-API is published to central -->
@@ -121,21 +102,28 @@
<version>${arquillian.version}</version>
<scope>test</scope>
</dependency>
- <!--
- <dependency> <groupId>org.jboss.jsfunit</groupId>
- <artifactId>jboss-jsfunit-core</artifactId>
- <version>${jsfunit.version}</version> <scope>test</scope>
- </dependency>
- -->
<dependency>
<groupId>org.jboss.test-jsf</groupId>
<artifactId>jsf-mock</artifactId>
<version>${jsfmock.version}</version>
<scope>test</scope>
</dependency>
-
</dependencies>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <version>2.0.2</version>
+ <configuration>
+ <source>1.5</source>
+ <target>1.5</target>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+
<profiles>
<profile>
<id>arquillian-glassfish-embedded-30</id>
@@ -252,19 +240,5 @@
</developerConnection>
<url>http://fisheye.jboss.org/browse/Seam/modules/faces/trunk</url>
</scm>
-
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-compiler-plugin</artifactId>
- <version>2.0.2</version>
- <configuration>
- <source>1.5</source>
- <target>1.5</target>
- </configuration>
- </plugin>
- </plugins>
- </build>
</project>
Modified: modules/international/trunk/pom.xml
===================================================================
--- modules/international/trunk/pom.xml 2010-05-18 17:37:36 UTC (rev 12750)
+++ modules/international/trunk/pom.xml 2010-05-18 17:41:18 UTC (rev 12751)
@@ -31,7 +31,6 @@
<weld.extensions.version>1.0.0.Alpha1</weld.extensions.version>
<weld.api.version>1.0-SP1</weld.api.version>
<junit.version>4.8.1</junit.version>
- <slf4j.version>1.5.9.RC1</slf4j.version>
<joda-time.version>1.6</joda-time.version>
<pretty-time.version>1.0.6</pretty-time.version>
<emma.maven.plugin.version>1.0-alpha-2</emma.maven.plugin.version>
@@ -51,25 +50,7 @@
</dependencyManagement>
<dependencies>
- <!--
- The reason slf4j-jdk14 is included at runtime scope is because
- slf4j-api is compile scope and, without the JDK 1.4 bridge, JBoss AS
- will barf. This should be included by weld-extensions to make it easy
- to exclude if necessary.
- -->
- <dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-jdk14</artifactId>
- <version>${slf4j.version}</version>
- <scope>runtime</scope>
- </dependency>
- <dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-api</artifactId>
- <version>${slf4j.version}</version>
- </dependency>
-
<!-- Environment Dependencies -->
<dependency>
<groupId>javax.el</groupId>
Modified: modules/servlet/trunk/pom.xml
===================================================================
--- modules/servlet/trunk/pom.xml 2010-05-18 17:37:36 UTC (rev 12750)
+++ modules/servlet/trunk/pom.xml 2010-05-18 17:41:18 UTC (rev 12751)
@@ -54,30 +54,11 @@
<arquillian.version>1.0.0-SNAPSHOT</arquillian.version>
<weld.api.version>1.0-SP1</weld.api.version>
<weldx.version>1.0.0-SNAPSHOT</weldx.version>
- <slf4j.version>1.5.9.RC1</slf4j.version>
</properties>
<dependencies>
- <!--
- The reason slf4j-jdk14 is included at runtime scope is because
- slf4j-api is compile scope and, without the JDK 1.4 bridge, JBoss AS
- will barf. This should be included by weld-extensions to make it easy
- to exclude if necessary.
- -->
- <dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-jdk14</artifactId>
- <version>${slf4j.version}</version>
- <scope>runtime</scope>
- </dependency>
<dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-api</artifactId>
- <version>${slf4j.version}</version>
- </dependency>
-
- <dependency>
<!-- Implementation Specific, until Spec'd -->
<groupId>org.jboss.weld</groupId>
<artifactId>weld-core</artifactId>
14 years
Seam SVN: r12750 - modules/servlet/trunk.
by seam-commits@lists.jboss.org
Author: pete.muir(a)jboss.org
Date: 2010-05-18 13:37:36 -0400 (Tue, 18 May 2010)
New Revision: 12750
Modified:
modules/servlet/trunk/pom.xml
Log:
make dep optional (a bit more self explanatory)
Modified: modules/servlet/trunk/pom.xml
===================================================================
--- modules/servlet/trunk/pom.xml 2010-05-18 14:31:06 UTC (rev 12749)
+++ modules/servlet/trunk/pom.xml 2010-05-18 17:37:36 UTC (rev 12750)
@@ -83,6 +83,7 @@
<artifactId>weld-core</artifactId>
<version>1.0.1-Final</version>
<scope>provided</scope>
+ <optional>true</optional>
</dependency>
<!-- Environment Dependencies -->
14 years
Seam SVN: r12749 - in modules/servlet/trunk: impl/src/test/java/org/jboss/seam/servlet/event and 1 other directory.
by seam-commits@lists.jboss.org
Author: lincolnthree
Date: 2010-05-18 10:31:06 -0400 (Tue, 18 May 2010)
New Revision: 12749
Modified:
modules/servlet/trunk/impl/src/test/java/org/jboss/seam/servlet/event/ServletEventBridgeTest.java
modules/servlet/trunk/pom.xml
Log:
Updated ARQ version, and broken test.
Modified: modules/servlet/trunk/impl/src/test/java/org/jboss/seam/servlet/event/ServletEventBridgeTest.java
===================================================================
--- modules/servlet/trunk/impl/src/test/java/org/jboss/seam/servlet/event/ServletEventBridgeTest.java 2010-05-18 14:18:34 UTC (rev 12748)
+++ modules/servlet/trunk/impl/src/test/java/org/jboss/seam/servlet/event/ServletEventBridgeTest.java 2010-05-18 14:31:06 UTC (rev 12749)
@@ -1,460 +1,241 @@
package org.jboss.seam.servlet.event;
-import java.io.IOException;
-
-import javax.inject.Inject;
-import javax.servlet.AsyncEvent;
-import javax.servlet.ServletContextAttributeEvent;
-import javax.servlet.ServletContextEvent;
-import javax.servlet.ServletRequestAttributeEvent;
-import javax.servlet.ServletRequestEvent;
-import javax.servlet.http.HttpSessionBindingEvent;
-import javax.servlet.http.HttpSessionEvent;
-
-import org.jboss.arquillian.api.Deployment;
-import org.jboss.arquillian.junit.Arquillian;
-import org.jboss.seam.servlet.event.ServletEventBridge;
-import org.jboss.shrinkwrap.api.ArchivePaths;
-import org.jboss.shrinkwrap.api.Archives;
-import org.jboss.shrinkwrap.api.formatter.Formatters;
-import org.jboss.shrinkwrap.api.spec.JavaArchive;
-import org.jboss.shrinkwrap.impl.base.asset.ByteArrayAsset;
import org.junit.Test;
-import org.junit.runner.RunWith;
//(a)RunWith(Arquillian.class)
public class ServletEventBridgeTest
{
-
- @Test
- public void dummy() {
-
- }
- /*
- @Deployment
- public static JavaArchive createTestArchive()
- {
- JavaArchive a = Archives.create("test.jar", JavaArchive.class).addClasses(ServletEventBridge.class, ServletEventObserver.class).addManifestResource(new ByteArrayAsset(new byte[0]), ArchivePaths.create("beans.xml"));
- System.out.println(a.toString(Formatters.VERBOSE));
- return a;
- }
- @Inject
- ServletEventBridge listener;
-
- @Inject
- ServletEventObserver observer;
-
@Test
- public void testObserveAnySessionEvent()
+ public void dummy()
{
- observer.reset();
- HttpSessionEvent e1 = new HttpSessionEvent(null);
- HttpSessionEvent e2 = new HttpSessionEvent(null);
- HttpSessionEvent e3 = new HttpSessionEvent(null);
- HttpSessionEvent e4 = new HttpSessionEvent(null);
- listener.sessionCreated(e1);
- listener.sessionDidActivate(e2);
- listener.sessionWillPassivate(e3);
- listener.sessionDestroyed(e4);
- observer.assertObservations("1", e1, e2, e3, e4);
- }
- @Test
- public void testObserveSessionActivated()
- {
- observer.reset();
- HttpSessionEvent e = new HttpSessionEvent(null);
- listener.sessionDidActivate(e);
- observer.assertObservations("2", e);
}
-
- @Test
- public void testObserveSessionPassivated()
- {
- observer.reset();
- HttpSessionEvent e = new HttpSessionEvent(null);
- listener.sessionWillPassivate(e);
- observer.assertObservations("3", e);
- }
-
- @Test
- public void testObserveSessionCreated()
- {
- observer.reset();
- HttpSessionEvent e = new HttpSessionEvent(null);
- listener.sessionCreated(e);
- observer.assertObservations("4", e);
- }
-
- @Test
- public void testObserveSessionDestroyed()
- {
- observer.reset();
- HttpSessionEvent e = new HttpSessionEvent(null);
- listener.sessionDestroyed(e);
- observer.assertObservations("5", e);
- }
-
- @Test
- public void testObserveAnySessionBindingEvent()
- {
- observer.reset();
- HttpSessionBindingEvent e1 = new HttpSessionBindingEvent(null, "");
- HttpSessionBindingEvent e2 = new HttpSessionBindingEvent(null, "");
- HttpSessionBindingEvent e3 = new HttpSessionBindingEvent(null, "");
- HttpSessionBindingEvent e4 = new HttpSessionBindingEvent(null, "");
- HttpSessionBindingEvent e5 = new HttpSessionBindingEvent(null, "");
- listener.attributeAdded(e1);
- listener.attributeRemoved(e2);
- listener.attributeReplaced(e3);
- listener.valueBound(e4);
- listener.valueUnbound(e5);
- observer.assertObservations("6", e1, e2, e3, e4, e5);
- }
-
- @Test
- public void testObserveSessionAttributeAdded()
- {
- observer.reset();
- HttpSessionBindingEvent e = new HttpSessionBindingEvent(null, "");
- listener.attributeAdded(e);
- observer.assertObservations("7", e);
- }
-
- @Test
- public void testObserveSessionAttributeReplaced()
- {
- observer.reset();
- HttpSessionBindingEvent e = new HttpSessionBindingEvent(null, "");
- listener.attributeReplaced(e);
- observer.assertObservations("8", e);
- }
-
- @Test
- public void testObserveSessionAttributeRemoved()
- {
- observer.reset();
- HttpSessionBindingEvent e = new HttpSessionBindingEvent(null, "");
- listener.attributeRemoved(e);
- observer.assertObservations("9", e);
- }
-
- @Test
- public void testObserveSessionValueBound()
- {
- observer.reset();
- HttpSessionBindingEvent e = new HttpSessionBindingEvent(null, "");
- listener.valueBound(e);
- observer.assertObservations("10", e);
- }
-
- @Test
- public void testObserveSessionValueUnbound()
- {
- observer.reset();
- HttpSessionBindingEvent e = new HttpSessionBindingEvent(null, "");
- listener.valueUnbound(e);
- observer.assertObservations("11", e);
- }
-
- @Test
- public void testObserveSpecificSessionAttributeAdded()
- {
- observer.reset();
- HttpSessionBindingEvent e = new HttpSessionBindingEvent(null, "");
- listener.attributeAdded(e);
- observer.assertObservations("12", e);
- }
-
- @Test
- public void testObserveSpecificSessionAttributeReplaced()
- {
- observer.reset();
- HttpSessionBindingEvent e = new HttpSessionBindingEvent(null, "");
- listener.attributeReplaced(e);
- observer.assertObservations("13", e);
- }
-
- @Test
- public void testObserveSpecificSessionAttributeRemoved()
- {
- observer.reset();
- HttpSessionBindingEvent e = new HttpSessionBindingEvent(null, "");
- listener.attributeRemoved(e);
- observer.assertObservations("14", e);
- }
-
- @Test
- public void testObserveSpecificSessionAttribute()
- {
- observer.reset();
- HttpSessionBindingEvent e1 = new HttpSessionBindingEvent(null, "");
- HttpSessionBindingEvent e2 = new HttpSessionBindingEvent(null, "");
- HttpSessionBindingEvent e3 = new HttpSessionBindingEvent(null, "");
- listener.attributeAdded(e1);
- listener.attributeRemoved(e2);
- listener.attributeReplaced(e3);
- observer.assertObservations("14a", e1, e2, e3);
- }
-
- @Test
- public void testObserveSpecificSessionValueBound()
- {
- observer.reset();
- HttpSessionBindingEvent e = new HttpSessionBindingEvent(null, "");
- listener.valueBound(e);
- observer.assertObservations("15", e);
- }
-
- @Test
- public void testObserveSpecificSessionValueUnbound()
- {
- observer.reset();
- HttpSessionBindingEvent e = new HttpSessionBindingEvent(null, "");
- listener.valueUnbound(e);
- observer.assertObservations("16", e);
- }
-
- @Test
- public void testObserveSpecificSessionValue()
- {
- observer.reset();
- HttpSessionBindingEvent e1 = new HttpSessionBindingEvent(null, "");
- HttpSessionBindingEvent e2 = new HttpSessionBindingEvent(null, "");
- listener.valueBound(e1);
- listener.valueUnbound(e2);
- observer.assertObservations("16a", e1, e2);
- }
-
- @Test
- public void testObserveServletContext()
- {
- observer.reset();
- ServletContextEvent e1 = new ServletContextEvent(null);
- ServletContextEvent e2 = new ServletContextEvent(null);
- listener.contextInitialized(e1);
- listener.contextDestroyed(e2);
- observer.assertObservations("17", e1, e2);
- }
-
- @Test
- public void testObserveServletContextInitialized()
- {
- observer.reset();
- ServletContextEvent e = new ServletContextEvent(null);
- listener.contextInitialized(e);
- observer.assertObservations("18", e);
- }
-
- @Test
- public void testObserveServletContextDestroyed()
- {
- observer.reset();
- ServletContextEvent e = new ServletContextEvent(null);
- listener.contextInitialized(e);
- observer.assertObservations("19", e);
- }
-
- @Test
- public void testObserveServletContextAttribute()
- {
- observer.reset();
- ServletContextAttributeEvent e1 = new ServletContextAttributeEvent(null, "", null);
- ServletContextAttributeEvent e2 = new ServletContextAttributeEvent(null, "", null);
- ServletContextAttributeEvent e3 = new ServletContextAttributeEvent(null, "", null);
- listener.attributeAdded(e1);
- listener.attributeRemoved(e2);
- listener.attributeReplaced(e3);
- observer.assertObservations("20", e1, e2, e3);
- }
-
- @Test
- public void testObserveAnyServletContextAttributeAdded()
- {
- observer.reset();
- ServletContextAttributeEvent e = new ServletContextAttributeEvent(null, "", null);
- listener.attributeAdded(e);
- observer.assertObservations("21", e);
- }
-
- @Test
- public void testObserveAnyServletContextAttributeReplaced()
- {
- observer.reset();
- ServletContextAttributeEvent e = new ServletContextAttributeEvent(null, "", null);
- listener.attributeReplaced(e);
- observer.assertObservations("22", e);
- }
-
- @Test
- public void testObserveAnyServletContextAttributeRemoved()
- {
- observer.reset();
- ServletContextAttributeEvent e = new ServletContextAttributeEvent(null, "", null);
- listener.attributeRemoved(e);
- observer.assertObservations("23", e);
- }
-
- @Test
- public void testObserveSpecificServletContextAttributeAdded()
- {
- observer.reset();
- ServletContextAttributeEvent e = new ServletContextAttributeEvent(null, "", null);
- listener.attributeAdded(e);
- observer.assertObservations("24", e);
- }
-
- @Test
- public void testObserveSpecificServletContextAttributeReplaced()
- {
- observer.reset();
- ServletContextAttributeEvent e = new ServletContextAttributeEvent(null, "", null);
- listener.attributeReplaced(e);
- observer.assertObservations("25", e);
- }
-
- @Test
- public void testObserveSpecificServletContextAttributeRemoved()
- {
- observer.reset();
- ServletContextAttributeEvent e = new ServletContextAttributeEvent(null, "", null);
- listener.attributeRemoved(e);
- observer.assertObservations("26", e);
- }
-
- @Test
- public void testObserveServletRequest()
- {
- observer.reset();
- ServletRequestEvent e1 = new ServletRequestEvent(null, null);
- ServletRequestEvent e2 = new ServletRequestEvent(null, null);
- listener.requestInitialized(e1);
- listener.requestDestroyed(e2);
- observer.assertObservations("27", e1, e2);
- }
-
- @Test
- public void testObserveRequestInitialized()
- {
- observer.reset();
- ServletRequestEvent e = new ServletRequestEvent(null, null);
- listener.requestInitialized(e);
- observer.assertObservations("28", e);
- }
-
- @Test
- public void testObserveRequestDestroyed()
- {
- observer.reset();
- ServletRequestEvent e = new ServletRequestEvent(null, null);
- listener.requestDestroyed(e);
- observer.assertObservations("29", e);
- }
-
- @Test
- public void testObserveAnyServletRequestAttributeAdded()
- {
- observer.reset();
- ServletRequestAttributeEvent e = new ServletRequestAttributeEvent(null, null, "", null);
- listener.attributeAdded(e);
- observer.assertObservations("30", e);
- }
-
- @Test
- public void testObserveAnyServletRequestAttributeReplaced()
- {
- observer.reset();
- ServletRequestAttributeEvent e = new ServletRequestAttributeEvent(null, null, "", null);
- listener.attributeReplaced(e);
- observer.assertObservations("31", e);
- }
-
- @Test
- public void testObserveAnyServletRequestAttributeRemoved()
- {
- observer.reset();
- ServletRequestAttributeEvent e = new ServletRequestAttributeEvent(null, null, "", null);
- listener.attributeRemoved(e);
- observer.assertObservations("32", e);
- }
-
- @Test
- public void testObserveSpecificServletRequestAttributeAdded()
- {
- observer.reset();
- ServletRequestAttributeEvent e = new ServletRequestAttributeEvent(null, null, "", null);
- listener.attributeAdded(e);
- observer.assertObservations("33", e);
- }
-
- @Test
- public void testObserveSpecificServletRequestAttributeReplaced()
- {
- observer.reset();
- ServletRequestAttributeEvent e = new ServletRequestAttributeEvent(null, null, "", null);
- listener.attributeReplaced(e);
- observer.assertObservations("34", e);
- }
-
- @Test
- public void testObserveSpecificServletRequestAttributeRemoved()
- {
- observer.reset();
- ServletRequestAttributeEvent e = new ServletRequestAttributeEvent(null, null, "", null);
- listener.attributeRemoved(e);
- observer.assertObservations("35", e);
- }
-
- @Test
- public void testObserveAsynchrnousEventCompleted() throws IOException
- {
- observer.reset();
- AsyncEvent e = new AsyncEvent(null);
- listener.onComplete(e);
- observer.assertObservations("36", e);
- }
-
- @Test
- public void testObserveAsynchrnousEventError() throws IOException
- {
- observer.reset();
- AsyncEvent e = new AsyncEvent(null);
- listener.onError(e);
- observer.assertObservations("37", e);
- }
-
- @Test
- public void testObserveAsynchrnousEventStarted() throws IOException
- {
- observer.reset();
- AsyncEvent e = new AsyncEvent(null);
- listener.onStartAsync(e);
- observer.assertObservations("38", e);
- }
-
- @Test
- public void testObserveAsynchrnousEventTimedOut() throws IOException
- {
- observer.reset();
- AsyncEvent e = new AsyncEvent(null);
- listener.onTimeout(e);
- observer.assertObservations("39", e);
- }
-
- @Test
- public void testObserveAsynchrnousEventT() throws IOException
- {
- observer.reset();
- AsyncEvent e1 = new AsyncEvent(null);
- AsyncEvent e2 = new AsyncEvent(null);
- AsyncEvent e3 = new AsyncEvent(null);
- AsyncEvent e4 = new AsyncEvent(null);
- listener.onComplete(e1);
- listener.onError(e2);
- listener.onStartAsync(e3);
- listener.onTimeout(e4);
- observer.assertObservations("40", e1, e2, e3, e4);
- }
- */
+ /*
+ * @Deployment public static JavaArchive createTestArchive() { JavaArchive a
+ * = Archives.create("test.jar",
+ * JavaArchive.class).addClasses(ServletEventBridge.class,
+ * ServletEventObserver.class).addManifestResource(new ByteArrayAsset(new
+ * byte[0]), ArchivePaths.create("beans.xml"));
+ * System.out.println(a.toString(Formatters.VERBOSE)); return a; }
+ *
+ * @Inject ServletEventBridge listener;
+ *
+ * @Inject ServletEventObserver observer;
+ *
+ * @Test public void testObserveAnySessionEvent() { observer.reset();
+ * HttpSessionEvent e1 = new HttpSessionEvent(null); HttpSessionEvent e2 =
+ * new HttpSessionEvent(null); HttpSessionEvent e3 = new
+ * HttpSessionEvent(null); HttpSessionEvent e4 = new HttpSessionEvent(null);
+ * listener.sessionCreated(e1); listener.sessionDidActivate(e2);
+ * listener.sessionWillPassivate(e3); listener.sessionDestroyed(e4);
+ * observer.assertObservations("1", e1, e2, e3, e4); }
+ *
+ * @Test public void testObserveSessionActivated() { observer.reset();
+ * HttpSessionEvent e = new HttpSessionEvent(null);
+ * listener.sessionDidActivate(e); observer.assertObservations("2", e); }
+ *
+ * @Test public void testObserveSessionPassivated() { observer.reset();
+ * HttpSessionEvent e = new HttpSessionEvent(null);
+ * listener.sessionWillPassivate(e); observer.assertObservations("3", e); }
+ *
+ * @Test public void testObserveSessionCreated() { observer.reset();
+ * HttpSessionEvent e = new HttpSessionEvent(null);
+ * listener.sessionCreated(e); observer.assertObservations("4", e); }
+ *
+ * @Test public void testObserveSessionDestroyed() { observer.reset();
+ * HttpSessionEvent e = new HttpSessionEvent(null);
+ * listener.sessionDestroyed(e); observer.assertObservations("5", e); }
+ *
+ * @Test public void testObserveAnySessionBindingEvent() { observer.reset();
+ * HttpSessionBindingEvent e1 = new HttpSessionBindingEvent(null, "");
+ * HttpSessionBindingEvent e2 = new HttpSessionBindingEvent(null, "");
+ * HttpSessionBindingEvent e3 = new HttpSessionBindingEvent(null, "");
+ * HttpSessionBindingEvent e4 = new HttpSessionBindingEvent(null, "");
+ * HttpSessionBindingEvent e5 = new HttpSessionBindingEvent(null, "");
+ * listener.attributeAdded(e1); listener.attributeRemoved(e2);
+ * listener.attributeReplaced(e3); listener.valueBound(e4);
+ * listener.valueUnbound(e5); observer.assertObservations("6", e1, e2, e3,
+ * e4, e5); }
+ *
+ * @Test public void testObserveSessionAttributeAdded() { observer.reset();
+ * HttpSessionBindingEvent e = new HttpSessionBindingEvent(null, "");
+ * listener.attributeAdded(e); observer.assertObservations("7", e); }
+ *
+ * @Test public void testObserveSessionAttributeReplaced() {
+ * observer.reset(); HttpSessionBindingEvent e = new
+ * HttpSessionBindingEvent(null, ""); listener.attributeReplaced(e);
+ * observer.assertObservations("8", e); }
+ *
+ * @Test public void testObserveSessionAttributeRemoved() { observer.reset();
+ * HttpSessionBindingEvent e = new HttpSessionBindingEvent(null, "");
+ * listener.attributeRemoved(e); observer.assertObservations("9", e); }
+ *
+ * @Test public void testObserveSessionValueBound() { observer.reset();
+ * HttpSessionBindingEvent e = new HttpSessionBindingEvent(null, "");
+ * listener.valueBound(e); observer.assertObservations("10", e); }
+ *
+ * @Test public void testObserveSessionValueUnbound() { observer.reset();
+ * HttpSessionBindingEvent e = new HttpSessionBindingEvent(null, "");
+ * listener.valueUnbound(e); observer.assertObservations("11", e); }
+ *
+ * @Test public void testObserveSpecificSessionAttributeAdded() {
+ * observer.reset(); HttpSessionBindingEvent e = new
+ * HttpSessionBindingEvent(null, ""); listener.attributeAdded(e);
+ * observer.assertObservations("12", e); }
+ *
+ * @Test public void testObserveSpecificSessionAttributeReplaced() {
+ * observer.reset(); HttpSessionBindingEvent e = new
+ * HttpSessionBindingEvent(null, ""); listener.attributeReplaced(e);
+ * observer.assertObservations("13", e); }
+ *
+ * @Test public void testObserveSpecificSessionAttributeRemoved() {
+ * observer.reset(); HttpSessionBindingEvent e = new
+ * HttpSessionBindingEvent(null, ""); listener.attributeRemoved(e);
+ * observer.assertObservations("14", e); }
+ *
+ * @Test public void testObserveSpecificSessionAttribute() {
+ * observer.reset(); HttpSessionBindingEvent e1 = new
+ * HttpSessionBindingEvent(null, ""); HttpSessionBindingEvent e2 = new
+ * HttpSessionBindingEvent(null, ""); HttpSessionBindingEvent e3 = new
+ * HttpSessionBindingEvent(null, ""); listener.attributeAdded(e1);
+ * listener.attributeRemoved(e2); listener.attributeReplaced(e3);
+ * observer.assertObservations("14a", e1, e2, e3); }
+ *
+ * @Test public void testObserveSpecificSessionValueBound() {
+ * observer.reset(); HttpSessionBindingEvent e = new
+ * HttpSessionBindingEvent(null, ""); listener.valueBound(e);
+ * observer.assertObservations("15", e); }
+ *
+ * @Test public void testObserveSpecificSessionValueUnbound() {
+ * observer.reset(); HttpSessionBindingEvent e = new
+ * HttpSessionBindingEvent(null, ""); listener.valueUnbound(e);
+ * observer.assertObservations("16", e); }
+ *
+ * @Test public void testObserveSpecificSessionValue() { observer.reset();
+ * HttpSessionBindingEvent e1 = new HttpSessionBindingEvent(null, "");
+ * HttpSessionBindingEvent e2 = new HttpSessionBindingEvent(null, "");
+ * listener.valueBound(e1); listener.valueUnbound(e2);
+ * observer.assertObservations("16a", e1, e2); }
+ *
+ * @Test public void testObserveServletContext() { observer.reset();
+ * ServletContextEvent e1 = new ServletContextEvent(null);
+ * ServletContextEvent e2 = new ServletContextEvent(null);
+ * listener.contextInitialized(e1); listener.contextDestroyed(e2);
+ * observer.assertObservations("17", e1, e2); }
+ *
+ * @Test public void testObserveServletContextInitialized() {
+ * observer.reset(); ServletContextEvent e = new ServletContextEvent(null);
+ * listener.contextInitialized(e); observer.assertObservations("18", e); }
+ *
+ * @Test public void testObserveServletContextDestroyed() { observer.reset();
+ * ServletContextEvent e = new ServletContextEvent(null);
+ * listener.contextInitialized(e); observer.assertObservations("19", e); }
+ *
+ * @Test public void testObserveServletContextAttribute() { observer.reset();
+ * ServletContextAttributeEvent e1 = new ServletContextAttributeEvent(null,
+ * "", null); ServletContextAttributeEvent e2 = new
+ * ServletContextAttributeEvent(null, "", null); ServletContextAttributeEvent
+ * e3 = new ServletContextAttributeEvent(null, "", null);
+ * listener.attributeAdded(e1); listener.attributeRemoved(e2);
+ * listener.attributeReplaced(e3); observer.assertObservations("20", e1, e2,
+ * e3); }
+ *
+ * @Test public void testObserveAnyServletContextAttributeAdded() {
+ * observer.reset(); ServletContextAttributeEvent e = new
+ * ServletContextAttributeEvent(null, "", null); listener.attributeAdded(e);
+ * observer.assertObservations("21", e); }
+ *
+ * @Test public void testObserveAnyServletContextAttributeReplaced() {
+ * observer.reset(); ServletContextAttributeEvent e = new
+ * ServletContextAttributeEvent(null, "", null);
+ * listener.attributeReplaced(e); observer.assertObservations("22", e); }
+ *
+ * @Test public void testObserveAnyServletContextAttributeRemoved() {
+ * observer.reset(); ServletContextAttributeEvent e = new
+ * ServletContextAttributeEvent(null, "", null);
+ * listener.attributeRemoved(e); observer.assertObservations("23", e); }
+ *
+ * @Test public void testObserveSpecificServletContextAttributeAdded() {
+ * observer.reset(); ServletContextAttributeEvent e = new
+ * ServletContextAttributeEvent(null, "", null); listener.attributeAdded(e);
+ * observer.assertObservations("24", e); }
+ *
+ * @Test public void testObserveSpecificServletContextAttributeReplaced() {
+ * observer.reset(); ServletContextAttributeEvent e = new
+ * ServletContextAttributeEvent(null, "", null);
+ * listener.attributeReplaced(e); observer.assertObservations("25", e); }
+ *
+ * @Test public void testObserveSpecificServletContextAttributeRemoved() {
+ * observer.reset(); ServletContextAttributeEvent e = new
+ * ServletContextAttributeEvent(null, "", null);
+ * listener.attributeRemoved(e); observer.assertObservations("26", e); }
+ *
+ * @Test public void testObserveServletRequest() { observer.reset();
+ * ServletRequestEvent e1 = new ServletRequestEvent(null, null);
+ * ServletRequestEvent e2 = new ServletRequestEvent(null, null);
+ * listener.requestInitialized(e1); listener.requestDestroyed(e2);
+ * observer.assertObservations("27", e1, e2); }
+ *
+ * @Test public void testObserveRequestInitialized() { observer.reset();
+ * ServletRequestEvent e = new ServletRequestEvent(null, null);
+ * listener.requestInitialized(e); observer.assertObservations("28", e); }
+ *
+ * @Test public void testObserveRequestDestroyed() { observer.reset();
+ * ServletRequestEvent e = new ServletRequestEvent(null, null);
+ * listener.requestDestroyed(e); observer.assertObservations("29", e); }
+ *
+ * @Test public void testObserveAnyServletRequestAttributeAdded() {
+ * observer.reset(); ServletRequestAttributeEvent e = new
+ * ServletRequestAttributeEvent(null, null, "", null);
+ * listener.attributeAdded(e); observer.assertObservations("30", e); }
+ *
+ * @Test public void testObserveAnyServletRequestAttributeReplaced() {
+ * observer.reset(); ServletRequestAttributeEvent e = new
+ * ServletRequestAttributeEvent(null, null, "", null);
+ * listener.attributeReplaced(e); observer.assertObservations("31", e); }
+ *
+ * @Test public void testObserveAnyServletRequestAttributeRemoved() {
+ * observer.reset(); ServletRequestAttributeEvent e = new
+ * ServletRequestAttributeEvent(null, null, "", null);
+ * listener.attributeRemoved(e); observer.assertObservations("32", e); }
+ *
+ * @Test public void testObserveSpecificServletRequestAttributeAdded() {
+ * observer.reset(); ServletRequestAttributeEvent e = new
+ * ServletRequestAttributeEvent(null, null, "", null);
+ * listener.attributeAdded(e); observer.assertObservations("33", e); }
+ *
+ * @Test public void testObserveSpecificServletRequestAttributeReplaced() {
+ * observer.reset(); ServletRequestAttributeEvent e = new
+ * ServletRequestAttributeEvent(null, null, "", null);
+ * listener.attributeReplaced(e); observer.assertObservations("34", e); }
+ *
+ * @Test public void testObserveSpecificServletRequestAttributeRemoved() {
+ * observer.reset(); ServletRequestAttributeEvent e = new
+ * ServletRequestAttributeEvent(null, null, "", null);
+ * listener.attributeRemoved(e); observer.assertObservations("35", e); }
+ *
+ * @Test public void testObserveAsynchrnousEventCompleted() throws
+ * IOException { observer.reset(); AsyncEvent e = new AsyncEvent(null);
+ * listener.onComplete(e); observer.assertObservations("36", e); }
+ *
+ * @Test public void testObserveAsynchrnousEventError() throws IOException {
+ * observer.reset(); AsyncEvent e = new AsyncEvent(null);
+ * listener.onError(e); observer.assertObservations("37", e); }
+ *
+ * @Test public void testObserveAsynchrnousEventStarted() throws IOException
+ * { observer.reset(); AsyncEvent e = new AsyncEvent(null);
+ * listener.onStartAsync(e); observer.assertObservations("38", e); }
+ *
+ * @Test public void testObserveAsynchrnousEventTimedOut() throws IOException
+ * { observer.reset(); AsyncEvent e = new AsyncEvent(null);
+ * listener.onTimeout(e); observer.assertObservations("39", e); }
+ *
+ * @Test public void testObserveAsynchrnousEventT() throws IOException {
+ * observer.reset(); AsyncEvent e1 = new AsyncEvent(null); AsyncEvent e2 =
+ * new AsyncEvent(null); AsyncEvent e3 = new AsyncEvent(null); AsyncEvent e4
+ * = new AsyncEvent(null); listener.onComplete(e1); listener.onError(e2);
+ * listener.onStartAsync(e3); listener.onTimeout(e4);
+ * observer.assertObservations("40", e1, e2, e3, e4); }
+ */
}
\ No newline at end of file
Modified: modules/servlet/trunk/pom.xml
===================================================================
--- modules/servlet/trunk/pom.xml 2010-05-18 14:18:34 UTC (rev 12748)
+++ modules/servlet/trunk/pom.xml 2010-05-18 14:31:06 UTC (rev 12749)
@@ -51,7 +51,7 @@
</dependencyManagement>
<properties>
- <arquillian.version>1.0.0.Alpha1</arquillian.version>
+ <arquillian.version>1.0.0-SNAPSHOT</arquillian.version>
<weld.api.version>1.0-SP1</weld.api.version>
<weldx.version>1.0.0-SNAPSHOT</weldx.version>
<slf4j.version>1.5.9.RC1</slf4j.version>
14 years
Seam SVN: r12748 - modules/servlet/trunk.
by seam-commits@lists.jboss.org
Author: lincolnthree
Date: 2010-05-18 10:18:34 -0400 (Tue, 18 May 2010)
New Revision: 12748
Modified:
modules/servlet/trunk/pom.xml
Log:
Specified Java compile version 1.5
Modified: modules/servlet/trunk/pom.xml
===================================================================
--- modules/servlet/trunk/pom.xml 2010-05-18 11:43:10 UTC (rev 12747)
+++ modules/servlet/trunk/pom.xml 2010-05-18 14:18:34 UTC (rev 12748)
@@ -131,6 +131,20 @@
</dependency>
</dependencies>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <version>2.0.2</version>
+ <configuration>
+ <source>1.5</source>
+ <target>1.5</target>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+
<developers>
<developer>
<name>Nicklas Karlsson</name>
14 years
Seam SVN: r12747 - in modules/security/trunk: impl/src/main/java/org/jboss/seam/security and 1 other directory.
by seam-commits@lists.jboss.org
Author: shane.bryzak(a)jboss.com
Date: 2010-05-18 07:43:10 -0400 (Tue, 18 May 2010)
New Revision: 12747
Modified:
modules/security/trunk/api/src/main/java/org/jboss/seam/security/Identity.java
modules/security/trunk/impl/src/main/java/org/jboss/seam/security/IdentityImpl.java
Log:
fix role checking logic
Modified: modules/security/trunk/api/src/main/java/org/jboss/seam/security/Identity.java
===================================================================
--- modules/security/trunk/api/src/main/java/org/jboss/seam/security/Identity.java 2010-05-18 06:56:50 UTC (rev 12746)
+++ modules/security/trunk/api/src/main/java/org/jboss/seam/security/Identity.java 2010-05-18 11:43:10 UTC (rev 12747)
@@ -85,7 +85,7 @@
* @param role String The name of the role to check
* @return boolean True if the user is a member of the specified role
*/
- boolean hasRole(String role, String group);
+ boolean hasRole(String role, String group, String groupType);
/**
* Adds a role to the authenticated user. If the user is not logged in,
@@ -102,7 +102,7 @@
*
* @param role The name of the role to remove
*/
- void removeRole(String role, String group);
+ void removeRole(String role, String group, String groupType);
/**
* Checks that the current authenticated user is a member of
@@ -111,7 +111,7 @@
* @param role String The name of the role to check
* @throws AuthorizationException if the authenticated user is not a member of the role
*/
- void checkRole(String role, String group);
+ void checkRole(String role, String group, String groupType);
/**
* Checks if the currently authenticated user can perform the specified action
Modified: modules/security/trunk/impl/src/main/java/org/jboss/seam/security/IdentityImpl.java
===================================================================
--- modules/security/trunk/impl/src/main/java/org/jboss/seam/security/IdentityImpl.java 2010-05-18 06:56:50 UTC (rev 12746)
+++ modules/security/trunk/impl/src/main/java/org/jboss/seam/security/IdentityImpl.java 2010-05-18 11:43:10 UTC (rev 12747)
@@ -6,7 +6,6 @@
import java.security.acl.Group;
import java.util.ArrayList;
import java.util.Collection;
-import java.util.Enumeration;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@@ -33,11 +32,11 @@
import org.jboss.seam.security.callbacks.IdentityManagerCallback;
import org.jboss.seam.security.events.AlreadyLoggedInEvent;
import org.jboss.seam.security.events.LoggedInEvent;
-import org.jboss.seam.security.events.PostLoggedOutEvent;
import org.jboss.seam.security.events.LoginFailedEvent;
import org.jboss.seam.security.events.NotAuthorizedEvent;
import org.jboss.seam.security.events.NotLoggedInEvent;
import org.jboss.seam.security.events.PostAuthenticateEvent;
+import org.jboss.seam.security.events.PostLoggedOutEvent;
import org.jboss.seam.security.events.PreAuthenticateEvent;
import org.jboss.seam.security.events.PreLoggedOutEvent;
import org.jboss.seam.security.events.QuietLoginEvent;
@@ -75,11 +74,11 @@
private Subject subject;
private String jaasConfigName = null;
- // Contains a group to role list mapping of roles assigned during the authentication process
- private Map<String,List<String>> preAuthenticationRoles = new HashMap<String,List<String>>();
+ // Contains a group name to group type:role list mapping of roles assigned during the authentication process
+ private Map<String,Map<String,List<String>>> preAuthenticationRoles = new HashMap<String,Map<String,List<String>>>();
- // Contains a group to role list mapping of roles granted after the authentication process has completed
- private Map<String,List<String>> activeRoles = new HashMap<String,List<String>>();
+ // Contains a group name to group type:role list mapping of roles granted after the authentication process has completed
+ private Map<String,Map<String,List<String>>> activeRoles = new HashMap<String,Map<String,List<String>>>();
private transient ThreadLocal<Boolean> systemOp;
@@ -337,10 +336,13 @@
{
for (String group : preAuthenticationRoles.keySet())
{
- for (String role : preAuthenticationRoles.get(group))
+ Map<String,List<String>> groupTypeRoles = preAuthenticationRoles.get(group);
+ for (String groupType : groupTypeRoles.keySet())
{
- // TODO fix
- addRole(role, group, null);
+ for (String roleType : groupTypeRoles.get(groupType))
+ {
+ addRole(roleType, group, groupType);
+ }
}
}
preAuthenticationRoles.clear();
@@ -458,37 +460,46 @@
}
}
- public boolean hasRole(String roleType, String group)
+ public boolean hasRole(String roleType, String group, String groupType)
{
if (!securityEnabled) return true;
if (systemOp != null && Boolean.TRUE.equals(systemOp.get())) return true;
tryLogin();
- List<String> roles = activeRoles.get(group);
+ Map<String,List<String>> groupTypes = activeRoles.get(group);
+ List<String> roles = groupTypes != null ? groupTypes.get(groupType) : null;
return (roles != null && roles.contains(roleType));
}
public boolean addRole(String roleType, String group, String groupType)
{
- if (roleType == null || "".equals(roleType)) return false;
+ if (roleType == null || "".equals(roleType) || group == null || "".equals(group)
+ || groupType == null || "".equals(groupType)) return false;
- Map<String,List<String>> roleMap = isLoggedIn() ? activeRoles :
+ Map<String,Map<String,List<String>>> roleMap = isLoggedIn() ? activeRoles :
preAuthenticationRoles;
+
+ List<String> roleTypes = null;
- List<String> roles = null;
-
- if (!roleMap.containsKey(group))
+ Map<String,List<String>> groupTypes = roleMap.get(group);
+ if (groupTypes != null)
{
- roles = new ArrayList<String>();
- roleMap.put(group, roles);
+ roleTypes = groupTypes.get(groupType);
}
else
{
- roles = roleMap.get(group);
+ groupTypes = new HashMap<String,List<String>>();
+ roleMap.put(group, groupTypes);
}
- return roles.add(roleType);
+ if (roleTypes == null)
+ {
+ roleTypes = new ArrayList<String>();
+ groupTypes.put(groupType, roleTypes);
+ }
+
+ return roleTypes.add(roleType);
}
/**
@@ -496,19 +507,23 @@
*
* @param role The name of the role to remove
*/
- public void removeRole(String roleType, String group)
- {
+ public void removeRole(String roleType, String group, String groupType)
+ {
if (activeRoles.containsKey(group))
{
- activeRoles.get(group).remove(roleType);
+ Map<String,List<String>> groupTypes = activeRoles.get(group);
+ if (groupTypes.containsKey(groupType))
+ {
+ groupTypes.get(groupType).remove(roleType);
+ }
}
}
- public void checkRole(String roleType, String group)
+ public void checkRole(String roleType, String group, String groupType)
{
tryLogin();
- if ( !hasRole(roleType, group) )
+ if ( !hasRole(roleType, group, groupType) )
{
if ( !isLoggedIn() )
{
14 years