Package org.xwiki.rendering.async
Interface AsyncContext
-
@Role public interface AsyncContextContextual information related to asynchronous rendering.- Since:
- 10.10RC1
- Version:
- $Id: b2ae33c660bc47213e1520258951e5dc93236864 $
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description booleanisEnabled()voidsetEnabled(boolean enabled)voiduse(String type, Object value)voiduseComponent(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.voiduseComponent(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.voiduseEntity(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.default voiduseRight(Right right, DocumentReference userReference, EntityReference entityReference, boolean allowed)
-
-
-
Method Detail
-
isEnabled
boolean isEnabled()
- Returns:
- true if it's allowed to render content asynchronously
-
setEnabled
void setEnabled(boolean enabled)
- Parameters:
enabled- true if it's allowed to render content asynchronously
-
useEntity
void useEntity(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.- If the reference is a document, any modification made to that document (including object and attachments) will be affected.
- If the reference is a document containing a class any modification of an object of that class will be affected.
- Parameters:
reference- the reference of the entity
-
useComponent
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.- Parameters:
roleType- the type of the component role
-
useComponent
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.- Parameters:
roleType- the type of the component roleroleHint- the hint of the component
-
use
void use(String type, Object value)
- Parameters:
type- the type of data to associated with the cached resultvalue- the value to associated with the cached result
-
useRight
default void useRight(Right right, DocumentReference userReference, EntityReference entityReference, boolean allowed)
- Parameters:
right- the right needed for execution of the actionuserReference- the user to check the right forentityReference- the entity on which to check the rightallowed- the result of the evaluation- Since:
- 11.8RC1
-
-