T - public class DefaultSecurityContext<T> extends Object implements SecurityContext<T>
SecurityContextREGEX_PROP_FILE| Constructor and Description |
|---|
DefaultSecurityContext(List<SecurityAdapter<T>> adapters) |
| Modifier and Type | Method and Description |
|---|---|
List<SecurityAdapter<T>> |
getAdapters()
Get Adapters for this Context
|
boolean |
isFailFast()
In failFast (true) mode, any failure will immediately break the chain and not look to carry on with the process.
|
Data<T> |
sanitize(Data<T> input)
Will sanitize in order of adapters.
|
void |
setAdapters(List<SecurityAdapter<T>> adapters)
Set the adapters that make up the context
|
void |
setFailFast(boolean failFast)
In failFast (true) mode, any failure will immediately break the chain and not look to carry on with the process.
|
void |
validate(Data<T> data)
All the calls to
this#adapters are mutually exclusive. |
public DefaultSecurityContext(List<SecurityAdapter<T>> adapters)
public void setAdapters(List<SecurityAdapter<T>> adapters)
SecurityContextsetAdapters in interface SecurityContext<T>public Data<T> sanitize(Data<T> input) throws Exception, OperationNotSupportedException
OperationNotSupportedException will be ignored; any other exception will break the chain.sanitize in interface SecurityAdapter<T>ExceptionOperationNotSupportedExceptionpublic void validate(Data<T> data) throws SecurityException, IOException
this#adapters are mutually exclusive.
SecurityException then the collection will be thrown Back as SecurityException.getViolations()
Note: Adapters that throw a OperationNotSupportedException will be ignored.validate in interface SecurityAdapter<T>data - as DataSecurityException - is its is not safe. This is to provide additional details about the failure that te return param cannot.IOException - for any type of setup, reading, infra related issue with files/configspublic List<SecurityAdapter<T>> getAdapters()
SecurityContextgetAdapters in interface SecurityContext<T>public final boolean isFailFast()
failFast - public final void setFailFast(boolean failFast)
failFast - Copyright © 2018. All rights reserved.