luetzkendorf 2004/12/21 08:04:22
Modified: src/webdav/server/org/apache/slide/webdav/method
AbstractWebdavMethod.java AclMethod.java
CopyMethod.java LabelMethod.java MoveMethod.java
PropFindMethod.java UnlockMethod.java
src/webdav/server/org/apache/slide/webdav/method/report
AclPrincipalPropSetReport.java
LocateByHistoryReport.java VersionTreeReport.java
Log:
use of PropertyName objects instead of simple Strings
Revision Changes Path
1.70 +5 -5
jakarta-slide/src/webdav/server/org/apache/slide/webdav/method/AbstractWebdavMethod.java
Index: AbstractWebdavMethod.java
===================================================================
RCS file:
/home/cvs/jakarta-slide/src/webdav/server/org/apache/slide/webdav/method/AbstractWebdavMethod.java,v
retrieving revision 1.69
retrieving revision 1.70
diff -u -r1.69 -r1.70
--- AbstractWebdavMethod.java 15 Dec 2004 16:50:34 -0000 1.69
+++ AbstractWebdavMethod.java 21 Dec 2004 16:04:19 -0000 1.70
@@ -538,7 +538,7 @@
= content.retrieve(slideToken, revisionDescriptors);
if (WebdavUtils.isRedirectref(revisionDescriptor)) {
NodeProperty refTarget
- = revisionDescriptor.getProperty(P_REFTARGET);
+ = revisionDescriptor.getProperty(PN_REFTARGET);
// Add the header indicating that this redirect is the
// result of a redirect reference.
@@ -721,7 +721,7 @@
lowerNrds = content.retrieve(slideToken, lowerNode.getUri());
lowerNrd = content.retrieve(slideToken, lowerNrds);
- NodeProperty psProp = lowerNrd.getProperty(P_PARENT_SET);
+ NodeProperty psProp = lowerNrd.getProperty(PN_PARENT_SET);
// FIXME psProp may be null
XMLValue xv = new XMLValue( String.valueOf(psProp.getValue()) );
Iterator i = xv.getList().iterator();
1.48 +4 -4
jakarta-slide/src/webdav/server/org/apache/slide/webdav/method/AclMethod.java
Index: AclMethod.java
===================================================================
RCS file:
/home/cvs/jakarta-slide/src/webdav/server/org/apache/slide/webdav/method/AclMethod.java,v
retrieving revision 1.47
retrieving revision 1.48
diff -u -r1.47 -r1.48
--- AclMethod.java 26 Oct 2004 20:06:00 -0000 1.47
+++ AclMethod.java 21 Dec 2004 16:04:19 -0000 1.48
@@ -270,7 +270,7 @@
Uri aUri = token.getUri(slideToken, aUriAsString);
NodeRevisionDescriptors nrds =
aUri.getStore().retrieveRevisionDescriptors(aUri);
NodeRevisionDescriptor latestNrd =
aUri.getStore().retrieveRevisionDescriptor(aUri, nrds.getLatestRevision());
- NodeProperty aNamespaceAsNode =
latestNrd.getProperty(AclConstants.P_PRIVILEGE_NAMESPACE,
WebdavConstants.S_DAV);
+ NodeProperty aNamespaceAsNode =
latestNrd.getProperty(AclConstants.PN_PRIVILEGE_NAMESPACE);
String aNamespace = aNamespaceAsNode == null ? null :
aNamespaceAsNode.getValue().toString();
String aUriLastSegment =
aUriAsString.substring(aUriAsString.lastIndexOf('/') + 1);
if (aUriLastSegment.equals(privilegeName)
1.71 +4 -4
jakarta-slide/src/webdav/server/org/apache/slide/webdav/method/CopyMethod.java
Index: CopyMethod.java
===================================================================
RCS file:
/home/cvs/jakarta-slide/src/webdav/server/org/apache/slide/webdav/method/CopyMethod.java,v
retrieving revision 1.70
retrieving revision 1.71
diff -u -r1.70 -r1.71
--- CopyMethod.java 8 Nov 2004 09:04:33 -0000 1.70
+++ CopyMethod.java 21 Dec 2004 16:04:19 -0000 1.71
@@ -468,7 +468,7 @@
try {
NodeRevisionDescriptor destinationNrd =
content.retrieve( slideToken,
content.retrieve(slideToken, destinationUri) );
- XMLValue v = new XMLValue(
(String)destinationNrd.getProperty( P_PARENT_SET ).getValue() );
+ XMLValue v = new XMLValue(
(String)destinationNrd.getProperty(PN_PARENT_SET).getValue());
Iterator i = v.iterator();
while (i.hasNext()) {
Namespace dnsp = Namespace.getNamespace(S_DAV);
1.31 +5 -5
jakarta-slide/src/webdav/server/org/apache/slide/webdav/method/LabelMethod.java
Index: LabelMethod.java
===================================================================
RCS file:
/home/cvs/jakarta-slide/src/webdav/server/org/apache/slide/webdav/method/LabelMethod.java,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -r1.30 -r1.31
--- LabelMethod.java 31 Oct 2004 11:32:40 -0000 1.30
+++ LabelMethod.java 21 Dec 2004 16:04:19 -0000 1.31
@@ -511,7 +511,7 @@
protected boolean hasLabel(NodeRevisionDescriptor revisionDescriptor,
String label) {
boolean containsLabel = false;
- NodeProperty labelNameSetProperty =
revisionDescriptor.getProperty(DeltavConstants.P_LABEL_NAME_SET);
+ NodeProperty labelNameSetProperty =
revisionDescriptor.getProperty(DeltavConstants.PN_LABEL_NAME_SET);
if ( (labelNameSetProperty != null) &&
(labelNameSetProperty.getValue() != null) ) {
try {
XMLValue xmlValue = new
XMLValue(labelNameSetProperty.getValue().toString());
1.76 +5 -5
jakarta-slide/src/webdav/server/org/apache/slide/webdav/method/MoveMethod.java
Index: MoveMethod.java
===================================================================
RCS file:
/home/cvs/jakarta-slide/src/webdav/server/org/apache/slide/webdav/method/MoveMethod.java,v
retrieving revision 1.75
retrieving revision 1.76
diff -u -r1.75 -r1.76
--- MoveMethod.java 26 Oct 2004 20:06:00 -0000 1.75
+++ MoveMethod.java 21 Dec 2004 16:04:19 -0000 1.76
@@ -501,7 +501,7 @@
content.retrieve( slideToken, workingResourceUri);
workingResourceRevisionDescriptor =
content.retrieve( slideToken,
workingResourceRevisionDescriptors);
- autoUpdateProperty = new NodeProperty(P_AUTO_UPDATE,
+ autoUpdateProperty = new NodeProperty(PN_AUTO_UPDATE,
propertyHelper.createHrefValue(destinationUri));
workingResourceRevisionDescriptor.setProperty(autoUpdateProperty);
content.store(slideToken,
@@ -588,7 +588,7 @@
if (isRequestSourceWorkspace) {
// DAV:workspace-moved
revisionDescriptor.setProperty(
- new NodeProperty( P_WORKSPACE,
propertyHelper.createHrefValue(this.destinationUri)) );
+ new NodeProperty( PN_WORKSPACE,
propertyHelper.createHrefValue(this.destinationUri)) );
}
else {
// DAV:workspace-member-moved
1.112 +4 -4
jakarta-slide/src/webdav/server/org/apache/slide/webdav/method/PropFindMethod.java
Index: PropFindMethod.java
===================================================================
RCS file:
/home/cvs/jakarta-slide/src/webdav/server/org/apache/slide/webdav/method/PropFindMethod.java,v
retrieving revision 1.111
retrieving revision 1.112
diff -u -r1.111 -r1.112
--- PropFindMethod.java 6 Dec 2004 08:54:13 -0000 1.111
+++ PropFindMethod.java 21 Dec 2004 16:04:19 -0000 1.112
@@ -545,7 +545,7 @@
// @todo What if reftarget is undefined? (an invalid state)
// @todo What if reftarget is relative?
Element hrefElement = new Element(E_HREF, DNSP);
- Object refTarget = revisionDescriptor.getProperty(P_REFTARGET)
+ Object refTarget = revisionDescriptor.getProperty(PN_REFTARGET)
.getValue();
hrefElement.setText(refTarget.toString());
Element locationElement = new Element(E_LOCATION, DNSP);
1.44 +5 -7
jakarta-slide/src/webdav/server/org/apache/slide/webdav/method/UnlockMethod.java
Index: UnlockMethod.java
===================================================================
RCS file:
/home/cvs/jakarta-slide/src/webdav/server/org/apache/slide/webdav/method/UnlockMethod.java,v
retrieving revision 1.43
retrieving revision 1.44
diff -u -r1.43 -r1.44
--- UnlockMethod.java 8 Dec 2004 01:08:12 -0000 1.43
+++ UnlockMethod.java 21 Dec 2004 16:04:19 -0000 1.44
@@ -35,7 +35,6 @@
import org.apache.slide.content.NodeRevisionDescriptor;
import org.apache.slide.content.NodeRevisionDescriptors;
import org.apache.slide.content.RevisionDescriptorNotFoundException;
-import org.apache.slide.content.NodeProperty.NamespaceCache;
import org.apache.slide.event.EventDispatcher;
import org.apache.slide.lock.LockTokenNotFoundException;
import org.apache.slide.lock.NodeLock;
@@ -252,13 +251,12 @@
if (Configuration.useVersionControl()
&& (resourceKind instanceof
CheckedOutVersionControlled)) {
NodeProperty checkinLocktokenProperty =
revisionDescriptor
-
.getProperty(DeltavConstants.I_CHECKIN_LOCKTOKEN,
-
NamespaceCache.SLIDE_URI);
+
.getProperty(DeltavConstants.PN_CHECKIN_LOCKTOKEN);
if (checkinLocktokenProperty == null) {
// retry with default (DAV:)
namespace which was the
// former namespace of this
property
checkinLocktokenProperty =
revisionDescriptor
-
.getProperty(DeltavConstants.I_CHECKIN_LOCKTOKEN);
+
.getProperty(DeltavConstants.PN_CHECKIN_LOCKTOKEN_COMP);
}
if ((checkinLocktokenProperty != null)
&&
(checkinLocktokenProperty.getValue() != null)
1.8 +4 -4
jakarta-slide/src/webdav/server/org/apache/slide/webdav/method/report/AclPrincipalPropSetReport.java
Index: AclPrincipalPropSetReport.java
===================================================================
RCS file:
/home/cvs/jakarta-slide/src/webdav/server/org/apache/slide/webdav/method/report/AclPrincipalPropSetReport.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- AclPrincipalPropSetReport.java 5 Aug 2004 15:44:57 -0000 1.7
+++ AclPrincipalPropSetReport.java 21 Dec 2004 16:04:20 -0000 1.8
@@ -145,7 +145,7 @@
return null;
}
else if (principalNode.equals(SubjectNode.OWNER)) {
- NodeProperty ownerProp = nrd.getProperty(P_OWNER);
+ NodeProperty ownerProp = nrd.getProperty(PN_OWNER);
if (ownerProp != null) {
return
token.getNamespaceConfig().getUsersPath()+"/"+ownerProp.getValue();
}
1.9 +5 -5
jakarta-slide/src/webdav/server/org/apache/slide/webdav/method/report/LocateByHistoryReport.java
Index: LocateByHistoryReport.java
===================================================================
RCS file:
/home/cvs/jakarta-slide/src/webdav/server/org/apache/slide/webdav/method/report/LocateByHistoryReport.java,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- LocateByHistoryReport.java 5 Aug 2004 14:43:34 -0000 1.8
+++ LocateByHistoryReport.java 21 Dec 2004 16:04:20 -0000 1.9
@@ -221,9 +221,9 @@
private String getHistoryUriOfVCR(NodeRevisionDescriptor
revisionDescriptor) {
String historyUri = null;
- NodeProperty property = revisionDescriptor.getProperty(P_CHECKED_IN);
+ NodeProperty property =
revisionDescriptor.getProperty(PN_CHECKED_IN);
if (property == null) {
- property = revisionDescriptor.getProperty(P_CHECKED_OUT);
+ property = revisionDescriptor.getProperty(PN_CHECKED_OUT);
}
if ( (property != null) && (property.getValue() != null) ) {
try {
1.10 +2 -2
jakarta-slide/src/webdav/server/org/apache/slide/webdav/method/report/VersionTreeReport.java
Index: VersionTreeReport.java
===================================================================
RCS file:
/home/cvs/jakarta-slide/src/webdav/server/org/apache/slide/webdav/method/report/VersionTreeReport.java,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- VersionTreeReport.java 18 Nov 2004 16:27:29 -0000 1.9
+++ VersionTreeReport.java 21 Dec 2004 16:04:20 -0000 1.10
@@ -155,7 +155,7 @@
AbstractResourceKind.determineResourceKind(token, nrds, nrd);
}
else if (resourceKind instanceof VersionHistory) {
- NodeProperty rootVersion = nrd.getProperty(P_ROOT_VERSION);
+ NodeProperty rootVersion = nrd.getProperty(PN_ROOT_VERSION);
if (rootVersion != null) {
XMLValue value;
if (rootVersion.getValue() instanceof XMLValue) {
@@ -191,7 +191,7 @@
private void writeReport(NodeRevisionDescriptors nrds, SlideToken
slideToken, Element multistatusElm) throws SlideException {
// this is a versioned resource
NodeRevisionDescriptor hNrd = content.retrieve(slideToken, nrds,
NodeRevisionNumber.HIDDEN_0_0);
- NodeProperty versionSetProperty = hNrd.getProperty(P_VERSION_SET);
+ NodeProperty versionSetProperty = hNrd.getProperty(PN_VERSION_SET);
if ( (versionSetProperty != null) && (versionSetProperty.getValue()
!= null) ) {
XMLValue xmlValue;
try {
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]