|
||||||||||
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)
|
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 String getRequestWikiName(XWikiContext context) throws XWikiException
context
- the context which contains the request
XWikiException
- if problems occurpublic 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 doc, 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 XWikiDocument getDocumentFromPath(String path, XWikiContext context) throws XWikiException
XWikiException
public DocumentReference getDocumentReferenceFromPath(String path, XWikiContext context)
@Deprecated public String getDocumentNameFromPath(String path, XWikiContext context)
getDocumentReferenceFromPath(String, XWikiContext)
instead
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)
public String getDefaultLanguage(XWikiContext 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
@Deprecated public void SetUserDefaultGroup(XWikiContext context, String fullwikiname) throws XWikiException
setUserDefaultGroup(String fullwikiname, XWikiContext context)
context
- fullwikiname
-
XWikiException
public void protectUserPage(String userName, String userRights, XWikiDocument doc, XWikiContext context) throws XWikiException
XWikiException
@Deprecated public void ProtectUserPage(XWikiContext context, String fullwikiname, String userRights, XWikiDocument doc) throws XWikiException
protectUserPage(String,String,XWikiDocument,XWikiContext)
context
- fullwikiname
- userRights
- doc
-
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)
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)
@Deprecated public String getDocumentName(XWikiRequest request, XWikiContext context)
getDocumentReferenceFromPath(String, XWikiContext)
instead
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
public List<String> getSpaceDocsName(String spaceName, XWikiContext context) throws XWikiException
XWikiException
public 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 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 (?)XWikiContext
- The underlying context used for running the database query
XWikiAttachment
objects.
XWikiException
- in case of error while performing the querycom.xpn.xwiki.store.XWikiStoreInterface#searchDocuments(String, int, int, List)
@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 (?)XWikiContext
- The underlying context used for running the database query
XWikiException
- in event of an exception querying the database#searchAttachments(String, int, int, List, XWikiContext)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |