Details
-
Improvement
-
Resolution: Fixed
-
Major
-
4.2
-
None
Description
Make it possible to associate metatada with each property in the execution context.
Add two methods to ExecutionContext:
/** * Declare a property in the execution context. * * @param property The property to declare. */ public void declareProperty(ExecutionContextProperty property) /** * @param key the key under which is stored the property to retrieve * @return {@code true} if there is a property declared for the given key. */ public boolean hasProperty(String key)
An execution context property contains the following metadata, that controls how the property value should be treated when managing execution contexts:
- Read-only - The value may not be updated within the the execution context.
- Inherited - The property will be inherited from the current context when replacing the execution context within the scope of a request.
- Clone - Also clone the value when the execution context is cloned.
- Type - The class of the value, for typechecking when replacing the value.
- Non-null - The value may not be null
Attachments
Issue Links
- blocks
-
XWIKI-8322 Add execution context declarations for xwikicontext and velocityContext.
- Closed