jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ang...@apache.org
Subject svn commit: r1158248 - in /jackrabbit/trunk: jackrabbit-core/src/main/java/org/apache/jackrabbit/core/cluster/ jackrabbit-core/src/main/java/org/apache/jackrabbit/core/journal/ jackrabbit-core/src/main/java/org/apache/jackrabbit/core/security/authoriza...
Date Tue, 16 Aug 2011 12:54:23 GMT
Author: angela
Date: Tue Aug 16 12:54:23 2011
New Revision: 1158248

URL: http://svn.apache.org/viewvc?rev=1158248&view=rev
Log:
JCR-2887 : Split PrivilegeRegistry in a per-session manager instance and a repository level
registry [work in progress]

Added:
    jackrabbit/trunk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/privilege/PrivilegeDefinitionImpl.java
  (contents, props changed)
      - copied, changed from r1157123, jackrabbit/trunk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/privilege/PrivilegeDefinition.java
    jackrabbit/trunk/jackrabbit-spi/src/main/java/org/apache/jackrabbit/spi/PrivilegeDefinition.java
  (with props)
Removed:
    jackrabbit/trunk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/privilege/PrivilegeDefinition.java
Modified:
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/cluster/ClusterNode.java
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/cluster/PrivilegeEventChannel.java
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/cluster/PrivilegeEventListener.java
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/cluster/PrivilegeRecord.java
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/journal/AbstractRecord.java
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/journal/Record.java
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/security/authorization/PrivilegeManagerImpl.java
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/security/authorization/PrivilegeRegistry.java
    jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/cluster/ClusterRecordTest.java
    jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/cluster/SimpleEventListener.java
    jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/security/authorization/CustomPrivilegeTest.java
    jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/security/authorization/PrivilegeRegistryTest.java
    jackrabbit/trunk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/privilege/PrivilegeDefinitionReader.java
    jackrabbit/trunk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/privilege/PrivilegeDefinitionWriter.java
    jackrabbit/trunk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/privilege/PrivilegeHandler.java
    jackrabbit/trunk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/privilege/PrivilegeXmlHandler.java
    jackrabbit/trunk/jackrabbit-spi-commons/src/test/java/org/apache/jackrabbit/spi/commons/privilege/PrivilegeHandlerTest.java

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/cluster/ClusterNode.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/cluster/ClusterNode.java?rev=1158248&r1=1158247&r2=1158248&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/cluster/ClusterNode.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/cluster/ClusterNode.java
Tue Aug 16 12:54:23 2011
@@ -39,8 +39,8 @@ import org.apache.jackrabbit.core.observ
 import org.apache.jackrabbit.core.state.ChangeLog;
 import org.apache.jackrabbit.core.version.InternalVersionManagerImpl;
 import org.apache.jackrabbit.core.xml.ClonedInputSource;
+import org.apache.jackrabbit.spi.PrivilegeDefinition;
 import org.apache.jackrabbit.spi.QNodeTypeDefinition;
-import org.apache.jackrabbit.spi.commons.privilege.PrivilegeDefinition;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/cluster/PrivilegeEventChannel.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/cluster/PrivilegeEventChannel.java?rev=1158248&r1=1158247&r2=1158248&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/cluster/PrivilegeEventChannel.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/cluster/PrivilegeEventChannel.java
Tue Aug 16 12:54:23 2011
@@ -16,7 +16,7 @@
  */
 package org.apache.jackrabbit.core.cluster;
 
-import org.apache.jackrabbit.spi.commons.privilege.PrivilegeDefinition;
+import org.apache.jackrabbit.spi.PrivilegeDefinition;
 
 import java.util.Collection;
 

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/cluster/PrivilegeEventListener.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/cluster/PrivilegeEventListener.java?rev=1158248&r1=1158247&r2=1158248&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/cluster/PrivilegeEventListener.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/cluster/PrivilegeEventListener.java
Tue Aug 16 12:54:23 2011
@@ -16,7 +16,7 @@
  */
 package org.apache.jackrabbit.core.cluster;
 
-import org.apache.jackrabbit.spi.commons.privilege.PrivilegeDefinition;
+import org.apache.jackrabbit.spi.PrivilegeDefinition;
 
 import javax.jcr.RepositoryException;
 import java.util.Collection;

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/cluster/PrivilegeRecord.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/cluster/PrivilegeRecord.java?rev=1158248&r1=1158247&r2=1158248&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/cluster/PrivilegeRecord.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/cluster/PrivilegeRecord.java
Tue Aug 16 12:54:23 2011
@@ -18,7 +18,7 @@ package org.apache.jackrabbit.core.clust
 
 import org.apache.jackrabbit.core.journal.JournalException;
 import org.apache.jackrabbit.core.journal.Record;
-import org.apache.jackrabbit.spi.commons.privilege.PrivilegeDefinition;
+import org.apache.jackrabbit.spi.PrivilegeDefinition;
 
 import java.util.Collection;
 import java.util.Collections;

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/journal/AbstractRecord.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/journal/AbstractRecord.java?rev=1158248&r1=1158247&r2=1158248&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/journal/AbstractRecord.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/journal/AbstractRecord.java
Tue Aug 16 12:54:23 2011
@@ -16,19 +16,12 @@
  */
 package org.apache.jackrabbit.core.journal;
 
-import java.io.ByteArrayInputStream;
-import java.io.ByteArrayOutputStream;
 import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.io.OutputStreamWriter;
 import java.io.StringReader;
 import java.io.StringWriter;
 import java.util.Collection;
 import java.util.HashMap;
-import java.util.HashSet;
 import java.util.Map;
-import java.util.Set;
 
 import javax.jcr.NamespaceException;
 
@@ -40,6 +33,7 @@ import org.apache.jackrabbit.core.id.Nod
 import org.apache.jackrabbit.core.id.PropertyId;
 import org.apache.jackrabbit.spi.Name;
 import org.apache.jackrabbit.spi.Path;
+import org.apache.jackrabbit.spi.PrivilegeDefinition;
 import org.apache.jackrabbit.spi.QNodeTypeDefinition;
 import org.apache.jackrabbit.spi.commons.conversion.MalformedPathException;
 import org.apache.jackrabbit.spi.commons.conversion.NameException;
@@ -49,10 +43,8 @@ import org.apache.jackrabbit.spi.commons
 import org.apache.jackrabbit.spi.commons.namespace.NamespaceResolver;
 import org.apache.jackrabbit.spi.commons.nodetype.QDefinitionBuilderFactory;
 import org.apache.jackrabbit.spi.commons.nodetype.compact.CompactNodeTypeDefWriter;
-import org.apache.jackrabbit.spi.commons.privilege.PrivilegeDefinition;
 import org.apache.jackrabbit.spi.commons.privilege.PrivilegeDefinitionReader;
 import org.apache.jackrabbit.spi.commons.privilege.PrivilegeDefinitionWriter;
-import org.apache.jackrabbit.spi.commons.privilege.PrivilegeHandler;
 
 /**
  * Base implementation for a record.

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/journal/Record.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/journal/Record.java?rev=1158248&r1=1158247&r2=1158248&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/journal/Record.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/journal/Record.java
Tue Aug 16 12:54:23 2011
@@ -21,7 +21,7 @@ import org.apache.jackrabbit.core.id.Pro
 import org.apache.jackrabbit.spi.Name;
 import org.apache.jackrabbit.spi.Path;
 import org.apache.jackrabbit.spi.QNodeTypeDefinition;
-import org.apache.jackrabbit.spi.commons.privilege.PrivilegeDefinition;
+import org.apache.jackrabbit.spi.PrivilegeDefinition;
 
 /**
  * Record interface.

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/security/authorization/PrivilegeManagerImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/security/authorization/PrivilegeManagerImpl.java?rev=1158248&r1=1158247&r2=1158248&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/security/authorization/PrivilegeManagerImpl.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/security/authorization/PrivilegeManagerImpl.java
Tue Aug 16 12:54:23 2011
@@ -19,9 +19,9 @@ package org.apache.jackrabbit.core.secur
 import org.apache.jackrabbit.api.security.authorization.PrivilegeManager;
 import org.apache.jackrabbit.core.SessionImpl;
 import org.apache.jackrabbit.spi.Name;
+import org.apache.jackrabbit.spi.PrivilegeDefinition;
 import org.apache.jackrabbit.spi.commons.conversion.NameResolver;
 import org.apache.jackrabbit.spi.commons.name.NameConstants;
-import org.apache.jackrabbit.spi.commons.privilege.PrivilegeDefinition;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/security/authorization/PrivilegeRegistry.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/security/authorization/PrivilegeRegistry.java?rev=1158248&r1=1158247&r2=1158248&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/security/authorization/PrivilegeRegistry.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/security/authorization/PrivilegeRegistry.java
Tue Aug 16 12:54:23 2011
@@ -19,8 +19,9 @@ package org.apache.jackrabbit.core.secur
 import org.apache.commons.collections.map.ReferenceMap;
 import org.apache.jackrabbit.core.cluster.PrivilegeEventChannel;
 import org.apache.jackrabbit.core.cluster.PrivilegeEventListener;
+import org.apache.jackrabbit.spi.PrivilegeDefinition;
 import org.apache.jackrabbit.spi.commons.privilege.ParseException;
-import org.apache.jackrabbit.spi.commons.privilege.PrivilegeDefinition;
+import org.apache.jackrabbit.spi.commons.privilege.PrivilegeDefinitionImpl;
 import org.apache.jackrabbit.spi.commons.privilege.PrivilegeDefinitionReader;
 import org.apache.jackrabbit.spi.commons.privilege.PrivilegeDefinitionWriter;
 import org.apache.jackrabbit.core.NamespaceRegistryImpl;
@@ -436,7 +437,8 @@ public final class PrivilegeRegistry imp
      * to constraint violations or if persisting the custom privilege fails.
      */
     void registerDefinition(Name privilegeName, boolean isAbstract, Set<Name> declaredAggregateNames)
