org.apache.geronimo.security.util
Class URLPattern

java.lang.Object
  extended by org.apache.geronimo.security.util.URLPattern

public class URLPattern
extends Object

Utility class for ModuleConfiguration. This class is used to generate qualified patterns, HTTP method sets, complements of HTTP method sets, and HTTP method sets w/ transport restrictions for URL patterns that are found in the web deployment descriptor.


Constructor Summary
URLPattern(String pat)
          Construct an instance of the utility class for WebModuleConfiguration.
 
Method Summary
 void addAllRoles(Collection collection)
           
 void addMethod(String method)
          Add a method to the union of HTTP methods associated with this URL pattern.
 void addRole(String role)
           
 boolean equals(Object obj)
           
 String getComplementedMethods()
           
 String getMethods()
          Return the set of HTTP methods that have been associated with this URL pattern.
 String getMethodsWithTransport()
           
 String getQualifiedPattern(Set patterns)
          Get a qualifed URL pattern relative to a particular set of URL patterns.
 HashSet getRoles()
           
 int hashCode()
           
 void setTransport(String trans)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

URLPattern

public URLPattern(String pat)
Construct an instance of the utility class for WebModuleConfiguration.

Parameters:
pat - the URL pattern that this instance is to collect information on
See Also:
"JSR 115, section 3.1.3" Translating Servlet Deployment Descriptors
Method Detail

getQualifiedPattern

public String getQualifiedPattern(Set patterns)
Get a qualifed URL pattern relative to a particular set of URL patterns. This algorithm is described in JSR 115, section 3.1.3.1 "Qualified URL Pattern Names".

Parameters:
patterns - the set of possible URL patterns that could be used to qualify this pattern
Returns:
a qualifed URL pattern

addMethod

public void addMethod(String method)
Add a method to the union of HTTP methods associated with this URL pattern. An empty string is short hand for the set of all HTTP methods.

Parameters:
method - the HTTP method to be added to the set.

getMethods

public String getMethods()
Return the set of HTTP methods that have been associated with this URL pattern.

Returns:
a set of HTTP methods

getComplementedMethods

public String getComplementedMethods()

getMethodsWithTransport

public String getMethodsWithTransport()

setTransport

public void setTransport(String trans)

addRole

public void addRole(String role)

addAllRoles

public void addAllRoles(Collection collection)

getRoles

public HashSet getRoles()

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object


Copyright © 2006 Apache Software Foundation. All Rights Reserved.