Package org.rhq.enterprise.gui.util

Examples of org.rhq.enterprise.gui.util.CustomEnglishPluralizer


        return selectItem;
    }

    private List<SelectItem> convertToSelectItems(List<ResourceType> resourceTypes, boolean pluralize) {
        List<SelectItem> selectItems = new ArrayList<SelectItem>();
        Pluralizer customPluralizer = new CustomEnglishPluralizer();
        Set<String> dupResourceTypeNames = getDuplicateResourceTypeNames(resourceTypes);
        for (ResourceType resourceType : resourceTypes) {
            String resourceTypeName = resourceType.getName();
            String pluralizedName = resourceTypeName;
            try {
                if (pluralize)
                    pluralizedName = customPluralizer.pluralize(resourceTypeName);
            }
            catch (StringIndexOutOfBoundsException oobe) { // Work around a bug in the pluralizer, BZ 594417
                // Just ignore it and take the plain resource type name
            }
            String label = NBSP + " - "
View Full Code Here

TOP

Related Classes of org.rhq.enterprise.gui.util.CustomEnglishPluralizer

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.