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 Thomas Bellembois <th...@univ-rennes1.fr> on 2005/03/10 09:19:35 UTC

Quotas again.

Hello,

I have read on the mailing list that in 2001 somebody started to develop 
Slide quota based on Interceptors, but apparently that development was 
not completed (do you know why ?).
Is there somewhere a sample of code about this work ?

A technical question :
A class "InsufficientStorageException" exists but is never used. To be 
compliant with the "draft-ietf-webdav-quota-06" I would need to throw 
this kind of exception in some classes in my Interceptor. Is there a 
reason for this absence ? Would it be possible to modify the interface 
"ContentInterceptor" to include it ?

Thank you.

Thomas

-- 
BELLEMBOIS Thomas
CRI, Université de Rennes 1
Campus de beaulieu
Avenue du Général Leclerc
35042 RENNES Cedex
Tél.: 02.23.23.69.60
Mail: Thomas.Bellembois@univ-rennes1.fr



---------------------------------------------------------------------
To unsubscribe, e-mail: slide-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: slide-dev-help@jakarta.apache.org


Re: Quotas again.

Posted by Honoré David <dh...@oma.be>.
Thomas Bellembois wrote:

> Ok, I will do that. Before starting my development, I just wanted to 
> study all the different possibilities and as somedy started to develop 
> Slide quotas based on Interceptors, I thought it could be a way. But I 
> will follow your advice.

This was because in 2001 event in slide does not exists. There were only 
Interceptors before ... now, there are events and extractor.

> Sorry for my basic questions, I am not very aware of event and 
> interceptors yet. ;-)
>
no problem with that for me.

> Thank you very much for your help. (Thanks to Stephan too)
>
> Thomas
>
> Honoré David wrote:
>
>> Thomas Bellembois wrote:
>>
>>> Hello,
>>>
>>> I have read on the mailing list that in 2001 somebody started to 
>>> develop Slide quota based on Interceptors, but apparently that 
>>> development was not completed (do you know why ?).
>>> Is there somewhere a sample of code about this work ?
>>>
>>> A technical question :
>>> A class "InsufficientStorageException" exists but is never used. To 
>>> be compliant with the "draft-ietf-webdav-quota-06" I would need to 
>>> throw this kind of exception in some classes in my Interceptor. Is 
>>> there a reason for this absence ? Would it be possible to modify the 
>>> interface "ContentInterceptor" to include it ?
>>>
>>> Thank you.
>>>
>>> Thomas
>>>
>> One's again look at the events system. Events are pretty much 
>> flexible than Interceptors and this is not very difficult to convert 
>> an ContentInterceptor to an EventListener.
>>
>> Listener can throw a VetoException (if vetoable event) ...
>> then just do something like that
>>
>>    throw (VetoException) new VetoException("no more disk 
>> space").initCause(new InsufficientStorageException(uri, user, "quota 
>> exceded"));
>>
>>
>>
>>
>> Have a nice day.
>>
>> Honoré David.
>>
>>
>>
>> ---------------------------------------------------------------------
>> 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


Re: Quotas again.

Posted by Thomas Bellembois <th...@univ-rennes1.fr>.
Ok, I will do that. Before starting my development, I just wanted to 
study all the different possibilities and as somedy started to develop 
Slide quotas based on Interceptors, I thought it could be a way. But I 
will follow your advice.
Sorry for my basic questions, I am not very aware of event and 
interceptors yet. ;-)

Thank you very much for your help. (Thanks to Stephan too)

Thomas

Honoré David wrote:

