jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ste...@apache.org
Subject svn commit: r157258 - in incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core: NodeImpl.java RepositoryImpl.java SessionImpl.java WorkspaceImpl.java package.html
Date Sat, 12 Mar 2005 16:49:40 GMT
Author: stefan
Date: Sat Mar 12 08:49:38 2005
New Revision: 157258

URL: http://svn.apache.org/viewcvs?view=rev&rev=157258
Log:
- added RepositoryImpl.createSession 
- working on Workspace methods (work in progress)

Modified:
    incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/NodeImpl.java
    incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/RepositoryImpl.java
    incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/SessionImpl.java
    incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/WorkspaceImpl.java
    incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/package.html

Modified: incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/NodeImpl.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/NodeImpl.java?view=diff&r1=157257&r2=157258
==============================================================================
--- incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/NodeImpl.java (original)
+++ incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/NodeImpl.java Sat Mar 12
08:49:38 2005
@@ -2586,9 +2586,10 @@
         // check state of this instance
         sanityCheck();
 
-        // acquire session of other workspace (throws NoSuchWorkspaceException)
-        // @todo FIXME need to get session with same credentials as current
-        SessionImpl srcSession = rep.getSystemSession(workspaceName);
+        // create session on other workspace for current subject
+        // (may throw NoSuchWorkspaceException and AccessDeniedException)
+        SessionImpl srcSession =
+                rep.createSession(session.getSubject(), workspaceName);
 
         // search nearest ancestor that is referenceable
         NodeImpl m1 = this;
@@ -2742,8 +2743,10 @@
         // check lock status
         checkLock();
 
