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.


Field Summary
static int CONFIDENTIAL
           
static int INTEGRAL
           
static int NA
           
 
Constructor Summary
URLPattern(String pat)
          Construct an instance of the utility class for WebModuleConfiguration.
 
Method Summary
 void addAllRoles(Collection<String> 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)
          TODO this is kinda weird without an explanation
 HTTPMethods getComplementedHTTPMethods()
           
 String getComplementedMethods()
           
 HTTPMethods getHTTPMethods()
           
 String getMethods()
          Return the set of HTTP methods that have been associated with this URL pattern.
 String getMethodsWithTransport()
           
static String getMethodsWithTransport(HTTPMethods methods, int transport)
           
 String getQualifiedPattern(Set<URLPattern> patterns)
          Get a qualifed URL pattern relative to a particular set of URL patterns.
 HashSet<String> getRoles()
           
 int getTransport()
           
 int hashCode()
           
 void setTransport(String trans)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NA

public static final int NA
See Also:
Constant Field Values

INTEGRAL

public static final int INTEGRAL
See Also:
Constant Field Values

CONFIDENTIAL

public static final int CONFIDENTIAL
See Also:
Constant Field Values
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<URLPattern> 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()

getHTTPMethods

public HTTPMethods getHTTPMethods()

getComplementedHTTPMethods

public HTTPMethods getComplementedHTTPMethods()

getMethodsWithTransport

public String getMethodsWithTransport()

getMethodsWithTransport

public static String getMethodsWithTransport(HTTPMethods methods,
                                             int transport)

setTransport

public void setTransport(String trans)

getTransport

public int getTransport()

addRole

public void addRole(String role)

addAllRoles

public void addAllRoles(Collection<String> collection)

getRoles

public HashSet<String> getRoles()

equals

public boolean equals(Object obj)
TODO this is kinda weird without an explanation

Overrides:
equals in class Object
Parameters:
obj - object to compare with
Returns:
if this equals obj

hashCode

public int hashCode()
Overrides:
hashCode in class Object


Copyright © 2003-2007 Apache Software Foundation. All Rights Reserved.