Package org.xwiki.wiki.descriptor
Interface WikiDescriptorManager
-
@Role public interface WikiDescriptorManagerComponent to list and get wiki descriptors.- Since:
- 5.3M2
- Version:
- $Id: bc39d0ab4073040a91d6bf3b25c3b78f1d35b1a0 $
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description booleanexists(String wikiId)Check if a wiki corresponding to an Id exists.Collection<WikiDescriptor>getAll()Get the list of all wikis descriptors.Collection<String>getAllIds()Get the list of all wikis identifiers.WikiDescriptorgetByAlias(String wikiAlias)Get a wiki from one of its aliases.WikiDescriptorgetById(String wikiId)Get a wiki from its Id.WikiDescriptorgetCurrentWikiDescriptor()StringgetCurrentWikiId()default WikiReferencegetCurrentWikiReference()WikiDescriptorgetMainWikiDescriptor()StringgetMainWikiId()default booleanisMainWiki(String wikiId)voidsaveDescriptor(WikiDescriptor descriptor)Save the given descriptor and all its property groups.
-
-
-
Method Detail
-
getAll
Collection<WikiDescriptor> getAll() throws WikiManagerException
Get the list of all wikis descriptors.- Returns:
- the list of every wiki created on the farm
- Throws:
WikiManagerException- if problems occur
-
getAllIds
Collection<String> getAllIds() throws WikiManagerException
Get the list of all wikis identifiers.- Returns:
- the list of every wiki created on the farm
- Throws:
WikiManagerException- if problems occur- Since:
- 6.2M1
-
getByAlias
WikiDescriptor getByAlias(String wikiAlias) throws WikiManagerException
Get a wiki from one of its aliases.- Parameters:
wikiAlias- Alias of the wiki to retrieve- Returns:
- The corresponding wiki descriptor of that alias.
- Throws:
WikiManagerException- if problems occur
-
getById
WikiDescriptor getById(String wikiId) throws WikiManagerException
Get a wiki from its Id.- Parameters:
wikiId- Id of the wiki to retrieve.- Returns:
- The corresponding wiki descriptor of that Id, null if none exist for this id
- Throws:
WikiManagerException- if problems occur
-
getMainWikiDescriptor
WikiDescriptor getMainWikiDescriptor() throws WikiManagerException
- Returns:
- the descriptor of the main wiki
- Throws:
WikiManagerException- if problems occur
-
getMainWikiId
String getMainWikiId()
- Returns:
- the Id of the main wiki
-
getCurrentWikiId
String getCurrentWikiId()
- Returns:
- the Id of the current wiki
-
getCurrentWikiReference
default WikiReference getCurrentWikiReference()
- Returns:
- the reference of the current wiki.
- Since:
- 12.7RC1
-
getCurrentWikiDescriptor
WikiDescriptor getCurrentWikiDescriptor() throws WikiManagerException
- Returns:
- the descriptor of the current wiki
- Throws:
WikiManagerException- if problems occur
-
exists
boolean exists(String wikiId) throws WikiManagerException
Check if a wiki corresponding to an Id exists.- Parameters:
wikiId- The id of the wiki to test.- Returns:
- true if a wiki with that Id exists.
- Throws:
WikiManagerException- if problems occur
-
saveDescriptor
void saveDescriptor(WikiDescriptor descriptor) throws WikiManagerException
Save the given descriptor and all its property groups.- Parameters:
descriptor- descriptor to save- Throws:
WikiManagerException- if problem occurs
-
isMainWiki
default boolean isMainWiki(String wikiId)
- Parameters:
wikiId- the identifier of the wiki- Returns:
- true if the passed wiki reference is the main wiki
- Since:
- 10.4RC1
-
-