Examples of IPersonAttributeDao


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

        //Initialize null, so that if none of the sub-DAOs find the user null is returned appropriately
        Map resultAttributes = null;
       
        //Iterate through the configured IPersonAttributeDaos, querying each.
        for (final Iterator iter = this.personAttributeDaos.iterator(); iter.hasNext();) {
            final IPersonAttributeDao currentlyConsidering = (IPersonAttributeDao)iter.next();
           
            Map currentAttributes = new HashMap();
            try {
                currentAttributes = currentlyConsidering.getUserAttributes(seed);
            }
            catch (final RuntimeException rte) {
                final String msg = "Exception thrown by DAO: " + currentlyConsidering;

                if (this.recoverExceptions) {
View Full Code Here

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

     */
    public Set getPossibleUserAttributeNames() {
        final Set attrNames = new HashSet();
       
        for (final Iterator iter = this.personAttributeDaos.iterator(); iter.hasNext();) {
            final IPersonAttributeDao currentDao = (IPersonAttributeDao)iter.next();
           
            Set currentDaoAttrNames = null;
            try {
                currentDaoAttrNames = currentDao.getPossibleUserAttributeNames();
            }
            catch (final RuntimeException rte) {
                final String msg = "Exception thrown by DAO: " + currentDao;

                if (this.recoverExceptions) {
View Full Code Here

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

        //Denotes that this is the first time we are running a query and the seed should be used
        boolean isFirstQuery = true;
       
        //Iterate through the configured IPersonAttributeDaos, querying each.
        for (final Iterator iter = this.personAttributeDaos.iterator(); iter.hasNext();) {
            final IPersonAttributeDao currentlyConsidering = (IPersonAttributeDao)iter.next();
           
            Map currentAttributes = new HashMap();
            try {
                if (isFirstQuery) {
                    currentAttributes = currentlyConsidering.getUserAttributes(seed);
                    isFirstQuery = false; //Ran a query successfully, stop using the seed
                }
                else
                    currentAttributes = currentlyConsidering.getUserAttributes(resultAttributes);
            }
            catch (final RuntimeException rte) {
                final String msg = "Exception thrown by DAO: " + currentlyConsidering;

                if (this.recoverExceptions) {
View Full Code Here

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

     */
    public Set getPossibleUserAttributeNames() {
        final Set attrNames = new HashSet();
       
        for (final Iterator iter = this.personAttributeDaos.iterator(); iter.hasNext();) {
            final IPersonAttributeDao currentDao = (IPersonAttributeDao)iter.next();
           
            Set currentDaoAttrNames = null;
            try {
                currentDaoAttrNames = currentDao.getPossibleUserAttributeNames();
            }
            catch (final RuntimeException rte) {
                final String msg = "Exception thrown by DAO: " + currentDao;

                if (this.recoverExceptions) {
View Full Code Here

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

      {
         if (member.getEntityType() != IPerson.class)
             { return false; }
         IPerson person = null;
         try {
             IPersonAttributeDao pa = PersonDirectory.getPersonAttributeDao();
             Map attrs = pa.getUserAttributes(member.getKey());
             RestrictedPerson rp = PersonFactory.createRestrictedPerson();
             rp.setAttributes(attrs);
            
             person = rp;
         }
View Full Code Here

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

Examples of org.jasig.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
            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

Examples of org.jasig.services.persondir.IPersonAttributeDao

   
    /* (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

Examples of org.jasig.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

Examples of org.jasig.services.persondir.IPersonAttributeDao

      {
         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
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.