Class ImportReport
- java.lang.Object
-
- org.ametys.plugins.contentio.archive.ImportReport
-
public final class ImportReport extends Object
A report of an import ,whether it is a global, partial or unitary one.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classImportReport.ImportErrorAn error during an import, which can beaddedto anImportReport
-
Field Summary
Fields Modifier and Type Field Description private List<ImportReport.ImportError>_errors
-
Constructor Summary
Constructors Modifier Constructor Description ImportReport()Creates a new empty report.privateImportReport(Collection<ImportReport.ImportError> errors)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddError(ImportReport.ImportError error)Adds an error to this reportvoidaddFrom(ImportReport other)Adds all information (errors...) from the other report to this reportCollection<ImportReport.ImportError>getErrors()Gets an unmodifiable view of the errors of this reportstatic ImportReportunion(Collection<ImportReport> reports)Returns a newImportReportwhich is the union of the given onesstatic ImportReportunion(ImportReport... reports)Returns a newImportReportwhich is the union of the given ones
-
-
-
Field Detail
-
_errors
private List<ImportReport.ImportError> _errors
-
-
Constructor Detail
-
ImportReport
public ImportReport()
Creates a new empty report.
-
ImportReport
private ImportReport(Collection<ImportReport.ImportError> errors)
-
-
Method Detail
-
union
public static ImportReport union(Collection<ImportReport> reports)
Returns a newImportReportwhich is the union of the given ones- Parameters:
reports- The reports on which to build the union- Returns:
- a new
ImportReportwhich is the union of the given ones
-
union
public static ImportReport union(ImportReport... reports)
Returns a newImportReportwhich is the union of the given ones- Parameters:
reports- The reports on which to build the union- Returns:
- a new
ImportReportwhich is the union of the given ones
-
getErrors
public Collection<ImportReport.ImportError> getErrors()
Gets an unmodifiable view of the errors of this report- Returns:
- an unmodifiable view of the errors of this report
-
addError
public void addError(ImportReport.ImportError error)
Adds an error to this report- Parameters:
error- The error to add
-
addFrom
public void addFrom(ImportReport other)
Adds all information (errors...) from the other report to this report- Parameters:
other- The other report
-
-