Importing an XML file into an object store
This topic explains in general terms how Enterprise Manager assists with
the import process. (See Run the Import
Helper for specific instructions.) You start the import procedure from the
object store into which you want to import objects.
Updating objects
An important concept to keep in mind regarding the importing of objects is the concept of updates. The following object classes allow you to update the properties of an existing object instead of creating an entirely new object during an import:
- ClassDefinition
- PropertyTemplate
- ClassDefinition
- If the ID of an existing ClassDefinition on the target object store matches the ID of the ClassDefinition on the object being imported, the properties of the existing ClassDefinition are updated with the values of any matching properties on the object being imported. However, to utilize this update functionality the idmImportObjectId flag must be set on the import method otherwise a duplicate object exception is thrown. In other words, the import attempts to create new objects with the same symbolic names — violating a uniqueness constraint.
Properties that are updated, in the case of an ID match, which are not dependent object lists:
- AllowsInstances
- IsCBREnabled
- IsHidden
- Owner
- SymbolicName
- Properties that are updated, in the case of an ID match, which are dependent object lists:
- AuditDefinitions
- DescriptiveTexts
- DisplayNames
- Permissions
- PropertyDefinitions
-
All other properties are not updated.
- PropertyTemplate
- If the Id of an existing PropertyTemplate on the target objectstore matches the Id of the PropertyTemplate on the object being imported, the properties of the existing PropertyTemplate are updated with the values of any matching properties on the object being imported. However, to utilize this update functionality the idmImportObjectId flag must be set on the import method otherwise a duplicate object exception is thrown.
Properties that are updated, in the case of an ID match, which are not dependent object lists:
- IsHidden
- IsNameProperty
- IsValueRequired
- MaximumLengthBinary
- MaximumDateTime
- MaximumFloat64
- MaximumInteger32
- MaximumLengthString
- MinimumDateTime
- MinimumFloat64
- MinimumInteger32
- ModificationAccessRequired
- PropertyDefaultBinary
- PropertyDefaultBoolean
- PropertyDefaultDateTime
- PropertyDefaultFloat64
- PropertyDefaultInteger32
- PropertyDefaultId
- PropertyDefaultObject
- PropertyDefaultString
- PropertyDisplayCategory
- Settability
- SymbolicName
Properties that are updated, in the case of an ID match, which are dependent object lists:
- DescriptiveTexts
- DisplayNames
All other properties are not updated.
Note that there is special handling for some dependent object lists that are updated as part of an import:
- For LocalizedStringList (DescriptiveTexts & DisplayNames properties only): if a match is found between the LocaleName of a LocalizedString dependent object on the ClassDefinition target object, and the LocaleName of a LocalizedString in the ClassDefinition .xml object being imported, the existing dependent object is used and the LocalizedText property is updated. If no match exists between the two, then the import .xml LocalizedString object is added as a new object.
- For PropertyDefinition objects: if an existing PropertyDefinition is found, that definition is updated instead of a new PropertyDefinition being created.
- For Permissions: prior to updating an existing Permissions object, all AccessPermissions with a PermissionSource of Default or Direct are deleted and AccessPermissions in the import .xml file with a PermissionSource of Default or Direct are added to the Permissions object. The behavior of Permissions is not unique to ClassDefinition and PropertyTemplate objects – it works in this manner for all objects with permissions.
- AuditDefinitions have no special handling.
Import Helper
Enterprise Manager provides
the Import Helper tool that enables you to choose the XML file you want to import
and where you want to store the content. For example, you can choose to store
content in the object store's database or one of its file stores. During the import process, the Import Helper displays a status screen that
shows its progress. The Import Helper checks for duplicate components and does
not overwrite an existing object with a duplicate. When encountering a duplicate
object, the Import Helper records the duplicate entry as an error in a log file
and continues to import objects that haven't already been added to the object
store.
The Import Helper provides four tabs that help you define the objects imported,
as described below:
Import Options tab
The Import Options tab on the Import Helper dialog enables you to choose the
import file. This is an XML file that contains object store definitions created
through the Content Engine's export manifest. The Import Options tab also lets
you specify:
- where to save the content located outside of the XML file.
- the name and location of the log file used by the import utility to record
its progress.
- whether to append or overwrite an existing log file.
- which content store to save the imported objects, either in the database
store or one of its file stores.
- whether to import security settings when they are included in the XML file.
- whether to import the owner information when it is included in the XML file.
- whether to alert you about duplicate errors during the import process.
Import Items tab
The Import Helper's Import Items tab provides an expandable list of all objects
contained in the export file. This list also identifies those associated properties
that were not visible from the Enterprise Manager's tree view when you created
the XML files. By default, the Import Helper selects all objects associated
with each object type in the XML file.
You can de-select any of the associated objects you do not want to import into
your object store.
Scripts tab
The Import Helper's Scripts tab enables you to specify a sequence of scripts
to run at various points during the import process. For details, see Adding
scripts to the import process.
Advanced tab
The Advanced tab on the Import Helper dialog gives you more control over what
to import automatically. Based on the options you select on the Advanced tab,
you can import more than one object, even if only a single object was selected
on the Import Items tab. Clearing some associated objects may cause errors that
the system logs while importing the objects.