[JBoss JIRA] (FORGE-2247) Introduce UIContent for text output
by George Gastaldi (JIRA)
George Gastaldi created FORGE-2247:
--------------------------------------
Summary: Introduce UIContent for text output
Key: FORGE-2247
URL: https://issues.jboss.org/browse/FORGE-2247
Project: Forge
Issue Type: Feature Request
Components: UI - API
Affects Versions: 2.14.0.Final
Reporter: George Gastaldi
Assignee: George Gastaldi
Fix For: 2.x Future
This component would display text
- as a label in a GUI;
- as something that gets printed to the outstream when it changes above the buffer in the Shell
e.g. when you select a valid value for the component above (in this scenario) it would print: "Description: This component does XYZ" above the buffer
--
This message was sent by Atlassian JIRA
(v6.3.11#6341)
9 years, 4 months
[JBoss JIRA] (FORGE-2246) Refactoring the JPA Commands
by Antonio Goncalves (JIRA)
[ https://issues.jboss.org/browse/FORGE-2246?page=com.atlassian.jira.plugin... ]
Antonio Goncalves edited comment on FORGE-2246 at 2/18/15 11:35 AM:
--------------------------------------------------------------------
No because we could refactor things in this new {{AbstractJPASourceCommand}}, for example :
* getMetadata By adding JPA (and this way each command will be "Java EE / JPA / New Embeddable"
* isProjectRequired (all the JPA commands return true)
* getPrerequisiteCommands (all the JPA commands need a JPA setup)
* Add a method calculateDefaultPackage (all the JPA classes will be, by default, under the .model subpackage)
was (Author: agoncal):
No because we could refactor things in this new {{AbstractJPASourceCommand}}, for example :
* getMetadata By adding JPA (and this way each command will be "Java EE / JPA / New Embeddable"
* isProjectRequired
* getPrerequisiteCommands
* Add a method calculateDefaultPackage
> Refactoring the JPA Commands
> ----------------------------
>
> Key: FORGE-2246
> URL: https://issues.jboss.org/browse/FORGE-2246
> Project: Forge
> Issue Type: Sub-task
> Components: UI - API
> Reporter: Antonio Goncalves
> Priority: Minor
> Fix For: 2.x Future, 3.x Future
>
>
> The idea is to refactor the JPA commands (under {{org.jboss.forge.addon.javaee.jpa.ui}}) :
> * Add an interface with all the default sub-packages in {{javaee-api}}
> ** Interface {{org.jboss.forge.addon.javaee.JavaEEPackages}}
> ** Something like {{BUSINESS_MODEL}} would be {{model}}
> ** {{BUSINESS_LOGIC}} would be {{service}}
> ** {{EXCEPTIONS}} would be {{exception}}
> * Create a new {{org.jboss.forge.addon.javaee.jpa.ui.AbstractJPACommand}} that extends {{AbstractJavaEECommand}} and implements {{PrerequisiteCommandsProvider}}
> ** {{getMetadata}} By adding JPA (and this way each command will be "Java EE / JPA / New Embeddable"
> ** {{isProjectRequired}}
> ** {{getPrerequisiteCommands}}
> ** Add a method {{calculateDefaultPackage}}
> * Refactor the classes
> ** They extend from {{AbstractJPACommand}}
> ** Rename them by prefixing them with {{JPA}}
> *** {{NewEmbeddableCommand}} -> {{JPANewEmbeddableCommand}}
> *** {{NewEntityCommand}} -> {{JPANewEntityCommand}}
> *** ...
> Questions : some classes redifine {{named}} and {{targetPackage}} some don't, why ? :
> {code}
> @Inject
> @WithAttributes(label = "Entity name", description = "The simple name of the generated class", required = true)
> private UIInput<String> named;
> @Inject
> @WithAttributes(label = "Target package", type = InputType.JAVA_PACKAGE_PICKER)
> private UIInput<String> targetPackage;
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.11#6341)
9 years, 4 months
[JBoss JIRA] (FORGE-2246) Refactoring the JPA Commands
by Antonio Goncalves (JIRA)
[ https://issues.jboss.org/browse/FORGE-2246?page=com.atlassian.jira.plugin... ]
Antonio Goncalves commented on FORGE-2246:
------------------------------------------
No because we could refactor things in this new {{AbstractJPASourceCommand}}, for example :
* getMetadata By adding JPA (and this way each command will be "Java EE / JPA / New Embeddable"
* isProjectRequired
* getPrerequisiteCommands
* Add a method calculateDefaultPackage
> Refactoring the JPA Commands
> ----------------------------
>
> Key: FORGE-2246
> URL: https://issues.jboss.org/browse/FORGE-2246
> Project: Forge
> Issue Type: Sub-task
> Components: UI - API
> Reporter: Antonio Goncalves
> Priority: Minor
> Fix For: 2.x Future, 3.x Future
>
>
> The idea is to refactor the JPA commands (under {{org.jboss.forge.addon.javaee.jpa.ui}}) :
> * Add an interface with all the default sub-packages in {{javaee-api}}
> ** Interface {{org.jboss.forge.addon.javaee.JavaEEPackages}}
> ** Something like {{BUSINESS_MODEL}} would be {{model}}
> ** {{BUSINESS_LOGIC}} would be {{service}}
> ** {{EXCEPTIONS}} would be {{exception}}
> * Create a new {{org.jboss.forge.addon.javaee.jpa.ui.AbstractJPACommand}} that extends {{AbstractJavaEECommand}} and implements {{PrerequisiteCommandsProvider}}
> ** {{getMetadata}} By adding JPA (and this way each command will be "Java EE / JPA / New Embeddable"
> ** {{isProjectRequired}}
> ** {{getPrerequisiteCommands}}
> ** Add a method {{calculateDefaultPackage}}
> * Refactor the classes
> ** They extend from {{AbstractJPACommand}}
> ** Rename them by prefixing them with {{JPA}}
> *** {{NewEmbeddableCommand}} -> {{JPANewEmbeddableCommand}}
> *** {{NewEntityCommand}} -> {{JPANewEntityCommand}}
> *** ...
> Questions : some classes redifine {{named}} and {{targetPackage}} some don't, why ? :
> {code}
> @Inject
> @WithAttributes(label = "Entity name", description = "The simple name of the generated class", required = true)
> private UIInput<String> named;
> @Inject
> @WithAttributes(label = "Target package", type = InputType.JAVA_PACKAGE_PICKER)
> private UIInput<String> targetPackage;
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.11#6341)
9 years, 4 months
[JBoss JIRA] (FORGE-2246) Refactoring the JPA Commands
by George Gastaldi (JIRA)
[ https://issues.jboss.org/browse/FORGE-2246?page=com.atlassian.jira.plugin... ]
George Gastaldi commented on FORGE-2246:
----------------------------------------
It could extend {{AbstractJavaSourceCommand}} directly, the addition of another class in the hierarchy would make things complicated IMHO.
> Refactoring the JPA Commands
> ----------------------------
>
> Key: FORGE-2246
> URL: https://issues.jboss.org/browse/FORGE-2246
> Project: Forge
> Issue Type: Sub-task
> Components: UI - API
> Reporter: Antonio Goncalves
> Priority: Minor
> Fix For: 2.x Future, 3.x Future
>
>
> The idea is to refactor the JPA commands (under {{org.jboss.forge.addon.javaee.jpa.ui}}) :
> * Add an interface with all the default sub-packages in {{javaee-api}}
> ** Interface {{org.jboss.forge.addon.javaee.JavaEEPackages}}
> ** Something like {{BUSINESS_MODEL}} would be {{model}}
> ** {{BUSINESS_LOGIC}} would be {{service}}
> ** {{EXCEPTIONS}} would be {{exception}}
> * Create a new {{org.jboss.forge.addon.javaee.jpa.ui.AbstractJPACommand}} that extends {{AbstractJavaEECommand}} and implements {{PrerequisiteCommandsProvider}}
> ** {{getMetadata}} By adding JPA (and this way each command will be "Java EE / JPA / New Embeddable"
> ** {{isProjectRequired}}
> ** {{getPrerequisiteCommands}}
> ** Add a method {{calculateDefaultPackage}}
> * Refactor the classes
> ** They extend from {{AbstractJPACommand}}
> ** Rename them by prefixing them with {{JPA}}
> *** {{NewEmbeddableCommand}} -> {{JPANewEmbeddableCommand}}
> *** {{NewEntityCommand}} -> {{JPANewEntityCommand}}
> *** ...
> Questions : some classes redifine {{named}} and {{targetPackage}} some don't, why ? :
> {code}
> @Inject
> @WithAttributes(label = "Entity name", description = "The simple name of the generated class", required = true)
> private UIInput<String> named;
> @Inject
> @WithAttributes(label = "Target package", type = InputType.JAVA_PACKAGE_PICKER)
> private UIInput<String> targetPackage;
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.11#6341)
9 years, 4 months
[JBoss JIRA] (FORGE-2246) Refactoring the JPA Commands
by Antonio Goncalves (JIRA)
[ https://issues.jboss.org/browse/FORGE-2246?page=com.atlassian.jira.plugin... ]
Antonio Goncalves commented on FORGE-2246:
------------------------------------------
Makes sense. So maybe {{AbstractJPACommand}} shouldn't extend from {{AbstractJavaEECommand}} but instead {{AbstractJavaSourceCommand}} and be used *only* for java elements. In fact, shouldn't it be called {{AbstractJPASourceCommand}}
> Refactoring the JPA Commands
> ----------------------------
>
> Key: FORGE-2246
> URL: https://issues.jboss.org/browse/FORGE-2246
> Project: Forge
> Issue Type: Sub-task
> Components: UI - API
> Reporter: Antonio Goncalves
> Priority: Minor
> Fix For: 2.x Future, 3.x Future
>
>
> The idea is to refactor the JPA commands (under {{org.jboss.forge.addon.javaee.jpa.ui}}) :
> * Add an interface with all the default sub-packages in {{javaee-api}}
> ** Interface {{org.jboss.forge.addon.javaee.JavaEEPackages}}
> ** Something like {{BUSINESS_MODEL}} would be {{model}}
> ** {{BUSINESS_LOGIC}} would be {{service}}
> ** {{EXCEPTIONS}} would be {{exception}}
> * Create a new {{org.jboss.forge.addon.javaee.jpa.ui.AbstractJPACommand}} that extends {{AbstractJavaEECommand}} and implements {{PrerequisiteCommandsProvider}}
> ** {{getMetadata}} By adding JPA (and this way each command will be "Java EE / JPA / New Embeddable"
> ** {{isProjectRequired}}
> ** {{getPrerequisiteCommands}}
> ** Add a method {{calculateDefaultPackage}}
> * Refactor the classes
> ** They extend from {{AbstractJPACommand}}
> ** Rename them by prefixing them with {{JPA}}
> *** {{NewEmbeddableCommand}} -> {{JPANewEmbeddableCommand}}
> *** {{NewEntityCommand}} -> {{JPANewEntityCommand}}
> *** ...
> Questions : some classes redifine {{named}} and {{targetPackage}} some don't, why ? :
> {code}
> @Inject
> @WithAttributes(label = "Entity name", description = "The simple name of the generated class", required = true)
> private UIInput<String> named;
> @Inject
> @WithAttributes(label = "Target package", type = InputType.JAVA_PACKAGE_PICKER)
> private UIInput<String> targetPackage;
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.11#6341)
9 years, 4 months
[JBoss JIRA] (FORGE-2246) Refactoring the JPA Commands
by George Gastaldi (JIRA)
[ https://issues.jboss.org/browse/FORGE-2246?page=com.atlassian.jira.plugin... ]
George Gastaldi updated FORGE-2246:
-----------------------------------
Not sure this is a good idea since not all JavaEE commands will create java elements.
> Refactoring the JPA Commands
> ----------------------------
>
> Key: FORGE-2246
> URL: https://issues.jboss.org/browse/FORGE-2246
> Project: Forge
> Issue Type: Sub-task
> Components: UI - API
> Reporter: Antonio Goncalves
> Priority: Minor
> Fix For: 2.x Future, 3.x Future
>
>
> The idea is to refactor the JPA commands (under {{org.jboss.forge.addon.javaee.jpa.ui}}) :
> * Add an interface with all the default sub-packages in {{javaee-api}}
> ** Interface {{org.jboss.forge.addon.javaee.JavaEEPackages}}
> ** Something like {{BUSINESS_MODEL}} would be {{model}}
> ** {{BUSINESS_LOGIC}} would be {{service}}
> ** {{EXCEPTIONS}} would be {{exception}}
> * Create a new {{org.jboss.forge.addon.javaee.jpa.ui.AbstractJPACommand}} that extends {{AbstractJavaEECommand}} and implements {{PrerequisiteCommandsProvider}}
> ** {{getMetadata}} By adding JPA (and this way each command will be "Java EE / JPA / New Embeddable"
> ** {{isProjectRequired}}
> ** {{getPrerequisiteCommands}}
> ** Add a method {{calculateDefaultPackage}}
> * Refactor the classes
> ** They extend from {{AbstractJPACommand}}
> ** Rename them by prefixing them with {{JPA}}
> *** {{NewEmbeddableCommand}} -> {{JPANewEmbeddableCommand}}
> *** {{NewEntityCommand}} -> {{JPANewEntityCommand}}
> *** ...
> Questions : some classes redifine {{named}} and {{targetPackage}} some don't, why ? :
> {code}
> @Inject
> @WithAttributes(label = "Entity name", description = "The simple name of the generated class", required = true)
> private UIInput<String> named;
> @Inject
> @WithAttributes(label = "Target package", type = InputType.JAVA_PACKAGE_PICKER)
> private UIInput<String> targetPackage;
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.11#6341)
9 years, 4 months
[JBoss JIRA] (FORGE-2246) Refactoring the JPA Commands
by Antonio Goncalves (JIRA)
[ https://issues.jboss.org/browse/FORGE-2246?page=com.atlassian.jira.plugin... ]
Antonio Goncalves commented on FORGE-2246:
------------------------------------------
Hum... So shall we "duplicate" the code of {{AbstractJavaSourceCommand}} (the target package, named and overwrite) into {{AbstractJavaEECommand}} ? Both {{AbstractJavaSourceCommand}} and {{AbstractJavaEECommand}} extend from {{AbstractProjectCommand}}, so {{AbstractJavaEECommand}} cannot extend from {{AbstractJavaSourceCommand}} (except we refactor the entire graph}.
WDYT ?
> Refactoring the JPA Commands
> ----------------------------
>
> Key: FORGE-2246
> URL: https://issues.jboss.org/browse/FORGE-2246
> Project: Forge
> Issue Type: Sub-task
> Components: UI - API
> Reporter: Antonio Goncalves
> Priority: Minor
> Fix For: 2.x Future, 3.x Future
>
>
> The idea is to refactor the JPA commands (under {{org.jboss.forge.addon.javaee.jpa.ui}}) :
> * Add an interface with all the default sub-packages in {{javaee-api}}
> ** Interface {{org.jboss.forge.addon.javaee.JavaEEPackages}}
> ** Something like {{BUSINESS_MODEL}} would be {{model}}
> ** {{BUSINESS_LOGIC}} would be {{service}}
> ** {{EXCEPTIONS}} would be {{exception}}
> * Create a new {{org.jboss.forge.addon.javaee.jpa.ui.AbstractJPACommand}} that extends {{AbstractJavaEECommand}} and implements {{PrerequisiteCommandsProvider}}
> ** {{getMetadata}} By adding JPA (and this way each command will be "Java EE / JPA / New Embeddable"
> ** {{isProjectRequired}}
> ** {{getPrerequisiteCommands}}
> ** Add a method {{calculateDefaultPackage}}
> * Refactor the classes
> ** They extend from {{AbstractJPACommand}}
> ** Rename them by prefixing them with {{JPA}}
> *** {{NewEmbeddableCommand}} -> {{JPANewEmbeddableCommand}}
> *** {{NewEntityCommand}} -> {{JPANewEntityCommand}}
> *** ...
> Questions : some classes redifine {{named}} and {{targetPackage}} some don't, why ? :
> {code}
> @Inject
> @WithAttributes(label = "Entity name", description = "The simple name of the generated class", required = true)
> private UIInput<String> named;
> @Inject
> @WithAttributes(label = "Target package", type = InputType.JAVA_PACKAGE_PICKER)
> private UIInput<String> targetPackage;
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.11#6341)
9 years, 4 months
[JBoss JIRA] (FORGE-2246) Refactoring the JPA Commands
by George Gastaldi (JIRA)
[ https://issues.jboss.org/browse/FORGE-2246?page=com.atlassian.jira.plugin... ]
George Gastaldi commented on FORGE-2246:
----------------------------------------
Looks good. Some classes redefine {{named}} and {{targetPackage}} because they do not extend {{org.jboss.forge.addon.parser.java.ui.AbstractJavaSourceCommand}}.
> Refactoring the JPA Commands
> ----------------------------
>
> Key: FORGE-2246
> URL: https://issues.jboss.org/browse/FORGE-2246
> Project: Forge
> Issue Type: Sub-task
> Components: UI - API
> Reporter: Antonio Goncalves
> Priority: Minor
> Fix For: 2.x Future, 3.x Future
>
>
> The idea is to refactor the JPA commands (under {{org.jboss.forge.addon.javaee.jpa.ui}}) :
> * Add an interface with all the default sub-packages in {{javaee-api}}
> ** Interface {{org.jboss.forge.addon.javaee.JavaEEPackages}}
> ** Something like {{BUSINESS_MODEL}} would be {{model}}
> ** {{BUSINESS_LOGIC}} would be {{service}}
> ** {{EXCEPTIONS}} would be {{exception}}
> * Create a new {{org.jboss.forge.addon.javaee.jpa.ui.AbstractJPACommand}} that extends {{AbstractJavaEECommand}} and implements {{PrerequisiteCommandsProvider}}
> ** {{getMetadata}} By adding JPA (and this way each command will be "Java EE / JPA / New Embeddable"
> ** {{isProjectRequired}}
> ** {{getPrerequisiteCommands}}
> ** Add a method {{calculateDefaultPackage}}
> * Refactor the classes
> ** They extend from {{AbstractJPACommand}}
> ** Rename them by prefixing them with {{JPA}}
> *** {{NewEmbeddableCommand}} -> {{JPANewEmbeddableCommand}}
> *** {{NewEntityCommand}} -> {{JPANewEntityCommand}}
> *** ...
> Questions : some classes redifine {{named}} and {{targetPackage}} some don't, why ? :
> {code}
> @Inject
> @WithAttributes(label = "Entity name", description = "The simple name of the generated class", required = true)
> private UIInput<String> named;
> @Inject
> @WithAttributes(label = "Target package", type = InputType.JAVA_PACKAGE_PICKER)
> private UIInput<String> targetPackage;
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.11#6341)
9 years, 4 months
[JBoss JIRA] (FORGE-2246) Refactoring the JPA Commands
by Antonio Goncalves (JIRA)
[ https://issues.jboss.org/browse/FORGE-2246?page=com.atlassian.jira.plugin... ]
Antonio Goncalves updated FORGE-2246:
-------------------------------------
Description:
The idea is to refactor the JPA commands (under {{org.jboss.forge.addon.javaee.jpa.ui}}) :
* Add an interface with all the default sub-packages in {{javaee-api}}
** Interface {{org.jboss.forge.addon.javaee.JavaEEPackages}}
** Something like {{BUSINESS_MODEL}} would be {{model}}
** {{BUSINESS_LOGIC}} would be {{service}}
** {{EXCEPTIONS}} would be {{exception}}
* Create a new {{org.jboss.forge.addon.javaee.jpa.ui.AbstractJPACommand}} that extends {{AbstractJavaEECommand}} and implements {{PrerequisiteCommandsProvider}}
** {{getMetadata}} By adding JPA (and this way each command will be "Java EE / JPA / New Embeddable"
** {{isProjectRequired}}
** {{getPrerequisiteCommands}}
** Add a method {{calculateDefaultPackage}}
* Refactor the classes
** They extend from {{AbstractJPACommand}}
** Rename them by prefixing them with {{JPA}}
*** {{NewEmbeddableCommand}} -> {{JPANewEmbeddableCommand}}
*** {{NewEntityCommand}} -> {{JPANewEntityCommand}}
*** ...
Questions : some classes redifine {{named}} and {{targetPackage}} some don't, why ? :
{code}
@Inject
@WithAttributes(label = "Entity name", description = "The simple name of the generated class", required = true)
private UIInput<String> named;
@Inject
@WithAttributes(label = "Target package", type = InputType.JAVA_PACKAGE_PICKER)
private UIInput<String> targetPackage;
{code}
was:
The idea is to refactor the JPA commands (under {{org.jboss.forge.addon.javaee.jpa.ui}}) :
* Add an interface with all the default sub-packages in {{javaee-api}}
** Interface {{org.jboss.forge.addon.javaee.JavaEEPackages}}
** Something like {{BUSINESS_MODEL}} would be {{model}}
** {{BUSINESS_LOGIC}} would be {{service}}
** {{EXCEPTIONS}} would be {{exception}}
* Create a new {{org.jboss.forge.addon.javaee.jpa.ui.AbstractJPACommand}} that extends {{AbstractJavaEECommand}} and implements {{PrerequisiteCommandsProvider}}
** {{getMetadata}} By adding JPA (and this way each command will be "Java EE / JPA / New Embeddable"
** {{isProjectRequired}}
** {{getPrerequisiteCommands}}
** Add a method {{calculateDefaultPackage}}
* Refactor the classes
** They extend from {{AbstractJPACommand}}
** Rename them by prefixing them with {{JPA}}
*** {{NewEmbeddableCommand}} -> {{JPANewEmbeddableCommand}}
*** {{NewEntityCommand}} -> {{JPANewEntityCommand}}
*** ...
Questions : some classes redifine {{named}} and {{targetPackage}} some don't :
{code}
@Inject
@WithAttributes(label = "Entity name", description = "The simple name of the generated class", required = true)
private UIInput<String> named;
@Inject
@WithAttributes(label = "Target package", type = InputType.JAVA_PACKAGE_PICKER)
private UIInput<String> targetPackage;
{code}
> Refactoring the JPA Commands
> ----------------------------
>
> Key: FORGE-2246
> URL: https://issues.jboss.org/browse/FORGE-2246
> Project: Forge
> Issue Type: Sub-task
> Components: UI - API
> Reporter: Antonio Goncalves
> Priority: Minor
> Fix For: 2.x Future, 3.x Future
>
>
> The idea is to refactor the JPA commands (under {{org.jboss.forge.addon.javaee.jpa.ui}}) :
> * Add an interface with all the default sub-packages in {{javaee-api}}
> ** Interface {{org.jboss.forge.addon.javaee.JavaEEPackages}}
> ** Something like {{BUSINESS_MODEL}} would be {{model}}
> ** {{BUSINESS_LOGIC}} would be {{service}}
> ** {{EXCEPTIONS}} would be {{exception}}
> * Create a new {{org.jboss.forge.addon.javaee.jpa.ui.AbstractJPACommand}} that extends {{AbstractJavaEECommand}} and implements {{PrerequisiteCommandsProvider}}
> ** {{getMetadata}} By adding JPA (and this way each command will be "Java EE / JPA / New Embeddable"
> ** {{isProjectRequired}}
> ** {{getPrerequisiteCommands}}
> ** Add a method {{calculateDefaultPackage}}
> * Refactor the classes
> ** They extend from {{AbstractJPACommand}}
> ** Rename them by prefixing them with {{JPA}}
> *** {{NewEmbeddableCommand}} -> {{JPANewEmbeddableCommand}}
> *** {{NewEntityCommand}} -> {{JPANewEntityCommand}}
> *** ...
> Questions : some classes redifine {{named}} and {{targetPackage}} some don't, why ? :
> {code}
> @Inject
> @WithAttributes(label = "Entity name", description = "The simple name of the generated class", required = true)
> private UIInput<String> named;
> @Inject
> @WithAttributes(label = "Target package", type = InputType.JAVA_PACKAGE_PICKER)
> private UIInput<String> targetPackage;
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.11#6341)
9 years, 4 months
[JBoss JIRA] (FORGE-2246) Refactoring the JPA Commands
by Antonio Goncalves (JIRA)
[ https://issues.jboss.org/browse/FORGE-2246?page=com.atlassian.jira.plugin... ]
Antonio Goncalves updated FORGE-2246:
-------------------------------------
Description:
The idea is to refactor the JPA commands (under {{org.jboss.forge.addon.javaee.jpa.ui}}) :
* Add an interface with all the default sub-packages in {{javaee-api}}
** Interface {{org.jboss.forge.addon.javaee.JavaEEPackages}}
** Something like {{BUSINESS_MODEL}} would be {{model}}
** {{BUSINESS_LOGIC}} would be {{service}}
** {{EXCEPTIONS}} would be {{exception}}
* Create a new {{org.jboss.forge.addon.javaee.jpa.ui.AbstractJPACommand}} that extends {{AbstractJavaEECommand}} and implements {{PrerequisiteCommandsProvider}}
** {{getMetadata}} By adding JPA (and this way each command will be "Java EE / JPA / New Embeddable"
** {{isProjectRequired}}
** {{getPrerequisiteCommands}}
** Add a method {{calculateDefaultPackage}}
* Refactor the classes
** They extend from {{AbstractJPACommand}}
** Rename them by prefixing them with {{JPA}}
*** {{NewEmbeddableCommand}} -> {{JPANewEmbeddableCommand}}
*** {{NewEntityCommand}} -> {{JPANewEntityCommand}}
*** ...
Questions : some classes redifine {{named}} and {{targetPackage}} some don't :
{code}
@Inject
@WithAttributes(label = "Entity name", description = "The simple name of the generated class", required = true)
private UIInput<String> named;
@Inject
@WithAttributes(label = "Target package", type = InputType.JAVA_PACKAGE_PICKER)
private UIInput<String> targetPackage;
{code}
was:
The idea is to refactor the JPA commands (under {{org.jboss.forge.addon.javaee.jpa.ui}}) :
* Create a new {{org.jboss.forge.addon.javaee.jpa.ui.AbstractJPACommand}} that extends {{AbstractJavaEECommand}} and implements {{PrerequisiteCommandsProvider}}
** {{getMetadata}} By adding JPA (and this way each command will be "Java EE / JPA / New Embeddable"
** {{isProjectRequired}}
** {{getPrerequisiteCommands}}
** Add a method {{calculateDefaultPackage}}
* Refactor the classes
** They extend from {{AbstractJPACommand}}
** Rename them by prefixing them with {{JPA}}
*** {{NewEmbeddableCommand}} -> {{JPANewEmbeddableCommand}}
*** {{NewEntityCommand}} -> {{JPANewEntityCommand}}
*** ...
Questions : some classes redifine {{named}} and {{targetPackage}} some don't :
{code}
@Inject
@WithAttributes(label = "Entity name", description = "The simple name of the generated class", required = true)
private UIInput<String> named;
@Inject
@WithAttributes(label = "Target package", type = InputType.JAVA_PACKAGE_PICKER)
private UIInput<String> targetPackage;
{code}
> Refactoring the JPA Commands
> ----------------------------
>
> Key: FORGE-2246
> URL: https://issues.jboss.org/browse/FORGE-2246
> Project: Forge
> Issue Type: Sub-task
> Components: UI - API
> Reporter: Antonio Goncalves
> Priority: Minor
> Fix For: 2.x Future, 3.x Future
>
>
> The idea is to refactor the JPA commands (under {{org.jboss.forge.addon.javaee.jpa.ui}}) :
> * Add an interface with all the default sub-packages in {{javaee-api}}
> ** Interface {{org.jboss.forge.addon.javaee.JavaEEPackages}}
> ** Something like {{BUSINESS_MODEL}} would be {{model}}
> ** {{BUSINESS_LOGIC}} would be {{service}}
> ** {{EXCEPTIONS}} would be {{exception}}
> * Create a new {{org.jboss.forge.addon.javaee.jpa.ui.AbstractJPACommand}} that extends {{AbstractJavaEECommand}} and implements {{PrerequisiteCommandsProvider}}
> ** {{getMetadata}} By adding JPA (and this way each command will be "Java EE / JPA / New Embeddable"
> ** {{isProjectRequired}}
> ** {{getPrerequisiteCommands}}
> ** Add a method {{calculateDefaultPackage}}
> * Refactor the classes
> ** They extend from {{AbstractJPACommand}}
> ** Rename them by prefixing them with {{JPA}}
> *** {{NewEmbeddableCommand}} -> {{JPANewEmbeddableCommand}}
> *** {{NewEntityCommand}} -> {{JPANewEntityCommand}}
> *** ...
> Questions : some classes redifine {{named}} and {{targetPackage}} some don't :
> {code}
> @Inject
> @WithAttributes(label = "Entity name", description = "The simple name of the generated class", required = true)
> private UIInput<String> named;
> @Inject
> @WithAttributes(label = "Target package", type = InputType.JAVA_PACKAGE_PICKER)
> private UIInput<String> targetPackage;
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.11#6341)
9 years, 4 months