[seam-commits] Seam SVN: r12475 - in modules/servlet/trunk: api and 18 other directories.
seam-commits at lists.jboss.org
seam-commits at lists.jboss.org
Tue Apr 13 12:35:55 EDT 2010
Author: lincolnthree
Date: 2010-04-13 12:35:52 -0400 (Tue, 13 Apr 2010)
New Revision: 12475
Added:
modules/servlet/trunk/api/
modules/servlet/trunk/api/pom.xml
modules/servlet/trunk/api/src/
modules/servlet/trunk/api/src/main/
modules/servlet/trunk/api/src/main/java/
modules/servlet/trunk/api/src/main/java/org/
modules/servlet/trunk/api/src/main/java/org/jboss/
modules/servlet/trunk/api/src/main/java/org/jboss/seam/
modules/servlet/trunk/api/src/main/java/org/jboss/seam/servlet/
modules/servlet/trunk/api/src/main/java/org/jboss/seam/servlet/event/
modules/servlet/trunk/api/src/main/java/org/jboss/seam/servlet/event/qualifier/
modules/servlet/trunk/api/src/main/java/org/jboss/seam/servlet/event/qualifier/AttributeAdded.java
modules/servlet/trunk/api/src/main/java/org/jboss/seam/servlet/event/qualifier/AttributeRemoved.java
modules/servlet/trunk/api/src/main/java/org/jboss/seam/servlet/event/qualifier/AttributeReplaced.java
modules/servlet/trunk/api/src/main/java/org/jboss/seam/servlet/event/qualifier/Completed.java
modules/servlet/trunk/api/src/main/java/org/jboss/seam/servlet/event/qualifier/Created.java
modules/servlet/trunk/api/src/main/java/org/jboss/seam/servlet/event/qualifier/Destroyed.java
modules/servlet/trunk/api/src/main/java/org/jboss/seam/servlet/event/qualifier/DidActivate.java
modules/servlet/trunk/api/src/main/java/org/jboss/seam/servlet/event/qualifier/Error.java
modules/servlet/trunk/api/src/main/java/org/jboss/seam/servlet/event/qualifier/Initialized.java
modules/servlet/trunk/api/src/main/java/org/jboss/seam/servlet/event/qualifier/StartAsync.java
modules/servlet/trunk/api/src/main/java/org/jboss/seam/servlet/event/qualifier/Timeout.java
modules/servlet/trunk/api/src/main/java/org/jboss/seam/servlet/event/qualifier/ValueBound.java
modules/servlet/trunk/api/src/main/java/org/jboss/seam/servlet/event/qualifier/ValueUnbound.java
modules/servlet/trunk/api/src/main/java/org/jboss/seam/servlet/event/qualifier/WillPassivate.java
modules/servlet/trunk/api/src/main/java/org/jboss/seam/servlet/http/
modules/servlet/trunk/api/src/main/java/org/jboss/seam/servlet/http/RequestParameter.java
modules/servlet/trunk/api/src/main/resources/
modules/servlet/trunk/api/src/main/resources/META-INF/
modules/servlet/trunk/api/src/main/resources/META-INF/beans.xml
modules/servlet/trunk/api/src/test/
modules/servlet/trunk/api/src/test/java/
modules/servlet/trunk/api/src/test/resources/
modules/servlet/trunk/impl/
modules/servlet/trunk/impl/pom.xml
modules/servlet/trunk/impl/src/
modules/servlet/trunk/impl/src/main/java/org/jboss/seam/servlet/http/
modules/servlet/trunk/impl/src/main/java/org/jboss/seam/servlet/http/ContextualHttpRequest.java
modules/servlet/trunk/impl/src/main/java/org/jboss/seam/servlet/http/HttpArtifacts.java
modules/servlet/trunk/impl/src/main/java/org/jboss/seam/servlet/http/HttpUserArtifacts.java
Removed:
modules/servlet/trunk/impl/src/main/java/org/jboss/seam/servlet/ContextualHttpRequest.java
modules/servlet/trunk/impl/src/main/java/org/jboss/seam/servlet/HttpArtifacts.java
modules/servlet/trunk/impl/src/main/java/org/jboss/seam/servlet/HttpParam.java
modules/servlet/trunk/impl/src/main/java/org/jboss/seam/servlet/HttpUserArtifacts.java
modules/servlet/trunk/impl/src/main/java/org/jboss/seam/servlet/event/qualifier/
modules/servlet/trunk/impl/src/test/java/org/
modules/servlet/trunk/src/
Modified:
modules/servlet/trunk/impl/src/main/java/org/jboss/seam/servlet/event/ServletEventListener.java
modules/servlet/trunk/pom.xml
Log:
Migrated to new folder structure.
Property changes on: modules/servlet/trunk/api
___________________________________________________________________
Name: svn:ignore
+ .settings
target
.classpath
.project
Added: modules/servlet/trunk/api/pom.xml
===================================================================
--- modules/servlet/trunk/api/pom.xml (rev 0)
+++ modules/servlet/trunk/api/pom.xml 2010-04-13 16:35:52 UTC (rev 12475)
@@ -0,0 +1,24 @@
+<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>
+
+ <parent>
+ <artifactId>seam-servlet-parent</artifactId>
+ <groupId>org.jboss.seam.servlet</groupId>
+ <version>3.0.0-SNAPSHOT</version>
+ </parent>
+
+ <artifactId>seam-servlet-api</artifactId>
+ <groupId>org.jboss.seam.servlet</groupId>
+ <version>3.0.0-SNAPSHOT</version>
+
+ <packaging>jar</packaging>
+ <name>Seam Servlet Module API</name>
+
+ <scm>
+ <connection>scm:svn:http://anonsvn.jboss.org/repos/seam/modules/servlet/trunk/api</connection>
+ <developerConnection>scm:svn:https://svn.jboss.org/repos/seam/modules/servlet/trunk/api</developerConnection>
+ <url>http://fisheye.jboss.org/browse/Seam/modules/servlet/trunk/api</url>
+ </scm>
+
+</project>
\ No newline at end of file
Added: modules/servlet/trunk/api/src/main/java/org/jboss/seam/servlet/event/qualifier/AttributeAdded.java
===================================================================
--- modules/servlet/trunk/api/src/main/java/org/jboss/seam/servlet/event/qualifier/AttributeAdded.java (rev 0)
+++ modules/servlet/trunk/api/src/main/java/org/jboss/seam/servlet/event/qualifier/AttributeAdded.java 2010-04-13 16:35:52 UTC (rev 12475)
@@ -0,0 +1,51 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc., and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.seam.servlet.event.qualifier;
+
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.PARAMETER;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+import javax.inject.Qualifier;
+import javax.servlet.ServletContextAttributeEvent;
+import javax.servlet.ServletRequestAttributeEvent;
+import javax.servlet.http.HttpSessionBindingEvent;
+
+/**
+ * Qualifies observer method parameters to select events that fire when
+ * attributes being added.
+ *
+ * The event parameter can be a {@link HttpSessionBindingEvent},
+ * {@link ServletContextAttributeEvent} or a
+ * {@link ServletRequestAttributeEvent}.
+ *
+ * @author Nicklas Karlsson
+ */
+ at Qualifier
+ at Target( { FIELD, PARAMETER })
+ at Retention(RUNTIME)
+public @interface AttributeAdded
+{
+}
\ No newline at end of file
Added: modules/servlet/trunk/api/src/main/java/org/jboss/seam/servlet/event/qualifier/AttributeRemoved.java
===================================================================
--- modules/servlet/trunk/api/src/main/java/org/jboss/seam/servlet/event/qualifier/AttributeRemoved.java (rev 0)
+++ modules/servlet/trunk/api/src/main/java/org/jboss/seam/servlet/event/qualifier/AttributeRemoved.java 2010-04-13 16:35:52 UTC (rev 12475)
@@ -0,0 +1,50 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc., and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.seam.servlet.event.qualifier;
+
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.PARAMETER;
+
+import javax.inject.Qualifier;
+import javax.servlet.ServletContextAttributeEvent;
+import javax.servlet.ServletRequestAttributeEvent;
+import javax.servlet.http.HttpSessionBindingEvent;
+
+/**
+ * Qualifies observer method parameters to select events that fire when
+ * attributes being removed.
+ *
+ * The event parameter can be a {@link HttpSessionBindingEvent},
+ * {@link ServletContextAttributeEvent} or a
+ * {@link ServletRequestAttributeEvent}.
+ *
+ * @author Nicklas Karlsson
+ */
+ at Qualifier
+ at Target( { FIELD, PARAMETER })
+ at Retention(RUNTIME)
+public @interface AttributeRemoved
+{
+}
\ No newline at end of file
Added: modules/servlet/trunk/api/src/main/java/org/jboss/seam/servlet/event/qualifier/AttributeReplaced.java
===================================================================
--- modules/servlet/trunk/api/src/main/java/org/jboss/seam/servlet/event/qualifier/AttributeReplaced.java (rev 0)
+++ modules/servlet/trunk/api/src/main/java/org/jboss/seam/servlet/event/qualifier/AttributeReplaced.java 2010-04-13 16:35:52 UTC (rev 12475)
@@ -0,0 +1,50 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc., and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.seam.servlet.event.qualifier;
+
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.PARAMETER;
+
+import javax.inject.Qualifier;
+import javax.servlet.ServletContextAttributeEvent;
+import javax.servlet.ServletRequestAttributeEvent;
+import javax.servlet.http.HttpSessionBindingEvent;
+
+/**
+ * Qualifies observer method parameters to select events that fire when
+ * attributes being replaced.
+ *
+ * The event parameter can be a {@link HttpSessionBindingEvent},
+ * {@link ServletContextAttributeEvent} or a
+ * {@link ServletRequestAttributeEvent}.
+ *
+ * @author Nicklas Karlsson
+ */
+ at Qualifier
+ at Target( { FIELD, PARAMETER })
+ at Retention(RUNTIME)
+public @interface AttributeReplaced
+{
+}
\ No newline at end of file
Added: modules/servlet/trunk/api/src/main/java/org/jboss/seam/servlet/event/qualifier/Completed.java
===================================================================
--- modules/servlet/trunk/api/src/main/java/org/jboss/seam/servlet/event/qualifier/Completed.java (rev 0)
+++ modules/servlet/trunk/api/src/main/java/org/jboss/seam/servlet/event/qualifier/Completed.java 2010-04-13 16:35:52 UTC (rev 12475)
@@ -0,0 +1,47 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc., and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.seam.servlet.event.qualifier;
+
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.PARAMETER;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+import javax.inject.Qualifier;
+import javax.servlet.AsyncEvent;
+
+/**
+ * Qualifies observer method parameters to select events that fire when
+ * asynchronous request are completed.
+ *
+ * The event parameter is an {@link AsyncEvent}
+ *
+ * @author Nicklas Karlsson
+ */
+ at Qualifier
+ at Target( { FIELD, PARAMETER })
+ at Retention(RUNTIME)
+public @interface Completed
+{
+}
\ No newline at end of file
Added: modules/servlet/trunk/api/src/main/java/org/jboss/seam/servlet/event/qualifier/Created.java
===================================================================
--- modules/servlet/trunk/api/src/main/java/org/jboss/seam/servlet/event/qualifier/Created.java (rev 0)
+++ modules/servlet/trunk/api/src/main/java/org/jboss/seam/servlet/event/qualifier/Created.java 2010-04-13 16:35:52 UTC (rev 12475)
@@ -0,0 +1,45 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc., and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.seam.servlet.event.qualifier;
+
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.PARAMETER;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+import javax.inject.Qualifier;
+import javax.servlet.http.HttpSessionEvent;
+
+/**
+ * Qualifies observer method parameters to select events that fire when HTTP
+ * sessions are created.
+ *
+ * The event parameter is an {@link HttpSessionEvent}
+ *
+ * @author Nicklas Karlsson
+ */
+ at Qualifier
+ at Target({FIELD, PARAMETER})
+ at Retention(RUNTIME)
+public @interface Created {}
\ No newline at end of file
Added: modules/servlet/trunk/api/src/main/java/org/jboss/seam/servlet/event/qualifier/Destroyed.java
===================================================================
--- modules/servlet/trunk/api/src/main/java/org/jboss/seam/servlet/event/qualifier/Destroyed.java (rev 0)
+++ modules/servlet/trunk/api/src/main/java/org/jboss/seam/servlet/event/qualifier/Destroyed.java 2010-04-13 16:35:52 UTC (rev 12475)
@@ -0,0 +1,48 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc., and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.seam.servlet.event.qualifier;
+
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.PARAMETER;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+import javax.inject.Qualifier;
+import javax.servlet.ServletContextEvent;
+import javax.servlet.ServletRequestEvent;
+import javax.servlet.http.HttpSessionEvent;
+
+/**
+ * Qualifies observer method parameters to select events that fire when HTTP
+ * artifacts are being destroyed.
+ *
+ * The event parameter can be a {@link ServletContextEvent},
+ * {@link ServletRequestEvent} or a {@link HttpSessionEvent}.
+ *
+ * @author Nicklas Karlsson
+ */
+ at Qualifier
+ at Target({FIELD, PARAMETER})
+ at Retention(RUNTIME)
+public @interface Destroyed {}
\ No newline at end of file
Added: modules/servlet/trunk/api/src/main/java/org/jboss/seam/servlet/event/qualifier/DidActivate.java
===================================================================
--- modules/servlet/trunk/api/src/main/java/org/jboss/seam/servlet/event/qualifier/DidActivate.java (rev 0)
+++ modules/servlet/trunk/api/src/main/java/org/jboss/seam/servlet/event/qualifier/DidActivate.java 2010-04-13 16:35:52 UTC (rev 12475)
@@ -0,0 +1,46 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc., and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.seam.servlet.event.qualifier;
+
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.PARAMETER;
+
+import javax.inject.Qualifier;
+import javax.servlet.http.HttpSessionEvent;
+
+/**
+ * Qualifies observer method parameters to select events that fire when HTTP
+ * sessions are activated.
+ *
+ * The event parameter is an {@link HttpSessionEvent}
+ *
+ * @author Nicklas Karlsson
+ */
+ at Qualifier
+ at Target( { FIELD, PARAMETER })
+ at Retention(RUNTIME)
+public @interface DidActivate
+{
+}
\ No newline at end of file
Added: modules/servlet/trunk/api/src/main/java/org/jboss/seam/servlet/event/qualifier/Error.java
===================================================================
--- modules/servlet/trunk/api/src/main/java/org/jboss/seam/servlet/event/qualifier/Error.java (rev 0)
+++ modules/servlet/trunk/api/src/main/java/org/jboss/seam/servlet/event/qualifier/Error.java 2010-04-13 16:35:52 UTC (rev 12475)
@@ -0,0 +1,47 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc., and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.seam.servlet.event.qualifier;
+
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.PARAMETER;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+import javax.inject.Qualifier;
+import javax.servlet.AsyncEvent;
+
+/**
+ * Qualifies observer method parameters to select events that involve
+ * asynchronous request failing.
+ *
+ * The event parameter is an {@link AsyncEvent},
+ *
+ * @author Nicklas Karlsson
+ */
+ at Qualifier
+ at Target( { FIELD, PARAMETER })
+ at Retention(RUNTIME)
+public @interface Error
+{
+}
\ No newline at end of file
Added: modules/servlet/trunk/api/src/main/java/org/jboss/seam/servlet/event/qualifier/Initialized.java
===================================================================
--- modules/servlet/trunk/api/src/main/java/org/jboss/seam/servlet/event/qualifier/Initialized.java (rev 0)
+++ modules/servlet/trunk/api/src/main/java/org/jboss/seam/servlet/event/qualifier/Initialized.java 2010-04-13 16:35:52 UTC (rev 12475)
@@ -0,0 +1,49 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc., and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.seam.servlet.event.qualifier;
+
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.PARAMETER;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+import javax.inject.Qualifier;
+import javax.servlet.ServletContextEvent;
+import javax.servlet.ServletRequestEvent;
+
+/**
+ * Qualifies observer method parameters to select events that fire when HTTP
+ * artifacts are being initialized.
+ *
+ * The event parameter can be a {@link ServletContextEvent} or a
+ * {@link ServletRequestEvent}.
+ *
+ * @author Nicklas Karlsson
+ */
+ at Qualifier
+ at Target( { FIELD, PARAMETER })
+ at Retention(RUNTIME)
+public @interface Initialized
+{
+}
\ No newline at end of file
Added: modules/servlet/trunk/api/src/main/java/org/jboss/seam/servlet/event/qualifier/StartAsync.java
===================================================================
--- modules/servlet/trunk/api/src/main/java/org/jboss/seam/servlet/event/qualifier/StartAsync.java (rev 0)
+++ modules/servlet/trunk/api/src/main/java/org/jboss/seam/servlet/event/qualifier/StartAsync.java 2010-04-13 16:35:52 UTC (rev 12475)
@@ -0,0 +1,46 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc., and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.seam.servlet.event.qualifier;
+
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.PARAMETER;
+
+import javax.inject.Qualifier;
+import javax.servlet.AsyncEvent;
+
+/**
+ * Qualifies observer method parameters to select events that involve
+ * asynchronous request starting.
+ *
+ * The event parameter is an {@link AsyncEvent},
+ *
+ * @author Nicklas Karlsson
+ */
+ at Qualifier
+ at Target( { FIELD, PARAMETER })
+ at Retention(RUNTIME)
+public @interface StartAsync
+{
+}
\ No newline at end of file
Added: modules/servlet/trunk/api/src/main/java/org/jboss/seam/servlet/event/qualifier/Timeout.java
===================================================================
--- modules/servlet/trunk/api/src/main/java/org/jboss/seam/servlet/event/qualifier/Timeout.java (rev 0)
+++ modules/servlet/trunk/api/src/main/java/org/jboss/seam/servlet/event/qualifier/Timeout.java 2010-04-13 16:35:52 UTC (rev 12475)
@@ -0,0 +1,46 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc., and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.seam.servlet.event.qualifier;
+
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.PARAMETER;
+
+import javax.inject.Qualifier;
+import javax.servlet.AsyncEvent;
+
+/**
+ * Qualifies observer method parameters to select events that involve
+ * asynchronous request timing out.
+ *
+ * The event parameter is an {@link AsyncEvent},
+ *
+ * @author Nicklas Karlsson
+ */
+ at Qualifier
+ at Target( { FIELD, PARAMETER })
+ at Retention(RUNTIME)
+public @interface Timeout
+{
+}
\ No newline at end of file
Added: modules/servlet/trunk/api/src/main/java/org/jboss/seam/servlet/event/qualifier/ValueBound.java
===================================================================
--- modules/servlet/trunk/api/src/main/java/org/jboss/seam/servlet/event/qualifier/ValueBound.java (rev 0)
+++ modules/servlet/trunk/api/src/main/java/org/jboss/seam/servlet/event/qualifier/ValueBound.java 2010-04-13 16:35:52 UTC (rev 12475)
@@ -0,0 +1,47 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc., and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.seam.servlet.event.qualifier;
+
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.PARAMETER;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+import javax.inject.Qualifier;
+import javax.servlet.http.HttpSessionBindingEvent;
+
+/**
+ * Qualifies observer method parameters to select events that fire when values
+ * are being bound to the HTTP session.
+ *
+ * The event parameter is a {@link HttpSessionBindingEvent}
+ *
+ * @author Nicklas Karlsson
+ */
+ at Qualifier
+ at Target( { FIELD, PARAMETER })
+ at Retention(RUNTIME)
+public @interface ValueBound
+{
+}
\ No newline at end of file
Added: modules/servlet/trunk/api/src/main/java/org/jboss/seam/servlet/event/qualifier/ValueUnbound.java
===================================================================
--- modules/servlet/trunk/api/src/main/java/org/jboss/seam/servlet/event/qualifier/ValueUnbound.java (rev 0)
+++ modules/servlet/trunk/api/src/main/java/org/jboss/seam/servlet/event/qualifier/ValueUnbound.java 2010-04-13 16:35:52 UTC (rev 12475)
@@ -0,0 +1,46 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc., and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.seam.servlet.event.qualifier;
+
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.PARAMETER;
+
+import javax.inject.Qualifier;
+import javax.servlet.http.HttpSessionBindingEvent;
+
+/**
+ * Qualifies observer method parameters to select events that fire when values
+ * are being unbound from the HTTP session.
+ *
+ * The event parameter is a {@link HttpSessionBindingEvent}
+ *
+ * @author Nicklas Karlsson
+ */
+ at Qualifier
+ at Target( { FIELD, PARAMETER })
+ at Retention(RUNTIME)
+public @interface ValueUnbound
+{
+}
\ No newline at end of file
Added: modules/servlet/trunk/api/src/main/java/org/jboss/seam/servlet/event/qualifier/WillPassivate.java
===================================================================
--- modules/servlet/trunk/api/src/main/java/org/jboss/seam/servlet/event/qualifier/WillPassivate.java (rev 0)
+++ modules/servlet/trunk/api/src/main/java/org/jboss/seam/servlet/event/qualifier/WillPassivate.java 2010-04-13 16:35:52 UTC (rev 12475)
@@ -0,0 +1,46 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc., and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.seam.servlet.event.qualifier;
+
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.PARAMETER;
+
+import javax.inject.Qualifier;
+import javax.servlet.http.HttpSessionEvent;
+
+/**
+ * Qualifies observer method parameters to select events that fire when HTTP
+ * sessions are passivated.
+ *
+ * The event parameter is an {@link HttpSessionEvent}
+ *
+ * @author Nicklas Karlsson
+ */
+ at Qualifier
+ at Target( { FIELD, PARAMETER })
+ at Retention(RUNTIME)
+public @interface WillPassivate
+{
+}
\ No newline at end of file
Added: modules/servlet/trunk/api/src/main/java/org/jboss/seam/servlet/http/RequestParameter.java
===================================================================
--- modules/servlet/trunk/api/src/main/java/org/jboss/seam/servlet/http/RequestParameter.java (rev 0)
+++ modules/servlet/trunk/api/src/main/java/org/jboss/seam/servlet/http/RequestParameter.java 2010-04-13 16:35:52 UTC (rev 12475)
@@ -0,0 +1,48 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc., and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.seam.servlet.http;
+
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.ElementType.PARAMETER;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+import javax.enterprise.util.Nonbinding;
+import javax.inject.Qualifier;
+
+/**
+ * Qualifies injection points that should have their values fetched from a HTTP request attribute
+ *
+ * @author Nicklas Karlsson
+ *
+ */
+ at Qualifier
+ at Retention(RUNTIME)
+ at Target( { FIELD, PARAMETER, METHOD })
+public @interface RequestParameter
+{
+ @Nonbinding
+ public String value();
+}
\ No newline at end of file
Added: modules/servlet/trunk/api/src/main/resources/META-INF/beans.xml
===================================================================
--- modules/servlet/trunk/api/src/main/resources/META-INF/beans.xml (rev 0)
+++ modules/servlet/trunk/api/src/main/resources/META-INF/beans.xml 2010-04-13 16:35:52 UTC (rev 12475)
@@ -0,0 +1,27 @@
+<!--
+JBoss, Home of Professional Open Source
+Copyright 2010, Red Hat, Inc., and individual contributors
+by the @authors tag. See the copyright.txt in the distribution for a
+full listing of individual contributors.
+
+This is free software; you can redistribute it and/or modify it
+under the terms of the GNU Lesser General Public License as
+published by the Free Software Foundation; either version 2.1 of
+the License, or (at your option) any later version.
+
+This software is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Lesser General Public License for more details.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this software; if not, write to the Free
+Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+02110-1301 USA, or see the FSF site: http://www.fsf.org.
+-->
+<beans xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="
+ http://java.sun.com/xml/ns/javaee
+ http://java.sun.com/xml/ns/javaee/beans_1_0.xsd">
+
+</beans>
\ No newline at end of file
Property changes on: modules/servlet/trunk/impl
___________________________________________________________________
Name: svn:ignore
+ target
.project
.settings
.classpath
Added: modules/servlet/trunk/impl/pom.xml
===================================================================
--- modules/servlet/trunk/impl/pom.xml (rev 0)
+++ modules/servlet/trunk/impl/pom.xml 2010-04-13 16:35:52 UTC (rev 12475)
@@ -0,0 +1,33 @@
+<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>
+
+ <parent>
+ <artifactId>seam-servlet-parent</artifactId>
+ <groupId>org.jboss.seam.servlet</groupId>
+ <version>3.0.0-SNAPSHOT</version>
+ </parent>
+
+ <artifactId>seam-servlet</artifactId>
+ <groupId>org.jboss.seam.servlet</groupId>
+ <version>3.0.0-SNAPSHOT</version>
+
+ <packaging>jar</packaging>
+ <name>Seam Servlet Module</name>
+
+ <dependencies>
+ <dependency>
+ <artifactId>seam-servlet-api</artifactId>
+ <groupId>org.jboss.seam.servlet</groupId>
+ <version>${project.version}</version>
+ <scope>compile</scope>
+ </dependency>
+ </dependencies>
+
+ <scm>
+ <connection>scm:svn:http://anonsvn.jboss.org/repos/seam/modules/servlet/trunk/impl</connection>
+ <developerConnection>scm:svn:https://svn.jboss.org/repos/seam/modules/servlet/trunk/impl</developerConnection>
+ <url>http://fisheye.jboss.org/browse/Seam/modules/servlet/trunk/impl</url>
+ </scm>
+
+</project>
\ No newline at end of file
Copied: modules/servlet/trunk/impl/src (from rev 12471, modules/servlet/trunk/src)
Deleted: modules/servlet/trunk/impl/src/main/java/org/jboss/seam/servlet/ContextualHttpRequest.java
===================================================================
--- modules/servlet/trunk/src/main/java/org/jboss/seam/servlet/ContextualHttpRequest.java 2010-04-13 15:55:00 UTC (rev 12471)
+++ modules/servlet/trunk/impl/src/main/java/org/jboss/seam/servlet/ContextualHttpRequest.java 2010-04-13 16:35:52 UTC (rev 12475)
@@ -1,75 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc., and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.seam.servlet;
-
-import javax.servlet.http.HttpServletRequest;
-
-import org.jboss.weld.Container;
-import org.jboss.weld.context.ContextLifecycle;
-import org.jboss.weld.conversation.ConversationManager;
-import org.jboss.weld.servlet.ServletLifecycle;
-
-/**
- *
- * @author Nicklas Karlsson
- *
- */
-public abstract class ContextualHttpRequest
-{
- private HttpServletRequest request;
- private ServletLifecycle lifecycle;
- private ConversationManager conversationManager;
-
- public ContextualHttpRequest(HttpServletRequest request)
- {
- this.request = request;
- lifecycle = new ServletLifecycle(Container.instance().services().get(ContextLifecycle.class));
- }
-
- public void run()
- {
- try
- {
- setup();
- process();
- }
- finally
- {
- tearDown();
- }
- }
-
- private void setup()
- {
- lifecycle.beginRequest(request);
- String cid = request.getParameter("cid");
- conversationManager.beginOrRestoreConversation(cid);
- }
-
- private void tearDown()
- {
- conversationManager.cleanupConversation();
- lifecycle.endRequest(request);
- }
-
- protected abstract void process();
-}
Deleted: modules/servlet/trunk/impl/src/main/java/org/jboss/seam/servlet/HttpArtifacts.java
===================================================================
--- modules/servlet/trunk/src/main/java/org/jboss/seam/servlet/HttpArtifacts.java 2010-04-13 15:55:00 UTC (rev 12471)
+++ modules/servlet/trunk/impl/src/main/java/org/jboss/seam/servlet/HttpArtifacts.java 2010-04-13 16:35:52 UTC (rev 12475)
@@ -1,106 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc., and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.seam.servlet;
-
-import javax.enterprise.context.ApplicationScoped;
-import javax.enterprise.event.Observes;
-import javax.enterprise.inject.spi.BeanManager;
-import javax.inject.Inject;
-import javax.servlet.ServletContext;
-import javax.servlet.ServletContextEvent;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpSession;
-
-import org.jboss.seam.servlet.event.qualifier.Initialized;
-
-/**
- *
- * @author Nicklas Karlsson
- *
- * A source for HTTP artifacts. It observes for and stores the
- * ServletContext, HttpServletRequest and HttpSession objects. It also
- * produces the request values for @HttpParam
- */
- at ApplicationScoped
-public class HttpArtifacts
-{
- private ServletContext servletContext;
-
- @Inject
- HttpUserArtifacts httpUserArtifacts;
-
- @Inject
- BeanManager beanManager;
-
- protected void pickup(@Observes @Initialized ServletContextEvent e)
- {
- servletContext = e.getServletContext();
- servletContext.setAttribute(BeanManager.class.getName(), beanManager);
- }
-
- /**
- * Gets the current servlet context
- *
- * @throws IllegalStateException if the servlet context has not been set
- * @return The servlet context
- */
- public ServletContext getServletContext()
- {
- if (servletContext == null)
- {
- throw new IllegalStateException("Servlet Context is not set");
- }
- return servletContext;
- }
-
- /**
- * Gets the current HTTP servlet request
- *
- * @throws IllegalStateException if the request has not been set
- * @return the request
- */
- public HttpServletRequest getRequest()
- {
- HttpServletRequest request = httpUserArtifacts.getRequest();
- if (request == null)
- {
- throw new IllegalStateException("HTTP servlet request is not set");
- }
- return request;
- }
-
- /**
- * Gets the current HTTP session
- *
- * @throws IllegalStateException if the session has not been set
- * @return the session
- */
- public HttpSession getSession()
- {
- HttpSession session = httpUserArtifacts.getSession();
- if (session == null)
- {
- throw new IllegalStateException("HTTP session is not set");
- }
- return session;
- }
-}
\ No newline at end of file
Deleted: modules/servlet/trunk/impl/src/main/java/org/jboss/seam/servlet/HttpParam.java
===================================================================
--- modules/servlet/trunk/src/main/java/org/jboss/seam/servlet/HttpParam.java 2010-04-13 15:55:00 UTC (rev 12471)
+++ modules/servlet/trunk/impl/src/main/java/org/jboss/seam/servlet/HttpParam.java 2010-04-13 16:35:52 UTC (rev 12475)
@@ -1,48 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc., and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.seam.servlet;
-
-import static java.lang.annotation.ElementType.FIELD;
-import static java.lang.annotation.ElementType.METHOD;
-import static java.lang.annotation.ElementType.PARAMETER;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-
-import javax.enterprise.util.Nonbinding;
-import javax.inject.Qualifier;
-
-/**
- * Qualifies injection points that should have their values fetched from a HTTP request attribute
- *
- * @author Nicklas Karlsson
- *
- */
- at Qualifier
- at Retention(RUNTIME)
- at Target( { FIELD, PARAMETER, METHOD })
-public @interface HttpParam
-{
- @Nonbinding
- public String value();
-}
\ No newline at end of file
Deleted: modules/servlet/trunk/impl/src/main/java/org/jboss/seam/servlet/HttpUserArtifacts.java
===================================================================
--- modules/servlet/trunk/src/main/java/org/jboss/seam/servlet/HttpUserArtifacts.java 2010-04-13 15:55:00 UTC (rev 12471)
+++ modules/servlet/trunk/impl/src/main/java/org/jboss/seam/servlet/HttpUserArtifacts.java 2010-04-13 16:35:52 UTC (rev 12475)
@@ -1,100 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc., and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.seam.servlet;
-
-import java.io.Serializable;
-
-import javax.enterprise.context.RequestScoped;
-import javax.enterprise.event.Observes;
-import javax.enterprise.inject.Produces;
-import javax.enterprise.inject.spi.InjectionPoint;
-import javax.inject.Inject;
-import javax.servlet.ServletRequestEvent;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpSession;
-import javax.servlet.http.HttpSessionEvent;
-
-import org.jboss.seam.servlet.event.qualifier.Created;
-import org.jboss.seam.servlet.event.qualifier.Destroyed;
-import org.jboss.seam.servlet.event.qualifier.Initialized;
-import org.slf4j.Logger;
-
-/**
- * A manager for acquiring HTTP artifacts
- *
- * @author Nicklas Karlsson
- *
- */
- at RequestScoped
-public class HttpUserArtifacts implements Serializable
-{
- private static final long serialVersionUID = 5191073522575178427L;
-
- private HttpSession session;
- private HttpServletRequest request;
-
- @Inject
- private Logger log;
-
- protected void requestInitialized(@Observes @Initialized ServletRequestEvent e)
- {
- log.trace("Servlet request initialized with event #0", e);
- request = (HttpServletRequest) e.getServletRequest();
- session = request.getSession();
- }
-
- protected void requestDestroyed(@Observes @Destroyed ServletRequestEvent e)
- {
- log.trace("Servlet request destroyed with event #0", e);
- request = null;
- }
-
- protected void sessionInitialized(@Observes @Created HttpSessionEvent e)
- {
- log.trace("HTTP session initalized with event #0", e);
- session = e.getSession();
- }
-
- protected void sessionDestroyed(@Observes @Destroyed HttpSessionEvent e)
- {
- log.trace("HTTP session destroyed with event #0", e);
- session = null;
- }
-
- protected HttpSession getSession()
- {
- return session;
- }
-
- protected HttpServletRequest getRequest()
- {
- return request;
- }
-
- @Produces
- @HttpParam("")
- protected String getParamValue(InjectionPoint ip)
- {
- return getRequest().getParameter(ip.getAnnotated().getAnnotation(HttpParam.class).value());
- }
-
-}
Modified: modules/servlet/trunk/impl/src/main/java/org/jboss/seam/servlet/event/ServletEventListener.java
===================================================================
--- modules/servlet/trunk/src/main/java/org/jboss/seam/servlet/event/ServletEventListener.java 2010-04-13 15:55:00 UTC (rev 12471)
+++ modules/servlet/trunk/impl/src/main/java/org/jboss/seam/servlet/event/ServletEventListener.java 2010-04-13 16:35:52 UTC (rev 12475)
@@ -37,7 +37,6 @@
import javax.servlet.ServletRequestAttributeListener;
import javax.servlet.ServletRequestEvent;
import javax.servlet.ServletRequestListener;
-import javax.servlet.annotation.WebListener;
import javax.servlet.http.HttpSessionActivationListener;
import javax.servlet.http.HttpSessionAttributeListener;
import javax.servlet.http.HttpSessionBindingEvent;
@@ -48,7 +47,7 @@
import org.jboss.seam.servlet.event.qualifier.AttributeAdded;
import org.jboss.seam.servlet.event.qualifier.AttributeRemoved;
import org.jboss.seam.servlet.event.qualifier.AttributeReplaced;
-import org.jboss.seam.servlet.event.qualifier.Complete;
+import org.jboss.seam.servlet.event.qualifier.Completed;
import org.jboss.seam.servlet.event.qualifier.Created;
import org.jboss.seam.servlet.event.qualifier.Destroyed;
import org.jboss.seam.servlet.event.qualifier.DidActivate;
@@ -63,8 +62,8 @@
import org.slf4j.LoggerFactory;
/**
- * A servlet listener that propagates the events to the current CDI
- * Bean Manager event queue
+ * A servlet listener that propagates the events to the current CDI Bean Manager
+ * event queue
*
* @author Nicklas Karlsson
*
@@ -74,13 +73,13 @@
@Inject
private BeanManager beanManager;
- private Logger log = LoggerFactory.getLogger(ServletEventListener.class);
+ private final Logger log = LoggerFactory.getLogger(ServletEventListener.class);
/**
* Session activated / passivated events
*/
- public void sessionDidActivate(HttpSessionEvent e)
+ public void sessionDidActivate(final HttpSessionEvent e)
{
fireEvent(e, new AnnotationLiteral<DidActivate>()
{
@@ -88,7 +87,7 @@
});
}
- public void sessionWillPassivate(HttpSessionEvent e)
+ public void sessionWillPassivate(final HttpSessionEvent e)
{
fireEvent(e, new AnnotationLiteral<WillPassivate>()
{
@@ -100,7 +99,7 @@
* Session attribute events
*/
- public void attributeAdded(HttpSessionBindingEvent e)
+ public void attributeAdded(final HttpSessionBindingEvent e)
{
fireEvent(e, new AnnotationLiteral<AttributeAdded>()
{
@@ -108,7 +107,7 @@
});
}
- public void attributeRemoved(HttpSessionBindingEvent e)
+ public void attributeRemoved(final HttpSessionBindingEvent e)
{
fireEvent(e, new AnnotationLiteral<AttributeRemoved>()
{
@@ -116,7 +115,7 @@
});
}
- public void attributeReplaced(HttpSessionBindingEvent e)
+ public void attributeReplaced(final HttpSessionBindingEvent e)
{
fireEvent(e, new AnnotationLiteral<AttributeReplaced>()
{
@@ -124,7 +123,7 @@
});
}
- public void valueBound(HttpSessionBindingEvent e)
+ public void valueBound(final HttpSessionBindingEvent e)
{
fireEvent(e, new AnnotationLiteral<ValueBound>()
{
@@ -132,7 +131,7 @@
});
}
- public void valueUnbound(HttpSessionBindingEvent e)
+ public void valueUnbound(final HttpSessionBindingEvent e)
{
fireEvent(e, new AnnotationLiteral<ValueUnbound>()
{
@@ -144,7 +143,7 @@
* Session created / destroyed events
*/
- public void sessionCreated(HttpSessionEvent e)
+ public void sessionCreated(final HttpSessionEvent e)
{
fireEvent(e, new AnnotationLiteral<Created>()
{
@@ -152,7 +151,7 @@
});
}
- public void sessionDestroyed(HttpSessionEvent e)
+ public void sessionDestroyed(final HttpSessionEvent e)
{
fireEvent(e, new AnnotationLiteral<Destroyed>()
{
@@ -164,7 +163,7 @@
* Servlet context initialized / destroyed events
*/
- public void contextDestroyed(ServletContextEvent e)
+ public void contextDestroyed(final ServletContextEvent e)
{
fireEvent(e, new AnnotationLiteral<Destroyed>()
{
@@ -172,7 +171,7 @@
});
}
- public void contextInitialized(ServletContextEvent e)
+ public void contextInitialized(final ServletContextEvent e)
{
fireEvent(e, new AnnotationLiteral<Initialized>()
{
@@ -184,7 +183,7 @@
* Servlet context attribute events
*/
- public void attributeAdded(ServletContextAttributeEvent e)
+ public void attributeAdded(final ServletContextAttributeEvent e)
{
fireEvent(e, new AnnotationLiteral<AttributeAdded>()
{
@@ -192,7 +191,7 @@
});
}
- public void attributeRemoved(ServletContextAttributeEvent e)
+ public void attributeRemoved(final ServletContextAttributeEvent e)
{
fireEvent(e, new AnnotationLiteral<AttributeRemoved>()
{
@@ -200,7 +199,7 @@
});
}
- public void attributeReplaced(ServletContextAttributeEvent e)
+ public void attributeReplaced(final ServletContextAttributeEvent e)
{
fireEvent(e, new AnnotationLiteral<AttributeReplaced>()
{
@@ -212,7 +211,7 @@
* Request created / destroyed events
*/
- public void requestDestroyed(ServletRequestEvent e)
+ public void requestDestroyed(final ServletRequestEvent e)
{
fireEvent(e, new AnnotationLiteral<Destroyed>()
{
@@ -220,7 +219,7 @@
});
}
- public void requestInitialized(ServletRequestEvent e)
+ public void requestInitialized(final ServletRequestEvent e)
{
fireEvent(e, new AnnotationLiteral<Initialized>()
{
@@ -232,7 +231,7 @@
* Servlet request attribute events
*/
- public void attributeAdded(ServletRequestAttributeEvent e)
+ public void attributeAdded(final ServletRequestAttributeEvent e)
{
fireEvent(e, new AnnotationLiteral<AttributeAdded>()
{
@@ -240,7 +239,7 @@
});
}
- public void attributeRemoved(ServletRequestAttributeEvent e)
+ public void attributeRemoved(final ServletRequestAttributeEvent e)
{
fireEvent(e, new AnnotationLiteral<AttributeRemoved>()
{
@@ -248,7 +247,7 @@
});
}
- public void attributeReplaced(ServletRequestAttributeEvent e)
+ public void attributeReplaced(final ServletRequestAttributeEvent e)
{
fireEvent(e, new AnnotationLiteral<AttributeReplaced>()
{
@@ -260,15 +259,15 @@
* Asynchronous events
*/
- public void onComplete(AsyncEvent e) throws IOException
+ public void onComplete(final AsyncEvent e) throws IOException
{
- fireEvent(e, new AnnotationLiteral<Complete>()
+ fireEvent(e, new AnnotationLiteral<Completed>()
{
private static final long serialVersionUID = 1L;
});
}
- public void onError(AsyncEvent e) throws IOException
+ public void onError(final AsyncEvent e) throws IOException
{
fireEvent(e, new AnnotationLiteral<Error>()
{
@@ -276,7 +275,7 @@
});
}
- public void onStartAsync(AsyncEvent e) throws IOException
+ public void onStartAsync(final AsyncEvent e) throws IOException
{
fireEvent(e, new AnnotationLiteral<StartAsync>()
{
@@ -284,7 +283,7 @@
});
}
- public void onTimeout(AsyncEvent e) throws IOException
+ public void onTimeout(final AsyncEvent e) throws IOException
{
fireEvent(e, new AnnotationLiteral<Timeout>()
{
@@ -292,7 +291,7 @@
});
}
- private void fireEvent(Object payload, Annotation... qualifiers)
+ private void fireEvent(final Object payload, final Annotation... qualifiers)
{
log.trace("Firing event #0 with qualifiers #1", payload, qualifiers);
beanManager.fireEvent(payload, qualifiers);
Added: modules/servlet/trunk/impl/src/main/java/org/jboss/seam/servlet/http/ContextualHttpRequest.java
===================================================================
--- modules/servlet/trunk/impl/src/main/java/org/jboss/seam/servlet/http/ContextualHttpRequest.java (rev 0)
+++ modules/servlet/trunk/impl/src/main/java/org/jboss/seam/servlet/http/ContextualHttpRequest.java 2010-04-13 16:35:52 UTC (rev 12475)
@@ -0,0 +1,75 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc., and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.seam.servlet.http;
+
+import javax.servlet.http.HttpServletRequest;
+
+import org.jboss.weld.Container;
+import org.jboss.weld.context.ContextLifecycle;
+import org.jboss.weld.conversation.ConversationManager;
+import org.jboss.weld.servlet.ServletLifecycle;
+
+/**
+ *
+ * @author Nicklas Karlsson
+ *
+ */
+public abstract class ContextualHttpRequest
+{
+ private HttpServletRequest request;
+ private ServletLifecycle lifecycle;
+ private ConversationManager conversationManager;
+
+ public ContextualHttpRequest(HttpServletRequest request)
+ {
+ this.request = request;
+ lifecycle = new ServletLifecycle(Container.instance().services().get(ContextLifecycle.class));
+ }
+
+ public void run()
+ {
+ try
+ {
+ setup();
+ process();
+ }
+ finally
+ {
+ tearDown();
+ }
+ }
+
+ private void setup()
+ {
+ lifecycle.beginRequest(request);
+ String cid = request.getParameter("cid");
+ conversationManager.beginOrRestoreConversation(cid);
+ }
+
+ private void tearDown()
+ {
+ conversationManager.cleanupConversation();
+ lifecycle.endRequest(request);
+ }
+
+ protected abstract void process();
+}
Added: modules/servlet/trunk/impl/src/main/java/org/jboss/seam/servlet/http/HttpArtifacts.java
===================================================================
--- modules/servlet/trunk/impl/src/main/java/org/jboss/seam/servlet/http/HttpArtifacts.java (rev 0)
+++ modules/servlet/trunk/impl/src/main/java/org/jboss/seam/servlet/http/HttpArtifacts.java 2010-04-13 16:35:52 UTC (rev 12475)
@@ -0,0 +1,106 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc., and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.seam.servlet.http;
+
+import javax.enterprise.context.ApplicationScoped;
+import javax.enterprise.event.Observes;
+import javax.enterprise.inject.spi.BeanManager;
+import javax.inject.Inject;
+import javax.servlet.ServletContext;
+import javax.servlet.ServletContextEvent;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpSession;
+
+import org.jboss.seam.servlet.event.qualifier.Initialized;
+
+/**
+ *
+ * @author Nicklas Karlsson
+ *
+ * A source for HTTP artifacts. It observes for and stores the
+ * ServletContext, HttpServletRequest and HttpSession objects. It also
+ * produces the request values for @HttpParam
+ */
+ at ApplicationScoped
+public class HttpArtifacts
+{
+ private ServletContext servletContext;
+
+ @Inject
+ HttpUserArtifacts httpUserArtifacts;
+
+ @Inject
+ BeanManager beanManager;
+
+ protected void pickup(@Observes @Initialized ServletContextEvent e)
+ {
+ servletContext = e.getServletContext();
+ servletContext.setAttribute(BeanManager.class.getName(), beanManager);
+ }
+
+ /**
+ * Gets the current servlet context
+ *
+ * @throws IllegalStateException if the servlet context has not been set
+ * @return The servlet context
+ */
+ public ServletContext getServletContext()
+ {
+ if (servletContext == null)
+ {
+ throw new IllegalStateException("Servlet Context is not set");
+ }
+ return servletContext;
+ }
+
+ /**
+ * Gets the current HTTP servlet request
+ *
+ * @throws IllegalStateException if the request has not been set
+ * @return the request
+ */
+ public HttpServletRequest getRequest()
+ {
+ HttpServletRequest request = httpUserArtifacts.getRequest();
+ if (request == null)
+ {
+ throw new IllegalStateException("HTTP servlet request is not set");
+ }
+ return request;
+ }
+
+ /**
+ * Gets the current HTTP session
+ *
+ * @throws IllegalStateException if the session has not been set
+ * @return the session
+ */
+ public HttpSession getSession()
+ {
+ HttpSession session = httpUserArtifacts.getSession();
+ if (session == null)
+ {
+ throw new IllegalStateException("HTTP session is not set");
+ }
+ return session;
+ }
+}
\ No newline at end of file
Added: modules/servlet/trunk/impl/src/main/java/org/jboss/seam/servlet/http/HttpUserArtifacts.java
===================================================================
--- modules/servlet/trunk/impl/src/main/java/org/jboss/seam/servlet/http/HttpUserArtifacts.java (rev 0)
+++ modules/servlet/trunk/impl/src/main/java/org/jboss/seam/servlet/http/HttpUserArtifacts.java 2010-04-13 16:35:52 UTC (rev 12475)
@@ -0,0 +1,101 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc., and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.seam.servlet.http;
+
+import java.io.Serializable;
+
+import javax.enterprise.context.RequestScoped;
+import javax.enterprise.event.Observes;
+import javax.enterprise.inject.Produces;
+import javax.enterprise.inject.spi.InjectionPoint;
+import javax.inject.Inject;
+import javax.servlet.ServletRequestEvent;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpSession;
+import javax.servlet.http.HttpSessionEvent;
+
+import org.jboss.seam.servlet.event.qualifier.Created;
+import org.jboss.seam.servlet.event.qualifier.Destroyed;
+import org.jboss.seam.servlet.event.qualifier.Initialized;
+import org.jboss.seam.servlet.http.RequestParameter;
+import org.slf4j.Logger;
+
+/**
+ * A manager for acquiring HTTP artifacts
+ *
+ * @author Nicklas Karlsson
+ *
+ */
+ at RequestScoped
+public class HttpUserArtifacts implements Serializable
+{
+ private static final long serialVersionUID = 5191073522575178427L;
+
+ private HttpSession session;
+ private HttpServletRequest request;
+
+ @Inject
+ private Logger log;
+
+ protected void requestInitialized(@Observes @Initialized ServletRequestEvent e)
+ {
+ log.trace("Servlet request initialized with event #0", e);
+ request = (HttpServletRequest) e.getServletRequest();
+ session = request.getSession();
+ }
+
+ protected void requestDestroyed(@Observes @Destroyed ServletRequestEvent e)
+ {
+ log.trace("Servlet request destroyed with event #0", e);
+ request = null;
+ }
+
+ protected void sessionInitialized(@Observes @Created HttpSessionEvent e)
+ {
+ log.trace("HTTP session initalized with event #0", e);
+ session = e.getSession();
+ }
+
+ protected void sessionDestroyed(@Observes @Destroyed HttpSessionEvent e)
+ {
+ log.trace("HTTP session destroyed with event #0", e);
+ session = null;
+ }
+
+ protected HttpSession getSession()
+ {
+ return session;
+ }
+
+ protected HttpServletRequest getRequest()
+ {
+ return request;
+ }
+
+ @Produces
+ @RequestParameter("")
+ protected String getParamValue(InjectionPoint ip)
+ {
+ return getRequest().getParameter(ip.getAnnotated().getAnnotation(RequestParameter.class).value());
+ }
+
+}
Modified: modules/servlet/trunk/pom.xml
===================================================================
--- modules/servlet/trunk/pom.xml 2010-04-13 16:32:35 UTC (rev 12474)
+++ modules/servlet/trunk/pom.xml 2010-04-13 16:35:52 UTC (rev 12475)
@@ -1,40 +1,30 @@
<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>
-
+
<parent>
<artifactId>seam-parent</artifactId>
<groupId>org.jboss.seam</groupId>
<version>3.0.0-SNAPSHOT</version>
</parent>
-
- <artifactId>seam-servlet</artifactId>
+
+ <artifactId>seam-servlet-parent</artifactId>
+ <groupId>org.jboss.seam.servlet</groupId>
<version>3.0.0-SNAPSHOT</version>
-
- <packaging>jar</packaging>
+
+ <packaging>pom</packaging>
<name>Seam Servlet Module</name>
-
- <developers>
- <developer>
- <name>Nicklas Karlsson</name>
- <email>nickarls at gmail.com</email>
- <roles>
- <role>Project Lead</role>
- </roles>
- </developer>
- <developer>
- <name>Lincoln Baxter, III</name>
- <email>lincolnbaxter at 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>
- </developers>
+ <description>The Parent for Seam Servlet Module</description>
+ <url>http://www.seamframework.org</url>
+
+ <modules>
+ <module>api</module>
+ <module>impl</module>
+ <!--module>docs</module-->
+ <!--module>examples/??</module-->
+ </modules>
+
<properties>
<arquillian.version>1.0.0.Alpha1</arquillian.version>
<weld.version>1.0.1-Final</weld.version>
@@ -78,12 +68,12 @@
<artifactId>weld-extensions</artifactId>
<version>1.0.0.Alpha1</version>
<scope>provided</scope>
- </dependency>
+ </dependency>
<dependency>
<groupId>org.jboss.weld</groupId>
<artifactId>weld-core</artifactId>
<version>${weld.version}</version>
- </dependency>
+ </dependency>
<!-- Test Dependencies -->
<dependency>
@@ -106,10 +96,31 @@
</dependency>
</dependencies>
+ <developers>
+ <developer>
+ <name>Nicklas Karlsson</name>
+ <email>nickarls at gmail.com</email>
+ <roles>
+ <role>Project Lead</role>
+ </roles>
+ </developer>
+ <developer>
+ <name>Lincoln Baxter, III</name>
+ <email>lincolnbaxter at 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>
+ </developers>
+
<scm>
<connection>scm:svn:http://anonsvn.jboss.org/repos/seam/modules/servlet/trunk</connection>
<developerConnection>scm:svn:https://svn.jboss.org/repos/seam/modules/servlet/trunk</developerConnection>
- <url>http://fisheye.jboss.org/browse/Seam/modules/servlet/trunk</url>
+ <url>http://fisheye.jboss.org/browse/Seam/modules/servlet/trunk</url>
</scm>
-
+
</project>
\ No newline at end of file
More information about the seam-commits
mailing list