|
||||||||||
| 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 PageWikiListener |
boolean |
addRelatedPage(WikiPageParams orginaryPageParams,
WikiPageParams relatedPageParams)
|
void |
addWikiTemplatePagePlugin(WikiTemplatePagePlugin 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)
|
Template |
createTemplatePage(String title,
WikiPageParams params)
|
void |
deleteDraftNewPage(String newDraftPageId)
|
boolean |
deletePage(String wikiType,
String wikiOwner,
String pageId)
|
void |
deleteTemplatePage(String wikiType,
String wikiOwner,
String templateId)
|
Object |
findByPath(String path,
String objectNodeType)
|
InputStream |
getAttachmentAsStream(String path)
|
List<BreadcrumbData> |
getBreadcumb(String wikiType,
String wikiOwner,
String pageId)
|
String |
getDefaultWikiSyntaxId()
|
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)
|
PageImpl |
getHelpSyntaxPage(String syntaxId)
|
DraftPage |
getLastestDraft()
Get the draft that's created lastest |
Page |
getMetaDataPage(MetaDataPage metaPage)
|
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)
|
Page |
getPageByRootPermission(String wikiType,
String wikiOwner,
String pageId)
|
Page |
getPageByUUID(String uuid)
|
List<PageWikiListener> |
getPageListeners()
|
String |
getPageTitleOfAttachment(String path)
|
String |
getPortalOwner()
Get portal owner |
Page |
getRelatedPage(String wikiType,
String wikiOwner,
String pageId)
|
List<Page> |
getRelatedPage(WikiPageParams pageParams)
|
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)
|
Map<String,Template> |
getTemplates(WikiPageParams params)
|
TemplateContainer |
getTemplatesContainer(WikiPageParams params)
|
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)
|
List<PermissionEntry> |
getWikiPermission(String wikiType,
String wikiOwner)
|
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)
|
boolean |
isExisting(String wikiType,
String wikiOwner,
String pageId)
|
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)
|
boolean |
movePage(WikiPageParams currentLocationParams,
WikiPageParams newLocationParams)
|
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)
|
boolean |
renamePage(String wikiType,
String wikiOwner,
String pageName,
String newName,
String newTitle)
|
org.exoplatform.commons.utils.PageList<SearchResult> |
search(WikiSearchData data)
|
org.exoplatform.commons.utils.PageList<SearchResult> |
searchContent(WikiSearchData data)
|
List<TitleSearchResult> |
searchDataByTitle(WikiSearchData data)
|
List<SearchResult> |
searchRenamedPage(String wikiType,
String wikiOwner,
String pageId)
|
List<SpaceBean> |
searchSpaces(String keyword)
Search for spaces by keyword |
List<TemplateSearchResult> |
searchTemplate(TemplateSearchData data)
|
void |
setTemplatePagePlugin()
|
void |
setWikiPermission(String wikiType,
String wikiOwner,
List<PermissionEntry> permissionEntries)
|
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)
initDefaultTemplatePage in interface WikiService
public Page createPage(String wikiType,
String wikiOwner,
String title,
String parentId)
throws Exception
createPage in interface WikiServiceException
public boolean isExisting(String wikiType,
String wikiOwner,
String pageId)
throws Exception
isExisting in interface WikiServiceException
public boolean deletePage(String wikiType,
String wikiOwner,
String pageId)
throws Exception
deletePage in interface WikiServiceException
public void deleteTemplatePage(String wikiType,
String wikiOwner,
String templateId)
throws Exception
deleteTemplatePage in interface WikiServiceException
public void deleteDraftNewPage(String newDraftPageId)
throws Exception
deleteDraftNewPage in interface WikiServiceException
public boolean renamePage(String wikiType,
String wikiOwner,
String pageName,
String newName,
String newTitle)
throws Exception
renamePage in interface WikiServiceException
public boolean movePage(WikiPageParams currentLocationParams,
WikiPageParams newLocationParams)
throws Exception
movePage in interface WikiServiceException
public List<PermissionEntry> getWikiPermission(String wikiType,
String wikiOwner)
throws Exception
getWikiPermission in interface WikiServiceException
public void setWikiPermission(String wikiType,
String wikiOwner,
List<PermissionEntry> permissionEntries)
throws Exception
setWikiPermission in interface WikiServiceException
public Page getPageById(String wikiType,
String wikiOwner,
String pageId)
throws Exception
getPageById in interface WikiServiceException
public Page getPageByRootPermission(String wikiType,
String wikiOwner,
String pageId)
throws Exception
getPageByRootPermission in interface WikiServiceException
public Page getRelatedPage(String wikiType,
String wikiOwner,
String pageId)
throws Exception
getRelatedPage in interface WikiServiceException
public Page getExsitedOrNewDraftPageById(String wikiType,
String wikiOwner,
String pageId)
throws Exception
getExsitedOrNewDraftPageById in interface WikiServiceException
public Page getPageByUUID(String uuid)
throws Exception
getPageByUUID in interface WikiServiceException
public Template getTemplatePage(WikiPageParams params,
String templateId)
throws Exception
getTemplatePage in interface WikiServiceException
public Map<String,Template> getTemplates(WikiPageParams params)
throws Exception
getTemplates in interface WikiServiceException
public TemplateContainer getTemplatesContainer(WikiPageParams params)
throws Exception
getTemplatesContainer in interface WikiServiceException
public void modifyTemplate(WikiPageParams params,
Template template,
String newTitle,
String newDescription,
String newContent,
String newSyntaxId)
throws Exception
modifyTemplate in interface WikiServiceException
public org.exoplatform.commons.utils.PageList<SearchResult> searchContent(WikiSearchData data)
throws Exception
searchContent in interface WikiServiceException
public org.exoplatform.commons.utils.PageList<SearchResult> search(WikiSearchData data)
throws Exception
search in interface WikiServiceException
public List<TemplateSearchResult> searchTemplate(TemplateSearchData data)
throws Exception
searchTemplate in interface WikiServiceException
public List<SearchResult> searchRenamedPage(String wikiType,
String wikiOwner,
String pageId)
throws Exception
searchRenamedPage in interface WikiServiceException
public Object findByPath(String path,
String objectNodeType)
findByPath in interface WikiService
public String getPageTitleOfAttachment(String path)
throws Exception
getPageTitleOfAttachment in interface WikiServiceException
public InputStream getAttachmentAsStream(String path)
throws Exception
getAttachmentAsStream in interface WikiServiceException
public List<BreadcrumbData> getBreadcumb(String wikiType,
String wikiOwner,
String pageId)
throws Exception
getBreadcumb in interface WikiServiceException
public PageImpl getHelpSyntaxPage(String syntaxId)
throws Exception
getHelpSyntaxPage in interface WikiServiceException
public Page getMetaDataPage(MetaDataPage metaPage)
throws Exception
getMetaDataPage in interface WikiServiceExceptionpublic String getDefaultWikiSyntaxId()
getDefaultWikiSyntaxId in interface WikiServicepublic long getSaveDraftSequenceTime()
WikiService
getSaveDraftSequenceTime in interface WikiServicepublic WikiPageParams getWikiPageParams(BreadcrumbData data)
getWikiPageParams in interface WikiService
public List<TitleSearchResult> searchDataByTitle(WikiSearchData data)
throws Exception
searchDataByTitle in interface WikiServiceException
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 - The wiki typeowner - Wiki owner
public String getPortalOwner()
WikiService
getPortalOwner in interface WikiService
public boolean hasAdminSpacePermission(String wikiType,
String owner)
throws Exception
hasAdminSpacePermission in interface WikiServicewikiType - The wiki type of the spaceowner - The owner of the space
Exception
public boolean hasAdminPagePermission(String wikiType,
String owner)
throws Exception
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
createTemplatePage in interface WikiServiceException
public List<String> getWikiDefaultPermissions(String wikiType,
String wikiOwner)
throws Exception
WikiService
getWikiDefaultPermissions in interface WikiServicewikiType - The type of wikiwikiOwner - The owner of wiki
Exceptionpublic void addComponentPlugin(org.exoplatform.container.component.ComponentPlugin plugin)
WikiServicePageWikiListener
addComponentPlugin in interface WikiServicepublic void addWikiTemplatePagePlugin(WikiTemplatePagePlugin plugin)
addWikiTemplatePagePlugin in interface WikiServicepublic 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
addRelatedPage in interface WikiServiceException
public List<Page> getRelatedPage(WikiPageParams pageParams)
throws Exception
getRelatedPage in interface WikiServiceException
public boolean removeRelatedPage(WikiPageParams orginaryPageParams,
WikiPageParams relatedPageParams)
throws Exception
removeRelatedPage in interface WikiServiceExceptionpublic 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 WikiServiceclientTime - 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 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 | |||||||||