jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tri...@apache.org
Subject svn commit: r489363 - in /jackrabbit/trunk: jackrabbit-core/src/main/java/org/apache/jackrabbit/core/ jackrabbit-core/src/main/java/org/apache/jackrabbit/core/jndi/ jackrabbit-core/src/main/java/org/apache/jackrabbit/core/lock/ jackrabbit-core/src/main...
Date Thu, 21 Dec 2006 14:18:49 GMT
Author: tripod
Date: Thu Dec 21 06:18:48 2006
New Revision: 489363

URL: http://svn.apache.org/viewvc?view=rev&rev=489363
Log:
JCR-686 change some access-level modifiers to allow for better subclassing

Modified:
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/RepositoryImpl.java
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/jndi/BindableRepository.java
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/lock/AbstractLockInfo.java
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/version/NodeStateEx.java
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/version/VersionManagerImpl.java
    jackrabbit/trunk/jackrabbit-webapp/src/main/java/org/apache/jackrabbit/j2ee/RepositoryStartupServlet.java

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/RepositoryImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/RepositoryImpl.java?view=diff&rev=489363&r1=489362&r2=489363
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/RepositoryImpl.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/RepositoryImpl.java
Thu Dec 21 06:18:48 2006
@@ -20,16 +20,21 @@
 import EDU.oswego.cs.dl.util.concurrent.ReadWriteLock;
 import EDU.oswego.cs.dl.util.concurrent.ReentrantWriterPreferenceReadWriteLock;
 import EDU.oswego.cs.dl.util.concurrent.WriterPreferenceReadWriteLock;
-
 import org.apache.commons.collections.map.ReferenceMap;
 import org.apache.jackrabbit.api.JackrabbitRepository;
+import org.apache.jackrabbit.core.cluster.ClusterContext;
+import org.apache.jackrabbit.core.cluster.ClusterException;
+import org.apache.jackrabbit.core.cluster.ClusterNode;
+import org.apache.jackrabbit.core.cluster.LockEventChannel;
+import org.apache.jackrabbit.core.cluster.UpdateEventChannel;
+import org.apache.jackrabbit.core.cluster.UpdateEventListener;
+import org.apache.jackrabbit.core.config.ClusterConfig;
 import org.apache.jackrabbit.core.config.FileSystemConfig;
 import org.apache.jackrabbit.core.config.LoginModuleConfig;
 import org.apache.jackrabbit.core.config.PersistenceManagerConfig;
 import org.apache.jackrabbit.core.config.RepositoryConfig;
 import org.apache.jackrabbit.core.config.VersioningConfig;
 import org.apache.jackrabbit.core.config.WorkspaceConfig;
-import org.apache.jackrabbit.core.config.ClusterConfig;
 import org.apache.jackrabbit.core.fs.BasedFileSystem;
 import org.apache.jackrabbit.core.fs.FileSystem;
 import org.apache.jackrabbit.core.fs.FileSystemException;
@@ -39,45 +44,27 @@
 import org.apache.jackrabbit.core.nodetype.NodeTypeRegistry;
 import org.apache.jackrabbit.core.nodetype.virtual.VirtualNodeTypeStateManager;
 import org.apache.jackrabbit.core.observation.DelegatingObservationDispatcher;
-import org.apache.jackrabbit.core.observation.ObservationDispatcher;
 import org.apache.jackrabbit.core.observation.EventStateCollection;
-import org.apache.jackrabbit.core.security.AuthContext;
-import org.apache.jackrabbit.core.state.ItemStateException;
+import org.apache.jackrabbit.core.observation.ObservationDispatcher;
 import org.apache.jackrabbit.core.persistence.PMContext;
 import org.apache.jackrabbit.core.persistence.PersistenceManager;
+import org.apache.jackrabbit.core.security.AuthContext;
 import org.apache.jackrabbit.core.state.CacheManager;
+import org.apache.jackrabbit.core.state.ChangeLog;
 import org.apache.jackrabbit.core.state.ItemStateCacheFactory;
+import org.apache.jackrabbit.core.state.ItemStateException;
 import org.apache.jackrabbit.core.state.ManagedMLRUItemStateCacheFactory;
 import org.apache.jackrabbit.core.state.SharedItemStateManager;
-import org.apache.jackrabbit.core.state.ChangeLog;
 import org.apache.jackrabbit.core.version.VersionManager;
 import org.apache.jackrabbit.core.version.VersionManagerImpl;
