org.xwiki.wiki.descriptor
Interface WikiDescriptorManager


@Role
@Unstable
public interface WikiDescriptorManager

Component to list and get wiki descriptors.

Since:
5.3M2
Version:
$Id: f8a834f3e4d47e13c8c97aea81418acc90fb076b $

Method Summary
 boolean exists(String wikiId)
          Check if a wiki corresponding to an Id exists.
 Collection<WikiDescriptor> getAll()
          Get the list of all wikis (except the main one).
 WikiDescriptor getByAlias(String wikiAlias)
          Get a wiki from one of its alias.
 WikiDescriptor getById(String wikiId)
          Get a wiki from its Id.
 String getCurrentWikiId()
           
 WikiDescriptor getMainWikiDescriptor()
           
 String getMainWikiId()
           
 void saveDescriptor(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 (except the main one).

Returns:
the lit of every wiki created on the farm (except the main one).
Throws:
WikiManagerException - if problems occur

getByAlias

WikiDescriptor getByAlias(String wikiAlias)
                          throws WikiManagerException
Get a wiki from one of its alias.

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
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

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


Copyright © 2004–2014 XWiki. All rights reserved.