Package org.apache.jetspeed.om.portlet.impl

Examples of org.apache.jetspeed.om.portlet.impl.UserAttributeRefImpl


                        }
                    }
                }
                if (!linkedAttribute)
                {
                    linkedUserAttributes.add(new UserAttributeRefImpl(currentAttribute));
                }
            }
        }
        else
        {
            Iterator attrIter = userAttributes.iterator();
            while (attrIter.hasNext())
            {
                UserAttribute currentAttribute = (UserAttribute) attrIter.next();
                linkedUserAttributes.add(new UserAttributeRefImpl(currentAttribute));
            }
        }
        return linkedUserAttributes;
    }
View Full Code Here


     *            reference.
     * @return The list of linked attributes.
     */
    protected List<UserAttributeRef> mapLinkedUserAttributes(List<UserAttribute> userAttributes, List<UserAttributeRef> userAttributeRefs)
    {
        UserAttributeRefImpl impl;
        List<UserAttributeRef> linkedUserAttributes = new ArrayList<UserAttributeRef>();
        if ((null != userAttributeRefs) && (userAttributeRefs.size() > 0))
        {
            for (UserAttribute currentAttribute : userAttributes)
            {
                boolean linkedAttribute = false;
                impl = new UserAttributeRefImpl();
                for (UserAttributeRef currentAttributeRef : userAttributeRefs)
                {
                    if ((currentAttribute.getName()).equals(currentAttributeRef.getNameLink()))
                    {
                        if (log.isDebugEnabled())
                        {
                            log.debug("Linking user attribute ref: [[name, " + currentAttribute.getName()
                                    + "], [linked name, " + currentAttributeRef.getName() + "]]");
                        }
                        impl.setName(currentAttributeRef.getName());
                        impl.setNameLink(currentAttributeRef.getNameLink());
                        linkedAttribute = true;
                        break;
                    }
                }
                if (!linkedAttribute)
                {
                    impl.setName(currentAttribute.getName());
                }
                linkedUserAttributes.add(impl);
            }
        }
        else
        {
            for (UserAttribute currentAttribute : userAttributes)
            {
                impl = new UserAttributeRefImpl();
                impl.setName(currentAttribute.getName());
                linkedUserAttributes.add(impl);
            }
        }
        return linkedUserAttributes;
    }
View Full Code Here

TOP

Related Classes of org.apache.jetspeed.om.portlet.impl.UserAttributeRefImpl

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.