Documentation Center

Customizing the PutDoc Adapter’s Bust Callbacks

The callbacks in custom bust modules that you may override are described.

In general, SDL and SDL Contenta engineering discourages the customization of the bind and bust modules. However, with the introduction of PutDocDiffing it is now sometimes necessary to override one or more of the callbacks in custom bust modules. This section provides a short description of the callbacks in custom bust modules that you may override and explains how to override them with a new custom bust module that inherits from the existing custom bust modules.

pcm_prebust_doc_parse

Override this callback if you need to do document data clean-up work before the bust process starts. Any changes that you make here affects data that is imported to SDL Contenta, so use caution.

Study the pcm_prebust_doc_parse override in CustomBustEpicCat.pm to gain an understanding of how this can be used.

pcm_cmp_chunk
You should rarely need to override this callback.

It optionally, calls a subroutine to sort the attributes in alphabetical order on both the original and new chunk and then invokes pcm_normalize on each of the chunks before actually doing a string compare.

It returns 0 if the chunks are the same and 1 if a difference is detected.

pcm_normalize
This is the callback that is most likely to need customizing.

Called twice by pcm_cmp_chunk, once for original chunk and once for new chunk, the data passed in $string is never written back to the database. It is only used in pcm_cmp_chunk in a string comparison statement and then discarded.

This callback is well commented, making it fairly easy to understand what it is doing and how it is doing it.