Class ImportedObjectV2

  • All Implemented Interfaces:
    Serializable

    public class ImportedObjectV2
    extends Object
    implements 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:
    Serialized Form
    • Method Detail

      • 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.
      • 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()
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object