Package org.apache.wink.server.utils

Examples of org.apache.wink.server.utils.SingleLinkBuilder.type()


        @Produces("application/atom+xml")
        public String getAtom(@Context LinkBuilders builders) {
            List<SyndLink> links = new ArrayList<SyndLink>();
            SingleLinkBuilder singleLinkBuilder = builders.createSingleLinkBuilder();

            singleLinkBuilder.type(MediaType.APPLICATION_ATOM_XML_TYPE).build(links);
            assertEquals(1, links.size());
            assertLink(links,
                       null,
                       MediaType.APPLICATION_ATOM_XML,
                       "singleLinkAltParam?alt=application%2Fatom%2Bxml");
View Full Code Here


                       null,
                       MediaType.APPLICATION_ATOM_XML,
                       "singleLinkAltParam?alt=application%2Fatom%2Bxml");

            links.clear();
            singleLinkBuilder.type(MediaType.APPLICATION_ATOM_XML_TYPE).addAltParam(false)
                .build(links);
            assertEquals(1, links.size());
            assertLink(links, null, MediaType.APPLICATION_ATOM_XML, "singleLinkAltParam");

            links.clear();
View Full Code Here

                .build(links);
            assertEquals(1, links.size());
            assertLink(links, null, MediaType.APPLICATION_ATOM_XML, "singleLinkAltParam");

            links.clear();
            singleLinkBuilder.type(MediaType.APPLICATION_ATOM_XML_TYPE).addAltParam(true)
                .build(links);
            assertEquals(1, links.size());
            assertLink(links,
                       null,
                       MediaType.APPLICATION_ATOM_XML,
View Full Code Here

                       null,
                       MediaType.APPLICATION_ATOM_XML,
                       "singleLinkAltParam?alt=application%2Fatom%2Bxml");

            links.clear();
            singleLinkBuilder.type(MediaType.APPLICATION_ATOM_XML_TYPE).queryParam("alt", "foo")
                .build(links);
            assertEquals(1, links.size());
            assertLink(links, null, MediaType.APPLICATION_ATOM_XML, "singleLinkAltParam?alt=foo");

            return "";
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.