|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jasig.portal.utils.uri.PrefixUriScrutinizer
public final class PrefixUriScrutinizer
UriScrutinizer implementation matching URIs against allowed prefixes and disallowed prefixes to determine whether to block the URI.
The URI will be allowed if it is prefixed by at least one of the allowed prefixes and it is not prefixed by any of the blocked prefixes.
Instances of this class are immutable once constructed.
Instances of this class are threadsafe and serializable.
Field Summary | |
---|---|
private java.lang.String[] |
allowPrefixes
Allowed prefixes for URIs examined by this scrutinizer instance. |
private java.lang.String[] |
denyPrefixes
Blocked prefixes for URIs examined by this scrutinizer instance. |
private org.apache.commons.logging.Log |
log
|
Constructor Summary | |
---|---|
PrefixUriScrutinizer(java.lang.String[] allowPrefixesArg,
java.lang.String[] denyPrefixesArg)
Create a new PrefixUriScrutinizer instance specifying the allowed URI prefixes and the blocked URI prefixes. |
Method Summary | |
---|---|
java.util.List |
getAllowPrefixes()
Get an unmodifiable List of the Strings allowed as prefixes to URIs scrutinized by this PrefixUriScrutinizer. |
java.util.List |
getDenyPrefixes()
Get an unmodifiable List of the Strings explicitly denied as prefixes to URIs scrutinized by this PrefixUriScrutinizer. |
static PrefixUriScrutinizer |
instanceFromParameters(java.lang.String allowPrefixesArg,
java.lang.String denyPrefixesArg)
|
void |
scrutinize(java.net.URI uriArg)
Scrutinize a URI to determine if access to it should be blocked for reasons of policy. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
private final org.apache.commons.logging.Log log
private final java.lang.String[] allowPrefixes
private final java.lang.String[] denyPrefixes
Constructor Detail |
---|
public PrefixUriScrutinizer(java.lang.String[] allowPrefixesArg, java.lang.String[] denyPrefixesArg)
allowPrefixesArg
- non-null potentially empty array of StringsdenyPrefixesArg
- non-null potentially empty array of StringsMethod Detail |
---|
public static PrefixUriScrutinizer instanceFromParameters(java.lang.String allowPrefixesArg, java.lang.String denyPrefixesArg)
public void scrutinize(java.net.URI uriArg) throws BlockedUriException
IUriScrutinizer
scrutinize
in interface IUriScrutinizer
uriArg
- non-null URI for examination
BlockedUriException
- if access should be blockedpublic java.util.List getAllowPrefixes()
public java.util.List getDenyPrefixes()
public java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |