クラス AbstractFallbackMethodSecurityMetadataSource
- java.lang.Object
-
- org.springframework.security.access.method.AbstractMethodSecurityMetadataSource
-
- org.springframework.security.access.method.AbstractFallbackMethodSecurityMetadataSource
- 実装されたすべてのインターフェース:
org.springframework.aop.framework.AopInfrastructureBean
、MethodSecurityMetadataSource
、SecurityMetadataSource
- 既知の直属サブクラス
Jsr250MethodSecurityMetadataSource
、MapBasedMethodSecurityMetadataSource
、SecuredAnnotationSecurityMetadataSource
public abstract class AbstractFallbackMethodSecurityMetadataSource extends AbstractMethodSecurityMetadataSource
Spring AOP と AspectJ の両方をサポートし、以下から属性解決を実行するMethodSecurityMetadataSource
の抽象実装。1。特定のターゲットメソッド。2. ターゲットクラス。3. メソッドの宣言。4. クラス / インターフェースを宣言します。キャッシュサポートのためにDelegatingMethodSecurityMetadataSource
とともに使用します。このクラスは、Spring の AbstractFallbackTransactionAttributeSource クラスの動作を模倣しています。
このクラスは、そのメタデータがターゲットメソッド / クラス(つまり、上記の #1 および #2)を介して表現され、ターゲットメソッド / クラスが別のプロキシオブジェクトにカプセル化されているセキュリティメタデータを抽出できないことに注意してください。Spring Security は、プロキシチェーンをウォークして、具体的 / 最終的なターゲットオブジェクトを検索しません。Spring Security を最終アドバイザーにすることを検討してください(別のプロキシではなく、最終ターゲットにアドバイスします)。メタデータを宣言されたメソッドまたはプロキシが実装するインターフェースに移動するか、独自の代替 MethodSecurityMetadataSource を提供します。
- 導入:
- 2.0
フィールドサマリー
クラス org.springframework.security.access.method.AbstractMethodSecurityMetadataSource から継承されたフィールド
logger
コンストラクターのサマリー
コンストラクター コンストラクター 説明 AbstractFallbackMethodSecurityMetadataSource()
メソッドのサマリー
すべてのメソッド インスタンスメソッド 抽象メソッド 具象メソッド 修飾子と型 メソッド 説明 protected abstract java.util.Collection<ConfigAttribute>
findAttributes(java.lang.Class<?> clazz)
指定されたクラスに対して登録されたセキュリティメタデータを取得します。protected abstract java.util.Collection<ConfigAttribute>
findAttributes(java.lang.reflect.Method method, java.lang.Class<?> targetClass)
指定されたメソッド呼び出しに適用可能なセキュリティメタデータを取得します。java.util.Collection<ConfigAttribute>
getAttributes(java.lang.reflect.Method method, java.lang.Class<?> targetClass)
クラス org.springframework.security.access.method.AbstractMethodSecurityMetadataSource から継承されたメソッド
getAttributes, supports
クラス java.lang.Object から継承されたメソッド
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
インターフェース org.springframework.security.access.SecurityMetadataSource から継承されたメソッド
getAllConfigAttributes
メソッドの詳細
getAttributes
public java.util.Collection<ConfigAttribute> getAttributes(java.lang.reflect.Method method, java.lang.Class<?> targetClass)
findAttributes
protected abstract java.util.Collection<ConfigAttribute> findAttributes(java.lang.reflect.Method method, java.lang.Class<?> targetClass)
指定されたメソッド呼び出しに適用可能なセキュリティメタデータを取得します。Method.getDeclaringClass()
はtargetClass
と等しくない場合があることに注意してください。両方のパラメーターは、ターゲットクラスがメソッドを宣言していない場合でも、メソッドに対して「登録」されているメソッドメタデータに関連する高度な機能を提供したいサブクラスを支援するために提供されています(つまり、サブクラスはメソッドのみを継承できます)。- パラメーター:
method
- 現在の呼び出しのメソッド (非null
)targetClass
- 呼び出しのターゲットクラス (null
の場合があります)- 戻り値:
- セキュリティメタデータ (メタデータが適用されない場合は null)
findAttributes
protected abstract java.util.Collection<ConfigAttribute> findAttributes(java.lang.Class<?> clazz)
指定されたクラスに対して登録されたセキュリティメタデータを取得します。サブクラスは、クラスレベルで表現されたメタデータのみを返す必要があります。抽象スーパークラスは、必要に応じて個々のメソッドの
findAttributes(Method, Class)
を個別に呼び出すため、サブクラスは、クラスに対して登録された各メソッドのメタデータを集約しないでください。- パラメーター:
clazz
- 呼び出しのターゲットクラス (非null
)- 戻り値:
- セキュリティメタデータ (メタデータが適用されない場合は null)