Application used to manage users and grant access to certain applications throughout the discovery product suite
The project is setup as follows.
Contains all the endpoints for the API where most of the code is held
Contains standard exception classes and swagger bootstrap code. This is also where the Metrics are initialised on loading
Contains the standard implementations for the metrics code
Contains common utilities used throughout the project
The models for the user manager is setup as a separate maven project that can be imported into other applications.
This gives you the ability to access the models and also directly access the database functions without using the API.
The structure of the models is as follows
Contains all the Java DB entities for the tables in the models folder and PersistenceManager which handles the connections to the DB.
Enums for map Types and organisation types
JSON representations of the DB entities to allow communication between frontend and backend
create a run configuration in intelliJ using Tomcat -> Local.
In deployment tab, click + choose Artifact and select API:war exploded
In the startup tab, click on debug and add these options into the environment variables.
CONFIG_JDBC_USERNAME=YOURUSERNAME CONFIG_JDBC_PASSWORD=YOURPASSWORD CONFIG_JDBC_URL=jdbc:mysql://localhost:3306/config?useSSL=false CONFIG_JDBC_CLASS=com.mysql.cj.jdbc.Driver
Click run and it should be up and running.
This is using Angular CLI so use this for creating any new components. https://cli.angular.io/ for more information.
service.ts files are used to communicate with the API.
Create a run configuration in intelliJ using npm in the script input type start Click run and it should start running on http://localhost:4200
There are 2 Jenkins jobs associated with this project. One builds the model and deploys it to the artifactory and the other builds the actual war files for the application to run.
The models maven artifact is just imported into the pom of the main project.
If you need to update anything in the model directory, make your changes and use the release:update-versions
maven
plugin to increase the version number.
As both Jenkins builds are triggered off one commit, it is recommended that you don't increase the version number in the POM in the main data sharing manager application until the Model has been built by Jenkins. Then you can update the version in the POM and the main project will build.
If you find yourself in a situation where you can't make the changes separately and the build fails, simply manually run the Jenkins build job for Common-Data Sharing Manager and then for the main Data Sharing Manager application.