/** * Updates the main user list.<p> */ public void updateGroupList() { Map<?, ?> objects = (Map<?, ?>)getSettings().getListObject(); if (objects != null) { objects.remove(CmsGroupsList.class.getName()); objects.remove(A_CmsUsersList.class.getName()); } }
/** * Returns the (internal use only) map of list objects.<p> * * @param settings the wp settings for accessing the session * * @return the (internal use only) map of list objects */ private static Map getListObjectMap(CmsWorkplaceSettings settings) { Map objects = (Map)settings.getListObject(); if (objects == null) { // using hashtable as most efficient version of a synchronized map objects = new Hashtable(); settings.setListObject(objects); } return objects; }
/** * Returns the (internal use only) map of list objects.<p> * * @param settings the wp settings for accessing the session * * @return the (internal use only) map of list objects */ private static Map<String, CmsHtmlList> getListObjectMap(CmsWorkplaceSettings settings) { Map<String, CmsHtmlList> objects = CmsCollectionsGenericWrapper.map(settings.getListObject()); if (objects == null) { // using hashtable as most efficient version of a synchronized map objects = new Hashtable<String, CmsHtmlList>(); settings.setListObject(objects); } return objects; }
/** * @see org.opencms.workplace.CmsWorkplace#initWorkplaceRequestValues(org.opencms.workplace.CmsWorkplaceSettings, javax.servlet.http.HttpServletRequest) */ @Override protected void initWorkplaceRequestValues(CmsWorkplaceSettings settings, HttpServletRequest request) { // set the dialog type setParamDialogtype(DIALOG_TYPE); super.initWorkplaceRequestValues(settings, request); // refresh the list Map<?, ?> objects = (Map<?, ?>)getSettings().getListObject(); if (objects != null) { objects.remove(CmsExportpointsList.class.getName()); objects.remove(CmsModulesDependenciesList.class.getName()); } // save the current state of the module (may be changed because of the widget values) setDialogObject(m_module); }
/** * Commits the edited project to the db.<p> */ @Override public void actionCommit() { List errors = new ArrayList(); try { setDialogObject(m_resources); // refresh the list Map objects = (Map)getSettings().getListObject(); if (objects != null) { objects.remove(CmsInternalLinkValidationList.class.getName()); } // forward to the list getToolManager().jspForwardTool(this, "/linkvalidation/internallinks/list", null); } catch (Throwable t) { errors.add(t); } // set the list of errors to display when saving failed setCommitErrors(errors); }
/** * Commits the edited scheduled job to the scheduler.<p> */ @Override public void actionCommit() { List<Throwable> errors = new ArrayList<Throwable>(); try { // schedule the edited job OpenCms.getScheduleManager().scheduleJob(getCms(), m_jobInfo); // update the XML configuration OpenCms.writeConfiguration(CmsSystemConfiguration.class); // refresh the list Map<?, ?> objects = (Map<?, ?>)getSettings().getListObject(); if (objects != null) { objects.remove(CmsSchedulerList.class.getName()); } } catch (Throwable t) { errors.add(t); } // set the list of errors to display when saving failed setCommitErrors(errors); }
Map objects = (Map)getSettings().getListObject(); if (objects != null) { objects.remove(CmsModulesList.class.getName());
Map objects = (Map)getSettings().getListObject(); if (objects != null) { objects.remove(CmsModulesList.class.getName());
/** * This method should handle every defined list multi action, * by comparing <code>{@link #getParamListAction()}</code> with the id * of the action to execute.<p> */ @Override public void executeListMultiActions() { if (getParamListAction().equals(LIST_MACTION_DELETE)) { String moduleName = getParamModule(); // execute the delete multiaction Iterator itItems = getSelectedItems().iterator(); while (itItems.hasNext()) { CmsModule module = (CmsModule)OpenCms.getModuleManager().getModule(moduleName).clone(); CmsListItem listItem = (CmsListItem)itItems.next(); String dependencyName = listItem.getId(); deleteDependency(module, dependencyName); } } // refresh the list Map objects = (Map)getSettings().getListObject(); if (objects != null) { objects.remove(CmsModulesList.class.getName()); } listSave(); }
/** * This method should handle every defined list multi action, * by comparing <code>{@link #getParamListAction()}</code> with the id * of the action to execute.<p> */ @Override public void executeListMultiActions() { if (getParamListAction().equals(LIST_MACTION_DELETE)) { String moduleName = getParamModule(); // execute the delete multiaction Iterator itItems = getSelectedItems().iterator(); while (itItems.hasNext()) { CmsModule module = (CmsModule)OpenCms.getModuleManager().getModule(moduleName).clone(); CmsListItem listItem = (CmsListItem)itItems.next(); String exportpointName = listItem.getId(); deleteExportpoint(module, exportpointName); } } // refresh the list Map objects = (Map)getSettings().getListObject(); if (objects != null) { objects.remove(CmsModulesList.class.getName()); } listSave(); }
/** * @see org.opencms.workplace.list.A_CmsListDialog#executeListMultiActions() */ @Override public void executeListMultiActions() throws CmsRuntimeException { if (getParamListAction().equals(LIST_MACTION_ADD)) { // execute the remove multiaction try { Iterator<CmsListItem> itItems = getSelectedItems().iterator(); while (itItems.hasNext()) { CmsListItem listItem = itItems.next(); getCms().addUserToGroup((String)listItem.get(LIST_COLUMN_LOGIN), getParamGroupname()); } } catch (CmsException e) { // refresh the list Map<?, ?> objects = (Map<?, ?>)getSettings().getListObject(); if (objects != null) { objects.remove(CmsGroupsList.class.getName()); objects.remove(A_CmsUsersList.class.getName()); } throw new CmsRuntimeException(Messages.get().container(Messages.ERR_ADD_SELECTED_GROUPS_0), e); } } else { throwListUnsupportedActionException(); } listSave(); }
/** * @see org.opencms.workplace.list.A_CmsListDialog#executeListSingleActions() */ @Override public void executeListSingleActions() throws IOException, ServletException { String moduleName = getParamModule(); String exportpointName = getSelectedItem().getId(); Map params = new HashMap(); params.put(PARAM_MODULE, moduleName); params.put(PARAM_EXPORTPOINT, exportpointName); if (getParamListAction().equals(LIST_ACTION_DELETE)) { // delete a dependency CmsModule module = (CmsModule)OpenCms.getModuleManager().getModule(moduleName).clone(); deleteExportpoint(module, exportpointName); } else if (getParamListAction().equals(LIST_ACTION_EDIT) || getParamListAction().equals(LIST_DEFACTION_EDIT)) { // edit an export pointfrom the list params.put(PARAM_ACTION, DIALOG_INITIAL); getToolManager().jspForwardTool(this, "/modules/edit/exportpoints/edit", params); } // refresh the list Map objects = (Map)getSettings().getListObject(); if (objects != null) { objects.remove(CmsModulesList.class.getName()); } listSave(); }
/** * @see org.opencms.workplace.list.A_CmsListDialog#executeListSingleActions() */ @Override public void executeListSingleActions() throws IOException, ServletException { String moduleName = getParamModule(); String dependencyName = getSelectedItem().getId(); Map params = new HashMap(); params.put(PARAM_MODULE, moduleName); params.put(PARAM_DEPENDENCY, dependencyName); if (getParamListAction().equals(LIST_ACTION_DELETE)) { // delete a dependency CmsModule module = (CmsModule)OpenCms.getModuleManager().getModule(moduleName).clone(); deleteDependency(module, dependencyName); } else if (getParamListAction().equals(LIST_ACTION_EDIT) || getParamListAction().equals(LIST_DEFACTION_EDIT)) { // edit a dependency from the list params.put(PARAM_ACTION, DIALOG_INITIAL); getToolManager().jspForwardTool(this, "/modules/edit/dependencies/edit", params); } // refresh the list Map objects = (Map)getSettings().getListObject(); if (objects != null) { objects.remove(CmsModulesList.class.getName()); } listSave(); }
/** * @see org.opencms.workplace.list.A_CmsListDialog#executeListMultiActions() */ @Override public void executeListMultiActions() throws CmsRuntimeException { if (getParamListAction().equals(LIST_MACTION_ADD)) { // execute the remove multiaction try { Iterator<CmsListItem> itItems = getSelectedItems().iterator(); while (itItems.hasNext()) { CmsListItem listItem = itItems.next(); getCms().addUserToGroup(getParamUsername(), (String)listItem.get(LIST_COLUMN_NAME)); } } catch (CmsException e) { // refresh the list Map<?, ?> objects = (Map<?, ?>)getSettings().getListObject(); if (objects != null) { objects.remove(A_CmsUsersList.class.getName()); } throw new CmsRuntimeException(Messages.get().container(Messages.ERR_ADD_SELECTED_GROUPS_0), e); } } else { throwListUnsupportedActionException(); } listSave(); }
Map objects = (Map)getSettings().getListObject(); if (objects != null) { objects.remove(CmsModulesList.class.getName());
Map objects = (Map)getSettings().getListObject(); if (objects != null) { objects.remove(CmsModulesList.class.getName());
Map<?, ?> objects = (Map<?, ?>)getSettings().getListObject(); if (objects != null) { objects.remove(getListClass());
Map objects = (Map)getSettings().getListObject(); if (objects != null) { objects.remove(CmsProjectsList.class.getName());
Map<?, ?> objects = (Map<?, ?>)getSettings().getListObject(); if (objects != null) { objects.remove(CmsModulesList.class.getName());
Map<?, ?> objects = (Map<?, ?>)getSettings().getListObject(); if (objects != null) { objects.remove(getListClass());