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