@Role
public interface AsyncContext
Modifier and Type | Method and Description |
---|---|
boolean |
isEnabled() |
void |
setEnabled(boolean enabled) |
void |
use(String type,
Object value) |
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(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 void |
useRight(Right right,
DocumentReference userReference,
EntityReference entityReference,
boolean allowed) |
boolean isEnabled()
void setEnabled(boolean enabled)
enabled
- true if it's allowed to render content asynchronouslyvoid useEntity(EntityReference reference)
reference
- the reference of the entityvoid useComponent(Type roleType)
roleType
- the type of the component rolevoid useComponent(Type roleType, String roleHint)
roleType
- the type of the component roleroleHint
- the hint of the componentvoid use(String type, Object value)
type
- the type of data to associated with the cached resultvalue
- the value to associated with the cached resultdefault void useRight(Right right, DocumentReference userReference, EntityReference entityReference, boolean allowed)
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 evaluationCopyright © 2004–2021 XWiki. All rights reserved.