クラス MapBasedMethodSecurityMetadataSource

実装されたすべてのインターフェース:
org.springframework.aop.framework.AopInfrastructureBeanorg.springframework.beans.factory.Awareorg.springframework.beans.factory.BeanClassLoaderAwareMethodSecurityMetadataSourceSecurityMetadataSource

@DeprecatedSE public class MapBasedMethodSecurityMetadataSource extends AbstractFallbackMethodSecurityMetadataSource implements org.springframework.beans.factory.BeanClassLoaderAware
使用すべきではありません。
代わりに <method-security> および <intercept-methods> に use-authorization-manager 属性を使用するか、アノテーションベースまたは AuthorizationManager ベースの認可を使用します。
メソッドまたはクラスシグネチャーの ConfigAttribute のリストを格納します。

このクラスは、メソッドセキュリティメタデータの XML ベースの定義のための MethodSecurityMetadataSource の推奨実装です。XML ベースの定義を支援するために、ワイルドカードのサポートが提供されています。

導入:
2.0
  • フィールドの詳細

    • methodMap

      protected final MapSE<org.springframework.security.access.method.MapBasedMethodSecurityMetadataSource.RegisteredMethod,ListSE<ConfigAttribute>> methodMap
      使用すべきではありません。
      RegisteredMethod から ConfigAttribute リストへのマップ
  • コンストラクターの詳細

    • MapBasedMethodSecurityMetadataSource

      public MapBasedMethodSecurityMetadataSource()
      使用すべきではありません。
    • MapBasedMethodSecurityMetadataSource

      public MapBasedMethodSecurityMetadataSource(MapSE<StringSE,ListSE<ConfigAttribute>> methodMap)
      使用すべきではありません。
      MapBasedMethodSecurityMetadataSource
      パラメーター:
      methodMap - メソッド名の ConfigAttribute へのマップ。
  • メソッドの詳細

    • findAttributes

      protected CollectionSE<ConfigAttribute> findAttributes(ClassSE<?> clazz)
      使用すべきではありません。
      実装はクラスレベルの属性をサポートしていません。
      次で指定:
      クラス AbstractFallbackMethodSecurityMetadataSourcefindAttributes 
      パラメーター:
      clazz - 呼び出しのターゲットクラス (非 null)
      戻り値:
      セキュリティメタデータ (メタデータが適用されない場合は null)
    • findAttributes

      protected CollectionSE<ConfigAttribute> findAttributes(MethodSE method, ClassSE<?> targetClass)
      使用すべきではありません。
      メソッド継承ツリーをたどって、適用可能な最も具体的な宣言を見つけます。
      次で指定:
      クラス AbstractFallbackMethodSecurityMetadataSourcefindAttributes 
      パラメーター:
      method - 現在の呼び出しのメソッド (非 null)
      targetClass - 呼び出しのターゲットクラス (null の場合があります)
      戻り値:
      セキュリティメタデータ (メタデータが適用されない場合は null)
    • addSecureMethod

      public void addSecureMethod(ClassSE<?> javaType, StringSE mappedName, ListSE<ConfigAttribute> attr)
      使用すべきではありません。
      安全なメソッドの構成属性を追加します。マップされたメソッド名は、複数のメソッドに一致させるために、* で終了または開始できます。
      パラメーター:
      javaType - セキュリティ構成属性が適用されるターゲットインターフェースまたはクラス
      mappedName - javaType が宣言または継承したマップされたメソッド名
      attr - メソッドに関連する必要な権限
    • addSecureMethod

      public void addSecureMethod(ClassSE<?> javaType, MethodSE method, ListSE<ConfigAttribute> attr)
      使用すべきではありません。
      たとえば、ポイントカット式を使用してメソッドが一致した場合など、特定のメソッドの構成属性を追加します。メソッドのマップに一致がすでに存在する場合、既存の一致が保持されるため、このメソッドがより一般的なポイントカットに対して呼び出された場合、すでに追加されているより具体的なポイントカットはオーバーライドされません。

      このメソッドは、BeanFactory の初期化中にのみ呼び出す必要があります。

    • getAllConfigAttributes

      public CollectionSE<ConfigAttribute> getAllConfigAttributes()
      使用すべきではありません。
      この Bean に対して明示的に定義された構成属性を取得します。
      次で指定:
      インターフェース SecurityMetadataSourcegetAllConfigAttributes 
      戻り値:
      この Bean に対して明示的に定義された属性
    • setBeanClassLoader

      public void setBeanClassLoader(ClassLoaderSE beanClassLoader)
      使用すべきではありません。
      次で指定:
      インターフェース org.springframework.beans.factory.BeanClassLoaderAwaresetBeanClassLoader 
    • getMethodMapSize

      public int getMethodMapSize()
      使用すべきではありません。
      戻り値:
      地図サイズ (単体テストと診断用)