/**
   * Process the blog entries
   *
   * @param httpServletRequest Request
   * @param httpServletResponse Response
   * @param blog {@link Blog} instance
   * @param context Context
   * @param entries Blog entries retrieved for the particular request
   * @return Modified set of blog entries
   * @throws PluginException If there is an error processing the blog entries
   */
  public Entry[] process(
      HttpServletRequest httpServletRequest,
      HttpServletResponse httpServletResponse,
      Blog blog,
      Map context,
      Entry[] entries)
      throws PluginException {
    Map entriesPerCategory = new HashMap();

    try {
      Category[] categories = (Category[]) context.get(BlojsomConstants.BLOJSOM_ALL_CATEGORIES);
      if (categories != null && categories.length > 0) {
        for (int i = 0; i < categories.length; i++) {
          Category category = categories[i];
          entriesPerCategory.put(
              category.getId(), _fetcher.countEntriesForCategory(blog, category));
        }
      }
    } catch (FetcherException e) {
      if (_logger.isErrorEnabled()) {
        _logger.error(e);
      }
    }

    context.put(PLUGIN_CONTEXT_ENTRIES_PER_CATEGORY, entriesPerCategory);

    return entries;
  }