We have a Storage Extension
deployed at SDL Docs Delivery (DXD)
end. The extension has a "MyCustomComponentPresentationDAO " class extending "JPAComponentPresentationDAO" class.
The class has overridden methods Create and Remove. When I publish a publication the "Create" method is called as expected but during un-publishing, "Remove" method doesn't trigger.
Any idea about this strange behavior?
Below is is the code I am using:
public class MyCustomComponentPresentationDAO extends JPAComponentPresentationDAO implements ComponentPresentationDAO
{
public MyCustomComponentPresentationDAO(String storageId, EntityManagerFactory entityManagerFactory,
String storageType) {
super(storageId, entityManagerFactory, storageType);
log.debug("Constructor V 1 called");
}
public MyCustomComponentPresentationDAO(String storageId, EntityManagerFactory entityManagerFactory,
EntityManager entityManager, String storageType) {
super(storageId, entityManagerFactory, entityManager, storageType);
log.debug("Constructor V 2 called");
}
@Override
public void create(ComponentPresentation itemToCreate, ComponentPresentationTypeEnum componentPresentationType)
{
log.debug("Create Method Called for the Component");
}
@Override
public void remove(int publicationId, int componentId, int componentTemplateId, ComponentPresentationTypeEnum componentPresentationType)
{
log.debug("Remove Method Called for the Component");
}
@Override
public void remove(ComponentPresentation itemToRemove, ComponentPresentationTypeEnum componentPresentationType) throws StorageException {
log.debug("1.Remove Method Called for the Component");
}
}