* This method deletes a content and also erases all the children and all versions.
*/
public void markForDeletion(ContentVO contentVO, Database db, boolean skipRelationCheck, boolean skipServiceBindings, boolean forceDelete, InfoGluePrincipal infogluePrincipal, Map<ContentVO, List<ReferenceBean>> contactPersons) throws ConstraintException, SystemException, Exception
{
Content content = null;
try
{
content = getContentWithId(contentVO.getContentId(), db);
}
catch(SystemException e)
{
return;
}
boolean notifyResponsibleOnReferenceChange = CmsPropertyHandler.getNotifyResponsibleOnReferenceChange();
Content parent = content.getParentContent();
if(parent != null)
{
Iterator childContentIterator = parent.getChildren().iterator();
while(childContentIterator.hasNext())
{
Content candidate = (Content)childContentIterator.next();
if(candidate.getId().equals(contentVO.getContentId()))
{
markForDeletionRecursive(content, childContentIterator, db, skipRelationCheck, skipServiceBindings, forceDelete, infogluePrincipal, contactPersons, notifyResponsibleOnReferenceChange);
}
}
}