E
Date: March 6, 2017
WIPO Suite
CRUD TECHNICAL DETAILED SPECIFICATIONS
REVISION HISTORY
Revision |
Date |
Comments |
Author |
1.0 |
08/02/2017 |
Initial document |
Christophe Jacques |
|
|
|
|
|
|
|
|
|
|
|
|
Contents
INTRODUCTION
PURPOSE
DEFINITION, ACRONYMS
DEVELOPMENT STACK OVERVIEW
DEVELOPMENT STACK LOCATION
DEVELOPMENT STACK DETAILS
1) [DM] Define models
Location
Description
Tests
2) [UI-P UI-G] Primefaces developments
Location
Description
Tests
3) [UI-D] UI Data providers
Location
Description
Tests
4) [MSL] Define services, clients and persistence specifications
Location
Description
Tests
5) [MSL-C] Implementation of clients
Location
Description
Tests
6) [MSL-S] Implementation of service
Location
Description
Tests
7) [DAL-T] Persistence transformers
Location
Description
Tests
8) [DAL-M] Persistence Jpa Implementation
Location
Description
Tests
INTRODUCTION
This technical detailed specification contains the specifications for a "classical CRUD" line of implementation through all layers. It will describe so the detailed of implementation in the UI, Service and persistence layers. This specification can be applied to all modules (based on use case) by replacing the variable {module} by the according module name.
PURPOSE
This document provides detailed specifications for developers to implements a classical CRUD action from UI to database.
DEFINITION, ACRONYMS
The following list contains all the definitions, acronyms and abbreviations useful to understand the document:
Name |
Description |
CRUD |
Create Read Update Delete |
SAD |
Software Architecture Document ( See SAD for others definitions and acronyms) |
TSGD |
Technical Specifications Generic Detailled |
{module} |
Variable to replace with the module to implements. Example {module} == madrid if my implementation regards Madrid module. |
DEVELOPMENT STACK OVERVIEW
Development stack
For CRUD 8 steps are needed to have a full ready stack:
1)[DM] Define models
2)UI Primefaces developments
3)UI Data providers
4)Define services, clients and persistence specifications
5)Implementation of clients
6)Implementation of service
7)Persistence transformers
8)Persistence Jpa Implementation
DEVELOPMENT STACK LOCATION
Location of projects
UI elements located in SVN: Wipo-suite-applications/ipas-suite
Modules elements located in SVN: wipo-suite-modules/{module}
DEVELOPMENT STACK DETAILS
[DM] Define models
Location
- SVN: wipo-suite-modules/{module}
- Project: {module}-specifications
- Package: org.wipo.suite.modules.{module}.specifications.models
Description
For every module, the project Specifications contains all the relative models which are specifics to this module.
Tests
- Mode: Dev
- Tests for models are test mapping to verify the serialization/datatransfert
- Examples: @See org.wipo.suite.modules.reception.specifications.TestMappingResponse
[UI-P UI-G] Primefaces developments
Location
- SVN: wipo-suite-applications
- Project: ipas-suite
- Package: org.wipo.suite.applications.ipas.modules.{module}
- Xhtml folder: src/main/webapp/{module}
Description
This part is dedicated to all the primefaces UI development.
The primefaces development are composed by 2 main part:
- the xhtml and
- the Java.
These developments should contains no business logic/algorithm and no access to data without data providers. It is the same all configurations and references it should come through a data provider.
UI development part for Xhtml:
- Use of template for module in all modules xhtml pages
- Template are src/main/webapp/WEB-INF/templates/{module}-template.xhtml
- Xhtml for modules are located in
- src/main/webapp/{module}/{myView}.xhtml
- Xhtml for JSF components are located in src/main/webapp/resources/components/
UI development part for Java are located in
- org.wipo.suite.applications.ipas.modules.{module}
- the view object are in
- org.wipo.suite.applications.ipas.modules.{module}.views
Tests
To be defined -> Acceptance tests
[UI-D] UI Data providers
Location
- SVN: wipo-suite-applications
- Project: ipas-suite
- Package: org.wipo.suite.applications.ipas.data.providers.{module}
Description
The data providers are the UI part which is dedicated to retrieve/send all the informations used by the views. It is composed by an interface which is the specifications and 2 implementations, the target one and the mock one. The mock implementation will allow the web application to work in a standalone/mock mode without requiring any services.
- Specifications
- Package: org.wipo.suite.applications.ipas.data.providers.{module}
- The specifications should contains all the CRUD method that are used by the UI
- They should use the client of your services
- The Data providers test
- Use in Integration mode
- Should call all the specified method to assert results
- The Data providers implementation
- location are org.wipo.suite.applications.ipas.data.providers.{module}.impl
- To manage the client call the use of ExecuteClient is recommended (@see
- Org.wipo.suite.applications.ipas.data.providers.ExecuteClient
- @see example in ReceptionDataProviderImpl
- The Data providers mock implementation
- location are org.wipo.suite.applications.ipas.data.providers.{module}.impl.mock
- This implementation is used for unplugged mode
Tests
- Mode: Integration
- The tests for data providers have to be written for Integration
- The should cover the entire data providers specifications
- They should use the mock data
[MSL] Define services, clients and persistence specifications
Location
- SVN: wipo-suite-modules/{module}
- Project: {module}-specifications
- Package: org.wipo.suite.modules.{module}.specifications
Description
The services and clients are specified in the project {module}-specifications: org.wipo.suite.modules.{module}.specifications. These specifications are interfaces, they are used to define all the service and clients method that will be available for your module.
All services and client are running with REST technologies.
- [MSL-C] Clients: Org.wipo.suite.modules.{module}.specifications.clients
- [MSL-S] Controllers: Org.wipo.suite.modules.{module}.specifications.controllers
- Persistence: Org.wipo.suite.modules{module}.specifications.dal
Tests
- Mode: Integration
- Tests clients/services have to be implemented in {module}-service project
- The scope is to use all clients method to call all service methods
[MSL-C] Implementation of clients
Location
- SVN: wipo-suite-modules/{module}
- Projects: {module}-clients
- Package: org.wipo.suite.modules.{module}.clients
Description
- The client implementation are located in project {module}-client: org.wipo.suite.modules.{module}.client
- It should inherit the default abstraction AbstractWipoSuiteClient
- It should define a public static final String id which will be used by the conf to find the good url.
Tests
- Mode: Integration
- Tests clients/services have to be implemented in {module}-service project
- The scope is to use all clients method to call all service methods
[MSL-S] Implementation of service
Location
- SVN: wipo-suite-modules/{module}
- Projects: {module}-service
- Package: org.wipo.suite.modules.{module}.service
Description
- The services implementation are located in project {module}-service: org.wipo.suite.modules.{module}.service
- The main class should inherit from the default main abstraction BaseHateoasMainController
- The other class controller should inherit from the default controller BaseHateoasController
- The abstraction takes care of catching the Exceptions which contains the good annotation for REST https status response code
- This project should contains all the integration tests by using the client
Tests
- Mode: Integration
- Tests clients/services have to be implemented in {module}-service project
- The scope is to use all clients method to call all service methods
[DAL-T] Persistence transformers
Location
- SVN: wipo-suite-modules/{module}
- Projects: {module}-dal
- Package: org.wipo.suite.modules.{module}.dal.transformers
Description
This part is located in the project {module}-dal it should contains all the transformation from the module models to the JPA entities and from JPA entities to all the module models
- Package: org.wipo.suite.modules.{module}.dal.transformers
Tests
- Mode: Dev
- Tests are in dev mode and should verify the good behavior of the transformations
[DAL-M] Persistence Jpa Implementation
Location
- SVN: wipo-suite-modules/{module}
- Projects: {module}-dal
- Package: org.wipo.suite.modules.{module}.dal.managers
Description
This part is located in the project {module}-dal it should contains all the jpa CRUD management
- Package: org.wipo.suite.modules.{module}.dal.managers
Tests
- Mode: Integration
- A default test should Verify the good connection to the databases and good initialization of Jpa manager
- Tests are in Integration mode and should verify the good behavior of the CRUD methods