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 class
ImportReport.ImportError
An error during an import, which can beadded
to anImportReport
-
Constructor Summary
Constructors Constructor Description ImportReport()
Creates a new empty report.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addError(ImportReport.ImportError error)
Adds an error to this reportvoid
addFrom(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 ImportReport
union(Collection<ImportReport> reports)
Returns a newImportReport
which is the union of the given onesstatic ImportReport
union(ImportReport... reports)
Returns a newImportReport
which is the union of the given ones
-
-
-
Constructor Detail
-
ImportReport
public ImportReport()
Creates a new empty report.
-
-
Method Detail
-
union
public static ImportReport union(Collection<ImportReport> reports)
Returns a newImportReport
which is the union of the given ones- Parameters:
reports
- The reports on which to build the union- Returns:
- a new
ImportReport
which is the union of the given ones
-
union
public static ImportReport union(ImportReport... reports)
Returns a newImportReport
which is the union of the given ones- Parameters:
reports
- The reports on which to build the union- Returns:
- a new
ImportReport
which 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
-
-