I'm using SDL Tridion 2013 SP1.
I want to make a REST call for each Page item that's being deployed with a few page metadata values. For that I'm thinking about three options:
Creating a Storage Extension for the item type Page (JPAPageDAOImpl as the example page in Tridion online documentation) and inside make call to an external URL. My concern is if I can access page metadata in Storage Extension, if not, I'll need another approach.
Creating a new Storage Type (which wouldn't be storing anything just making the REST call. In this way I can keep clean the storing of the page in the database and in the configuration file add the new storage type to make the REST call. Again, my concern is if I can access page metadata in Storage Extension, if not, I'll need another approach.
For this one (2)...Can I have something like this?
<Item typeMapping="Page" storageId="database" /> <Item typeMapping="Page" storageId="MyCustomStorageId" />
So, for each page call both of those Storages. And if so, Will the second one (MyCustomStorageId) being called after to commit was completed in the database (in the previous step)?
- Creating a Deployer Extension (instead of Storage Extension). This options is less atomic than the previous two, so probably not the best one, again, my concern is if I can access page metadata in Storage Extension, if not, I'll need to go this approach.
I can see in the create method of JPABaseDAO that the commit is being called in there, so if I inherit from JPABaseDAO and call super in create method, I can be sure that the transaction was already committed (or an exception will be thrown).