Package org.apache.wink.common.internal

Examples of org.apache.wink.common.internal.PathSegmentImpl


        @GET
        @Path("PathSegmentEncodedList/{p1:.*}")
        @Produces
        public void getPathSegmentEncodedList(@Encoded @PathParam("p1") List<PathSegment> p) {
            PathSegment segment1 = new PathSegmentImpl("a%20b;m1=1");
            PathSegment segment2 = new PathSegmentImpl("c%20d;m2=2");
            assertEquals(2, p.size());
            assertEquals(segment1, p.get(0));
            assertEquals(segment2, p.get(1));
        }
View Full Code Here


        @GET
        @Path("PathSegmentDefaultList/{p1:.*}")
        @Produces
        public void getPathSegmentDefaultList(@DefaultValue("a;m1=1/b;m2=2") @PathParam("k") List<PathSegment> p) {
            PathSegment segment1 = new PathSegmentImpl("a;m1=1");
            PathSegment segment2 = new PathSegmentImpl("b;m2=2");
            assertEquals(2, p.size());
            assertEquals(segment1, p.get(0));
            assertEquals(segment2, p.get(1));
        }
View Full Code Here

        @GET
        @Path("PathSegmentSimpleSet/{p1:.*}")
        @Produces
        public void getPathSegmentSet(@PathParam("p1") Set<PathSegment> p) {
            PathSegment segment1 = new PathSegmentImpl("a b;m1=1");
            PathSegment segment2 = new PathSegmentImpl("c d;m2=2");
            assertEquals(2, p.size());
            assertTrue(p.contains(segment1));
            assertTrue(p.contains(segment2));
        }
View Full Code Here

        @GET
        @Path("PathSegmentEncodedSet/{p1:.*}")
        @Produces
        public void getPathSegmentEncodedSet(@Encoded @PathParam("p1") Set<PathSegment> p) {
            PathSegment segment1 = new PathSegmentImpl("a%20b;m1=1");
            PathSegment segment2 = new PathSegmentImpl("c%20d;m2=2");
            assertEquals(2, p.size());
            assertTrue(p.contains(segment1));
            assertTrue(p.contains(segment2));
        }
View Full Code Here

        @GET
        @Path("PathSegmentDefaultSet/{p1:.*}")
        @Produces
        public void getPathSegmentDefaultSet(@DefaultValue("a;m1=1/b;m2=2") @PathParam("k") Set<PathSegment> p) {
            PathSegment segment1 = new PathSegmentImpl("a;m1=1");
            PathSegment segment2 = new PathSegmentImpl("b;m2=2");
            assertEquals(2, p.size());
            assertTrue(p.contains(segment1));
            assertTrue(p.contains(segment2));
        }
View Full Code Here

        @GET
        @Path("PathSegmentSimpleSortedSet/{p1:.*}")
        @Produces
        public void getPathSegmentSortedSet(@PathParam("p1") SortedSet<PathSegment> p) {
            PathSegment segment1 = new PathSegmentImpl("a b;m1=1");
            PathSegment segment2 = new PathSegmentImpl("c d;m2=2");
            assertEquals(2, p.size());
            assertTrue(p.contains(segment1));
            assertTrue(p.contains(segment2));
        }
View Full Code Here

        @GET
        @Path("PathSegmentEncodedSortedSet/{p1:.*}")
        @Produces
        public void getPathSegmentEncodedSortedSet(@Encoded @PathParam("p1") SortedSet<PathSegment> p) {
            PathSegment segment1 = new PathSegmentImpl("a%20b;m1=1");
            PathSegment segment2 = new PathSegmentImpl("c%20d;m2=2");
            assertEquals(2, p.size());
            assertTrue(p.contains(segment1));
            assertTrue(p.contains(segment2));
        }
View Full Code Here

        @GET
        @Path("PathSegmentDefaultSortedSet/{p1:.*}")
        @Produces
        public void getPathSegmentDefaultSortedSet(@DefaultValue("a;m1=1/b;m2=2") @PathParam("k") SortedSet<PathSegment> p) {
            PathSegment segment1 = new PathSegmentImpl("a;m1=1");
            PathSegment segment2 = new PathSegmentImpl("b;m2=2");
            assertEquals(2, p.size());
            assertTrue(p.contains(segment1));
            assertTrue(p.contains(segment2));
        }
View Full Code Here

            }

            @GET
            @Path("subresourcepathsegment/{p2}")
            public void getPathSegment(@PathParam("p2") PathSegment p2) {
                assertEquals(new PathSegmentImpl("j k+l"), p2);
            }
View Full Code Here

        logger.trace("parsePath({}) entry", path); //$NON-NLS-1$
        String[] segmentsArray = StringUtils.fastSplitTemplate(path, "/", true); //$NON-NLS-1$
        List<PathSegment> pathSegments = new ArrayList<PathSegment>(segmentsArray.length);
        // go over all the segments and add them
        for (String segment : segmentsArray) {
            pathSegments.add(new PathSegmentImpl(segment));
        }
        logger.trace("parsePath() exit returning {}", pathSegments); //$NON-NLS-1$
        return pathSegments;
    }
View Full Code Here

TOP

Related Classes of org.apache.wink.common.internal.PathSegmentImpl

Copyright © 2018 www.massapicom. 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.