public interface WikiService
Modifier and Type | Method and Description |
---|---|
void |
addComponentPlugin(org.exoplatform.container.component.ComponentPlugin plugin)
Registers a component plugin into the Wiki service.
|
boolean |
addRelatedPage(org.exoplatform.wiki.service.WikiPageParams orginaryPageParams,
org.exoplatform.wiki.service.WikiPageParams relatedPageParams)
Adds a related page to the current wiki page.
|
void |
addWikiTemplatePagePlugin(org.exoplatform.wiki.template.plugin.WikiTemplatePagePlugin templatePlugin)
Adds a Wiki template as plugin.
|
org.exoplatform.wiki.mow.api.DraftPage |
createDraftForExistPage(org.exoplatform.wiki.service.WikiPageParams param,
String revision,
long clientTime)
Creates a draft page for a wiki page which is specified by a given param object.
|
org.exoplatform.wiki.mow.api.DraftPage |
createDraftForNewPage(org.exoplatform.wiki.service.WikiPageParams parentPageParam,
long clientTime)
Creates a draft page for a new wiki page whose parent is specified by a given param object.
|
org.exoplatform.wiki.mow.api.Page |
createPage(String wikiType,
String wikiOwner,
String title,
String parentId)
Creates a new wiki page.
|
org.exoplatform.wiki.mow.core.api.wiki.Template |
createTemplatePage(String title,
org.exoplatform.wiki.service.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<org.exoplatform.wiki.service.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.
|
org.exoplatform.wiki.mow.api.DraftPage |
getDraft(String draftName)
Gets a draft page by its name.
|
org.exoplatform.wiki.mow.api.DraftPage |
getDraft(org.exoplatform.wiki.service.WikiPageParams param)
Gets a draft page of a wiki page which is specified by a given param object.
|
List<org.exoplatform.wiki.mow.api.DraftPage> |
getDrafts(String username)
Gets a list of draft pages belonging to a given user.
|
List<org.exoplatform.wiki.mow.core.api.wiki.PageImpl> |
getDuplicatePages(org.exoplatform.wiki.mow.core.api.wiki.PageImpl parentPage,
org.exoplatform.wiki.mow.api.Wiki targetWiki,
List<org.exoplatform.wiki.mow.core.api.wiki.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
|
org.exoplatform.wiki.mow.api.Page |
getExsitedOrNewDraftPageById(String wikiType,
String wikiOwner,
String pageId)
Gets a wiki page or its draft if existing by its Id.
|
org.exoplatform.wiki.mow.core.api.wiki.PageImpl |
getHelpSyntaxPage(String syntaxId)
Gets a Help wiki page based on a given syntax Id.
|
org.exoplatform.wiki.mow.api.DraftPage |
getLastestDraft()
Gets the last created draft of a wiki page.
|
org.exoplatform.wiki.mow.api.Page |
getMetaDataPage(org.exoplatform.wiki.service.MetaDataPage metaPage)
Gets a wiki page of metadata.
|
org.exoplatform.wiki.mow.core.api.wiki.UserWiki |
getOrCreateUserWiki(String username)
Gets a user Wiki.
|
org.exoplatform.wiki.mow.api.Page |
getPageById(String wikiType,
String wikiOwner,
String pageId)
Gets a wiki page by a given Id.
|
org.exoplatform.wiki.mow.api.Page |
getPageByIdJCRQuery(String wikiType,
String wikiOwner,
String pageId)
Gets a wiki page by a given Id using JCR query
|
org.exoplatform.wiki.mow.api.Page |
getPageByRootPermission(String wikiType,
String wikiOwner,
String pageId)
Gets a wiki page regardless of the current user's permission.
|
org.exoplatform.wiki.mow.api.Page |
getPageByUUID(String uuid)
Gets a wiki page based on its UUID.
|
List<org.exoplatform.wiki.service.listener.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.
|
org.exoplatform.wiki.mow.api.Page |
getRelatedPage(String wikiType,
String wikiOwner,
String pageId)
Gets a related page of a wiki page which is specified by a given Id.
|
List<org.exoplatform.wiki.mow.api.Page> |
getRelatedPage(org.exoplatform.wiki.service.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.
|
org.exoplatform.wiki.mow.core.api.wiki.Template |
getTemplatePage(org.exoplatform.wiki.service.WikiPageParams params,
String templateId)
Gets a Wiki template.
|
Map<String,org.exoplatform.wiki.mow.core.api.wiki.Template> |
getTemplates(org.exoplatform.wiki.service.WikiPageParams params)
Gets a map of wiki templates based on a given params object.
|
org.exoplatform.wiki.mow.core.api.wiki.TemplateContainer |
getTemplatesContainer(org.exoplatform.wiki.service.WikiPageParams params)
Gets a container of templates based on a given params object.
|
org.exoplatform.wiki.mow.api.Wiki |
getWiki(String wikiType,
String owner)
Gets a Wiki which is defined by its type and owner.
|
org.exoplatform.wiki.mow.api.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.
|
org.exoplatform.wiki.mow.api.Page |
getWikiPageByUUID(String uuid)
Gets a wiki page by its UUID.
|
org.exoplatform.wiki.service.WikiPageParams |
getWikiPageParams(org.exoplatform.wiki.service.BreadcrumbData data)
Gets parameters of a wiki page based on the data stored in the breadcrumb.
|
List<org.exoplatform.wiki.service.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(org.exoplatform.wiki.service.WikiPageParams params,
org.exoplatform.wiki.mow.core.api.wiki.Template template,
String newName,
String newDescription,
String newContent,
String newSyntaxId)
Modifies an existing wiki template.
|
boolean |
movePage(org.exoplatform.wiki.service.WikiPageParams currentLocationParams,
org.exoplatform.wiki.service.WikiPageParams newLocationParams)
Move a wiki Page
|
void |
postAddPage(String wikiType,
String wikiOwner,
String pageId,
org.exoplatform.wiki.mow.api.Page page)
Creates an activity of a newly added wiki page.
|
void |
postDeletePage(String wikiType,
String wikiOwner,
String pageId,
org.exoplatform.wiki.mow.api.Page page)
Removes all activities related to a deleted wiki page.
|
void |
postUpdatePage(String wikiType,
String wikiOwner,
String pageId,
org.exoplatform.wiki.mow.api.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(org.exoplatform.wiki.service.WikiPageParams param)
Removes a draft page of a wiki page which is specified by the wiki page param.
|
boolean |
removeRelatedPage(org.exoplatform.wiki.service.WikiPageParams orginaryPageParams,
org.exoplatform.wiki.service.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<org.exoplatform.wiki.service.search.SearchResult> |
search(org.exoplatform.wiki.service.search.WikiSearchData data)
Searches in all wiki pages.
|
List<org.exoplatform.wiki.service.search.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<org.exoplatform.wiki.service.impl.SpaceBean> |
searchSpaces(String keyword)
Searches for spaces by a given keyword.
|
List<org.exoplatform.wiki.service.search.TemplateSearchResult> |
searchTemplate(org.exoplatform.wiki.service.search.TemplateSearchData data)
Searches in all templates.
|
void |
setWikiPermission(String wikiType,
String wikiOwner,
List<org.exoplatform.wiki.service.PermissionEntry> permissionEntries)
Adds a list of permissions to Wiki.
|
org.exoplatform.wiki.mow.api.Page createPage(String wikiType, String wikiOwner, String title, String parentId) throws Exception
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.Exception
org.exoplatform.wiki.mow.core.api.wiki.Template createTemplatePage(String title, org.exoplatform.wiki.service.WikiPageParams params) throws Exception
title
- Title of the Wiki template.params
- The params object which is used for creating the new Wiki template.Exception
void initDefaultTemplatePage(String path)
path
- The path in which the default Wiki template is initialized.boolean deletePage(String wikiType, String wikiOwner, String pageId) throws Exception
wikiType
- It can be Portal, Group, or User.wikiOwner
- The Wiki owner.pageId
- Id of the wiki page.Exception
void deleteTemplatePage(String wikiType, String wikiOwner, String templateId) throws Exception
wikiType
- It can be Portal, Group, or User.wikiOwner
- The Wiki owner.templateId
- Id of the Wiki template.Exception
void deleteDraftNewPage(String draftNewPageId) throws Exception
draftNewPageId
- Id of the draft page.Exception
boolean renamePage(String wikiType, String wikiOwner, String pageName, String newName, String newTitle) throws Exception
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.Exception
boolean movePage(org.exoplatform.wiki.service.WikiPageParams currentLocationParams, org.exoplatform.wiki.service.WikiPageParams newLocationParams) throws Exception
currentLocationParams
- The current location of the wiki page.newLocationParams
- The new location of the wiki page.Exception
List<org.exoplatform.wiki.service.PermissionEntry> getWikiPermission(String wikiType, String wikiOwner) throws Exception
wikiType
- It can be Portal, Group, or User.wikiOwner
- The Wiki owner.Exception
void setWikiPermission(String wikiType, String wikiOwner, List<org.exoplatform.wiki.service.PermissionEntry> permissionEntries) throws Exception
wikiType
- It can be Portal, Group, or User.wikiOwner
- The Wiki owner.permissionEntries
- The list of permissions.Exception
org.exoplatform.wiki.mow.api.Page getPageById(String wikiType, String wikiOwner, String pageId) throws Exception
wikiType
- It can be Portal, Group, or User.wikiOwner
- The Wiki owner.pageId
- Id of the wiki page.Exception
org.exoplatform.wiki.mow.api.Page getPageByIdJCRQuery(String wikiType, String wikiOwner, String pageId) throws Exception
wikiType
- It can be Portal, Group, or User.wikiOwner
- The Wiki owner.pageId
- Id of the wiki page.Exception
org.exoplatform.wiki.mow.api.Page getPageByRootPermission(String wikiType, String wikiOwner, String pageId) throws Exception
wikiType
- It can be Portal, Group, or User.wikiOwner
- The Wiki owner.pageId
- Id of the wiki page.Exception
org.exoplatform.wiki.mow.api.Page getRelatedPage(String wikiType, String wikiOwner, String pageId) throws Exception
wikiType
- It can be Portal, Group, or User.wikiOwner
- The Wiki owner.pageId
- Id of the wiki page.Exception
org.exoplatform.wiki.mow.api.Page getExsitedOrNewDraftPageById(String wikiType, String wikiOwner, String pageId) throws Exception
wikiType
- It can be Portal, Group, or User.wikiOwner
- The Wiki owner.pageId
- Id of the wiki page.Exception
org.exoplatform.wiki.mow.api.Page getPageByUUID(String uuid) throws Exception
uuid
- UUID of the wiki page.Exception
org.exoplatform.wiki.mow.core.api.wiki.Template getTemplatePage(org.exoplatform.wiki.service.WikiPageParams params, String templateId) throws Exception
params
- The params object which is used for creating the Wiki template.templateId
- Id of the wiki template.Exception
List<org.exoplatform.wiki.service.BreadcrumbData> getBreadcumb(String wikiType, String wikiOwner, String pageId) throws Exception
wikiType
- It can be Portal, Group, or User.wikiOwner
- The Wiki owner.pageId
- Id of the wiki page to which the breadcrumb points.Exception
org.exoplatform.wiki.service.WikiPageParams getWikiPageParams(org.exoplatform.wiki.service.BreadcrumbData data) throws Exception
data
- The data in the breadcrumb that identifies the wiki page.Exception
org.exoplatform.commons.utils.PageList<org.exoplatform.wiki.service.search.SearchResult> search(org.exoplatform.wiki.service.search.WikiSearchData data) throws Exception
data
- The data to search.Exception
List<org.exoplatform.wiki.service.search.TemplateSearchResult> searchTemplate(org.exoplatform.wiki.service.search.TemplateSearchData data) throws Exception
data
- The data to search.Exception
List<org.exoplatform.wiki.service.search.SearchResult> searchRenamedPage(String wikiType, String wikiOwner, String pageId) throws Exception
wikiType
- It can be Portal, Group, or User.wikiOwner
- The Wiki owner.pageId
- Id of the page before it is renamed.Exception
List<org.exoplatform.wiki.mow.core.api.wiki.PageImpl> getDuplicatePages(org.exoplatform.wiki.mow.core.api.wiki.PageImpl parentPage, org.exoplatform.wiki.mow.api.Wiki targetWiki, List<org.exoplatform.wiki.mow.core.api.wiki.PageImpl> resultList) throws Exception
parentPage
- The page to check.targetWiki
- The target Wiki to check.resultList
- The list of duplicated wiki pages.Exception
Object findByPath(String path, String objectNodeType) throws Exception
path
- The relative path to find.objectNodeType
- The node type can be page, attachment or template.Exception
String getDefaultWikiSyntaxId()
long getSaveDraftSequenceTime()
long getEditPageLivingTime()
String getPageTitleOfAttachment(String path) throws Exception
path
- Path of the attachment.Exception
InputStream getAttachmentAsStream(String path) throws Exception
path
- Path of the wiki attachment.Exception
org.exoplatform.wiki.mow.core.api.wiki.PageImpl getHelpSyntaxPage(String syntaxId) throws Exception
syntaxId
- Id of the syntax.Exception
org.exoplatform.wiki.mow.api.Page getMetaDataPage(org.exoplatform.wiki.service.MetaDataPage metaPage) throws Exception
metaPage
- The metadata to use, mainly emoticons.Exception
Map<String,org.exoplatform.wiki.mow.core.api.wiki.Template> getTemplates(org.exoplatform.wiki.service.WikiPageParams params) throws Exception
params
- The params object which is used for getting the wiki templates.Exception
org.exoplatform.wiki.mow.core.api.wiki.TemplateContainer getTemplatesContainer(org.exoplatform.wiki.service.WikiPageParams params) throws Exception
params
- The params object which is used for getting the containers.Exception
void modifyTemplate(org.exoplatform.wiki.service.WikiPageParams params, org.exoplatform.wiki.mow.core.api.wiki.Template template, String newName, String newDescription, String newContent, String newSyntaxId) throws Exception
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.Exception
boolean isExisting(String wikiType, String wikiOwner, String pageId) throws Exception
wikiType
- It can be Portal, Group, or User.wikiOwner
- The Wiki owner.pageId
- Id of the wiki page.Exception
List<String> getWikiDefaultPermissions(String wikiType, String wikiOwner) throws Exception
wikiType
- It can be Portal, Group, or User.wikiOwner
- The Wiki owner.Exception
void addComponentPlugin(org.exoplatform.container.component.ComponentPlugin plugin)
plugin
- The component plugin to be registered.void addWikiTemplatePagePlugin(org.exoplatform.wiki.template.plugin.WikiTemplatePagePlugin templatePlugin)
templatePlugin
- The wiki template plugin to be added.List<org.exoplatform.wiki.service.listener.PageWikiListener> getPageListeners()
boolean addRelatedPage(org.exoplatform.wiki.service.WikiPageParams orginaryPageParams, org.exoplatform.wiki.service.WikiPageParams relatedPageParams) throws Exception
orginaryPageParams
- The params object of the current wiki page.relatedPageParams
- The params object of the related page.Exception
List<org.exoplatform.wiki.mow.api.Page> getRelatedPage(org.exoplatform.wiki.service.WikiPageParams pageParams) throws Exception
pageParams
- The params object of the wiki page.Exception
boolean removeRelatedPage(org.exoplatform.wiki.service.WikiPageParams orginaryPageParams, org.exoplatform.wiki.service.WikiPageParams relatedPageParams) throws Exception
orginaryPageParams
- The params object of the current wiki page.relatedPageParams
- The params object of the related page.Exception
org.exoplatform.wiki.mow.api.DraftPage createDraftForExistPage(org.exoplatform.wiki.service.WikiPageParams param, String revision, long clientTime) throws Exception
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.Exception
- if the draft page cannot be created.org.exoplatform.wiki.mow.api.DraftPage createDraftForNewPage(org.exoplatform.wiki.service.WikiPageParams parentPageParam, long clientTime) throws Exception
parentPageParam
- The param object of the parent wiki page.clientTime
- The time of client when the draft page is saved.Exception
- if the draft page cannot be created.org.exoplatform.wiki.mow.api.DraftPage getDraft(org.exoplatform.wiki.service.WikiPageParams param) throws Exception
param
- The param object of the wiki page.Exception
org.exoplatform.wiki.mow.api.DraftPage getDraft(String draftName) throws Exception
draftName
- Name of the draft page.Exception
void removeDraft(org.exoplatform.wiki.service.WikiPageParams param) throws Exception
param
- The param object of the wiki page param.Exception
void removeDraft(String draftName) throws Exception
draftName
- Name of the draft page.Exception
List<org.exoplatform.wiki.mow.api.DraftPage> getDrafts(String username) throws Exception
username
- Name of the user.Exception
org.exoplatform.wiki.mow.api.Page getWikiPageByUUID(String uuid) throws Exception
uuid
- UUID of the wiki page.Exception
org.exoplatform.wiki.mow.api.DraftPage getLastestDraft() throws Exception
Exception
org.exoplatform.wiki.mow.core.api.wiki.UserWiki getOrCreateUserWiki(String username)
username
- Name of the user.String getSpaceNameByGroupId(String groupId) throws Exception
groupId
- The group Id.Exception
List<org.exoplatform.wiki.service.impl.SpaceBean> searchSpaces(String keyword) throws Exception
keyword
- The keyword to search for spaces.Exception
org.exoplatform.wiki.mow.api.Wiki getWiki(String wikiType, String owner)
wikiType
- It can be Portal, Group, or User.owner
- The Wiki owner.String getPortalOwner()
String getWikiWebappUri()
boolean isSpaceMember(String spaceId, String userId)
spaceId
- Id of the space.userId
- The username.boolean isHiddenSpace(String groupId) throws Exception
groupId
- Id of the group.Exception
boolean hasAdminSpacePermission(String wikiType, String owner) throws Exception
wikiType
- It can be Portal, Group, or User.owner
- Owner of the space.Exception
boolean hasAdminPagePermission(String wikiType, String owner) throws Exception
wikiType
- It can be Portal, Group, or User.owner
- Owner of the wiki page.Exception
void postUpdatePage(String wikiType, String wikiOwner, String pageId, org.exoplatform.wiki.mow.api.Page page, String wikiUpdateType) throws Exception
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).Exception
void postAddPage(String wikiType, String wikiOwner, String pageId, org.exoplatform.wiki.mow.api.Page page) throws Exception
wikiType
- It can be Portal, Group, or User.wikiOwner
- The Wiki owner.pageId
- Id of the new wiki page.page
- The wiki page.Exception
void postDeletePage(String wikiType, String wikiOwner, String pageId, org.exoplatform.wiki.mow.api.Page page) throws Exception
wikiType
- It can be Portal, Group, or User.wikiOwner
- The Wiki owner.pageId
- Id of the deleted wiki page.page
- The deleted wiki page.Exception
org.exoplatform.wiki.mow.api.Wiki getWikiById(String wikiId)
wikiId
- The Wiki Id.Copyright © 2003-2017 eXo Platform SAS. All Rights Reserved.