15.17 UserAttributesインタフェース

説明
ユーザ認証後,Subjectに関連づけられた属性を取得するためのインタフェースです。
UserAttributesインタフェースのパッケージ名は,com.cosminexus.admin.authです。
形式

interface UserAttributes
{
 public Object getAttribute(String alias)
   throws IllegalStateException;
 public Enumeration getAttributes(String alias)
   throws IllegalStateException;
 public void addAttribute(String alias,
                          Object attr)
   throws IllegalStateException;
 public Enumeration getAttributeNames()
   throws IllegalStateException;
 public void removeAttribute(String alias)
   throws IllegalStateException;
 public int size()
   throws IllegalStateException;
 public Enumeration getAliases()
   throws IllegalStateException;
}

メソッド一覧
メソッド名機能
addAttributeメソッドSubjectに属性を追加します。
getAttributeメソッドSubjectに関連づけられた属性を取得します。
getAttributeNamesメソッドSubjectに関連づけられた属性名の一覧を取得します。
getAttributesメソッドSubjectに関連づけられた属性をすべて取得します。
removeAttributeメソッドSubjectに関連づけられた属性を削除します。
sizeメソッドSubjectに関連づけられた属性の総数を取得します。
getAliasesメソッド推奨されていません。getAttributeNamesメソッドを使用してください。
 
注意事項
このオブジェクトが無効な場合に,各メソッドの呼び出しでjava.lang.IllegalStateException例外が発生します。この例外は,java.lang.RuntimeException例外を継承しているため,catchおよびthrowsに記述しなくてもコンパイルできるので注意してください。
<この節の構成>
addAttributeメソッド
getAttributeメソッド
getAttributeNamesメソッド
getAttributesメソッド
removeAttributeメソッド
sizeメソッド