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 Stefan Lützkendorf <lu...@apache.org> on 2004/11/01 09:45:28 UTC
Re: cvs commit: jakarta-slide/src/webdav/server/org/apache/slide/webdav/method
PutMethod.java
Sorry, for that. I merged it in the wrong direction. I will remove it
completely.
Stefan
Unico Hommes wrote:
> Stefan,
>
> I think you inadvertently committed a work-in-progress as well here.
> I've commented out the relevant sections now because I got a
> compilation error due to a missing interface 'FineGrainedLockMethod'
>
> --
> Unico
>
> On 28-okt-04, at 16:48, luetzkendorf@apache.org wrote:
>
>> luetzkendorf 2004/10/28 07:48:45
>>
>> Modified: src/webdav/server/org/apache/slide/webdav/method Tag:
>> SLIDE_2_1_RELEASE_BRANCH PutMethod.java
>> Log:
>> patch from thomas draier for bug 31937.
>>
>> Revision Changes Path
>> No revision
>> No revision
>> 1.81.2.3 +23 -8
>> jakarta-slide/src/webdav/server/org/apache/slide/webdav/method/
>> PutMethod.java
>>
>> Index: PutMethod.java
>> ===================================================================
>> RCS file:
>> /home/cvs/jakarta-slide/src/webdav/server/org/apache/slide/webdav/
>> method/PutMethod.java,v
>> retrieving revision 1.81.2.2
>> retrieving revision 1.81.2.3
>> diff -u -r1.81.2.2 -r1.81.2.3
>> --- PutMethod.java 12 Sep 2004 17:27:41 -0000 1.81.2.2
>> +++ PutMethod.java 28 Oct 2004 14:48:45 -0000 1.81.2.3
>> @@ -63,7 +63,7 @@
>> */
>> public class PutMethod
>> extends AbstractWebdavMethod
>> - implements DeltavConstants, WriteMethod {
>> + implements DeltavConstants, WriteMethod,
>> FineGrainedLockingMethod {
>>
>>
>> // -----------------------------------------------------
>> Instance Variables
>> @@ -91,7 +91,18 @@
>> super(token, config);
>> }
>>
>> -
>> + /**
>> + * @see
>> org.apache.slide.webdav.method.FineGrainedLockingMethod#acquireFineGrai
>> nLocks()
>> + */
>> + public void acquireFineGrainLocks() {
>> + acquireStandardLocks(resourcePath);
>> + // lock history folder in case we have auto versioning
>> turned on
>> + acquireHistoryLocks(resourcePath);
>> + // changes this and parent
>> + acquireLock(resourcePath, WRITE_LOCK);
>> + acquireParentLock(resourcePath, WRITE_LOCK);
>> + }
>> +
>> // ------------------------------------------------------
>> Protected Methods
>>
>>
>> @@ -325,9 +336,6 @@
>> // Get content language
>> revisionDescriptor.setContentLanguage("en");
>>
>> - // Get content length
>> -
>> revisionDescriptor.setContentLength(req.getContentLength());
>> -
>> // Get content type
>> String contentType = req.getContentType();
>> if (contentType == null) {
>> @@ -388,6 +396,13 @@
>> NodeRevisionContent revisionContent =
>> new NodeRevisionContent();
>> revisionContent.setContent(req.getInputStream());
>> +
>> + // Get content length
>> + int contentLength = req.getContentLength();
>> + if (contentLength == -1) {
>> + contentLength =
>> revisionContent.getContentBytes().length;
>> + }
>> + revisionDescriptor.setContentLength(contentLength);
>>
>> content.create(slideToken, resourcePath,
>> revisionDescriptor,
>> revisionContent);
>>
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: slide-dev-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail: slide-dev-help@jakarta.apache.org
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: slide-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: slide-dev-help@jakarta.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: slide-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: slide-dev-help@jakarta.apache.org