jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tri...@apache.org
Subject svn commit: r784261 [2/2] - in /jackrabbit/trunk: jackrabbit-core/src/main/java/org/apache/jackrabbit/core/ jackrabbit-core/src/main/java/org/apache/jackrabbit/core/version/ jackrabbit-core/src/main/resources/org/apache/jackrabbit/core/nodetype/ jackra...
Date Fri, 12 Jun 2009 20:32:47 GMT
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?rev=784261&r1=784260&r2=784261&view=diff
==============================================================================
--- 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
Fri Jun 12 20:32:47 2009
@@ -17,8 +17,8 @@
 package org.apache.jackrabbit.core.version;
 
 import java.util.Collection;
-import java.util.Iterator;
 import java.util.List;
+import java.util.Map;
 
 import javax.jcr.PropertyType;
 import javax.jcr.RepositoryException;
@@ -26,8 +26,10 @@
 import javax.jcr.version.Version;
 import javax.jcr.version.VersionException;
 import javax.jcr.version.VersionHistory;
+import javax.jcr.version.ActivityViolationException;
 
 import org.apache.commons.collections.map.ReferenceMap;
+import org.apache.jackrabbit.core.ItemId;
 import org.apache.jackrabbit.core.NodeId;
 import org.apache.jackrabbit.core.NodeImpl;
 import org.apache.jackrabbit.core.PropertyId;
@@ -52,6 +54,7 @@
 import org.apache.jackrabbit.core.state.NodeState;
 import org.apache.jackrabbit.core.state.PropertyState;
 import org.apache.jackrabbit.core.state.SharedItemStateManager;
+import org.apache.jackrabbit.core.state.NodeReferences;
 import org.apache.jackrabbit.core.value.InternalValue;
 import org.apache.jackrabbit.core.virtual.VirtualItemStateProvider;
 import org.apache.jackrabbit.spi.Name;
@@ -78,6 +81,11 @@
      */
     private static final Path VERSION_STORAGE_PATH;
 
