info.magnolia.cms.util
Interface UrlPattern

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

public interface UrlPattern
extends Serializable

Pattern interface, used to match URLs.

Version:
$Revision$ ($Author$)
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.
 String getPatternString()
          Returns the pattern string.
 boolean match(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(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

getPatternString

String getPatternString()
Returns the pattern string.

Returns:
pattern string


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