|
|||||||||||
| 前のクラス 次のクラス | フレームあり フレームなし | ||||||||||
| 概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド | ||||||||||
java.lang.Objectcx.ath.kgslab.wiki.AbstractPageManager
ページ管理クラス.
ページの読み書き、キャッシュ、ロックを統一的に扱うクラスの、 スーパークラス。
ロック、キャッシュはデフォルト実装を、 このクラスに持つ。
ページの読み書きは、ファイル、DBなど複数の対象を想定しているので、
ここでは実装せずサブクラスで実装する。
| フィールドの概要 | |
protected JaJaWikiConfig |
config
JaJaWiki設定情報 |
protected org.springframework.context.ApplicationContext |
context
アプリケーションコンテキスト |
| コンストラクタの概要 | |
AbstractPageManager()
|
|
| メソッドの概要 | |
void |
addPageChangeListener(PageChangeListener listener)
DOCUMENT ME! |
void |
afterPropertiesSet()
初期化処理 |
void |
attachFile(java.lang.String page,
java.lang.String fileName,
org.apache.struts.upload.FormFile uploadFile,
boolean overwrite)
ページにファイルを添付する |
void |
backupPages()
Wikiページをバックアップする。 |
boolean |
checkLockPassword(cx.ath.kgslab.wiki.pages.Page page,
java.lang.String password)
指定のページのパスワードをチェックする。 |
boolean |
checkPassword(cx.ath.kgslab.wiki.pages.Page page,
java.lang.String password)
指定のページのパスワードをチェックする。 |
boolean |
checkPassword(java.lang.String page,
java.lang.String password)
指定のページのパスワードをチェックする。 |
static java.lang.String |
concatPath(java.lang.String path,
java.lang.String name)
パスの結合 ページパスとページ名を結合する |
void |
deletePage(cx.ath.kgslab.wiki.pages.Page page)
ページ削除 |
void |
deletePage(java.lang.String name)
ページ削除 |
java.lang.String |
encode(java.lang.String text)
ページ名をURLEncodeし、%を取り除くことで、 ASCII範囲内のファイル名を生成する。 |
java.lang.StringBuffer |
encode(java.lang.String text,
java.lang.StringBuffer buf)
ページ名をURLEncodeし、%を取り除くことで、 ASCII範囲内のファイル名を生成する。 |
java.lang.String |
encodePath(java.lang.String path)
PathをURLEncodeし、%を取り除くことで、 ASCII範囲内のファイル名を生成する。 |
java.lang.String |
encodePath(java.lang.String path,
java.lang.String page)
PathをURLEncodeし、%を取り除くことで、 ASCII範囲内のファイル名を生成する。 |
java.lang.StringBuffer |
encodePath(java.lang.String path,
java.lang.StringBuffer buf)
PathをURLEncodeし、%を取り除くことで、 ASCII範囲内のファイル名を生成する。 |
boolean |
existsPage(java.lang.String path,
java.lang.String name)
ページの有無確認 |
protected void |
firePageChanged()
DOCUMENT ME! |
cx.ath.kgslab.wiki.struts.form.AttachFile[] |
getAttachFiles(java.lang.String page)
ページに添付されたファイルの情報を取得する |
net.sf.ehcache.CacheManager |
getCacheManager()
キャッシュマネージャの取得 |
JaJaWikiConfig |
getConfig()
JaJaWiki設定情報 |
protected java.lang.String |
getFullPath(cx.ath.kgslab.wiki.pages.Page page)
ページのフルパスの取得 ページパスとページ名を結合し、フルパスを生成する。 |
cx.ath.kgslab.wiki.pages.Page |
getPage(java.lang.String name)
ページ取得 |
void |
init()
初期化処理 |
static void |
parsePagePath(java.lang.String page,
cx.ath.kgslab.wiki.pages.Page info)
ページパスの解釈処理 ページのフルパスから、ページ名、ページパスを抽出する。 |
static java.lang.String |
parsePath(java.lang.String path,
java.lang.String thisPath)
ページパスの解釈処理 ページパス中の".." |
void |
putPage(cx.ath.kgslab.wiki.pages.Page page)
ページ追加/更新 |
void |
putPage(cx.ath.kgslab.wiki.pages.Page page,
boolean modified)
ページ追加/更新 |
protected abstract cx.ath.kgslab.wiki.pages.Page |
readPage(java.lang.String name)
ページ入力 |
void |
removeFile(java.lang.String page)
ページに添付されたファイルを全て削除する |
void |
removeFile(java.lang.String page,
java.lang.String[] files)
ページに添付されたファイルを削除する |
protected abstract void |
removePage(java.lang.String name)
ページ削除 |
void |
renamePage(java.lang.String srcName,
java.lang.String dstName)
ページ名変更 |
void |
setApplicationContext(org.springframework.context.ApplicationContext context)
アプリケーションコンテキストの設定 |
void |
setCacheManager(net.sf.ehcache.CacheManager manager)
キャッシュマネージャの設定 |
void |
setConfig(JaJaWikiConfig config)
JaJaWiki設定情報 |
boolean |
useMasterPassword()
マスターパスワードが設定されているか |
protected abstract void |
writePage(cx.ath.kgslab.wiki.pages.Page page)
ページ出力 |
| クラス java.lang.Object から継承したメソッド |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| インタフェース cx.ath.kgslab.wiki.PageManager から継承したメソッド |
backupPages, existsPage, getModifiedPageList, getPageList |
| フィールドの詳細 |
protected org.springframework.context.ApplicationContext context
protected JaJaWikiConfig config
| コンストラクタの詳細 |
public AbstractPageManager()
| メソッドの詳細 |
public void setApplicationContext(org.springframework.context.ApplicationContext context)
org.springframework.context.ApplicationContextAware 内の setApplicationContextcontext - アプリケーションコンテキスト
public final void afterPropertiesSet()
throws java.lang.Exception
org.springframework.beans.factory.InitializingBean 内の afterPropertiesSetjava.lang.ExceptionInitializingBean.afterPropertiesSet()
public void init()
throws java.lang.Exception
java.lang.Error
java.lang.Exception
protected abstract cx.ath.kgslab.wiki.pages.Page readPage(java.lang.String name)
throws cx.ath.kgslab.wiki.exception.PageReadException
name - 対象ページ名
cx.ath.kgslab.wiki.exception.PageReadException
protected abstract void writePage(cx.ath.kgslab.wiki.pages.Page page)
throws cx.ath.kgslab.wiki.exception.PageWriteException
page - ページ情報
cx.ath.kgslab.wiki.exception.PageWriteException
public final boolean existsPage(java.lang.String path,
java.lang.String name)
throws cx.ath.kgslab.wiki.exception.PageReadException
PageManager 内の existsPagepath - ページパスname - 対象ページ名
cx.ath.kgslab.wiki.exception.PageReadException
public final void backupPages()
throws cx.ath.kgslab.wiki.exception.PageReadException,
cx.ath.kgslab.wiki.exception.PageWriteException
PageManager 内の backupPagescx.ath.kgslab.wiki.exception.PageReadException
cx.ath.kgslab.wiki.exception.PageWriteExceptionPageManager.backupPages()
protected abstract void removePage(java.lang.String name)
throws cx.ath.kgslab.wiki.exception.PageWriteException
name - 対象ページ名
cx.ath.kgslab.wiki.exception.PageWriteException
public final cx.ath.kgslab.wiki.pages.Page getPage(java.lang.String name)
throws cx.ath.kgslab.wiki.exception.PageReadException
PageManager 内の getPagename - ページ名
cx.ath.kgslab.wiki.exception.PageReadExceptionMap.get(java.lang.Object)
public final void putPage(cx.ath.kgslab.wiki.pages.Page page)
throws cx.ath.kgslab.wiki.exception.PageWriteException
PageManager 内の putPagepage - ページ情報
cx.ath.kgslab.wiki.exception.PageWriteExceptionMap.put(java.lang.Object, java.lang.Object)
public final void putPage(cx.ath.kgslab.wiki.pages.Page page,
boolean modified)
throws cx.ath.kgslab.wiki.exception.PageWriteException
PageManager 内の putPagepage - ページ情報modified - ページ内容に更新を行ったかを示すフラグ
cx.ath.kgslab.wiki.exception.PageWriteExceptionMap.put(java.lang.Object, java.lang.Object)
public final void deletePage(java.lang.String name)
throws cx.ath.kgslab.wiki.exception.PageWriteException
PageManager 内の deletePagename - ページ名
cx.ath.kgslab.wiki.exception.PageWriteException
public final void deletePage(cx.ath.kgslab.wiki.pages.Page page)
throws cx.ath.kgslab.wiki.exception.PageWriteException
PageManager 内の deletePagepage - ページ
cx.ath.kgslab.wiki.exception.PageWriteException
public final void renamePage(java.lang.String srcName,
java.lang.String dstName)
throws cx.ath.kgslab.wiki.exception.PageReadException,
cx.ath.kgslab.wiki.exception.PageWriteException,
cx.ath.kgslab.wiki.exception.PageNotFoundException,
cx.ath.kgslab.wiki.exception.PageAlreadyExistsException,
cx.ath.kgslab.wiki.exception.PathNotFoundException
PageManager 内の renamePagesrcName - 変更前ページ名dstName - 変更後ページ名
cx.ath.kgslab.wiki.exception.PageReadException
cx.ath.kgslab.wiki.exception.PageWriteException
cx.ath.kgslab.wiki.exception.PageNotFoundException
cx.ath.kgslab.wiki.exception.PageAlreadyExistsException
cx.ath.kgslab.wiki.exception.PathNotFoundException
public final void attachFile(java.lang.String page,
java.lang.String fileName,
org.apache.struts.upload.FormFile uploadFile,
boolean overwrite)
throws cx.ath.kgslab.wiki.exception.AttachFileOutputException
PageManager 内の attachFilepage - ページfileName - ファイル名uploadFile - ファイルの内容overwrite - オーバライドフラグ
cx.ath.kgslab.wiki.exception.AttachFileOutputException
public void removeFile(java.lang.String page,
java.lang.String[] files)
throws cx.ath.kgslab.wiki.exception.AttachFileOutputException
PageManager 内の removeFilepage - ページfiles - ファイル名
cx.ath.kgslab.wiki.exception.AttachFileOutputException
public cx.ath.kgslab.wiki.struts.form.AttachFile[] getAttachFiles(java.lang.String page)
throws cx.ath.kgslab.wiki.exception.AttachFileOutputException
PageManager 内の getAttachFilespage - ページ
cx.ath.kgslab.wiki.exception.AttachFileOutputException
public void removeFile(java.lang.String page)
throws cx.ath.kgslab.wiki.exception.AttachFileOutputException
PageManager 内の removeFilepage - ページ
cx.ath.kgslab.wiki.exception.AttachFileOutputExceptionpublic final boolean useMasterPassword()
PageManager 内の useMasterPassword
public final boolean checkPassword(java.lang.String page,
java.lang.String password)
throws cx.ath.kgslab.wiki.exception.PageReadException
PageManager 内の checkPasswordpage - ページ名password - パスワード
cx.ath.kgslab.wiki.exception.PageReadException
public final boolean checkPassword(cx.ath.kgslab.wiki.pages.Page page,
java.lang.String password)
PageManager 内の checkPasswordpage - ページ情報password - パスワード
public final boolean checkLockPassword(cx.ath.kgslab.wiki.pages.Page page,
java.lang.String password)
PageManager 内の checkLockPasswordpage - ページ情報password - パスワード
public java.lang.StringBuffer encode(java.lang.String text,
java.lang.StringBuffer buf)
throws java.io.UnsupportedEncodingException
PageManager 内の encodetext - エンコード対象文字列buf - 格納先StringBuffer
java.io.UnsupportedEncodingException
public java.lang.StringBuffer encodePath(java.lang.String path,
java.lang.StringBuffer buf)
throws java.io.UnsupportedEncodingException
PageManager 内の encodePathpath - エンコード対象文字列buf - 格納先StringBuffer
java.io.UnsupportedEncodingException
public java.lang.String encode(java.lang.String text)
throws java.io.UnsupportedEncodingException
PageManager 内の encodetext - エンコード対象文字列
java.io.UnsupportedEncodingException
public java.lang.String encodePath(java.lang.String path)
throws java.io.UnsupportedEncodingException
PageManager 内の encodePathpath - エンコード対象文字列
java.io.UnsupportedEncodingException
public java.lang.String encodePath(java.lang.String path,
java.lang.String page)
throws java.io.UnsupportedEncodingException
PageManager 内の encodePathpath - ページパスpage - ページ名
java.io.UnsupportedEncodingException
public static java.lang.String concatPath(java.lang.String path,
java.lang.String name)
path - ページパスname - ページ名
protected java.lang.String getFullPath(cx.ath.kgslab.wiki.pages.Page page)
page - ページ情報
public static void parsePagePath(java.lang.String page,
cx.ath.kgslab.wiki.pages.Page info)
page - ページパスinfo - ページ情報
public static java.lang.String parsePath(java.lang.String path,
java.lang.String thisPath)
path - ページパスthisPath - 元ページパス
public JaJaWikiConfig getConfig()
PageManager 内の getConfigpublic void setConfig(JaJaWikiConfig config)
PageManager 内の setConfigconfig - JaJaWiki設定情報public net.sf.ehcache.CacheManager getCacheManager()
public void setCacheManager(net.sf.ehcache.CacheManager manager)
manager - キャッシュマネージャpublic void addPageChangeListener(PageChangeListener listener)
PageManager の記述:
PageManager 内の addPageChangeListenerlistener - DOCUMENT ME!protected void firePageChanged()
|
|||||||||||
| 前のクラス 次のクラス | フレームあり フレームなし | ||||||||||
| 概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド | ||||||||||