Changes between Initial Version and Version 1 of BuildInstructions


Ignore:
Timestamp:
06/19/26 00:00:43 (2 days ago)
Author:
223091
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • BuildInstructions

    v1 v1  
     1= Build Instructions =
     2
     3== Development environment description ==
     4
     5The prototype application is implemented as a Java console application using Maven. It connects to the PostgreSQL project database through an SSH tunnel. The application uses JDBC for database access.
     6
     7Required software:
     8
     9* Java JDK 21 or compatible newer Java version
     10* IntelliJ IDEA
     11* Maven
     12* PostgreSQL JDBC driver, included through Maven
     13* DBeaver, used for database verification
     14* SSH tunnel script provided through the EPRMS / Databases section
     15
     16The project structure is:
     17
     18{{{
     19room-reservation-prototype
     20├── pom.xml
     21├── README.md
     22└── src
     23└── main
     24└── java
     25└── mk
     26└── finki
     27└── roomreservation
     28└── App.java
     29}}}
     30
     31== Database connection requirements ==
     32
     33The application does not connect directly to the remote database server. The SSH tunnel must be started first. The provided tunnel script opens access to the PostgreSQL database through:
     34
     35{{{
     36localhost:9999
     37}}}
     38
     39The application uses the following JDBC URL:
     40
     41{{{
     42jdbc:postgresql://localhost:9999/db_202526z_va_prj_room_reservation
     43}}}
     44
     45The database username is:
     46
     47{{{
     48db_202526z_va_prj_room_reservation_owner
     49}}}
     50
     51The database password is the database user password assigned in the EPRMS system.
     52
     53Important: real passwords are not written in the source code or in this documentation. The password is entered manually when starting the application.
     54
     55== Starting the SSH tunnel ==
     56
     57Before starting the Java prototype, the SSH tunnel script must be started.
     58
     59Steps:
     60
     611. Open the folder containing the provided tunnel script and ''plink''.
     622. Open PowerShell or Command Prompt in that folder.
     633. Start the tunnel script.
     644. Enter the SSH tunnel parameters provided in the EPRMS system if they are not already configured in the script.
     655. Keep the tunnel window open while the Java prototype is running.
     66
     67The tunnel must remain active during the entire test. If the tunnel window is closed, the Java application will lose access to the database.
     68
     69== Build instructions ==
     70
     71Open the project in IntelliJ IDEA.
     72
     731. Open IntelliJ IDEA.
     742. Choose ''Open'' and select the ''room-reservation-prototype'' project folder.
     753. Make sure that the project SDK is set to Java JDK 21 or compatible.
     764. Wait until Maven imports the project dependencies.
     775. Open ''src/main/java/mk/finki/roomreservation/App.java''.
     786. Run the ''App'' class.
     79
     80The project can also be compiled with Maven using:
     81
     82{{{
     83mvn clean package
     84}}}
     85
     86== Running the application ==
     87
     88After starting the application, the program asks for database connection parameters.
     89
     90Use the default database URL by pressing Enter:
     91
     92{{{
     93jdbc:postgresql://localhost:9999/db_202526z_va_prj_room_reservation
     94}}}
     95
     96Use the default database username by pressing Enter:
     97
     98{{{
     99db_202526z_va_prj_room_reservation_owner
     100}}}
     101
     102Enter the assigned database password manually when prompted.
     103
     104If the connection is successful, the application displays:
     105
     106{{{
     107Connected to database successfully.
     108}}}
     109
     110Then the main menu is shown:
     111
     112{{{
     113Main menu
     114
     1151. Search available rooms
     1162. Create reservation request
     1173. Approve or reject reservation
     1184. Exit
     119   Choose option:
     120   }}}
     121
     122== Testing instructions ==
     123
     124The prototype should be tested by executing the three implemented scenarios.
     125
     126=== Test 1: Search available rooms ===
     127
     128Select option:
     129
     130{{{
     1311
     132}}}
     133
     134Example input:
     135
     136{{{
     137Reservation date: 2026-03-01
     138Start time: 09:00
     139End time: 10:00
     140Minimum capacity: 1
     141Room type filter:
     142Required equipment name:
     143}}}
     144
     145Expected result:
     146
     147The system displays a list of available rooms with room code, type, capacity, building name, and address.
     148
     149=== Test 2: Create reservation request ===
     150
     151Select option:
     152
     153{{{
     1542
     155}}}
     156
     157Example input:
     158
     159{{{
     160Choose user number: 1
     161Reservation date: 2026-03-01
     162Start time: 09:00
     163End time: 10:00
     164Include room in reservation: y
     165Minimum capacity: 1
     166Room type filter:
     167Required equipment in room:
     168Choose room number: 3
     169Request additional/general equipment: n
     170}}}
     171
     172Expected result:
     173
     174The system creates a new reservation request and displays the generated reservation ID. The created reservation has status ''pending''.
     175
     176=== Test 3: Approve or reject reservation ===
     177
     178Select option:
     179
     180{{{
     1813
     182}}}
     183
     184Example input:
     185
     186{{{
     187Choose reservation number: 2
     188Choose approver number: 1
     189Choose decision: 1
     190Decision note: Approved after checking room availability.
     191}}}
     192
     193Expected result:
     194
     195The system saves the approval decision, updates the reservation status to ''approved'', and displays the final reservation details.
     196
     197== Database verification ==
     198
     199The result can be verified in DBeaver by executing the following SQL statements:
     200
     201{{{
     202SELECT *
     203FROM project.reservations
     204ORDER BY reservation_id DESC;
     205
     206SELECT *
     207FROM project.approvals
     208ORDER BY approval_id DESC;
     209}}}
     210
     211The created reservation should appear in the ''project.reservations'' table, and the approval decision should appear in the ''project.approvals'' table.
     212
     213== Notes ==
     214
     215The prototype is intentionally minimal. It demonstrates the essential database operations required for the selected use-cases, but it is not a complete production application. The completion and extension of the application can be done in later project phases.