Interface WikiService

  • All Known Implementing Classes:
    WikiServiceImpl

    public interface WikiService
    Provides functions for processing database with wikis and pages, including: adding, editing, removing and searching for data.
    eXo level API
    Provisional
    • Method Detail

      • createPage

        Page createPage​(Wiki wiki,
                        String parentPageName,
                        Page page)
                 throws WikiException
        Create a new wiki page in the given wiki, under the given parent page.
        Parameters:
        wiki - It can be Portal, Group, or User.
        parentPageName - Name of the parent wiki page.
        page - wiki page object to create.
        Returns:
        The new wiki page.
        Throws:
        WikiException - if an error occured if an error occured
      • createTemplatePage

        void createTemplatePage​(Wiki wiki,
                                Template template)
                         throws WikiException
        Creates a new Wiki template.
        Parameters:
        wiki - Wiki of the template
        template - The params object which is used for creating the new Wiki template.
        Throws:
        WikiException - if an error occured if an error occured
      • deletePage

        boolean deletePage​(String wikiType,
                           String wikiOwner,
                           String pageId)
                    throws WikiException
        Deletes a wiki page.
        Parameters:
        wikiType - It can be Portal, Group, or User.
        wikiOwner - The Wiki owner.
        pageId - Id of the wiki page.
        Returns:
        "True" if deleting the wiki page is successful, or "false" if not.
        Throws:
        WikiException - if an error occured if an error occured
      • deleteTemplatePage

        void deleteTemplatePage​(String wikiType,
                                String wikiOwner,
                                String templateName)
                         throws WikiException
        Deletes a Wiki template.
        Parameters:
        wikiType - It can be Portal, Group, or User.
        wikiOwner - The Wiki owner.
        templateName - Name of the Wiki template.
        Throws:
        WikiException - if an error occured if an error occured
      • renamePage

        boolean renamePage​(String wikiType,
                           String wikiOwner,
                           String pageName,
                           String newName,
                           String newTitle)
                    throws WikiException
        Renames a wiki page.
        Parameters:
        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.
        Returns:
        "True" if renaming the wiki page is successful, or "false" if not.
        Throws:
        WikiException - if an error occured if an error occured
      • movePage

        boolean movePage​(WikiPageParams currentLocationParams,
                         WikiPageParams newLocationParams)
                  throws WikiException
        Move a wiki Page
        Parameters:
        currentLocationParams - The current location of the wiki page.
        newLocationParams - The new location of the wiki page.
        Returns:
        "True" if moving the wiki page is successful, or "false" if not.
        Throws:
        WikiException - if an error occured if an error occured
      • getWikiPermission

        List<PermissionEntry> getWikiPermission​(String wikiType,
                                                String wikiOwner)
                                         throws WikiException
        Gets a list of Wiki permissions based on its type and owner.
        Parameters:
        wikiType - It can be Portal, Group, or User.
        wikiOwner - The Wiki owner.
        Returns:
        The list of Wiki permissions.
        Throws:
        WikiException - if an error occured if an error occured
      • updateWikiPermission

        void updateWikiPermission​(String wikiType,
                                  String wikiOwner,
                                  List<PermissionEntry> permissionEntries)
                           throws WikiException
        Adds a list of permissions to Wiki.
        Parameters:
        wikiType - It can be Portal, Group, or User.
        wikiOwner - The Wiki owner.
        permissionEntries - The list of permissions.
        Throws:
        WikiException - if an error occured if an error occured
      • getPageOfWikiByName

        Page getPageOfWikiByName​(String wikiType,
                                 String wikiOwner,
                                 String pageName)
                          throws WikiException
        Gets a wiki page by its unique name in the wiki.
        Parameters:
        wikiType - It can be Portal, Group, or User.
        wikiOwner - The Wiki owner.
        pageName - Id of the wiki page.
        Returns:
        The wiki page if the current user has the read permission. Otherwise, it is "null".
        Throws:
        WikiException - if an error occured if an error occured
      • getPageByRootPermission

        Page getPageByRootPermission​(String wikiType,
                                     String wikiOwner,
                                     String pageId)
                              throws WikiException
        Gets a wiki page regardless of the current user's permission.
        Parameters:
        wikiType - It can be Portal, Group, or User.
        wikiOwner - The Wiki owner.
        pageId - Id of the wiki page.
        Returns:
        The wiki page.
        Throws:
        WikiException - if an error occured if an error occured
      • getRelatedPage

        Page getRelatedPage​(String wikiType,
                            String wikiOwner,
                            String pageId)
                     throws WikiException
        Gets a related page of a wiki page which is specified by a given Id.
        Parameters:
        wikiType - It can be Portal, Group, or User.
        wikiOwner - The Wiki owner.
        pageId - Id of the wiki page.
        Returns:
        The related wiki page.
        Throws:
        WikiException - if an error occured if an error occured
      • getExsitedOrNewDraftPageById

        Page getExsitedOrNewDraftPageById​(String wikiType,
                                          String wikiOwner,
                                          String pageId)
                                   throws WikiException
        Gets a wiki page or its draft if existing by its Id.
        Parameters:
        wikiType - It can be Portal, Group, or User.
        wikiOwner - The Wiki owner.
        pageId - Id of the wiki page.
        Returns:
        The wiki page or its draft.
        Throws:
        WikiException - if an error occured if an error occured
      • getPageById

        Page getPageById​(String id)
                  throws WikiException
        Gets a wiki page based on its unique id.
        Parameters:
        id - Unique id of the wiki page.
        Returns:
        The wiki page.
        Throws:
        WikiException - if an error occured if an error occured
      • getDraftPageById

        Page getDraftPageById​(String id)
                       throws WikiException
        Gets a wiki draft page based on its unique id.
        Parameters:
        id - Unique id of the wiki page.
        Returns:
        The wiki draft page.
        Throws:
        WikiException - if an error occured if an error occured
      • getPageRenderedContent

        String getPageRenderedContent​(Page page)
        Get renderd content of a page
        Parameters:
        page - The wiki page
        Returns:
        The rendered content
      • addPageLink

        void addPageLink​(WikiPageParams param,
                         WikiPageParams entity)
        Add a link between 2 pages
        Parameters:
        param - First page
        entity - Second page
      • getParentPageOf

        Page getParentPageOf​(Page page)
                      throws WikiException
        Get parent page of a wiki page
        Parameters:
        page - Wiki page.
        Returns:
        The list of children pages
        Throws:
        WikiException - if an error occured
      • getChildrenPageOf

        List<Page> getChildrenPageOf​(Page page)
                              throws WikiException
        Get all the children pages of a wiki page
        Parameters:
        page - Wiki page.
        Returns:
        The list of children pages
        Throws:
        WikiException - if an error occured
      • getTemplatePage

        Template getTemplatePage​(WikiPageParams params,
                                 String templateId)
                          throws WikiException
        Gets a Wiki template.
        Parameters:
        params - The params object which is used for creating the Wiki template.
        templateId - Id of the wiki template.
        Returns:
        The wiki template.
        Throws:
        WikiException - if an error occured if an error occured
      • getBreadcumb

        List<BreadcrumbData> getBreadcumb​(String wikiType,
                                          String wikiOwner,
                                          String pageId)
                                   throws WikiException
        Gets a list of data which is used for composing the breadcrumb.
        Parameters:
        wikiType - It can be Portal, Group, or User.
        wikiOwner - The Wiki owner.
        pageId - Id of the wiki page to which the breadcrumb points.
        Returns:
        The list of data.
        Throws:
        WikiException - if an error occured if an error occured
      • getWikiPageParams

        WikiPageParams getWikiPageParams​(BreadcrumbData data)
                                  throws WikiException
        Gets parameters of a wiki page based on the data stored in the breadcrumb.
        Parameters:
        data - The data in the breadcrumb that identifies the wiki page.
        Returns:
        The parameters identifying the wiki page.
        Throws:
        WikiException - if an error occured if an error occured
      • search

        org.exoplatform.commons.utils.PageList<SearchResult> search​(WikiSearchData data)
                                                             throws WikiException
        Searches in all wiki pages.
        Parameters:
        data - The data to search.
        Returns:
        Search results.
        Throws:
        WikiException - if an error occured if an error occured
      • getDuplicatePages

        List<Page> getDuplicatePages​(Page parentPage,
                                     Wiki targetWiki,
                                     List<Page> resultList)
                              throws WikiException
        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.
        Parameters:
        parentPage - The page to check.
        targetWiki - The target Wiki to check.
        resultList - The list of duplicated wiki pages.
        Returns:
        The list of duplicated wiki pages.
        Throws:
        WikiException - if an error occured if an error occured
      • getDefaultWikiSyntaxId

        String getDefaultWikiSyntaxId()
        Gets Id of a default Wiki syntax.
        Returns:
        The Id.
      • getSaveDraftSequenceTime

        long getSaveDraftSequenceTime()
        Gets an interval which specifies the periodical auto-saving for pages in Wiki.
        Returns:
        The interval. Its default value is 30 seconds.
      • getEditPageLivingTime

        long getEditPageLivingTime()
        Get the living time of edited page
        Returns:
        The living time of edited page
      • getAttachmentsOfPage

        List<Attachment> getAttachmentsOfPage​(Page page)
                                       throws WikiException
        Gets attachments of the given page, without loading their content
        Parameters:
        page - The wiki page
        Returns:
        The attachments of the page
        Throws:
        WikiException - if an error occured if an error occured
      • getAttachmentsOfPage

        default List<Attachment> getAttachmentsOfPage​(Page page,
                                                      boolean loadContent)
                                               throws WikiException
        Gets attachments of the given page, and allow to load their attachment content by setting loadContent to true
        Parameters:
        page - The wiki page
        loadContent - treue if need to load the attachement content
        Returns:
        The attachments of the page
        Throws:
        WikiException - if an error occured if an error occured
      • getNbOfAttachmentsOfPage

        int getNbOfAttachmentsOfPage​(Page page)
                              throws WikiException
        Get the number of attachment of the given page
        Parameters:
        page - The wiki page
        Returns:
        The number of attachments of the page
        Throws:
        WikiException - if an error occured if an error occured
      • getAttachmentOfPageByName

        Attachment getAttachmentOfPageByName​(String attachmentName,
                                             Page page)
                                      throws WikiException
        Get a attachment of a the given page by name, without loading its content
        Parameters:
        attachmentName - The name of the attachment
        page - The wiki page
        Returns:
        Attachment
        Throws:
        WikiException - if an error occured if an error occured
      • getAttachmentOfPageByName

        default Attachment getAttachmentOfPageByName​(String attachmentName,
                                                     Page page,
                                                     boolean loadContent)
                                              throws WikiException
        Get a attachment of a the given page by name, and allow to load the attachment content by setting loadContent to true
        Parameters:
        attachmentName - The name of the attachment
        page - The wiki page
        loadContent - true to load the attachment content
        Returns:
        attachement
        Throws:
        WikiException - if an error occured if an error occured
      • addAttachmentToPage

        void addAttachmentToPage​(Attachment attachment,
                                 Page page)
                          throws WikiException
        Add the given attachment to the given page
        Parameters:
        attachment - The attachment to add
        page - The wiki page
        Throws:
        WikiException - if an error occured if an error occured
      • deleteAttachmentOfPage

        void deleteAttachmentOfPage​(String attachmentId,
                                    Page page)
                             throws WikiException
        Deletes the given attachment of the given page
        Parameters:
        attachmentId - Id of the attachment
        page - The wiki page
        Throws:
        WikiException - if an error occured
      • getHelpSyntaxPage

        @Deprecated
        Page getHelpSyntaxPage​(String syntaxId,
                               boolean fullContent)
                        throws WikiException
        Deprecated.
        Gets a Help wiki page based on a given syntax Id.
        Parameters:
        syntaxId - Id of the syntax.
        fullContent - true to get the full help page content, false to get an excerpt
        Returns:
        The Help wiki page.
        Throws:
        WikiException - if an error occured
      • getTemplates

        Map<String,​Template> getTemplates​(WikiPageParams params)
                                         throws WikiException
        Gets a map of wiki templates based on a given params object.
        Parameters:
        params - The params object which is used for getting the wiki templates.
        Returns:
        The map of wiki templates.
        Throws:
        WikiException - if an error occured
      • updateTemplate

        void updateTemplate​(Template template)
                     throws WikiException
        Modifies an existing wiki template.
        Parameters:
        template - The updated wiki template.
        Throws:
        WikiException - if an error occured
      • isExisting

        boolean isExisting​(String wikiType,
                           String wikiOwner,
                           String pageId)
                    throws WikiException
        Checks if a wiki page exists or not.
        Parameters:
        wikiType - It can be Portal, Group, or User.
        wikiOwner - The Wiki owner.
        pageId - Id of the wiki page.
        Returns:
        The returned value is "true" if the page exists, or "false" if not.
        Throws:
        WikiException - if an error occured
      • getWikiDefaultPermissions

        List<PermissionEntry> getWikiDefaultPermissions​(String wikiType,
                                                        String wikiOwner)
                                                 throws WikiException
        Gets a list of Wiki default permissions.
        Parameters:
        wikiType - It can be Portal, Group, or User.
        wikiOwner - The Wiki owner.
        Returns:
        The list of Wiki default permissions.
        Throws:
        WikiException - if an error occured
      • addComponentPlugin

        void addComponentPlugin​(org.exoplatform.container.component.ComponentPlugin plugin)
        Registers a component plugin into the Wiki service.
        Parameters:
        plugin - The component plugin to be registered.
      • addWikiTemplatePagePlugin

        void addWikiTemplatePagePlugin​(WikiTemplatePagePlugin templatePlugin)
        Adds a Wiki template as plugin.
        Parameters:
        templatePlugin - The wiki template plugin to be added.
      • addEmotionIconsPlugin

        void addEmotionIconsPlugin​(WikiEmotionIconsPlugin plugin)
        Adds a Wiki emotion icons as plugin.
        Parameters:
        plugin - The wiki emotion icons plugin to be added.
      • getPageListeners

        List<PageWikiListener> getPageListeners()
        Gets listeners of all wiki pages that are registered into the Wiki service.
        Returns:
        The list of listeners.
      • getAttachmentListeners

        List<AttachmentWikiListener> getAttachmentListeners()
        Gets attachment listeners that are registered into the Wiki service.
        Returns:
        The list of attachment listeners.
      • addRelatedPage

        void addRelatedPage​(WikiPageParams orginaryPageParams,
                            WikiPageParams relatedPageParams)
                     throws WikiException
        Adds a related page to the current wiki page.
        Parameters:
        orginaryPageParams - The params object of the current wiki page.
        relatedPageParams - The params object of the related page.
        Throws:
        WikiException - if an error occured
      • getRelatedPagesOfPage

        List<Page> getRelatedPagesOfPage​(Page page)
                                  throws WikiException
        Gets a list of related pages based on a given param.
        Parameters:
        page - The wiki page.
        Returns:
        The list of related pages.
        Throws:
        WikiException - if an error occured
      • removeRelatedPage

        void removeRelatedPage​(WikiPageParams orginaryPageParams,
                               WikiPageParams relatedPageParams)
                        throws WikiException
        Removes a related page of the current wiki page.
        Parameters:
        orginaryPageParams - The params object of the current wiki page.
        relatedPageParams - The params object of the related page.
        Throws:
        WikiException - if an error occured
      • createDraftForExistPage

        DraftPage createDraftForExistPage​(DraftPage draftPage,
                                          Page targetPage,
                                          String revision,
                                          long clientTime)
                                   throws WikiException
        Creates a draft page for a wiki page which is specified by a given param object.
        Parameters:
        draftPage - The draft object
        targetPage - The target 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.
        Returns:
        The draft page.
        Throws:
        WikiException - if an error occured if the draft page cannot be created.
      • createDraftForNewPage

        DraftPage createDraftForNewPage​(DraftPage draftPage,
                                        Page parentPage,
                                        long clientTime)
                                 throws WikiException
        Creates a draft page for a new wiki page whose parent is specified by a given param object.
        Parameters:
        draftPage - The draft object
        parentPage - The parent wiki page.
        clientTime - The time of client when the draft page is saved.
        Returns:
        The draft page.
        Throws:
        WikiException - if an error occured if the draft page cannot be created.
      • getDraftOfPage

        DraftPage getDraftOfPage​(Page page)
                          throws WikiException
        Gets a draft page of a wiki page which is specified by a given param object.
        Parameters:
        page - The wiki page.
        Returns:
        The draft page, or "null" if the draft page does not exist.
        Throws:
        WikiException - if an error occured
      • getDraft

        DraftPage getDraft​(String draftName)
                    throws WikiException
        Gets a draft page by its name.
        Parameters:
        draftName - Name of the draft page.
        Returns:
        The draft page, or "null" if it does not exist.
        Throws:
        WikiException - if an error occured
      • removeDraftOfPage

        void removeDraftOfPage​(WikiPageParams param)
                        throws WikiException
        Removes a draft page of a wiki page which is specified by the wiki page param.
        Parameters:
        param - The param object of the wiki page param.
        Throws:
        WikiException - if an error occured
      • removeDraft

        void removeDraft​(String draftName)
                  throws WikiException
        Removes a draft page by its name.
        Parameters:
        draftName - Name of the draft page.
        Throws:
        WikiException - if an error occured
      • getDraftsOfUser

        List<DraftPage> getDraftsOfUser​(String username)
                                 throws WikiException
        Gets a list of draft pages belonging to a given user.
        Parameters:
        username - Name of the user.
        Returns:
        The list of draft pages.
        Throws:
        WikiException - if an error occured
      • isDraftOutDated

        boolean isDraftOutDated​(DraftPage draftPage)
                         throws WikiException
        Check if a draft page is outdated
        Parameters:
        draftPage - the draft page object
        Returns:
        true if the draft is outdated
        Throws:
        WikiException - if an error occured
      • getLastestDraft

        DraftPage getLastestDraft()
                           throws WikiException
        Gets the last created draft of a wiki page.
        Returns:
        The last draft.
        Throws:
        WikiException - if an error occured
      • getDraftChanges

        org.exoplatform.commons.diff.DiffResult getDraftChanges​(DraftPage draftPage)
                                                         throws WikiException
        Gets the changes between the draft page and the target page
        Parameters:
        draftPage - the draft page object
        Returns:
        list of changes
        Throws:
        WikiException - if an error occured
      • getOrCreateUserWiki

        Wiki getOrCreateUserWiki​(String username)
                          throws WikiException
        Gets a user Wiki. If it does not exist, the new one will be created.
        Parameters:
        username - Name of the user.
        Returns:
        The user Wiki.
        Throws:
        WikiException - if an error occured
      • getSpaceNameByGroupId

        String getSpaceNameByGroupId​(String groupId)
        Gets a space name by a given group Id.
        Parameters:
        groupId - The group Id.
        Returns:
        The space name.
      • searchSpaces

        List<SpaceBean> searchSpaces​(String keyword)
                              throws WikiException
        Searches for spaces by a given keyword.
        Parameters:
        keyword - The keyword to search for spaces.
        Returns:
        The list of spaces matching with the keyword.
        Throws:
        WikiException - if an error occured
      • getWikiByTypeAndOwner

        Wiki getWikiByTypeAndOwner​(String wikiType,
                                   String owner)
                            throws WikiException
        Gets a Wiki which is defined by its type and owner.
        Parameters:
        wikiType - It can be Portal, Group, or User.
        owner - The Wiki owner.
        Returns:
        The Wiki.
        Throws:
        WikiException - if an error occured
      • getWikisByType

        List<Wiki> getWikisByType​(String wikiType)
                           throws WikiException
        Gets all wikis of the given type
        Parameters:
        wikiType - Type of wiki
        Returns:
        Wikis of the given type
        Throws:
        WikiException - if an error occured
      • createWiki

        Wiki createWiki​(String wikiType,
                        String owner)
                 throws WikiException
        Creates a wiki with the given type and owner
        Parameters:
        wikiType - It can be Portal, Group, or User.
        owner - The Wiki owner.
        Returns:
        Wiki created
        Throws:
        WikiException - if an error occured
      • getWikiWebappUri

        String getWikiWebappUri()
        Gets a Wiki webapp URI.
        Returns:
        The Wiki webapp URI.
      • hasPermissionOnWiki

        boolean hasPermissionOnWiki​(Wiki wiki,
                                    PermissionType permissionType,
                                    org.exoplatform.services.security.Identity user)
                             throws WikiException
        Check if the identity has the given permission type on a wiki
        Parameters:
        wiki - Wiki
        permissionType - Permission type to check
        user - Identity of the user
        Returns:
        true if the user has the given permission type on the wiki
        Throws:
        WikiException - if an error occured
      • hasPermissionOnPage

        boolean hasPermissionOnPage​(Page page,
                                    PermissionType permissionType,
                                    org.exoplatform.services.security.Identity user)
                             throws WikiException
        Checks if the given user has the permission on a page
        Parameters:
        user - the userName
        page - the wiki page object
        permissionType - permission Type
        Returns:
        true if user has permissions
        Throws:
        WikiException - if an error occured
      • hasAdminSpacePermission

        boolean hasAdminSpacePermission​(String wikiType,
                                        String owner)
                                 throws WikiException
        Checks if the current user has the admin permission on a space or not.
        Parameters:
        wikiType - It can be Portal, Group, or User.
        owner - Owner of the space.
        Returns:
        The returned value is "true" if the current user has the admin permission on the space, or "false" if not.
        Throws:
        WikiException - if an error occured
      • hasAdminPagePermission

        boolean hasAdminPagePermission​(String wikiType,
                                       String owner)
                                throws WikiException
        Checks if the current user has the admin permission on a wiki page.
        Parameters:
        wikiType - It can be Portal, Group, or User.
        owner - Owner of the wiki page.
        Returns:
        "True" if the current user has the admin permission on the wiki page, or "false" if not.
        Throws:
        WikiException - if an error occured
      • getWikiById

        Wiki getWikiById​(String wikiId)
                  throws WikiException
        Gets a Wiki by its Id.
        Parameters:
        wikiId - The Wiki Id.
        Returns:
        The Wiki.
        Throws:
        WikiException - if an error occured
      • getWikiNameById

        String getWikiNameById​(String wikiId)
                        throws WikiException
        Gets a Wiki name by its Id.
        Parameters:
        wikiId - The Wiki Id.
        Returns:
        The Wiki name.
        Throws:
        WikiException - if an error occured
      • canModifyPagePermission

        boolean canModifyPagePermission​(Page currentPage,
                                        String currentUser)
                                 throws WikiException
        Check if the given user can update the page
        Parameters:
        currentPage - The page to update
        currentUser - The user that needs to update the page
        Returns:
        true if the user can update the page
        Throws:
        WikiException - if an error occured
      • canPublicAndRetrictPage

        boolean canPublicAndRetrictPage​(Page currentPage,
                                        String currentUser)
                                 throws WikiException
        Check if the given user can public or restrict the page
        Parameters:
        currentPage - page to check
        currentUser - user to chck permissions
        Returns:
        true if the current user has EditPage permission or admin page or admin space
        Throws:
        WikiException - if an error occured
      • getVersionsOfPage

        List<PageVersion> getVersionsOfPage​(Page page)
                                     throws WikiException
        Gets all the versions of the given page
        Parameters:
        page - The wiki page
        Returns:
        All the versions of the page
        Throws:
        WikiException - if an error occured
      • getVersionOfPageByName

        PageVersion getVersionOfPageByName​(String versionName,
                                           Page page)
                                    throws WikiException
        Gets a specific version by name of the given page
        Parameters:
        versionName - The name of the version
        page - The wiki page
        Returns:
        The version of the wiki page
        Throws:
        WikiException - if an error occured
      • createVersionOfPage

        void createVersionOfPage​(Page page)
                          throws WikiException
        Creates a version of a page. This method only tag the current page data as a new version, it does not update the page data
        Parameters:
        page - The wiki page
        Throws:
        WikiException - if an error occured
      • restoreVersionOfPage

        void restoreVersionOfPage​(String versionName,
                                  Page page)
                           throws WikiException
        Restores a version of a page
        Parameters:
        versionName - The name of the version to restore
        page - The wiki page
        Throws:
        WikiException - if an error occured
      • updatePage

        void updatePage​(Page page,
                        PageUpdateType type)
                 throws WikiException
        Update the given page. This does not automatically create a new version. If a new version must be created it should be explicitly done by calling createVersionOfPage(). The second parameter is the type of update done (title only, content only, both, move, ...).
        Parameters:
        page - Updated page
        type - Type of update
        Throws:
        WikiException - if an error occured
      • getPreviousNamesOfPage

        List<String> getPreviousNamesOfPage​(Page page)
                                     throws WikiException
        Get previous names of a page
        Parameters:
        page - The wiki page
        Returns:
        List of all the previous names of the page
        Throws:
        WikiException - if an error occured
      • createEmotionIcon

        void createEmotionIcon​(EmotionIcon emotionIcon)
                        throws WikiException
        Creates a emotion icon
        Parameters:
        emotionIcon - The emotion icon to add
        Throws:
        WikiException - if an error occured
      • getEmotionIconByName

        EmotionIcon getEmotionIconByName​(String name)
                                  throws WikiException
        Gets an emotion icon by name
        Parameters:
        name - The name of the emotion icon
        Returns:
        The emotion icon
        Throws:
        WikiException - if an error occured
      • getWatchersOfPage

        List<String> getWatchersOfPage​(Page page)
                                throws WikiException
        Get all the watchers of a page
        Parameters:
        page - The wiki page
        Returns:
        liste of watchers
        Throws:
        WikiException - if an error occured
      • addWatcherToPage

        void addWatcherToPage​(String username,
                              Page page)
                       throws WikiException
        Add the given user as watcher of the wiki page
        Parameters:
        username - Username of the user to add as watcher
        page - The wiki page
        Throws:
        WikiException - if an error occured
      • deleteWatcherOfPage

        void deleteWatcherOfPage​(String username,
                                 Page page)
                          throws WikiException
        Delete a user as watcher of the given page
        Parameters:
        username - Username of the user to delete as watcher
        page - The wiki page
        Throws:
        WikiException - if an error occured
      • getUploadLimit

        int getUploadLimit()
        Returns:
        Upload limit for Wiki Attachment
      • getPagesOfWiki

        List<Page> getPagesOfWiki​(String wikiType,
                                  String wikiOwner)
        Retrieve the all pages contained in wiki
        Parameters:
        wikiType - the wiki type
        wikiOwner - the wiki owner
        Returns:
        List of pages