5. Creating Model Packages

PROBLEM

In Java application development it is common to use packages for organizing and namespacing Java resources according to their functionality. The Spring DSL abstracts the development of many different types of Java resources, but there still needs to be a mechanism for the developer to group related Spring DSL artifacts. Furthermore the developer often wants to control the package names that are ultimately emitted in the generated code.

SOLUTION

A Model Package is a Spring DSL artifact for namespacing and grouping related Spring DSL components. A model package can contain any top-level Spring DSL elements, including other model packages. Model packages correlate directly to java packages (and UML packages), and Spring DSL artifacts created in a model package will be generated into a matching Java package.

HOW IT WORKS

Steps for creating a Model Package:

  1. Right-click on the Spring DSL folder of a Skyway Project, and select New --> Model Package

  2. For the New Model Package window, specify the name of the model package. The name can be partially filled-in by selecting a pre-existing model package in the project.