Examples of LayoutPortlet


Examples of org.jasig.portal.rest.layout.LayoutPortlet

           
            NodeList portletNodes = document.getElementsByTagName("channel");
            for (int i = 0; i < portletNodes.getLength(); i++) {
                try {
                   
                    LayoutPortlet portlet = new LayoutPortlet();
                    NamedNodeMap attributes = portletNodes.item(i).getAttributes();
                    portlet.setTitle(attributes.getNamedItem("title").getNodeValue());
                    portlet.setDescription(attributes.getNamedItem("description").getNodeValue());
                    portlet.setNodeId(attributes.getNamedItem("ID").getNodeValue());
                   
                    IPortletDefinition def = portletDao.getPortletDefinitionByFname(attributes.getNamedItem("fname").getNodeValue());
                    IPortletDefinitionParameter iconParam = def.getParameter("iconUrl");
                    if (iconParam != null) {
                        portlet.setIconUrl(iconParam.getValue());                       
                    }
                   
                    // get the maximized URL for this portlet
                    final IPortalUrlBuilder portalUrlBuilder = urlProvider.getPortalUrlBuilderByLayoutNode(request, attributes.getNamedItem("ID").getNodeValue(), UrlType.RENDER);
                    final IPortletWindowId targetPortletWindowId = portalUrlBuilder.getTargetPortletWindowId();
                    if (targetPortletWindowId != null) {
                        final IPortletUrlBuilder portletUrlBuilder = portalUrlBuilder.getPortletUrlBuilder(targetPortletWindowId);
                        portletUrlBuilder.setWindowState(WindowState.MAXIMIZED);
                    }
                    portlet.setUrl(portalUrlBuilder.getUrlString());
                    portlets.add(portlet);

                } catch (Exception e) {
                    log.warn("Exception construction JSON representation of mobile portlet", e);
                }
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.