docs: public static CheckBoxUpdate updateCheckbox(CmsPublishItemStateSummary states) {
  
          CheckBoxUpdate result = new CheckBoxUpdate();
          boolean hasPublish = states.getPublishCount() > 0;
          boolean hasNormal = states.getNormalCount() > 0;
          String actionSelectAll = Messages.get().key(Messages.GUI_CHECKBOX_SELECT_ALL_0);
          String textDeselectAll = Messages.get().key(Messages.GUI_CHECKBOX_DESELECT_ALL_0);
          String some = Messages.get().key(
              Messages.GUI_CHECKBOX_SOME_2,
              "" + states.getPublishCount(),
              "" + (states.getPublishCount() + states.getNormalCount()));
          String all = Messages.get().key(Messages.GUI_CHECKBOX_ALL_0);
          String none = Messages.get().key(Messages.GUI_CHECKBOX_NONE_0);
  
          if (hasNormal && hasPublish) {
              result.setAction(actionSelectAll);
              result.setText(some);
              result.setState(CmsTriStateCheckBox.State.middle);
          } else if (hasNormal) {
              result.setAction(actionSelectAll);
              result.setText(none);
              result.setState(CmsTriStateCheckBox.State.off);
          } else if (hasPublish) {
              result.setAction(textDeselectAll);
              result.setText(all);
              result.setState(CmsTriStateCheckBox.State.on);
          } else {
              result.setText(none);
              result.setAction(actionSelectAll);
              result.setState(CmsTriStateCheckBox.State.off);
          }
          return result;
      }