com.xpn.xwiki.plugin.wikimanager.doc
Class Wiki

java.lang.Object
  extended by com.xpn.xwiki.api.Api
      extended by com.xpn.xwiki.api.Document
          extended by com.xpn.xwiki.plugin.wikimanager.doc.Wiki

public class Wiki
extends Document

This class manage wiki document descriptor.

Version:
$Id$

Field Summary
protected static org.apache.commons.logging.Log LOG
          The logging tool.
 
Fields inherited from class com.xpn.xwiki.api.Document
cloned, currentObj, doc
 
Fields inherited from class com.xpn.xwiki.api.Api
context
 
Constructor Summary
Wiki(XWikiDocument xdoc, XWikiContext context)
          Create instance of wiki descriptor.
 
Method Summary
 boolean containsWikiAlias(java.lang.String domain)
          Check if a wiki alias with provided name exists.
 int countWikiAliases()
           
 void delete(boolean deleteDatabase)
          Delete the wiki.
 XWikiServer getFirstWikiAlias()
           
 XWikiServer getWikiAlias(int id)
          Get wiki alias with provided id.
 XWikiServer getWikiAlias(java.lang.String domain)
          Get wiki alias with provided domain name.
 int getWikiAliasIdFromDomain(java.lang.String domain)
          Get wiki alias id from domain name.
 java.util.Collection<XWikiServer> getWikiAliasList()
           
 java.lang.String getWikiName()
           
 java.lang.String toString()
          
 
Methods inherited from class com.xpn.xwiki.api.Document
addAttachment, addAttachment, addAttachments, addAttachments, addObjectFromRequest, addObjectFromRequest, addObjectFromRequest, addObjectsFromRequest, addObjectsFromRequest, checkAccess, convertSyntax, createNewObject, delete, deleteAsAuthor, deleteDocument, deleteWithProgrammingRights, display, display, display, display, display, display, display, displayEdit, displayForm, displayForm, displayForm, displayHidden, displayPrettyName, displayPrettyName, displayPrettyName, displayPrettyName, displayPrettyName, displayPrettyName, displayRendered, displayTooltip, displayTooltip, displayView, equals, get, getActiveClass, getArchive, getAttachment, getAttachmentDiff, getAttachmentList, getAttachmentRevisionURL, getAttachmentRevisionURL, getAttachmentURL, getAttachmentURL, getAttachmentURL, getAuthor, getBacklinks, getChildren, getChildren, getClassDiff, getComment, getComments, getComments, getContent, getContentAuthor, getContentDiff, getContentUpdateDate, getCreationDate, getCreator, getCurrentMonthPageStats, getCurrentMonthRefStats, getCurrentMonthSpaceStats, getCurrentMonthWebStats, getDate, getDefaultEditMode, getDefaultEditURL, getDefaultLanguage, getDefaultTemplate, getDisplayTitle, getDoc, getDocument, getDocumentArchive, getDocumentReference, getDocumentRevision, getEditURL, getEditURL, getEscapedContent, getExternalURL, getExternalURL, getExternalURL, getFirstObject, getFormat, getFullName, getId, getIncludedMacros, getIncludedPages, getLanguage, getLastChanges, getLinkedPages, getLinks, getLocked, getLockingDate, getLockingUser, getMetaDataDiff, getName, getObject, getObject, getObject, getObject, getObject, getObjectDiff, getObjectNumbers, getObjects, getObjects, getParent, getParentURL, getPlainTitle, getPrefixedFullName, getPreviousDocument, getPreviousVersion, getRCSVersion, getRealLanguage, getRecentRevisions, getRecentRevisions, getRenderedContent, getRenderedContent, getRenderedContent, getRenderedContent, getRenderedContent, getRenderedContentDiff, getRenderedTitle, getRevisionInfo, getRevisions, getRevisions, getSections, getSpace, getSyntax, getSyntaxId, getTagList, getTags, getTagsPossibleValues, getTemplate, getTextArea, getTitle, getTOC, getTranslatedContent, getTranslatedContent, getTranslatedDocument, getTranslatedDocument, getTranslationList, getURL, getURL, getURL, getValidationScript, getValue, getValue, getVersion, getVersionHashCode, getWeb, getWiki, getXMLContent, getXMLDiff, getXObjects, getxWikiClass, getxWikiClasses, getxWikiObjects, hasAccessLevel, hasAccessLevel, insertText, isAdvancedContent, isCreator, isCurrentLocalUserPage, isCurrentUserCreator, isCurrentUserPage, isFromCache, isMinorEdit, isMostRecent, isNew, isProgrammaticContent, newObject, removeObject, removeObjects, rename, rename, rename, rename, rename, renameDocument, renameDocument, save, save, save, saveAsAuthor, saveAsAuthor, saveAsAuthor, saveDocument, saveWithProgrammingRights, saveWithProgrammingRights, saveWithProgrammingRights, set, set, setComment, setContent, setCustomClass, setDefaultTemplate, setMinorEdit, setParent, setSyntax, setSyntaxId, setTitle, setValidationScript, toXML, toXMLDocument, updateObjectFromRequest, updateObjectFromRequest, updateObjectsFromRequest, updateObjectsFromRequest, use, use, use, validate, validate
 
