code: public Map<GroupAge, List<RESOURCE>> partitionPublishResourcesByAge(
          List<RESOURCE> resources,
          Map<Long, Integer> days) {
  
          List<RESOURCE> youngRes = new ArrayList<RESOURCE>();
          List<RESOURCE> mediumRes = new ArrayList<RESOURCE>();
          List<RESOURCE> oldRes = new ArrayList<RESOURCE>();
          for (RESOURCE res : resources) {
              int day = days.get(new Long(getDateLastModified(res))).intValue();
              List<RESOURCE> listToAddTo = null;
              if (day < 7) {
                  listToAddTo = youngRes;
                  LOG.debug("Classifying publish resource " + getRootPath(res) + " as young");
              } else if (day < 28) {
                  listToAddTo = mediumRes;
                  LOG.debug("Classifying publish resource " + getRootPath(res) + " as medium-aged");
              } else {
                  listToAddTo = oldRes;
                  LOG.debug("Classifying publish resource " + getRootPath(res) + " as old");
              }
              listToAddTo.add(res);
          }
          Map<GroupAge, List<RESOURCE>> result = new HashMap<GroupAge, List<RESOURCE>>();
          result.put(GroupAge.young, youngRes);
          result.put(GroupAge.medium, mediumRes);
          result.put(GroupAge.old, oldRes);
          return result;
      }
docs: Partitions a list of resources by their age in (local) days since the last modification.<p>
  
  @param resources the list of resources to partition
  @param days the map from modification dates to the number of (local) days since the modification
  
  @return a map from age enum values to the list of resources which fall into the corresponding age group