cx.ath.kgslab.wiki
インタフェース PageManager

既知の実装クラスの一覧:
AbstractPageManager

public interface PageManager

ページ管理クラスのインタフェース.

導入されたバージョン:
JaJaWiki 4.0
バージョン:
1.0
作成者:
長澤貴博

メソッドの概要
 void addPageChangeListener(PageChangeListener listener)
          DOCUMENT ME!
 void attachFile(java.lang.String page, java.lang.String fileName, org.apache.struts.upload.FormFile uploadFile, boolean overwrite)
          ページにファイルを添付する
 void backupPages()
          ページバックアップ
 void backupPages(java.io.File path)
          ページバックアップ
 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)
          指定のページのパスワードをチェックする。
 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 name)
          ページの有無確認
 boolean existsPage(java.lang.String path, java.lang.String name)
          ページの有無確認
 cx.ath.kgslab.wiki.struts.form.AttachFile[] getAttachFiles(java.lang.String page)
          ページに添付されたファイルの情報を取得する
 JaJaWikiConfig getConfig()
          JaJaWiki設定情報
 java.util.List getModifiedPageList(int count)
          最近更新されたページのリストを取得する。
 cx.ath.kgslab.wiki.pages.Page getPage(java.lang.String name)
          ページ取得
 java.util.List getPageList()
          全ページのリストを取得する。
 void putPage(cx.ath.kgslab.wiki.pages.Page page)
          ページ追加/更新
 void putPage(cx.ath.kgslab.wiki.pages.Page page, boolean modified)
          ページ追加/更新
 void removeFile(java.lang.String page)
          ページに添付されたファイルを全て削除する
 void removeFile(java.lang.String page, java.lang.String[] files)
          ページに添付されたファイルを削除する
 void renamePage(java.lang.String srcName, java.lang.String dstName)
          ページ名変更
 void setConfig(JaJaWikiConfig config)
          JaJaWiki設定情報
 boolean useMasterPassword()
          マスターパスワードが設定されているか
 

メソッドの詳細

existsPage

public boolean existsPage(java.lang.String name)
                   throws cx.ath.kgslab.wiki.exception.PageReadException
ページの有無確認

パラメータ:
name - 対象ページ名
戻り値:
true:該当ページあり false:該当ページなし
例外:
cx.ath.kgslab.wiki.exception.PageReadException

existsPage

public boolean existsPage(java.lang.String path,
                          java.lang.String name)
                   throws cx.ath.kgslab.wiki.exception.PageReadException
ページの有無確認

パラメータ:
path - ページパス
name - 対象ページ名
戻り値:
true:該当ページあり false:該当ページなし
例外:
cx.ath.kgslab.wiki.exception.PageReadException

backupPages

public void backupPages()
                 throws cx.ath.kgslab.wiki.exception.PageReadException,
                        cx.ath.kgslab.wiki.exception.PageWriteException
ページバックアップ

例外:
cx.ath.kgslab.wiki.exception.PageReadException
cx.ath.kgslab.wiki.exception.PageWriteException

backupPages

public void backupPages(java.io.File path)
                 throws cx.ath.kgslab.wiki.exception.PageReadException,
                        cx.ath.kgslab.wiki.exception.PageWriteException
ページバックアップ

パラメータ:
path - バックアップファイルの出力先
例外:
cx.ath.kgslab.wiki.exception.PageReadException
cx.ath.kgslab.wiki.exception.PageWriteException

getModifiedPageList

public java.util.List getModifiedPageList(int count)
                                   throws cx.ath.kgslab.wiki.exception.PageReadException
最近更新されたページのリストを取得する。

パラメータ:
count - 件数
戻り値:
更新ページのリスト
例外:
cx.ath.kgslab.wiki.exception.PageReadException

getPageList

public java.util.List getPageList()
                           throws cx.ath.kgslab.wiki.exception.PageReadException
全ページのリストを取得する。

戻り値:
全ページのリスト
例外:
cx.ath.kgslab.wiki.exception.PageReadException

getPage

public cx.ath.kgslab.wiki.pages.Page getPage(java.lang.String name)
                                      throws cx.ath.kgslab.wiki.exception.PageReadException
ページ取得

パラメータ:
name - ページ名
戻り値:
ページ名に割り当てられたページ情報
例外:
cx.ath.kgslab.wiki.exception.PageReadException
関連項目:
Map.get(java.lang.Object)

putPage

public void putPage(cx.ath.kgslab.wiki.pages.Page page)
             throws cx.ath.kgslab.wiki.exception.PageWriteException
ページ追加/更新

パラメータ:
page - ページ情報
例外:
cx.ath.kgslab.wiki.exception.PageWriteException
関連項目:
Map.put(java.lang.Object, java.lang.Object)

putPage

public void putPage(cx.ath.kgslab.wiki.pages.Page page,
                    boolean modified)
             throws cx.ath.kgslab.wiki.exception.PageWriteException
ページ追加/更新

パラメータ:
page - ページ情報
modified - ページ内容に更新を行ったかを示すフラグ
例外:
cx.ath.kgslab.wiki.exception.PageWriteException
関連項目:
Map.put(java.lang.Object, java.lang.Object)

deletePage

public void deletePage(java.lang.String name)
                throws cx.ath.kgslab.wiki.exception.PageWriteException
ページ削除

パラメータ:
name - ページ名
例外:
cx.ath.kgslab.wiki.exception.PageWriteException

deletePage

public void deletePage(cx.ath.kgslab.wiki.pages.Page page)
                throws cx.ath.kgslab.wiki.exception.PageWriteException
ページ削除

パラメータ:
page - ページ
例外:
cx.ath.kgslab.wiki.exception.PageWriteException

renamePage

public 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
ページ名変更

パラメータ:
srcName - 変更前ページ名
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

attachFile

public 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
ページにファイルを添付する

パラメータ:
page - ページ
fileName - ファイル名
uploadFile - ファイルの内容
overwrite - オーバライドフラグ
例外:
cx.ath.kgslab.wiki.exception.AttachFileOutputException

removeFile

public void removeFile(java.lang.String page,
                       java.lang.String[] files)
                throws cx.ath.kgslab.wiki.exception.AttachFileOutputException
ページに添付されたファイルを削除する

パラメータ:
page - ページ
files - ファイル名
例外:
cx.ath.kgslab.wiki.exception.AttachFileOutputException

getAttachFiles

public cx.ath.kgslab.wiki.struts.form.AttachFile[] getAttachFiles(java.lang.String page)
                                                           throws cx.ath.kgslab.wiki.exception.AttachFileOutputException
ページに添付されたファイルの情報を取得する

パラメータ:
page - ページ
戻り値:
添付ファイル情報の配列
例外:
cx.ath.kgslab.wiki.exception.AttachFileOutputException

removeFile

public void removeFile(java.lang.String page)
                throws cx.ath.kgslab.wiki.exception.AttachFileOutputException
ページに添付されたファイルを全て削除する

パラメータ:
page - ページ
例外:
cx.ath.kgslab.wiki.exception.AttachFileOutputException

useMasterPassword

public boolean useMasterPassword()
マスターパスワードが設定されているか

戻り値:

checkPassword

public boolean checkPassword(java.lang.String page,
                             java.lang.String password)
                      throws cx.ath.kgslab.wiki.exception.PageReadException
指定のページのパスワードをチェックする。

パラメータ:
page -
password -
戻り値:
true:パスワードOK
例外:
cx.ath.kgslab.wiki.exception.PageReadException

checkPassword

public boolean checkPassword(cx.ath.kgslab.wiki.pages.Page page,
                             java.lang.String password)
指定のページのパスワードをチェックする。

パラメータ:
page -
password -
戻り値:
true:パスワードOK

checkLockPassword

public boolean checkLockPassword(cx.ath.kgslab.wiki.pages.Page page,
                                 java.lang.String password)
指定のページのパスワードをチェックする。

パラメータ:
page -
password -
戻り値:
true:パスワードOK

encode

public java.lang.StringBuffer encode(java.lang.String text,
                                     java.lang.StringBuffer buf)
                              throws java.io.UnsupportedEncodingException
ページ名をURLEncodeし、%を取り除くことで、 ASCII範囲内のファイル名を生成する。

パラメータ:
text - エンコード対象文字列
buf - 格納先StringBuffer
戻り値:
格納先StringBuffer
例外:
java.io.UnsupportedEncodingException

encodePath

public java.lang.StringBuffer encodePath(java.lang.String path,
                                         java.lang.StringBuffer buf)
                                  throws java.io.UnsupportedEncodingException
PathをURLEncodeし、%を取り除くことで、 ASCII範囲内のファイル名を生成する。

パラメータ:
path - エンコード対象文字列
buf - 格納先StringBuffer
戻り値:
格納先StringBuffer
例外:
java.io.UnsupportedEncodingException

encode

public java.lang.String encode(java.lang.String text)
                        throws java.io.UnsupportedEncodingException
ページ名をURLEncodeし、%を取り除くことで、 ASCII範囲内のファイル名を生成する。

パラメータ:
text - エンコード対象文字列
戻り値:
結果文字列
例外:
java.io.UnsupportedEncodingException

encodePath

public java.lang.String encodePath(java.lang.String path)
                            throws java.io.UnsupportedEncodingException
PathをURLEncodeし、%を取り除くことで、 ASCII範囲内のファイル名を生成する。

パラメータ:
path - エンコード対象文字列
戻り値:
結果文字列
例外:
java.io.UnsupportedEncodingException

encodePath

public java.lang.String encodePath(java.lang.String path,
                                   java.lang.String page)
                            throws java.io.UnsupportedEncodingException
PathをURLEncodeし、%を取り除くことで、 ASCII範囲内のファイル名を生成する。

パラメータ:
path - ページパス
page - ページ名
戻り値:
結果文字列
例外:
java.io.UnsupportedEncodingException

getConfig

public JaJaWikiConfig getConfig()
JaJaWiki設定情報

戻り値:
JaJaWiki設定情報

setConfig

public void setConfig(JaJaWikiConfig config)
JaJaWiki設定情報

パラメータ:
config - JaJaWiki設定情報

addPageChangeListener

public void addPageChangeListener(PageChangeListener listener)
DOCUMENT ME!

パラメータ:
listener - DOCUMENT ME!