|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
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 |
|---|
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
Template createTemplatePage(String title,
WikiPageParams params)
throws Exception
title - Title of the Wiki template.params - The params object which is used for creating the new Wiki template.
Exceptionvoid 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(WikiPageParams currentLocationParams,
WikiPageParams newLocationParams)
throws Exception
currentLocationParams - The current location of the wiki page.newLocationParams - The new location of the wiki page.
Exception
List<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<PermissionEntry> permissionEntries)
throws Exception
wikiType - It can be Portal, Group, or User.wikiOwner - The Wiki owner.permissionEntries - The list of permissions.
Exception
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
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
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
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
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
Page getPageByUUID(String uuid)
throws Exception
uuid - UUID of the wiki page.
Exception
Template getTemplatePage(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<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
WikiPageParams getWikiPageParams(BreadcrumbData data)
throws Exception
data - The data in the breadcrumb that identifies the wiki page.
Exception
org.exoplatform.commons.utils.PageList<SearchResult> search(WikiSearchData data)
throws Exception
data - The data to search.
Exception
List<TemplateSearchResult> searchTemplate(TemplateSearchData data)
throws Exception
data - The data to search.
Exception
List<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<PageImpl> getDuplicatePages(PageImpl parentPage,
Wiki targetWiki,
List<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.
ExceptionString 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
PageImpl getHelpSyntaxPage(String syntaxId)
throws Exception
syntaxId - Id of the syntax.
Exception
Page getMetaDataPage(MetaDataPage metaPage)
throws Exception
metaPage - The metadata to use, mainly emoticons.
Exception
Map<String,Template> getTemplates(WikiPageParams params)
throws Exception
params - The params object which is used for getting the wiki templates.
Exception
TemplateContainer getTemplatesContainer(WikiPageParams params)
throws Exception
params - The params object which is used for getting the containers.
Exception
void modifyTemplate(WikiPageParams params,
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.
Exceptionvoid 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.List<PageWikiListener> getPageListeners()
boolean addRelatedPage(WikiPageParams orginaryPageParams,
WikiPageParams relatedPageParams)
throws Exception
orginaryPageParams - The params object of the current wiki page.relatedPageParams - The params object of the related page.
Exception
List<Page> getRelatedPage(WikiPageParams pageParams)
throws Exception
pageParams - The params object of the wiki page.
Exception
boolean removeRelatedPage(WikiPageParams orginaryPageParams,
WikiPageParams relatedPageParams)
throws Exception
orginaryPageParams - The params object of the current wiki page.relatedPageParams - The params object of the related page.
Exception
DraftPage createDraftForExistPage(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.
DraftPage createDraftForNewPage(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.
DraftPage getDraft(WikiPageParams param)
throws Exception
param - The param object of the wiki page.
Exception
DraftPage getDraft(String draftName)
throws Exception
draftName - Name of the draft page.
Exception
void removeDraft(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<DraftPage> getDrafts(String username)
throws Exception
username - Name of the user.
Exception
Page getWikiPageByUUID(String uuid)
throws Exception
uuid - UUID of the wiki page.
Exception
DraftPage getLastestDraft()
throws Exception
ExceptionUserWiki getOrCreateUserWiki(String username)
username - Name of the user.
String getSpaceNameByGroupId(String groupId)
throws Exception
groupId - The group Id.
Exception
List<SpaceBean> searchSpaces(String keyword)
throws Exception
keyword - The keyword to search for spaces.
Exception
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,
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,
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,
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.
ExceptionWiki getWikiById(String wikiId)
wikiId - The Wiki Id.
String getWikiNameById(String wikiId)
throws Exception
wikiId - The Wiki Id.
Exception
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||