I have deployer extension configured for my deployer which is written in java version 6. As and when we publish any component, we have a customised logic in deployer extension that PDF file should be generated based on component presentation HTML content and that PDF file is named on value of one of the component's fields.

So, while unpublishing, is it possible to get the values of fields of the component being unpublished? I checked the package zip file that gets generated when a component is unpublished, it contains only two files 'transaction.xml' and 'instructions.xml' which have very limited information.

I also tried to get the component by using tridion content delivery API but problem is that though I am able to get the component tcm id, I am unable to get the component object itself based on component tcm id. And also, I observed that some meta datas and meta data files which are present inside the package zip file which is generated on publishing component, the same are not present in the package zip file which is generaeted on unpublishing component.

So, is there any way by which we can get the component object using tridion java content delivery API on unpubishing of component??

1 Answer 1


Tridion does not publish Components, it publishes Component Presentations, which is a very different beast in nature. If you use an implementation like DD4T then you do have access to the content of the component, but in most "standard" implementations you will have an HTML representation of the content, not a data structure.

With that said, it sounds normal to me that at unpublish time Tridion does not include the component's content - it's just an instruction to remove data, so why would it send the data again?

If the item is published then you should be able to use the standard Content Delivery APIs to retrieve that object (remember: Component Presentation) from the database before it is removed.

If you really need access to the component, then consider using the CM-side: Event System provides quite some hooks for publish transactions (but then we're talking c#/.NET).

UPDATE (Untested) Sample code to retrieve a (dynamic) component Presentation

ComponentMetaFactory cmf = new ComponentMetaFactory(publicationId);
ComponentMeta meta = cmf.getMeta(componentId);
  • Hi Nuno, I already had doubt that we wouldn't get contents of component on unpublishing, thanks for confirmation. I would be using standard content delivery API as suggested by you. Could you provide me any reference link if you have which has java code for getting Component meta data content provided I have component tcm id using standard content delivery java API Apr 25, 2014 at 7:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.