public class ServerEntryUtils extends Object
Constructor and Description |
---|
ServerEntryUtils() |
Modifier and Type | Method and Description |
---|---|
static List<org.apache.directory.shared.ldap.entry.Modification> |
convertToServerModification(List<ModificationItem> modificationItems,
org.apache.directory.shared.ldap.schema.SchemaManager schemaManager)
Convert a list of ModificationItemImpl to a list of
|
static org.apache.directory.shared.ldap.entry.EntryAttribute |
getAttribute(List<org.apache.directory.shared.ldap.entry.Modification> mods,
org.apache.directory.shared.ldap.schema.AttributeType type)
Utility method to extract an attribute from a list of modifications.
|
static org.apache.directory.shared.ldap.entry.Modification |
getModificationItem(List<org.apache.directory.shared.ldap.entry.Modification> mods,
org.apache.directory.shared.ldap.schema.AttributeType type)
Utility method to extract a modification item from an array of modifications.
|
static org.apache.directory.shared.ldap.entry.ServerEntry |
getTargetEntry(org.apache.directory.shared.ldap.entry.Modification mod,
org.apache.directory.shared.ldap.entry.ServerEntry entry,
org.apache.directory.shared.ldap.schema.SchemaManager schemaManager)
Gets the target entry as it would look after a modification operation
was performed on it.
|
static org.apache.directory.shared.ldap.entry.EntryAttribute |
getUnion(org.apache.directory.shared.ldap.entry.EntryAttribute attr0,
org.apache.directory.shared.ldap.entry.EntryAttribute attr1)
Creates a new attribute which contains the values representing the union
of two attributes.
|
static Attribute |
toBasicAttribute(org.apache.directory.shared.ldap.entry.EntryAttribute entryAttribute)
Convert a ServerAttribute into a BasicAttribute.
|
static Attributes |
toBasicAttributes(org.apache.directory.shared.ldap.entry.ServerEntry 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.shared.ldap.entry.EntryAttribute |
toServerAttribute(Attribute attribute,
org.apache.directory.shared.ldap.schema.AttributeType attributeType)
Convert a BasicAttribute or a AttributeImpl to a ServerAtribute
|
static org.apache.directory.shared.ldap.entry.ServerEntry |
toServerEntry(Attributes attributes,
org.apache.directory.shared.ldap.name.DN dn,
org.apache.directory.shared.ldap.schema.SchemaManager schemaManager)
Convert a BasicAttributes or a AttributesImpl to a ServerEntry
|
static List<org.apache.directory.shared.ldap.entry.Modification> |
toServerModification(org.apache.directory.shared.ldap.entry.Modification[] modifications,
org.apache.directory.shared.ldap.schema.SchemaManager schemaManager) |
static List<org.apache.directory.shared.ldap.entry.Modification> |
toServerModification(ModificationItem[] modifications,
org.apache.directory.shared.ldap.schema.SchemaManager schemaManager) |
public static Attribute toBasicAttribute(org.apache.directory.shared.ldap.entry.EntryAttribute entryAttribute)
public static Attributes toBasicAttributes(org.apache.directory.shared.ldap.entry.ServerEntry entry)
public static org.apache.directory.shared.ldap.entry.EntryAttribute toServerAttribute(Attribute attribute, org.apache.directory.shared.ldap.schema.AttributeType attributeType)
attribute
- the BasicAttributes or AttributesImpl instance to convertattributeType
- InvalidAttributeIdentifierException
- If we had an incorrect attributepublic static org.apache.directory.shared.ldap.entry.ServerEntry toServerEntry(Attributes attributes, org.apache.directory.shared.ldap.name.DN dn, org.apache.directory.shared.ldap.schema.SchemaManager schemaManager) throws org.apache.directory.shared.ldap.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.shared.ldap.exception.LdapInvalidAttributeTypeException
- If we get an invalid attributepublic static org.apache.directory.shared.ldap.entry.ServerEntry getTargetEntry(org.apache.directory.shared.ldap.entry.Modification mod, org.apache.directory.shared.ldap.entry.ServerEntry entry, org.apache.directory.shared.ldap.schema.SchemaManager schemaManager) throws org.apache.directory.shared.ldap.exception.LdapException
mod
- the modificationentry
- the source entry that is modifiedorg.apache.directory.shared.ldap.exception.LdapException
- if there are problems accessing attributespublic static org.apache.directory.shared.ldap.entry.EntryAttribute getUnion(org.apache.directory.shared.ldap.entry.EntryAttribute attr0, org.apache.directory.shared.ldap.entry.EntryAttribute attr1)
IllegalArgumentException
is raised.attr0
- the first attributeattr1
- the second attributeorg.apache.directory.shared.ldap.exception.LdapException
- if there are problems accessing attribute valuespublic static List<org.apache.directory.shared.ldap.entry.Modification> convertToServerModification(List<ModificationItem> modificationItems, org.apache.directory.shared.ldap.schema.SchemaManager schemaManager) throws org.apache.directory.shared.ldap.exception.LdapException
modificationImpls
- atRegistry
- org.apache.directory.shared.ldap.exception.LdapException
public static List<org.apache.directory.shared.ldap.entry.Modification> toServerModification(org.apache.directory.shared.ldap.entry.Modification[] modifications, org.apache.directory.shared.ldap.schema.SchemaManager schemaManager) throws org.apache.directory.shared.ldap.exception.LdapException
org.apache.directory.shared.ldap.exception.LdapException
public static List<org.apache.directory.shared.ldap.entry.Modification> toServerModification(ModificationItem[] modifications, org.apache.directory.shared.ldap.schema.SchemaManager schemaManager) throws org.apache.directory.shared.ldap.exception.LdapException
org.apache.directory.shared.ldap.exception.LdapException
public static final org.apache.directory.shared.ldap.entry.Modification getModificationItem(List<org.apache.directory.shared.ldap.entry.Modification> mods, org.apache.directory.shared.ldap.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.shared.ldap.entry.EntryAttribute getAttribute(List<org.apache.directory.shared.ldap.entry.Modification> mods, org.apache.directory.shared.ldap.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 enumerationCopyright © 2003–2014 The Apache Software Foundation. All rights reserved.