> Thomas Bellembois wrote:
>
>> Hello,
>>
>> I have read on the mailing list that in 2001 somebody started to 
>> develop Slide quota based on Interceptors, but apparently that 
>> development was not completed (do you know why ?).
>> Is there somewhere a sample of code about this work ?
>>
>> A technical question :
>> A class "InsufficientStorageException" exists but is never used. To 
>> be compliant with the "draft-ietf-webdav-quota-06" I would need to 
>> throw this kind of exception in some classes in my Interceptor. Is 
>> there a reason for this absence ? Would it be possible to modify the 
>> interface "ContentInterceptor" to include it ?
>>
>> Thank you.
>>
>> Thomas
>>
> One's again look at the events system. Events are pretty much flexible 
> than Interceptors and this is not very difficult to convert an 
> ContentInterceptor to an EventListener.
>
> Listener can throw a VetoException (if vetoable event) ...
> then just do something like that
>
>    throw (VetoException) new VetoException("no more disk 
> space").initCause(new InsufficientStorageException(uri, user, "quota 
> exceded"));
>
>
>
>
> Have a nice day.
>
> Honoré David.
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: slide-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: slide-dev-help@jakarta.apache.org
>


-- 
BELLEMBOIS Thomas
CRI, Université de Rennes 1
Campus de beaulieu
Avenue du Général Leclerc
35042 RENNES Cedex
Tél.: 02.23.23.69.60
Mail: Thomas.Bellembois@univ-rennes1.fr



---------------------------------------------------------------------
To unsubscribe, e-mail: slide-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: slide-dev-help@jakarta.apache.org


Re: Quotas again.

Posted by Honoré David <dh...@oma.be>.
Thomas Bellembois wrote:

> Hello,
>
> I have read on the mailing list that in 2001 somebody started to 
> develop Slide quota based on Interceptors, but apparently that 
> development was not completed (do you know why ?).
> Is there somewhere a sample of code about this work ?
>
> A technical question :
> A class "InsufficientStorageException" exists but is never used. To be 
> compliant with the "draft-ietf-webdav-quota-06" I would need to throw 
> this kind of exception in some classes in my Interceptor. Is there a 
> reason for this absence ? Would it be possible to modify the interface 
> "ContentInterceptor" to include it ?
>
> Thank you.
>
> Thomas
>
One's again look at the events system. Events are pretty much flexible 
than Interceptors and this is not very difficult to convert an 
ContentInterceptor to an EventListener.

Listener can throw a VetoException (if vetoable event) ...
then just do something like that

    throw (VetoException) new VetoException("no more disk 
space").initCause(new InsufficientStorageException(uri, user, "quota 
exceded"));




Have a nice day.

Honoré David.



---------------------------------------------------------------------
To unsubscribe, e-mail: slide-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: slide-dev-help@jakarta.apache.org


Re: Quotas again.

Posted by Stefan Lützkendorf <lu...@apache.org>.
I see the point. But adding InsufficientStorageException the the
ContentInterceptor interface would make a lot of changes necessary
in ContentImpl, in Content etc. ...

Would be good if we find a simpler may. May be you should try not to
use the Interceptor but an event listener (see DetailedWebdavListener
that gets events similar to ContentIntercetor). This is closer to the
WebDAV layer and so its easyer to get the exceptions in to WebDAV response
codes.

Stefan


Thomas Bellembois wrote:

> Hello,
> 
> I have read on the mailing list that in 2001 somebody started to develop 
> Slide quota based on Interceptors, but apparently that development was 
> not completed (do you know why ?).
> Is there somewhere a sample of code about this work ?
> 
> A technical question :
> A class "InsufficientStorageException" exists but is never used. To be 
> compliant with the "draft-ietf-webdav-quota-06" I would need to throw 
> this kind of exception in some classes in my Interceptor. Is there a 
> reason for this absence ? Would it be possible to modify the interface 
> "ContentInterceptor" to include it ?
> 
> Thank you.
> 
> Thomas
> 


-- 
Stefan Lützkendorf  --  luetzkendorf@apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: slide-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: slide-dev-help@jakarta.apache.org


Re: Quotas again.

Posted by Thomas Bellembois <th...@univ-rennes1.fr>.
I have found a sample of code in the mailing list - mail by 
Jean-Philippe Courson ( Tue, 18 Dec 2001 17:10:03) (the mail I was 
speaking about in my first message)
Why wasn't his code included in Slide ?

Thomas Bellembois wrote:

> Hello,
>
> I have read on the mailing list that in 2001 somebody started to 
> develop Slide quota based on Interceptors, but apparently that 
> development was not completed (do you know why ?).
> Is there somewhere a sample of code about this work ?
>
> A technical question :
> A class "InsufficientStorageException" exists but is never used. To be 
> compliant with the "draft-ietf-webdav-quota-06" I would need to throw 
> this kind of exception in some classes in my Interceptor. Is there a 
> reason for this absence ? Would it be possible to modify the interface 
> "ContentInterceptor" to include it ?
>
> Thank you.
>
> Thomas
>


-- 
BELLEMBOIS Thomas
CRI, Université de Rennes 1
Campus de beaulieu
Avenue du Général Leclerc
35042 RENNES Cedex
Tél.: 02.23.23.69.60
Mail: Thomas.Bellembois@univ-rennes1.fr



---------------------------------------------------------------------
To unsubscribe, e-mail: slide-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: slide-dev-help@jakarta.apache.org