You are on page 1of 2

Java Exercise - Web based (JSF ).

You are required to write an Employee Management System (EMS). An


Application will maintain employees in a specific organization. The following
operations should be supported:
1. Log on allow the user to logon in order to administrate the employees.
2. Add employee - Add an employee with the following specifications:
- Employee ID
- Employee name
- Salary
- Department
2. Delete employee according to its ID.
3. Update employee Allow to update employees attributes (name, salary,
department)
4. Get Employee Get employee with all its attributes
5. List department employees List all employees from a certain department (all
option should be supported).
6. Log out the user should be able to logout from the system at any given time.
Due to its delicate nature, the employee management system should let only
authorized users to get into the system. The authorized users should be read from
a file upon startup in an automatic manner. Every operation should identify the
user and authenticate it against the users DB. There is no need to support adding
new authenticated users on the fly.
The interface of the EMS should be a web interface.
The interface must support internationalization.
Database schema is up to you to decide. However, you will only use the following
employee attributes: employee ID, employee name, Employee salary and the
following department attributes: department code and department description.
After logon the user will get a menu allowing him to choose the desired operation:
- List employees
- Add employee
- Delete employee
When listing employees the user should be able to choose the department from a
combo box (all option supported). Once the employees are presented, the user can
ask to update an employee directly from the list employee screen.
The add employee and update employee should check the validity of the
department - if the department does not exist the operation should fail. There is
no need to support adding new departments, assume all departments exist in the
database.
The system must provide basic security functionalities some users may update,
delete and add employees, others may only view or update employees and others
will only have the ability to view employees.

There should be a possibility to add new users, and to change which users can
update/add/delete or view employees. There is no need to provide programmatic
interface for adding users or changing their attributes. Assume it can be done
manually. You only need to provide a way to refresh the users information without
restarting the application server.

1. Architecture
The design should follow the following guidelines:
1. The web interface should follow the Model-View-Controller design
architecture (MVC). Use the JSF framework as the MVC framework.
2. The presentation layer (jsp) should be clearly separated from the business
logic. Use custom made JSP tags rather then scriplets.
3. Use built in JSP tags and JSF tags in your JSP pages.
4. Use a JSP based error handler to handle remote exceptions as well as JSF
navigation mechanism.
5. Use JSF backing beans
6. A refresh mechanism (refresh button for example) will allow refreshing of
user security information.
7. Follow the Java coding conventions when programming the EMS.
8. Format your code, using Jalopy and add proper JavaDoc comments.

You might also like