In the assignment I worked alone.
The server for my assignment is running in https://introsde-assignment2.herokuapp.com/sdelab
- Get all persons
- Get a person with its id
- Get all the specified measures from a person specified with id
- Get a single measure specified with measure id, measure type and person id
- Return all persons that have measure that match [min,max] values
- Return all measures of person specified by id that match the given before and after dates
- date format: YYYY-MM-DD
- Get all the measure types that are supported
- Create a new person
- Create a new measure for person specified by id
- Update a person specified by id
- Update a measure specified by measure id, measure type and person id
- Delete a person specified by id
This assignment is about RESTful services. In the assignment I have created a REST service that is running on Heroku and a client that is making requests to the server.
The root folder contains mainly setup and configuration files and the database file. The src-package consist of all the needed java files for the program in addition with the persistence.xml-file. WebContent-folder contains files for server setup, such as web.xml.
The ivy.xml and build.xml files in root folder are for installing all the dependencies and running the program. The lifecoach.sqlite is the database file and app.json and Procfile in root folder contains setups for Heroku. Log-files contains logs from client-server requests.
The src-package contains all the java files and persistence.xml-file for persistence units. The introsde.rest.ehealth-package contains server configuration files, introsde.rest.ehealt.client contains the client, introsde.rest.ehealth.dao contains file for interacting with database, introsde.rest.ehealt.model contains the model files and introsde.rest.ehealth.resources contains the resource-handling -files for the uri paths.
The program uses ant build-tool for running the program. To execute the program, please open the terminal and run the following command in the root directory of the program:
ant execute.client
The command installs all dependencies and executes the client. The client sends requests to the remote server running on Heroku and prints the results to the terminal and also saves them to logs in the root folder.