クラス ScriptingAccountNotificationListenerDefinition
java.lang.Object
org.iplass.mtp.auth.policy.definition.AccountNotificationListenerDefinition
org.iplass.mtp.auth.policy.definition.listeners.ScriptingAccountNotificationListenerDefinition
- すべての実装されたインタフェース:
java.io.Serializable
public class ScriptingAccountNotificationListenerDefinition extends AccountNotificationListenerDefinition
GroovyScriptによるAccountNotificationListener定義。
Script記述の方式として2パターンある。
- Javaクラス指定時と同様に、
AccountNotificationListener
をimplementsしたクラスを記述。 - Script形式で記述。
public static final String NOTIFICATION_BINDING_NAME = "notification";
Script形式での記述の場合、notificationの変数名でAccountNotification
のインスタンスが
あらかじめバインドされている。
また、listenNotificationにてあらかじめ指定されている通知のみScriptが呼び出される。
Script形式での記述例:
if (notification.type == NotificationType.CREATED) {
println "create user:" + notification.userOid;
:
:
}
- 関連項目:
- 直列化された形式
-
コンストラクタの概要
コンストラクタ コンストラクタ 説明 ScriptingAccountNotificationListenerDefinition()
-
メソッドの概要
修飾子とタイプ メソッド 説明 java.util.List<NotificationType>
getListenNotification()
通知を受け取るNotificationType。java.lang.String
getScript()
GroovyScriptのコード。void
setListenNotification(java.util.List<NotificationType> listenNotification)
void
setScript(java.lang.String script)
seegetScript()
-
コンストラクタの詳細
-
ScriptingAccountNotificationListenerDefinition
public ScriptingAccountNotificationListenerDefinition()
-
-
メソッドの詳細
-
getScript
public java.lang.String getScript()GroovyScriptのコード。- 戻り値:
-
setScript
public void setScript(java.lang.String script)seegetScript()
- パラメータ:
script
-
-
getListenNotification
通知を受け取るNotificationType。 ここで指定された通知のみScriptのロジックが呼び出される。- 戻り値:
-
setListenNotification
- パラメータ:
listenNotification
-
-