info.magnolia.cms.util
Class UrlPatternDelegate

java.lang.Object
  extended by info.magnolia.cms.util.UrlPatternDelegate
All Implemented Interfaces:
PatternDelegate

public class UrlPatternDelegate
extends Object
implements PatternDelegate

An implementation of PatternDelegate that evaluates as condition a request uri patter or a hostname pattern.

Version:
$Id$
Author:
fgiust

Constructor Summary
UrlPatternDelegate()
           
 
Method Summary
 Object getDelegate()
          Returns the delegate.
 String getHost()
           
 String getOriginalUrl()
           
 String getUrl()
          Returns the configured Url.
 boolean match(javax.servlet.http.HttpServletRequest request)
          Compares the reques with the url and host patterns.
 void setDelegate(Object delegate)
          Sets the delegate.
 void setHost(String host)
          Sets the host pattern (using SimpleUrlPattern internally).
 void setOriginalUrl(String pattern)
           
 void setUrl(String pattern)
          Sets the Url pattern (using SimpleUrlPattern internally).
 String toString()
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

UrlPatternDelegate

public UrlPatternDelegate()
Method Detail

getUrl

public String getUrl()
Returns the configured Url.


getOriginalUrl

public String getOriginalUrl()

setUrl

public void setUrl(String pattern)
Sets the Url pattern (using SimpleUrlPattern internally).

Parameters:
pattern - url pattern

getHost

public String getHost()

setHost

public void setHost(String host)
Sets the host pattern (using SimpleUrlPattern internally).

Parameters:
host - host pattern

setOriginalUrl

public void setOriginalUrl(String pattern)

match

public boolean match(javax.servlet.http.HttpServletRequest request)
Compares the reques with the url and host patterns.

Specified by:
match in interface PatternDelegate
Parameters:
request - HttpServletRequest
Returns:
true if the pattern matches the configured host (if set) and url (if set)

setDelegate

public void setDelegate(Object delegate)
Sets the delegate.

Parameters:
delegate - the delegate to set

getDelegate

public Object getDelegate()
Returns the delegate.

Specified by:
getDelegate in interface PatternDelegate
Returns:
the delegate

toString

public String toString()

Overrides:
toString in class Object


Copyright © 2003–2014 Magnolia International Ltd.. All rights reserved.