-        // @todo FIXME need to get session with same credentials as current
-        SessionImpl srcSession = rep.getSystemSession(srcWorkspaceName);
+        // create session on other workspace for current subject
+        // (may throw NoSuchWorkspaceException and AccessDeniedException)
+        SessionImpl srcSession =
+                rep.createSession(session.getSubject(), srcWorkspaceName);
 
         NodeImpl srcNode = getCorrespondingNode(srcSession);
         if (srcNode == null) {
@@ -2797,8 +2800,10 @@
         // check lock status
         checkLock();
 
-        // @todo FIXME need to get session with same credentials as current
-        SessionImpl srcSession = rep.getSystemSession(srcWorkspace);
+        // create session on other workspace for current subject
+        // (may throw NoSuchWorkspaceException and AccessDeniedException)
+        SessionImpl srcSession =
+                rep.createSession(session.getSubject(), srcWorkspace);
 
         NodeImpl srcNode = doMergeTest(srcSession, bestEffort);
         if (srcNode != null) {

Modified: incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/RepositoryImpl.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/RepositoryImpl.java?view=diff&r1=157257&r2=157258
==============================================================================
--- incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/RepositoryImpl.java (original)
+++ incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/RepositoryImpl.java Sat
Mar 12 08:49:38 2005
@@ -500,6 +500,12 @@
         return wspInfo.getLockManager();
     }
 
+    /**
+     * @param workspaceName
+     * @return
+     * @throws NoSuchWorkspaceException
+     * @throws RepositoryException
+     */
     SystemSession getSystemSession(String workspaceName)
             throws NoSuchWorkspaceException, RepositoryException {
         // check state
@@ -514,6 +520,57 @@
         return wspInfo.getSystemSession();
     }
 
+
+    /**
+     * Creates a new session on the specified workspace for the
+     * authenticated subject of the given login context.
+     *
+     * @param loginContext  login context with authenticated subject
+     * @param workspaceName workspace name
+     * @return a new session
+     * @throws NoSuchWorkspaceException if the specified workspace does not exist
+     * @throws AccessDeniedException    if the subject of the given login context
+     *                                  is not granted access to the specified
+     *                                  workspace
+     * @throws RepositoryException      if another error occurs
+     */
+    SessionImpl createSession(LoginContext loginContext, String workspaceName)
+            throws NoSuchWorkspaceException, AccessDeniedException,
+            RepositoryException {
+        WorkspaceInfo wspInfo = (WorkspaceInfo) wspInfos.get(workspaceName);
+        if (wspInfo == null) {
+            throw new NoSuchWorkspaceException(workspaceName);
+        }
+        XASessionImpl ses = new XASessionImpl(this, loginContext, wspInfo.getConfig());
+        activeSessions.put(ses, ses);
+        return ses;
+    }
+
+    /**
+     * Creates a new session on the specified workspace for the given
+     * authenticated subject.
+     *
+     * @param subject       authenticated subject
+     * @param workspaceName workspace name
+     * @return a new session
+     * @throws NoSuchWorkspaceException if the specified workspace does not exist
+     * @throws AccessDeniedException    if the subject of the given login context
+     *                                  is not granted access to the specified
+     *                                  workspace
+     * @throws RepositoryException      if another error occurs
+     */
+    SessionImpl createSession(Subject subject, String workspaceName)
+            throws NoSuchWorkspaceException, AccessDeniedException,
+            RepositoryException {
+        WorkspaceInfo wspInfo = (WorkspaceInfo) wspInfos.get(workspaceName);
+        if (wspInfo == null) {
+            throw new NoSuchWorkspaceException(workspaceName);
+        }
+        XASessionImpl ses = new XASessionImpl(this, subject, wspInfo.getConfig());
+        activeSessions.put(ses, ses);
+        return ses;
+    }
+
     /**
      * Shuts down this repository. Note that this method is called automatically
      * through a shutdown hook.
@@ -631,22 +688,6 @@
     }
 
     /**
-     * Returns the system root node (i.e. /jcr:system)
-     *
-     * @param session
-     * @return
-     * @throws RepositoryException
-     */
-    public NodeImpl getSystemRootNode(SessionImpl session) throws RepositoryException {
-        // check state
-        if (disposed) {
-            throw new IllegalStateException("repository instance has been shut down");
-        }
-
-        return ((NodeImpl) session.getRootNode()).getNode(JCR_SYSTEM);
-    }
-
-    /**
      * Returns the workspace persistence manager
      *
      * @return the workspace persistence manager
@@ -701,14 +742,13 @@
             workspaceName = repConfig.getDefaultWorkspaceName();
         }
 
-        WorkspaceInfo wspInfo = (WorkspaceInfo) wspInfos.get(workspaceName);
-        if (wspInfo == null) {
+        if (!wspInfos.containsKey(workspaceName)) {
             throw new NoSuchWorkspaceException(workspaceName);
         }
 /*
         if (credentials == null) {
             // null credentials, obtain the identity of the already-authenticated
-            // user from access control context
+            // subject from access control context
             AccessControlContext acc = AccessController.getContext();
             Subject subject;
             try {
@@ -716,17 +756,16 @@
             } catch (SecurityException se) {
                 throw new LoginException(se.getMessage());
             }
-            Session ses;
+            // create session
             try {
-                ses = new XASessionImpl(this, subject, wspInfo.getConfig());
+                return createSession(subject, workspaceName);
             } catch (AccessDeniedException ade) {
                 // authenticated subject is not authorized for the specified workspace
                 throw new LoginException(ade.getMessage());
             }
-            activeSessions.put(ses, ses);
-            return ses;
         }
 */
+        // login through JAAS login context
         CredentialsCallbackHandler cbHandler =
                 new CredentialsCallbackHandler(credentials);
         LoginContext lc;
@@ -737,15 +776,13 @@
             throw new LoginException(le.getMessage());
         }
 
-        Session ses;
+        // create session
         try {
-            ses = new XASessionImpl(this, lc, wspInfo.getConfig());
+            return createSession(lc, workspaceName);
         } catch (AccessDeniedException ade) {
             // authenticated subject is not authorized for the specified workspace
             throw new LoginException(ade.getMessage());
         }
-        activeSessions.put(ses, ses);
-        return ses;
     }
 
     /**
@@ -791,7 +828,8 @@
     /**
      * {@inheritDoc}
      */