-import org.apache.jackrabbit.core.cluster.ClusterNode;
-import org.apache.jackrabbit.core.cluster.ClusterException;
-import org.apache.jackrabbit.core.cluster.ClusterContext;
-import org.apache.jackrabbit.core.cluster.LockEventChannel;
-import org.apache.jackrabbit.core.cluster.UpdateEventChannel;
-import org.apache.jackrabbit.core.cluster.UpdateEventListener;
-import org.apache.jackrabbit.name.NoPrefixDeclaredException;
-import org.apache.jackrabbit.name.QName;
 import org.apache.jackrabbit.name.NameFormat;
 import org.apache.jackrabbit.name.NamespaceResolver;
+import org.apache.jackrabbit.name.NoPrefixDeclaredException;
+import org.apache.jackrabbit.name.QName;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.xml.sax.InputSource;
 
-import javax.jcr.AccessDeniedException;
-import javax.jcr.Credentials;
-import javax.jcr.LoginException;
-import javax.jcr.NamespaceRegistry;
-import javax.jcr.NoSuchWorkspaceException;
-import javax.jcr.RepositoryException;
-import javax.jcr.Session;
-import javax.jcr.observation.Event;
-import javax.jcr.observation.EventIterator;
-import javax.jcr.observation.EventListener;
-import javax.jcr.observation.ObservationManager;
-import javax.security.auth.Subject;
 import java.io.File;
 import java.io.IOException;
 import java.io.InputStream;
@@ -93,9 +80,22 @@
 import java.util.HashMap;
 import java.util.HashSet;
 import java.util.Iterator;
+import java.util.List;
 import java.util.Properties;
 import java.util.Set;
-import java.util.List;
+
+import javax.jcr.AccessDeniedException;
+import javax.jcr.Credentials;
+import javax.jcr.LoginException;
+import javax.jcr.NamespaceRegistry;
+import javax.jcr.NoSuchWorkspaceException;
+import javax.jcr.RepositoryException;
+import javax.jcr.Session;
+import javax.jcr.observation.Event;
+import javax.jcr.observation.EventIterator;
+import javax.jcr.observation.EventListener;
+import javax.jcr.observation.ObservationManager;
+import javax.security.auth.Subject;
 
 /**
  * A <code>RepositoryImpl</code> ...
@@ -673,28 +673,28 @@
         }
     }
 
-    NamespaceRegistryImpl getNamespaceRegistry() {
+    protected NamespaceRegistryImpl getNamespaceRegistry() {
         // check sanity of this instance
         sanityCheck();
 
         return nsReg;
     }
 
-    NodeTypeRegistry getNodeTypeRegistry() {
+    protected NodeTypeRegistry getNodeTypeRegistry() {
         // check sanity of this instance
         sanityCheck();
 
         return ntReg;
     }
 
-    VersionManager getVersionManager() {
+    protected VersionManager getVersionManager() {
         // check sanity of this instance
         sanityCheck();
 
         return vMgr;
     }
 
-    NodeId getRootNodeId() {
+    protected NodeId getRootNodeId() {
         // check sanity of this instance
         sanityCheck();
 
@@ -707,7 +707,7 @@
      * @return the names of all workspaces in this repository.
      * @see javax.jcr.Workspace#getAccessibleWorkspaceNames()
      */
