Package lcmc.crm.domain

Examples of lcmc.crm.domain.CrmXml$RscSet


    protected boolean isAdvanced(final String param) {
        if (!Tools.areEqual(getParamDefault(param), getParamSaved(param))) {
            /* it changed, show it */
            return false;
        }
        final CrmXml crmXML = getBrowser().getCrmXml();
        return crmXML.isRscDefaultsAdvanced(param);
    }
View Full Code Here


        return AccessMode.NORMAL;
    }

    @Override
    protected boolean isRequired(final String param) {
        final CrmXml crmXML = getBrowser().getCrmXml();
        return crmXML.isRscDefaultsRequired(param);
    }
View Full Code Here

        return crmXML.isRscDefaultsRequired(param);
    }

    @Override
    protected boolean isInteger(final String param) {
        final CrmXml crmXML = getBrowser().getCrmXml();
        return crmXML.isRscDefaultsInteger(param);
    }
View Full Code Here

        return crmXML.isRscDefaultsInteger(param);
    }

    @Override
    protected boolean isLabel(final String param) {
        final CrmXml crmXML = getBrowser().getCrmXml();
        return crmXML.isRscDefaultsLabel(param);
    }
View Full Code Here

        return crmXML.isRscDefaultsLabel(param);
    }

    @Override
    protected boolean isTimeType(final String param) {
        final CrmXml crmXML = getBrowser().getCrmXml();
        return crmXML.isRscDefaultsTimeType(param);
    }
View Full Code Here

        return crmXML.isRscDefaultsTimeType(param);
    }

    @Override
    protected boolean isCheckBox(final String param) {
        final CrmXml crmXML = getBrowser().getCrmXml();
        return crmXML.isRscDefaultsMetaAttrBoolean(param);
    }
View Full Code Here

        return crmXML.isRscDefaultsMetaAttrBoolean(param);
    }

    @Override
    protected String getParamType(final String param) {
        final CrmXml crmXML = getBrowser().getCrmXml();
        return crmXML.getRscDefaultsMetaAttrType(param);
    }
View Full Code Here

        return super.getSection(param);
    }

    @Override
    protected Value[] getParamPossibleChoices(final String param) {
        final CrmXml crmXML = getBrowser().getCrmXml();
        if (isCheckBox(param)) {
            return crmXML.getCheckBoxChoices(getResourceAgent(), param);
        } else {
            return crmXML.getComboBoxChoices(getResourceAgent(), param, getService().isMaster());
        }
    }
View Full Code Here

    /** Returns the info about the service. */
    @Override
    public String getInfo() {
        final StringBuilder s = new StringBuilder(80);
        final CrmXml crmXML = getBrowser().getCrmXml();
        s.append("<h2>");
        s.append(getName());
        s.append(" (");
        s.append(crmXML.getOcfScriptVersion(resourceAgent));
        s.append(")</h2><h3>");
        s.append(crmXML.getShortDesc(resourceAgent));
        s.append("</h3>");
        s.append(crmXML.getLongDesc(resourceAgent));
        s.append("<br><br>");
        final List<String> params = crmXML.getOcfMetaDataParameters(resourceAgent, false);
        for (final String param : params) {
            if (crmXML.isMetaAttr(resourceAgent, param)
                || ServiceInfo.RA_PARAM.equals(param)
                || ServiceInfo.PCMK_ID.equals(param)
                || ServiceInfo.GUI_ID.equals(param)) {
                continue;
            }
            s.append("<b>");
            s.append(param);
            s.append("</b><br>");
            s.append(crmXML.getShortDesc(resourceAgent, param));
            s.append("<br>");
        }
        return s.toString();
    }
