-
Method Summary
-
Method Details
-
registerRequest
boolean registerRequest(
RequiredTrainingPlan requiredTrainingPlan)
throws
java.io.IOException,
java.lang.IllegalArgumentException,
java.util.concurrent.ExecutionException,
java.lang.InterruptedException
This function gives the possibility to register an
user and his first request of TrainingPlan into the system.
- Parameters:
requiredTrainingPlan - request into the db
- Returns:
- true if is possible to insert the
account after the credentials check,
false when fails because email is just registered
- Throws:
java.io.IOException - //
java.lang.IllegalArgumentException - //
java.util.concurrent.ExecutionException
java.lang.InterruptedException
-
searchAccountByEmail
boolean searchAccountByEmail(java.lang.String email)
throws java.lang.InterruptedException,
java.util.concurrent.ExecutionException,
java.io.IOException
This service method checks if an account
exists in the RequiredTrainingPlan.
- Parameters:
email - referring to the account to search for
- Returns:
- true if the account exists, false if not
- Throws:
java.lang.InterruptedException
java.util.concurrent.ExecutionException
java.io.IOException
-
getAccountByEmail
RequiredTrainingPlan getAccountByEmail(
java.lang.String email)
throws
java.lang.InterruptedException,
java.util.concurrent.ExecutionException,
java.io.IOException
This method returns the account given its mail.
- Parameters:
email - referring to the account to search for
- Returns:
- the Account if it exists, null if not
- Throws:
java.lang.InterruptedException
java.util.concurrent.ExecutionException
java.io.IOException
-
changeRequest
boolean changeRequest(java.lang.String email,
int status)
throws java.io.IOException,
java.util.concurrent.ExecutionException,
java.lang.InterruptedException
This service method changes the status of an account.
- Parameters:
email - of the account
status - updated
- Returns:
- true after the change has taken place
- Throws:
java.io.IOException
java.util.concurrent.ExecutionException
java.lang.InterruptedException
-
getAllRequestes
java.util.ArrayList<RequiredTrainingPlan> getAllRequestes()
throws
java.lang.InterruptedException,
java.util.concurrent.ExecutionException,
java.io.IOException
this method gets all requests.
- Returns:
- AllRequests
- Throws:
java.lang.InterruptedException
java.util.concurrent.ExecutionException
java.io.IOException