jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ang...@apache.org
Subject svn commit: r790066 - in /jackrabbit/trunk: jackrabbit-api/src/main/java/org/apache/jackrabbit/api/security/ jackrabbit-core/src/main/java/org/apache/jackrabbit/core/security/authorization/acl/ jackrabbit-core/src/main/java/org/apache/jackrabbit/core/s...
Date Wed, 01 Jul 2009 08:35:42 GMT
Author: angela
Date: Wed Jul  1 08:35:42 2009
New Revision: 790066

URL: http://svn.apache.org/viewvc?rev=790066&view=rev
Log:
JCR-2087 Upgrade to Java 5 as the base platform


Modified:
    jackrabbit/trunk/jackrabbit-api/src/main/java/org/apache/jackrabbit/api/security/JackrabbitAccessControlList.java
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/security/authorization/acl/ACLTemplate.java
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/security/authorization/principalbased/ACLTemplate.java

Modified: jackrabbit/trunk/jackrabbit-api/src/main/java/org/apache/jackrabbit/api/security/JackrabbitAccessControlList.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-api/src/main/java/org/apache/jackrabbit/api/security/JackrabbitAccessControlList.java?rev=790066&r1=790065&r2=790066&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-api/src/main/java/org/apache/jackrabbit/api/security/JackrabbitAccessControlList.java
(original)
+++ jackrabbit/trunk/jackrabbit-api/src/main/java/org/apache/jackrabbit/api/security/JackrabbitAccessControlList.java
Wed Jul  1 08:35:42 2009
@@ -17,6 +17,7 @@
 package org.apache.jackrabbit.api.security;
 
 import javax.jcr.RepositoryException;
+import javax.jcr.Value;
 import javax.jcr.security.AccessControlException;
 import javax.jcr.security.AccessControlList;
 import javax.jcr.security.AccessControlPolicy;
@@ -108,5 +109,5 @@
      * @see AccessControlList#addAccessControlEntry(Principal, Privilege[])
      */
     boolean addEntry(Principal principal, Privilege[] privileges,
-                     boolean isAllow, Map restrictions) throws AccessControlException, RepositoryException;
+                     boolean isAllow, Map<String, Value> restrictions) throws AccessControlException,
RepositoryException;
 }

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/security/authorization/acl/ACLTemplate.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/security/authorization/acl/ACLTemplate.java?rev=790066&r1=790065&r2=790066&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/security/authorization/acl/ACLTemplate.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/security/authorization/acl/ACLTemplate.java
Wed Jul  1 08:35:42 2009
@@ -394,7 +394,7 @@
      * @see org.apache.jackrabbit.api.security.JackrabbitAccessControlList#addEntry(Principal,
Privilege[], boolean, Map)
      */
     public boolean addEntry(Principal principal, Privilege[] privileges,
-                            boolean isAllow, Map restrictions)
+                            boolean isAllow, Map<String, Value> restrictions)
             throws AccessControlException, RepositoryException {
         if (restrictions != null && !restrictions.isEmpty()) {
             throw new AccessControlException("This AccessControlList does not allow for additional
restrictions.");

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/security/authorization/principalbased/ACLTemplate.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/security/authorization/principalbased/ACLTemplate.java?rev=790066&r1=790065&r2=790066&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/security/authorization/principalbased/ACLTemplate.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/security/authorization/principalbased/ACLTemplate.java
Wed Jul  1 08:35:42 2009
@@ -132,7 +132,8 @@
         } // else: no-node at all or no acl-node present.
     }
 
-    AccessControlEntry createEntry(Principal princ, Privilege[] privileges, boolean allow,
Map restrictions) throws RepositoryException {
+    AccessControlEntry createEntry(Principal princ, Privilege[] privileges,
+                                   boolean allow, Map<String, Value> restrictions)
throws RepositoryException {
         if (!principal.equals(princ)) {
             throw new AccessControlException("Invalid principal. Expected: " + principal);
         }
@@ -146,13 +147,13 @@
         }
 
         // make sure the nodePath restriction is of type PATH
-        Value v = (Value) restrictions.get(jcrNodePathName);
+        Value v = restrictions.get(jcrNodePathName);
         if (v.getType() != PropertyType.PATH) {
             v = valueFactory.createValue(v.getString(), PropertyType.PATH);
             restrictions.put(jcrNodePathName, v);
         }
         // ... and glob is of type STRING.
-        v = (Value) restrictions.get(jcrGlobName);
+        v = restrictions.get(jcrGlobName);
         if (v != null && v.getType() != PropertyType.STRING) {
             v = valueFactory.createValue(v.getString(), PropertyType.STRING);
             restrictions.put(jcrGlobName, v);



Mime
View raw message