/** * @see org.opencms.workplace.list.A_CmsListDialog#getListItems() */ @Override protected List getListItems() { List ret = new ArrayList(); // get content Set moduleNames = OpenCms.getModuleManager().getModuleNames(); Iterator i = moduleNames.iterator(); while (i.hasNext()) { String moduleName = (String)i.next(); CmsModule module = OpenCms.getModuleManager().getModule(moduleName); CmsListItem item = getList().newItem(module.getName()); // name item.set(LIST_COLUMN_NAME, moduleName); // nicename item.set(LIST_COLUMN_NICENAME, module.getNiceName()); //version item.set(LIST_COLUMN_VERSION, module.getVersion()); //group item.set(LIST_COLUMN_GROUP, module.getGroup()); ret.add(item); } return ret; }
/** * Returns the display string for a given module.<p> * * @param module a module * * @return the display string for the given module */ public String getDisplayForModule(CmsModule module) { String name = module.getNiceName(); String group = module.getGroup(); String version = module.getVersion().getVersion(); String display = name; if (CmsStringUtil.isNotEmptyOrWhitespaceOnly(group)) { display = group + ": " + display; } if (CmsStringUtil.isNotEmptyOrWhitespaceOnly(version)) { display += " (" + version + ")"; } return display; }
if (!module.getName().equals(module.getNiceName())) { moduleElement.addElement(N_NICENAME).addCDATA(module.getNiceName()); } else { moduleElement.addElement(N_NICENAME);
if (!module.getName().equals(module.getNiceName())) { moduleElement.addElement(N_NICENAME).addCDATA(module.getNiceName()); } else { moduleElement.addElement(N_NICENAME);