org.objectweb.jonas_web.deployment.api.Pattern Class Reference

List of all members.

Public Member Functions

 Pattern (String pattern)
boolean isPathPrefix ()
boolean isExtensionPattern ()
boolean isDefaultPattern ()
boolean isExactPattern ()
boolean isSubstringPattern (String substring)
boolean isMatching (Pattern otherPattern)
String getValue ()
String toString ()
boolean equals (Object o)
int hashCode ()
int compareTo (Object o)

Detailed Description

Defines a Pattern object for JACC Allow to check if this pattern is a path prefix pattern, and can return the type of the pattern Implements Comparable interface to sort items
See also:
JACC 3.1.3.1 and 3.1.3.3 for more details
Author:
Florent Benoit

Definition at line 38 of file Pattern.java.


Constructor & Destructor Documentation

org.objectweb.jonas_web.deployment.api.Pattern.Pattern String  pattern  ) 
 

Constructor

Parameters:
pattern string representation of the pattern

Definition at line 80 of file Pattern.java.


Member Function Documentation

int org.objectweb.jonas_web.deployment.api.Pattern.compareTo Object  o  ) 
 

Compares this object with the specified object for order.

Parameters:
o object to compare
Returns:
a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object.

Definition at line 249 of file Pattern.java.

References org.objectweb.jonas_web.deployment.api.Pattern.getValue().

Here is the call graph for this function:

boolean org.objectweb.jonas_web.deployment.api.Pattern.equals Object  o  ) 
 

Tests if this object is equal to another object

Parameters:
o given object to test
Returns:
true if the other object is a pattern object with the same value

Definition at line 227 of file Pattern.java.

References org.objectweb.jonas_web.deployment.api.Pattern.getValue().

Here is the call graph for this function:

String org.objectweb.jonas_web.deployment.api.Pattern.getValue  ) 
 

Gets the string representation of this object

Returns:
the string representation of this pattern

Definition at line 209 of file Pattern.java.

Referenced by org.objectweb.jonas_web.deployment.api.Pattern.compareTo(), org.objectweb.jonas_web.deployment.api.Pattern.equals(), org.objectweb.jonas_web.deployment.api.Pattern.isMatching(), and org.objectweb.jonas_web.deployment.api.Pattern.toString().

int org.objectweb.jonas_web.deployment.api.Pattern.hashCode  ) 
 

Gets the hashcode of this object

Returns:
hashcode of this object

Definition at line 238 of file Pattern.java.

boolean org.objectweb.jonas_web.deployment.api.Pattern.isDefaultPattern  ) 
 

Test if this pattern is the default pattern (equals to "/")

Returns:
true if this pattern is the default pattern

Definition at line 131 of file Pattern.java.

Referenced by org.objectweb.jonas_web.deployment.api.Pattern.isMatching().

boolean org.objectweb.jonas_web.deployment.api.Pattern.isExactPattern  ) 
 

Test if this pattern is an exact pattern (not in the other case)

Returns:
true if this pattern is an exact pattern

Definition at line 141 of file Pattern.java.

boolean org.objectweb.jonas_web.deployment.api.Pattern.isExtensionPattern  ) 
 

Test if this pattern is an extension pattern (Starts with ".*")

Returns:
true if this pattern is an extension pattern

Definition at line 121 of file Pattern.java.

Referenced by org.objectweb.jonas_web.deployment.api.Pattern.isMatching().

boolean org.objectweb.jonas_web.deployment.api.Pattern.isMatching Pattern  otherPattern  ) 
 

Test if this pattern matches another pattern This URL pattern matches another pattern if they are related, by case sensitive comparison, as follows:

  • their pattern values are String equivalent, or
  • this pattern is the path-prefix pattern "/*", or
  • this pattern is a path-prefix pattern (that is, it starts with "/" and ends with "/*") and the other pattern starts with the substring of this pattern, minus its last 2 characters, and the next character of the other pattern, if there is one, is "/", or

this pattern is an extension pattern (that is, it starts with "*.") and the other pattern ends with this pattern, or this pattern is the special default pattern, "/", which matches all other patterns.

Parameters:
otherPattern pattern to check for matching
See also:
JACC 3.1.3.3 for the definition of these rules
Returns:
true if the patterns match

Definition at line 186 of file Pattern.java.

References org.objectweb.jonas_web.deployment.api.Pattern.getValue(), org.objectweb.jonas_web.deployment.api.Pattern.isDefaultPattern(), org.objectweb.jonas_web.deployment.api.Pattern.isExtensionPattern(), org.objectweb.jonas_web.deployment.api.Pattern.isPathPrefix(), and org.objectweb.jonas_web.deployment.api.Pattern.isSubstringPattern().

Referenced by org.objectweb.jonas_web.deployment.api.PatternEntry.addQualifiedPattern().

Here is the call graph for this function:

boolean org.objectweb.jonas_web.deployment.api.Pattern.isPathPrefix  ) 
 

Test if this pattern is a path-prefix pattern or not (Starts with "/" and ends with "/*"

Returns:
true if this pattern is a path-prefix

Definition at line 111 of file Pattern.java.

Referenced by org.objectweb.jonas_web.deployment.api.Pattern.isMatching().

boolean org.objectweb.jonas_web.deployment.api.Pattern.isSubstringPattern String  substring  ) 
 

Test if the pattern starts with the given pattern It's the inverse of this definition : The other pattern starts with the substring of this pattern, minus its last 2 characters, and the next character of the other pattern, if there is one, is "/"

Parameters:
substring string to test
Returns:
true if the pattern starts with the given pattern

Definition at line 155 of file Pattern.java.

Referenced by org.objectweb.jonas_web.deployment.api.Pattern.isMatching().

String org.objectweb.jonas_web.deployment.api.Pattern.toString  ) 
 

String representation

Returns:
the string representation of this pattern

Definition at line 218 of file Pattern.java.

References org.objectweb.jonas_web.deployment.api.Pattern.getValue().

Here is the call graph for this function:


The documentation for this class was generated from the following file:
Generated on Tue Feb 15 15:13:26 2005 for JOnAS by  doxygen 1.3.9.1