Class ExportReport
java.lang.Object
org.ametys.plugins.odfsync.export.ExportReport
The report for an export to an external connector (Pégase, Apogée...)
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic enum
The status of the exportstatic enum
Problem types that we can encounter -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addElementExported
(Content element) Add an element to the element exportedvoid
addInvalidDataPath
(Content content, I18nizableText invalidMessage) Add invalid model item for a contentGetter of the code of the parent programGet the content in which the report is basedGet the structure implementation.Get the invalid data by contentint
Getter of nbExportedint
Getter of _nbNotExportedint
Getter of nbPartiallyExportedGetter of _problemsEncounteredGet the export statusint
Getter of the version of the parent programvoid
setCodeAndVersion
(String codeParentProgram, int versionParentProgram) Sets the code and version of the parent programvoid
setExportStructure
(AbstractExportStructure structure) Set the structure implementation.void
setNbTotal
(int nbTotal) setter of _nbTotalvoid
setStatus
(ExportReport.ExportStatus status) Set the export statusvoid
updateExportReport
(ExportReport.ExportStatus exportStatusWanted, ExportReport.ProblemTypes problemEncountered) Update the export report by setting the status and problem encounteredvoid
updateExportReport
(ExportReport.ExportStatus exportStatusWanted, ExportReport.ProblemTypes problemEncountered, Content content) Update the export report by setting the status, problemsEncountered and removing content from elementExported and adding it to elementPartlyExportedvoid
Update the export status
-
Constructor Details
-
ExportReport
The constructor- Parameters:
content
- The content on which the report is based
-
-
Method Details
-
getContent
Get the content in which the report is based- Returns:
- a content
-
getInvalidDataPathByContent
Get the invalid data by content- Returns:
- the map of invalid data by content
-
addInvalidDataPath
Add invalid model item for a content- Parameters:
content
- the contentinvalidMessage
- the model item
-
getExportStructure
Get the structure implementation.- Returns:
- the structure implementation
-
setExportStructure
Set the structure implementation.- Parameters:
structure
- the structure implementation.
-
getStatus
Get the export status- Returns:
- the export status
-
setStatus
Set the export status- Parameters:
status
- the export status
-
getNbExported
Getter of nbExported- Returns:
- The number of element exported
-
getNbPartlyExported
Getter of nbPartiallyExported- Returns:
- The number of partly exported element
-
getNbNotExported
Getter of _nbNotExported- Returns:
- The number of element not exported
-
setNbTotal
setter of _nbTotal- Parameters:
nbTotal
- The number
-
getProblemsEncountered
Getter of _problemsEncountered- Returns:
- The problems encountered
-
setCodeAndVersion
Sets the code and version of the parent program- Parameters:
codeParentProgram
- The codeversionParentProgram
- The version
-
getCodeParentProgram
Getter of the code of the parent program- Returns:
- the code of the parent program
-
getVersionParentProgram
Getter of the version of the parent program- Returns:
- the version of the parent program
-
addElementExported
Add an element to the element exported- Parameters:
element
- The element to add
-
updateStatus
Update the export status- Parameters:
status
- The export status wanted
-
updateExportReport
public void updateExportReport(ExportReport.ExportStatus exportStatusWanted, ExportReport.ProblemTypes problemEncountered) Update the export report by setting the status and problem encountered- Parameters:
exportStatusWanted
- The export status wantedproblemEncountered
- The problem encountered
-
updateExportReport
public void updateExportReport(ExportReport.ExportStatus exportStatusWanted, ExportReport.ProblemTypes problemEncountered, Content content) Update the export report by setting the status, problemsEncountered and removing content from elementExported and adding it to elementPartlyExported- Parameters:
exportStatusWanted
- The export status wantedproblemEncountered
- The problem encounteredcontent
- The content at cause
-