Product Review Module - Samgbr/LSMPServiceRS GitHub Wiki
This module main functionality is to handle all product reviews provided by clients in the application. Like other modules its implementation is similar to other modules. The data captured for product review is product review id, the customer profile id, product id, customer review and its rating.
Brief Implementation
This module has three packages and these are:
- Review Package
- Service Package
- Representation Package
- Workflow Package
Review Package
It has two packages named in the project. One is to access the database and the other is to organize model classes and handle all domain level functionalities. To see only one functionality, search for a specific product review, get product review method is declared and implemented inside data access review package. And on the domain layer a model class declared similar to a table created in the back-end and a product review manager class used to communicate between the lower and upper service layer.
Service Package
Product review resource classes and service interfaces are used to expose services using paths declared inside these classes. In the cxf.xml file jaxrs server instance created for each interface, its representation and request class is configured.
Representation Package
For each product the market place is selling has a review representation and request class created. These classes are used during testing using the application postman (a tool used to test api's). This type of implementation will make the application scalable to add more products that are to be reviewed.
Workflow Package
For Product review module, this package main aim is to process all CRUD related operations by communicating to the manager classes in the review package and also used by resource classes on the service layer. This package is used as a bridge between layers.