Returns the display string for a given module.<p>

@param module a module

@return the display string for the given module
504469
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;
    }
814493
public static Set<Artifact> getAllArtifacts(final Module module) {
        final Set<Artifact> artifacts = new HashSet<Artifact>();
        artifacts.addAll(module.getArtifacts());

        for(final Module submodule: module.getSubmodules()){
            artifacts.addAll(getAllArtifacts(submodule));
        }

        return artifacts;
    }
858162
public String getModuleName()
    {
        return ivModuleDisplayName != null ? ivModuleDisplayName :
                        ivJ2eeName != null ? ivJ2eeName.getModule() : null;
    }
861105
protected void setModule(String moduleName, CmsBasicDialog dialog) {

        Window window = CmsVaadinUtils.getWindow(dialog);
        window.setContent(this);
        m_module = OpenCms.getModuleManager().getModule(moduleName).clone();
        CmsResourceInfo resInfo = new CmsResourceInfo(
            m_module.getName(),
            m_module.getNiceName(),
            CmsModuleApp.Icons.RESINFO_ICON);
        displayResourceInfoDirectly(Arrays.asList(resInfo));
        fillFields();
    }
1074860
public List<String> getModuleFileNames() {

        List<String> result = Lists.newArrayList();
        for (CmsModule module : OpenCms.getModuleManager().getAllInstalledModules()) {
            result.add(getFileNameForModule(module));
        }
        return result;
    }
628199
protected static String getMessageParentFolder(String moduleName) {

        CmsModule module = OpenCms.getModuleManager().getModule(moduleName);
        for (String resource : module.getResources()) {
            if (resource.contains(PATH_I18N + "/" + module.getName())) {
                return resource.substring(0, resource.indexOf(PATH_I18N));
            }
        }
        return "/system/modules/" + module.getName();
    }
341840
public static Binder binder(Object module) {
        if (module instanceof AbstractModule) {
            try {
                Method method = AbstractModule.class.getDeclaredMethod("binder");
                if (!method.isAccessible()) {
                    method.setAccessible(true);
                }
                return (Binder) method.invoke(module);
            } catch (Exception e) {
                throw new RuntimeException(e);
            }
        } else {
            throw new IllegalArgumentException("Module must be an instance of AbstractModule");
        }
    }
798120
public static List<Artifact> getAllArtifacts(final Module module){
        final List<Artifact> artifacts = new ArrayList<Artifact>();

        for(final Module subModule: module.getSubmodules()){
            artifacts.addAll(getAllArtifacts(subModule));
        }

        artifacts.addAll(module.getArtifacts());

        return artifacts;
    }
500252
public JsonNode getModuleNames(final String moduleName) {
        ObjectNode req = makeRequest("naming");
        req.put("assembly", moduleName);

        JsonNode resp = this.runtime.requestResponse(req);
        return resp.get("naming");
    }
520118
public String htmlModules() {

        StringBuffer html = new StringBuffer(1024);
        Iterator<String> itModules = sortModules(getAvailableModules().values()).iterator();
        for (int i = 0; itModules.hasNext(); i++) {
            String moduleName = itModules.next();
            CmsModule module = getAvailableModules().get(moduleName);
            html.append(htmlModule(module, i));
        }
        return html.toString();
    }
880559
public static SimpleModule getModule() {
        SimpleModule module = new SimpleModule();
        module.addSerializer(Base64Url.class, new Base64UrlSerializer());
        return module;
    }
343716
public final static Function<BigInteger, BigInteger> module(long module) {
        return new Module(fromNumber(Long.valueOf(module)));
    }
183419
private String getModuleFromClass(Class<?> klass, Map<String, ModuleProperties> moduleMap) {
        String file = getClassFileLocation(klass);
        if (tc.isDebugEnabled()) {
            Tr.debug(tc, "File name : " + file);
        }
        String moduleName = null;
        for (Map.Entry<String, ModuleProperties> entry : moduleMap.entrySet()) {
            URL location = entry.getValue().getLocation();
            String filePath = location.getFile();
            if (tc.isDebugEnabled()) {
                Tr.debug(tc, "location : " + filePath);
            }

            if (location.getProtocol().equals("file") && file.startsWith(filePath)) {
                moduleName = entry.getKey();
                if (tc.isDebugEnabled()) {
                    Tr.debug(tc, "module name from the list  : " + moduleName);
                }
                break;
            }
        }
        if (moduleName == null) {
            moduleName = file;
            if (tc.isDebugEnabled()) {
                Tr.debug(tc, "no match. use filename as module name : " + moduleName);
            }
        }
        return moduleName;
    }
1326447
protected String htmlModule(CmsModule module, int pos) {

        StringBuffer html = new StringBuffer(256);
        html.append("\t<tr>\n");
        html.append("\t\t<td style='vertical-align: top;'>\n");
        html.append("\t\t\t<input type='checkbox' name='availableModules' value='");
        html.append(module.getName());
        html.append("' checked='checked' onClick=\"checkModuleDependencies('");
        html.append(module.getName());
        html.append("');\">\n");
        html.append("\t\t</td>\n");
        html.append("\t\t<td style='vertical-align: top; width: 100%; padding-top: 4px;'>\n\t\t\t");
        html.append(getDisplayForModule(module));
        html.append("\n\t\t</td>\n");
        html.append("\t\t<td style='vertical-align: top; text-align: right;'>\n");
        if (CmsStringUtil.isNotEmptyOrWhitespaceOnly(module.getDescription())) {
            html.append("\t\t\t");
            html.append(getHtmlHelpIcon("" + pos, ""));
        }
        html.append("\t\t</td>\n");
        html.append("\t</tr>\n");
        return html.toString();
    }
4315
protected IPromise<JsonObject> getDistributions(String module) {
        Promise res = new Promise();
//        http://registry.npmjs.org/-/package/react/dist-tags
        http.getContent(config.getRepo()+"/-/package/"+module+"/dist-tags").then( (cont,err) -> {
            if ( cont != null ) {
                JsonObject parse = Json.parse(cont).asObject();
                res.resolve(parse);
            } else {
                res.reject(err);
            }
        });
        return res;
    }
1292958
public String htmlModuleHelpDescriptions() {

        StringBuffer html = new StringBuffer(1024);
        Iterator<String> itModules = sortModules(getAvailableModules().values()).iterator();
        for (int i = 0; itModules.hasNext(); i++) {
            String moduleName = itModules.next();
            CmsModule module = getAvailableModules().get(moduleName);
            if (CmsStringUtil.isNotEmptyOrWhitespaceOnly(module.getDescription())) {
                html.append(getHtmlPart("C_HELP_START", "" + i));
                html.append(module.getDescription());
                html.append("\n");
                html.append(getHtmlPart("C_HELP_END"));
                html.append("\n");
            }
        }
        return html.toString();
    }
441673
protected function getModuleOutput($module)
    {
        $console = $this->console;

        $head = sprintf(
            "%s\n%s\n%s\n",
            str_repeat(
                '-',
                $console->getWidth()
            ),
            'Testing Module: ' . $module,
            str_repeat(
                '-',
                $console->getWidth()
            )
        );

        return $console->colorize($head, ColorInterface::BLUE);
    }