public final class ServerEntryUtils extends Object
| Modifier and Type | Method and Description |
|---|---|
static List<org.apache.directory.api.ldap.model.entry.Modification> |
convertToServerModification(List<ModificationItem> modificationItems,
org.apache.directory.api.ldap.model.schema.SchemaManager schemaManager)
Convert a list of ModificationItemImpl to a list of
|
static void |
filterContents(org.apache.directory.api.ldap.model.schema.SchemaManager schemaManager,
FilteringOperationContext operationContext,
org.apache.directory.api.ldap.model.entry.Entry entry)
Filters an entry accordingly to the requested Attribute list.
|
static org.apache.directory.api.ldap.model.entry.Attribute |
getAttribute(List<org.apache.directory.api.ldap.model.entry.Modification> mods,
org.apache.directory.api.ldap.model.schema.AttributeType type)
Utility method to extract an attribute from a list of modifications.
|
static org.apache.directory.api.ldap.model.entry.Modification |
getModificationItem(List<org.apache.directory.api.ldap.model.entry.Modification> mods,
org.apache.directory.api.ldap.model.schema.AttributeType type)
Utility method to extract a modification item from an array of modifications.
|
static org.apache.directory.api.ldap.model.entry.Entry |
getTargetEntry(org.apache.directory.api.ldap.model.entry.Modification mod,
org.apache.directory.api.ldap.model.entry.Entry entry,
org.apache.directory.api.ldap.model.schema.SchemaManager schemaManager)
Gets the target entry as it would look after a modification operation
was performed on it.
|
static org.apache.directory.api.ldap.model.entry.Attribute |
getUnion(org.apache.directory.api.ldap.model.entry.Attribute attr0,
org.apache.directory.api.ldap.model.entry.Attribute attr1)
Creates a new attribute which contains the values representing the union
of two attributes.
|
static Attribute |
toBasicAttribute(org.apache.directory.api.ldap.model.entry.Attribute entryAttribute)
Convert a ServerAttribute into a BasicAttribute.
|
static Attributes |
toBasicAttributes(org.apache.directory.api.ldap.model.entry.Entry entry)
Convert a ServerEntry into a BasicAttributes.
|
static NamingEnumeration<SearchResult> |
toSearchResultEnum(NamingEnumeration<ServerSearchResult> result)
Encapsulate a ServerSearchResult enumeration into a SearchResult enumeration
|
static org.apache.directory.api.ldap.model.entry.Attribute |
toServerAttribute(Attribute attribute,
org.apache.directory.api.ldap.model.schema.AttributeType attributeType)
Convert a BasicAttribute or a AttributeImpl to a ServerAtribute
|
static org.apache.directory.api.ldap.model.entry.Entry |
toServerEntry(Attributes attributes,
org.apache.directory.api.ldap.model.name.Dn dn,
org.apache.directory.api.ldap.model.schema.SchemaManager schemaManager)
Convert a BasicAttributes or a AttributesImpl to a ServerEntry
|
static List<org.apache.directory.api.ldap.model.entry.Modification> |
toServerModification(org.apache.directory.api.ldap.model.entry.Modification[] modifications,
org.apache.directory.api.ldap.model.schema.SchemaManager schemaManager) |
static List<org.apache.directory.api.ldap.model.entry.Modification> |
toServerModification(ModificationItem[] modifications,
org.apache.directory.api.ldap.model.schema.SchemaManager schemaManager) |
public static Attribute toBasicAttribute(org.apache.directory.api.ldap.model.entry.Attribute entryAttribute)
public static Attributes toBasicAttributes(org.apache.directory.api.ldap.model.entry.Entry entry)
public static org.apache.directory.api.ldap.model.entry.Attribute toServerAttribute(Attribute attribute, org.apache.directory.api.ldap.model.schema.AttributeType attributeType) throws org.apache.directory.api.ldap.model.exception.LdapException
attribute - the BasicAttributes or AttributesImpl instance to convertattributeType - InvalidAttributeIdentifierException - If we had an incorrect attributeorg.apache.directory.api.ldap.model.exception.LdapExceptionpublic static org.apache.directory.api.ldap.model.entry.Entry toServerEntry(Attributes attributes, org.apache.directory.api.ldap.model.name.Dn dn, org.apache.directory.api.ldap.model.schema.SchemaManager schemaManager) throws org.apache.directory.api.ldap.model.exception.LdapInvalidAttributeTypeException
attributes - the BasicAttributes or AttributesImpl instance to convertregistries - The registries, needed ro build a ServerEntrydn - The Dn which is needed by the ServerEntryorg.apache.directory.api.ldap.model.exception.LdapInvalidAttributeTypeException - If we get an invalid attributepublic static org.apache.directory.api.ldap.model.entry.Entry getTargetEntry(org.apache.directory.api.ldap.model.entry.Modification mod,
org.apache.directory.api.ldap.model.entry.Entry entry,
org.apache.directory.api.ldap.model.schema.SchemaManager schemaManager)
throws org.apache.directory.api.ldap.model.exception.LdapException
mod - the modificationentry - the source entry that is modifiedorg.apache.directory.api.ldap.model.exception.LdapException - if there are problems accessing attributespublic static org.apache.directory.api.ldap.model.entry.Attribute getUnion(org.apache.directory.api.ldap.model.entry.Attribute attr0,
org.apache.directory.api.ldap.model.entry.Attribute attr1)
throws org.apache.directory.api.ldap.model.exception.LdapException
IllegalArgumentException
is raised.attr0 - the first attributeattr1 - the second attributeorg.apache.directory.api.ldap.model.exception.LdapException - if there are problems accessing attribute valuespublic static List<org.apache.directory.api.ldap.model.entry.Modification> convertToServerModification(List<ModificationItem> modificationItems, org.apache.directory.api.ldap.model.schema.SchemaManager schemaManager) throws org.apache.directory.api.ldap.model.exception.LdapException
modificationImpls - atRegistry - org.apache.directory.api.ldap.model.exception.LdapExceptionpublic static List<org.apache.directory.api.ldap.model.entry.Modification> toServerModification(org.apache.directory.api.ldap.model.entry.Modification[] modifications, org.apache.directory.api.ldap.model.schema.SchemaManager schemaManager) throws org.apache.directory.api.ldap.model.exception.LdapException
org.apache.directory.api.ldap.model.exception.LdapExceptionpublic static List<org.apache.directory.api.ldap.model.entry.Modification> toServerModification(ModificationItem[] modifications, org.apache.directory.api.ldap.model.schema.SchemaManager schemaManager) throws org.apache.directory.api.ldap.model.exception.LdapException
org.apache.directory.api.ldap.model.exception.LdapExceptionpublic static org.apache.directory.api.ldap.model.entry.Modification getModificationItem(List<org.apache.directory.api.ldap.model.entry.Modification> mods, org.apache.directory.api.ldap.model.schema.AttributeType type)
mods - the array of ModificationItems to extract the Attribute from.type - the attributeType spec of the Attribute to extractpublic static org.apache.directory.api.ldap.model.entry.Attribute getAttribute(List<org.apache.directory.api.ldap.model.entry.Modification> mods, org.apache.directory.api.ldap.model.schema.AttributeType type)
mods - the list of ModificationItems to extract the Attribute from.type - the attributeType spec of the Attribute to extractpublic static NamingEnumeration<SearchResult> toSearchResultEnum(NamingEnumeration<ServerSearchResult> result)
result - The ServerSearchResult enumerationpublic static void filterContents(org.apache.directory.api.ldap.model.schema.SchemaManager schemaManager,
FilteringOperationContext operationContext,
org.apache.directory.api.ldap.model.entry.Entry entry)
throws org.apache.directory.api.ldap.model.exception.LdapException
entry - The entry to filteroperationContext - The SearchingOperationContextorg.apache.directory.api.ldap.model.exception.LdapException - If the filtering failsCopyright © 2021. All rights reserved.