Seam SVN: r11121 - in branches/community/Seam_2_2: doc/Seam_Reference_Guide/en-US and 13 other directories.
by seam-commits@lists.jboss.org
Author: manaRH
Date: 2009-06-11 11:27:28 -0400 (Thu, 11 Jun 2009)
New Revision: 11121
Modified:
branches/community/Seam_2_2/build/root.pom.xml
branches/community/Seam_2_2/build/utilities.build.xml
branches/community/Seam_2_2/doc/Seam_Reference_Guide/en-US/Security.xml
branches/community/Seam_2_2/examples/build.xml
branches/community/Seam_2_2/examples/drools/resources/numberguess.drl
branches/community/Seam_2_2/examples/wiki/build.xml
branches/community/Seam_2_2/seam-gen/build-scripts/deployed-jars-ear.list
branches/community/Seam_2_2/seam-gen/build-scripts/deployed-jars-war.list
branches/community/Seam_2_2/seam-gen/icefaces/build-scripts/deployed-jars-ear.list
branches/community/Seam_2_2/seam-gen/icefaces/build-scripts/deployed-jars-war.list
branches/community/Seam_2_2/seam-gen/icefaces/ide-project-files/eclipse/.classpath
branches/community/Seam_2_2/seam-gen/icefaces/ide-project-files/idea/module.iml
branches/community/Seam_2_2/seam-gen/ide-project-files/eclipse/.classpath
branches/community/Seam_2_2/seam-gen/ide-project-files/idea/module.iml
branches/community/Seam_2_2/seam-gen/ide-project-files/netbeans/project.xml
branches/community/Seam_2_2/seam-gen/ivy/ivy-build.xml
branches/community/Seam_2_2/seam-gen/ivy/ivy.xml
branches/community/Seam_2_2/src/main/org/jboss/seam/drools/RuleBase.java
branches/community/Seam_2_2/src/main/org/jboss/seam/security/permission/RuleBasedPermissionResolver.java
Log:
JBSEAM-4011,
JBSEAM-4214
Modified: branches/community/Seam_2_2/build/root.pom.xml
===================================================================
--- branches/community/Seam_2_2/build/root.pom.xml 2009-06-11 14:43:22 UTC (rev 11120)
+++ branches/community/Seam_2_2/build/root.pom.xml 2009-06-11 15:27:28 UTC (rev 11121)
@@ -40,7 +40,7 @@
<properties>
<version.richfaces>3.3.0.GA</version.richfaces>
<version.wicket>1.3.5.jboss1</version.wicket>
- <version.drools>4.0.4</version.drools>
+ <version.drools>5.0.1</version.drools>
</properties>
<dependencyManagement>
@@ -1066,6 +1066,11 @@
<groupId>xalan</groupId>
<artifactId>xalan</artifactId>
</exclusion>
+
+ <exclusion>
+ <groupId>com.sun</groupId>
+ <artifactId>tools</artifactId>
+ </exclusion>
</exclusions>
</dependency>
Modified: branches/community/Seam_2_2/build/utilities.build.xml
===================================================================
--- branches/community/Seam_2_2/build/utilities.build.xml 2009-06-11 14:43:22 UTC (rev 11120)
+++ branches/community/Seam_2_2/build/utilities.build.xml 2009-06-11 15:27:28 UTC (rev 11121)
@@ -168,10 +168,6 @@
<chainedmapper>
<mapper classpathref="maven-ant-tasks.classpath" classname="org.apache.maven.artifact.ant.VersionMapper" from="${@{scope}.(a){id}.versions}" to="flatten" />
<flattenmapper />
- <compositemapper>
- <identitymapper />
- <globmapper from="mvel.jar" to="mvel14.jar"/>
- </compositemapper>
</chainedmapper>
</copy>
</sequential>
@@ -193,10 +189,6 @@
<chainedmapper>
<mapper classpathref="maven-ant-tasks.classpath" classname="org.apache.maven.artifact.ant.VersionMapper" from="${@{scope}.(a){id}.versions}" to="flatten" />
<flattenmapper />
- <compositemapper>
- <identitymapper />
- <globmapper from="mvel.jar" to="mvel14.jar"/>
- </compositemapper>
</chainedmapper>
</copy>
</sequential>
Modified: branches/community/Seam_2_2/doc/Seam_Reference_Guide/en-US/Security.xml
===================================================================
--- branches/community/Seam_2_2/doc/Seam_Reference_Guide/en-US/Security.xml 2009-06-11 14:43:22 UTC (rev 11120)
+++ branches/community/Seam_2_2/doc/Seam_Reference_Guide/en-US/Security.xml 2009-06-11 15:27:28 UTC (rev 11121)
@@ -3334,6 +3334,9 @@
<itemizedlist>
<listitem>
+ <para>drools-api.jar</para>
+ </listitem>
+ <listitem>
<para>drools-compiler.jar</para>
</listitem>
<listitem>
@@ -3346,7 +3349,7 @@
<para>antlr-runtime.jar</para>
</listitem>
<listitem>
- <para>mvel14.jar</para>
+ <para>mvel2.jar</para>
</listitem>
</itemizedlist>
Modified: branches/community/Seam_2_2/examples/build.xml
===================================================================
--- branches/community/Seam_2_2/examples/build.xml 2009-06-11 14:43:22 UTC (rev 11120)
+++ branches/community/Seam_2_2/examples/build.xml 2009-06-11 15:27:28 UTC (rev 11121)
@@ -322,9 +322,10 @@
<include name="antlr-runtime.jar" if="drools.lib" />
<include name="core.jar" if="drools.lib" />
<include name="janino.jar" if="drools.lib" />
- <include name="mvel14.jar" if="drools.lib" />
+ <include name="mvel2.jar" if="drools.lib" />
<include name="drools-core.jar" if="drools.lib" />
<include name="drools-compiler.jar" if="drools.lib" />
+ <include name="drools-api.jar" if="drools.lib" />
<include name="drools-decisiontables.jar" if="drools.lib"/>
<include name="jxl.jar" if="drools.lib"/>
</fileset>
Modified: branches/community/Seam_2_2/examples/drools/resources/numberguess.drl
===================================================================
--- branches/community/Seam_2_2/examples/drools/resources/numberguess.drl 2009-06-11 14:43:22 UTC (rev 11120)
+++ branches/community/Seam_2_2/examples/drools/resources/numberguess.drl 2009-06-11 15:27:28 UTC (rev 11121)
@@ -3,7 +3,7 @@
import org.jboss.seam.drools.Decision
global Decision decision
-global int randomNumber
+global Integer randomNumber
global Game game
rule High
Modified: branches/community/Seam_2_2/examples/wiki/build.xml
===================================================================
--- branches/community/Seam_2_2/examples/wiki/build.xml 2009-06-11 14:43:22 UTC (rev 11120)
+++ branches/community/Seam_2_2/examples/wiki/build.xml 2009-06-11 15:27:28 UTC (rev 11121)
@@ -234,7 +234,10 @@
<include name="antlr-runtime.jar" />
<include name="core.jar" />
<include name="janino.jar" />
- <include name="mvel14.jar" />
+ <include name="mvel2.jar" />
+ <include name="drools-decisiontables.jar"/>
+ <include name="jxl.jar"/>
+ <include name="drools-api.jar" />
<include name="drools-core.jar" />
<include name="drools-compiler.jar" />
<include name="jboss-seam.jar" />
Modified: branches/community/Seam_2_2/seam-gen/build-scripts/deployed-jars-ear.list
===================================================================
--- branches/community/Seam_2_2/seam-gen/build-scripts/deployed-jars-ear.list 2009-06-11 14:43:22 UTC (rev 11120)
+++ branches/community/Seam_2_2/seam-gen/build-scripts/deployed-jars-ear.list 2009-06-11 15:27:28 UTC (rev 11121)
@@ -2,11 +2,12 @@
commons-beanutils.jar
core.jar
drools-compiler.jar
+drools-api.jar
drools-core.jar
groovy-all.jar
janino.jar
jboss-el.jar
jboss-seam-remoting.jar
jbpm-jpdl.jar
-mvel14.jar
+mvel2.jar
richfaces-api.jar
Modified: branches/community/Seam_2_2/seam-gen/build-scripts/deployed-jars-war.list
===================================================================
--- branches/community/Seam_2_2/seam-gen/build-scripts/deployed-jars-war.list 2009-06-11 14:43:22 UTC (rev 11120)
+++ branches/community/Seam_2_2/seam-gen/build-scripts/deployed-jars-war.list 2009-06-11 15:27:28 UTC (rev 11121)
@@ -2,6 +2,7 @@
commons-beanutils.jar
commons-digester.jar
core.jar
+drools-api.jar
drools-compiler.jar
drools-core.jar
janino.jar
@@ -19,7 +20,7 @@
jbpm-jpdl.jar
jsf-facelets.jar
jxl.jar
-mvel14.jar
+mvel2.jar
richfaces-api.jar
richfaces-impl.jar
richfaces-ui.jar
Modified: branches/community/Seam_2_2/seam-gen/icefaces/build-scripts/deployed-jars-ear.list
===================================================================
--- branches/community/Seam_2_2/seam-gen/icefaces/build-scripts/deployed-jars-ear.list 2009-06-11 14:43:22 UTC (rev 11120)
+++ branches/community/Seam_2_2/seam-gen/icefaces/build-scripts/deployed-jars-ear.list 2009-06-11 15:27:28 UTC (rev 11121)
@@ -3,6 +3,7 @@
commons-digester.jar
commons-fileupload.jar
core.jar
+drools-api.jar
drools-compiler.jar
drools-core.jar
groovy-all.jar
@@ -12,4 +13,4 @@
janino.jar
jboss-el.jar
jbpm-jpdl.jar
-mvel14.jar
+mvel2.jar
Modified: branches/community/Seam_2_2/seam-gen/icefaces/build-scripts/deployed-jars-war.list
===================================================================
--- branches/community/Seam_2_2/seam-gen/icefaces/build-scripts/deployed-jars-war.list 2009-06-11 14:43:22 UTC (rev 11120)
+++ branches/community/Seam_2_2/seam-gen/icefaces/build-scripts/deployed-jars-war.list 2009-06-11 15:27:28 UTC (rev 11121)
@@ -4,6 +4,7 @@
commons-digester.jar
commons-fileupload.jar
core.jar
+drools-api.jar
drools-compiler.jar
drools-core.jar
icefaces.jar
@@ -14,4 +15,4 @@
jboss-seam.jar
jboss-seam-*.jar
jbpm-jpdl.jar
-mvel14.jar
+mvel2.jar
Modified: branches/community/Seam_2_2/seam-gen/icefaces/ide-project-files/eclipse/.classpath
===================================================================
--- branches/community/Seam_2_2/seam-gen/icefaces/ide-project-files/eclipse/.classpath 2009-06-11 14:43:22 UTC (rev 11120)
+++ branches/community/Seam_2_2/seam-gen/icefaces/ide-project-files/eclipse/.classpath 2009-06-11 15:27:28 UTC (rev 11121)
@@ -24,7 +24,8 @@
<classpathentry kind="lib" path="lib/testng.jar"/>
<classpathentry kind="lib" path="lib/jboss-el.jar"/>
<classpathentry kind="lib" path="lib/el-api.jar"/>
- <classpathentry kind="lib" path="lib/mvel14.jar"/>
+ <classpathentry kind="lib" path="lib/mvel2.jar"/>
+ <classpathentry kind="lib" path="lib/drools-api.jar"/>
<classpathentry kind="lib" path="lib/drools-core.jar"/>
<classpathentry kind="lib" path="lib/drools-compiler.jar"/>
<classpathentry kind="lib" path="lib/janino.jar"/>
Modified: branches/community/Seam_2_2/seam-gen/icefaces/ide-project-files/idea/module.iml
===================================================================
--- branches/community/Seam_2_2/seam-gen/icefaces/ide-project-files/idea/module.iml 2009-06-11 14:43:22 UTC (rev 11120)
+++ branches/community/Seam_2_2/seam-gen/icefaces/ide-project-files/idea/module.iml 2009-06-11 15:27:28 UTC (rev 11121)
@@ -241,7 +241,7 @@
<orderEntry type="module-library">
<library>
<CLASSES>
- <root url="jar://$MODULE_DIR$/lib/mvel14.jar!/" />
+ <root url="jar://$MODULE_DIR$/lib/mvel2.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
@@ -250,6 +250,15 @@
<orderEntry type="module-library">
<library>
<CLASSES>
+ <root url="jar://$MODULE_DIR$/lib/drools-api.jar!/" />
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES />
+ </library>
+ </orderEntry>
+ <orderEntry type="module-library">
+ <library>
+ <CLASSES>
<root url="jar://$MODULE_DIR$/lib/drools-core.jar!/" />
</CLASSES>
<JAVADOC />
Modified: branches/community/Seam_2_2/seam-gen/ide-project-files/eclipse/.classpath
===================================================================
--- branches/community/Seam_2_2/seam-gen/ide-project-files/eclipse/.classpath 2009-06-11 14:43:22 UTC (rev 11120)
+++ branches/community/Seam_2_2/seam-gen/ide-project-files/eclipse/.classpath 2009-06-11 15:27:28 UTC (rev 11121)
@@ -23,7 +23,8 @@
<classpathentry kind="lib" path="lib/testng.jar"/>
<classpathentry kind="lib" path="lib/jboss-el.jar"/>
<classpathentry kind="lib" path="lib/el-api.jar"/>
- <classpathentry kind="lib" path="lib/mvel14.jar"/>
+ <classpathentry kind="lib" path="lib/mvel2.jar"/>
+ <classpathentry kind="lib" path="lib/drools-api.jar"/>
<classpathentry kind="lib" path="lib/drools-core.jar"/>
<classpathentry kind="lib" path="lib/drools-compiler.jar"/>
<classpathentry kind="lib" path="lib/janino.jar"/>
Modified: branches/community/Seam_2_2/seam-gen/ide-project-files/idea/module.iml
===================================================================
--- branches/community/Seam_2_2/seam-gen/ide-project-files/idea/module.iml 2009-06-11 14:43:22 UTC (rev 11120)
+++ branches/community/Seam_2_2/seam-gen/ide-project-files/idea/module.iml 2009-06-11 15:27:28 UTC (rev 11121)
@@ -236,7 +236,7 @@
<orderEntry type="module-library">
<library>
<CLASSES>
- <root url="jar://$MODULE_DIR$/lib/mvel14.jar!/" />
+ <root url="jar://$MODULE_DIR$/lib/mvel2.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
@@ -245,6 +245,15 @@
<orderEntry type="module-library">
<library>
<CLASSES>
+ <root url="jar://$MODULE_DIR$/lib/drools-api.jar!/" />
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES />
+ </library>
+ </orderEntry>
+ <orderEntry type="module-library">
+ <library>
+ <CLASSES>
<root url="jar://$MODULE_DIR$/lib/drools-core.jar!/" />
</CLASSES>
<JAVADOC />
Modified: branches/community/Seam_2_2/seam-gen/ide-project-files/netbeans/project.xml
===================================================================
--- branches/community/Seam_2_2/seam-gen/ide-project-files/netbeans/project.xml 2009-06-11 14:43:22 UTC (rev 11120)
+++ branches/community/Seam_2_2/seam-gen/ide-project-files/netbeans/project.xml 2009-06-11 15:27:28 UTC (rev 11121)
@@ -96,18 +96,18 @@
<java-data xmlns="http://www.netbeans.org/ns/freeform-project-java/2">
<compilation-unit>
<package-root>src/main</package-root>
- <classpath mode="compile">lib/hibernate-validator.jar:lib/hibernate.jar:lib/hibernate-annotations.jar:lib/hibernate-commons-annotations.jar:lib/hibernate-entitymanager.jar:lib/jboss-seam.jar:lib/jboss-seam-debug.jar:lib/jboss-cache.jar:lib/jbpm-jpdl.jar:lib/antlr.jar:lib/jgroups.jar:lib/jsf-facelets.jar:lib/jstl.jar:lib/jsf-api.jar:lib/servlet-api.jar:lib/jboss-el.jar:lib/el-api.jar:lib/mvel14.jar:lib/drools-core.jar:lib/drools-compiler.jar:lib/janino.jar:lib/antlr-runtime.jar:lib/mail.jar:lib/persistence-api.jar:lib/ejb-api.jar:lib/jsr250-api.jar:lib/jta.jar:lib/core.jar:lib/jboss-embedded-api.jar:lib/hibernate-search.jar:lib/richfaces-api.jar:lib/richfaces-ui.jar:lib/@driverJar@:lib/lucene-core.jar</classpath>
+ <classpath mode="compile">lib/hibernate-validator.jar:lib/hibernate.jar:lib/hibernate-annotations.jar:lib/hibernate-commons-annotations.jar:lib/hibernate-entitymanager.jar:lib/jboss-seam.jar:lib/jboss-seam-debug.jar:lib/jboss-cache.jar:lib/jbpm-jpdl.jar:lib/antlr.jar:lib/jgroups.jar:lib/jsf-facelets.jar:lib/jstl.jar:lib/jsf-api.jar:lib/servlet-api.jar:lib/jboss-el.jar:lib/el-api.jar:lib/mvel2.jar:lib/drools-api.jar:lib/drools-core.jar:lib/drools-compiler.jar:lib/janino.jar:lib/antlr-runtime.jar:lib/mail.jar:lib/persistence-api.jar:lib/ejb-api.jar:lib/jsr250-api.jar:lib/jta.jar:lib/core.jar:lib/jboss-embedded-api.jar:lib/hibernate-search.jar:lib/richfaces-api.jar:lib/richfaces-ui.jar:lib/@driverJar@:lib/lucene-core.jar</classpath>
<source-level>1.5</source-level>
</compilation-unit>
<compilation-unit>
<package-root>src/hot</package-root>
- <classpath mode="compile">lib/hibernate-validator.jar:lib/hibernate.jar:lib/hibernate-annotations.jar:lib/hibernate-commons-annotations.jar:lib/hibernate-entitymanager.jar:lib/jboss-seam.jar:lib/jboss-seam-debug.jar:lib/jboss-cache.jar:lib/jbpm-jpdl.jar:lib/antlr.jar:lib/jgroups.jar:lib/jsf-facelets.jar:lib/jstl.jar:lib/jsf-api.jar:lib/servlet-api.jar:lib/jboss-el.jar:lib/el-api.jar:lib/mvel14.jar:lib/drools-core.jar:lib/drools-compiler.jar:lib/janino.jar:lib/antlr-runtime.jar:lib/mail.jar:lib/persistence-api.jar:lib/ejb-api.jar:lib/jsr250-api.jar:lib/jta.jar:lib/core.jar:lib/jboss-embedded-api.jar:lib/hibernate-search.jar:lib/richfaces-api.jar:lib/richfaces-ui.jar:lib/@driverJar@:lib/lucene-core.jar</classpath>
+ <classpath mode="compile">lib/hibernate-validator.jar:lib/hibernate.jar:lib/hibernate-annotations.jar:lib/hibernate-commons-annotations.jar:lib/hibernate-entitymanager.jar:lib/jboss-seam.jar:lib/jboss-seam-debug.jar:lib/jboss-cache.jar:lib/jbpm-jpdl.jar:lib/antlr.jar:lib/jgroups.jar:lib/jsf-facelets.jar:lib/jstl.jar:lib/jsf-api.jar:lib/servlet-api.jar:lib/jboss-el.jar:lib/el-api.jar:lib/mvel2.jar:lib/drools-api.jar:lib/drools-core.jar:lib/drools-compiler.jar:lib/janino.jar:lib/antlr-runtime.jar:lib/mail.jar:lib/persistence-api.jar:lib/ejb-api.jar:lib/jsr250-api.jar:lib/jta.jar:lib/core.jar:lib/jboss-embedded-api.jar:lib/hibernate-search.jar:lib/richfaces-api.jar:lib/richfaces-ui.jar:lib/@driverJar@:lib/lucene-core.jar</classpath>
<source-level>1.5</source-level>
</compilation-unit>
<compilation-unit>
<package-root>src/test</package-root>
<unit-tests/>
- <classpath mode="compile">bootstrap:lib/hibernate-validator.jar:lib/hibernate.jar:lib/hibernate-annotations.jar:lib/hibernate-commons-annotations.jar:lib/hibernate-entitymanager.jar:lib/jboss-seam.jar:lib/jboss-seam-debug.jar:lib/jboss-cache.jar:lib/jbpm-jpdl.jar:lib/antlr.jar:lib/jgroups.jar:lib/jsf-facelets.jar:lib/jstl.jar:lib/jsf-api.jar:lib/servlet-api.jar:lib/testng.jar:lib/jboss-el.jar:lib/el-api.jar:lib/mvel14.jar:lib/drools-core.jar:lib/drools-compiler.jar:lib/janino.jar:lib/antlr-runtime.jar:lib/mail.jar:lib/persistence-api.jar:lib/ejb-api.jar:lib/jsr250-api.jar:lib/jta.jar:lib/core.jar:lib/jboss-embedded-api.jar:lib/hibernate-search.jar:lib/richfaces-api.jar:lib/@driverJar@:lib/lucene-core.jar</classpath>
+ <classpath mode="compile">bootstrap:lib/hibernate-validator.jar:lib/hibernate.jar:lib/hibernate-annotations.jar:lib/hibernate-commons-annotations.jar:lib/hibernate-entitymanager.jar:lib/jboss-seam.jar:lib/jboss-seam-debug.jar:lib/jboss-cache.jar:lib/jbpm-jpdl.jar:lib/antlr.jar:lib/jgroups.jar:lib/jsf-facelets.jar:lib/jstl.jar:lib/jsf-api.jar:lib/servlet-api.jar:lib/testng.jar:lib/jboss-el.jar:lib/el-api.jar:lib/mvel2.jar:lib/drools-api.jar:lib/drools-core.jar:lib/drools-compiler.jar:lib/janino.jar:lib/antlr-runtime.jar:lib/mail.jar:lib/persistence-api.jar:lib/ejb-api.jar:lib/jsr250-api.jar:lib/jta.jar:lib/core.jar:lib/jboss-embedded-api.jar:lib/hibernate-search.jar:lib/richfaces-api.jar:lib/@driverJar@:lib/lucene-core.jar</classpath>
<source-level>1.5</source-level>
</compilation-unit>
</java-data>
Modified: branches/community/Seam_2_2/seam-gen/ivy/ivy-build.xml
===================================================================
--- branches/community/Seam_2_2/seam-gen/ivy/ivy-build.xml 2009-06-11 14:43:22 UTC (rev 11120)
+++ branches/community/Seam_2_2/seam-gen/ivy/ivy-build.xml 2009-06-11 15:27:28 UTC (rev 11121)
@@ -35,8 +35,7 @@
</target>
<target name="inflate-core" depends="load-ivy">
- <ivy:retrieve pattern="${lib.dir}/[artifact].[ext]" type="jar" sync="${ivy.sync}" symlink="${ivy.use.symlinks}"/>
- <move file="${lib.dir}/mvel.jar" tofile="${lib.dir}/mvel14.jar" failonerror="false"/>
+ <ivy:retrieve pattern="${lib.dir}/[artifact].[ext]" type="jar" sync="${ivy.sync}" symlink="${ivy.use.symlinks}"/>
</target>
<target name="inflate-source" depends="load-ivy">
Modified: branches/community/Seam_2_2/seam-gen/ivy/ivy.xml
===================================================================
--- branches/community/Seam_2_2/seam-gen/ivy/ivy.xml 2009-06-11 14:43:22 UTC (rev 11120)
+++ branches/community/Seam_2_2/seam-gen/ivy/ivy.xml 2009-06-11 15:27:28 UTC (rev 11121)
@@ -50,13 +50,16 @@
<dependency org="org.antlr" name="antlr-runtime" rev="3.0">
<artifact name="antlr-runtime" type="jar"/>
</dependency>
- <dependency org="org.drools" name="drools-compiler" rev="4.0.4">
+ <dependency org="org.drools" name="drools-api" rev="5.0.1">
+ <artifact name="drools-api" type="jar"/>
+ </dependency>
+ <dependency org="org.drools" name="drools-compiler" rev="5.0.1">
<artifact name="drools-compiler" type="jar"/>
</dependency>
- <dependency org="org.drools" name="drools-core" rev="4.0.4">
+ <dependency org="org.drools" name="drools-core" rev="5.0.1">
<artifact name="drools-core" type="jar"/>
</dependency>
- <dependency org="org.drools" name="drools-decisiontables" rev="4.0.4">
+ <dependency org="org.drools" name="drools-decisiontables" rev="5.0.1">
<artifact name="drools-decisiontables" type="jar"/>
</dependency>
<dependency org="org.eclipse.jdt" name="core" rev="3.2.3.v_686_R32x">
@@ -114,8 +117,8 @@
<dependency org="org.jbpm" name="jbpm-jpdl" rev="3.2.2">
<artifact name="jbpm-jpdl" type="jar"/>
</dependency>
- <dependency org="org.mvel" name="mvel14" rev="1.2.21">
- <artifact name="mvel14" type="jar"/>
+ <dependency org="org.mvel" name="mvel2" rev="2.0.10">
+ <artifact name="mvel2" type="jar"/>
</dependency>
<dependency org="org.richfaces.framework" name="richfaces-api" rev="${richfaces.version}">
<artifact name="richfaces-api" type="jar"/>
Modified: branches/community/Seam_2_2/src/main/org/jboss/seam/drools/RuleBase.java
===================================================================
--- branches/community/Seam_2_2/src/main/org/jboss/seam/drools/RuleBase.java 2009-06-11 14:43:22 UTC (rev 11120)
+++ branches/community/Seam_2_2/src/main/org/jboss/seam/drools/RuleBase.java 2009-06-11 15:27:28 UTC (rev 11121)
@@ -10,7 +10,7 @@
import org.drools.compiler.DroolsError;
import org.drools.compiler.PackageBuilder;
import org.drools.compiler.PackageBuilderConfiguration;
-import org.drools.compiler.RuleError;
+import org.drools.compiler.RuleBuildError;
import org.drools.decisiontable.InputType;
import org.drools.decisiontable.SpreadsheetCompiler;
import org.drools.spi.ConsequenceExceptionHandler;
@@ -90,9 +90,9 @@
log.error("errors parsing rules in: " + ruleFile);
for ( DroolsError error: builder.getErrors().getErrors() )
{
- if (error instanceof RuleError)
+ if (error instanceof RuleBuildError)
{
- RuleError ruleError = (RuleError) error;
+ RuleBuildError ruleError = (RuleBuildError) error;
log.error( ruleError.getMessage() + " (" + ruleFile + ':' + ruleError.getLine() + ')' );
}
else
@@ -108,7 +108,7 @@
{
log.debug("adding consequence exception handler: " + consequenceExceptionHandler.getExpressionString());
RuleBaseConfiguration rbconf = new RuleBaseConfiguration();
- rbconf.setConsequenceExceptionHandler(consequenceExceptionHandler.getValue());
+ rbconf.setConsequenceExceptionHandler(consequenceExceptionHandler.getValue().toString());
ruleBase = RuleBaseFactory.newRuleBase( rbconf );
}
else
Modified: branches/community/Seam_2_2/src/main/org/jboss/seam/security/permission/RuleBasedPermissionResolver.java
===================================================================
--- branches/community/Seam_2_2/src/main/org/jboss/seam/security/permission/RuleBasedPermissionResolver.java 2009-06-11 14:43:22 UTC (rev 11120)
+++ branches/community/Seam_2_2/src/main/org/jboss/seam/security/permission/RuleBasedPermissionResolver.java 2009-06-11 15:27:28 UTC (rev 11121)
@@ -1,329 +1,329 @@
-package org.jboss.seam.security.permission;
-
-import static org.jboss.seam.ScopeType.SESSION;
-import static org.jboss.seam.annotations.Install.BUILT_IN;
-
-import java.io.Serializable;
-import java.security.Principal;
-import java.security.acl.Group;
-import java.util.ArrayList;
-import java.util.Enumeration;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Set;
-
-import org.drools.FactHandle;
-import org.drools.RuleBase;
-import org.drools.StatefulSession;
-import org.drools.base.ClassObjectFilter;
-import org.jboss.seam.Component;
-import org.jboss.seam.ScopeType;
-import org.jboss.seam.Seam;
-import org.jboss.seam.annotations.Create;
-import org.jboss.seam.annotations.Install;
-import org.jboss.seam.annotations.Name;
-import org.jboss.seam.annotations.Observer;
-import org.jboss.seam.annotations.Scope;
-import org.jboss.seam.annotations.Startup;
-import org.jboss.seam.annotations.intercept.BypassInterceptors;
-import org.jboss.seam.contexts.Contexts;
-import org.jboss.seam.drools.SeamGlobalResolver;
-import org.jboss.seam.log.LogProvider;
-import org.jboss.seam.log.Logging;
-import org.jboss.seam.security.Identity;
-import org.jboss.seam.security.Role;
-import org.jboss.seam.security.management.JpaIdentityStore;
-
-/**
- * A permission resolver that uses a Drools rule base to perform permission checks
- *
- * @author Shane Bryzak
- */
-@Name("org.jboss.seam.security.ruleBasedPermissionResolver")
-@Scope(SESSION)
-@BypassInterceptors
-@Install(precedence=BUILT_IN, classDependencies="org.drools.WorkingMemory")
-@Startup
-public class RuleBasedPermissionResolver implements PermissionResolver, Serializable
-{
- public static final String RULES_COMPONENT_NAME = "securityRules";
-
- private static final LogProvider log = Logging.getLogProvider(RuleBasedPermissionResolver.class);
-
- private StatefulSession securityContext;
-
- private RuleBase securityRules;
-
- @Create
- public boolean create()
- {
- initSecurityContext();
- return getSecurityContext() != null;
- }
-
- protected void initSecurityContext()
- {
- if (getSecurityRules() == null)
- {
- setSecurityRules((RuleBase) Component.getInstance(RULES_COMPONENT_NAME, true));
- }
-
- if (getSecurityRules() != null)
- {
- setSecurityContext(getSecurityRules().newStatefulSession(false));
- getSecurityContext().setGlobalResolver(new SeamGlobalResolver(getSecurityContext().getGlobalResolver()));
- }
-
- if (getSecurityContext() == null)
- {
- log.debug("no security rule base available - please install a RuleBase with the name '" +
- RULES_COMPONENT_NAME + "' if permission checks are required.");
- }
- }
-
- /**
- * Performs a permission check for the specified name and action
- *
- * @param target Object The target of the permission check
- * @param action String The action to be performed on the target
- * @return boolean True if the user has the specified permission
- */
- public boolean hasPermission(Object target, String action)
- {
- StatefulSession securityContext = getSecurityContext();
-
- if (securityContext == null) return false;
-
- List<FactHandle> handles = new ArrayList<FactHandle>();
-
- PermissionCheck check;
-
- synchronized( securityContext )
- {
- if (!(target instanceof String) && !(target instanceof Class))
- {
- handles.add( securityContext.insert(target) );
- }
- else if (target instanceof Class)
- {
- String componentName = Seam.getComponentName((Class) target);
- target = componentName != null ? componentName : ((Class) target).getName();
- }
-
- check = new PermissionCheck(target, action);
-
- try
- {
- synchronizeContext();
-
- handles.add( securityContext.insert(check) );
-
- securityContext.fireAllRules();
- }
- finally
- {
- for (FactHandle handle : handles)
- {
- securityContext.retract(handle);
- }
- }
- }
-
- return check.isGranted();
- }
-
- public void filterSetByAction(Set<Object> targets, String action)
- {
- Iterator iter = targets.iterator();
- while (iter.hasNext())
- {
- Object target = iter.next();
- if (hasPermission(target, action)) iter.remove();
- }
- }
-
- public boolean checkConditionalRole(String roleName, Object target, String action)
- {
- StatefulSession securityContext = getSecurityContext();
- if (securityContext == null) return false;
-
- RoleCheck roleCheck = new RoleCheck(roleName);
-
- List<FactHandle> handles = new ArrayList<FactHandle>();
- PermissionCheck check = new PermissionCheck(target, action);
-
- synchronized( securityContext )
- {
- if (!(target instanceof String) && !(target instanceof Class))
- {
- handles.add( securityContext.insert(target) );
- }
- else if (target instanceof Class)
- {
- String componentName = Seam.getComponentName((Class) target);
- target = componentName != null ? componentName : ((Class) target).getName();
- }
-
- try
- {
- handles.add( securityContext.insert(check));
-
- // Check if there are any additional requirements
- securityContext.fireAllRules();
- if (check.hasRequirements())
- {
- for (String requirement : check.getRequirements())
- {
- Object value = Contexts.lookupInStatefulContexts(requirement);
- if (value != null)
- {
- handles.add (securityContext.insert(value));
- }
- }
- }
-
- synchronizeContext();
-
- handles.add( securityContext.insert(roleCheck));
- handles.add( securityContext.insert(check));
-
- securityContext.fireAllRules();
- }
- finally
- {
- for (FactHandle handle : handles)
- {
- securityContext.retract(handle);
- }
- }
- }
-
- return roleCheck.isGranted();
- }
-
- @SuppressWarnings("unchecked")
- @Observer(Identity.EVENT_LOGGED_OUT)
- public void unAuthenticate()
- {
- if (getSecurityContext() != null)
- {
- getSecurityContext().dispose();
- setSecurityContext(null);
- }
- initSecurityContext();
- }
-
- /**
- * Synchronises the state of the security context with that of the subject
- */
- private void synchronizeContext()
- {
- Identity identity = Identity.instance();
-
- if (getSecurityContext() != null)
- {
- getSecurityContext().insert(identity.getPrincipal());
-
- for ( Group sg : identity.getSubject().getPrincipals(Group.class) )
- {
- if ( Identity.ROLES_GROUP.equals( sg.getName() ) )
- {
- Enumeration e = sg.members();
- while (e.hasMoreElements())
- {
- Principal role = (Principal) e.nextElement();
-
- boolean found = false;
- Iterator<Role> iter = getSecurityContext().iterateObjects(new ClassObjectFilter(Role.class));
- while (iter.hasNext())
- {
- Role r = iter.next();
- if (r.getName().equals(role.getName()))
- {
- found = true;
- break;
- }
- }
-
- if (!found)
- {
- getSecurityContext().insert(new Role(role.getName()));
- }
-
- }
- }
- }
-
- Iterator<Role> iter = getSecurityContext().iterateObjects(new ClassObjectFilter(Role.class));
- while (iter.hasNext())
- {
- Role r = iter.next();
- if (!identity.hasRole(r.getName()))
- {
- FactHandle fh = getSecurityContext().getFactHandle(r);
- getSecurityContext().retract(fh);
- }
- }
- }
- }
-
-
- public StatefulSession getSecurityContext()
- {
- return securityContext;
- }
-
- public void setSecurityContext(StatefulSession securityContext)
- {
- this.securityContext = securityContext;
- }
-
-
- public RuleBase getSecurityRules()
- {
- return securityRules;
- }
-
- public void setSecurityRules(RuleBase securityRules)
- {
- this.securityRules = securityRules;
- }
-
- public static RuleBasedPermissionResolver instance()
- {
- if ( !Contexts.isSessionContextActive() )
- {
- throw new IllegalStateException("No active session context");
- }
-
- RuleBasedPermissionResolver instance = (RuleBasedPermissionResolver) Component.getInstance(
- RuleBasedPermissionResolver.class, ScopeType.SESSION);
-
- if (instance == null)
- {
- throw new IllegalStateException("No RuleBasedPermissionResolver could be created");
- }
-
- return instance;
- }
-
- /**
- * Post-authentication event observer
- */
- @Observer(Identity.EVENT_POST_AUTHENTICATE)
- public void setUserAccountInSecurityContext()
- {
- if (getSecurityContext() != null)
- {
- getSecurityContext().insert(Identity.instance().getPrincipal());
-
- // If we were authenticated with the JpaIdentityStore, then insert the authenticated
- // UserAccount into the security context.
- if (Contexts.isEventContextActive() && Contexts.isSessionContextActive() &&
- Contexts.getEventContext().isSet(JpaIdentityStore.AUTHENTICATED_USER))
- {
- getSecurityContext().insert(Contexts.getEventContext().get(JpaIdentityStore.AUTHENTICATED_USER));
- }
- }
- }
-}
+package org.jboss.seam.security.permission;
+
+import static org.jboss.seam.ScopeType.SESSION;
+import static org.jboss.seam.annotations.Install.BUILT_IN;
+
+import java.io.Serializable;
+import java.security.Principal;
+import java.security.acl.Group;
+import java.util.ArrayList;
+import java.util.Enumeration;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Set;
+
+import org.drools.FactHandle;
+import org.drools.RuleBase;
+import org.drools.StatefulSession;
+import org.drools.ClassObjectFilter;
+import org.jboss.seam.Component;
+import org.jboss.seam.ScopeType;
+import org.jboss.seam.Seam;
+import org.jboss.seam.annotations.Create;
+import org.jboss.seam.annotations.Install;
+import org.jboss.seam.annotations.Name;
+import org.jboss.seam.annotations.Observer;
+import org.jboss.seam.annotations.Scope;
+import org.jboss.seam.annotations.Startup;
+import org.jboss.seam.annotations.intercept.BypassInterceptors;
+import org.jboss.seam.contexts.Contexts;
+import org.jboss.seam.drools.SeamGlobalResolver;
+import org.jboss.seam.log.LogProvider;
+import org.jboss.seam.log.Logging;
+import org.jboss.seam.security.Identity;
+import org.jboss.seam.security.Role;
+import org.jboss.seam.security.management.JpaIdentityStore;
+
+/**
+ * A permission resolver that uses a Drools rule base to perform permission checks
+ *
+ * @author Shane Bryzak
+ */
+@Name("org.jboss.seam.security.ruleBasedPermissionResolver")
+@Scope(SESSION)
+@BypassInterceptors
+@Install(precedence=BUILT_IN, classDependencies="org.drools.WorkingMemory")
+@Startup
+public class RuleBasedPermissionResolver implements PermissionResolver, Serializable
+{
+ public static final String RULES_COMPONENT_NAME = "securityRules";
+
+ private static final LogProvider log = Logging.getLogProvider(RuleBasedPermissionResolver.class);
+
+ private StatefulSession securityContext;
+
+ private RuleBase securityRules;
+
+ @Create
+ public boolean create()
+ {
+ initSecurityContext();
+ return getSecurityContext() != null;
+ }
+
+ protected void initSecurityContext()
+ {
+ if (getSecurityRules() == null)
+ {
+ setSecurityRules((RuleBase) Component.getInstance(RULES_COMPONENT_NAME, true));
+ }
+
+ if (getSecurityRules() != null)
+ {
+ setSecurityContext(getSecurityRules().newStatefulSession(false));
+ getSecurityContext().setGlobalResolver(new SeamGlobalResolver(getSecurityContext().getGlobalResolver()));
+ }
+
+ if (getSecurityContext() == null)
+ {
+ log.debug("no security rule base available - please install a RuleBase with the name '" +
+ RULES_COMPONENT_NAME + "' if permission checks are required.");
+ }
+ }
+
+ /**
+ * Performs a permission check for the specified name and action
+ *
+ * @param target Object The target of the permission check
+ * @param action String The action to be performed on the target
+ * @return boolean True if the user has the specified permission
+ */
+ public boolean hasPermission(Object target, String action)
+ {
+ StatefulSession securityContext = getSecurityContext();
+
+ if (securityContext == null) return false;
+
+ List<FactHandle> handles = new ArrayList<FactHandle>();
+
+ PermissionCheck check;
+
+ synchronized( securityContext )
+ {
+ if (!(target instanceof String) && !(target instanceof Class))
+ {
+ handles.add( securityContext.insert(target) );
+ }
+ else if (target instanceof Class)
+ {
+ String componentName = Seam.getComponentName((Class) target);
+ target = componentName != null ? componentName : ((Class) target).getName();
+ }
+
+ check = new PermissionCheck(target, action);
+
+ try
+ {
+ synchronizeContext();
+
+ handles.add( securityContext.insert(check) );
+
+ securityContext.fireAllRules();
+ }
+ finally
+ {
+ for (FactHandle handle : handles)
+ {
+ securityContext.retract(handle);
+ }
+ }
+ }
+
+ return check.isGranted();
+ }
+
+ public void filterSetByAction(Set<Object> targets, String action)
+ {
+ Iterator iter = targets.iterator();
+ while (iter.hasNext())
+ {
+ Object target = iter.next();
+ if (hasPermission(target, action)) iter.remove();
+ }
+ }
+
+ public boolean checkConditionalRole(String roleName, Object target, String action)
+ {
+ StatefulSession securityContext = getSecurityContext();
+ if (securityContext == null) return false;
+
+ RoleCheck roleCheck = new RoleCheck(roleName);
+
+ List<FactHandle> handles = new ArrayList<FactHandle>();
+ PermissionCheck check = new PermissionCheck(target, action);
+
+ synchronized( securityContext )
+ {
+ if (!(target instanceof String) && !(target instanceof Class))
+ {
+ handles.add( securityContext.insert(target) );
+ }
+ else if (target instanceof Class)
+ {
+ String componentName = Seam.getComponentName((Class) target);
+ target = componentName != null ? componentName : ((Class) target).getName();
+ }
+
+ try
+ {
+ handles.add( securityContext.insert(check));
+
+ // Check if there are any additional requirements
+ securityContext.fireAllRules();
+ if (check.hasRequirements())
+ {
+ for (String requirement : check.getRequirements())
+ {
+ Object value = Contexts.lookupInStatefulContexts(requirement);
+ if (value != null)
+ {
+ handles.add (securityContext.insert(value));
+ }
+ }
+ }
+
+ synchronizeContext();
+
+ handles.add( securityContext.insert(roleCheck));
+ handles.add( securityContext.insert(check));
+
+ securityContext.fireAllRules();
+ }
+ finally
+ {
+ for (FactHandle handle : handles)
+ {
+ securityContext.retract(handle);
+ }
+ }
+ }
+
+ return roleCheck.isGranted();
+ }
+
+ @SuppressWarnings("unchecked")
+ @Observer(Identity.EVENT_LOGGED_OUT)
+ public void unAuthenticate()
+ {
+ if (getSecurityContext() != null)
+ {
+ getSecurityContext().dispose();
+ setSecurityContext(null);
+ }
+ initSecurityContext();
+ }
+
+ /**
+ * Synchronises the state of the security context with that of the subject
+ */
+ private void synchronizeContext()
+ {
+ Identity identity = Identity.instance();
+
+ if (getSecurityContext() != null)
+ {
+ getSecurityContext().insert(identity.getPrincipal());
+
+ for ( Group sg : identity.getSubject().getPrincipals(Group.class) )
+ {
+ if ( Identity.ROLES_GROUP.equals( sg.getName() ) )
+ {
+ Enumeration e = sg.members();
+ while (e.hasMoreElements())
+ {
+ Principal role = (Principal) e.nextElement();
+
+ boolean found = false;
+ Iterator<Role> iter = (Iterator<Role>) getSecurityContext().iterateObjects(new ClassObjectFilter(Role.class));
+ while (iter.hasNext())
+ {
+ Role r = iter.next();
+ if (r.getName().equals(role.getName()))
+ {
+ found = true;
+ break;
+ }
+ }
+
+ if (!found)
+ {
+ getSecurityContext().insert(new Role(role.getName()));
+ }
+
+ }
+ }
+ }
+
+ Iterator<Role> iter = (Iterator<Role>) getSecurityContext().iterateObjects(new ClassObjectFilter(Role.class));
+ while (iter.hasNext())
+ {
+ Role r = iter.next();
+ if (!identity.hasRole(r.getName()))
+ {
+ FactHandle fh = getSecurityContext().getFactHandle(r);
+ getSecurityContext().retract(fh);
+ }
+ }
+ }
+ }
+
+
+ public StatefulSession getSecurityContext()
+ {
+ return securityContext;
+ }
+
+ public void setSecurityContext(StatefulSession securityContext)
+ {
+ this.securityContext = securityContext;
+ }
+
+
+ public RuleBase getSecurityRules()
+ {
+ return securityRules;
+ }
+
+ public void setSecurityRules(RuleBase securityRules)
+ {
+ this.securityRules = securityRules;
+ }
+
+ public static RuleBasedPermissionResolver instance()
+ {
+ if ( !Contexts.isSessionContextActive() )
+ {
+ throw new IllegalStateException("No active session context");
+ }
+
+ RuleBasedPermissionResolver instance = (RuleBasedPermissionResolver) Component.getInstance(
+ RuleBasedPermissionResolver.class, ScopeType.SESSION);
+
+ if (instance == null)
+ {
+ throw new IllegalStateException("No RuleBasedPermissionResolver could be created");
+ }
+
+ return instance;
+ }
+
+ /**
+ * Post-authentication event observer
+ */
+ @Observer(Identity.EVENT_POST_AUTHENTICATE)
+ public void setUserAccountInSecurityContext()
+ {
+ if (getSecurityContext() != null)
+ {
+ getSecurityContext().insert(Identity.instance().getPrincipal());
+
+ // If we were authenticated with the JpaIdentityStore, then insert the authenticated
+ // UserAccount into the security context.
+ if (Contexts.isEventContextActive() && Contexts.isSessionContextActive() &&
+ Contexts.getEventContext().isSet(JpaIdentityStore.AUTHENTICATED_USER))
+ {
+ getSecurityContext().insert(Contexts.getEventContext().get(JpaIdentityStore.AUTHENTICATED_USER));
+ }
+ }
+ }
+}