Class AdministratorAdapter
java.lang.Object
com.montytskyi.Userables.Implementations.AdministratorAdapter
-
Constructor Summary
ConstructorsConstructorDescriptionAdministratorAdapter
(Administrator administrator) The constructor of the adapter which applies the Administrator using dependency injection -
Method Summary
Modifier and TypeMethodDescriptionvoid
cancelRent
(Rentable currentRent) The implemented method from the interface Userable which provides the administrator an ability to cancel an existing user's rentvoid
The implemented method from the interface Userable which provides the administrator an ability to edit a rent recently created by the uservoid
payForRent
(Rentable currentRent) The implmenented method from the interface Userable which implements payment process for the userThe implemented method from the interface Userable which implements renting the place for the uservoid
setUserToService
(Userable user) The method which allows to set the specific user who will be serviced by the administrator
-
Constructor Details
-
AdministratorAdapter
The constructor of the adapter which applies the Administrator using dependency injection- Parameters:
administrator
- - the administrator which will manage the system
-
-
Method Details
-
setUserToService
The method which allows to set the specific user who will be serviced by the administrator- Parameters:
user
- , which are going to be serviced
-
rent
The implemented method from the interface Userable which implements renting the place for the user -
payForRent
The implmenented method from the interface Userable which implements payment process for the user- Specified by:
payForRent
in interfaceUserable
- Parameters:
currentRent
- - Rentable, which represents the current rent bill of the user
-
cancelRent
The implemented method from the interface Userable which provides the administrator an ability to cancel an existing user's rent- Specified by:
cancelRent
in interfaceUserable
- Parameters:
currentRent
- - Rentable, which represents an existing user's rent
-
editRent
The implemented method from the interface Userable which provides the administrator an ability to edit a rent recently created by the user
-