public class XWikiServiceImpl extends com.google.gwt.user.server.rpc.RemoteServiceServlet implements XWikiService
XWikiService.App
Constructor and Description |
---|
XWikiServiceImpl() |
Modifier and Type | Method and Description |
---|---|
boolean |
addComment(String docname,
String message) |
List |
addObject(String fullName,
List classesName) |
XObject |
addObject(String fullName,
String className) |
boolean |
addObject(String docname,
XObject xobject) |
XObject |
addObject(XWikiDocument doc,
String className) |
protected void |
assertEditRight(XWikiDocument doc,
XWikiContext context) |
protected void |
assertViewRight(String fullName,
XWikiContext context) |
protected void |
assertViewRight(XWikiDocument doc,
XWikiContext context) |
List |
customQuery(String queryPage) |
List |
customQuery(String queryPage,
int nb,
int start) |
List |
customQuery(String queryPage,
Map params) |
List |
customQuery(String queryPage,
Map params,
int nb,
int start) |
Boolean |
deleteDocument(String docName) |
int |
deleteDocuments(String sql) |
Boolean |
deleteObject(String docName,
String className,
int number) |
Boolean |
deleteObject(XObject object) |
Document |
getDocument(String fullName) |
Document |
getDocument(String fullName,
boolean full,
boolean withRenderedContent) |
Document |
getDocument(String fullName,
boolean full,
boolean viewDisplayers,
boolean editDisplayers) |
Document |
getDocument(String fullName,
boolean full,
boolean viewDisplayers,
boolean editDisplayers,
boolean withRenderedContent) |
String |
getDocumentContent(String fullName) |
String |
getDocumentContent(String fullName,
boolean rendered) |
String |
getDocumentContent(String fullName,
boolean rendered,
Map params) |
List |
getDocuments(String sql,
int nb,
int start) |
List |
getDocuments(String sql,
int nb,
int start,
boolean full) |
List |
getDocuments(String sql,
int nb,
int start,
boolean full,
boolean viewDisplayers,
boolean editDisplayers) |
List |
getDocumentVersions(String fullName,
int nb,
int start) |
XObject |
getFirstObject(String sql,
String className) |
String |
getLoginURL() |
List |
getObjects(String sql,
String className,
int nb,
int start) |
Dictionary |
getTranslation(String translationPage,
String locale) |
Document |
getUniqueDocument(String space) |
Document |
getUniqueDocument(String space,
String pageName) |
String |
getUniquePageName(String space) |
String |
getUniquePageName(String space,
String pageName) |
User |
getUser() |
User |
getUser(String fullName) |
User[] |
getUserList(int nb,
int start) |
protected XWikiContext |
getXWikiContext()
Helper method to retrieve the
XWikiContext from the Execution context. |
protected XWikiGWTException |
getXWikiGWTException(Exception e) |
Boolean |
hasAccessLevel(String level,
String docName)
Checks the access level for the current user on the specified document.
|
Boolean |
hasAccessLevel(String level,
String username,
String docName)
Checks the access level for the user given by username on the specified document.
|
boolean |
hasAccessLevel(String level,
String fullName,
XWikiContext context) |
Boolean |
isLastDocumentVersion(String fullName,
String version) |
Boolean |
lockDocument(String fullName,
boolean force)
return true if can be locked return null in case of an error return false in all the other cases
|
String |
login(String username,
String password,
boolean rememberme) |
void |
logJSError(Map infos) |
protected void |
mergeObject(XObject xobject,
BaseObject baseObject,
XWikiContext context) |
protected Attachment |
newAttachment(Attachment att,
XWikiAttachment xAtt,
XWikiContext context) |
protected BaseObject |
newBaseObject(BaseObject baseObject,
XObject xObject,
XWikiContext context) |
protected Document |
newDocument(Document doc,
XWikiDocument xdoc,
boolean withObjects,
boolean withViewDisplayers,
boolean withEditDisplayers,
boolean withRenderedContent,
XWikiContext context) |
protected Document |
newDocument(Document doc,
XWikiDocument xdoc,
boolean withObjects,
XWikiContext context) |
protected Document |
newDocument(Document doc,
XWikiDocument xdoc,
XWikiContext context) |
protected XObject |
newObject(XObject xObject,
BaseObject baseObject,
boolean withViewDisplayers,
boolean withEditDisplayers,
XWikiContext context) |
protected User |
newUser(User user,
XWikiDocument xdoc,
XWikiContext context) |
String |
processCall(String payload)
We override the default processCall method in order to provide XWiki initialization before we handle the request.
|
protected void |
raiseRightException(XWikiContext context) |
Boolean |
saveDocumentContent(String fullName,
String content)
save only the content of a document TODO manage translations
|
Boolean |
saveDocumentContent(String fullName,
String content,
String comment)
save only the content of a document TODO manage translations
|
Boolean |
saveObject(XObject object) |
Boolean |
saveObjects(List objects) |
List |
searchDocuments(String sql,
int nb,
int start) |
void |
unlockDocument(String fullName) |
boolean |
updateProperty(String docname,
String className,
String propertyname,
int value) |
boolean |
updateProperty(String docname,
String className,
String propertyname,
List value) |
boolean |
updateProperty(String docname,
String className,
String propertyname,
String value) |
checkPermutationStrongName, doGetSerializationPolicy, getCodeServerPolicyUrl, getRequestModuleBasePath, getSerializationPolicy, init, loadPolicyFromCodeServer, onAfterResponseSerialized, onBeforeRequestDeserialized, processCall, processPost, shouldCompressResponse
doPost, doUnexpectedFailure, getPermutationStrongName, getThreadLocalRequest, getThreadLocalResponse, onAfterRequestDeserialized, readContent
doDelete, doGet, doHead, doOptions, doPut, doTrace, getLastModified, service, service
public String processCall(String payload) throws com.google.gwt.user.client.rpc.SerializationException
processCall
in class com.google.gwt.user.server.rpc.RemoteServiceServlet
com.google.gwt.user.client.rpc.SerializationException
RemoteServiceServlet.processCall(String)
protected XWikiContext getXWikiContext()
XWikiContext
from the Execution
context.XWikiContext
, set upon initializationprotected XWikiGWTException getXWikiGWTException(Exception e)
public Document getDocument(String fullName) throws XWikiGWTException
getDocument
in interface XWikiService
XWikiGWTException
public Document getDocument(String fullName, boolean full, boolean withRenderedContent) throws XWikiGWTException
getDocument
in interface XWikiService
XWikiGWTException
public String getUniquePageName(String space) throws XWikiGWTException
getUniquePageName
in interface XWikiService
XWikiGWTException
public String getUniquePageName(String space, String pageName) throws XWikiGWTException
getUniquePageName
in interface XWikiService
XWikiGWTException
public Document getUniqueDocument(String space, String pageName) throws XWikiGWTException
getUniqueDocument
in interface XWikiService
XWikiGWTException
public Document getUniqueDocument(String space) throws XWikiGWTException
getUniqueDocument
in interface XWikiService
XWikiGWTException
public Document getDocument(String fullName, boolean full, boolean viewDisplayers, boolean editDisplayers) throws XWikiGWTException
getDocument
in interface XWikiService
XWikiGWTException
public Document getDocument(String fullName, boolean full, boolean viewDisplayers, boolean editDisplayers, boolean withRenderedContent) throws XWikiGWTException
getDocument
in interface XWikiService
XWikiGWTException
public Boolean deleteDocument(String docName) throws XWikiGWTException
deleteDocument
in interface XWikiService
XWikiGWTException
public int deleteDocuments(String sql) throws XWikiGWTException
deleteDocuments
in interface XWikiService
XWikiGWTException
public User getUser() throws XWikiGWTException
getUser
in interface XWikiService
XWikiGWTException
public User getUser(String fullName) throws XWikiGWTException
getUser
in interface XWikiService
XWikiGWTException
public User[] getUserList(int nb, int start) throws XWikiGWTException
getUserList
in interface XWikiService
XWikiGWTException
public List searchDocuments(String sql, int nb, int start) throws XWikiGWTException
searchDocuments
in interface XWikiService
XWikiGWTException
public List getDocuments(String sql, int nb, int start) throws XWikiGWTException
getDocuments
in interface XWikiService
XWikiGWTException
public List getDocuments(String sql, int nb, int start, boolean full) throws XWikiGWTException
getDocuments
in interface XWikiService
XWikiGWTException
public List getDocuments(String sql, int nb, int start, boolean full, boolean viewDisplayers, boolean editDisplayers) throws XWikiGWTException
getDocuments
in interface XWikiService
XWikiGWTException
public boolean updateProperty(String docname, String className, String propertyname, String value) throws XWikiGWTException
updateProperty
in interface XWikiService
XWikiGWTException
public boolean updateProperty(String docname, String className, String propertyname, int value) throws XWikiGWTException
updateProperty
in interface XWikiService
XWikiGWTException
public boolean updateProperty(String docname, String className, String propertyname, List value) throws XWikiGWTException
updateProperty
in interface XWikiService
XWikiGWTException
public List getObjects(String sql, String className, int nb, int start) throws XWikiGWTException
getObjects
in interface XWikiService
XWikiGWTException
public XObject getFirstObject(String sql, String className) throws XWikiGWTException
getFirstObject
in interface XWikiService
XWikiGWTException
public XObject addObject(XWikiDocument doc, String className) throws XWikiGWTException
XWikiGWTException
public XObject addObject(String fullName, String className) throws XWikiGWTException
addObject
in interface XWikiService
XWikiGWTException
public List addObject(String fullName, List classesName) throws XWikiGWTException
addObject
in interface XWikiService
XWikiGWTException
public boolean addObject(String docname, XObject xobject) throws XWikiGWTException
addObject
in interface XWikiService
XWikiGWTException
public Boolean saveDocumentContent(String fullName, String content) throws XWikiGWTException
saveDocumentContent
in interface XWikiService
fullName
- content
- XWikiGWTException
public Boolean saveDocumentContent(String fullName, String content, String comment) throws XWikiGWTException
fullName
- content
- XWikiGWTException
public Boolean saveObject(XObject object) throws XWikiGWTException
saveObject
in interface XWikiService
XWikiGWTException
public Boolean deleteObject(XObject object) throws XWikiGWTException
deleteObject
in interface XWikiService
XWikiGWTException
public Boolean deleteObject(String docName, String className, int number) throws XWikiGWTException
deleteObject
in interface XWikiService
XWikiGWTException
public Boolean saveObjects(List objects) throws XWikiGWTException
saveObjects
in interface XWikiService
XWikiGWTException
public Boolean lockDocument(String fullName, boolean force) throws XWikiGWTException
lockDocument
in interface XWikiService
fullName
- force
- XWikiGWTException
public void unlockDocument(String fullName) throws XWikiGWTException
unlockDocument
in interface XWikiService
XWikiGWTException
public Boolean isLastDocumentVersion(String fullName, String version) throws XWikiGWTException
isLastDocumentVersion
in interface XWikiService
XWikiGWTException
public String getLoginURL() throws XWikiGWTException
getLoginURL
in interface XWikiService
XWikiGWTException
public String login(String username, String password, boolean rememberme) throws XWikiGWTException
login
in interface XWikiService
XWikiGWTException
public boolean addComment(String docname, String message) throws XWikiGWTException
addComment
in interface XWikiService
XWikiGWTException
public List customQuery(String queryPage) throws XWikiGWTException
customQuery
in interface XWikiService
XWikiGWTException
public List customQuery(String queryPage, Map params) throws XWikiGWTException
customQuery
in interface XWikiService
XWikiGWTException
public List customQuery(String queryPage, int nb, int start) throws XWikiGWTException
customQuery
in interface XWikiService
XWikiGWTException
public List customQuery(String queryPage, Map params, int nb, int start) throws XWikiGWTException
customQuery
in interface XWikiService
XWikiGWTException
protected User newUser(User user, XWikiDocument xdoc, XWikiContext context) throws XWikiGWTException
XWikiGWTException
protected Document newDocument(Document doc, XWikiDocument xdoc, XWikiContext context) throws XWikiGWTException
XWikiGWTException
protected Document newDocument(Document doc, XWikiDocument xdoc, boolean withObjects, XWikiContext context) throws XWikiGWTException
XWikiGWTException
public boolean hasAccessLevel(String level, String fullName, XWikiContext context) throws XWikiGWTException
XWikiGWTException
protected void assertEditRight(XWikiDocument doc, XWikiContext context) throws XWikiGWTException, XWikiException
XWikiGWTException
XWikiException
protected void assertViewRight(String fullName, XWikiContext context) throws XWikiGWTException, XWikiException
XWikiGWTException
XWikiException
protected void raiseRightException(XWikiContext context) throws XWikiException
XWikiException
protected void assertViewRight(XWikiDocument doc, XWikiContext context) throws XWikiGWTException, XWikiException
XWikiGWTException
XWikiException
protected Document newDocument(Document doc, XWikiDocument xdoc, boolean withObjects, boolean withViewDisplayers, boolean withEditDisplayers, boolean withRenderedContent, XWikiContext context) throws XWikiGWTException
XWikiGWTException
protected Attachment newAttachment(Attachment att, XWikiAttachment xAtt, XWikiContext context)
protected XObject newObject(XObject xObject, BaseObject baseObject, boolean withViewDisplayers, boolean withEditDisplayers, XWikiContext context)
protected void mergeObject(XObject xobject, BaseObject baseObject, XWikiContext context)
public String getDocumentContent(String fullName) throws XWikiGWTException
getDocumentContent
in interface XWikiService
XWikiGWTException
protected BaseObject newBaseObject(BaseObject baseObject, XObject xObject, XWikiContext context) throws XWikiException
XWikiException
public String getDocumentContent(String fullName, boolean rendered) throws XWikiGWTException
getDocumentContent
in interface XWikiService
XWikiGWTException
public String getDocumentContent(String fullName, boolean rendered, Map params) throws XWikiGWTException
getDocumentContent
in interface XWikiService
XWikiGWTException
public List getDocumentVersions(String fullName, int nb, int start) throws XWikiGWTException
getDocumentVersions
in interface XWikiService
XWikiGWTException
public void logJSError(Map infos)
logJSError
in interface XWikiService
public Dictionary getTranslation(String translationPage, String locale) throws XWikiGWTException
getTranslation
in interface XWikiService
XWikiGWTException
public Boolean hasAccessLevel(String level, String docName) throws XWikiGWTException
XWikiService
hasAccessLevel
in interface XWikiService
level
- level to verify access for, e.g.: "view", "edit"docName
- fullname of the document to check access level for, e.g. Main.WebHomeXWikiGWTException
public Boolean hasAccessLevel(String level, String username, String docName) throws XWikiGWTException
XWikiService
hasAccessLevel
in interface XWikiService
level
- level to verify access for, e.g.: "view", "edit"username
- fullname of the user to check access for, e.g. XWiki.UserdocName
- fullname of the document to check access level for, e.g. Main.WebHomeXWikiGWTException
Copyright © 2004–2017 XWiki. All rights reserved.