Interface ISolutionService
-
- All Known Subinterfaces:
IManagementService
public interface ISolutionServiceThe Interface ISolutionService.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description SolutionIdaddSolution(Solution solution, AffiliationId affiliationId)Adds the solution.voidassignUser(SolutionId solutionId, String userUUID)Assign user.voiddeleteSolution(SolutionId solutionId)Delete solution.SolutiongetSolution(SolutionId solutionId)Gets the solution.Set<Solution>getSolutions(AffiliationId affiliationId, boolean includeLocked)Set solutions.Set<Solution>getSolutions(String userId, boolean includeLocked)Set solutions.java.time.ZoneIdgetZoneId(SolutionId solutionId)Returns the timezone for the policy's solution.Set<SolutionId>listSolutions(AffiliationId affiliationId, boolean includeLocked)Set solutions.Set<SolutionId>listSolutions(String userId, boolean includeLocked)Set solutions.booleansolutionExists(SolutionId solutionId)Solution exists.voidunassignUser(SolutionId solutionId, String userUUID)Unassign user.voidupdateSolution(Solution solution)Update solution.
-
-
-
Method Detail
-
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
boolean solutionExists(SolutionId solutionId) throws IOException, InvalidEntityException
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 givenAffiliationIdis 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
java.time.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
-
-