Is it possible to use the core service to copy items from one publication to another?
I have a scenario where I need to copy SGs and pages to a new publication, and whilst doing this loop through each page in the SG, checking every component on each page and copy them to a different parent publication IF the content hasn't already been created there.
So basically:
- Loop through SG's (keep a note of SG metadata)
- Check for pages in SG (keep a note of page metadata and component presentations)
- Check through each component in found pages
- If any of the components haven't been created at PublicationA, create a copy of them to PublicationA
- After doing this, create a copy of all the SG's and Pages found and dump them into a new publication (PublicationB) keeping all the mappings with the SG metadata (if exists), and pages (with page metadata if exists and component presentations)
I'm currently looking through the documentation but if anybody could tell me if something like this is possible it would really help me out.
EDIT
One thing I've forgot to ask here is if it's possible to add component presentations to pages after creating them via the core service? We know from Bart and Nuno's replies that pages can be created but can CPs also be "re-added" whilst looking at an existing page?