Methods inherited from class com.xpn.xwiki.api.Api
checkProgrammingRights, convert, convert, getXWikiContext, hasAdminRights, hasProgrammingRights
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

LOG

protected static final org.apache.commons.logging.Log LOG
The logging tool.

Constructor Detail

Wiki

public Wiki(XWikiDocument xdoc,
            XWikiContext context)
     throws XWikiException
Create instance of wiki descriptor.

Parameters:
xdoc - the encapsulated XWikiDocument.
context - the XWiki context.
Throws:
XWikiException - error when creating Document.
Method Detail

getWikiName

public java.lang.String getWikiName()
                             throws XWikiException
Returns:
the name of the wiki.
Throws:
XWikiException - error when getting XWikiServerClass instance.

delete

public void delete(boolean deleteDatabase)
            throws XWikiException
Delete the wiki.

Parameters:
deleteDatabase - if true wiki's database is also removed.
Throws:
XWikiException - error deleting the wiki.
Since:
1.1

countWikiAliases

public int countWikiAliases()
                     throws XWikiException
Returns:
the number of wiki aliases in this wiki.
Throws:
XWikiException - when getting the number of wiki aliases.
Since:
1.1

getWikiAliasIdFromDomain

public int getWikiAliasIdFromDomain(java.lang.String domain)
                             throws XWikiException
Get wiki alias id from domain name.

Parameters:
domain - the wiki alias domain name.
Returns:
the wiki alias id.
Throws:
XWikiException - error when getting wiki alias id from domain name.
Since:
1.1

getWikiAliasList

public java.util.Collection<XWikiServer> getWikiAliasList()
                                                   throws XWikiException
Returns:
the list of aliases to of this wiki.
Throws:
XWikiException - error when getting aliases.

getWikiAlias

public XWikiServer getWikiAlias(java.lang.String domain)
                         throws XWikiException
Get wiki alias with provided domain name.

Parameters:
domain - the domain name of the wiki alias.
Returns:
a wiki alias.
Throws:
XWikiException - error when :

getWikiAlias

public XWikiServer getWikiAlias(int id)
                         throws XWikiException
Get wiki alias with provided id.

Parameters:
id - the id of the wiki alias.
Returns:
an wiki alias.
Throws:
XWikiException - error when creating wiki alias object.

getFirstWikiAlias

public XWikiServer getFirstWikiAlias()
                              throws XWikiException
Returns:
the first wiki alias used to describe the wiki itself.
Throws:
XWikiException - error when creating wiki alias object.

containsWikiAlias

public boolean containsWikiAlias(java.lang.String domain)
Check if a wiki alias with provided name exists.

Parameters:
domain - the domain name of the wiki alias.
Returns:
true if the wiki alias with provided domain name exists, false otherwise or if there is any error.
Since:
1.1

toString

public java.lang.String toString()

Overrides:
toString in class Document
See Also:
Object.toString()


Copyright © 2004-2011 XWiki. All Rights Reserved.