[JBoss JIRA] (FORGE-2082) Being able to add a new CDI event observer to an existing class
by Antonio Goncalves (JIRA)
Antonio Goncalves created FORGE-2082:
----------------------------------------
Summary: Being able to add a new CDI event observer to an existing class
Key: FORGE-2082
URL: https://issues.jboss.org/browse/FORGE-2082
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 observer to an existing class. A command such as :
{code}
cdi-add-event-observer --named po --type PurchaseOrder
{code}
Would add to an existing class the following code :
{code}
public void observePurchaseOrder(@Observes PurchaseOrder po)
{
}
{code}
--
This message was sent by Atlassian JIRA
(v6.3.1#6329)
11 years, 6 months
[JBoss JIRA] (FORGE-2081) Being able to add a new CDI event producer to an existing class
by Antonio Goncalves (JIRA)
Antonio Goncalves created FORGE-2081:
----------------------------------------
Summary: 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 event --type PurchaseOrder
{code}
Would add to an existing class the following code :
{code}
@Inject
private Event<PurchaseOrder> event;
public void firePurchaseOrder()
{
PurchaseOrder purchaseOrder = new PurchaseOrder();
event.fire(order);
}
{code}
--
This message was sent by Atlassian JIRA
(v6.3.1#6329)
11 years, 6 months
[JBoss JIRA] (FORGE-2080) Being able to enable CDI interceptors and decorators
by Antonio Goncalves (JIRA)
Antonio Goncalves created FORGE-2080:
----------------------------------------
Summary: Being able to enable CDI interceptors and decorators
Key: FORGE-2080
URL: https://issues.jboss.org/browse/FORGE-2080
Project: Forge
Issue Type: Sub-task
Components: Java EE
Affects Versions: 2.12.1.Final
Reporter: Antonio Goncalves
Fix For: 2.x Future
[FORGE-2060] and [FORGE-2078] create CDI interceptors and decorators. It would be interesting to add a parameter to enable them in the {{beans.xml}}. Both could have an extra {{enabled}} with just a parameter :
{code}
cdi-new-decorator --named LargeTransactionDecorator --implements Account --enabled=true
{code}
Would add the following lines to the {{beans.xml}} :
{code}
<decorators>
<class>com.foo.bar.LargeTransactionDecorator</class>
</decorators>
{code}
--
This message was sent by Atlassian JIRA
(v6.3.1#6329)
11 years, 6 months
[JBoss JIRA] (FORGE-2079) Being able to create a new CDI producer field
by Antonio Goncalves (JIRA)
[ https://issues.jboss.org/browse/FORGE-2079?page=com.atlassian.jira.plugin... ]
Antonio Goncalves updated FORGE-2079:
-------------------------------------
Description:
It would be good to have a command to add a CDI producer field to an existing class. A simple command such as :
{code}
cdi-new-producer-field --named em --type javax.persistence.EntityManager
{code}
Would generate :
{code}
public class DatabaseProducer
{
@Produces
@PersistenceContext
private EntityManager em;
}
{code}
Then, we can have more attributes :
{code}
cdi-new-producer-field --named em --type javax.persistence.EntityManager --qualifier Production --alternative=true --scoped Request --named=true
{code}
{code}
public class DatabaseProducer
{
@Produces @Production @Alternative @RequestScoped @Named
@PersistenceContext
private EntityManager em;
}
{code}
was:
It would be good to have a command to add a CDI producer field to an existing class. A simple command such as :
{code}
cdi-new-producer-field --named em --type javax.persistence.EntityManager
{code}
Would generate :
{code}
public class DatabaseProducer
{
@Produces
@PersistenceContext
private EntityManager em;
}
{code}
Then, we can have more attributes :
{code}
cdi-new-producer-field --named em --type javax.persistence.EntityManager --qualifier Production --alternative=true --scoped Request
{code}
{code}
public class DatabaseProducer
{
@Produces @Production @Alternative @RequestScoped
@PersistenceContext
private EntityManager em;
}
{code}
> Being able to create a new CDI producer field
> ---------------------------------------------
>
> Key: FORGE-2079
> URL: https://issues.jboss.org/browse/FORGE-2079
> 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 good to have a command to add a CDI producer field to an existing class. A simple command such as :
> {code}
> cdi-new-producer-field --named em --type javax.persistence.EntityManager
> {code}
> Would generate :
> {code}
> public class DatabaseProducer
> {
> @Produces
> @PersistenceContext
> private EntityManager em;
> }
> {code}
> Then, we can have more attributes :
> {code}
> cdi-new-producer-field --named em --type javax.persistence.EntityManager --qualifier Production --alternative=true --scoped Request --named=true
> {code}
> {code}
> public class DatabaseProducer
> {
> @Produces @Production @Alternative @RequestScoped @Named
> @PersistenceContext
> private EntityManager em;
> }
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.1#6329)
11 years, 6 months
[JBoss JIRA] (FORGE-2079) Being able to create a new CDI producer field
by Antonio Goncalves (JIRA)
[ https://issues.jboss.org/browse/FORGE-2079?page=com.atlassian.jira.plugin... ]
Antonio Goncalves commented on FORGE-2079:
------------------------------------------
I've created a first attempt to solve the problem, but I don't know how to test such a class. It's inspired from {{JavaFieldCommand}} :
https://gist.github.com/agoncal/cc35276c0d522c817dab
> Being able to create a new CDI producer field
> ---------------------------------------------
>
> Key: FORGE-2079
> URL: https://issues.jboss.org/browse/FORGE-2079
> 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 good to have a command to add a CDI producer field to an existing class. A simple command such as :
> {code}
> cdi-new-producer-field --named em --type javax.persistence.EntityManager
> {code}
> Would generate :
> {code}
> public class DatabaseProducer
> {
> @Produces
> @PersistenceContext
> private EntityManager em;
> }
> {code}
> Then, we can have more attributes :
> {code}
> cdi-new-producer-field --named em --type javax.persistence.EntityManager --qualifier Production --alternative=true --scoped Request
> {code}
> {code}
> public class DatabaseProducer
> {
> @Produces @Production @Alternative @RequestScoped
> @PersistenceContext
> private EntityManager em;
> }
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.1#6329)
11 years, 6 months
[JBoss JIRA] (FORGE-2079) Being able to create a new CDI producer field
by Antonio Goncalves (JIRA)
Antonio Goncalves created FORGE-2079:
----------------------------------------
Summary: Being able to create a new CDI producer field
Key: FORGE-2079
URL: https://issues.jboss.org/browse/FORGE-2079
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 good to have a command to add a CDI producer field to an existing class. A simple command such as :
{code}
cdi-new-producer-field --named em --type javax.persistence.EntityManager
{code}
Would generate :
{code}
public class DatabaseProducer
{
@Produces
@PersistenceContext
private EntityManager em;
}
{code}
Then, we can have more attributes :
{code}
cdi-new-producer-field --named em --type javax.persistence.EntityManager --qualifier Production --alternative=true --scoped Request
{code}
{code}
public class DatabaseProducer
{
@Produces @Production @Alternative @RequestScoped
@PersistenceContext
private EntityManager em;
}
{code}
--
This message was sent by Atlassian JIRA
(v6.3.1#6329)
11 years, 6 months
[JBoss JIRA] (FORGE-2078) Being able to create a new CDI decorator
by Antonio Goncalves (JIRA)
[ https://issues.jboss.org/browse/FORGE-2078?page=com.atlassian.jira.plugin... ]
Antonio Goncalves updated FORGE-2078:
-------------------------------------
Description:
It would be good to have a command to generate a CDI decorator. A simple command such as :
{code}
cdi-new-decorator --named LargeTransactionDecorator --delegate Account
{code}
Would generate :
{code}
@Decorator
public abstract class LargeTransactionDecorator implements Account {
@Inject @Delegate Account delegate;
}
{code}
was:
It would be good to have a command to generate a CDI decorator. A simple command such as :
{code}
cdi-new-decorator --named LargeTransactionDecorator --implements Account
{code}
Would generate :
{code}
@Decorator
public abstract class LargeTransactionDecorator implements Account {
@Inject @Delegate Account delegate;
}
{code}
> Being able to create a new CDI decorator
> ----------------------------------------
>
> Key: FORGE-2078
> URL: https://issues.jboss.org/browse/FORGE-2078
> Project: Forge
> Issue Type: Sub-task
> Components: Java EE
> Affects Versions: 2.12.1.Final
> Reporter: Antonio Goncalves
> Assignee: Antonio Goncalves
> Fix For: 2.x Future
>
>
> It would be good to have a command to generate a CDI decorator. A simple command such as :
> {code}
> cdi-new-decorator --named LargeTransactionDecorator --delegate Account
> {code}
> Would generate :
> {code}
> @Decorator
> public abstract class LargeTransactionDecorator implements Account {
> @Inject @Delegate Account delegate;
> }
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.1#6329)
11 years, 6 months
[JBoss JIRA] (FORGE-2078) Being able to create a new CDI decorator
by Antonio Goncalves (JIRA)
Antonio Goncalves created FORGE-2078:
----------------------------------------
Summary: Being able to create a new CDI decorator
Key: FORGE-2078
URL: https://issues.jboss.org/browse/FORGE-2078
Project: Forge
Issue Type: Sub-task
Components: Java EE
Affects Versions: 2.12.1.Final
Reporter: Antonio Goncalves
Assignee: Antonio Goncalves
Fix For: 2.x Future
It would be good to have a command to generate a CDI decorator. A simple command such as :
{code}
cdi-new-decorator --named LargeTransactionDecorator --implements Account
{code}
Would generate :
{code}
@Decorator
public abstract class LargeTransactionDecorator implements Account {
@Inject @Delegate Account delegate;
}
{code}
--
This message was sent by Atlassian JIRA
(v6.3.1#6329)
11 years, 6 months