org.alfresco.repo.avm.util
Class HrefBearingRequestPathNameMatcher

java.lang.Object
  extended by org.alfresco.repo.avm.util.HrefBearingRequestPathNameMatcher
All Implemented Interfaces:
java.io.Serializable, org.alfresco.util.NameMatcher

public class HrefBearingRequestPathNameMatcher
extends java.lang.Object
implements org.alfresco.util.NameMatcher, java.io.Serializable

NameMatcher that matches a list of extensions (case insensitively) associated with the request path portion of of a URL. For example, Given the URL: "http://example.com/moo/cow.html", the extention is "html" (note: the '.' character is elided).

See Also:
Serialized Form

Constructor Summary
HrefBearingRequestPathNameMatcher()
          Default constructor.
 
Method Summary
 boolean matches(java.lang.String path)
          Returns true if the URL requst path (e.g.: /moo/cow.html) contains an extension (e.g.: "html") included in the list of matching extensions.
 void setExtensions(java.util.List extensions)
          Set the extensions case insensitively.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HrefBearingRequestPathNameMatcher

public HrefBearingRequestPathNameMatcher()
Default constructor.

Method Detail

setExtensions

public void setExtensions(java.util.List extensions)
Set the extensions case insensitively. The empty string corresponds to files no extention.

Parameters:
extensions -

matches

public boolean matches(java.lang.String path)
Returns true if the URL requst path (e.g.: /moo/cow.html) contains an extension (e.g.: "html") included in the list of matching extensions.

Specified by:
matches in interface org.alfresco.util.NameMatcher


Copyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.