@PublicAPI(stability=UNCOMMITTED, mayInstantiate=false, mayExtend=true, mayInvoke=false) public class CompressedSchema extends Object
Constructor and Description |
---|
CompressedSchema() |
Modifier and Type | Method and Description |
---|---|
Attribute |
decodeAttribute(org.forgerock.opendj.ldap.ByteSequenceReader reader)
Decodes the contents of the provided array as an attribute at the current
position.
|
Map<ObjectClass,String> |
decodeObjectClasses(org.forgerock.opendj.ldap.ByteSequenceReader reader)
Decodes an object class set from the provided byte string.
|
void |
encodeAttribute(org.forgerock.opendj.ldap.ByteStringBuilder builder,
Attribute attribute)
Encodes the information in the provided attribute to a byte array.
|
void |
encodeObjectClasses(org.forgerock.opendj.ldap.ByteStringBuilder builder,
Map<ObjectClass,String> objectClasses)
Encodes the provided set of object classes to a byte array.
|
protected Iterable<Map.Entry<byte[],Map.Entry<String,Collection<String>>>> |
getAllAttributes()
Returns a view of the encoded attributes in this compressed schema which
can be used for saving the entire content to disk.
|
protected Iterable<Map.Entry<byte[],Collection<String>>> |
getAllObjectClasses()
Returns a view of the encoded object classes in this compressed schema
which can be used for saving the entire content to disk.
|
protected Map.Entry<AttributeType,Set<String>> |
loadAttribute(byte[] encodedAttribute,
String attributeName,
Collection<String> attributeOptions)
Loads an encoded attribute into this compressed schema.
|
protected Map<ObjectClass,String> |
loadObjectClasses(byte[] encodedObjectClasses,
Collection<String> objectClassNames)
Loads an encoded object class into this compressed schema.
|
protected void |
storeAttribute(byte[] encodedAttribute,
String attributeName,
Collection<String> attributeOptions)
Persists the provided encoded attribute.
|
protected void |
storeObjectClasses(byte[] encodedObjectClasses,
Collection<String> objectClassNames)
Persists the provided encoded object classes.
|
public CompressedSchema()
public final Attribute decodeAttribute(org.forgerock.opendj.ldap.ByteSequenceReader reader) throws DirectoryException
reader
- The byte string reader containing the encoded entry.DirectoryException
- If the attribute could not be decoded properly for some reason.public final Map<ObjectClass,String> decodeObjectClasses(org.forgerock.opendj.ldap.ByteSequenceReader reader) throws DirectoryException
reader
- The byte string reader containing the object class set identifier.DirectoryException
- If the provided byte string reader cannot be decoded as an object
class set.public final void encodeAttribute(org.forgerock.opendj.ldap.ByteStringBuilder builder, Attribute attribute) throws DirectoryException
builder
- The buffer to encode the attribute to.attribute
- The attribute to be encoded.DirectoryException
- If a problem occurs while attempting to determine the appropriate
identifier.public final void encodeObjectClasses(org.forgerock.opendj.ldap.ByteStringBuilder builder, Map<ObjectClass,String> objectClasses) throws DirectoryException
builder
- The buffer to encode the object classes to.objectClasses
- The set of object classes for which to retrieve the corresponding
byte array token.DirectoryException
- If a problem occurs while attempting to determine the appropriate
identifier.protected final Iterable<Map.Entry<byte[],Map.Entry<String,Collection<String>>>> getAllAttributes()
protected final Iterable<Map.Entry<byte[],Collection<String>>> getAllObjectClasses()
protected final Map.Entry<AttributeType,Set<String>> loadAttribute(byte[] encodedAttribute, String attributeName, Collection<String> attributeOptions)
encodedAttribute
- The encoded attribute description.attributeName
- The user provided attribute type name.attributeOptions
- The non-null but possibly empty set of attribute options.protected final Map<ObjectClass,String> loadObjectClasses(byte[] encodedObjectClasses, Collection<String> objectClassNames)
encodedObjectClasses
- The encoded object classes.objectClassNames
- The user provided set of object class names.protected void storeAttribute(byte[] encodedAttribute, String attributeName, Collection<String> attributeOptions) throws DirectoryException
storeObjectClasses(byte[], Collection)
.encodedAttribute
- The encoded attribute description.attributeName
- The user provided attribute type name.attributeOptions
- The non-null but possibly empty set of attribute options.DirectoryException
- If an error occurred while persisting the encoded attribute.protected void storeObjectClasses(byte[] encodedObjectClasses, Collection<String> objectClassNames) throws DirectoryException
storeAttribute(byte[], String, Collection)
.encodedObjectClasses
- The encoded object classes.objectClassNames
- The user provided set of object class names.DirectoryException
- If an error occurred while persisting the encoded object classes.Copyright © 2010-2016 ForgeRock AS. All Rights Reserved.