Package org.apache.pluto.om.common

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


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


                preference.getName(), list);

        Iterator descItr = newPref.getDescriptions();
        while (descItr.hasNext())
        {
            Description desc = (Description) descItr.next();
            newPref.addDescription(desc.getLocale(), desc.getDescription());
        }

    }
View Full Code Here

    // DescriptionSet implemenation.
    public Description get(Locale locale)
    {       
        Iterator iterator = this.iterator();
        while (iterator.hasNext()) {
            Description desc = (Description)iterator.next();
            if (desc.getLocale().equals(locale)) {
                return desc;
            }
        }
        return null;
    }
View Full Code Here

       
        PortletEntry entry = (PortletEntry) Registry.createEntry(Registry.PORTLET);
        entry.setParent(JSR168_PORTLET);
        entry.setType(JS1_REFERENCE_TYPE);
       
        Description desc = portletDefinition.getDescription(Jetspeed.getDefaultLocale());
        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)
            {
                String tit = lang.getShortTitle();
                if(tit != null && tit.length() > 0)
                {
                    entry.setTitle(tit);
                    if (desc == null || desc.getDescription() == null || desc.getDescription().length() == 0)
                    {
                        String descTitle = lang.getTitle();
                        if (descTitle != null && descTitle.length() > 0)
                        {
                            entry.setDescription(descTitle);
View Full Code Here

    // DescriptionSet implemenation.
    public Description get(Locale locale)
    {       
        Iterator iterator = this.iterator();
        while (iterator.hasNext()) {
            Description desc = (Description)iterator.next();
            if (desc.getLocale().equals(locale)) {
                return desc;
            }
        }
        return null;
    }
View Full Code Here

            addTextElement(parent, "display-name", displayName.getDisplayName());
        }
    }
   
    private void addDescriptions(Element parent, DescriptionSet descriptions) {
        Description description = descriptions.get(Locale.getDefault());
        if (description != null) {
            addTextElement(parent, "description", description.getDescription());
        }
    }
View Full Code Here

                Parameter parameter = (Parameter)iter.next();
                Document doc = parent.getOwnerDocument();
                Element paramE = doc.createElement(paramElementName);
                addTextElement(paramE, "param-name", parameter.getName());
                addTextElement(paramE, "param-value", parameter.getValue());
                Description paramDescription = parameter.getDescription(Locale.getDefault());
                if (paramDescription != null) {
                    addTextElement(paramE, "description", paramDescription.getDescription());
                }           
                parent.appendChild(paramE);
            }
        }       
    }
View Full Code Here

           
            //Handle descriptions
            Iterator descIter = pd.getDescriptionSet().iterator();
            while (descIter.hasNext())
            {
                Description desc = (Description) descIter.next();
                fieldMap.put(ParsedObject.FIELDNAME_DESCRIPTION, desc.getDescription());
            }
           
            //Handle keywords and titles
            Iterator displayNameIter = pd.getDisplayNameSet().iterator();
            while (displayNameIter.hasNext())
View Full Code Here

     * @deprecated
     * @return
     */
    public String getDescription()
    {
        Description desc = getDescription(JetspeedLocale.getDefaultLocale());
        if (desc != null)
        {
            return desc.getDescription();
        }
        return null;
    }
View Full Code Here

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

TOP

Related Classes of org.apache.pluto.om.common.Description

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.