code: public CmsDecorationBundle createDecorationBundle(CmsObject cms, Locale locale) throws CmsException {
  
          // get configfile basename and the list of all decoration map files
          List<CmsResource> decorationMapFiles = getDecorationMapFiles(cms);
          if (LOG.isDebugEnabled()) {
              LOG.debug(
                  Messages.get().getBundle().key(
                      Messages.LOG_DECORATION_DEFINITION_MAP_FILES_2,
                      decorationMapFiles,
                      locale));
          }
  
          // create decoration maps
          List<CmsDecorationMap> decorationMaps = getDecorationMaps(cms, decorationMapFiles);
          if (LOG.isDebugEnabled()) {
              LOG.debug(
                  Messages.get().getBundle().key(Messages.LOG_DECORATION_DEFINITION_MAPS_2, decorationMaps, locale));
          }
  
          // now that we have all decoration maps we can build the decoration bundle
          // the bundele is depending on the locale, if a locale is given, only those decoration maps that contain the
          // locale (or no locale at all) must be used. If no locale is given, all decoration maps are
          // put into the decoration bundle
          return createDecorationBundle(decorationMaps, locale);
      }
docs: Creates a CmsDecorationBundle of text decoration to be used by the decorator.<p>
  
  @param cms the CmsObject
  @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
  @throws CmsException if something goes wrong