Class ImportedObjectV2
- java.lang.Object
-
- com.atlassian.confluence.impl.backuprestore.restore.domain.ImportedObjectV2
-
- All Implemented Interfaces:
Serializable
public class ImportedObjectV2 extends Object implements Serializable
This is the replacement for legacycom.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 toExportableEntityInfo
instead.- Since:
- 7.20.0.
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ImportedObjectV2(ExportableEntityInfo exportableEntityInfo, Object id, Map<String,Object> propertyValueMap)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description ImportedObjectV2
clearValues(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
equals(Object obj)
static ImportedObjectV2
fromLegacyImportedObject(ImportedObject legacyImportedObject, ExportableEntityInfo exportableEntityInfo, EntityInfoSqlHelper entityInfoSqlHelper, HibernateMetadataHelper hibernateMetadataHelper)
Class<?>
getEntityClass()
ExportableEntityInfo
getEntityInfo()
Object
getFieldValue(String propertyName)
Returns the value of the propertyObject
getId()
Map<String,Object>
getPropertyValueMap()
int
hashCode()
ImportedObjectV2
overridePropertyValues(Object newId, Map<String,Object> propertiesToOverride)
Allows to replace some properties with new values.String
toString()
-
-
-
Constructor Detail
-
ImportedObjectV2
public ImportedObjectV2(ExportableEntityInfo exportableEntityInfo, Object id, Map<String,Object> propertyValueMap)
-
-
Method Detail
-
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
public ImportedObjectV2 clearValues(Collection<String> propertiesToClear)
Clears some values (for example, we can't persist them now due ot unresolved circular dependencies or some references are broken.
-
getEntityInfo
public ExportableEntityInfo getEntityInfo()
-
getFieldValue
public Object getFieldValue(String propertyName)
Returns the value of the property- Parameters:
propertyName
- property name- Returns:
- value the new value present or not.
-
getEntityClass
public Class<?> getEntityClass()
-
getId
public Object getId()
-
-