[jboss-svn-commits] JBL Code SVN: r29612 - in labs/jbossrules/trunk: drools-repository/src/main/java/org/drools/repository and 1 other directories.

jboss-svn-commits at lists.jboss.org jboss-svn-commits at lists.jboss.org
Wed Oct 14 10:15:12 EDT 2009


Author: jervisliu
Date: 2009-10-14 10:15:11 -0400 (Wed, 14 Oct 2009)
New Revision: 29612

Modified:
   labs/jbossrules/trunk/drools-repository/src/main/java/org/drools/repository/Item.java
   labs/jbossrules/trunk/drools-repository/src/main/java/org/drools/repository/MyAccessManager.java
   labs/jbossrules/trunk/drools-repository/src/main/java/org/drools/repository/security/DroolsRepositoryAccessManager.java
   labs/jbossrules/trunk/pom.xml
Log:
GUVNOR-460: Upgrade Jackrabbit version to 1.6 

Modified: labs/jbossrules/trunk/drools-repository/src/main/java/org/drools/repository/Item.java
===================================================================
--- labs/jbossrules/trunk/drools-repository/src/main/java/org/drools/repository/Item.java	2009-10-14 14:09:45 UTC (rev 29611)
+++ labs/jbossrules/trunk/drools-repository/src/main/java/org/drools/repository/Item.java	2009-10-14 14:15:11 UTC (rev 29612)
@@ -74,7 +74,13 @@
         }
         else {
             Item rhs = (Item)obj;
-            return this.node.equals(rhs.getNode());
+            try {
+				return this.node.isSame(rhs.getNode());
+			} catch (RepositoryException e) {
+				// TODO Auto-generated catch block
+				e.printStackTrace();
+			}
+			return false;
         }
     }
 

Modified: labs/jbossrules/trunk/drools-repository/src/main/java/org/drools/repository/MyAccessManager.java
===================================================================
--- labs/jbossrules/trunk/drools-repository/src/main/java/org/drools/repository/MyAccessManager.java	2009-10-14 14:09:45 UTC (rev 29611)
+++ labs/jbossrules/trunk/drools-repository/src/main/java/org/drools/repository/MyAccessManager.java	2009-10-14 14:15:11 UTC (rev 29612)
@@ -14,6 +14,10 @@
 //import org.apache.jackrabbit.core.security.authorization.WorkspaceAccessManager;
 //import org.apache.jackrabbit.spi.Name;
 //import org.apache.jackrabbit.spi.Path;
+import org.apache.jackrabbit.core.security.authorization.AccessControlProvider;
+import org.apache.jackrabbit.core.security.authorization.WorkspaceAccessManager;
+import org.apache.jackrabbit.spi.Name;
+import org.apache.jackrabbit.spi.Path;
 
 /**
  * This is just an experimental access manager for proof of concept. Don't
@@ -68,29 +72,35 @@
         //System.out.println("is granted: " + arg0);
         return true;
     }
-/*
-	public boolean canRead(Path arg0) throws RepositoryException {
+
+	public boolean canRead(Path itemPath) throws RepositoryException {
 		// TODO Auto-generated method stub
-		return false;
+		return true;
 	}
 
-	public void init(AMContext arg0, AccessControlProvider arg1,
-			WorkspaceAccessManager arg2) throws AccessDeniedException,
+	public void checkPermission(Path absPath, int permissions)
+			throws AccessDeniedException, RepositoryException {
+		// TODO Auto-generated method stub
+		
+	}
+
+	public void init(AMContext context, AccessControlProvider acProvider,
+			WorkspaceAccessManager wspAccessMgr) throws AccessDeniedException,
 			Exception {
 		// TODO Auto-generated method stub
 		
 	}
 
-	public boolean isGranted(Path arg0, int arg1) throws RepositoryException {
+	public boolean isGranted(Path absPath, int permissions)
+			throws RepositoryException {
 		// TODO Auto-generated method stub
-		return false;
+		return true;
 	}
 
-	public boolean isGranted(Path arg0, Name arg1, int arg2)
+	public boolean isGranted(Path parentPath, Name childName, int permissions)
 			throws RepositoryException {
 		// TODO Auto-generated method stub
-		return false;
+		return true;
 	}
-*/
 
 }

Modified: labs/jbossrules/trunk/drools-repository/src/main/java/org/drools/repository/security/DroolsRepositoryAccessManager.java
===================================================================
--- labs/jbossrules/trunk/drools-repository/src/main/java/org/drools/repository/security/DroolsRepositoryAccessManager.java	2009-10-14 14:09:45 UTC (rev 29611)
+++ labs/jbossrules/trunk/drools-repository/src/main/java/org/drools/repository/security/DroolsRepositoryAccessManager.java	2009-10-14 14:15:11 UTC (rev 29612)
@@ -11,10 +11,10 @@
 import org.apache.jackrabbit.core.ItemId;
 import org.apache.jackrabbit.core.security.AMContext;
 import org.apache.jackrabbit.core.security.AccessManager;
-//import org.apache.jackrabbit.core.security.authorization.AccessControlProvider;
-//import org.apache.jackrabbit.core.security.authorization.WorkspaceAccessManager;
-//import org.apache.jackrabbit.spi.Name;
-//import org.apache.jackrabbit.spi.Path;
+import org.apache.jackrabbit.core.security.authorization.AccessControlProvider;
+import org.apache.jackrabbit.core.security.authorization.WorkspaceAccessManager;
+import org.apache.jackrabbit.spi.Name;
+import org.apache.jackrabbit.spi.Path;
 import org.apache.log4j.Logger;
 import org.jboss.security.authorization.AuthorizationException;
 import org.jboss.security.identity.Identity;
@@ -142,7 +142,7 @@
     public void setDefaultpermission(final String defaultpermission) {
         this.defaultpermission = defaultpermission;
     }
-/*
+
 	public boolean canRead(Path arg0) throws RepositoryException {
 		// TODO Auto-generated method stub
 		return true;
@@ -165,5 +165,11 @@
 		// TODO Auto-generated method stub
 		return true;
 	}
-*/
+
+	public void checkPermission(Path absPath, int permissions)
+			throws AccessDeniedException, RepositoryException {
+		// TODO Auto-generated method stub
+		
+	}
+
 }

Modified: labs/jbossrules/trunk/pom.xml
===================================================================
--- labs/jbossrules/trunk/pom.xml	2009-10-14 14:09:45 UTC (rev 29611)
+++ labs/jbossrules/trunk/pom.xml	2009-10-14 14:15:11 UTC (rev 29612)
@@ -1249,7 +1249,7 @@
             <dependency>
                 <groupId>org.apache.jackrabbit</groupId>
                 <artifactId>jackrabbit-core</artifactId>
-                <version>1.4.5</version>
+                <version>1.6.0</version>
                 <!-- and getting rid of some annoying transitive junk not really needed for us -->
                 <exclusions>
                     <exclusion>



More information about the jboss-svn-commits mailing list