You are viewing a plain text version of this content. The canonical link for it is here.
Posted to slide-dev@jakarta.apache.org by pn...@apache.org on 2004/01/06 14:31:22 UTC
cvs commit: jakarta-slide/src/share/org/apache/slide/store ParentStore.java
pnever 2004/01/06 05:31:21
Modified: src/share/org/apache/slide/store ParentStore.java
Log:
Missing tlocks at store and remove
Revision Changes Path
1.2 +9 -14 jakarta-slide/src/share/org/apache/slide/store/ParentStore.java
Index: ParentStore.java
===================================================================
RCS file: /home/cvs/jakarta-slide/src/share/org/apache/slide/store/ParentStore.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- ParentStore.java 27 Dec 2003 14:54:37 -0000 1.1
+++ ParentStore.java 6 Jan 2004 13:31:21 -0000 1.2
@@ -150,7 +150,7 @@
public void storeObject(Uri uri, ObjectNode object)
throws ServiceAccessException, ObjectNotFoundException {
- ResourceId resourceId = obtainResourceId(uri, object);
+ ResourceId resourceId = obtainResourceId(uri);
ObjectNode objectClone = object.cloneObject();
objectClone.setUri(resourceId.getUuri()); // switch to uuri
super.storeObject(resourceId, objectClone);
@@ -173,7 +173,7 @@
public void removeObject(Uri uri, ObjectNode object)
throws ServiceAccessException, ObjectNotFoundException {
- ResourceId resourceId = obtainResourceId(uri, object);
+ ResourceId resourceId = obtainResourceId(uri);
ObjectNode objectClone = object.cloneObject();
objectClone.setUri(resourceId.getUuri()); // switch to uuri
super.removeObject(resourceId, objectClone);
@@ -387,7 +387,7 @@
try {
ObjectNode objectNode = doRetrieveObjectNode(uri);
- ResourceId resourceId = obtainResourceId(uri, objectNode);
+ ResourceId resourceId = obtainResourceId(uri);
NodeRevisionDescriptor nrd = super.retrieveRevisionDescriptor(resourceId, revisionNumber);
nrd.setProperty("resource-id", resourceId.asXml());
nrd.setProperty("parent-set", getXmlParentSet(uri, objectNode));
@@ -399,7 +399,7 @@
}
}
public String getXmlParentSet(Uri uri, ObjectNode objectNode) throws ServiceAccessException, ObjectNotFoundException {
- ResourceId resourceId = obtainResourceId(uri, objectNode);
+ ResourceId resourceId = obtainResourceId(uri);
// if objectNode is the root of a store, parent-uuri.equals(""),
// thus we cannot call getOneParentUri because
// we cannot resolve the uuri
@@ -432,7 +432,7 @@
return result.toString();
}
- public String getOneUri(ResourceId resourceId) throws ServiceAccessException, ObjectNotFoundException {
+ private String getOneUri(ResourceId resourceId) throws ServiceAccessException, ObjectNotFoundException {
String result = "";
while (!resourceId.isStoreRoot()) {
ObjectNode objectNode = super.retrieveObject(resourceId);
@@ -692,11 +692,6 @@
private ResourceId obtainResourceId(Uri uri) throws ServiceAccessException, ObjectNotFoundException {
ObjectNode objectNode = doRetrieveObjectNode(uri);
- ResourceId resourceId = ResourceId.create(uri, objectNode.getUuri());
- return resourceId;
- }
-
- private ResourceId obtainResourceId(Uri uri, ObjectNode objectNode) throws ServiceAccessException, ObjectNotFoundException {
ResourceId resourceId = ResourceId.create(uri, objectNode.getUuri());
return resourceId;
}
---------------------------------------------------------------------
To unsubscribe, e-mail: slide-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: slide-dev-help@jakarta.apache.org