Extracts all modules to delete form the module parameter.<p>
@return list of module names
427241
private List<String> extractIndexNames() {

        List<String> modules = new ArrayList<String>();

        if (CmsStringUtil.isNotEmptyOrWhitespaceOnly(getParamIndexes())) {
            StringTokenizer tok = new StringTokenizer(getParamIndexes(), ",");
            while (tok.hasMoreTokens()) {
                String module = tok.nextToken();
                modules.add(module);
            }
        }
        return modules;
    }
450747
public String[] getCategories() {

        List<String> l = m_parameters.getCategories();
        return l.toArray(new String[l.size()]);
    }
1254714
public String [] getNames() {
		String [] result = new String[parameters.size()];
		parameters.keySet().toArray(result);
		return result;
	}
931442
public String getModuleName() {
        if (moduleID != null) {
            return moduleID;
        }

        if (path != null && path.length > MODULE_INDEX)
            return path[1];
        else
            return null;
    }
373004
@Override
    public List<Class<?>> getModules() {
        return Arrays.asList(
                CommunicationsModuleDomModule.class,
                DocumentModule.class,
                CountryModule.class,
                DemoModuleDomSubmodule.class,
                DemoAppApplicationModuleFixtureSubmodule.class,
                DemoAppApplicationModuleServicesSubmodule.class,
                PdfBoxModule.class,
                CommandModule.class,
                FreeMarkerModule.class,
                FakeDataModule.class
        );
    }
1335568
public static String dumpModules(List<Module> modules) {
        final StringBuilder sb = new StringBuilder(4028);
        sb.append("\n--------Modules(Total ").append(modules.size()).append(")--------");
        sb.append("\n");
        for (int i = 0; i < modules.size(); i++) {
            final Module module = modules.get(i);
            sb.append("module ").append(i + 1).append(":");
            sb.append("\n\tmappingPath='").append(module.getMappingPath());
            sb.append("';\n\tpackageRelativePath='").append(module.getRelativePath());
            sb.append("';\n\turl='").append(module.getUrl());
            sb.append("';\n\tcontrollers=[");
            final List<ControllerRef> controllerMappings = module.getControllers();

            for (final ControllerRef controller : controllerMappings) {
                sb.append("'").append(Arrays.toString(controller.getMappingPaths())).append("'=")
                        .append(controller.getControllerClass().getSimpleName()).append(", ");
            }
            if (!controllerMappings.isEmpty()) {
                sb.setLength(sb.length() - 2);
            }
            sb.append("];\n\tparamResolvers=[");
            for (ParamResolver resolver : module.getCustomerResolvers()) {
                sb.append(resolver.getClass().getSimpleName()).append(", ");
            }
            if (module.getCustomerResolvers().size() > 0) {
                sb.setLength(sb.length() - 2);
            }
            sb.append("];\n\tvalidators=[");
            for (ParamValidator validator : module.getValidators()) {
                sb.append(validator.getClass().getSimpleName()).append(", ");
            }
            if (module.getValidators().size() > 0) {
                sb.setLength(sb.length() - 2);
            }
            sb.append("];\n\tinterceptors=[");
            for (InterceptorDelegate interceptor : module.getInterceptors()) {
                sb.append(interceptor.getName()).append("(").append(interceptor.getPriority())
                        .append("), ");
            }
            if (module.getInterceptors().size() > 0) {
                sb.setLength(sb.length() - 2);
            }
            sb.append("];\n\terrorHander=").append(
                    module.getErrorHandler() == null ? "<null>" : module.getErrorHandler());
            sb.append("\n\n");
        }
        sb.append("--------end--------");
        return sb.toString();
    }
1151697
protected List<String> getPages() {

        if (m_pages == null) {
            m_pages = Arrays.asList(getPageArray());
        }
        return m_pages;
    }
240820
function teardown(moduleName, e, moduleNames) {
	var moduleNames = moduleNames || {};

	if(disposeModule(moduleName, e, moduleNames)) {
		// Delete the module and call teardown on its parents as well.
		var parents = loader.getDependants(moduleName);

		for(var i = 0, len = parents.length; i < len; i++) {
			teardown(parents[i], e, moduleNames);
		}
	}

	return moduleNames;
}
772878
public synchronized boolean deleteModule(String fileName) throws CmsException {

        String moduleName = null;
        boolean ok = true;
        try {
            CmsModule module = getModuleForFileName(fileName);
            if (module == null) {
                LOG.error("Deletion request for invalid module file name: " + fileName);
                ok = false;
                return false;
            }
            I_CmsReport report = createReport();
            moduleName = module.getName();
            OpenCms.getModuleManager().deleteModule(m_adminCms, module.getName(), false, report);
            ok = !(report.hasWarning() || report.hasError());
            return true;
        } catch (Exception e) {
            ok = false;
            if (e instanceof CmsException) {
                throw (CmsException)e;
            }
            if (e instanceof RuntimeException) {
                throw (RuntimeException)e;
            }
            return true;
        } finally {
            m_moduleLog.log(moduleName, Action.deleteModule, ok);
        }

    }
