This client application is designed to manage objects within a collection, utilizing a relational database management system (PostgreSQL) for data storage. The application implements the following features:
- Database Integration: Organizes the storage of the collection in a PostgreSQL relational database. The collection is no longer stored in a file.
- ID Generation: Utilizes the database's sequence feature for generating ID fields.
- Memory Collection Update: Updates the collection's state in memory only upon successfully adding an object to the database.
- User Registration and Authentication: Implements user registration and authentication functionality, allowing users to specify passwords. Passwords are hashed using the SHA-384 algorithm for storage.
- Command Execution Restriction: Disallows execution of commands by unauthorized users.
- User Information Preservation: Stores information about the user who created each object in the database.
- Object Access Control: Users can view all objects in the collection but can only modify objects belonging to them.
- User Identification: Sends the login and password with each request for user identification.
- Client-Server Communication: Facilitates communication between multiple clients and a server.
- Graphical User Interface (GUI): Provides an interface for users to interact with the application.
- Real-Time Updates: Supports real-time updates and notifications for clients.
- Data Management: Allows users to manage and manipulate data efficiently through the GUI.
- Scalability: Designed to be scalable, accommodating a growing number of clients and data.
- Authentication/Registration Window: Allows users to authenticate or register an account.
- Display of Current User: Shows information about the currently logged-in user.
- Table View: Displays all objects from the collection with the following features:
- Each field of the object is represented in a separate column of the table.
- Users can filter/sort rows of the table based on the values of any column. Sorting and filtering are implemented using the Streams API.
- Visualization Area: Visualizes objects in the collection with the following features:
- Objects are drawn using graphical primitives such as Graphics, Canvas, or similar graphics library tools.
- Visualization includes object coordinates and sizes.
- Objects from different users are drawn with different colors.
- Clicking on an object displays information about that object.
- When an object is added/removed/modified, it should automatically appear/disappear/change in the visualization area for both the owner and all other clients.
- Consistent animation is applied during object rendering, as per the instructor's guidelines.
- Editing Fields: Users can edit individual fields of any object belonging to them. Editing an object can be initiated from the table displaying the list of objects or from the visualization area.
- Deletion of Objects: Users can delete selected objects, even if the remove command has not been executed previously.
- Managing a collection of objects.
- Purpose of automatically generated fields of objects in the collection.
- Waiting for connections and requests from the client.
- Processing received requests (commands).
- Saving the collection when the application is terminated.
- Saving a collection to a file when executing a special command that is available only to the server (the client cannot send such a command).
- Connection receiving module.
- Request reading module.
- Module for processing received commands.
- Module for sending responses to the client.
- Launch the server application.
- Launch the client application.
- Use the graphical interface to interact with the application, such as sending messages, requesting data from the server, etc.
help: display list of available commandsinfo: print information about the collection (type, initialization date, number of elements, etc.) to standard outputshow: Print to standard output all the elements of the collection in string representationadd {element}: add a new element to the collectionupdate id {element}: update the value of a collection element whose id is equal to the given oneremove_by_id {id}: remove an element from a collection by its idclear: clear the collectionsave: save the collection to a fileexecute_script file_name: Read and execute a script from the specified file. The script contains commands in the same form in which the user enters them interactively.exit: exit the program (without saving to a file)remove_greater {element}: remove from the collection all elements greater than the given oneremove_lower {element}: remove all elements from the collection that are smaller than the given onehistory: print the last 5 commands (without their arguments)