Create a simple JSF application for managing documents (or integrate the following functionalities into an existing application). The application will allow the following:
- An authentication mechanism based on username and password.
- Register new users and assign them a specific role, for example admin, guest, etc.
- Specify a time frame, in which registration is open for users and submissions.
- The possibility to upload a document (for guests) and to view all uploaded documents (for admin). Each uploaded document will have a uniquely generated registration number. All submissions will be logged in a text file.
- the management of application's beans;
- decoupling the components using dependency injection (for example, producer methods);
- decoupling orthogonal concerns, such as logging;
- decoupling bussines concerns, such as verifying the date for operations like registration and submission;
- data validation, using Bean Validation annotations;
- implementing at least one event-based comunication (for instance, whenever a new document is uploaded a message is produced and all observers of this type of event will be notified).
Create RESTful Web services using JAX-RS that allow the interaction with at least one JPA entity, implementing CRUD operations. For example, the application may offer the following:
- adding a new document and deleting an existing document from the database (RestService);
- Use XML or JSON for representing consumed or produced data.
Add security features to the application created in the previous lab, using standard mechanisms offered by Java EE for:
- Authentication
- Controlling the access to Web resources
- Securing EJB components