Package org.xwiki.wiki.manager
Interface WikiManager
-
@Role public interface WikiManagerComponent to create and manage wikis.- Since:
- 5.3M2
- Version:
- $Id: 53848f6ab0df6b89616256d77d3c29894bf3b840 $
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description WikiDescriptorcopy(String fromWikiId, String newWikiId, String newWikiAlias, boolean copyHistory, boolean copyRecycleBin, boolean failOnExist)Copy a wiki.WikiDescriptorcreate(String wikiId, String wikiAlias, boolean failOnExist)Create a new wiki.default WikiDescriptorcreate(String wikiId, String wikiAlias, String ownerId, boolean failOnExist)Create a new wiki.voiddelete(String wikiId)Delete a wiki.booleanidAvailable(String wikiId)Check if the wikiId is valid and available (the name is not already taken for technical reasons).WikiDescriptorrename(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 wikiwikiAlias- Default alias of the new wikifailOnExist- throw an exception if the wikiId already exists- Returns:
- the descriptor of the created wiki
- Throws:
WikiManagerException- if problems occur
-
create
default WikiDescriptor create(String wikiId, String wikiAlias, String ownerId, boolean failOnExist) throws WikiManagerException
Create a new wiki.- Parameters:
wikiId- Id of the new wikiwikiAlias- Default alias of the new wikiownerId- the identifier of the owner of the wiki (generally a serialized user reference)failOnExist- throw an exception if the wikiId already exists- Returns:
- the descriptor of the created wiki
- Throws:
WikiManagerException- if problems occur- Since:
- 11.3, 10.11.8
-
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 copynewWikiId- Id of the new wikinewWikiAlias- Default alias of the new wikicopyHistory- decide if you want to copy the pages' historycopyRecycleBin- decide if you want to copy the recycle bin contentfailOnExist- 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 renamenewWikiId- 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
-
-