/** * @see org.opencms.workplace.list.A_CmsListDialog#executeListSingleActions() */ @Override public void executeListSingleActions() throws IOException, ServletException { CmsSearchManager searchManager = OpenCms.getSearchManager(); CmsListItem item = getSelectedItem(); String indexsourceName = (String)item.get(LIST_COLUMN_NAME); String action = getParamListAction(); if (action.equals(LIST_ACTION_ADDSOURCE) || action.equals(LIST_COLUMN_ADDSOURCE2)) { CmsSearchIndex idx = searchManager.getIndex(getParamIndexName()); idx.addSourceName(indexsourceName); try { idx.initialize(); } catch (CmsSearchException e) { if (LOG.isErrorEnabled()) { LOG.error(e.getLocalizedMessage(), e); } } refreshList(); writeConfiguration(false); } else if (action.equals(CmsSearchIndexSourceControlList.LIST_ACTION_OVERVIEW_INDEXSOURCE)) { // action currently unused (not triggered by a column any more) Map<String, String[]> params = new HashMap<String, String[]>(); // forward to the edit indexsource screen params.put(A_CmsEditIndexSourceDialog.PARAM_INDEXSOURCE, new String[] {indexsourceName}); params.put(PARAM_STYLE, new String[] {CmsToolDialog.STYLE_NEW}); getToolManager().jspForwardTool(this, "/searchindex/indexsources/indexsource", params); } }
} catch (CmsSearchException e) { if (LOG.isErrorEnabled()) { LOG.error(e.getLocalizedMessage(), e);
/** * @see org.opencms.workplace.list.A_CmsListDialog#executeListMultiActions() */ @Override public void executeListMultiActions() { CmsSearchManager searchManager = OpenCms.getSearchManager(); CmsListItem item = getSelectedItem(); if (getParamListAction().equals(LIST_MACTION_ADDSOURCE)) { // execute the delete multiaction Iterator<CmsListItem> itItems = getSelectedItems().iterator(); String indexSource; CmsSearchIndex idx = searchManager.getIndex(getParamIndexName()); while (itItems.hasNext()) { item = itItems.next(); indexSource = (String)item.get(LIST_COLUMN_NAME); idx.addSourceName(indexSource); } try { idx.initialize(); } catch (CmsSearchException e) { if (LOG.isErrorEnabled()) { LOG.error(e.getLocalizedMessage(), e); } } writeConfiguration(false); refreshList(); } listSave(); }
} catch (CmsSearchException e) { if (LOG.isErrorEnabled()) { LOG.error(e.getLocalizedMessage(), e);