docs: public String buildPublishOptions() {
  
          // show only for direct publish actions
          StringBuffer result = new StringBuffer(128);
          boolean showOptionSiblings = (isMultiOperation()
              || isOperationOnFolder()
              || (isDirectPublish() && hasSiblings() && hasCorrectLockstate()));
          boolean showOptionSubresources = (isMultiOperation() || isOperationOnFolder());
  
          result.append("<p>");
          if (showOptionSiblings) {
              // show only for multi resource operation or if resource has siblings and correct lock state
              if (!isMultiOperation() && !isOperationOnFolder()) {
                  result.append(key(Messages.GUI_DELETE_WARNING_SIBLINGS_0));
                  result.append("<br>");
              }
              result.append("<input type='checkbox' name='");
              result.append(PARAM_PUBLISHSIBLINGS);
              result.append("' value='true' onclick=\"reloadReport();\"");
              if (Boolean.valueOf(getParamPublishsiblings()).booleanValue()) {
                  result.append(" checked='checked'");
              }
              result.append(">&nbsp;");
              result.append(key(Messages.GUI_PUBLISH_ALLSIBLINGS_0));
              result.append("<br>\n");
          } else {
              result.append("<input type='hidden' name='");
              result.append(PARAM_PUBLISHSIBLINGS);
              result.append("' value='");
              result.append(Boolean.valueOf(getParamPublishsiblings()));
              result.append("'");
              if (Boolean.valueOf(getParamPublishsiblings()).booleanValue()) {
                  result.append(" checked='checked'");
              }
              result.append(">\n");
          }
          if (showOptionSubresources) {
              // at least one folder is selected, show "publish subresources" checkbox
              result.append("<input type='checkbox' name='");
              result.append(PARAM_SUBRESOURCES);
              result.append("' value='true' onclick=\"reloadReport();\"");
              if (Boolean.valueOf(getParamSubresources()).booleanValue()) {
                  result.append(" checked='checked'");
              }
              result.append(">&nbsp;");
              if (isMultiOperation()) {
                  result.append(key(Messages.GUI_PUBLISH_MULTI_SUBRESOURCES_0));
              } else {
                  result.append(key(Messages.GUI_PUBLISH_SUBRESOURCES_0));
              }
              result.append("<br>\n");
          } else {
              result.append("<input type='hidden' name='");
              result.append(PARAM_SUBRESOURCES);
              result.append("' value='");
              result.append(Boolean.valueOf(getParamSubresources()));
              result.append("'");
              if (Boolean.valueOf(getParamSubresources()).booleanValue()) {
                  result.append(" checked='checked'");
              }
              result.append(">\n");
          }
          // code for the 'publish related resources' button
          boolean disabled = false;
          if ((OpenCms.getWorkplaceManager().getDefaultUserSettings().getPublishRelatedResources() == CmsDefaultUserSettings.PUBLISH_RELATED_RESOURCES_MODE_FORCE)
              && !OpenCms.getRoleManager().hasRole(getCms(), CmsRole.VFS_MANAGER)) {
              disabled = true;
          }
          result.append("<input type='checkbox' name='");
          result.append(PARAM_RELATEDRESOURCES);
          result.append("' value='true' onclick=\"reloadReport();\"");
          if (Boolean.valueOf(getParamRelatedresources()).booleanValue()) {
              result.append(" checked='checked'");
          }
          if (disabled) {
              result.append(" disabled='disabled'");
          }
          result.append(">&nbsp;");
          result.append(key(Messages.GUI_PUBLISH_RELATED_RESOURCES_0));
          result.append("<br>\n");
          result.append("</p>\n");
          return result.toString();
      }