[JBoss JIRA] (FORGE-2079) Being able to add 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-add-producer-field --named em --type javax.persistence.EntityManager
{code}
Would generate :
{code}
public class DatabaseProducer
{
@Produces
private EntityManager em;
}
{code}
Then, we can have more attributes :
{code}
cdi-add-producer-field --named em --type javax.persistence.EntityManager --qualifiers Production CustomerDB --alternative=true --scoped Request --withNamed=true
{code}
{code}
public class DatabaseProducer
{
@Produces
@Production
@CustomerDB
@Alternative
@RequestScoped
@Named
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-add-producer-field --named em --type javax.persistence.EntityManager
{code}
Would generate :
{code}
public class DatabaseProducer
{
@Produces
private EntityManager em;
}
{code}
Then, we can have more attributes :
{code}
cdi-add-producer-field --named em --type javax.persistence.EntityManager --qualifier Production --alternative=true --scoped Request --withNamed=true
{code}
{code}
public class DatabaseProducer
{
@Produces
@Production
@Alternative
@RequestScoped
@Named
private EntityManager em;
}
{code}
> Being able to add 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-add-producer-field --named em --type javax.persistence.EntityManager
> {code}
> Would generate :
> {code}
> public class DatabaseProducer
> {
> @Produces
> private EntityManager em;
> }
> {code}
> Then, we can have more attributes :
> {code}
> cdi-add-producer-field --named em --type javax.persistence.EntityManager --qualifiers Production CustomerDB --alternative=true --scoped Request --withNamed=true
> {code}
> {code}
> public class DatabaseProducer
> {
> @Produces
> @Production
> @CustomerDB
> @Alternative
> @RequestScoped
> @Named
> private EntityManager em;
> }
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
9 years, 1 month
[JBoss JIRA] (FORGE-2079) Being able to add 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-add-producer-field --named em --type javax.persistence.EntityManager
{code}
Would generate :
{code}
public class DatabaseProducer
{
@Produces
private EntityManager em;
}
{code}
Then, we can have more attributes :
{code}
cdi-add-producer-field --named em --type javax.persistence.EntityManager --qualifier Production --alternative=true --scoped Request --withNamed=true
{code}
{code}
public class DatabaseProducer
{
@Produces
@Production
@Alternative
@RequestScoped
@Named
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-add-producer-field --named em --type javax.persistence.EntityManager
{code}
Would generate :
{code}
public class DatabaseProducer
{
@Produces
private EntityManager em;
}
{code}
Then, we can have more attributes :
{code}
cdi-add-producer-field --named em --type javax.persistence.EntityManager --qualifier Production --alternative=true --scoped Request --atNamed=true
{code}
{code}
public class DatabaseProducer
{
@Produces
@Production
@Alternative
@RequestScoped
@Named
private EntityManager em;
}
{code}
> Being able to add 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-add-producer-field --named em --type javax.persistence.EntityManager
> {code}
> Would generate :
> {code}
> public class DatabaseProducer
> {
> @Produces
> private EntityManager em;
> }
> {code}
> Then, we can have more attributes :
> {code}
> cdi-add-producer-field --named em --type javax.persistence.EntityManager --qualifier Production --alternative=true --scoped Request --withNamed=true
> {code}
> {code}
> public class DatabaseProducer
> {
> @Produces
> @Production
> @Alternative
> @RequestScoped
> @Named
> private EntityManager em;
> }
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
9 years, 1 month
[JBoss JIRA] (FORGEPLUGINS-187) When creating a test case with Arquillian addon, class name is lower case
by George Gastaldi (JIRA)
[ https://issues.jboss.org/browse/FORGEPLUGINS-187?page=com.atlassian.jira.... ]
George Gastaldi moved FORGE-2333 to FORGEPLUGINS-187:
-----------------------------------------------------
Project: Forge Plugins/Addons (was: Forge)
Key: FORGEPLUGINS-187 (was: FORGE-2333)
Affects Version/s: (was: 2.16.0.Final)
Component/s: Arquillian Plugin
(was: Addon Development)
Fix Version/s: (was: 2.x Future)
> When creating a test case with Arquillian addon, class name is lower case
> -------------------------------------------------------------------------
>
> Key: FORGEPLUGINS-187
> URL: https://issues.jboss.org/browse/FORGEPLUGINS-187
> Project: Forge Plugins/Addons
> Issue Type: Feature Request
> Components: Arquillian Plugin
> Reporter: Antonio Goncalves
> Assignee: Antonio Goncalves
>
> When creating a test case for a target (ex. {{MyBean}}) the Arquillian addon sets the attribute to lowercase ({{mybean}}) instead of using camel case ({{myBean}}) :
> {code}
> @RunWith(Arquillian.class)
> public class MyBeanTest {
> @Inject
> private MyBean mybean;
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
9 years, 1 month
[JBoss JIRA] (FORGE-2333) When creating a test case with Arquillian addon, class name is lower case
by Antonio Goncalves (JIRA)
Antonio Goncalves created FORGE-2333:
----------------------------------------
Summary: When creating a test case with Arquillian addon, class name is lower case
Key: FORGE-2333
URL: https://issues.jboss.org/browse/FORGE-2333
Project: Forge
Issue Type: Feature Request
Components: Addon Development
Affects Versions: 2.16.0.Final
Reporter: Antonio Goncalves
Assignee: Antonio Goncalves
Fix For: 2.x Future
When creating a test case for a target (ex. {{MyBean}}) the Arquillian addon sets the attribute to lowercase ({{mybean}}) instead of using camel case ({{myBean}}) :
{code}
@RunWith(Arquillian.class)
public class MyBeanTest {
@Inject
private MyBean mybean;
{code}
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
9 years, 1 month
[JBoss JIRA] (FORGE-2082) Being able to add a new CDI event observer to an existing class
by George Gastaldi (JIRA)
[ https://issues.jboss.org/browse/FORGE-2082?page=com.atlassian.jira.plugin... ]
George Gastaldi reopened FORGE-2082:
------------------------------------
> 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
> Assignee: George Gastaldi
> Fix For: 2.16.1.Final
>
>
> 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 observePurchaseOrder --type PurchaseOrder
> {code}
> Would add to an existing class the following code :
> {code}
> public void observePurchaseOrder(@Observes PurchaseOrder purchaseOrder)
> {
> }
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
9 years, 1 month
[JBoss JIRA] (FORGE-2082) Being able to add a new CDI event observer to an existing class
by Antonio Goncalves (JIRA)
[ https://issues.jboss.org/browse/FORGE-2082?page=com.atlassian.jira.plugin... ]
Antonio Goncalves commented on FORGE-2082:
------------------------------------------
Hum... Forgot to mention qualifiers :
Adding qualifiers :
{code}
cdi-add-event-observer --named observePurchaseOrder --type PurchaseOrder --qualifiers MyQualif MySecondQualif
{code}
{code}
public void observePurchaseOrder(@Observes @MyQualif @MySecondQualif PurchaseOrder purchaseOrder)
{
}
{code}
> 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
> Assignee: George Gastaldi
> Fix For: 2.16.1.Final
>
>
> 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 observePurchaseOrder --type PurchaseOrder
> {code}
> Would add to an existing class the following code :
> {code}
> public void observePurchaseOrder(@Observes PurchaseOrder purchaseOrder)
> {
> }
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
9 years, 1 month
[JBoss JIRA] (FORGE-2081) Being able to add a new CDI event producer to an existing class
by Antonio Goncalves (JIRA)
[ https://issues.jboss.org/browse/FORGE-2081?page=com.atlassian.jira.plugin... ]
Antonio Goncalves commented on FORGE-2081:
------------------------------------------
Yes, but it's a nicer shortcut
> 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)
9 years, 1 month