public final class CopyReport extends Object
Modifier and Type | Class and Description |
---|---|
static class |
CopyReport.CopyMode
Available copy mode
|
static class |
CopyReport.CopyState
The possible state of the copy
|
Modifier and Type | Field and Description |
---|---|
protected String |
_baseContentId
Identifier of the base content associated to this report
|
protected Boolean |
_baseContentIsReferenceTable
Indicates if the base content associated to this report is a a entry of a reference table (can be null if unavailable)
|
protected String |
_baseContentTitle
Title of the base content associated to this report (can be null if unavailable)
|
protected Map<String,Object> |
_contentReferenceValues
List of values (content id or list of content ids) to be set into
metadata of type content.
|
protected List<String> |
_copiedAttachments
List of paths (relative to the root attachment node of the target
content) of the copied attachments during the duplication
|
protected Map<ModifiableRichText,MetadataDefinition> |
_copiedRichTexts
List of copied rich text metadata during the duplication process
|
protected List<CopyReport> |
_innerReports
Child reports associated to this report.
|
protected List<I18nizableText> |
_metadataCopyErrors
List of metadata labels.
|
protected String |
_metadataSetName
Name of the metadata set associated to this report
|
protected String |
_metadataSetType
Type of the metadata set associated to this report
|
protected CopyReport.CopyMode |
_mode
The copy mode used during the copy (creation or edition)
|
protected Map<String,Integer> |
_repeatersInfo
List of info about repeaters to be used to perform the edition of content metadata
|
protected CopyReport.CopyState |
_state
The state of the copy
|
protected String |
_targetContentId
Identifier of the target content associated to this report
|
protected boolean |
_targetContentIsReferenceTable
Indicates if the target content associated to this report is a entry of a reference table
|
protected String |
_targetContentTitle
title of the target content associated to this report
|
Constructor and Description |
---|
CopyReport(String baseContentId,
Boolean baseContentIsRefTable,
String metadataSetName,
String metadataSetType,
CopyReport.CopyMode copyMode)
Constructor.
|
CopyReport(String baseContentId,
String baseContentTitle,
Boolean baseContentIsRefTable,
String metadataSetName,
String metadataSetType,
CopyReport.CopyMode copyMode)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
protected void |
addAttachment(String relPath)
Add an attachments to the copied attachments report list
|
protected void |
addContentReferenceValues(String metadataPath,
Object values)
Should be used to store the values of a content metadata.
|
protected void |
addRepeaterInfo(String metadataPath,
int entryCount)
Add repeater info to be able to perform an edition at the of the copy for content metadata
|
void |
addReport(CopyReport report)
Add a child report to the report.
|
protected void |
addRichText(ModifiableRichText richText,
MetadataDefinition definition)
Add a rich text to the list of copied rich texts.
|
String |
getBaseContentId()
Get the base content identifier
|
Boolean |
getBaseContentIsReferenceTable()
Is the base content a reference table entry ?
|
String |
getBaseContentTitle()
Get the base content title.
|
List<CopyReport> |
getChildReports()
Get the list of child copy reports.
|
protected Map<String,Object> |
getContentReferenceValuesMap()
Get the list content reference values
|
List<String> |
getCopiedAttachments()
Get the list of the copied attachments.
|
protected Map<ModifiableRichText,MetadataDefinition> |
getCopiedRichTexts()
Get the list of copied rich text metadata.
|
List<I18nizableText> |
getMetadataErrors()
Get the list of metadata errors during the copy.
|
String |
getMetadataSetName()
Get the name of the metadataset used for the copy.
|
String |
getMetadataSetType()
Get the type of the metadataset used for the copy.
|
CopyReport.CopyMode |
getMode()
Get the mode of the copy
|
protected Map<String,Integer> |
getRepeatersInfo()
Get the map of info about copied repeaters
|
CopyReport.CopyState |
getStatus()
Get the status of the copy
|
String |
getTargetContentId()
Get the target content identifier
|
boolean |
getTargetContentIsReferenceTable()
Is the target content a reference table entry?
|
String |
getTargetContentTitle()
Get the target content title
|
protected void |
notifyContentCopyError()
Notify that the copy ended with an error (except for metadata copy
error, where
notifyMetadataCopyError(I18nizableText) must be
used). |
protected void |
notifyContentCopySuccess()
Notify a copy success
|
protected void |
notifyContentCreation(String id,
String title,
boolean isRefTable)
Notify information about the target content to the report.
|
protected void |
notifyMetadataCopyError(I18nizableText label)
Notify a metadata copy error.
|
void |
setReferenceTable(boolean isRefTable)
Set whether the base content is a reference table's entry.
|
void |
setTargetContentTitle(String title)
Set the target content title.
|
protected final String _metadataSetName
protected final String _metadataSetType
protected final String _baseContentId
protected final String _baseContentTitle
protected Boolean _baseContentIsReferenceTable
protected final CopyReport.CopyMode _mode
protected String _targetContentId
protected String _targetContentTitle
protected boolean _targetContentIsReferenceTable
protected List<CopyReport> _innerReports
protected Map<ModifiableRichText,MetadataDefinition> _copiedRichTexts
protected List<String> _copiedAttachments
protected Map<String,Object> _contentReferenceValues
protected Map<String,Integer> _repeatersInfo
protected List<I18nizableText> _metadataCopyErrors
protected CopyReport.CopyState _state
public CopyReport(String baseContentId, Boolean baseContentIsRefTable, String metadataSetName, String metadataSetType, CopyReport.CopyMode copyMode)
baseContentId
- The content id of the base contentbaseContentIsRefTable
- Indicates if the base content is a reference table's entry (can be null if unavailable)metadataSetName
- The metadata set namemetadataSetType
- The metadata set type (edit or view)copyMode
- The mode of copypublic CopyReport(String baseContentId, String baseContentTitle, Boolean baseContentIsRefTable, String metadataSetName, String metadataSetType, CopyReport.CopyMode copyMode)
baseContentId
- The content id of the base contentbaseContentTitle
- The title of the base contentbaseContentIsRefTable
- Indicates if the base content is a reference table's entrymetadataSetName
- The metadata set namemetadataSetType
- The metadata set type (edit or view)copyMode
- The mode of copypublic void setReferenceTable(boolean isRefTable)
isRefTable
- true for reference table's entry.public void setTargetContentTitle(String title)
title
- The target content title.protected void notifyContentCreation(String id, String title, boolean isRefTable)
id
- The content idtitle
- The content titleisRefTable
- Indicates if the target content is a reference table's entry.protected void notifyContentCopySuccess()
protected void notifyContentCopyError()
notifyMetadataCopyError(I18nizableText)
must be
used).protected void notifyMetadataCopyError(I18nizableText label)
label
- The label of the metadataprotected void addRichText(ModifiableRichText richText, MetadataDefinition definition)
richText
- the rich textdefinition
- the metadata definitionprotected Map<ModifiableRichText,MetadataDefinition> getCopiedRichTexts()
ModifiableRichText
protected void addAttachment(String relPath)
relPath
- The relative path where to copyprotected void addContentReferenceValues(String metadataPath, Object values)
metadataPath
- The path of the metadata to copyvalues
- The valuesprotected Map<String,Object> getContentReferenceValuesMap()
protected void addRepeaterInfo(String metadataPath, int entryCount)
metadataPath
- The path of the metadata concernedentryCount
- the entry countprotected Map<String,Integer> getRepeatersInfo()
public CopyReport.CopyState getStatus()
public CopyReport.CopyMode getMode()
public String getMetadataSetName()
public String getMetadataSetType()
public String getBaseContentId()
public String getBaseContentTitle()
public Boolean getBaseContentIsReferenceTable()
public String getTargetContentId()
public String getTargetContentTitle()
public boolean getTargetContentIsReferenceTable()
public List<CopyReport> getChildReports()
public List<I18nizableText> getMetadataErrors()
public List<String> getCopiedAttachments()
public void addReport(CopyReport report)
report
- The report of the copy to add