}
else if(object.getClass().getName().equals(ContentVersionImpl.class.getName()))
{
try
{
ContentVersionImpl contentVersion = (ContentVersionImpl)object;
if(contentVersion.getOwningContent().getContentTypeDefinition() == null || (
contentVersion.getOwningContent().getContentTypeDefinition().getName().equalsIgnoreCase("HTMLTemplate") ||
contentVersion.getOwningContent().getContentTypeDefinition().getName().equalsIgnoreCase("PagePartTemplate")))
{
ComponentController.getController().reIndexComponentContentsDelayed(contentVersion.getOwningContent().getId());
}
CacheController.clearCacheForGroup("registryCache", "" + ("org.infoglue.cms.entities.content.ContentVersion_" + getObjectIdentity(object)).hashCode());
//CacheController.clearCacheForGroup("childContentCache", "content_" + contentVersion.getOwningContent().getId());
CacheController.clearCacheForGroup("childContentCache", "content_" + contentVersion.getOwningContent().getId());
if(contentVersion.getOwningContent().getValueObject().getParentContentId() != null)
CacheController.clearCacheForGroup("childContentCache", "content_" + contentVersion.getOwningContent().getValueObject().getParentContentId());
CacheController.clearCacheForGroup("contentVersionCache", "content_" + contentVersion.getOwningContent().getId());
CacheController.clearCacheForGroup("contentVersionCache", "contentVersion_" + contentVersion.getId());
CacheController.clearCacheForGroup("contentAttributeCache", "content_" + contentVersion.getContentId());
}
catch (Exception e)
{
logger.warn("Error in JDOCallback:" + e.getMessage(), e);
}
clearCache(MediumContentVersionImpl.class);
clearCache(SmallContentVersionImpl.class);
clearCache(SmallestContentVersionImpl.class);
}
else if(object.getClass().getName().equals(MediumContentVersionImpl.class.getName()))
{
try
{
ContentTypeDefinitionVO htmlTemplateMetaInfoCTDVO = ContentTypeDefinitionController.getController().getContentTypeDefinitionVOWithName("HTMLTemplate");
ContentTypeDefinitionVO pagePartTemplateMetaInfoCTDVO = ContentTypeDefinitionController.getController().getContentTypeDefinitionVOWithName("PagePartTemplate");
MediumContentVersionImpl contentVersion = (MediumContentVersionImpl)object;
ContentVO contentVO = ContentController.getContentController().getContentVOWithId(contentVersion.getContentId(), true);
if(contentVO.getContentTypeDefinitionId() == null || (
contentVO.getContentTypeDefinitionId().equals(htmlTemplateMetaInfoCTDVO.getId()) ||
contentVO.getContentTypeDefinitionId().equals(pagePartTemplateMetaInfoCTDVO.getId())))
{
ComponentController.getController().reIndexComponentContentsDelayed(contentVersion.getContentId());
}
CacheController.clearCacheForGroup("registryCache", "" + ("org.infoglue.cms.entities.content.ContentVersion_" + getObjectIdentity(object)).hashCode());
CacheController.clearCacheForGroup("childContentCache", "content_" + contentVO.getId());
if(contentVO.getParentContentId() != null)
CacheController.clearCacheForGroup("childContentCache", "content_" + contentVO.getParentContentId());
CacheController.clearCacheForGroup("contentVersionCache", "content_" + contentVersion.getContentId());
CacheController.clearCacheForGroup("contentVersionCache", "contentVersion_" + contentVersion.getId());
CacheController.clearCacheForGroup("contentAttributeCache", "content_" + contentVersion.getContentId());
}
catch (Exception e)
{
logger.warn("Error in JDOCallback:" + e.getMessage());
}