public void repairCategories(CmsDbContext dbc, CmsUUID projectId, CmsResource resource) throws CmsException {

        CmsObject cms = OpenCms.initCmsObject(new CmsObject(getSecurityManager(), dbc.getRequestContext()));
        cms.getRequestContext().setSiteRoot("");
        cms.getRequestContext().setCurrentProject(readProject(dbc, projectId));
        CmsCategoryService.getInstance().repairRelations(cms, resource);
    }
public void repairCategories ( CmsDbContext dbc , CmsUUID projectId , CmsResource resource ) throws CmsException { CmsObject cms = OpenCms . initCmsObject ( new CmsObject ( getSecurityManager ( ) , dbc . getRequestContext ( ) ) ) ; cms . getRequestContext ( ) . setSiteRoot ( "" ) ; cms . getRequestContext ( ) . setCurrentProject ( readProject ( dbc , projectId ) ) ; CmsCategoryService . getInstance ( ) . repairRelations ( cms , resource ) ; }
Repairs broken categories.<p>

@param dbc the database context
@param projectId the project id
@param resource the resource to repair the categories for

@throws CmsException if something goes wrong