-    public void loggingOut(SessionImpl session) {}
+    public void loggingOut(SessionImpl session) {
+    }
 
     /**
      * {@inheritDoc}

Modified: incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/SessionImpl.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/SessionImpl.java?view=diff&r1=157257&r2=157258
==============================================================================
--- incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/SessionImpl.java (original)
+++ incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/SessionImpl.java Sat Mar
12 08:49:38 2005
@@ -105,17 +105,22 @@
     protected final RepositoryImpl rep;
 
     /**
-     * the user ID that was used to acquire this session
-     */
-    protected final String userId;
-
-    /**
      * the LoginContext of this session (can be null if this
      * session was not instantiated through a login process)
      */
     protected LoginContext loginContext;
 
     /**
+     * the Subject of this session
+     */
+    protected final Subject subject;
+
+    /**
+     * the user ID that was used to acquire this session
+     */
+    protected final String userId;
+
+    /**
      * the attibutes of this session
      */
     protected final HashMap attributes = new HashMap();
@@ -213,6 +218,7 @@
             Principal principal = (Principal) principals.iterator().next();
             userId = principal.getName();
         }
+        this.subject = subject;
         nsMappings = new LocalNamespaceMappings(rep.getNamespaceRegistry());
         ntMgr = new NodeTypeManagerImpl(rep.getNodeTypeRegistry(), getNamespaceResolver());
         String wspName = wspConfig.getName();
@@ -307,6 +313,15 @@
     }
 
     /**
+     * Returns the <code>Subject</code> associated with this session.
+     *
+     * @return the <code>Subject</code> associated with this session
+     */
+    Subject getSubject() {
+        return subject;
+    }
+
+    /**
      * Returns the <code>AccessManager</code> associated with this session.
      *
      * @return the <code>AccessManager</code> associated with this session
@@ -1069,7 +1084,7 @@
         // invalidate session
         alive = false;
 
-        // logout jaas subject
+        // logout JAAS subject
         if (loginContext != null) {
             try {
                 loginContext.logout();

Modified: incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/WorkspaceImpl.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/WorkspaceImpl.java?view=diff&r1=157257&r2=157258
==============================================================================
--- incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/WorkspaceImpl.java (original)
+++ incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/WorkspaceImpl.java Sat
Mar 12 08:49:38 2005
@@ -216,39 +216,30 @@
     }
 
     /**
-     * @param nodePath
+     * @param parentId
+     * @param nodeName
      * @param nodeTypeName
      * @throws ConstraintViolationException
      * @throws AccessDeniedException
-     * @throws PathNotFoundException
+     * @throws ItemNotFoundException
      * @throws ItemExistsException
      * @throws RepositoryException
      */
-    public void checkAddNode(Path nodePath, QName nodeTypeName)
+    public void checkAddNode(NodeId parentId, QName nodeName, QName nodeTypeName)
             throws ConstraintViolationException, AccessDeniedException,
