com.atlassian.jira.issue.search.handlers
Class SimpleSearchHandlerFactory

java.lang.Object
  extended by com.atlassian.jira.issue.search.handlers.SimpleSearchHandlerFactory
All Implemented Interfaces:
SearchHandlerFactory
Direct Known Subclasses:
AffectedVersionSearchHandlerFactory, AssigneeSearchHandlerFactory, CommentSearchHandlerFactory, ComponentSearchHandlerFactory, CreatedDateSearchHandlerFactory, DescriptionSearchHandlerFactory, DueDateSearchHandlerFactory, EnvironmentSearchHandlerFactory, FixForVersionSearchHandlerFactory, IssueTypeSearchHandlerFactory, LabelsSearchHandlerFactory, PrioritySearchHandlerFactory, ProjectSearchHandlerFactory, ReporterSearchHandlerFactory, ResolutionDateSearchHandlerFactory, ResolutionSearchHandlerFactory, StatusSearchHandlerFactory, SummarySearchHandlerFactory, UpdatedDateSearchHandlerFactory, WorkRatioSearchHandlerFactory

public abstract class SimpleSearchHandlerFactory
extends Object
implements SearchHandlerFactory

Creates a SearchHandler for fields that have a single IssueSearcher that in turn has a single ClauseHandler. This is the case for all the system fields.

Since:
v4.0

Constructor Summary
SimpleSearchHandlerFactory(ComponentFactory factory, ClauseInformation information, Class<? extends IssueSearcher<SearchableField>> searcherClass, ClauseQueryFactory queryFactory, ClauseValidator queryValidator, FieldClausePermissionChecker.Factory clausePermissionFactory, ClauseContextFactory clauseContextFactory, ClauseValuesGenerator clauseValuesGenerator)
          Creates a new factory.
SimpleSearchHandlerFactory(ComponentFactory factory, ClauseInformation information, Class<? extends IssueSearcher<SearchableField>> searcherClass, ClauseQueryFactory queryFactory, ClauseValidator queryValidator, FieldClausePermissionChecker.Factory clausePermissionFactory, ClauseContextFactory clauseContextFactory, ClauseValuesGenerator clauseValuesGenerator, ClauseSanitiser sanitiser)
          Creates a new factory.
 
Method Summary
 SearchHandler createHandler(SearchableField field)
          Create the SearchHandler using for the passed field.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimpleSearchHandlerFactory

public SimpleSearchHandlerFactory(ComponentFactory factory,
                                  ClauseInformation information,
                                  Class<? extends IssueSearcher<SearchableField>> searcherClass,
                                  ClauseQueryFactory queryFactory,
                                  ClauseValidator queryValidator,
                                  FieldClausePermissionChecker.Factory clausePermissionFactory,
                                  ClauseContextFactory clauseContextFactory,
                                  ClauseValuesGenerator clauseValuesGenerator)
Creates a new factory.

Parameters:
factory - the object that will be used to create the searcher.
information - the string information (clause names, index field, field id) associated with this clause handler.
searcherClass - the class of the searcher to create.
queryFactory - the query factory place in the handler.
queryValidator - the validatr to place in the handler.
clausePermissionFactory - used create the ClausePermissionHandler. We use this mainly because of a circular
clauseContextFactory - the factory to place in the handler.
clauseValuesGenerator - generates the possible values for a clause.

SimpleSearchHandlerFactory

public SimpleSearchHandlerFactory(ComponentFactory factory,
                                  ClauseInformation information,
                                  Class<? extends IssueSearcher<SearchableField>> searcherClass,
                                  ClauseQueryFactory queryFactory,
                                  ClauseValidator queryValidator,
                                  FieldClausePermissionChecker.Factory clausePermissionFactory,
                                  ClauseContextFactory clauseContextFactory,
                                  ClauseValuesGenerator clauseValuesGenerator,
                                  ClauseSanitiser sanitiser)
Creates a new factory.

Parameters:
factory - the object that will be used to create the searcher.
information - contains the string information (clause names, index field, field id) associated with this clause handler.
searcherClass - the class of the searcher to create.
queryFactory - the query factory place in the handler.
queryValidator - the validatr to place in the handler.
clausePermissionFactory - used create the ClausePermissionHandler. We use this mainly because of a circular
clauseContextFactory - the factory to place in the handler.
sanitiser - the sanitiser to place in the handler. If you want to use NoOpClauseSanitiser, use the other constructor.
Method Detail

createHandler

public final SearchHandler createHandler(SearchableField field)
Description copied from interface: SearchHandlerFactory
Create the SearchHandler using for the passed field.

Specified by:
createHandler in interface SearchHandlerFactory
Parameters:
field - the field to create the handler for.
Returns:
a new SearchHandler for the passed field. Should never return null.


Copyright © 2002-2012 Atlassian. All Rights Reserved.