Package org.apache.wink.server.utils

Examples of org.apache.wink.server.utils.SystemLinksBuilder.types()


        @Produces("application/atom+xml")
        public String getAtom(@Context LinkBuilders builders) {
            SystemLinksBuilder builder = builders.createSystemLinksBuilder();

            List<SyndLink> links = new ArrayList<SyndLink>();
            builder.types(LinkType.ALTERNATE).build(links);
            assertEquals(3, links.size());
            assertLink(links,
                       "alternate",
                       "application/xml",
                       "systemLinksSelective?alt=application%2Fxml");
View Full Code Here


                       "alternate",
                       "application/atom+xml",
                       "systemLinksSelective?alt=application%2Fatom%2Bxml");

            links.clear();
            builder.types(LinkType.SELF).build(links);
            assertEquals(1, links.size());
            assertLink(links, "self", null, "systemLinksSelective");

            links.clear();
            builder.types(LinkType.EDIT).build(links);
View Full Code Here

            builder.types(LinkType.SELF).build(links);
            assertEquals(1, links.size());
            assertLink(links, "self", null, "systemLinksSelective");

            links.clear();
            builder.types(LinkType.EDIT).build(links);
            assertEquals(1, links.size());
            assertLink(links, "edit", null, "systemLinksSelective");

            links.clear();
            builder.types(LinkType.OPENSEARCH).build(links);
View Full Code Here

            builder.types(LinkType.EDIT).build(links);
            assertEquals(1, links.size());
            assertLink(links, "edit", null, "systemLinksSelective");

            links.clear();
            builder.types(LinkType.OPENSEARCH).build(links);
            assertEquals(1, links.size());
            assertLink(links,
                       "search",
                       "application/opensearchdescription+xml",
                       "systemLinksSelective?alt=application%2Fopensearchdescription%2Bxml");
View Full Code Here

                       "search",
                       "application/opensearchdescription+xml",
                       "systemLinksSelective?alt=application%2Fopensearchdescription%2Bxml");

            links.clear();
            builder.types(LinkType.SELF, LinkType.EDIT).build(links);
            assertEquals(2, links.size());
            assertLink(links, "self", null, "systemLinksSelective");
            assertLink(links, "edit", null, "systemLinksSelective");

            links.clear();
View Full Code Here

            assertEquals(2, links.size());
            assertLink(links, "self", null, "systemLinksSelective");
            assertLink(links, "edit", null, "systemLinksSelective");

            links.clear();
            builder.types(LinkType.EDIT, LinkType.OPENSEARCH).build(links);
            assertEquals(2, links.size());
            assertLink(links, "edit", null, "systemLinksSelective");
            assertLink(links,
                       "search",
                       "application/opensearchdescription+xml",
View Full Code Here

                       "search",
                       "application/opensearchdescription+xml",
                       "systemLinksSelective?alt=application%2Fopensearchdescription%2Bxml");

            links.clear();
            builder.types(LinkType.SELF, LinkType.EDIT, LinkType.OPENSEARCH, LinkType.ALTERNATE)
                .build(links);
            assertEquals(6, links.size());
            assertLink(links, "self", null, "systemLinksSelective");
            assertLink(links, "edit", null, "systemLinksSelective");
            assertLink(links,
View Full Code Here

                       "alternate",
                       "application/atom+xml",
                       "systemLinksSelective?alt=application%2Fatom%2Bxml");

            links.clear();
            builder.types().build(links);
            assertEquals(6, links.size());
            assertLink(links, "self", null, "systemLinksSelective");
            assertLink(links, "edit", null, "systemLinksSelective");
            assertLink(links,
                       "alternate",
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.