|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.xpn.xwiki.XWiki
public class XWiki
Field Summary | |
---|---|
static String |
CFG_ENV_NAME
|
static String |
DEFAULT_ENCODING
The default encoding, and the internally used encoding when dealing with byte representation of strings. |
static String |
DEFAULT_HOME_SPACE
Name of the default home space. |
static String |
DEFAULT_MAIN_WIKI
Name of the default wiki. |
static String |
DEFAULT_SPACE_HOMEPAGE
Name of the default space homepage. |
protected static org.slf4j.Logger |
LOGGER
Logging helper object. |
static String |
MACROS_FILE
|
static String |
SYSTEM_SPACE
Name of the default system space. |
Constructor Summary | |
---|---|
XWiki()
This provide a way to create an XWiki object without initializing the whole XWiki (including plugins, storage, etc.). |
|
XWiki(InputStream is,
XWikiContext context,
XWikiEngineContext engine_context)
Deprecated. use XWiki(XWikiConfig, XWikiContext, XWikiEngineContext, boolean) instead |
|
XWiki(String xwikicfgpath,
XWikiContext context)
Deprecated. use XWiki(XWikiConfig, XWikiContext) instead |
|
XWiki(String xwikicfgpath,
XWikiContext context,
XWikiEngineContext engine_context,
boolean noupdate)
Deprecated. use XWiki(XWikiConfig, XWikiContext, XWikiEngineContext, boolean) instead |
|
XWiki(XWikiConfig config,
XWikiContext context)
|
|
XWiki(XWikiConfig config,
XWikiContext context,
XWikiEngineContext engine_context,
boolean noupdate)
|
Method Summary | ||
---|---|---|
String |
addMandatory(XWikiContext context)
|
|
String |
addTooltip(String html,
String message,
String params,
XWikiContext context)
|
|
String |
addTooltip(String html,
String message,
XWikiContext context)
|
|
String |
addTooltipJS(XWikiContext context)
|
|
protected void |
addUserToGroup(String userName,
String groupName,
XWikiContext context)
|
|
static Object |
callPrivateMethod(Object obj,
String methodName)
|
|
static Object |
callPrivateMethod(Object obj,
String methodName,
Class<?>[] classes,
Object[] args)
|
|
boolean |
checkAccess(String action,
XWikiDocument doc,
XWikiContext context)
|
|
int |
checkActive(String user,
XWikiContext context)
|
|
int |
checkActive(XWikiContext context)
|
|
XWikiUser |
checkAuth(XWikiContext context)
|
|
String |
clearName(String name,
boolean stripDots,
boolean ascii,
XWikiContext context)
|
|
String |
clearName(String name,
XWikiContext context)
|
|
String |
convertUsername(String username,
XWikiContext context)
|
|
boolean |
copyDocument(DocumentReference sourceDocumentReference,
DocumentReference targetDocumentReference,
boolean reset,
boolean force,
boolean resetCreationData,
XWikiContext context)
|
|
boolean |
copyDocument(DocumentReference sourceDocumentReference,
DocumentReference targetDocumentReference,
boolean reset,
XWikiContext context)
|
|
boolean |
copyDocument(DocumentReference sourceDocumentReference,
DocumentReference targetDocumentReference,
String wikilanguage,
boolean reset,
boolean force,
boolean resetCreationData,
XWikiContext context)
|
|
boolean |
copyDocument(DocumentReference sourceDocumentReference,
DocumentReference targetDocumentReference,
String wikilanguage,
boolean reset,
boolean force,
XWikiContext context)
|
|
boolean |
copyDocument(DocumentReference sourceDocumentReference,
DocumentReference targetDocumentReference,
String wikilanguage,
boolean reset,
XWikiContext context)
|
|
boolean |
copyDocument(DocumentReference sourceDocumentReference,
DocumentReference targetDocumentReference,
String wikilanguage,
XWikiContext context)
|
|
boolean |
copyDocument(DocumentReference sourceDocumentReference,
DocumentReference targetDocumentReference,
XWikiContext context)
|
|
int |
copySpaceBetweenWikis(String space,
String sourceWiki,
String targetWiki,
String language,
boolean clean,
XWikiContext context)
|
|
int |
copySpaceBetweenWikis(String space,
String sourceWiki,
String targetWiki,
String language,
XWikiContext context)
|
|
int |
copyWiki(String sourceWiki,
String targetWiki,
String language,
boolean clean,
XWikiContext context)
Copy an entire wiki to a target wiki. |
|
int |
copyWiki(String sourceWiki,
String targetWiki,
String language,
XWikiContext context)
Copy an entire wiki to a target wiki. |
|
int |
countAttachments(String parametrizedSqlClause,
List<?> parameterValues,
XWikiContext context)
Count attachments returned by a given parameterized query |
|
protected Object |
createClassFromConfig(String param,
String defClass,
XWikiContext context)
|
|
boolean |
createEmptyUser(String xwikiname,
String userRights,
XWikiContext context)
Method allows to create an empty user with no password (he won't be able to login) This method is usefull for authentication like LDAP or App Server trusted |
|
int |
createUser(boolean withValidation,
String userRights,
XWikiContext context)
|
|
int |
createUser(String userName,
Map<String,?> map,
EntityReference parentReference,
String content,
org.xwiki.rendering.syntax.Syntax syntax,
String userRights,
XWikiContext context)
Create a new user. |
|
int |
createUser(String userName,
Map<String,?> map,
String parent,
String content,
String syntaxId,
String userRights,
XWikiContext context)
Deprecated. since 2.4RC1 use createUser(String, Map, EntityReference, String, Syntax, String, XWikiContext) instead |
|
int |
createUser(String userName,
Map<String,?> map,
String userRights,
XWikiContext context)
Create a new user. |
|
int |
createUser(String userName,
Map<String,?> map,
XWikiContext context)
Create a new user. |
|
int |
createUser(String xwikiname,
Map map,
String parent,
String content,
String userRights,
XWikiContext context)
Deprecated. starting with XE 1.8.1 use createUser(String, Map, String, String, String, String, XWikiContext) instead |
|
int |
createUser(XWikiContext context)
|
|
void |
deleteAllDocuments(XWikiDocument doc,
boolean totrash,
XWikiContext context)
|
|
void |
deleteAllDocuments(XWikiDocument doc,
XWikiContext context)
|
|
void |
deleteDocument(XWikiDocument doc,
boolean totrash,
XWikiContext context)
|
|
void |
deleteDocument(XWikiDocument doc,
XWikiContext context)
|
|
String |
evaluateTemplate(String template,
XWikiContext context)
Evaluate provided template content using velocity engine. |
|
boolean |
exists(DocumentReference documentReference,
XWikiContext context)
|
|
boolean |
exists(String fullname,
XWikiContext context)
Deprecated. since 2.2.1 use exists(DocumentReference, XWikiContext) |
|
void |
flushCache(XWikiContext context)
|
|
String |
formatDate(Date date,
String format,
XWikiContext context)
|
|
long |
freeMemory()
|
|
void |
gc()
|
|
String |
generateRandomString(int size)
|
|
String |
generateValidationKey(int size)
|
|
String |
getAdClientId(XWikiContext context)
|
|
String |
getAdType(XWikiContext context)
|
|
AttachmentRecycleBinStore |
getAttachmentRecycleBinStore()
|
|
XWikiAttachmentStoreInterface |
getAttachmentStore()
|
|
String |
getAttachmentURL(String fullname,
String filename,
String queryString,
XWikiContext context)
|
|
String |
getAttachmentURL(String fullname,
String filename,
XWikiContext context)
|
|
AttachmentVersioningStore |
getAttachmentVersioningStore()
|
|
XWikiAuthService |
getAuthService()
|
|
List<Locale> |
getAvailableLocales(XWikiContext xcontext)
Get the available locales according to the preferences. |
|
String |
getBaseSkin(String skin,
XWikiContext context)
|
|
String |
getBaseSkin(XWikiContext context)
|
|
String |
getBaseSkin(XWikiContext context,
boolean fromRenderSkin)
|
|
CacheFactory |
getCacheFactory()
Deprecated. Since 1.7M1, use CacheManager component instead using Utils.getComponent(Class) |
|
BaseClass |
getClass(String fullName,
XWikiContext context)
Deprecated. since 2.2M2 use getXClass(DocumentReference, XWikiContext) |
|
List<String> |
getClassList(XWikiContext context)
|
|
BaseClass |
getCommentsClass(XWikiContext context)
|
|
XWikiConfig |
getConfig()
|
|
static String |
getConfigPath()
|
|
List<String> |
getConfiguredSyntaxes()
|
|
String |
getConvertingUserNameType(XWikiContext context)
|
|
XWikiCriteriaService |
getCriteriaService(XWikiContext context)
|
|
String |
getCurrentContentSyntaxId(String defaultSyntaxId,
XWikiContext context)
Get the syntax of the document currently being executed. |
|
String |
getCurrentContentSyntaxId(XWikiContext context)
Get the syntax of the document currently being executed. |
|
Date |
getCurrentDate()
|
|
String |
getDatabase()
|
|
Date |
getDate(long time)
|
|
String |
getDefaultBaseSkin(XWikiContext context)
|
|
String |
getDefaultDocumentSyntax()
|
|
String |
getDefaultLanguage(XWikiContext xcontext)
Deprecated. since 5.1M2 use getDefaultLocale(XWikiContext) instead |
|
Locale |
getDefaultLocale(XWikiContext xcontext)
The default locale in the preferences. |
|
String |
getDefaultPage(XWikiContext context)
|
|
String |
getDefaultSpace(XWikiContext context)
|
|
DeletedAttachment |
getDeletedAttachment(String id,
XWikiContext context)
Retrieve a specific attachment from the trash. |
|
List<DeletedAttachment> |
getDeletedAttachments(String docName,
String filename,
XWikiContext context)
Retrieve all the deleted attachments that belonged to a certain document and had the specified name. |
|
List<DeletedAttachment> |
getDeletedAttachments(String docName,
XWikiContext context)
Retrieve all the deleted attachments that belonged to a certain document. |
|
XWikiDeletedDocument |
getDeletedDocument(String fullname,
String lang,
int index,
XWikiContext context)
|
|
XWikiDeletedDocument[] |
getDeletedDocuments(String fullname,
String lang,
XWikiContext context)
|
|
String |
getDocLanguagePreferenceNew(XWikiContext context)
|
|
String |
getDocName(String docname)
|
|
XWikiDocument |
getDocument(DocumentReference reference,
XWikiContext context)
|
|
XWikiDocument |
getDocument(EntityReference reference,
XWikiContext context)
|
|
XWikiDocument |
getDocument(String space,
String fullname,
XWikiContext context)
Deprecated. since 2.2M1 use getDocument(DocumentReference, XWikiContext) instead |
|
XWikiDocument |
getDocument(String fullname,
XWikiContext context)
Deprecated. since 2.2M1 use getDocument(DocumentReference, XWikiContext) instead |
|
XWikiDocument |
getDocument(XWikiDocument doc,
String revision,
XWikiContext context)
|
|
XWikiDocument |
getDocument(XWikiDocument doc,
XWikiContext context)
|
|
DocumentReference |
getDocumentReference(XWikiRequest request,
XWikiContext context)
|
|
BaseClass |
getEditModeClass(XWikiContext context)
Verify if the XWiki.EditModeClass page exists and that it contains all the required configuration
properties to make the edit mode feature work properly. |
|
String |
getEditorPreference(XWikiContext context)
|
|
String |
getEncoding()
|
|
XWikiEngineContext |
getEngineContext()
|
|
List<org.xwiki.observation.event.Event> |
getEvents()
|
|
String |
getExternalAttachmentURL(String fullName,
String filename,
XWikiContext context)
|
|
String |
getExternalURL(String fullname,
String action,
String querystring,
XWikiContext context)
|
|
String |
getExternalURL(String fullname,
String action,
XWikiContext context)
|
|
String |
getFlash(String url,
String width,
String height,
XWikiContext context)
|
|
String |
getFullNameSQL()
|
|
String |
getFullNameSQL(boolean newFullName)
|
|
BaseClass |
getGlobalRightsClass(XWikiContext context)
|
|
BaseClass |
getGroupClass(XWikiContext context)
|
|
XWikiGroupService |
getGroupService(XWikiContext context)
|
|
XWikiHibernateStore |
getHibernateStore()
|
|
static org.apache.commons.httpclient.HttpClient |
getHttpClient(int timeout,
String userAgent)
|
|
int |
getHttpTimeout(XWikiContext context)
|
|
String |
getHttpUserAgent(XWikiContext context)
|
|
String |
getIconURL(String iconName,
XWikiContext context)
|
|
List<String> |
getIncludedMacros(String defaultSpace,
String content,
XWikiContext context)
|
|
String |
getInterfaceLanguagePreference(XWikiContext context)
|
|
String |
getLanguagePreference(XWikiContext context)
First try to find the current language in use from the XWiki context. |
|
CacheFactory |
getLocalCacheFactory()
Deprecated. Since 1.7M1, use CacheManager component instead using Utils.getComponent(Class) |
|
String |
getLocalUserName(String user,
String format,
boolean link,
XWikiContext context)
|
|
String |
getLocalUserName(String user,
String format,
XWikiContext context)
|
|
String |
getLocalUserName(String user,
XWikiContext context)
|
|
String |
getMacroList(XWikiContext context)
|
|
static XWiki |
getMainXWiki(XWikiContext context)
|
|
int |
getMaxRecursiveSpaceChecks(XWikiContext context)
|
|
MetaClass |
getMetaclass()
|
|
String |
getName()
|
|
XWikiStoreInterface |
getNotCacheStore()
|
|
BaseObject |
getObjectFromRequest(String className,
XWikiContext context)
|
|
XWikiPluginInterface |
getPlugin(String name,
XWikiContext context)
|
|
Api |
getPluginApi(String name,
XWikiContext context)
|
|
XWikiPluginManager |
getPluginManager()
|
|
BaseClass |
getPrefsClass(XWikiContext context)
Verify if the XWiki.XWikiPreferences page exists and that it contains all the required configuration
properties to make XWiki work properly. |
|
static Object |
getPrivateField(Object obj,
String fieldName)
|
|
PropertyClass |
getPropertyClassFromName(String propPath,
XWikiContext context)
|
|
String |
getRealPath(String path)
|
|
XWikiRecycleBinStoreInterface |
getRecycleBinStore()
|
|
BaseClass |
getRedirectClass(XWikiContext context)
Verify if the XWiki.GlobalRedirect page exists and that it contains all the required configuration
properties to make the redirection feature work properly. |
|
String |
getRefererText(String referer,
XWikiContext context)
|
|
XWikiRenderingEngine |
getRenderingEngine()
|
|
static URL |
getRequestURL(XWikiRequest request)
|
|
URL |
getResource(String s)
|
|
InputStream |
getResourceAsStream(String s)
|
|
String |
getResourceContent(String name)
|
|
byte[] |
getResourceContentAsBytes(String name)
|
|
Date |
getResourceLastModificationDate(String name)
|
|
BaseClass |
getRightsClass(String pagename,
XWikiContext context)
|
|
BaseClass |
getRightsClass(XWikiContext context)
|
|
XWikiRightService |
getRightService()
|
|
long |
getSectionEditingDepth()
|
|
URL |
getServerURL(String database,
XWikiContext context)
|
|
static String |
getServerWikiPage(String servername)
|
|
String |
getServletPath(String wikiName,
XWikiContext context)
|
|
BaseClass |
getSheetClass(XWikiContext context)
Deprecated. since 3.1M2 edit mode class should be used for this purpose, not the sheet class |
|
String |
getSkin(XWikiContext context)
|
|
BaseClass |
getSkinClass(XWikiContext context)
|
|
String |
getSkinFile(String filename,
boolean forceSkinAction,
XWikiContext context)
|
|
String |
getSkinFile(String filename,
String skin,
boolean forceSkinAction,
XWikiContext context)
|
|
String |
getSkinFile(String filename,
String skin,
XWikiContext context)
|
|
String |
getSkinFile(String filename,
XWikiContext context)
|
|
String |
getSkinPreference(String prefname,
String default_value,
XWikiContext context)
|
|
String |
getSkinPreference(String prefname,
XWikiContext context)
|
|
String |
getSpaceCopyright(XWikiContext context)
|
|
List<String> |
getSpaceDocsName(String spaceName,
XWikiContext context)
API to list all non-hidden documents in a space. |
|
String |
getSpacePreference(String preference,
String space,
String defaultValue,
XWikiContext context)
|
|
String |
getSpacePreference(String preference,
String defaultValue,
XWikiContext context)
|
|
String |
getSpacePreference(String preference,
XWikiContext context)
|
|
int |
getSpacePreferenceAsInt(String preference,
int defaultValue,
XWikiContext context)
|
|
int |
getSpacePreferenceAsInt(String preference,
XWikiContext context)
|
|
long |
getSpacePreferenceAsLong(String preference,
long defaultValue,
XWikiContext context)
|
|
long |
getSpacePreferenceAsLong(String preference,
XWikiContext context)
|
|
List<String> |
getSpaces(XWikiContext context)
API to list all non-hidden spaces in the current wiki. |
|
XWikiStatsService |
getStatsService(XWikiContext context)
|
|
XWikiStoreInterface |
getStore()
|
|
BaseClass |
getTagClass(XWikiContext context)
Verify if the XWiki.TagClass page exists and that it contains all the required configuration
properties to make the tag feature work properly. |
|
static String |
getTextArea(String content,
XWikiContext context)
|
|
int |
getTimeDelta(long time)
|
|
String |
getUniquePageName(String space,
String name,
XWikiContext context)
|
|
String |
getUniquePageName(String space,
XWikiContext context)
|
|
String |
getURL(DocumentReference documentReference,
String action,
String queryString,
String anchor,
XWikiContext context)
|
|
String |
getURL(DocumentReference reference,
String action,
XWikiContext context)
|
|
String |
getURL(String fullname,
String action,
String queryString,
String anchor,
XWikiContext context)
Deprecated. since 2.2.1 use getURL(DocumentReference, String, String, String, XWikiContext) |
|
String |
getURL(String fullname,
String action,
String querystring,
XWikiContext context)
|
|
String |
getURL(String fullname,
String action,
XWikiContext context)
Deprecated. since 2.3M2 use getURL(DocumentReference, String, XWikiContext) |
|
String |
getURLContent(String surl,
int timeout,
String userAgent)
|
|
String |
getURLContent(String surl,
String username,
String password,
int timeout,
String userAgent)
|
|
String |
getURLContent(String surl,
String username,
String password,
XWikiContext context)
|
|
String |
getURLContent(String surl,
XWikiContext context)
|
|
byte[] |
getURLContentAsBytes(String surl,
int timeout,
String userAgent)
|
|
byte[] |
getURLContentAsBytes(String surl,
String username,
String password,
int timeout,
String userAgent)
|
|
byte[] |
getURLContentAsBytes(String surl,
String username,
String password,
XWikiContext context)
|
|
byte[] |
getURLContentAsBytes(String surl,
XWikiContext context)
|
|
XWikiURLFactoryService |
getURLFactoryService()
|
|
User |
getUser(String username,
XWikiContext context)
|
|
User |
getUser(XWikiContext context)
|
|
BaseClass |
getUserClass(XWikiContext context)
Verify if the XWiki.XWikiUsers page exists and that it contains all the required configuration
properties to make the user feature work properly. |
|
String |
getUserName(String user,
String format,
boolean link,
XWikiContext context)
|
|
String |
getUserName(String user,
String format,
XWikiContext context)
|
|
String |
getUserName(String user,
XWikiContext context)
|
|
String |
getUserPreference(String prefname,
boolean useCookie,
XWikiContext context)
|
|
String |
getUserPreference(String prefname,
XWikiContext context)
|
|
int |
getUserPreferenceAsInt(String prefname,
XWikiContext context)
|
|
long |
getUserPreferenceAsLong(String preference,
XWikiContext context)
|
|
String |
getUserPreferenceFromCookie(String prefname,
XWikiContext context)
|
|
String |
getUserTimeZone(XWikiContext context)
|
|
String |
getVersion()
|
|
XWikiVersioningStoreInterface |
getVersioningStore()
|
|
Cache<DocumentReference> |
getVirtualWikiCache()
|
|
List<String> |
getVirtualWikiList()
|
|
List<String> |
getVirtualWikisDatabaseNames(XWikiContext context)
|
|
String |
getWebAppPath(XWikiContext context)
|
|
String |
getWikiOwner(String wikiName,
XWikiContext context)
Get the reference of the owner for the provider wiki. |
|
String |
getWysiwygToolbars(XWikiContext context)
|
|
BaseClass |
getXClass(DocumentReference documentReference,
XWikiContext context)
|
|
static XWiki |
getXWiki(XWikiContext context)
Return the XWiki object (as in "the Wiki API") corresponding to the requested wiki. |
|
String |
getXWikiPreference(String prefname,
String fallback_param,
String default_value,
XWikiContext context)
Obtain a preference value for the wiki, looking up first in the XWiki.XWikiPreferences document, then fallbacking on a config parameter when the first lookup gives an empty string, then returning the default value if the config parameter returned itself an empty string. |
|
String |
getXWikiPreference(String prefname,
String default_value,
XWikiContext context)
|
|
String |
getXWikiPreference(String prefname,
XWikiContext context)
|
|
int |
getXWikiPreferenceAsInt(String preference,
int defaultValue,
XWikiContext context)
|
|
int |
getXWikiPreferenceAsInt(String preference,
String fallbackParameter,
int defaultValue,
XWikiContext context)
|
|
int |
getXWikiPreferenceAsInt(String preference,
XWikiContext context)
|
|
long |
getXWikiPreferenceAsLong(String preference,
long defaultValue,
XWikiContext context)
|
|
long |
getXWikiPreferenceAsLong(String preference,
String fallbackParameter,
long defaultValue,
XWikiContext context)
|
|
long |
getXWikiPreferenceAsLong(String preference,
XWikiContext context)
|
|
ZipOutputStream |
getZipOutputStream(XWikiContext context)
|
|
boolean |
hasAttachmentRecycleBin(XWikiContext context)
Indicates whether deleted attachments are stored in a recycle bin or not. |
|
boolean |
hasAttachmentVersioning(XWikiContext context)
|
|
boolean |
hasBacklinks(XWikiContext context)
|
|
boolean |
hasCaptcha(XWikiContext context)
|
|
boolean |
hasCentralizedAuthentication(XWikiContext context)
|
|
boolean |
hasCustomMappings()
|
|
boolean |
hasDynamicCustomMappings()
|
|
boolean |
hasEditComment(XWikiContext context)
|
|
boolean |
hasMinorEdit(XWikiContext context)
|
|
boolean |
hasRecycleBin(XWikiContext context)
|
|
boolean |
hasSectionEdit(XWikiContext context)
|
|
boolean |
hasTags(XWikiContext context)
|
|
boolean |
hasVersioning(String fullName,
XWikiContext context)
Deprecated. since 2.3M1 use hasVersioning(XWikiContext) instead |
|
boolean |
hasVersioning(XWikiContext context)
|
|
String |
include(String topic,
boolean isForm,
XWikiContext context)
|
|
String |
include(String topic,
XWikiContext context,
boolean isForm)
Deprecated. replaced by include(String topic, boolean isForm, XWikiContext context) |
|
void |
initXWiki(XWikiConfig config,
XWikiContext context,
XWikiEngineContext engine_context,
boolean noupdate)
Initialize all xwiki subsystems. |
|
String |
invokeServletAndReturnAsString(String url,
XWikiContext xwikiContext)
Designed to include dynamic content, such as Servlets or JSPs, inside Velocity templates; works by creating a RequestDispatcher, buffering the output, then returning it as a string. |
|
boolean |
isEditCommentFieldHidden(XWikiContext context)
|
|
boolean |
isEditCommentMandatory(XWikiContext context)
|
|
boolean |
isEditCommentSuggested(XWikiContext context)
|
|
boolean |
isLDAP()
|
|
boolean |
isMultiLingual(XWikiContext context)
|
|
boolean |
isMySQL()
|
|
boolean |
isReadOnly()
accessor for the isReadOnly instance var. |
|
boolean |
isTest()
Deprecated. No longer used. |
|
boolean |
isTitleInCompatibilityMode()
|
|
boolean |
isVirtualMode()
Deprecated. Virtual mode is on by default, starting with XWiki 5.0M2. Use getVirtualWikisDatabaseNames(XWikiContext) to get the list of wikis if needed. |
|
long |
maxMemory()
|
|
void |
onEvent(org.xwiki.observation.event.Event event,
Object source,
Object data)
|
|
String |
Param(String key)
|
|
String |
Param(String key,
String default_value)
|
|
long |
ParamAsLong(String key)
|
|
long |
ParamAsLong(String key,
long default_value)
|
|
String |
ParamAsRealPath(String key)
|
|
String |
ParamAsRealPath(String key,
XWikiContext context)
|
|
String |
ParamAsRealPathVerified(String param)
|
|
String |
parseContent(String content,
XWikiContext context)
|
|
Object |
parseGroovyFromPage(String fullName,
String jarWikiPage,
XWikiContext context)
|
|
Object |
parseGroovyFromPage(String fullname,
XWikiContext context)
|
|
Object |
parseGroovyFromString(String script,
String jarWikiPage,
XWikiContext context)
Privileged API to retrieve an object instantiated from groovy code in a String, using a classloader including all JAR files located in the passed page as attachments. |
|
Object |
parseGroovyFromString(String script,
XWikiContext context)
Privileged API to retrieve an object instantiated from groovy code in a String. |
|
String |
parseMessage(String id,
XWikiContext context)
Deprecated. use LocalizationManager instead. From velocity you can access it using
the $services.localization binding, see LocalizationScriptService |
|
String |
parseMessage(XWikiContext context)
Deprecated. use LocalizationManager instead. From velocity you can access it using
the $services.localization binding, see LocalizationScriptService |
|
String |
parseTemplate(String template,
String skin,
XWikiContext context)
|
|
String |
parseTemplate(String template,
XWikiContext context)
Deprecated. use evaluateTemplate(String, XWikiContext) instead |
|
boolean |
prepareDocuments(XWikiRequest request,
XWikiContext context,
org.apache.velocity.VelocityContext vcontext)
|
|
void |
prepareResources(XWikiContext context)
Prepares the localized resources, according to the selected language. |
|
String |
printStrackTrace(Throwable e)
|
|
void |
protectUserPage(String userName,
String userRights,
XWikiDocument doc,
XWikiContext context)
|
|
void |
refreshLinks(XWikiContext context)
|
|
void |
renamePage(String fullName,
String newFullName,
XWikiContext context)
|
|
XWikiDocument |
renamePage(XWikiDocument doc,
String newFullName,
XWikiContext context)
Deprecated. use XWikiDocument.rename(String, XWikiContext) instead |
|
XWikiDocument |
renamePage(XWikiDocument doc,
XWikiContext context,
String newFullName)
Deprecated. use XWikiDocument.rename(String, XWikiContext) instead |
|
String |
renderTemplate(String template,
String skin,
XWikiContext context)
|
|
String |
renderTemplate(String template,
XWikiContext context)
|
|
void |
resetRenderingEngine(XWikiContext context)
|
|
boolean |
resourceExists(String name)
|
|
void |
restoreFromRecycleBin(XWikiDocument doc,
long index,
String comment,
XWikiContext context)
Restore a document with passed index from recycle bin. |
|
void |
restoreFromRecycleBin(XWikiDocument doc,
String comment,
XWikiContext context)
Restore a document with passed index from recycle bin. |
|
XWikiDocument |
rollback(XWikiDocument tdoc,
String rev,
XWikiContext context)
|
|
void |
saveDocument(XWikiDocument document,
String comment,
boolean isMinorEdit,
XWikiContext context)
|
|
void |
saveDocument(XWikiDocument doc,
String comment,
XWikiContext context)
|
|
void |
saveDocument(XWikiDocument doc,
XWikiContext context)
|
|
|
search(String sql,
int nb,
int start,
Object[][] whereParams,
XWikiContext context)
|
|
|
search(String sql,
int nb,
int start,
XWikiContext context)
|
|
|
search(String sql,
Object[][] whereParams,
XWikiContext context)
|
|
|
search(String sql,
XWikiContext context)
|
|
List<XWikiAttachment> |
searchAttachments(String parametrizedSqlClause,
boolean checkRight,
int nb,
int start,
List<?> parameterValues,
XWikiContext context)
Search attachments by passing HQL where clause values as parameters. |
|
void |
sendConfirmationEmail(String xwikiname,
String password,
String email,
String message,
String contentfield,
XWikiContext context)
|
|
void |
sendMessage(String sender,
String[] recipients,
String rawMessage,
XWikiContext context)
Deprecated. replaced by the Mail Sender Plugin |
|
void |
sendMessage(String sender,
String recipient,
String message,
XWikiContext context)
Deprecated. replaced by the Mail Sender Plugin |
|
void |
sendValidationEmail(String xwikiname,
String password,
String email,
String addfieldname,
String addfieldvalue,
String contentfield,
XWikiContext context)
|
|
void |
sendValidationEmail(String xwikiname,
String password,
String email,
String validkey,
String contentfield,
XWikiContext context)
|
|
void |
setAttachmentRecycleBinStore(AttachmentRecycleBinStore attachmentRecycleBinStore)
|
|
void |
setAttachmentStore(XWikiAttachmentStoreInterface attachmentStore)
|
|
void |
setAttachmentVersioningStore(AttachmentVersioningStore avStore)
|
|
void |
setAuthService(XWikiAuthService authService)
|
|
void |
setConfig(XWikiConfig config)
|
|
void |
setCriteriaService(XWikiCriteriaService criteriaService)
|
|
void |
setDatabase(String database)
|
|
void |
setEngineContext(XWikiEngineContext engine_context)
|
|
void |
setGroupService(XWikiGroupService groupService)
|
|
void |
setMetaclass(MetaClass metaclass)
|
|
void |
setPhonyDocument(DocumentReference reference,
XWikiContext context,
org.apache.velocity.VelocityContext vcontext)
|
|
void |
setPhonyDocument(String docName,
XWikiContext context,
org.apache.velocity.VelocityContext vcontext)
Deprecated. since 2.3M1 use setPhonyDocument(DocumentReference, XWikiContext, VelocityContext) |
|
void |
setPluginManager(XWikiPluginManager pluginManager)
|
|
void |
setReadOnly(boolean readOnly)
|
|
void |
setRecycleBinStore(XWikiRecycleBinStoreInterface recycleBinStore)
|
|
void |
setRenderingEngine(XWikiRenderingEngine renderingEngine)
|
|
void |
setRightService(XWikiRightService rightService)
|
|
void |
setStore(XWikiStoreInterface store)
|
|
void |
setTest(boolean test)
Deprecated. No longer used. |
|
void |
setUserDefaultGroup(String fullwikiname,
XWikiContext context)
|
|
void |
setVersion(String version)
|
|
void |
setVersioningStore(XWikiVersioningStoreInterface versioningStore)
|
|
boolean |
showViewAction(XWikiContext context)
|
|
boolean |
skipDefaultSpaceInURLs(XWikiContext context)
|
|
String[] |
split(String str,
String sep)
|
|
static String |
stripSegmentFromPath(String path,
String segment)
Helper method, removes a predefined path segment (the context path or the servel path) from the start of the requested URI and returns the remainder. |
|
long |
totalMemory()
|
|
void |
updateDatabase(String wikiName,
boolean force,
boolean initClasses,
XWikiContext context)
|
|
void |
updateDatabase(String wikiName,
boolean force,
XWikiContext context)
|
|
void |
updateDatabase(String wikiName,
XWikiContext context)
|
|
boolean |
useDefaultAction(XWikiContext context)
|
|
boolean |
validateDocument(XWikiDocument doc,
XWikiContext context)
|
|
int |
validateUser(boolean withConfirmEmail,
XWikiContext context)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String DEFAULT_MAIN_WIKI
public static final String DEFAULT_HOME_SPACE
public static final String SYSTEM_SPACE
public static final String DEFAULT_SPACE_HOMEPAGE
protected static final org.slf4j.Logger LOGGER
public static final String DEFAULT_ENCODING
public static final String CFG_ENV_NAME
public static final String MACROS_FILE
Constructor Detail |
---|
public XWiki()
Needed for tools or tests which need XWiki because it is used everywhere in the API.
public XWiki(XWikiConfig config, XWikiContext context) throws XWikiException
XWikiException
public XWiki(XWikiConfig config, XWikiContext context, XWikiEngineContext engine_context, boolean noupdate) throws XWikiException
XWikiException
@Deprecated public XWiki(String xwikicfgpath, XWikiContext context) throws XWikiException
XWiki(XWikiConfig, XWikiContext)
instead
XWikiException
@Deprecated public XWiki(String xwikicfgpath, XWikiContext context, XWikiEngineContext engine_context, boolean noupdate) throws XWikiException
XWiki(XWikiConfig, XWikiContext, XWikiEngineContext, boolean)
instead
XWikiException
@Deprecated public XWiki(InputStream is, XWikiContext context, XWikiEngineContext engine_context) throws XWikiException
XWiki(XWikiConfig, XWikiContext, XWikiEngineContext, boolean)
instead
XWikiException
Method Detail |
---|
public static String getConfigPath() throws NamingException
NamingException
public static XWiki getMainXWiki(XWikiContext context) throws XWikiException
XWikiException
public static XWiki getXWiki(XWikiContext context) throws XWikiException
context
- the current context
XWikiException
- if the requested URL does not correspond to a real wiki, or if there's an error in the
storagepublic static URL getRequestURL(XWikiRequest request) throws XWikiException
XWikiException
public static Object callPrivateMethod(Object obj, String methodName)
public static Object callPrivateMethod(Object obj, String methodName, Class<?>[] classes, Object[] args)
public static org.apache.commons.httpclient.HttpClient getHttpClient(int timeout, String userAgent)
public static Object getPrivateField(Object obj, String fieldName)
public static String getServerWikiPage(String servername)
public static String getTextArea(String content, XWikiContext context)
public void initXWiki(XWikiConfig config, XWikiContext context, XWikiEngineContext engine_context, boolean noupdate) throws XWikiException
XWikiException
public XWikiStoreInterface getNotCacheStore()
public XWikiHibernateStore getHibernateStore()
public void updateDatabase(String wikiName, XWikiContext context) throws org.hibernate.HibernateException, XWikiException
org.hibernate.HibernateException
XWikiException
public void updateDatabase(String wikiName, boolean force, XWikiContext context) throws org.hibernate.HibernateException, XWikiException
org.hibernate.HibernateException
XWikiException
public void updateDatabase(String wikiName, boolean force, boolean initClasses, XWikiContext context) throws org.hibernate.HibernateException, XWikiException
org.hibernate.HibernateException
XWikiException
public List<String> getVirtualWikiList()
getVirtualWikisDatabaseNames(XWikiContext)
.public List<String> getVirtualWikisDatabaseNames(XWikiContext context) throws XWikiException
XWikiException
public Cache<DocumentReference> getVirtualWikiCache()
public String getWikiOwner(String wikiName, XWikiContext context) throws XWikiException
wikiName
- the technical name of the wikicontext
- the XWiki context
XWikiException
- failed to get wiki descriptor documentprotected Object createClassFromConfig(String param, String defClass, XWikiContext context) throws XWikiException
XWikiException
public void resetRenderingEngine(XWikiContext context) throws XWikiException
XWikiException
public String getVersion()
VERSION_FILE
filepublic URL getResource(String s) throws MalformedURLException
MalformedURLException
public InputStream getResourceAsStream(String s) throws MalformedURLException
MalformedURLException
public String getResourceContent(String name) throws IOException
IOException
public Date getResourceLastModificationDate(String name)
public byte[] getResourceContentAsBytes(String name) throws IOException
IOException
public boolean resourceExists(String name)
public XWikiConfig getConfig()
public String getRealPath(String path)
public String Param(String key)
public String ParamAsRealPath(String key)
public String ParamAsRealPath(String key, XWikiContext context)
public String ParamAsRealPathVerified(String param)
public String Param(String key, String default_value)
public long ParamAsLong(String key)
public long ParamAsLong(String key, long default_value)
public XWikiStoreInterface getStore()
public XWikiAttachmentStoreInterface getAttachmentStore()
public AttachmentVersioningStore getAttachmentVersioningStore()
public XWikiVersioningStoreInterface getVersioningStore()
public XWikiRecycleBinStoreInterface getRecycleBinStore()
public AttachmentRecycleBinStore getAttachmentRecycleBinStore()
public void saveDocument(XWikiDocument doc, XWikiContext context) throws XWikiException
XWikiException
public void saveDocument(XWikiDocument doc, String comment, XWikiContext context) throws XWikiException
XWikiException
public void saveDocument(XWikiDocument document, String comment, boolean isMinorEdit, XWikiContext context) throws XWikiException
XWikiException
@Unstable public XWikiDocument getDocument(EntityReference reference, XWikiContext context) throws XWikiException
XWikiException
public XWikiDocument getDocument(XWikiDocument doc, XWikiContext context) throws XWikiException
XWikiException
public XWikiDocument getDocument(XWikiDocument doc, String revision, XWikiContext context) throws XWikiException
XWikiException
public XWikiDocument getDocument(DocumentReference reference, XWikiContext context) throws XWikiException
XWikiException
@Deprecated public XWikiDocument getDocument(String fullname, XWikiContext context) throws XWikiException
getDocument(DocumentReference, XWikiContext)
instead
XWikiException
@Deprecated public XWikiDocument getDocument(String space, String fullname, XWikiContext context) throws XWikiException
getDocument(DocumentReference, XWikiContext)
instead
XWikiException
public XWikiDeletedDocument[] getDeletedDocuments(String fullname, String lang, XWikiContext context) throws XWikiException
XWikiException
XWiki.getDeletedDocuments(String, String)
public XWikiDeletedDocument getDeletedDocument(String fullname, String lang, int index, XWikiContext context) throws XWikiException
XWikiException
XWiki.getDeletedDocument(String, String, String)
public List<DeletedAttachment> getDeletedAttachments(String docName, XWikiContext context) throws XWikiException
docName
- the name
of the owner documentcontext
- the current request context
XWikiException
- if an error occurs while loading the attachmentspublic List<DeletedAttachment> getDeletedAttachments(String docName, String filename, XWikiContext context) throws XWikiException
docName
- the name of the document
the attachment belonged tofilename
- the name
of the attachment to search forcontext
- the current request context
XWikiException
- if an error occurs while loading the attachmentspublic DeletedAttachment getDeletedAttachment(String id, XWikiContext context) throws XWikiException
id
- the unique identifier of the entry in the trash
null
if not found
XWikiException
- if an error occurs while loading the attachmentspublic XWikiRenderingEngine getRenderingEngine()
public void setRenderingEngine(XWikiRenderingEngine renderingEngine)
public MetaClass getMetaclass()
public void setMetaclass(MetaClass metaclass)
public List<String> getClassList(XWikiContext context) throws XWikiException
XWikiException
public <T> List<T> search(String sql, XWikiContext context) throws XWikiException
XWikiException
public <T> List<T> search(String sql, int nb, int start, XWikiContext context) throws XWikiException
XWikiException
public <T> List<T> search(String sql, Object[][] whereParams, XWikiContext context) throws XWikiException
XWikiException
public <T> List<T> search(String sql, int nb, int start, Object[][] whereParams, XWikiContext context) throws XWikiException
XWikiException
@Deprecated public boolean isTest()
true
if the wiki is running Cactus tests, false
otherwise@Deprecated public void setTest(boolean test)
test
- whether tests are being executedpublic String parseContent(String content, XWikiContext context)
@Deprecated public String parseTemplate(String template, XWikiContext context)
evaluateTemplate(String, XWikiContext)
instead
public String evaluateTemplate(String template, XWikiContext context) throws IOException
template
- the template to evaluatecontext
- the XWiki context
IOException
- failed to get the template contentpublic String parseTemplate(String template, String skin, XWikiContext context)
public String renderTemplate(String template, String skin, XWikiContext context)
public String renderTemplate(String template, XWikiContext context)
public String invokeServletAndReturnAsString(String url, XWikiContext xwikiContext)
public String getIconURL(String iconName, XWikiContext context)
iconName
- the standard name of an icon (it's not the name of the file on the filesystem, it's a generic
name, for example "success" for a success icon
public String getSkinFile(String filename, XWikiContext context)
public String getSkinFile(String filename, boolean forceSkinAction, XWikiContext context)
public String getSkinFile(String filename, String skin, XWikiContext context)
public String getSkinFile(String filename, String skin, boolean forceSkinAction, XWikiContext context)
public String getSkin(XWikiContext context)
public String getSkinPreference(String prefname, XWikiContext context)
public String getSkinPreference(String prefname, String default_value, XWikiContext context)
public String getDefaultBaseSkin(XWikiContext context)
public String getBaseSkin(XWikiContext context)
public String getBaseSkin(XWikiContext context, boolean fromRenderSkin)
public String getBaseSkin(String skin, XWikiContext context)
skin
- the full name of the skin document for which to return the base skin. For example :
XWiki.DefaultSkincontext
- the XWiki context
public String getSpaceCopyright(XWikiContext context)
public String getXWikiPreference(String prefname, XWikiContext context)
public String getXWikiPreference(String prefname, String fallback_param, String default_value, XWikiContext context)
prefname
- the parameter to look for in the XWiki.XWikiPreferences object corresponding to the context's
language in the XWiki.XWikiPreferences document of the wiki (or the first XWiki.XWikiPreferences
object contained, if the one for the context'ds language could not be found).fallback_param
- the parameter in xwiki.cfg to fallback on, in case the XWiki.XWikiPreferences object gave
no resultdefault_value
- the default value to fallback on, in case both XWiki.XWikiPreferences and the fallback
xwiki.cfg parameter gave no resultpublic String getXWikiPreference(String prefname, String default_value, XWikiContext context)
public String getSpacePreference(String preference, XWikiContext context)
public String getSpacePreference(String preference, String defaultValue, XWikiContext context)
public String getSpacePreference(String preference, String space, String defaultValue, XWikiContext context)
public String getUserPreference(String prefname, XWikiContext context)
public String getUserPreferenceFromCookie(String prefname, XWikiContext context)
public String getUserPreference(String prefname, boolean useCookie, XWikiContext context)
public String getLanguagePreference(XWikiContext context)
@Deprecated public String getDefaultLanguage(XWikiContext xcontext)
getDefaultLocale(XWikiContext)
instead
public Locale getDefaultLocale(XWikiContext xcontext)
xcontext
- the XWiki context.
public List<Locale> getAvailableLocales(XWikiContext xcontext)
xcontext
- the XWiki context
public String getDocLanguagePreferenceNew(XWikiContext context)
public String getInterfaceLanguagePreference(XWikiContext context)
public long getXWikiPreferenceAsLong(String preference, XWikiContext context)
public long getSpacePreferenceAsLong(String preference, XWikiContext context)
public long getXWikiPreferenceAsLong(String preference, long defaultValue, XWikiContext context)
public long getXWikiPreferenceAsLong(String preference, String fallbackParameter, long defaultValue, XWikiContext context)
public long getSpacePreferenceAsLong(String preference, long defaultValue, XWikiContext context)
public long getUserPreferenceAsLong(String preference, XWikiContext context)
public int getXWikiPreferenceAsInt(String preference, XWikiContext context)
public int getSpacePreferenceAsInt(String preference, XWikiContext context)
public int getXWikiPreferenceAsInt(String preference, int defaultValue, XWikiContext context)
public int getXWikiPreferenceAsInt(String preference, String fallbackParameter, int defaultValue, XWikiContext context)
public int getSpacePreferenceAsInt(String preference, int defaultValue, XWikiContext context)
public int getUserPreferenceAsInt(String prefname, XWikiContext context)
public void flushCache(XWikiContext context)
public XWikiPluginManager getPluginManager()
public void setPluginManager(XWikiPluginManager pluginManager)
public void setConfig(XWikiConfig config)
public void setStore(XWikiStoreInterface store)
public void setAttachmentStore(XWikiAttachmentStoreInterface attachmentStore)
public void setAttachmentVersioningStore(AttachmentVersioningStore avStore)
public void setVersioningStore(XWikiVersioningStoreInterface versioningStore)
public void setRecycleBinStore(XWikiRecycleBinStoreInterface recycleBinStore)
public void setAttachmentRecycleBinStore(AttachmentRecycleBinStore attachmentRecycleBinStore)
public void setCriteriaService(XWikiCriteriaService criteriaService)
public void setVersion(String version)
public BaseClass getTagClass(XWikiContext context) throws XWikiException
XWiki.TagClass
page exists and that it contains all the required configuration
properties to make the tag feature work properly. If some properties are missing they are created and saved in
the database.
context
- the XWiki Context
XWikiException
- if an error happens during the save to the datavase@Deprecated public BaseClass getSheetClass(XWikiContext context) throws XWikiException
XWiki.SheetClass
page exists and that it contains all the required configuration
properties to make the sheet feature work properly. If some properties are missing they are created and saved in
the database. SheetClass is used to a page as a sheet. When a page is tagged as a sheet and that page is included
in another page using the include macro then editing it triggers automatic inline edition (for XWiki Syntax 2.0
only - for XWiki Syntax 1.0 automatic inline edition is triggered using #includeForm).
context
- the XWiki Context
XWikiException
- if an error happens during the save to the databasegetEditModeClass(XWikiContext)
public BaseClass getEditModeClass(XWikiContext context) throws XWikiException
XWiki.EditModeClass
page exists and that it contains all the required configuration
properties to make the edit mode feature work properly. If some properties are missing they are created and saved
in the database. EditModeClass is used to specify the default edit mode of a page. It can also be used to mark a
page as a sheet. When a page is marked as a sheet and that page is included in another page using the include
macro then editing it triggers automatic inline edition (for XWiki Syntax 2.0 only - for XWiki Syntax 1.0
automatic inline edition is triggered using #includeForm). It replaces and enhances the SheetClass mechanism (see
getSheetClass(XWikiContext)
).
context
- the XWiki Context
XWikiException
- if an error happens during the save to the databasepublic BaseClass getUserClass(XWikiContext context) throws XWikiException
XWiki.XWikiUsers
page exists and that it contains all the required configuration
properties to make the user feature work properly. If some properties are missing they are created and saved in
the database.
context
- the XWiki Context
XWikiException
- if an error happens during the save to the datavasepublic BaseClass getRedirectClass(XWikiContext context) throws XWikiException
XWiki.GlobalRedirect
page exists and that it contains all the required configuration
properties to make the redirection feature work properly. If some properties are missing they are created and
saved in the database.
context
- the XWiki Context
XWikiException
- if an error happens during the save to the datavasepublic BaseClass getPrefsClass(XWikiContext context) throws XWikiException
XWiki.XWikiPreferences
page exists and that it contains all the required configuration
properties to make XWiki work properly. If some properties are missing they are created and saved in the
database.
context
- the XWiki Context
XWikiException
- if an error happens during the save to the datavasepublic BaseClass getGroupClass(XWikiContext context) throws XWikiException
XWikiException
public BaseClass getRightsClass(String pagename, XWikiContext context) throws XWikiException
XWikiException
public BaseClass getRightsClass(XWikiContext context) throws XWikiException
XWikiException
public BaseClass getGlobalRightsClass(XWikiContext context) throws XWikiException
XWikiException
public BaseClass getCommentsClass(XWikiContext context) throws XWikiException
XWikiException
public BaseClass getSkinClass(XWikiContext context) throws XWikiException
XWikiException
public int createUser(XWikiContext context) throws XWikiException
XWikiException
public int validateUser(boolean withConfirmEmail, XWikiContext context) throws XWikiException
XWikiException
public int createUser(boolean withValidation, String userRights, XWikiContext context) throws XWikiException
XWikiException
public boolean createEmptyUser(String xwikiname, String userRights, XWikiContext context) throws XWikiException
xwikiname
- userRights
- context
-
XWikiException
public void sendConfirmationEmail(String xwikiname, String password, String email, String message, String contentfield, XWikiContext context) throws XWikiException
XWikiException
public void sendValidationEmail(String xwikiname, String password, String email, String validkey, String contentfield, XWikiContext context) throws XWikiException
XWikiException
public void sendValidationEmail(String xwikiname, String password, String email, String addfieldname, String addfieldvalue, String contentfield, XWikiContext context) throws XWikiException
XWikiException
@Deprecated public void sendMessage(String sender, String[] recipients, String rawMessage, XWikiContext context) throws XWikiException
XWikiException
@Deprecated public void sendMessage(String sender, String recipient, String message, XWikiContext context) throws XWikiException
XWikiException
public String generateRandomString(int size)
public String generateValidationKey(int size)
public int createUser(String userName, Map<String,?> map, XWikiContext context) throws XWikiException
userName
- the name of the user (without the space)map
- extra datas to add to user profile objectcontext
- the XWiki context
XWikiException
- failed to create the new userpublic int createUser(String userName, Map<String,?> map, String userRights, XWikiContext context) throws XWikiException
userName
- the name of the user (without the space)map
- extra datas to add to user profile objectuserRights
- the right of the user on his own profile pagecontext
- the XWiki context
XWikiException
- failed to create the new user@Deprecated public int createUser(String userName, Map<String,?> map, String parent, String content, String syntaxId, String userRights, XWikiContext context) throws XWikiException
createUser(String, Map, EntityReference, String, Syntax, String, XWikiContext)
instead
XWikiException
public int createUser(String userName, Map<String,?> map, EntityReference parentReference, String content, org.xwiki.rendering.syntax.Syntax syntax, String userRights, XWikiContext context) throws XWikiException
userName
- the name of the user (without the space)map
- extra datas to add to user profile objectparentReference
- the parent of the user profilecontent
- the content of the user profilesyntax
- the syntax of the provided contentuserRights
- the right of the user on his own profile pagecontext
- the XWiki context
XWikiException
- failed to create the new user@Deprecated public int createUser(String xwikiname, Map map, String parent, String content, String userRights, XWikiContext context) throws XWikiException
createUser(String, Map, String, String, String, String, XWikiContext)
instead
XWikiException
public void setUserDefaultGroup(String fullwikiname, XWikiContext context) throws XWikiException
XWikiException
protected void addUserToGroup(String userName, String groupName, XWikiContext context) throws XWikiException
XWikiException
public void protectUserPage(String userName, String userRights, XWikiDocument doc, XWikiContext context) throws XWikiException
XWikiException
public User getUser(XWikiContext context)
public User getUser(String username, XWikiContext context)
public void prepareResources(XWikiContext context)
context
- The request context.public XWikiUser checkAuth(XWikiContext context) throws XWikiException
XWikiException
public boolean checkAccess(String action, XWikiDocument doc, XWikiContext context) throws XWikiException
XWikiException
@Deprecated public String include(String topic, XWikiContext context, boolean isForm) throws XWikiException
include(String topic, boolean isForm, XWikiContext context)
topic
- context
- isForm
-
XWikiException
public String include(String topic, boolean isForm, XWikiContext context) throws XWikiException
XWikiException
public void deleteDocument(XWikiDocument doc, XWikiContext context) throws XWikiException
XWikiException
public void deleteDocument(XWikiDocument doc, boolean totrash, XWikiContext context) throws XWikiException
XWikiException
public String getDatabase()
public void setDatabase(String database)
public void gc()
public long freeMemory()
public long totalMemory()
public long maxMemory()
public String[] split(String str, String sep)
public String printStrackTrace(Throwable e)
public boolean copyDocument(DocumentReference sourceDocumentReference, DocumentReference targetDocumentReference, XWikiContext context) throws XWikiException
XWikiException
public boolean copyDocument(DocumentReference sourceDocumentReference, DocumentReference targetDocumentReference, boolean reset, XWikiContext context) throws XWikiException
XWikiException
public boolean copyDocument(DocumentReference sourceDocumentReference, DocumentReference targetDocumentReference, boolean reset, boolean force, boolean resetCreationData, XWikiContext context) throws XWikiException
XWikiException
public boolean copyDocument(DocumentReference sourceDocumentReference, DocumentReference targetDocumentReference, String wikilanguage, XWikiContext context) throws XWikiException
XWikiException
public boolean copyDocument(DocumentReference sourceDocumentReference, DocumentReference targetDocumentReference, String wikilanguage, boolean reset, XWikiContext context) throws XWikiException
XWikiException
public boolean copyDocument(DocumentReference sourceDocumentReference, DocumentReference targetDocumentReference, String wikilanguage, boolean reset, boolean force, XWikiContext context) throws XWikiException
XWikiException
public boolean copyDocument(DocumentReference sourceDocumentReference, DocumentReference targetDocumentReference, String wikilanguage, boolean reset, boolean force, boolean resetCreationData, XWikiContext context) throws XWikiException
XWikiException
public int copySpaceBetweenWikis(String space, String sourceWiki, String targetWiki, String language, XWikiContext context) throws XWikiException
XWikiException
public int copySpaceBetweenWikis(String space, String sourceWiki, String targetWiki, String language, boolean clean, XWikiContext context) throws XWikiException
XWikiException
public int copyWiki(String sourceWiki, String targetWiki, String language, XWikiContext context) throws XWikiException
It does not override document already existing in target wiki.
sourceWiki
- the source wiki identifiertargetWiki
- the target wiki identifierlanguage
- the language to copycontext
- the XWiki context
XWikiException
- failed to copy wikipublic int copyWiki(String sourceWiki, String targetWiki, String language, boolean clean, XWikiContext context) throws XWikiException
sourceWiki
- the source wiki identifiertargetWiki
- the target wiki identifierlanguage
- the language to copyclean
- clean the target wiki before copyingcontext
- the XWiki context
XWikiException
- failed to copy wikipublic String getEncoding()
public URL getServerURL(String database, XWikiContext context) throws MalformedURLException
MalformedURLException
public String getServletPath(String wikiName, XWikiContext context)
public String getWebAppPath(XWikiContext context)
public String getURL(DocumentReference documentReference, String action, String queryString, String anchor, XWikiContext context)
@Deprecated public String getURL(String fullname, String action, String queryString, String anchor, XWikiContext context)
getURL(DocumentReference, String, String, String, XWikiContext)
public String getURL(String fullname, String action, String querystring, XWikiContext context)
public String getURL(DocumentReference reference, String action, XWikiContext context)
@Deprecated public String getURL(String fullname, String action, XWikiContext context)
getURL(DocumentReference, String, XWikiContext)
public String getExternalURL(String fullname, String action, XWikiContext context) throws XWikiException
XWikiException
public String getExternalURL(String fullname, String action, String querystring, XWikiContext context) throws XWikiException
XWikiException
public String getAttachmentURL(String fullname, String filename, XWikiContext context) throws XWikiException
XWikiException
public String getAttachmentURL(String fullname, String filename, String queryString, XWikiContext context) throws XWikiException
XWikiException
public Date getCurrentDate()
public int getTimeDelta(long time)
public Date getDate(long time)
public boolean isMultiLingual(XWikiContext context)
@Deprecated public boolean isVirtualMode()
getVirtualWikisDatabaseNames(XWikiContext)
to get the list of wikis if needed.
public boolean isLDAP()
public int checkActive(XWikiContext context) throws XWikiException
XWikiException
public int checkActive(String user, XWikiContext context) throws XWikiException
XWikiException
public DocumentReference getDocumentReference(XWikiRequest request, XWikiContext context)
public static String stripSegmentFromPath(String path, String segment)
path
- the path, as taken from the requested URIsegment
- the segment to remove, as reported by the container
public boolean prepareDocuments(XWikiRequest request, XWikiContext context, org.apache.velocity.VelocityContext vcontext) throws XWikiException
XWikiException
public void setPhonyDocument(DocumentReference reference, XWikiContext context, org.apache.velocity.VelocityContext vcontext)
@Deprecated public void setPhonyDocument(String docName, XWikiContext context, org.apache.velocity.VelocityContext vcontext)
setPhonyDocument(DocumentReference, XWikiContext, VelocityContext)
public XWikiEngineContext getEngineContext()
public void setEngineContext(XWikiEngineContext engine_context)
public void setAuthService(XWikiAuthService authService)
public void setRightService(XWikiRightService rightService)
public XWikiGroupService getGroupService(XWikiContext context) throws XWikiException
XWikiException
public void setGroupService(XWikiGroupService groupService)
public XWikiAuthService getAuthService()
public XWikiRightService getRightService()
public XWikiStatsService getStatsService(XWikiContext context)
public XWikiURLFactoryService getURLFactoryService()
public XWikiCriteriaService getCriteriaService(XWikiContext context)
public ZipOutputStream getZipOutputStream(XWikiContext context) throws IOException
IOException
public String getRefererText(String referer, XWikiContext context)
public boolean isMySQL()
public String getFullNameSQL()
public String getFullNameSQL(boolean newFullName)
public String getDocName(String docname)
public String getUserName(String user, XWikiContext context)
public String getUserName(String user, String format, XWikiContext context)
public String getUserName(String user, String format, boolean link, XWikiContext context)
public boolean hasCentralizedAuthentication(XWikiContext context)
public String getLocalUserName(String user, XWikiContext context)
public String getLocalUserName(String user, String format, XWikiContext context)
public String getLocalUserName(String user, String format, boolean link, XWikiContext context)
public String formatDate(Date date, String format, XWikiContext context)
public String getUserTimeZone(XWikiContext context)
@Deprecated public boolean exists(String fullname, XWikiContext context)
exists(DocumentReference, XWikiContext)
public boolean exists(DocumentReference documentReference, XWikiContext context)
public String getAdType(XWikiContext context)
public String getAdClientId(XWikiContext context)
public XWikiPluginInterface getPlugin(String name, XWikiContext context)
public Api getPluginApi(String name, XWikiContext context)
@Deprecated public CacheFactory getCacheFactory()
CacheManager
component instead using Utils.getComponent(Class)
@Deprecated public CacheFactory getLocalCacheFactory()
CacheManager
component instead using Utils.getComponent(Class)
public int getHttpTimeout(XWikiContext context)
public String getHttpUserAgent(XWikiContext context)
public String getURLContent(String surl, XWikiContext context) throws IOException
IOException
public String getURLContent(String surl, int timeout, String userAgent) throws IOException
IOException
public String getURLContent(String surl, String username, String password, XWikiContext context) throws IOException
IOException
public String getURLContent(String surl, String username, String password, int timeout, String userAgent) throws IOException
IOException
public byte[] getURLContentAsBytes(String surl, XWikiContext context) throws IOException
IOException
public byte[] getURLContentAsBytes(String surl, int timeout, String userAgent) throws IOException
IOException
public byte[] getURLContentAsBytes(String surl, String username, String password, XWikiContext context) throws IOException
IOException
public byte[] getURLContentAsBytes(String surl, String username, String password, int timeout, String userAgent) throws IOException
IOException
public List<String> getSpaces(XWikiContext context) throws XWikiException
XWikiException
- if something went wrongpublic List<String> getSpaceDocsName(String spaceName, XWikiContext context) throws XWikiException
spaceName
- the space for which to return all non-hidden documents
Space.Page
) for non-hidden documents in the specified
space
XWikiException
- if the loading went wrongpublic List<String> getIncludedMacros(String defaultSpace, String content, XWikiContext context)
public String getFlash(String url, String width, String height, XWikiContext context)
public boolean isReadOnly()
isReadOnly
public void setReadOnly(boolean readOnly)
public void deleteAllDocuments(XWikiDocument doc, XWikiContext context) throws XWikiException
XWikiException
public void deleteAllDocuments(XWikiDocument doc, boolean totrash, XWikiContext context) throws XWikiException
XWikiException
public void refreshLinks(XWikiContext context) throws XWikiException
XWikiException
public boolean hasBacklinks(XWikiContext context)
public boolean hasTags(XWikiContext context)
public boolean hasCustomMappings()
public boolean hasDynamicCustomMappings()
public String getDefaultSpace(XWikiContext context)
public boolean skipDefaultSpaceInURLs(XWikiContext context)
public boolean showViewAction(XWikiContext context)
public boolean useDefaultAction(XWikiContext context)
public String getDefaultPage(XWikiContext context)
public boolean hasEditComment(XWikiContext context)
public boolean isEditCommentFieldHidden(XWikiContext context)
public boolean isEditCommentSuggested(XWikiContext context)
public boolean isEditCommentMandatory(XWikiContext context)
public boolean hasMinorEdit(XWikiContext context)
XWiki.hasMinorEdit()
public boolean hasRecycleBin(XWikiContext context)
context
- maybe will be usefulXWiki.hasRecycleBin()
public boolean hasAttachmentRecycleBin(XWikiContext context)
context
- The current context
, maybe will be useful.@Deprecated public XWikiDocument renamePage(XWikiDocument doc, String newFullName, XWikiContext context) throws XWikiException
XWikiDocument.rename(String, XWikiContext)
instead
XWikiException
@Deprecated public XWikiDocument renamePage(XWikiDocument doc, XWikiContext context, String newFullName) throws XWikiException
XWikiDocument.rename(String, XWikiContext)
instead
XWikiException
public BaseClass getXClass(DocumentReference documentReference, XWikiContext context) throws XWikiException
XWikiException
@Deprecated public BaseClass getClass(String fullName, XWikiContext context) throws XWikiException
getXClass(DocumentReference, XWikiContext)
XWikiException
public String getEditorPreference(XWikiContext context)
public Object parseGroovyFromString(String script, XWikiContext context) throws XWikiException
script
- the Groovy class definition string (public class MyClass { ... })
XWikiException
public Object parseGroovyFromString(String script, String jarWikiPage, XWikiContext context) throws XWikiException
script
- the Groovy class definition string (public class MyClass { ... })
XWikiException
public Object parseGroovyFromPage(String fullname, XWikiContext context) throws XWikiException
XWikiException
public Object parseGroovyFromPage(String fullName, String jarWikiPage, XWikiContext context) throws XWikiException
XWikiException
public String getMacroList(XWikiContext context)
public BaseObject getObjectFromRequest(String className, XWikiContext context) throws XWikiException
XWikiException
public String getConvertingUserNameType(XWikiContext context)
public String convertUsername(String username, XWikiContext context)
public boolean hasSectionEdit(XWikiContext context)
public long getSectionEditingDepth()
xwiki.section.depth
configuration property. Defaults to 2 when not defined.public boolean hasCaptcha(XWikiContext context)
public String getWysiwygToolbars(XWikiContext context)
public String clearName(String name, XWikiContext context)
public String clearName(String name, boolean stripDots, boolean ascii, XWikiContext context)
public String getUniquePageName(String space, XWikiContext context)
public String getUniquePageName(String space, String name, XWikiContext context)
public PropertyClass getPropertyClassFromName(String propPath, XWikiContext context)
public boolean validateDocument(XWikiDocument doc, XWikiContext context) throws XWikiException
XWikiException
public String addTooltip(String html, String message, String params, XWikiContext context)
public String addTooltipJS(XWikiContext context)
public String addTooltip(String html, String message, XWikiContext context)
public void renamePage(String fullName, String newFullName, XWikiContext context) throws XWikiException
XWikiException
public String addMandatory(XWikiContext context)
public boolean hasVersioning(XWikiContext context)
@Deprecated public boolean hasVersioning(String fullName, XWikiContext context)
hasVersioning(XWikiContext)
instead
public boolean hasAttachmentVersioning(XWikiContext context)
public String getExternalAttachmentURL(String fullName, String filename, XWikiContext context)
public int getMaxRecursiveSpaceChecks(XWikiContext context)
public void restoreFromRecycleBin(XWikiDocument doc, String comment, XWikiContext context) throws XWikiException
doc
- the document to restorecomment
- the comment to use when saving the documentcontext
- the XWiki context
XWikiException
- when failing to restore documentpublic void restoreFromRecycleBin(XWikiDocument doc, long index, String comment, XWikiContext context) throws XWikiException
doc
- the document to restoreindex
- the index of the document in the recycle bincomment
- the comment to use when saving the documentcontext
- the XWiki context
XWikiException
- when failing to restore documentpublic XWikiDocument rollback(XWikiDocument tdoc, String rev, XWikiContext context) throws XWikiException
XWikiException
public List<String> getConfiguredSyntaxes()
public String getDefaultDocumentSyntax()
public String getCurrentContentSyntaxId(String defaultSyntaxId, XWikiContext context)
The document currently being executed is not the same than the context document since when including a page with velocity #includeForm(), method for example the context doc is the includer document even if includeForm() fully execute and render the included document before insert it in the includer document.
If the current document can't be found, the method assume that the executed document is the context document
(it's generally the case when a document is directly rendered with
XWikiDocument.getRenderedContent(XWikiContext)
for example).
defaultSyntaxId
- the default value to return if no document can be found
public String getCurrentContentSyntaxId(XWikiContext context)
The document currently being executed is not the same than the context document since when including a page with velocity #includeForm(), method for example the context doc is the includer document even if includeForm() fully execute and render the included document before insert it in the includer document.
If the current document can't be found, the method assume that the executed document is the context document
(it's generally the case when a document is directly rendered with
XWikiDocument.getRenderedContent(XWikiContext)
for example).
public boolean isTitleInCompatibilityMode()
public void onEvent(org.xwiki.observation.event.Event event, Object source, Object data)
onEvent
in interface org.xwiki.observation.EventListener
public List<org.xwiki.observation.event.Event> getEvents()
getEvents
in interface org.xwiki.observation.EventListener
public String getName()
getName
in interface org.xwiki.observation.EventListener
@Deprecated public String parseMessage(XWikiContext context)
LocalizationManager
instead. From velocity you can access it using
the $services.localization
binding, see LocalizationScriptService
@Deprecated public String parseMessage(String id, XWikiContext context)
LocalizationManager
instead. From velocity you can access it using
the $services.localization
binding, see LocalizationScriptService
@Unstable public List<XWikiAttachment> searchAttachments(String parametrizedSqlClause, boolean checkRight, int nb, int start, List<?> parameterValues, XWikiContext context) throws XWikiException
parametrizedSqlClause
- The HQL where clause. For example " where doc.fullName
<> ? and (attach.author = ? or (attach.filename = ? and doc.space = ?))"
checkRight
- if true, only return attachments in documents which the "current user" has permission to view.nb
- The number of rows to return. If 0 then all rows are returnedstart
- The number of rows to skip at the beginning.parameterValues
- A List
of the where clause values that replace the question marks (?)context
- the underlying context used for running the database query
XWikiAttachment
objects.
XWikiException
- in case of error while performing the queryXWikiStoreInterface.searchDocuments(String, int, int, java.util.List, XWikiContext)
@Unstable public int countAttachments(String parametrizedSqlClause, List<?> parameterValues, XWikiContext context) throws XWikiException
parametrizedSqlClause
- Everything which would follow the "WHERE" in HQLparameterValues
- A List
of the where clause values that replace the question marks (?)context
- the underlying context used for running the database query
XWikiException
- in event of an exception querying the databasesearchAttachments(String, boolean, int, int, java.util.List, XWikiContext)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |