@Component @Named(value="rest") @Singleton public class RESTScriptService extends Object implements org.xwiki.script.service.ScriptService
Constructor and Description |
---|
RESTScriptService() |
Modifier and Type | Method and Description |
---|---|
XWikiRestException |
getLastError()
Get the error generated while performing the previously called action.
|
String |
url(EntityReference reference)
Create an REST URL representing the passed entity.
|
String |
url(EntityReference reference,
boolean external)
Create an REST URL representing the passed entity.
|
public String url(EntityReference reference)
The URL path will be returned unless the reference wiki is different from the current wiki.
reference
- an entity referencepublic String url(EntityReference reference, boolean external)
If external
is false the URL path will be returned unless the reference wiki is different from the
current wiki.
reference
- an entity referenceexternal
- indicate if the returned URL should be absolute (to be used by an external service usually)public XWikiRestException getLastError()
null
if no exception was thrownCopyright © 2004–2021 XWiki. All rights reserved.