throws RepositoryException {
-        Map<Name, PrivilegeDefinition> stubs = Collections.singletonMap(privilegeName,
new PrivilegeDefinition(privilegeName, isAbstract, declaredAggregateNames));
+        PrivilegeDefinition def = new PrivilegeDefinitionImpl(privilegeName, isAbstract,
declaredAggregateNames);
+        Map<Name, PrivilegeDefinition> stubs = Collections.singletonMap(privilegeName,
def);
         registerCustomDefinitions(stubs);
 
         // inform clustering about the new privilege.
@@ -884,7 +886,7 @@ public final class PrivilegeRegistry imp
      * privilege definition. It defines addition information that ease
      * the evaluation of privileges.
      */
-    private final static class Definition extends PrivilegeDefinition {
+    private final static class Definition extends PrivilegeDefinitionImpl {
 
         private final PrivilegeBits bits;
         private final boolean isCustom;

Modified: jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/cluster/ClusterRecordTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/cluster/ClusterRecordTest.java?rev=1158248&r1=1158247&r2=1158248&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/cluster/ClusterRecordTest.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/cluster/ClusterRecordTest.java
Tue Aug 16 12:54:23 2011
@@ -34,12 +34,13 @@ import org.apache.jackrabbit.core.journa
 import org.apache.jackrabbit.core.journal.MemoryJournal;
 import org.apache.jackrabbit.core.journal.MemoryJournal.MemoryRecord;
 import org.apache.jackrabbit.spi.Name;
+import org.apache.jackrabbit.spi.PrivilegeDefinition;
 import org.apache.jackrabbit.spi.QNodeTypeDefinition;
 import org.apache.jackrabbit.spi.commons.name.NameConstants;
 import org.apache.jackrabbit.spi.commons.name.NameFactoryImpl;
 import org.apache.jackrabbit.spi.commons.namespace.NamespaceResolver;
 import org.apache.jackrabbit.spi.commons.nodetype.QNodeTypeDefinitionBuilder;
-import org.apache.jackrabbit.spi.commons.privilege.PrivilegeDefinition;
+import org.apache.jackrabbit.spi.commons.privilege.PrivilegeDefinitionImpl;
 import org.apache.jackrabbit.test.JUnitTest;
 
 /**
@@ -285,7 +286,7 @@ public class ClusterRecordTest extends J
      * @throws Exception
      */
     public void testPrivilegeRegistration() throws Exception {
-        PrivilegeDefinition pdf = new PrivilegeDefinition(NameFactoryImpl.getInstance().create("",
"test"), false, null);
+        PrivilegeDefinition pdf = new PrivilegeDefinitionImpl(NameFactoryImpl.getInstance().create("",
"test"), false, null);
 
         PrivilegeEvent event = new PrivilegeEvent(Collections.singletonList(pdf));
         master.registeredPrivileges(event.getDefinitions());

Modified: jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/cluster/SimpleEventListener.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/cluster/SimpleEventListener.java?rev=1158248&r1=1158247&r2=1158248&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/cluster/SimpleEventListener.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/cluster/SimpleEventListener.java
Tue Aug 16 12:54:23 2011
@@ -31,8 +31,8 @@ import org.apache.jackrabbit.core.id.Nod
 import org.apache.jackrabbit.core.nodetype.InvalidNodeTypeDefException;
 import org.apache.jackrabbit.core.state.ChangeLog;
 import org.apache.jackrabbit.core.state.ItemState;
+import org.apache.jackrabbit.spi.PrivilegeDefinition;
 import org.apache.jackrabbit.spi.QNodeTypeDefinition;
-import org.apache.jackrabbit.spi.commons.privilege.PrivilegeDefinition;
 
 /**
  * Simple event listener that can be registered for all cluster event listener

Modified: jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/security/authorization/CustomPrivilegeTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/security/authorization/CustomPrivilegeTest.java?rev=1158248&r1=1158247&r2=1158248&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/security/authorization/CustomPrivilegeTest.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/security/authorization/CustomPrivilegeTest.java
Tue Aug 16 12:54:23 2011
@@ -17,8 +17,9 @@
 package org.apache.jackrabbit.core.security.authorization;
 
 import org.apache.jackrabbit.spi.NameFactory;
+import org.apache.jackrabbit.spi.PrivilegeDefinition;
 import org.apache.jackrabbit.spi.commons.name.NameFactoryImpl;
-import org.apache.jackrabbit.spi.commons.privilege.PrivilegeDefinition;
+import org.apache.jackrabbit.spi.commons.privilege.PrivilegeDefinitionImpl;
 import org.apache.jackrabbit.spi.commons.privilege.PrivilegeDefinitionWriter;
 import org.apache.jackrabbit.core.RepositoryImpl;
 import org.apache.jackrabbit.core.SessionImpl;
@@ -144,11 +145,11 @@ public class CustomPrivilegeTest extends
         OutputStream out = resource.getOutputStream();
         try {
             List<PrivilegeDefinition> defs = new ArrayList<PrivilegeDefinition>();
-            defs.add(new PrivilegeDefinition(test, false, Collections.singleton(test2)));
-            defs.add(new PrivilegeDefinition(test4, true, Collections.singleton(test5)));
-            defs.add(new PrivilegeDefinition(test5, false, Collections.singleton(test3)));
-            defs.add(new PrivilegeDefinition(test3, false, Collections.singleton(test)));
-            defs.add(new PrivilegeDefinition(test2, false, Collections.singleton(test4)));
+            defs.add(new PrivilegeDefinitionImpl(test, false, Collections.singleton(test2)));
+            defs.add(new PrivilegeDefinitionImpl(test4, true, Collections.singleton(test5)));
+            defs.add(new PrivilegeDefinitionImpl(test5, false, Collections.singleton(test3)));
+            defs.add(new PrivilegeDefinitionImpl(test3, false, Collections.singleton(test)));
+            defs.add(new PrivilegeDefinitionImpl(test2, false, Collections.singleton(test4)));
             PrivilegeDefinitionWriter pdw = new PrivilegeDefinitionWriter("text/xml");
             pdw.writeDefinitions(out, defs.toArray(new PrivilegeDefinition[defs.size()]),
Collections.<String, String>emptyMap());
 
@@ -181,14 +182,14 @@ public class CustomPrivilegeTest extends
         OutputStream out = resource.getOutputStream();
         try {
             List<PrivilegeDefinition> defs = new ArrayList<PrivilegeDefinition>();
-            defs.add(new PrivilegeDefinition(test, false, createNameSet(test2, test3)));
-            defs.add(new PrivilegeDefinition(test2, true, Collections.singleton(test4)));
-            defs.add(new PrivilegeDefinition(test3, true, Collections.singleton(test5)));
-            defs.add(new PrivilegeDefinition(test4, true, Collections.<Name>emptySet()));
-            defs.add(new PrivilegeDefinition(test5, true, Collections.<Name>emptySet()));
+            defs.add(new PrivilegeDefinitionImpl(test, false, createNameSet(test2, test3)));
+            defs.add(new PrivilegeDefinitionImpl(test2, true, Collections.singleton(test4)));
+            defs.add(new PrivilegeDefinitionImpl(test3, true, Collections.singleton(test5)));
+            defs.add(new PrivilegeDefinitionImpl(test4, true, Collections.<Name>emptySet()));
+            defs.add(new PrivilegeDefinitionImpl(test5, true, Collections.<Name>emptySet()));
 
             // the equivalent definition to 'test'
-            defs.add(new PrivilegeDefinition(test6, false, createNameSet(test2, test5)));
+            defs.add(new PrivilegeDefinitionImpl(test6, false, createNameSet(test2, test5)));
 
             PrivilegeDefinitionWriter pdw = new PrivilegeDefinitionWriter("text/xml");
             pdw.writeDefinitions(out, defs.toArray(new PrivilegeDefinition[defs.size()]),
Collections.<String, String>emptyMap());

Modified: jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/security/authorization/PrivilegeRegistryTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/security/authorization/PrivilegeRegistryTest.java?rev=1158248&r1=1158247&r2=1158248&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/security/authorization/PrivilegeRegistryTest.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/security/authorization/PrivilegeRegistryTest.java
Tue Aug 16 12:54:23 2011
@@ -18,9 +18,9 @@ package org.apache.jackrabbit.core.secur
 
 import org.apache.jackrabbit.core.SessionImpl;
 import org.apache.jackrabbit.spi.Name;
+import org.apache.jackrabbit.spi.PrivilegeDefinition;
 import org.apache.jackrabbit.spi.commons.conversion.NameResolver;
 import org.apache.jackrabbit.spi.commons.name.NameConstants;
-import org.apache.jackrabbit.spi.commons.privilege.PrivilegeDefinition;
 import org.apache.jackrabbit.test.AbstractJCRTest;
 
 import javax.jcr.RepositoryException;

Copied: jackrabbit/trunk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/privilege/PrivilegeDefinitionImpl.java
(from r1157123, jackrabbit/trunk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/privilege/PrivilegeDefinition.java)
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/privilege/PrivilegeDefinitionImpl.java?p2=jackrabbit/trunk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/privilege/PrivilegeDefinitionImpl.java&p1=jackrabbit/trunk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/privilege/PrivilegeDefinition.java&r1=1157123&r2=1158248&rev=1158248&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/privilege/PrivilegeDefinition.java
(original)
+++ jackrabbit/trunk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/privilege/PrivilegeDefinitionImpl.java
Tue Aug 16 12:54:23 2011
@@ -17,6 +17,7 @@
 package org.apache.jackrabbit.spi.commons.privilege;
 
 import org.apache.jackrabbit.spi.Name;
+import org.apache.jackrabbit.spi.PrivilegeDefinition;
 
 import java.util.Collections;
 import java.util.Set;
@@ -24,36 +25,47 @@ import java.util.Set;
 /**
  * <code>PrivilegeDefinition</code>
  */
-public class PrivilegeDefinition {
+public class PrivilegeDefinitionImpl implements PrivilegeDefinition {
 
     private final Name name;
     private final boolean isAbstract;
     private final Set<Name> declaredAggregateNames;
 
-    public PrivilegeDefinition(Name name, boolean isAbstract, Set<Name> declaredAggregateNames)
{
+    public PrivilegeDefinitionImpl(Name name, boolean isAbstract, Set<Name> declaredAggregateNames)
{
         this.name = name;
         this.isAbstract = isAbstract;
         this.declaredAggregateNames = declaredAggregateNames == null ? Collections.<Name>emptySet()
: Collections.unmodifiableSet(declaredAggregateNames);
     }
 
+    //------------------------------------------------< PrivilegeDefinition >---
+    /**
+     * @see PrivilegeDefinition#getName()
+     */
     public Name getName() {
         return name;
     }
 
+    /**
+     * @see PrivilegeDefinition#isAbstract()
+     */
     public boolean isAbstract() {
         return isAbstract;
     }
 
+    /**
+     * @see PrivilegeDefinition#getDeclaredAggregateNames()
+     */
     public Set<Name> getDeclaredAggregateNames() {
         return declaredAggregateNames;
     }
 
+    //-------------------------------------------------------------< Object >---
     @Override
     public boolean equals(Object o) {
         if (this == o) return true;
         if (o == null || getClass() != o.getClass()) return false;
 
-        PrivilegeDefinition that = (PrivilegeDefinition) o;
+        PrivilegeDefinitionImpl that = (PrivilegeDefinitionImpl) o;
 
         if (isAbstract != that.isAbstract) return false;
         if (name != null ? !name.equals(that.name) : that.name != null) return false;

Propchange: jackrabbit/trunk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/privilege/PrivilegeDefinitionImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: jackrabbit/trunk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/privilege/PrivilegeDefinitionImpl.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision Rev URL

Modified: jackrabbit/trunk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/privilege/PrivilegeDefinitionReader.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/privilege/PrivilegeDefinitionReader.java?rev=1158248&r1=1158247&r2=1158248&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/privilege/PrivilegeDefinitionReader.java
(original)
+++ jackrabbit/trunk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/privilege/PrivilegeDefinitionReader.java
Tue Aug 16 12:54:23 2011
@@ -16,6 +16,8 @@
  */
 package org.apache.jackrabbit.spi.commons.privilege;
 
+import org.apache.jackrabbit.spi.PrivilegeDefinition;
+
 import java.io.InputStream;
 import java.io.Reader;
 import java.util.HashMap;

Modified: jackrabbit/trunk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/privilege/PrivilegeDefinitionWriter.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/privilege/PrivilegeDefinitionWriter.java?rev=1158248&r1=1158247&r2=1158248&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/privilege/PrivilegeDefinitionWriter.java
(original)
+++ jackrabbit/trunk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/privilege/PrivilegeDefinitionWriter.java
Tue Aug 16 12:54:23 2011
@@ -16,6 +16,8 @@
  */
 package org.apache.jackrabbit.spi.commons.privilege;
 
+import org.apache.jackrabbit.spi.PrivilegeDefinition;
+
 import java.io.IOException;
 import java.io.OutputStream;
 import java.io.Writer;

Modified: jackrabbit/trunk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/privilege/PrivilegeHandler.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/privilege/PrivilegeHandler.java?rev=1158248&r1=1158247&r2=1158248&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/privilege/PrivilegeHandler.java
(original)
+++ jackrabbit/trunk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/privilege/PrivilegeHandler.java
Tue Aug 16 12:54:23 2011
@@ -16,6 +16,8 @@
  */
 package org.apache.jackrabbit.spi.commons.privilege;
 
+import org.apache.jackrabbit.spi.PrivilegeDefinition;
+
 import java.io.IOException;
 import java.io.InputStream;
 import java.io.OutputStream;

Modified: jackrabbit/trunk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/privilege/PrivilegeXmlHandler.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/privilege/PrivilegeXmlHandler.java?rev=1158248&r1=1158247&r2=1158248&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/privilege/PrivilegeXmlHandler.java
(original)
+++ jackrabbit/trunk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/privilege/PrivilegeXmlHandler.java
Tue Aug 16 12:54:23 2011
@@ -18,6 +18,7 @@ package org.apache.jackrabbit.spi.common
 
 import org.apache.jackrabbit.spi.Name;
 import org.apache.jackrabbit.spi.NameFactory;
+import org.apache.jackrabbit.spi.PrivilegeDefinition;
 import org.apache.jackrabbit.spi.commons.name.NameFactoryImpl;
 import org.apache.jackrabbit.util.Text;
 import org.w3c.dom.Attr;
@@ -263,7 +264,7 @@ class PrivilegeXmlHandler implements Pri
                     }
                 }
             }
-            return new PrivilegeDefinition(name, isAbstract, aggrNames);
+            return new PrivilegeDefinitionImpl(name, isAbstract, aggrNames);
         }
 
         // could not parse into privilege definition

Modified: jackrabbit/trunk/jackrabbit-spi-commons/src/test/java/org/apache/jackrabbit/spi/commons/privilege/PrivilegeHandlerTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-spi-commons/src/test/java/org/apache/jackrabbit/spi/commons/privilege/PrivilegeHandlerTest.java?rev=1158248&r1=1158247&r2=1158248&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-spi-commons/src/test/java/org/apache/jackrabbit/spi/commons/privilege/PrivilegeHandlerTest.java
(original)
+++ jackrabbit/trunk/jackrabbit-spi-commons/src/test/java/org/apache/jackrabbit/spi/commons/privilege/PrivilegeHandlerTest.java
Tue Aug 16 12:54:23 2011
@@ -31,6 +31,7 @@ import java.util.Set;
 import junit.framework.TestCase;
 import org.apache.jackrabbit.spi.Name;
 import org.apache.jackrabbit.spi.NameFactory;
+import org.apache.jackrabbit.spi.PrivilegeDefinition;
 import org.apache.jackrabbit.spi.commons.name.NameFactoryImpl;
 
 /**
@@ -54,16 +55,16 @@ public class PrivilegeHandlerTest extend
     private static final String TEST_URI = "http://www.foo.com/1.0";
     private static final String CONTENT_TYPE = "text/xml";
 
-    private static PrivilegeDefinition DEF_READ = new PrivilegeDefinition(NF.create(TEST_URI,"testRead"),
false, null);
-    private static PrivilegeDefinition DEF_WRITE = new PrivilegeDefinition(NF.create(TEST_URI,"testWrite"),
false, null);
-    private static PrivilegeDefinition DEF_ABSTRACT = new PrivilegeDefinition(NF.create(TEST_URI,"testAbstract"),
true, null);
-    private static PrivilegeDefinition DEF_NON_ABSTRACT = new PrivilegeDefinition(NF.create(TEST_URI,"testNonAbstract"),
false, null);
+    private static PrivilegeDefinition DEF_READ = new PrivilegeDefinitionImpl(NF.create(TEST_URI,"testRead"),
false, null);
+    private static PrivilegeDefinition DEF_WRITE = new PrivilegeDefinitionImpl(NF.create(TEST_URI,"testWrite"),
false, null);
+    private static PrivilegeDefinition DEF_ABSTRACT = new PrivilegeDefinitionImpl(NF.create(TEST_URI,"testAbstract"),
true, null);
+    private static PrivilegeDefinition DEF_NON_ABSTRACT = new PrivilegeDefinitionImpl(NF.create(TEST_URI,"testNonAbstract"),
false, null);
     private static Set<Name> aggr = new LinkedHashSet<Name>();
     static {
         aggr.add(DEF_READ.getName());
         aggr.add(DEF_WRITE.getName());
     }
-    private static PrivilegeDefinition DEF_ALL = new PrivilegeDefinition(NF.create(TEST_URI,"testAll"),
false, aggr);
+    private static PrivilegeDefinition DEF_ALL = new PrivilegeDefinitionImpl(NF.create(TEST_URI,"testAll"),
false, aggr);
     private static PrivilegeDefinition[] DEF_EXPECTED = new PrivilegeDefinition[]{
             DEF_READ,
             DEF_WRITE,

Added: jackrabbit/trunk/jackrabbit-spi/src/main/java/org/apache/jackrabbit/spi/PrivilegeDefinition.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-spi/src/main/java/org/apache/jackrabbit/spi/PrivilegeDefinition.java?rev=1158248&view=auto
==============================================================================
--- jackrabbit/trunk/jackrabbit-spi/src/main/java/org/apache/jackrabbit/spi/PrivilegeDefinition.java
(added)
+++ jackrabbit/trunk/jackrabbit-spi/src/main/java/org/apache/jackrabbit/spi/PrivilegeDefinition.java
Tue Aug 16 12:54:23 2011
@@ -0,0 +1,31 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.jackrabbit.spi;
+
+import java.util.Set;
+
+/**
+ * <code>PrivilegeDefinition</code>...
+ */
+public interface PrivilegeDefinition {
+
+    Name getName();
+
+    public boolean isAbstract();
+
+    public Set<Name> getDeclaredAggregateNames();
+}
\ No newline at end of file

Propchange: jackrabbit/trunk/jackrabbit-spi/src/main/java/org/apache/jackrabbit/spi/PrivilegeDefinition.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: jackrabbit/trunk/jackrabbit-spi/src/main/java/org/apache/jackrabbit/spi/PrivilegeDefinition.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision Rev URL



Mime
View raw message