I would like to share my experience on COLLECTION_MOVE_LOT service of Oracle UCM 10gR3. This is the service which we used for moving folders from one folder to another in our application.
There were few problems when we actually started implementing the move functionality.
First thing is that the folders that were moved and the documents under it did not inherit the metadata values from destination folder. They still retained the same metadata of the source location.
To overcome this issue, a new method was introduced at the end of all methods in COLLECTION_MOVE_LOT service. This new method's purpose is to update the metadata of the moved folders and documents as per the destination collection's metadata. For updation of metadata, we invoked the COLLECTION_UPDATE_META service from this new method.
Let me give an overview of the COLLECTION_UPDATE_META service. The COLLECTION_UPDATE_META service is used to propagate the inheritable metadata of the parent folder to all the child folders and documents under it. The propagation of the metadata to the documents is achieved by invoking the COLLECTION_UPDATE_ALL service from inside the code of the service COLLECTION_UPDATE_META.
So, when the COLLECTION_UPDATE_META service is used along with COLLECTION_MOVE_LOT to propagate the metadata of the destination folder on the folders that got moved, it introduced new problems.
One problem was that although the moved documents' metadata got updated, the web viewable files of all the documents were not physically relocated according to the destination location's account settings. So all the web-viewable files were not accessible after folder move operation. I solved this problem by commenting the code which was invoking the COLLECTION_UPDATE_ALL service and then invoked the UPDATE_DOCINFO service which updates the metadata of the documents plus physically moves the web-viewable files to the correct location.
The other problem was COLLECTION_UPDATE_META service, updates all the folders and documents under a specific folder. But our requirement was to update the metadata of only the folders that got moved and the documents under it. So we had to overwrite the setContentAsCollectionMetadata method which is the method that does the job for the service COLLECTION_UPDATE_META. I just wrote a small logic to propagate the destination folder's metadata only to the folders that got moved and the documents under it.
If you have some inputs, corrections or suggestions on this post, please leave a comment, so that I can improve my application.
Have a good day...