code: public Map<Integer, CmsPublishItemStateSummary> computeGroupSelectionStates() {
  
          Map<Integer, CmsPublishItemStateSummary> stateMap = Maps.newHashMap();
  
          CmsPublishItemStateSummary allStates = new CmsPublishItemStateSummary();
          int i = 0;
          for (CmsPublishGroup group : m_groups) {
              CmsPublishItemStateSummary groupStates = new CmsPublishItemStateSummary();
              for (CmsPublishResource res : group.getResources()) {
                  CmsPublishItemStatus item = m_status.get(res.getId());
                  CmsPublishItemStatus.State stateToAdd;
                  if (item.isDisabled()) {
                      // a disabled item should have no influence on the select/deselect all checkboxes,
                      // just as an item which is marked to be removed
                      stateToAdd = CmsPublishItemStatus.State.remove;
                  } else {
                      stateToAdd = item.getState();
                  }
                  groupStates.addState(stateToAdd);
                  allStates.addState(stateToAdd);
  
              }
              stateMap.put(new Integer(i), groupStates);
              i += 1;
          }
          stateMap.put(new Integer(-1), allStates);
          return stateMap;
      }
docs: Collects group selection states.<p>
  
  @return the group selection states