Examples of IPersonAttributeDao


Examples of org.jasig.portal.services.persondir.IPersonAttributeDao

        final List personDirectoryInfos = PersonDirXmlParser.getPersonDirInfos(doc);
       
        for (final Iterator pdInfoItr = personDirectoryInfos.iterator(); pdInfoItr.hasNext();){
            final PersonDirInfo info = (PersonDirInfo)pdInfoItr.next();
           
            final IPersonAttributeDao adapted = PersonDirInfoAdaptor.adapt(info);
           
            personAttributeDaos.add(adapted);
        }
       
        // build a merger over the list of sources
View Full Code Here

Examples of org.jasig.portal.services.persondir.IPersonAttributeDao

        final String validityMessage = info.validate();
        if (validityMessage != null) {
            throw new IllegalArgumentException("The PersonDirInfo to be adapted has illegal state: " + validityMessage);
        }
       
        IPersonAttributeDao returnMe = null;
       
        if (info.isJdbc()) {
            returnMe = jdbcDao(info);
        } else if (info.isLdap()) {
            returnMe = ldapDao(info);
View Full Code Here

Examples of org.jasig.portal.services.persondir.IPersonAttributeDao

       
        daoBackingMap.put("userWithDisplayName", userWithDisplayNameAttributes);
        daoBackingMap.put("userWithEmptyDisplayName", userWithEmptyDisplayNameAttributes);
        daoBackingMap.put("userWithoutDisplayName", userWithoutDisplayNameAttributes);
             
        IPersonAttributeDao paDao = new ComplexStubPersonAttributeDao(daoBackingMap);
       
        this.finder = new PersonDirNameFinder(paDao);
       
    }
View Full Code Here

Examples of org.jasig.portal.services.persondir.IPersonAttributeDao

        pdi.setUsercontext("");
        pdi.setAttributenames(new String[] {"mail"});
        pdi.setAttributealiases(new String[] {"emailfromldap"});

       
        IPersonAttributeDao dao = PersonDirInfoAdaptor.adapt(pdi);
       
        Map attributes = dao.getUserAttributes("awp9");
       
        assertFalse(attributes.isEmpty());
        assertEquals("andrew.petro@yale.edu", attributes.get("emailfromldap"));
       
    }
View Full Code Here

Examples of org.jasig.portal.services.persondir.IPersonAttributeDao

     * Test that invocation of getUserAttributes(Map null) throws
     * IllegalArgumentException as specified in IPersonAttributeDao's
     * interface declaration.
     */
    public void testNullSeed() {
        IPersonAttributeDao dao = getPersonAttributeDaoInstance();
        Map nullMap = null;
        try {
            dao.getUserAttributes(nullMap);
        } catch (IllegalArgumentException iae) {
            // good, as expected
            return;
        }
        fail("Expected IllegalArgumentException on getUserAttributes(String null)");
View Full Code Here

Examples of org.jasig.portal.services.persondir.IPersonAttributeDao

     * Test that invocation of getUserAttributes(String null) throws
     * IllegalArgumentException as specified in IPersonAttributeDao's
     * interface declaration.
     */
    public void testNullUid() {
        IPersonAttributeDao dao = getPersonAttributeDaoInstance();
        String nullString = null;
        try {
            dao.getUserAttributes(nullString);
        } catch (IllegalArgumentException iae) {
            // good, as expected
            return;
        }
        fail("Expected IllegalArgumentException on getUserAttributes(String null)");
View Full Code Here

Examples of org.jasig.portal.services.persondir.IPersonAttributeDao

    IPerson person = staticData.getPerson();
    Document doc = DocumentFactory.getNewDocument();

    Element attributesE = doc.createElement("attributes");
   
    IPersonAttributeDao pa = PersonDirectory.getPersonAttributeDao();
    Set possibleAttrs = pa.getPossibleUserAttributeNames();
   
    if (possibleAttrs != null)
        possibleAttrs = new HashSet(possibleAttrs);
    else
        possibleAttrs = new HashSet();
View Full Code Here

Examples of org.jasig.portal.services.persondir.IPersonAttributeDao

     * supply the IPersonAttributeDao instance.
     */
    public static IPersonAttributeDao getPersonAttributeDao() {
        final BeanFactory factory = PortalApplicationContextFacade.getPortalApplicationContext();
       
        final IPersonAttributeDao delegate = (IPersonAttributeDao)
      factory.getBean(PADAO_BEAN_NAME, IPersonAttributeDao.class);
       
        if (delegate == null)
            throw new IllegalStateException("PortalAppicationContextFacade " +
                "config did not declare a bean named '" + PADAO_BEAN_NAME + "'.");
View Full Code Here

Examples of org.jasig.portal.services.persondir.IPersonAttributeDao

            }
         }
         // Populate the person object using the PersonDirectory if applicable
         if (PropertiesManager.getPropertyAsBoolean("org.jasig.portal.services.Authentication.usePersonDirectory")) {
            // Retrieve all of the attributes associated with the person logging in
            IPersonAttributeDao pa = PersonDirectory.getPersonAttributeDao();
            Map attribs = pa.getUserAttributes((String)person.getAttribute(IPerson.USERNAME));
           
            if (attribs != null) {
              // attribs may be null.  IPersonAttributeDao returns null when it does not recognize a user at all, as
              // distinguished from returning an empty Map of attributes when it recognizes a user has having no
              // attributes.
View Full Code Here

Examples of org.jasig.portal.services.persondir.IPersonAttributeDao

    private synchronized static void storeSingleton() {
        // recheck that we need to run because field could have been
        // set since we decided to invoke this method but before we acquired
        // the lock on this object
        if (PERSON_DIR_NAME_FINDER_INSTANCE == null) {
            IPersonAttributeDao personAttributeDao = PersonDirectory
                    .getPersonAttributeDao();
            PERSON_DIR_NAME_FINDER_INSTANCE = new PersonDirNameFinder(
                    personAttributeDao);
        }
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.