|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.opends.server.types.Entry
@PublicAPI(stability=UNCOMMITTED, mayInstantiate=true, mayExtend=false, mayInvoke=true) public class Entry
This class defines a data structure for a Directory Server entry.
It includes a DN and a set of attributes.
The entry also contains a volatile attachment object, which should
be used to associate the entry with a special type of object that
is based on its contents. For example, if the entry holds access
control information, then the attachment might be an object that
contains a representation of that access control definition in a
more useful form. This is only useful if the entry is to be
cached, since the attachment may be accessed if the entry is
retrieved from the cache, but if the entry is retrieved from the
backend repository it cannot be guaranteed to contain any
attachment (and in most cases will not). This attachment is
volatile in that it is not always guaranteed to be present, it may
be removed or overwritten at any time, and it will be invalidated
and removed if the entry is altered in any way.
Constructor Summary | |
---|---|
Entry(DN dn,
java.util.Map<ObjectClass,java.lang.String> objectClasses,
java.util.Map<AttributeType,java.util.List<Attribute>> userAttributes,
java.util.Map<AttributeType,java.util.List<Attribute>> operationalAttributes)
Creates a new entry with the provided information. |
Method Summary | ||
---|---|---|
void |
addAttribute(Attribute attribute,
java.util.List<AttributeValue> duplicateValues)
Adds the provided attribute to this entry. |
|
void |
addObjectClass(AttributeValue objectClassName)
Adds the objectClass with the given name to this entry. |
|
void |
addObjectClass(ObjectClass oc)
Adds the provided objectClass to this entry. |
|
void |
addObjectClasses(java.util.Collection<AttributeValue> objectClassNames)
Adds the objectclasses corresponding to the provided set of names to this entry. |
|
boolean |
allowsAttribute(AttributeType attributeType)
Indicates whether the specified attribute type is allowed by any of the objectclasses associated with this entry. |
|
void |
applyModification(Modification mod)
Applies the provided modification to this entry. |
|
void |
applyModifications(java.util.List<Modification> mods)
Applies all of the provided modifications to this entry. |
|
boolean |
conformsToSchema(Entry parentEntry,
boolean parentProvided,
boolean validateNameForms,
boolean validateStructureRules,
MessageBuilder invalidReason)
Indicates whether this entry conforms to the server's schema requirements. |
|
static Entry |
decode(byte[] entryBytes)
Decodes the provided byte array as an entry. |
|
static Entry |
decode(byte[] entryBytes,
CompressedSchema compressedSchema)
Decodes the provided byte array as an entry. |
|
static Entry |
decodeV1(byte[] entryBytes)
Decodes the provided byte array as an entry using the V1 encoding. |
|
static Entry |
decodeV2(byte[] entryBytes,
CompressedSchema compressedSchema)
Decodes the provided byte array as an entry using the V2 encoding. |
|
Entry |
duplicate(boolean processVirtual)
Creates a duplicate of this entry that may be altered without impacting the information in this entry. |
|
java.util.List<Attribute> |
duplicateOperationalAttribute(AttributeType attributeType)
Retrieves a duplicate of the operational attribute list for the specified type. |
|
java.util.List<Attribute> |
duplicateOperationalAttribute(AttributeType attributeType,
java.util.Set<java.lang.String> options,
boolean omitValues)
Retrieves a copy of the requested operational attribute element(s) for the specified attribute type. |
|
java.util.List<Attribute> |
duplicateUserAttribute(AttributeType attributeType)
Retrieves a duplicate of the user attribute list for the specified type. |
|
java.util.List<Attribute> |
duplicateUserAttribute(AttributeType attributeType,
java.util.Set<java.lang.String> options,
boolean omitValues)
Retrieves a copy of the requested user attribute element(s) for the specified attribute type. |
|
Entry |
duplicateWithoutAttributes()
Creates a duplicate of this entry without any attribute or objectclass information (i.e., it will just contain the DN and placeholders for adding attributes) and objectclasses. |
|
Entry |
duplicateWithoutOperationalAttributes(boolean typesOnly,
boolean processVirtual)
Creates a duplicate of this entry without any operational attributes that may be altered without impacting the information in this entry. |
|
byte[] |
encode(EntryEncodeConfig config)
Encodes this entry into a form that is suitable for long-term persistent storage. |
|
byte[] |
encodeV1()
Encodes this entry using the V1 encoding. |
|
byte[] |
encodeV2(EntryEncodeConfig config)
Encodes this entry using the V2 encoding. |
|
boolean |
equals(java.lang.Object o)
Indicates whether the provided object is equal to this entry. |
|
DN |
getAliasedDN()
Retrieves the DN of the entry referenced by this alias entry. |
|
java.lang.Object |
getAttachment()
Retrieves the attachment for this entry. |
|
java.util.List<Attribute> |
getAttribute(AttributeType attributeType)
Retrieves the requested attribute element(s) for the specified attribute type. |
|
java.util.List<Attribute> |
getAttribute(AttributeType attributeType,
boolean includeSubordinates)
Retrieves the requested attribute element(s) for the specified attribute type. |
|
java.util.List<Attribute> |
getAttribute(AttributeType attributeType,
boolean includeSubordinates,
java.util.Set<java.lang.String> options)
Retrieves the requested attribute element(s) for the specified attribute type. |
|
java.util.List<Attribute> |
getAttribute(AttributeType attributeType,
java.util.Set<java.lang.String> options)
Retrieves the requested attribute element(s) for the specified attribute type. |
|
java.util.List<Attribute> |
getAttribute(java.lang.String lowerName)
Retrieves the requested attribute element(s) for the attribute with the specified name or OID. |
|
java.util.List<Attribute> |
getAttribute(java.lang.String lowerName,
java.util.Set<java.lang.String> options)
Retrieves the requested attribute element(s) for the attribute with the specified name or OID and set of options. |
|
java.util.List<Attribute> |
getAttributes()
Retrieves the entire set of attributes for this entry. |
|
|
getAttributeValue(AttributeType attributeType,
AttributeValueDecoder<T> decoder)
Retrieves the requested attribute type from the entry and decodes a single value as an object of type T. |
|
|
getAttributeValues(AttributeType attributeType,
AttributeValueDecoder<? extends T> decoder,
java.util.Collection<T> collection)
Retrieves the requested attribute type from the entry and decodes any values as objects of type T and then places them in the specified collection. |
|
DN |
getDN()
Retrieves the distinguished name for this entry. |
|
Attribute |
getObjectClassAttribute()
Retrieves an attribute holding the objectclass information for this entry. |
|
java.util.Map<ObjectClass,java.lang.String> |
getObjectClasses()
Retrieves the set of objectclasses defined for this entry. |
|
java.util.List<Attribute> |
getOperationalAttribute(AttributeType attributeType)
Retrieves the requested operational attribute element(s) for the specified attribute type. |
|
java.util.List<Attribute> |
getOperationalAttribute(AttributeType attributeType,
java.util.Set<java.lang.String> options)
Retrieves the requested operational attribute element(s) for the specified attribute type. |
|
java.util.Map<AttributeType,java.util.List<Attribute>> |
getOperationalAttributes()
Retrieves the entire set of operational attributes for this entry. |
|
java.lang.String |
getProtocolElementName()
Retrieves the name of the protocol associated with this protocol element. |
|
java.util.LinkedHashSet<java.lang.String> |
getReferralURLs()
Retrieves the set of referral URLs that are included in this referral entry. |
|
ObjectClass |
getStructuralObjectClass()
Retrieves the structural objectclass for this entry. |
|
java.util.List<Attribute> |
getUserAttribute(AttributeType attributeType)
Retrieves the requested user attribute element(s) for the specified attribute type. |
|
java.util.List<Attribute> |
getUserAttribute(AttributeType attributeType,
java.util.Set<java.lang.String> options)
Retrieves the requested user attribute element(s) for the specified attribute type. |
|
java.util.Map<AttributeType,java.util.List<Attribute>> |
getUserAttributes()
Retrieves the entire set of user (i.e., non-operational) attributes for this entry. |
|
boolean |
hasAttribute(AttributeType attributeType)
Indicates whether this entry contains the specified attribute. |
|
boolean |
hasAttribute(AttributeType attributeType,
boolean includeSubordinates)
Indicates whether this entry contains the specified attribute. |
|
boolean |
hasAttribute(AttributeType attributeType,
boolean includeSubordinates,
java.util.Set<java.lang.String> attributeOptions)
Indicates whether this entry contains the specified attribute with all of the options in the provided set. |
|
boolean |
hasAttribute(AttributeType attributeType,
java.util.Set<java.lang.String> attributeOptions)
Indicates whether this entry contains the specified attribute with all of the options in the provided set. |
|
int |
hashCode()
Retrieves a hash code for this entry. |
|
boolean |
hasObjectClass(ObjectClass objectClass)
Indicates whether this entry has the specified objectclass. |
|
boolean |
hasOperationalAttribute(AttributeType attributeType)
Indicates whether this entry contains the specified operational attribute. |
|
boolean |
hasUserAttribute(AttributeType attributeType)
Indicates whether this entry contains the specified user attribute. |
|
boolean |
hasValue(AttributeType attributeType,
java.util.Set<java.lang.String> options,
AttributeValue value)
Indicates whether this entry contains the specified attribute value. |
|
boolean |
isAlias()
Indicates whether this entry meets the criteria to consider it an alias (e.g., it contains the "aliasObject" objectclass and a "alias" attribute). |
|
boolean |
isLDAPSubentry()
Indicates whether this entry meets the criteria to consider it an LDAP subentry (i.e., it contains the "ldapSubentry" objectclass). |
|
boolean |
isReferral()
Indicates whether this entry meets the criteria to consider it a referral (e.g., it contains the "referral" objectclass and a "ref" attribute). |
|
boolean |
matchesBaseAndScope(DN baseDN,
SearchScope scope)
Indicates whether this entry falls within the range of the provided search base DN and scope. |
|
void |
processVirtualAttributes()
Performs any necessary virtual attribute processing for this entry. |
|
void |
processVirtualAttributes(boolean includeOperational)
Performs any necessary virtual attribute processing for this entry. |
|
void |
putAttribute(AttributeType attributeType,
java.util.List<Attribute> attributeList)
Puts the provided attribute in this entry. |
|
boolean |
removeAttribute(Attribute attribute,
java.util.List<AttributeValue> missingValues)
Removes the provided attribute from this entry. |
|
boolean |
removeAttribute(AttributeType attributeType)
Removes all instances of the specified attribute type from this entry, including any instances with options. |
|
boolean |
removeAttribute(AttributeType attributeType,
java.util.Set<java.lang.String> options)
Removes the attribute with the provided type and set of options from this entry. |
|
boolean |
requiresAttribute(AttributeType attributeType)
Indicates whether the specified attribute type is required by any of the objectclasses associated with this entry. |
|
void |
setAttachment(java.lang.Object attachment)
Specifies the attachment for this entry. |
|
void |
setDN(DN dn)
Specifies the distinguished name for this entry. |
|
void |
setObjectClasses(java.util.Collection<AttributeValue> objectClassNames)
Specifies the set of objectclasses for this entry. |
|
void |
stripRealAttributes()
Strips out all real attributes from this entry so that it only contains virtual attributes. |
|
void |
stripVirtualAttributes()
Strips out all virtual attributes from this entry so that it only contains real attributes. |
|
java.util.List<java.lang.StringBuilder> |
toLDIF()
Retrieves a list of the lines for this entry in LDIF form. |
|
boolean |
toLDIF(LDIFExportConfig exportConfig)
Writes this entry in LDIF form according to the provided configuration. |
|
java.lang.String |
toLDIFString()
Retrieves a string representation of this entry in LDIF form. |
|
java.lang.String |
toSingleLineString()
Retrieves a one-line representation of this entry. |
|
void |
toSingleLineString(java.lang.StringBuilder buffer)
Appends a single-line representation of this entry to the provided buffer. |
|
java.lang.String |
toString()
Retrieves a string representation of this protocol element. |
|
void |
toString(java.lang.StringBuilder buffer)
Appends a string representation of this protocol element to the provided buffer. |
|
void |
toString(java.lang.StringBuilder buffer,
int indent)
Appends a string representation of this protocol element to the provided buffer. |
|
boolean |
virtualAttributeProcessingPerformed()
Indicates whether virtual attribute processing has been performed for this entry. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Entry(DN dn, java.util.Map<ObjectClass,java.lang.String> objectClasses, java.util.Map<AttributeType,java.util.List<Attribute>> userAttributes, java.util.Map<AttributeType,java.util.List<Attribute>> operationalAttributes)
dn
- The distinguished name for this
entry.objectClasses
- The set of objectclasses for this
entry as a mapping between the
objectclass and the name to use to
reference it.userAttributes
- The set of user attributes for
this entry as a mapping between
the attribute type and the list of
attributes with that type.operationalAttributes
- The set of operational attributes
for this entry as a mapping
between the attribute type and the
list of attributes with that type.Method Detail |
---|
public DN getDN()
public void setDN(DN dn)
dn
- The distinguished name for this entry.public java.util.Map<ObjectClass,java.lang.String> getObjectClasses()
public boolean hasObjectClass(ObjectClass objectClass)
objectClass
- The objectclass for which to make the
determination.
true
if this entry has the specified
objectclass, or false
if not.public ObjectClass getStructuralObjectClass()
null
if there is none for some reason. If
there are multiple structural classes in the entry, then
the first will be returned.public void setObjectClasses(java.util.Collection<AttributeValue> objectClassNames) throws DirectoryException
objectClassNames
- The values containing the names or OIDs
of the objectClasses for this entry.
DirectoryException
- If a problem occurs while attempting
to set the objectclasses for this
entry.public void addObjectClass(AttributeValue objectClassName) throws DirectoryException
objectClassName
- The value containing the name or OID of
the objectClass to add to this entry.
DirectoryException
- If a problem occurs while attempting
to add the objectclass to this
entry.public void addObjectClass(ObjectClass oc) throws DirectoryException
oc
- The objectClass to add to this entry.
DirectoryException
- If a problem occurs while attempting
to add the objectclass to this
entry.public void addObjectClasses(java.util.Collection<AttributeValue> objectClassNames) throws DirectoryException
objectClassNames
- The values containing the names or OIDs
of the objectClasses to add to this
entry.
DirectoryException
- If a problem occurs while attempting
to add the set of objectclasses to
this entry.public java.util.List<Attribute> getAttributes()
getUserAttributes
or
getOperationalAttributes
, so it should only be used
when calls to those methods are not appropriate.
public java.util.Map<AttributeType,java.util.List<Attribute>> getUserAttributes()
public java.util.Map<AttributeType,java.util.List<Attribute>> getOperationalAttributes()
public Attribute getObjectClassAttribute()
null
if it does not have any
objectclass information.public boolean hasAttribute(AttributeType attributeType)
attributeType
- The attribute type for which to
make the determination.
true
if this entry contains the specified
attribute, or false
if not.public boolean hasAttribute(AttributeType attributeType, boolean includeSubordinates)
attributeType
- The attribute type for which to
make the determination.includeSubordinates
- Whether to include any subordinate
attributes of the attribute type
being retrieved.
true
if this entry contains the specified
attribute, or false
if not.public boolean hasAttribute(AttributeType attributeType, java.util.Set<java.lang.String> attributeOptions)
attributeType
- The attribute type for which to
make the determination.attributeOptions
- The set of options to use in the
determination.
true
if this entry contains the specified
attribute, or false
if not.public boolean hasAttribute(AttributeType attributeType, boolean includeSubordinates, java.util.Set<java.lang.String> attributeOptions)
attributeType
- The attribute type for which to
make the determination.includeSubordinates
- Whether to include any subordinate
attributes of the attribute type
being retrieved.attributeOptions
- The set of options to use in the
determination.
true
if this entry contains the specified
attribute, or false
if not.public java.util.List<Attribute> getAttribute(AttributeType attributeType)
attributeType
- The attribute type to retrieve.
null
if the specified
attribute type is not present in this entry.public java.util.List<Attribute> getAttribute(AttributeType attributeType, boolean includeSubordinates)
attributeType
- The attribute type to retrieve.includeSubordinates
- Whether to include any subordinate
attributes of the attribute type
being retrieved.
null
if the specified
attribute type is not present in this entry.public java.util.List<Attribute> getAttribute(java.lang.String lowerName)
AttributeType
argument.
lowerName
- The name or OID of the attribute to return,
formatted in all lowercase characters.
null
if the specified
attribute type is not present in this entry.public java.util.List<Attribute> getAttribute(AttributeType attributeType, java.util.Set<java.lang.String> options)
attributeType
- The attribute type to retrieve.options
- The set of attribute options to
include in matching elements.
null
if the specified
attribute type is not present in this entry with the
provided set of options.public java.util.List<Attribute> getAttribute(AttributeType attributeType, boolean includeSubordinates, java.util.Set<java.lang.String> options)
attributeType
- The attribute type to retrieve.includeSubordinates
- Whether to include any subordinate
attributes of the attribute type
being retrieved.options
- The set of attribute options to
include in matching elements.
null
if the specified
attribute type is not present in this entry with the
provided set of options.public java.util.List<Attribute> getAttribute(java.lang.String lowerName, java.util.Set<java.lang.String> options)
AttributeType
argument.
lowerName
- The name or OID of the attribute to return,
formatted in all lowercase characters.options
- The set of attribute options to include in
matching elements.
null
if the specified
attribute type is not present in this entry.public final <T> T getAttributeValue(AttributeType attributeType, AttributeValueDecoder<T> decoder) throws DirectoryException
If the requested attribute type is not present then
null
is returned. If more than one attribute value
is present, then the first value found will be decoded and
returned.
The attribute value is decoded using the specified
AttributeValueDecoder
.
T
- Decode the attribute value to an object of this type.attributeType
- The attribute type to retrieve.decoder
- The attribute value decoder.
null
if no
attribute value having the specified attribute type was
found.
DirectoryException
- If the requested attribute value could not be decoded
successfully.public final <T> java.util.Collection<T> getAttributeValues(AttributeType attributeType, AttributeValueDecoder<? extends T> decoder, java.util.Collection<T> collection) throws DirectoryException
If the requested attribute type is not present then no decoded values will be added to the container.
The attribute value is decoded using the specified
AttributeValueDecoder
.
T
- Decode the attribute values to objects of this type.attributeType
- The attribute type to retrieve.decoder
- The attribute value decoder.collection
- The collection to which decoded values should be added.
DirectoryException
- If one or more of the requested attribute values could
not be decoded successfully.public boolean hasUserAttribute(AttributeType attributeType)
attributeType
- The attribute type for which to make the determination.
true
if this entry contains the specified
user attribute, or false
if not.public java.util.List<Attribute> getUserAttribute(AttributeType attributeType)
attributeType
- The attribute type to retrieve.
null
if there is no such
user attribute.public java.util.List<Attribute> getUserAttribute(AttributeType attributeType, java.util.Set<java.lang.String> options)
attributeType
- The attribute type to retrieve.options
- The set of attribute options to include in
matching elements.
null
if there is no such
user attribute with the specified set of options.public java.util.List<Attribute> duplicateUserAttribute(AttributeType attributeType)
attributeType
- The attribute type for which to retrieve a
duplicate attribute list.
null
if there is no such user attribute.public java.util.List<Attribute> duplicateUserAttribute(AttributeType attributeType, java.util.Set<java.lang.String> options, boolean omitValues)
attributeType
- The attribute type to retrieve.options
- The set of attribute options to include in
matching elements.omitValues
- true
if the values are to be
omitted.
null
if there
is no such user attribute with the specified set of
options.public java.util.List<Attribute> duplicateOperationalAttribute(AttributeType attributeType, java.util.Set<java.lang.String> options, boolean omitValues)
attributeType
- The attribute type to retrieve.options
- The set of attribute options to include in
matching elements.omitValues
- true
if the values are to be
omitted.
null
if there
is no such user attribute with the specified set of
options.public boolean hasOperationalAttribute(AttributeType attributeType)
attributeType
- The attribute type for which to make the
determination.
true
if this entry contains the specified
operational attribute, or false
if not.public java.util.List<Attribute> getOperationalAttribute(AttributeType attributeType)
attributeType
- The attribute type to retrieve.
null
if there is no such
operational attribute.public java.util.List<Attribute> getOperationalAttribute(AttributeType attributeType, java.util.Set<java.lang.String> options)
attributeType
- The attribute type to retrieve.options
- The set of attribute options to include in
matching elements.
null
if there is no such
operational attribute with the specified set of options.public java.util.List<Attribute> duplicateOperationalAttribute(AttributeType attributeType)
attributeType
- The attribute type for which to retrieve a
duplicate attribute list.
null
if there is no such operational
attribute.public void putAttribute(AttributeType attributeType, java.util.List<Attribute> attributeList)
attributeType
- The attribute type for the set of
attributes to add.attributeList
- The set of attributes to add for the given
type.public void addAttribute(Attribute attribute, java.util.List<AttributeValue> duplicateValues)
attribute
- The attribute to add or merge with this
entry.duplicateValues
- A list to which any duplicate values
will be added.public boolean removeAttribute(AttributeType attributeType)
attributeType
- The attribute type for the attribute to
remove from this entry.
true
if the attribute was found and
removed, or false
if it was not present in
the entry.public boolean removeAttribute(AttributeType attributeType, java.util.Set<java.lang.String> options)
attributeType
- The attribute type for the attribute to
remove from this entry.options
- The set of attribute options to use when
determining which attribute to remove.
true
if the attribute was found and
removed, or false
if it was not present in
the entry.public boolean removeAttribute(Attribute attribute, java.util.List<AttributeValue> missingValues)
attribute
- The attribute containing the information
to use to perform the removal.missingValues
- A list to which any values contained in
the provided attribute but not present in
the entry will be added.
true
if the attribute type was present and
the specified values that were present were removed, or
false
if the attribute type was not present
in the entry. If the attribute type was present but
only contained some of the values in the provided
attribute, then this method will return
true
but will add those values to the
provided list.public boolean allowsAttribute(AttributeType attributeType)
attributeType
- The attribute type for which to make the
determination.
true
if the specified attribute is allowed
by any of the objectclasses associated with this entry,
or false
if it is not.public boolean requiresAttribute(AttributeType attributeType)
attributeType
- The attribute type for which to make the
determination.
true
if the specified attribute is required
by any of the objectclasses associated with this entry,
o rfalse
if it is not.public boolean hasValue(AttributeType attributeType, java.util.Set<java.lang.String> options, AttributeValue value)
attributeType
- The attribute type for the attribute.options
- The set of options for the attribute.value
- The value for the attribute.
true
if this entry contains the specified
attribute value, or false
if it does not.public void applyModification(Modification mod) throws DirectoryException
mod
- The modification to apply to this entry.
DirectoryException
- If a problem occurs while attempting
to apply the modification. Note
that even if a problem occurs, then
the entry may have been altered in
some way.public void applyModifications(java.util.List<Modification> mods) throws DirectoryException
mods
- The modifications to apply to this entry.
DirectoryException
- If a problem occurs while attempting
to apply the modifications. Note
that even if a problem occurs, then
the entry may have been altered in
some way.public boolean conformsToSchema(Entry parentEntry, boolean parentProvided, boolean validateNameForms, boolean validateStructureRules, MessageBuilder invalidReason)
parentEntry
- The entry that is the immediate
parent of this entry, which may
be checked for DIT structure rule
conformance. This may be
null
if there is no
parent or if it is unavailable
to the caller.parentProvided
- Indicates whether the caller
attempted to provide the parent.
If not, then the parent entry
will be loaded on demand if it is
required.validateNameForms
- Indicates whether to validate the
entry against name form
definitions. This should only be
true
for add and modify
DN operations, as well as for
for imports.validateStructureRules
- Indicates whether to validate the
entry against DIT structure rule
definitions. This should only
be true
for add and
modify DN operations.invalidReason
- The buffer to which an
explanation will be appended if
this entry does not conform to
the server's schema
configuration.
true
if this entry conforms to the server's
schema requirements, or false
if it does not.public java.lang.Object getAttachment()
null
if
there is none.public void setAttachment(java.lang.Object attachment)
attachment
- The attachment for this entry, or
null
if there should not be an
attachment.public Entry duplicate(boolean processVirtual)
processVirtual
- Indicates whether virtual attribute
processing should be performed for the
entry.
public Entry duplicateWithoutOperationalAttributes(boolean typesOnly, boolean processVirtual)
typesOnly
- Indicates whether to include attribute
types only without values.processVirtual
- Indicates whether virtual attribute
processing should be performed for the
entry.
public Entry duplicateWithoutAttributes()
public boolean isReferral()
true
if this entry meets the criteria to
consider it a referral, or false
if not.public java.util.LinkedHashSet<java.lang.String> getReferralURLs()
isReferral()
returns true
.
null
if it is not a
referral.public boolean isAlias()
true
if this entry meets the criteria to
consider it an alias, or false
if not.public DN getAliasedDN() throws DirectoryException
isAlias()
returns
true
.
null
if it is not an alias.
DirectoryException
- If there is an aliasedObjectName
attribute but its value cannot be
parsed as a DN.public boolean isLDAPSubentry()
true
if this entry meets the criteria to
consider it an LDAP subentry, or false
if
not.public boolean matchesBaseAndScope(DN baseDN, SearchScope scope)
baseDN
- The base DN for which to make the determination.scope
- The search scope for which to make the
determination.
true
if this entry is within the given
base and scope, or false
if it is not.public void processVirtualAttributes()
public void processVirtualAttributes(boolean includeOperational)
includeOperational
- Indicates whether to include
operational attributes.public boolean virtualAttributeProcessingPerformed()
true
if virtual attribute processing has been
performed for this entry, or false
if not.public void stripRealAttributes()
public void stripVirtualAttributes()
public byte[] encode(EntryEncodeConfig config) throws DirectoryException
config
- The configuration that may be used to control how
the entry is encoded.
DirectoryException
- If a problem occurs while attempting
to encode the entry.public byte[] encodeV1()
public byte[] encodeV2(EntryEncodeConfig config) throws DirectoryException
config
- The configuration that should be used to encode
the entry.
DirectoryException
- If a problem occurs while attempting
to encode the entry.public static Entry decode(byte[] entryBytes) throws DirectoryException
entryBytes
- The byte array containing the data to be
decoded.
DirectoryException
- If the provided byte array cannot be
decoded as an entry.public static Entry decode(byte[] entryBytes, CompressedSchema compressedSchema) throws DirectoryException
entryBytes
- The byte array containing the data to
be decoded.compressedSchema
- The compressed schema manager to use
when decoding tokenized schema
elements.
DirectoryException
- If the provided byte array cannot be
decoded as an entry.public static Entry decodeV1(byte[] entryBytes) throws DirectoryException
entryBytes
- The byte array containing the data to be
decoded.
DirectoryException
- If the provided byte array cannot be
decoded as an entry.public static Entry decodeV2(byte[] entryBytes, CompressedSchema compressedSchema) throws DirectoryException
entryBytes
- The byte array containing the data to
be decoded.compressedSchema
- The compressed schema manager to use
when decoding tokenized schema
elements.
DirectoryException
- If the provided byte array cannot be
decoded as an entry.public java.util.List<java.lang.StringBuilder> toLDIF()
public boolean toLDIF(LDIFExportConfig exportConfig) throws java.io.IOException, LDIFException
exportConfig
- The configuration that specifies how the
entry should be written.
true
if the entry is actually written, or
false
if it is not for some reason.
java.io.IOException
- If a problem occurs while writing the
information.
LDIFException
- If a problem occurs while trying to
determine whether to write the entry.public java.lang.String getProtocolElementName()
getProtocolElementName
in interface ProtocolElement
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
o
- The object for which to make the determination.
true
if the provided object may be considered
equal to this entry, or false
if not.public java.lang.String toString()
toString
in interface ProtocolElement
toString
in class java.lang.Object
public void toString(java.lang.StringBuilder buffer)
toString
in interface ProtocolElement
buffer
- The buffer into which the string representation
should be written.public void toString(java.lang.StringBuilder buffer, int indent)
toString
in interface ProtocolElement
buffer
- The buffer into which the string representation
should be written.indent
- The number of spaces that should be used to
indent the resulting string representation.public java.lang.String toLDIFString()
public java.lang.String toSingleLineString()
public void toSingleLineString(java.lang.StringBuilder buffer)
buffer
- The buffer to which the information should be
written.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |