Examples of InitParam


Examples of org.apache.jetspeed.om.portlet.InitParam

                DisplayName jdn = jf.addDisplayName(dn.getLang());
                jdn.setDisplayName(dn.getDisplayName());
            }
            for (org.apache.pluto.container.om.portlet.InitParam ip : f.getInitParams())
            {
                InitParam jip = jf.addInitParam(ip.getParamName());
                jip.setParamValue(ip.getParamValue());
                for (org.apache.pluto.container.om.portlet.Description desc : ip.getDescriptions())
                {
                    Description jdesc = jip.addDescription(desc.getLang());
                    jdesc.setDescription(desc.getDescription());
                }                                       
            }
            for (String lc : f.getLifecycles())
            {
View Full Code Here

Examples of org.apache.jetspeed.om.portlet.InitParam

            DisplayName jdn = jpd.addDisplayName(dn.getLang());
            jdn.setDisplayName(dn.getDisplayName());
        }
        for (org.apache.pluto.container.om.portlet.InitParam ip : pd.getInitParams())
        {
            InitParam jip = jpd.addInitParam(ip.getParamName());
            jip.setParamValue(ip.getParamValue());
            for (org.apache.pluto.container.om.portlet.Description desc : ip.getDescriptions())
            {
                Description jdesc = jip.addDescription(desc.getLang());
                jdesc.setDescription(desc.getDescription());
            }                                       
        }
        for (org.apache.pluto.container.om.portlet.SecurityRoleRef srr : pd.getSecurityRoleRefs())
        {
View Full Code Here

Examples of org.apache.jetspeed.om.portlet.InitParam

        PortletRegistry portletRegistry;
        Mock portletDefMock;
        PortletDefinition portletDef;

        Mock portletSizesParamMock;
        InitParam portletSizesParam;
       
        portletRegistryMock = new Mock(PortletRegistry.class);
        portletRegistry = (PortletRegistry) portletRegistryMock.proxy();
       
        portletDefMock = new Mock(PortletDefinition.class);
View Full Code Here

Examples of org.apache.jetspeed.om.portlet.InitParam

       
        // SECURITY filtering
        String uniqueName = pa.getName() + "::" + portlet.getPortletName();
        if (securityAccessController.checkPortletAccess(portlet, JetspeedActions.MASK_VIEW))
        {
            InitParam param = portlet.getInitParam(PORTLET_ICON);
            String image;
            if (param != null)
            {               
                //String relativeImagePath = param.getValue();
                //String context = muta.getWebApplicationDefinition().getContextRoot();
                // Have to use a supported icon in jetspeed, otherwise image can be out of skew
                String  imagePath = param.getParamValue();
                if (imagePath == null)
                {
                    image = DEFAULT_IMAGES[rand.nextInt(DEFAULT_IMAGES.length)];
                }
                else
                {
                    if (-1 == imagePath.indexOf("/"))
                        image = "images/portlets/" + param.getParamValue();
                    else
                        image = param.getParamValue();
                }
            }
            else
            {
                image = DEFAULT_IMAGES[rand.nextInt(DEFAULT_IMAGES.length)];
View Full Code Here

Examples of org.apache.jetspeed.om.portlet.InitParam

        if (StringUtils.isBlank(sizes))
        {
            if (portletRegistry != null)
            {
                PortletDefinition layoutPortletDef = portletRegistry.getPortletDefinitionByUniqueName(layoutFragment.getName(), true);
                InitParam initParam = layoutPortletDef.getInitParam("sizes");
               
                if (initParam != null)
                {
                    sizes = initParam.getParamValue();
                }
                else
                {
                    initParam = layoutPortletDef.getInitParam("columns");
                   
                    if (initParam != null)
                    {
                        return Integer.parseInt(initParam.getParamValue());
                    }
                }
            }
        }
       
View Full Code Here

Examples of org.apache.jetspeed.om.portlet.InitParam

                
            // SECURITY filtering
            String uniqueName = pa.getName() + "::" + portlet.getPortletName();
            if (securityAccessController.checkPortletAccess(portlet, JetspeedActions.MASK_VIEW))
            {
                InitParam param = portlet.getInitParam(PORTLET_ICON);
                String image;
                if (param != null)
                {
                    //String relativeImagePath = param.getValue();
                    //String context = muta.getWebApplicationDefinition().getContextRoot();
                    // Have to use a supported icon in jetspeed, otherwise image can be out of skew
                    image = "images/portlets/" + param.getParamValue();
                }
                else
                {                                       
                    image = "images/portlets/applications-internet.png";
                }
View Full Code Here

Examples of org.apache.jetspeed.om.portlet.InitParam

                {
                    // logic below is copied from org.apache.jetspeed.portlets.MultiColumnPortlet
                    portletDef = registry.getPortletDefinitionByUniqueName( layoutName, true );
                    if ( portletDef != null )
                    {
                        InitParam sizesParam = portletDef.getInitParam( "sizes" );
                        sizesVal = ( sizesParam == null ) ? null : sizesParam.getParamValue();
                    }
                }
            }
            if ( sizesVal != null && sizesVal.length() > 0 )
            {
                if ( fragSizes != null )
                {
                    fragSizes.put( getId( layoutFragment ), sizesVal );
                }
                   
                int sepPos = -1, startPos = 0, sizesLen = sizesVal.length();
                columnCount = 0;
                do
                {
                    sepPos = sizesVal.indexOf( ',', startPos );
                    if ( sepPos != -1 )
                    {
                        if ( sepPos > startPos )
                        {
                            columnCount++;
                        }
                        startPos = sepPos +1;
                    }
                    else if ( startPos < sizesLen )
                    {
                        columnCount++;
                    }
                }
                while ( startPos < sizesLen && sepPos != -1 );
               
                if ( ! suppressErrorLogging && columnCount <= 0 )
                {
                    log.error( "getColumnCountAndSizes invalid columnCount - " + getId( layoutFragment ) + " / " + layoutName + " count=" + columnCount + " sizes=" + sizesVal );
                }
            }
            else if ( portletDef == null || portletDef.getInitParams().isEmpty() )
            {
                if ( ! suppressErrorLogging )
                {
                    if ( layoutName == null )
                    {
                        log.error( "getColumnCountAndSizes null sizes, null layoutName - " + getId( layoutFragment ) );
                    }
                    else if ( portletDef == null )
                    {
                        log.error( "getColumnCountAndSizes null sizes, null PortletDefinition - " + getId( layoutFragment ) + " / " + layoutName );
                    }
                    else
                    {
                        log.error( "getColumnCountAndSizes null sizes, null ParameterSet - " + getId( layoutFragment ) + " / " + layoutName );
                    }
                }
            }
            else
            {
                InitParam colsParam = portletDef.getInitParam( "columns" );
                String colsParamVal = ( colsParam == null ) ? null : colsParam.getParamValue();
                if ( colsParamVal != null && colsParamVal.length() > 0 )
                {
                    try
                    {
                        columnCount = Integer.parseInt( colsParamVal );
View Full Code Here

Examples of org.apache.jetspeed.om.portlet.InitParam

        PortletRegistry portletRegistry;
        Mock portletDefMock;
        PortletDefinition portletDef;

        Mock portletSizesParamMock;
        InitParam portletSizesParam;
       
        portletRegistryMock = new Mock(PortletRegistry.class);
        portletRegistry = (PortletRegistry) portletRegistryMock.proxy();
       
        portletDefMock = new Mock(PortletDefinition.class);
View Full Code Here

Examples of org.apache.jetspeed.om.portlet.InitParam

            {
                PortletDefinition portletDef = registry.getPortletDefinitionByUniqueName( portletName, true );
               
                if ( portletDef != null && portletIcons != null )
                {
                    InitParam iconParam = portletDef.getInitParam("portlet-icon");
                    String iconParamVal = ( iconParam == null ) ? null : iconParam.getParamValue();
                    if ( iconParamVal != null && iconParamVal.length() > 0 )
                    {
                        portletIcons.put( frag.getId(), iconParamVal );
                    }
                }
View Full Code Here

Examples of org.apache.jetspeed.om.portlet.InitParam

        String portletIcon = null;
        PortletWindow window = context.getPortletWindow(windowId);
       
        if (window != null && window.getPortletDefinition() != null)
        {
            InitParam portletIconInitParam = window.getPortletDefinition().getInitParam("portlet-icon");
           
            if (portletIconInitParam != null)
            {
                portletIcon = portletIconInitParam.getParamValue();
            }
        }
       
        return (portletIcon != null ? portletIcon : defaultPortletIcon);
    }
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.