public class WikiServiceImpl extends Object implements WikiService, org.picocontainer.Startable
| Modifier and Type | Field and Description |
|---|---|
static String |
ATT_CACHE_NAME |
static String |
CACHE_NAME |
static String |
UPLOAD_LIMIT_PARAMETER_NAME |
static String |
WIKI_TYPE_DRAFT |
| Constructor and Description |
|---|
WikiServiceImpl(org.exoplatform.container.configuration.ConfigurationManager configManager,
org.exoplatform.portal.config.UserACL userACL,
DataStorage dataStorage,
org.exoplatform.wiki.rendering.RenderingService renderingService,
org.exoplatform.services.cache.CacheService cacheService,
org.exoplatform.services.organization.OrganizationService orgService,
org.exoplatform.container.xml.InitParams initParams) |
| Modifier and Type | Method and Description |
|---|---|
void |
addAttachment(Attachment attachment,
Page page) |
void |
addAttachmentToPage(Attachment attachment,
Page page)
Add the given attachment to the given page
|
void |
addComponentPlugin(org.exoplatform.container.component.ComponentPlugin plugin)
Configuration
|
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 |
addUnCachedMacro(UnCachedMacroPlugin plugin)
Uncache page rendering for pages containing a chosen macro
|
void |
addWatcherToPage(String username,
Page page)
Add the given user as watcher of the wiki page
|
void |
addWikiTemplatePagePlugin(WikiTemplatePagePlugin plugin)
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)
Page
|
void |
createTemplatePage(Wiki wiki,
Template template)
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 |
deleteAttachment(String attachmentId,
Page page) |
void |
deleteAttachmentOfPage(String attachmentId,
Page page)
Deletes the given attachment of the given page
|
boolean |
deletePage(String wikiType,
String wikiOwner,
String pageName)
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
|
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)
Attachment
|
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.
|
DraftPage |
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)
Draft
|
Page |
getHelpSyntaxPage(String syntaxId,
boolean fullContent)
Gets a Help wiki page based on a given syntax Id.
|
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.
|
Map<WikiPageParams,List<WikiPageParams>> |
getPageLinksMap() |
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,
String targetSyntax)
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.
|
org.exoplatform.services.cache.ExoCache<Integer,MarkupData> |
getRenderingCache() |
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.
|
Set<String> |
getUncachedMacroes() |
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)
Watch
|
Wiki |
getWikiById(String wikiId)
Gets a Wiki by its Id.
|
Wiki |
getWikiByTypeAndOwner(String wikiType,
String owner)
Wiki
|
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
|
protected void |
invalidateAttachmentCache(Page page) |
protected void |
invalidateCache(Page page) |
protected void |
invalidateCachesOfPageTree(Page page)
Invalidate all caches of a page and all its descendants
|
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 |
postAddPage(String wikiType,
String wikiOwner,
String pageId,
Page page) |
void |
postDeletePage(String wikiType,
String wikiOwner,
String pageId,
Page page) |
void |
postUpdatePage(String wikiType,
String wikiOwner,
String pageId,
Page page,
PageUpdateType wikiUpdateType)
Listeners
|
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)
Spaces
|
List<TemplateSearchResult> |
searchTemplate(TemplateSearchData data)
Searches in all templates.
|
void |
start() |
void |
stop() |
void |
updatePage(Page page,
PageUpdateType updateType)
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.
|
public static final String WIKI_TYPE_DRAFT
public static final String CACHE_NAME
public static final String ATT_CACHE_NAME
public static String UPLOAD_LIMIT_PARAMETER_NAME
public WikiServiceImpl(org.exoplatform.container.configuration.ConfigurationManager configManager,
org.exoplatform.portal.config.UserACL userACL,
DataStorage dataStorage,
org.exoplatform.wiki.rendering.RenderingService renderingService,
org.exoplatform.services.cache.CacheService cacheService,
org.exoplatform.services.organization.OrganizationService orgService,
org.exoplatform.container.xml.InitParams initParams)
public void start()
start in interface org.picocontainer.Startablepublic void stop()
stop in interface org.picocontainer.Startablepublic org.exoplatform.services.cache.ExoCache<Integer,MarkupData> getRenderingCache()
public Map<WikiPageParams,List<WikiPageParams>> getPageLinksMap()
public void addComponentPlugin(org.exoplatform.container.component.ComponentPlugin plugin)
addComponentPlugin in interface WikiServiceplugin - The component plugin to be registered.public void addWikiTemplatePagePlugin(WikiTemplatePagePlugin plugin)
WikiServiceaddWikiTemplatePagePlugin in interface WikiServiceplugin - The wiki template plugin to be added.public void addEmotionIconsPlugin(WikiEmotionIconsPlugin plugin)
WikiServiceaddEmotionIconsPlugin in interface WikiServiceplugin - The wiki emotion icons plugin to be added.public List<PageWikiListener> getPageListeners()
WikiServicegetPageListeners in interface WikiServicepublic List<AttachmentWikiListener> getAttachmentListeners()
WikiServicegetAttachmentListeners in interface WikiServicepublic String getWikiWebappUri()
WikiServicegetWikiWebappUri in interface WikiServicepublic String getDefaultWikiSyntaxId()
WikiServicegetDefaultWikiSyntaxId in interface WikiServicepublic long getSaveDraftSequenceTime()
WikiServicegetSaveDraftSequenceTime in interface WikiServicepublic long getEditPageLivingTime()
WikiServicegetEditPageLivingTime in interface WikiServicepublic Wiki getWikiByTypeAndOwner(String wikiType, String owner) throws WikiException
getWikiByTypeAndOwner in interface WikiServicewikiType - It can be Portal, Group, or User.owner - The Wiki owner.WikiExceptionpublic List<Wiki> getWikisByType(String wikiType) throws WikiException
WikiServicegetWikisByType in interface WikiServicewikiType - Type of wikiWikiExceptionpublic Wiki getOrCreateUserWiki(String username) throws WikiException
WikiServicegetOrCreateUserWiki in interface WikiServiceusername - Name of the user.WikiExceptionpublic List<PermissionEntry> getWikiPermission(String wikiType, String wikiOwner) throws WikiException
WikiServicegetWikiPermission in interface WikiServicewikiType - It can be Portal, Group, or User.wikiOwner - The Wiki owner.WikiExceptionpublic void updateWikiPermission(String wikiType, String wikiOwner, List<PermissionEntry> permissionEntries) throws WikiException
WikiServiceupdateWikiPermission in interface WikiServicewikiType - It can be Portal, Group, or User.wikiOwner - The Wiki owner.permissionEntries - The list of permissions.WikiExceptionpublic List<PermissionEntry> getWikiDefaultPermissions(String wikiType, String wikiOwner) throws WikiException
WikiServicegetWikiDefaultPermissions in interface WikiServicewikiType - It can be Portal, Group, or User.wikiOwner - The Wiki owner.WikiExceptionpublic Wiki getWikiById(String wikiId) throws WikiException
WikiServicegetWikiById in interface WikiServicewikiId - The Wiki Id.WikiExceptionpublic String getWikiNameById(String wikiId) throws WikiException
WikiServicegetWikiNameById in interface WikiServicewikiId - The Wiki Id.WikiExceptionpublic Wiki createWiki(String wikiType, String owner) throws WikiException
WikiServicecreateWiki in interface WikiServicewikiType - It can be Portal, Group, or User.owner - The Wiki owner.WikiExceptionpublic Page createPage(Wiki wiki, String parentPageName, Page page) throws WikiException
createPage in interface WikiServicewiki - It can be Portal, Group, or User.parentPageName - Name of the parent wiki page.WikiExceptionpublic Page getPageOfWikiByName(String wikiType, String wikiOwner, String pageName) throws WikiException
WikiServicegetPageOfWikiByName in interface WikiServicewikiType - It can be Portal, Group, or User.wikiOwner - The Wiki owner.pageName - Id of the wiki page.WikiExceptionpublic void addUnCachedMacro(UnCachedMacroPlugin plugin)
WikiServiceaddUnCachedMacro in interface WikiServicepublic Page getPageById(String id) throws WikiException
WikiServicegetPageById in interface WikiServiceid - Unique id of the wiki page.WikiExceptionpublic DraftPage getDraftPageById(String id) throws WikiException
WikiServicegetDraftPageById in interface WikiServiceid - Unique id of the wiki page.WikiExceptionpublic Page getPageByRootPermission(String wikiType, String wikiOwner, String pageId) throws WikiException
WikiServicegetPageByRootPermission in interface WikiServicewikiType - It can be Portal, Group, or User.wikiOwner - The Wiki owner.pageId - Id of the wiki page.WikiExceptionpublic Page getParentPageOf(Page page) throws WikiException
WikiServicegetParentPageOf in interface WikiServicepage - Wiki page.WikiExceptionpublic List<Page> getChildrenPageOf(Page page) throws WikiException
WikiServicegetChildrenPageOf in interface WikiServicepage - Wiki page.WikiExceptionpublic boolean deletePage(String wikiType, String wikiOwner, String pageName) throws WikiException
WikiServicedeletePage in interface WikiServicewikiType - It can be Portal, Group, or User.wikiOwner - The Wiki owner.pageName - Id of the wiki page.WikiExceptionpublic boolean renamePage(String wikiType, String wikiOwner, String pageName, String newName, String newTitle) throws WikiException
WikiServicerenamePage in interface WikiServicewikiType - 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.WikiExceptionpublic boolean movePage(WikiPageParams currentLocationParams, WikiPageParams newLocationParams) throws WikiException
WikiServicemovePage in interface WikiServicecurrentLocationParams - The current location of the wiki page.newLocationParams - The new location of the wiki page.WikiExceptionpublic String getPageRenderedContent(Page page, String targetSyntax)
WikiServicegetPageRenderedContent in interface WikiServicepage - The wiki pagetargetSyntax - The syntaxpublic void addPageLink(WikiPageParams param, WikiPageParams entity)
WikiServiceaddPageLink in interface WikiServiceparam - First pageentity - Second pageprotected void invalidateCache(Page page)
protected void invalidateAttachmentCache(Page page)
protected void invalidateCachesOfPageTree(Page page) throws WikiException
page - root pageWikiExceptionpublic Page getRelatedPage(String wikiType, String wikiOwner, String pageId) throws WikiException
WikiServicegetRelatedPage in interface WikiServicewikiType - It can be Portal, Group, or User.wikiOwner - The Wiki owner.pageId - Id of the wiki page.WikiExceptionpublic boolean isExisting(String wikiType, String wikiOwner, String pageId) throws WikiException
WikiServiceisExisting in interface WikiServicewikiType - It can be Portal, Group, or User.wikiOwner - The Wiki owner.pageId - Id of the wiki page.WikiExceptionpublic org.exoplatform.commons.utils.PageList<SearchResult> search(WikiSearchData data) throws WikiException
WikiServicesearch in interface WikiServicedata - The data to search.WikiExceptionpublic Page getHelpSyntaxPage(String syntaxId, boolean fullContent) throws WikiException
WikiServicegetHelpSyntaxPage in interface WikiServicesyntaxId - Id of the syntax.fullContent - true to get the full help page content, false to get an excerptWikiExceptionpublic List<EmotionIcon> getEmotionIcons() throws WikiException
WikiServicegetEmotionIcons in interface WikiServiceWikiExceptionpublic EmotionIcon getEmotionIconByName(String name) throws WikiException
WikiServicegetEmotionIconByName in interface WikiServicename - The name of the emotion iconWikiExceptionpublic List<Page> getDuplicatePages(Page parentPage, Wiki targetWiki, List<Page> resultList) throws WikiException
WikiServicegetDuplicatePages in interface WikiServiceparentPage - The page to check.targetWiki - The target Wiki to check.resultList - The list of duplicated wiki pages.WikiExceptionpublic boolean hasPermissionOnWiki(Wiki wiki, PermissionType permissionType, org.exoplatform.services.security.Identity user) throws WikiException
WikiServicehasPermissionOnWiki in interface WikiServicewiki - WikipermissionType - Permission type to checkuser - Identity of the userWikiExceptionpublic boolean hasPermissionOnPage(Page page, PermissionType permissionType, org.exoplatform.services.security.Identity user) throws WikiException
WikiServicehasPermissionOnPage in interface WikiServiceWikiExceptionpublic boolean canModifyPagePermission(Page currentPage, String currentUser) throws WikiException
WikiServicecanModifyPagePermission in interface WikiServicecurrentPage - The page to updatecurrentUser - The user that needs to update the pageWikiExceptionpublic boolean canPublicAndRetrictPage(Page currentPage, String currentUser) throws WikiException
WikiServicecanPublicAndRetrictPage in interface WikiServiceWikiExceptionpublic List<PageVersion> getVersionsOfPage(Page page) throws WikiException
WikiServicegetVersionsOfPage in interface WikiServicepage - The wiki pageWikiExceptionpublic PageVersion getVersionOfPageByName(String versionName, Page page) throws WikiException
WikiServicegetVersionOfPageByName in interface WikiServiceversionName - The name of the versionpage - The wiki pageWikiExceptionpublic void createVersionOfPage(Page page) throws WikiException
WikiServicecreateVersionOfPage in interface WikiServicepage - The wiki pageWikiExceptionpublic void restoreVersionOfPage(String versionName, Page page) throws WikiException
WikiServicerestoreVersionOfPage in interface WikiServiceversionName - The name of the version to restorepage - The wiki pageWikiExceptionpublic void updatePage(Page page, PageUpdateType updateType) throws WikiException
WikiServiceupdatePage in interface WikiServicepage - Updated pageupdateType - Type of updateWikiExceptionpublic List<String> getPreviousNamesOfPage(Page page) throws WikiException
WikiServicegetPreviousNamesOfPage in interface WikiServicepage - The wiki pageWikiExceptionpublic void createTemplatePage(Wiki wiki, Template template) throws WikiException
createTemplatePage in interface WikiServicewiki - Wiki of the templatetemplate - The params object which is used for creating the new Wiki template.WikiExceptionpublic Template getTemplatePage(WikiPageParams params, String templateId) throws WikiException
WikiServicegetTemplatePage in interface WikiServiceparams - The params object which is used for creating the Wiki template.templateId - Id of the wiki template.WikiExceptionpublic Map<String,Template> getTemplates(WikiPageParams params) throws WikiException
WikiServicegetTemplates in interface WikiServiceparams - The params object which is used for getting the wiki templates.WikiExceptionpublic List<TemplateSearchResult> searchTemplate(TemplateSearchData data) throws WikiException
WikiServicesearchTemplate in interface WikiServicedata - The data to search.WikiExceptionpublic void updateTemplate(Template template) throws WikiException
WikiServiceupdateTemplate in interface WikiServicetemplate - The updated wiki template.WikiExceptionpublic void deleteTemplatePage(String wikiType, String wikiOwner, String templateName) throws WikiException
WikiServicedeleteTemplatePage in interface WikiServicewikiType - It can be Portal, Group, or User.wikiOwner - The Wiki owner.templateName - Name of the Wiki template.WikiExceptionpublic void addRelatedPage(WikiPageParams orginaryPageParams, WikiPageParams relatedPageParams) throws WikiException
WikiServiceaddRelatedPage in interface WikiServiceorginaryPageParams - The params object of the current wiki page.relatedPageParams - The params object of the related page.WikiExceptionpublic List<Page> getRelatedPagesOfPage(Page page) throws WikiException
WikiServicegetRelatedPagesOfPage in interface WikiServicepage - The wiki page.WikiExceptionpublic void removeRelatedPage(WikiPageParams orginaryPageParams, WikiPageParams relatedPageParams) throws WikiException
WikiServiceremoveRelatedPage in interface WikiServiceorginaryPageParams - The params object of the current wiki page.relatedPageParams - The params object of the related page.WikiExceptionpublic Page getExsitedOrNewDraftPageById(String wikiType, String wikiOwner, String pageId) throws WikiException
getExsitedOrNewDraftPageById in interface WikiServicewikiType - It can be Portal, Group, or User.wikiOwner - The Wiki owner.pageId - Id of the wiki page.WikiExceptionpublic DraftPage createDraftForNewPage(DraftPage draftPage, Page parentPage, long clientTime) throws WikiException
WikiServicecreateDraftForNewPage in interface WikiServiceparentPage - The parent wiki page.clientTime - The time of client when the draft page is saved.WikiException - if the draft page cannot be created.public DraftPage createDraftForExistPage(DraftPage draftPage, Page targetPage, String revision, long clientTime) throws WikiException
WikiServicecreateDraftForExistPage in interface WikiServicetargetPage - 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.public DraftPage getDraftOfPage(Page page) throws WikiException
WikiServicegetDraftOfPage in interface WikiServicepage - The wiki page.WikiExceptionpublic DraftPage getLastestDraft() throws WikiException
WikiServicegetLastestDraft in interface WikiServiceWikiExceptionpublic DraftPage getDraft(String draftName) throws WikiException
WikiServicegetDraft in interface WikiServicedraftName - Name of the draft page.WikiExceptionpublic void removeDraftOfPage(WikiPageParams param) throws WikiException
WikiServiceremoveDraftOfPage in interface WikiServiceparam - The param object of the wiki page param.WikiExceptionpublic void removeDraft(String draftName) throws WikiException
WikiServiceremoveDraft in interface WikiServicedraftName - Name of the draft page.WikiExceptionpublic List<DraftPage> getDraftsOfUser(String username) throws WikiException
WikiServicegetDraftsOfUser in interface WikiServiceusername - Name of the user.WikiExceptionpublic boolean isDraftOutDated(DraftPage draftPage) throws WikiException
WikiServiceisDraftOutDated in interface WikiServiceWikiExceptionpublic org.exoplatform.commons.diff.DiffResult getDraftChanges(DraftPage draftPage) throws WikiException
WikiServicegetDraftChanges in interface WikiServiceWikiExceptionpublic List<Attachment> getAttachmentsOfPage(Page page) throws WikiException
getAttachmentsOfPage in interface WikiServicepage - The wiki pageWikiExceptionpublic List<Attachment> getAttachmentsOfPage(Page page, boolean loadContent) throws WikiException
WikiServicegetAttachmentsOfPage in interface WikiServicepage - The wiki pageWikiExceptionpublic int getNbOfAttachmentsOfPage(Page page) throws WikiException
WikiServicegetNbOfAttachmentsOfPage in interface WikiServicepage - The wiki pageWikiExceptionpublic Attachment getAttachmentOfPageByName(String attachmentName, Page page) throws WikiException
WikiServicegetAttachmentOfPageByName in interface WikiServiceattachmentName - The name of the attachmentpage - The wiki pageWikiExceptionpublic Attachment getAttachmentOfPageByName(String attachmentName, Page page, boolean loadContent) throws WikiException
WikiServicegetAttachmentOfPageByName in interface WikiServiceattachmentName - The name of the attachmentpage - The wiki pageloadContent - true to load the attachment contentWikiExceptionpublic void addAttachmentToPage(Attachment attachment, Page page) throws WikiException
WikiServiceaddAttachmentToPage in interface WikiServiceattachment - The attachment to addpage - The wiki pageWikiExceptionpublic void deleteAttachmentOfPage(String attachmentId, Page page) throws WikiException
WikiServicedeleteAttachmentOfPage in interface WikiServiceattachmentId - Id of the attachmentpage - The wiki pageWikiExceptionpublic List<String> getWatchersOfPage(Page page) throws WikiException
getWatchersOfPage in interface WikiServicepage - The wiki pageWikiExceptionpublic void addWatcherToPage(String username, Page page) throws WikiException
WikiServiceaddWatcherToPage in interface WikiServiceusername - Username of the user to add as watcherpage - The wiki pageWikiExceptionpublic void deleteWatcherOfPage(String username, Page page) throws WikiException
WikiServicedeleteWatcherOfPage in interface WikiServiceusername - Username of the user to delete as watcherpage - The wiki pageWikiExceptionpublic List<SpaceBean> searchSpaces(String keyword) throws WikiException
searchSpaces in interface WikiServicekeyword - The keyword to search for spaces.WikiExceptionpublic boolean hasAdminSpacePermission(String wikiType, String owner) throws WikiException
WikiServicehasAdminSpacePermission in interface WikiServicewikiType - It can be Portal, Group, or User.owner - Owner of the space.WikiExceptionpublic String getSpaceNameByGroupId(String groupId)
WikiServicegetSpaceNameByGroupId in interface WikiServicegroupId - The group Id.public void postUpdatePage(String wikiType, String wikiOwner, String pageId, Page page, PageUpdateType wikiUpdateType) throws WikiException
WikiExceptionpublic void postAddPage(String wikiType, String wikiOwner, String pageId, Page page) throws WikiException
WikiExceptionpublic void postDeletePage(String wikiType, String wikiOwner, String pageId, Page page) throws WikiException
WikiExceptionpublic void addAttachment(Attachment attachment, Page page) throws WikiException
WikiExceptionpublic void deleteAttachment(String attachmentId, Page page) throws WikiException
WikiExceptionpublic List<BreadcrumbData> getBreadcumb(String wikiType, String wikiOwner, String pageId) throws WikiException
WikiServicegetBreadcumb in interface WikiServicewikiType - It can be Portal, Group, or User.wikiOwner - The Wiki owner.pageId - Id of the wiki page to which the breadcrumb points.WikiExceptionpublic WikiPageParams getWikiPageParams(BreadcrumbData data)
WikiServicegetWikiPageParams in interface WikiServicedata - The data in the breadcrumb that identifies the wiki page.public boolean hasAdminPagePermission(String wikiType, String owner) throws WikiException
WikiServicehasAdminPagePermission in interface WikiServicewikiType - It can be Portal, Group, or User.owner - Owner of the wiki page.WikiExceptionpublic void createEmotionIcon(EmotionIcon emotionIcon) throws WikiException
WikiServicecreateEmotionIcon in interface WikiServiceemotionIcon - The emotion icon to addWikiExceptionpublic int getUploadLimit()
getUploadLimit in interface WikiServicepublic List<Page> getPagesOfWiki(String wikiType, String wikiOwner)
WikiServicegetPagesOfWiki in interface WikiServiceCopyright © 2003–2020 eXo Platform SAS. All rights reserved.