[
https://jira.jboss.org/jira/browse/WELD-254?page=com.atlassian.jira.plugi...
]
Marius Bogoevici updated WELD-254:
----------------------------------
Description:
Weld should support the addition of custom decorators.
The mechanics of adding them is:
- an Extension will register a Decorator implementation (say MyDecoratorBean) via
AfterBeanDiscovery.addBean()
- MyDecoratorBean.getBeanClass() will indicate what is the decorator class (to
enable/disable via beans.xml)
- getDecoratedTypes(), getDelegateType() and getDelegateQualifiers() will tell what beans
can be decorated, as well as what delegate will be injected into the bean
- it is the responsibility of the custom decorator (via create()) to inject all references
correctly, including the delegate. To that extent, the container must handle
BeanManager.getInjectableReference() correctly
Note: at least for the initial implementation. we can make an assumption that create() for
a Decorator bean is invoked only during the creation of a decorator chain.
was:
Weld should support the addition of custom decorators.
The mechanics of adding them is:
- an Extension will register a Decorator implementation (say MyDecoratorBean) via
AfterBeanDiscovery.addBean()
- MyDecoratorBean.getBeanClass() will indicate what is the decorator class (to
enable/disable via beans.xml)
- getDecoratedTypes(), getDelegateType() and getDelegateQualifiers() will tell what beans
can be decorated, as well as what delegate will be injected into the bean
- it is the responsibility of the custom decorator to inject all references correctly,
including the delegate. To that extent, the container must handle
BeanManager.getInjectableReference() correctly
Custom Decorator Support
------------------------
Key: WELD-254
URL:
https://jira.jboss.org/jira/browse/WELD-254
Project: Weld
Issue Type: Bug
Components: Interceptors and Decorators
Affects Versions: 1.0.0.CR1
Reporter: Marius Bogoevici
Assignee: Marius Bogoevici
Fix For: 1.0.0.CR2
Weld should support the addition of custom decorators.
The mechanics of adding them is:
- an Extension will register a Decorator implementation (say MyDecoratorBean) via
AfterBeanDiscovery.addBean()
- MyDecoratorBean.getBeanClass() will indicate what is the decorator class (to
enable/disable via beans.xml)
- getDecoratedTypes(), getDelegateType() and getDelegateQualifiers() will tell what beans
can be decorated, as well as what delegate will be injected into the bean
- it is the responsibility of the custom decorator (via create()) to inject all
references correctly, including the delegate. To that extent, the container must handle
BeanManager.getInjectableReference() correctly
Note: at least for the initial implementation. we can make an assumption that create()
for a Decorator bean is invoked only during the creation of a decorator chain.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira