Package org.jboss.seam.web

Examples of org.jboss.seam.web.Pattern


{
    @Test
    public void testBasicInPattern()
        throws Exception
    {
        Pattern pattern = new Pattern("/foo.seam", "/foo");
        pattern.setViewMapping(new ServletMapping("*.seam"));
                
        testNoMatchIn(pattern, "/bar");
        testNoMatchIn(pattern, "/fool");
        testNoMatchIn(pattern, "/foo.seam");
        testNoMatchIn(pattern, "/foo/");
View Full Code Here


   
    @Test
    public void testSingleArgInPattern()
        throws Exception
    {
        Pattern pattern = new Pattern("/foo.seam", "/foo/{id}");
        pattern.setViewMapping(new ServletMapping("*.seam"));
                       
        testNoMatchIn(pattern, "/foo");
        testNoMatchIn(pattern, "/foo/bar/baz");
        testNoMatchIn(pattern, "/foo/bar/baz?x=y");
        testNoMatchIn(pattern, "/foo/bar/?x=y");
View Full Code Here

    @Test
    public void testMultiArgInPattern()
        throws Exception
    {
        Pattern pattern = new Pattern("/foo.seam", "/foo/{id}/{action}");
        pattern.setViewMapping(new ServletMapping("*.seam"));
                             
        testNoMatchIn(pattern, "/foo");
        testNoMatchIn(pattern, "/foo/bar");
        testNoMatchIn(pattern, "/foo/bar/baz/qux");

View Full Code Here

   
    @Test
    public void testBasicOutPattern()
        throws Exception
    {
        Pattern pattern = new Pattern("/foo.seam", "/foo");
        pattern.setViewMapping(new ServletMapping("*.seam"));
                
        testNoMatchOut(pattern, "/bar.seam");
        testNoMatchOut(pattern, "/fool.seam");
        testNoMatchOut(pattern, "/foo");
       
View Full Code Here

   
    @Test
    public void testSingleArgOutPattern()
        throws Exception
    {
        Pattern pattern = new Pattern("/foo.seam", "/foo/{id}");
        pattern.setViewMapping(new ServletMapping("*.seam"));
                       
        testNoMatchOut(pattern, "/foo.seam");
        testNoMatchOut(pattern, "/foo.seam?x=y");
        testNoMatchOut(pattern, "/foo.seam/bar");      
        //should this match? 
View Full Code Here

   
    @Test
    public void testMultiArgOutPattern()
        throws Exception
    {
        Pattern pattern = new Pattern("/foo.seam", "/foo/{id}/{action}");
        pattern.setViewMapping(new ServletMapping("*.seam"));
                             
        testNoMatchOut(pattern, "/foo.seam");
        testNoMatchOut(pattern, "/foo.seam?id=bar");
        testNoMatchOut(pattern, "/foo.seam?action=baz");

View Full Code Here

    //public void setRewritePatterns(List<String> rewritePatterns) {
    //    this.rewritePatterns = rewritePatterns;
    //}

    public void addRewritePattern(String value) {
        Pattern pattern = new Pattern(viewId, value);
        rewritePatterns.add(pattern);
    }
View Full Code Here

    //public void setRewritePatterns(List<String> rewritePatterns) {
    //    this.rewritePatterns = rewritePatterns;
    //}

    public void addRewritePattern(String value) {
        Pattern pattern = new Pattern(viewId, value);
        rewritePatterns.add(pattern);
    }
View Full Code Here

    //public void setRewritePatterns(List<String> rewritePatterns) {
    //    this.rewritePatterns = rewritePatterns;
    //}

    public void addRewritePattern(String value) {
        Pattern pattern = new Pattern(viewId, value);
        rewritePatterns.add(pattern);
    }
View Full Code Here

TOP

Related Classes of org.jboss.seam.web.Pattern

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.