|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.util.Dictionary<K,V>
java.util.Hashtable<ComparablePattern,java.util.Set<java.lang.String>>
com.zeevbelkin.web.filter.access.Yaaf.RegexAccessChecker
public static class Yaaf.RegexAccessChecker
This class is an implementation of the UrlAccessChecker
based on using of regular expressions. The checker maps regular expressions
to the list of the roles those have permissions to access matched URL's.
If no URL's are gived the checker always returns ALLOWED
.
Ordinary, an access restriction file is used to initialize the filter checker.
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface com.zeevbelkin.web.filter.access.Yaaf.UrlAccessChecker |
---|
Yaaf.UrlAccessChecker.Decision |
Constructor Summary | |
---|---|
Yaaf.RegexAccessChecker()
|
Method Summary | |
---|---|
void |
add(java.lang.String regex,
java.lang.String consumer)
adds a role to the list of roles those have permission to access URL's those match the pattern |
Yaaf.UrlAccessChecker.Decision |
check(Yaaf.RoleResolver resolver,
java.lang.String url)
returns the checker decision that can be ALLOWED ,
FORBIDDEN or
AUTHENTICATION_REQUIRED |
void |
remove(java.lang.String regex,
java.lang.String consumer)
removes a role from the list of roles those have permission to access URL's those match the pattern |
Methods inherited from class java.util.Hashtable |
---|
clear, clone, contains, containsKey, containsValue, elements, entrySet, equals, get, hashCode, isEmpty, keys, keySet, put, putAll, rehash, remove, size, toString, values |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Yaaf.RegexAccessChecker()
Method Detail |
---|
public void remove(java.lang.String regex, java.lang.String consumer)
consumer
- the roleregex
- the regular expressionpublic void add(java.lang.String regex, java.lang.String consumer)
consumer
- the roleregex
- the regular expressionpublic Yaaf.UrlAccessChecker.Decision check(Yaaf.RoleResolver resolver, java.lang.String url)
ALLOWED
,
FORBIDDEN
or
AUTHENTICATION_REQUIRED
check
in interface Yaaf.UrlAccessChecker
resolver
- the resolver identifying the user, or null in case
of an unauthenticated userurl
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |