Package org.beangle.security.web.access

Examples of org.beangle.security.web.access.DefaultResourceExtractor


  protected RestrictionService restrictionService;

  // FIXME new DefaultResourceExtractor
  protected Resource getResource() {
    return authorityService.getResource(new DefaultResourceExtractor()
        .extract(ServletActionContext.getRequest()));
  }
View Full Code Here


public class DefaultResourceExtractorTest {

  @Test
  public void testExtract() throws Exception {
    assertEquals(new DefaultResourceExtractor().extract("a.jsp"), "a");
    assertEquals(new DefaultResourceExtractor().extract("/b.do"), "b");
    assertEquals(new DefaultResourceExtractor().extract("/c/d.action"), "c/d");
    assertEquals(new DefaultResourceExtractor().extract("c/d.action"), "c/d");
    assertEquals(new DefaultResourceExtractor().extract("//c/d.action"), "c/d");
    assertEquals(new DefaultResourceExtractor().extract("  //c/d.action "), "c/d");
    assertEquals(new DefaultResourceExtractor().extract("  c/d.action "), "c/d");

    assertEquals(new DefaultResourceExtractor().extract("  c/d!remove.action "), "c/d");
  }
View Full Code Here

TOP

Related Classes of org.beangle.security.web.access.DefaultResourceExtractor

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.