pnever 2005/02/24 03:41:59
Modified: src/share/org/apache/slide/content Tag:
SLIDE_2_0_RELEASE_BRANCH ContentImpl.java
src/share/org/apache/slide/structure Tag:
SLIDE_2_0_RELEASE_BRANCH StructureImpl.java
Log:
Removed some unnecessary forceStoreEnlistments
Revision Changes Path
No revision
No revision
1.50.2.5 +10 -19
jakarta-slide/src/share/org/apache/slide/content/ContentImpl.java
Index: ContentImpl.java
===================================================================
RCS file:
/home/cvs/jakarta-slide/src/share/org/apache/slide/content/ContentImpl.java,v
retrieving revision 1.50.2.4
retrieving revision 1.50.2.5
diff -u -r1.50.2.4 -r1.50.2.5
--- ContentImpl.java 26 Feb 2004 11:31:01 -0000 1.50.2.4
+++ ContentImpl.java 24 Feb 2005 11:41:58 -0000 1.50.2.5
@@ -5,7 +5,7 @@
*
* ====================================================================
*
- * Copyright 1999-2002 The Apache Software Foundation
+ * Copyright 1999-2002 The Apache Software Foundation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -23,28 +23,17 @@
package org.apache.slide.content;
+import org.apache.slide.common.*;
+import org.apache.slide.structure.*;
+
import java.lang.reflect.Method;
import java.util.Date;
import java.util.Enumeration;
import java.util.Vector;
-
-import org.apache.slide.common.Domain;
-import org.apache.slide.common.Namespace;
-import org.apache.slide.common.NamespaceConfig;
-import org.apache.slide.common.ServiceAccessException;
-import org.apache.slide.common.SlideToken;
-import org.apache.slide.common.Uri;
-import org.apache.slide.common.UriPath;
import org.apache.slide.lock.Lock;
import org.apache.slide.lock.ObjectLockedException;
import org.apache.slide.security.AccessDeniedException;
import org.apache.slide.security.Security;
-import org.apache.slide.structure.ActionNode;
-import org.apache.slide.structure.LinkedObjectNotFoundException;
-import org.apache.slide.structure.ObjectNode;
-import org.apache.slide.structure.ObjectNotFoundException;
-import org.apache.slide.structure.Structure;
-import org.apache.slide.structure.SubjectNode;
import org.apache.slide.util.Configuration;
/**
@@ -1456,6 +1445,8 @@
throws ServiceAccessException, ObjectLockedException,
AccessDeniedException,
LinkedObjectNotFoundException, ObjectNotFoundException {
+ token = new SlideTokenWrapper(token, false); // do it in read only
mode
+
if (namespaceConfig.getCreateObjectAction() == ActionNode.DEFAULT) {
// do not check during start-up
return;
No revision
No revision
1.39.2.2 +14 -7
jakarta-slide/src/share/org/apache/slide/structure/StructureImpl.java
Index: StructureImpl.java
===================================================================
RCS file:
/home/cvs/jakarta-slide/src/share/org/apache/slide/structure/StructureImpl.java,v
retrieving revision 1.39.2.1
retrieving revision 1.39.2.2
diff -u -r1.39.2.1 -r1.39.2.2
--- StructureImpl.java 5 Feb 2004 16:05:13 -0000 1.39.2.1
+++ StructureImpl.java 24 Feb 2005 11:41:59 -0000 1.39.2.2
@@ -176,6 +176,9 @@
String resolvedUri = uri.toString();
+ SlideToken originalToken = token;
+ token = new SlideTokenWrapper(token, false); // do the
traversing in read mode
+
// 1 - Tokemization of the Uri
UriTokenizer uriTokenizer = new UriTokenizer(token,
uri.getNamespace(),
resolvedUri);
@@ -240,8 +243,8 @@
}
// 10 - We return the last object which has been found
-
- result = courObject;
+ // we will re-read it taken the real force-enlistment into
account
+ result =
uri.getStore().retrieveObject(namespace.getUri(originalToken, courObject.uri));
}
return result;
@@ -255,6 +258,9 @@
ObjectNotFoundException, LinkedObjectNotFoundException,
AccessDeniedException, ObjectLockedException {
+ SlideToken originalToken = token;
+ token = new SlideTokenWrapper(token, false); // do the traversing in
read mode
+
// Checking roles
Enumeration roles = securityHelper.getRoles(object);
while (roles.hasMoreElements()) {
@@ -325,7 +331,7 @@
// newObject =
courUri.getStore().retrieveObject(courUri);
// re-read the parent taking the forceEnlistment flag
into account
- Uri parentUri = namespace.getUri(token,
parentObject.getUri());
+ Uri parentUri = namespace.getUri(originalToken,
parentObject.getUri());
parentObject =
parentUri.getStore().retrieveObject(parentUri);
// Add the newly created object to its parent's
// children list
@@ -659,3 +665,4 @@
}
}
+
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]