com.googlecode.webutilities.modules.ne
Class NewModulesFilter.RulesMapping
java.lang.Object
com.googlecode.webutilities.modules.ne.NewModulesFilter.RulesMapping
- All Implemented Interfaces:
- IgnoreAcceptContext
- Enclosing class:
- NewModulesFilter
public static class NewModulesFilter.RulesMapping
- extends Object
- implements IgnoreAcceptContext
Class that maps the rules based on URL pattern, mime type pattern or user agent string pattern.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
isURLAccepted
public boolean isURLAccepted(String url)
- Specified by:
isURLAccepted in interface IgnoreAcceptContext
- Parameters:
url - - request URL string without query parameters
- Returns:
- isAccepted - true if given URL has to be processed
isMIMEAccepted
public boolean isMIMEAccepted(String mimeType)
- Specified by:
isMIMEAccepted in interface IgnoreAcceptContext
- Parameters:
mimeType - - contentType of the chained response
- Returns:
- isAccepted - true if it is to be processed by this filter
isUserAgentAccepted
public boolean isUserAgentAccepted(String userAgent)
- Specified by:
isUserAgentAccepted in interface IgnoreAcceptContext
- Parameters:
userAgent - - requesting user agent string
- Returns:
- isAccepted - true if request by given user agent has to be processed/filtered.
getRules
public List<DirectivePair> getRules()
addRulesPair
public void addRulesPair(DirectivePair pair)
addRulesPairs
public void addRulesPairs(List<DirectivePair> pairs)
Copyright © 2011. All Rights Reserved.