You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@isis.apache.org by Martin Grigorov <mg...@apache.org> on 2015/11/14 20:21:11 UTC

Re: [03/11] isis git commit: ISIS-1250: take-on of the JaxbService...

Hi Dan,

On Fri, Nov 13, 2015 at 6:57 PM, <da...@apache.org> wrote:

> public Dto_downloadXml(final Dto dto) {
> +        this.dto = dto;
> +        try {
> +            mimeTypeApplicationZip = new MimeType("application", "zip");
>

What is the magic here that it is a "zip"?
The methods below deal with "xml" (as I'd expect).


> +        } catch (final MimeTypeParseException ex) {
> +            throw new FatalException(ex);
> +        }
> +    }
> +
> +    public static class ActionDomainEvent extends
> org.apache.isis.applib.IsisApplibModule.ActionDomainEvent<Dto> {}
> +
> +    @Action(
> +            domainEvent = ActionDomainEvent.class,
> +            semantics = SemanticsOf.SAFE
> +    )
> +    @MemberOrder(sequence = "500.1")
> +    public Object $(final String fileName) throws JAXBException,
> IOException {
> +
> +        final String xml = jaxbService.toXml(dto);
> +        return new Clob(Util.withSuffix(fileName, "xml"), "text/xml",
> xml);
> +    }
> +
> +    public String default0$() {
> +        return Util.withSuffix(dto.getClass().getName(), "xml");
> +    }
>



Martin Grigorov
Wicket Training and Consulting
https://twitter.com/mtgrigorov

Re: [03/11] isis git commit: ISIS-1250: take-on of the JaxbService...

Posted by Dan Haywood <da...@haywood-associates.co.uk>.
That might be a copy N paste from the downloadXsd which generates multiple
files, zipped together.

I'll double check.

Thx for the review.

Cheers, Dan.
On 14 Nov 2015 19:21, "Martin Grigorov" <mg...@apache.org> wrote:

> Hi Dan,
>
> On Fri, Nov 13, 2015 at 6:57 PM, <da...@apache.org> wrote:
>
> > public Dto_downloadXml(final Dto dto) {
> > +        this.dto = dto;
> > +        try {
> > +            mimeTypeApplicationZip = new MimeType("application", "zip");
> >
>
> What is the magic here that it is a "zip"?
> The methods below deal with "xml" (as I'd expect).
>
>
> > +        } catch (final MimeTypeParseException ex) {
> > +            throw new FatalException(ex);
> > +        }
> > +    }
> > +
> > +    public static class ActionDomainEvent extends
> > org.apache.isis.applib.IsisApplibModule.ActionDomainEvent<Dto> {}
> > +
> > +    @Action(
> > +            domainEvent = ActionDomainEvent.class,
> > +            semantics = SemanticsOf.SAFE
> > +    )
> > +    @MemberOrder(sequence = "500.1")
> > +    public Object $(final String fileName) throws JAXBException,
> > IOException {
> > +
> > +        final String xml = jaxbService.toXml(dto);
> > +        return new Clob(Util.withSuffix(fileName, "xml"), "text/xml",
> > xml);
> > +    }
> > +
> > +    public String default0$() {
> > +        return Util.withSuffix(dto.getClass().getName(), "xml");
> > +    }
> >
>
>
>
> Martin Grigorov
> Wicket Training and Consulting
> https://twitter.com/mtgrigorov
>