Details

    • Type: Sub-task
    • Status: Closed (View Workflow)
    • Priority: Minor
    • Resolution: Done
    • Affects Version/s: None
    • Fix Version/s: 2.15.1.Final
    • Component/s: UI - API
    • Labels:
      None

      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 ? :

         @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;
      

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                agoncal Antonio Goncalves
                Reporter:
                agoncal Antonio Goncalves
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: