Package edu.vt.middleware.ldap.ed
Interface EdService
-
- All Superinterfaces:
EdOperation
- All Known Implementing Classes:
EdId
,EdLite
,EdServiceTemplate
public interface EdService extends EdOperation
Interface that allows for performing common search operations on Virginia Tech Enterprise directory instances.- Author:
- Middleware Services
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Collection<org.ldaptive.LdapAttribute>
getAttributes(String dn, String... retAttrs)
Gets the requested attributes of the object whose distinguished name is given.String
getDn(String authId)
Gets the LDAP distinguished name for the supplied user.String[]
getGroupMembership(String uugidOrDn)
Gets the groups of which the given group is a member.String[]
getMemberOf(String authId)
Gets all the groups the supplied user is a member of.String[]
getMembers(String uugidOrDn)
Gets the members of the given group.VirginiaTechGroup
getVirginiaTechGroup(String uugidOrDn)
This will query LDAP for the specified uugidOrDn for a VirginiaTechGroup entry and return theLdapEntry
mapped to aVirginiaTechGroup
bean.VirginiaTechPerson
getVirginiaTechPerson(String authId)
This will query LDAP for the specified authId for a VirginiaTechPerson entry and return theLdapEntry
mapped to aVirginiaTechPerson
bean.org.ldaptive.SearchResponse
search(String filter, String... retAttrs)
Searches an ED with the supplied query and return attributes.-
Methods inherited from interface edu.vt.middleware.ldap.ed.EdOperation
getConnectionFactory, getEnvironment, getType
-
-
-
-
Method Detail
-
search
org.ldaptive.SearchResponse search(String filter, String... retAttrs) throws org.ldaptive.LdapException
Searches an ED with the supplied query and return attributes. SeeOperation.execute(org.ldaptive.Request)
.- Parameters:
filter
- expression to use for the searchretAttrs
- attributes to return- Returns:
- LDAP search results
- Throws:
org.ldaptive.LdapException
- if the LDAP returns an error
-
getAttributes
Collection<org.ldaptive.LdapAttribute> getAttributes(String dn, String... retAttrs) throws org.ldaptive.LdapException
Gets the requested attributes of the object whose distinguished name is given. SeeLdapEntry.getAttributes()
.- Parameters:
dn
- LDAP distinguished name of object whose attributes will be fetched.retAttrs
- attributes to return- Returns:
- ldap attributes
- Throws:
org.ldaptive.LdapException
- if the LDAP returns an error
-
getDn
String getDn(String authId) throws org.ldaptive.LdapException
Gets the LDAP distinguished name for the supplied user.- Parameters:
authId
- ED authId attribute value of user.- Returns:
- value of user's distinguished name.
- Throws:
org.ldaptive.LdapException
- if the LDAP search fails
-
getVirginiaTechPerson
VirginiaTechPerson getVirginiaTechPerson(String authId) throws org.ldaptive.LdapException
This will query LDAP for the specified authId for a VirginiaTechPerson entry and return theLdapEntry
mapped to aVirginiaTechPerson
bean.- Parameters:
authId
- ED authId attribute value of user.- Returns:
- VirginiaTechPerson POJO representation of Ldap result.
- Throws:
org.ldaptive.LdapException
- if the LDAP returns an error
-
getVirginiaTechGroup
VirginiaTechGroup getVirginiaTechGroup(String uugidOrDn) throws org.ldaptive.LdapException
This will query LDAP for the specified uugidOrDn for a VirginiaTechGroup entry and return theLdapEntry
mapped to aVirginiaTechGroup
bean.- Parameters:
uugidOrDn
- Group to search for; may be either UUGID or DN.- Returns:
- VirginiaTechGroup POJO representation of Ldap result.
- Throws:
org.ldaptive.LdapException
- if the LDAP returns an error
-
getGroupMembership
String[] getGroupMembership(String uugidOrDn) throws org.ldaptive.LdapException
Gets the groups of which the given group is a member.- Parameters:
uugidOrDn
- Group to search for parents; may be either UUGID or DN.- Returns:
- Array of groups of which the given group is a member. Returns an empty array if the given group has member suppression enabled.
- Throws:
org.ldaptive.LdapException
- if the LDAP returns an error
-
getMembers
String[] getMembers(String uugidOrDn) throws org.ldaptive.LdapException
Gets the members of the given group.- Parameters:
uugidOrDn
- UUGID or DN of group to search for members.- Returns:
- Array of group member names. Returns an empty array if the given group has member suppression enabled.
- Throws:
org.ldaptive.LdapException
- if the LDAP returns an error
-
getMemberOf
String[] getMemberOf(String authId) throws org.ldaptive.LdapException
Gets all the groups the supplied user is a member of.- Parameters:
authId
- ED authId attribute value of user.- Returns:
- Array of group UUGID identifiers of which the given user is a member.
- Throws:
org.ldaptive.LdapException
- if the LDAP returns an error
-
-