jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ang...@apache.org
Subject svn commit: r479569 - in /jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi: ./ config/ lock/ nodetype/ operation/ state/
Date Mon, 27 Nov 2006 10:11:13 GMT
Author: angela
Date: Mon Nov 27 02:11:11 2006
New Revision: 479569

URL: http://svn.apache.org/viewvc?view=rev&rev=479569
Log:
work in progress

- resolve some TODOs
- replace // JR DIFF comments
- remove unused/unimplemented validation methods from NodeTypeRegistry, that should
  be implemented on serverside
- Validation of NodeTypeDefinition: check if autocreated props defined default-value
  is not required on the client-side.
- LockManagerImpl: be prepared for observation not being supported by spi.

Modified:
    jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/NodeImpl.java
    jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/SessionImpl.java
    jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/WorkspaceImpl.java
    jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/WorkspaceManager.java
    jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/config/RepositoryConfig.java
    jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/lock/LockManagerImpl.java
    jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/nodetype/DefinitionValidator.java
    jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/nodetype/NodeTypeRegistry.java
    jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/nodetype/NodeTypeRegistryImpl.java
    jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/AbstractCopy.java
    jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/AbstractOperation.java
    jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/AddLabel.java
    jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/Checkin.java
    jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/Checkout.java
    jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/LockOperation.java
    jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/LockRefresh.java
    jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/LockRelease.java
    jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/Merge.java
    jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/RemoveLabel.java
    jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/ResolveMergeConflict.java
    jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/Restore.java
    jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/Update.java
    jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/state/ItemState.java

Modified: jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/NodeImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/NodeImpl.java?view=diff&rev=479569&r1=479568&r2=479569
==============================================================================
--- jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/NodeImpl.java
(original)
+++ jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/NodeImpl.java
Mon Nov 27 02:11:11 2006
@@ -651,7 +651,7 @@
      * @see Node#isNodeType(String)
      */
     public boolean isNodeType(String nodeTypeName) throws RepositoryException {
-        // check is performed by isNodeType(QName)
+        checkStatus();        
         return isNodeType(getQName(nodeTypeName));
     }
 
