docs: private Set getTemplateElements(String currentTemplate) {
  
          Set templateElements = new HashSet();
  
          if ((currentTemplate != null) && (currentTemplate.length() > 0)) {
              // template found, check template-elements property
              String elements = null;
              try {
                  // read the property from the template file
                  elements = getCms().readPropertyObject(
                      currentTemplate,
                      CmsPropertyDefinition.PROPERTY_TEMPLATE_ELEMENTS,
                      false).getValue(null);
              } catch (CmsException e) {
                  if (LOG.isWarnEnabled()) {
                      LOG.warn(e.getLocalizedMessage());
                  }
              }
              if (elements != null) {
                  // elements are defined on template file, merge with available elements
                  StringTokenizer T = new StringTokenizer(elements, ",");
                  while (T.hasMoreTokens()) {
                      String currentElement = T.nextToken();
                      String niceName = null;
                      boolean mandatory = false;
                      int sepIndex = currentElement.indexOf("|");
                      if (sepIndex != -1) {
                          // nice name found for current element, extract it
                          niceName = currentElement.substring(sepIndex + 1);
                          currentElement = currentElement.substring(0, sepIndex);
                      }
                      if (currentElement.endsWith("*")) {
                          // element is mandatory
                          mandatory = true;
                          currentElement = currentElement.substring(0, currentElement.length() - 1);
                      }
  
                      CmsDialogElement element = new CmsDialogElement(currentElement, niceName, mandatory, true, false);
                      templateElements.add(element);
                  }
              }
          }
  
          return templateElements;
      }