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 Detail

      • search

        org.ldaptive.SearchResponse search​(String filter,
                                           String... retAttrs)
                                    throws org.ldaptive.LdapException
        Searches an ED with the supplied query and return attributes. See Operation.execute(org.ldaptive.Request).
        Parameters:
        filter - expression to use for the search
        retAttrs - 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. See LdapEntry.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 the LdapEntry mapped to a VirginiaTechPerson 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 the LdapEntry mapped to a VirginiaTechGroup 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