if(notificationMessage.getClassName().equals(ContentImpl.class.getName()) || notificationMessage.getClassName().equals(Content.class.getName()))
{
ContentVO contentVO = ContentController.getContentController().getContentVOWithId((Integer)notificationMessage.getObjectId());
ContentTypeDefinitionVO ctdVO = null;
try
{
ctdVO = ContentTypeDefinitionController.getController().getContentTypeDefinitionVOWithId(contentVO.getContentTypeDefinitionId());
}
catch (SystemException sex)
{
logger.warn("Failed to get the content type definition for content with Id: " + contentVO.getContentId() + ". The content will not be indexed. Message: " + sex.getMessage());
logger.info("Failed to get the content type definition for content with Id: " + contentVO.getContentId(), sex);
}
if(ctdVO != null && ctdVO.getName().equals("Meta info"))
{
SiteNodeVO siteNodeVO = SiteNodeController.getController().getSiteNodeVOWithMetaInfoContentId(contentVO.getContentId());
NotificationMessage newNotificationMessage = new NotificationMessage("" + siteNodeVO.getName(), SiteNodeImpl.class.getName(), "SYSTEM", notificationMessage.getType(), siteNodeVO.getId(), "" + siteNodeVO.getName());
String key = "" + newNotificationMessage.getClassName() + "_" + newNotificationMessage.getObjectId() + "_" + "_" + newNotificationMessage.getType();
if(!existingSignatures.contains(key))
{
logger.info("++++++++++++++Got an META PAGE notification - just adding it AS A PAGE instead: " + newNotificationMessage.getObjectId());
baseEntitiesToIndexMessageList.add(newNotificationMessage);
existingSignatures.add(key);
}
else
{
logger.info("++++++++++++++Skipping Content notification - duplicate existed: " + notificationMessage.getObjectId());
}
}
else
{
String key = "" + notificationMessage.getClassName() + "_" + notificationMessage.getObjectId() + "_" + "_" + notificationMessage.getType();
if(!existingSignatures.contains(key))
{
logger.info("++++++++++++++Got an Content notification - just adding it: " + notificationMessage.getObjectId());
baseEntitiesToIndexMessageList.add(notificationMessage);
existingSignatures.add(key);
}
else
{
logger.info("++++++++++++++Skipping Content notification - duplicate existed: " + notificationMessage.getObjectId());
}
}
}
else if(notificationMessage.getClassName().equals(ContentVersionImpl.class.getName()) || notificationMessage.getClassName().equals(ContentVersion.class.getName()))
{
logger.info("++++++++++++++Got an ContentVersion notification - focus on content: " + notificationMessage.getObjectId());
ContentVersionVO contentVersionVO = ContentVersionController.getContentVersionController().getContentVersionVOWithId((Integer)notificationMessage.getObjectId());
ContentVO contentVO = ContentController.getContentController().getContentVOWithId(contentVersionVO.getContentId());
if(contentVO.getContentTypeDefinitionId() != null)
{
ContentTypeDefinitionVO ctdVO = null;
try
{
ctdVO = ContentTypeDefinitionController.getController().getContentTypeDefinitionVOWithId(contentVO.getContentTypeDefinitionId());
}
catch (SystemException sex)
{
logger.warn("Failed to get the content type definition for content with Id: " + contentVO.getContentId() + ". The content version will not be indexed. Message: " + sex.getMessage());
logger.info("Failed to get the content type definition for content with Id: " + contentVO.getContentId(), sex);
}
if(ctdVO != null && ctdVO.getName().equals("Meta info"))
{
SiteNodeVO siteNodeVO = SiteNodeController.getController().getSiteNodeVOWithMetaInfoContentId(contentVO.getContentId());
if (siteNodeVO == null)
{