Creates a dummy index source.<p>

@return the dummy search index source
344862
private CmsSearchIndexSource createDummyIndexSource() {

        CmsSearchIndexSource result = new CmsSearchIndexSource();
        result.setName("default");
        result.setIndexerClassName("org.opencms.search.CmsVfsIndexer");
        result.addDocumentType("html");
        result.addDocumentType("generic");
        result.addDocumentType("pdf");
        // add search index source to config:
        m_searchManager.addSearchIndexSource(result);
        return result;
    }
939175
public void addSearchIndex(I_CmsSearchIndex searchIndex) {

        if (!searchIndex.isInitialized()) {
            if (OpenCms.getRunLevel() > OpenCms.RUNLEVEL_2_INITIALIZING) {
                try {
                    searchIndex.initialize();
                } catch (CmsException e) {
                    // should never happen
                    LOG.error(e.getMessage(), e);
                }
            }
        }

        // name: not null or emtpy and unique
        String name = searchIndex.getName();
        if (CmsStringUtil.isEmptyOrWhitespaceOnly(name)) {
            throw new CmsIllegalArgumentException(
                Messages.get().container(Messages.ERR_SEARCHINDEX_CREATE_MISSING_NAME_0));
        }
        if (m_indexSources.keySet().contains(name)) {
            throw new CmsIllegalArgumentException(
                Messages.get().container(Messages.ERR_SEARCHINDEX_CREATE_INVALID_NAME_1, name));
        }

        m_indexes.add(searchIndex);
        if (m_adminCms != null) {
            initOfflineIndexes();
        }

        if (CmsLog.INIT.isInfoEnabled()) {
            CmsLog.INIT.info(
                Messages.get().getBundle().key(
                    Messages.INIT_ADD_SEARCH_INDEX_2,
                    searchIndex.getName(),
                    searchIndex.getProject()));
        }
    }
397980
public String getExplorerResource() {

        // get the current explorer mode
        String mode = getExplorerMode();
        if (mode == null) {
            mode = CmsWorkplace.VIEW_EXPLORER;
        }
        if (CmsWorkplace.VIEW_EXPLORER.equals(mode)) {
            // append the current site to the key when in explorer view mode
            mode += "_" + getSite() + "/";
        }
        // get the resource for the given mode
        String resource = m_explorerResource.get(mode);
        if (resource == null) {
            resource = "/";
        }
        return resource;
    }
263123
private boolean createIndex(String index, Map<String, Object> defaultSettings) {
        IndicesExistsResponse res = client.admin().indices().prepareExists(index).execute().actionGet();
        boolean created = false;
        if (!res.isExists()) {
            CreateIndexRequestBuilder req = client.admin().indices().prepareCreate(index);
            req.setSettings(defaultSettings);
            created = req.execute().actionGet().isAcknowledged();
            if (!created) {
                throw new RuntimeException("Could not create index [" + index + "]");
            }
        }

        return created;
    }
568471
public CmsSolrIndex getIndexSolr(String indexName) {

        I_CmsSearchIndex index = getIndex(indexName);
        if (index instanceof CmsSolrIndex) {
            return (CmsSolrIndex)index;
        }
        return null;
    }
66381
public static Indexer create(String mapTxt) {
        Context cx = Context.enter();
        try {
            return new Indexer(mapTxt, cx);
        } finally {
            Context.exit();
        }
    }
198712
public IndexModel index() {
		checkReadOnly();
		IndexModel index = new IndexModel();
		index.setTableModel(this);
		getIndexConsts().add(index);
		return index;
	}
391900
protected String getIndex() {

        try {
            return m_configObject.getString(JSON_KEY_INDEX);
        } catch (JSONException e) {
            if (null == m_baseConfig) {
                if (LOG.isInfoEnabled()) {
                    LOG.info(Messages.get().getBundle().key(Messages.LOG_NO_INDEX_SPECIFIED_0), e);
                }
                return null;
            } else {
                return m_baseConfig.getGeneralConfig().getSolrIndex();
            }
        }
    }
630212
public List<CmsResourceTypeBean> getSearchTypes() {

        if (m_searchTypes != null) {
            return m_searchTypes;
        }
        m_searchTypes = Lists.newArrayList();
        for (CmsResourceTypeBean type : m_dialogBean.getTypes()) {
            if (type.getVisibility() != TypeVisibility.hidden) {
                m_searchTypes.add(type);
            }
        }
        return m_searchTypes;
    }
700730
public IndexModel index(String indexName) {
		checkReadOnly();
		IndexModel index = new IndexModel();
		index.setName(indexName);
		index.setTableModel(this);
		getIndexConsts().add(index);
		return index;
	}
30626
public synchronized static Index createIndex(Class<?> type) {
        Index index = indices.get(type);
        if (index == null) {
            try {
                Indexer indexer = new Indexer();
                Class<?> currentType = type;
                while ( currentType != null ) {
                    String className = currentType.getName().replace(".", "/") + ".class";
                    InputStream stream = type.getClassLoader()
                            .getResourceAsStream(className);
                    indexer.index(stream);
                    currentType = currentType.getSuperclass();
                }
                index = indexer.complete();
                indices.put(type, index);
            } catch (IOException e) {
                throw new RuntimeException("Failed to initialize Indexer", e);
            }
        }
        return index;
    }
1295097
private List<CmsSearchIndexSource> searchIndexSources() {

        CmsSearchManager manager = OpenCms.getSearchManager();
        I_CmsSearchIndex index = manager.getIndex(getParamIndexName());
        List<CmsSearchIndexSource> sources = index.getSources();
        return sources;
    }
646598
public List<CmsSearchField> getSearchFields() {

        I_CmsSearchIndex index = OpenCms.getSearchManager().getIndex(getParamIndexName());
        List<CmsSearchField> result = new ArrayList<CmsSearchField>();
        Iterator<CmsSearchField> i = index.getFieldConfiguration().getFields().iterator();
        while (i.hasNext()) {
            CmsLuceneField field = (CmsLuceneField)i.next();
            if (field.isIndexed() && field.isDisplayed()) {
                // only include indexed (ie. searchable) fields
                result.add(field);
            }
        }
        return result;
    }
1211013
public CmsJspStandardContextBean createCopy() {

        CmsJspStandardContextBean result = new CmsJspStandardContextBean();
        result.m_container = m_container;
        if (m_detailContentResource != null) {
            result.m_detailContentResource = m_detailContentResource.getCopy();
        }
        result.m_element = m_element;
        result.setPage(m_page);
        return result;
    }
86208
public com.google.api.ads.admanager.axis.v201808.CmsContent[] getCmsSources() {
        return cmsSources;
    }
504488
public CmsResourceFilter addRequireFolder() {

        CmsResourceFilter extendedFilter = (CmsResourceFilter)clone();

        extendedFilter.m_onlyFolders = Boolean.TRUE;
        extendedFilter.updateCacheId();

        return extendedFilter;
    }
490208
public static List<String> createOptions() {

        List<String> result = new ArrayList<String>();
        result.add(nameLookup.get(CmsAliasMode.permanentRedirect));
        result.add(nameLookup.get(CmsAliasMode.redirect));
        result.add(nameLookup.get(CmsAliasMode.page));
        return result;
    }