[forge-issues] [JBoss JIRA] (FORGE-2109) Refactoring the UICommands

Antonio Goncalves (JIRA) issues at jboss.org
Wed Oct 29 12:10:35 EDT 2014


Antonio Goncalves created FORGE-2109:
----------------------------------------

             Summary: Refactoring the UICommands
                 Key: FORGE-2109
                 URL: https://issues.jboss.org/browse/FORGE-2109
             Project: Forge
          Issue Type: Enhancement
          Components: UI - API
    Affects Versions: 2.12.1.Final
            Reporter: Antonio Goncalves


_From the Mailing List [https://developer.jboss.org/thread/249733]_

I'm trying to add more commands in Forge... but I have to say, I'm a bit lost. So, I've made a quick UML class diagram. 

As you can see in the attached diagram (UIForgeNow.png), most of the Java EE commands extend {{AbstractJavaEECommand}}, which makes sense. But not all of them ({{NewBeanCommand}} (CDI), {{ValidationNewAnnotationCommandImpl}}, {{NewQualifierCommand}}....). And some times you have an extra level of abstraction ({{AbstractFacesCommand}}). Same for the Java commands. {{JavaClassCommandImpl}} extend {{AbstractJavaSourceCommand}} but {{JavaAddAnnotationCommand}} and {{JavaFieldCommand}} inherit from {{AbstractProjectCommand}}. Some other commands, just use the {{@Command}} annotation. 

Then, when you dive into a command (UIForgeStructure.png), some commands use interface and implementation (see in the second diagram {{JavaAddAnnotationCommandImpl}} implementing {{JavaAddAnnotationCommand}}), some don't (e.g. {{NewQualifierCommand}}). 

Correct me if I'm wrong, but the way I see it would be (UIForgeRefactor.png) : under {{AbstractJavaEECommand}} you have a set of {{AbstractValidationCommand}}, {{AbstractCDICommand}}, {{AbstractJPACommand}}.... each implementing {{PrerequisiteCommandsProvider}} (this way, each command sets up its own pre-requisite). And then, under {{AbstractCDICommand}} you have all the {{NewQualifierCommand}}, {{NewBeanCommand}}....

*The idea of this JIRA is to brainstorm about refactoring the commands, and see if we do it and how*



--
This message was sent by Atlassian JIRA
(v6.3.1#6329)


More information about the forge-issues mailing list