public class JCRDataStorage extends Object implements DataStorage
| Constructor and Description |
|---|
JCRDataStorage(MOWService mowService,
org.exoplatform.services.jcr.ext.hierarchy.NodeHierarchyCreator nodeHierarchyCreator)
Constructor
Inject NodeHierarchyCreator to be sure JCRDataStorage is loaded after NodeHierarchyCreator,
so JCR wiki root folders are created before wiki data initialization
|
| Modifier and Type | Method and Description |
|---|---|
void |
addAttachmentToPage(Attachment attachment,
Page page) |
void |
addPageVersion(Page page) |
void |
addRelatedPage(Page page,
Page relatedPage) |
void |
addWatcherToPage(String username,
Page page) |
void |
createDraftPageForUser(DraftPage draftPage,
String username) |
void |
createEmotionIcon(EmotionIcon emotionIcon) |
Page |
createPage(Wiki wiki,
Page parentPage,
Page page)
Create a wiki page with the given pageId, under the node of the parentPage node.
|
void |
createTemplatePage(Wiki wiki,
Template template) |
Wiki |
createWiki(Wiki wiki) |
void |
deleteAttachmentOfPage(String attachmentId,
Page page) |
void |
deleteDraftByName(String newDraftPageName,
String username) |
void |
deleteDraftOfPage(Page page,
String username) |
void |
deletePage(String wikiType,
String wikiOwner,
String pageId) |
void |
deleteTemplatePage(String wikiType,
String wikiOwner,
String templateName) |
void |
deleteWatcherOfPage(String username,
Page page) |
List<Attachment> |
getAttachmentsOfPage(Page page) |
List<Page> |
getChildrenPageOf(Page page) |
DraftPage |
getDraft(String draftName,
String username) |
DraftPage |
getDraft(WikiPageParams param,
String username) |
DraftPage |
getDraftPageById(String id) |
List<DraftPage> |
getDraftPagesOfUser(String username) |
EmotionIcon |
getEmotionIconByName(String name) |
List<EmotionIcon> |
getEmotionIcons() |
Page |
getExsitedOrNewDraftPageById(String wikiType,
String wikiOwner,
String pageId,
String username) |
Page |
getHelpSyntaxPage(String syntaxId,
boolean fullContent,
List<org.exoplatform.container.xml.ValuesParam> syntaxHelpParams,
org.exoplatform.container.configuration.ConfigurationManager configurationManager) |
DraftPage |
getLastestDraft(String username) |
Page |
getPageById(String id)
Get a wiki page by its unique id
|
Page |
getPageOfWikiByName(String wikiType,
String wikiOwner,
String pageName)
Get a wiki page by its unique name in the wiki
|
List<Page> |
getPagesOfWiki(String wikiType,
String wikiOwner)
Retrieve the all pages contained in wiki
|
Page |
getParentPageOf(Page page) |
List<String> |
getPreviousNamesOfPage(Page page) |
Page |
getRelatedPage(String wikiType,
String wikiOwner,
String pageId) |
List<Page> |
getRelatedPagesOfPage(Page page) |
Template |
getTemplatePage(WikiPageParams params,
String templateId) |
Map<String,Template> |
getTemplates(WikiPageParams params) |
List<PageVersion> |
getVersionsOfPage(Page page) |
List<String> |
getWatchersOfPage(Page page) |
Wiki |
getWikiByTypeAndOwner(String wikiType,
String wikiOwner) |
List<PermissionEntry> |
getWikiPermission(String wikiType,
String wikiOwner) |
List<Wiki> |
getWikisByType(String wikiType) |
boolean |
hasAdminPagePermission(String wikiType,
String owner,
org.exoplatform.services.security.Identity user) |
boolean |
hasAdminSpacePermission(String wikiType,
String owner,
org.exoplatform.services.security.Identity user) |
boolean |
hasPermissionOnPage(Page page,
PermissionType permissionType,
org.exoplatform.services.security.Identity user)
Check if the identity has the given permission type on a page
|
boolean |
hasPermissionOnWiki(Wiki wiki,
PermissionType permissionType,
org.exoplatform.services.security.Identity identity)
Check if the identity has the given permission type on a wiki
|
void |
movePage(WikiPageParams currentLocationParams,
WikiPageParams newLocationParams) |
void |
removeRelatedPage(Page page,
Page relatedPage) |
void |
renamePage(String wikiType,
String wikiOwner,
String pageName,
String newName,
String newTitle) |
void |
restoreVersionOfPage(String versionName,
Page page) |
org.exoplatform.commons.utils.PageList<SearchResult> |
search(WikiSearchData data) |
List<TemplateSearchResult> |
searchTemplate(TemplateSearchData data) |
void |
updatePage(Page page) |
void |
updateTemplatePage(Template template) |
void |
updateWikiPermission(String wikiType,
String wikiOwner,
List<PermissionEntry> permissionEntries) |
public JCRDataStorage(MOWService mowService, org.exoplatform.services.jcr.ext.hierarchy.NodeHierarchyCreator nodeHierarchyCreator)
mowService - nodeHierarchyCreator - public Wiki getWikiByTypeAndOwner(String wikiType, String wikiOwner) throws WikiException
getWikiByTypeAndOwner in interface DataStorageWikiExceptionpublic List<Wiki> getWikisByType(String wikiType) throws WikiException
getWikisByType in interface DataStorageWikiExceptionpublic Wiki createWiki(Wiki wiki) throws WikiException
createWiki in interface DataStorageWikiExceptionpublic Page createPage(Wiki wiki, Page parentPage, Page page) throws WikiException
createPage in interface DataStoragewiki - parentPage - page - WikiExceptionpublic Page getPageOfWikiByName(String wikiType, String wikiOwner, String pageName) throws WikiException
DataStoragegetPageOfWikiByName in interface DataStoragepageName - The unique name of the page in the wikiWikiExceptionpublic Page getPageById(String id) throws WikiException
DataStoragegetPageById in interface DataStorageid - The unique id of wiki pageWikiExceptionpublic DraftPage getDraftPageById(String id) throws WikiException
getDraftPageById in interface DataStorageWikiExceptionpublic Page getParentPageOf(Page page) throws WikiException
getParentPageOf in interface DataStorageWikiExceptionpublic List<Page> getChildrenPageOf(Page page) throws WikiException
getChildrenPageOf in interface DataStorageWikiExceptionpublic void createTemplatePage(Wiki wiki, Template template) throws WikiException
createTemplatePage in interface DataStorageWikiExceptionpublic void updateTemplatePage(Template template) throws WikiException
updateTemplatePage in interface DataStorageWikiExceptionpublic void deleteTemplatePage(String wikiType, String wikiOwner, String templateName) throws WikiException
deleteTemplatePage in interface DataStorageWikiExceptionpublic void deletePage(String wikiType, String wikiOwner, String pageId) throws WikiException
deletePage in interface DataStorageWikiExceptionpublic Template getTemplatePage(WikiPageParams params, String templateId) throws WikiException
getTemplatePage in interface DataStorageWikiExceptionpublic Map<String,Template> getTemplates(WikiPageParams params) throws WikiException
getTemplates in interface DataStorageWikiExceptionpublic void deleteDraftOfPage(Page page, String username) throws WikiException
deleteDraftOfPage in interface DataStorageWikiExceptionpublic void deleteDraftByName(String newDraftPageName, String username) throws WikiException
deleteDraftByName in interface DataStorageWikiExceptionpublic void renamePage(String wikiType, String wikiOwner, String pageName, String newName, String newTitle) throws WikiException
renamePage in interface DataStorageWikiExceptionpublic void movePage(WikiPageParams currentLocationParams, WikiPageParams newLocationParams) throws WikiException
movePage in interface DataStorageWikiExceptionpublic List<PermissionEntry> getWikiPermission(String wikiType, String wikiOwner) throws WikiException
getWikiPermission in interface DataStorageWikiExceptionpublic void updateWikiPermission(String wikiType, String wikiOwner, List<PermissionEntry> permissionEntries) throws WikiException
updateWikiPermission in interface DataStorageWikiExceptionpublic List<Page> getRelatedPagesOfPage(Page page) throws WikiException
getRelatedPagesOfPage in interface DataStorageWikiExceptionpublic Page getRelatedPage(String wikiType, String wikiOwner, String pageId) throws WikiException
getRelatedPage in interface DataStorageWikiExceptionpublic void addRelatedPage(Page page, Page relatedPage) throws WikiException
addRelatedPage in interface DataStorageWikiExceptionpublic void removeRelatedPage(Page page, Page relatedPage) throws WikiException
removeRelatedPage in interface DataStorageWikiExceptionpublic Page getExsitedOrNewDraftPageById(String wikiType, String wikiOwner, String pageId, String username) throws WikiException
getExsitedOrNewDraftPageById in interface DataStorageWikiExceptionpublic DraftPage getDraft(WikiPageParams param, String username) throws WikiException
getDraft in interface DataStorageWikiExceptionpublic DraftPage getLastestDraft(String username) throws WikiException
getLastestDraft in interface DataStorageWikiExceptionpublic DraftPage getDraft(String draftName, String username) throws WikiException
getDraft in interface DataStorageWikiExceptionpublic List<DraftPage> getDraftPagesOfUser(String username) throws WikiException
getDraftPagesOfUser in interface DataStorageWikiExceptionpublic void createDraftPageForUser(DraftPage draftPage, String username) throws WikiException
createDraftPageForUser in interface DataStorageWikiExceptionpublic org.exoplatform.commons.utils.PageList<SearchResult> search(WikiSearchData data) throws WikiException
search in interface DataStorageWikiExceptionpublic List<Attachment> getAttachmentsOfPage(Page page) throws WikiException
getAttachmentsOfPage in interface DataStorageWikiExceptionpublic void addAttachmentToPage(Attachment attachment, Page page) throws WikiException
addAttachmentToPage in interface DataStorageWikiExceptionpublic void deleteAttachmentOfPage(String attachmentId, Page page) throws WikiException
deleteAttachmentOfPage in interface DataStorageWikiExceptionpublic Page getHelpSyntaxPage(String syntaxId, boolean fullContent, List<org.exoplatform.container.xml.ValuesParam> syntaxHelpParams, org.exoplatform.container.configuration.ConfigurationManager configurationManager) throws WikiException
getHelpSyntaxPage in interface DataStorageWikiExceptionpublic void createEmotionIcon(EmotionIcon emotionIcon) throws WikiException
createEmotionIcon in interface DataStorageWikiExceptionpublic List<EmotionIcon> getEmotionIcons() throws WikiException
getEmotionIcons in interface DataStorageWikiExceptionpublic EmotionIcon getEmotionIconByName(String name) throws WikiException
getEmotionIconByName in interface DataStorageWikiExceptionpublic boolean hasAdminSpacePermission(String wikiType, String owner, org.exoplatform.services.security.Identity user) throws WikiException
hasAdminSpacePermission in interface DataStorageWikiExceptionpublic boolean hasAdminPagePermission(String wikiType, String owner, org.exoplatform.services.security.Identity user) throws WikiException
hasAdminPagePermission in interface DataStorageWikiExceptionpublic boolean hasPermissionOnPage(Page page, PermissionType permissionType, org.exoplatform.services.security.Identity user) throws WikiException
DataStoragehasPermissionOnPage in interface DataStoragepage - PagepermissionType - Permission type to checkuser - Identity of the userWikiExceptionpublic boolean hasPermissionOnWiki(Wiki wiki, PermissionType permissionType, org.exoplatform.services.security.Identity identity) throws WikiException
DataStoragehasPermissionOnWiki in interface DataStoragewiki - WikipermissionType - Permission type to checkidentity - Identity of the userWikiExceptionpublic List<PageVersion> getVersionsOfPage(Page page) throws WikiException
getVersionsOfPage in interface DataStorageWikiExceptionpublic void addPageVersion(Page page) throws WikiException
addPageVersion in interface DataStorageWikiExceptionpublic void restoreVersionOfPage(String versionName, Page page) throws WikiException
restoreVersionOfPage in interface DataStorageWikiExceptionpublic void updatePage(Page page) throws WikiException
updatePage in interface DataStorageWikiExceptionpublic List<String> getPreviousNamesOfPage(Page page) throws WikiException
getPreviousNamesOfPage in interface DataStorageWikiExceptionpublic List<String> getWatchersOfPage(Page page) throws WikiException
getWatchersOfPage in interface DataStorageWikiExceptionpublic void addWatcherToPage(String username, Page page) throws WikiException
addWatcherToPage in interface DataStorageWikiExceptionpublic void deleteWatcherOfPage(String username, Page page) throws WikiException
deleteWatcherOfPage in interface DataStorageWikiExceptionpublic List<TemplateSearchResult> searchTemplate(TemplateSearchData data) throws WikiException
searchTemplate in interface DataStorageWikiExceptionpublic List<Page> getPagesOfWiki(String wikiType, String wikiOwner)
DataStoragegetPagesOfWiki in interface DataStorageCopyright © 2003–2019 eXo Platform SAS. All rights reserved.