Seam SVN: r12600 - branches/community/Seam_2_2/doc/Seam_Reference_Guide/en-US.
by seam-commits@lists.jboss.org
Author: denis.forveille
Date: 2010-04-22 21:12:14 -0400 (Thu, 22 Apr 2010)
New Revision: 12600
Modified:
branches/community/Seam_2_2/doc/Seam_Reference_Guide/en-US/Configuration.xml
Log:
JBSEAM-4461
Replace "public class Authenticator" by "public interface Authenticator"
Modified: branches/community/Seam_2_2/doc/Seam_Reference_Guide/en-US/Configuration.xml
===================================================================
--- branches/community/Seam_2_2/doc/Seam_Reference_Guide/en-US/Configuration.xml 2010-04-23 01:08:04 UTC (rev 12599)
+++ branches/community/Seam_2_2/doc/Seam_Reference_Guide/en-US/Configuration.xml 2010-04-23 01:12:14 UTC (rev 12600)
@@ -499,7 +499,7 @@
import javax.ejb.Local;
@Local
-public class Authenticator
+public interface Authenticator
{
boolean authenticate();
}
14 years, 9 months
Seam SVN: r12599 - modules/servlet.
by seam-commits@lists.jboss.org
Author: dan.j.allen
Date: 2010-04-22 21:08:04 -0400 (Thu, 22 Apr 2010)
New Revision: 12599
Added:
modules/servlet/branches/
modules/servlet/tags/
Log:
add tags and branches directories
14 years, 9 months
Seam SVN: r12598 - modules/faces/trunk.
by seam-commits@lists.jboss.org
Author: dan.j.allen
Date: 2010-04-22 21:05:40 -0400 (Thu, 22 Apr 2010)
New Revision: 12598
Modified:
modules/faces/trunk/readme.txt
Log:
test commit
Modified: modules/faces/trunk/readme.txt
===================================================================
--- modules/faces/trunk/readme.txt 2010-04-23 00:28:54 UTC (rev 12597)
+++ modules/faces/trunk/readme.txt 2010-04-23 01:05:40 UTC (rev 12598)
@@ -28,7 +28,6 @@
This distribution, as a whole, is licensed under the terms of the Apache
License, Version 2.0 (see apl.txt).
-
Seam Faces URLs
===============
14 years, 9 months
Seam SVN: r12597 - branches/community/Seam_2_2/doc/Seam_Reference_Guide/en-US.
by seam-commits@lists.jboss.org
Author: denis.forveille
Date: 2010-04-22 20:28:54 -0400 (Thu, 22 Apr 2010)
New Revision: 12597
Modified:
branches/community/Seam_2_2/doc/Seam_Reference_Guide/en-US/Itext.xml
Log:
JBSEAM-4632
Deleted duplicate "alignment" attribute in section 18.1.5/iText PDF for <p:listitem> tag
Modified: branches/community/Seam_2_2/doc/Seam_Reference_Guide/en-US/Itext.xml
===================================================================
--- branches/community/Seam_2_2/doc/Seam_Reference_Guide/en-US/Itext.xml 2010-04-22 23:14:34 UTC (rev 12596)
+++ branches/community/Seam_2_2/doc/Seam_Reference_Guide/en-US/Itext.xml 2010-04-23 00:28:54 UTC (rev 12597)
@@ -978,43 +978,23 @@
<emphasis>Attributes</emphasis>
</para>
-
<itemizedlist>
-
-
<listitem>
- <para>
- <literal>alignment</literal> — The alignment of the header/footer
- box section. (see <xref linkend="itext.alignment"/> for alignment values)</para>
-
- </listitem>
-
- <listitem>
<para><literal>alignment</literal> — The alignment of the list item.
(See <xref linkend="itext.alignment"/> for possible values)</para>
</listitem>
-
-
<listitem>
<para><literal>indentationLeft</literal> — The left indentation
amount.</para>
</listitem>
-
-
-
<listitem>
<para><literal>indentationRight</literal> — The right indentation
amount.</para>
</listitem>
-
-
-
<listitem>
<para><literal>listSymbol</literal> — Overrides the default list
symbol for this list item.</para>
</listitem>
-
-
</itemizedlist>
<para>
<emphasis>Usage</emphasis>
14 years, 9 months
Seam SVN: r12596 - in modules/drools/trunk: api/src/main/java/org/jboss/seam/drools/qualifiers and 14 other directories.
by seam-commits@lists.jboss.org
Author: tsurdilovic
Date: 2010-04-22 19:14:34 -0400 (Thu, 22 Apr 2010)
New Revision: 12596
Added:
modules/drools/trunk/api/src/main/java/org/jboss/seam/drools/qualifiers/EntryPoint.java
modules/drools/trunk/api/src/main/java/org/jboss/seam/drools/qualifiers/Query.java
modules/drools/trunk/impl/src/test/java/org/jboss/seam/drools/test/DroolsModuleFilter.java
Removed:
modules/drools/trunk/api/src/main/java/org/jboss/seam/drools/annotations/EntryPoint.java
modules/drools/trunk/api/src/main/java/org/jboss/seam/drools/annotations/Query.java
modules/drools/trunk/impl/src/test/java/org/jboss/seam/drools/test/cep/CEPTestFilter.java
modules/drools/trunk/impl/src/test/java/org/jboss/seam/drools/test/flow/FlowTestFilter.java
modules/drools/trunk/impl/src/test/java/org/jboss/seam/drools/test/interceptors/InterceptorsTestFilter.java
modules/drools/trunk/impl/src/test/java/org/jboss/seam/drools/test/kagent/KAgentTestFilter.java
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
modules/drools/trunk/impl/src/test/java/org/jboss/seam/drools/test/query/QueryTestFilter.java
Modified:
modules/drools/trunk/api/src/main/java/org/jboss/seam/drools/qualifiers/config/DefaultConfig.java
modules/drools/trunk/impl/src/main/java/org/jboss/seam/drools/EntryPointProducer.java
modules/drools/trunk/impl/src/main/java/org/jboss/seam/drools/QueryResultsProducer.java
modules/drools/trunk/impl/src/main/java/org/jboss/seam/drools/annotations/InsertFact.java
modules/drools/trunk/impl/src/main/java/org/jboss/seam/drools/interceptor/InsertFactInterceptor.java
modules/drools/trunk/impl/src/main/resources/META-INF/beans.xml
modules/drools/trunk/impl/src/test/java/org/jboss/seam/drools/test/cep/CEPTest.java
modules/drools/trunk/impl/src/test/java/org/jboss/seam/drools/test/flow/FlowTest.java
modules/drools/trunk/impl/src/test/java/org/jboss/seam/drools/test/interceptors/InterceptorsTest.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/ksession/KSessionTest.java
modules/drools/trunk/impl/src/test/java/org/jboss/seam/drools/test/query/QueryTest.java
modules/drools/trunk/impl/src/test/resources/org/jboss/seam/drools/test/interceptors/InterceptorsTest-beans.xml
Log:
Changed tests to use the new ShrinkWrap changes. Tests are still failing to what seems Arquillian changes in newest snapshot.
Deleted: modules/drools/trunk/api/src/main/java/org/jboss/seam/drools/annotations/EntryPoint.java
===================================================================
--- modules/drools/trunk/api/src/main/java/org/jboss/seam/drools/annotations/EntryPoint.java 2010-04-22 22:03:11 UTC (rev 12595)
+++ modules/drools/trunk/api/src/main/java/org/jboss/seam/drools/annotations/EntryPoint.java 2010-04-22 23:14:34 UTC (rev 12596)
@@ -1,45 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright ${year}, 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.drools.annotations;
-
-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;
-
-/**
- *
- * @author Tihomir Surdilovic
- */
-@Target( { TYPE, METHOD, FIELD, PARAMETER })
-@Documented
-@Retention(RUNTIME)
-@Inherited
-public @interface EntryPoint {
- String value() default "";
-}
Deleted: modules/drools/trunk/api/src/main/java/org/jboss/seam/drools/annotations/Query.java
===================================================================
--- modules/drools/trunk/api/src/main/java/org/jboss/seam/drools/annotations/Query.java 2010-04-22 22:03:11 UTC (rev 12595)
+++ modules/drools/trunk/api/src/main/java/org/jboss/seam/drools/annotations/Query.java 2010-04-22 23:14:34 UTC (rev 12596)
@@ -1,45 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright ${year}, 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.drools.annotations;
-
-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;
-
-/**
- *
- * @author Tihomir Surdilovic
- */
-@Target( { TYPE, METHOD, FIELD, PARAMETER })
-@Documented
-@Retention(RUNTIME)
-@Inherited
-public @interface Query {
- String value() default "";
-}
Copied: modules/drools/trunk/api/src/main/java/org/jboss/seam/drools/qualifiers/EntryPoint.java (from rev 12561, modules/drools/trunk/api/src/main/java/org/jboss/seam/drools/annotations/EntryPoint.java)
===================================================================
--- modules/drools/trunk/api/src/main/java/org/jboss/seam/drools/qualifiers/EntryPoint.java (rev 0)
+++ modules/drools/trunk/api/src/main/java/org/jboss/seam/drools/qualifiers/EntryPoint.java 2010-04-22 23:14:34 UTC (rev 12596)
@@ -0,0 +1,49 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright ${year}, 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.drools.qualifiers;
+
+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.enterprise.util.Nonbinding;
+import javax.inject.Qualifier;
+
+/**
+ *
+ * @author Tihomir Surdilovic
+ */
+@Qualifier
+@Target( { TYPE, METHOD, FIELD, PARAMETER })
+@Documented
+@Retention(RUNTIME)
+@Inherited
+public @interface EntryPoint {
+ @Nonbinding String value() default "";
+}
Copied: modules/drools/trunk/api/src/main/java/org/jboss/seam/drools/qualifiers/Query.java (from rev 12561, modules/drools/trunk/api/src/main/java/org/jboss/seam/drools/annotations/Query.java)
===================================================================
--- modules/drools/trunk/api/src/main/java/org/jboss/seam/drools/qualifiers/Query.java (rev 0)
+++ modules/drools/trunk/api/src/main/java/org/jboss/seam/drools/qualifiers/Query.java 2010-04-22 23:14:34 UTC (rev 12596)
@@ -0,0 +1,49 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright ${year}, 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.drools.qualifiers;
+
+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.enterprise.util.Nonbinding;
+import javax.inject.Qualifier;
+
+/**
+ *
+ * @author Tihomir Surdilovic
+ */
+@Qualifier
+@Target( { TYPE, METHOD, FIELD, PARAMETER })
+@Documented
+@Retention(RUNTIME)
+@Inherited
+public @interface Query {
+ @Nonbinding String value() default "";
+}
Modified: modules/drools/trunk/api/src/main/java/org/jboss/seam/drools/qualifiers/config/DefaultConfig.java
===================================================================
--- modules/drools/trunk/api/src/main/java/org/jboss/seam/drools/qualifiers/config/DefaultConfig.java 2010-04-22 22:03:11 UTC (rev 12595)
+++ modules/drools/trunk/api/src/main/java/org/jboss/seam/drools/qualifiers/config/DefaultConfig.java 2010-04-22 23:14:34 UTC (rev 12596)
@@ -28,7 +28,6 @@
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;
@@ -42,7 +41,6 @@
@Target( { TYPE, METHOD, FIELD, PARAMETER })
@Documented
@Retention(RUNTIME)
-@Inherited
public @interface DefaultConfig {
}
Modified: modules/drools/trunk/impl/src/main/java/org/jboss/seam/drools/EntryPointProducer.java
===================================================================
--- modules/drools/trunk/impl/src/main/java/org/jboss/seam/drools/EntryPointProducer.java 2010-04-22 22:03:11 UTC (rev 12595)
+++ modules/drools/trunk/impl/src/main/java/org/jboss/seam/drools/EntryPointProducer.java 2010-04-22 23:14:34 UTC (rev 12596)
@@ -30,7 +30,7 @@
import org.drools.runtime.StatefulKnowledgeSession;
import org.drools.runtime.rule.WorkingMemoryEntryPoint;
-import org.jboss.seam.drools.annotations.EntryPoint;
+import org.jboss.seam.drools.qualifiers.EntryPoint;
import org.jboss.seam.drools.qualifiers.Scanned;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -45,6 +45,7 @@
private static final Logger log = LoggerFactory.getLogger(EntryPointProducer.class);
@Produces
+ @EntryPoint
public WorkingMemoryEntryPoint produceEntryPoint(StatefulKnowledgeSession ksession, InjectionPoint ip) throws Exception
{
String entryPointName = ip.getAnnotated().getAnnotation(EntryPoint.class).value();
@@ -62,6 +63,7 @@
@Produces
@Scanned
+ @EntryPoint
public WorkingMemoryEntryPoint produceScannedEntryPoint(@Scanned StatefulKnowledgeSession ksession, InjectionPoint ip) throws Exception
{
String entryPointName = ip.getAnnotated().getAnnotation(EntryPoint.class).value();
Modified: modules/drools/trunk/impl/src/main/java/org/jboss/seam/drools/QueryResultsProducer.java
===================================================================
--- modules/drools/trunk/impl/src/main/java/org/jboss/seam/drools/QueryResultsProducer.java 2010-04-22 22:03:11 UTC (rev 12595)
+++ modules/drools/trunk/impl/src/main/java/org/jboss/seam/drools/QueryResultsProducer.java 2010-04-22 23:14:34 UTC (rev 12596)
@@ -29,7 +29,7 @@
import org.drools.runtime.StatefulKnowledgeSession;
import org.drools.runtime.rule.QueryResults;
-import org.jboss.seam.drools.annotations.Query;
+import org.jboss.seam.drools.qualifiers.Query;
import org.jboss.seam.drools.qualifiers.Scanned;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -44,6 +44,7 @@
private static final Logger log = LoggerFactory.getLogger(QueryResultsProducer.class);
@Produces
+ @Query
public QueryResults produceQueryResults(StatefulKnowledgeSession ksession, InjectionPoint ip)
{
String queryName = ip.getAnnotated().getAnnotation(Query.class).value();
@@ -60,6 +61,7 @@
@Produces
@Scanned
+ @Query
public QueryResults produceScannedQueryResults(@Scanned StatefulKnowledgeSession ksession, InjectionPoint ip) {
String queryName = ip.getAnnotated().getAnnotation(Query.class).value();
if (queryName != null && queryName.length() > 0)
Modified: modules/drools/trunk/impl/src/main/java/org/jboss/seam/drools/annotations/InsertFact.java
===================================================================
--- modules/drools/trunk/impl/src/main/java/org/jboss/seam/drools/annotations/InsertFact.java 2010-04-22 22:03:11 UTC (rev 12595)
+++ modules/drools/trunk/impl/src/main/java/org/jboss/seam/drools/annotations/InsertFact.java 2010-04-22 23:14:34 UTC (rev 12596)
@@ -37,6 +37,7 @@
*
* @author Tihomir Surdilovic
*/
+
@InterceptorBinding
@Target( { TYPE, METHOD })
@Documented
Modified: modules/drools/trunk/impl/src/main/java/org/jboss/seam/drools/interceptor/InsertFactInterceptor.java
===================================================================
--- modules/drools/trunk/impl/src/main/java/org/jboss/seam/drools/interceptor/InsertFactInterceptor.java 2010-04-22 22:03:11 UTC (rev 12595)
+++ modules/drools/trunk/impl/src/main/java/org/jboss/seam/drools/interceptor/InsertFactInterceptor.java 2010-04-22 23:14:34 UTC (rev 12596)
@@ -41,17 +41,17 @@
@AroundInvoke
public Object insertFact(InvocationContext ctx) throws Exception
{
- System.out.println("*******\n\nIN INTERCEPTOR! \n\n ********");
Annotation[] methodAnnotations = ctx.getMethod().getAnnotations();
for(Annotation nextAnnotation : methodAnnotations) {
- if(manager.isQualifier(nextAnnotation.getClass())) {
+ if(manager.isQualifier(nextAnnotation.annotationType())) {
System.out.println("**************** \n\n\nNEXT QUALIFIER: " + nextAnnotation);
}
- if(manager.isInterceptorBinding(nextAnnotation.getClass())) {
+ if(manager.isInterceptorBinding(nextAnnotation.annotationType())) {
System.out.println("**************** \n\n\n\n NEXT INTERCEPTOR BINDING: " + nextAnnotation);
}
}
+
return ctx.proceed();
}
}
Modified: modules/drools/trunk/impl/src/main/resources/META-INF/beans.xml
===================================================================
--- modules/drools/trunk/impl/src/main/resources/META-INF/beans.xml 2010-04-22 22:03:11 UTC (rev 12595)
+++ modules/drools/trunk/impl/src/main/resources/META-INF/beans.xml 2010-04-22 23:14:34 UTC (rev 12596)
@@ -331,9 +331,5 @@
</d:RuleResources>
</s:parameters>
</d:DroolsConfig>
-
-
- <interceptors>
- <class>org.jboss.seam.drools.interceptor.InsertFactInterceptor</class>
- </interceptors>
+
</beans>
\ No newline at end of file
Added: modules/drools/trunk/impl/src/test/java/org/jboss/seam/drools/test/DroolsModuleFilter.java
===================================================================
--- modules/drools/trunk/impl/src/test/java/org/jboss/seam/drools/test/DroolsModuleFilter.java (rev 0)
+++ modules/drools/trunk/impl/src/test/java/org/jboss/seam/drools/test/DroolsModuleFilter.java 2010-04-22 23:14:34 UTC (rev 12596)
@@ -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.drools.test;
+
+import org.jboss.shrinkwrap.api.ArchivePath;
+import org.jboss.shrinkwrap.api.Filter;
+
+public class DroolsModuleFilter implements Filter<ArchivePath>
+{
+ private String testDirName;
+
+ public DroolsModuleFilter(String testDirName) {
+ this.testDirName = testDirName;
+ }
+
+ public boolean include(ArchivePath path)
+ {
+ if(path.get().startsWith("/org/jboss/seam/drools/test")
+ && !(path.get().startsWith("/org/jboss/seam/drools/test/" + testDirName )) ) {
+ return false;
+ } else {
+ return true;
+ }
+ }
+
+}
Modified: modules/drools/trunk/impl/src/test/java/org/jboss/seam/drools/test/cep/CEPTest.java
===================================================================
--- modules/drools/trunk/impl/src/test/java/org/jboss/seam/drools/test/cep/CEPTest.java 2010-04-22 22:03:11 UTC (rev 12595)
+++ modules/drools/trunk/impl/src/test/java/org/jboss/seam/drools/test/cep/CEPTest.java 2010-04-22 23:14:34 UTC (rev 12596)
@@ -36,10 +36,11 @@
import org.jboss.arquillian.api.Deployment;
import org.jboss.arquillian.junit.Arquillian;
import org.jboss.seam.drools.KnowledgeBaseProducer;
-import org.jboss.seam.drools.annotations.EntryPoint;
+import org.jboss.seam.drools.qualifiers.EntryPoint;
import org.jboss.seam.drools.qualifiers.config.CEPPseudoClockConfig;
+import org.jboss.seam.drools.test.DroolsModuleFilter;
import org.jboss.shrinkwrap.api.ArchivePaths;
-import org.jboss.shrinkwrap.api.Archives;
+import org.jboss.shrinkwrap.api.ShrinkWrap;
import org.jboss.shrinkwrap.api.spec.JavaArchive;
import org.jboss.weld.extensions.resources.ResourceProvider;
import org.junit.Test;
@@ -52,8 +53,8 @@
public static JavaArchive createTestArchive()
{
String pkgPath = CEPTest.class.getPackage().getName().replaceAll("\\.", "/");
- JavaArchive archive = Archives.create("test.jar", JavaArchive.class)
- .addPackages(true, new CEPTestFilter(), KnowledgeBaseProducer.class.getPackage())
+ JavaArchive archive = ShrinkWrap.create("test.jar", JavaArchive.class)
+ .addPackages(true, new DroolsModuleFilter("cep"), KnowledgeBaseProducer.class.getPackage())
.addPackages(true, ResourceProvider.class.getPackage())
.addClass(FireAlarm.class)
.addClass(FireDetected.class)
@@ -65,14 +66,11 @@
//System.out.println(archive.toString(Formatters.VERBOSE));
return archive;
}
-
- @Inject @Default @CEPPseudoClockConfig StatefulKnowledgeSession cepSession;
- @Inject @Default @CEPPseudoClockConfig @EntryPoint("FireDetectionStream") WorkingMemoryEntryPoint fireDetectionStream;
- @Inject @Default @CEPPseudoClockConfig @EntryPoint("SprinklerDetectionStream") WorkingMemoryEntryPoint sprinklerDetectionStream;
-
-
+
@Test
- public void testCEP() {
+ public void testCEP(@Default @CEPPseudoClockConfig StatefulKnowledgeSession cepSession,
+ @Default @CEPPseudoClockConfig @EntryPoint("FireDetectionStream") WorkingMemoryEntryPoint fireDetectionStream,
+ @Default @CEPPseudoClockConfig @EntryPoint("SprinklerDetectionStream") WorkingMemoryEntryPoint sprinklerDetectionStream) {
assertNotNull(cepSession);
assertTrue(cepSession.getId() >= 0);
assertNotNull(fireDetectionStream);
Deleted: modules/drools/trunk/impl/src/test/java/org/jboss/seam/drools/test/cep/CEPTestFilter.java
===================================================================
--- modules/drools/trunk/impl/src/test/java/org/jboss/seam/drools/test/cep/CEPTestFilter.java 2010-04-22 22:03:11 UTC (rev 12595)
+++ modules/drools/trunk/impl/src/test/java/org/jboss/seam/drools/test/cep/CEPTestFilter.java 2010-04-22 23:14:34 UTC (rev 12596)
@@ -1,41 +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.drools.test.cep;
-
-import org.jboss.shrinkwrap.api.Filter;
-
-public class CEPTestFilter 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(CEPTestFilter.class.getPackage().getName())) {
- return false;
- } else {
- return true;
- }
- }
-
-}
-
Modified: modules/drools/trunk/impl/src/test/java/org/jboss/seam/drools/test/flow/FlowTest.java
===================================================================
--- modules/drools/trunk/impl/src/test/java/org/jboss/seam/drools/test/flow/FlowTest.java 2010-04-22 22:03:11 UTC (rev 12595)
+++ modules/drools/trunk/impl/src/test/java/org/jboss/seam/drools/test/flow/FlowTest.java 2010-04-22 23:14:34 UTC (rev 12596)
@@ -36,8 +36,9 @@
import org.jboss.arquillian.junit.Arquillian;
import org.jboss.seam.drools.KnowledgeBaseProducer;
import org.jboss.seam.drools.qualifiers.config.DefaultConfig;
+import org.jboss.seam.drools.test.DroolsModuleFilter;
import org.jboss.shrinkwrap.api.ArchivePaths;
-import org.jboss.shrinkwrap.api.Archives;
+import org.jboss.shrinkwrap.api.ShrinkWrap;
import org.jboss.shrinkwrap.api.spec.JavaArchive;
import org.jboss.weld.extensions.resources.ResourceProvider;
import org.junit.Test;
@@ -50,8 +51,8 @@
public static JavaArchive createTestArchive()
{
String pkgPath = FlowTest.class.getPackage().getName().replaceAll("\\.", "/");
- JavaArchive archive = Archives.create("test.jar", JavaArchive.class)
- .addPackages(true, new FlowTestFilter(), KnowledgeBaseProducer.class.getPackage())
+ JavaArchive archive = ShrinkWrap.create("test.jar", JavaArchive.class)
+ .addPackages(true, new DroolsModuleFilter("flow"), KnowledgeBaseProducer.class.getPackage())
.addPackages(true, ResourceProvider.class.getPackage())
.addClass(Person.class)
.addResource(pkgPath + "/flowtest.drl", ArchivePaths.create("flowtest.drl"))
@@ -63,11 +64,9 @@
return archive;
}
- @Inject @Default @DefaultConfig StatefulKnowledgeSession ksession;
-
@SuppressWarnings("unchecked")
@Test
- public void testFlow() {
+ public void testFlow(@Default @DefaultConfig StatefulKnowledgeSession ksession) {
assertNotNull(ksession);
ksession.setGlobal("errors", new ArrayList<String>());
ksession.insert(new Person("Tihomir", ""));
Deleted: modules/drools/trunk/impl/src/test/java/org/jboss/seam/drools/test/flow/FlowTestFilter.java
===================================================================
--- modules/drools/trunk/impl/src/test/java/org/jboss/seam/drools/test/flow/FlowTestFilter.java 2010-04-22 22:03:11 UTC (rev 12595)
+++ modules/drools/trunk/impl/src/test/java/org/jboss/seam/drools/test/flow/FlowTestFilter.java 2010-04-22 23:14:34 UTC (rev 12596)
@@ -1,40 +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.drools.test.flow;
-
-import org.jboss.shrinkwrap.api.Filter;
-
-public class FlowTestFilter 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(FlowTestFilter.class.getPackage().getName())) {
- return false;
- } else {
- return true;
- }
- }
-
-}
Modified: modules/drools/trunk/impl/src/test/java/org/jboss/seam/drools/test/interceptors/InterceptorsTest.java
===================================================================
--- modules/drools/trunk/impl/src/test/java/org/jboss/seam/drools/test/interceptors/InterceptorsTest.java 2010-04-22 22:03:11 UTC (rev 12595)
+++ modules/drools/trunk/impl/src/test/java/org/jboss/seam/drools/test/interceptors/InterceptorsTest.java 2010-04-22 23:14:34 UTC (rev 12596)
@@ -32,8 +32,10 @@
import org.jboss.arquillian.api.Deployment;
import org.jboss.arquillian.junit.Arquillian;
import org.jboss.seam.drools.KnowledgeBaseProducer;
+import org.jboss.seam.drools.test.DroolsModuleFilter;
import org.jboss.shrinkwrap.api.ArchivePaths;
-import org.jboss.shrinkwrap.api.Archives;
+import org.jboss.shrinkwrap.api.ShrinkWrap;
+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;
@@ -46,21 +48,19 @@
public static JavaArchive createTestArchive()
{
String pkgPath = InterceptorsTest.class.getPackage().getName().replaceAll("\\.", "/");
- JavaArchive archive = Archives.create("test.jar", JavaArchive.class)
- .addPackages(true, new InterceptorsTestFilter(), KnowledgeBaseProducer.class.getPackage())
+ JavaArchive archive = ShrinkWrap.create("test.jar", JavaArchive.class)
+ .addPackages(true, new DroolsModuleFilter("interceptors"), KnowledgeBaseProducer.class.getPackage())
.addPackages(true, ResourceProvider.class.getPackage())
.addClass(Person.class)
.addClass(InterceptorsTestBean.class)
.addResource(pkgPath + "/interceptorstest.drl", ArchivePaths.create("interceptorstest.drl"))
.addManifestResource(pkgPath + "/InterceptorsTest-beans.xml", ArchivePaths.create("beans.xml"));
- //System.out.println(archive.toString(Formatters.VERBOSE));
+ System.out.println(archive.toString(Formatters.VERBOSE));
return archive;
}
- @Inject InterceptorsTestBean ibean;
-
@Test
- public void testInterceptors() {
+ public void testInterceptors(InterceptorsTestBean ibean) {
assertNotNull(ibean);
ibean.getPerson();
Deleted: modules/drools/trunk/impl/src/test/java/org/jboss/seam/drools/test/interceptors/InterceptorsTestFilter.java
===================================================================
--- modules/drools/trunk/impl/src/test/java/org/jboss/seam/drools/test/interceptors/InterceptorsTestFilter.java 2010-04-22 22:03:11 UTC (rev 12595)
+++ modules/drools/trunk/impl/src/test/java/org/jboss/seam/drools/test/interceptors/InterceptorsTestFilter.java 2010-04-22 23:14:34 UTC (rev 12596)
@@ -1,40 +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.drools.test.interceptors;
-
-import org.jboss.shrinkwrap.api.Filter;
-
-public class InterceptorsTestFilter 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(InterceptorsTestFilter.class.getPackage().getName())) {
- return false;
- } else {
- return true;
- }
- }
-
-}
\ No newline at end of file
Deleted: modules/drools/trunk/impl/src/test/java/org/jboss/seam/drools/test/kagent/KAgentTestFilter.java
===================================================================
--- modules/drools/trunk/impl/src/test/java/org/jboss/seam/drools/test/kagent/KAgentTestFilter.java 2010-04-22 22:03:11 UTC (rev 12595)
+++ modules/drools/trunk/impl/src/test/java/org/jboss/seam/drools/test/kagent/KAgentTestFilter.java 2010-04-22 23:14:34 UTC (rev 12596)
@@ -1,27 +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.drools.test.kagent;
-
-public class KAgentTestFilter
-{
-
-}
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-22 22:03:11 UTC (rev 12595)
+++ modules/drools/trunk/impl/src/test/java/org/jboss/seam/drools/test/kbase/KBaseTest.java 2010-04-22 23:14:34 UTC (rev 12596)
@@ -32,8 +32,9 @@
import org.jboss.arquillian.junit.Arquillian;
import org.jboss.seam.drools.KnowledgeBaseProducer;
import org.jboss.seam.drools.qualifiers.config.DefaultConfig;
+import org.jboss.seam.drools.test.DroolsModuleFilter;
import org.jboss.shrinkwrap.api.ArchivePaths;
-import org.jboss.shrinkwrap.api.Archives;
+import org.jboss.shrinkwrap.api.ShrinkWrap;
import org.jboss.shrinkwrap.api.formatter.Formatters;
import org.jboss.shrinkwrap.api.spec.JavaArchive;
import org.jboss.weld.extensions.resources.ResourceProvider;
@@ -47,8 +48,8 @@
public static JavaArchive createTestArchive()
{
String pkgPath = KBaseTest.class.getPackage().getName().replaceAll("\\.", "/");
- JavaArchive archive = Archives.create("test.jar", JavaArchive.class)
- .addPackages(true, new KBaseTestFilter(), KnowledgeBaseProducer.class.getPackage())
+ JavaArchive archive = ShrinkWrap.create("test.jar", JavaArchive.class)
+ .addPackages(true, new DroolsModuleFilter("kbase"), KnowledgeBaseProducer.class.getPackage())
.addPackages(true, ResourceProvider.class.getPackage())
.addClass(KBaseTestRules.class)
.addClass(MyKnowledgeBaseEventListener.class)
@@ -60,10 +61,8 @@
return archive;
}
- @Inject @Default @DefaultConfig KnowledgeBase kbase;
-
@Test
- public void testKBase()
+ public void testKBase(@Default @DefaultConfig KnowledgeBase kbase)
{
assertNotNull(kbase);
assertTrue(kbase.getKnowledgePackage("org.jboss.seam.drools.test.kbase").getRules().size() == 3);
Deleted: 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 2010-04-22 22:03:11 UTC (rev 12595)
+++ modules/drools/trunk/impl/src/test/java/org/jboss/seam/drools/test/kbase/KBaseTestFilter.java 2010-04-22 23:14:34 UTC (rev 12596)
@@ -1,40 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright ${year}, 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.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-22 22:03:11 UTC (rev 12595)
+++ modules/drools/trunk/impl/src/test/java/org/jboss/seam/drools/test/ksession/KSessionTest.java 2010-04-22 23:14:34 UTC (rev 12596)
@@ -36,8 +36,9 @@
import org.jboss.seam.drools.annotations.InsertFact;
import org.jboss.seam.drools.qualifiers.config.DefaultConfig;
import org.jboss.seam.drools.qualifiers.config.MVELDialectConfig;
+import org.jboss.seam.drools.test.DroolsModuleFilter;
import org.jboss.shrinkwrap.api.ArchivePaths;
-import org.jboss.shrinkwrap.api.Archives;
+import org.jboss.shrinkwrap.api.ShrinkWrap;
import org.jboss.shrinkwrap.api.spec.JavaArchive;
import org.jboss.weld.extensions.resources.ResourceProvider;
import org.junit.Test;
@@ -50,8 +51,8 @@
public static JavaArchive createTestArchive()
{
String pkgPath = KSessionTest.class.getPackage().getName().replaceAll("\\.", "/");
- JavaArchive archive = Archives.create("test.jar", JavaArchive.class)
- .addPackages(true, new KSessionTestFiler(), KnowledgeBaseProducer.class.getPackage())
+ JavaArchive archive = ShrinkWrap.create("test.jar", JavaArchive.class)
+ .addPackages(true, new DroolsModuleFilter("ksession"), KnowledgeBaseProducer.class.getPackage())
.addPackages(true, ResourceProvider.class.getPackage())
.addClass(KSessionTestRules.class)
.addResource(pkgPath + "/ksessiontest.drl", ArchivePaths.create("ksessiontest.drl"))
@@ -62,12 +63,10 @@
return archive;
}
- @Inject @Default @DefaultConfig StatefulKnowledgeSession ksession;
- @Inject @Default @MVELDialectConfig StatefulKnowledgeSession mvelksession;
- @Inject @Default @MVELDialectConfig StatefulKnowledgeSession mvelksession2;
-
@Test
- public void testKSession()
+ public void testKSession(@Default @DefaultConfig StatefulKnowledgeSession ksession,
+ @Default @MVELDialectConfig StatefulKnowledgeSession mvelksession,
+ @Default @MVELDialectConfig StatefulKnowledgeSession mvelksession2)
{
assertNotNull(ksession);
assertTrue(ksession.getId() >= 0);
Deleted: 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 2010-04-22 22:03:11 UTC (rev 12595)
+++ modules/drools/trunk/impl/src/test/java/org/jboss/seam/drools/test/ksession/KSessionTestFiler.java 2010-04-22 23:14:34 UTC (rev 12596)
@@ -1,40 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright ${year}, 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.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;
- }
- }
-
-}
Modified: modules/drools/trunk/impl/src/test/java/org/jboss/seam/drools/test/query/QueryTest.java
===================================================================
--- modules/drools/trunk/impl/src/test/java/org/jboss/seam/drools/test/query/QueryTest.java 2010-04-22 22:03:11 UTC (rev 12595)
+++ modules/drools/trunk/impl/src/test/java/org/jboss/seam/drools/test/query/QueryTest.java 2010-04-22 23:14:34 UTC (rev 12596)
@@ -34,10 +34,11 @@
import org.jboss.arquillian.api.Deployment;
import org.jboss.arquillian.junit.Arquillian;
import org.jboss.seam.drools.KnowledgeBaseProducer;
-import org.jboss.seam.drools.annotations.Query;
+import org.jboss.seam.drools.qualifiers.Query;
import org.jboss.seam.drools.qualifiers.config.DefaultConfig;
+import org.jboss.seam.drools.test.DroolsModuleFilter;
import org.jboss.shrinkwrap.api.ArchivePaths;
-import org.jboss.shrinkwrap.api.Archives;
+import org.jboss.shrinkwrap.api.ShrinkWrap;
import org.jboss.shrinkwrap.api.spec.JavaArchive;
import org.jboss.weld.extensions.resources.ResourceProvider;
import org.junit.Test;
@@ -50,8 +51,8 @@
public static JavaArchive createTestArchive()
{
String pkgPath = QueryTest.class.getPackage().getName().replaceAll("\\.", "/");
- JavaArchive archive = Archives.create("test.jar", JavaArchive.class)
- .addPackages(true, new QueryTestFilter(), KnowledgeBaseProducer.class.getPackage())
+ JavaArchive archive = ShrinkWrap.create("test.jar", JavaArchive.class)
+ .addPackages(true, new DroolsModuleFilter("query"), KnowledgeBaseProducer.class.getPackage())
.addPackages(true, ResourceProvider.class.getPackage())
.addClass(Person.class)
.addClass(QueryFactProvider.class)
@@ -63,13 +64,10 @@
return archive;
}
- @Inject @Default @DefaultConfig @Query("number of adults") QueryResults adultsQuery;
- @Inject @Default @DefaultConfig @Query("number of minors") QueryResults minorsQuery;
-
- @Inject @Default @DefaultConfig ExecutionResults executionResults;
-
@Test
- public void testQuery() {
+ public void testQuery(@Default @DefaultConfig @Query("number of adults") QueryResults adultsQuery,
+ @Default @DefaultConfig @Query("number of minors") QueryResults minorsQuery,
+ @Default @DefaultConfig ExecutionResults executionResults) {
assertNotNull(adultsQuery);
assertNotNull(minorsQuery);
assertNotSame(adultsQuery, minorsQuery);
Deleted: modules/drools/trunk/impl/src/test/java/org/jboss/seam/drools/test/query/QueryTestFilter.java
===================================================================
--- modules/drools/trunk/impl/src/test/java/org/jboss/seam/drools/test/query/QueryTestFilter.java 2010-04-22 22:03:11 UTC (rev 12595)
+++ modules/drools/trunk/impl/src/test/java/org/jboss/seam/drools/test/query/QueryTestFilter.java 2010-04-22 23:14:34 UTC (rev 12596)
@@ -1,41 +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.drools.test.query;
-
-import org.jboss.shrinkwrap.api.Filter;
-
-public class QueryTestFilter 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(QueryTestFilter.class.getPackage().getName())) {
- return false;
- } else {
- return true;
- }
- }
-
-}
-
Modified: modules/drools/trunk/impl/src/test/resources/org/jboss/seam/drools/test/interceptors/InterceptorsTest-beans.xml
===================================================================
--- modules/drools/trunk/impl/src/test/resources/org/jboss/seam/drools/test/interceptors/InterceptorsTest-beans.xml 2010-04-22 22:03:11 UTC (rev 12595)
+++ modules/drools/trunk/impl/src/test/resources/org/jboss/seam/drools/test/interceptors/InterceptorsTest-beans.xml 2010-04-22 23:14:34 UTC (rev 12596)
@@ -24,15 +24,15 @@
xmlns:d="urn:java:org.jboss.seam.drools:org.jboss.seam.drools.config"
xmlns:test="urn:java:org.jboss.seam.drools.test.interceptors">
+ <interceptors>
+ <class>org.jboss.seam.drools.interceptor.InsertFactInterceptor</class>
+ </interceptors>
+
<d:DefaultRuleResources>
<s:specializes/>
<d:resources>
<s:value>classpath;interceptorstest.drl;DRL</s:value>
</d:resources>
</d:DefaultRuleResources>
-
- <test:InterceptorsTestBean>
- <s:overrides/>
- </test:InterceptorsTestBean>
-
+
</beans>
14 years, 9 months
Seam SVN: r12595 - modules/faces/tags.
by seam-commits@lists.jboss.org
Author: lincolnthree
Date: 2010-04-22 18:03:11 -0400 (Thu, 22 Apr 2010)
New Revision: 12595
Removed:
modules/faces/tags/3.0.0.Alpha2/
Log:
failed again
14 years, 9 months
Seam SVN: r12594 - in modules/branches/lincolnthree: api and 1 other directories.
by seam-commits@lists.jboss.org
Author: lincolnthree
Date: 2010-04-22 18:02:05 -0400 (Thu, 22 Apr 2010)
New Revision: 12594
Modified:
modules/branches/lincolnthree/api/pom.xml
modules/branches/lincolnthree/impl/pom.xml
modules/branches/lincolnthree/pom.xml
Log:
[maven-release-plugin] prepare for next development iteration
Modified: modules/branches/lincolnthree/api/pom.xml
===================================================================
--- modules/branches/lincolnthree/api/pom.xml 2010-04-22 22:01:54 UTC (rev 12593)
+++ modules/branches/lincolnthree/api/pom.xml 2010-04-22 22:02:05 UTC (rev 12594)
@@ -4,11 +4,11 @@
<parent>
<artifactId>seam-faces-parent</artifactId>
<groupId>org.jboss.seam.faces</groupId>
- <version>3.0.0.Alpha2</version>
+ <version>3.0.0-SNAPSHOT</version>
</parent>
<artifactId>seam-faces-api</artifactId>
- <version>3.0.0.Alpha2</version>
+ <version>3.0.0-SNAPSHOT</version>
<packaging>jar</packaging>
<name>Seam Faces Module API</name>
Modified: modules/branches/lincolnthree/impl/pom.xml
===================================================================
--- modules/branches/lincolnthree/impl/pom.xml 2010-04-22 22:01:54 UTC (rev 12593)
+++ modules/branches/lincolnthree/impl/pom.xml 2010-04-22 22:02:05 UTC (rev 12594)
@@ -4,11 +4,11 @@
<parent>
<artifactId>seam-faces-parent</artifactId>
<groupId>org.jboss.seam.faces</groupId>
- <version>3.0.0.Alpha2</version>
+ <version>3.0.0-SNAPSHOT</version>
</parent>
<artifactId>seam-faces</artifactId>
- <version>3.0.0.Alpha2</version>
+ <version>3.0.0-SNAPSHOT</version>
<packaging>jar</packaging>
<name>Seam Faces Module Core Implementation</name>
Modified: modules/branches/lincolnthree/pom.xml
===================================================================
--- modules/branches/lincolnthree/pom.xml 2010-04-22 22:01:54 UTC (rev 12593)
+++ modules/branches/lincolnthree/pom.xml 2010-04-22 22:02:05 UTC (rev 12594)
@@ -9,7 +9,7 @@
<artifactId>seam-faces-parent</artifactId>
<groupId>org.jboss.seam.faces</groupId>
- <version>3.0.0.Alpha2</version>
+ <version>3.0.0-SNAPSHOT</version>
<packaging>pom</packaging>
<name>Seam Faces Module Parent POM</name>
@@ -178,11 +178,11 @@
</developers>
<scm>
- <connection>scm:svn:http://anonsvn.jboss.org/repos/seam/modules/faces/tags/3.0.0.Alpha2
+ <connection>scm:svn:http://anonsvn.jboss.org/repos/seam/modules/faces/trunk
</connection>
- <developerConnection>scm:svn:https://svn.jboss.org/repos/seam/modules/faces/tags/3.0.0.Alpha2
+ <developerConnection>scm:svn:https://svn.jboss.org/repos/seam/modules/faces/trunk
</developerConnection>
- <url>http://fisheye.jboss.org/browse/Seam/modules/faces/tags/3.0.0.Alpha2</url>
+ <url>http://fisheye.jboss.org/browse/Seam/modules/faces/trunk</url>
</scm>
<build>
14 years, 9 months
Seam SVN: r12593 - modules/faces/tags.
by seam-commits@lists.jboss.org
Author: lincolnthree
Date: 2010-04-22 18:01:54 -0400 (Thu, 22 Apr 2010)
New Revision: 12593
Added:
modules/faces/tags/3.0.0.Alpha2/
Log:
[maven-scm] copy for tag 3.0.0.Alpha2
Copied: modules/faces/tags/3.0.0.Alpha2 (from rev 12592, modules/faces/trunk)
14 years, 9 months
Seam SVN: r12592 - in modules/branches/lincolnthree: api and 1 other directories.
by seam-commits@lists.jboss.org
Author: lincolnthree
Date: 2010-04-22 18:01:43 -0400 (Thu, 22 Apr 2010)
New Revision: 12592
Modified:
modules/branches/lincolnthree/api/pom.xml
modules/branches/lincolnthree/impl/pom.xml
modules/branches/lincolnthree/pom.xml
Log:
[maven-release-plugin] prepare release 3.0.0.Alpha2
Modified: modules/branches/lincolnthree/api/pom.xml
===================================================================
--- modules/branches/lincolnthree/api/pom.xml 2010-04-22 22:00:41 UTC (rev 12591)
+++ modules/branches/lincolnthree/api/pom.xml 2010-04-22 22:01:43 UTC (rev 12592)
@@ -4,11 +4,11 @@
<parent>
<artifactId>seam-faces-parent</artifactId>
<groupId>org.jboss.seam.faces</groupId>
- <version>3.0.0-SNAPSHOT</version>
+ <version>3.0.0.Alpha2</version>
</parent>
<artifactId>seam-faces-api</artifactId>
- <version>3.0.0-SNAPSHOT</version>
+ <version>3.0.0.Alpha2</version>
<packaging>jar</packaging>
<name>Seam Faces Module API</name>
Modified: modules/branches/lincolnthree/impl/pom.xml
===================================================================
--- modules/branches/lincolnthree/impl/pom.xml 2010-04-22 22:00:41 UTC (rev 12591)
+++ modules/branches/lincolnthree/impl/pom.xml 2010-04-22 22:01:43 UTC (rev 12592)
@@ -4,11 +4,11 @@
<parent>
<artifactId>seam-faces-parent</artifactId>
<groupId>org.jboss.seam.faces</groupId>
- <version>3.0.0-SNAPSHOT</version>
+ <version>3.0.0.Alpha2</version>
</parent>
<artifactId>seam-faces</artifactId>
- <version>3.0.0-SNAPSHOT</version>
+ <version>3.0.0.Alpha2</version>
<packaging>jar</packaging>
<name>Seam Faces Module Core Implementation</name>
Modified: modules/branches/lincolnthree/pom.xml
===================================================================
--- modules/branches/lincolnthree/pom.xml 2010-04-22 22:00:41 UTC (rev 12591)
+++ modules/branches/lincolnthree/pom.xml 2010-04-22 22:01:43 UTC (rev 12592)
@@ -9,7 +9,7 @@
<artifactId>seam-faces-parent</artifactId>
<groupId>org.jboss.seam.faces</groupId>
- <version>3.0.0-SNAPSHOT</version>
+ <version>3.0.0.Alpha2</version>
<packaging>pom</packaging>
<name>Seam Faces Module Parent POM</name>
@@ -178,11 +178,11 @@
</developers>
<scm>
- <connection>scm:svn:http://anonsvn.jboss.org/repos/seam/modules/faces/trunk
+ <connection>scm:svn:http://anonsvn.jboss.org/repos/seam/modules/faces/tags/3.0.0.Alpha2
</connection>
- <developerConnection>scm:svn:https://svn.jboss.org/repos/seam/modules/faces/trunk
+ <developerConnection>scm:svn:https://svn.jboss.org/repos/seam/modules/faces/tags/3.0.0.Alpha2
</developerConnection>
- <url>http://fisheye.jboss.org/browse/Seam/modules/faces/trunk</url>
+ <url>http://fisheye.jboss.org/browse/Seam/modules/faces/tags/3.0.0.Alpha2</url>
</scm>
<build>
14 years, 9 months
Seam SVN: r12591 - in modules/branches/lincolnthree/impl/src/main/java/org/jboss/seam/faces: util and 1 other directory.
by seam-commits@lists.jboss.org
Author: lincolnthree
Date: 2010-04-22 18:00:41 -0400 (Thu, 22 Apr 2010)
New Revision: 12591
Added:
modules/branches/lincolnthree/impl/src/main/java/org/jboss/seam/faces/util/BeanManagerUtils.java
Modified:
modules/branches/lincolnthree/impl/src/main/java/org/jboss/seam/faces/environment/SeamApplicationWrapper.java
Log:
Modified: modules/branches/lincolnthree/impl/src/main/java/org/jboss/seam/faces/environment/SeamApplicationWrapper.java
===================================================================
--- modules/branches/lincolnthree/impl/src/main/java/org/jboss/seam/faces/environment/SeamApplicationWrapper.java 2010-04-22 21:59:00 UTC (rev 12590)
+++ modules/branches/lincolnthree/impl/src/main/java/org/jboss/seam/faces/environment/SeamApplicationWrapper.java 2010-04-22 22:00:41 UTC (rev 12591)
@@ -22,13 +22,8 @@
package org.jboss.seam.faces.environment;
-import java.util.Set;
-
import javax.enterprise.context.ApplicationScoped;
-import javax.enterprise.context.spi.CreationalContext;
import javax.enterprise.event.Observes;
-import javax.enterprise.inject.spi.Bean;
-import javax.enterprise.inject.spi.BeanManager;
import javax.faces.FactoryFinder;
import javax.faces.application.Application;
import javax.faces.application.ApplicationFactory;
@@ -38,11 +33,11 @@
import javax.faces.validator.Validator;
import javax.inject.Inject;
-import org.jboss.seam.faces.event.PhaseEventBridge;
+import org.jboss.seam.faces.util.BeanManagerUtils;
/**
- * Provides @{@link Inject} support for JSF artifacts such as {@link Converter},
- * {@link Validator}.
+ * Provides contextual lifecycle and @{link Inject} support for JSF artifacts
+ * such as {@link Converter}, {@link Validator}.
*
* @author <a href="mailto:lincolnbaxter@gmail.com>Lincoln Baxter, III</a>
*
@@ -53,7 +48,7 @@
private Application parent;
@Inject
- BeanManager manager;
+ BeanManagerUtils managerUtils;
public void installWrapper(@Observes final PostConstructApplicationEvent event)
{
@@ -65,67 +60,33 @@
@Override
public Converter createConverter(final Class<?> targetClass)
{
- Converter result = null;
-
- Set<Bean<?>> beans = manager.getBeans(targetClass);
- if (!beans.isEmpty())
+ Converter result = parent.createConverter(targetClass);
+ if (result != null)
{
- Bean<?> bean = beans.iterator().next();
- CreationalContext<?> context = manager.createCreationalContext(bean);
- result = (Converter) manager.getReference(bean, PhaseEventBridge.class, context);
+ result = managerUtils.getContextualInstance(result.getClass());
}
-
- if (result == null)
- {
- result = parent.createConverter(targetClass);
- }
-
return result;
}
@Override
public Converter createConverter(final String converterId)
{
- /*
- * We need to ask for an instance because we have no way of getting the
- * type information by id
- */
Converter result = parent.createConverter(converterId);
if (result != null)
{
- Class<? extends Converter> targetClass = result.getClass();
- Set<Bean<?>> beans = manager.getBeans(targetClass);
- if (!beans.isEmpty())
- {
- Bean<?> bean = beans.iterator().next();
- CreationalContext<?> context = manager.createCreationalContext(bean);
- result = (Converter) manager.getReference(bean, targetClass, context);
- }
+ result = managerUtils.getContextualInstance(result.getClass());
}
-
return result;
}
@Override
public Validator createValidator(final String validatorId)
{
- /*
- * We need to ask for an instance because we have no way of getting the
- * type information by id
- */
Validator result = parent.createValidator(validatorId);
if (result != null)
{
- Class<? extends Validator> targetClass = result.getClass();
- Set<Bean<?>> beans = manager.getBeans(targetClass);
- if (!beans.isEmpty())
- {
- Bean<?> bean = beans.iterator().next();
- CreationalContext<?> context = manager.createCreationalContext(bean);
- result = (Validator) manager.getReference(bean, targetClass, context);
- }
+ result = managerUtils.getContextualInstance(result.getClass());
}
-
return result;
}
Added: modules/branches/lincolnthree/impl/src/main/java/org/jboss/seam/faces/util/BeanManagerUtils.java
===================================================================
--- modules/branches/lincolnthree/impl/src/main/java/org/jboss/seam/faces/util/BeanManagerUtils.java (rev 0)
+++ modules/branches/lincolnthree/impl/src/main/java/org/jboss/seam/faces/util/BeanManagerUtils.java 2010-04-22 22:00:41 UTC (rev 12591)
@@ -0,0 +1,90 @@
+/*
+ * 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.faces.util;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.enterprise.context.spi.CreationalContext;
+import javax.enterprise.inject.spi.Bean;
+import javax.enterprise.inject.spi.BeanManager;
+import javax.enterprise.inject.spi.InjectionTarget;
+import javax.inject.Inject;
+
+/**
+ * A utility providing common functions to simply use of {@link BeanManager}
+ *
+ * @author <a href="mailto:lincolnbaxter@gmail.com>Lincoln Baxter, III</a>
+ *
+ */
+public class BeanManagerUtils
+{
+ @Inject
+ private BeanManager manager;
+
+ /**
+ * Perform @{@link Inject} on an object as if it were a bean managed by CDI.
+ *
+ * @param instance
+ */
+ @SuppressWarnings("unchecked")
+ public void injectNonContextualInstance(final Object instance)
+ {
+ CreationalContext<Object> creationalContext = manager.createCreationalContext(null);
+ InjectionTarget<Object> injectionTarget = (InjectionTarget<Object>) manager.createInjectionTarget(manager.createAnnotatedType(instance.getClass()));
+ injectionTarget.inject(instance, creationalContext);
+ }
+
+ /**
+ * Get a single CDI managed instance of a specific class. Return only the
+ * first result if multiple beans are available.
+ *
+ * @param type The class for which to return an instance.
+ */
+ @SuppressWarnings("unchecked")
+ public <T> T getContextualInstance(final Class<T> type)
+ {
+ Bean<T> bean = (Bean<T>) manager.resolve(manager.getBeans(type));
+ CreationalContext<T> context = manager.createCreationalContext(bean);
+ T result = (T) manager.getReference(bean, type, context);
+ return result;
+ }
+
+ /**
+ * Get all CDI managed instances of a specific class. Return results in a
+ * {@link List} in no specific order.
+ *
+ * @param type The class for which to return instances.
+ */
+ @SuppressWarnings("unchecked")
+ public <T> List<T> getContextualInstances(final Class<T> type)
+ {
+ List<T> result = new ArrayList<T>();
+ for (Bean<?> bean : manager.getBeans(type))
+ {
+ CreationalContext<T> context = (CreationalContext<T>) manager.createCreationalContext(bean);
+ result.add((T) manager.getReference(bean, type, context));
+ }
+ return result;
+ }
+}
14 years, 9 months