edu.vt.middleware.ldap.bean.LdapResult Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of vt-ldap Show documentation
Show all versions of vt-ldap Show documentation
Library for performing common LDAP operations
/*
$Id: LdapResult.java 1330 2010-05-23 22:10:53Z dfisher $
Copyright (C) 2003-2010 Virginia Tech.
All rights reserved.
SEE LICENSE FOR MORE INFORMATION
Author: Middleware Services
Email: [email protected]
Version: $Revision: 1330 $
Updated: $Date: 2010-05-23 18:10:53 -0400 (Sun, 23 May 2010) $
*/
package edu.vt.middleware.ldap.bean;
import java.util.Collection;
import java.util.Iterator;
import java.util.List;
import javax.naming.NamingEnumeration;
import javax.naming.NamingException;
import javax.naming.directory.SearchResult;
/**
* LdapResult
represents a collection of ldap entries.
*
* @author Middleware Services
* @version $Revision: 1330 $ $Date: 2010-05-23 18:10:53 -0400 (Sun, 23 May 2010) $
*/
public interface LdapResult
{
/**
* This returns a Collection
of LdapEntry
for this
* LdapResult
.
*
* @return Collection
*/
Collection getEntries();
/**
* This returns the LdapEntry
for this LdapResult
* with the supplied DN.
*
* @param dn String
*
* @return LdapEntry
*/
LdapEntry getEntry(final String dn);
/**
* This adds a new entry to this LdapResult
.
*
* @param e LdapEntry
*/
void addEntry(final LdapEntry e);
/**
* This adds a new entry to this LdapResult
.
*
* @param sr SearchResult
*
* @throws NamingException if the search results cannot be read
*/
void addEntry(final SearchResult sr)
throws NamingException;
/**
* This adds a Collection
of entries to this
* LdapResult
. The list should contain LdapEntry
objects.
*
* @param c Collection
*/
void addEntries(final Collection c);
/**
* This adds a NamingEnumeration
of SearchResult
to
* this LdapResult
.
*
* @param ne NamingEnumeration
*
* @throws NamingException if the search results cannot be read
*/
void addEntries(final NamingEnumeration ne)
throws NamingException;
/**
* This adds an Iterator
of SearchResult
to this
* LdapResult
.
*
* @param i Iterator
*
* @throws NamingException if the search results cannot be read
*/
void addEntries(final Iterator i)
throws NamingException;
/**
* This returns the number of entries in this result.
*
* @return int
*/
int size();
/** This removes all entries from this LdapResult
. */
void clear();
/**
* This returns a List
of SearchResult
that
* represent the entries in this LdapResult
.
*
* @return List
*/
List toSearchResults();
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy