Package org.apache.jetspeed.om.portlet

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


                PortletApplication app = registry.getPortletApplication(paNodeBean.getApplicationName());
                PortletDefinition def = PortletApplicationUtils.getPortletOrClone(app, paNodeBean.getName());

                if (newName != null && newValue != null)
                {
                    InitParam param = def.addInitParam(newName);
                    param.setParamValue(newValue);

                    if (newLocale != null && newDescription != null)
                    {
                        Description desc = param.addDescription(newLocale);
                        desc.setDescription(newDescription);
                    }
                   
                    newName = null;
                    newValue = null;
View Full Code Here


       
        if (def != null)
        {
            if (type == InitParam.class)
            {
                InitParam param = def.getInitParam(name);
                description = param.getDescription(locale);
            }
            else if (type == SecurityRoleRef.class)
            {
                SecurityRoleRef securityRoleRef = def.getSecurityRoleRef(name);
                description = securityRoleRef.getDescription(locale);
View Full Code Here

    @Override
    protected InitParam load()
    {
        PortletApplication app = locator.getPortletRegistry().getPortletApplication(paNodeBean.getApplicationName());
        PortletDefinition def = PortletApplicationUtils.getPortletOrClone(app, paNodeBean.getName());
        InitParam initParam = def.getInitParam(paramName);
        return initParam;
    }
View Full Code Here

       
        // 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

                
            // 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

        PortletDefinition portlet = app.addPortlet(TEST_PORTLET);
        portlet.setPortletClass("org.apache.Portlet");
        portlet.addDescription(lang).setDescription("Portlet description.");
        portlet.addDisplayName(lang).setDisplayName("Portlet display Name.");
       
        InitParam initParam = portlet.addInitParam("testparam");
        initParam.setParamValue("test value");
        initParam.addDescription(lang).setDescription("This is a test portlet parameter");
       
        Preferences prefs = portlet.getPortletPreferences();
        Preference pref = prefs.addPreference("pref1");
        pref.addValue("1");
View Full Code Here

    /**
     * @see javax.portlet.filter.FilterConfig#getInitParameter(java.lang.String)
     */
    public String getInitParameter(String name) {
        InitParam initParam = this.filter.getInitParam(name);
        return (initParam != null ? initParam.getParamValue() : null);
    }
View Full Code Here

            {
                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

        PortletDefinition portlet = app.addPortlet("Portlet-1");
        portlet.setPortletClass("org.apache.Portlet");
        portlet.addDescription(lang).setDescription("Portlet description.");
        portlet.addDisplayName(lang).setDisplayName("Portlet display Name.");
       
        InitParam initParam = portlet.addInitParam("testparam");
        initParam.setParamValue("test value");
        initParam.addDescription(lang).setDescription("This is a test portlet parameter");

        Preferences prefs = portlet.getPortletPreferences();
        Preference pref = prefs.addPreference("preference 1");
        pref.addValue("value 1");
        pref.addValue("value 2");
View Full Code Here

        PortletDefinition portlet = app.addPortlet("Portlet 1");
        portlet.setPortletClass("org.apache.Portlet");
        portlet.addDescription(lang).setDescription("Portlet description.");
        portlet.addDisplayName(lang).setDisplayName("Portlet display Name.");
       
        InitParam initParam = portlet.addInitParam("testparam");
        initParam.setParamValue("test value");
        initParam.addDescription(lang).setDescription("This is a test portlet parameter");

        addDublinCore(portlet.getMetadata());

        Preferences prefs = portlet.getPortletPreferences();
        Preference pref = prefs.addPreference("preference 1");
View Full Code Here

TOP

Related Classes of org.apache.jetspeed.om.portlet.InitParam

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.