|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.directory.server.core.entry.ServerEntryUtils
public class ServerEntryUtils
A helper class used to manipulate Entries, Attributes and Values.
Constructor Summary | |
---|---|
ServerEntryUtils()
|
Method Summary | |
---|---|
static java.util.List<org.apache.directory.shared.ldap.entry.Modification> |
convertToServerModification(java.util.List<javax.naming.directory.ModificationItem> modificationItems,
AttributeTypeRegistry atRegistry)
Convert a list of ModificationItemImpl to a list of |
static ServerAttribute |
getAttribute(java.util.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(java.util.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 ServerEntry |
getTargetEntry(org.apache.directory.shared.ldap.entry.Modification mod,
ServerEntry entry,
Registries registries)
Gets the target entry as it would look after a modification operation was performed on it. |
static ServerAttribute |
getUnion(ServerAttribute attr0,
ServerAttribute attr1)
Creates a new attribute which contains the values representing the union of two attributes. |
static javax.naming.directory.Attribute |
toBasicAttribute(ServerAttribute entryAttribute)
Convert a ServerAttribute into a BasicAttribute. |
static javax.naming.directory.Attributes |
toBasicAttributes(ServerEntry entry)
Convert a ServerEntry into a BasicAttributes. |
static javax.naming.NamingEnumeration<javax.naming.directory.SearchResult> |
toSearchResultEnum(javax.naming.NamingEnumeration<ServerSearchResult> result)
Encapsulate a ServerSearchResult enumeration into a SearchResult enumeration |
static ServerAttribute |
toServerAttribute(javax.naming.directory.Attribute attribute,
org.apache.directory.shared.ldap.schema.AttributeType attributeType)
Convert a BasicAttribute or a AttributeImpl to a ServerAtribute |
static ServerEntry |
toServerEntry(javax.naming.directory.Attributes attributes,
org.apache.directory.shared.ldap.name.LdapDN dn,
Registries registries)
Convert a BasicAttributes or a AttributesImpl to a ServerEntry |
static java.util.List<org.apache.directory.shared.ldap.entry.Modification> |
toServerModification(org.apache.directory.shared.ldap.entry.Modification[] modifications,
AttributeTypeRegistry atRegistry)
|
static java.util.List<org.apache.directory.shared.ldap.entry.Modification> |
toServerModification(javax.naming.directory.ModificationItem[] modifications,
AttributeTypeRegistry atRegistry)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ServerEntryUtils()
Method Detail |
---|
public static javax.naming.directory.Attribute toBasicAttribute(ServerAttribute entryAttribute)
public static javax.naming.directory.Attributes toBasicAttributes(ServerEntry entry)
public static ServerAttribute toServerAttribute(javax.naming.directory.Attribute attribute, org.apache.directory.shared.ldap.schema.AttributeType attributeType)
attribute
- the BasicAttributes or AttributesImpl instance to convertattributeType
-
javax.naming.directory.InvalidAttributeIdentifierException
- If we had an incorrect attributepublic static ServerEntry toServerEntry(javax.naming.directory.Attributes attributes, org.apache.directory.shared.ldap.name.LdapDN dn, Registries registries) throws javax.naming.directory.InvalidAttributeIdentifierException
attributes
- the BasicAttributes or AttributesImpl instance to convertregistries
- The registries, needed ro build a ServerEntrydn
- The DN which is needed by the ServerEntry
javax.naming.directory.InvalidAttributeIdentifierException
- If we get an invalid attributepublic static ServerEntry getTargetEntry(org.apache.directory.shared.ldap.entry.Modification mod, ServerEntry entry, Registries registries) throws javax.naming.NamingException
mod
- the modificationentry
- the source entry that is modified
javax.naming.NamingException
- if there are problems accessing attributespublic static ServerAttribute getUnion(ServerAttribute attr0, ServerAttribute attr1)
IllegalArgumentException
is raised.
attr0
- the first attributeattr1
- the second attribute
javax.naming.NamingException
- if there are problems accessing attribute valuespublic static java.util.List<org.apache.directory.shared.ldap.entry.Modification> convertToServerModification(java.util.List<javax.naming.directory.ModificationItem> modificationItems, AttributeTypeRegistry atRegistry) throws javax.naming.NamingException
modificationImpls
- atRegistry
-
javax.naming.NamingException
public static java.util.List<org.apache.directory.shared.ldap.entry.Modification> toServerModification(org.apache.directory.shared.ldap.entry.Modification[] modifications, AttributeTypeRegistry atRegistry) throws javax.naming.NamingException
javax.naming.NamingException
public static java.util.List<org.apache.directory.shared.ldap.entry.Modification> toServerModification(javax.naming.directory.ModificationItem[] modifications, AttributeTypeRegistry atRegistry) throws javax.naming.NamingException
javax.naming.NamingException
public static final org.apache.directory.shared.ldap.entry.Modification getModificationItem(java.util.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 extract
public static ServerAttribute getAttribute(java.util.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 extract
public static javax.naming.NamingEnumeration<javax.naming.directory.SearchResult> toSearchResultEnum(javax.naming.NamingEnumeration<ServerSearchResult> result)
result
- The ServerSearchResult enumeration
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |