Package lcmc.common.domain

Examples of lcmc.common.domain.StringValue


            resourceAgent.setParamShortDesc(STONITH_PRIORITY_INSTANCE_ATTR,
                                 Tools.getString("CRMXML.stonith-priority.ShortDesc"));
            resourceAgent.setParamLongDesc(STONITH_PRIORITY_INSTANCE_ATTR,
                                Tools.getString("CRMXML.stonith-priority.LongDesc"));
            resourceAgent.setParamPossibleChoices(STONITH_PRIORITY_INSTANCE_ATTR,
                                                  new Value[]{new StringValue("0"),
                                                              new StringValue("5"),
                                                              new StringValue("10")});
            resourceAgent.setParamType(STONITH_PRIORITY_INSTANCE_ATTR, PARAM_TYPE_INTEGER);
            resourceAgent.setParamDefault(STONITH_PRIORITY_INSTANCE_ATTR, "0");

            /* pcmk_host_check for stonithd */
            resourceAgent.addParameter(STONITH_PARAM_PCMK_HOST_CHECK);
            resourceAgent.setParamPossibleChoices(STONITH_PARAM_PCMK_HOST_CHECK,
                                                  new Value[]{new StringValue(),
                                                              new StringValue(PCMK_HOST_CHECK_DYNAMIC),
                                                              new StringValue(PCMK_HOST_CHECK_STATIC)});
            resourceAgent.setParamShortDesc(STONITH_PARAM_PCMK_HOST_CHECK,
                                            Tools.getString("CRMXML.pcmk_host_check.ShortDesc"));
            resourceAgent.setParamLongDesc(STONITH_PARAM_PCMK_HOST_CHECK,
                                           Tools.getString("CRMXML.pcmk_host_check.LongDesc"));
            resourceAgent.setParamDefault(STONITH_PARAM_PCMK_HOST_CHECK, PCMK_HOST_CHECK_DYNAMIC);
View Full Code Here


                final Value startDelay = parseValue(resourceAgent + ": " + name + " start-delay",
                        getAttribute(actionNode, "start-delay"));

                final String role = getAttribute(actionNode, "role");
                resourceAgent.addOperationDefault(name, "depth", new StringValue(depth));
                resourceAgent.addOperationDefault(name, "timeout", timeout);
                resourceAgent.addOperationDefault(name, "interval", interval);
                resourceAgent.addOperationDefault(name, "start-delay", startDelay);
                resourceAgent.addOperationDefault(name, "role", new StringValue(role));
            }
        }
        resourceAgent.addOperationDefault("monitor", PARAM_OCF_CHECK_LEVEL, new StringValue(""));
    }
View Full Code Here

        final List<Value> actions = new ArrayList<Value>();
        for (int i = 0; i < actionNodes.getLength(); i++) {
            final Node actionNode = actionNodes.item(i);
            if (actionNode.getNodeName().equals("action")) {
                final String name = getAttribute(actionNode, "name");
                actions.add(new StringValue(name));
            }
        }
        ra.setParamPossibleChoices(FENCING_ACTION_PARAM, actions.toArray(new Value[actions.size()]));
    }
View Full Code Here

            resourceAgent.setParamType(param, "string");
            resourceAgent.setParamDefault(param, "");
        }
        /* <actions> */
        for (final String name : new String[]{"start", "stop", "status", "meta-data"}) {
            resourceAgent.addOperationDefault(name, "timeout", new StringValue("15", CrmXml.getUnitSecond()));
        }
        final String monitorName = "monitor";
        resourceAgent.addOperationDefault(monitorName, "timeout", new StringValue("15", CrmXml.getUnitSecond()));
        resourceAgent.addOperationDefault(monitorName, "interval", new StringValue("15", CrmXml.getUnitSecond()));
        resourceAgent.addOperationDefault(monitorName, "start-delay", new StringValue("15", CrmXml.getUnitSecond()));
        resourceAgent.setProbablyMasterSlave(false);
    }
View Full Code Here

                        if (!"expected-quorum-votes".equals(param)) {
                            final Value defaultValue;
                            if (PARAM_TYPE_TIME.equals(type)) {
                                final Value v = parseValue(param, dv);
                                if (v == null) {
                                    defaultValue = new StringValue(dv);
                                } else {
                                    defaultValue = v;
                                }
                            } else {
                                defaultValue = new StringValue(dv);
                            }
                            globalDefaultMap.put(param, defaultValue);
                        }
                        if (PARAM_TYPE_BOOLEAN.equals(type)) {
                            globalComboBoxChoices.put(param, booleanValues);
View Full Code Here

                        operationsMap.put(crmId, name, "start-delay", parseValue("startDelay", startDelay));

                        opIds.put(name, opId);
                        if ("monitor".equals(name)) {
                            final String checkLevel = parseCheckLevelMonitorAttribute(opNode);
                            operationsMap.put(crmId, name, PARAM_OCF_CHECK_LEVEL, new StringValue(checkLevel));
                        }
                    }
                }
            } else {
                operationsIdRefs.put(crmId, operationsIdRef);
View Full Code Here

        final Matcher m = UNIT_PATTERN.matcher(v);
        if (m.matches()) {
            final String value = m.group(1);
            final String u = m.group(2);
            final Unit unit = parseUnit(param, u);
            return new StringValue(value, unit);
        }
        return null;
    }
View Full Code Here

         * that it must match also during the thing is written.
         */
        final String regexp = "^[\\d.]+$";
        addrWidget = widgetFactory.createInstance(
                              Widget.GUESS_TYPE,
                              new StringValue(Tools.getDefault("Dialog.Cluster.CoroConfig.DefaultMCastAddress")),
                              Widget.NO_ITEMS,
                              regexp,
                              ADDR_COMBOBOX_WIDTH,
                              Widget.NO_ABBRV,
                              new AccessMode(AccessMode.RO, AccessMode.NORMAL),
                              Widget.NO_BUTTON);

        typeWidget.addListeners(new WidgetListener() {
            @Override
            public void check(final Value value) {
                checkInterface();
            }
        });

        ifaceWidget.addListeners(new WidgetListener() {
            @Override
            public void check(final Value value) {
                checkInterface();
            }
        });

        final String portRegexp = "^\\d+$";
        portWidget = widgetFactory.createInstance(
                Widget.GUESS_TYPE,
                new StringValue(Tools.getDefault("Dialog.Cluster.CoroConfig.DefaultMCastPort")),
                Widget.NO_ITEMS,
                portRegexp,
                PORT_COMBOBOX_WIDTH,
                Widget.NO_ABBRV,
                new AccessMode(AccessMode.RO, AccessMode.NORMAL),
View Full Code Here

    }

    /** Return value, that user have chosen in the field or typed in. */
    @Override
    protected Value getValueInternal() {
        final Value value = new StringValue(new String(((JPasswordField) getInternalComponent()).getPassword()));
        if (value.isNothingSelected()) {
            return null;
        }
        return value;
    }
View Full Code Here

        for (final String param : params) {
            final String valueS = clStatus.getGlobalParam(param);
            if (valueS == null) {
                continue;
            }
            final Value value = new StringValue(valueS);
            final Value oldValue = getParamSaved(param);
            if (!Tools.areEqual(value, oldValue)) {
                getResource().setValue(param, value);
                final Widget wi = getWidget(param, null);
                if (wi != null) {
View Full Code Here

TOP

Related Classes of lcmc.common.domain.StringValue

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.