[
https://issues.jboss.org/browse/FORGE-2081?page=com.atlassian.jira.plugin...
]
Antonio Goncalves updated FORGE-2081:
-------------------------------------
Description:
It would be useful to have a command to add a new CDI event producer to an existing class.
A command such as :
{code}
cdi-add-event-producer --named firePurchaseOrder --type PurchaseOrder
{code}
Would add to an existing class the following code :
{code}
@Inject
private Event<PurchaseOrder> eventPurchaseOrder;
public void firePurchaseOrder()
{
PurchaseOrder purchaseOrder = new PurchaseOrder();
event.fire(order);
}
{code}
Adding qualifiers :
{code}
cdi-add-event-producer --named firePurchaseOrder --type PurchaseOrder --qualifiers
MyQualif MySecondQualif
{code}
{code}
@Inject @MyQualif @MySecondQualif
private Event<PurchaseOrder> eventPurchaseOrder;
public void firePurchaseOrder()
{
PurchaseOrder purchaseOrder = new PurchaseOrder();
event.fire(order);
}
{code}
was:
It would be useful to have a command to add a new CDI event producer to an existing class.
A command such as :
{code}
cdi-add-event-producer --named firePurchaseOrder --type PurchaseOrder
{code}
Would add to an existing class the following code :
{code}
@Inject
private Event<PurchaseOrder> eventPurchaseOrder;
public void firePurchaseOrder()
{
PurchaseOrder purchaseOrder = new PurchaseOrder();
event.fire(order);
}
{code}
Being able to add a new CDI event producer to an existing class
---------------------------------------------------------------
Key: FORGE-2081
URL:
https://issues.jboss.org/browse/FORGE-2081
Project: Forge
Issue Type: Sub-task
Components: Java EE
Affects Versions: 2.12.1.Final
Reporter: Antonio Goncalves
Fix For: 2.x Future
It would be useful to have a command to add a new CDI event producer to an existing
class. A command such as :
{code}
cdi-add-event-producer --named firePurchaseOrder --type PurchaseOrder
{code}
Would add to an existing class the following code :
{code}
@Inject
private Event<PurchaseOrder> eventPurchaseOrder;
public void firePurchaseOrder()
{
PurchaseOrder purchaseOrder = new PurchaseOrder();
event.fire(order);
}
{code}
Adding qualifiers :
{code}
cdi-add-event-producer --named firePurchaseOrder --type PurchaseOrder --qualifiers
MyQualif MySecondQualif
{code}
{code}
@Inject @MyQualif @MySecondQualif
private Event<PurchaseOrder> eventPurchaseOrder;
public void firePurchaseOrder()
{
PurchaseOrder purchaseOrder = new PurchaseOrder();
event.fire(order);
}
{code}
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)