Package org.apache.jetspeed.om.common

Examples of org.apache.jetspeed.om.common.UserAttribute


        app.setApplicationIdentifier("App_1");

        UserAttributeRef uaRef = new UserAttributeRefImpl("user-name-family", "user.name.family");
        app.addUserAttributeRef(uaRef);

        UserAttribute ua = new UserAttributeImpl("user.name.family", "User Last Name");
        app.addUserAttribute(ua);

        JetspeedServiceReference service1 = new JetspeedServiceReferenceImpl("PortletEntityAccessComponent");
        app.addJetspeedService(service1);
        JetspeedServiceReference service2 = new JetspeedServiceReferenceImpl("PortletRegistryComponent");
View Full Code Here


        // Portlet User Attributes
        Collection userAttributeSet = app.getUserAttributes();
        Iterator it = userAttributeSet.iterator();
        while (it.hasNext())
        {
            UserAttribute userAttribute = (UserAttribute) it.next();
            assertNotNull("User attribute name is null, ", userAttribute.getName());
            if (userAttribute.getName().equals("user.name.given"))
            {
                assertTrue(
                    "User attribute description: " + userAttribute.getDescription(),
                    userAttribute.getDescription().equals("User Given Name"));
            }
            if (userAttribute.getName().equals("user.name.family"))
            {
                assertTrue(
                    "User attribute description: " + userAttribute.getDescription(),
                    userAttribute.getDescription().equals("User Last Name"));
            }
            if (userAttribute.getName().equals("user.home-info.online.email"))
            {
                assertTrue(
                    "User attribute description: " + userAttribute.getDescription(),
                    userAttribute.getDescription().equals("User eMail"));
            }
        }
    }
View Full Code Here

        app.setApplicationIdentifier("App_1");

        UserAttributeRef uaRef = new UserAttributeRefImpl("user-name-family", "user.name.family");
        app.addUserAttributeRef(uaRef);

        UserAttribute ua = new UserAttributeImpl("user.name.family", "User Last Name");
        app.addUserAttribute(ua);

        JetspeedServiceReference service1 = new JetspeedServiceReferenceImpl("PortletEntityAccessComponent");
        app.addJetspeedService(service1);
        JetspeedServiceReference service2 = new JetspeedServiceReferenceImpl("PortletRegistryComponent");
View Full Code Here

        app.setApplicationIdentifier("App_1");

        UserAttributeRef uaRef = new UserAttributeRefImpl("user-name-family", "user.name.family");
        app.addUserAttributeRef(uaRef);

        UserAttribute ua = new UserAttributeImpl("user.name.family", "User Last Name");
        app.addUserAttribute(ua);

        JetspeedServiceReference service1 = new JetspeedServiceReferenceImpl("PortletEntityAccessComponent");
        app.addJetspeedService(service1);
        JetspeedServiceReference service2 = new JetspeedServiceReferenceImpl("PortletRegistryComponent");
View Full Code Here

                SecurityResources.TOPIC_USERS, SecurityResources.MESSAGE_SELECTED);
        User user = lookupUser(actionRequest, userName);
        if (user != null)
        {
            Iterator attrIter = paUserAttributes.iterator();
            UserAttribute attr;
            String value;
            while( attrIter.hasNext() )
            {
                attr = (UserAttribute)attrIter.next();
                value = actionRequest.getParameter("attr_"+attr.getName());
                if (value != null)
                {
                    user.getUserAttributes().put(attr.getName(), value);
                }
            }
        }
        if ( "true".equals(actionRequest.getPreferences().getValue("showPasswordOnUserTab", "false")))
        {
View Full Code Here

        if ((null != userAttributeRefs) && (userAttributeRefs.size() > 0))
        {
            Iterator attrIter = userAttributes.iterator();
            while (attrIter.hasNext())
            {
                UserAttribute currentAttribute = (UserAttribute) attrIter.next();
                boolean linkedAttribute = false;
                if (null != currentAttribute)
                {
                    Iterator attrRefsIter = userAttributeRefs.iterator();
                    while (attrRefsIter.hasNext())
                    {
                        UserAttributeRef currentAttributeRef = (UserAttributeRef) attrRefsIter.next();
                        if (null != currentAttributeRef)
                        {
                            if ((currentAttribute.getName()).equals(currentAttributeRef.getNameLink()))
                            {
                                if (log.isDebugEnabled())
                                    log.debug("Linking user attribute ref: [[name, " + currentAttribute.getName()
                                            + "], [linked name, " + currentAttributeRef.getName() + "]]");
                                linkedUserAttributes.add(currentAttributeRef);
                                linkedAttribute = true;
                            }
                        }
                    }
                }
                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

        if ((null != userAttributeRefs) && (userAttributeRefs.size() > 0))
        {
            Iterator attrIter = userAttributes.iterator();
            while (attrIter.hasNext())
            {
                UserAttribute currentAttribute = (UserAttribute) attrIter.next();
                boolean linkedAttribute = false;
                if (null != currentAttribute)
                {
                    Iterator attrRefsIter = userAttributeRefs.iterator();
                    while (attrRefsIter.hasNext())
                    {
                        UserAttributeRef currentAttributeRef = (UserAttributeRef) attrRefsIter.next();
                        if (null != currentAttributeRef)
                        {
                            if ((currentAttribute.getName()).equals(currentAttributeRef.getNameLink()))
                            {
                                if (log.isDebugEnabled())
                                    log.debug("Linking user attribute ref: [[name, " + currentAttribute.getName()
                                            + "], [linked name, " + currentAttributeRef.getName() + "]]");
                                linkedUserAttributes.add(currentAttributeRef);
                                linkedAttribute = true;
                            }
                        }
                    }
                }
                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

        PortletApplicationDefinitionImpl app = new PortletApplicationDefinitionImpl();
        app.setName("PA-001");
        UserAttributeRef uaRef = new UserAttributeRefImpl("user-name-family", "user.name.family");
        app.addUserAttributeRef(uaRef);

        UserAttribute ua = new UserAttributeImpl("user.name.family", "User Last Name");
        app.addUserAttribute(ua);

        JetspeedServiceReference service1 = new JetspeedServiceReferenceImpl("PortletEntityAccessComponent");
        app.addJetspeedService(service1);
        JetspeedServiceReference service2 = new JetspeedServiceReferenceImpl("PortletRegistryComponent");
View Full Code Here

        app.setApplicationIdentifier("App_1");

        UserAttributeRef uaRef = new UserAttributeRefImpl("user-name-family", "user.name.family");
        app.addUserAttributeRef(uaRef);

        UserAttribute ua = new UserAttributeImpl("user.name.family", "User Last Name");
        app.addUserAttribute(ua);

        JetspeedServiceReference service1 = new JetspeedServiceReferenceImpl("PortletEntityAccessComponent");
        app.addJetspeedService(service1);
        JetspeedServiceReference service2 = new JetspeedServiceReferenceImpl("PortletRegistryComponent");
View Full Code Here

        app.setApplicationIdentifier("App_1");

        UserAttributeRef uaRef = new UserAttributeRefImpl("user-name-family", "user.name.family");
        app.addUserAttributeRef(uaRef);

        UserAttribute ua = new UserAttributeImpl("user.name.family", "User Last Name");
        app.addUserAttribute(ua);

        JetspeedServiceReference service1 = new JetspeedServiceReferenceImpl("PortletEntityAccessComponent");
        app.addJetspeedService(service1);
        JetspeedServiceReference service2 = new JetspeedServiceReferenceImpl("PortletRegistryComponent");
View Full Code Here

TOP

Related Classes of org.apache.jetspeed.om.common.UserAttribute

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.