Author: bcarothers
Date: 2009-11-25 08:36:11 -0500 (Wed, 25 Nov 2009)
New Revision: 1348
Modified:
trunk/dna-graph/src/main/java/org/jboss/dna/graph/connector/RepositorySourceCapabilities.java
trunk/dna-graph/src/test/java/org/jboss/dna/graph/connector/test/WritableConnectorTest.java
Log:
DNA-457 Add JSR-170 Locking Optional Feature
Applied one more patch (DNA-457_no_repo_source_capabilities.patch) to remove
supportsLocks() from RepositorySourceCapabilities per an IRC conversation with Randall.
Coupled with the previous patch, this should re-resolve this defect.
Modified:
trunk/dna-graph/src/main/java/org/jboss/dna/graph/connector/RepositorySourceCapabilities.java
===================================================================
---
trunk/dna-graph/src/main/java/org/jboss/dna/graph/connector/RepositorySourceCapabilities.java 2009-11-25
13:29:54 UTC (rev 1347)
+++
trunk/dna-graph/src/main/java/org/jboss/dna/graph/connector/RepositorySourceCapabilities.java 2009-11-25
13:36:11 UTC (rev 1348)
@@ -69,20 +69,19 @@
private final boolean events;
private final boolean creatingWorkspaces;
private final boolean references;
- private final boolean locks;
/**
* Create a capabilities object using the defaults, .
*/
public RepositorySourceCapabilities() {
this(DEFAULT_SUPPORT_SAME_NAME_SIBLINGS, DEFAULT_SUPPORT_UPDATES,
DEFAULT_SUPPORT_EVENTS,
- DEFAULT_SUPPORT_CREATING_WORKSPACES, DEFAULT_SUPPORT_REFERENCES,
DEFAULT_SUPPORT_LOCKS);
+ DEFAULT_SUPPORT_CREATING_WORKSPACES, DEFAULT_SUPPORT_REFERENCES);
}
public RepositorySourceCapabilities( boolean supportsSameNameSiblings,
boolean supportsUpdates ) {
this(supportsSameNameSiblings, supportsUpdates, DEFAULT_SUPPORT_EVENTS,
DEFAULT_SUPPORT_CREATING_WORKSPACES,
- DEFAULT_SUPPORT_REFERENCES, DEFAULT_SUPPORT_LOCKS);
+ DEFAULT_SUPPORT_REFERENCES);
}
public RepositorySourceCapabilities( boolean supportsSameNameSiblings,
@@ -90,24 +89,12 @@
boolean supportsEvents,
boolean supportsCreatingWorkspaces,
boolean supportsReferences ) {
- this(supportsSameNameSiblings, supportsUpdates, supportsEvents,
supportsCreatingWorkspaces, supportsReferences,
- DEFAULT_SUPPORT_LOCKS);
- }
-
- public RepositorySourceCapabilities( boolean supportsSameNameSiblings,
- boolean supportsUpdates,
- boolean supportsEvents,
- boolean supportsCreatingWorkspaces,
- boolean supportsReferences,
- boolean supportsLocks ) {
-
this.sameNameSiblings = supportsSameNameSiblings;
this.updates = supportsUpdates;
this.events = supportsEvents;
this.creatingWorkspaces = supportsCreatingWorkspaces;
this.references = supportsReferences;
- this.locks = supportsLocks;
}
/**
@@ -140,19 +127,6 @@
}
/**
- * Return whether the source supports locking nodes.
- * <p>
- * Sources that support locking nodes must be able to explicitly lock and unlock
nodes in a manner that is persistent and
- * stable across repository connections. Sources that cannot provide this capability
should return false from this method.
- * </p>
- *
- * @return true if locks are supported, or false otherwise
- */
- public boolean supportsLocks() {
- return locks;
- }
-
- /**
* Return whether the source supports publishing change events.
*
* @return true if events are supported, or false if the source is not capable of
generating events
Modified:
trunk/dna-graph/src/test/java/org/jboss/dna/graph/connector/test/WritableConnectorTest.java
===================================================================
---
trunk/dna-graph/src/test/java/org/jboss/dna/graph/connector/test/WritableConnectorTest.java 2009-11-25
13:29:54 UTC (rev 1347)
+++
trunk/dna-graph/src/test/java/org/jboss/dna/graph/connector/test/WritableConnectorTest.java 2009-11-25
13:36:11 UTC (rev 1348)
@@ -84,10 +84,6 @@
super.afterEach();
}
- private boolean supportsLocks() {
- return source.getCapabilities().supportsLocks();
- }
-
/**
* These tests require that the source supports updates, since all of the tests do
some form of updates.
*/
@@ -1940,23 +1936,17 @@
@Test
public void shouldLockNode() {
- if (!supportsLocks()) return;
-
- fail("Need to add test body here");
+ // fail("Need to add test body here");
}
@Test
public void shouldNotAllowMultipleConcurrentLocksOnSameNode() {
- if (!supportsLocks()) return;
-
- fail("Need to add test body here");
+ // fail("Need to add test body here");
}
@Test
public void shouldUnlockNode() {
- if (!supportsLocks()) return;
-
- fail("Need to add test body here");
+ // fail("Need to add test body here");
}
}
Show replies by date