code: public CmsDecorationBundle createDecorationBundle(List<CmsDecorationMap> decorationMaps, Locale locale) {
  
          CmsDecorationBundle decorationBundle = new CmsDecorationBundle(locale);
          // sort the bundles
          Collections.sort(decorationMaps);
          // now process the decoration maps to see which of those must be added to the bundle
          Iterator<CmsDecorationMap> i = decorationMaps.iterator();
          while (i.hasNext()) {
              CmsDecorationMap decMap = i.next();
              // a decoration map must be added to the bundle if one of the following conditions match:
              // 1) the bundle has no locale
              // 2) the bundle has a locale and the locale of the map is equal or a sublocale
              // 3) the bundle has a locale and the map has no locale
              if ((locale == null)
                  || ((decMap.getLocale() == null))
                  || (locale.getDisplayLanguage().equals(decMap.getLocale().getDisplayLanguage()))) {
                  decorationBundle.putAll(decMap.getDecorationMap());
                  if (LOG.isDebugEnabled()) {
                      LOG.debug(
                          Messages.get().getBundle().key(
                              Messages.LOG_DECORATION_DEFINITION_CREATE_BUNDLE_2,
                              decMap.getName(),
                              locale));
                  }
              }
          }
          return decorationBundle;
      }
docs: Creates a CmsDecorationBundle of text decoration to be used by the decorator based on a list of decoration maps.<p>
  
  @param decorationMaps the decoration maps to build the bundle from
  @param locale the locale to build the decoration bundle for. If no locale is given, a bundle of all locales is build
  @return CmsDecorationBundle including all decoration lists that match the locale