class CatalogServiceImpl extends BasicManager implements UserDataDeletable, Initializable, CatalogService {

    @Override
    public void deleteCatalogEntry(final CatalogEntry ce) {
        log.debug("deleteCatalogEntry start... ce=" + ce);
        if (ce.getType() == CatalogEntry.TYPE_LEAF) {
            // delete catalog entry, then delete owner group
            final SecurityGroup owner = ce.getOwnerGroup();
            catalogDao.deleteCatalogEntry(ce);
            if (owner != null) {
                log.debug("deleteCatalogEntry case_1: delete owner-group=" + owner);
                securityManager.deleteSecurityGroup(owner);
            }
        } else {
            final List secGroupsToBeDeleted = new ArrayList();
            // FIXME pb: the transaction must also include the deletion of the security
            // groups. Why not using this method as a recursion and seperating the
            // deletion of the ce and the groups by collecting the groups? IMHO there
            // are not less db queries. This way the code is much less clear, e.g. the method
            // deleteCatalogSubtree does not really delete the subtree, it leaves the
            // security groups behind. I would preferre to have one delete method that
            // deletes its children first by calling itself on the children and then deletes
            // itself ant its security group. The nested transaction that occures is actually
            // not a problem, the DB object can handel this.
            deleteCatalogSubtree(ce, secGroupsToBeDeleted);
            // after deleting all entries, delete all secGroups corresponding
            for (final Iterator iter = secGroupsToBeDeleted.iterator(); iter.hasNext();) {
                final SecurityGroup grp = (SecurityGroup) iter.next();
                log.debug("deleteCatalogEntry case_2: delete groups of deleteCatalogSubtree grp=" + grp);
                securityManager.deleteSecurityGroup(grp);
            }
        }
        log.debug("deleteCatalogEntry END");
    }

    private  CatalogServiceImpl();
      CatalogServiceImpl(CatalogDao catalogDao, BaseSecurity securityManager, BookmarkService bookmarkService, DeletionModule deletionModule);

}