Search in sources :

Example 6 with UserLayoutChannelDescription

use of org.apereo.portal.layout.node.UserLayoutChannelDescription in project uPortal by Jasig.

the class FavoritesUtilsTest method setUp.

@Override
public void setUp() throws Exception {
    UserLayoutChannelDescription node1 = new UserLayoutChannelDescription();
    node1.setFunctionalName("cache-manager");
    node1.setId("n18");
    node1.setName("Cache Manager");
    node1.setPrecedence(0.0);
    node1.setMoveAllowed(true);
    node1.setUnremovable(false);
    node1.setDeleteAllowed(true);
    node1.setImmutable(false);
    node1.setEditAllowed(true);
    UserLayoutChannelDescription node2 = new UserLayoutChannelDescription();
    node2.setFunctionalName("permissions-administration");
    node2.setId("n28");
    node2.setName("Permissions Administration");
    node2.setPrecedence(0.0);
    node2.setMoveAllowed(true);
    node2.setUnremovable(false);
    node2.setDeleteAllowed(true);
    node2.setImmutable(false);
    node2.setEditAllowed(true);
    UserLayoutChannelDescription node3 = new UserLayoutChannelDescription();
    node3.setFunctionalName("user-administration");
    node3.setId("n33");
    node3.setName("User Administration");
    node3.setPrecedence(0.0);
    node3.setMoveAllowed(true);
    node3.setUnremovable(false);
    node3.setDeleteAllowed(true);
    node3.setImmutable(false);
    node3.setEditAllowed(true);
    favArray.add(node1);
    favArray.add(node2);
    favArray.add(node3);
    // Add the first node from favArray to favArrayWithDuplicates which creates the duplicate
    // 'favorite' object in this Arraylist
    favArrayWithDuplicate.add(favArray.get(0));
    for (int i = 0; i < favArray.size(); i++) {
        favArrayWithDuplicate.add(favArray.get(i));
    }
}
Also used : UserLayoutChannelDescription(org.apereo.portal.layout.node.UserLayoutChannelDescription) IUserLayoutChannelDescription(org.apereo.portal.layout.node.IUserLayoutChannelDescription)

Aggregations

UserLayoutChannelDescription (org.apereo.portal.layout.node.UserLayoutChannelDescription)6 IUserLayoutChannelDescription (org.apereo.portal.layout.node.IUserLayoutChannelDescription)5 IUserLayoutNodeDescription (org.apereo.portal.layout.node.IUserLayoutNodeDescription)4 IPortletDefinition (org.apereo.portal.portlet.om.IPortletDefinition)4 Locale (java.util.Locale)3 PortalException (org.apereo.portal.PortalException)3 UserPreferencesManager (org.apereo.portal.UserPreferencesManager)3 IUserLayoutManager (org.apereo.portal.layout.IUserLayoutManager)3 RequestMapping (org.springframework.web.bind.annotation.RequestMapping)3 ModelAndView (org.springframework.web.servlet.ModelAndView)3 HashMap (java.util.HashMap)2 IUserInstance (org.apereo.portal.user.IUserInstance)2 IPortletDefinitionParameter (org.apereo.portal.portlet.om.IPortletDefinitionParameter)1 IPortletWindow (org.apereo.portal.portlet.om.IPortletWindow)1 IAuthorizationPrincipal (org.apereo.portal.security.IAuthorizationPrincipal)1 IPerson (org.apereo.portal.security.IPerson)1