Package africa.absa.inception.error
Interface IErrorService
- All Known Implementing Classes:
ErrorService
public interface IErrorService
The IErrorService interface defines the functionality provided by an Error Service
implementation.
- Author:
- Marcus Portmann
-
Method Summary
Modifier and TypeMethodDescriptionvoidcreateErrorReport(ErrorReport errorReport) Create the new entry for the error report in the database.getErrorReport(UUID errorReportId) Retrieve the error report.getErrorReportSummaries(String filter, ErrorReportSortBy sortBy, SortDirection sortDirection, Integer pageIndex, Integer pageSize) Retrieve the error report summaries.getErrorReportSummary(UUID errorReportId) Retrieve the summary for the error report.getMostRecentErrorReportSummaries(int maximumNumberOfEntries) Retrieve the summaries for the most recent error reports.
-
Method Details
-
createErrorReport
void createErrorReport(ErrorReport errorReport) throws InvalidArgumentException, ServiceUnavailableException Create the new entry for the error report in the database.- Parameters:
errorReport- the ErrorReport instance containing the information for the error report- Throws:
InvalidArgumentException- if an argument is invalidServiceUnavailableException- if the error report could not be created
-
getErrorReport
ErrorReport getErrorReport(UUID errorReportId) throws InvalidArgumentException, ErrorReportNotFoundException, ServiceUnavailableException Retrieve the error report.- Parameters:
errorReportId- the ID for the error report- Returns:
- the error report
- Throws:
InvalidArgumentException- if an argument is invalidErrorReportNotFoundException- if the error report could not be foundServiceUnavailableException- if the error report could not be retrieved
-
getErrorReportSummaries
ErrorReportSummaries getErrorReportSummaries(String filter, ErrorReportSortBy sortBy, SortDirection sortDirection, Integer pageIndex, Integer pageSize) throws InvalidArgumentException, ServiceUnavailableException Retrieve the error report summaries.- Parameters:
filter- the optional filter to apply to the error reportssortBy- the optional method used to sort the error reports e.g. by who submitted themsortDirection- the optional sort direction to apply to the error reportspageIndex- the optional page indexpageSize- the optional page size- Returns:
- the error report summaries
- Throws:
InvalidArgumentException- if an argument is invalidServiceUnavailableException- if the error report summaries could not be retrieved
-
getErrorReportSummary
ErrorReportSummary getErrorReportSummary(UUID errorReportId) throws InvalidArgumentException, ErrorReportNotFoundException, ServiceUnavailableException Retrieve the summary for the error report.- Parameters:
errorReportId- the ID for the error report- Returns:
- the summary for the error report
- Throws:
InvalidArgumentException- if an argument is invalidErrorReportNotFoundException- if the error report could not be foundServiceUnavailableException- if the error report summary could not be retrieved
-
getMostRecentErrorReportSummaries
List<ErrorReportSummary> getMostRecentErrorReportSummaries(int maximumNumberOfEntries) throws InvalidArgumentException, ServiceUnavailableException Retrieve the summaries for the most recent error reports.- Parameters:
maximumNumberOfEntries- the maximum number of summaries for the most recent error reports to retrieve- Returns:
- the summaries for the most recent error reports
- Throws:
InvalidArgumentException- if an argument is invalidServiceUnavailableException- if the most recent error report summaries could not be retrieved
-