Class TemporaryResourceScriptService
- java.lang.Object
-
- org.xwiki.resource.temporary.script.TemporaryResourceScriptService
-
- All Implemented Interfaces:
org.xwiki.script.service.ScriptService
@Component @Named("resource.temporary") @Singleton @Unstable public class TemporaryResourceScriptService extends Object implements org.xwiki.script.service.ScriptService
Exposes the Temporary Resource API to server-side scripts.- Since:
- 14.4.2, 14.5
- Version:
- $Id: bcbb73fb6056d474868b1f47ed5a7b5fbb589c81 $
-
-
Constructor Summary
Constructors Constructor Description TemporaryResourceScriptService()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
exists(TemporaryResourceReference tempResourceReference)
Check if a temporary resource exists.Exception
getLastError()
Get the error generated while performing the previously called action.String
getURL(TemporaryResourceReference tempResourceReference)
-
-
-
Field Detail
-
ROLE_HINT
public static final String ROLE_HINT
The role hint of this component.- See Also:
- Constant Field Values
-
-
Method Detail
-
getURL
public String getURL(TemporaryResourceReference tempResourceReference)
- Parameters:
tempResourceReference
- a temporary resource reference- Returns:
- the URL corresponding to the specified temporary resource
-
exists
public boolean exists(TemporaryResourceReference tempResourceReference)
Check if a temporary resource exists.- Parameters:
tempResourceReference
- a temporary resource reference- Returns:
true
if the specified temporary resource exists,false
otherwise
-
getLastError
public Exception getLastError()
Get the error generated while performing the previously called action.- Returns:
- an eventual exception or
null
if no exception was thrown
-
-