Examples of Displayname


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

    @Override
    protected DisplayNameBean load()
    {
        PortletApplication app = locator.getPortletRegistry().getPortletApplication(paNodeBean.getApplicationName());
        PortletDefinition def = PortletApplicationUtils.getPortletOrClone(app, paNodeBean.getName());
        DisplayName displayName = def.getDisplayName(locale);
        return new DisplayNameBean(displayName);
    }
View Full Code Here

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

            clone.getPortletInfo().setTitle(StringUtils.defaultString(clonePortletInfo.getPortletTitle()));
            clone.getPortletInfo().setShortTitle(StringUtils.defaultString(clonePortletInfo.getPortletShortTitle()));
            clone.getPortletInfo().setKeywords(StringUtils.defaultString(clonePortletInfo.getPortletKeywords()));
           
            Locale defaultLocale = Locale.getDefault();
            DisplayName defaultDisplayName = null;
           
            for (DisplayName displayName : clone.getDisplayNames())
            {
                if (displayName.getLocale().equals(defaultLocale))
                {
                    defaultDisplayName = displayName;
                    break;
                }
            }
           
            if (defaultDisplayName == null)
            {
                defaultDisplayName = clone.addDisplayName(defaultLocale.toString());
            }
           
            defaultDisplayName.setDisplayName(StringUtils.defaultString(clonePortletInfo.getPortletDisplayName()));
           
            for (Map.Entry<String, List<String>> entry : clonePortletInfo.getPortletPreferences().entrySet())
            {
                String prefName = entry.getKey();
                List<String> prefValues = entry.getValue();
View Full Code Here

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

                    PortletApplication app = registry.getPortletApplication(paNodeBean.getApplicationName());
                    PortletDefinition def = app.getPortlet(paNodeBean.getName());
                   
                    for (Iterator<DisplayName> it = def.getDisplayNames().iterator(); it.hasNext(); )
                    {
                        DisplayName displayName = it.next();
                       
                        for (IModel<DisplayNameBean> displayNameBeanModel : fields)
                        {
                            if (displayNameBeanModel.getObject().getLocale().equals(displayName.getLocale()))
                            {
                                it.remove();
                                break;
                            }
                        }
                    }
                   
                    registry.savePortletDefinition(def);
                    StringResourceModel resModel = new StringResourceModel("pam.details.action.status.portlet.saveOK", this, null, new Object [] { paNodeBean.getName() } );
                    feed.info(resModel.getString());
                }
                catch (FailedToStorePortletDefinitionException e)
                {
                    logger.error("Failed to save portlet definition.", e);
                    StringResourceModel resModel = new StringResourceModel("pam.details.action.status.portlet.saveFailure", this, null, new Object [] { paNodeBean.getName(), e.getMessage() } );
                    feed.info(resModel.getString());
                }
            }

            @Override
            protected Button saveButton(String componentId)
            {
                return new Button(componentId)
                {

                    @Override
                    public void onSubmit()
                    {
                        PortletRegistry registry = ((AbstractAdminWebApplication) getApplication()).getServiceLocator().getPortletRegistry();
                        PortletApplication app = registry.getPortletApplication(paNodeBean.getApplicationName());
                        PortletDefinition def = app.getPortlet(paNodeBean.getName());
                       
                        if (newLocale != null && newDisplayName != null)
                        {
                            Locale locale = new Locale(newLocale);
                            DisplayName targetDisplayName = null;
                           
                            for (DisplayName displayName : def.getDisplayNames())
                            {
                                if (displayName.getLocale().equals(locale))
                                {
                                    targetDisplayName = displayName;
                                    break;
                                }
                            }
                           
                            if (targetDisplayName == null)
                            {
                                targetDisplayName = def.addDisplayName(newLocale);
                            }
                           
                            targetDisplayName.setDisplayName(newDisplayName);
                           
                            newLocale = null;
                            newDisplayName = null;
                        }
View Full Code Here

Examples of org.apache.pluto.container.om.portlet.DisplayName

                SecurityConstraint target = app.addSecurityConstraint(src.userDataConstraint.transportGuarantee);
                if (src.displayName != null)
                {
                    for (DisplayNameType d : src.displayName)
                    {
                        DisplayName dname = target.addDisplayName(d.lang);
                        dname.setDisplayName(d.value);
                    }
                }
                if (src.portletCollection != null && src.portletCollection.portletName != null)
                {
                    for (String pname : src.portletCollection.portletName)
View Full Code Here

Examples of org.apache.pluto.container.om.portlet.DisplayName

        }
        if (src.displayName != null)
        {
            for (DisplayNameType d : src.displayName)
            {
                DisplayName dname = target.addDisplayName(d.lang);
                dname.setDisplayName(d.value);
            }
        }
        target.setPortletClass(src.portletClass);
        if (src.expirationCache != null)
        {
View Full Code Here

Examples of org.apache.pluto.container.om.portlet.DisplayName

                SecurityConstraint target = app.addSecurityConstraint(src.userDataConstraint.transportGuarantee);
                if (src.displayName != null)
                {
                    for (DisplayNameType d : src.displayName)
                    {
                        DisplayName dname = target.addDisplayName(d.lang);
                        dname.setDisplayName(d.value);
                    }
                }
                if (src.portletCollection != null && src.portletCollection.portletName != null)
                {
                    for (String pname : src.portletCollection.portletName)
View Full Code Here

Examples of org.apache.pluto.container.om.portlet.DisplayName

        }
        if (src.displayName != null)
        {
            for (DisplayNameType d : src.displayName)
            {
                DisplayName dname = target.addDisplayName(d.lang);
                dname.setDisplayName(d.value);
            }
        }
        target.setPortletClass(src.portletClass);
        if (src.expirationCache != null)
        {
View Full Code Here

Examples of org.apache.pluto.om.common.DisplayName

     * @return Localized text string of the display name or <code>null</code>
     *         if no DisplayName exists for this locale
     */
    public String getDisplayNameText( Locale locale )
    {
        DisplayName dn = getDisplayName(locale);
        if (dn != null)
        {
            return dn.getDisplayName();
        }
        return null;
    }
View Full Code Here

Examples of org.apache.pluto.om.common.DisplayName

   
    public DisplayName get(Locale locale)
    {       
        Iterator iterator = this.iterator();
        while (iterator.hasNext()) {
            DisplayName displayName = (DisplayName)iterator.next();
            if (displayName.getLocale().equals(locale)) {
                return displayName;
            }
        }
        return null;
    }
View Full Code Here

Examples of org.apache.pluto.om.common.DisplayName

        if(desc != null && desc.getDescription() != null && desc.getDescription().length() > 0)
        {
            entry.setDescription(desc.getDescription());
        }
       
        DisplayName title = portletDefinition.getDisplayName(Jetspeed.getDefaultLocale());
        if (title != null && title.getDisplayName() != null && title.getDisplayName().length() > 0)
        {
            entry.setTitle(title.getDisplayName());
        }
        else
        {
            Language lang = portletDefinition.getLanguageSet().get(Jetspeed.getDefaultLocale());
            if (lang != null)
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.