Class ImportedObjectV2
java.lang.Object
com.atlassian.confluence.impl.backuprestore.restore.domain.ImportedObjectV2
- All Implemented Interfaces:
Serializable
This is the replacement for legacy
com.atlassian.confluence.importexport.xmlimport.model.ImportedObject
class.
An instance of the new class is created based on the legacy instance but excludes some
unnecessary data, plus includes the reference to ExportableEntityInfo
instead.- Since:
- 7.20.0.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionImportedObjectV2
(ExportableEntityInfo exportableEntityInfo, Object id, Map<String, Object> propertyValueMap) -
Method Summary
Modifier and TypeMethodDescriptionclearValues
(Collection<String> propertiesToClear) Clears some values (for example, we can't persist them now due ot unresolved circular dependencies or some references are broken.boolean
static ImportedObjectV2
fromLegacyImportedObject
(ImportedObject legacyImportedObject, ExportableEntityInfo exportableEntityInfo, EntityInfoSqlHelper entityInfoSqlHelper, HibernateMetadataHelper hibernateMetadataHelper) Class<?>
getFieldValue
(String propertyName) Returns the value of the propertygetId()
int
hashCode()
overridePropertyValues
(Object newId, Map<String, Object> propertiesToOverride) Allows to replace some properties with new values.toString()
-
Constructor Details
-
ImportedObjectV2
public ImportedObjectV2(ExportableEntityInfo exportableEntityInfo, Object id, Map<String, Object> propertyValueMap)
-
-
Method Details
-
fromLegacyImportedObject
public static ImportedObjectV2 fromLegacyImportedObject(ImportedObject legacyImportedObject, ExportableEntityInfo exportableEntityInfo, EntityInfoSqlHelper entityInfoSqlHelper, HibernateMetadataHelper hibernateMetadataHelper) throws ClassNotFoundException - Throws:
ClassNotFoundException
-
overridePropertyValues
public ImportedObjectV2 overridePropertyValues(Object newId, Map<String, Object> propertiesToOverride) Allows to replace some properties with new values. For example, if we generated the new ID or we need to change the references to other objects that have new ids. For example, we got a page from the XML document with id 7, but when we inserted it to the DB, it got value 28. So the new ID will become 28.- Parameters:
newId
- newly generated ID for the object.propertiesToOverride
- new values for references (if the referenced objects changed their ids).- Returns:
- the new immutable instance of ImportedObjectV2
-
clearValues
Clears some values (for example, we can't persist them now due ot unresolved circular dependencies or some references are broken. -
getEntityInfo
-
getFieldValue
Returns the value of the property- Parameters:
propertyName
- property name- Returns:
- value the new value present or not.
-
getEntityClass
-
getId
-
getPropertyValueMap
-
equals
-
hashCode
public int hashCode() -
toString
-