Index: jackrabbit-core/src/main/java/org/apache/jackrabbit/core/lock/AbstractLockInfo.java
===================================================================
--- jackrabbit-core/src/main/java/org/apache/jackrabbit/core/lock/AbstractLockInfo.java (revision 488670)
+++ jackrabbit-core/src/main/java/org/apache/jackrabbit/core/lock/AbstractLockInfo.java (working copy)
@@ -24,7 +24,7 @@
/**
* Common information about a lock.
*/
-abstract class AbstractLockInfo {
+public abstract class AbstractLockInfo {
/**
* Lock token
Index: jackrabbit-core/src/main/java/org/apache/jackrabbit/core/RepositoryImpl.java
===================================================================
--- jackrabbit-core/src/main/java/org/apache/jackrabbit/core/RepositoryImpl.java (revision 488670)
+++ jackrabbit-core/src/main/java/org/apache/jackrabbit/core/RepositoryImpl.java (working copy)
@@ -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.EventStateCollection;
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.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.NameFormat;
+import org.apache.jackrabbit.name.NamespaceResolver;
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.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,10 +80,23 @@
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 RepositoryImpl ...
*/
@@ -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 true 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 WorkspaceInfo is holding.
*/
- void dispose() {
+ protected void dispose() {
try {
initLock.writeLock().acquire();
} catch (InterruptedException e) {
Index: jackrabbit-core/src/main/java/org/apache/jackrabbit/core/jndi/BindableRepository.java
===================================================================
--- jackrabbit-core/src/main/java/org/apache/jackrabbit/core/jndi/BindableRepository.java (revision 488670)
+++ jackrabbit-core/src/main/java/org/apache/jackrabbit/core/jndi/BindableRepository.java (working copy)
@@ -17,9 +17,14 @@
package org.apache.jackrabbit.core.jndi;
import org.apache.jackrabbit.core.RepositoryImpl;
+import org.apache.jackrabbit.core.config.ConfigurationException;
import org.apache.jackrabbit.core.config.RepositoryConfig;
-import org.apache.jackrabbit.core.config.ConfigurationException;
+import java.io.IOException;
+import java.io.ObjectInputStream;
+import java.io.ObjectOutputStream;
+import java.io.Serializable;
+
import javax.jcr.Credentials;
import javax.jcr.LoginException;
import javax.jcr.NoSuchWorkspaceException;
@@ -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 configFilePath reference address (@see {@link Reference#get(String)}
*/
- static final String CONFIGFILEPATH_ADDRTYPE = "configFilePath";
+ public static final String CONFIGFILEPATH_ADDRTYPE = "configFilePath";
/**
* type of repHomeDir reference address (@see {@link Reference#get(String)}
*/
- static final String REPHOMEDIR_ADDRTYPE = "repHomeDir";
+ public static final String REPHOMEDIR_ADDRTYPE = "repHomeDir";
/**
* The delegate repository instance. Created by {@link #init() init}.
Index: jackrabbit-core/src/main/java/org/apache/jackrabbit/core/version/VersionManagerImpl.java
===================================================================
--- jackrabbit-core/src/main/java/org/apache/jackrabbit/core/version/VersionManagerImpl.java (revision 488670)
+++ jackrabbit-core/src/main/java/org/apache/jackrabbit/core/version/VersionManagerImpl.java (working copy)
@@ -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,
Index: jackrabbit-core/src/main/java/org/apache/jackrabbit/core/version/NodeStateEx.java
===================================================================
--- jackrabbit-core/src/main/java/org/apache/jackrabbit/core/version/NodeStateEx.java (revision 488670)
+++ jackrabbit-core/src/main/java/org/apache/jackrabbit/core/version/NodeStateEx.java (working copy)
@@ -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
Index: jackrabbit-webapp/src/main/java/org/apache/jackrabbit/j2ee/RepositoryStartupServlet.java
===================================================================
--- jackrabbit-webapp/src/main/java/org/apache/jackrabbit/j2ee/RepositoryStartupServlet.java (revision 488670)
+++ jackrabbit-webapp/src/main/java/org/apache/jackrabbit/j2ee/RepositoryStartupServlet.java (working copy)
@@ -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
+ */
+ protected static abstract class RemoteFactoryDelegater {
-/**
- * optional class for RMI, will only be used, if RMI server is present
- */
-abstract class 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 {
- 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 {
+ // 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);
- }
}
+