Package dev.zemco.codegame.problems
Class ProblemService
java.lang.Object
dev.zemco.codegame.problems.ProblemService
- All Implemented Interfaces:
IProblemService
Implementation of business logic related to management of problems available to the application that uses
provided problem repository as source of problems.
Currently, this service only serves as isolation between data access layer and presentation layer.
- Author:
- Erik Zemčík
-
Constructor Summary
ConstructorsConstructorDescriptionProblemService(IProblemRepository problemRepository) Creates an instance ofProblemService. -
Method Summary
Modifier and TypeMethodDescriptionReturns all problems available to the application.
-
Constructor Details
-
ProblemService
Creates an instance ofProblemService.- Parameters:
problemRepository- problem repository to use as source of problems- Throws:
IllegalArgumentException- ifproblemRepositoryisnull
-
-
Method Details
-
getAllProblems
Description copied from interface:IProblemServiceReturns all problems available to the application.- Specified by:
getAllProblemsin interfaceIProblemService- Returns:
- unmodifiable list of problems
-