Seam SVN: r12480 - in modules/drools/trunk/impl/src/test/java/org/jboss/seam/drools/test: ksession and 1 other directory.
by seam-commits@lists.jboss.org
Author: tsurdilovic
Date: 2010-04-13 16:08:10 -0400 (Tue, 13 Apr 2010)
New Revision: 12480
Added:
modules/drools/trunk/impl/src/test/java/org/jboss/seam/drools/test/kbase/KBaseTestFilter.java
modules/drools/trunk/impl/src/test/java/org/jboss/seam/drools/test/ksession/KSessionTestFiler.java
Modified:
modules/drools/trunk/impl/src/test/java/org/jboss/seam/drools/test/kbase/KBaseTest.java
modules/drools/trunk/impl/src/test/java/org/jboss/seam/drools/test/ksession/KSessionTest.java
Log:
Added filters to test classes so that classes from other test packages do not get picked up.
Modified: modules/drools/trunk/impl/src/test/java/org/jboss/seam/drools/test/kbase/KBaseTest.java
===================================================================
--- modules/drools/trunk/impl/src/test/java/org/jboss/seam/drools/test/kbase/KBaseTest.java 2010-04-13 19:24:35 UTC (rev 12479)
+++ modules/drools/trunk/impl/src/test/java/org/jboss/seam/drools/test/kbase/KBaseTest.java 2010-04-13 20:08:10 UTC (rev 12480)
@@ -27,7 +27,7 @@
{
String pkgPath = KBaseTest.class.getPackage().getName().replaceAll("\\.", "/");
JavaArchive archive = Archives.create("test.jar", JavaArchive.class)
- .addPackages(true, KnowledgeBaseProducer.class.getPackage())
+ .addPackages(true, new KBaseTestFilter(), KnowledgeBaseProducer.class.getPackage())
.addPackages(true, ResourceProvider.class.getPackage())
.addClass(KBaseTestQualifier.class)
.addClass(MyKnowledgeBaseEventListener.class)
Added: modules/drools/trunk/impl/src/test/java/org/jboss/seam/drools/test/kbase/KBaseTestFilter.java
===================================================================
--- modules/drools/trunk/impl/src/test/java/org/jboss/seam/drools/test/kbase/KBaseTestFilter.java (rev 0)
+++ modules/drools/trunk/impl/src/test/java/org/jboss/seam/drools/test/kbase/KBaseTestFilter.java 2010-04-13 20:08:10 UTC (rev 12480)
@@ -0,0 +1,19 @@
+package org.jboss.seam.drools.test.kbase;
+
+import org.jboss.shrinkwrap.api.Filter;
+
+public class KBaseTestFilter implements Filter<Class<?>>
+{
+
+ public boolean include(Class<?> clazz)
+ {
+ // exclude classes in all other test packages except your own
+ if(clazz.getPackage().getName().startsWith("org.jboss.seam.drools.test")
+ && !clazz.getPackage().getName().equals(KBaseTestFilter.class.getPackage().getName())) {
+ return false;
+ } else {
+ return true;
+ }
+ }
+
+}
Modified: modules/drools/trunk/impl/src/test/java/org/jboss/seam/drools/test/ksession/KSessionTest.java
===================================================================
--- modules/drools/trunk/impl/src/test/java/org/jboss/seam/drools/test/ksession/KSessionTest.java 2010-04-13 19:24:35 UTC (rev 12479)
+++ modules/drools/trunk/impl/src/test/java/org/jboss/seam/drools/test/ksession/KSessionTest.java 2010-04-13 20:08:10 UTC (rev 12480)
@@ -26,7 +26,7 @@
{
String pkgPath = KSessionTest.class.getPackage().getName().replaceAll("\\.", "/");
JavaArchive archive = Archives.create("test.jar", JavaArchive.class)
- .addPackages(true, KnowledgeBaseProducer.class.getPackage())
+ .addPackages(true, new KSessionTestFiler(), KnowledgeBaseProducer.class.getPackage())
.addPackages(true, ResourceProvider.class.getPackage())
.addClass(KSessionTestQualifier.class)
.addResource(pkgPath + "/ksessiontest.drl", ArchivePaths.create("ksessiontest.drl"))
Added: modules/drools/trunk/impl/src/test/java/org/jboss/seam/drools/test/ksession/KSessionTestFiler.java
===================================================================
--- modules/drools/trunk/impl/src/test/java/org/jboss/seam/drools/test/ksession/KSessionTestFiler.java (rev 0)
+++ modules/drools/trunk/impl/src/test/java/org/jboss/seam/drools/test/ksession/KSessionTestFiler.java 2010-04-13 20:08:10 UTC (rev 12480)
@@ -0,0 +1,19 @@
+package org.jboss.seam.drools.test.ksession;
+
+import org.jboss.shrinkwrap.api.Filter;
+
+public class KSessionTestFiler implements Filter<Class<?>>
+{
+
+ public boolean include(Class<?> clazz)
+ {
+ // exclude classes in all other test packages except your own
+ if(clazz.getPackage().getName().startsWith("org.jboss.seam.drools.test")
+ && !clazz.getPackage().getName().equals(KSessionTestFiler.class.getPackage().getName())) {
+ return false;
+ } else {
+ return true;
+ }
+ }
+
+}
16 years
Seam SVN: r12479 - in modules/drools/trunk: impl/src/main/java/org/jboss/seam/drools and 7 other directories.
by seam-commits@lists.jboss.org
Author: tsurdilovic
Date: 2010-04-13 15:24:35 -0400 (Tue, 13 Apr 2010)
New Revision: 12479
Added:
modules/drools/trunk/impl/src/test/java/org/jboss/seam/drools/test/kbase/KBaseTestQualifier.java
modules/drools/trunk/impl/src/test/java/org/jboss/seam/drools/test/ksession/
modules/drools/trunk/impl/src/test/java/org/jboss/seam/drools/test/ksession/KSessionTest.java
modules/drools/trunk/impl/src/test/java/org/jboss/seam/drools/test/ksession/KSessionTestQualifier.java
modules/drools/trunk/impl/src/test/java/org/jboss/seam/drools/test/ksession/MyDummyWorkItemHandler.java
modules/drools/trunk/impl/src/test/java/org/jboss/seam/drools/test/ksession/MyKnowledgeSessionEventListener.java
modules/drools/trunk/impl/src/test/java/org/jboss/seam/drools/test/ksession/MySecondKnowledgeBaseEventListener.java
modules/drools/trunk/impl/src/test/resources/org/jboss/seam/drools/test/ksession/
modules/drools/trunk/impl/src/test/resources/org/jboss/seam/drools/test/ksession/KSessionTest-beans.xml
modules/drools/trunk/impl/src/test/resources/org/jboss/seam/drools/test/ksession/kbaseconfig.properties
modules/drools/trunk/impl/src/test/resources/org/jboss/seam/drools/test/ksession/kbuilderconfig.properties
modules/drools/trunk/impl/src/test/resources/org/jboss/seam/drools/test/ksession/ksessiontest.drl
Removed:
modules/drools/trunk/impl/src/test/java/org/jboss/seam/drools/test/kbase/ForKBaseTest.java
modules/drools/trunk/impl/src/test/java/org/jboss/seam/drools/test/kbase/MyDummyWorkItemHandler.java
modules/drools/trunk/impl/src/test/java/org/jboss/seam/drools/test/kbase/MyKnowledgeSessionEventListener.java
modules/drools/trunk/impl/src/test/java/org/jboss/seam/drools/test/kbase/MyOtherDummyWorkItemHandler.java
modules/drools/trunk/impl/src/test/java/org/jboss/seam/drools/test/kbase/MySecondKnowledgeBaseEventListener.java
Modified:
modules/drools/trunk/api/src/main/java/org/jboss/seam/drools/qualifiers/TemplateData.java
modules/drools/trunk/api/src/main/java/org/jboss/seam/drools/qualifiers/WIHandler.java
modules/drools/trunk/impl/src/main/java/org/jboss/seam/drools/KnowledgeSessionProducer.java
modules/drools/trunk/impl/src/main/java/org/jboss/seam/drools/bootstrap/DroolsExtension.java
modules/drools/trunk/impl/src/test/java/org/jboss/seam/drools/test/kbase/KBaseTest.java
modules/drools/trunk/impl/src/test/java/org/jboss/seam/drools/test/kbase/SimpleTemplateDataProvider.java
modules/drools/trunk/impl/src/test/resources/org/jboss/seam/drools/test/kbase/KBaseTest-beans.xml
modules/drools/trunk/impl/src/test/resources/org/jboss/seam/drools/test/kbase/kbasetest.drl
modules/drools/trunk/impl/src/test/resources/org/jboss/seam/drools/test/kbase/kbuilderconfig.properties
Log:
added ksession test (need to check in to look at possible arquillian issue with aslak)
Modified: modules/drools/trunk/api/src/main/java/org/jboss/seam/drools/qualifiers/TemplateData.java
===================================================================
--- modules/drools/trunk/api/src/main/java/org/jboss/seam/drools/qualifiers/TemplateData.java 2010-04-13 17:55:46 UTC (rev 12478)
+++ modules/drools/trunk/api/src/main/java/org/jboss/seam/drools/qualifiers/TemplateData.java 2010-04-13 19:24:35 UTC (rev 12479)
@@ -21,5 +21,5 @@
@Retention(RUNTIME)
@Inherited
public @interface TemplateData {
- @Nonbinding String name();
+ @Nonbinding String value();
}
Modified: modules/drools/trunk/api/src/main/java/org/jboss/seam/drools/qualifiers/WIHandler.java
===================================================================
--- modules/drools/trunk/api/src/main/java/org/jboss/seam/drools/qualifiers/WIHandler.java 2010-04-13 17:55:46 UTC (rev 12478)
+++ modules/drools/trunk/api/src/main/java/org/jboss/seam/drools/qualifiers/WIHandler.java 2010-04-13 19:24:35 UTC (rev 12479)
@@ -24,5 +24,5 @@
@Retention(RUNTIME)
@Inherited
public @interface WIHandler {
- @Nonbinding String name();
+ @Nonbinding String value();
}
Modified: modules/drools/trunk/impl/src/main/java/org/jboss/seam/drools/KnowledgeSessionProducer.java
===================================================================
--- modules/drools/trunk/impl/src/main/java/org/jboss/seam/drools/KnowledgeSessionProducer.java 2010-04-13 17:55:46 UTC (rev 12478)
+++ modules/drools/trunk/impl/src/main/java/org/jboss/seam/drools/KnowledgeSessionProducer.java 2010-04-13 19:24:35 UTC (rev 12479)
@@ -45,9 +45,9 @@
@Produces
@KBaseConfigured
- public StatefulKnowledgeSession produceStatefulSession(@KBaseConfigured KnowledgeBase kbase, Instance<DroolsConfiguration> ksessionConfigInstance) throws Exception
+ public StatefulKnowledgeSession produceStatefulSession(@KBaseConfigured KnowledgeBase kbase, @Any DroolsConfiguration ksessionConfig) throws Exception
{
- StatefulKnowledgeSession ksession = kbase.newStatefulKnowledgeSession(getConfig(ksessionConfigInstance.get().getKnowledgeSessionConfigPath()), null);
+ StatefulKnowledgeSession ksession = kbase.newStatefulKnowledgeSession(getConfig(ksessionConfig.getKnowledgeSessionConfigPath()), null);
addEventListeners(ksession);
addWorkItemHandlers(ksession);
@@ -56,9 +56,9 @@
@Produces
@KAgentConfigured
- StatefulKnowledgeSession produceStatefulSessionFromKAgent(@KAgentConfigured KnowledgeBase kbase, Instance<DroolsConfiguration> ksessionConfigInstance) throws Exception
+ StatefulKnowledgeSession produceStatefulSessionFromKAgent(@KAgentConfigured KnowledgeBase kbase, @Any DroolsConfiguration ksessionConfig) throws Exception
{
- StatefulKnowledgeSession ksession = kbase.newStatefulKnowledgeSession(getConfig(ksessionConfigInstance.get().getKnowledgeSessionConfigPath()), null);
+ StatefulKnowledgeSession ksession = kbase.newStatefulKnowledgeSession(getConfig(ksessionConfig.getKnowledgeSessionConfigPath()), null);
addEventListeners(ksession);
addWorkItemHandlers(ksession);
@@ -67,9 +67,9 @@
@Produces
@KAgentConfigured
- StatelessKnowledgeSession produceStatelessSessionFromKAgent(@KAgentConfigured KnowledgeBase kbase, Instance<DroolsConfiguration> ksessionConfigInstance) throws Exception
+ StatelessKnowledgeSession produceStatelessSessionFromKAgent(@KAgentConfigured KnowledgeBase kbase, @Any DroolsConfiguration ksessionConfig) throws Exception
{
- StatelessKnowledgeSession ksession = kbase.newStatelessKnowledgeSession(getConfig(ksessionConfigInstance.get().getKnowledgeSessionConfigPath()));
+ StatelessKnowledgeSession ksession = kbase.newStatelessKnowledgeSession(getConfig(ksessionConfig.getKnowledgeSessionConfigPath()));
addEventListeners(ksession);
return ksession;
@@ -77,9 +77,9 @@
@Produces
@KBaseConfigured
- public StatelessKnowledgeSession produceStatelessSession(@KBaseConfigured KnowledgeBase kbase, Instance<DroolsConfiguration> ksessionConfigInstance) throws Exception
+ public StatelessKnowledgeSession produceStatelessSession(@KBaseConfigured KnowledgeBase kbase, @Any DroolsConfiguration ksessionConfig) throws Exception
{
- StatelessKnowledgeSession ksession = kbase.newStatelessKnowledgeSession(getConfig(ksessionConfigInstance.get().getKnowledgeSessionConfigPath()));
+ StatelessKnowledgeSession ksession = kbase.newStatelessKnowledgeSession(getConfig(ksessionConfig.getKnowledgeSessionConfigPath()));
addEventListeners(ksession);
return ksession;
Modified: modules/drools/trunk/impl/src/main/java/org/jboss/seam/drools/bootstrap/DroolsExtension.java
===================================================================
--- modules/drools/trunk/impl/src/main/java/org/jboss/seam/drools/bootstrap/DroolsExtension.java 2010-04-13 17:55:46 UTC (rev 12478)
+++ modules/drools/trunk/impl/src/main/java/org/jboss/seam/drools/bootstrap/DroolsExtension.java 2010-04-13 19:24:35 UTC (rev 12479)
@@ -71,7 +71,7 @@
{
Bean<?> handler = iter.next();
WIHandler handlerAnnotation = handler.getBeanClass().getAnnotation(WIHandler.class);
- String handlerName = handlerAnnotation.name();
+ String handlerName = handlerAnnotation.value();
if(handlerName.length() > 0) {
CreationalContext<?> context = bm.createCreationalContext(handler);
WorkItemHandler handlerInstance = (WorkItemHandler) bm.getReference(handler, WorkItemHandler.class, context);
@@ -92,7 +92,7 @@
{
Bean<?> templateDataProvider = iter.next();
TemplateData teamplateDataAnnotation = templateDataProvider.getBeanClass().getAnnotation(TemplateData.class);
- String templateDataName = teamplateDataAnnotation.name();
+ String templateDataName = teamplateDataAnnotation.value();
if(templateDataName.length() > 0) {
CreationalContext<?> context = bm.createCreationalContext(templateDataProvider);
TemplateDataProvider templateDataProviderInstance = (TemplateDataProvider) bm.getReference(templateDataProvider, TemplateDataProvider.class, context);
Deleted: modules/drools/trunk/impl/src/test/java/org/jboss/seam/drools/test/kbase/ForKBaseTest.java
===================================================================
--- modules/drools/trunk/impl/src/test/java/org/jboss/seam/drools/test/kbase/ForKBaseTest.java 2010-04-13 17:55:46 UTC (rev 12478)
+++ modules/drools/trunk/impl/src/test/java/org/jboss/seam/drools/test/kbase/ForKBaseTest.java 2010-04-13 19:24:35 UTC (rev 12479)
@@ -1,25 +0,0 @@
-package org.jboss.seam.drools.test.kbase;
-
-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.ElementType.TYPE;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-
-import java.lang.annotation.Documented;
-import java.lang.annotation.Inherited;
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.lang.annotation.Target;
-
-import javax.inject.Qualifier;
-
-@Qualifier
-@Target( { TYPE, METHOD, FIELD, PARAMETER })
-@Documented
-@Retention(RUNTIME)
-@Inherited
-public @interface ForKBaseTest
-{
-
-}
Modified: modules/drools/trunk/impl/src/test/java/org/jboss/seam/drools/test/kbase/KBaseTest.java
===================================================================
--- modules/drools/trunk/impl/src/test/java/org/jboss/seam/drools/test/kbase/KBaseTest.java 2010-04-13 17:55:46 UTC (rev 12478)
+++ modules/drools/trunk/impl/src/test/java/org/jboss/seam/drools/test/kbase/KBaseTest.java 2010-04-13 19:24:35 UTC (rev 12479)
@@ -1,6 +1,7 @@
package org.jboss.seam.drools.test.kbase;
import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
import javax.inject.Inject;
@@ -10,7 +11,6 @@
import org.jboss.seam.drools.KnowledgeBaseProducer;
import org.jboss.seam.drools.config.DroolsConfiguration;
import org.jboss.seam.drools.qualifiers.KBaseConfigured;
-import org.jboss.seam.drools.qualifiers.config.DroolsConfig;
import org.jboss.shrinkwrap.api.ArchivePaths;
import org.jboss.shrinkwrap.api.Archives;
import org.jboss.shrinkwrap.api.formatter.Formatters;
@@ -29,7 +29,7 @@
JavaArchive archive = Archives.create("test.jar", JavaArchive.class)
.addPackages(true, KnowledgeBaseProducer.class.getPackage())
.addPackages(true, ResourceProvider.class.getPackage())
- .addClass(ForKBaseTest.class)
+ .addClass(KBaseTestQualifier.class)
.addClass(MyKnowledgeBaseEventListener.class)
.addResource(pkgPath + "/kbasetest.drl", ArchivePaths.create("kbasetest.drl"))
.addResource(pkgPath + "/kbuilderconfig.properties", ArchivePaths.create("kbuilderconfig.properties"))
@@ -40,11 +40,11 @@
}
@Inject
- @ForKBaseTest
+ @KBaseTestQualifier
DroolsConfiguration config;
@Inject
- @ForKBaseTest
+ @KBaseTestQualifier
@KBaseConfigured
KnowledgeBase kbase;
@@ -63,7 +63,7 @@
public void testKBase()
{
assertNotNull(kbase);
- System.out.println("KBASE: " + kbase.toString());
+ assertTrue(kbase.getKnowledgePackage("org.jboss.seam.drools.test.kbase").getRules().size() == 3);
}
// static class KBaseConfigBinding extends AnnotationLiteral<ForKBaseTest>
Copied: modules/drools/trunk/impl/src/test/java/org/jboss/seam/drools/test/kbase/KBaseTestQualifier.java (from rev 12427, modules/drools/trunk/impl/src/test/java/org/jboss/seam/drools/test/kbase/ForKBaseTest.java)
===================================================================
--- modules/drools/trunk/impl/src/test/java/org/jboss/seam/drools/test/kbase/KBaseTestQualifier.java (rev 0)
+++ modules/drools/trunk/impl/src/test/java/org/jboss/seam/drools/test/kbase/KBaseTestQualifier.java 2010-04-13 19:24:35 UTC (rev 12479)
@@ -0,0 +1,25 @@
+package org.jboss.seam.drools.test.kbase;
+
+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.ElementType.TYPE;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.Inherited;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+import javax.inject.Qualifier;
+
+@Qualifier
+@Target( { TYPE, METHOD, FIELD, PARAMETER })
+@Documented
+@Retention(RUNTIME)
+@Inherited
+public @interface KBaseTestQualifier
+{
+
+}
Deleted: modules/drools/trunk/impl/src/test/java/org/jboss/seam/drools/test/kbase/MyDummyWorkItemHandler.java
===================================================================
--- modules/drools/trunk/impl/src/test/java/org/jboss/seam/drools/test/kbase/MyDummyWorkItemHandler.java 2010-04-13 17:55:46 UTC (rev 12478)
+++ modules/drools/trunk/impl/src/test/java/org/jboss/seam/drools/test/kbase/MyDummyWorkItemHandler.java 2010-04-13 19:24:35 UTC (rev 12479)
@@ -1,24 +0,0 @@
-package org.jboss.seam.drools.test.kbase;
-
-import org.drools.runtime.process.WorkItem;
-import org.drools.runtime.process.WorkItemHandler;
-import org.drools.runtime.process.WorkItemManager;
-import org.jboss.seam.drools.qualifiers.WIHandler;
-
-@WIHandler(name="dummy1")
-public class MyDummyWorkItemHandler implements WorkItemHandler
-{
-
- public void abortWorkItem(WorkItem arg0, WorkItemManager arg1)
- {
- // TODO Auto-generated method stub
-
- }
-
- public void executeWorkItem(WorkItem arg0, WorkItemManager arg1)
- {
- // TODO Auto-generated method stub
-
- }
-
-}
Deleted: modules/drools/trunk/impl/src/test/java/org/jboss/seam/drools/test/kbase/MyKnowledgeSessionEventListener.java
===================================================================
--- modules/drools/trunk/impl/src/test/java/org/jboss/seam/drools/test/kbase/MyKnowledgeSessionEventListener.java 2010-04-13 17:55:46 UTC (rev 12478)
+++ modules/drools/trunk/impl/src/test/java/org/jboss/seam/drools/test/kbase/MyKnowledgeSessionEventListener.java 2010-04-13 19:24:35 UTC (rev 12479)
@@ -1,62 +0,0 @@
-package org.jboss.seam.drools.test.kbase;
-
-import org.drools.event.process.ProcessCompletedEvent;
-import org.drools.event.process.ProcessEventListener;
-import org.drools.event.process.ProcessNodeLeftEvent;
-import org.drools.event.process.ProcessNodeTriggeredEvent;
-import org.drools.event.process.ProcessStartedEvent;
-import org.jboss.seam.drools.qualifiers.KSessionEventListener;
-
-@KSessionEventListener
-public class MyKnowledgeSessionEventListener implements ProcessEventListener
-{
-
- public void afterNodeLeft(ProcessNodeLeftEvent arg0)
- {
- // TODO Auto-generated method stub
-
- }
-
- public void afterNodeTriggered(ProcessNodeTriggeredEvent arg0)
- {
- // TODO Auto-generated method stub
-
- }
-
- public void afterProcessCompleted(ProcessCompletedEvent arg0)
- {
- // TODO Auto-generated method stub
-
- }
-
- public void afterProcessStarted(ProcessStartedEvent arg0)
- {
- // TODO Auto-generated method stub
-
- }
-
- public void beforeNodeLeft(ProcessNodeLeftEvent arg0)
- {
- // TODO Auto-generated method stub
-
- }
-
- public void beforeNodeTriggered(ProcessNodeTriggeredEvent arg0)
- {
- // TODO Auto-generated method stub
-
- }
-
- public void beforeProcessCompleted(ProcessCompletedEvent arg0)
- {
- // TODO Auto-generated method stub
-
- }
-
- public void beforeProcessStarted(ProcessStartedEvent arg0)
- {
- // TODO Auto-generated method stub
-
- }
-
-}
Deleted: modules/drools/trunk/impl/src/test/java/org/jboss/seam/drools/test/kbase/MyOtherDummyWorkItemHandler.java
===================================================================
--- modules/drools/trunk/impl/src/test/java/org/jboss/seam/drools/test/kbase/MyOtherDummyWorkItemHandler.java 2010-04-13 17:55:46 UTC (rev 12478)
+++ modules/drools/trunk/impl/src/test/java/org/jboss/seam/drools/test/kbase/MyOtherDummyWorkItemHandler.java 2010-04-13 19:24:35 UTC (rev 12479)
@@ -1,24 +0,0 @@
-package org.jboss.seam.drools.test.kbase;
-
-import org.drools.runtime.process.WorkItem;
-import org.drools.runtime.process.WorkItemHandler;
-import org.drools.runtime.process.WorkItemManager;
-import org.jboss.seam.drools.qualifiers.WIHandler;
-
-@WIHandler(name="dummy2")
-public class MyOtherDummyWorkItemHandler implements WorkItemHandler
-{
-
- public void abortWorkItem(WorkItem arg0, WorkItemManager arg1)
- {
- // TODO Auto-generated method stub
-
- }
-
- public void executeWorkItem(WorkItem arg0, WorkItemManager arg1)
- {
- // TODO Auto-generated method stub
-
- }
-
-}
Deleted: modules/drools/trunk/impl/src/test/java/org/jboss/seam/drools/test/kbase/MySecondKnowledgeBaseEventListener.java
===================================================================
--- modules/drools/trunk/impl/src/test/java/org/jboss/seam/drools/test/kbase/MySecondKnowledgeBaseEventListener.java 2010-04-13 17:55:46 UTC (rev 12478)
+++ modules/drools/trunk/impl/src/test/java/org/jboss/seam/drools/test/kbase/MySecondKnowledgeBaseEventListener.java 2010-04-13 19:24:35 UTC (rev 12479)
@@ -1,13 +0,0 @@
-package org.jboss.seam.drools.test.kbase;
-
-import org.drools.event.knowledgebase.DefaultKnowledgeBaseEventListener;
-import org.drools.event.knowledgebase.KnowledgeBaseEventListener;
-import org.jboss.seam.drools.qualifiers.KBaseEventListener;
-
-@KBaseEventListener
-public class MySecondKnowledgeBaseEventListener extends DefaultKnowledgeBaseEventListener implements KnowledgeBaseEventListener
-{
- public MySecondKnowledgeBaseEventListener() {
- super();
- }
-}
\ No newline at end of file
Modified: modules/drools/trunk/impl/src/test/java/org/jboss/seam/drools/test/kbase/SimpleTemplateDataProvider.java
===================================================================
--- modules/drools/trunk/impl/src/test/java/org/jboss/seam/drools/test/kbase/SimpleTemplateDataProvider.java 2010-04-13 17:55:46 UTC (rev 12478)
+++ modules/drools/trunk/impl/src/test/java/org/jboss/seam/drools/test/kbase/SimpleTemplateDataProvider.java 2010-04-13 19:24:35 UTC (rev 12479)
@@ -8,7 +8,7 @@
import org.jboss.seam.drools.TemplateDataProvider;
import org.jboss.seam.drools.qualifiers.TemplateData;
-@TemplateData(name="forkbasetest")
+@TemplateData("forkbasetest")
public class SimpleTemplateDataProvider implements TemplateDataProvider
{
private static Collection<Map<String, Object>> templateData = new ArrayList<Map<String,Object>>();
Added: modules/drools/trunk/impl/src/test/java/org/jboss/seam/drools/test/ksession/KSessionTest.java
===================================================================
--- modules/drools/trunk/impl/src/test/java/org/jboss/seam/drools/test/ksession/KSessionTest.java (rev 0)
+++ modules/drools/trunk/impl/src/test/java/org/jboss/seam/drools/test/ksession/KSessionTest.java 2010-04-13 19:24:35 UTC (rev 12479)
@@ -0,0 +1,50 @@
+package org.jboss.seam.drools.test.ksession;
+
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+
+import javax.inject.Inject;
+
+import org.drools.runtime.StatefulKnowledgeSession;
+import org.jboss.arquillian.api.Deployment;
+import org.jboss.arquillian.junit.Arquillian;
+import org.jboss.seam.drools.KnowledgeBaseProducer;
+import org.jboss.seam.drools.qualifiers.KBaseConfigured;
+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.weld.extensions.resources.ResourceProvider;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+(a)RunWith(Arquillian.class)
+public class KSessionTest
+{
+ @Deployment
+ public static JavaArchive createTestArchive()
+ {
+ String pkgPath = KSessionTest.class.getPackage().getName().replaceAll("\\.", "/");
+ JavaArchive archive = Archives.create("test.jar", JavaArchive.class)
+ .addPackages(true, KnowledgeBaseProducer.class.getPackage())
+ .addPackages(true, ResourceProvider.class.getPackage())
+ .addClass(KSessionTestQualifier.class)
+ .addResource(pkgPath + "/ksessiontest.drl", ArchivePaths.create("ksessiontest.drl"))
+ .addResource(pkgPath + "/kbuilderconfig.properties", ArchivePaths.create("kbuilderconfig.properties"))
+ .addResource(pkgPath + "/kbaseconfig.properties", ArchivePaths.create("kbaseconfig.properties"))
+ .addManifestResource(pkgPath + "/KSessionTest-beans.xml", ArchivePaths.create("beans.xml"));
+ System.out.println(archive.toString(Formatters.VERBOSE));
+ return archive;
+ }
+
+ @Inject
+ @KSessionTestQualifier
+ @KBaseConfigured
+ StatefulKnowledgeSession ksession;
+
+ @Test
+ public void testKSession()
+ {
+ assertNotNull(ksession);
+ }
+}
Added: modules/drools/trunk/impl/src/test/java/org/jboss/seam/drools/test/ksession/KSessionTestQualifier.java
===================================================================
--- modules/drools/trunk/impl/src/test/java/org/jboss/seam/drools/test/ksession/KSessionTestQualifier.java (rev 0)
+++ modules/drools/trunk/impl/src/test/java/org/jboss/seam/drools/test/ksession/KSessionTestQualifier.java 2010-04-13 19:24:35 UTC (rev 12479)
@@ -0,0 +1,24 @@
+package org.jboss.seam.drools.test.ksession;
+
+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.ElementType.TYPE;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.Inherited;
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+import javax.inject.Qualifier;
+
+@Qualifier
+@Target( { TYPE, METHOD, FIELD, PARAMETER })
+@Documented
+@Retention(RUNTIME)
+@Inherited
+public @interface KSessionTestQualifier
+{
+
+}
Copied: modules/drools/trunk/impl/src/test/java/org/jboss/seam/drools/test/ksession/MyDummyWorkItemHandler.java (from rev 12440, modules/drools/trunk/impl/src/test/java/org/jboss/seam/drools/test/kbase/MyDummyWorkItemHandler.java)
===================================================================
--- modules/drools/trunk/impl/src/test/java/org/jboss/seam/drools/test/ksession/MyDummyWorkItemHandler.java (rev 0)
+++ modules/drools/trunk/impl/src/test/java/org/jboss/seam/drools/test/ksession/MyDummyWorkItemHandler.java 2010-04-13 19:24:35 UTC (rev 12479)
@@ -0,0 +1,24 @@
+package org.jboss.seam.drools.test.ksession;
+
+import org.drools.runtime.process.WorkItem;
+import org.drools.runtime.process.WorkItemHandler;
+import org.drools.runtime.process.WorkItemManager;
+import org.jboss.seam.drools.qualifiers.WIHandler;
+
+@WIHandler("dummy1")
+public class MyDummyWorkItemHandler implements WorkItemHandler
+{
+
+ public void abortWorkItem(WorkItem arg0, WorkItemManager arg1)
+ {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void executeWorkItem(WorkItem arg0, WorkItemManager arg1)
+ {
+ // TODO Auto-generated method stub
+
+ }
+
+}
Copied: modules/drools/trunk/impl/src/test/java/org/jboss/seam/drools/test/ksession/MyKnowledgeSessionEventListener.java (from rev 12440, modules/drools/trunk/impl/src/test/java/org/jboss/seam/drools/test/kbase/MyKnowledgeSessionEventListener.java)
===================================================================
--- modules/drools/trunk/impl/src/test/java/org/jboss/seam/drools/test/ksession/MyKnowledgeSessionEventListener.java (rev 0)
+++ modules/drools/trunk/impl/src/test/java/org/jboss/seam/drools/test/ksession/MyKnowledgeSessionEventListener.java 2010-04-13 19:24:35 UTC (rev 12479)
@@ -0,0 +1,62 @@
+package org.jboss.seam.drools.test.ksession;
+
+import org.drools.event.process.ProcessCompletedEvent;
+import org.drools.event.process.ProcessEventListener;
+import org.drools.event.process.ProcessNodeLeftEvent;
+import org.drools.event.process.ProcessNodeTriggeredEvent;
+import org.drools.event.process.ProcessStartedEvent;
+import org.jboss.seam.drools.qualifiers.KSessionEventListener;
+
+@KSessionEventListener
+public class MyKnowledgeSessionEventListener implements ProcessEventListener
+{
+
+ public void afterNodeLeft(ProcessNodeLeftEvent arg0)
+ {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void afterNodeTriggered(ProcessNodeTriggeredEvent arg0)
+ {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void afterProcessCompleted(ProcessCompletedEvent arg0)
+ {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void afterProcessStarted(ProcessStartedEvent arg0)
+ {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void beforeNodeLeft(ProcessNodeLeftEvent arg0)
+ {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void beforeNodeTriggered(ProcessNodeTriggeredEvent arg0)
+ {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void beforeProcessCompleted(ProcessCompletedEvent arg0)
+ {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void beforeProcessStarted(ProcessStartedEvent arg0)
+ {
+ // TODO Auto-generated method stub
+
+ }
+
+}
Copied: modules/drools/trunk/impl/src/test/java/org/jboss/seam/drools/test/ksession/MySecondKnowledgeBaseEventListener.java (from rev 12440, modules/drools/trunk/impl/src/test/java/org/jboss/seam/drools/test/kbase/MySecondKnowledgeBaseEventListener.java)
===================================================================
--- modules/drools/trunk/impl/src/test/java/org/jboss/seam/drools/test/ksession/MySecondKnowledgeBaseEventListener.java (rev 0)
+++ modules/drools/trunk/impl/src/test/java/org/jboss/seam/drools/test/ksession/MySecondKnowledgeBaseEventListener.java 2010-04-13 19:24:35 UTC (rev 12479)
@@ -0,0 +1,13 @@
+package org.jboss.seam.drools.test.ksession;
+
+import org.drools.event.knowledgebase.DefaultKnowledgeBaseEventListener;
+import org.drools.event.knowledgebase.KnowledgeBaseEventListener;
+import org.jboss.seam.drools.qualifiers.KBaseEventListener;
+
+@KBaseEventListener
+public class MySecondKnowledgeBaseEventListener extends DefaultKnowledgeBaseEventListener implements KnowledgeBaseEventListener
+{
+ public MySecondKnowledgeBaseEventListener() {
+ super();
+ }
+}
\ No newline at end of file
Modified: modules/drools/trunk/impl/src/test/resources/org/jboss/seam/drools/test/kbase/KBaseTest-beans.xml
===================================================================
--- modules/drools/trunk/impl/src/test/resources/org/jboss/seam/drools/test/kbase/KBaseTest-beans.xml 2010-04-13 17:55:46 UTC (rev 12478)
+++ modules/drools/trunk/impl/src/test/resources/org/jboss/seam/drools/test/kbase/KBaseTest-beans.xml 2010-04-13 19:24:35 UTC (rev 12479)
@@ -6,7 +6,7 @@
<drools:DroolsConfiguration>
<s:overrides/>
- <test:ForKBaseTest/>
+ <test:KBaseTestQualifier/>
<drools:knowledgeBuilderConfigPath>kbuilderconfig.properties</drools:knowledgeBuilderConfigPath>
<drools:knowledgeBaseConfigPath>kbaseconfig.properties</drools:knowledgeBaseConfigPath>
<drools:ruleResources>
@@ -17,11 +17,11 @@
<drools:KnowledgeBaseProducer>
<s:specializes/>
<drools:produceKBase>
- <test:ForKBaseTest/>
+ <test:KBaseTestQualifier/>
<s:parameters>
<drools:DroolsConfiguration>
<s:Inject/>
- <test:ForKBaseTest/>
+ <test:KBaseTestQualifier/>
</drools:DroolsConfiguration>
</s:parameters>
</drools:produceKBase>
@@ -32,11 +32,11 @@
<drools:KnowledgeBaseProducer>
<s:specializes/>
<drools:produceKBase>
- <test:ForKBaseTest/>
+ <test:KBaseTestQualifier/>
<s:parameters>
<s:Instance>
<s:Inject/>
- <test:ForKBaseTest/>
+ <test:KBaseTestQualifier/>
</s:Instance>
</s:parameters>
</drools:produceKBase>
Modified: modules/drools/trunk/impl/src/test/resources/org/jboss/seam/drools/test/kbase/kbasetest.drl
===================================================================
--- modules/drools/trunk/impl/src/test/resources/org/jboss/seam/drools/test/kbase/kbasetest.drl 2010-04-13 17:55:46 UTC (rev 12478)
+++ modules/drools/trunk/impl/src/test/resources/org/jboss/seam/drools/test/kbase/kbasetest.drl 2010-04-13 19:24:35 UTC (rev 12479)
@@ -1,7 +1,7 @@
template header
name
-package org.jboss.seam.drools.kbase
+package org.jboss.seam.drools.test.kbase
template "kbasetesttemplate"
rule "say hello to @{name}"
Modified: modules/drools/trunk/impl/src/test/resources/org/jboss/seam/drools/test/kbase/kbuilderconfig.properties
===================================================================
--- modules/drools/trunk/impl/src/test/resources/org/jboss/seam/drools/test/kbase/kbuilderconfig.properties 2010-04-13 17:55:46 UTC (rev 12478)
+++ modules/drools/trunk/impl/src/test/resources/org/jboss/seam/drools/test/kbase/kbuilderconfig.properties 2010-04-13 19:24:35 UTC (rev 12479)
@@ -0,0 +1 @@
+drools.dialect.java.lngLevel=1.5
Added: modules/drools/trunk/impl/src/test/resources/org/jboss/seam/drools/test/ksession/KSessionTest-beans.xml
===================================================================
--- modules/drools/trunk/impl/src/test/resources/org/jboss/seam/drools/test/ksession/KSessionTest-beans.xml (rev 0)
+++ modules/drools/trunk/impl/src/test/resources/org/jboss/seam/drools/test/ksession/KSessionTest-beans.xml 2010-04-13 19:24:35 UTC (rev 12479)
@@ -0,0 +1,47 @@
+<beans xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:s="urn:java:seam:core"
+ xmlns:d="urn:java:org.jboss.seam.drools:org.jboss.seam.drools.config"
+ xmlns:drools="urn:java:org.drools:org.drools.runtime"
+ xmlns:test="urn:java:org.jboss.seam.drools.test.ksession">
+
+ <d:DroolsConfiguration>
+ <s:overrides/>
+ <test:KSessionTestQualifier/>
+ <d:knowledgeBuilderConfigPath>kbuilderconfig.properties</d:knowledgeBuilderConfigPath>
+ <d:knowledgeBaseConfigPath>kbaseconfig.properties</d:knowledgeBaseConfigPath>
+ <d:ruleResources>
+ <s:value>classpath;ksessiontest.drl;DRL</s:value>
+ </d:ruleResources>
+ </d:DroolsConfiguration>
+
+ <d:KnowledgeBaseProducer>
+ <s:specializes/>
+ <d:produceKBase>
+ <test:KSessionTestQualifier/>
+ <s:parameters>
+ <d:DroolsConfiguration>
+ <s:Inject/>
+ <test:KSessionTestQualifier/>
+ </d:DroolsConfiguration>
+ </s:parameters>
+ </d:produceKBase>
+ </d:KnowledgeBaseProducer>
+
+ <d:KnowledgeSessionProducer>
+ <s:specializes/>
+ <d:produceStatefulSession>
+ <test:KSessionTestQualifier/>
+ <s:parameters>
+ <drools:KnowledgeBase>
+ <s:Inject/>
+ <test:KSessionTestQualifier/>
+ </drools:KnowledgeBase>
+ <d:DroolsConfiguration>
+ <s:Inject/>
+ <test:KSessionTestQualifier/>
+ </d:DroolsConfiguration>
+ </s:parameters>
+ </d:produceStatefulSession>
+ </d:KnowledgeSessionProducer>
+</beans>
Added: modules/drools/trunk/impl/src/test/resources/org/jboss/seam/drools/test/ksession/kbaseconfig.properties
===================================================================
Added: modules/drools/trunk/impl/src/test/resources/org/jboss/seam/drools/test/ksession/kbuilderconfig.properties
===================================================================
--- modules/drools/trunk/impl/src/test/resources/org/jboss/seam/drools/test/ksession/kbuilderconfig.properties (rev 0)
+++ modules/drools/trunk/impl/src/test/resources/org/jboss/seam/drools/test/ksession/kbuilderconfig.properties 2010-04-13 19:24:35 UTC (rev 12479)
@@ -0,0 +1 @@
+drools.dialect.java.lngLevel=1.5
Added: modules/drools/trunk/impl/src/test/resources/org/jboss/seam/drools/test/ksession/ksessiontest.drl
===================================================================
--- modules/drools/trunk/impl/src/test/resources/org/jboss/seam/drools/test/ksession/ksessiontest.drl (rev 0)
+++ modules/drools/trunk/impl/src/test/resources/org/jboss/seam/drools/test/ksession/ksessiontest.drl 2010-04-13 19:24:35 UTC (rev 12479)
@@ -0,0 +1 @@
+package org.jboss.seam.drools.test.ksession
16 years
Seam SVN: r12478 - modules/faces/trunk/examples/short-ly.
by seam-commits@lists.jboss.org
Author: lincolnthree
Date: 2010-04-13 13:55:46 -0400 (Tue, 13 Apr 2010)
New Revision: 12478
Modified:
modules/faces/trunk/examples/short-ly/pom.xml
Log:
Modified: modules/faces/trunk/examples/short-ly/pom.xml
===================================================================
--- modules/faces/trunk/examples/short-ly/pom.xml 2010-04-13 17:55:03 UTC (rev 12477)
+++ modules/faces/trunk/examples/short-ly/pom.xml 2010-04-13 17:55:46 UTC (rev 12478)
@@ -40,7 +40,7 @@
<dependency>
<groupId>com.ocpsoft</groupId>
<artifactId>ocpsoft-pretty-faces</artifactId>
- <version>2.0.4</version>
+ <version>2.0.5-SNAPSHOT</version>
</dependency>
<dependency>
16 years
Seam SVN: r12477 - in modules/faces/trunk/examples: short-ly and 1 other directory.
by seam-commits@lists.jboss.org
Author: lincolnthree
Date: 2010-04-13 13:55:03 -0400 (Tue, 13 Apr 2010)
New Revision: 12477
Added:
modules/faces/trunk/examples/short-ly/
Removed:
modules/faces/trunk/examples/tiny-url/
Modified:
modules/faces/trunk/examples/short-ly/pom.xml
Log:
Renamed tiny-url to short-ly
Copied: modules/faces/trunk/examples/short-ly (from rev 12476, modules/faces/trunk/examples/tiny-url)
Modified: modules/faces/trunk/examples/short-ly/pom.xml
===================================================================
--- modules/faces/trunk/examples/tiny-url/pom.xml 2010-04-13 17:24:55 UTC (rev 12476)
+++ modules/faces/trunk/examples/short-ly/pom.xml 2010-04-13 17:55:03 UTC (rev 12477)
@@ -3,13 +3,13 @@
<modelVersion>4.0.0</modelVersion>
<groupId>org.jboss.seam.faces</groupId>
- <artifactId>faces-examples-tiny-url</artifactId>
+ <artifactId>faces-examples-short-ly</artifactId>
<packaging>war</packaging>
<version>0.0.1-SNAPSHOT</version>
- <name>tiny.url with Seam & PrettyFaces</name>
+ <name>bit.ly clone with Seam & PrettyFaces</name>
- <url>http://go.jboss.org/</url>
+ <url>http://seamframework.org</url>
<repositories>
<repository>
@@ -40,7 +40,7 @@
<dependency>
<groupId>com.ocpsoft</groupId>
<artifactId>ocpsoft-pretty-faces</artifactId>
- <version>2.0.5-SNAPSHOT</version>
+ <version>2.0.4</version>
</dependency>
<dependency>
16 years
Seam SVN: r12476 - modules/international/trunk.
by seam-commits@lists.jboss.org
Author: lincolnthree
Date: 2010-04-13 13:24:55 -0400 (Tue, 13 Apr 2010)
New Revision: 12476
Modified:
modules/international/trunk/pom.xml
Log:
Formatted
Modified: modules/international/trunk/pom.xml
===================================================================
--- modules/international/trunk/pom.xml 2010-04-13 16:35:52 UTC (rev 12475)
+++ modules/international/trunk/pom.xml 2010-04-13 17:24:55 UTC (rev 12476)
@@ -1,115 +1,113 @@
-<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>
+<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>
- <artifactId>seam-international-parent</artifactId>
- <groupId>org.jboss.seam.international</groupId>
- <version>3.0.0-SNAPSHOT</version>
+ <parent>
+ <artifactId>seam-parent</artifactId>
+ <groupId>org.jboss.seam</groupId>
+ <version>3.0.0-SNAPSHOT</version>
+ </parent>
- <packaging>pom</packaging>
- <name>Seam International Module Parent POM</name>
+ <artifactId>seam-international-parent</artifactId>
+ <groupId>org.jboss.seam.international</groupId>
+ <version>3.0.0-SNAPSHOT</version>
- <description>The Parent for Seam International Module</description>
+ <packaging>pom</packaging>
+ <name>Seam International Module Parent POM</name>
- <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.Alpha1</arquillian.version>
- </properties>
+ <properties>
+ <arquillian.version>1.0.0.Alpha1</arquillian.version>
+ </properties>
- <dependencies>
+ <dependencies>
- <!-- Environment Dependencies -->
- <dependency>
- <groupId>javax.el</groupId>
- <artifactId>el-api</artifactId>
- <version>2.2</version>
- <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>1.0.0.Alpha1</version>
- </dependency>
-
- <!-- Test Dependencies -->
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <version>4.8.1</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>
- </dependencies>
+ <!-- Environment Dependencies -->
+ <dependency>
+ <groupId>javax.el</groupId>
+ <artifactId>el-api</artifactId>
+ <version>2.2</version>
+ <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>1.0.0.Alpha1</version>
+ </dependency>
- <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>
+ <!-- Test Dependencies -->
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>4.8.1</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>
+ </dependencies>
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-compiler-plugin</artifactId>
- <version>2.0.2</version>
- <configuration>
- <source>1.6</source>
- <target>1.6</target>
- </configuration>
- </plugin>
- </plugins>
- </build>
+ <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>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <version>2.0.2</version>
+ <configuration>
+ <source>1.6</source>
+ <target>1.6</target>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
</project>
\ No newline at end of file
16 years
Seam SVN: r12475 - in modules/servlet/trunk: api and 18 other directories.
by seam-commits@lists.jboss.org
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
+ */
+@Qualifier
+@Target( { FIELD, PARAMETER })
+@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
+ */
+@Qualifier
+@Target( { FIELD, PARAMETER })
+@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
+ */
+@Qualifier
+@Target( { FIELD, PARAMETER })
+@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
+ */
+@Qualifier
+@Target( { FIELD, PARAMETER })
+@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
+ */
+@Qualifier
+@Target({FIELD, PARAMETER})
+@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
+ */
+@Qualifier
+@Target({FIELD, PARAMETER})
+@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
+ */
+@Qualifier
+@Target( { FIELD, PARAMETER })
+@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
+ */
+@Qualifier
+@Target( { FIELD, PARAMETER })
+@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
+ */
+@Qualifier
+@Target( { FIELD, PARAMETER })
+@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
+ */
+@Qualifier
+@Target( { FIELD, PARAMETER })
+@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
+ */
+@Qualifier
+@Target( { FIELD, PARAMETER })
+@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
+ */
+@Qualifier
+@Target( { FIELD, PARAMETER })
+@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
+ */
+@Qualifier
+@Target( { FIELD, PARAMETER })
+@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
+ */
+@Qualifier
+@Target( { FIELD, PARAMETER })
+@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
+ *
+ */
+@Qualifier
+@Retention(RUNTIME)
+@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
- */
-@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
- *
- */
-@Qualifier
-@Retention(RUNTIME)
-@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
- *
- */
-@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
+ */
+@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
+ *
+ */
+@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(a)gmail.com</email>
- <roles>
- <role>Project Lead</role>
- </roles>
- </developer>
- <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>
- </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(a)gmail.com</email>
+ <roles>
+ <role>Project Lead</role>
+ </roles>
+ </developer>
+ <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>
+ </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
16 years
Seam SVN: r12474 - branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/seamgen.
by seam-commits@lists.jboss.org
Author: jharting
Date: 2010-04-13 12:32:35 -0400 (Tue, 13 Apr 2010)
New Revision: 12474
Modified:
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/seamgen/build.xml
Log:
Support for container start/stop during seam-gen tests.
Modified: branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/seamgen/build.xml
===================================================================
--- branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/seamgen/build.xml 2010-04-13 16:29:47 UTC (rev 12473)
+++ branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/seamgen/build.xml 2010-04-13 16:32:35 UTC (rev 12474)
@@ -100,13 +100,33 @@
<attribute name="suite" />
<sequential>
<!--<ant antfile="${seam.dir}/build.xml" target="copyseam"/>-->
+
+ <!-- Start the application server -->
+ <ant target="start.container" />
+
<taskdef resource="testngtasks" classpathref="classpath.test" />
<!-- execute testng tests -->
<testng haltonfailure="false" outputdir="${test.output.dir}" classpathref="classpath.test">
<xmlfileset file="@{suite}.xml" />
<sysproperty key="seam.dir" value="${seam.dir}" />
</testng>
+
+ <!-- Stop the application server -->
+ <ant target="stop.container" />
</sequential>
</macrodef>
+
+ <target name="start.container" if="run.container.per.suite">
+ <echo>Starting container</echo>
+ <ant antfile="${ftest.dir}/examples/build.xml" target="start.container.jboss" inheritall="false">
+ <property name="container" value="${container}" />
+ </ant>
+ </target>
+ <target name="stop.container" if="run.container.per.suite">
+ <echo>Stopping container</echo>
+ <ant antfile="${ftest.dir}/examples/build.xml" target="stop.container.jboss" inheritall="false">
+ <property name="container" value="${container}" />
+ </ant>
+ </target>
</project>
16 years
Seam SVN: r12473 - branches/enterprise/JBPAPP_5_0/src/test/ftest/seamgen.
by seam-commits@lists.jboss.org
Author: jharting
Date: 2010-04-13 12:29:47 -0400 (Tue, 13 Apr 2010)
New Revision: 12473
Modified:
branches/enterprise/JBPAPP_5_0/src/test/ftest/seamgen/build.xml
Log:
Support for container start/stop during seam-gen tests.
Modified: branches/enterprise/JBPAPP_5_0/src/test/ftest/seamgen/build.xml
===================================================================
--- branches/enterprise/JBPAPP_5_0/src/test/ftest/seamgen/build.xml 2010-04-13 16:27:04 UTC (rev 12472)
+++ branches/enterprise/JBPAPP_5_0/src/test/ftest/seamgen/build.xml 2010-04-13 16:29:47 UTC (rev 12473)
@@ -123,6 +123,10 @@
<sequential>
<!--<ant antfile="${seam.dir}/build.xml" target="copyseam"/>
<ant antfile="${seam.dir}/build.xml" target="copyseamdependencies"/>-->
+
+ <!-- Start the application server -->
+ <ant target="start.container" />
+
<taskdef resource="testngtasks" classpathref="classpath.test" />
<!-- execute testng tests -->
<testng haltonfailure="false" outputdir="${test.output.dir}" classpathref="classpath.test">
@@ -130,7 +134,23 @@
<sysproperty key="seam.dir" value="${seam.dir}" />
<sysproperty key="ftest.config.location" value="${ftest.config.location}" />
</testng>
+
+ <!-- Stop the application server -->
+ <ant target="stop.container" />
</sequential>
</macrodef>
+
+ <target name="start.container" if="run.container.per.suite">
+ <echo>Starting container</echo>
+ <ant antfile="${ftest.dir}/examples/build.xml" target="start.container.jboss" inheritall="false">
+ <property name="container" value="${container}" />
+ </ant>
+ </target>
+ <target name="stop.container" if="run.container.per.suite">
+ <echo>Stopping container</echo>
+ <ant antfile="${ftest.dir}/examples/build.xml" target="stop.container.jboss" inheritall="false">
+ <property name="container" value="${container}" />
+ </ant>
+ </target>
</project>
16 years
Seam SVN: r12472 - branches/community/Seam_2_2/src/test/ftest/seamgen.
by seam-commits@lists.jboss.org
Author: jharting
Date: 2010-04-13 12:27:04 -0400 (Tue, 13 Apr 2010)
New Revision: 12472
Modified:
branches/community/Seam_2_2/src/test/ftest/seamgen/build.xml
Log:
Support for container start/stop during seam-gen tests.
Modified: branches/community/Seam_2_2/src/test/ftest/seamgen/build.xml
===================================================================
--- branches/community/Seam_2_2/src/test/ftest/seamgen/build.xml 2010-04-13 15:55:00 UTC (rev 12471)
+++ branches/community/Seam_2_2/src/test/ftest/seamgen/build.xml 2010-04-13 16:27:04 UTC (rev 12472)
@@ -24,8 +24,8 @@
<!-- Location of Seam -->
<dirname property="seam.dir" file="${ant.file.ftest.seamgen}/../../../../" />
-
- <!-- Build resources -->
+
+ <!-- Build resources -->
<import file="${seam.dir}/build/common.build.xml" />
<!-- default property setup -->
@@ -45,7 +45,7 @@
<path id="classpath.build">
<fileset dir="${root.lib.dir}">
- <include name="testng-jdk15.jar"/>
+ <include name="testng-jdk15.jar"/>
</fileset>
<fileset dir="${ftest.lib.dir}" includes="**/*.jar" />
</path>
@@ -68,13 +68,13 @@
</target>
<target name="copy.selenium">
- <ant antfile="${ftest.dir}/examples/build.xml" target="copy.selenium" />
+ <ant antfile="${ftest.dir}/examples/build.xml" target="copy.selenium" />
</target>
-
+
<target name="copy.webdriver">
- <ant antfile="${ftest.dir}/examples/build.xml" target="copy.webdriver" />
+ <ant antfile="${ftest.dir}/examples/build.xml" target="copy.webdriver" />
</target>
-
+
<target name="build" depends="build.common" description="Compiles the Test">
<mkdir dir="${classes.dir}" />
<javac srcdir="${src.dir}" destdir="${classes.dir}" classpathref="classpath.build" debug="true" />
@@ -129,6 +129,10 @@
<sequential>
<!--<ant antfile="${seam.dir}/build.xml" target="copyseam"/>
<ant antfile="${seam.dir}/build.xml" target="copyseamdependencies"/>-->
+
+ <!-- Start the application server -->
+ <ant target="start.container" />
+
<taskdef resource="testngtasks" classpathref="classpath.test" />
<!-- execute testng tests -->
<testng haltonfailure="false" outputdir="${test.output.dir}" classpathref="classpath.test">
@@ -136,7 +140,23 @@
<sysproperty key="seam.dir" value="${seam.dir}" />
<sysproperty key="ftest.config.location" value="${ftest.config.location}" />
</testng>
+
+ <!-- Stop the application server -->
+ <ant target="stop.container" />
</sequential>
</macrodef>
+ <target name="start.container" if="run.container.per.suite">
+ <echo>Starting container</echo>
+ <ant antfile="${ftest.dir}/examples/build.xml" target="start.container.jboss" inheritall="false">
+ <property name="container" value="${container}" />
+ </ant>
+ </target>
+ <target name="stop.container" if="run.container.per.suite">
+ <echo>Stopping container</echo>
+ <ant antfile="${ftest.dir}/examples/build.xml" target="stop.container.jboss" inheritall="false">
+ <property name="container" value="${container}" />
+ </ant>
+ </target>
+
</project>
16 years
Seam SVN: r12471 - modules/international/trunk.
by seam-commits@lists.jboss.org
Author: lincolnthree
Date: 2010-04-13 11:55:00 -0400 (Tue, 13 Apr 2010)
New Revision: 12471
Removed:
modules/international/trunk/core/
Log:
removed deprecated folder
16 years