info.magnolia.cms.util
Interface UrlPattern

All Superinterfaces:
java.io.Serializable
All Known Implementing Classes:
SimpleUrlPattern, UrlPattern.MatchAllPattern

public interface UrlPattern
extends java.io.Serializable

Pattern interface, used to match URLs.

Version:
$Revision: 41137 $ ($Author: gjoseph $)
Author:
Fabrizio Giustina

Nested Class Summary
static class UrlPattern.MatchAllPattern
          A default implementation with matches any input.
 
Field Summary
static UrlPattern MATCH_ALL
          A pattern which matches any input.
 
Method Summary
 int getLength()
          Returns the pattern length.
 boolean match(java.lang.String url)
          Does the patter match the given url?
 

Field Detail

MATCH_ALL

static final UrlPattern MATCH_ALL
A pattern which matches any input.

Method Detail

match

boolean match(java.lang.String url)
Does the patter match the given url?

Parameters:
url - url to match
Returns:
true if the given URL matches the pattern

getLength

int getLength()
Returns the pattern length. Longer patterns have higher priority.

Returns:
pattern length


Copyright © 2003-2011 Magnolia International Ltd.. All Rights Reserved.