Package org.forgerock.opendj.ldap
Class DecodeOptions
java.lang.Object
org.forgerock.opendj.ldap.DecodeOptions
Decode options allow applications to control how requests and responses are
decoded. In particular:
- The strategy for selecting which
Schemashould be used for decoding distinguished names, attribute descriptions, and other objects which require a schema in order to be decoded. - The
Attributeimplementation which should be used when decoding attributes. - The
Entryimplementation which should be used when decoding entries or entry like objects.
-
Constructor Summary
ConstructorsConstructorDescriptionCreates a new set of decode options which will always use the default schema returned bySchema.getDefaultSchema(),LinkedAttribute, andLinkedHashMapEntry.DecodeOptions(DecodeOptions options) Creates a new set of decode options having the same initial set of options as the provided set of decode options. -
Method Summary
Modifier and TypeMethodDescriptionReturns the function which will be used for creating newAttributeinstances when decoding attributes.Returns the function which will be used for creating newEntryinstances when decoding entries.Returns the strategy for selecting whichSchemashould be used for decoding distinguished names, attribute descriptions, and other objects which require aSchemain order to be decoded.Sets the function which will be used for creating newAttributeinstances when decoding attributes.setEntryFactory(Function<Dn, Entry> factory) Sets the function which will be used for creating newEntryinstances when decoding entries.Sets theSchemawhich will be used for decoding distinguished names, attribute descriptions, and other objects which require a schema in order to be decoded.setSchemaResolver(SchemaResolver resolver) Sets the strategy for selecting whichSchemashould be used for decoding distinguished names, attribute descriptions, and other objects which require aSchemain order to be decoded.
-
Constructor Details
-
DecodeOptions
public DecodeOptions()Creates a new set of decode options which will always use the default schema returned bySchema.getDefaultSchema(),LinkedAttribute, andLinkedHashMapEntry. -
DecodeOptions
Creates a new set of decode options having the same initial set of options as the provided set of decode options.- Parameters:
options- The set of decode options to be copied.
-
-
Method Details
-
getAttributeFactory
Returns the function which will be used for creating newAttributeinstances when decoding attributes.- Returns:
- The function which will be used for creating new
Attributeinstances when decoding attributes.
-
getEntryFactory
Returns the function which will be used for creating newEntryinstances when decoding entries.- Returns:
- The function which will be used for creating new
Entryinstances when decoding entries.
-
getSchemaResolver
Returns the strategy for selecting whichSchemashould be used for decoding distinguished names, attribute descriptions, and other objects which require aSchemain order to be decoded.- Returns:
- The schema resolver which will be used for decoding.
-
setAttributeFactory
Sets the function which will be used for creating newAttributeinstances when decoding attributes.- Parameters:
factory- The function which will be used for creating newAttributeinstances when decoding attributes.- Returns:
- A reference to this set of decode options.
- Throws:
NullPointerException- Iffactorywasnull.
-
setEntryFactory
Sets the function which will be used for creating newEntryinstances when decoding entries.- Parameters:
factory- The function which will be used for creating newEntryinstances when decoding entries.- Returns:
- A reference to this set of decode options.
- Throws:
NullPointerException- Iffactorywasnull.
-
setSchema
Sets theSchemawhich 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 usingsetSchemaResolver(org.forgerock.opendj.ldap.SchemaResolver).- Parameters:
schema- TheSchemawhich will be used for decoding.- Returns:
- A reference to this set of decode options.
- Throws:
NullPointerException- Ifschemawasnull.
-
setSchemaResolver
Sets the strategy for selecting whichSchemashould be used for decoding distinguished names, attribute descriptions, and other objects which require aSchemain order to be decoded. This setting overrides the currently active schema set usingsetSchema(org.forgerock.opendj.ldap.schema.Schema).- Parameters:
resolver- TheSchemaResolverwhich will be used for decoding.- Returns:
- A reference to this set of decode options.
- Throws:
NullPointerException- Ifresolverwasnull.
-