public interface WikiService
| Modifier and Type | Method and Description |
|---|---|
void |
addAttachmentToPage(Attachment attachment,
Page page)
Add the given attachment to the given page
|
void |
addComponentPlugin(org.exoplatform.container.component.ComponentPlugin plugin)
Registers a component plugin into the Wiki service.
|
void |
addEmotionIconsPlugin(WikiEmotionIconsPlugin plugin)
Adds a Wiki emotion icons as plugin.
|
void |
addPageLink(WikiPageParams param,
WikiPageParams entity)
Add a link between 2 pages
|
void |
addRelatedPage(WikiPageParams orginaryPageParams,
WikiPageParams relatedPageParams)
Adds a related page to the current wiki page.
|
void |
addWatcherToPage(String username,
Page page)
Add the given user as watcher of the wiki page
|
void |
addWikiTemplatePagePlugin(WikiTemplatePagePlugin templatePlugin)
Adds a Wiki template as plugin.
|
boolean |
canModifyPagePermission(Page currentPage,
String currentUser)
Check if the given user can update the page
|
boolean |
canPublicAndRetrictPage(Page currentPage,
String currentUser)
Check if the given user can public or restrict the page
|
DraftPage |
createDraftForExistPage(DraftPage draftPage,
Page targetPage,
String revision,
long clientTime)
Creates a draft page for a wiki page which is specified by a given param object.
|
DraftPage |
createDraftForNewPage(DraftPage draftPage,
Page parentPage,
long clientTime)
Creates a draft page for a new wiki page whose parent is specified by a given param object.
|
void |
createEmotionIcon(EmotionIcon emotionIcon)
Creates a emotion icon
|
Page |
createPage(Wiki wiki,
String parentPageName,
Page page)
Create a new wiki page in the given wiki, under the given parent page.
|
void |
createTemplatePage(Wiki wiki,
Template template)
Creates a new Wiki template.
|
void |
createVersionOfPage(Page page)
Creates a version of a page.
|
Wiki |
createWiki(String wikiType,
String owner)
Creates a wiki with the given type and owner
|
void |
deleteAttachmentOfPage(String attachmentId,
Page page)
Deletes the given attachment of the given page
|
boolean |
deletePage(String wikiType,
String wikiOwner,
String pageId)
Deletes a wiki page.
|
void |
deleteTemplatePage(String wikiType,
String wikiOwner,
String templateName)
Deletes a Wiki template.
|
void |
deleteWatcherOfPage(String username,
Page page)
Delete a user as watcher of the given page
|
List<AttachmentWikiListener> |
getAttachmentListeners()
Gets attachment listeners that are registered into the Wiki service.
|
Attachment |
getAttachmentOfPageByName(String attachmentName,
Page page)
Get a attachment of a the given page by name, without loading its content
|
default Attachment |
getAttachmentOfPageByName(String attachmentName,
Page page,
boolean loadContent)
Get a attachment of a the given page by name,
and allow to load the attachment content by setting loadContent to true
|
List<Attachment> |
getAttachmentsOfPage(Page page)
Gets attachments of the given page, without loading their content
|
default List<Attachment> |
getAttachmentsOfPage(Page page,
boolean loadContent)
Gets attachments of the given page,
and allow to load their attachment content by setting loadContent to true
|
List<BreadcrumbData> |
getBreadcumb(String wikiType,
String wikiOwner,
String pageId)
Gets a list of data which is used for composing the breadcrumb.
|
List<Page> |
getChildrenPageOf(Page page)
Get all the children pages of a wiki page
|
String |
getDefaultWikiSyntaxId()
Gets Id of a default Wiki syntax.
|
DraftPage |
getDraft(String draftName)
Gets a draft page by its name.
|
org.exoplatform.commons.diff.DiffResult |
getDraftChanges(DraftPage draftPage)
Gets the changes between the draft page and the target page
|
DraftPage |
getDraftOfPage(Page page)
Gets a draft page of a wiki page which is specified by a given param object.
|
Page |
getDraftPageById(String id)
Gets a wiki draft page based on its unique id.
|
List<DraftPage> |
getDraftsOfUser(String username)
Gets a list of draft pages belonging to a given user.
|
List<Page> |
getDuplicatePages(Page parentPage,
Wiki targetWiki,
List<Page> resultList)
Checks if a page and its children are duplicated with ones in the target Wiki or not,
then gets a list of duplicated pages if any.
|
long |
getEditPageLivingTime()
Get the living time of edited page
|
EmotionIcon |
getEmotionIconByName(String name)
Gets an emotion icon by name
|
List<EmotionIcon> |
getEmotionIcons()
Gets all the emotion icons
|
Page |
getExsitedOrNewDraftPageById(String wikiType,
String wikiOwner,
String pageId)
Gets a wiki page or its draft if existing by its Id.
|
Page |
getHelpSyntaxPage(String syntaxId,
boolean fullContent)
Deprecated.
|
DraftPage |
getLastestDraft()
Gets the last created draft of a wiki page.
|
int |
getNbOfAttachmentsOfPage(Page page)
Get the number of attachment of the given page
|
Wiki |
getOrCreateUserWiki(String username)
Gets a user Wiki.
|
Page |
getPageById(String id)
Gets a wiki page based on its unique id.
|
Page |
getPageByRootPermission(String wikiType,
String wikiOwner,
String pageId)
Gets a wiki page regardless of the current user's permission.
|
List<PageWikiListener> |
getPageListeners()
Gets listeners of all wiki pages that are registered into the Wiki service.
|
Page |
getPageOfWikiByName(String wikiType,
String wikiOwner,
String pageName)
Gets a wiki page by its unique name in the wiki.
|
String |
getPageRenderedContent(Page page)
Get renderd content of a page
|
List<Page> |
getPagesOfWiki(String wikiType,
String wikiOwner)
Retrieve the all pages contained in wiki
|
Page |
getParentPageOf(Page page)
Get parent page of a wiki page
|
List<String> |
getPreviousNamesOfPage(Page page)
Get previous names of a page
|
Page |
getRelatedPage(String wikiType,
String wikiOwner,
String pageId)
Gets a related page of a wiki page which is specified by a given Id.
|
List<Page> |
getRelatedPagesOfPage(Page page)
Gets a list of related pages based on a given param.
|
long |
getSaveDraftSequenceTime()
Gets an interval which specifies the periodical auto-saving for pages in Wiki.
|
String |
getSpaceNameByGroupId(String groupId)
Gets a space name by a given group Id.
|
Template |
getTemplatePage(WikiPageParams params,
String templateId)
Gets a Wiki template.
|
Map<String,Template> |
getTemplates(WikiPageParams params)
Gets a map of wiki templates based on a given params object.
|
int |
getUploadLimit() |
PageVersion |
getVersionOfPageByName(String versionName,
Page page)
Gets a specific version by name of the given page
|
List<PageVersion> |
getVersionsOfPage(Page page)
Gets all the versions of the given page
|
List<String> |
getWatchersOfPage(Page page)
Get all the watchers of a page
|
Wiki |
getWikiById(String wikiId)
Gets a Wiki by its Id.
|
Wiki |
getWikiByTypeAndOwner(String wikiType,
String owner)
Gets a Wiki which is defined by its type and owner.
|
List<PermissionEntry> |
getWikiDefaultPermissions(String wikiType,
String wikiOwner)
Gets a list of Wiki default permissions.
|
String |
getWikiNameById(String wikiId)
Gets a Wiki name by its Id.
|
WikiPageParams |
getWikiPageParams(BreadcrumbData data)
Gets parameters of a wiki page based on the data stored in the breadcrumb.
|
List<PermissionEntry> |
getWikiPermission(String wikiType,
String wikiOwner)
Gets a list of Wiki permissions based on its type and owner.
|
List<Wiki> |
getWikisByType(String wikiType)
Gets all wikis of the given type
|
String |
getWikiWebappUri()
Gets a Wiki webapp URI.
|
boolean |
hasAdminPagePermission(String wikiType,
String owner)
Checks if the current user has the admin permission on a wiki page.
|
boolean |
hasAdminSpacePermission(String wikiType,
String owner)
Checks if the current user has the admin permission on a space or not.
|
boolean |
hasPermissionOnPage(Page page,
PermissionType permissionType,
org.exoplatform.services.security.Identity user)
Checks if the given user has the permission on a page
|
boolean |
hasPermissionOnWiki(Wiki wiki,
PermissionType permissionType,
org.exoplatform.services.security.Identity user)
Check if the identity has the given permission type on a wiki
|
boolean |
isDraftOutDated(DraftPage draftPage)
Check if a draft page is outdated
|
boolean |
isExisting(String wikiType,
String wikiOwner,
String pageId)
Checks if a wiki page exists or not.
|
boolean |
movePage(WikiPageParams currentLocationParams,
WikiPageParams newLocationParams)
Move a wiki Page
|
void |
removeDraft(String draftName)
Removes a draft page by its name.
|
void |
removeDraftOfPage(WikiPageParams param)
Removes a draft page of a wiki page which is specified by the wiki page param.
|
void |
removeRelatedPage(WikiPageParams orginaryPageParams,
WikiPageParams relatedPageParams)
Removes a related page of the current wiki page.
|
boolean |
renamePage(String wikiType,
String wikiOwner,
String pageName,
String newName,
String newTitle)
Renames a wiki page.
|
void |
restoreVersionOfPage(String versionName,
Page page)
Restores a version of a page
|
org.exoplatform.commons.utils.PageList<SearchResult> |
search(WikiSearchData data)
Searches in all wiki pages.
|
List<SpaceBean> |
searchSpaces(String keyword)
Searches for spaces by a given keyword.
|
List<TemplateSearchResult> |
searchTemplate(TemplateSearchData data)
Searches in all templates.
|
void |
updatePage(Page page,
PageUpdateType type)
Update the given page.
|
void |
updateTemplate(Template template)
Modifies an existing wiki template.
|
void |
updateWikiPermission(String wikiType,
String wikiOwner,
List<PermissionEntry> permissionEntries)
Adds a list of permissions to Wiki.
|
Page createPage(Wiki wiki, String parentPageName, Page page) throws WikiException
wiki - It can be Portal, Group, or User.parentPageName - Name of the parent wiki page.WikiExceptionvoid createTemplatePage(Wiki wiki, Template template) throws WikiException
wiki - Wiki of the templatetemplate - The params object which is used for creating the new Wiki template.WikiExceptionboolean deletePage(String wikiType, String wikiOwner, String pageId) throws WikiException
wikiType - It can be Portal, Group, or User.wikiOwner - The Wiki owner.pageId - Id of the wiki page.WikiExceptionvoid deleteTemplatePage(String wikiType, String wikiOwner, String templateName) throws WikiException
wikiType - It can be Portal, Group, or User.wikiOwner - The Wiki owner.templateName - Name of the Wiki template.WikiExceptionboolean renamePage(String wikiType, String wikiOwner, String pageName, String newName, String newTitle) throws WikiException
wikiType - It can be Portal, Group, or User.wikiOwner - The Wiki owner.pageName - Old name of the wiki page.newName - New name of the wiki page.newTitle - New title of the wiki page.WikiExceptionboolean movePage(WikiPageParams currentLocationParams, WikiPageParams newLocationParams) throws WikiException
currentLocationParams - The current location of the wiki page.newLocationParams - The new location of the wiki page.WikiExceptionList<PermissionEntry> getWikiPermission(String wikiType, String wikiOwner) throws WikiException
wikiType - It can be Portal, Group, or User.wikiOwner - The Wiki owner.WikiExceptionvoid updateWikiPermission(String wikiType, String wikiOwner, List<PermissionEntry> permissionEntries) throws WikiException
wikiType - It can be Portal, Group, or User.wikiOwner - The Wiki owner.permissionEntries - The list of permissions.WikiExceptionPage getPageOfWikiByName(String wikiType, String wikiOwner, String pageName) throws WikiException
wikiType - It can be Portal, Group, or User.wikiOwner - The Wiki owner.pageName - Id of the wiki page.WikiExceptionPage getPageByRootPermission(String wikiType, String wikiOwner, String pageId) throws WikiException
wikiType - It can be Portal, Group, or User.wikiOwner - The Wiki owner.pageId - Id of the wiki page.WikiExceptionPage getRelatedPage(String wikiType, String wikiOwner, String pageId) throws WikiException
wikiType - It can be Portal, Group, or User.wikiOwner - The Wiki owner.pageId - Id of the wiki page.WikiExceptionPage getExsitedOrNewDraftPageById(String wikiType, String wikiOwner, String pageId) throws WikiException
wikiType - It can be Portal, Group, or User.wikiOwner - The Wiki owner.pageId - Id of the wiki page.WikiExceptionPage getPageById(String id) throws WikiException
id - Unique id of the wiki page.WikiExceptionPage getDraftPageById(String id) throws WikiException
id - Unique id of the wiki page.WikiExceptionString getPageRenderedContent(Page page)
page - The wiki pagevoid addPageLink(WikiPageParams param, WikiPageParams entity)
param - First pageentity - Second pagePage getParentPageOf(Page page) throws WikiException
page - Wiki page.WikiExceptionList<Page> getChildrenPageOf(Page page) throws WikiException
page - Wiki page.WikiExceptionTemplate getTemplatePage(WikiPageParams params, String templateId) throws WikiException
params - The params object which is used for creating the Wiki template.templateId - Id of the wiki template.WikiExceptionList<BreadcrumbData> getBreadcumb(String wikiType, String wikiOwner, String pageId) throws WikiException
wikiType - It can be Portal, Group, or User.wikiOwner - The Wiki owner.pageId - Id of the wiki page to which the breadcrumb points.WikiExceptionWikiPageParams getWikiPageParams(BreadcrumbData data) throws WikiException
data - The data in the breadcrumb that identifies the wiki page.WikiExceptionorg.exoplatform.commons.utils.PageList<SearchResult> search(WikiSearchData data) throws WikiException
data - The data to search.WikiExceptionList<TemplateSearchResult> searchTemplate(TemplateSearchData data) throws WikiException
data - The data to search.WikiExceptionList<Page> getDuplicatePages(Page parentPage, Wiki targetWiki, List<Page> resultList) throws WikiException
parentPage - The page to check.targetWiki - The target Wiki to check.resultList - The list of duplicated wiki pages.WikiExceptionString getDefaultWikiSyntaxId()
long getSaveDraftSequenceTime()
long getEditPageLivingTime()
List<Attachment> getAttachmentsOfPage(Page page) throws WikiException
page - The wiki pageWikiExceptiondefault List<Attachment> getAttachmentsOfPage(Page page, boolean loadContent) throws WikiException
page - The wiki pageWikiExceptionint getNbOfAttachmentsOfPage(Page page) throws WikiException
page - The wiki pageWikiExceptionAttachment getAttachmentOfPageByName(String attachmentName, Page page) throws WikiException
attachmentName - The name of the attachmentpage - The wiki pageWikiExceptiondefault Attachment getAttachmentOfPageByName(String attachmentName, Page page, boolean loadContent) throws WikiException
attachmentName - The name of the attachmentpage - The wiki pageloadContent - true to load the attachment contentWikiExceptionvoid addAttachmentToPage(Attachment attachment, Page page) throws WikiException
attachment - The attachment to addpage - The wiki pageWikiExceptionvoid deleteAttachmentOfPage(String attachmentId, Page page) throws WikiException
attachmentId - Id of the attachmentpage - The wiki pageWikiException@Deprecated Page getHelpSyntaxPage(String syntaxId, boolean fullContent) throws WikiException
syntaxId - Id of the syntax.fullContent - true to get the full help page content, false to get an excerptWikiExceptionMap<String,Template> getTemplates(WikiPageParams params) throws WikiException
params - The params object which is used for getting the wiki templates.WikiExceptionvoid updateTemplate(Template template) throws WikiException
template - The updated wiki template.WikiExceptionboolean isExisting(String wikiType, String wikiOwner, String pageId) throws WikiException
wikiType - It can be Portal, Group, or User.wikiOwner - The Wiki owner.pageId - Id of the wiki page.WikiExceptionList<PermissionEntry> getWikiDefaultPermissions(String wikiType, String wikiOwner) throws WikiException
wikiType - It can be Portal, Group, or User.wikiOwner - The Wiki owner.WikiExceptionvoid addComponentPlugin(org.exoplatform.container.component.ComponentPlugin plugin)
plugin - The component plugin to be registered.void addWikiTemplatePagePlugin(WikiTemplatePagePlugin templatePlugin)
templatePlugin - The wiki template plugin to be added.void addEmotionIconsPlugin(WikiEmotionIconsPlugin plugin)
plugin - The wiki emotion icons plugin to be added.List<PageWikiListener> getPageListeners()
List<AttachmentWikiListener> getAttachmentListeners()
void addRelatedPage(WikiPageParams orginaryPageParams, WikiPageParams relatedPageParams) throws WikiException
orginaryPageParams - The params object of the current wiki page.relatedPageParams - The params object of the related page.WikiExceptionList<Page> getRelatedPagesOfPage(Page page) throws WikiException
page - The wiki page.WikiExceptionvoid removeRelatedPage(WikiPageParams orginaryPageParams, WikiPageParams relatedPageParams) throws WikiException
orginaryPageParams - The params object of the current wiki page.relatedPageParams - The params object of the related page.WikiExceptionDraftPage createDraftForExistPage(DraftPage draftPage, Page targetPage, String revision, long clientTime) throws WikiException
targetPage - The target wiki page.revision - The revision which is used for creating the draft page. If "null", this will be the last revision.clientTime - The time of client when the draft page is saved.WikiException - if the draft page cannot be created.DraftPage createDraftForNewPage(DraftPage draftPage, Page parentPage, long clientTime) throws WikiException
parentPage - The parent wiki page.clientTime - The time of client when the draft page is saved.WikiException - if the draft page cannot be created.DraftPage getDraftOfPage(Page page) throws WikiException
page - The wiki page.WikiExceptionDraftPage getDraft(String draftName) throws WikiException
draftName - Name of the draft page.WikiExceptionvoid removeDraftOfPage(WikiPageParams param) throws WikiException
param - The param object of the wiki page param.WikiExceptionvoid removeDraft(String draftName) throws WikiException
draftName - Name of the draft page.WikiExceptionList<DraftPage> getDraftsOfUser(String username) throws WikiException
username - Name of the user.WikiExceptionboolean isDraftOutDated(DraftPage draftPage) throws WikiException
draftPage - WikiExceptionDraftPage getLastestDraft() throws WikiException
WikiExceptionorg.exoplatform.commons.diff.DiffResult getDraftChanges(DraftPage draftPage) throws WikiException
WikiExceptionWiki getOrCreateUserWiki(String username) throws WikiException
username - Name of the user.WikiExceptionString getSpaceNameByGroupId(String groupId)
groupId - The group Id.List<SpaceBean> searchSpaces(String keyword) throws WikiException
keyword - The keyword to search for spaces.WikiExceptionWiki getWikiByTypeAndOwner(String wikiType, String owner) throws WikiException
wikiType - It can be Portal, Group, or User.owner - The Wiki owner.WikiExceptionList<Wiki> getWikisByType(String wikiType) throws WikiException
wikiType - Type of wikiWikiExceptionWiki createWiki(String wikiType, String owner) throws WikiException
wikiType - It can be Portal, Group, or User.owner - The Wiki owner.WikiExceptionString getWikiWebappUri()
boolean hasPermissionOnWiki(Wiki wiki, PermissionType permissionType, org.exoplatform.services.security.Identity user) throws WikiException
wiki - WikipermissionType - Permission type to checkuser - Identity of the userWikiExceptionboolean hasPermissionOnPage(Page page, PermissionType permissionType, org.exoplatform.services.security.Identity user) throws WikiException
user - page - permissionType - WikiExceptionboolean hasAdminSpacePermission(String wikiType, String owner) throws WikiException
wikiType - It can be Portal, Group, or User.owner - Owner of the space.WikiExceptionboolean hasAdminPagePermission(String wikiType, String owner) throws WikiException
wikiType - It can be Portal, Group, or User.owner - Owner of the wiki page.WikiExceptionWiki getWikiById(String wikiId) throws WikiException
wikiId - The Wiki Id.WikiExceptionString getWikiNameById(String wikiId) throws WikiException
wikiId - The Wiki Id.WikiExceptionboolean canModifyPagePermission(Page currentPage, String currentUser) throws WikiException
currentPage - The page to updatecurrentUser - The user that needs to update the pageWikiExceptionboolean canPublicAndRetrictPage(Page currentPage, String currentUser) throws WikiException
currentPage - currentUser - WikiExceptionList<PageVersion> getVersionsOfPage(Page page) throws WikiException
page - The wiki pageWikiExceptionPageVersion getVersionOfPageByName(String versionName, Page page) throws WikiException
versionName - The name of the versionpage - The wiki pageWikiExceptionvoid createVersionOfPage(Page page) throws WikiException
page - The wiki pageWikiExceptionvoid restoreVersionOfPage(String versionName, Page page) throws WikiException
versionName - The name of the version to restorepage - The wiki pageWikiExceptionvoid updatePage(Page page, PageUpdateType type) throws WikiException
page - Updated pagetype - Type of updateWikiExceptionList<String> getPreviousNamesOfPage(Page page) throws WikiException
page - The wiki pageWikiExceptionvoid createEmotionIcon(EmotionIcon emotionIcon) throws WikiException
emotionIcon - The emotion icon to addWikiExceptionList<EmotionIcon> getEmotionIcons() throws WikiException
WikiExceptionEmotionIcon getEmotionIconByName(String name) throws WikiException
name - The name of the emotion iconWikiExceptionList<String> getWatchersOfPage(Page page) throws WikiException
page - The wiki pageWikiExceptionvoid addWatcherToPage(String username, Page page) throws WikiException
username - Username of the user to add as watcherpage - The wiki pageWikiExceptionvoid deleteWatcherOfPage(String username, Page page) throws WikiException
username - Username of the user to delete as watcherpage - The wiki pageWikiExceptionint getUploadLimit()
Copyright © 2003–2020 eXo Platform SAS. All rights reserved.