public class DefaultInterceptorRegistry extends java.lang.Object implements InterceptorRegistry
| Constructor and Description |
|---|
DefaultInterceptorRegistry() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addTypeInvalidationListener()
Adds the composed type invalidation listener to the pool.
|
protected void |
assertLoaded()
DOCTODO apidoc
|
protected java.util.List<java.lang.String> |
getAssignableTypes(java.lang.String type)
Returns all assignable types for a given type in super-type-first order.
|
java.util.Collection<InitDefaultsInterceptor> |
getInitDefaultsInterceptors(java.lang.String type) |
protected TypeManager |
getJaloTypeManager() |
java.util.Collection<LoadInterceptor> |
getLoadInterceptors(java.lang.String type) |
java.util.Collection<PrepareInterceptor> |
getPrepareInterceptors(java.lang.String type) |
java.util.Collection<RemoveInterceptor> |
getRemoveInterceptors(java.lang.String type) |
java.util.Collection<ValidateInterceptor> |
getValidateInterceptors(java.lang.String type) |
protected void |
init() |
protected boolean |
isValidTypeCode(java.lang.String code)
Returns
true if the given composed type code is part of the type system |
void |
registerInterceptor(InterceptorMapping mapping)
Register an
Interceptor which is of the InterceptorMapping to the registry. |
void |
registerInterceptor(java.lang.String type,
Interceptor interceptor,
java.util.Collection<Interceptor> replacements)
Register a given
Interceptor to the registry. |
void |
setApplicationContext(ApplicationContext applicationContext) |
void |
setInterceptorExecutionPolicy(InterceptorExecutionPolicy interceptorExecutionPolicy) |
void |
setInterceptorMappings(java.util.Collection<InterceptorMapping> configuredMappings) |
void |
unregisterInterceptor(InterceptorMapping mapping) |
public java.util.Collection<LoadInterceptor> getLoadInterceptors(java.lang.String type)
getLoadInterceptors in interface InterceptorRegistrytype - type code mapping stringLoadInterceptor for specific type code mappingpublic java.util.Collection<PrepareInterceptor> getPrepareInterceptors(java.lang.String type)
getPrepareInterceptors in interface InterceptorRegistrytype - type code mapping stringPrepareInterceptor for specific type code mappingpublic java.util.Collection<RemoveInterceptor> getRemoveInterceptors(java.lang.String type)
getRemoveInterceptors in interface InterceptorRegistrytype - type code mapping stringRemoveInterceptor for specific type code mappingpublic java.util.Collection<ValidateInterceptor> getValidateInterceptors(java.lang.String type)
getValidateInterceptors in interface InterceptorRegistrytype - type code mapping stringValidateInterceptor for specific type code mappingpublic java.util.Collection<InitDefaultsInterceptor> getInitDefaultsInterceptors(java.lang.String type)
getInitDefaultsInterceptors in interface InterceptorRegistrytype - type code mapping stringInitDefaultsInterceptor for specific type code mappingpublic void registerInterceptor(java.lang.String type,
Interceptor interceptor,
java.util.Collection<Interceptor> replacements)
Interceptor to the registry. This Interceptor is registered for the given type (and every
subtype) and replaces (if provided) the Interceptors in the given replacements collection. If possible use
registerInterceptor(InterceptorMapping) instead!type - for this ComposedType code (and any subtype) the Interceptor is registered.interceptor - the Interceptorreplacements - the given Interceptor replaces the Interceptors in this collection. Example: a LoadInterceptor for
product replaces the LoadInterceptor for items because the productt load interceptor does a special
product loadingpublic void registerInterceptor(InterceptorMapping mapping)
Interceptor which is of the InterceptorMapping to the registry. The Interceptor is
registered for a ComposedTypecode (see InterceptorMapping.setTypeCode(String) and, if provided,
replace other registered Interceptors (see InterceptorMapping.setReplacedInterceptors(Collection).
Use this method instead of registerInterceptor(String, Interceptor, Collection) because the
InterceptorMapping is sortable (See Ordered). An Interceptor with a low irder number will be executed
first. If no order number is provided the default is Ordered#LOWEST_PRECEDENCE.mapping - the InterceptorMapping contains the Interceptor, the typecode, the interceptors which will be replaced
and an order numberpublic void unregisterInterceptor(InterceptorMapping mapping)
protected void init()
protected void addTypeInvalidationListener()
protected java.util.List<java.lang.String> getAssignableTypes(java.lang.String type)
public void setInterceptorMappings(java.util.Collection<InterceptorMapping> configuredMappings)
protected void assertLoaded()
protected TypeManager getJaloTypeManager()
TypeManager.protected boolean isValidTypeCode(java.lang.String code)
true if the given composed type code is part of the type systemcode - the ComposedType codefalse otherwisepublic void setInterceptorExecutionPolicy(InterceptorExecutionPolicy interceptorExecutionPolicy)
public void setApplicationContext(ApplicationContext applicationContext)
Copyright © 2018 SAP SE. All Rights Reserved.