Package org.jasig.services.persondir

Examples of org.jasig.services.persondir.IPersonAttributeDao


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

    Element attributesE = doc.createElement("attributes");
   
    IPersonAttributeDao pa = PersonDirectory.getPersonAttributeDao();
    Set<String> possibleAttrs = pa.getPossibleUserAttributeNames();
   
    if (possibleAttrs != null)
        possibleAttrs = new HashSet<String>(possibleAttrs);
    else
        possibleAttrs = new HashSet<String>();
       
    for (Map.Entry<String,List<Object>> y : pa.getPerson(person.getUserName()).getAttributes().entrySet()) {
       
      // Remove this attr from the list of possible attrs
      possibleAttrs.remove(y.getKey());
     
      // Set the attribute
View Full Code Here


            }
         }
         // 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
            final IPersonAttributeDao pa = PersonDirectory.getPersonAttributeDao();
            final String username = this.getUsername(person);
            final IPersonAttributes personAttributes = pa.getPerson(username);

            if (personAttributes != 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

   
    /* (non-Javadoc)
     * @see org.jasig.portal.portlets.swapper.IAttributeSwapperHelper#getOriginalUserAttributes(java.lang.String)
     */
    public IPersonAttributes getOriginalUserAttributes(String uid) {
        final IPersonAttributeDao delegatePersonAttributeDao = this.overwritingPersonAttributeDao.getDelegatePersonAttributeDao();
        return delegatePersonAttributeDao.getPerson(uid);
    }
View Full Code Here

    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

      {
         if (member.getEntityType() != IPERSON_CLASS)
             { return false; }
         IPerson person = null;
         try {
             IPersonAttributeDao pa = PersonDirectory.getPersonAttributeDao();
             final IPersonAttributes personAttributes = pa.getPerson(member.getKey());

             RestrictedPerson rp = PersonFactory.createRestrictedPerson();
             if (personAttributes != null) {
                 rp.setAttributes(personAttributes.getAttributes());
             }
View Full Code Here

       
        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

    IPortletDefinition portletDefinition = mock(IPortletDefinition.class);
    when(portletEntity.getPortletDefinition()).thenReturn(portletDefinition);
    IPortletDefinitionId portletDefinitionId = mock(IPortletDefinitionId.class);
    when(portletDefinition.getPortletDefinitionId()).thenReturn(portletDefinitionId);
   
    IPersonAttributeDao personAttributeDao = mock(IPersonAttributeDao.class);
    when(personAttributeDao.getPerson("username")).thenReturn(personAttributes);
 
    IPortletWindowRegistry portletWindowRegistry = mock(IPortletWindowRegistry.class);
    when(portletWindowRegistry.convertPortletWindow(httpServletRequest, plutoPortletWindow)).thenReturn(portletWindow);
   
    List<UserAttributeType> userAttributesList = new ArrayList<UserAttributeType>();
View Full Code Here

    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 = PersonAttributeDaoLocator
                    .getPersonAttributeDao();
            PERSON_DIR_NAME_FINDER_INSTANCE = new PersonDirNameFinder(
                    personAttributeDao);
        }
    }
View Full Code Here

       
        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

      {
         if (member.getEntityType() != IPERSON_CLASS)
             { return false; }
         IPerson person = null;
         try {
             IPersonAttributeDao pa = PersonAttributeDaoLocator.getPersonAttributeDao();
             final IPersonAttributes personAttributes = pa.getPerson(member.getKey());

             RestrictedPerson rp = PersonFactory.createRestrictedPerson();
             if (personAttributes != null) {
                 rp.setAttributes(personAttributes.getAttributes());
             }
View Full Code Here

TOP

Related Classes of org.jasig.services.persondir.IPersonAttributeDao

Copyright © 2018 www.massapicom. 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.