net.krecan.m2_proxy.store
Class RegExpStoreValidator
java.lang.Object
net.krecan.m2_proxy.store.RegExpStoreValidator
- All Implemented Interfaces:
- StoreValidator
public class RegExpStoreValidator
- extends Object
- implements StoreValidator
Validates resources in the store. Decision is based on the regular expression and timeout.
- Author:
- Lukas Krecan
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TIME_NOT_DEFINED
protected static final int TIME_NOT_DEFINED
- See Also:
- Constant Field Values
RegExpStoreValidator
public RegExpStoreValidator()
shouldStoreResource
public boolean shouldStoreResource(Resource resource)
- Description copied from interface:
StoreValidator
- Decides whether we should store the resource
- Specified by:
shouldStoreResource
in interface StoreValidator
- Returns:
isResourceValid
public boolean isResourceValid(Resource resource)
- Description copied from interface:
StoreValidator
- Decides if the entry in the store is valid. If resource is null, returns false.
- Specified by:
isResourceValid
in interface StoreValidator
- Returns:
matches
protected boolean matches(List regexpTimeouts,
String resourcePath,
long time)
- Check if resourcePath matches some regexp from the list. If the time is > 0 then checks timeout as well
- Parameters:
regexpTimeouts
- resourcePath
- time
-
- Returns:
setIncludes
public void setIncludes(List includeList)
setExcludes
public void setExcludes(List excludeList)
setIncludesMap
public void setIncludesMap(Map includeMap)
parseTimeout
protected long parseTimeout(String timeout)
setExcludesMap
public void setExcludesMap(Map excludeMap)
Copyright © 2006 null. All Rights Reserved.