Table of Contents
List of Tables
List of Examples
Table of Contents
Scaffolding consists of generating full or major portions of an application by applying standard application patterns from a minimal set of inputs provided by the developer. In some cases the scaffolded applications are used as-is, but in other cases the scaffolded artifacts are used as a starting point for additional customization by a developer. In either case scaffolding, originally popularized by the RAILS and GRAILS frameworks, is very effective at jump-starting application development.
Spring MVC is a web framework from the creators of the Spring. While it isn't the only Spring-based web framework, it is one of the mostly commonly used web frameworks. Spring MVC refers to the web framework and also the application architecture, where application logic is partitioned into different layers. Each layer has it's own responsibilities, and all layers can be generated using the Spring MVC Scaffolding wizard.
Application Architecture:
Web Layer - responding to user events; implemented with Spring MVC (@Controller)
Service Layer - core application logic; implemented with Spring (@Service)
Domain Layer - application domain model; implemented with JPA (@Entity)
Data Access Layer - data access logic; implemented with Spring (@Repository)
MyEclipse for Spring uses the Create-Read-Update-Delete (CRUD) application pattern for generating applications that allows the end-user to manage application data. While CRUD isn't the only application pattern, it's a fairly typical application pattern. While not all web applications are satisfied solely by the CRUD application pattern, developers find that the resulting generated application artifacts lend themselves to being easily re-used, customized and extended. CRUD applications are tied to an application domain model that is used as the input into the scaffolding engine. The domain model can exist in many forms, and the Spring MVC Scaffolding wizard supports the use of Java beans, JPA entities, database tables, and Spring DSL Domain Objects as inputs.
The Spring DSL defines 11 abstractions, which include Spring DSL, Model Package, Web Controller, Service, Component, Domain Object, Data Access Object, Named Query, Exception and Flow. Each abstraction has a direct correlation to Java, Spring, and JPA artifacts and will generate into a distinct set of code or configuration artifacts.
This is the Spring DSL model:

Here's a high-level summary of each Spring DSL component.
Summary of Spring DSL Components
Spring DSL - used for project-wide configuration of Spring code generation.
Model Package - used 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 Spring DSL artifacts created in a model package will be generated into a matching Java package.
Web Controller - used for defining the web layer of an application using Spring MVC. Web Controllers are generated into @Controller annotated Spring components, a specialized stereotype for web layer components.
Service - used for defining a service layer components. Services get generated into @Service annotated Spring components, a specialized stereotype for service layer components.
Component - used for defining a general-purpose Spring managed java bean. A component gets generated into @Component annotated Spring components, a generic stereotype for Spring managed components with configurable scope.
Operation - used to define methods for both Controllers, Services and Components.. Operations represent application logic, and they use inputs and outputs for exchanging data. Operations are generated directly in the respective Controller, Service, and Component class, and they are generated slightly differently to account for the different implementations needed for the Spring stereotypes.
Domain Object - used to define the domain model of the application. By default a domain object is generated into a plain old java object (POJO). If a domain object is associated with a data access object, then the domain object is annotated as an @Entity (JPA) annotated class, and it's associated with a primary key class (@IdClass). Fields can be added to domain objects by using the basic data types, and a domain object can have relationships to other domain objects.
Data Access Object (DAO) - used to separate data access logic from application logic. A DAO manages the persistence of domain objects, and it is generated into @Repository annotated Spring components, a specialized stereotype for data access layer components. A DAO can also contain predefined queries called Named Queries.
Named Query - used for defining queries for the data access objects (DAOs). Named queries are defined using either SQL or JPQL (Java Persistence Query Language), and Named Queries are generated into @NamedQueries and @NamedQuery annotations in Spring @Repository components.
Exception - used to define custom exceptions. Exceptions are generated into exception classes in Java.
Flow - used to implement the web layer of an application using Spring Web Flow.
Each Spring DSL component has an associated editor. Spring DSL-based development consists of a developer creating instances of the Spring DSL components, and configuring them using the associated editor. When code generation is invoked, the relevent code and configuration artifacts will be generated acccording to the configuration of the respective component.
Table of Contents
The Add Spring Code Generation Capabilities is used to add Spring code generation functionality to a project. This wizard has various various capabilities that can be optionally added to the current project, including:
enabling Code Generation Builder for automated code generation
enabling Code Synchronization Builder for automated reverse engineering of Spring/Java artifacts
enabling Spring DSL visibility, including enabling Spring DSL node in project
applying Spring Nature to project for viewing and editting Spring configuration via Spring Elements node
enabling code generation by application layer (web, service, domain and DAO)
configuring target projects and folders for code generation
adding Spring application runtime dependencies to project
By default this wizard is setup with conventional defaults which enable all options. When clicking on Finish from the Setup panel, all the default configuration options will be applied to the current project. In order to customize the configuration, there are seven optional steps to the wizard.
Add Spring Code Generation Capabilities >> Setup >> Web Layer Generation >> Service Layer Generation >> Domain Layer Generation >> Data Access Layer Generation >> Runtime Dependencies >> Summary
The Setup panel is for specifying which builders should be enabled, whether the Spring Nature should be applied to the project, and whether the Spring DSL should be visible.

Table 2.1. Add Spring Code Generation Capabilities - Setup Panel
| Option | Description | ||
|---|---|---|---|
| Install Skyway Code Generation builder | Enables the code generation builder to automatically generate code when relevant artifacts are updated. Code generation can always be manually invoked (right-click-->Generate), but this builder will automatically observe changes to artifacts and generate code. | ||
| Install Skyway Code Synchronization builder | Enables the code synchronization builder to automatically synchronize the code generation model (metadata) from changes to the code Java source files. Code synchronization can always be manually invoked (right-click-->Update Models from Source), but this builder will observe changes to Java code and automatically update the model. | ||
| Apply Spring Nature | Add Spring Nature to current project to enable viewing/editting Spring configurations using Spring Elements node. When applied, all generated Spring context files will be preconfigured with Spring Elements. | ||
| Show Spring DSL | Enables a Spring DSL view of the current project. The Spring DSL node will be added to the project, and the Spring code generation metadata can be viewed and editted using the Spring DSL. | ||
The Web Layer Generation panel is used for enabling and configuring code generation for the web layer of a Spring application, including controllers (@Controller), JUnit tests, and web layer Spring context files.
If enabled, this panel lets you specify the project and folders to generate to. While you will typically want to generate to the same project where the code generation metadata (Spring DSL) is stored, in some cases you may want to generate to a different project. For example, you may want to keep all your metadata in one project and have all code and configuration files generated to another project. Alternatively you may want to generate each layer to a separate project. In either case you have full control over the target project and folders.

Table 2.2. Add Spring Code Generation Capabilities - Web Layer Generation Panel
| Option | Description | ||
|---|---|---|---|
| Enable web layer code generation | This enables generation of web layer artifacts from code generation metadata. If disabled, any current or new web layer metadata will be ignored from a code generation standpoint. Web layer code generation can always be turned on/off or customized using the Code Generation panel of the Spring DSL Editor. | ||
| Target Project | The target project is the destination project for web layer code generation. While you will typically want to generate to the same project where the code generation metadata is stored (Generate to this project), in some cases you may want to generate to a different project (Generate to another Eclipse project). | ||
| Target Project Configuration |
Specify the destination folder for generated Java code (Source folder) and configuration files (Resources folder). If the specified folders aren't already configured as source folders, the Source and Resource folders are automatically added as source folders (see Java Build Path). The default target source folder is the "generated" folder. This is done to keep the generated code separate from any existing source code which by default is typically in the "src" folder. The wizard will automatically configure the "generated" folder to be an Eclipse source folder. If you prefer to generate directly into your "src" folder, you can select the "src" folder from this panel. The default resources folder is "resources" folder. All application configuration files are genered here. The wizard will automatically configure the "generated" folder to be an Eclipse source folder. |
||
The Service Layer Generation panel is used for enabling and configuring code generation for the service layer of a Spring application, including services (@Service), service interfaces, JAX-WS web services, direct web remoting (DWR) services, JUnit tests, and service layer Spring context files.
If enabled, this panel lets you specify the project and folders to generate to. While you will typically want to generate to the same project where the code generation metadata (Spring DSL) is stored, in some cases you may want to generate to a different project. For example, you may want to keep all your metadata in one project and have all code and configuration files generated to another project. Alternatively you may want to generate each layer to a separate project. In either case you have full control over the target project and folders.

Table 2.3. Add Spring Code Generation Capabilities - Service Layer Generation Panel
| Option | Description | ||
|---|---|---|---|
| Enable service layer code generation | This enables generation of service layer artifacts from code generation metadata. If disabled, any current or new service layer metadata will be ignored from a code generation standpoint. Service layer code generation can always be turned on/off or customizedd using the Code Generation panel of the Project Editor. | ||
| Target Project | The target project is the destination project for service layer code generation. While you will typically want to generate to the same project where the code generation metadata is stored (Generate to this project), in some cases you may want to generate to a different project (Generate to another Eclipse project). | ||
| Target Project Configuration |
Specify the destination folder for generated Java code (Source folder) and configuration files (Resources folder). If the specified folders aren't already configured as source folders, the Source and Resource folders are automatically added as source folders (see Java Build Path). The default target source folder is the "generated" folder. This is done to keep the generated code separate from any existing source code which by default is typically in the "src" folder. The wizard will automatically configure the "generated" folder to be an Eclipse source folder. If you prefer to generate directly into your "src" folder, you can select the "src" folder from this panel. The default resources folder is "resources" folder. All application configuration files are genered here. The wizard will automatically configure the "generated" folder to be an Eclipse source folder. |
||
The Domain Layer Generation panel is used for enabling and configuring code generation for the domain layer of a Spring application, including POJOs, primary key classes, bean info classes, JPA Entities (@Entity), Spring Components (@Component), JUnit tests, and domain layer Spring context files.
If enabled, this panel lets you specify the project and folders to generate to. While you will typically want to generate to the same project where the code generation metadata (Spring DSL) is stored, in some cases you may want to generate to a different project. For example, you may want to keep all your metadata in one project and have all code and configuration files generated to another project. Alternatively you may want to generate each layer to a separate project. In either case you have full control over the target project and folders.

