@PublicAPI(stability=UNCOMMITTED, mayInstantiate=true, mayExtend=false, mayInvoke=true) public final class Entries extends Object
Entries
prior to migration.Modifier and Type | Method and Description |
---|---|
static boolean |
conformsToSchema(Entry entry,
SchemaValidationPolicy policy,
Collection<LocalizableMessage> errorMessages)
Returns
true if the provided entry is valid according to the
default schema and schema validation policy. |
static boolean |
containsObjectClass(Entry entry,
ObjectClass objectClass)
Check if the provided entry contains the provided object class.
|
static Set<ObjectClass> |
getObjectClasses(Entry entry)
Returns an unmodifiable set containing the object classes associated with the provided entry.
|
static Set<ObjectClass> |
getObjectClasses(Entry entry,
Schema schema)
Returns an unmodifiable set containing the object classes associated with the provided entry.
|
static ObjectClass |
getStructuralObjectClass(Entry entry,
Schema schema)
Returns the structural object class associated with the provided entry, or
null if none was found. |
static boolean |
isSubEntry(Entry entry)
Returns whether the provided entry is a sub entry.
|
static Entry |
modifyEntry(Entry entry,
Modification change)
Applies the provided modification to an entry.
|
static Entry |
modifyEntryPermissive(Entry entry,
Collection<Modification> changes)
Applies the provided modifications to an entry using "permissive" modify semantics.
|
static Entry |
modifyEntryStrict(Entry entry,
Collection<Modification> changes)
Applies the provided modifications to an entry using "strict" modify semantics.
|
public static boolean conformsToSchema(Entry entry, SchemaValidationPolicy policy, Collection<LocalizableMessage> errorMessages)
true
if the provided entry is valid according to the
default schema and schema validation policy.
If attribute value validation is enabled then following checks will be performed:
entry
- The entry to be validated.policy
- The schema validation policy.errorMessages
- A collection into which any schema validation warnings or
error messages can be placed, or null
if they should
not be saved.true
if the provided entry is valid according to the
default schema and schema validation policy.Schema.validateEntry(Entry, SchemaValidationPolicy, Collection)
public static boolean containsObjectClass(Entry entry, ObjectClass objectClass)
This method uses the default schema for decoding the object class attribute values.
The provided object class must be recognized by the schema, otherwise the method returns false.
entry
- The entry which is checked against the object class.objectClass
- The object class to check.true
if and only if entry contains the object class and the object class is recognized by the
default schema, false
otherwisepublic static Set<ObjectClass> getObjectClasses(Entry entry)
This method uses the default schema for decoding the object class attribute values.
entry
- The entry whose object classes are required.public static Set<ObjectClass> getObjectClasses(Entry entry, Schema schema)
entry
- The entry whose object classes are required.schema
- The schema which should be used for decoding the object class attribute values.public static ObjectClass getStructuralObjectClass(Entry entry, Schema schema)
null
if none was found. If the
entry contains multiple structural object classes then the first will be returned. This method will ignore
unrecognized object classes.entry
- The entry whose structural object class is required.schema
- The schema which should be used for decoding the object class attribute values.null
if none was found.public static boolean isSubEntry(Entry entry)
entry
- The entry to be checked.true
if the entry is a sub entry, false
otherwise.public static Entry modifyEntry(Entry entry, Modification change) throws LdapException
entry
- The entry to be modified.change
- The modification to be applied to the entry.LdapException
- If an error occurred while performing the change such as an attempt to increment a value which is not
a number. The entry will not have been modified.public static Entry modifyEntryPermissive(Entry entry, Collection<Modification> changes) throws LdapException
entry
- The entry to be modified.changes
- The modification request to be applied to the entry.LdapException
- If an error occurred while performing the changes such as an attempt to increment a value which is
not a number. The entry may have been modified.public static Entry modifyEntryStrict(Entry entry, Collection<Modification> changes) throws LdapException
entry
- The entry to be modified.changes
- The modification request to be applied to the entry.LdapException
- If an error occurred while performing the changes such as an attempt to add duplicate values, remove
values which do not exist, or increment a value which is not a number. The entry may have been
modified.Copyright 2010-2018 ForgeRock AS.