public interface ServerEntry extends Entry, Cloneable
Modifier and Type | Method and Description |
---|---|
void |
add(AttributeType attributeType,
byte[]... values)
Add an attribute (represented by its AttributeType and some binary values) into an
entry.
|
void |
add(AttributeType attributeType,
String... values)
Add an attribute (represented by its AttributeType and some String values) into an
entry.
|
void |
add(AttributeType attributeType,
Value<?>... values)
Add an attribute (represented by its AttributeType and some values) into an
entry.
|
void |
add(String upId,
AttributeType attributeType,
byte[]... values)
Add an attribute (represented by its AttributeType and some binary values) into an
entry.
|
void |
add(String upId,
AttributeType attributeType,
String... values)
Add an attribute (represented by its AttributeType and some String values) into an
entry.
|
void |
add(String upId,
AttributeType attributeType,
Value<?>... values)
Add an attribute (represented by its AttributeType and some values) into an
entry.
|
Entry |
clone()
A clone method to produce a clone of the current object
|
boolean |
contains(AttributeType attributeType,
byte[]... values)
Checks if an entry contains an attribute with some given binary values.
|
boolean |
contains(AttributeType attributeType,
String... values)
Checks if an entry contains an attribute with some given String values.
|
boolean |
contains(AttributeType attributeType,
Value<?>... values)
Checks if an entry contains an attribute with some given binary values.
|
boolean |
containsAttribute(AttributeType attributeType)
Checks if an entry contains a specific AttributeType.
|
EntryAttribute |
get(AttributeType attributeType)
Returns the attribute associated with an AttributeType
|
Set<AttributeType> |
getAttributeTypes()
Gets all the attributes type
|
boolean |
hasObjectClass(EntryAttribute objectClass)
Tells if an entry has a specific ObjectClass Attribute
|
boolean |
isValid()
Fail fast check performed to determine entry consistency according to schema
characteristics.
|
boolean |
isValid(EntryAttribute objectClass)
Check performed to determine entry consistency according to the schema
requirements of a particular objectClass.
|
boolean |
isValid(String objectClass)
Check performed to determine entry consistency according to the schema
requirements of a particular objectClass.
|
EntryAttribute |
put(AttributeType attributeType,
byte[]... values)
Places a new attribute with the supplied AttributeType and binary values
into the attribute collection.
|
EntryAttribute |
put(AttributeType attributeType,
String... values)
Places a new attribute with the supplied AttributeType and String values
into the attribute collection.
|
EntryAttribute |
put(AttributeType attributeType,
Value<?>... values)
Places a new attribute with the supplied AttributeType and some values
into the attribute collection.
|
EntryAttribute |
put(String upId,
AttributeType attributeType,
byte[]... values)
Places a new attribute with the supplied AttributeType and some binary values
into the attribute collection.
|
EntryAttribute |
put(String upId,
AttributeType attributeType,
String... values)
Places a new attribute with the supplied AttributeType and some String values
into the attribute collection.
|
EntryAttribute |
put(String upId,
AttributeType attributeType,
Value<?>... values)
Places a new attribute with the supplied AttributeType and some values
into the attribute collection.
|
boolean |
remove(AttributeType attributeType,
byte[]... values)
Removes the specified binary values from an attribute.
|
boolean |
remove(AttributeType attributeType,
String... values)
Removes the specified String values from an attribute.
|
boolean |
remove(AttributeType attributeType,
Value<?>... values)
Removes the specified values from an attribute.
|
List<EntryAttribute> |
remove(EntryAttribute... attributes)
Removes the specified attributes.
|
List<EntryAttribute> |
removeAttributes(AttributeType... attributes)
Removes the attribute with the specified AttributeTypes.
|
List<EntryAttribute> |
set(AttributeType... attributeTypes)
Put some new attributes using the attributeTypes.
|
Entry |
toClientEntry()
Convert the ServerEntry to a ClientEntry
|
add, add, add, add, clear, contains, contains, contains, contains, containsAttribute, get, getDn, hasObjectClass, iterator, put, put, put, put, remove, remove, remove, removeAttributes, set, setDn, size
readExternal, writeExternal
void add(AttributeType attributeType, byte[]... values) throws LdapException
Add an attribute (represented by its AttributeType and some binary values) into an entry.
If we already have an attribute with the same values, the duplicated values are not added (duplicated values are not allowed)
If the value cannot be added, or if the AttributeType is null or invalid, a LdapException is thrown.
attributeType
- The attribute Type.values
- The list of binary values to inject. It can be empty.LdapException
- If the attribute does not existvoid add(AttributeType attributeType, String... values) throws LdapException
Add an attribute (represented by its AttributeType and some String values) into an entry.
If we already have an attribute with the same values, the duplicated values are not added (duplicated values are not allowed)
If the value cannot be added, or if the AttributeType is null or invalid, a LdapException is thrown.
attributeType
- The attribute Typevalues
- The list of binary values to inject. It can be emptyLdapException
- If the attribute does not existvoid add(AttributeType attributeType, Value<?>... values) throws LdapException
Add an attribute (represented by its AttributeType and some values) into an entry.
If we already have an attribute with the same values, the duplicated values are not added (duplicated values are not allowed)
If the value cannot be added, or if the AttributeType is null or invalid, a LdapException is thrown.
attributeType
- The attribute Typevalues
- The list of binary values to inject. It can be emptyLdapException
- If the attribute does not existvoid add(String upId, AttributeType attributeType, byte[]... values) throws LdapException
Add an attribute (represented by its AttributeType and some binary values) into an entry. Set the User Provider ID at the same time
If we already have an attribute with the same values, the duplicated values are not added (duplicated values are not allowed)
If the value cannot be added, or if the AttributeType is null or invalid, a LdapException is thrown.
upId
- The user provided ID for the added AttributeTypeattributeType
- The attribute Type.values
- The list of binary values to add. It can be empty.LdapException
- If the attribute does not existvoid add(String upId, AttributeType attributeType, String... values) throws LdapException
Add an attribute (represented by its AttributeType and some String values) into an entry. Set the User Provider ID at the same time
If we already have an attribute with the same values, the duplicated values are not added (duplicated values are not allowed)
If the value cannot be added, or if the AttributeType is null or invalid, a LdapException is thrown.
upId
- The user provided ID for the added AttributeTypeattributeType
- The attribute Type.values
- The list of binary values to add. It can be empty.LdapException
- If the attribute does not existvoid add(String upId, AttributeType attributeType, Value<?>... values) throws LdapException
Add an attribute (represented by its AttributeType and some values) into an entry. Set the User Provider ID at the same time
If we already have an attribute with the same values, nothing is done (duplicated values are not allowed)
If the value cannot be added, or if the AttributeType is null or invalid, a LdapException is thrown.
upId
- The user provided ID for the added AttributeTypeattributeType
- The attribute Type.values
- The list of values to add. It can be empty.LdapException
- If the attribute does not existboolean contains(AttributeType attributeType, byte[]... values)
attributeType
- The Attribute we are looking for.values
- The searched values.true
if all the values are found within the attribute,
false
otherwise, or if the attributes does not exist.LdapException
- If the attribute does not existsboolean contains(AttributeType attributeType, String... values)
attributeType
- The Attribute we are looking for.values
- The searched values.true
if all the values are found within the attribute,
false
otherwise, or if the attributes does not exist.LdapException
- If the attribute does not existsboolean contains(AttributeType attributeType, Value<?>... values)
attributeType
- The Attribute we are looking for.values
- The searched values.true
if all the values are found within the attribute,
false
otherwise, or if the attributes does not exist.LdapException
- If the attribute does not existsboolean containsAttribute(AttributeType attributeType)
attributeType
- The AttributeType to look for.true
if the attribute is found within the entry.EntryAttribute get(AttributeType attributeType)
the
- AttributeType we are looking forSet<AttributeType> getAttributeTypes()
boolean hasObjectClass(EntryAttribute objectClass)
objectClass
- The ObjectClass we want to checktrue
if the ObjectClass value is present
in the ObjectClass attributeboolean isValid()
boolean isValid(String objectClass)
objectClass
- the objectClass to use while checking for validityboolean isValid(EntryAttribute objectClass)
objectClass
- the objectClass to use while checking for validityEntryAttribute put(AttributeType attributeType, byte[]... values) throws LdapException
Places a new attribute with the supplied AttributeType and binary values into the attribute collection.
If there is already an attribute with the same AttributeType, the old one is removed from the collection and is returned by this method.
This method provides a mechanism to put an attribute with a
null
value: the value may be null
.
attributeType
- the type of the new attribute to be putvalues
- the binary values of the new attribute to be putnull
LdapException
- if there are failuresEntryAttribute put(AttributeType attributeType, String... values) throws LdapException
Places a new attribute with the supplied AttributeType and String values into the attribute collection.
If there is already an attribute with the same AttributeType, the old one is removed from the collection and is returned by this method.
This method provides a mechanism to put an attribute with a
null
value: the value may be null
.
attributeType
- the type of the new attribute to be putvalues
- the String values of the new attribute to be putnull
LdapException
- if there are failuresEntryAttribute put(AttributeType attributeType, Value<?>... values) throws LdapException
Places a new attribute with the supplied AttributeType and some values into the attribute collection.
If there is already an attribute with the same AttributeType, the old one is removed from the collection and is returned by this method.
This method provides a mechanism to put an attribute with a
null
value: the value may be null
.
attributeType
- the type of the new attribute to be putvalues
- the values of the new attribute to be putnull
LdapException
- if there are failuresEntryAttribute put(String upId, AttributeType attributeType, byte[]... values) throws LdapException
Places a new attribute with the supplied AttributeType and some binary values into the attribute collection.
The given User provided ID will be used for this new AttributeEntry.
If there is already an attribute with the same AttributeType, the old one is removed from the collection and is returned by this method.
This method provides a mechanism to put an attribute with a
null
value: the value may be null
.
upId
- The User Provided ID to be stored into the AttributeEntryvalues
- the binary values of the new attribute to be putnull
LdapException
- if there are failures.EntryAttribute put(String upId, AttributeType attributeType, String... values) throws LdapException
Places a new attribute with the supplied AttributeType and some String values into the attribute collection.
The given User provided ID will be used for this new AttributeEntry.
If there is already an attribute with the same AttributeType, the old one is removed from the collection and is returned by this method.
This method provides a mechanism to put an attribute with a
null
value: the value may be null
.
upId
- The User Provided ID to be stored into the AttributeEntryattributeType
- the type of the new attribute to be putvalues
- the String values of the new attribute to be putnull
LdapException
- if there are failures.EntryAttribute put(String upId, AttributeType attributeType, Value<?>... values) throws LdapException
Places a new attribute with the supplied AttributeType and some values into the attribute collection.
The given User provided ID will be used for this new AttributeEntry.
If there is already an attribute with the same AttributeType, the old one is removed from the collection and is returned by this method.
This method provides a mechanism to put an attribute with a
null
value: the value may be null
.
upId
- The User Provided ID to be stored into the AttributeEntryattributeType
- the type of the new attribute to be putvalues
- the values of the new attribute to be putnull
LdapException
- if there are failures.boolean remove(AttributeType attributeType, byte[]... values) throws LdapException
Removes the specified binary values from an attribute.
If at least one value is removed, this method returns true
.
If there is no more value after having removed the values, the attribute will be removed too.
If the attribute does not exist, nothing is done and the method returns
false
attributeType
- The attribute typevalues
- the values to be removedtrue
if at least a value is removed, false
if not all the values have been removed or if the attribute does not exist.LdapException
boolean remove(AttributeType attributeType, String... values) throws LdapException
Removes the specified String values from an attribute.
If at least one value is removed, this method returns true
.
If there is no more value after having removed the values, the attribute will be removed too.
If the attribute does not exist, nothing is done and the method returns
false
attributeType
- The attribute typevalues
- the values to be removedtrue
if at least a value is removed, false
if not all the values have been removed or if the attribute does not exist.LdapException
boolean remove(AttributeType attributeType, Value<?>... values) throws LdapException
Removes the specified values from an attribute.
If at least one value is removed, this method returns true
.
If there is no more value after having removed the values, the attribute will be removed too.
If the attribute does not exist, nothing is done and the method returns
false
attributeType
- The attribute typevalues
- the values to be removedtrue
if at least a value is removed, false
if not all the values have been removed or if the attribute does not exist.LdapException
List<EntryAttribute> remove(EntryAttribute... attributes) throws LdapException
null
.remove
in interface Entry
attributes
- the attributes to be removednull
LdapException
List<EntryAttribute> removeAttributes(AttributeType... attributes)
Removes the attribute with the specified AttributeTypes.
The removed attribute are returned by this method.
If there is no attribute with the specified AttributeTypes,
the return value is null
.
attributes
- the AttributeTypes to be removednull
List<EntryAttribute> set(AttributeType... attributeTypes)
Put some new attributes using the attributeTypes. No value is inserted.
If an existing Attribute is found, it will be replaced by an empty attribute, and returned to the caller.
attributeTypes
- The AttributeTypes to add.null
if no attribute are removed.Entry clone()
Entry toClientEntry() throws LdapException
LdapException
Copyright © 2003-2013 The Apache Software Foundation. All Rights Reserved.