org.exoplatform.wiki.service
Interface WikiService

All Known Implementing Classes:
WikiServiceImpl

public interface WikiService

Provides functions for processing database with wikis and pages, including: adding, editing, removing and searching for data.


Method Summary
 void addComponentPlugin(org.exoplatform.container.component.ComponentPlugin plugin)
          Registers a component plugin into the Wiki service.
 boolean addRelatedPage(WikiPageParams orginaryPageParams, WikiPageParams relatedPageParams)
          Adds a related page to the current wiki page.
 void addWikiTemplatePagePlugin(WikiTemplatePagePlugin templatePlugin)
          Adds a Wiki template as plugin.
 DraftPage createDraftForExistPage(WikiPageParams param, String revision, long clientTime)
          Creates a draft page for a wiki page which is specified by a given param object.
 DraftPage createDraftForNewPage(WikiPageParams parentPageParam, long clientTime)
          Creates a draft page for a new wiki page whose parent is specified by a given param object.
 Page createPage(String wikiType, String wikiOwner, String title, String parentId)
          Creates a new wiki page.
 Template createTemplatePage(String title, WikiPageParams params)
          Creates a new Wiki template.
 void deleteDraftNewPage(String draftNewPageId)
          Deletes a draft page based on its Id.
 boolean deletePage(String wikiType, String wikiOwner, String pageId)
          Deletes a wiki page.
 void deleteTemplatePage(String wikiType, String wikiOwner, String templateId)
          Deletes a Wiki template.
 Object findByPath(String path, String objectNodeType)
          Finds a wiki page based on its type and relative path.
 InputStream getAttachmentAsStream(String path)
          Gets a stream of a wiki attachment.
 List<BreadcrumbData> getBreadcumb(String wikiType, String wikiOwner, String pageId)
          Gets a list of data which is used for composing the breadcrumb.
 String getDefaultWikiSyntaxId()
          Gets Id of a default Wiki syntax.
 DraftPage getDraft(String draftName)
          Gets a draft page by its name.
 DraftPage getDraft(WikiPageParams param)
          Gets a draft page of a wiki page which is specified by a given param object.
 List<DraftPage> getDrafts(String username)
          Gets a list of draft pages belonging to a given user.
 List<PageImpl> getDuplicatePages(PageImpl parentPage, Wiki targetWiki, List<PageImpl> 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
 Page getExsitedOrNewDraftPageById(String wikiType, String wikiOwner, String pageId)
          Gets a wiki page or its draft if existing by its Id.
 PageImpl getHelpSyntaxPage(String syntaxId)
          Gets a Help wiki page based on a given syntax Id.
 DraftPage getLastestDraft()
          Gets the last created draft of a wiki page.
 Page getMetaDataPage(MetaDataPage metaPage)
          Gets a wiki page of metadata.
 UserWiki getOrCreateUserWiki(String username)
          Gets a user Wiki.
 Page getPageById(String wikiType, String wikiOwner, String pageId)
          Gets a wiki page by a given Id.
 Page getPageByIdJCRQuery(String wikiType, String wikiOwner, String pageId)
          Gets a wiki page by a given Id using JCR query
 Page getPageByRootPermission(String wikiType, String wikiOwner, String pageId)
          Gets a wiki page regardless of the current user's permission.
 Page getPageByUUID(String uuid)
          Gets a wiki page based on its UUID.
 List<PageWikiListener> getPageListeners()
          Gets listeners of all wiki pages that are registered into the Wiki service.
 String getPageTitleOfAttachment(String path)
          Gets title of a wiki attachment.
 String getPortalOwner()
          Gets a portal owner.
 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> getRelatedPage(WikiPageParams pageParams)
          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.
 TemplateContainer getTemplatesContainer(WikiPageParams params)
          Gets a container of templates based on a given params object.
 Wiki getWiki(String wikiType, String owner)
          Gets a Wiki which is defined by its type and owner.
 Wiki getWikiById(String wikiId)
          Gets a Wiki by its Id.
 List<String> getWikiDefaultPermissions(String wikiType, String wikiOwner)
          Gets a list of Wiki default permissions.
 String getWikiNameById(String wikiId)
          Gets a Wiki name by its Id.
 Page getWikiPageByUUID(String uuid)
          Gets a wiki page by its UUID.
 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.
 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.
 void initDefaultTemplatePage(String path)
          Initializes a default Wiki template.
 boolean isExisting(String wikiType, String wikiOwner, String pageId)
          Checks if a wiki page exists or not.
 boolean isHiddenSpace(String groupId)
          Checks if a space is hidden or not.
 boolean isSpaceMember(String spaceId, String userId)
          Checks if a given user is member of space or not.
 void modifyTemplate(WikiPageParams params, Template template, String newName, String newDescription, String newContent, String newSyntaxId)
          Modifies an existing wiki template.
 boolean movePage(WikiPageParams currentLocationParams, WikiPageParams newLocationParams)
          Moves a wiki page.
 void postAddPage(String wikiType, String wikiOwner, String pageId, Page page)
          Creates an activity of a newly added wiki page.
 void postDeletePage(String wikiType, String wikiOwner, String pageId, Page page)
          Removes all activities related to a deleted wiki page.
 void postUpdatePage(String wikiType, String wikiOwner, String pageId, Page page, String wikiUpdateType)
          Creates an activity once a wiki page is updated.
 void removeDraft(String draftName)
          Removes a draft page by its name.
 void removeDraft(WikiPageParams param)
          Removes a draft page of a wiki page which is specified by the wiki page param.
 boolean 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.
 org.exoplatform.commons.utils.PageList<SearchResult> search(WikiSearchData data)
          Searches in all wiki pages.
 List<SearchResult> searchRenamedPage(String wikiType, String wikiOwner, String pageId)
          Searches from a list of renamed pages to find the pages whose old Ids are equal to the given page Id.
 List<SpaceBean> searchSpaces(String keyword)
          Searches for spaces by a given keyword.
 List<TemplateSearchResult> searchTemplate(TemplateSearchData data)
          Searches in all templates.
 void setWikiPermission(String wikiType, String wikiOwner, List<PermissionEntry> permissionEntries)
          Adds a list of permissions to Wiki.
 

Method Detail

createPage

Page createPage(String wikiType,
                String wikiOwner,
                String title,
                String parentId)
                throws Exception
Creates a new wiki page.

Parameters:
wikiType - It can be Portal, Group, or User.
wikiOwner - The Wiki owner.
title - Title of the wiki page.
parentId - Id of the parent wiki page.
Returns:
The new wiki page.
Throws:
Exception

createTemplatePage

Template createTemplatePage(String title,
                            WikiPageParams params)
                            throws Exception
Creates a new Wiki template.

Parameters:
title - Title of the Wiki template.
params - The params object which is used for creating the new Wiki template.
Returns:
The new Wiki template.
Throws:
Exception

initDefaultTemplatePage

void initDefaultTemplatePage(String path)
Initializes a default Wiki template.

Parameters:
path - The path in which the default Wiki template is initialized.

deletePage

boolean deletePage(String wikiType,
                   String wikiOwner,
                   String pageId)
                   throws Exception
Deletes a wiki page.

Parameters:
wikiType - It can be Portal, Group, or User.
wikiOwner - The Wiki owner.
pageId - Id of the wiki page.
Returns:
"True" if deleting the wiki page is successful, or "false" if not.
Throws:
Exception

deleteTemplatePage

void deleteTemplatePage(String wikiType,
                        String wikiOwner,
                        String templateId)
                        throws Exception
Deletes a Wiki template.

Parameters:
wikiType - It can be Portal, Group, or User.
wikiOwner - The Wiki owner.
templateId - Id of the Wiki template.
Throws:
Exception

deleteDraftNewPage

void deleteDraftNewPage(String draftNewPageId)
                        throws Exception
Deletes a draft page based on its Id.

Parameters:
draftNewPageId - Id of the draft page.
Throws:
Exception

renamePage

boolean renamePage(String wikiType,
                   String wikiOwner,
                   String pageName,
                   String newName,
                   String newTitle)
                   throws Exception
Renames a wiki page.

Parameters:
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.
Returns:
"True" if renaming the wiki page is successful, or "false" if not.
Throws:
Exception

movePage

boolean movePage(WikiPageParams currentLocationParams,
                 WikiPageParams newLocationParams)
                 throws Exception
Moves a wiki page.

Parameters:
currentLocationParams - The current location of the wiki page.
newLocationParams - The new location of the wiki page.
Returns:
"True" if moving the wiki page is successful, or "false" if not.
Throws:
Exception

getWikiPermission

List<PermissionEntry> getWikiPermission(String wikiType,
                                        String wikiOwner)
                                        throws Exception
Gets a list of Wiki permissions based on its type and owner.

Parameters:
wikiType - It can be Portal, Group, or User.
wikiOwner - The Wiki owner.
Returns:
The list of Wiki permissions.
Throws:
Exception

setWikiPermission

void setWikiPermission(String wikiType,
                       String wikiOwner,
                       List<PermissionEntry> permissionEntries)
                       throws Exception
Adds a list of permissions to Wiki.

Parameters:
wikiType - It can be Portal, Group, or User.
wikiOwner - The Wiki owner.
permissionEntries - The list of permissions.
Throws:
Exception

getPageById

Page getPageById(String wikiType,
                 String wikiOwner,
                 String pageId)
                 throws Exception
Gets a wiki page by a given Id.

Parameters:
wikiType - It can be Portal, Group, or User.
wikiOwner - The Wiki owner.
pageId - Id of the wiki page.
Returns:
The wiki page if the current user has the read permission. Otherwise, it is "null".
Throws:
Exception

getPageByIdJCRQuery

Page getPageByIdJCRQuery(String wikiType,
                         String wikiOwner,
                         String pageId)
                         throws Exception
Gets a wiki page by a given Id using JCR query

Parameters:
wikiType - It can be Portal, Group, or User.
wikiOwner - The Wiki owner.
pageId - Id of the wiki page.
Returns:
The wiki page if the current user has the read permission. Otherwise, it is "null".
Throws:
Exception

getPageByRootPermission

Page getPageByRootPermission(String wikiType,
                             String wikiOwner,
                             String pageId)
                             throws Exception
Gets a wiki page regardless of the current user's permission.

Parameters:
wikiType - It can be Portal, Group, or User.
wikiOwner - The Wiki owner.
pageId - Id of the wiki page.
Returns:
The wiki page.
Throws:
Exception

getRelatedPage

Page getRelatedPage(String wikiType,
                    String wikiOwner,
                    String pageId)
                    throws Exception
Gets a related page of a wiki page which is specified by a given Id.

Parameters:
wikiType - It can be Portal, Group, or User.
wikiOwner - The Wiki owner.
pageId - Id of the wiki page.
Returns:
The related wiki page.
Throws:
Exception

getExsitedOrNewDraftPageById

Page getExsitedOrNewDraftPageById(String wikiType,
                                  String wikiOwner,
                                  String pageId)
                                  throws Exception
Gets a wiki page or its draft if existing by its Id.

Parameters:
wikiType - It can be Portal, Group, or User.
wikiOwner - The Wiki owner.
pageId - Id of the wiki page.
Returns:
The wiki page or its draft.
Throws:
Exception

getPageByUUID

Page getPageByUUID(String uuid)
                   throws Exception
Gets a wiki page based on its UUID.

Parameters:
uuid - UUID of the wiki page.
Returns:
The wiki page.
Throws:
Exception

getTemplatePage

Template getTemplatePage(WikiPageParams params,
                         String templateId)
                         throws Exception
Gets a Wiki template.

Parameters:
params - The params object which is used for creating the Wiki template.
templateId - Id of the wiki template.
Returns:
The wiki template.
Throws:
Exception

getBreadcumb

List<BreadcrumbData> getBreadcumb(String wikiType,
                                  String wikiOwner,
                                  String pageId)
                                  throws Exception
Gets a list of data which is used for composing the breadcrumb.

Parameters:
wikiType - It can be Portal, Group, or User.
wikiOwner - The Wiki owner.
pageId - Id of the wiki page to which the breadcrumb points.
Returns:
The list of data.
Throws:
Exception

getWikiPageParams

WikiPageParams getWikiPageParams(BreadcrumbData data)
                                 throws Exception
Gets parameters of a wiki page based on the data stored in the breadcrumb.

Parameters:
data - The data in the breadcrumb that identifies the wiki page.
Returns:
The parameters identifying the wiki page.
Throws:
Exception

search

org.exoplatform.commons.utils.PageList<SearchResult> search(WikiSearchData data)
                                                            throws Exception
Searches in all wiki pages.

Parameters:
data - The data to search.
Returns:
Search results.
Throws:
Exception

searchTemplate

List<TemplateSearchResult> searchTemplate(TemplateSearchData data)
                                          throws Exception
Searches in all templates.

Parameters:
data - The data to search.
Returns:
Search results.
Throws:
Exception

searchRenamedPage

List<SearchResult> searchRenamedPage(String wikiType,
                                     String wikiOwner,
                                     String pageId)
                                     throws Exception
Searches from a list of renamed pages to find the pages whose old Ids are equal to the given page Id.

Parameters:
wikiType - It can be Portal, Group, or User.
wikiOwner - The Wiki owner.
pageId - Id of the page before it is renamed.
Returns:
The pages whose old Ids are equal to 'pageId'.
Throws:
Exception

getDuplicatePages

List<PageImpl> getDuplicatePages(PageImpl parentPage,
                                 Wiki targetWiki,
                                 List<PageImpl> resultList)
                                 throws Exception
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.

Parameters:
parentPage - The page to check.
targetWiki - The target Wiki to check.
resultList - The list of duplicated wiki pages.
Returns:
The list of duplicated wiki pages.
Throws:
Exception

findByPath

Object findByPath(String path,
                  String objectNodeType)
                  throws Exception
Finds a wiki page based on its type and relative path.

Parameters:
path - The relative path to find.
objectNodeType - The node type can be page, attachment or template.
Returns:
A wiki object that can be page, attachement or template.
Throws:
Exception

getDefaultWikiSyntaxId

String getDefaultWikiSyntaxId()
Gets Id of a default Wiki syntax.

Returns:
The Id.

getSaveDraftSequenceTime

long getSaveDraftSequenceTime()
Gets an interval which specifies the periodical auto-saving for pages in Wiki.

Returns:
The interval. Its default value is 30 seconds.

getEditPageLivingTime

long getEditPageLivingTime()
Get the living time of edited page

Returns:
The living time of edited page

getPageTitleOfAttachment

String getPageTitleOfAttachment(String path)
                                throws Exception
Gets title of a wiki attachment.

Parameters:
path - Path of the attachment.
Returns:
Title of the attachment.
Throws:
Exception

getAttachmentAsStream

InputStream getAttachmentAsStream(String path)
                                  throws Exception
Gets a stream of a wiki attachment.

Parameters:
path - Path of the wiki attachment.
Returns:
The stream of the wiki attachment.
Throws:
Exception

getHelpSyntaxPage

PageImpl getHelpSyntaxPage(String syntaxId)
                           throws Exception
Gets a Help wiki page based on a given syntax Id.

Parameters:
syntaxId - Id of the syntax.
Returns:
The Help wiki page.
Throws:
Exception

getMetaDataPage

Page getMetaDataPage(MetaDataPage metaPage)
                     throws Exception
Gets a wiki page of metadata.

Parameters:
metaPage - The metadata to use, mainly emoticons.
Returns:
The wiki page of metadata.
Throws:
Exception

getTemplates

Map<String,Template> getTemplates(WikiPageParams params)
                                  throws Exception
Gets a map of wiki templates based on a given params object.

Parameters:
params - The params object which is used for getting the wiki templates.
Returns:
The map of wiki templates.
Throws:
Exception

getTemplatesContainer

TemplateContainer getTemplatesContainer(WikiPageParams params)
                                        throws Exception
Gets a container of templates based on a given params object.

Parameters:
params - The params object which is used for getting the containers.
Returns:
The container of templates.
Throws:
Exception

modifyTemplate

void modifyTemplate(WikiPageParams params,
                    Template template,
                    String newName,
                    String newDescription,
                    String newContent,
                    String newSyntaxId)
                    throws Exception
Modifies an existing wiki template.

Parameters:
params - The params object which is used for getting the wiki template.
template - The wiki template to be modified.
newName - New name of the wiki template.
newDescription - New description of the wiki template.
newContent - New content of the wiki template.
newSyntaxId - New syntax Id of the wiki template.
Throws:
Exception

isExisting

boolean isExisting(String wikiType,
                   String wikiOwner,
                   String pageId)
                   throws Exception
Checks if a wiki page exists or not.

Parameters:
wikiType - It can be Portal, Group, or User.
wikiOwner - The Wiki owner.
pageId - Id of the wiki page.
Returns:
The returned value is "true" if the page exists, or "false" if not.
Throws:
Exception

getWikiDefaultPermissions

List<String> getWikiDefaultPermissions(String wikiType,
                                       String wikiOwner)
                                       throws Exception
Gets a list of Wiki default permissions.

Parameters:
wikiType - It can be Portal, Group, or User.
wikiOwner - The Wiki owner.
Returns:
The list of Wiki default permissions.
Throws:
Exception

addComponentPlugin

void addComponentPlugin(org.exoplatform.container.component.ComponentPlugin plugin)
Registers a component plugin into the Wiki service.

Parameters:
plugin - The component plugin to be registered.

addWikiTemplatePagePlugin

void addWikiTemplatePagePlugin(WikiTemplatePagePlugin templatePlugin)
Adds a Wiki template as plugin.

Parameters:
templatePlugin - The wiki template plugin to be added.

getPageListeners

List<PageWikiListener> getPageListeners()
Gets listeners of all wiki pages that are registered into the Wiki service.

Returns:
The list of listeners.

addRelatedPage

boolean addRelatedPage(WikiPageParams orginaryPageParams,
                       WikiPageParams relatedPageParams)
                       throws Exception
Adds a related page to the current wiki page.

Parameters:
orginaryPageParams - The params object of the current wiki page.
relatedPageParams - The params object of the related page.
Returns:
"True" if adding the related page is successful, or "false" if not.
Throws:
Exception

getRelatedPage

List<Page> getRelatedPage(WikiPageParams pageParams)
                          throws Exception
Gets a list of related pages based on a given param.

Parameters:
pageParams - The params object of the wiki page.
Returns:
The list of related pages.
Throws:
Exception

removeRelatedPage

boolean removeRelatedPage(WikiPageParams orginaryPageParams,
                          WikiPageParams relatedPageParams)
                          throws Exception
Removes a related page of the current wiki page.

Parameters:
orginaryPageParams - The params object of the current wiki page.
relatedPageParams - The params object of the related page.
Returns:
"True" if removing the related page is successful, or "false" if not.
Throws:
Exception

createDraftForExistPage

DraftPage createDraftForExistPage(WikiPageParams param,
                                  String revision,
                                  long clientTime)
                                  throws Exception
Creates a draft page for a wiki page which is specified by a given param object.

Parameters:
param - The param object of the 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.
Returns:
The draft page.
Throws:
Exception - if the draft page cannot be created.

createDraftForNewPage

DraftPage createDraftForNewPage(WikiPageParams parentPageParam,
                                long clientTime)
                                throws Exception
Creates a draft page for a new wiki page whose parent is specified by a given param object.

Parameters:
parentPageParam - The param object of the parent wiki page.
clientTime - The time of client when the draft page is saved.
Returns:
The draft page.
Throws:
Exception - if the draft page cannot be created.

getDraft

DraftPage getDraft(WikiPageParams param)
                   throws Exception
Gets a draft page of a wiki page which is specified by a given param object.

Parameters:
param - The param object of the wiki page.
Returns:
The draft page, or "null" if the draft page does not exist.
Throws:
Exception

getDraft

DraftPage getDraft(String draftName)
                   throws Exception
Gets a draft page by its name.

Parameters:
draftName - Name of the draft page.
Returns:
The draft page, or "null" if it does not exist.
Throws:
Exception

removeDraft

void removeDraft(WikiPageParams param)
                 throws Exception
Removes a draft page of a wiki page which is specified by the wiki page param.

Parameters:
param - The param object of the wiki page param.
Throws:
Exception

removeDraft

void removeDraft(String draftName)
                 throws Exception
Removes a draft page by its name.

Parameters:
draftName - Name of the draft page.
Throws:
Exception

getDrafts

List<DraftPage> getDrafts(String username)
                          throws Exception
Gets a list of draft pages belonging to a given user.

Parameters:
username - Name of the user.
Returns:
The list of draft pages.
Throws:
Exception

getWikiPageByUUID

Page getWikiPageByUUID(String uuid)
                       throws Exception
Gets a wiki page by its UUID.

Parameters:
uuid - UUID of the wiki page.
Returns:
The wiki page.
Throws:
Exception

getLastestDraft

DraftPage getLastestDraft()
                          throws Exception
Gets the last created draft of a wiki page.

Returns:
The last draft.
Throws:
Exception

getOrCreateUserWiki

UserWiki getOrCreateUserWiki(String username)
Gets a user Wiki. If it does not exist, the new one will be created.

Parameters:
username - Name of the user.
Returns:
The user Wiki.

getSpaceNameByGroupId

String getSpaceNameByGroupId(String groupId)
                             throws Exception
Gets a space name by a given group Id.

Parameters:
groupId - The group Id.
Returns:
The space name.
Throws:
Exception

searchSpaces

List<SpaceBean> searchSpaces(String keyword)
                             throws Exception
Searches for spaces by a given keyword.

Parameters:
keyword - The keyword to search for spaces.
Returns:
The list of spaces matching with the keyword.
Throws:
Exception

getWiki

Wiki getWiki(String wikiType,
             String owner)
Gets a Wiki which is defined by its type and owner.

Parameters:
wikiType - It can be Portal, Group, or User.
owner - The Wiki owner.
Returns:
The Wiki.

getPortalOwner

String getPortalOwner()
Gets a portal owner.

Returns:
The portal owner.

getWikiWebappUri

String getWikiWebappUri()
Gets a Wiki webapp URI.

Returns:
The Wiki webapp URI.

isSpaceMember

boolean isSpaceMember(String spaceId,
                      String userId)
Checks if a given user is member of space or not.

Parameters:
spaceId - Id of the space.
userId - The username.
Returns:
"True" if the user is member, or "false" if not.

isHiddenSpace

boolean isHiddenSpace(String groupId)
                      throws Exception
Checks if a space is hidden or not.

Parameters:
groupId - Id of the group.
Returns:
The returned value is "true" if the space is hidden, or "false" if not.
Throws:
Exception

hasAdminSpacePermission

boolean hasAdminSpacePermission(String wikiType,
                                String owner)
                                throws Exception
Checks if the current user has the admin permission on a space or not.

Parameters:
wikiType - It can be Portal, Group, or User.
owner - Owner of the space.
Returns:
The returned value is "true" if the current user has the admin permission on the space, or "false" if not.
Throws:
Exception

hasAdminPagePermission

boolean hasAdminPagePermission(String wikiType,
                               String owner)
                               throws Exception
Checks if the current user has the admin permission on a wiki page.

Parameters:
wikiType - It can be Portal, Group, or User.
owner - Owner of the wiki page.
Returns:
"True" if the current user has the admin permission on the wiki page, or "false" if not.
Throws:
Exception

postUpdatePage

void postUpdatePage(String wikiType,
                    String wikiOwner,
                    String pageId,
                    Page page,
                    String wikiUpdateType)
                    throws Exception
Creates an activity once a wiki page is updated.

Parameters:
wikiType - It can be Portal, Group, or User.
wikiOwner - The Wiki owner.
pageId - Id of the wiki page.
page - The wiki page.
wikiUpdateType - The update type (edit title, edit content, or edit both).
Throws:
Exception

postAddPage

void postAddPage(String wikiType,
                 String wikiOwner,
                 String pageId,
                 Page page)
                 throws Exception
Creates an activity of a newly added wiki page.

Parameters:
wikiType - It can be Portal, Group, or User.
wikiOwner - The Wiki owner.
pageId - Id of the new wiki page.
page - The wiki page.
Throws:
Exception

postDeletePage

void postDeletePage(String wikiType,
                    String wikiOwner,
                    String pageId,
                    Page page)
                    throws Exception
Removes all activities related to a deleted wiki page.

Parameters:
wikiType - It can be Portal, Group, or User.
wikiOwner - The Wiki owner.
pageId - Id of the deleted wiki page.
page - The deleted wiki page.
Throws:
Exception

getWikiById

Wiki getWikiById(String wikiId)
Gets a Wiki by its Id.

Parameters:
wikiId - The Wiki Id.
Returns:
The Wiki.

getWikiNameById

String getWikiNameById(String wikiId)
                       throws Exception
Gets a Wiki name by its Id.

Parameters:
wikiId - The Wiki Id.
Returns:
The Wiki name.
Throws:
Exception


Copyright © 2003-2013 eXo Platform SAS. All Rights Reserved.