-            PathNotFoundException, ItemExistsException, RepositoryException {
-
-        AccessManager accessMgr = session.getAccessManager();
+            ItemNotFoundException, ItemExistsException, RepositoryException {
 
-        Path parentPath = nodePath.getAncestor(1);
-        NodeState parentState = getNodeState(parentPath);
+        NodeState parentState = getNodeState(parentId);
 
-        // 1. check path & access rights
+        // 1. access rights
 
-        Path.PathElement nodeName = nodePath.getNameElement();
-        try {
-            // check access rights
-            if (!accessMgr.isGranted(parentState.getId(), AccessManager.READ)) {
-                throw new PathNotFoundException(hierMgr.safeGetJCRPath(parentPath));
-            }
-            if (!accessMgr.isGranted(parentState.getId(), AccessManager.WRITE)) {
-                throw new AccessDeniedException(hierMgr.safeGetJCRPath(parentPath) + ": not
allowed to add child node");
-            }
-        } catch (ItemNotFoundException infe) {
-            String msg = "internal error: failed to check access rights for "
-                    + hierMgr.safeGetJCRPath(parentPath);
-            log.debug(msg);
-            throw new RepositoryException(msg, infe);
+        AccessManager accessMgr = session.getAccessManager();
+        if (!accessMgr.isGranted(parentId, AccessManager.READ)) {
+            throw new ItemNotFoundException(hierMgr.safeGetJCRPath(parentId));
+        }
+        if (!accessMgr.isGranted(parentId, AccessManager.WRITE)) {
+            throw new AccessDeniedException(hierMgr.safeGetJCRPath(parentId)
+                    + ": not allowed to add child node");
         }
 
         // 2. check node type constraints
@@ -256,24 +247,28 @@
         NodeTypeRegistry ntReg = rep.getNodeTypeRegistry();
         ChildNodeDef parentDef = ntReg.getNodeDef(parentState.getDefinitionId());
         if (parentDef.isProtected()) {
-            throw new ConstraintViolationException(hierMgr.safeGetJCRPath(parentPath) + ":
cannot add child node to protected parent node");
+            throw new ConstraintViolationException(hierMgr.safeGetJCRPath(parentId)
+                    + ": cannot add child node to protected parent node");
         }
         EffectiveNodeType entParent = getEffectiveNodeType(parentState);
-        entParent.checkAddNodeConstraints(nodeName.getName(), nodeTypeName);
+        entParent.checkAddNodeConstraints(nodeName, nodeTypeName);
         ChildNodeDef newNodeDef =
-                findApplicableDefinition(nodeName.getName(), nodeTypeName, parentState);
+                findApplicableDefinition(nodeName, nodeTypeName, parentState);
 
         // 3. check for name collisions
 
-        if (parentState.hasPropertyEntry(nodeName.getName())) {
+        if (parentState.hasPropertyEntry(nodeName)) {
             // there's already a property with that name
-            throw new ItemExistsException(hierMgr.safeGetJCRPath(nodePath));
+            throw new ItemExistsException("cannot add child node '"
+                    + nodeName.getLocalName() + "' to "
+                    + hierMgr.safeGetJCRPath(parentId)
+                    + ": colliding with same-named existing property");
         }
-        if (parentState.hasChildNodeEntry(nodeName.getName())) {
+        if (parentState.hasChildNodeEntry(nodeName)) {
             // there's already a node with that name...
 
             // get definition of existing conflicting node
-            NodeState.ChildNodeEntry entry = parentState.getChildNodeEntry(nodeName.getName(),
1);
+            NodeState.ChildNodeEntry entry = parentState.getChildNodeEntry(nodeName, 1);
             NodeState conflictingState;
             NodeId conflictingId = new NodeId(entry.getUUID());
             try {
@@ -284,44 +279,69 @@
                 log.debug(msg);
                 throw new RepositoryException(msg, ise);
             }
-            ChildNodeDef conflictingTargetDef = ntReg.getNodeDef(conflictingState.getDefinitionId());
+            ChildNodeDef conflictingTargetDef =
+                    ntReg.getNodeDef(conflictingState.getDefinitionId());
             // check same-name sibling setting of both target and existing node
             if (!conflictingTargetDef.allowSameNameSibs()
                     || !newNodeDef.allowSameNameSibs()) {
-                throw new ItemExistsException(hierMgr.safeGetJCRPath(nodePath));
+                throw new ItemExistsException("cannot add child node '"
+                        + nodeName.getLocalName() + "' to "
+                        + hierMgr.safeGetJCRPath(parentId)
+                        + ": colliding with same-named existing node");
             }
         }
     }
 
     /**
-     * @param nodePath
+     * @param parentPath
+     * @param nodeName
+     * @param nodeTypeName
      * @throws ConstraintViolationException
      * @throws AccessDeniedException
      * @throws PathNotFoundException
+     * @throws ItemExistsException
      * @throws RepositoryException
      */
-    public void checkRemoveNode(Path nodePath)
+    public void checkAddNode(Path parentPath, QName nodeName, QName nodeTypeName)
             throws ConstraintViolationException, AccessDeniedException,
-            PathNotFoundException, LockException, RepositoryException {
+            PathNotFoundException, ItemExistsException, RepositoryException {
+        NodeState parentState = getNodeState(parentPath);
+        checkAddNode((NodeId) parentState.getId(), nodeName, nodeTypeName);
+    }
 
-        AccessManager accessMgr = session.getAccessManager();
+    /**
+     * @param nodeId
+     * @throws ConstraintViolationException
+     * @throws AccessDeniedException
+     * @throws ItemNotFoundException
+     * @throws RepositoryException
+     */
+    public void checkRemoveNode(NodeId nodeId)
+            throws ConstraintViolationException, AccessDeniedException,
+            ItemNotFoundException, RepositoryException {
 
-        NodeState targetState = getNodeState(nodePath);
-        Path parentPath = nodePath.getAncestor(1);
-        NodeState parentState = getNodeState(parentPath);
+        NodeState targetState = getNodeState(nodeId);
+        if (targetState.getParentUUID() == null) {
+            // root or orphaned node
+            throw new ConstraintViolationException("cannot remove root node");
+        }
+        NodeId parentId = new NodeId(targetState.getParentUUID());
+        NodeState parentState = getNodeState(parentId);
 
-        // 1. check path & access rights
+        // 1. access rights
 
+        AccessManager accessMgr = session.getAccessManager();
         try {
-            // check access rights
             if (!accessMgr.isGranted(targetState.getId(), AccessManager.READ)) {
-                throw new PathNotFoundException(hierMgr.safeGetJCRPath(nodePath));
+                throw new PathNotFoundException(hierMgr.safeGetJCRPath(nodeId));
             }
             if (!accessMgr.isGranted(targetState.getId(), AccessManager.REMOVE)) {
-                throw new AccessDeniedException(hierMgr.safeGetJCRPath(parentPath) + ": not
allowed to remove node");
+                throw new AccessDeniedException(hierMgr.safeGetJCRPath(parentId)
+                        + ": not allowed to remove node");
             }
         } catch (ItemNotFoundException infe) {
-            String msg = "internal error: failed to check access rights for " + hierMgr.safeGetJCRPath(nodePath);
+            String msg = "internal error: failed to check access rights for "
+                    + hierMgr.safeGetJCRPath(nodeId);
             log.debug(msg);
             throw new RepositoryException(msg, infe);
         }
@@ -331,18 +351,35 @@
         NodeTypeRegistry ntReg = rep.getNodeTypeRegistry();
         ChildNodeDef parentDef = ntReg.getNodeDef(parentState.getDefinitionId());
         if (parentDef.isProtected()) {
-            throw new ConstraintViolationException(hierMgr.safeGetJCRPath(parentPath) + ":
cannot remove child node of protected parent node");
+            throw new ConstraintViolationException(hierMgr.safeGetJCRPath(parentId)
+                    + ": cannot remove child node of protected parent node");
         }
         ChildNodeDef targetDef = ntReg.getNodeDef(targetState.getDefinitionId());
         if (targetDef.isMandatory()) {
-            throw new ConstraintViolationException(hierMgr.safeGetJCRPath(nodePath) + ":
cannot remove mandatory node");
+            throw new ConstraintViolationException(hierMgr.safeGetJCRPath(nodeId)
+                    + ": cannot remove mandatory node");
         }
         if (targetDef.isProtected()) {
-            throw new ConstraintViolationException(hierMgr.safeGetJCRPath(nodePath) + ":
cannot remove protected node");
+            throw new ConstraintViolationException(hierMgr.safeGetJCRPath(nodeId)
+                    + ": cannot remove protected node");
         }
     }
 
     /**
+     * @param nodePath
+     * @throws ConstraintViolationException
+     * @throws AccessDeniedException
+     * @throws PathNotFoundException
+     * @throws RepositoryException
+     */
+    public void checkRemoveNode(Path nodePath)
+            throws ConstraintViolationException, AccessDeniedException,
+            PathNotFoundException, RepositoryException {
+        NodeState targetState = getNodeState(nodePath);
+        checkRemoveNode((NodeId) targetState.getId());
+    }
+
+    /**
      * Verifies that the node at <code>nodePath</code> is checked-out; throws
a
      * <code>VersionException</code> if that's not the case.
      * <p/>
@@ -413,6 +450,26 @@
     }
 
     /**
+     * @param id
+     * @return
+     * @throws ItemNotFoundException
+     * @throws RepositoryException
+     */
+    protected NodeState getNodeState(NodeId id)
+            throws ItemNotFoundException, RepositoryException {
+        try {
+            return (NodeState) stateMgr.getItemState(id);
+        } catch (NoSuchItemStateException nsise) {
+            throw new ItemNotFoundException(hierMgr.safeGetJCRPath(id));
+        } catch (ItemStateException ise) {
+            String msg = "internal error: failed to retrieve state of "
+                    + hierMgr.safeGetJCRPath(id);
+            log.debug(msg);
+            throw new RepositoryException(msg, ise);
+        }
+    }
+
+    /**
      * Helper method that builds the effective (i.e. merged and resolved)
      * node type representation of the specified node's primary and mixin
      * node types.
@@ -616,7 +673,7 @@
             throw new RepositoryException(msg, infe);
         }
         // check node type constraints
-        checkAddNode(destPath, srcState.getNodeTypeName());
+        checkAddNode(destParentPath, destName.getName(), srcState.getNodeTypeName());
 
         // 3. do copy operation (modify and persist affected states)
 
@@ -739,9 +796,10 @@
         // clone (i.e. pull) subtree at srcAbsPath from srcWorkspace
         // to 'this' workspace at destAbsPath
 
-        // acquire session on other workspace (throws NoSuchWorkspaceException)
-        // @todo FIXME need to get session with same credentials as current
-        SessionImpl srcSession = rep.getSystemSession(srcWorkspace);
+        // create session on other workspace for current subject
+        // (may throw NoSuchWorkspaceException and AccessDeniedException)
+        SessionImpl srcSession =
+                rep.createSession(session.getSubject(), srcWorkspace);
         WorkspaceImpl srcWsp = (WorkspaceImpl) srcSession.getWorkspace();
 
         // do cross-workspace copy
@@ -789,10 +847,10 @@
         // copy (i.e. pull) subtree at srcAbsPath from srcWorkspace
         // to 'this' workspace at destAbsPath
 
-        // acquire session on other workspace (throws NoSuchWorkspaceException)
-        // @todo FIXME need to get session with same credentials as current
-        SessionImpl srcSession = rep.getSystemSession(srcWorkspace);
-
+        // create session on other workspace for current subject
+        // (may throw NoSuchWorkspaceException and AccessDeniedException)
+        SessionImpl srcSession =
+                rep.createSession(session.getSubject(), srcWorkspace);
         WorkspaceImpl srcWsp = (WorkspaceImpl) srcSession.getWorkspace();
 
         // do cross-workspace copy
@@ -870,7 +928,7 @@
         // 2. check node type constraints & access rights
 
         checkRemoveNode(srcPath);
-        checkAddNode(destPath, targetState.getNodeTypeName());
+        checkAddNode(destParentPath, destName.getName(), targetState.getNodeTypeName());
 
         // 3. do move operation (modify and persist affected states)
 
@@ -1069,3 +1127,4 @@
         }
     }
 }
+

Modified: incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/package.html
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/package.html?view=diff&r1=157257&r2=157258
==============================================================================
--- incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/package.html (original)
+++ incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/package.html Sat Mar 12
08:49:38 2005
@@ -41,19 +41,19 @@
 <li>PropertyState
 <li>NodeState
 </code></ul>
-There's one <code>PersistentItemStateManager</code> for every workspace.
+There's one <code>SharedItemStateManager</code> for every workspace.
 It provides item state caching and it guarantees that there's only one
 (persistent) item state instance for any distinct item id in that workspace.
 <p/>
 Every session has its own <code>SessionItemStateManager</code> that consists
 of the session's <code>TransientItemStateManager</code> and the workspace's
-<code>PersistentItemStateManager</code>.
+<code>SharedItemStateManager</code>.
 <p/>
 Each item (i.e. <code>NodeImpl</code> and <code>PropertyImpl</code>)
instance
 is holding an <code>ItemState</code> instance. When e.g. a session is modifying
 a property by changing the property's value, a new transient item state
 is created by the session's <code>TransientItemStateManager</code>. This
-transient state is actually wrapping the (old) persistent state (<i>copy on write</i>).
+transient state is actually wrapping the (old) shared state (<i>copy on write</i>).
 The <code>PropertyImpl</code>'s state is then replaced by the new transient state.
 <p/>
 Transient (i.e. unsaved) modifications are 'session-local',  i.e. they are not



Mime
View raw message