@Component @Singleton @Named(value="async") public class AsyncScriptService extends Object implements org.xwiki.script.service.ScriptService
ScriptService
to manipulate the asynchronous rendering features.Constructor and Description |
---|
AsyncScriptService() |
Modifier and Type | Method and Description |
---|---|
void |
flushCache()
Remove all entries from the asynchronous renderers cache.
|
boolean |
isEnabled() |
void |
setEnabled(boolean enabled) |
void |
useComponent(Type roleType)
Indicate that the current execution manipulate components of the passed type and the result will need to be
removed from the cache if any is unregistered or a new one registered.
|
void |
useComponent(Type roleType,
String roleHint)
Indicate that the current execution manipulate component with the passed type and hint and the result will need
to be removed from the cache if it's registered or unregistered.
|
void |
useEntity(org.xwiki.model.reference.EntityReference reference)
Indicate that the current execution manipulate the passed entity and the result will need to be removed from the
cache if it's modified in any way.
|
public boolean isEnabled()
public void setEnabled(boolean enabled)
enabled
- true if it's allowed to render content asynchronouslypublic void flushCache()
public void useEntity(org.xwiki.model.reference.EntityReference reference)
reference
- the reference of the entitypublic void useComponent(Type roleType)
roleType
- the type of the component rolepublic void useComponent(Type roleType, String roleHint)
roleType
- the type of the component roleroleHint
- the hint of the componentCopyright © 2004–2021 XWiki. All rights reserved.