com.atlassian.confluence.search.contentnames.lucene.mappers
Interface CategoryMapper

All Known Implementing Classes:
ContentTypeCategoryMapper

public interface CategoryMapper

Class that maps a lucene document id to a particular Category.


Method Summary
 Category getCategory(int docId, Set<Category> categories)
          Returns the Category that this docId belongs to.
 

Method Detail

getCategory

Category getCategory(int docId,
                     Set<Category> categories)
Returns the Category that this docId belongs to. It must be one of ones specified in the passed in set of categories.

Parameters:
docId - the id to find a category for
categories - confines category mapping to those categories contained in this set
Returns:
the category for this docId. If a category is found that does not belong in the specified categories, or no category was found for this docId, then null is returned.
Throws:
IllegalArgumentException - if the docId is not zero or greater.


Copyright © 2003-2012 Atlassian. All Rights Reserved.