Package org.apache.jetspeed.om.portlet

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


    @Override
    protected LanguageBean load()
    {
        PortletApplication app = locator.getPortletRegistry().getPortletApplication(paNodeBean.getApplicationName());
        PortletDefinition def = app.getPortlet(paNodeBean.getName());
        Language language = def.getLanguage(locale);
        return new LanguageBean(language);
    }
View Full Code Here


                    PortletDefinition def = app.getPortlet(paNodeBean.getName());
                   
                    if (newTitle != null && newShortTitle != null && newKeywords != null && newLocale != null)
                    {
                        Locale locale = new Locale(newLocale);
                        Language newLanguage = def.addLanguage(locale);
                        newLanguage.setTitle(newTitle);
                        newLanguage.setShortTitle(newShortTitle);
                        newLanguage.setKeywords(newKeywords);

                        newTitle = null;
                        newShortTitle = null;
                        newKeywords = null;
                        newLocale = null;
View Full Code Here

                bundleCache = portletResourceBundleCache.get(pdName);
            }
            bundle = bundleCache.get(locale);
            if (bundle == null)
            {
                Language l = pd.getLanguage(locale);
                if (pd.getResourceBundle() == null)
                {
                    bundle = new InlinePortletResourceBundle(l.getTitle(), l.getShortTitle(), l.getKeywords());
                }
                else
                {
                    ClassLoader paCl = classLoaderMap.get(paName);
                   
                    if (paCl == null)
                    {
                        throw new UnavailableException("Portlet Application " + paName + " not available");
                    }
                    ResourceBundle loadedBundle = loadResourceBundle(l.getLocale(), pd.getResourceBundle(), paCl);
                    if (loadedBundle != null)
                    {
                        bundle = new InlinePortletResourceBundle(l.getTitle(), l.getShortTitle(), l.getKeywords(), loadedBundle);
                    }
                    else
                    {
                        bundle = new InlinePortletResourceBundle(l.getTitle(), l.getShortTitle(), l.getKeywords());
                    }
                }
                bundleCache.put(locale, bundle);
            }
        }
View Full Code Here

        return descriptorPreferences.addPreference(name);
    }      
   
    public Language getLanguage(Locale locale)
    {
        Language lang = null;
        Language fallback = null;
        Language defaultLanguage = null;
        boolean defaultLocale = locale.equals(JetspeedLocale.getDefaultLocale());
       
        for (Language l : getLanguages())
        {
            if (locale.equals(l.getLocale()))
View Full Code Here

            }
        }
       
        for (Language language : source.getLanguages())
        {
            Language copyLanguage = copy.addLanguage(language.getLocale());
            copyLanguage.setTitle(language.getTitle());
            copyLanguage.setShortTitle(language.getShortTitle());
            copyLanguage.setKeywords(language.getKeywords());
            copyLanguage.setSupportedLocale(language.isSupportedLocale());
        }
       
        for (ContainerRuntimeOption runtimeOption : source.getContainerRuntimeOptions())
        {
            ContainerRuntimeOption copyRuntimeOption = copy.addContainerRuntimeOption(runtimeOption.getName());
View Full Code Here

                    PortletDefinition def = PortletApplicationUtils.getPortletOrClone(app, paNodeBean.getName());
                   
                    if (newTitle != null && newShortTitle != null && newKeywords != null && newLocale != null)
                    {
                        Locale locale = new Locale(newLocale);
                        Language newLanguage = def.addLanguage(locale);
                        newLanguage.setTitle(newTitle);
                        newLanguage.setShortTitle(newShortTitle);
                        newLanguage.setKeywords(newKeywords);

                        newTitle = null;
                        newShortTitle = null;
                        newKeywords = null;
                        newLocale = null;
View Full Code Here

    @Override
    protected LanguageBean load()
    {
        PortletApplication app = locator.getPortletRegistry().getPortletApplication(paNodeBean.getApplicationName());
        PortletDefinition def = PortletApplicationUtils.getPortletOrClone(app, paNodeBean.getName());
        Language language = def.getLanguage(locale);
        return new LanguageBean(language);
    }
View Full Code Here

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

        Language language = portlet.addLanguage(Locale.getDefault());
        language.setTitle("Portlet 1");
        language.setShortTitle("Portlet 1");

       
        Supports supports = portlet.addSupports("html/text");
        supports.addPortletMode("EDIT");
        supports.addPortletMode("VIEW");
View Full Code Here

        // if(language != null)
        // {
        //     return language;
        // }
       
        Language language = portlet.getLanguage(locale);
       
        if (language == null)
        {
            Enumeration locales = request.getLocales();
            while (language == null && locales.hasMoreElements())
View Full Code Here

        Preferences prefs = portlet.getPortletPreferences();
        Preference pref = prefs.addPreference("preference 1");
        pref.addValue("value 1");
        pref.addValue("value 2");
       
        Language language = portlet.addLanguage(Locale.getDefault());
        language.setTitle("Portlet 1");
        language.setShortTitle("Portlet 1");

        Supports supports = portlet.addSupports("html/text");
        supports.addPortletMode(MODE_EDIT);
        supports.addPortletMode(MODE_VIEW);
        supports.addPortletMode(MODE_HELP);
View Full Code Here

TOP

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

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.