List<EventVO> events = new ArrayList<EventVO>();
logger.info("publishedVersion:" + publishedVersion);
if(publishedVersion != null)
{
EventVO eventVO = new EventVO();
eventVO.setDescription("Moved page");
eventVO.setEntityClass(SiteNodeVersion.class.getName());
eventVO.setEntityId(publishedVersion.getId());
eventVO.setName(siteNode.getName());
eventVO.setTypeId(EventVO.MOVED);
eventVO = EventController.create(eventVO, newParentSiteNode.getRepository().getId(), principal);
events.add(eventVO);
}
logger.info("publishedVersionOldParent:" + publishedVersionOldParent);
if(publishedVersionNewParent != null)
{
EventVO eventVO = new EventVO();
eventVO.setDescription("New parent page");
eventVO.setEntityClass(SiteNodeVersion.class.getName());
eventVO.setEntityId(publishedVersionNewParent.getId());
eventVO.setName(newParentSiteNode.getName());
eventVO.setTypeId(EventVO.PUBLISH);
eventVO = EventController.create(eventVO, newParentSiteNode.getRepository().getId(), principal);
events.add(eventVO);
}
logger.info("publishedVersionOldParent:" + publishedVersionOldParent);
if(publishedVersionOldParent != null)
{
EventVO eventVO = new EventVO();
eventVO.setDescription("Move page");
eventVO.setEntityClass(SiteNodeVersion.class.getName());
eventVO.setEntityId(publishedVersionOldParent.getId());
eventVO.setName(oldParentSiteNode.getName());
eventVO.setTypeId(EventVO.PUBLISH);
eventVO = EventController.create(eventVO, oldParentSiteNode.getRepository().getId(), principal);
events.add(eventVO);
}
/*