-    String[] getWorkspaceNames() {
+    protected String[] getWorkspaceNames() {
         synchronized (wspInfos) {
             return (String[]) wspInfos.keySet().toArray(new String[wspInfos.keySet().size()]);
         }
@@ -929,7 +929,7 @@
      * Adds the given session to the list of active sessions and registers this
      * repository as listener.
      *
-     * @param session
+     * @param session the session to register
      */
     protected void onSessionCreated(SessionImpl session) {
         synchronized (activeSessions) {
@@ -1497,7 +1497,7 @@
          *
          * @return the workspace name
          */
-        String getName() {
+        protected String getName() {
             return config.getName();
         }
 
@@ -1538,7 +1538,7 @@
          *
          * @return <code>true</code> if this workspace info is initialized.
          */
-        boolean isInitialized() {
+        protected boolean isInitialized() {
             try {
                 if (!initLock.readLock().attempt(0)) {
                     return false;
@@ -1679,7 +1679,7 @@
          * @return the system session for this workspace
          * @throws RepositoryException if the system session could not be created
          */
-        SystemSession getSystemSession() throws RepositoryException {
+        protected SystemSession getSystemSession() throws RepositoryException {
             if (!isInitialized()) {
                 throw new IllegalStateException("workspace '" + getName()
                         + "' not initialized");
@@ -1831,7 +1831,7 @@
         /**
          * Disposes all objects this <code>WorkspaceInfo</code> is holding.
          */
-        void dispose() {
+        protected void dispose() {
             try {
                 initLock.writeLock().acquire();
             } catch (InterruptedException e) {

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/jndi/BindableRepository.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/jndi/BindableRepository.java?view=diff&rev=489363&r1=489362&r2=489363
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/jndi/BindableRepository.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/jndi/BindableRepository.java
Thu Dec 21 06:18:48 2006
@@ -17,8 +17,13 @@
 package org.apache.jackrabbit.core.jndi;
 
 import org.apache.jackrabbit.core.RepositoryImpl;
-import org.apache.jackrabbit.core.config.RepositoryConfig;
 import org.apache.jackrabbit.core.config.ConfigurationException;
+import org.apache.jackrabbit.core.config.RepositoryConfig;
+
+import java.io.IOException;
+import java.io.ObjectInputStream;
+import java.io.ObjectOutputStream;
+import java.io.Serializable;
 
 import javax.jcr.Credentials;
 import javax.jcr.LoginException;
@@ -29,10 +34,6 @@
 import javax.naming.Reference;
 import javax.naming.Referenceable;
 import javax.naming.StringRefAddr;
-import java.io.IOException;
-import java.io.ObjectInputStream;
-import java.io.ObjectOutputStream;
-import java.io.Serializable;
 
 /**
  * A referenceable and serializable content repository proxy.
@@ -59,7 +60,7 @@
  * method should be used to explicitly close the repository if
  * needed.
  */
-class BindableRepository implements Repository, Referenceable, Serializable {
+public class BindableRepository implements Repository, Referenceable, Serializable {
 
     /**
      * The serialization UID of this class.
@@ -79,11 +80,11 @@
     /**
      * type of <code>configFilePath</code> reference address (@see <code>{@link
Reference#get(String)}</code>
      */
-    static final String CONFIGFILEPATH_ADDRTYPE = "configFilePath";
+    public static final String CONFIGFILEPATH_ADDRTYPE = "configFilePath";
     /**
      * type of <code>repHomeDir</code> reference address (@see <code>{@link
Reference#get(String)}</code>
      */
-    static final String REPHOMEDIR_ADDRTYPE = "repHomeDir";
+    public static final String REPHOMEDIR_ADDRTYPE = "repHomeDir";
 
     /**
      * The delegate repository instance. Created by {@link #init() init}.

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/lock/AbstractLockInfo.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/lock/AbstractLockInfo.java?view=diff&rev=489363&r1=489362&r2=489363
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/lock/AbstractLockInfo.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/lock/AbstractLockInfo.java
Thu Dec 21 06:18:48 2006
@@ -24,7 +24,7 @@
 /**
  * Common information about a lock.
  */
-abstract class AbstractLockInfo {
+public abstract class AbstractLockInfo {
 
     /**
      * Lock token

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/version/NodeStateEx.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/version/NodeStateEx.java?view=diff&rev=489363&r1=489362&r2=489363
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/version/NodeStateEx.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/version/NodeStateEx.java
Thu Dec 21 06:18:48 2006
@@ -33,18 +33,19 @@
 import org.apache.jackrabbit.name.QName;
 import org.apache.jackrabbit.uuid.UUID;
 
-import javax.jcr.RepositoryException;
-import javax.jcr.nodetype.ConstraintViolationException;
-import javax.jcr.nodetype.NoSuchNodeTypeException;
 import java.util.HashSet;
 import java.util.Iterator;
 import java.util.List;
 import java.util.Set;
 
+import javax.jcr.RepositoryException;
+import javax.jcr.nodetype.ConstraintViolationException;
+import javax.jcr.nodetype.NoSuchNodeTypeException;
+
 /**
  * This Class provides some basic node operations directly on the node state.
  */
-class NodeStateEx {
+public class NodeStateEx {
 
     /**
      * the underlying persistent state

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/version/VersionManagerImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/version/VersionManagerImpl.java?view=diff&rev=489363&r1=489362&r2=489363
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/version/VersionManagerImpl.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/version/VersionManagerImpl.java
Thu Dec 21 06:18:48 2006
@@ -48,6 +48,11 @@
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+import java.util.Collection;
+import java.util.Collections;
+import java.util.Iterator;
+import java.util.List;
+
 import javax.jcr.PropertyType;
 import javax.jcr.ReferentialIntegrityException;
 import javax.jcr.RepositoryException;
@@ -55,10 +60,6 @@
 import javax.jcr.version.Version;
 import javax.jcr.version.VersionException;
 import javax.jcr.version.VersionHistory;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.Iterator;
-import java.util.List;
 
 /**
  * This Class implements a VersionManager.
@@ -460,7 +461,7 @@
     /**
      * Return the shared item state manager.
      */
-    SharedItemStateManager getSharedStateMgr() {
+    protected SharedItemStateManager getSharedStateMgr() {
         return sharedStateMgr;
     }
 
@@ -536,7 +537,7 @@
      * Spezialized SharedItemStateManager that filters out NodeReferences to
      * non-versioning states.
      */
-    class VersionItemStateManager extends SharedItemStateManager {
+    protected class VersionItemStateManager extends SharedItemStateManager {
 
         public VersionItemStateManager(PersistenceManager persistMgr,
                                        NodeId rootNodeId,

Modified: jackrabbit/trunk/jackrabbit-webapp/src/main/java/org/apache/jackrabbit/j2ee/RepositoryStartupServlet.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-webapp/src/main/java/org/apache/jackrabbit/j2ee/RepositoryStartupServlet.java?view=diff&rev=489363&r1=489362&r2=489363
==============================================================================
--- jackrabbit/trunk/jackrabbit-webapp/src/main/java/org/apache/jackrabbit/j2ee/RepositoryStartupServlet.java
(original)
+++ jackrabbit/trunk/jackrabbit-webapp/src/main/java/org/apache/jackrabbit/j2ee/RepositoryStartupServlet.java
Thu Dec 21 06:18:48 2006
@@ -23,12 +23,6 @@
 import org.slf4j.LoggerFactory;
 import org.xml.sax.InputSource;
 
-import javax.jcr.Repository;
-import javax.jcr.RepositoryException;
-import javax.naming.InitialContext;
-import javax.naming.NamingException;
-import javax.servlet.ServletException;
-import javax.servlet.http.HttpServlet;
 import java.io.File;
 import java.io.FileInputStream;
 import java.io.FileNotFoundException;
@@ -49,6 +43,13 @@
 import java.util.Enumeration;
 import java.util.Properties;
 
+import javax.jcr.Repository;
+import javax.jcr.RepositoryException;
+import javax.naming.InitialContext;
+import javax.naming.NamingException;
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServlet;
+
 /**
  * The RepositoryStartupServlet starts a jackrabbit repository and registers it
  * to the JNDI environment and optional to the RMI registry.
@@ -560,26 +561,27 @@
         }
     }
 
-}
-
-/**
- * optional class for RMI, will only be used, if RMI server is present
- */
-abstract class RemoteFactoryDelegater {
+    /**
+     * optional class for RMI, will only be used, if RMI server is present
+     */
+    protected static abstract class RemoteFactoryDelegater {
 
-    public abstract Remote createRemoteRepository(Repository repository)
-            throws RemoteException;
-}
-/**
- * optional class for RMI, will only be used, if RMI server is present
- */
-class RMIRemoteFactoryDelegater extends RemoteFactoryDelegater {
+        public abstract Remote createRemoteRepository(Repository repository)
+                throws RemoteException;
+    }
+    /**
+     * optional class for RMI, will only be used, if RMI server is present
+     */
+    protected static class RMIRemoteFactoryDelegater extends RemoteFactoryDelegater {
 
-    // only used to enforce linking upon Class.forName()
-    static String FactoryClassName = ServerAdapterFactory.class.getName();
+        // only used to enforce linking upon Class.forName()
+        static String FactoryClassName = ServerAdapterFactory.class.getName();
 
-    public Remote createRemoteRepository(Repository repository)
-            throws RemoteException {
-        return new ServerAdapterFactory().getRemoteRepository(repository);
+        public Remote createRemoteRepository(Repository repository)
+                throws RemoteException {
+            return new ServerAdapterFactory().getRemoteRepository(repository);
+        }
     }
+
 }
+



Mime
View raw message