/** * Gets the module configuration path.<p> * * @return the module configuration path */ public String getConfigurationPath() { String parameter = getParameter("config.sitemap"); if (parameter != null) { return parameter; } else { return "/system/modules/" + getName() + "/.config"; } }
/** * Returns the visibility flag module parameter value.<p> * * @return the visibility flag module parameter value */ protected String getVisibilityFlag() { CmsModule module = OpenCms.getModuleManager().getModule(this.getClass().getPackage().getName()); if (module == null) { return VISIBILITY_ALL; } return module.getParameter(PARAM_VISIBILITY_FLAG, VISIBILITY_ALL); } }
/** * Returns a parameter value from the module parameters.<p> * * @param name the name of the module * @param key the parameter to return the value for * @return the parameter value from the module parameters, or <code>null</code> if the parameter is not set */ public static String getModuleParam(String name, String key) { CmsModule module = OpenCms.getModuleManager().getModule(name); if (module != null) { return module.getParameter(key); } return null; }
/** * Collect GWT build ids from the different ADE modules.<p> * * @return the map of GWT build ids */ protected Map<String, String> getBuildIds() { List<CmsModule> modules = OpenCms.getModuleManager().getAllInstalledModules(); Map<String, String> result = new HashMap<String, String>(); for (CmsModule module : modules) { String buildid = module.getParameter(CmsCoreData.KEY_GWT_BUILDID); if (buildid != null) { result.put(module.getName(), buildid); } } return result; }
/** * Returns all different decoration configuration names (like "abbr" or "acronym") that * are in the config file pointed to by module parameter "configfile".<p> * * @param cms needed to access the decoration definition XML content * * @return all different decoration configuration names (like "abbr" or "acronym") that * are in the config file pointed to by module parameter "configfile" * * @throws CmsException if sth goes wrong */ public static List<String> getDecorationDefinitionNames(CmsObject cms) throws CmsException { List<String> result = new ArrayList<String>(); CmsModule module = OpenCms.getModuleManager().getModule("com.alkacon.opencms.extendeddecorator"); String configFile = module.getParameter("configfile"); if (CmsStringUtil.isEmpty(configFile)) { LOG.error(Messages.get().getBundle().key(Messages.LOG_ERROR_CONFIG_MISSING_0)); } else { CmsDecoratorConfiguration config = new CmsDecoratorConfiguration(cms, configFile); List<CmsDecorationDefintion> decorationDefinitions = config.getDecorationDefinitions(); Iterator<CmsDecorationDefintion> it = decorationDefinitions.iterator(); CmsDecorationDefintion decDef; while (it.hasNext()) { decDef = it.next(); result.add(decDef.getName()); } } return result; }
/** * Returns all different decoration configuration names (like "abbr" or "acronym") that * are in the config file pointed to by module parameter "configfile".<p> * * @param cms needed to access the decoration definition XML content * * @return all different decoration configuration names (like "abbr" or "acronym") that * are in the config file pointed to by module parameter "configfile" * * @throws CmsException if sth goes wrong */ public static List getDecorationDefinitionNames(CmsObject cms) throws CmsException { List result = new ArrayList(); CmsModule module = OpenCms.getModuleManager().getModule("com.alkacon.opencms.extendeddecorator"); String configFile = module.getParameter("configfile"); if (CmsStringUtil.isEmpty(configFile)) { LOG.error(Messages.get().getBundle().key(Messages.LOG_ERROR_CONFIG_MISSING_0)); } else { CmsDecoratorConfiguration config = new CmsDecoratorConfiguration(cms, configFile); List decorationDefinitions = config.getDecorationDefinitions(); Iterator it = decorationDefinitions.iterator(); CmsDecorationDefintion decDef; while (it.hasNext()) { decDef = (CmsDecorationDefintion)it.next(); result.add(decDef.getName()); } } return result; }
String para = module.getParameter("message", "/org/opencms/frontend/templateone/form/workplace");