Interface ISolutionService
- All Known Subinterfaces:
IManagementService
public interface ISolutionService
The Interface ISolutionService.
-
Method Summary
Modifier and TypeMethodDescriptionaddSolution
(Solution solution, AffiliationId affiliationId) Adds the solution.void
assignUser
(SolutionId solutionId, String userUUID) Assign user.void
deleteSolution
(SolutionId solutionId) Delete solution.getSolution
(SolutionId solutionId) Gets the solution.getSolutions
(AffiliationId affiliationId, boolean includeLocked) Set solutions.getSolutions
(String userId, boolean includeLocked) Set solutions.getZoneId
(SolutionId solutionId) Returns the timezone for the policy's solution.listSolutions
(AffiliationId affiliationId, boolean includeLocked) Set solutions.listSolutions
(String userId, boolean includeLocked) Set solutions.boolean
solutionExists
(SolutionId solutionId) Solution exists.void
unassignUser
(SolutionId solutionId, String userUUID) Unassign user.void
updateSolution
(Solution solution) Update solution.
-
Method Details
-
addSolution
SolutionId addSolution(Solution solution, AffiliationId affiliationId) throws IOException, ConflictingResourceException, ResourceUpdateException, InvalidEntityException, NoSuchEntityException Adds the solution.- Parameters:
solution
- the solutionaffiliationId
- the id of the affiliation the solution belongs to- Returns:
- the solution id of the newly added solution
- Throws:
IOException
- Signals that an I/O exception has occurred.ConflictingResourceException
- if there is already a solution with the given idResourceUpdateException
- if add is not successfulInvalidEntityException
- if the given solution or the fiven affiliation id is not validNoSuchEntityException
- if the affiliation does not exist
-
solutionExists
Solution exists.- Parameters:
solutionId
- the id of the solution to check- Returns:
- true, if successful
- Throws:
IOException
- Signals that an I/O exception has occurred.InvalidEntityException
- if the given solution id is not valid
-
updateSolution
void updateSolution(Solution solution) throws IOException, ResourceUpdateException, NoSuchEntityException, InvalidEntityException Update solution.- Parameters:
solution
- the solution- Throws:
IOException
- Signals that an I/O exception has occurred.ResourceUpdateException
- if update is not successfulNoSuchEntityException
- if there is no solution to updateInvalidEntityException
- if the given solution is not valid
-
getSolution
Solution getSolution(SolutionId solutionId) throws IOException, NoSuchEntityException, InvalidEntityException Gets the solution.- Parameters:
solutionId
- the solution component_id- Returns:
- the solution
- Throws:
IOException
- Signals that an I/O exception has occurred.NoSuchEntityException
- if there is no solution with the given idInvalidEntityException
- if the given solution id not valid
-
listSolutions
Set<SolutionId> listSolutions(AffiliationId affiliationId, boolean includeLocked) throws IOException, NoSuchEntityException, InvalidEntityException Set solutions.- Parameters:
affiliationId
- the affiliation idincludeLocked
- the include locked- Returns:
- the list
- Throws:
IOException
- Signals that an I/O exception has occurred.NoSuchEntityException
- if there is no affilition with the given idInvalidEntityException
- if the given affiliation id is not valid
-
getSolutions
Set<Solution> getSolutions(AffiliationId affiliationId, boolean includeLocked) throws IOException, NoSuchEntityException, InvalidEntityException Set solutions.- Parameters:
affiliationId
- the affiliation idincludeLocked
- the include locked- Returns:
- the list
- Throws:
IOException
- Signals that an I/O exception has occurred.NoSuchEntityException
- if there is no affilition with the given idInvalidEntityException
- if the givenAffiliationId
is not valiud
-
listSolutions
Set<SolutionId> listSolutions(String userId, boolean includeLocked) throws IOException, NoSuchEntityException Set solutions.- Parameters:
userId
- the user idincludeLocked
- the include locked- Returns:
- the list
- Throws:
IOException
- Signals that an I/O exception has occurred.NoSuchEntityException
- if there is no user with the given id
-
getSolutions
Set<Solution> getSolutions(String userId, boolean includeLocked) throws IOException, NoSuchEntityException Set solutions.- Parameters:
userId
- the user idincludeLocked
- the include locked- Returns:
- the list
- Throws:
IOException
- Signals that an I/O exception has occurred.NoSuchEntityException
- if there is no user with the given id
-
deleteSolution
void deleteSolution(SolutionId solutionId) throws IOException, ResourceUpdateException, NoSuchEntityException, InvalidEntityException Delete solution.- Parameters:
solutionId
- the solution id- Throws:
IOException
- Signals that an I/O exception has occurred.ResourceUpdateException
- if delete is not successfulNoSuchEntityException
- the no such element exceptionInvalidEntityException
- if the given solution id is not valid
-
assignUser
void assignUser(SolutionId solutionId, String userUUID) throws IOException, ResourceUpdateException, NoSuchEntityException, InvalidEntityException Assign user.- Parameters:
solutionId
- the solution iduserUUID
- the user component_id- Throws:
IOException
- Signals that an I/O exception has occurred.ResourceUpdateException
- if it was not possible to assign the user to the solutionNoSuchEntityException
- if there is no solution or user with the given idInvalidEntityException
- if the given solution id is not valid
-
unassignUser
void unassignUser(SolutionId solutionId, String userUUID) throws IOException, ResourceUpdateException, NoSuchEntityException, InvalidEntityException Unassign user.- Parameters:
solutionId
- the solution iduserUUID
- the user component_id- Throws:
IOException
- Signals that an I/O exception has occurred.ResourceUpdateException
- if it was not possible to unassign the user to the solutionNoSuchEntityException
- if there is no solution or user with the given idInvalidEntityException
- if the given solution id is not valid
-
getZoneId
ZoneId getZoneId(SolutionId solutionId) throws IOException, NoSuchEntityException, InvalidEntityException Returns the timezone for the policy's solution.- Parameters:
solutionId
- the solution id- Returns:
- ZoneId
- Throws:
IOException
- Signals that an I/O exception has occurred.NoSuchEntityException
- the no such element exceptionInvalidEntityException
- if the given solution id is not valid
-