| | |
| | | */ |
| | | public String getDataType() |
| | | { |
| | | |
| | | return "Boolean"; |
| | | } |
| | | |
| | |
| | | */ |
| | | public AttributeSyntax getSyntax() |
| | | { |
| | | |
| | | return DirectoryServer.getDefaultBooleanSyntax(); |
| | | } |
| | | |
| | |
| | | */ |
| | | public boolean activeValue() |
| | | { |
| | | |
| | | return activeValue; |
| | | } |
| | | |
| | |
| | | */ |
| | | public boolean pendingValue() |
| | | { |
| | | |
| | | if (hasPendingValues()) |
| | | { |
| | | return pendingValue; |
| | |
| | | */ |
| | | public void setValue(boolean booleanValue) |
| | | { |
| | | |
| | | if (requiresAdminAction()) |
| | | { |
| | | pendingValue = booleanValue; |
| | |
| | | */ |
| | | private static LinkedHashSet<AttributeValue> getValueSet(boolean booleanValue) |
| | | { |
| | | |
| | | LinkedHashSet<AttributeValue> valueSet = |
| | | new LinkedHashSet<AttributeValue>(1); |
| | | if (booleanValue) |
| | |
| | | */ |
| | | public void applyPendingValues() |
| | | { |
| | | |
| | | if (! hasPendingValues()) |
| | | { |
| | | return; |
| | |
| | | public boolean valueIsAcceptable(AttributeValue value, |
| | | StringBuilder rejectReason) |
| | | { |
| | | |
| | | String stringValue = value.getStringValue(); |
| | | if (stringValue.equalsIgnoreCase(CONFIG_VALUE_TRUE) || |
| | | stringValue.equalsIgnoreCase(CONFIG_VALUE_FALSE)) |
| | |
| | | boolean allowFailures) |
| | | throws ConfigException |
| | | { |
| | | |
| | | if ((valueStrings == null) || valueStrings.isEmpty()) |
| | | { |
| | | int msgID = MSGID_CONFIG_ATTR_IS_REQUIRED; |
| | |
| | | */ |
| | | public List<String> activeValuesToStrings() |
| | | { |
| | | |
| | | ArrayList<String> valueStrings = new ArrayList<String>(1); |
| | | valueStrings.add(String.valueOf(activeValue)); |
| | | |
| | |
| | | */ |
| | | public List<String> pendingValuesToStrings() |
| | | { |
| | | |
| | | if (hasPendingValues()) |
| | | { |
| | | ArrayList<String> valueStrings = new ArrayList<String>(1); |
| | |
| | | public ConfigAttribute getConfigAttribute(List<Attribute> attributeList) |
| | | throws ConfigException |
| | | { |
| | | |
| | | |
| | | boolean activeValue = false; |
| | | boolean pendingValue = false; |
| | | boolean activeValueSet = false; |
| | |
| | | */ |
| | | public javax.management.Attribute toJMXAttribute() |
| | | { |
| | | |
| | | return new javax.management.Attribute(getName(), activeValue); |
| | | } |
| | | |
| | |
| | | */ |
| | | public void toJMXAttribute(AttributeList attributeList) |
| | | { |
| | | |
| | | attributeList.add(new javax.management.Attribute(getName(), activeValue)); |
| | | |
| | | if (requiresAdminAction() && (pendingValue != activeValue)) |
| | |
| | | */ |
| | | public void toJMXAttributeInfo(List<MBeanAttributeInfo> attributeInfoList) |
| | | { |
| | | |
| | | attributeInfoList.add(new MBeanAttributeInfo(getName(), |
| | | Boolean.class.getName(), |
| | | getDescription(), true, true, |
| | |
| | | */ |
| | | public MBeanParameterInfo toJMXParameterInfo() |
| | | { |
| | | |
| | | return new MBeanParameterInfo(getName(), Boolean.TYPE.getName(), |
| | | getDescription()); |
| | | } |
| | |
| | | public void setValue(javax.management.Attribute jmxAttribute) |
| | | throws ConfigException |
| | | { |
| | | |
| | | Object value = jmxAttribute.getValue(); |
| | | if (value instanceof Boolean) |
| | | { |
| | |
| | | */ |
| | | public ConfigAttribute duplicate() |
| | | { |
| | | |
| | | return new BooleanConfigAttribute(getName(), getDescription(), |
| | | requiresAdminAction(), activeValue, |
| | | pendingValue); |