Package org.exoplatform.wiki.service
Interface DataStorage
-
- All Known Implementing Classes:
JPADataStorage
public interface DataStorage
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description voidaddAttachmentToPage(Attachment attachment, Page page)voidaddPageVersion(Page page)voidaddRelatedPage(Page page, Page relatedPage)voidaddWatcherToPage(String username, Page page)voidcreateDraftPageForUser(DraftPage draftPage, String username)voidcreateEmotionIcon(EmotionIcon emotionIcon)PagecreatePage(Wiki wiki, Page parentPage, Page page)voidcreateTemplatePage(Wiki wiki, Template template)WikicreateWiki(Wiki wiki)voiddeleteAttachmentOfPage(String attachmentId, Page page)voiddeleteDraftByName(String newDraftPageName, String username)voiddeleteDraftOfPage(Page page, String username)voiddeletePage(String wikiType, String wikiOwner, String pageId)voiddeleteTemplatePage(String wikiType, String wikiOwner, String templateName)voiddeleteWatcherOfPage(String username, Page page)List<Attachment>getAttachmentsOfPage(Page page)default List<Attachment>getAttachmentsOfPage(Page page, boolean loadContent)List<Page>getChildrenPageOf(Page page)DraftPagegetDraft(String draftName, String username)DraftPagegetDraft(WikiPageParams param, String username)DraftPagegetDraftPageById(String id)List<DraftPage>getDraftPagesOfUser(String username)EmotionIcongetEmotionIconByName(String name)List<EmotionIcon>getEmotionIcons()PagegetExsitedOrNewDraftPageById(String wikiType, String wikiOwner, String pageId, String username)PagegetHelpSyntaxPage(String syntaxId, boolean fullContent, List<org.exoplatform.container.xml.ValuesParam> syntaxHelpParams, org.exoplatform.container.configuration.ConfigurationManager configurationManager)DraftPagegetLastestDraft(String username)PagegetPageById(String id)Get a wiki page by its unique idPagegetPageOfWikiByName(String wikiType, String wikiOwner, String pageName)Get a wiki page by its unique name in the wikiList<Page>getPagesOfWiki(String wikiType, String wikiOwner)Retrieve the all pages contained in wikiPagegetParentPageOf(Page page)List<String>getPreviousNamesOfPage(Page page)PagegetRelatedPage(String wikiType, String wikiOwner, String pageId)List<Page>getRelatedPagesOfPage(Page page)TemplategetTemplatePage(WikiPageParams params, String templateId)Map<String,Template>getTemplates(WikiPageParams params)List<PageVersion>getVersionsOfPage(Page page)List<String>getWatchersOfPage(Page page)WikigetWikiByTypeAndOwner(String wikiType, String owner)List<PermissionEntry>getWikiPermission(String wikiType, String wikiOwner)List<Wiki>getWikisByType(String wikiType)booleanhasAdminPagePermission(String wikiType, String owner, org.exoplatform.services.security.Identity user)booleanhasAdminSpacePermission(String wikiType, String owner, org.exoplatform.services.security.Identity user)booleanhasPermissionOnPage(Page page, PermissionType permissionType, org.exoplatform.services.security.Identity user)Check if the identity has the given permission type on a pagebooleanhasPermissionOnWiki(Wiki wiki, PermissionType permissionType, org.exoplatform.services.security.Identity identity)Check if the identity has the given permission type on a wikivoidmovePage(WikiPageParams currentLocationParams, WikiPageParams newLocationParams)voidremoveRelatedPage(Page page, Page relatedPage)voidrenamePage(String wikiType, String wikiOwner, String pageName, String newName, String newTitle)voidrestoreVersionOfPage(String versionName, Page page)org.exoplatform.commons.utils.PageList<SearchResult>search(WikiSearchData data)List<TemplateSearchResult>searchTemplate(TemplateSearchData data)voidupdatePage(Page page)voidupdateTemplatePage(Template template)voidupdateWikiPermission(String wikiType, String wikiOwner, List<PermissionEntry> permissionEntries)
-
-
-
Method Detail
-
getWikiByTypeAndOwner
Wiki getWikiByTypeAndOwner(String wikiType, String owner) throws WikiException
- Throws:
WikiException
-
getWikisByType
List<Wiki> getWikisByType(String wikiType) throws WikiException
- Throws:
WikiException
-
createWiki
Wiki createWiki(Wiki wiki) throws WikiException
- Throws:
WikiException
-
createPage
Page createPage(Wiki wiki, Page parentPage, Page page) throws WikiException
- Throws:
WikiException
-
getPageOfWikiByName
Page getPageOfWikiByName(String wikiType, String wikiOwner, String pageName) throws WikiException
Get a wiki page by its unique name in the wiki- Parameters:
wikiType- The wiki typewikiOwner- The wiki ownerpageName- The unique name of the page in the wiki- Returns:
- The wiki page
- Throws:
WikiException- if an error occured
-
getPageById
Page getPageById(String id) throws WikiException
Get a wiki page by its unique id- Parameters:
id- The unique id of wiki page- Returns:
- The wiki page
- Throws:
WikiException- if an error occured
-
getDraftPageById
DraftPage getDraftPageById(String id) throws WikiException
- Throws:
WikiException
-
getParentPageOf
Page getParentPageOf(Page page) throws WikiException
- Throws:
WikiException
-
getChildrenPageOf
List<Page> getChildrenPageOf(Page page) throws WikiException
- Throws:
WikiException
-
createTemplatePage
void createTemplatePage(Wiki wiki, Template template) throws WikiException
- Throws:
WikiException
-
updateTemplatePage
void updateTemplatePage(Template template) throws WikiException
- Throws:
WikiException
-
deleteTemplatePage
void deleteTemplatePage(String wikiType, String wikiOwner, String templateName) throws WikiException
- Throws:
WikiException
-
deletePage
void deletePage(String wikiType, String wikiOwner, String pageId) throws WikiException
- Throws:
WikiException
-
getTemplatePage
Template getTemplatePage(WikiPageParams params, String templateId) throws WikiException
- Throws:
WikiException
-
getTemplates
Map<String,Template> getTemplates(WikiPageParams params) throws WikiException
- Throws:
WikiException
-
deleteDraftOfPage
void deleteDraftOfPage(Page page, String username) throws WikiException
- Throws:
WikiException
-
deleteDraftByName
void deleteDraftByName(String newDraftPageName, String username) throws WikiException
- Throws:
WikiException
-
renamePage
void renamePage(String wikiType, String wikiOwner, String pageName, String newName, String newTitle) throws WikiException
- Throws:
WikiException
-
movePage
void movePage(WikiPageParams currentLocationParams, WikiPageParams newLocationParams) throws WikiException
- Throws:
WikiException
-
getWikiPermission
List<PermissionEntry> getWikiPermission(String wikiType, String wikiOwner) throws WikiException
- Throws:
WikiException
-
updateWikiPermission
void updateWikiPermission(String wikiType, String wikiOwner, List<PermissionEntry> permissionEntries) throws WikiException
- Throws:
WikiException
-
getRelatedPagesOfPage
List<Page> getRelatedPagesOfPage(Page page) throws WikiException
- Throws:
WikiException
-
getRelatedPage
Page getRelatedPage(String wikiType, String wikiOwner, String pageId) throws WikiException
- Throws:
WikiException
-
addRelatedPage
void addRelatedPage(Page page, Page relatedPage) throws WikiException
- Throws:
WikiException
-
removeRelatedPage
void removeRelatedPage(Page page, Page relatedPage) throws WikiException
- Throws:
WikiException
-
getExsitedOrNewDraftPageById
Page getExsitedOrNewDraftPageById(String wikiType, String wikiOwner, String pageId, String username) throws WikiException
- Throws:
WikiException
-
getDraft
DraftPage getDraft(WikiPageParams param, String username) throws WikiException
- Throws:
WikiException
-
getLastestDraft
DraftPage getLastestDraft(String username) throws WikiException
- Throws:
WikiException
-
getDraft
DraftPage getDraft(String draftName, String username) throws WikiException
- Throws:
WikiException
-
getDraftPagesOfUser
List<DraftPage> getDraftPagesOfUser(String username) throws WikiException
- Throws:
WikiException
-
createDraftPageForUser
void createDraftPageForUser(DraftPage draftPage, String username) throws WikiException
- Throws:
WikiException
-
search
org.exoplatform.commons.utils.PageList<SearchResult> search(WikiSearchData data) throws WikiException
- Throws:
WikiException
-
searchTemplate
List<TemplateSearchResult> searchTemplate(TemplateSearchData data) throws WikiException
- Throws:
WikiException
-
getAttachmentsOfPage
default List<Attachment> getAttachmentsOfPage(Page page, boolean loadContent) throws WikiException
- Throws:
WikiException
-
getAttachmentsOfPage
List<Attachment> getAttachmentsOfPage(Page page) throws WikiException
- Throws:
WikiException
-
addAttachmentToPage
void addAttachmentToPage(Attachment attachment, Page page) throws WikiException
- Throws:
WikiException
-
deleteAttachmentOfPage
void deleteAttachmentOfPage(String attachmentId, Page page) throws WikiException
- Throws:
WikiException
-
getHelpSyntaxPage
Page getHelpSyntaxPage(String syntaxId, boolean fullContent, List<org.exoplatform.container.xml.ValuesParam> syntaxHelpParams, org.exoplatform.container.configuration.ConfigurationManager configurationManager) throws WikiException
- Throws:
WikiException
-
createEmotionIcon
void createEmotionIcon(EmotionIcon emotionIcon) throws WikiException
- Throws:
WikiException
-
getEmotionIcons
List<EmotionIcon> getEmotionIcons() throws WikiException
- Throws:
WikiException
-
getEmotionIconByName
EmotionIcon getEmotionIconByName(String name) throws WikiException
- Throws:
WikiException
-
hasPermissionOnPage
boolean hasPermissionOnPage(Page page, PermissionType permissionType, org.exoplatform.services.security.Identity user) throws WikiException
Check if the identity has the given permission type on a page- Parameters:
page- PagepermissionType- Permission type to checkuser- Identity of the user- Returns:
- true if the user has the given permission type on the page
- Throws:
WikiException- if an error occured
-
hasPermissionOnWiki
boolean hasPermissionOnWiki(Wiki wiki, PermissionType permissionType, org.exoplatform.services.security.Identity identity) throws WikiException
Check if the identity has the given permission type on a wiki- Parameters:
wiki- WikipermissionType- Permission type to checkidentity- Identity of the user- Returns:
- true if the user has the given permission type on the wiki
- Throws:
WikiException- if an error occured
-
hasAdminSpacePermission
boolean hasAdminSpacePermission(String wikiType, String owner, org.exoplatform.services.security.Identity user) throws WikiException
- Throws:
WikiException
-
hasAdminPagePermission
boolean hasAdminPagePermission(String wikiType, String owner, org.exoplatform.services.security.Identity user) throws WikiException
- Throws:
WikiException
-
getVersionsOfPage
List<PageVersion> getVersionsOfPage(Page page) throws WikiException
- Throws:
WikiException
-
addPageVersion
void addPageVersion(Page page) throws WikiException
- Throws:
WikiException
-
restoreVersionOfPage
void restoreVersionOfPage(String versionName, Page page) throws WikiException
- Throws:
WikiException
-
updatePage
void updatePage(Page page) throws WikiException
- Throws:
WikiException
-
getPreviousNamesOfPage
List<String> getPreviousNamesOfPage(Page page) throws WikiException
- Throws:
WikiException
-
getWatchersOfPage
List<String> getWatchersOfPage(Page page) throws WikiException
- Throws:
WikiException
-
addWatcherToPage
void addWatcherToPage(String username, Page page) throws WikiException
- Throws:
WikiException
-
deleteWatcherOfPage
void deleteWatcherOfPage(String username, Page page) throws WikiException
- Throws:
WikiException
-
-