public class MethodMapSicherheitAttributeSource extends Object implements SicherheitAttributeSource, org.springframework.beans.factory.BeanClassLoaderAware, org.springframework.beans.factory.InitializingBean
Diese Klasse ist als Kopie der Spring MethodMapTransactionAttributeSource entstanden.
| Constructor and Description |
|---|
MethodMapSicherheitAttributeSource() |
| Modifier and Type | Method and Description |
|---|---|
void |
addGesichertMethod(Class<?> clazz,
String mappedName,
String[] attr)
Add an attribute for a "gesichert" method.
|
void |
addGesichertMethod(Method method,
String[] attr)
Add an attribute for a "gesichert" method.
|
void |
addGesichertMethod(String name,
String[] attr)
Add an attribute for a "gesichert" method.
|
void |
afterPropertiesSet()
Eagerly initializes the specified
"methodMap", if any. |
String[] |
getBenoetigeRechte(Method method,
Class<?> targetClass) |
protected void |
initMethodMap(Map<String,String[]> methodMap)
Initialize the specified
"methodMap", if any. |
protected boolean |
isMatch(String methodName,
String mappedName)
Return if the given method name matches the mapped name.
|
void |
setBeanClassLoader(ClassLoader beanClassLoader) |
void |
setMethodMap(Map<String,String[]> methodMap)
Set a name/attribute map, consisting of "FQCN.method" method names (e.g.
|
public void setMethodMap(Map<String,String[]> methodMap)
Intended for configuration via setter injection, typically within a Spring bean factory. Relies on
afterPropertiesSet() being called afterwards.
methodMap - said Map from method name to attribute valuepublic void setBeanClassLoader(ClassLoader beanClassLoader)
setBeanClassLoader in interface org.springframework.beans.factory.BeanClassLoaderAwarepublic void afterPropertiesSet()
"methodMap", if any.afterPropertiesSet in interface org.springframework.beans.factory.InitializingBeaninitMethodMap(java.util.Map)protected void initMethodMap(Map<String,String[]> methodMap)
"methodMap", if any.methodMap - Map from method names to String[] instancessetMethodMap(java.util.Map<java.lang.String, java.lang.String[]>)public void addGesichertMethod(String name, String[] attr)
Method names can end or start with "*" for matching multiple methods.
name - class and method name, separated by a dotattr - attribute associated with the methodIllegalArgumentException - in case of an invalid namepublic void addGesichertMethod(Class<?> clazz, String mappedName, String[] attr)
clazz - target interface or classmappedName - mapped method nameattr - attribute associated with the methodpublic void addGesichertMethod(Method method, String[] attr)
method - the methodattr - attribute associated with the methodprotected boolean isMatch(String methodName, String mappedName)
The default implementation checks for "xxx*", "*xxx" and "*xxx*" matches, as well as direct equality.
methodName - the method name of the classmappedName - the name in the descriptorPatternMatchUtils.simpleMatch(String, String)public String[] getBenoetigeRechte(Method method, Class<?> targetClass)
getBenoetigeRechte in interface SicherheitAttributeSourceCopyright © 2022. All rights reserved.