Table 2.4. Add Spring Code Generation Capabilities - Domain Layer Generation Panel
| Option | Description | ||
|---|---|---|---|
| Enable domain layer code generation | This enables generation of domain layer artifacts from code generation metadata. If disabled, any current or new domain layer metadata will be ignored from a code generation standpoint. domain layer code generation can always be turned on/off or customized using the Code Generation panel of the Project Editor. | ||
| Target Project | The target project is the destination project for domain layer code generation. While you will typically want to generate to the same project where the code generation metadata is stored (Generate to this project), in some cases you may want to generate to a different project (Generate to another Eclipse project). | ||
| Target Project Configuration |
Specify the destination folder for generated Java code (Source folder) and configuration files (Resources folder). If the specified folders aren't already configured as source folders, the Source and Resource folders are automatically added as source folders (see Java Build Path). The default target source folder is the "generated" folder. This is done to keep the generated code separate from any existing source code which by default is typically in the "src" folder. The wizard will automatically configure the "generated" folder to be an Eclipse source folder. If you prefer to generate directly into your "src" folder, you can select the "src" folder from this panel. The default resources folder is "resources" folder. All application configuration files are genered here. The wizard will automatically configure the "generated" folder to be an Eclipse source folder. |
||
The Data Access Layer Generation panel is used for enabling and configuring code generation for the DAO layer of a Spring application, including Spring repositories (@Repositiry), JUnit tests, and DAO layer Spring context files.
If enabled, this panel lets you specify the project and folders to generate to. While you will typically want to generate to the same project where the code generation metadata (Spring DSL) is stored, in some cases you may want to generate to a different project. For example, you may want to keep all your metadata in one project and have all code and configuration files generated to another project. Alternatively you may want to generate each layer to a separate project. In either case you have full control over the target project and folders.

Table 2.5. Add Spring Code Generation Capabilities - Web Layer Generation Panel
| Option | Description | ||
|---|---|---|---|
| Enable data access layer code generation | This enables generation of DAO layer artifacts from code generation metadata. If disabled, any current or new DAO layer metadata will be ignored from a code generation standpoint. DAO layer code generation can always be turned on/off or customized using the Code Generation panel of the Project Editor. | ||
| Target Project | The target project is the destination project for DAO layer code generation. While you will typically want to generate to the same project where the code generation metadata is stored (Generate to this project), in some cases you may want to generate to a different project (Generate to another Eclipse project). | ||
| Target Project Configuration |
Specify the destination folder for generated Java code (Source folder) and configuration files (Resources folder). If the specified folders aren't already configured as source folders, the Source and Resource folders are automatically added as source folders (see Java Build Path). The default target source folder is the "generated" folder. This is done to keep the generated code separate from any existing source code which by default is typically in the "src" folder. The wizard will automatically configure the "generated" folder to be an Eclipse source folder. If you prefer to generate directly into your "src" folder, you can select the "src" folder from this panel. The default resources folder is "resources" folder. All application configuration files are genered here. The wizard will automatically configure the "generated" folder to be an Eclipse source folder. |
||
The Runtime Dependencies panel is for adding dependent libraries to the current project. While you can independently add and remove libraries from the project, this panel can bootstrap the project with a full set of libraries typically needed by a Spring application, including Spring libraries plus many other runtime libraries.
This panel lets you add project dependencies in three ways:
Copy libraries to a project folder (lib), and add libraries to build path (Benefit: more portable projects because projects aren't reliant on MyEclipse for Spring plugins)
Use Eclipse classpath containers, and add classpath containers to build path (Benefit: smaller projects because libs are included)
Update Maven POM files (Benefit: Maven manages dependencies)
The libraries to add to the current project can be enabled or disabled by library group or library. The library groups can be expanded to see the specific libraries and versions.

Table 2.6. Add Spring Code Generation Capabilities - Runtime Dependencies Panel
| Options | Description | ||
|---|---|---|---|
| Use Eclipse classpath containers instead of copying libraries into the project | By default (for non-Maven projects) the dependencies are added to the current project by copying the selected libraries into the specified library folder. When the classpath container option is selected, the libraries will be added using Eclipse classpath containers. | ||
| Library folder | The project folder where libraries should be copied into | ||
| Library groups / libraries |
The set of library groups and libraries that can be added to the current project. The checked groups/libraries will be added as dependencies to the current project. |
||
The Add Spring Runtime Dependencies... Wizard is used to add dependent libraries to an Eclipse project. There are three steps to the wizard.
Add Spring Runtime Dependencies >> Intro >> Runtime Dependencies >> Static Content >> Summary
The Runtime Dependencies panel is for adding dependent libraries to the current project. While you can independently add and remove libraries from the project, this panel can bootstrap the project with a full set of libraries typically needed by a Spring application, including Spring libraries plus many other runtime libraries.
This panel lets you add project dependencies in three ways:
Copy libraries to a project folder (lib), and add libraries to build path (Benefit: more portable projects because projects aren't reliant on MyEclipse for Spring plugins)
Use Eclipse classpath containers, and add classpath containers to build path (Benefit: smaller projects because libs are included)
Update Maven POM files (Benefit: Maven manages dependencies)
The libraries to add to the current project can be enabled or disabled by library group or library. The library groups can be expanded to see the specific libraries and versions.

Table 2.7. Add Spring Runtime Dependencies - Runtime Dependencies Panel
| Options | Description | ||
|---|---|---|---|
| Use Eclipse classpath containers instead of copying libraries into the project | By default (for non-Maven projects) the dependencies are added to the current project by copying the selected libraries into the specified library folder. When the classpath container option is selected, the libraries will be added using Eclipse classpath containers. | ||
| Library folder | The project folder where libraries should be copied into | ||
| Library groups / libraries |
The set of library groups and libraries that can be added to the current project. The checked groups/libraries will be added as dependencies to the current project. |
||
The Copy Static Content panel is for boostrapping the web content folder with required web content files (i.e. javascript, jsp pages).

Table 2.8. Artifact Category Mappings Window
| Details | Description | ||
|---|---|---|---|
| Copy Static Web Content into this project | This option determines whether static content will be added to the current project. | ||
| Content (folder) | Identifies the web content folder. This folder is automatically derived from the project configuration for MyEclipse Web Projects and Dynamic Web Projects. | ||
As explained in Spring MVC scaffolding, scaffolding can generate full or major portions of an application by applying standard application patterns from a minimal set of existing artifacts provided by the developer.
This wizard has many panels for guiding you through the scaffolding process. The wizard will dynamically determine the relevant panels based on the artitfacts you are scaffolding from and the configuration of the project. The three most common scaffolding scenarios are:
Scaffolding from Java Beans
Scaffold Spring MVC CRUD Application from... >> Select Project >> Select Artifact Type(s) >> Select Artifacts >> Select Primary Keys >> Application Layers and Packages >> Persistence Connection >> Target Folders >> Summary
Scaffolding from JPA Entities and Spring DSL Domain Objects
Scaffold Spring MVC CRUD Application from... >> Select Project >> Select Artifact Type(s) >> Select Artifacts >> Application Layers and Packages >> Persistence Connection >> Target Folders >> Summary
Scaffolding from Database Tables
Scaffold Spring MVC CRUD Application from... >> Select Project >> Select Artifact Type(s) >> Select DB Connection >> Select Tables >> DB Scaffolding Options >> Application Layers and Packages >> Target Folders >> Summary
The Select Project panel is for selecting the project that contains the artifacts that will be used as inputs for Spring MVC scaffolding and/or selecting the destination project for scaffolded artifacts

Table 2.9. Scaffold Spring MVC CRUD Application - Select Project Panel
| Option | Description | ||
|---|---|---|---|
| Project | List of all open Eclipse projects. Select the one project that should be scanned for scaffolding inputs. If scaffolding from database tables, the selected project will be the target project. | ||
The Select Artifact Types panel is used for specifying which type of artifacts should be used for scaffolding. You can select from multiple artifact types:
Table 2.10. Scaffolding Artifact Types
| Type | Description | ||
|---|---|---|---|
| Database Schema | For scaffolding from existing database tables. You will be prompted for a database connection to select the database tables that should be used for scaffolding a Spring web application. Scaffolding from a database schema must be done independent of the artifact types. When you select this option, the other artifact types are disabled. You would need to re-run this wizard to scaffold from other artifact types. | ||
| JPA Entities | For scaffolding from existing JPA Entities in the current project. The wizard will scan for classes that have the @Entity annotation. | ||
| Java Beans | For scaffolding from existing Java beans in the current project. The wizard will scan for non-annotated Java classes that follow the java bean convention (getters/setters for class attributes and zero arg constructor) | ||
| Spring DSL Domain Objects | For scaffolding from existing Spring DSL Domain Objects. If the current project has been configured with Spring DSL support (using Add Spring Code Generation Capabilities wizard), this wizard will scan for all Spring DSL Domain Objects. | ||

Table 2.11. Scaffold Spring MVC CRUD Application - Select Artifact Type(s) Panel
| Type | Description | ||
|---|---|---|---|
| Database Schema | Scaffold from database schema | ||
| JPA Entities | Scaffold from JPA Entities in current project | ||
| Java Beans | Scaffold from Java Beans in current project | ||
| Spring DSL Domain Objects | Scaffold from Spring DSL Domain Objects in current project | ||
The Select Artifacts for Scaffolding panel is used for selecting the artifacts for scaffolding based on the selected artifact types.

Table 2.12. Scaffold Spring MVC CRUD Application - Select Artifacts for Scaffolding Panel
| Details | Description | ||
|---|---|---|---|
| Matching Artifacts | This is a list of artifacts that are available for scaffolding from. This list was derived by the wizard by scanning the selected project or folder for artifacts that match the specified artifact type(s). | ||
| Select Artifacts | This is the list of selected artifacts for scaffolding. The artifacts are selected by adding them from the Matching Artifacts list. | ||
The Select Primary Key(s) panel is for specifying the fields for any selected Java bean(s) that uniquely identify an instance of the Java bean.

Table 2.13. Scaffold Spring MVC CRUD Application - Select Primary Key(s) Panel
| Details | Description | ||
|---|---|---|---|
| Java Beans | Lists all the Java beans that have been selected for scaffolding and require the specification of primary keys. | ||
| Primary Keys | As each Java bean is selected, the fields of the Java bean will be listed. One or more fields must be specified as the primary key for each bean in the Java beans table. | ||
The Application Layers and Packages panel is used for selecting which layers will be scaffolded and what package name should be used for generated Java/Spring code.
The selections on this panel depend on what you're trying to generate. By default all layers are enabled, and this will result in the generation of a fully implemented Spring MVC application. However you may be interested in only scaffolding a few layers of the application. For example you may already have implemented the JPA and DAO layer by hand or with other tooling, and you would only want to scaffold the web and service layer. Perhaps you are planning to implement your back-end with Spring, but you want to implement the UI layer with Spring Web Flow, Google Web Toolkit (GWT), or Adobe Flex. In that case you would probably only want to scaffold the service, domain and DAO layers.

Table 2.14. Scaffold Spring MVC CRUD Application - Application Layers and Packages Panel
| Details | Description | ||
|---|---|---|---|
| Base Package | The base package name for all scaffolded application layers. The package name for all others layers will be derived from the base package. For each layer a sub-package (web, service, and dao) will be appended to the base package. | ||
| Scaffold web layer artifacts | Selected by default. Specifies whether the web layer will be scaffolded, including Spring controllers (@Controller), Spring components (@Component), JUnit tests, JSP pages, Sitemesh configurations, localization files, and web layer Spring context files. | ||
| Package (web) | The package name for all generated Java source code for the web layer. | ||
| Scaffold service layer artifacts | Selected by default. Specifies whether the service layer will be scaffolded, including including Spring services (@Service), service interfaces, JUnit tests, and service layer Spring context files. | ||
| Package (service) | The package name for all generated Java source code for the service layer. | ||
| Scaffold DAO layer artifacts | Selected by default. Specifies whether the data access object (DAO) layer will be scaffolded, including Spring data access objects (@Repository), JPA named queries (@NamedQueries), JUnit tests, and DAO layer Spring context files. | ||
| Package (dao) | The package name for all generated Java source code for the dao layer. | ||
The Specify Persistence Connection panel is used for configuring the runtime persistence connection of the scaffolded application by selecting a workspace database connection. The selected database connection properties will be used to configure the persistence connection properties for the scaffolded application.

Table 2.15. Scaffold Spring MVC CRUD Application - Specify Persistence Connection Panel
| Details | Description | ||
|---|---|---|---|
| DB Connection | Lists all the current MyEclipse DB connections. Select the connection that should be used to configure the application's runtime persistence connection. | ||
The Select Target Folders panel is for specifying where source code, configuration files and dependent libraries should be installed.

Table 2.16. Scaffold Spring MVC CRUD Application - Select Target FoldersPanel
| Details | Description | ||
|---|---|---|---|
| Source Folder | Specify the destination folder for generated Java code. | ||
| Resources Folder | Specify the destination folder for generated configuration files. | ||
| Web Content Folder | Specify the destination folder for generated web layer resources. | ||
| Use Eclipse classpath containers instead of copying libraries into project | Unselected by default. | ||
| Library Folder | The folder where dependent libraries should be copied. | ||
The Select DB Connection panel is for specifying the database connection for accessing the database tables that should be used for scaffolding.

Table 2.17. Scaffold Spring MVC CRUD Application - Select DB Connection Panel
| Details | Description | ||
|---|---|---|---|
| DB Connection | Lists all the current MyEclipse DB connections. Select the connection for accessing DB tables. | ||
The Select Database Tables panel is for selecting the database tables that should be used for scaffolding.
Select the schema where the desired database tables are located. The dialects will be defaulted based on the data connection properties, but they can be overridden.
Select all the tables, including associated tables, that should be used for scaffolding.

Table 2.18. Scaffold Spring MVC CRUD Application - Select Database Tables Panel
| Details | Description | ||
|---|---|---|---|
| Schema | Used to select the schema that has the tables for scaffolding from. The schema dropdown will list all schemas from the selected database connection. | ||
| Dialect | The Hibernate dialect to use the specified database. This value will be defaulted according to the selected database connection. | ||
| MetaData Dialect | |||
| Tables | The list of tables that were found in the selected schema. This table will be empty until a schema is selected. | ||
| Scaffolding | The list of tables that should be used for scaffolding. One or more tables can be moved from the Tables list to the scaffolding list. | ||
The Database Scaffolding Options panel is for step is for specifying the folder in the project that will contain all the Skyway modeling artifacts.
The following table lists the objects that are going to be generated. When scaffolding associations (one-to-one or one-to-many) the generated application will enable associated objects to be managed as part of a parent object. Please check the objects that should be treated as parent objects. Unchecked objects will be treated as associated objects.
The object name is automatically derived from the table name, but you can override the object name by double-clicking on the name and specifying a new name.

Table 2.19. Scaffold Spring MVC CRUD Application - Select DB Scaffolding Options Panel
| Details | Description | ||
|---|---|---|---|
| Folder to create for models | This is the sub-folder in your project that contains your model information. Default name "model". Enter a new name if desired. | ||
The Summary panel provides a summary of all the actions to be performed by the wizard when the Finish button is clicked.

Table 2.20. Scaffold Spring MVC CRUD Application - Summary Panel
| Details | Description | ||
|---|---|---|---|
| Check box | Select checkbox to use Maven to create projects for generated code. The decision to use Maven can only be made at project creation. If not using Maven, all artifact categories must be generated to the same project. If using Maven, you have the choice to split artifact categories between two or more projects. | ||
| Category | The category for a specific artifact entry. The available categories are: Domain, DAO, Service Layer, Web Layer and Models. | ||
| Project |
The specific Eclipse project that the artifact category should be generated to. During the initial creation of the project, the ${project.name} token can be used to create projects based on the project name. |
||
| Id |
The id used to reference the category from the Code Generation tab. |
||
| Edit | Select an artifact category and click this button to invoke the Code Generation window. Click the Select buttons to pick a new Project and/or Package. | ||
Security is an important part of a web application, and Spring Security provides a set of security services that integrate with Spring-based applications. Spring Security offers a lot of options, but it can be difficult to quickly get a project bootstrapped with Spring Security.
The Scaffold Spring Security wizard will configure the application for Spring Security, which includes:
Spring Security scaffolding:
Creating a JPA entity (User)and a data access object (UserDAO) for storing user credentials. The entity and DAO store basic user data, and they can be further customized as needed.
Creating a JPA entity (Authorities) and data access object (AuthoritiesDAO) for storing authorization data. The entity and DAO store basic user data, and they can be further customized as needed.
Enabling Spring security in the Security Settings section of the Enterprise Configuration tab.
Configuring Secured URLs in the Security Settings section of the Enterprise Configuration tab.
Configuring Secured Services in the Security Settings section of the Enterprise Configuration tab.
Configuring Secured Data Access Objects in the Security Settings section of the Enterprise Configuration tab.
Configuring Security Views in the Security Settings section of the Enterprise Configuration tab, including login, login success, login failure, logout success, and access denied views.
Configuring Security Information Sources in the Security Settings section of the Enterprise Configuration tab, including database configuration with queries for AuthoritiesDAO and UserDAO.
Creating dedicated Spring Security context files: project-security-context.xml, generated-project-security-context.xml
Scaffold Spring Security >> Select Location
Table of Contents
The following sections describe the Project wizards and editors.
The Project Editor is accessed by double-clicking on the Spring DSL node in the project, and it's comprised of the Overview Tab, the Web Application Tab, the Enterprise Configuration Tab, the Spring Configuration Tab, the Category Mapping Tab, and the Code Generation Tab. The follow sections describe each tab in detail.
The Overview tab allows a user to describe the project and link to other tabs in the Project Editor. Refer to the following figure and table for details on this tab.

Table 3.1. Project Editor - Overview Tab
| Details | Description | ||
|---|---|---|---|
| Name | Identifies the name of the Project. Refer to Skyway Naming Conventions for details on special rules and exceptions. | ||
| Description | Provide a meaningful description of the Project. | ||
Use the Category Mapping tab to reconfigure the target projects for each artifact category. Each Spring DSL artifact is associated with an artifact category, and the artifact category can be individually configured to generate to a particular Eclipse project.
The Category Mapping tab is also used to disable automated updates to project dependencies. For a Maven-based project this option will prevent MyEclipse for Spring from automatically updating the Maven pom file (pom.xml). For an Eclipse-based project this option will prevent MyEclipse for Spring from automatically updating your classpath (build path). If disabled, you are responsible from manually maintaining the project classpath.

Table 3.2. Project Editor - Category Mapping Tab
| Details | Description | ||
|---|---|---|---|
| Artifact Categories | Artifact Categories is used to configure the destination projects for artifact categories. | ||
| Category | The category for a specific artifact entry. The available categories are: Domain, DAO, Service Layer, Web Layer and Models. This column is read-only. | ||
| Project |
The specific Eclipse project that the artifact category should be generated to. This setting is originally set by the Add Spring Code Generation Capabilities wizard when specifying the target project for web, service,domain and DAO layers. It can be reconfigured here or by re-running wizard. |
||
| Id |
The id used to reference the category from the Code Generation tab. |
||
| Edit | Select an artifact category and click this button to invoke the Project picker. | ||
The Web Application tab is used to specify the default suffix that's used for operation URLs (for controllers) that are created using the New Operation Wizard.

Table 3.3. Project Editor - Web Application Tab
| Details | Description | ||
|---|---|---|---|
| Default URL Mapping Suffix | The suffix to be appended to the end of new URL mappings. | ||
The Enterprise Configuration tab of the Project Editor allows a user to configure the Spring Security settings for the project.

Table 3.4. Project Editor - Enterprise configuration Tab
| Details | Description | ||
|---|---|---|---|
| Secured URLS | This subsection allows a user to specify urls and set them as secured. | ||
| URL Pattern | Lists the URL patterns added. | ||
| Secured | Click this check box to secure the associated URL. | ||
| Add | Click this button to Add a new URL pattern. | ||
| Remove | Click this button to remove a selected URL from the URL Pattern list. | ||
| Up/Down | Click these buttons to change the order of the selected URL from the URL Pattern list. | ||
| Secured Resources | This subsection allows a user to specify urls and set them as secured. | ||
| Service | Displays the project's services available to secure. | ||
| Secured | Click this check box to secure the associated Service. | ||
| Data Access Object | Displays the project's data access objects available to secure. | ||
| Secured | Click this check box to secure the associated Data Access Object. | ||
| Configured Views | This subsection allows a user to select the views that will handle security functions. | ||
| Login View | Default page: /login.jsp | ||
| Login Failure View | Default page: t/login.jsp?login_error=1 | ||
| Login Success View | Default page: /success.jsp | ||
| Access Denied View | Default page: /accessDenied.jspp | ||
| Security Information Source | This subsection allows a user to configure the security information source as either Database or LDAP. | ||
| Database | Select this radio button to configure database settings. | ||
| LDAP | Select this radio button to configure LDAP settings. | ||
The Spring Configuration tab allows a user to configure the mail server.

Table 3.5. Project Editor - Spring Configuration Tab
| Details | Description | ||
|---|---|---|---|
| Mail Server | Enter the mail server. By default this is not set. When the mail server is specified, a mail sender bean is emitted into service context file. | ||
The Code Generation tab is for configuring various project-level code generation options, including the collection type that should be use for persistent relationships, the templates project that should be used for code generation, and the default code generation options for the generated code.

Persistent Collection Type
Select the type of collection to use for persistent relationships.
Table 3.6. Project Editor - Code Generation Tab - Persistent Collection Type
| Details | Description | ||
|---|---|---|---|
| Ordered Set |
Interface Type: java.util.Set Implementation Type: java.util.LinkedHashSet |
||
| List |
Interface Type: java.util.List Implementation Type: java.util.ArrayList |
||
| Set |
Interface Type: java.util.Set Implementation Type: java.util.HashSet |
||
| Sorted Set |
Interface Type: java.util.SortedSet Implementation Type: java.util.TreeSet |
||
| Custom |
Interface Type: <pick the interface> Implementation Type: <pick an implementation of the interface> |
||
Code Generation
This section configures the default code generation settings for the entire project. From the Project Editor there's an entry for every artifact that is generated using MyEclipse for Spring. The settings can be overridden individually on an artifact by using the artifact's code generation tab, which will only contain entries for the artifacts generated resources.
Table 3.7. Project Editor - Code Generation Tab - Code Generation
| Details | Description | ||
|---|---|---|---|
| Generate | Specifies whether this resource should be generated. By default all resources are generated and regenerated, but you can disable this at the project level by unchecking the checkbox for the resources that should no longer be generated. | ||
| Name | A friendly name for the resource that is represented by the configuration entry. | ||
| Filename | The name of the file that should be generated for the resource. You can reference the artifact name by using the ${model.name} expression in the filename. | ||
| Package | The package name that should be used for the generated resource. This setting only applies to resources that get generated into JAVA classes. You can reference the model package that the artifact was created in by using the ${model.package} expression in the package name, | ||
| Path | The directory where the resource should be generated to. You can reference the category mapping (from the Category Mapping tab) location in the path by using the ${category} expression. You can also reference the model package that the artifact was created in by using the ${model.package} expression in the path. To generate the resource to multiple locations, you can specify multiple paths (comma delimited). | ||
| Category | Specifies the category that the resource is generated into. As you reconfigure the category mappings, you can change the project that the resource gets generated into. | ||
Here's a list of available code generation tokens that can be used for configuring code generation options.
Table 3.8. Code Generation Tokens
| Token | Description | ||
|---|---|---|---|
| ${model.name} | References the name given to the artifact in the Spring DSL. | ||
| ${parent.name] | References the name of the parent artifact for artifacts that have a parent artifact (i.e. Controller/Operation and Service/Operation) | ||
| ${model.package} | References the model package that contains the artifact in the Spring DSL. | ||
| ${category} | References the project path configured for the category (using Category Mapping tab). | ||
Table of Contents
The logic found in a typical web application is associated with either (a) the behaviour of the application or (b) the business logic. While a Controller could technically be used to implement the both the behavior and business logic, the classic MVC pattern prescribes that the controller layer should be focussed on implementing the behaviour of the application, and the service layer focusses on implementing the business logic.
The Spring framework supports the @Service annotation which is a specialized stereotype for service layer components, and the Spring DSL Service artifact supports the creation of Spring services by:
Service
providing a New Service wizard
providing a Service Editor for editing Spring Services (either from the Spring DSL or directly from the Spring @Service class)
generating a Spring Service interface
generating a Spring Service implementation classes (annotated with @Service)
generating a JUnit test classes for service testing
[optional] enablement of the service for Java API for XML Web Services (JAX-WS - SOAP)
[optional] enablement of the service for Direct Web Remoting (Javascript/JSON)
While Services are often used in a Spring MVC application, Services are also applicable to just about any other presentation technology related Spring. If you are using a presentation technology other than Spring MVC (i.e. Spring Web Flow, Struts, GWT, AJAX, or Adobe Flex), they can all use Services for implementing the back-end business logic.
The New Skyway Service wizard is for creating new Spring Services for a development project.
New Skyway Service >> New Service
The New Service window is for specifying the name of the service and the model package that will contain the service.

Table 4.1. New Skyway Service Window
| Details | Description | ||
|---|---|---|---|
| Service Name | Enter the name of the new Service then click the Finish button. | ||
The Service Editor is comprised of the Overview Tab, the Variables Tab, the Spring Bean Configuration Tab, the JAXWS Tab, the DWR Tab, and the Code Generation Tab. The follow sections describe each tab in detail.
The Service Editor can be used for configuring either a Spring DSL Service or Spring service class (@Service). To open a service class, right-click on the service class and select Open With --> Service Editor.
The Overview tab is used for providing a description of the Service, navigating to the files generated from the Service, and navigating to the other Service configuration tabs. Refer to the following figure and table for details on this tab.

Table 4.2. Skyway Service Editor - Overview tab
| Details | Description | ||
|---|---|---|---|
| Name | Identifies the name of the new Service. | ||
| Files | Click the Views link to display the generated source code. | ||
| Description | Provide a meaningful description of the Service. | ||
The Variables tab is used for defining Service variables. Service variables are available to all service operations. Refer to the following figure and table for details on this tab.

Table 4.3. Service Editor - Variables Tab
| Details | Description | ||
|---|---|---|---|
| Name | Identify the variable name. Refer to Skyway Naming Conventions for details on special rules and exceptions. | ||
| Type | Select the data type of the variable. In addition to primitive data types, a variable may have the type of a Domain Object that has been created and defined in Skyway. Click the desired row in the Type column to invoke the Select Type Picker. Select the desired data type and click OK. | ||
| Collection | Identify whether the parameter is a Collection. | ||
| Initial Value | Optional) a variable can be initialized with data by populating this column with the initial value. | ||
The Spring Bean Configuration tab is used to configure the scope and @Transaction annotations for the Service. Refer to the following figure and table for details on this tab.

Table 4.4. Skyway Service Editor - Spring Bean Configuration tab
| Details | Description | ||
|---|---|---|---|
| Enable Transaction | Specified whether the Spring transactional annotation should be emitted in this artifact's generated code | ||
| Read Only | Specifies a read-only transaction. | ||
| Timeout | Specifies how long a transaction may run before timing out. | ||
| Isolation | Specifies the degree of isolation this transaction has from the work of other transactions. | ||
| Propagation | Specifies the transaction propagation. | ||
| Rollback ClassNames | Specifies the exceptions that must cause a rollback. | ||
| No Rollback ClassNames | Specifies the exceptions that must not cause a rollback. | ||
| Scope | The scope for this bean. List of Available Scopes | ||
The Code Generation tab is for configuring the generation options for a Service. This tab shows you all the code artifacts that are generated and managed by the Spring DSL Service. Each entry in this table represents a code artifact that is generated for the Service. In addition to enabling and disabling code generation on an artifact-by-artifact basis, you can also customize the name of the artifact, the package used, and the location where the artifact is generated to.

Code Generation
The code generation settings can be specified at the project level, which will control the code generation settings for the entire project. The code generation settings can also be customized for each Service using the code generation tab from the respective Service.
For a description of the code generation settings available from the Service Editor, please refer the to Code Generation tab of the Project Editor.
The JAXWS Web Service tab is used for configuring the web service options for the Service. By default a Service isn't web service enabled. This tab is for enabling the Service to be published as a Web Service and for configuring the JAX-WS options for the Service and Operations. Refer to the following figure and tables for details on this tab.

When a Spring DSL Service is published as a web service, an endpoint interface is generated and annotated with the JAX-WS @WebService annotation. The following table describes the configuration options for the web service.
Table 4.5. Skyway Service Editor - JAXWS Web Service Tab - Web Service Details
| Details | Description | ||
|---|---|---|---|
| Publish Web Service | determines whether the Spring service will be published as a JAX-WS web service (@WebService) | ||
| Service Name | maps to the serviceName parameter of the @WebService annotation | ||
| Target Namespace | maps to the targetNamespace parameter of the @WebService annotation | ||
| Endpoint Interface | |||
| Port Name | maps to the portName and name parameters of the @WebService annotation | ||
| WSDL Location | the location of the WSDL representing the web service | ||
| Binding Type | |||
| Service Mode | |||
The handler chain and SOAP binding can be configured at the web service level. The @HandlerChain and @SOAPBinding annotations are generated into the endpoint interface.
Table 4.6. Skyway Service Editor - JAXWS Web Service Tab - Web Service - Advanced
| Details | Description | ||
|---|---|---|---|
| Handler Chain | determines whether this service will have a custom handler chain (@HandlerChain) | ||
| Name | the name of the handler chain ; maps to the name parameter of the @HandlerChain annotation | ||
| File | the name of the handler chain configuration file; maps to the file parameter of the @HandlerChain annotation | ||
| SOAP Binding | |||
| Style | maps to the style parameter of the @SOAPBinding annotation | ||
| Parameter Style | maps to the parameterStyle parameter of the @SOAPBinding annotation | ||
| Use | maps to the use parameter of the @SOAPBinding annotation | ||
Unless otherwise excluded, each operation in a Spring DSL Service is published as a web method. The operation in the endpoint interface is generated and annotated with the JAX-WS @WebMethod annotation. The following table describes the configuration options for the web method.
Table 4.7. Skyway Service Editor - JAXWS Web Service Tab - Method Details
| Details | Description | ||
|---|---|---|---|
| Exclude | determines whether the current operation will be excluded from the web service; by default all operations are included in a web service | ||
| Name | maps to the operationName parameter of the @WebMethod annotation; the name is defaulted to the name of the Spring DSL operation artifact | ||
| Action | maps to the action parameter of the @WebMethod annotation | ||
While the SOAP binding can be configured at the web service level, JAX-WS allows the SOAP binding to be customized at the web method level. The custom configurations in the following table will be reflected in the @SOAPBinding annotation generated for the web method. The request (@RequestWrapper) and response (@ResponseWrapper) of the web method can be also configured.
Table 4.8. Skyway Service Editor - JAXWS Web Service Tab - Method Details - Advanced
| Details | Description | ||
|---|---|---|---|
| SOAP Binding | |||
| Style | maps to the style parameter of the @SOAPBinding annotation | ||
| Parameter Style | maps to the parameterStyle parameter of the @SOAPBinding annotation | ||
| Use | maps to the use parameter of the @SOAPBinding annotation | ||
| Request Wrapper | |||
| Local Name | maps to the localName parameter of the @RequestWrapper annotation | ||
| Target Namespace | maps to the targetNamespace parameter of the @RequestWrapper annotation | ||
| Class Name | maps to the className parameter of the @RequestWrapper annotation | ||
| Response Wrapper | |||
| Local Name | maps to the localName parameter of the @RespondWrapper annotation | ||
| Target Namespace | maps to the targetNamespace parameter of the @ResponseWrapper annotation | ||
| Class Name | maps to the className parameter of the @ResponseWrapper annotation | ||
In JAX-WS the input parameters of a web method are configured using the @WebParam annotation. The following table lists the configuration options that will generated for the @WebParam annotation.
Table 4.9. Skyway Service Editor - JAXWS Web Service Tab - Parameter Details
| Details | Description | ||
|---|---|---|---|
| Skyway Input | maps to the style parameter of the @WebParam annotation | ||
| Name | maps to the name parameter of the @WebParam annotation | ||
| Part Name | maps to the partName parameter of the @WebParam annotation | ||
| Target Namespace | maps to the targetNamespace parameter of the @WebParam annotation | ||
| Mode | maps to the mode parameter of the @WebParam annotation | ||
| Header | maps to the header parameter of the @WebParam annotation | ||
The DWR tab is used for configuring the DWR (direct web remoting) options for the Service. By default a Service isn't DWR enabled. This tab is for enabling the Service to be published as a Javascript library (that uses JSON for data transferring) using DWR. Refer to the following figure and table for details on this tab.

The following table describes the configuration options for the DWR service.
Table 4.10. Skyway Service Editor - DWR Tab - DWR Service Details
| Details | Description | ||
|---|---|---|---|
| Publish | determines whether the service will be published as a DWR service | ||
| Javascript Name | the name of the dynamically generated javascript for the service | ||
Unless otherwise excluded, each operation in a Spring DSL Service is published as a javascript function. The following table describes the DWR configuration options for the operations.
Table 4.11. Skyway Service Editor - DWR Tab - DWR Method Details
| Details | Description | ||
|---|---|---|---|
| Exclude | determines whether the current operation will be excluded from DWR; by default all operations are included in a service that is published for DWR. | ||
| Method Name | the name of the dynamically generated javascript methd; the name is defaulted to the name of the Spring DSL operation artifact | ||
DWR will automatically generates some pages that can assist in
developing with DWR. The DWR Service index page
lists all the classes known to DWR. It's usefull for verifying which
Spring DSL services are or are not DWR enabled. The URL for the
accessing the index page is
http://server:port//context/dwr/index.html
Table of Contents
In the context of a Spring MVC application, the controller is responsible for receiving requests from a web client (typically from end-user generated events) and invoking a request handler, which orchestrates all the server logic necessary for processing the request. Spring MVC supports the grouping of request handlers related to an application task into a Controller.
The Spring framework supports the @Controller annotation which is a specialized stereotype for web layer components, and the Spring DSL Controller artifact supports the creation of Spring controllers by:
Controller
providing a New Controller wizard
providing a Controller Editor for editing Spring Controllers (either from the Spring DSL or directly from the Spring @Controller class
generating a Spring Controller implementation classes (annotated with @Controller)
generating a JUnit test classes for controller testing
managing the association of URLs to request handlers
The New Web Controller wizard is for adding a controller to the application.
New Skyway Web Controller >> New Web Controller
The New Web Controller window is for specifying the name of the web controller and the model package that will contain the web controller.

Table 5.1. New Web Controller Window
| Details | Description | ||
|---|---|---|---|
| File Name | Enter the desired file name in the File Name text box and click the Finish button. Refer to Skyway Naming Conventions for details on special rules and exceptions. | ||
The Skyway Web Controller Editor is comprised of the Overview Tab, the Spring MVC Tab, the Variables Tab, the Spring Configuration Tab, and the Code Generation Tab. The follow sections describe each tab in detail.
The Overview tab is used for providing a description of the Controller, navigating to the files generated from the Controller, and navigating to the other Controller configuration tabs. Refer to the following figure and table for details on this tab.

Table 5.2. Web Controller Editor - Overview Tab
| Details | Description | ||
|---|---|---|---|
| Name | Identifies the Web Controller name. | ||
| Files | Click the Views link to display the generated source code. | ||
| Description | Provide a meaningful description of the Web Controller. | ||
| Define URL Mappings | Click this link to jump to the URL Mapping tab. | ||
When Operations are added to a Controller, they are generated as Java methods in the controller. The Spring MVC framework provides a variety of annotations for specifying the behaviour of the Java methods and managing data binding, and the Sprint MVC tab assists in annotating the Java methods and configuring the annotations.
Here's a summary of the Spring MVC annotations:
Table 5.3. Spring MVC Annotations - Description
| Annotation | Description | ||
|---|---|---|---|
| @RequestMapping | Used to map URLs to a controller class or controller method. The @RequestMapping annotation is typically used with a controller method. When a request comes in that matches the specified URL, the respective Java method will be used to handle the request. | ||
| @RequestParam | Used to map a request parameter to an argument of a request handler. The @RequestParm annotation is applied on the method argument of a request handler. This provides the request handler with access to the request parameter. The Spring MVC framework will automatically convert the parameter to the method argument type. | ||
| @ModelAttribute |
The annotation has two purposes: @ModelAttribute
|
||
| @InitBinder | Used to customize the data binding for a controller. The Spring MVC has some default data binding. Both the @RequestParam and @ModelAttribute annotations convert (bind) the data to Java types, but the converters can be customized by an @InitBinder annotated method in the controller. | ||
An example might be helpful for understanding how the Spring MVC annotations are used with annotation-based controllers.
Example 5.1. Spring MVC Annotations - Example
@Scope("singleton")
@Controller("CustomerController")
public class CustomerController {
@RequestMapping(method = { RequestMethod.GET, RequestMethod.POST }, value = "/saveCustomer.html")
public String saveCustomer(@ModelAttribute(value = "customer") Customer customer
) {
//
}
@RequestMapping(method = { RequestMethod.GET, RequestMethod.POST }, value = "/selectCustomer.html")
public ModelAndView selectCustomer(@RequestParam(required = true, value = "customernumberKey")
Integer customernumberKey
) {
//
}
@InitBinder
public void initBinder(WebDataBinder binder, HttpServletRequest request)
{ // Register static property editors.
binder.registerCustomEditor(java.util.Calendar.class, new org.execution.databinding.CustomCalendarEditor());
}
@ModelAttribute(value = "cities")
public Set<Cities> getCities() {
//
}
}
| The @RequestMapping annotation specifies that saveCustomer() method should handle URL requests for "/saveCustomer.html". | |
| The @ModelAttribute annotation specifies that customer form data (command object) should be bound to the customer method parameter. The saveCustomer() method will have access to the form data by using the command method parameter. | |
| The @RequestParam annotation specifies that the request parameter "customernumberKey should be converted to an Integer and bound to the customernumberKey variable. | |
| The @InitBinder annotation specifies the method that should be used by the Spring MVC framework to register any custom data binding converters for the controller. | |
| The @ModelAttribute annotation specifies that the getCities() method should be run prior to any request handler in the controller. Any class variables set by this method will be available to the request handlers. The method output will be also available as model data in any views (JSP) under the specified key ("cities"). |
The Spring MVC panel helps configure the Spring MVC annotations for the methods and method parameters in a controller. When clicking on the controller, the controller properties will be displayed for editting. When explanding the controller and clicking on an operation, the operation properties will be displayed for editting.

Table 5.4. Web Controller Editor - Spring MVC Tab (Controller)
| Parameter | Description | |
|---|---|---|
| Controller / Methods |
This table shows the controller and it's associated methods. Clicking on the controller will display the annotation configuration panel for the controller. Clicking on a controller method will display the annotation configuration panel for the controller method. |
|
| Request Mapping | Configures the controller to handle requests for the given URL. Furthermore you can configure the request mapping for GET, POST, OPTIONS, PUT and DELETE. | |
| Operation Request Mappings |
[READ ONLY] This table shows all the operations that are configured as request mappings. It shows the operation name and configured URL. The Launch link enables the immediate launch of the specified URL in the default Eclipse browser. |
|

Table 5.5. Web Controller Editor - Spring MVC Tab (Operation)
| Parameter | Description | |
|---|---|---|
| Operation Details |
Enables the configuration of the operation as either a request handler (@RequestMapping), model attribute (@ModelAttribute) or init binder (@InitBinder). A given operation can only be either a request handler, model attribute or init binder method. |
|
| Request Mapping |
Configures the operation to handle requests for the given URL. Furthermore you can configure the request mapping for GET, POST, OPTIONS, PUT and DELETE. The request mapping table will show all operation parameters and enables the configuration of each parameter. The Mapped As column is for configuring whether the parameter is a Model Attribute, Request Parameter, or Unmapped. The Mapped Name can be configured. The Required column is for specifying whether the parameter is required. For new operations the mapped name is defaulted to the parameter name, and the Mapped As is determined by the parameter type. All parameters are considered to be required. |
|
| Model Attribute |
Configures the operation to be a model attribute using the given name. |
|
| InitBinder |
Configures the operation to be an Init Binder. Optionally you can specify a list of form parameters that should use the specific init binder. |
|
The Variables tab is used for defining Controller variables. Controller variables are available to all controller operations. Refer to the following figure and table for details on this tab.

Table 5.6. Web Controller Editor - Variables Tab
| Details | Description | ||
|---|---|---|---|
| Name | Identify the variable name. Refer to Skyway Naming Conventions for details on special rules and exceptions. | ||
| Type | Select the data type of the variable. In addition to primitive data types, a variable may have the type of a Data Type that has been created and defined in Skyway. Click the desired row in the Type column to invoke the Select Type Picker. Select the desired data type and click OK. | ||
| Collection | Identify whether the variable is a Collection. | ||
| Initial Value | (Optional) a variable can be initialized with data by populating this column with the initial value. | ||
| On Request |
Identify whether the variable should be annotated with the Spring @ModelAttribute.
|
||
The Spring Bean Configuration tab is used to configure the scope and @Transaction annotations for the Controller. Refer to the following figure and table for details on this tab.

Table 5.7. Web Controller Editor - Spring Bean Configuration Tab
| Details | Description | ||
|---|---|---|---|
| Enable Transaction | Specified whether the Spring transactional annotation should be emitted in this artifact's generated code | ||
| Read Only | Specifies a read-only transaction. | ||
| Timeout | Specifies how long a transaction may run before timing out. | ||
| Isolation | Specifies the degree of isolation this transaction has from the work of other transactions. | ||
| Propagation | Specifies the transaction propagation. | ||
| Rollback ClassNames | Specifies the exceptions that must cause a rollback. | ||
| No Rollback ClassNames | Specifies the exceptions that must not cause a rollback. | ||
| Scope | The scope for this bean. List of Available Scopes | ||
The Code Generation tab is for configuring the generation options for a Controller. This tab shows you all the code artifacts that are generated and managed by the Spring DSL Controller. Each entry in this table represents a code artifact that is generated for the Controller. In addition to enabling and disabling code generation on an artifact-by-artifact basis, you can also customize the name of the artifact, the package used, and the location where the artifact is generated to.

Code Generation
The code generation settings can be specified at the project level, which will control the code generation settings for the entire project. The code generation settings can also be customized for each artifact using the code generation tab from the respective editor for the artifact.
For a description of the code generation settings available from the Service Editor, please refer the to Code Generation tab of the Project Editor.
Table of Contents
A Component is general purpose java class, and the Spring framework supports the @Component annotation for identifying and managing these generic java beans. A component isn't tied to any particular tier of an application, and it can be used for many different purposes, including the definition of data transfer objects, form backing objects and aggregating application logic that needs to be accessible to Spring Web Flow applications. The Spring DSL Component artifact supports the creation of Spring components by:
Service
providing a New Component wizard
providing a Component Editor for editing Spring Controllers (either from the Spring DSL or directly from the Spring @Component class)
generating a Spring Component implementation classes (annotated with @Component)
generating a JUnit test classes for component testing
The New Component wizard is for adding a component to a project.
New Skyway Component >> New Component
The New Component window is for specifying the name of the component and the model package that will contain the component.

Table 6.1. New Component Window
| Details | Description | ||
|---|---|---|---|
| Component Name | Enter the desired name for the Component then click the Finish button. | ||
The Component Editor is comprised of the Overview Tab, the Variables Tab, the Code Generation Tab, and the Spring Bean Configuration tab. The follow sections describe each tab in detail.
The Overview tab is used for providing a description of the Component, navigating to the files generated from the Component, and navigating to the other Component configuration tabs. Refer to the following figure and table for details on this tab.

Table 6.2. Component Editor - Overview Tab
| Details | Description | ||
|---|---|---|---|
| Name | Identifies the name of the Component. | ||
| Files | Click the Views link to display the generated source code. | ||
| Description | Provide a meaningful description of the Component. | ||
| Define Variables | click this link to jump to the Variables tab. | ||
| Define Constants | click this link to jump to the Constants tab. | ||
| Scope | Define the scope of the model. Valid options are Session or Request. | ||
The Variables tab is used for defining Component variables. Component variables are available to all component operations. Refer to the following figure and table for details on this tab.

Table 6.3. Component Editor - Variable Tab
| Details | Description | ||
|---|---|---|---|
| Name | Identify the variable name. | ||
| Type | Select the data type of the variable. In addition to primitive data types, a variable may have the type of a Domain Object that has been created and defined in Skyway. Click the desired row in the Type column to invoke the Select Type picker. Select the desired data type and click OK | ||
| Initial Value | (Optional) a variable can be initialized with data by populating this column with the initial value. | ||
The Code Generation tab is for configuring the generation options for a Component. This tab shows you all the code artifacts that are generated and managed by the Spring DSL Component. Each entry in this table represents a code artifact that is generated for the Component. In addition to enabling and disabling code generation on an artifact-by-artifact basis, you can also customize the name of the artifact, the package used, and the location where the artifact is generated to.

Code Generation
The code generation settings can be specified at the project level, which will control the code generation settings for the entire project. The code generation settings can also be customized for each artifact using the code generation tab from the respective editor for the artifact.
For a description of the code generation settings available from the Service Editor, please refer the to Code Generation tab of the Project Editor.
The Spring Bean Configuration tab is used to configure the scope and @Transaction annotations for the Component. Refer to the following figure and table for details on this tab.

Table 6.4. Web Controller Editor - Spring Bean Configuration Tab
| Details | Description | ||
|---|---|---|---|
| Enable Transaction | Specified whether the Spring transactional annotation should be emitted in this artifact's generated code | ||
| Read Only | Specifies a read-only transaction. | ||
| Timeout | Specifies how long a transaction may run before timing out. | ||
| Isolation | Specifies the degree of isolation this transaction has from the work of other transactions. | ||
| Propagation | Specifies the transaction propagation. | ||
| Rollback ClassNames | Specifies the exceptions that must cause a rollback. | ||
| No Rollback ClassNames | Specifies the exceptions that must not cause a rollback. | ||
| Scope | The scope for this bean. List of Available Scopes | ||
Table of Contents
An Operation is a Spring DSL artifact that defines methods for Services, Controllers and Components. Operations are visual representations of Java methods, and they are shown as children artifacts to the respective Service, Controller or Component in the Spring DSL explorer. Operations use inputs and outputs for exchanging data, and they are generated as methods directly into the respective class.
The following sections describe the Operation wizards and editors.
The New Operation wizard is for adding a new operation to either a controller or service.
New Skyway Operation >> New Operation >> Operation Options
The New Operation window is for specifying the name of the operation and the controller, component or service that will contain the operation.

Table 7.1. New Skyway Operation Window
| Details | Description | ||
|---|---|---|---|
| Operation Name | Enter the name of the new Operation then click the Finish button. | ||
| Description | Enter a meaningful description for this Operation then click the Finish button. | ||
If you are using model-driven development to implement your operations, then an action can automatically be created. If you aren't using MDD, then you should disable this option.

Table 7.2. Operation Options Window
| Details | Description | ||
|---|---|---|---|
| Create a URL Mapping | For Controller Operations Only: Enable this checkbox to create a URL Mapping for this operation. URL Mappings can also be added at a later time. | ||
| URL | For Controller Operations Only: When "Create a URL Mapping" is enabled, the URL is for specifying the URL for the URL Mapping. A default URL mapping is derived from the controller name and operation name, but the URL is completely configurable by the developer. | ||
| Create an "entry point" action | Enable this checkbox to create an entry point Action for this operation. Actions are used to use Skyway's drag-n-drop modeling to implement the logic of the operation. An operation can have multiple actions, but only one Action can be the entry point action. The entry point action can be configured at a later time. | ||
| Action name | When "Create a entry point action" is enabled, the Action name is for specifying the name. The name is default to "Default Action" which can be overridden in the Skyway section of Eclipse preferences. | ||
The Skyway Operation Editor is comprised of the Overview Tab, the Input/Outputs Tab, the Spring Bean Configuration Tab, and the Code Generation Tab. The follow sections describe each tab in detail.
The Overview tab is used for providing a description of the Operation, navigating to the files generated from the Operation, navigating to the other configuration tabs, and defining operation exceptions. Refer to the following figure and table for details on this tab.

Table 7.3. Operation Editor - Overview Tab
| Details | Description | ||
|---|---|---|---|
| Name | Identifies the name of the new Operation. | ||
| Files | Click the Views link to display the generated source code. | ||
| Description | Enter a meaningful description for this Operation. | ||
| Define Inputs and Outputs | Click this link to jump to the Inputs/Outputs tab. | ||
| Define Variables | Click this link to jump to the Variables tab. | ||
| Define Constants | Click this link to jump to the Constants tab. | ||
| Entry Point | Click this link to open the editor for the selected action, or enter the path/name of the action directly into the textbox. | ||
| Select... | Click this button to open the Action Selector and select the desired action from the list of available actions associated with this operation. | ||
| Exceptions | In the Exception tab, the user can configure Exceptions thrown by the Operation. The configured exceptions will be available to Catch Steps of calling processes. If any exception occurs and it's not listed in the operation interface, the exception will be ignored. The user may define any of the following exception types: Any Exception from any Project on their Designer desktop, All Skyway Step Exceptions, Skyway Step Exceptions listed individually, Non Custom Exceptions | ||
The Inputs/Outputs tab defines the input and output parameters of a particular operation. When this operation is invoked, the consumer (client) or the operation is required to map variables to the input and output parameters. Refer to the following figure and table for details on this tab.

Table 7.4. Operation Editor - Inputs/Outputs Tab
| Details | Description | ||
|---|---|---|---|
| Inputs | Define the Inputs to this Operation. | ||
| Name | Identify the input parameter name. | ||
| Type | Select the data type of the parameter. In addition to primitive data types, an input parameter may have the type of a Domain Object that has been created and defined in Skyway. To select a Domain Object as the variable type, choose the Domain Object option from the Type drop-down menu. Select the desired data type from the data type picker and click OK. | ||
| Collection | Identify whether the parameter is a Collection | ||
| Add | Click this button to add an input variable. The default is Input_1, incrementing as additional variables are added until they are renamed. | ||
| Outputs | Define the Outputs to this Operation. | ||
| Name | Identify the input parameter name. | ||
| Type | Displays the data type of the input variable selected in the Assignment column. | ||
| Assignment | Select the Operation variable to assign to the output variable. Any variable from the variable list on the Variables sub-tab may be mapped to an output variable. | ||
| Add | Click this button to add an output variable. The default is Output_1, incrementing as additional variables are added until they are renamed. | ||
The Spring Bean Configuration tab is used to configure the scope and @Transaction annotations for the Operation. Refer to the following figure and table for details on this tab.

Table 7.5. Operation Editor - Spring Bean Configuration Tab
| Details | Description | ||
|---|---|---|---|
| Enable Transaction | Specified whether the Spring transactional annotation should be emitted in this artifact's generated code | ||
| Read Only | Specifies a read-only transaction. | ||
| Timeout | Specifies how long a transaction may run before timing out. | ||
| Isolation | Specifies the degree of isolation this transaction has from the work of other transactions. | ||
| Propagation | Specifies the transaction propagation. | ||
| Rollback ClassNames | Specifies the exceptions that must cause a rollback. | ||
| No Rollback ClassNames | Specifies the exceptions that must not cause a rollback. | ||
The Code Generation tab is for configuring the generation options for an Operation. The implementation of an operation will be generated into the respective controller, component or service. However this tab shows any additional code artifacts that are generated and managed by the Spring DSL Operation. Each entry in this table represents a code artifact that is generated for the Operation. In addition to enabling and disabling code generation on an artifact-by-artifact basis, you can also customize the name of the artifact, the package used, and the location where the artifact is generated to.

Code Generation
The code generation settings can be specified at the project level, which will control the code generation settings for the entire project. The code generation settings can also be customized for each artifact using the code generation tab from the respective editor for the artifact.
For a description of the code generation settings available from the Service Editor, please refer the to Code Generation tab of the Project Editor.
Table of Contents
There are many alternatives to Spring MVC for building the front-end of an application, including Spring Web Flow, GWT, and Adobe Flex. This chapter will focus on the Spring Web Flow accelerators. Spring Web Flow is a project from Spring for simplifying the development of web applications. While Spring Web Flow is compatible with Spring MVC, Spring Web Flow uses flows instead of controllers for implementing the web layer of an application. Since Spring Web Flow has functionality for managing application state, it is best suited for implementing the functionality where the activity being performed by the end-user spans multiple page requests, all the pages need to be treated as a unit of work.
With Spring Web Flow the group of related steps to accomplish a task are referred to as a Flow. While this functionality can be implemented with Spring MVC, Spring Web Flow has features that make it considerably easier. However in order to gain the benefits of Spring Web Flow, a developer needs to have a pretty in-depth knowledge of Spring and Spring Web Flow, and Spring Web Flow adds additional configuration requirements to your web application. While authoring the flow of an application using XML is elegant, implementing flows using XML can be difficult and tedious because it’s hard to visualize the application flow from the xml.
MyEclipse for Spring reduces the complexity of adding Spring Web Flow support by automatically bootstrapping the project for you. The moment you add the first flow to your project, MyEclipse for Spring will add the necessary Spring configuration and libraries. That by itself is a significant time saver, but MyEclipse for Spring goes one step further in regards to Spring Web Flow. In addition to configuring your application, MyEclipse for Spring also provides a custom Spring Web Flow editor for authoring flows. You start with an empty canvas which represents a single flow, and you drop different web flow states (i.e. view, decision, action, subflow and stop) onto the canvas. State transitions are defined by drawing lines between the states and specifying the event associated with the transition. Actions can be added to flows and states.
Flows are a group of related steps for accomplishing a task in an application. Some of the benefits of using Spring Web Flow are
XML-based flow definitions - The flow of the application is defined in XML. No custom Java is needed to implement a flow
Expression language support - An expression language let’s you leverage logic from the other layers of the web application. Logic that a developer would typically put into a controller, that isn’t handled by Spring Web Flow, can beexpressed in XML using the expression language
State management - Variables can be scoped (many scopes are supported), and Spring Web Flow will automatically handle the cleanup of those variables when they are out-of-scope.
Modularization of flow logic - Flows can be re-used from other flows.
A Flow is responsible for orchestrating the task (steps) and supporting the user events associated with the task. Instead of the MVC-based approach of creating a controller and multiple operations for implementing a conversation, with Spring Web Flow you define a flow with states and expressions. Instead of the MVC-based approach of defining URL mappings, with Spring Web Flow you define events. Spring Web Flow also let's you easily separate your logic for handling a user event (on event id) from the pre-load logic (on entry) for a particular state.
The following sections describe the Web Flow wizards and editors.
The New Web Flow wizard is for adding a new Spring flow to the project.
New Web Flow >> New Web Flow >> Web Flow Domain
The New Web Flow window is for specifying the name of the flow and the model package that will contain the flow.

Table 8.1. New Web Flow Window
| Details | Description | ||
|---|---|---|---|
| File Name | Enter the desired file name in the File Name text box and click the Finish button. Refer to Skyway Naming Conventions for details on special rules and exceptions. | ||
Table of Contents
An application typically consists of a distinct set of inter-related application objects (domain objects) that embody the functionality and characteristics of the system being built. All of the application objects are cumulatively referred to as the domain model. A development effort usually begins with analysis of the problem domain, and domain modeling is frequently the first step in designing an application. Domain modeling is the analysis of data objects that are used in a business, analysis of the attributes of those objects, and the identification of the relationships between these data objects.
The domain model is defined by creating custom domain objects that encompass the attributes of the domain objects and relating the domain objects to each other.
The following sections describe the Domain Object wizards and editors.
The New Domain Object wizard is for creating new domain objects for a development project.
New Domain Object >> Domain Object
The New Domain Object window is for specifying the name of the domain object and the model package that will contain the domain object.

Table 9.1. New Domain Object Window
| Details | Description | ||
|---|---|---|---|
| Domain Object Name | Enter the name of the new Domain Object then click the Finish button. The Domain Object Editor is displayed. | ||
The Skyway Domain Object Editor is comprised of the Overview Tab, the Persistance Mapping Tab, and the Code Generation Tab. The follow sections describe each tab in detail.
The Service Editor can be used for configuring a Service in the Spring DSL or by right-clicking (Open-With) an @Service annotated java class.
The Overview tab is used for configuring the domain object fields, managing relationships and providing a description. Refer to the following figure and table for details on this tab.

This editor allows a user to describe the domain object, set relationships between other domain objects, and create and edit fields in the domian object. Refer to the following figure and table for details on this tab.
Table 9.2. Domain Object Editor - Overview Tab
| Details | Description | ||
|---|---|---|---|
| Name | Identifies the name of the new Domain Object. | ||
| Files | Click the Views link to display the generated source code. | ||
| Description | Enter a meaningful description for this Domain Object. | ||
| Relationships | Create and manage relationships between this and other Domain Objects by defining the Type, Name and Inverse Name. Click the Add button to add a Domain Object. | ||
| Fields | Create and edit fields in this domain object by defining Display Name, Type, and if whether it's a Collection. Click the Add button to add a field to this Domain Object. | ||
The domain object editor allows you to define relationships to a domain object.
Relationship Type
The Relationship Type defines the cardinality of the relationship from the perspective of the current Domain Object. The options are:
Table 9.3. Relationship Types
| Type | Description | ||
|---|---|---|---|
| One-to-One | a domain object is related to a single occurrence of the other domain object | ||
| One-to-Many | a domain object is related to many occurrences of the other domain object; the opposite side of a Many-to-One relationship | ||
| Many-to-One | a domain object is related to a single occurrence of the other domain object; the opposite side of a One-to-Many relationship | ||
| Many-to-Many | a domain object is related to many occurrences of the other domain object, and vice versa | ||
Bidirectional Relationships
When a relationship is added to another domain object, a unidirectional relationship is implied. Two independent unidirectional relationships can be linked together to create a bidirectional relationship. If you decide to define a bidirectional relationship, the cardinality and relationship names need to match.
Relationships Names
When defining a relationship between two data objects, the Domain Object editor will prompt you for a relationship name and a reverse name. These names will be used for accessing each other's related data. The relationship name is used to identify the relationship from the perspective of the current domain object. The reverse name is used to identify the relationship from the target data object type back to the current domain object.
Regarding relationship names, the Domain Object editor will default the domain object name as the relationship names, but you can very easily changed the name. It's a good idea to change these relationship names to something more semantically meaningful. While they have no impact on the functionality, these names will be the what you will see as your referencing these relationships in the services you create. These names should be meaningful, and it's recommended that you name them with the appropriate plurality for the relationship type.
The Persistence Mapping tab is used to control how the Domain Object will map into persistence in a database and how it will display throughout the rest of the project. This tab includes the Table and Field Mapping and Relationships sections. The Persistence Mapping tab will let you override the default table name and field names. Refer to the following figure and table for details on this tab.

Table 9.4. Domain Object Editor - Persistence Mapping Tab
| Details | Description | ||
|---|---|---|---|
| Table Name | Pre-populated with the name of the Domain Object by default. This name can be modified. | ||
| Schema | |||
| Catalog | |||
| Column Name | The name of the database column that this Field will be stored in. If left blank, the name of the Field will be used. This name is "suggested" as a user can override it during deployment. | ||
| Length | Length of text field. Defautl is 512 characters. | ||
| Precision | |||
| Scale | |||
| Fetch | Pull-down menu. Select the desired value of either Lazy, Eager, Unset. | ||
| Option | Select the desired column option. Valid values are: Insertable, Updateable, Nullable, and Unique. | ||
When a domain object in configured to be persisted to a database, the database name and fields will be derived from the domain object. However there are occasions where a developer may want the table names and field names to be different than the object. When a domain object is created, MyEclipse for Spring will use the following peristence mapping defaults:
Table name = domain object name
Table field names = domain object field names
This settings can be modified from this panel panel. The settings in this panel will drive the configuration of the ORM framework.
The Code Generation tab is for configuring the generation options for a Domain Object. This tab shows you all the code artifacts that are generated and managed by the Domain Oject. Each entry in this table represents a code artifact that is generated for the Domain Object. In addition to enabling and disabling code generation on an artifact-by-artifact basis, you can also customize the name of the artifact, the package used, and the location where the artifact is generated to.

Code Generation
The code generation settings can be specified at the project level, which will control the code generation settings for the entire project. The code generation settings can also be customized for each artifact using the code generation tab from the respective editor for the artifact.
For a description of the code generation settings available from the Service Editor, please refer the to Code Generation tab of the Project Editor.
Table of Contents
Data Access Objects (DAO) is a pattern for separating data access logic from business logic. Data Access Objects are abstract representations of real databases (or persistence mechanisms), and they manage persistence for a set of JPA Entities (domain objects). When writing code to read, write, delete and update persisted data objects, with DAO there is no need to know the details of the database (vendor, version, IP, etc.).
The following sections describe the Data Access Object wizards and editors.
The New Data Access Object wizard is for creating new data access objects for a development project.
New Data Access Object >> Data Access Object >> Add Domain Objects
The New Data Access window is for specifying the name of the data access object and the model package that will contain the data access object.

Table 10.1. New Data Access Object Window
| Details | Description | ||
|---|---|---|---|
| File Name | Enter the name of the new Data Access Object in the File Name text box then click the Next button to add a Domain Object. Data Access Objects can have duplicate names as long as they are stored in separate Services or in separate folders within a service. | ||
The Data Access Object Editor is comprised of the Overview Tab, the Database Configuration Tab, the Spring Bean Configuration Tab, and the Code Generation Tab. The follow sections describe each tab in detail.
The Overview tab is used for associating domain objects to the DAO, providing a description of the DAO, and navigating to the files generated from the DAO. Refer to the following figure and table for details on this tab.

Table 10.3. Data Access Object Editor - Overview Tab
| Details | Description | ||
|---|---|---|---|
| Name | Identifies the name of the new Data Access Object. | ||
| Files | Click the Views link to display the generated source code. | ||
| Description | Enter a meaningful description for this Data Access Object. | ||
| Domain Objects | Select and add Domain Objects to be managed by this Data Access Object. | ||
The Spring Bean Configuration tab is used to configure the scope and @Transaction annotations for the Data Access Object. Refer to the following figure and table for details on this tab.

Table 10.4. Data Access object Editor - Database Configuration Tab
| Details | Description | ||
|---|---|---|---|
| Enable Transaction | Specified whether the Spring transactional annotation should be emitted in this artifact's generated code | ||
| Read Only | Specifies a read-only transaction. | ||
| Timeout | Specifies how long a transaction may run before timing out. | ||
| Isolation | Specifies the degree of isolation this transaction has from the work of other transactions. | ||
| Propagation | Specifies the transaction propagation. | ||
| Rollback ClassNames | Specifies the exceptions that must cause a rollback. | ||
| No Rollback ClassNames | Specifies the exceptions that must not cause a rollback. | ||
| Scope | The scope for this bean. List of Available Scopes | ||
The Database Configuration tab allows a user to select a database for this Data Access Object. Refer to the following figure and table for details on this tab.

Table 10.5. Data Access Object Editor - Database Configuration Tab
| Details | Description | ||
|---|---|---|---|
| Connection | Select a database connection from the list of available databases in the drop-down menu. | ||
| Create New Connection | Click this link to invoke the New Connection Profile window. See the To Create a New Connection section for details on configuring a new connection. After creating a new connection it will become available in the Connection drop-down list. | ||
| Enable Persistance Provider SQL Logging | Select this checkbox to enable SQL Logging capability. | ||
| Allow Persistence Provider to create/update tables | Select this checkbox to allow the designated persistence provider to create/update tables to the database. | ||
| Minimum Connection Pool Size | Default value is 1. | ||
| Maximum Connection Pool Size | Default value is 10. | ||
| Enable XA Data Source | Select this checkbox to specify an XA Data Source. | ||
| XA Data Source Class Name | Enter the Data Source class name. | ||
| Import Types | Click this link to import domain objects from the database. Once the domain objects are discovered, they can be used just like domain objects created in Skyway. | ||
The Code Generation tab is for configuring the generation options for a Data Access Object. This tab shows you all the code artifacts that are generated and managed by the Spring DSL DAO. Each entry in this table represents a code artifact that is generated for the DAO. In addition to enabling and disabling code generation on an artifact-by-artifact basis, you can also customize the name of the artifact, the package used, and the location where the artifact is generated to.

Code Generation
The code generation settings can be specified at the project level, which will control the code generation settings for the entire project. The code generation settings can also be customized for each artifact using the code generation tab from the respective editor for the artifact.
For a description of the code generation settings available from the Service Editor, please refer the to Code Generation tab of the Project Editor.
Table of Contents
The following sections describe the Named Query wizards and editors.
The New Named Query wizard is for adding a new named query to a data access object.
New Named Query >> Named Query
The New Named Query window is for specifying the name of the named query and the data access object that will contain the named query.

Table 11.1. New Named Query Window
| Details | Description | ||
|---|---|---|---|
| Named Query Name | Enter the name of the new Named Query then click the Finish button to display the Named Query Editor. | ||
The Skyway Named Query Editor is comprised of the Overview Tab, the Input/Outputs Tab, the Query Text Tab, the Spring Bean Configuration Tab, and the Code Generation Tab. The follow sections describe each tab in detail.
The Overview tab is used for providing a description of the named query, navigating to the files generated from the named query, and navigating to the other Named Query configuration tabs. Refer to the following figure and table for details on this tab.

Table 11.2. Named Query Editor - Overview Tab
| Details | Description | ||
|---|---|---|---|
| Name | Identifies the name of the new Named Query. | ||
| Files | Click the Views link to display the generated source code. | ||
| Description | Enter a meaningful description for this Named Query. | ||
| Define Inputs and Outputs | Click this link to jump to the Inputs/Outputs tab. | ||
| Define the Query Text | Click this link to jump to the Query Text tab. | ||
The Inputs/Outputs tab defines the input and output parameters of a particular named query. When this query is invoked, the consumer of the name query is required to map variables to the input and output parameters. Refer to the following figure and table for details on this tab.

Table 11.3. Named Query - Inputs/Outputs tab
| Details | Description | ||
|---|---|---|---|
| Inputs | Inputs are a mechanism for exchanging data with the consumer of the named query. When a consumer calls a named query, they must provide all the input variables defined by the query. | ||
| Name | Identify the input parameter name. | ||
| Type | Select the data type of the parameter. In addition to primitive data types, an input parameter may have the type of a Domain Object that has been created and defined in Skyway. To select a Domain Object as the variable type, choose the Domain Object option from the Type drop-down menu. Select the desired data type from the data type picker and click OK. | ||
| Collection | Identify whether the parameter is a Collection. | ||
| Add | Click this button to add an input variable. The default is Input_1, incrementing as additional variables are added until they are renamed. | ||
| Outputs | Outputs are another mechanism for exchanging data with the consumer of the named query. When a consumer calls a named query, they must accept all the output variables defined by the named query. | ||
| Name | Identify the output parameter name. | ||
| Type | Select the data type of the parameter. In addition to primitive data types, an output parameter may have the type of a Domain Object that has been created and defined in Skyway. To select a Domain Object as the variable type, choose the Domain Object option from the Type drop-down menu. Select the desired data type from the data type picker and click OK. | ||
| Collection | Identify whether the parameter is a Collection. | ||
| Add | Click this button to add an output variable. The default is Output_1, incrementing as additional variables are added until they are renamed. | ||
The Query Text tab defines the query in either SQL or JPQL.Refer to the following figure and table for details on this tab.

Table 11.4. Named Query - Query Text tab
| Details | Description | ||
|---|---|---|---|
| Query Type |
Specifies the query language will be used in the named query. The options are:
|
||
| Query Text | Define the Query text to execute. | ||
| Insert | Click this button to invoke a Variable picker and select the input or output variable to include in the expression. | ||
| Edit Expression | Click this button to invoke the Expression Editor and build a valid expression. Click the OK button. | ||
The Spring Bean Configuration tab is used to configure the scope and @Transaction annotations for the Named Query. Refer to the following figure and table for details on this tab.

Table 11.5. Named Query - Spring Bean Configuration tab
| Details | Description | ||
|---|---|---|---|
| Enable Transaction | Specified whether the Spring transactional annotation should be emitted in this artifact's generated code | ||
| Read Only | Specifies a read-only transaction. | ||
| Timeout | Specifies how long a transaction may run before timing out. | ||
| Isolation | Specifies the degree of isolation this transaction has from the work of other transactions. | ||
| Propagation | Specifies the transaction propagation. | ||
| Rollback ClassNames | Specifies the exceptions that must cause a rollback. | ||
| No Rollback ClassNames | Specifies the exceptions that must not cause a rollback. | ||
Table of Contents
The following sections describe the Exception wizards and editors.
The New Exception wizard is for adding a custom exception to a project.
New Skyway Exception >> New Exception
The New Exception window is for specifying the name of the exception and the model package that will contain the exception.

Table 12.1. New Exception Window
| Details | Description | ||
|---|---|---|---|
| Exception Name | Enter the desired name for the Exception then click the Finish button. | ||
The Skyway Exception Editor is comprised of the Overview Tab and the Code Generation Tab. The follow sections describe each tab in detail.
The Overview tab is used for providing a description of the Exception, navigating to the files generated from the Exception, and navigating to the other Exception configuration tabs. Refer to the following figure and table for details on this tab.

Table 12.2. Exception Editor - Overview Tab
| Details | Description | ||
|---|---|---|---|
| Files | Click the Views link to display the generated source code. | ||
| Description | Provide a meaningful description of the Exception. | ||
The Code Generation tab is for configuring the generation options for an Exception. This tab shows you all the code artifacts that are generated and managed by the Spring DSL Exception. Each entry in this table represents a code artifact that is generated for the Exception. In addition to enabling and disabling code generation on an artifact-by-artifact basis, you can also customize the name of the artifact, the package used, and the location where the artifact is generated to.

Code Generation
The code generation settings can be specified at the project level, which will control the code generation settings for the entire project. The code generation settings can also be customized for each artifact using the code generation tab from the respective editor for the artifact.
For a description of the code generation settings available from the Service Editor, please refer the to Code Generation tab of the Project Editor.
Table of Contents
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.
In Java application development it is common to use packages for organizing and namespacing Java resources according to their functionality, and Model Packages serve the same purpose, except that they group generated artifacts.
The New Model Package wizard is for adding a new package to a project.
New Web Flow >> New Model Package
Table of Contents
The following sections describes the addition project properties that are contributed by the Add Spring Code Generation Capabilities wizard.
This panel is for configuring the Spring Code Generation properties of the current project.

Table 14.1. Spring Code Generation Properties
| Details | Description | ||
|---|---|---|---|
| Skyway Code Generator | Enables the code generation builder to automatically generate code when relevant artifacts are updated. Code generation can always be manually invoked (right-click-->Generate), but this builder will automatically observe changes to artifacts and generate code. | ||
| Skyway Code Synchronization | Enables the code synchronization builder to automatically synchronize the code generation model (metadata) from changes to the code Java source files. Code synchronization can always be manually invoked (right-click-->Update Models from Source), but this builder will observe changes to Java code and automatically update the model. | ||
| Show the DSL in Project Explorer | Enables a Spring DSL view of the current project. The Spring DSL node will be added to the project, and the Spring code generation metadata can be viewed and editted using the Spring DSL. | ||
Table of Contents
The following sections describe the Model Package wizards.
This panel controls the code generation preferences of the current Eclipse workspace.

This panel controls the deployment preferences of the current Eclipse workspace.

This panel controls the modeling preferences of the current Eclipse workspace.
