org.xwiki.wiki.manager
Interface WikiManager


@Role
@Unstable
public interface WikiManager

Component to create and manage wikis.

Since:
5.3M2
Version:
$Id: d1c6232b0432c9cf858e28c47bab1757f5adf946 $

Method Summary
 WikiDescriptor copy(String fromWikiId, String newWikiId, String newWikiAlias, boolean copyHistory, boolean copyRecycleBin, boolean failOnExist)
          Copy a wiki.
 WikiDescriptor create(String wikiId, String wikiAlias, boolean failOnExist)
          Create a new wiki.
 void delete(String wikiId)
          Delete a wiki.
 boolean idAvailable(String wikiId)
          Check if the wikiId is valid and available (the name is not already taken for technical reasons).
 WikiDescriptor rename(String wikiId, String newWikiId)
          Rename a wiki.
 

Method Detail

create

WikiDescriptor create(String wikiId,
                      String wikiAlias,
                      boolean failOnExist)
                      throws WikiManagerException
Create a new wiki.

Parameters:
wikiId - Id of the new wiki
wikiAlias - Default alias of the new wiki
failOnExist - throw an exception if the wikiId already exists
Returns:
the descriptor of the created wiki
Throws:
WikiManagerException - if problems occur

copy

WikiDescriptor copy(String fromWikiId,
                    String newWikiId,
                    String newWikiAlias,
                    boolean copyHistory,
                    boolean copyRecycleBin,
                    boolean failOnExist)
                    throws WikiManagerException
Copy a wiki.

Parameters:
fromWikiId - If of the wiki to copy
newWikiId - Id of the new wiki
newWikiAlias - Default alias of the new wiki
copyHistory - decide if you want to copy the pages' history
copyRecycleBin - decide if you want to copy the recycle bin content
failOnExist - throw an exception if the wikiId already exists
Returns:
the descriptor of the created wiki
Throws:
WikiManagerException - if problems occur

rename

WikiDescriptor rename(String wikiId,
                      String newWikiId)
                      throws WikiManagerException
Rename a wiki.

Parameters:
wikiId - If of the wiki to rename
newWikiId - new Id of the wiki
Returns:
the descriptor of the renamed wiki
Throws:
WikiManagerException - if problems occur

delete

void delete(String wikiId)
            throws WikiManagerException
Delete a wiki.

Parameters:
wikiId - Id of the wiki to delete.
Throws:
WikiManagerException - if problems occur

idAvailable

boolean idAvailable(String wikiId)
                    throws WikiManagerException
Check if the wikiId is valid and available (the name is not already taken for technical reasons).

Parameters:
wikiId - the Id to test
Returns:
true if the Id is valid and available
Throws:
WikiManagerException - if problems occur


Copyright © 2004–2014 XWiki. All rights reserved.