Class WikiServiceImpl
java.lang.Object
org.exoplatform.wiki.service.impl.WikiServiceImpl
- All Implemented Interfaces:
WikiService
-
Constructor Summary
ConstructorsConstructorDescriptionWikiServiceImpl(org.exoplatform.portal.mop.service.LayoutService layoutService, org.exoplatform.portal.config.UserACL userAcl, org.exoplatform.social.core.space.spi.SpaceService spaceService, NoteDataStorage dataStorage) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddComponentPlugin(org.exoplatform.container.component.ComponentPlugin plugin) ConfigurationbooleancanManageWiki(String wikiType, String wikiOwner, String username) Checks whether a user can manage aWikior notcreateWiki(String wikiType, String owner) Creates a wiki with the given type and ownerGets Id of a default Wiki syntax.getOrCreateUserWiki(String username) Gets a user Wiki.Gets listeners of all wiki pages that are registered into the Wiki service.getSpaceNameByGroupId(String groupId) Gets a space name by a given group Id.getWikiById(String wikiId) Gets a Wiki by its Id.getWikiByTypeAndOwner(String wikiType, String owner) WikiGets parameters of a wiki page based on the data stored in the breadcrumb.getWikisByType(String wikiType) Gets all wikis of the given typeGets a Wiki webapp URI.voidpostAddPage(String wikiType, String wikiOwner, String pageId, Page page) voidpostDeletePage(String wikiType, String wikiOwner, String pageId, Page page) voidpostUpdatePage(String wikiType, String wikiOwner, String pageId, Page page, PageUpdateType wikiUpdateType)
-
Constructor Details
-
WikiServiceImpl
public WikiServiceImpl(org.exoplatform.portal.mop.service.LayoutService layoutService, org.exoplatform.portal.config.UserACL userAcl, org.exoplatform.social.core.space.spi.SpaceService spaceService, NoteDataStorage dataStorage)
-
-
Method Details
-
getPageLinksMap
-
addComponentPlugin
public void addComponentPlugin(org.exoplatform.container.component.ComponentPlugin plugin) Configuration- Specified by:
addComponentPluginin interfaceWikiService- Parameters:
plugin- The component plugin to be registered.
-
getPageListeners
Description copied from interface:WikiServiceGets listeners of all wiki pages that are registered into the Wiki service.- Specified by:
getPageListenersin interfaceWikiService- Returns:
- The list of listeners.
-
getWikiWebappUri
Description copied from interface:WikiServiceGets a Wiki webapp URI.- Specified by:
getWikiWebappUriin interfaceWikiService- Returns:
- The Wiki webapp URI.
-
getDefaultWikiSyntaxId
Description copied from interface:WikiServiceGets Id of a default Wiki syntax.- Specified by:
getDefaultWikiSyntaxIdin interfaceWikiService- Returns:
- The Id.
-
getWikiByTypeAndOwner
Wiki- Specified by:
getWikiByTypeAndOwnerin interfaceWikiService- Parameters:
wikiType- It can be Portal, Group, or User.owner- The Wiki owner.- Returns:
- The Wiki.
- Throws:
WikiException- if an error occured
-
getWikisByType
Description copied from interface:WikiServiceGets all wikis of the given type- Specified by:
getWikisByTypein interfaceWikiService- Parameters:
wikiType- Type of wiki- Returns:
- Wikis of the given type
- Throws:
WikiException- if an error occured
-
getOrCreateUserWiki
Description copied from interface:WikiServiceGets a user Wiki. If it does not exist, the new one will be created.- Specified by:
getOrCreateUserWikiin interfaceWikiService- Parameters:
username- Name of the user.- Returns:
- The user Wiki.
- Throws:
WikiException- if an error occured
-
getWikiById
Description copied from interface:WikiServiceGets a Wiki by its Id.- Specified by:
getWikiByIdin interfaceWikiService- Parameters:
wikiId- The Wiki Id.- Returns:
- The Wiki.
- Throws:
WikiException- if an error occured
-
createWiki
Description copied from interface:WikiServiceCreates a wiki with the given type and owner- Specified by:
createWikiin interfaceWikiService- Parameters:
wikiType- It can be Portal, Group, or User.owner- The Wiki owner.- Returns:
- Wiki created
- Throws:
WikiException- if an error occured
-
getSpaceNameByGroupId
Description copied from interface:WikiServiceGets a space name by a given group Id.- Specified by:
getSpaceNameByGroupIdin interfaceWikiService- Parameters:
groupId- The group Id.- Returns:
- The space name.
-
postUpdatePage
public void postUpdatePage(String wikiType, String wikiOwner, String pageId, Page page, PageUpdateType wikiUpdateType) throws WikiException - Throws:
WikiException
-
postAddPage
public void postAddPage(String wikiType, String wikiOwner, String pageId, Page page) throws WikiException - Throws:
WikiException
-
postDeletePage
public void postDeletePage(String wikiType, String wikiOwner, String pageId, Page page) throws WikiException - Throws:
WikiException
-
getWikiPageParams
Description copied from interface:WikiServiceGets parameters of a wiki page based on the data stored in the breadcrumb.- Specified by:
getWikiPageParamsin interfaceWikiService- Parameters:
data- The data in the breadcrumb that identifies the wiki page.- Returns:
- The parameters identifying the wiki page.
-
canManageWiki
Description copied from interface:WikiServiceChecks whether a user can manage aWikior not- Specified by:
canManageWikiin interfaceWikiService- Parameters:
wikiType-WikiTypenamewikiOwner-Wikiownerusername- User login- Returns:
- true if can manage wiki and its notes, else false
-