Examples of InitParam


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

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

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

        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

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

        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

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

        d4.setDescription("Mon Filtre 1");
        DisplayName dn3 = filter.addDisplayName("en");
        dn3.setDisplayName("This is my filter 1");
        DisplayName dn4 = filter.addDisplayName("fr");
        dn4.setDisplayName("Ceci est mon filtre 1");
        InitParam ip3 = filter.addInitParam("filter init param 1");
        ip3.setParamValue("value for filter init param 1");
        InitParam ip4 = filter.addInitParam("filter init param 2");
        ip4.setParamValue("value for filter init param 2");
        filter.addLifecycle("lifecycle-1");
        filter.addLifecycle("lifecycle-2");
        filter.addLifecycle("lifecycle-3");
       
        FilterMapping mapping1 = app.addFilterMapping("filter-1");
View Full Code Here

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

        DisplayName dn4 = dnames.get(1);       
        assertEquals(dn4.getLang(), "fr");
        assertEquals(dn4.getDisplayName(), "Ceci est mon filtre 1");
        List<InitParam> iparams = filter.getInitParams();       
        assertEquals(iparams.size(), 2);       
        InitParam ip3 = iparams.get(0);
        assertEquals(ip3.getParamName(),"filter init param 1");
        assertEquals(ip3.getParamValue(), "value for filter init param 1");
        InitParam ip4 = iparams.get(1);
        assertEquals(ip4.getParamName(), "filter init param 2");
        assertEquals(ip4.getParamValue(), "value for filter init param 2");
        List<String> lcycles = filter.getLifecycles();       
        assertEquals(lcycles.size(), 3);       
        assertEquals(lcycles.get(0), "lifecycle-1");
        assertEquals(lcycles.get(1), "lifecycle-2");
        assertEquals(lcycles.get(2), "lifecycle-3");       
View Full Code Here

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

        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

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

            copyDesc.setDescription(desc.getDescription());
        }

        for (InitParam initParam : source.getInitParams())
        {
            InitParam copyInitParam = copy.addInitParam(initParam.getParamName());
            copyInitParam.setParamValue(initParam.getParamValue());
           
            for (Description desc : initParam.getDescriptions())
            {
                Description copyDesc = copyInitParam.addDescription(desc.getLang());
                copyDesc.setDescription(desc.getDescription());
            }
        }
       
        for (EventDefinitionReference eventDefRef : source.getSupportedProcessingEvents())
View Full Code Here

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

        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

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( layoutFragment.getId(), 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 - " + layoutFragment.getId() + " / " + layoutName + " count=" + columnCount + " sizes=" + sizesVal );
      }
      else if ( portletDef == null || portletDef.getInitParams().isEmpty() )
      {
        if ( ! suppressErrorLogging )
        {
          if ( layoutName == null )
            log.error( "getColumnCountAndSizes null sizes, null layoutName - " + layoutFragment.getId() );
          else if ( portletDef == null )
            log.error( "getColumnCountAndSizes null sizes, null PortletDefinition - " + layoutFragment.getId() + " / " + layoutName );
          else
            log.error( "getColumnCountAndSizes null sizes, null ParameterSet - " + layoutFragment.getId() + " / " + 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
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.