@PublicAPI(stability=VOLATILE, mayInstantiate=true, mayExtend=true, mayInvoke=true) public abstract class ConfigAttribute extends Object
Modifier | Constructor and Description |
---|---|
protected |
ConfigAttribute(String name,
LocalizableMessage description,
boolean isRequired,
boolean isMultiValued,
boolean requiresAdminAction)
Creates a new configuration attribute stub with the provided information
but no values.
|
protected |
ConfigAttribute(String name,
LocalizableMessage description,
boolean isRequired,
boolean isMultiValued,
boolean requiresAdminAction,
LinkedHashSet<org.forgerock.opendj.ldap.ByteString> activeValues)
Creates a new configuration attribute with the provided information.
|
protected |
ConfigAttribute(String name,
LocalizableMessage description,
boolean isRequired,
boolean isMultiValued,
boolean requiresAdminAction,
LinkedHashSet<org.forgerock.opendj.ldap.ByteString> activeValues,
boolean hasPendingValues,
LinkedHashSet<org.forgerock.opendj.ldap.ByteString> pendingValues)
Creates a new configuration attribute with the provided information.
|
Modifier and Type | Method and Description |
---|---|
abstract List<String> |
activeValuesToStrings()
Converts the set of active values for this configuration attribute into a
set of strings that may be stored in the configuration or represented over
protocol.
|
protected void |
addValues(List<org.forgerock.opendj.ldap.ByteString> values)
Attempts to add the provided set of values to this configuration attribute.
|
void |
applyPendingValues()
Applies the set of pending values, making them the active values for this
configuration attribute.
|
abstract ConfigAttribute |
duplicate()
Creates a duplicate of this configuration attribute.
|
LinkedHashSet<org.forgerock.opendj.ldap.ByteString> |
getActiveValues()
Retrieves the set of active values for this configuration attribute.
|
abstract ConfigAttribute |
getConfigAttribute(List<Attribute> attributeList)
Retrieves a new configuration attribute of this type that will contain the
values from the provided attribute.
|
abstract String |
getDataType()
Retrieves the name of the data type for this configuration attribute.
|
LocalizableMessage |
getDescription()
Retrieves the description for this configuration attribute.
|
String |
getName()
Retrieves the name for this configuration attribute.
|
LinkedHashSet<org.forgerock.opendj.ldap.ByteString> |
getPendingValues()
Retrieves the set of values that this configuration attribute will have on
restart or after any necessary administrative action is performed.
|
abstract org.forgerock.opendj.ldap.schema.Syntax |
getSyntax()
Retrieves the attribute syntax for this configuration attribute.
|
boolean |
hasPendingValues()
Indicates whether this attribute has been altered and that there are a set
of pending values that will take effect after appropriate administrative
action.
|
boolean |
isMultiValued()
Indicates whether this configuration attribute may have multiple values.
|
boolean |
isRequired()
Indicates whether this configuration attribute is required to have at least
one value.
|
abstract List<String> |
pendingValuesToStrings()
Converts the set of pending values for this configuration attribute into a
set of strings that may be stored in the configuration or represented over
protocol.
|
protected void |
removeAllValues()
Removes all values from this configuration attribute.
|
protected void |
removeValues(List<org.forgerock.opendj.ldap.ByteString> values)
Attempts to remove the set of values from this configuration attribute.
|
boolean |
requiresAdminAction()
Indicates whether changes to this configuration attribute require
administrative action before they will take effect.
|
protected void |
setActiveValues(LinkedHashSet<org.forgerock.opendj.ldap.ByteString> values)
Specifies the set of active values for this configuration attribute.
|
void |
setInitialValues(LinkedHashSet<org.forgerock.opendj.ldap.ByteString> values)
Assigns the initial values to this configuration attribute.
|
protected void |
setPendingValues(LinkedHashSet<org.forgerock.opendj.ldap.ByteString> values)
Specifies the set of pending values for this configuration attribute.
|
abstract void |
setValue(Attribute jmxAttribute)
Attempts to set the value of this configuration attribute based on the
information in the provided JMX attribute.
|
protected void |
setValues(LinkedHashSet<org.forgerock.opendj.ldap.ByteString> values)
Specifies the set of values for this configuration attribute.
|
abstract LinkedHashSet<org.forgerock.opendj.ldap.ByteString> |
stringsToValues(List<String> valueStrings,
boolean allowFailures)
Converts the provided set of strings to a corresponding set of attribute
values.
|
abstract Attribute |
toJMXAttribute()
Retrieves a JMX attribute containing the active value set for this
configuration attribute.
|
abstract void |
toJMXAttribute(AttributeList attributeList)
Adds information about this configuration attribute to the provided JMX
attribute list.
|
abstract void |
toJMXAttributeInfo(List<MBeanAttributeInfo> attributeInfoList)
Adds information about this configuration attribute to the provided list in
the form of a JMX
MBeanAttributeInfo object. |
abstract Attribute |
toJMXAttributePending()
Retrieves a JMX attribute containing the pending value set for this
configuration attribute.
|
abstract MBeanParameterInfo |
toJMXParameterInfo()
Retrieves a JMX
MBeanParameterInfo object that describes this
configuration attribute. |
abstract boolean |
valueIsAcceptable(org.forgerock.opendj.ldap.ByteString value,
StringBuilder rejectReason)
Indicates whether the provided value is acceptable for use in this
attribute.
|
protected ConfigAttribute(String name, LocalizableMessage description, boolean isRequired, boolean isMultiValued, boolean requiresAdminAction)
setInitialValue
method.name
- The name for this configuration attribute.description
- The description for this configuration
attribute.isRequired
- Indicates whether this configuration attribute
is required to have at least one value.isMultiValued
- Indicates whether this configuration attribute
may have multiple values.requiresAdminAction
- Indicates whether changes to this
configuration attribute require administrative
action before they will take effect.protected ConfigAttribute(String name, LocalizableMessage description, boolean isRequired, boolean isMultiValued, boolean requiresAdminAction, LinkedHashSet<org.forgerock.opendj.ldap.ByteString> activeValues)
name
- The name for this configuration attribute.description
- The description for this configuration
attribute.isRequired
- Indicates whether this configuration attribute
is required to have at least one value.isMultiValued
- Indicates whether this configuration attribute
may have multiple values.requiresAdminAction
- Indicates whether changes to this
configuration attribute require administrative
action before they will take effect.activeValues
- The set of values for this attribute that are
currently active.protected ConfigAttribute(String name, LocalizableMessage description, boolean isRequired, boolean isMultiValued, boolean requiresAdminAction, LinkedHashSet<org.forgerock.opendj.ldap.ByteString> activeValues, boolean hasPendingValues, LinkedHashSet<org.forgerock.opendj.ldap.ByteString> pendingValues)
name
- The name for this configuration attribute.description
- The description for this configuration
attribute.isRequired
- Indicates whether this configuration attribute
is required to have at least one value.isMultiValued
- Indicates whether this configuration attribute
may have multiple values.requiresAdminAction
- Indicates whether changes to this
configuration attribute require administrative
action before they will take effect.activeValues
- The set of values for this attribute that are
currently active.hasPendingValues
- Indicates whether this attribute has any
pending values that will take effect after
appropriate administrative action.pendingValues
- The set of values for this attribute that will
be in effect after the appropriate
administrative action is taken. This may be
null
if changes will take effect
immediately.public String getName()
public LocalizableMessage getDescription()
null
if there is no description.public abstract String getDataType()
public abstract org.forgerock.opendj.ldap.schema.Syntax getSyntax()
public boolean isRequired()
true
if this configuration attribute is required to
have at least one value, or false
if not.public boolean isMultiValued()
true
if this configuration attribute may have
multiple values, or false
if not.public boolean requiresAdminAction()
true
if changes to this configuration attribute
require administrative action before they will take effect, or
false
if changes will take effect immediately.public LinkedHashSet<org.forgerock.opendj.ldap.ByteString> getActiveValues()
public boolean hasPendingValues()
true
if this attribute has pending values, or
false
if not.public LinkedHashSet<org.forgerock.opendj.ldap.ByteString> getPendingValues()
public abstract boolean valueIsAcceptable(org.forgerock.opendj.ldap.ByteString value, StringBuilder rejectReason)
value
- The value for which to make the determination.rejectReason
- A buffer into which a human-readable reason for the
reject may be written.true
if the provided value is acceptable for use in
this attribute, or false
if not.protected void setValues(LinkedHashSet<org.forgerock.opendj.ldap.ByteString> values) throws ConfigException
valueIsAcceptable
method, and
only a single value will be allowed unless isMultiValued
returns true
. If the set of values is acceptable, then it
will be set either as the active set of values if changes are to take
effect immediately, or if not then it will be applied to the set of
pending values.values
- The set of values to apply to this attribute.ConfigException
- If the provided set of values is not acceptable
for some reason.protected void setActiveValues(LinkedHashSet<org.forgerock.opendj.ldap.ByteString> values)
values
- The set of active values for this configuration attribute.protected void setPendingValues(LinkedHashSet<org.forgerock.opendj.ldap.ByteString> values)
values
- The set of pending values for this configuration attribute.protected void addValues(List<org.forgerock.opendj.ldap.ByteString> values) throws ConfigException
values
- The set of values to add to this configuration attribute.ConfigException
- If a problem occurs while attempting to add the
provided set of values to this configuration
attribute.protected void removeValues(List<org.forgerock.opendj.ldap.ByteString> values) throws ConfigException
values
- The set of values to remove from this configuration
attribute.ConfigException
- If any of the provided values are not in the
value set, or if this is a required attribute and
the resulting value list would be empty.protected void removeAllValues() throws ConfigException
ConfigException
- If this is a required attribute that must have at
least one value.public void setInitialValues(LinkedHashSet<org.forgerock.opendj.ldap.ByteString> values)
values
- The initial set of values to assign to this configuration
attribute.public void applyPendingValues()
public abstract LinkedHashSet<org.forgerock.opendj.ldap.ByteString> stringsToValues(List<String> valueStrings, boolean allowFailures) throws ConfigException
valueStrings
- The set of strings to be converted into attribute
values.allowFailures
- Indicates whether the decoding process should allow
any failures in which one or more values could be
decoded but at least one could not. If this is
true
and such a condition is acceptable
for the underlying attribute type, then the returned
set of values should simply not include those
undecodable values.ConfigException
- If an unrecoverable problem occurs while
performing the conversion.public abstract List<String> activeValuesToStrings()
stringsToValues
method.public abstract List<String> pendingValuesToStrings()
stringsToValues
method.null
if there are no
pending values.public abstract ConfigAttribute getConfigAttribute(List<Attribute> attributeList) throws ConfigException
attributeList
- The list of attributes to use to create the config
attribute. The list must contain either one or two
elements, with both attributes having the same base
name and the only option allowed is ";pending" and
only if this attribute is one that requires admin
action before a change may take effect.ConfigException
- If the provided attribute cannot be treated as a
configuration attribute of this type (e.g., if
one or more of the values of the provided
attribute are not suitable for an attribute of
this type, or if this configuration attribute is
single-valued and the provided attribute has
multiple values).public abstract Attribute toJMXAttribute()
public abstract Attribute toJMXAttributePending()
public abstract void toJMXAttribute(AttributeList attributeList)
attributeList
- The attribute list to which the JMX attribute(s)
should be added.public abstract void toJMXAttributeInfo(List<MBeanAttributeInfo> attributeInfoList)
MBeanAttributeInfo
object. If this
configuration attribute requires administrative action before changes take
effect and it has a set of pending values, then two attribute info objects
should be added to the list -- one for the active value (which should be
read-write) and one for the pending value (which should be read-only). The
pending value should be named with the pending option.attributeInfoList
- The list to which the attribute information
should be added.public abstract MBeanParameterInfo toJMXParameterInfo()
MBeanParameterInfo
object that describes this
configuration attribute.MBeanParameterInfo
object that describes this
configuration attribute.public abstract void setValue(Attribute jmxAttribute) throws ConfigException
jmxAttribute
- The JMX attribute to use to attempt to set the value
of this configuration attribute.ConfigException
- If the provided JMX attribute does not have an
acceptable value for this configuration
attribute.public abstract ConfigAttribute duplicate()
Copyright © 2010-2016 ForgeRock AS. All Rights Reserved.