|
|||||||||||
前のクラス 次のクラス | フレームあり フレームなし | ||||||||||
概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド |
Velocityと連携して動的にメールデータを生成し、そのデータからMailインスタンスを生成するインターフェース。
XMLVelocityMailBuilderImpl
,
JDomXMLMailBuilder
メソッドの概要 | |
Mail |
buildMail(File file,
org.apache.velocity.VelocityContext context)
指定されたファイルを読み込んでMailインスタンスを生成します。 |
Mail |
buildMail(String classPath,
org.apache.velocity.VelocityContext context)
指定されたクラスパス上のファイルを読み込んでMailインスタンスを生成します。 |
void |
clearCache()
メールデータキャッシュをクリアします。 |
boolean |
isCacheEnabled()
VelocityContextとマージする前のメールデータをキャッシュする設定かどうか判定します。 |
void |
setCacheEnabled(boolean cacheEnabled)
VelocityContextとマージする前のメールデータをキャッシュするかどうかを設定します。 |
インタフェース com.ozacc.mail.MailBuilder から継承したメソッド |
buildMail, buildMail |
メソッドの詳細 |
public Mail buildMail(String classPath, org.apache.velocity.VelocityContext context) throws MailBuildException
classPath
- メール内容を記述したファイルのパスcontext
- VelocityContext
MailBuildException
- Mailインスタンスの生成に失敗した場合public Mail buildMail(File file, org.apache.velocity.VelocityContext context) throws MailBuildException
file
- メール内容を記述したファイルcontext
- VelocityContext
MailBuildException
- Mailインスタンスの生成に失敗した場合public void clearCache()
public void setCacheEnabled(boolean cacheEnabled)
キャッシュのキーは、buildMail()
メソッド引数のメールデータファイルのクラスパス或いはファイルパスです。
キャッシュに有効期限はありません。
また、メールデータファイルの内容が途中で更新されても、キャッシュされているメールデータは更新されませんので注意してください。
false
を指定してこのメソッドを呼ぶとメールデータキャッシュはクリアされます。
cacheEnabled
- メールデータをキャッシュする場合は truepublic boolean isCacheEnabled()
|
|||||||||||
前のクラス 次のクラス | フレームあり フレームなし | ||||||||||
概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド |