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

java.lang.Object
  extended by com.xpn.xwiki.api.Api
      extended by com.xpn.xwiki.api.Document
          extended by com.xpn.xwiki.plugin.applicationmanager.core.doc.objects.classes.DefaultXObjectDocument
              extended by com.xpn.xwiki.plugin.wikimanager.doc.XWikiServer
All Implemented Interfaces:
XObjectDocument

public class XWikiServer
extends DefaultXObjectDocument

This class manage an XWiki document containing XWiki.XWikiServerClass object. It add some specifics methods, getters and setters for this type of object and fields.

Version:
$Id: 56d2cba1ee78ade20d97655f267d0f4c87a13765 $

Field Summary
 
Fields inherited from class com.xpn.xwiki.plugin.applicationmanager.core.doc.objects.classes.DefaultXObjectDocument
isNew, objectId, sclass
 
Fields inherited from class com.xpn.xwiki.api.Document
cloned, currentObj, doc
 
Fields inherited from class com.xpn.xwiki.api.Api
context
 
Fields inherited from interface com.xpn.xwiki.plugin.applicationmanager.core.doc.objects.classes.XObjectDocument
SPACE_DOC_SEPARATOR, WIKI_SPACE_SEPARATOR
 
Constructor Summary
XWikiServer(XWikiDocument xdoc, int objectId, XWikiContext context)
          Create new XWikiServer managing provided XWikiDocument.
 
Method Summary
 String getDescription()
           
 String getHomePage()
           
 URL getHomePageUrl()
           
 String getOwner()
           
 boolean getSecure()
           
 String getServer()
           
 URL getServerUrl()
           
 URL getServerUrl(String spaceName, String pageName)
          Get the complete URL of the provided wiki page.
 String getState()
           
 String getVisibility()
           
 String getWikiLanguage()
           
 String getWikiName()
           
 String getWikiPrettyName()
           
 URL getWikiUrl(String pageFullName)
          Get the complete URL of the provided wiki page.
 boolean isWikiTemplate()
           
 void setDescription(String description)
          Modify the description of the wiki.
 void setHomePage(String homePage)
          Modify the home page of the wiki.
 void setIsWikiTemplate(boolean isWikiTemplate)
           
 void setOwner(String owner)
          Modify the owner of the wiki.
 void setSecure(boolean secure)
          Modify the secure mode of the wiki.
 void setServer(String server)
          Modify the domain name of the wiki.
 void setState(String state)
          Modify the state of the wiki.
 void setVisibility(String visibility)
          Modify the visibility of the wiki.
 void setWikiLanguage(String language)
          Modify the language of the wiki.
 void setWikiName(String wikiName)
          Modify the name of the application.
 void setWikiPrettyName(String wikiPrettyName)
          Modify the pretty name of the application.
 String toString()
           
 
Methods inherited from class com.xpn.xwiki.plugin.applicationmanager.core.doc.objects.classes.DefaultXObjectDocument
delete, getBaseObject, getBooleanValue, getDocumentApi, getIntValue, getLargeStringValue, getListValue, getObjectApi, getObjectId, getStringListValue, getStringValue, getXClassManager, isNew, mergeObject, reload, saveDocument, setBooleanValue, setFullName, setIntValue, setLargeStringValue, setListValue, setStringListValue, setStringValue
 
Methods inherited from class com.xpn.xwiki.api.Document
addAttachment, addAttachment, addAttachments, addAttachments, addObjectFromRequest, addObjectFromRequest, addObjectFromRequest, addObjectsFromRequest, addObjectsFromRequest, checkAccess, convertSyntax, createNewObject, 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, dropPermissions, 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, 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, getRenderedContentRestricted, 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, isHidden, isMinorEdit, isMostRecent, isProgrammaticContent, newObject, removeObject, removeObjects, rename, rename, rename, rename, rename, renameDocument, renameDocument, save, save, save, saveAsAuthor, saveAsAuthor, saveAsAuthor, saveWithProgrammingRights, saveWithProgrammingRights, saveWithProgrammingRights, set, set, setComment, setContent, setCustomClass, setDefaultTemplate, setHidden, 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
convert, convert, getXWikiContext, hasAdminRights, hasProgrammingRights, hasWikiAdminRights
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

XWikiServer

public XWikiServer(XWikiDocument xdoc,
                   int objectId,
                   XWikiContext context)
            throws XWikiException
Create new XWikiServer managing provided XWikiDocument.

Parameters:
xdoc - the encapsulated XWikiDocument.
objectId - the id of the XWiki object included in the document to manage.
context - the XWiki context.
Throws:
XWikiException - error when:
Method Detail

getWikiName

public String getWikiName()
Returns:
the name of the wiki.
See Also:
setWikiName(String)

setWikiName

public void setWikiName(String wikiName)
Modify the name of the application.

Parameters:
wikiName - the new name of the wiki.

getWikiPrettyName

public String getWikiPrettyName()
Returns:
the pretty name of the wiki.
See Also:
setWikiPrettyName(String)

setWikiPrettyName

public void setWikiPrettyName(String wikiPrettyName)
Modify the pretty name of the application.

Parameters:
wikiPrettyName - the new name of the wiki.

getOwner

public String getOwner()
Returns:
the name of the owner of the wiki.

setOwner

public void setOwner(String owner)
Modify the owner of the wiki.

Parameters:
owner - the new owner of the wiki.

getDescription

public String getDescription()
Returns:
the description od the wiki.

setDescription

public void setDescription(String description)
Modify the description of the wiki.

Parameters:
description - the new description of the wiki.

getServer

public String getServer()
Returns:
the domain name of the wiki.

setServer

public void setServer(String server)
Modify the domain name of the wiki.

Parameters:
server - the new domain name of the wiki.

getVisibility

public String getVisibility()
Returns:
the visibility of the wiki. Can be:

setVisibility

public void setVisibility(String visibility)
Modify the visibility of the wiki.

Parameters:
visibility - the new visibility of the wiki. Can be:

getWikiLanguage

public String getWikiLanguage()
Returns:
the language of the wiki.

setWikiLanguage

public void setWikiLanguage(String language)
Modify the language of the wiki.

Parameters:
language - the new language of the wiki.

getState

public String getState()
Returns:
the state of the wiki.

setState

public void setState(String state)
Modify the state of the wiki.

Parameters:
state - the new state of the wiki.

getSecure

public boolean getSecure()
Returns:
true if wiki is in secure mode (https), false if in simple non-secure (http) mode.

setSecure

public void setSecure(boolean secure)
Modify the secure mode of the wiki.

Parameters:
secure - true if wiki is in secure mode (https), false if in simple non-secure (http) mode.

getHomePage

public String getHomePage()
Returns:
the home page of the wiki.

setHomePage

public void setHomePage(String homePage)
Modify the home page of the wiki.

Parameters:
homePage - the new home page of the wiki.

setIsWikiTemplate

public void setIsWikiTemplate(boolean isWikiTemplate)
Parameters:
isWikiTemplate - true if it's a wiki template, false otherwise.

isWikiTemplate

public boolean isWikiTemplate()
Returns:
true if it's a wiki template, false otherwise.

toString

public String toString()
Overrides:
toString in class Document

getServerUrl

public URL getServerUrl()
                 throws MalformedURLException
Returns:
the complete URL of the wiki.
Throws:
MalformedURLException - error occurred when creating the URL.

getHomePageUrl

public URL getHomePageUrl()
                   throws MalformedURLException
Returns:
the complete URL of the wiki home page.
Throws:
MalformedURLException - error occurred when creating the URL.

getWikiUrl

public URL getWikiUrl(String pageFullName)
               throws MalformedURLException
Get the complete URL of the provided wiki page.

Parameters:
pageFullName - the page full name for which to get the complete URL.
Returns:
the complete URL of the provided wiki page.
Throws:
MalformedURLException - error occurred when creating the URL.

getServerUrl

public URL getServerUrl(String spaceName,
                        String pageName)
                 throws MalformedURLException
Get the complete URL of the provided wiki page.

Parameters:
spaceName - the space name of the page for which to get the complete URL.
pageName - the name of the page for which to get the complete URL.
Returns:
the complete URL of the provided wiki page.
Throws:
MalformedURLException - error occurred when creating the URL.


Copyright © 2004-2013 XWiki. All Rights Reserved.