Package org.apache.pluto.om.common

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


                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


            throw new IllegalArgumentException("The Locale argument cannot be null");
        }

        // TODO: This may cause concurrent modification exceptions
        Iterator itr = iterator();
        Description fallBack = null;
        while (itr.hasNext())
        {
            Description desc = (Description) itr.next();
            if (desc.getLocale().equals(arg0))
            {
                return desc;
            }
            // set fall back if we have a Locale that only has
            // language set.
            else if (desc.getLocale().getLanguage().equals(arg0.getLanguage()))
            {
                fallBack = desc;
            }
            else if (fallBack == null && desc.getLocale().equals(JetspeedLocale.getDefaultLocale()))
            {
                fallBack = desc;
            }
        }
        return fallBack;
View Full Code Here

     * @return
     */
    public String getDescription()
    {

        Description desc = getDescription(JetspeedLocale.getDefaultLocale());

        if (desc != null)
        {
            return desc.getDescription();
        }

        return null;
    }
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

            throw new IllegalArgumentException("The Locale argument cannot be null");
        }

        // TODO: This may cause concurrent modification exceptions
        Iterator itr = iterator();
        Description fallBack = null;
        while (itr.hasNext())
        {
            Description desc = (Description) itr.next();
            if (desc.getLocale().equals(arg0))
            {
                return desc;
            }
            // set fall back if we have a Locale that only has
            // language set.
            else if (desc.getLocale().getLanguage().equals(arg0.getLanguage()))
            {
                fallBack = desc;
            }
            else if (fallBack == null && desc.getLocale().equals(JetspeedLocale.getDefaultLocale()))
            {
                fallBack = desc;
            }
        }
        return fallBack;
View Full Code Here

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

                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

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

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

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.