Examples of PrincipalPopulationException


Examples of org.eurekastreams.commons.exceptions.PrincipalPopulationException

            user = personMapper.fetchUniqueResult(inOpenSocialId);
        }
        catch (Exception e)
        {
            logger.error("Unable to populate principal for OpenSocialId: " + inOpenSocialId);
            throw new PrincipalPopulationException("Unable to populate principal for OpenSocialId: " + inOpenSocialId,
                    e);
        }

        // must handle successful null result from personMapper.fetchUniqueResult
        if (user == null)
        {
            logger.error("Unable to find principal for OpenSocialId: " + inOpenSocialId + " attempting ntid");
            try
            {
                user = getPersonModelViewByAccountIdMapper.execute(inOpenSocialId);
            }
            catch (Exception e)
            {
                throw new PrincipalPopulationException("Unable to find principal for OpenSocialId: " + inOpenSocialId);
            }
            // If the user is still null, neither a valid opensocial id nor a valid ntid was provided.
            if (user == null)
            {
                throw new PrincipalPopulationException("Unable to find principal for OpenSocialId: " + inOpenSocialId);
            }
        }

        return new DefaultPrincipal(user.getAccountId(), user.getOpenSocialId(), user.getEntityId());
    }
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.