/** * Fills details about resource paths of the index source into the given item. <p> * * @param item the list item to fill * @param detailId the id for the detail to fill * */ private void fillDetailResources(CmsListItem item, String detailId) { CmsSearchManager searchManager = OpenCms.getSearchManager(); StringBuffer html = new StringBuffer(); // search for the corresponding CmsSearchIndexSource: String idxSourceName = (String)item.get(LIST_COLUMN_NAME); CmsSearchIndexSource idxSource = searchManager.getIndexSource(idxSourceName); // get the index sources resource strings List<String> resources = idxSource.getResourcesNames(); // output of found index sources Iterator<String> itResources = resources.iterator(); html.append("<ul>\n"); while (itResources.hasNext()) { html.append(" <li>\n").append(" ").append(itResources.next()).append("\n"); html.append(" </li>"); } html.append("</ul>\n"); item.set(detailId, html.toString()); }
/** * Fills details about resource paths of the index source into the given item. <p> * * @param item the list item to fill * @param detailId the id for the detail to fill * */ private void fillDetailResources(CmsListItem item, String detailId) { CmsSearchManager searchManager = OpenCms.getSearchManager(); StringBuffer html = new StringBuffer(); // search for the corresponding CmsSearchIndexSource: String idxSourceName = (String)item.get(LIST_COLUMN_NAME); CmsSearchIndexSource idxSource = searchManager.getIndexSource(idxSourceName); // get the index sources resource strings List<String> resources = idxSource.getResourcesNames(); // output of found index sources Iterator<String> itResources = resources.iterator(); html.append("<ul>\n"); while (itResources.hasNext()) { html.append(" <li>\n").append(" ").append(itResources.next()).append("\n"); html.append(" </li>"); } html.append("</ul>\n"); item.set(detailId, html.toString()); }
/** * Fills details about resource paths of the index source into the given item. <p> * * @param item the list item to fill * @param detailId the id for the detail to fill * */ private void fillDetailResources(CmsListItem item, String detailId) { CmsSearchManager searchManager = OpenCms.getSearchManager(); StringBuffer html = new StringBuffer(); // search for the corresponding CmsSearchIndexSource: String idxSourceName = (String)item.get(LIST_COLUMN_NAME); CmsSearchIndexSource idxSource = searchManager.getIndexSource(idxSourceName); // get the index sources resource strings List<String> resources = idxSource.getResourcesNames(); // output of found index sources Iterator<String> itResources = resources.iterator(); html.append("<ul>\n"); while (itResources.hasNext()) { html.append(" <li>\n").append(" ").append(itResources.next()).append("\n"); html.append(" </li>"); } html.append("</ul>\n"); item.set(detailId, html.toString()); }
/** * Fills details about resource paths of the index source into the given item. <p> * * @param item the list item to fill * @param detailId the id for the detail to fill * */ private void fillDetailResources(CmsListItem item, String detailId) { CmsSearchManager searchManager = OpenCms.getSearchManager(); StringBuffer html = new StringBuffer(); // search for the corresponding CmsSearchIndexSource: String idxSourceName = (String)item.get(LIST_COLUMN_NAME); CmsSearchIndexSource idxSource = searchManager.getIndexSource(idxSourceName); // get the index sources resource strings List<String> resources = idxSource.getResourcesNames(); // output of found index sources Iterator<String> itResources = resources.iterator(); html.append("<ul>\n"); while (itResources.hasNext()) { html.append(" <li>\n").append(" ").append(itResources.next()).append("\n"); html.append(" </li>"); } html.append("</ul>\n"); item.set(detailId, html.toString()); }
List<String> resources = idxSource.getResourcesNames(); Iterator<String> itResources = resources.iterator(); while (itResources.hasNext()) {
/** * Returns the configured resources of the current indexsource. * * @return the configured resources of the current indexsource */ private List<String> resources() { return OpenCms.getSearchManager().getIndexSource(getParamIndexsource()).getResourcesNames(); }
/** * @see org.opencms.search.I_CmsIndexer#getUpdateData(org.opencms.search.CmsSearchIndexSource, java.util.List) */ public CmsSearchIndexUpdateData getUpdateData( CmsSearchIndexSource source, List<CmsPublishedResource> publishedResources) { // create a new update collection from this indexer and the given index source CmsSearchIndexUpdateData result = new CmsSearchIndexUpdateData(source, this); Iterator<CmsPublishedResource> i = publishedResources.iterator(); while (i.hasNext()) { // check all published resources if they match this indexer / source CmsPublishedResource pubRes = i.next(); // VFS resources will always have a structure id if (!pubRes.getStructureId().isNullUUID()) { // use utility method from CmsProject to check if published resource is "inside" this index source if (CmsProject.isInsideProject(source.getResourcesNames(), pubRes.getRootPath())) { // the resource is "inside" this index source addResourceToUpdateData(pubRes, result); } } } return result; }
/** * @see org.opencms.search.I_CmsIndexer#getUpdateData(org.opencms.search.CmsSearchIndexSource, java.util.List) */ public CmsSearchIndexUpdateData getUpdateData( CmsSearchIndexSource source, List<CmsPublishedResource> publishedResources) { // create a new update collection from this indexer and the given index source CmsSearchIndexUpdateData result = new CmsSearchIndexUpdateData(source, this); Iterator<CmsPublishedResource> i = publishedResources.iterator(); while (i.hasNext()) { // check all published resources if they match this indexer / source CmsPublishedResource pubRes = i.next(); // VFS resources will always have a structure id if (!pubRes.getStructureId().isNullUUID()) { // use utility method from CmsProject to check if published resource is "inside" this index source if (CmsProject.isInsideProject(source.getResourcesNames(), pubRes.getRootPath())) { // the resource is "inside" this index source addResourceToUpdateData(pubRes, result); } } } return result; }
throws CmsIndexException { List<String> resourceNames = source.getResourcesNames(); Iterator<String> i = resourceNames.iterator(); while (i.hasNext()) {
CmsSearchIndexSource source) throws CmsIndexException { List<String> resourceNames = source.getResourcesNames(); Iterator<String> i = resourceNames.iterator(); while (i.hasNext()) {
if (CmsProject.isInsideProject(source.getResourcesNames(), pubRes.getRootPath())) {
CmsSearchIndexSource source) throws CmsIndexException { List<String> resourceNames = source.getResourcesNames(); Iterator<String> i = resourceNames.iterator(); while (i.hasNext()) {
m_sources.add(indexSource); resourceNames = indexSource.getResourcesNames(); searchIndexSourceDocumentTypes = indexSource.getDocumentTypes(); for (int j = 0, m = resourceNames.size(); j < m; j++) {
m_sources.add(indexSource); resourceNames = indexSource.getResourcesNames(); searchIndexSourceDocumentTypes = indexSource.getDocumentTypes(); for (int j = 0, m = resourceNames.size(); j < m; j++) {
Iterator resourceIterator = searchIndexSource.getResourcesNames().iterator(); while (resourceIterator.hasNext()) {
Iterator<String> resourceIterator = searchIndexSource.getResourcesNames().iterator(); while (resourceIterator.hasNext()) {
/** * Creates the list of widgets for this dialog.<p> */ @Override protected void defineWidgets() { super.defineWidgets(); // widgets to display // indexsource data (first block) addWidget(new CmsWidgetDialogParameter(m_indexsource, "name", PAGES[0], new CmsDisplayWidget())); addWidget(new CmsWidgetDialogParameter(m_indexsource, "indexerClassName", PAGES[0], new CmsDisplayWidget())); // resources block addWidget( new CmsWidgetDialogParameter( m_indexsource.getResourcesNames(), "resourcesNames", "/", PAGES[0], new CmsVfsFileWidget(false, ""), 1, 10)); } }