code: public void addResourceToCategory(CmsObject cms, String resourceName, String categoryPath) throws CmsException {
  
          CmsCategory category = readCategory(cms, categoryPath, resourceName);
          addResourceToCategory(cms, resourceName, category);
      }
docs: Adds a resource identified by the given resource name to the category
  identified by the given category path.<p>
  
  Only the most global category matching the given category path for the
  given resource will be affected.<p>
  
  The resource has to be locked.<p>
  
  @param cms the current cms context
  @param resourceName the site relative path to the resource to add
  @param categoryPath the path of the category to add the resource to
  
  @throws CmsException if something goes wrong