|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.exoplatform.wiki.service.impl.WikiServiceImpl
public class WikiServiceImpl
| Constructor Summary | |
|---|---|
WikiServiceImpl(org.exoplatform.container.configuration.ConfigurationManager configManager,
JCRDataStorage jcrDataStorage,
org.exoplatform.container.xml.InitParams initParams)
|
|
| 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 plugin)
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 newDraftPageId)
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 newTitle,
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 |
setTemplatePagePlugin()
|
void |
setWikiPermission(String wikiType,
String wikiOwner,
List<PermissionEntry> permissionEntries)
Add new permissions to the wiki |
void |
start()
|
void |
stop()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public WikiServiceImpl(org.exoplatform.container.configuration.ConfigurationManager configManager,
JCRDataStorage jcrDataStorage,
org.exoplatform.container.xml.InitParams initParams)
| Method Detail |
|---|
public void initDefaultTemplatePage(String path)
WikiService
initDefaultTemplatePage in interface WikiServicepath - the page to initialize the default template page
public Page createPage(String wikiType,
String wikiOwner,
String title,
String parentId)
throws Exception
WikiService
createPage in interface WikiServicewikiType - 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
public boolean isExisting(String wikiType,
String wikiOwner,
String pageId)
throws Exception
WikiService
isExisting in interface WikiServicewikiType - It can be a Portal, Group, User type of wikiwikiOwner - Is the owner of the wikipageId - Is the pageId used by the system
Exception
public boolean deletePage(String wikiType,
String wikiOwner,
String pageId)
throws Exception
WikiService
deletePage in interface WikiServicewikiType - It can be a Portal, Group, User type of wikiwikiOwner - Is the owner of the wikipageId - Id of the wiki page
Exception
public void deleteTemplatePage(String wikiType,
String wikiOwner,
String templateId)
throws Exception
WikiService
deleteTemplatePage in interface WikiServicewikiType - It can be a Portal, Group, User type of wikiwikiOwner - Is the owner of the wikitemplateId - Id of the template
Exception
public void deleteDraftNewPage(String newDraftPageId)
throws Exception
WikiService
deleteDraftNewPage in interface WikiServicenewDraftPageId - Id of the draft
Exception
public boolean renamePage(String wikiType,
String wikiOwner,
String pageName,
String newName,
String newTitle)
throws Exception
WikiService
renamePage in interface WikiServicewikiType - 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
public boolean movePage(WikiPageParams currentLocationParams,
WikiPageParams newLocationParams)
throws Exception
WikiService
movePage in interface WikiServicecurrentLocationParams - The current location of the pagenewLocationParams - The new location of the page
Exception
public List<PermissionEntry> getWikiPermission(String wikiType,
String wikiOwner)
throws Exception
WikiService
getWikiPermission in interface WikiServicewikiType - It can be a Portal, Group, User type of wikiwikiOwner - Is the owner of the wik
Exception
public void setWikiPermission(String wikiType,
String wikiOwner,
List<PermissionEntry> permissionEntries)
throws Exception
WikiService
setWikiPermission in interface WikiServicewikiType - It can be a Portal, Group, User type of wikiwikiOwner - Is the owner of the wikpermissionEntries - list of permissions
Exception
public Page getPageById(String wikiType,
String wikiOwner,
String pageId)
throws Exception
WikiService
getPageById in interface WikiServicewikiType - It can be a Portal, Group, User type of wikiwikiOwner - Is the owner of the wikpageId - Is the pageId used by the system
Exception
public Page getPageByRootPermission(String wikiType,
String wikiOwner,
String pageId)
throws Exception
WikiService
getPageByRootPermission in interface WikiServicewikiType - It can be a Portal, Group, User type of wikiwikiOwner - Is the owner of the wikpageId - Is the pageId used by the system
Exception
public Page getRelatedPage(String wikiType,
String wikiOwner,
String pageId)
throws Exception
WikiService
getRelatedPage in interface WikiServicewikiType - It can be a Portal, Group, User type of wikiwikiOwner - Is the owner of the wikpageId - Is the pageId used by the system
Exception
public Page getExsitedOrNewDraftPageById(String wikiType,
String wikiOwner,
String pageId)
throws Exception
WikiService
getExsitedOrNewDraftPageById in interface WikiServicewikiType - It can be a Portal, Group, User type of wikiwikiOwner - Is the owner of the wikpageId - Is the pageId used by the system
Exception
public Page getPageByUUID(String uuid)
throws Exception
WikiService
getPageByUUID in interface WikiServiceuuid - Id of the wiki page
Exception
public Template getTemplatePage(WikiPageParams params,
String templateId)
throws Exception
WikiService
getTemplatePage in interface WikiServiceException
public Map<String,Template> getTemplates(WikiPageParams params)
throws Exception
WikiService
getTemplates in interface WikiServiceparams - The full params to get a page
Exception
public TemplateContainer getTemplatesContainer(WikiPageParams params)
throws Exception
WikiService
getTemplatesContainer in interface WikiServiceparams - The full params to get a page
Exception
public void modifyTemplate(WikiPageParams params,
Template template,
String newTitle,
String newDescription,
String newContent,
String newSyntaxId)
throws Exception
WikiService
modifyTemplate in interface WikiServiceparams - The full params to get a pagetemplate - the templatenewTitle - 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
public org.exoplatform.commons.utils.PageList<SearchResult> search(WikiSearchData data)
throws Exception
WikiService
search in interface WikiServicedata - The data to search
Exception
public List<TemplateSearchResult> searchTemplate(TemplateSearchData data)
throws Exception
WikiService
searchTemplate in interface WikiServicedata - The data to search
Exception
public List<SearchResult> searchRenamedPage(String wikiType,
String wikiOwner,
String pageId)
throws Exception
WikiService
searchRenamedPage in interface WikiServicewikiType - It can be a Portal, Group, User type of wikiwikiOwner - Is the owner of the wikpageId - Is the pageId used by the system
Exception
public Object findByPath(String path,
String objectNodeType)
WikiService
findByPath in interface WikiServicepath - relative path to searchobjectNodeType - Can be a page, attachment or template
public String getPageTitleOfAttachment(String path)
throws Exception
WikiService
getPageTitleOfAttachment in interface WikiServicepath - Path of the attachment
Exception
public InputStream getAttachmentAsStream(String path)
throws Exception
WikiService
getAttachmentAsStream in interface WikiServicepath - Path to use to get the attachment
Exception
public List<BreadcrumbData> getBreadcumb(String wikiType,
String wikiOwner,
String pageId)
throws Exception
WikiService
getBreadcumb in interface WikiServicewikiType - 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
public PageImpl getHelpSyntaxPage(String syntaxId)
throws Exception
WikiService
getHelpSyntaxPage in interface WikiServicesyntaxId - Id of the syntax
Exception
public Page getMetaDataPage(MetaDataPage metaPage)
throws Exception
WikiService
getMetaDataPage in interface WikiServicemetaPage - the metadata to use, mainly emoticons
Exceptionpublic String getDefaultWikiSyntaxId()
WikiService
getDefaultWikiSyntaxId in interface WikiServicepublic long getSaveDraftSequenceTime()
WikiService
getSaveDraftSequenceTime in interface WikiServicepublic WikiPageParams getWikiPageParams(BreadcrumbData data)
WikiService
getWikiPageParams in interface WikiServicedata - A part of the breadcrumb
public List<PageImpl> getDuplicatePages(PageImpl parentPage,
Wiki targetWiki,
List<PageImpl> resultList)
throws Exception
WikiService
getDuplicatePages in interface WikiServiceparentPage - The page to check before execute movingtargetWiki - The target wiki to move page toresultList - The list of duppicate wiki page
Exception
public Wiki getWiki(String wikiType,
String owner)
WikiService
getWiki in interface WikiServicewikiType - It can be a Portal, Group, User type of wikiowner - Wiki owner
public String getPortalOwner()
WikiService
getPortalOwner in interface WikiService
public boolean hasAdminSpacePermission(String wikiType,
String owner)
throws Exception
WikiService
hasAdminSpacePermission in interface WikiServicewikiType - It can be a Portal, Group, User type of wikiowner - The owner of the space
Exception
public boolean hasAdminPagePermission(String wikiType,
String owner)
throws Exception
WikiService
hasAdminPagePermission in interface WikiServicewikiType - The wiki type of the spaceowner - The owner of the space
Exception
public Template createTemplatePage(String title,
WikiPageParams params)
throws Exception
WikiService
createTemplatePage in interface WikiServicetitle - The title of the templateparams - Parameters to create the new template
Exception
public List<String> getWikiDefaultPermissions(String wikiType,
String wikiOwner)
throws Exception
WikiService
getWikiDefaultPermissions in interface WikiServicewikiType - It can be a Portal, Group, User type of wikiwikiOwner - Is the owner of the wiki
Exceptionpublic void addComponentPlugin(org.exoplatform.container.component.ComponentPlugin plugin)
WikiServiceComponentPlugin
addComponentPlugin in interface WikiServicepublic void addWikiTemplatePagePlugin(WikiTemplatePagePlugin plugin)
WikiService
addWikiTemplatePagePlugin in interface WikiServiceplugin - The template plugin to usepublic List<PageWikiListener> getPageListeners()
getPageListeners in interface WikiServicePageWikiListenerpublic void setTemplatePagePlugin()
public UserWiki getOrCreateUserWiki(String username)
WikiService
getOrCreateUserWiki in interface WikiServiceusername - The user name
public List<SpaceBean> searchSpaces(String keyword)
throws Exception
WikiService
searchSpaces in interface WikiServicekeyword - The keyword to search spaces
Exception
public boolean addRelatedPage(WikiPageParams orginaryPageParams,
WikiPageParams relatedPageParams)
throws Exception
WikiService
addRelatedPage in interface WikiServiceorginaryPageParams - Current wiki page paramrelatedPageParams - Param of the related page
Exception
public List<Page> getRelatedPage(WikiPageParams pageParams)
throws Exception
WikiService
getRelatedPage in interface WikiServicepageParams - Param of the wiki page
Exception
public boolean removeRelatedPage(WikiPageParams orginaryPageParams,
WikiPageParams relatedPageParams)
throws Exception
WikiService
removeRelatedPage in interface WikiServiceorginaryPageParams - Current wiki page paramrelatedPageParams - Param of the related page
Exceptionpublic String getWikiWebappUri()
WikiService
getWikiWebappUri in interface WikiService
public boolean isSpaceMember(String spaceId,
String userId)
WikiService
isSpaceMember in interface WikiServicespaceId - the existing space iduserId - the remote user id
public boolean isHiddenSpace(String groupId)
throws Exception
WikiService
isHiddenSpace in interface WikiServicegroupId - The group Id to check
Exception
public DraftPage createDraftForNewPage(WikiPageParams parentPageParam,
long clientTime)
throws Exception
WikiService
createDraftForNewPage in interface WikiServiceparentPageParam - parent wiki page paramclientTime - The time of client when save draft
Exception - if create draft not success
public DraftPage createDraftForExistPage(WikiPageParams param,
String revision,
long clientTime)
throws Exception
WikiService
createDraftForExistPage in interface WikiServiceparam - 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
public DraftPage getDraft(WikiPageParams param)
throws Exception
WikiService
getDraft in interface WikiServiceparam - wiki page param
Exception
public DraftPage getLastestDraft()
throws Exception
WikiService
getLastestDraft in interface WikiServiceException
public DraftPage getDraft(String draftName)
throws Exception
WikiService
getDraft in interface WikiServicedraftName - draft name
Exception
public void removeDraft(WikiPageParams param)
throws Exception
WikiService
removeDraft in interface WikiServiceparam - wiki page param
Exception
public void removeDraft(String draftName)
throws Exception
WikiService
removeDraft in interface WikiServicedraftName - draft name
Exception
public List<DraftPage> getDrafts(String username)
throws Exception
WikiService
getDrafts in interface WikiServiceusername - user name
Exception
public Page getWikiPageByUUID(String uuid)
throws Exception
WikiService
getWikiPageByUUID in interface WikiServiceuuid - of wiki page
Exception
public void postUpdatePage(String wikiType,
String wikiOwner,
String pageId,
Page page,
String wikiUpdateType)
throws Exception
WikiService
postUpdatePage in interface WikiServicewikiType - It can be a Portal, Group, User type of wikiwikiOwner - The wiki ownerpageId - The page idpage - The wiki pagewikiUpdateType - The update type
Exception
public void postAddPage(String wikiType,
String wikiOwner,
String pageId,
Page page)
throws Exception
WikiService
postAddPage in interface WikiServicewikiType - It can be a Portal, Group, User type of wikiwikiOwner - The wiki ownerpageId - The page idpage - The wiki page
Exception
public void postDeletePage(String wikiType,
String wikiOwner,
String pageId,
Page page)
throws Exception
WikiService
postDeletePage in interface WikiServicewikiType - It can be a Portal, Group, User type of wikiwikiOwner - The wiki ownerpageId - The page idpage - The wiki page
Exception
public String getSpaceNameByGroupId(String groupId)
throws Exception
WikiService
getSpaceNameByGroupId in interface WikiServicegroupId - The group Id to get space name
Exceptionpublic Wiki getWikiById(String wikiId)
WikiService
getWikiById in interface WikiServicewikiId - The wiki id
public String getWikiNameById(String wikiId)
throws Exception
WikiService
getWikiNameById in interface WikiServicewikiId - The wiki id
Exceptionpublic void start()
start in interface org.picocontainer.Startablepublic void stop()
stop in interface org.picocontainer.Startable
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||