Exceptions in general

2007-11-23 Thread Paul J. Lucas
Why doesn't the Restlet framework make more use of exceptions? Why should I have to do something like this: if ( /* disaster */ ) { response.setStatus( CLIENT_ERROR_WHATEVER, "message" ); return; } when I could do something like this: if ( /* d

Throwing exceptions in ConverterService methods

2007-11-23 Thread Paul J. Lucas
OK, so I want to convert an entity having the MediaType of TEXT_URI_LIST into an Object, say a List where each URL is an element of the list. I derive from ConverterService and override toObject(). Inside that method, I want to read the representation line-by-line, so I call Representatio

ConverterService architecture

2007-11-23 Thread Paul J. Lucas
The current architecture of ConverterService is such that if I want to convert to/from an object of a given class, I subclass ConverterService. Well, what if I want to convert to/from several classes? In my subclass, I could do an: if ( obj instanceof MyClass1 ) { // .

Why not Reference.getQueryAsObject?

2007-11-23 Thread Paul J. Lucas
If Message.getEntityAsObject() exists, why doesn't Reference.getQueryAsObject() exist? I want to turn a query (via a Form) into an Object using a ConverterService. (I'm converting a query into an Object now, but doing it my own way since the framework apparently provides no "right way" of

Re: Why can't empty directories be deleted?

2007-11-23 Thread Thierry Boileau
well... It is not obvious for me too... Let me think about it. best regards, Thierry Boileau On Nov 23, 2007 2:12 PM, Jerome Louvel <[EMAIL PROTECTED]> wrote: > > Hi Paul, > > This isn't obvious to me either. Maybe Thierry can enlighten us? > > As a workaround, I suggest that you create a custom

Releasing Representation

2007-11-23 Thread Alex Milowski
I see there is a release() method on the Representation class but I can find any place in the trunk where this method is actually used. I have a problem in that I'm using an OutputRepresentation instance to return a resource from eXist but I need to ensure that the read lock on that resource is al

Re: Why can't empty directories be deleted?

2007-11-23 Thread Jerome Louvel
Hi Paul, This isn't obvious to me either. Maybe Thierry can enlighten us? As a workaround, I suggest that you create a custom build out of SVN. You could also register an overridden File connector, but that might sounds too complex for your use case. Best regards, Jerome 2007/11/22, Paul J. Lu