Class MethodMapSicherheitAttributeSource

java.lang.Object
de.bund.bva.isyfact.serviceapi.core.serviceimpl.MethodMapSicherheitAttributeSource
All Implemented Interfaces:
SicherheitAttributeSource, org.springframework.beans.factory.Aware, org.springframework.beans.factory.BeanClassLoaderAware, org.springframework.beans.factory.InitializingBean

@Deprecated public class MethodMapSicherheitAttributeSource extends Object implements SicherheitAttributeSource, org.springframework.beans.factory.BeanClassLoaderAware, org.springframework.beans.factory.InitializingBean
Deprecated.
This module is deprecated and will be removed in a future release. It is recommended to use REST according to IsyFacts REST Concept instead.
Stellt die benötigten Rechte pro Methode in einer Map bereit.

Diese Klasse ist als Kopie der Spring MethodMapTransactionAttributeSource entstanden.

  • Constructor Details

    • MethodMapSicherheitAttributeSource

      public MethodMapSicherheitAttributeSource()
      Deprecated.
  • Method Details

    • setMethodMap

      public void setMethodMap(Map<String,String[]> methodMap)
      Deprecated.
      Set a name/attribute map, consisting of "FQCN.method" method names (e.g. "com.mycompany.mycode.MyClass.myMethod") and String[] instances.

      Intended for configuration via setter injection, typically within a Spring bean factory. Relies on afterPropertiesSet() being called afterwards.

      Parameters:
      methodMap - said Map from method name to attribute value
    • setBeanClassLoader

      public void setBeanClassLoader(ClassLoader beanClassLoader)
      Deprecated.
      Specified by:
      setBeanClassLoader in interface org.springframework.beans.factory.BeanClassLoaderAware
    • afterPropertiesSet

      public void afterPropertiesSet()
      Deprecated.
      Eagerly initializes the specified "methodMap", if any.
      Specified by:
      afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean
      See Also:
    • initMethodMap

      protected void initMethodMap(Map<String,String[]> methodMap)
      Deprecated.
      Initialize the specified "methodMap", if any.
      Parameters:
      methodMap - Map from method names to String[] instances
      See Also:
    • addGesichertMethod

      public void addGesichertMethod(String name, String[] attr)
      Deprecated.
      Add an attribute for a "gesichert" method.

      Method names can end or start with "*" for matching multiple methods.

      Parameters:
      name - class and method name, separated by a dot
      attr - attribute associated with the method
      Throws:
      IllegalArgumentException - in case of an invalid name
    • addGesichertMethod

      public void addGesichertMethod(Class<?> clazz, String mappedName, String[] attr)
      Deprecated.
      Add an attribute for a "gesichert" method. Method names can end or start with "*" for matching multiple methods.
      Parameters:
      clazz - target interface or class
      mappedName - mapped method name
      attr - attribute associated with the method
    • addGesichertMethod

      public void addGesichertMethod(Method method, String[] attr)
      Deprecated.
      Add an attribute for a "gesichert" method.
      Parameters:
      method - the method
      attr - attribute associated with the method
    • isMatch

      protected boolean isMatch(String methodName, String mappedName)
      Deprecated.
      Return if the given method name matches the mapped name.

      The default implementation checks for "xxx*", "*xxx" and "*xxx*" matches, as well as direct equality.

      Parameters:
      methodName - the method name of the class
      mappedName - the name in the descriptor
      Returns:
      if the names match
      See Also:
      • PatternMatchUtils.simpleMatch(String, String)
    • getBenoetigeRechte

      public String[] getBenoetigeRechte(Method method, Class<?> targetClass)
      Deprecated.
      Specified by:
      getBenoetigeRechte in interface SicherheitAttributeSource