com.atlassian.confluence.search.contentnames.lucene.mappers
Class ContentTypeCategoryMapper

java.lang.Object
  extended by com.atlassian.confluence.search.contentnames.lucene.mappers.ContentTypeCategoryMapper
All Implemented Interfaces:
CategoryMapper

public class ContentTypeCategoryMapper
extends java.lang.Object
implements CategoryMapper

Class that maps docId's to categories based on their content type.


Constructor Summary
ContentTypeCategoryMapper(org.apache.lucene.search.FieldCache.Bytes contentTypeFieldCache)
           
 
Method Summary
 Category getCategory(int docId, java.util.Set<Category> categories)
          Returns the Category that this docId belongs to.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ContentTypeCategoryMapper

public ContentTypeCategoryMapper(org.apache.lucene.search.FieldCache.Bytes contentTypeFieldCache)
Method Detail

getCategory

public Category getCategory(int docId,
                            java.util.Set<Category> categories)
Description copied from interface: CategoryMapper
Returns the Category that this docId belongs to. It must be one of ones specified in the passed in set of categories.

Specified by:
getCategory in interface CategoryMapper
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.


Copyright © 2003-2014 Atlassian. All Rights Reserved.