/** * @see org.opencms.configuration.preferences.A_CmsPreference#isDisabled(CmsObject) */ @Override public boolean isDisabled(CmsObject cms) { return !OpenCms.getModuleManager().hasModule("org.opencms.workplace.traditional"); } }
/** * Computes a list of modules which need to be removed before updating the other modules, e.g. because of resource type * conflicts.<p> * * @return the list of names of modules which need to be removed */ protected List<String> getModulesToDelete() { List<String> result = new ArrayList<String>(); if (m_installModules.contains("org.opencms.ade.config")) { for (int i = 0; i < OBSOLETE_MODULES.length; i++) { if (OpenCms.getModuleManager().hasModule(OBSOLETE_MODULES[i])) { result.add(OBSOLETE_MODULES[i]); } } } return result; }
/** * Return true if user uses new workplace.<p> * * @return true if the user users the new workplace */ public boolean usesNewWorkplace() { boolean traditionalWorkplaceExists = OpenCms.getModuleManager().hasModule("org.opencms.workplace.traditional"); if (!traditionalWorkplaceExists) { return true; } else { return !(WORKPLACE_MODE_OLD.equals(getAdditionalPreference(PREF_WORKPLACE_MODE, true))); } }
param.put(PARAM_STYLE, CmsToolDialog.STYLE_NEW); param.put(PARAM_CLOSELINK, CmsToolManager.linkForToolPath(getJsp(), "/modules")); if (OpenCms.getModuleManager().hasModule(module.getName())) { param.put(PARAM_MODULENAME, module.getName()); getToolManager().jspForwardPage(this, REPLACE_ACTION_REPORT, param);
moduleName = module.getName(); I_CmsReport report = createReport(); if (OpenCms.getModuleManager().hasModule(moduleName)) { OpenCms.getModuleManager().deleteModule(m_adminCms, moduleName, true /*replace module*/, report);
/** * @see org.opencms.workplace.CmsWidgetDialog#actionCommit() */ @Override public void actionCommit() { try { if (CmsStringUtil.isEmptyOrWhitespaceOnly(m_cloneInfo.getName())) { throw new CmsException(Messages.get().container(Messages.ERR_CLONEMODULE_EMPTY_PACKAGE_NAME_0)); } if (CmsStringUtil.isEmptyOrWhitespaceOnly(m_cloneInfo.getNiceName())) { throw new CmsException(Messages.get().container(Messages.ERR_CLONEMODULE_EMPTY_MODULE_NAME_0)); } if (OpenCms.getModuleManager().hasModule(m_cloneInfo.getName())) { throw new CmsException( Messages.get().container(Messages.ERR_CLONEMODULE_MODULE_ALREADY_EXISTS_1, m_cloneInfo.getName())); } getJsp().getRequest().setAttribute(ATTR_CLONE_MODULE_INFO, m_cloneInfo); Map<String, String[]> params = new HashMap<String, String[]>(); params.put(PARAM_CLOSELINK, new String[] {getParamCloseLink()}); params.put(PARAM_STYLE, new String[] {CmsToolDialog.STYLE_NEW}); getToolManager().jspForwardPage(this, CLONE_MODULE_REPORT, params); } catch (Exception e) { LOG.error(e.getLocalizedMessage(), e); setCommitErrors(Collections.<Throwable> singletonList(e)); } }
param.put(PARAM_STYLE, CmsToolDialog.STYLE_NEW); param.put(PARAM_CLOSELINK, CmsToolManager.linkForToolPath(getJsp(), "/modules")); if (OpenCms.getModuleManager().hasModule(module.getName())) { param.put(CmsModulesUploadFromServer.PARAM_MODULENAME, module.getName()); getToolManager().jspForwardPage(this, CmsModulesUploadFromServer.REPLACE_ACTION_REPORT, param);
if (OpenCms.getModuleManager().hasModule(importedModule.getName())) { throw new CmsConfigurationException(Messages.get().container( Messages.ERR_MOD_ALREADY_INSTALLED_1,
if ((m_initStatus == Status.notInitialized) && OpenCms.getModuleManager().hasModule(MODULE_NAME_ADE_CONFIG)) { try { CmsLog.INIT.info(". Initializing the ADE configuration, this may take a while...");
if (OpenCms.getModuleManager().hasModule(importedModule.getName())) { throw new CmsConfigurationException( Messages.get().container(Messages.ERR_MOD_ALREADY_INSTALLED_1, importedModule.getName()));
if (!OpenCms.getModuleManager().hasModule(getModuleName())) {
if (!OpenCms.getModuleManager().hasModule(getModuleName())) {