abdera-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Brian Moseley" <...@osafoundation.org>
Subject Re: PrettyXML writer in server code
Date Thu, 20 Dec 2007 02:29:47 GMT
On Dec 19, 2007 1:14 PM, Remy Gendron <remy.gendron@arrova.ca> wrote:
>
> However, I was not able to quickly find a hook in the server base classes so
> that, in development, my Atom/Abdera server generates human readable XML
> output…

i overrode AbstractProvider's returnBase() method like so:

    protected ResponseContext returnBase(Base base,
                                         int status,
                                         Date lastModified) {
        ResponseContext rc = super.returnBase(base, status, lastModified);
        rc.setWriter(abdera.getWriterFactory().getWriter("PrettyXML"));
        return rc;
    }

we can probably come up with a better way for the framework to allow
the server developer to specify a named writer for the response.

Mime
View raw message