@@ -1194,7 +1194,6 @@
      * @throws RepositoryException
      */
     boolean isNodeType(QName qName) throws RepositoryException {
-        checkStatus();
         // first do trivial checks without using type hierarchy
         if (qName.equals(primaryTypeName)) {
             return true;

Modified: jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/SessionImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/SessionImpl.java?view=diff&rev=479569&r1=479568&r2=479569
==============================================================================
--- jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/SessionImpl.java
(original)
+++ jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/SessionImpl.java
Mon Nov 27 02:11:11 2006
@@ -46,7 +46,6 @@
 import org.apache.jackrabbit.name.PathFormat;
 import org.apache.jackrabbit.name.NameFormat;
 import org.apache.jackrabbit.name.NoPrefixDeclaredException;
-import org.apache.jackrabbit.spi.RepositoryService;
 import org.apache.jackrabbit.spi.SessionInfo;
 import org.apache.jackrabbit.spi.NodeId;
 import org.apache.jackrabbit.spi.IdFactory;
@@ -130,7 +129,7 @@
         this.config = config;
         this.sessionInfo = sessionInfo;
 
-        workspace = createWorkspaceInstance(config.getRepositoryService(), sessionInfo);
+        workspace = createWorkspaceInstance(config, sessionInfo);
 
         // build local name-mapping
         nsMappings = new LocalNamespaceMappings(workspace.getNamespaceRegistryImpl());
@@ -674,8 +673,8 @@
     }
 
     //-------------------------------------------------------< init methods >---
-    protected WorkspaceImpl createWorkspaceInstance(RepositoryService service, SessionInfo
sessionInfo) throws RepositoryException {
-        return new WorkspaceImpl(sessionInfo.getWorkspaceName(), this, service, sessionInfo);
+    protected WorkspaceImpl createWorkspaceInstance(RepositoryConfig config, SessionInfo
sessionInfo) throws RepositoryException {
+        return new WorkspaceImpl(sessionInfo.getWorkspaceName(), this, config, sessionInfo);
     }
 
     protected SessionItemStateManager createSessionItemStateManager(UpdatableItemStateManager
workspaceStateManager, NamespaceResolver nsResolver) {

Modified: jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/WorkspaceImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/WorkspaceImpl.java?view=diff&rev=479569&r1=479568&r2=479569
==============================================================================
--- jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/WorkspaceImpl.java
(original)
+++ jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/WorkspaceImpl.java
Mon Nov 27 02:11:11 2006
@@ -40,6 +40,7 @@
 import org.apache.jackrabbit.jcr2spi.observation.ObservationManagerImpl;
 import org.apache.jackrabbit.jcr2spi.xml.WorkspaceContentHandler;
 import org.apache.jackrabbit.jcr2spi.config.CacheBehaviour;
+import org.apache.jackrabbit.jcr2spi.config.RepositoryConfig;
 import org.apache.jackrabbit.spi.IdFactory;
 import org.apache.jackrabbit.spi.RepositoryService;
 import org.apache.jackrabbit.spi.SessionInfo;
@@ -104,11 +105,11 @@
     private VersionManager versionManager;
     private ItemStateValidator validator;
 
-    public WorkspaceImpl(String name, SessionImpl session, RepositoryService service, SessionInfo
sessionInfo) throws RepositoryException {
+    public WorkspaceImpl(String name, SessionImpl session, RepositoryConfig config, SessionInfo
sessionInfo) throws RepositoryException {
         this.name = name;
         this.session = session;
 
-        wspManager = createManager(service, session.getCacheBehaviour(), sessionInfo);
+        wspManager = createManager(config.getRepositoryService(), sessionInfo, session.getCacheBehaviour(),
config.getPollingInterval());
     }
 
     //----------------------------------------------------------< Workspace >---
@@ -456,9 +457,10 @@
      * @return state manager
      */
     protected WorkspaceManager createManager(RepositoryService service,
+                                             SessionInfo sessionInfo,
                                              CacheBehaviour cacheBehaviour,
-                                             SessionInfo sessionInfo) throws RepositoryException
{
-        return new WorkspaceManager(service, cacheBehaviour, sessionInfo);
+                                             int pollingInterval) throws RepositoryException
{
+        return new WorkspaceManager(service, sessionInfo, cacheBehaviour, pollingInterval);
     }
 
     /**

Modified: jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/WorkspaceManager.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/WorkspaceManager.java?view=diff&rev=479569&r1=479568&r2=479569
==============================================================================
--- jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/WorkspaceManager.java
(original)
+++ jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/WorkspaceManager.java
Mon Nov 27 02:11:11 2006
@@ -122,11 +122,6 @@
 
     private static Logger log = LoggerFactory.getLogger(WorkspaceManager.class);
 
-    /**
-     * TODO: make configurable
-     */
-    private static final int EXTERNAL_EVENT_POLLING_INTERVAL = 3 * 1000;
-
     private final RepositoryService service;
     private final SessionInfo sessionInfo;
 
@@ -162,8 +157,9 @@
      */
     private final Set listeners = Collections.synchronizedSet(new HashSet());
 
-    public WorkspaceManager(RepositoryService service, CacheBehaviour cacheBehaviour,
-                            SessionInfo sessionInfo) throws RepositoryException {
+    public WorkspaceManager(RepositoryService service, SessionInfo sessionInfo,
+                            CacheBehaviour cacheBehaviour, int pollingInterval)
+        throws RepositoryException {
         this.service = service;
         this.sessionInfo = sessionInfo;
         this.cacheBehaviour = cacheBehaviour;
@@ -174,7 +170,7 @@
 
         nsRegistry = createNamespaceRegistry(repositoryDescriptors);
         ntRegistry = createNodeTypeRegistry(nsRegistry, repositoryDescriptors);
-        externalChangeFeed = createChangeFeed(EXTERNAL_EVENT_POLLING_INTERVAL);
+        externalChangeFeed = createChangeFeed(pollingInterval);
     }
 
     public NamespaceRegistryImpl getNamespaceRegistryImpl() {

Modified: jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/config/RepositoryConfig.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/config/RepositoryConfig.java?view=diff&rev=479569&r1=479568&r2=479569
==============================================================================
--- jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/config/RepositoryConfig.java
(original)
+++ jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/config/RepositoryConfig.java
Mon Nov 27 02:11:11 2006
@@ -33,4 +33,6 @@
     public String getDefaultWorkspaceName();
 
     public CacheBehaviour getCacheBehaviour();
+
+    public int getPollingInterval();
 }

Modified: jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/lock/LockManagerImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/lock/LockManagerImpl.java?view=diff&rev=479569&r1=479568&r2=479569
==============================================================================
--- jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/lock/LockManagerImpl.java
(original)
+++ jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/lock/LockManagerImpl.java
Mon Nov 27 02:11:11 2006
@@ -40,6 +40,7 @@
 import javax.jcr.Node;
 import javax.jcr.Item;
 import javax.jcr.Session;
+import javax.jcr.UnsupportedRepositoryOperationException;
 
 import java.util.Iterator;
 import java.util.Map;
@@ -453,9 +454,10 @@
     private class LockState implements InternalEventListener{
 
         private final NodeState lockHoldingState;
+
         private LockInfo lockInfo;
         private boolean isLive = true;
-        private final EventFilter eventFilter;
+        private EventFilter eventFilter;
 
         private LockState(NodeState lockHoldingState, LockInfo lockInfo)
             throws LockException, RepositoryException{
@@ -471,12 +473,15 @@
                 this.lockInfo = lockInfo;
             }
 
-            // TODO: TOBEFIXED...SPI may not support observation
-            // register as internal listener to the wsp manager in order to get
-            // informed if this lock ends his life.
-            eventFilter = wspManager.createEventFilter(Event.PROPERTY_REMOVED,
+            try {
+                // register as internal listener to the wsp manager in order to get
+                // informed if this lock ends his life.
+                eventFilter = wspManager.createEventFilter(Event.PROPERTY_REMOVED,
                     lockHoldingState.getQPath(), false, null, null, true);
-            wspManager.addEventListener(this);
+                wspManager.addEventListener(this);
+            } catch (UnsupportedRepositoryOperationException e) {
+                eventFilter = null;
+            }
         }
 
         private LockState(NodeState lockHoldingState) throws LockException, RepositoryException
{
@@ -551,7 +556,7 @@
          * @see InternalEventListener#getEventFilters()
          */
         public Collection getEventFilters() {
-            return Collections.singletonList(eventFilter);
+            return (eventFilter == null) ?  Collections.EMPTY_LIST : Collections.singletonList(eventFilter);
         }
 
         /**
@@ -590,11 +595,12 @@
          */
         public LockImpl(LockState lockState, Node lockHoldingNode) {
             this.lockState = lockState;
-
             this.node = lockHoldingNode;
 
-            // store lock in the map
-            lockMap.put(lockState.lockHoldingState, this);
+            // if observation is supported -> store lock in the map
+            if (lockState.eventFilter != null) {
+                lockMap.put(lockState.lockHoldingState, this);
+            }
         }
 
         /**

Modified: jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/nodetype/DefinitionValidator.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/nodetype/DefinitionValidator.java?view=diff&rev=479569&r1=479568&r2=479569
==============================================================================
--- jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/nodetype/DefinitionValidator.java
(original)
+++ jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/nodetype/DefinitionValidator.java
Mon Nov 27 02:11:11 2006
@@ -59,18 +59,12 @@
      *
      * @param ntDefs
      * @param validatedDefs
-     * @param checkAutoCreatePropHasDefault flag used to disable checking that auto-created
properties
-     * have a default value; this check has to be disabled while validating
-     * built-in node types because there are properties defined in built-in
-     * node types which are auto-created but don't have a fixed default value
-     * that can be exposed in a property definition because it is
-     * system-generated (e.g. jcr:primaryType in nt:base).
-     * // TODO FIXME
      * @return Map mapping the definition to the resulting effective nodetype
      * @throws InvalidNodeTypeDefException
      * @throws RepositoryException
      */
-    public Map validateNodeTypeDefs(Collection ntDefs, Map validatedDefs, boolean checkAutoCreatePropHasDefault)
throws InvalidNodeTypeDefException, RepositoryException {
+    public Map validateNodeTypeDefs(Collection ntDefs, Map validatedDefs)
+        throws InvalidNodeTypeDefException, RepositoryException {
         // tmp. map containing names/defs of validated nodetypes
         Map validDefs = new HashMap(validatedDefs);
         // map of nodetype definitions and effective nodetypes to be registered
@@ -87,9 +81,9 @@
             while (iterator.hasNext()) {
                 QNodeTypeDefinition ntd = (QNodeTypeDefinition) iterator.next();
                 // check if definition has unresolved dependencies
-                // DIFF JR: cannot compared to 'registered' nodetypes since registr. is performed
later on
+                /* Note: don't compared to 'registered' nodetypes since registr. is performed
later on */
                 if (validDefs.keySet().containsAll(ntd.getDependencies())) {
-                    EffectiveNodeType ent = validateNodeTypeDef(ntd, validDefs, checkAutoCreatePropHasDefault);
+                    EffectiveNodeType ent = validateNodeTypeDef(ntd, validDefs);
                     // keep track of validated definitions and eff. nodetypes
                     if (!validDefs.containsKey(ntd.getQName())) {
                         validDefs.put(ntd.getQName(), ntd);
@@ -122,18 +116,11 @@
      * @param validatedDefs Map of qualified nodetype names and nodetype definitions
      * that are known to be valid or are already registered. This map is used to
      * validated dependencies and check for circular inheritance
-     * @param checkAutoCreatePropHasDefault flag used to disable checking that auto-created
properties
-     * have a default value; this check has to be disabled while validating
-     * built-in node types because there are properties defined in built-in
-     * node types which are auto-created but don't have a fixed default value
-     * that can be exposed in a property definition because it is
-     * system-generated (e.g. jcr:primaryType in nt:base).
-     * // TODO FIXME
      * @return
      * @throws InvalidNodeTypeDefException
      * @throws RepositoryException
      */
-    public EffectiveNodeTypeImpl validateNodeTypeDef(QNodeTypeDefinition ntDef, Map validatedDefs,
boolean checkAutoCreatePropHasDefault)
+    public EffectiveNodeTypeImpl validateNodeTypeDef(QNodeTypeDefinition ntDef, Map validatedDefs)
             throws InvalidNodeTypeDefException, RepositoryException {
         /**
          * the effective (i.e. merged and resolved) node type resulting from
@@ -168,10 +155,9 @@
                     log.debug(msg);
                     throw new InvalidNodeTypeDefException(msg);
                 }
-                // DIFF JR: compare to given nt-name set and not to registered nodetypes
+                /* compare to given nt-name set and not to registered nodetypes */
                 if (!validatedDefs.containsKey(supertypes[i])) {
-                    String msg = "[" + name + "] invalid supertype: "
-                            + supertypes[i];
+                    String msg = "[" + name + "] invalid supertype: " + supertypes[i];
                     log.debug(msg);
                     throw new InvalidNodeTypeDefException(msg);
                 }
@@ -199,7 +185,6 @@
          */
         if (supertypes.length > 0) {
             try {
-                // DIFF JR: use extra method that does not compare to registered nts
                 EffectiveNodeType est = ntRegistry.getEffectiveNodeType(supertypes, validatedDefs);
                 // make sure that all primary types except nt:base extend from nt:base
                 if (!ntDef.isMixin() && !QName.NT_BASE.equals(ntDef.getQName())
@@ -256,30 +241,20 @@
                 log.debug(msg);
                 throw new InvalidNodeTypeDefException(msg);
             }
-            /**
-             * check default values:
+            /* check default values:
              * make sure type of value is consistent with required property type
+             * Note: default internal values are built from the required type,
+             * thus check for match with pd.getRequiredType is redundant.
              */
-            // DIFF JACKRABBIT: default internal values are built from the
-            // required type, thus check for match with pd.getRequiredType is redundant
             QValue[] defVals = getQValues(pd);
-            if (defVals == null || defVals.length == 0) {
-                // no default values specified
-                if (checkAutoCreatePropHasDefault) {
-                    // auto-created properties must have a default value
-                    if (pd.isAutoCreated()) {
-                        String msg = "[" + name + "#" + pd.getQName() + "] auto-created property
must have a default value";
-                        log.debug(msg);
-                        throw new InvalidNodeTypeDefException(msg);
-                    }
-                }
-            }
 
-            // check that default values satisfy value constraints
+            /* check that default values satisfy value constraints.
+             * Note however, that no check is performed if autocreated property-
+             * definitions define a default value. JSR170 does not require this.
+             */
             ValueConstraint.checkValueConstraints(pd, defVals);
 
-            /**
-             * ReferenceConstraint:
+            /* ReferenceConstraint:
              * the specified node type must be registered, with one notable
              * exception: the node type just being registered
              */
@@ -289,7 +264,7 @@
                 if (pd.getRequiredType() == PropertyType.REFERENCE) {
                     for (int j = 0; j < constraints.length; j++) {
                         QName ntName = QName.valueOf(constraints[j]);
-                        // DIFF JR: compare to given ntd map and not registered nts only
+                        /* compare to given ntd map and not registered nts only */
                         if (!name.equals(ntName) && !validatedDefs.containsKey(ntName))
{
                             String msg = "[" + name + "#" + pd.getQName()
                                     + "] invalid REFERENCE value constraint '"
@@ -306,10 +281,7 @@
         QNodeDefinition[] cnda = ntDef.getChildNodeDefs();
         for (int i = 0; i < cnda.length; i++) {
             QNodeDefinition cnd = cnda[i];
-            /**
-             * sanity check:
-             * make sure declaring node type matches name of node type definition
-             */
+            /* make sure declaring node type matches name of node type definition */
             if (!name.equals(cnd.getDeclaringNodeType())) {
                 String msg = "[" + name + "#" + cnd.getQName()
                         + "] invalid declaring node type specified";

Modified: jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/nodetype/NodeTypeRegistry.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/nodetype/NodeTypeRegistry.java?view=diff&rev=479569&r1=479568&r2=479569
==============================================================================
--- jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/nodetype/NodeTypeRegistry.java
(original)
+++ jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/nodetype/NodeTypeRegistry.java
Mon Nov 27 02:11:11 2006
@@ -31,7 +31,6 @@
  */
 public interface NodeTypeRegistry {
 
-    // TODO: review, probably does not belong into NodeTypeRegistry interface
     /**
      * Return the <code>QNodeDefinition</code> of the root node.
      *
@@ -50,7 +49,6 @@
     QNodeTypeDefinition getNodeTypeDefinition(QName nodeTypeName)
             throws NoSuchNodeTypeException;
 
-    // TODO: review, probably does not belong into NodeTypeRegistry interface
     /**
      *
      *
@@ -61,7 +59,6 @@
     EffectiveNodeType getEffectiveNodeType(QName ntName)
             throws NoSuchNodeTypeException;
 
-    // TODO: review, probably does not belong into NodeTypeRegistry interface
     /**
      *
      *
@@ -73,7 +70,6 @@
     EffectiveNodeType getEffectiveNodeType(QName[] ntNames)
             throws NodeTypeConflictException, NoSuchNodeTypeException;
 
-    // TODO: review, probably does not belong into NodeTypeRegistry interface
     /**
      * @param ntNames
      * @param ntdMap

Modified: jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/nodetype/NodeTypeRegistryImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/nodetype/NodeTypeRegistryImpl.java?view=diff&rev=479569&r1=479568&r2=479569
==============================================================================
--- jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/nodetype/NodeTypeRegistryImpl.java
(original)
+++ jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/nodetype/NodeTypeRegistryImpl.java
Mon Nov 27 02:11:11 2006
@@ -114,16 +114,16 @@
 
         try {
             // validate & register the definitions
-            // DIFF JACKRABBIT: we cannot determine built-in vs. custom nodetypes.
-            // TODO: 'false' flag maybe not totally correct....
-            Map defMap = validator.validateNodeTypeDefs(nodeTypeDefs, new HashMap(registeredNTDefs),
false);
+            /* Note: since the client reads all nodetypes from the server, it is
+             * not able to distinguish between built-in and custom-defined
+             * nodetypes (compared to Jackrabbit-core) */
+            Map defMap = validator.validateNodeTypeDefs(nodeTypeDefs, new HashMap(registeredNTDefs));
             internalRegister(defMap);
         } catch (InvalidNodeTypeDefException intde) {
             String error = "Unexpected error: Found invalid node type definition.";
             log.debug(error);
             throw new RepositoryException(error, intde);
         }
-        // DIFF JR: 'finally' for resetting 'checkAutoCreated' not needed any more...
     }
 
 
@@ -336,7 +336,7 @@
     public synchronized EffectiveNodeType registerNodeType(QNodeTypeDefinition ntDef)
             throws InvalidNodeTypeDefException, RepositoryException {
         // validate the new nodetype definition
-        EffectiveNodeTypeImpl ent = validator.validateNodeTypeDef(ntDef, registeredNTDefs,
true);
+        EffectiveNodeTypeImpl ent = validator.validateNodeTypeDef(ntDef, registeredNTDefs);
 
         // persist new node type definition
         storage.registerNodeTypes(new QNodeTypeDefinition[] {ntDef});
@@ -356,7 +356,7 @@
             throws InvalidNodeTypeDefException, RepositoryException {
 
         // validate new nodetype definitions
-        Map defMap = validator.validateNodeTypeDefs(ntDefs, registeredNTDefs, true);
+        Map defMap = validator.validateNodeTypeDefs(ntDefs, registeredNTDefs);
         storage.registerNodeTypes((QNodeTypeDefinition[])ntDefs.toArray(new QNodeTypeDefinition[ntDefs.size()]));
 
         // update internal cache
@@ -379,8 +379,6 @@
         if (!registeredNTDefs.containsKey(nodeTypeName)) {
             throw new NoSuchNodeTypeException(nodeTypeName.toString());
         }
-        // DIFF JACKRABBIT: detection of built-in NodeTypes not possible
-        // omit check for build-in nodetypes which would cause failure
 
         /**
          * check if there are node types that have dependencies on the given
@@ -392,10 +390,8 @@
             throw new RepositoryException(msg.toString());
         }
 
-        // make sure node type is not currently in use
-        checkForReferencesInContent(nodeTypeName);
-
         // persist removal of node type definition
+        // NOTE: conflict with existing content not asserted on client
         storage.unregisterNodeTypes(new QName[] {nodeTypeName});
 
         // update internal cache
@@ -416,7 +412,6 @@
             if (!registeredNTDefs.containsKey(ntName)) {
                 throw new NoSuchNodeTypeException(ntName.toString());
             }
-            // DIFF JR: no distiction of built-in nts
 
             // check for node types other than those to be unregistered
             // that depend on the given node types
@@ -434,15 +429,8 @@
             }
         }
 
-        // make sure node types are not currently in use
-        for (Iterator iter = nodeTypeNames.iterator(); iter.hasNext();) {
-            QName ntName = (QName) iter.next();
-            checkForReferencesInContent(ntName);
-        }
-
-
-
         // persist removal of node type definitions
+        // NOTE: conflict with existing content not asserted on client
         storage.unregisterNodeTypes((QName[]) nodeTypeNames.toArray(new QName[nodeTypeNames.size()]));
 
 
@@ -466,15 +454,8 @@
         if (!registeredNTDefs.containsKey(name)) {
             throw new NoSuchNodeTypeException(name.toString());
         }
-        // DIFF JACKRABBIT: detection of built-in NodeTypes not possible
-        // omit check for build-in nodetypes which would cause failure
-
-        /**
-         * validate new node type definition
-         */
-        EffectiveNodeTypeImpl ent = validator.validateNodeTypeDef(ntd, registeredNTDefs,
true);
-
-        // DIFF JACKRABBIT: removed check for severity of nt modification
+        /* validate new node type definition */
+        EffectiveNodeTypeImpl ent = validator.validateNodeTypeDef(ntd, registeredNTDefs);
 
         // first call reregistering on storage
         storage.reregisterNodeTypes(new QNodeTypeDefinition[]{ntd});
@@ -584,14 +565,14 @@
     }
 
     private void internalUnregister(QName name) {
-        // DIFF JACKRABBIT: check for registered name removed, since duplicate code
-
-        // DIFF JACKRABBIT: detection of built-in NodeTypes not possible
-        // omit check for build-in nodetypes which would cause failure
-
+        /*
+         * NOTE: detection of built-in NodeTypes not possible, since the client
+         * reads all nodetypes from the 'server' only without being able to
+         * destinguish between built-in and custom-defined nodetypes.
+         */
         QNodeTypeDefinition ntd = (QNodeTypeDefinition) registeredNTDefs.get(name);
         registeredNTDefs.remove(name);
-        /**
+        /*
          * remove all affected effective node types from aggregates cache
          * (copy keys first to prevent ConcurrentModificationException)
          */
@@ -660,7 +641,7 @@
             throw new NoSuchNodeTypeException(nodeTypeName.toString());
         }
 
-        /**
+        /*
          * collect names of those node types that have dependencies on the given
          * node type
          */
@@ -675,74 +656,6 @@
         return names;
     }
 
-    /**
-     * Checks whether there is existing content that would conflict with the
-     * given node type definition.
-     * <p/>
-     * This method is not implemented yet and always throws a
-     * <code>RepositoryException</code>.
-     * <p/>
-     * TODO
-     * <ol>
-     * <li>apply deep locks on root nodes in every workspace or alternatively
-     * put repository in 'exclusive' or 'single-user' mode
-     * <li>check if the given node type (or any node type that has
-     * dependencies on this node type) is currently referenced by nodes
-     * in the repository.
-     * <li>check if applying the changed definitions to the affected items would
-     * violate existing node type constraints
-     * <li>apply and persist changes to affected nodes (e.g. update
-     * definition id's, etc.)
-     * </ul>
-     * <p/>
-     * the above checks/actions are absolutely necessary in order to
-     * guarantee integrity of repository content.
-     *
-     * @param ntd The node type definition replacing the former node type
-     *            definition of the same name.
-     * @throws RepositoryException If there is conflicting content or if the
-     *                             check failed for some other reason.
-     */
-    private void checkForConflictingContent(QNodeTypeDefinition ntd)
-            throws RepositoryException {
-        /**
-         * collect names of node types that have dependencies on the given
-         * node type
-         */
-        //Set dependentNTs = getDependentNodeTypes(ntd.getQName());
-
-        throw new RepositoryException("not yet implemented");
-    }
-
-    /**
-     * Checks whether there is existing content that directly or indirectly
-     * refers to the specified node type.
-     * <p/>
-     * This method is not implemented yet and always throws a
-     * <code>RepositoryException</code>.
-     * <p/>
-     * TODO:
-     * <ol>
-     * <li>apply deep locks on root nodes in every workspace or alternatively
-     * put repository in 'single-user' mode
-     * <li>check if the given node type is currently referenced by nodes
-     * in the repository.
-     * <li>remove the node type if it is not currently referenced, otherwise
-     * throw exception
-     * </ul>
-     * <p/>
-     * the above checks are absolutely necessary in order to guarantee
-     * integrity of repository content.
-     *
-     * @param nodeTypeName The name of the node type to be checked.
-     * @throws RepositoryException If the specified node type is currently
-     *                             being referenced or if the check failed for
-     *                             some other reason.
-     */
-    private void checkForReferencesInContent(QName nodeTypeName)
-            throws RepositoryException {
-        throw new RepositoryException("not yet implemented");
-    }
     //-----------------------------------------------------------< Dumpable >---
     /**
      * {@inheritDoc}

Modified: jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/AbstractCopy.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/AbstractCopy.java?view=diff&rev=479569&r1=479568&r2=479569
==============================================================================
--- jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/AbstractCopy.java
(original)
+++ jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/AbstractCopy.java
Mon Nov 27 02:11:11 2006
@@ -57,7 +57,6 @@
         }
         this.srcState = (NodeState)srcItemState;
         this.destParentState = getNodeState(destPath.getAncestor(1), destMgrProvider.getHierarchyManager(),
destMgrProvider.getNamespaceResolver());
-        addAffectedItemState(destParentState);
 
         // check for illegal index present in destination path
         Path.PathElement destElement = destPath.getNameElement();
@@ -70,6 +69,8 @@
         }
         this.destName = destElement.getName();
         this.srcWorkspaceName = srcWorkspaceName;
+
+        // NOTE: affected-states only needed for transient modifications
     }
 
     //----------------------------------------------------------< Operation >---

Modified: jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/AbstractOperation.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/AbstractOperation.java?view=diff&rev=479569&r1=479568&r2=479569
==============================================================================
--- jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/AbstractOperation.java
(original)
+++ jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/AbstractOperation.java
Mon Nov 27 02:11:11 2006
@@ -53,7 +53,7 @@
      * @inheritDoc
      */
     public Collection getAffectedItemStates() {
-        return Collections.unmodifiableCollection(affectedStates);
+        return (affectedStates.isEmpty()) ? Collections.EMPTY_LIST : Collections.unmodifiableCollection(affectedStates);
     }
 
     /**

Modified: jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/AddLabel.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/AddLabel.java?view=diff&rev=479569&r1=479568&r2=479569
==============================================================================
--- jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/AddLabel.java
(original)
+++ jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/AddLabel.java
Mon Nov 27 02:11:11 2006
@@ -50,7 +50,7 @@
         this.label = label;
         this.moveLabel = moveLabel;
 
-        // TODO: setting affecting states?
+        // NOTE: affected-states only needed for transient modifications
     }
     //----------------------------------------------------------< Operation >---
     /**

Modified: jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/Checkin.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/Checkin.java?view=diff&rev=479569&r1=479568&r2=479569
==============================================================================
--- jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/Checkin.java
(original)
+++ jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/Checkin.java
Mon Nov 27 02:11:11 2006
@@ -35,7 +35,7 @@
 
     private Checkin(NodeState nodeState) {
         this.nodeState = nodeState;
-        addAffectedItemState(nodeState);
+        // NOTE: affected-states only needed for transient modifications
     }
 
     //----------------------------------------------------------< Operation >---

Modified: jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/Checkout.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/Checkout.java?view=diff&rev=479569&r1=479568&r2=479569
==============================================================================
--- jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/Checkout.java
(original)
+++ jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/Checkout.java
Mon Nov 27 02:11:11 2006
@@ -35,7 +35,7 @@
 
     private Checkout(NodeState nodeState) {
         this.nodeState = nodeState;
-        addAffectedItemState(nodeState);
+        // NOTE: affected-states only needed for transient modifications
     }
 
     //----------------------------------------------------------< Operation >---

Modified: jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/LockOperation.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/LockOperation.java?view=diff&rev=479569&r1=479568&r2=479569
==============================================================================
--- jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/LockOperation.java
(original)
+++ jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/LockOperation.java
Mon Nov 27 02:11:11 2006
@@ -43,7 +43,7 @@
         this.isDeep = isDeep;
         this.isSessionScoped = isSessionScoped;
 
-        this.addAffectedItemState(nodeState);
+        // NOTE: affected-states only needed for transient modifications
     }
 
     //----------------------------------------------------------< Operation >---

Modified: jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/LockRefresh.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/LockRefresh.java?view=diff&rev=479569&r1=479568&r2=479569
==============================================================================
--- jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/LockRefresh.java
(original)
+++ jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/LockRefresh.java
Mon Nov 27 02:11:11 2006
@@ -36,7 +36,7 @@
     private LockRefresh(NodeState nodeState) {
         this.nodeState = nodeState;
 
-        this.addAffectedItemState(nodeState);
+        // NOTE: affected-states only needed for transient modifications
     }
 
     //----------------------------------------------------------< Operation >---

Modified: jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/LockRelease.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/LockRelease.java?view=diff&rev=479569&r1=479568&r2=479569
==============================================================================
--- jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/LockRelease.java
(original)
+++ jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/LockRelease.java
Mon Nov 27 02:11:11 2006
@@ -41,7 +41,7 @@
     private LockRelease(NodeState nodeState) {
         this.nodeState = nodeState;
 
-        this.addAffectedItemState(nodeState);
+        // NOTE: affected-states only needed for transient modifications
     }
 
     //----------------------------------------------------------< Operation >---

Modified: jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/Merge.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/Merge.java?view=diff&rev=479569&r1=479568&r2=479569
==============================================================================
--- jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/Merge.java
(original)
+++ jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/Merge.java
Mon Nov 27 02:11:11 2006
@@ -43,7 +43,7 @@
         this.srcWorkspaceName = srcWorkspaceName;
         this.bestEffort = bestEffort;
 
-        this.addAffectedItemState(nodeState);
+        // NOTE: affected-states only needed for transient modifications
     }
 
     //----------------------------------------------------------< Operation >---

Modified: jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/RemoveLabel.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/RemoveLabel.java?view=diff&rev=479569&r1=479568&r2=479569
==============================================================================
--- jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/RemoveLabel.java
(original)
+++ jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/RemoveLabel.java
Mon Nov 27 02:11:11 2006
@@ -48,7 +48,7 @@
         this.versionState = versionState;
         this.label = label;
 
-        // TODO: add affected states. required?
+        // NOTE: affected-states only needed for transient modifications
     }
     //----------------------------------------------------------< Operation >---
     /**

Modified: jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/ResolveMergeConflict.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/ResolveMergeConflict.java?view=diff&rev=479569&r1=479568&r2=479569
==============================================================================
--- jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/ResolveMergeConflict.java
(original)
+++ jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/ResolveMergeConflict.java
Mon Nov 27 02:11:11 2006
@@ -45,9 +45,7 @@
         this.versionState = versionState;
         this.resolveDone = resolveDone;
 
-        // TODO: correct? needed?
-        addAffectedItemState(nodeState);
-        addAffectedItemState(versionState);
+        // NOTE: affected-states only needed for transient modifications
     }
 
     //----------------------------------------------------------< Operation >---

Modified: jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/Restore.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/Restore.java?view=diff&rev=479569&r1=479568&r2=479569
==============================================================================
--- jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/Restore.java
(original)
+++ jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/Restore.java
Mon Nov 27 02:11:11 2006
@@ -34,8 +34,6 @@
  */
 public class Restore extends AbstractOperation {
 
-    // TODO: since the restore target can point to a non-existing item -> use NodeId
-    // TODO: review this.
     private final NodeState nodeState;
     private final Path relQPath;
     private final NodeState[] versionStates;
@@ -47,7 +45,7 @@
         this.versionStates = versionStates;
         this.removeExisting = removeExisting;
 
-        // TODO: affected states... needed?
+        // NOTE: affected-states only needed for transient modifications
     }
 
     //----------------------------------------------------------< Operation >---
@@ -59,10 +57,19 @@
     }
 
     /**
+     * In case of a workspace-restore or 'removeExisting' the complete tree gets
+     * invalidated, otherwise the given <code>NodeState</code> that has been
+     * updated and all its decendants.
+     *
      * @see Operation#persisted()
      */
     public void persisted() {
-        // TODO
+        if (nodeState == null || removeExisting) {
+            // invalidate the complete tree
+            // TODO
+        } else {
+            nodeState.invalidate(true);
+        }
     }
     //----------------------------------------< Access Operation Parameters >---
 

Modified: jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/Update.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/Update.java?view=diff&rev=479569&r1=479568&r2=479569
==============================================================================
--- jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/Update.java
(original)
+++ jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/Update.java
Mon Nov 27 02:11:11 2006
@@ -38,7 +38,7 @@
         this.nodeState = nodeState;
         this.srcWorkspaceName = srcWorkspaceName;
 
-        this.addAffectedItemState(nodeState);
+        // NOTE: affected-states only needed for transient modifications
     }
 
     //----------------------------------------------------------< Operation >---

Modified: jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/state/ItemState.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/state/ItemState.java?view=diff&rev=479569&r1=479568&r2=479569
==============================================================================
--- jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/state/ItemState.java
(original)
+++ jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/state/ItemState.java
Mon Nov 27 02:11:11 2006
@@ -60,7 +60,6 @@
      */
     private final transient Collection listeners = new WeakIdentityCollection(5);
 
-    // TODO: check again...
     /**
      *  IdFactory used to build id of the states
      */



Mime
View raw message