View Full Code Here

            @Override
            public void run() {
                application.isSwingThread();
                addServiceMenuItem.removeAll();
                final Point2D pos = addServiceMenuItem.getPos();
                final CrmXml crmXML = servicesInfo.getBrowser().getCrmXml();
                if (crmXML == null) {
                    return;
                }
                final ResourceAgent fsService = crmXML.getResourceAgent(
                        "Filesystem",
                        ResourceAgent.HEARTBEAT_PROVIDER,
                        ResourceAgent.OCF_CLASS_NAME);
                if (crmXML.isLinbitDrbdResourceAgentPresent()) { /* just skip it, if it is not */
                    final MyMenuItem ldMenuItem = menuFactory.createMenuItem(
                            Tools.getString("ClusterBrowser.linbitDrbdMenuName"),
                            null,
                            null,
                            new AccessMode(AccessMode.ADMIN, AccessMode.NORMAL),
                            new AccessMode(AccessMode.OP, AccessMode.NORMAL))
                            .addAction(new MenuAction() {
                                @Override
                                public void run(final String text) {
                                    servicesInfo.hidePopup();
                                    if (!servicesInfo.getBrowser().linbitDrbdConfirmDialog()) {
                                        return;
                                    }

                                    final FilesystemRaInfo fsi = (FilesystemRaInfo) servicesInfo.addServicePanel(
                                                    fsService,
                                                    addServiceMenuItem.getPos(),
                                                    true,
                                                    null,
                                                    null,
                                                    runMode);
                                    fsi.setDrbddiskIsPreferred(false);
                                    servicesInfo.getBrowser().getCrmGraph().repaint();
                                }
                            });
                    if (servicesInfo.getBrowser().atLeastOneDrbddiskConfigured()
                            || !crmXML.isLinbitDrbdResourceAgentPresent()) {
                        ldMenuItem.setEnabled(false);
                    }
                    ldMenuItem.setPos(pos);
                    addServiceMenuItem.add(ldMenuItem);
                }
                final ResourceAgent ipService = crmXML.getResourceAgent(
                        "IPaddr2",
                        ResourceAgent.HEARTBEAT_PROVIDER,
                        ResourceAgent.OCF_CLASS_NAME);
                if (ipService != null) { /* just skip it, if it is not*/
                    final MyMenuItem ipMenuItem =
                            menuFactory.createMenuItem(ipService.getPullDownMenuName(),
                                    null,
                                    null,
                                    new AccessMode(AccessMode.ADMIN, AccessMode.NORMAL),
                                    new AccessMode(AccessMode.OP, AccessMode.NORMAL))
                                    .addAction(new MenuAction() {
                                        @Override
                                        public void run(final String text) {
                                            servicesInfo.hidePopup();
                                            servicesInfo.addServicePanel(ipService,
                                                    addServiceMenuItem.getPos(),
                                                    true,
                                                    null,
                                                    null,
                                                    runMode);
                                            servicesInfo.getBrowser().getCrmGraph().repaint();
                                        }
                                    });
                    ipMenuItem.setPos(pos);
                    addServiceMenuItem.add(ipMenuItem);
                }
                if (crmXML.isDrbddiskResourceAgentPresent()
                        && (servicesInfo.getBrowser().isDrbddiskRAPreferred()
                        || servicesInfo.getBrowser().atLeastOneDrbddiskConfigured()
                        || !crmXML.isLinbitDrbdResourceAgentPresent())) {
                    final MyMenuItem ddMenuItem = menuFactory.createMenuItem(
                            Tools.getString("ClusterBrowser.DrbddiskMenuName"),
                            null,
                            null,
                            new AccessMode(AccessMode.ADMIN, AccessMode.NORMAL),
                            new AccessMode(AccessMode.OP, AccessMode.NORMAL))
                            .addAction(new MenuAction() {
                                @Override
                                public void run(final String text) {
                                    servicesInfo.hidePopup();
                                    final FilesystemRaInfo fsi = (FilesystemRaInfo) servicesInfo.addServicePanel(
                                            fsService,
                                            addServiceMenuItem.getPos(),
                                            true,
                                            null,
                                            null,
                                            runMode);
                                    fsi.setDrbddiskIsPreferred(true);
                                    servicesInfo.getBrowser().getCrmGraph().repaint();
                                }
                            });
                    if (servicesInfo.getBrowser().isOneLinbitDrbdRaConfigured()
                            || !crmXML.isDrbddiskResourceAgentPresent()) {
                        ddMenuItem.setEnabled(false);
                    }
                    ddMenuItem.setPos(pos);
                    addServiceMenuItem.add(ddMenuItem);
                }
View Full Code Here

TOP

Related Classes of lcmc.crm.domain.CrmXml$RscSet

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.