public static String getDefaultSearchTypes(CmsObject cms, CmsResource resource) {

        StringBuffer result = new StringBuffer();
        String referenceSitePath = cms.getSitePath(resource);
        String configPath;
        if (resource == null) {
            // not sure if this can ever happen?
            configPath = cms.addSiteRoot(cms.getRequestContext().getUri());
        } else {
            configPath = resource.getRootPath();
        }
        CmsADEConfigData config = OpenCms.getADEManager().lookupConfiguration(cms, configPath);
        Set<String> detailPageTypes = OpenCms.getADEManager().getDetailPageTypes(cms);
        for (CmsResourceTypeConfig typeConfig : config.getResourceTypes()) {
            String typeName = typeConfig.getTypeName();
            if (!detailPageTypes.contains(typeName)) {
                continue;
            }
            if (typeConfig.checkViewable(cms, referenceSitePath)) {
                result.append(typeName).append(",");
            }
        }
        result.append(CmsResourceTypeXmlContainerPage.getStaticTypeName()).append(",");
        result.append(CmsResourceTypeBinary.getStaticTypeName()).append(",");
        result.append(CmsResourceTypeImage.getStaticTypeName()).append(",");
        result.append(CmsResourceTypePlain.getStaticTypeName());
        return result.toString();
    }
public static String getDefaultSearchTypes ( CmsObject cms , CmsResource resource ) { StringBuffer result = new StringBuffer ( ) ; String referenceSitePath = cms . getSitePath ( resource ) ; String configPath ; if ( resource == null ) { configPath = cms . addSiteRoot ( cms . getRequestContext ( ) . getUri ( ) ) ; } else { configPath = resource . getRootPath ( ) ; } CmsADEConfigData config = OpenCms . getADEManager ( ) . lookupConfiguration ( cms , configPath ) ; Set < String > detailPageTypes = OpenCms . getADEManager ( ) . getDetailPageTypes ( cms ) ; for ( CmsResourceTypeConfig typeConfig : config . getResourceTypes ( ) ) { String typeName = typeConfig . getTypeName ( ) ; if ( ! detailPageTypes . contains ( typeName ) ) { continue ; } if ( typeConfig . checkViewable ( cms , referenceSitePath ) ) { result . append ( typeName ) . append ( "," ) ; } } result . append ( CmsResourceTypeXmlContainerPage . getStaticTypeName ( ) ) . append ( "," ) ; result . append ( CmsResourceTypeBinary . getStaticTypeName ( ) ) . append ( "," ) ; result . append ( CmsResourceTypeImage . getStaticTypeName ( ) ) . append ( "," ) ; result . append ( CmsResourceTypePlain . getStaticTypeName ( ) ) ; return result . toString ( ) ; }
Returns a comma separated list of the default search type names.<p>

@param cms the CMS context
@param resource the edited resource

@return a comma separated list of the default search type names