From a77b4d964b9465745d68b4009e92ae6118e8d047 Mon Sep 17 00:00:00 2001 From: Francesco Rinaldi Date: Thu, 12 Jan 2017 01:53:25 +0100 Subject: [PATCH] E anche oggi si dorme domani. Solved #2 & #4 MI PARE EH POI BOH C'HO SONNO --- 2.Design Document/DD.lyx | 1537 +++++++-------------- 3.Integration Test Plan Document/ITPD.lyx | 126 +- 2 files changed, 553 insertions(+), 1110 deletions(-) diff --git a/2.Design Document/DD.lyx b/2.Design Document/DD.lyx index 98b9992..06fb38c 100644 --- a/2.Design Document/DD.lyx +++ b/2.Design Document/DD.lyx @@ -1874,20 +1874,12 @@ Authentication Manager \family typewriter register(UserData) \family default -: This function creates a new instance -\begin_inset ERT -status open - -\begin_layout Plain Layout - - -\backslash -texttt{user} -\end_layout - -\end_inset - - in the system with all the information provided by the user. +: This function creates a new +\family typewriter +User +\family default + instance in the system with all the information provided by the user during + the registration phase. If the entered data are correct, an email is sent to the user address to confirm the correct registration to the service. \begin_inset VSpace smallskip @@ -1897,20 +1889,40 @@ texttt{user} \end_layout \begin_layout Standard -\begin_inset ERT -status open - -\begin_layout Plain Layout - - -\backslash -texttt{login} -\end_layout +\family typewriter +login(Credentials) +\family default +: This function allows any registered user to log into the system using + his +\shape italic +username +\shape default + and +\shape italic +password +\shape default +. +\begin_inset VSpace smallskip \end_inset -: This function allows any registered user to log into the system using - his username and password. + +\end_layout + +\begin_layout Standard + +\family typewriter +checkCredentials(Credentials) +\family default +: This function verifies the +\shape italic +username +\shape default + - +\shape italic +password +\shape default + combination is correct. If the credentials are correct, the function returns a token to be used in the future requests to identify the user. Otherwise, an error is returned. @@ -1928,6 +1940,9 @@ Functions implemented by AccountInformation Manager \series default : +\end_layout + +\begin_layout Standard \begin_inset VSpace smallskip \end_inset @@ -1935,22 +1950,15 @@ AccountInformation Manager \end_layout \begin_layout Standard -\begin_inset ERT -status open -\begin_layout Plain Layout - - -\backslash -texttt{edit -\backslash -_profile} -\end_layout - -\end_inset - -: This function allows registered users to edit their profile information. - +\family typewriter +remove(User) +\family default +: This function deletes the +\family typewriter +User +\family default + from the system. \begin_inset VSpace smallskip \end_inset @@ -1958,21 +1966,18 @@ _profile} \end_layout \begin_layout Standard -\begin_inset ERT -status open -\begin_layout Plain Layout - - -\backslash -texttt{enable -\backslash -_mso} +\family typewriter +activate(User) +\family default +: This function restores the privileges of the +\family typewriter +User +\family default +. \end_layout -\end_inset - -: This function allows registered users to enable the money saving option. +\begin_layout Standard \begin_inset VSpace smallskip \end_inset @@ -1980,21 +1985,15 @@ _mso} \end_layout \begin_layout Standard -\begin_inset ERT -status open -\begin_layout Plain Layout - - -\backslash -texttt{disable -\backslash -_mso} -\end_layout - -\end_inset - -: This function allows registered users to disable the money saving option. +\family typewriter +deactivate(User) +\family default +: This function removes some of the privileges from the +\family typewriter +User +\family default +. \begin_inset VSpace smallskip \end_inset @@ -2002,21 +2001,67 @@ _mso} \end_layout \begin_layout Standard -\begin_inset ERT -status open - -\begin_layout Plain Layout - - -\backslash -texttt{consult -\backslash -_history} -\end_layout +\family typewriter +editProfile(User, UserData) +\family default +: This function updates the existent +\family typewriter +User +\family default + instance in the system with all the new information provided by the +\family typewriter +UserData +\family default + object. +\begin_inset VSpace smallskip \end_inset -: This function allows registered users to consult their reservation history. + +\end_layout + +\begin_layout Standard + +\family typewriter +getHistory(User) +\family default +: This function allows a registered +\family typewriter +User +\family default + to consult his complete requests history. +\begin_inset VSpace smallskip +\end_inset + + +\end_layout + +\begin_layout Standard + +\family typewriter +enableMSO(User): +\family default +This function enables the Money Saving Option for the +\family typewriter +User +\family default +. +\begin_inset VSpace smallskip +\end_inset + + +\end_layout + +\begin_layout Standard + +\family typewriter +disableMSO(User): +\family default +This function disables the Money Saving Option for the +\family typewriter +User +\family default +. \end_layout \begin_layout Subsubsection* @@ -2041,23 +2086,11 @@ CheckAvailability Manager \end_layout \begin_layout Standard -\begin_inset ERT -status open -\begin_layout Plain Layout - - -\backslash -texttt{check -\backslash -_user -\backslash -_position} -\end_layout - -\end_inset - -: This function will retrieve the information about the user's position +\family typewriter +getUserPosition(User) +\family default +: This function will retrieve the information about the user’s position through the Google Maps API. \begin_inset VSpace smallskip \end_inset @@ -2066,47 +2099,20 @@ _position} \end_layout \begin_layout Standard -\begin_inset ERT -status open -\begin_layout Plain Layout - - -\backslash -texttt{check -\backslash -_availability} -\end_layout - -\end_inset - -: This function will send a request to the Car Manager in order to retrieve - all the information about the cars' location and status nearby the current - user. -\begin_inset VSpace smallskip -\end_inset - - -\end_layout - -\begin_layout Standard -\begin_inset ERT -status open - -\begin_layout Plain Layout - - -\backslash -texttt{show -\backslash -_map} -\end_layout - -\end_inset - -: This function will first call the other function written above and then - will send the information retrieved back to the user, showing him on a - map his position and the location of the available cars very near to him. +\family typewriter +getAvailableCars(Location) +\family default +: This function will retrieve the needed information through the Car Manager + and it will return a list of +\shape italic +available +\shape default + cars near the user's +\family typewriter +Location +\family default +. \end_layout \begin_layout Standard @@ -2138,24 +2144,42 @@ Reservation Manager \end_layout \begin_layout Standard -\begin_inset ERT -status open -\begin_layout Plain Layout - - -\backslash -texttt{check -\backslash -_user -\backslash -_position} +\family typewriter +checkVerificationCode(User, int) +\family default +: This function verifies the +\family typewriter +User +\family default + - +\shape italic +verification +\shape default + +\shape italic +code +\shape default + combination is correct. \end_layout +\begin_layout Standard +\begin_inset VSpace smallskip \end_inset -: This function will retrieve the information about the user's position + +\end_layout + +\begin_layout Standard + +\family typewriter +getUserPosition(User) +\family default +: This function will retrieve the information about the user’s position through the Google Maps API. +\end_layout + +\begin_layout Standard \begin_inset VSpace smallskip \end_inset @@ -2163,346 +2187,20 @@ _position} \end_layout \begin_layout Standard -\begin_inset ERT -status open - -\begin_layout Plain Layout - - -\backslash -texttt{check -\backslash -_reservability} -\end_layout - -\end_inset - -: This function will send a request to the Car Manager in order to check - if the current user can effectively reserve the selected car. - -\begin_inset VSpace smallskip -\end_inset - - -\end_layout - -\begin_layout Standard -\begin_inset ERT -status open - -\begin_layout Plain Layout - - -\backslash -texttt{check -\backslash -_terminabiity} -\end_layout - -\end_inset - -: This function will send a request to the Car Manager in order to check - if the current user can effectively terminate the active reservation or - rent. - -\begin_inset VSpace smallskip -\end_inset - - -\end_layout - -\begin_layout Standard -\begin_inset ERT -status open - -\begin_layout Plain Layout - - -\backslash -texttt{start -\backslash -_reservation} -\end_layout - -\end_inset - -: This function create a new istance of -\begin_inset ERT -status open - -\begin_layout Plain Layout - - -\backslash -texttt{reservation} -\end_layout - -\end_inset +\family typewriter +getReservableCars(Location) +\family default +: This function will retrieve the needed information through the Car Manager + and it will return a list of +\shape italic +reservable +\shape default + cars near the user's +\family typewriter +Location +\family default . -\begin_inset VSpace smallskip -\end_inset - - -\end_layout - -\begin_layout Standard -\begin_inset ERT -status open - -\begin_layout Plain Layout - - -\backslash -texttt{end -\backslash -_reservation} -\end_layout - -\end_inset - -: This function will first -\begin_inset ERT -status open - -\begin_layout Plain Layout - - -\backslash -texttt{check -\backslash -_terminabiity} -\end_layout - -\end_inset - - of the active reservation and only after receiving an affirmative response - back it will end the current istance of -\begin_inset ERT -status open - -\begin_layout Plain Layout - - -\backslash -texttt{reservation} -\end_layout - -\end_inset - -. - It will also call -\begin_inset ERT -status open - -\begin_layout Plain Layout - - -\backslash -texttt{check -\backslash -_reservation -\backslash -_status} -\end_layout - -\end_inset - - and it will send a request to the Payment Manager with these last information - retrieved. -\begin_inset VSpace smallskip -\end_inset - - -\end_layout - -\begin_layout Standard -\begin_inset ERT -status open - -\begin_layout Plain Layout - - -\backslash -texttt{start -\backslash -_rent} -\end_layout - -\end_inset - -: This function create a new istance of -\begin_inset ERT -status open - -\begin_layout Plain Layout - - -\backslash -texttt{rent} -\end_layout - -\end_inset - -. -\begin_inset VSpace smallskip -\end_inset - - -\end_layout - -\begin_layout Standard -\begin_inset ERT -status open - -\begin_layout Plain Layout - - -\backslash -texttt{end -\backslash -_rent} -\end_layout - -\end_inset - -: This function will first -\begin_inset ERT -status open - -\begin_layout Plain Layout - - -\backslash -texttt{check -\backslash -_terminabiity} -\end_layout - -\end_inset - - of the active rent and only after receiving an affirmative response back - it will end the current istance of -\begin_inset ERT -status open - -\begin_layout Plain Layout - - -\backslash -texttt{rent} -\end_layout - -\end_inset - -. - It will also call -\begin_inset ERT -status open - -\begin_layout Plain Layout - - -\backslash -texttt{check -\backslash -_rent -\backslash -_status} -\end_layout - -\end_inset - - and it will send a request to the Payment Manager with these last information - retrieved. -\begin_inset VSpace smallskip -\end_inset - - -\end_layout - -\begin_layout Standard -\begin_inset ERT -status open - -\begin_layout Plain Layout - - -\backslash -texttt{check -\backslash -_reservation -\backslash -_status} -\end_layout - -\end_inset - -: This function will retrieve all the information about the -\begin_inset ERT -status open - -\begin_layout Plain Layout - - -\backslash -texttt{reservation} -\end_layout - -\end_inset - - and it will send them back to the user. -\begin_inset VSpace smallskip -\end_inset - - -\end_layout - -\begin_layout Standard -\begin_inset ERT -status open - -\begin_layout Plain Layout - - -\backslash -texttt{check -\backslash -_rent -\backslash -_status} -\end_layout - -\end_inset - -: This function will retrieve all the information about the -\begin_inset ERT -status open - -\begin_layout Plain Layout - - -\backslash -texttt{rent} -\end_layout - -\end_inset - - and it will send them back to the user. -\end_layout - -\begin_layout Subsubsection* - -\series bold -Car Manager -\end_layout - -\begin_layout Standard -Functions implemented by -\series bold -Car Manager -\series default -: \end_layout \begin_layout Standard @@ -2513,23 +2211,27 @@ Car Manager \end_layout \begin_layout Standard -\begin_inset ERT -status open -\begin_layout Plain Layout - - -\backslash -texttt{request -\backslash -_information} -\end_layout - -\end_inset - -: This function will send a request to the ADS_Application Manager in order - to retrieve a complete report about a car or just information about the - position and the status of a car. +\family typewriter +startReservation(Car, User) +\family default +: This function creates a new instance of +\family typewriter +Reservation +\family default +, tying together the +\family typewriter +Car +\family default + and +\family typewriter +User +\family default + instances passed as argument, and notifies it to the +\family typewriter +User +\family default + through the Notification Manager. \end_layout \begin_layout Standard @@ -2540,51 +2242,22 @@ _information} \end_layout \begin_layout Standard -\begin_inset ERT -status open -\begin_layout Plain Layout - - -\backslash -texttt{check -\backslash -_reservability} +\family typewriter +checkReservationStatus(Reservation) +\family default +: This function retrieves all the information about the +\family typewriter +Reservation +\family default + instance passed as argument, and shows them to the +\family typewriter +User +\family default + through the Notification Manager. \end_layout -\end_inset - -: This function will first retrieve more information about the car recevied - as input from the Reservation Manager and then will compare its location - with the user's position. - It will send back a -\begin_inset ERT -status open - -\begin_layout Plain Layout - - -\backslash -texttt{confirmation} -\end_layout - -\end_inset - - only if the distance between the two entities is suitable and if the status - of the selected car is still -\begin_inset ERT -status open - -\begin_layout Plain Layout - - -\backslash -texttt{available} -\end_layout - -\end_inset - -. +\begin_layout Standard \begin_inset VSpace smallskip \end_inset @@ -2592,23 +2265,18 @@ texttt{available} \end_layout \begin_layout Standard -\begin_inset ERT -status open -\begin_layout Plain Layout - - -\backslash -texttt{check -\backslash -_availability} +\family typewriter +endReservation(Reservation) +\family default +: This function terminates the current +\family typewriter +Reservation +\family default + and send a payment request to the Payment Manager. \end_layout -\end_inset - -: This function will first check the user's position and then will send - a request to the ADS_Application Manager in order to retrieve status and - position of all the cars stored in the DataBase. +\begin_layout Standard \begin_inset VSpace smallskip \end_inset @@ -2616,37 +2284,26 @@ _availability} \end_layout \begin_layout Standard -\begin_inset ERT -status open -\begin_layout Plain Layout - - -\backslash -texttt{check -\backslash -_terminability} +\family typewriter +startRent(Reservation) +\family default +: This function creates a new instance of +\family typewriter +Rent +\family default +, updating the +\family typewriter +Reservation +\family default + instance passed as argument, and notifies it to the +\family typewriter +User +\family default + through the Notification Manager. \end_layout -\end_inset - -: This function will first -\begin_inset ERT -status open - -\begin_layout Plain Layout - - -\backslash -texttt{request -\backslash -_information} -\end_layout - -\end_inset - - and then will check if all the conditions to end the reservation or the - rent are respected (for example if nobody is still in the car, and so on..). +\begin_layout Standard \begin_inset VSpace smallskip \end_inset @@ -2654,25 +2311,22 @@ _information} \end_layout \begin_layout Standard -\begin_inset ERT -status open -\begin_layout Plain Layout - - -\backslash -texttt{contact -\backslash -_maintanance -\backslash -_service} +\family typewriter +checkRentStatus(Rent) +\family default +: This function retrieves all the information about the +\family typewriter +Rent +\family default + instance passed as argument, and shows them to the +\family typewriter +User +\family default + through the Notification Manager. \end_layout -\end_inset - -: Every time the Car Manager retrieve information about a car's status, - if necessary, it will send a request of maintanance to an external maintanance - service through this function. +\begin_layout Standard \begin_inset VSpace smallskip \end_inset @@ -2680,31 +2334,47 @@ _service} \end_layout \begin_layout Standard -\begin_inset ERT -status open -\begin_layout Plain Layout - - -\backslash -texttt{perform -\backslash -_action} -\end_layout - -\end_inset - -: This function will send a request to the ADS_Application of a defined - car in order to perform a precise action. +\family typewriter +isTerminable(Rent) +\family default +: This function will check through the Car Manager if all the conditions + to end the +\family typewriter +Rent +\family default + are respected (for example if nobody is still in the car, and so on..) and + it will return +\family typewriter +true +\family default + if the rent is terminable, +\family typewriter +false +\family default + otherwise. \end_layout \begin_layout Standard -\begin_inset Newpage newpage +\begin_inset VSpace smallskip \end_inset \end_layout +\begin_layout Standard + +\family typewriter +endRent(Rent) +\family default +: This function terminates the current +\family typewriter +Rent +\family default +, notifies it to the user through the Notification Manager and sends a payment + request to the Payment Manager. +\end_layout + \begin_layout Subsubsection* \series bold @@ -2717,241 +2387,153 @@ Functions implemented by ADS_Application Manager \series default : +\end_layout + +\begin_layout Standard \begin_inset VSpace smallskip \end_inset -\end_layout - -\begin_layout Standard -\begin_inset ERT -status open - -\begin_layout Plain Layout - - -\backslash -texttt{check -\backslash -_status} -\end_layout - -\end_inset - -: This function asks the ADS to check the current status ( -\begin_inset ERT -status open - -\begin_layout Plain Layout - - -\backslash -texttt{available, reserved, in -\backslash -_use, unavailable} -\end_layout - -\end_inset - +\family typewriter +getStatus() +\family default +: This function asks the ADS to check the current +\family typewriter +Status +\family default + ( +\shape slanted +available +\shape default +, +\shape slanted +reserved +\shape default +, +\shape slanted +in_use +\shape default +, +\shape slanted +unavailable +\shape default ) of the car. +\end_layout + +\begin_layout Standard \begin_inset VSpace smallskip \end_inset -\end_layout - -\begin_layout Standard -\begin_inset ERT -status open - -\begin_layout Plain Layout - - -\backslash -texttt{check -\backslash -_damages} -\end_layout - -\end_inset - -: This function asks the ADS to check the eventual car's damages through +\family typewriter +getDamages() +\family default +: This function queries the ADS to check the eventual car’s damages through the sensors installed in there. - If the ADS find any kind of anomalies, it will change the status of the - car into -\begin_inset ERT -status open - -\begin_layout Plain Layout - - -\backslash -texttt{unavailable} \end_layout -\end_inset - - and will notify it immedetiately to the Server application. +\begin_layout Standard \begin_inset VSpace smallskip \end_inset +\family typewriter +getPosition) +\family default +: This function queries the ADS to check the current position of the car. \end_layout \begin_layout Standard -\begin_inset ERT -status open - -\begin_layout Plain Layout - - -\backslash -texttt{check -\backslash -_position} -\end_layout - -\end_inset - -: This function asks the ADS to check the car's position. \begin_inset VSpace smallskip \end_inset +\family typewriter +getPassengers() +\family default +: This function queries the ADS the number of passengers actually inside + the car. \end_layout \begin_layout Standard -\begin_inset ERT -status open - -\begin_layout Plain Layout - - -\backslash -texttt{check -\backslash -_passengers} -\end_layout - -\end_inset - -: This function asks the ADS the number of passengers actually inside the - car. \begin_inset VSpace smallskip \end_inset +\family typewriter +getPowerGrid() +\family default +: This function queries the ADS to check if the car is plugged into the + power grid. \end_layout \begin_layout Standard -\begin_inset ERT -status open - -\begin_layout Plain Layout - - -\backslash -texttt{check -\backslash -_power -\backslash -_grid} -\end_layout - -\end_inset - -: This function asks the ADS to check if the car is plugged into the power - grid. \begin_inset VSpace smallskip \end_inset -\end_layout - -\begin_layout Standard -\begin_inset ERT -status open - -\begin_layout Plain Layout - - -\backslash -texttt{send -\backslash -_status -\backslash -_and -\backslash -_position} -\end_layout - -\end_inset - -: This function asks the ADS to check status and position of a car and to - send these information back to the Server application. -\begin_inset VSpace smallskip -\end_inset - - -\end_layout - -\begin_layout Standard -\begin_inset ERT -status open - -\begin_layout Plain Layout - - -\backslash -texttt{send -\backslash -_report} -\end_layout - -\end_inset - -: This function asks the ADS to perform all the actions written above (that - is check status, position, eventual damages and the number of eventual - passengers inside the car) and to send these information back to the Server - application. -\begin_inset VSpace smallskip -\end_inset - - -\end_layout - -\begin_layout Standard -\begin_inset ERT -status open - -\begin_layout Plain Layout - - -\backslash -texttt{lock -\backslash -_doors} -\end_layout - -\end_inset - -: This function asks the ADS the lock the car's doors and to change the - status of the car into -\begin_inset ERT -status open - -\begin_layout Plain Layout - - -\backslash -texttt{in -\backslash -_use} -\end_layout - -\end_inset - +\family typewriter +lockDoors() +\family default +: This function queries the ADS the lock the car’s doors and to change the + +\family typewriter +Status +\family default + of the car into +\shape slanted +available +\shape default . +\end_layout + +\begin_layout Standard +\begin_inset VSpace smallskip +\end_inset + + +\family typewriter +unlockDoors() +\family default +: This function queries the ADS the unlock the car’s doors and to change + the +\family typewriter +Status +\family default + of the car into +\shape slanted +in_use +\shape default +. +\end_layout + +\begin_layout Standard +\begin_inset VSpace smallskip +\end_inset + + +\family typewriter +updateCarStatus(Status) +\family default +: This function queries the ADS to change the car’s +\family typewriter +Status +\family default + into the one passed as argument. +\end_layout + +\begin_layout Subsubsection* + +\series bold +Car Manager +\end_layout + +\begin_layout Standard +Functions implemented by +\series bold +Car Manager +\series default +: \begin_inset VSpace smallskip \end_inset @@ -2959,35 +2541,13 @@ _use} \end_layout \begin_layout Standard -\begin_inset ERT -status open -\begin_layout Plain Layout - - -\backslash -texttt{unlock -\backslash -_doors} -\end_layout - -\end_inset - -: This function asks the ADS the unlock the car's doors and to change the - status of the car into -\begin_inset ERT -status open - -\begin_layout Plain Layout - - -\backslash -texttt{available} -\end_layout - -\end_inset - -. +\family typewriter +contactMaintainanceService(Car) +\family default +: Every time the Car Manager retrieve information about a car’s status, + if necessary, it will send a maintainance request to an external service + through this function. \begin_inset VSpace smallskip \end_inset @@ -2995,34 +2555,15 @@ texttt{available} \end_layout \begin_layout Standard -\begin_inset ERT -status open -\begin_layout Plain Layout - - -\backslash -texttt{start -\backslash -_reservation} -\end_layout - -\end_inset - -: This function asks the ADS the change the car's status into -\begin_inset ERT -status open - -\begin_layout Plain Layout - - -\backslash -texttt{reserved} -\end_layout - -\end_inset - -. +\family typewriter +ping(Car) +\family default +: This function queries a +\family typewriter +Car +\family default + to check whether it is online. \begin_inset VSpace smallskip \end_inset @@ -3030,34 +2571,15 @@ texttt{reserved} \end_layout \begin_layout Standard -\begin_inset ERT -status open -\begin_layout Plain Layout - - -\backslash -texttt{end -\backslash -_reservation} -\end_layout - -\end_inset - -: This function asks the ADS the change the car's status into -\begin_inset ERT -status open - -\begin_layout Plain Layout - - -\backslash -texttt{available} -\end_layout - -\end_inset - -. +\family typewriter +carsInRadius(Location) +\family default +: This function retrieves all the cars near the +\family typewriter +Location +\family default + passed as argument. \end_layout \begin_layout Subsubsection* @@ -3076,93 +2598,71 @@ Payment Manager \end_inset -\end_layout - -\begin_layout Standard -\begin_inset ERT -status open - -\begin_layout Plain Layout - - -\backslash -texttt{calculate -\backslash -_fees} -\end_layout - -\end_inset - -: This function will use all the information retrieved as input about the - -\begin_inset ERT -status open - -\begin_layout Plain Layout - - -\backslash -texttt{reservation} -\end_layout - -\end_inset - - or about the -\begin_inset ERT -status open - -\begin_layout Plain Layout - - -\backslash -texttt{rent} -\end_layout - -\end_inset - - to calculate the total fees, and then will call -\begin_inset ERT -status open - -\begin_layout Plain Layout - - -\backslash -texttt{contact -\backslash -_payment -\backslash -_service} -\end_layout - -\end_inset - +\family typewriter +applyReservationFees(Reservation) +\family default +: This function will apply the fees for each +\family typewriter +Reservation +\family default + instance. + Actually, the user can terminate a reservation for free, but in the future + if PowerEnjoy would decide to apply a fee for the termination of a reservation, + it would be very easy to modify this value. + If the user picks up the car, his reservation terminates and the system + will create another instance +\family typewriter +Rent +\family default +: no fees will be applied to transform a +\family typewriter +Reservation +\family default + into a +\family typewriter +Rent +\family default . - \begin_inset VSpace smallskip \end_inset -\end_layout - -\begin_layout Standard -\begin_inset ERT -status open - -\begin_layout Plain Layout - - -\backslash -texttt{contact -\backslash -_payment -\backslash -_service} -\end_layout - +\family typewriter +calculateRentFees(Rent) +\family default +: This function will calculate the fees for each +\family typewriter +Rent +\family default + instance. + In this case we have to consider eventual discounts and other additional + fees before sending the payment request to the external payment service. + It would not be difficult in the future to change some parameters according + to the PowerEnjoy policy. +\begin_inset VSpace smallskip \end_inset -: This function send a request of payment to the external payment service. + +\family typewriter +calculateRentDiscount(Rent) +\family default +: This function will calculate the eventual discount for each +\family typewriter +Rent +\family default + instance. +\begin_inset VSpace smallskip +\end_inset + + +\family typewriter +calculateAdditionalFees(Rent) +\family default +: This function will calculate the eventual additional fees for each +\family typewriter +Rent +\family default + instance. \end_layout \begin_layout Subsubsection* @@ -3184,20 +2684,10 @@ Data Manager \end_layout \begin_layout Standard -\begin_inset ERT -status open - -\begin_layout Plain Layout - - -\backslash -texttt{store -\backslash -_data} -\end_layout - -\end_inset +\family typewriter +store(Data) +\family default : This function allows any authorized entity to store data into the DataBase. \begin_inset VSpace smallskip @@ -3207,21 +2697,11 @@ _data} \end_layout \begin_layout Standard -\begin_inset ERT -status open -\begin_layout Plain Layout - - -\backslash -texttt{retrieve -\backslash -_data} -\end_layout - -\end_inset - -: This function allows any authorized entity to read data from the DataBase. +\family typewriter +retrieve(Data) +\family default +:: This function allows any authorized entity to read data from the DataBase. \begin_inset VSpace smallskip \end_inset @@ -3230,21 +2710,11 @@ _data} \end_layout \begin_layout Standard -\begin_inset ERT -status open -\begin_layout Plain Layout - - -\backslash -texttt{delete -\backslash -_data} -\end_layout - -\end_inset - -: This function allows any authorized entity to delete data from the DataBase. +\family typewriter +delete(Data) +\family default +:: This function allows any authorized entity to delete data from the DataBase. \begin_inset VSpace smallskip \end_inset @@ -3253,21 +2723,11 @@ _data} \end_layout \begin_layout Standard -\begin_inset ERT -status open -\begin_layout Plain Layout - - -\backslash -texttt{modify -\backslash -_data} -\end_layout - -\end_inset - -: This function allows any authorized entity to modify data into the DataBase. +\family typewriter +edit(Data) +\family default +:: This function allows any authorized entity to modify data into the DataBase. \end_layout @@ -3290,20 +2750,11 @@ Notification Manager \end_layout \begin_layout Standard -\begin_inset ERT -status open -\begin_layout Plain Layout - - -\backslash -texttt{notify} -\end_layout - -\end_inset - -: This function is used by all the authorized entities to communicate between - each other. +\family typewriter +notify(User, Notification) +\family default +: This function is used to notify a message to the user. \end_layout \begin_layout Standard diff --git a/3.Integration Test Plan Document/ITPD.lyx b/3.Integration Test Plan Document/ITPD.lyx index 4ff6da1..8bb84bc 100644 --- a/3.Integration Test Plan Document/ITPD.lyx +++ b/3.Integration Test Plan Document/ITPD.lyx @@ -2338,7 +2338,7 @@ A \family typewriter Credentials \family default - instance but with a wrong combination of + instance with a wrong combination of \shape italic username \shape default @@ -2868,7 +2868,7 @@ Description \begin_inset Text \begin_layout Plain Layout -This function removes some privileges from the +This function removes some of the privileges from the \family typewriter User \family default @@ -3301,11 +3301,11 @@ Description \begin_inset Text \begin_layout Plain Layout -This function returns all the +This function allows a registered \family typewriter User \family default - requests. + to consult his complete requests history. \end_layout \end_inset @@ -4886,7 +4886,7 @@ Status \end_layout \begin_layout Standard -\begin_inset VSpace bigskip +\begin_inset VSpace smallskip \end_inset Main functions implemented by the @@ -4896,14 +4896,6 @@ Car Manager : \end_layout -\begin_layout Standard -\align center -\begin_inset VSpace smallskip -\end_inset - - -\end_layout - \begin_layout Standard \align center \begin_inset Tabular @@ -5695,7 +5687,8 @@ Description \begin_inset Text \begin_layout Plain Layout -This function return a list of +This function will retrieve the needed information through the Car Manager + and it will return a list of \shape italic available \shape default @@ -6305,11 +6298,16 @@ Description \begin_inset Text \begin_layout Plain Layout -This function return a list of +This function will retrieve the needed information through the Car Manager + and it will return a list of \shape italic reservable \shape default - cars near the user's Location. + cars near the user's +\family typewriter +Location +\family default +. \end_layout \end_inset @@ -6504,7 +6502,11 @@ Car \family typewriter User \family default - instances passed as argument. + instances passed as argument, and notifies it to the +\family typewriter +User +\family default + through the Notification Manager. \end_layout \end_inset @@ -6691,7 +6693,11 @@ This function retrieves all the information about the \family typewriter Reservation \family default - instance passed as argument. + instance passed as argument, and shows them to the +\family typewriter +User +\family default + through the Notification Manager. \end_layout \end_inset @@ -6874,7 +6880,8 @@ This function terminates the current \family typewriter Reservation \family default -. +, notifies it to the user through the Notification Manager and sends a payment + request to the Payment Manager. \end_layout \end_inset @@ -7065,7 +7072,11 @@ Rent \family typewriter Reservation \family default - instance passed as argument. + instance passed as argument, and notifies it to the +\family typewriter +User +\family default + through the Notification Manager. \end_layout \end_inset @@ -7248,7 +7259,11 @@ This function retrieves all the information about the \family typewriter Rent \family default - instance passed as argument. + instance passed as argument, and shows them to the +\family typewriter +User +\family default + through the Notification Manager. \end_layout \end_inset @@ -7427,11 +7442,21 @@ Description \begin_inset Text \begin_layout Plain Layout -This function will check if all the conditions to end the +This function will check through the Car Manager if all the conditions to + end the \family typewriter Rent \family default - are respected (for example if nobody is still in the car, and so on..).. + are respected (for example if nobody is still in the car, and so on..) and + it will return +\family typewriter +true +\family default + if the rent is terminable, +\family typewriter +false +\family default + otherwise. \end_layout \end_inset @@ -7618,7 +7643,8 @@ This function terminates the current \family typewriter Rent \family default -. +, notifies it to the user through the Notification Manager and sends a payment + request to the Payment Manager. \end_layout \end_inset @@ -7810,7 +7836,7 @@ Description \begin_inset Text \begin_layout Plain Layout -This function notifies a message to the user. +This function is used to notify a message to the user. \end_layout \end_inset @@ -7946,10 +7972,6 @@ Main functions implemented by the Payment Manager \series default : -\begin_inset VSpace smallskip -\end_inset - - \end_layout \begin_layout Standard @@ -7997,20 +8019,14 @@ Description \begin_inset Text \begin_layout Plain Layout -This function will apply the fees for each +This function applies the fees for a \family typewriter Reservation \family default instance. - Actually, the user can terminate a reservation for free, but in the future - if PowerEnjoy would decide to apply a fee for the termination of a reservation, - it would be very easy to modify this value. - If the user picks up the car, his reservation terminates and the system - will create another instance -\family typewriter -Rent -\family default -: no fees will be applied to transform a reservation into a rent. + Now the user can terminate a reservation for free, but in the future if + PowerEnjoy would decide to apply a fee for the termination of a reservation, + it would be easy to modify this value. \end_layout \end_inset @@ -8110,7 +8126,7 @@ Reservation \begin_inset Text \begin_layout Plain Layout -A payment request to an external service is successfully sent for the +A payment request to an external service is sent for the \family typewriter User \family default @@ -8139,13 +8155,6 @@ Reservation \end_inset -\end_layout - -\begin_layout Standard -\begin_inset VSpace smallskip -\end_inset - - \end_layout \begin_layout Standard @@ -8193,15 +8202,12 @@ Description \begin_inset Text \begin_layout Plain Layout -This function will calculate the fees for each +This function calculates the fees for a \family typewriter Rent \family default - instance. - In this case we have to consider eventual discounts and other additional - fees before sending the payment request to the external payment service. - It would not be difficult in the future to change some parameters according - to the PowerEnjoy policy. + instance taking in account eventual discounts and other additional fees + before sending the payment request. \end_layout \end_inset @@ -8334,13 +8340,6 @@ Rent \end_inset -\end_layout - -\begin_layout Standard -\begin_inset VSpace smallskip -\end_inset - - \end_layout \begin_layout Standard @@ -8517,13 +8516,6 @@ Rent \end_inset -\end_layout - -\begin_layout Standard -\begin_inset VSpace smallskip -\end_inset - - \end_layout \begin_layout Standard