|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.opends.server.api.AttributeSyntax<AttributeSyntaxCfg>
org.opends.server.schema.BooleanSyntax
public class BooleanSyntax
This class defines the Boolean attribute syntax, which only allows values of "TRUE" or "FALSE" (although this implementation is more flexible and will also allow "YES", "ON", or "1" instead of "TRUE", or "NO", "OFF", or "0" instead of "FALSE"). Only equality matching is allowed by default for this syntax.
Field Summary | |
---|---|
static AttributeValueDecoder<java.lang.Boolean> |
DECODER
A Boolean attribute value decoder for this syntax. |
Constructor Summary | |
---|---|
BooleanSyntax()
Creates a new instance of this syntax. |
Method Summary | |
---|---|
static AttributeValue |
createBooleanValue(boolean b)
Retrieves an attribute value containing a representation of the provided boolean value. |
static boolean |
decodeBooleanValue(ByteString normalizedValue)
Decodes the provided normalized value as a boolean. |
ApproximateMatchingRule |
getApproximateMatchingRule()
Retrieves the default approximate matching rule that will be used for attributes with this syntax. |
java.lang.String |
getDescription()
Retrieves a description for this attribute syntax. |
EqualityMatchingRule |
getEqualityMatchingRule()
Retrieves the default equality matching rule that will be used for attributes with this syntax. |
java.lang.String |
getOID()
Retrieves the OID for this attribute syntax. |
OrderingMatchingRule |
getOrderingMatchingRule()
Retrieves the default ordering matching rule that will be used for attributes with this syntax. |
SubstringMatchingRule |
getSubstringMatchingRule()
Retrieves the default substring matching rule that will be used for attributes with this syntax. |
java.lang.String |
getSyntaxName()
Retrieves the common name for this attribute syntax. |
void |
initializeSyntax(AttributeSyntaxCfg configuration)
Initializes this attribute syntax based on the information in the provided configuration entry. |
boolean |
valueIsAcceptable(ByteString value,
MessageBuilder invalidReason)
Indicates whether the provided value is acceptable for use in an attribute with this syntax. |
Methods inherited from class org.opends.server.api.AttributeSyntax |
---|
equals, finalizeSyntax, hashCode, isConfigurationAcceptable, toString, toString |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final AttributeValueDecoder<java.lang.Boolean> DECODER
Boolean
attribute value decoder for this syntax.
Constructor Detail |
---|
public BooleanSyntax()
initializeSyntax
method.
Method Detail |
---|
public void initializeSyntax(AttributeSyntaxCfg configuration) throws ConfigException
initializeSyntax
in class AttributeSyntax<AttributeSyntaxCfg>
configuration
- The configuration to use to initialize
this attribute syntax.
ConfigException
- If an unrecoverable problem arises in
the process of performing the
initialization.public java.lang.String getSyntaxName()
getSyntaxName
in class AttributeSyntax<AttributeSyntaxCfg>
public java.lang.String getOID()
getOID
in class AttributeSyntax<AttributeSyntaxCfg>
public java.lang.String getDescription()
getDescription
in class AttributeSyntax<AttributeSyntaxCfg>
public EqualityMatchingRule getEqualityMatchingRule()
getEqualityMatchingRule
in class AttributeSyntax<AttributeSyntaxCfg>
null
if equality
matches will not be allowed for this type by default.public OrderingMatchingRule getOrderingMatchingRule()
getOrderingMatchingRule
in class AttributeSyntax<AttributeSyntaxCfg>
null
if ordering
matches will not be allowed for this type by default.public SubstringMatchingRule getSubstringMatchingRule()
getSubstringMatchingRule
in class AttributeSyntax<AttributeSyntaxCfg>
null
if substring
matches will not be allowed for this type by default.public ApproximateMatchingRule getApproximateMatchingRule()
getApproximateMatchingRule
in class AttributeSyntax<AttributeSyntaxCfg>
null
if approximate
matches will not be allowed for this type by default.public boolean valueIsAcceptable(ByteString value, MessageBuilder invalidReason)
valueIsAcceptable
in class AttributeSyntax<AttributeSyntaxCfg>
value
- The value for which to make the determination.invalidReason
- The buffer to which the invalid reason should be
appended.
true
if the provided value is acceptable for use with
this syntax, or false
if not.public static AttributeValue createBooleanValue(boolean b)
b
- The boolean value for which to retrieve the attribute value.
public static boolean decodeBooleanValue(ByteString normalizedValue) throws DirectoryException
normalizedValue
- The normalized value to decode as a boolean.
DirectoryException
- If the provided value cannot be decoded as a
boolean.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |