com.arsdigita.templating
Class URLPatternGenerator

java.lang.Object
  extended bycom.arsdigita.templating.URLPatternGenerator
All Implemented Interfaces:
PatternGenerator

public class URLPatternGenerator
extends Object
implements PatternGenerator

Generates a set of pattern values based on the URL path info for the current request. Slashes in the request are translated into hyphens; the file extension is stripped; the any 'index' is removed, except for the top level. So some examples: /content/admin/item.jsp -> { "admin-item", "admin", "index" } /content/admin/index.jsp -> { "admin", "index" } /content/admin/ -> { "admin", "index" } /content/index.jsp -> { "index" } /content/ -> { "index" }


Constructor Summary
URLPatternGenerator()
           
 
Method Summary
 String[] generateValues(String key, javax.servlet.http.HttpServletRequest req)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

URLPatternGenerator

public URLPatternGenerator()
Method Detail

generateValues

public String[] generateValues(String key,
                               javax.servlet.http.HttpServletRequest req)
Specified by:
generateValues in interface PatternGenerator


Copyright (c) 2004 Red Hat, Inc. Corporation. All Rights Reserved. Generated at July 20 2004:2337 UTC