-
Method Summary
-
Method Details
-
checkDate
boolean checkDate(java.lang.String date)
check if the appointment date is valid.
- Parameters:
date - date to check
- Returns:
- return true if the date is valid
-
createAppointment
boolean createAppointment(java.lang.String date,
java.lang.String time,
java.lang.String mail)
throws java.io.IOException,
java.util.concurrent.ExecutionException,
java.lang.InterruptedException
creates the appointment and makes it persistent in the database.
- Parameters:
date - appointment's date
time - appointment's mail
mail - appointment's applicant
- Returns:
- return true if the insertion is successful
- Throws:
java.io.IOException
java.util.concurrent.ExecutionException
java.lang.InterruptedException
-
removeAppointment
boolean removeAppointment(
Appointment appuntamneto)
throws
java.lang.InterruptedException,
java.util.concurrent.ExecutionException,
java.io.IOException
- Parameters:
appuntamneto - appointment to delete
- Returns:
- true if the appointment is successfully deleted
- Throws:
java.lang.InterruptedException
java.util.concurrent.ExecutionException
java.io.IOException
-
findAppointmentByDate
java.util.List<Appointment> findAppointmentByDate(
java.lang.String date)
throws
java.lang.InterruptedException,
java.util.concurrent.ExecutionException,
java.io.IOException
- Parameters:
date -
- Returns:
- return a list of appointments fixed on that date
- Throws:
java.lang.InterruptedException
java.util.concurrent.ExecutionException
java.io.IOException
-
checkAvailability
boolean checkAvailability(java.lang.String data,
java.lang.String time)
throws java.lang.IllegalArgumentException
- Parameters:
data - the data to check
time - the time to check
- Returns:
- true if it's possible to insert the data
- Throws:
java.lang.IllegalArgumentException
-
createAvailability
boolean createAvailability(
Availability availability)
throws
java.io.IOException
this method interact with the DAO to
insert the availability into database.
- Parameters:
availability - the availability to insert into database
- Returns:
- true if the availability is insert
- Throws:
java.io.IOException
-
getAvailabilityByDate
java.util.List<Availability> getAvailabilityByDate(
java.lang.String date)
throws
java.util.concurrent.ExecutionException,
java.io.IOException,
java.lang.InterruptedException
return the availability list from the date in input.
- Parameters:
date - the date to find the availability
- Returns:
- the availability list for this date.
- Throws:
java.util.concurrent.ExecutionException
java.io.IOException
java.lang.InterruptedException
-
removeAvailability
boolean removeAvailability(
Availability availability)
throws
java.io.IOException,
java.util.concurrent.ExecutionException,
java.lang.InterruptedException
enable to remove the availability.
- Parameters:
availability - the availability to remove
- Returns:
- true if the remove is done.
- Throws:
java.io.IOException
java.util.concurrent.ExecutionException
java.lang.InterruptedException
-
getAvailabilityByDateAndTime
Availability getAvailabilityByDateAndTime(
java.lang.String date,
int time)
throws
java.io.IOException,
java.lang.InterruptedException,
java.util.concurrent.ExecutionException
retrieve the availability with this time and date.
- Parameters:
date -
time -
- Returns:
- the availability that contains this time and date.
- Throws:
java.io.IOException
java.lang.InterruptedException
java.util.concurrent.ExecutionException