summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2007-12-19 01:21:24 (EST)
committerEike Stepper2007-12-19 01:21:24 (EST)
commit71ac65f69ce520bd179c0f9fd1fb9b969f6a01d0 (patch)
treedf491b210c44e15caa732142da5622bd979b9f43
parent9b98c318158112aa8bb4df0c46aaaa5e35a26784 (diff)
downloadcdo-71ac65f69ce520bd179c0f9fd1fb9b969f6a01d0.zip
cdo-71ac65f69ce520bd179c0f9fd1fb9b969f6a01d0.tar.gz
cdo-71ac65f69ce520bd179c0f9fd1fb9b969f6a01d0.tar.bz2
[201266] Send the revision delta to the server
https://bugs.eclipse.org/bugs/show_bug.cgi?id=201266
-rw-r--r--plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/RevisionManager.java2
-rw-r--r--plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/IStore.java42
2 files changed, 35 insertions, 9 deletions
diff --git a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/RevisionManager.java b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/RevisionManager.java
index 470afc0..27223d7 100644
--- a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/RevisionManager.java
+++ b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/RevisionManager.java
@@ -332,7 +332,7 @@ public class RevisionManager extends CDORevisionResolverImpl implements IRevisio
{
if (!getRepository().isSupportingRevisionDeltas())
{
- throw new IllegalArgumentException("Cannot retrieved origin revision");
+ throw new IllegalArgumentException("Cannot retrieve origin revision");
}
}
else
diff --git a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/IStore.java b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/IStore.java
index cc24c5d..8e4c0ef 100644
--- a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/IStore.java
+++ b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/IStore.java
@@ -10,8 +10,6 @@
**************************************************************************/
package org.eclipse.emf.cdo.server;
-import org.eclipse.net4j.internal.util.lifecycle.LifecycleEventAdapter;
-
/**
* @author Eike Stepper
*/
@@ -22,24 +20,47 @@ public interface IStore extends IRepositoryElement
public String getStoreType();
/**
+ * Returns if this store supports the writing of modified revisions in terms of deltas.
+ * <p>
+ * The contract includes that store implementations with write delta support must also implement
+ * {@link IStoreWriter#writeRevisionDelta(org.eclipse.emf.cdo.internal.protocol.revision.delta.CDORevisionDeltaImpl) IStoreWriter.writeRevisionDelta(CDORevisionDeltaImpl)}
+ * to not throw an <code>UnsupportedOperationException</code>.
+ *
* @return <code>true</code> if this store supports the writing of modified revisions in terms of deltas,
* <code>false</code> otherwise.
*/
public boolean hasWriteDeltaSupport();
/**
+ * Returns if this store supports the retrieval of historical revisions.
+ * <p>
+ * The contract includes that store implementations with auditing support must also implement
+ * {@link IStoreReader#readRevisionByTime(org.eclipse.emf.cdo.protocol.CDOID, int, long) IStoreReader.readRevisionByTime(CDOID, int, long)}
+ * to not throw an <code>UnsupportedOperationException</code>.
+ *
* @return <code>true</code> if this store supports the retrieval of historical revisions, <code>false</code>
* otherwise.
*/
public boolean hasAuditingSupport();
/**
+ * Returns if this store supports the storage of concurrent revisions in separate branches.
+ * <p>
+ * Note: This is reserved for future use by the framework. There is currently no support for branching in the
+ * framework!
+ *
* @return <code>true</code> if this store supports the storage of concurrent revisions in separate branches,
* <code>false</code> otherwise.
*/
public boolean hasBranchingSupport();
/**
+ * Returns if this store supports the efficient lookup of object types.
+ * <p>
+ * The contract includes that store implementations with efficient type lookup support must also implement
+ * {@link IStoreReader#readObjectType(org.eclipse.emf.cdo.protocol.CDOID) IStoreReader.readObjectType(CDOID)} in a way
+ * that it performs similar to a <code>HashMap</code> or <code>TreeMap</code>.
+ *
* @return <code>true</code> if this store supports the efficient lookup of object types, <code>false</code>
* otherwise.
*/
@@ -56,9 +77,12 @@ public interface IStore extends IRepositoryElement
* The session that should be used as a context for read access or <code>null</code>. The store
* implementor is free to interpret and use the session in a manner suitable for him or ignore it at all. It
* is meant only as a hint. Implementor can use it as a key into a cache and/or register a
- * {@link LifecycleEventAdapter} with it to intercept cleanup on session close. Note however that the session
- * can be <code>null</code>, for example during startup of the server while the repositories are
- * initialized but before any user session has been opened.
+ * {@link org.eclipse.net4j.internal.util.lifecycle.LifecycleEventAdapter LifecycleEventAdapter} with it to
+ * intercept cleanup on session close. Note however that the session can be <code>null</code>, for example
+ * during startup of the server while the repositories are initialized but before any user session has been
+ * opened.
+ * @return a reader that can be used to read from this store in the context of the given session, never
+ * <code>null</code>.
*/
public IStoreReader getReader(ISession session);
@@ -66,11 +90,13 @@ public interface IStore extends IRepositoryElement
* Returns a writer that can be used to write to this store in the context of the given view. The given view is always
* marked as a transaction.
*
- * @param session
+ * @param view
* The view that must be used as a context for write access. The store implementor is free to interpret and
* use the view in a manner suitable for him or ignore it at all. It is meant only as a hint. Implementor can
- * use it as a key into a cache and/or register a {@link LifecycleEventAdapter} with it to intercept cleanup
- * on view close.
+ * use it as a key into a cache and/or register a
+ * {@link org.eclipse.net4j.internal.util.lifecycle.LifecycleEventAdapter LifecycleEventAdapter} with it to
+ * intercept cleanup on view close.
+ * @return a writer that can be used to write to this store in the context of the given view, never <code>null</code>.
*/
public IStoreWriter getWriter(IView view);
}