515925
private List getModules() {

        List retVal = new ArrayList();
        // get all modules
        Iterator i = OpenCms.getModuleManager().getModuleNames().iterator();
        // add them to the list of modules
        while (i.hasNext()) {
            String moduleName = (String)i.next();
            if (moduleName.equals(getParamDependency())) {
                // check for the preselection
                retVal.add(new CmsSelectWidgetOption(moduleName, true));
            } else {
                retVal.add(new CmsSelectWidgetOption(moduleName, false));
            }
        }
        Collections.sort(retVal, new Comparator() {

            /** Collator used / wrapped */
            private Collator m_collator = Collator.getInstance(getLocale());

            /**
             * @see java.util.Comparator#compare(java.lang.Object, java.lang.Object)
             */
            public int compare(Object arg0, Object arg1) {

                CmsSelectWidgetOption o1 = (CmsSelectWidgetOption)arg0;
                CmsSelectWidgetOption o2 = (CmsSelectWidgetOption)arg1;
                return m_collator.compare(o1.getOption(), o2.getOption());
            }
        });
        return retVal;

    }
782992
public List<LifecycleCallbackType<WebFragmentDescriptor>> getAllPreDestroy()
   {
      List<LifecycleCallbackType<WebFragmentDescriptor>> list = new ArrayList<LifecycleCallbackType<WebFragmentDescriptor>>();
      List<Node> nodeList = model.get("pre-destroy");
      for(Node node: nodeList)
      {
         LifecycleCallbackType<WebFragmentDescriptor>  type = new LifecycleCallbackTypeImpl<WebFragmentDescriptor>(this, "pre-destroy", model, node);
         list.add(type);
      }
      return list;
   }
148373
public static List<ConfigMetadataNode> extractConfigs(ModulesMetadata modulesMetadata) {
		final List<ModuleMetadata> modules = modulesMetadata
                .getModules()
                .stream()
                .collect(Collectors.toList());
		return modules.stream()
                .map(ModuleMetadata::getConfigs)
                .flatMap(Collection::stream)
                .sorted(Comparator.comparing(MetadataNode::getName))
                .collect(Collectors.toList());
	}
209802
public Map<String, CmsModuleVersion> getInstalledModules() {

        String file = CmsModuleConfiguration.DEFAULT_XML_FILE_NAME;
        // /opencms/modules/module[?]
        String basePath = new StringBuffer("/").append(CmsConfigurationManager.N_ROOT).append("/").append(
            CmsModuleConfiguration.N_MODULES).append("/").append(CmsModuleXmlHandler.N_MODULE).append(
                "[?]/").toString();
        Map<String, CmsModuleVersion> modules = new HashMap<String, CmsModuleVersion>();
        String name = "";
        for (int i = 1; name != null; i++) {
            if (i > 1) {
                String ver = CmsModuleVersion.DEFAULT_VERSION;
                try {
                    ver = getXmlHelper().getValue(
                        file,
                        CmsStringUtil.substitute(basePath, "?", "" + (i - 1)) + CmsModuleXmlHandler.N_VERSION);
                } catch (@SuppressWarnings("unused") CmsXmlException e) {
                    // ignore
                }
                modules.put(name, new CmsModuleVersion(ver));
            }
            try {
                name = getXmlHelper().getValue(
                    file,
                    CmsStringUtil.substitute(basePath, "?", "" + i) + CmsModuleXmlHandler.N_NAME);
            } catch (@SuppressWarnings("unused") CmsXmlException e) {
                // ignore
            }
        }
        return modules;
    }
288293
public static List<CmsRelationType> getAll() {

        List<CmsRelationType> all = new ArrayList<CmsRelationType>(Arrays.asList(VALUE_ARRAY));
        all.addAll(OpenCms.getResourceManager().getRelationTypes());
        return Collections.unmodifiableList(all);
    }
258922
public List<String> getAllModuleNames() {

        List<String> sortedModuleNames = new ArrayList<String>(OpenCms.getModuleManager().getModuleNames());
        java.util.Collections.sort(sortedModuleNames);
        return sortedModuleNames;
    }
411597
public Collection<String> getSelectedModules() {

        List<String> result = Lists.newArrayList();
        for (Map.Entry<String, CheckBox> entry : m_moduleCheckboxes.entrySet()) {
            if (entry.getValue().getValue().booleanValue()) {
                result.add(entry.getKey());
            }
        }
        return result;
    }
753928
public String jsModuleNames() {

        List<String> moduleNames = sortModules(getAvailableModules().values());
        StringBuffer jsCode = new StringBuffer(1024);
        jsCode.append("\t// an array from 1...n holding the module package names\n");
        jsCode.append("\tvar modulePackageNames = new Array(");
        jsCode.append(moduleNames.size());
        jsCode.append(");\n");
        for (int i = 0; i < moduleNames.size(); i++) {
            String moduleName = moduleNames.get(i);
            jsCode.append("\tmodulePackageNames[" + i + "] = \"" + moduleName + "\";\n");
        }
        jsCode.append("\n\n");
        return jsCode.toString();
    }