+    /**
+     * The path to the version storage: /jcr:system/jcr:versionStorage/jcr:activities
+     */
+    private static final Path ACTIVITIES_PATH;
+
     static {
         try {
             PathBuilder builder = new PathBuilder();
@@ -85,6 +93,13 @@
             builder.addLast(NameConstants.JCR_SYSTEM);
             builder.addLast(NameConstants.JCR_VERSIONSTORAGE);
             VERSION_STORAGE_PATH = builder.getPath();
+
+            builder = new PathBuilder();
+            builder.addRoot();
+            builder.addLast(NameConstants.JCR_SYSTEM);
+            builder.addLast(NameConstants.JCR_VERSIONSTORAGE);
+            builder.addLast(NameConstants.JCR_ACTIVITIES);
+            ACTIVITIES_PATH = builder.getPath();
         } catch (MalformedPathException e) {
             // will not happen. path is always valid
             throw new InternalError("Cannot initialize path");
@@ -119,7 +134,8 @@
     /**
      * Map of returned items. this is kept for invalidating
      */
-    private final ReferenceMap versionItems = new ReferenceMap(ReferenceMap.HARD, ReferenceMap.WEAK);
+    private final Map<ItemId, InternalVersionItem> versionItems =
+            new ReferenceMap(ReferenceMap.HARD, ReferenceMap.WEAK);
 
     /**
      * Creates a new version manager
@@ -127,8 +143,10 @@
      */
     public VersionManagerImpl(PersistenceManager pMgr, FileSystem fs,
                               NodeTypeRegistry ntReg,
-                              DelegatingObservationDispatcher obsMgr, NodeId rootId,
+                              DelegatingObservationDispatcher obsMgr,
                               NodeId rootParentId,
+                              NodeId storageId,
+                              NodeId activitiesId,
                               ItemStateCacheFactory cacheFactory,
                               ISMLocking ismLocking) throws RepositoryException {
         super(ntReg);
@@ -138,13 +156,13 @@
             this.escFactory = new DynamicESCFactory(obsMgr);
 
             // need to store the version storage root directly into the persistence manager
-            if (!pMgr.exists(rootId)) {
-                NodeState root = pMgr.createNew(rootId);
+            if (!pMgr.exists(storageId)) {
+                NodeState root = pMgr.createNew(storageId);
                 root.setParentId(rootParentId);
                 root.setDefinitionId(ntReg.getEffectiveNodeType(NameConstants.REP_SYSTEM).getApplicableChildNodeDef(
                         NameConstants.JCR_VERSIONSTORAGE, NameConstants.REP_VERSIONSTORAGE,
ntReg).getId());
                 root.setNodeTypeName(NameConstants.REP_VERSIONSTORAGE);
-                PropertyState pt = pMgr.createNew(new PropertyId(rootId, NameConstants.JCR_PRIMARYTYPE));
+                PropertyState pt = pMgr.createNew(new PropertyId(storageId, NameConstants.JCR_PRIMARYTYPE));
                 pt.setDefinitionId(ntReg.getEffectiveNodeType(NameConstants.REP_SYSTEM).getApplicablePropertyDef(
                         NameConstants.JCR_PRIMARYTYPE, PropertyType.NAME, false).getId());
                 pt.setMultiValued(false);
@@ -156,14 +174,44 @@
                 cl.added(pt);
                 pMgr.store(cl);
             }
-            sharedStateMgr = createItemStateManager(pMgr, rootId, ntReg, cacheFactory, ismLocking);
+
+            // check for jcr:activities
+            if (!pMgr.exists(activitiesId)) {
+                NodeState root = pMgr.createNew(activitiesId);
+                root.setParentId(storageId);
+                root.setDefinitionId(ntReg.getEffectiveNodeType(NameConstants.REP_VERSIONSTORAGE).getApplicableChildNodeDef(
+                        NameConstants.JCR_ACTIVITIES, NameConstants.REP_ACTIVITIES, ntReg).getId());
+                root.setNodeTypeName(NameConstants.REP_ACTIVITIES);
+                PropertyState pt = pMgr.createNew(new PropertyId(activitiesId, NameConstants.JCR_PRIMARYTYPE));
+                pt.setDefinitionId(ntReg.getEffectiveNodeType(NameConstants.REP_ACTIVITIES).getApplicablePropertyDef(
+                        NameConstants.JCR_PRIMARYTYPE, PropertyType.NAME, false).getId());
+                pt.setMultiValued(false);
+                pt.setType(PropertyType.NAME);
+                pt.setValues(new InternalValue[]{InternalValue.create(NameConstants.REP_ACTIVITIES)});
+                root.addPropertyName(pt.getName());
+
+                // add activities as child
+                NodeState historyState = pMgr.load(storageId);
+                historyState.addChildNodeEntry(NameConstants.JCR_ACTIVITIES, activitiesId);
+                                
+                ChangeLog cl = new ChangeLog();
+                cl.added(root);
+                cl.added(pt);
+                cl.modified(historyState);
+                pMgr.store(cl);
+            }
+
+            sharedStateMgr = createItemStateManager(pMgr, storageId, ntReg, cacheFactory,
ismLocking);
 
             stateMgr = new LocalItemStateManager(sharedStateMgr, escFactory, cacheFactory);
             stateMgr.addListener(this);
 
-            NodeState nodeState = (NodeState) stateMgr.getItemState(rootId);
+            NodeState nodeState = (NodeState) stateMgr.getItemState(storageId);
             historyRoot = new NodeStateEx(stateMgr, ntReg, nodeState, NameConstants.JCR_VERSIONSTORAGE);
 
+            nodeState = (NodeState) stateMgr.getItemState(activitiesId);
+            activitiesRoot =  new NodeStateEx(stateMgr, ntReg, nodeState, NameConstants.JCR_ACTIVITIES);
+
             // create the virtual item state provider
             versProvider = new VersionItemStateProvider(
                     getHistoryRootId(), sharedStateMgr);
@@ -217,7 +265,7 @@
         NodeStateEx state = (NodeStateEx)
                 escFactory.doSourced((SessionImpl) session, new SourcedTarget() {
             public Object run() throws RepositoryException {
-                return createVersionHistory(node, copiedFrom);
+                return internalCreateVersionHistory(node, copiedFrom);
             }
         });
 
@@ -232,6 +280,39 @@
 
     /**
      * {@inheritDoc}
+     * <p/>
+     * This method must not be synchronized since it could cause deadlocks with
+     * item-reading listeners in the observation thread.
+     */
+    public NodeId createActivity(Session session, final String title) throws RepositoryException
{
+        NodeStateEx state = (NodeStateEx)
+                escFactory.doSourced((SessionImpl) session, new SourcedTarget() {
+            public Object run() throws RepositoryException {
+                return internalCreateActivity(title);
+            }
+        });
+        return state.getNodeId();
+    }
+
+    /**
+     * {@inheritDoc}
+     * <p/>
+     * This method must not be synchronized since it could cause deadlocks with
+     * item-reading listeners in the observation thread.
+     */
+    public void removeActivity(Session session, final NodeId nodeId)
+            throws RepositoryException {
+        escFactory.doSourced((SessionImpl) session, new SourcedTarget() {
+            public Object run() throws RepositoryException {
+                InternalActivityImpl act = (InternalActivityImpl) getItem(nodeId);
+                internalRemoveActivity(act);
+                return null;
+            }
+        });
+    }
+
+    /**
+     * {@inheritDoc}
      */
     public boolean hasItem(NodeId id) {
         ReadLock lock = acquireReadLock();
@@ -254,7 +335,7 @@
         ReadLock lock = acquireReadLock();
         try {
             synchronized (versionItems) {
-                InternalVersionItem item = (InternalVersionItem) versionItems.get(id);
+                InternalVersionItem item = versionItems.get(id);
                 if (item == null) {
                     item = createInternalVersionItem(id);
                     if (item != null) {
@@ -269,7 +350,63 @@
             lock.release();
         }
     }
-    
+    /**
+     * {@inheritDoc}
+     *
+     * this method currently does no modifications to the persistence and just
+     * checks if the checkout is valid in respect to a possible activity set on
+     * the session
+     */
+    public Version checkout(NodeImpl node) throws RepositoryException {
+        NodeId baseId = NodeId.valueOf(node.getProperty(NameConstants.JCR_BASEVERSION).getString());
+        NodeImpl activity = (NodeImpl) node.getSession().getWorkspace().getVersionManager().getActivity();
+        if (activity != null) {
+            // If there exists another workspace with node N' where N' also has version
+            // history H, N' is checked out and the jcr:activity property of N'
+            // references A, then the checkout fails with an
+            // ActivityViolationException indicating which workspace currently has
+            // the checkout.
+
+            // we're currently leverage the fact, that only references to "real"
+            // workspaces are recorded.
+            NodeId nodeId = activity.getNodeId();
+            NodeReferencesId refId = new NodeReferencesId(nodeId);
+            if (stateMgr.hasNodeReferences(refId)) {
+                try {
+                    NodeReferences refs = stateMgr.getNodeReferences(refId);
+                    if (refs.hasReferences()) {
+                        throw new ActivityViolationException("Unable to checkout. " +
+                                "Activity is already used for the same node in " +
+                                "another workspace.");
+                    }
+                } catch (ItemStateException e) {
+                    throw new RepositoryException("Error during checkout.", e);
+                }
+            }
+
+            // TODO:
+            // If there is a version in H that is not an eventual predecessor of N but
+            // whose jcr:activity references A, then the checkout fails with an
+            // ActivityViolationException
+            InternalActivityImpl a = (InternalActivityImpl) getItem(nodeId);
+            NodeId historyId = NodeId.valueOf(node.getProperty(NameConstants.JCR_VERSIONHISTORY).getString());
+            InternalVersionHistory history = (InternalVersionHistory) getItem(historyId);
+            InternalVersion version = a.getLatestVersion(history);
+            if (version != null) {
+                InternalVersion baseVersion = (InternalVersion) getItem(baseId);
+                while (baseVersion != null && !baseVersion.getId().equals(version.getId()))
{
+                    baseVersion = baseVersion.getLinearPredecessor();
+                }
+                if (baseVersion == null) {
+                    throw new ActivityViolationException("Unable to checkout. " +
+                            "Activity is used by another version on a different branch: "
+ version.getName());
+                }
+            }
+        }
+        return (VersionImpl)
+                ((SessionImpl) node.getSession()).getNodeById(baseId);
+    }
+
     /**
      * {@inheritDoc}
      * <p/>
@@ -286,11 +423,11 @@
                     // the property
                     String histUUID = node.getProperty(NameConstants.JCR_VERSIONHISTORY).getString();
                     vh = getVersionHistory(NodeId.valueOf(histUUID));
-                    return checkin((InternalVersionHistoryImpl) vh, node, false);
+                    return internalCheckin((InternalVersionHistoryImpl) vh, node, false);
                 } else {
                     // in simple versioning the history id needs to be calculated
                     vh = getVersionHistoryOfNode(node.getNodeId());
-                    return checkin((InternalVersionHistoryImpl) vh, node, true);
+                    return internalCheckin((InternalVersionHistoryImpl) vh, node, true);
                 }
             }
         });
@@ -318,7 +455,7 @@
             public Object run() throws RepositoryException {
                 InternalVersionHistoryImpl vh = (InternalVersionHistoryImpl)
                         historyImpl.getInternalVersionHistory();
-                removeVersion(vh, name);
+                internalRemoveVersion(vh, name);
                 return null;
             }
         });
@@ -359,14 +496,12 @@
      *
      * @param items items updated
      */
-    public void itemsUpdated(Collection items) {
+    public void itemsUpdated(Collection<InternalVersionItem> items) {
         ReadLock lock = acquireReadLock();
         try {
             synchronized (versionItems) {
-                Iterator iter = items.iterator();
-                while (iter.hasNext()) {
-                    InternalVersionItem item = (InternalVersionItem) iter.next();
-                    InternalVersionItem cached = (InternalVersionItem) versionItems.remove(item.getId());
+                for (InternalVersionItem item : items) {
+                    InternalVersionItem cached = versionItems.remove(item.getId());
                     if (cached != null) {
                         if (cached instanceof InternalVersionHistoryImpl) {
                             InternalVersionHistoryImpl vh = (InternalVersionHistoryImpl)
cached;
@@ -439,7 +574,8 @@
     }
 
     /**
-     * Return the shared item state manager.
+     * Returns the shared item state manager.
+     * @return the shared item state manager.
      */
     protected SharedItemStateManager getSharedStateMgr() {
         return sharedStateMgr;
@@ -537,7 +673,7 @@
 
         /**
          * Creates a new event state collection factory
-         * @param obsMgr
+         * @param obsMgr dispatcher
          */
         public DynamicESCFactory(DelegatingObservationDispatcher obsMgr) {
             this.obsMgr = obsMgr;
@@ -574,9 +710,10 @@
         /**
          * Executes the given runnable using the given event source.
          *
-         * @param eventSource
-         * @param runnable
-         * @throws RepositoryException
+         * @param eventSource event source
+         * @param runnable the runnable to execute
+         * @return the return value of the executed runnable
+         * @throws RepositoryException if an error occurs
          */
         public synchronized Object doSourced(SessionImpl eventSource, SourcedTarget runnable)
                 throws RepositoryException {

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/version/XAVersionManager.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/version/XAVersionManager.java?rev=784261&r1=784260&r2=784261&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/version/XAVersionManager.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/version/XAVersionManager.java
Fri Jun 12 20:32:47 2009
@@ -152,7 +152,7 @@
             throws RepositoryException {
 
         if (isInXA()) {
-            NodeStateEx state = createVersionHistory(node, copiedFrom);
+            NodeStateEx state = internalCreateVersionHistory(node, copiedFrom);
             InternalVersionHistory history =
                 new InternalVersionHistoryImpl(vMgr, state);
             xaItems.put(state.getNodeId(), history);
@@ -167,6 +167,56 @@
     /**
      * {@inheritDoc}
      */
+    public NodeId createActivity(Session session, String title)
+            throws RepositoryException {
+
+        if (isInXA()) {
+            NodeStateEx state = internalCreateActivity(title);
+            InternalActivityImpl activity =
+                new InternalActivityImpl(vMgr, state);
+            xaItems.put(state.getNodeId(), activity);
+            return state.getNodeId();
+        }
+        return vMgr.createActivity(session, title);
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    public void removeActivity(Session session, NodeId nodeId)
+            throws RepositoryException {
+
+        if (isInXA()) {
+            InternalActivityImpl act = (InternalActivityImpl) getItem(nodeId);
+            internalRemoveActivity(act);
+        }
+        vMgr.removeActivity(session, nodeId);
+    }
+
+    /**
+     * {@inheritDoc}
+     * <p/>
+     * Before modifying activity, make a local copy of it.
+     */
+    protected void internalRemoveActivity(InternalActivityImpl activity)
+            throws VersionException, RepositoryException {
+        if (activity.getVersionManager() != this) {
+            activity = makeLocalCopy(activity);
+            xaItems.put(activity.getId(), activity);
+        }
+        super.internalRemoveActivity(activity);
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    public Version checkout(NodeImpl node) throws RepositoryException {
+        return vMgr.checkout(node);
+    }
+
+    /**
+     * {@inheritDoc}
+     */
     public Version checkin(NodeImpl node) throws RepositoryException {
         if (isInXA()) {
             InternalVersionHistory vh;
@@ -176,11 +226,11 @@
                 // the property
                 String histUUID = node.getProperty(NameConstants.JCR_VERSIONHISTORY).getString();
                 vh = getVersionHistory(NodeId.valueOf(histUUID));
-                version = checkin((InternalVersionHistoryImpl) vh, node, false);
+                version = internalCheckin((InternalVersionHistoryImpl) vh, node, false);
             } else {
                 // in simple versioning the history id needs to be calculated
                 vh = getVersionHistoryOfNode(node.getNodeId());
-                version = checkin((InternalVersionHistoryImpl) vh, node, true);
+                version = internalCheckin((InternalVersionHistoryImpl) vh, node, true);
             }
             return (Version) ((SessionImpl) node.getSession()).getNodeById(version.getId());
         }
@@ -196,7 +246,7 @@
         if (isInXA()) {
             InternalVersionHistoryImpl vh = (InternalVersionHistoryImpl)
                     ((VersionHistoryImpl) history).getInternalVersionHistory();
-            removeVersion(vh, versionName);
+            internalRemoveVersion(vh, versionName);
             return;
         }
         vMgr.removeVersion(history, versionName);
@@ -401,7 +451,7 @@
      * <p/>
      * Before modifying version history given, make a local copy of it.
      */
-    protected InternalVersion checkin(InternalVersionHistoryImpl history,
+    protected InternalVersion internalCheckin(InternalVersionHistoryImpl history,
                                       NodeImpl node, boolean simple)
             throws RepositoryException {
 
@@ -409,7 +459,7 @@
             history = makeLocalCopy(history);
             xaItems.put(history.getId(), history);
         }
-        InternalVersion version = super.checkin(history, node, simple);
+        InternalVersion version = super.internalCheckin(history, node, simple);
         NodeId frozenNodeId = version.getFrozenNodeId();
         InternalVersionItem frozenNode = createInternalVersionItem(frozenNodeId);
         if (frozenNode != null) {
@@ -423,7 +473,7 @@
      * <p/>
      * Before modifying version history given, make a local copy of it.
      */
-    protected void removeVersion(InternalVersionHistoryImpl history, Name name)
+    protected void internalRemoveVersion(InternalVersionHistoryImpl history, Name name)
             throws VersionException, RepositoryException {
 
         if (history.getVersionManager() != this) {
@@ -440,7 +490,7 @@
                 xaItems.put(v1.getId(), v1);
             }
         }
-        super.removeVersion(history, name);
+        super.internalRemoveVersion(history, name);
     }
 
     /**
@@ -524,10 +574,12 @@
      * Delegate the call to our XA item state manager. If successful, inform
      * global repository manager to update its caches.
      */
+    @SuppressWarnings("unchecked")
     public void commit(TransactionContext tx) throws TransactionException {
         if (vmgrLocked) {
             ((XAItemStateManager) stateMgr).commit(tx);
-            Map xaItems = (Map) tx.getAttribute(ITEMS_ATTRIBUTE_NAME);
+            Map<NodeId, InternalVersionItem> xaItems =
+                    (Map<NodeId, InternalVersionItem>) tx.getAttribute(ITEMS_ATTRIBUTE_NAME);
             vMgr.itemsUpdated(xaItems.values());
         }
     }
@@ -654,6 +706,28 @@
     }
 
     /**
+     * Make a local copy of an internal version item. This will recreate the
+     * (global) version item with state information from our own state
+     * manager.
+     * @param act source
+     * @return the new copy
+     * @throws RepositoryException if an error occurs
+     */
+    private InternalActivityImpl makeLocalCopy(InternalActivityImpl act)
+            throws RepositoryException {
+        ReadLock lock = acquireReadLock();
+        try {
+            NodeState state = (NodeState) stateMgr.getItemState(act.getId());
+            NodeStateEx stateEx = new NodeStateEx(stateMgr, ntReg, state, null);
+            return new InternalActivityImpl(this, stateEx);
+        } catch (ItemStateException e) {
+            throw new RepositoryException("Unable to make local copy", e);
+        } finally {
+            lock.release();
+        }
+    }
+
+    /**
      * Return a flag indicating whether an internal version item belongs to
      * a different XA environment.
      * @param item the item to check

Modified: jackrabbit/trunk/jackrabbit-core/src/main/resources/org/apache/jackrabbit/core/nodetype/builtin_nodetypes.cnd
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/resources/org/apache/jackrabbit/core/nodetype/builtin_nodetypes.cnd?rev=784261&r1=784260&r2=784261&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/resources/org/apache/jackrabbit/core/nodetype/builtin_nodetypes.cnd
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/resources/org/apache/jackrabbit/core/nodetype/builtin_nodetypes.cnd
Fri Jun 12 20:32:47 2009
@@ -204,10 +204,25 @@
   + jcr:nodeTypes (rep:nodeTypes) = rep:nodeTypes mandatory protected abort
   + * (nt:base) = nt:unstructured multiple ignore
 
+// implementation note: currently we keep the activities below the version storage
+// because of the complexity of adding new virtual item state providers.
+// the future goal is to keep them as siblings, of course.
+
 [rep:versionStorage]
   + * (nt:versionHistory) = nt:versionHistory protected multiple abort
   + * (rep:versionStorage) = rep:versionStorage protected multiple abort
+  + * (rep:activities) = rep:activities protected multiple abort
 
+[rep:activities]
+  + * (nt:activity) = nt:activity protected multiple abort
+  + * (rep:activities) = rep:activities protected multiple abort
+
+// implementation note: because node references are not maintained within the
+// version storage, we store a bidirectional relationship between activities and
+ // the respective versions
+[rep:VersionReference] mix
+  - rep:versions (reference) protected multiple abort
+  
 // -----------------------------------------------------------------------------
 // J A C K R A B B I T  S E C U R I T Y
 // -----------------------------------------------------------------------------

Modified: jackrabbit/trunk/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/commons/AbstractRepository.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/commons/AbstractRepository.java?rev=784261&r1=784260&r2=784261&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/commons/AbstractRepository.java
(original)
+++ jackrabbit/trunk/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/commons/AbstractRepository.java
Fri Jun 12 20:32:47 2009
@@ -77,6 +77,9 @@
         add(Repository.OPTION_WORKSPACE_MANAGEMENT_SUPPORTED);
         add(Repository.OPTION_XML_EXPORT_SUPPORTED);
         add(Repository.OPTION_XML_IMPORT_SUPPORTED);
+        add(Repository.OPTION_ACTIVITIES_SUPPORTED);
+        // add(Repository.OPTION_BASELINES_SUPPORTED);
+        
         add(Repository.QUERY_FULL_TEXT_SEARCH_SUPPORTED);
         add(Repository.QUERY_JOINS);
         add(Repository.QUERY_JOINS_INNER);

Modified: jackrabbit/trunk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/name/NameConstants.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/name/NameConstants.java?rev=784261&r1=784260&r2=784261&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/name/NameConstants.java
(original)
+++ jackrabbit/trunk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/name/NameConstants.java
Fri Jun 12 20:32:47 2009
@@ -216,9 +216,29 @@
 
     /**
      * jcr:copiedFrom
+     * @since 2.0
      */
     public static final Name JCR_COPIEDFROM = FACTORY.create(Name.NS_JCR_URI, "copiedFrom");
 
+    /**
+     * jcr:activities
+     * @since 2.0
+     */
+    public static final Name JCR_ACTIVITIES = FACTORY.create(Name.NS_JCR_URI, "activities");
+
+    /**
+     * jcr:activity
+     * @since 2.0
+     */
+    public static final Name JCR_ACTIVITY = FACTORY.create(Name.NS_JCR_URI, "activity");
+
+    /**
+     * jcr:activityTitle
+     * @since 2.0
+     */
+    public static final Name JCR_ACTIVITY_TITLE = FACTORY.create(Name.NS_JCR_URI, "activityTitle");
+
+
     //--------------------------------< node type related item name constants >
 
     /**
@@ -437,6 +457,12 @@
     public static final Name MIX_LIFECYCLE =
         FACTORY.create(Name.NS_MIX_URI, "lifecycle");
 
+    /**
+     * nt:activity
+     * @since 2.0
+     */
+    public static final Name NT_ACTIVITY = FACTORY.create(Name.NS_NT_URI, "activity");
+
     //--------------------------------------------------------------------------
     /**
      * rep:root
@@ -454,6 +480,21 @@
     public static final Name REP_VERSIONSTORAGE = FACTORY.create(Name.NS_REP_URI, "versionStorage");
 
     /**
+     * rep:activities
+     */
+    public static final Name REP_ACTIVITIES = FACTORY.create(Name.NS_REP_URI, "activities");
+
+    /**
+     * rep:versionReference
+     */
+    public static final Name REP_VERSION_REFERENCE = FACTORY.create(Name.NS_REP_URI, "VersionReference");
+
+    /**
+     * rep:versions
+     */
+    public static final Name REP_VERSIONS = FACTORY.create(Name.NS_REP_URI, "versions");
+    
+    /**
      * rep:nodeTypes
      */
     public static final Name REP_NODETYPES = FACTORY.create(Name.NS_REP_URI, "nodeTypes");



Mime
View raw message