public final class DecodeOptions extends Object
Schema
should be used for
decoding distinguished names, attribute descriptions, and other objects which
require a schema in order to be decoded.
Attribute
implementation which should be used when decoding
attributes.
Entry
implementation which should be used when decoding
entries or entry like objects.
Constructor and Description |
---|
DecodeOptions()
Creates a new set of decode options which will always use the default
schema returned by
Schema.getDefaultSchema() ,
LinkedAttribute , and LinkedHashMapEntry . |
DecodeOptions(DecodeOptions options)
Creates a new set of decode options having the same initial set of
options as the provided set of decode options.
|
Modifier and Type | Method and Description |
---|---|
Function<AttributeDescription,Attribute> |
getAttributeFactory()
Returns the function which will be used for creating new
Attribute instances when decoding attributes. |
Function<Dn,Entry> |
getEntryFactory()
Returns the function which will be used for creating new
Entry instances when decoding entries. |
SchemaResolver |
getSchemaResolver()
Returns the strategy for selecting which
Schema should be used
for decoding distinguished names, attribute descriptions, and other
objects which require a Schema in order to be decoded. |
DecodeOptions |
setAttributeFactory(Function<AttributeDescription,Attribute> factory)
Sets the function which will be used for creating new
Attribute instances when decoding attributes. |
DecodeOptions |
setEntryFactory(Function<Dn,Entry> factory)
Sets the function which will be used for creating new
Entry instances when decoding entries. |
DecodeOptions |
setSchema(Schema schema)
Sets the
Schema which will be used for decoding distinguished
names, attribute descriptions, and other objects which require a schema
in order to be decoded. |
DecodeOptions |
setSchemaResolver(SchemaResolver resolver)
Sets the strategy for selecting which
Schema should be used for
decoding distinguished names, attribute descriptions, and other objects
which require a Schema in order to be decoded. |
public DecodeOptions()
Schema.getDefaultSchema()
,
LinkedAttribute
, and LinkedHashMapEntry
.public DecodeOptions(DecodeOptions options)
options
- The set of decode options to be copied.public final Function<AttributeDescription,Attribute> getAttributeFactory()
Attribute
instances when decoding attributes.Attribute
instances when decoding attributes.public final Function<Dn,Entry> getEntryFactory()
Entry
instances when decoding entries.Entry
instances when decoding entries.public final SchemaResolver getSchemaResolver()
Schema
should be used
for decoding distinguished names, attribute descriptions, and other
objects which require a Schema
in order to be decoded.public final DecodeOptions setAttributeFactory(Function<AttributeDescription,Attribute> factory)
Attribute
instances when decoding attributes.factory
- The function which will be used for creating new Attribute
instances when decoding attributes.NullPointerException
- If factory
was null
.public final DecodeOptions setEntryFactory(Function<Dn,Entry> factory)
Entry
instances when decoding entries.factory
- The function which will be used for creating new Entry
instances when decoding entries.NullPointerException
- If factory
was null
.public final DecodeOptions setSchema(Schema schema)
Schema
which will be used for decoding distinguished
names, attribute descriptions, and other objects which require a schema
in order to be decoded. This setting overrides the currently active
schema resolver set using setSchemaResolver(org.forgerock.opendj.ldap.SchemaResolver)
.schema
- The Schema
which will be used for decoding.NullPointerException
- If schema
was null
.public final DecodeOptions setSchemaResolver(SchemaResolver resolver)
Schema
should be used for
decoding distinguished names, attribute descriptions, and other objects
which require a Schema
in order to be decoded. This setting
overrides the currently active schema set using setSchema(org.forgerock.opendj.ldap.schema.Schema)
.resolver
- The SchemaResolver
which will be used for decoding.NullPointerException
- If resolver
was null
.Copyright 2010-2022 ForgeRock AS.