|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface WikiService
WikiService is interface provide functions for processing database with wikis and pages include: add, edit, remove and searching data
| Method Summary | |
|---|---|
void |
addComponentPlugin(org.exoplatform.container.component.ComponentPlugin plugin)
register a ComponentPlugin |
boolean |
addRelatedPage(WikiPageParams orginaryPageParams,
WikiPageParams relatedPageParams)
Add a related page of the current wiki page |
void |
addWikiTemplatePagePlugin(WikiTemplatePagePlugin templatePlugin)
Add the wiki page as plugin |
DraftPage |
createDraftForExistPage(WikiPageParams param,
String revision,
long clientTime)
Create a draft page for a wiki page which is specified by the wiki page param |
DraftPage |
createDraftForNewPage(WikiPageParams parentPageParam,
long clientTime)
Create a draft page for a new wiki page which parent is specified by the wiki page param |
Page |
createPage(String wikiType,
String wikiOwner,
String title,
String parentId)
Create a new Wiki Page |
Template |
createTemplatePage(String title,
WikiPageParams params)
Create a new template Wiki Page |
void |
deleteDraftNewPage(String draftNewPageId)
Delete the draft based on is Id |
boolean |
deletePage(String wikiType,
String wikiOwner,
String pageId)
Delete the Wiki Page |
void |
deleteTemplatePage(String wikiType,
String wikiOwner,
String templateId)
Delete the template |
Object |
findByPath(String path,
String objectNodeType)
Find the fullpath based on the type and is relative path. |
InputStream |
getAttachmentAsStream(String path)
Return an attachment as stream |
List<BreadcrumbData> |
getBreadcumb(String wikiType,
String wikiOwner,
String pageId)
Return a list of data to compose the breadcrumb |
String |
getDefaultWikiSyntaxId()
Get the default wiki syntax Id |
DraftPage |
getDraft(String draftName)
Get draft by draft name |
DraftPage |
getDraft(WikiPageParams param)
Achieve a draft page for a wiki page which is specified by the wiki page param |
List<DraftPage> |
getDrafts(String username)
Get collection of draft page belong to a user |
List<PageImpl> |
getDuplicatePages(PageImpl parentPage,
Wiki targetWiki,
List<PageImpl> resultList)
Get a list of duppilcated page between all children pages of parentPage and targetWiki before execute moving page |
Page |
getExsitedOrNewDraftPageById(String wikiType,
String wikiOwner,
String pageId)
Return the page itself or is draft if one exist |
PageImpl |
getHelpSyntaxPage(String syntaxId)
Return the helps syntax page based on the syntax id |
DraftPage |
getLastestDraft()
Get the draft that's created lastest |
Page |
getMetaDataPage(MetaDataPage metaPage)
Return the a page of metadata |
UserWiki |
getOrCreateUserWiki(String username)
Get user wiki, and if it did not create yet then create new one |
Page |
getPageById(String wikiType,
String wikiOwner,
String pageId)
Get a page based on is Id |
Page |
getPageByRootPermission(String wikiType,
String wikiOwner,
String pageId)
Return the wiki Home page with the root permissions |
Page |
getPageByUUID(String uuid)
Retugn a wiki page based on is id |
List<PageWikiListener> |
getPageListeners()
|
String |
getPageTitleOfAttachment(String path)
Get the page title of an attachment |
String |
getPortalOwner()
Get portal owner |
Page |
getRelatedPage(String wikiType,
String wikiOwner,
String pageId)
Return the related page based on is Id |
List<Page> |
getRelatedPage(WikiPageParams pageParams)
Return a list of related page based on its param |
long |
getSaveDraftSequenceTime()
Get the draft save sequence time from config file |
String |
getSpaceNameByGroupId(String groupId)
Get space name by group Id |
Template |
getTemplatePage(WikiPageParams params,
String templateId)
Return the template to use for the wiki page |
Map<String,Template> |
getTemplates(WikiPageParams params)
Return a map of templates for the wiki page |
TemplateContainer |
getTemplatesContainer(WikiPageParams params)
Return the template container |
Wiki |
getWiki(String wikiType,
String owner)
Get a wiki that definds by wikiType and owner |
Wiki |
getWikiById(String wikiId)
Get wiki by Id |
List<String> |
getWikiDefaultPermissions(String wikiType,
String wikiOwner)
Get wiki default permission |
String |
getWikiNameById(String wikiId)
Get wiki name by wiki id |
Page |
getWikiPageByUUID(String uuid)
Get wiki page by page UUID |
WikiPageParams |
getWikiPageParams(BreadcrumbData data)
Get a wiki page based on the data stored in the breadcrumb |
List<PermissionEntry> |
getWikiPermission(String wikiType,
String wikiOwner)
Return a lists permissions for the wiki based on the type and the owner |
String |
getWikiWebappUri()
Get the uri of wiki webapp |
boolean |
hasAdminPagePermission(String wikiType,
String owner)
Check if the current user has addmin permission on the page |
boolean |
hasAdminSpacePermission(String wikiType,
String owner)
Check if the current user has addmin permission on the space |
void |
initDefaultTemplatePage(String path)
Initialise the default template page |
boolean |
isExisting(String wikiType,
String wikiOwner,
String pageId)
Return true if the page exist |
boolean |
isHiddenSpace(String groupId)
Check if the space is hidden or not |
boolean |
isSpaceMember(String spaceId,
String userId)
Checks whether a user is a space's member or not. |
void |
modifyTemplate(WikiPageParams params,
Template template,
String newName,
String newDescription,
String newContent,
String newSyntaxId)
Modify an existing template available |
boolean |
movePage(WikiPageParams currentLocationParams,
WikiPageParams newLocationParams)
Move a wiki Page |
void |
postAddPage(String wikiType,
String wikiOwner,
String pageId,
Page page)
Publish a add activity |
void |
postDeletePage(String wikiType,
String wikiOwner,
String pageId,
Page page)
Publish a delete page activity |
void |
postUpdatePage(String wikiType,
String wikiOwner,
String pageId,
Page page,
String wikiUpdateType)
Publish a update activity |
void |
removeDraft(String draftName)
Remove a draft page by draft name |
void |
removeDraft(WikiPageParams param)
Remove a draft page for a wiki page which is specified by the wiki page param |
boolean |
removeRelatedPage(WikiPageParams orginaryPageParams,
WikiPageParams relatedPageParams)
Remove a related page of the current wiki page |
boolean |
renamePage(String wikiType,
String wikiOwner,
String pageName,
String newName,
String newTitle)
Rename the wiki Page |
org.exoplatform.commons.utils.PageList<SearchResult> |
search(WikiSearchData data)
Search in all wiki pages |
List<SearchResult> |
searchRenamedPage(String wikiType,
String wikiOwner,
String pageId)
Search pages in the list of renamed pages |
List<SpaceBean> |
searchSpaces(String keyword)
Search for spaces by keyword |
List<TemplateSearchResult> |
searchTemplate(TemplateSearchData data)
Search in all template |
void |
setWikiPermission(String wikiType,
String wikiOwner,
List<PermissionEntry> permissionEntries)
Add new permissions to the wiki |
| Method Detail |
|---|
Page createPage(String wikiType,
String wikiOwner,
String title,
String parentId)
throws Exception
wikiType - It can be a Portal, Group, User type of wikiwikiOwner - The owner of the wikititle - The title of the pageparentId - The parent Id of the new page
Exception
Template createTemplatePage(String title,
WikiPageParams params)
throws Exception
title - The title of the templateparams - Parameters to create the new template
Exceptionvoid initDefaultTemplatePage(String path)
path - the page to initialize the default template page
boolean deletePage(String wikiType,
String wikiOwner,
String pageId)
throws Exception
wikiType - It can be a Portal, Group, User type of wikiwikiOwner - Is the owner of the wikipageId - Id of the wiki page
Exception
void deleteTemplatePage(String wikiType,
String wikiOwner,
String templateId)
throws Exception
wikiType - It can be a Portal, Group, User type of wikiwikiOwner - Is the owner of the wikitemplateId - Id of the template
Exception
void deleteDraftNewPage(String draftNewPageId)
throws Exception
draftNewPageId - Id of the draft
Exception
boolean renamePage(String wikiType,
String wikiOwner,
String pageName,
String newName,
String newTitle)
throws Exception
wikiType - It can be a Portal, Group, User type of wikiwikiOwner - Is the owner of the wikpageName - The old name of the pagenewName - The new name of the pagenewTitle - The new title of the page
Exception
boolean movePage(WikiPageParams currentLocationParams,
WikiPageParams newLocationParams)
throws Exception
currentLocationParams - The current location of the pagenewLocationParams - The new location of the page
Exception
List<PermissionEntry> getWikiPermission(String wikiType,
String wikiOwner)
throws Exception
wikiType - It can be a Portal, Group, User type of wikiwikiOwner - Is the owner of the wik
Exception
void setWikiPermission(String wikiType,
String wikiOwner,
List<PermissionEntry> permissionEntries)
throws Exception
wikiType - It can be a Portal, Group, User type of wikiwikiOwner - Is the owner of the wikpermissionEntries - list of permissions
Exception
Page getPageById(String wikiType,
String wikiOwner,
String pageId)
throws Exception
wikiType - It can be a Portal, Group, User type of wikiwikiOwner - Is the owner of the wikpageId - Is the pageId used by the system
Exception
Page getPageByRootPermission(String wikiType,
String wikiOwner,
String pageId)
throws Exception
wikiType - It can be a Portal, Group, User type of wikiwikiOwner - Is the owner of the wikpageId - Is the pageId used by the system
Exception
Page getRelatedPage(String wikiType,
String wikiOwner,
String pageId)
throws Exception
wikiType - It can be a Portal, Group, User type of wikiwikiOwner - Is the owner of the wikpageId - Is the pageId used by the system
Exception
Page getExsitedOrNewDraftPageById(String wikiType,
String wikiOwner,
String pageId)
throws Exception
wikiType - It can be a Portal, Group, User type of wikiwikiOwner - Is the owner of the wikpageId - Is the pageId used by the system
Exception
Page getPageByUUID(String uuid)
throws Exception
uuid - Id of the wiki page
Exception
Template getTemplatePage(WikiPageParams params,
String templateId)
throws Exception
params - templateId -
Exception
List<BreadcrumbData> getBreadcumb(String wikiType,
String wikiOwner,
String pageId)
throws Exception
wikiType - It can be a Portal, Group, User type of wikiwikiOwner - Is the owner of the wikpageId - Is the pageId used by the system
BreadcrumbData
Exception
WikiPageParams getWikiPageParams(BreadcrumbData data)
throws Exception
data - A part of the breadcrumb
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 a Portal, Group, User type of wikiwikiOwner - Is the owner of the wikpageId - Is the pageId used by the system
Exception
List<PageImpl> getDuplicatePages(PageImpl parentPage,
Wiki targetWiki,
List<PageImpl> resultList)
throws Exception
parentPage - The page to check before execute movingtargetWiki - The target wiki to move page toresultList - The list of duppicate wiki page
Exception
Object findByPath(String path,
String objectNodeType)
throws Exception
path - relative path to searchobjectNodeType - Can be a page, attachment or template
ExceptionString getDefaultWikiSyntaxId()
long getSaveDraftSequenceTime()
String getPageTitleOfAttachment(String path)
throws Exception
path - Path of the attachment
Exception
InputStream getAttachmentAsStream(String path)
throws Exception
path - Path to use to get the 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 full params to get a page
Exception
TemplateContainer getTemplatesContainer(WikiPageParams params)
throws Exception
params - The full params to get a page
Exception
void modifyTemplate(WikiPageParams params,
Template template,
String newName,
String newDescription,
String newContent,
String newSyntaxId)
throws Exception
params - The full params to get a pagetemplate - the templatenewName - the new name for the templatenewDescription - the new description for the templatenewContent - the new description for the templatenewSyntaxId - the new syntax for the template
Exception
boolean isExisting(String wikiType,
String wikiOwner,
String pageId)
throws Exception
wikiType - It can be a Portal, Group, User type of wikiwikiOwner - Is the owner of the wikipageId - Is the pageId used by the system
Exception
List<String> getWikiDefaultPermissions(String wikiType,
String wikiOwner)
throws Exception
wikiType - It can be a Portal, Group, User type of wikiwikiOwner - Is the owner of the wiki
Exceptionvoid addComponentPlugin(org.exoplatform.container.component.ComponentPlugin plugin)
ComponentPlugin
plugin - void addWikiTemplatePagePlugin(WikiTemplatePagePlugin templatePlugin)
templatePlugin - The template plugin to useList<PageWikiListener> getPageListeners()
PageWikiListener
boolean addRelatedPage(WikiPageParams orginaryPageParams,
WikiPageParams relatedPageParams)
throws Exception
orginaryPageParams - Current wiki page paramrelatedPageParams - Param of the related page
Exception
List<Page> getRelatedPage(WikiPageParams pageParams)
throws Exception
pageParams - Param of the wiki page
Exception
boolean removeRelatedPage(WikiPageParams orginaryPageParams,
WikiPageParams relatedPageParams)
throws Exception
orginaryPageParams - Current wiki page paramrelatedPageParams - Param of the related page
Exception
DraftPage createDraftForExistPage(WikiPageParams param,
String revision,
long clientTime)
throws Exception
param - wiki page paramrevision - the target revision, null if it's the lastest revisionclientTime - The time of client when save draft
Exception - if create draft not success
DraftPage createDraftForNewPage(WikiPageParams parentPageParam,
long clientTime)
throws Exception
parentPageParam - parent wiki page paramclientTime - The time of client when save draft
Exception - if create draft not success
DraftPage getDraft(WikiPageParams param)
throws Exception
param - wiki page param
Exception
DraftPage getDraft(String draftName)
throws Exception
draftName - draft name
Exception
void removeDraft(WikiPageParams param)
throws Exception
param - wiki page param
Exception
void removeDraft(String draftName)
throws Exception
draftName - draft name
Exception
List<DraftPage> getDrafts(String username)
throws Exception
username - user name
Exception
Page getWikiPageByUUID(String uuid)
throws Exception
uuid - of wiki page
Exception
DraftPage getLastestDraft()
throws Exception
ExceptionUserWiki getOrCreateUserWiki(String username)
username - The user name
String getSpaceNameByGroupId(String groupId)
throws Exception
groupId - The group Id to get space name
Exception
List<SpaceBean> searchSpaces(String keyword)
throws Exception
keyword - The keyword to search spaces
Exception
Wiki getWiki(String wikiType,
String owner)
wikiType - It can be a Portal, Group, User type of wikiowner - Wiki owner
String getPortalOwner()
String getWikiWebappUri()
boolean isSpaceMember(String spaceId,
String userId)
spaceId - the existing space iduserId - the remote user id
boolean isHiddenSpace(String groupId)
throws Exception
groupId - The group Id to check
Exception
boolean hasAdminSpacePermission(String wikiType,
String owner)
throws Exception
wikiType - It can be a Portal, Group, User type of wikiowner - The owner of the space
Exception
boolean hasAdminPagePermission(String wikiType,
String owner)
throws Exception
wikiType - The wiki type of the spaceowner - The owner of the space
Exception
void postUpdatePage(String wikiType,
String wikiOwner,
String pageId,
Page page,
String wikiUpdateType)
throws Exception
wikiType - It can be a Portal, Group, User type of wikiwikiOwner - The wiki ownerpageId - The page idpage - The wiki pagewikiUpdateType - The update type
Exception
void postAddPage(String wikiType,
String wikiOwner,
String pageId,
Page page)
throws Exception
wikiType - It can be a Portal, Group, User type of wikiwikiOwner - The wiki ownerpageId - The page idpage - The wiki page
Exception
void postDeletePage(String wikiType,
String wikiOwner,
String pageId,
Page page)
throws Exception
wikiType - It can be a Portal, Group, User type of wikiwikiOwner - The wiki ownerpageId - The page idpage - The 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 | |||||||||