I am just starting to investigate the Courier API / documentation / etc as I am looking to write a limited transfer system.
It needs to deal with one section / document type (at least, currently it does!) and transfer only one way. This woud be an automated process. Also I only want to transfer documents, their data and media (images, PDFs, video). I do not want to copy datatypes, templates, etc via this system.
So, how hard does that sound?! :-) Is it all perfectly easily achievable with the API? All comments and suggestions welcome.
Unfortunately, it does look like I will need to write a custom Item provider as the site has one custom built data type.
The RevisionPackaging/RevisionExtractopm has a Filters property, which allows you to add Item and provider ids you wish for it to ignore
And, finally you also want it to only transfer documents of a certain type. You will need to implement a simple dataresolver to cancel out anythign that is not of that type.
For custom data type, it all depends on how the data is stored, and referenced, to actually determine if you need a custom provider, but I doubt that you can't just use a simple resolver for this as well.
The "custom" datatype is extremely similar to the "Auto Complete" component from uComponents ... I need to investigate more to find out what it does with it's data.
Program to transfer from A to B using API
I am just starting to investigate the Courier API / documentation / etc as I am looking to write a limited transfer system.
It needs to deal with one section / document type (at least, currently it does!) and transfer only one way. This woud be an automated process. Also I only want to transfer documents, their data and media (images, PDFs, video). I do not want to copy datatypes, templates, etc via this system.
So, how hard does that sound?! :-) Is it all perfectly easily achievable with the API? All comments and suggestions welcome.
Unfortunately, it does look like I will need to write a custom Item provider as the site has one custom built data type.
Hi Gordon
Yeah its doable, check the source code for the ExtractionConsole, that basicly does the transfer part for you.
Now you also want filtering of the items you want to to transfer, which you can also do.
http://nightly.umbraco.org/UmbracoCourier/samples/Umbraco.Courier.ConsoleApplicationSource.zip ;
The RevisionPackaging/RevisionExtractopm has a Filters property, which allows you to add Item and provider ids you wish for it to ignore
And, finally you also want it to only transfer documents of a certain type. You will need to implement a simple dataresolver to cancel out anythign that is not of that type.
For custom data type, it all depends on how the data is stored, and referenced, to actually determine if you need a custom provider, but I doubt that you can't just use a simple resolver for this as well.
http://nightly.umbraco.org/UmbracoCourier/Data%20Resolvers.pdf
Thanks for the pointers, Per.
The "custom" datatype is extremely similar to the "Auto Complete" component from uComponents ... I need to investigate more to find out what it does with it's data.
is working on a reply...