Documentation Center

Configuring an import

By setting import properties, you can configure several aspects of your import process. Refer to the API reference documentation for the ImportInstruction class for more information.

Procedure

  1. You can restrict which types of application data the service should import by enumerating the IDs of the application data categories you do want to import. By default, all application data in the import package are imported.
  2. You can make it possible to undo this import after it has finished successfully. Doing so will slow down the import process.
  3. You can provide a description for this import.
  4. You can make the import attempt to discover potential import problems before starting the import. Doing so will slow down the import process.
  5. To configure how errors should be handled, you can configure the service to abort the process, skip the item that causes the error, or let your custom code decide how to handle the error.
  6. You can configure one of three increasing logging levels.
  7. If you are importing Publications that are part of a BluePrint hierarchy, you can instruct the import to take care of BluePrint mapping.
  8. By default, the import is transactional; that is, the import can be rolled back in the event of an error. You can disable this behavior. Disabling transactional import is necessary if you want to handle errors in another way than aborting the process after the first error.
  9. If the items you import are not valid against their Schema or Schemas as found on the import system, you can configure if and how the import attempts to synchronize such items against their Schema or Schemas by setting or clearing a set of flags. The following sychronization behavior can be switched on or off:
    • Basic synchronization, such as reordering fields.
    • Setting the namespace of an item to that of the Schema.
    • Removing all fields in the item that are not in the Schema.
    • Removing all values from a multivalue field in the item that exceed the number of allowed values for the field as specified in the Schema.
    • Adding fields that are missing from the item but present and mandatory in the Schema, and setting them to their specified default value. Import fails if you clear this flag and the import item is missing one or more mandatory fields. Import also fails if you set this flag, but no default value is specified for the missing mandatory field.
    • Adding fields that are missing from the item but present and optional in the Schema, and sets them to their specified default value, if specified.
    • Applying an XSLT transformation to an XHTML field in an import item, if such an XSLT transformation is associated with the field in the Schema.
    • Converting the data type of a field in the import item to the data type of the field in the Schema, if the two do not match.
    • All of the above.
  10. You can configure the import to apply mappings to the items you import by setting an API property, but also by including a mappings.xml in the import package. If two conflicting mappings are found in that file and in the property, the mapping specified in this property overrides the one in the file.