@PublicAPI(stability=UNCOMMITTED, mayInstantiate=true, mayExtend=false, mayInvoke=true) public class Entry extends Object implements ProtocolElement
Constructor and Description |
---|
Entry(org.forgerock.opendj.ldap.Dn dn,
Map<org.forgerock.opendj.ldap.schema.ObjectClass,String> objectClasses,
Map<org.forgerock.opendj.ldap.schema.AttributeType,List<Attribute>> userAttributes,
Map<org.forgerock.opendj.ldap.schema.AttributeType,List<Attribute>> operationalAttributes)
Creates a new entry with the provided information.
|
Modifier and Type | Method and Description |
---|---|
void |
addAttribute(Attribute attribute)
Ensures that this entry contains the provided attribute and its
values.
|
void |
addAttribute(Attribute attribute,
Collection<? super org.forgerock.opendj.ldap.ByteString> duplicateValues)
Ensures that this entry contains the provided attribute and its
values.
|
void |
addAttribute(Attribute attribute,
List<org.forgerock.opendj.ldap.ByteString> duplicateValues)
Ensures that this entry contains the provided attribute and its values.
|
void |
addObjectClass(org.forgerock.opendj.ldap.schema.ObjectClass oc)
Adds the provided objectClass to this entry.
|
void |
applyModification(Modification mod)
Applies the provided modification to this entry.
|
void |
applyModification(Modification mod,
boolean relaxConstraints)
Applies the provided modification to this entry.
|
void |
applyModifications(List<Modification> mods)
Applies all of the provided modifications to this entry.
|
boolean |
conformsToSchema(Entry parentEntry,
boolean parentProvided,
boolean validateNameForms,
boolean validateStructureRules,
LocalizableMessageBuilder invalidReason)
Indicates whether this entry conforms to the server's schema
requirements.
|
static Entry |
decode(org.forgerock.opendj.ldap.ByteSequenceReader entryBuffer)
Decodes the provided byte array as an entry.
|
static Entry |
decode(org.forgerock.opendj.ldap.ByteSequenceReader entryBuffer,
CompressedSchema compressedSchema)
Decodes the provided byte array as an entry using the V3
encoding.
|
Entry |
duplicate(boolean processVirtual)
Creates a duplicate of this entry that may be altered without
impacting the information in this entry.
|
void |
encode(org.forgerock.opendj.ldap.ByteStringBuilder buffer,
EntryEncodeConfig config)
Encodes this entry into a form that is suitable for long-term
persistent storage.
|
boolean |
equals(Object o)
Indicates whether the provided object is equal to this entry.
|
Entry |
filterEntry(Set<String> attrNameList,
boolean omitValues,
boolean omitReal,
boolean omitVirtual)
Returns an entry containing only those attributes of this entry
which match the provided criteria.
|
org.forgerock.opendj.ldap.Dn |
getAliasedDN()
Retrieves the DN of the entry referenced by this alias entry.
|
Iterable<Attribute> |
getAllAttributes()
Returns an
Iterable containing all of the attributes in this entry,
excluding the objectClass attribute. |
Iterable<Attribute> |
getAllAttributes(org.forgerock.opendj.ldap.AttributeDescription attributeDescription)
Retrieves the requested attribute element(s) for the specified
attribute description.
|
List<Attribute> |
getAllAttributes(org.forgerock.opendj.ldap.schema.AttributeType attributeType)
Retrieves the requested attribute element(s) for the specified
attribute type.
|
List<Attribute> |
getAllAttributes(org.forgerock.opendj.ldap.schema.AttributeType attributeType,
boolean includeSubordinates)
Retrieves the requested attribute element(s) for the specified
attribute type.
|
Iterable<Attribute> |
getAllAttributes(String nameOrOID)
Retrieves the requested attribute element(s) for the attribute
with the specified name or OID.
|
Object |
getAttachment()
Retrieves the attachment for this entry.
|
Attribute |
getAttribute(org.forgerock.opendj.ldap.AttributeDescription attributeDescription)
Retrieves the requested attribute element for the specified
attribute type and options or
null if this entry
does not contain an attribute with the specified attribute type
and options. |
List<Attribute> |
getAttribute(org.forgerock.opendj.ldap.schema.AttributeType attributeType)
Deprecated.
|
List<Attribute> |
getAttribute(org.forgerock.opendj.ldap.schema.AttributeType attributeType,
boolean includeSubordinates)
Deprecated.
|
List<Attribute> |
getAttribute(String nameOrOID)
Deprecated.
|
List<Attribute> |
getAttributes()
Deprecated.
|
org.forgerock.opendj.ldap.Dn |
getName()
Retrieves the distinguished name for this entry.
|
Attribute |
getObjectClassAttribute()
Retrieves an attribute holding the objectclass information for
this entry.
|
Map<org.forgerock.opendj.ldap.schema.ObjectClass,String> |
getObjectClasses()
Retrieves the set of objectclasses defined for this entry.
|
List<Attribute> |
getOperationalAttribute(org.forgerock.opendj.ldap.AttributeDescription attributeDescription)
Retrieves the requested operational attribute element(s) for the
specified attribute type.
|
List<Attribute> |
getOperationalAttribute(org.forgerock.opendj.ldap.schema.AttributeType attributeType)
Retrieves the requested operational attribute element(s) for the
specified attribute type.
|
Map<org.forgerock.opendj.ldap.schema.AttributeType,List<Attribute>> |
getOperationalAttributes()
Retrieves the entire set of operational attributes for this
entry.
|
String |
getProtocolElementName()
Retrieves the name of the protocol associated with this protocol
element.
|
Set<String> |
getReferralURLs()
Retrieves the set of referral URLs that are included in this
referral entry.
|
org.forgerock.opendj.ldap.schema.ObjectClass |
getStructuralObjectClass()
Retrieves the structural objectclass for this entry.
|
List<Attribute> |
getUserAttribute(org.forgerock.opendj.ldap.schema.AttributeType attributeType)
Retrieves the requested user attribute element(s) for the
specified attribute type.
|
Map<org.forgerock.opendj.ldap.schema.AttributeType,List<Attribute>> |
getUserAttributes()
Retrieves the entire set of user (i.e., non-operational)
attributes for this entry.
|
boolean |
hasAttribute(org.forgerock.opendj.ldap.AttributeDescription attributeDescription)
Indicates whether this entry contains the specified attribute
with all of the options in the provided set.
|
boolean |
hasAttribute(org.forgerock.opendj.ldap.AttributeDescription attributeDescription,
boolean includeSubordinates)
Indicates whether this entry contains the specified attribute with all of the options in the
provided set.
|
boolean |
hasAttribute(org.forgerock.opendj.ldap.schema.AttributeType attributeType)
Indicates whether this entry contains the specified attribute.
|
boolean |
hasAttribute(org.forgerock.opendj.ldap.schema.AttributeType attributeType,
boolean includeSubordinates)
Indicates whether this entry contains the specified attribute.
|
int |
hashCode()
Retrieves a hash code for this entry.
|
boolean |
hasObjectClass(org.forgerock.opendj.ldap.schema.ObjectClass objectClass)
Indicates whether this entry has the specified objectclass.
|
boolean |
hasOperationalAttribute(org.forgerock.opendj.ldap.schema.AttributeType attributeType)
Indicates whether this entry contains the specified operational
attribute.
|
boolean |
hasUserAttribute(org.forgerock.opendj.ldap.schema.AttributeType attributeType)
Indicates whether this entry contains the specified user
attribute.
|
boolean |
hasValue(org.forgerock.opendj.ldap.AttributeDescription attributeDescription,
org.forgerock.opendj.ldap.ByteString value)
Indicates whether this entry contains the specified attribute value.
|
boolean |
hasValue(org.forgerock.opendj.ldap.schema.AttributeType attributeType,
org.forgerock.opendj.ldap.ByteString value)
Indicates whether this entry contains the specified attribute value.
|
void |
incrementAttribute(Attribute attribute)
Increments an attribute in this entry by the amount specified in
the provided attribute.
|
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 |
isCollectiveAttributeSubentry()
Indicates whether the entry meets the criteria to consider it an
RFC 3671 LDAP collective attributes subentry (i.e., it contains
the "collectiveAttributeSubentry" objectclass).
|
boolean |
isInheritedCollectiveAttributeSubentry()
Indicates whether the entry meets the criteria to consider it an
inherited collective attributes subentry (i.e., it contains
the "inheritedCollectiveAttributeSubentry" objectclass).
|
boolean |
isInheritedFromDNCollectiveAttributeSubentry()
Indicates whether the entry meets the criteria to consider it an inherited
from DN collective attributes subentry (i.e., it contains the
"inheritedFromDNCollectiveAttributeSubentry" objectclass).
|
boolean |
isInheritedFromRDNCollectiveAttributeSubentry()
Indicates whether the entry meets the criteria to consider it
an inherited from RDN collective attributes subentry (i.e.,
it contains the "inheritedFromRDNCollectiveAttributeSubentry"
objectclass).
|
boolean |
isLDAPSubentry()
Indicates whether this entry meets the criteria to consider it an
LDAP subentry (i.e., it contains the "ldapSubentry" objectclass).
|
boolean |
isPasswordPolicySubentry()
Indicates whether the entry meets the criteria to consider it a
LDAP password policy subentry (i.e., it contains the "pwdPolicy"
objectclass of LDAP Password Policy Internet-Draft).
|
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 |
isSubentry()
Indicates whether this entry meets the criteria to consider it
an RFC 3672 LDAP subentry (i.e., it contains the "subentry"
objectclass).
|
boolean |
matchesBaseAndScope(org.forgerock.opendj.ldap.Dn baseDN,
org.forgerock.opendj.ldap.SearchScope scope)
Indicates whether this entry falls within the range of the
provided search base DN and scope.
|
AttributeParser |
parseAttribute(String attributeDescription)
Returns a parser for the named attribute contained in this entry.
|
void |
processVirtualAttributes()
Performs any necessary virtual attribute processing for this
entry.
|
void |
putAttribute(org.forgerock.opendj.ldap.schema.AttributeType attributeType,
List<Attribute> attributeList)
Puts the provided attribute in this entry.
|
boolean |
removeAttribute(Attribute attribute,
Collection<? super org.forgerock.opendj.ldap.ByteString> missingValues)
Ensures that this entry does not contain the provided attribute
values.
|
boolean |
removeAttribute(Attribute attribute,
List<org.forgerock.opendj.ldap.ByteString> missingValues)
Ensures that this entry does not contain the provided attribute values.
|
boolean |
removeAttribute(org.forgerock.opendj.ldap.schema.AttributeType attributeType)
Removes all instances of the specified attribute type from this
entry, including any instances with options.
|
void |
replaceAttribute(Attribute attribute)
Puts the provided attribute into this entry.
|
void |
setAttachment(Object attachment)
Specifies the attachment for this entry.
|
void |
setDN(org.forgerock.opendj.ldap.Dn dn)
Specifies the distinguished name for this entry.
|
List<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.
|
String |
toLDIFString()
Retrieves a string representation of this entry in LDIF form.
|
void |
toSingleLineString(StringBuilder buffer)
Appends a single-line representation of this entry to the
provided buffer.
|
String |
toString()
Retrieves a string representation of this protocol element.
|
void |
toString(StringBuilder buffer)
Appends a string representation of this protocol element to the
provided buffer.
|
void |
toString(StringBuilder buffer,
int indent)
Appends a string representation of this protocol element to the
provided buffer.
|
public Entry(org.forgerock.opendj.ldap.Dn dn, Map<org.forgerock.opendj.ldap.schema.ObjectClass,String> objectClasses, Map<org.forgerock.opendj.ldap.schema.AttributeType,List<Attribute>> userAttributes, Map<org.forgerock.opendj.ldap.schema.AttributeType,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.public org.forgerock.opendj.ldap.Dn getName()
public void setDN(org.forgerock.opendj.ldap.Dn dn)
dn
- The distinguished name for this entry.public Map<org.forgerock.opendj.ldap.schema.ObjectClass,String> getObjectClasses()
public boolean hasObjectClass(org.forgerock.opendj.ldap.schema.ObjectClass objectClass)
objectClass
- The objectclass for which to make the
determination.true
if this entry has the specified
objectclass, or false
if not.public org.forgerock.opendj.ldap.schema.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 addObjectClass(org.forgerock.opendj.ldap.schema.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 Iterable<Attribute> getAllAttributes()
Iterable
containing all of the attributes in this entry,
excluding the objectClass attribute.
The returned Iterable
may NOT be used to remove attributes.
Iterable
containing all of the attributes.public Map<org.forgerock.opendj.ldap.schema.AttributeType,List<Attribute>> getUserAttributes()
public Map<org.forgerock.opendj.ldap.schema.AttributeType,List<Attribute>> getOperationalAttributes()
public Attribute getObjectClassAttribute()
null
if it does not have any
objectclass information.public boolean hasAttribute(org.forgerock.opendj.ldap.schema.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(org.forgerock.opendj.ldap.schema.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(org.forgerock.opendj.ldap.AttributeDescription attributeDescription)
attributeDescription
- The attribute description for which to make the determination.true
if this entry contains the specified
attribute, or false
if not.public boolean hasAttribute(org.forgerock.opendj.ldap.AttributeDescription attributeDescription, boolean includeSubordinates)
attributeDescription
- The attribute description 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 List<Attribute> getAllAttributes(org.forgerock.opendj.ldap.schema.AttributeType attributeType)
attributeType
- The attribute type to retrieve.public List<Attribute> getAllAttributes(org.forgerock.opendj.ldap.schema.AttributeType attributeType, boolean includeSubordinates)
attributeType
- The attribute type to retrieve.includeSubordinates
- Whether to include any subordinate
attributes of the attribute type
being retrieved.public Iterable<Attribute> getAllAttributes(String nameOrOID)
AttributeType
argument.nameOrOID
- The name or OID of the attribute to returnpublic Iterable<Attribute> getAllAttributes(org.forgerock.opendj.ldap.AttributeDescription attributeDescription)
attributeDescription
- The attribute description to retrieve.public AttributeParser parseAttribute(String attributeDescription) throws LocalizedIllegalArgumentException, NullPointerException
The attribute description will be decoded using the schema associated with this entry (usually the default schema).
attributeDescription
- The name of the attribute to be parsed.LocalizedIllegalArgumentException
- If attributeDescription
could not be decoded using
the schema associated with this entry.NullPointerException
- If attributeDescription
was null
.public boolean hasUserAttribute(org.forgerock.opendj.ldap.schema.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 List<Attribute> getUserAttribute(org.forgerock.opendj.ldap.schema.AttributeType attributeType)
attributeType
- The attribute type to retrieve.public boolean hasOperationalAttribute(org.forgerock.opendj.ldap.schema.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 List<Attribute> getOperationalAttribute(org.forgerock.opendj.ldap.schema.AttributeType attributeType)
attributeType
- The attribute type to retrieve.public List<Attribute> getOperationalAttribute(org.forgerock.opendj.ldap.AttributeDescription attributeDescription)
attributeDescription
- The attribute description to retrieve.public void putAttribute(org.forgerock.opendj.ldap.schema.AttributeType attributeType, 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)
This method handles object class additions but will not perform any object class validation. In particular, it will create default object classes when an object class is unknown.
This method implements LDAP modification add semantics, with the exception that it allows empty attributes to be added.
attribute
- The attribute to add or merge with this entry.public void addAttribute(Attribute attribute, Collection<? super org.forgerock.opendj.ldap.ByteString> duplicateValues)
This method handles object class additions but will not perform any object class validation. In particular, it will create default object classes when an object class is unknown.
This method implements LDAP modification add semantics, with the exception that it allows empty attributes to be added.
attribute
- The attribute to add or merge with this entry.duplicateValues
- A list to which any duplicate values will be added.public void replaceAttribute(Attribute attribute)
This method handles object class replacements but will not perform any object class validation. In particular, it will create default object classes when an object class is unknown.
This method implements LDAP modification replace semantics.
attribute
- The attribute to replace in this entry.public void incrementAttribute(Attribute attribute) throws DirectoryException
attribute
- The attribute identifying the attribute to be increment
and the amount it is to be incremented by. The attribute
must contain a single value.DirectoryException
- If a problem occurs while attempting to increment the
provided attribute. This may occur if the provided
attribute was not single valued or if it could not be
parsed as an integer of if the existing attribute
values could not be parsed as integers.public boolean removeAttribute(org.forgerock.opendj.ldap.schema.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(Attribute attribute, Collection<? super org.forgerock.opendj.ldap.ByteString> missingValues)
This method handles object class deletions.
This method implements LDAP modification delete semantics.
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 hasValue(org.forgerock.opendj.ldap.AttributeDescription attributeDescription, org.forgerock.opendj.ldap.ByteString value)
attributeDescription
- The attribute description for the attribute.value
- The value for the attribute.true
if this entry contains the specified attribute value, false
otherwise.public boolean hasValue(org.forgerock.opendj.ldap.schema.AttributeType attributeType, org.forgerock.opendj.ldap.ByteString value)
attributeType
- The attribute type for the attribute.value
- The value for the attribute.true
if this entry contains the specified attribute value, false
otherwise.public void applyModification(Modification mod, boolean relaxConstraints) throws DirectoryException
mod
- The modification to apply to this entry.relaxConstraints
- indicates if the modification
constraints are relaxed to match
the ones of a set (add existing
value and delete absent value do not fail)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 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(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, LocalizableMessageBuilder 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 Object getAttachment()
null
if there is none.public void setAttachment(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 boolean isReferral()
true
if this entry meets the criteria to
consider it a referral, or false
if not.public Set<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 org.forgerock.opendj.ldap.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 isSubentry()
true
if this entry meets the criteria to
consider it an RFC 3672 LDAP subentry, or false
if not.public boolean isCollectiveAttributeSubentry()
true
if this entry meets the criteria to
consider it an RFC 3671 LDAP collective attributes
subentry, or false
if not.public boolean isInheritedCollectiveAttributeSubentry()
true
if this entry meets the criteria to
consider it an inherited collective attributes
subentry, or false
if not.public boolean isInheritedFromDNCollectiveAttributeSubentry()
true
if this entry meets the criteria to consider it
an inherited from DN collective attributes subentry, or
false
if not.public boolean isInheritedFromRDNCollectiveAttributeSubentry()
true
if this entry meets the criteria to
consider it an inherited from RDN collective attributes
subentry, or false
if not.public boolean isPasswordPolicySubentry()
true
if this entry meets the criteria to
consider it a LDAP Password Policy Internet-Draft
subentry, or false
if not.public boolean matchesBaseAndScope(org.forgerock.opendj.ldap.Dn baseDN, org.forgerock.opendj.ldap.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 encode(org.forgerock.opendj.ldap.ByteStringBuilder buffer, EntryEncodeConfig config) throws DirectoryException
buffer
- The buffer to encode into.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 static Entry decode(org.forgerock.opendj.ldap.ByteSequenceReader entryBuffer) throws DirectoryException
entryBuffer
- 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(org.forgerock.opendj.ldap.ByteSequenceReader entryBuffer, CompressedSchema compressedSchema) throws DirectoryException
entryBuffer
- The byte buffer 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 List<StringBuilder> toLDIF()
public boolean toLDIF(LDIFExportConfig exportConfig) throws 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.IOException
- If a problem occurs while writing the
information.LDIFException
- If a problem occurs while trying to
determine whether to write the entry.public String getProtocolElementName()
getProtocolElementName
in interface ProtocolElement
public int hashCode()
public boolean equals(Object o)
public void toString(StringBuilder buffer)
toString
in interface ProtocolElement
buffer
- The buffer into which the string representation
should be written.public void toString(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 String toLDIFString()
public void toSingleLineString(StringBuilder buffer)
buffer
- The buffer to which the information should be
written.public Attribute getAttribute(org.forgerock.opendj.ldap.AttributeDescription attributeDescription)
null
if this entry
does not contain an attribute with the specified attribute type
and options.attributeDescription
- The attribute description to retrieve.null
if the
specified attribute type is not present in this entry
with the provided set of options.public Entry filterEntry(Set<String> attrNameList, boolean omitValues, boolean omitReal, boolean omitVirtual)
attrNameList
- The list of attributes to include, may include wild
cards.omitValues
- Indicates whether to omit attribute values when
processing.omitReal
- Indicates whether to exclude real attributes.omitVirtual
- Indicates whether to exclude virtual attributes.@Deprecated public List<Attribute> getAttributes()
@Deprecated public List<Attribute> getAttribute(org.forgerock.opendj.ldap.schema.AttributeType attributeType)
attributeType
- The attribute type to retrieve.getAllAttributes(AttributeType)
@Deprecated public List<Attribute> getAttribute(org.forgerock.opendj.ldap.schema.AttributeType attributeType, boolean includeSubordinates)
attributeType
- The attribute type to retrieve.includeSubordinates
- Whether to include any subordinate attributes of the attribute type being retrieved.getAllAttributes(AttributeType,boolean)
@Deprecated public List<Attribute> getAttribute(String nameOrOID)
nameOrOID
- The name or OID of the attribute to returngetAllAttributes(String)
public void addAttribute(Attribute attribute, List<org.forgerock.opendj.ldap.ByteString> duplicateValues)
attribute
- The attribute to add or merge with this entry.duplicateValues
- A list to which any duplicate values will be added.addAttribute(Attribute, Collection)
public boolean removeAttribute(Attribute attribute, List<org.forgerock.opendj.ldap.ByteString> 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.removeAttribute(Attribute, Collection)
Copyright © 2010-2017 ForgeRock AS. All Rights Reserved.