Simple API for tracking car maintenance, designed to run on Tomcat 7, and jUnit 4.
- Based off of http://www.vogella.com/tutorials/REST/article.html
This project was designed and implemented using Eclipse for Java EE Developers. Please use 'Import Existing Projects into Workspace', and then import both of the projects found when pointing Eclipse at the root directory in this repository.
- Testing is done for each POJO and DAO.
- Electric Vehicle
- Gasoline Vehicle
- Diesel Vehicle
- Each object represents a certain service that can be applied to vehicles.
- It has a boolean property for each Vehicle type, to indicate if it is compatible.
- This can be expanded by adding more properties, such as average cost, or average hours.
- One instance is used to track a particular service, with a particular vehicle, by ID.
- When setting this 'service incident', some simple logic checks if the services are compatible.
- If an incompatibility is found, a custom ServiceNotCompatibleException exception is thrown.
- Simple objects meant to maintain a hashmap of object instances at runtime.
- Uses ID as the key, and the object as the value for efficient searching.
- Objects meant to facilitate POST/GET requests and XML responses from and to the user.
- create_service.html, create_vehicle.html, service_vehicle.html.
- Very simple forms to send POST/GET requests.
- Would be good to add more complex UI in future.
- After a POST is issued, the user is redirected to the XML output of a GET request, listing the current vehicles, services, or service occurrences.