com.atlassian.jira.mock.issue.search.searchers.information
Class MockSearcherInformation<T extends SearchableField>

java.lang.Object
  extended by com.atlassian.jira.mock.issue.search.searchers.information.MockSearcherInformation<T>
All Implemented Interfaces:
SearcherInformation<T>

public class MockSearcherInformation<T extends SearchableField>
extends Object
implements SearcherInformation<T>

Simple mock implementation of SearcherInformation.

Since:
v4.0

Constructor Summary
MockSearcherInformation(String name)
           
MockSearcherInformation(String id, String nameKey, String name, T field, List<FieldIndexer> indexers, SearcherGroupType searcherGroup)
           
 
Method Summary
 T getField()
           
 String getId()
          The unique id of the searcher.
 String getNameKey()
          The i18n key that is used to lookup the searcher's name when it is displayed.
 List<FieldIndexer> getRelatedIndexers()
          Returns a list of FieldIndexer objects.
 SearcherGroupType getSearcherGroupType()
          The searcher group the searcher should be placed in.
 void setField(T field)
           
 void setId(String id)
           
 void setIndexers(List<FieldIndexer> indexers)
           
 void setName(String name)
           
 void setNameKey(String nameKey)
           
 void setSearcherGroupType(SearcherGroupType searcherGroupType)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MockSearcherInformation

public MockSearcherInformation(String id,
                               String nameKey,
                               String name,
                               T field,
                               List<FieldIndexer> indexers,
                               SearcherGroupType searcherGroup)

MockSearcherInformation

public MockSearcherInformation(String name)
Method Detail

getId

public String getId()
Description copied from interface: SearcherInformation
The unique id of the searcher.

Specified by:
getId in interface SearcherInformation<T extends SearchableField>
Returns:
unique id of the searcher.

getNameKey

public String getNameKey()
Description copied from interface: SearcherInformation
The i18n key that is used to lookup the searcher's name when it is displayed.

Specified by:
getNameKey in interface SearcherInformation<T extends SearchableField>
Returns:
i18n key that is used to lookup the searcher's name when it is displayed.

getField

public T getField()
Specified by:
getField in interface SearcherInformation<T extends SearchableField>
Returns:
the field that this searcher was initialised with. If the searcher has not yet been initialised, this will return null.

getRelatedIndexers

public List<FieldIndexer> getRelatedIndexers()
Description copied from interface: SearcherInformation
Returns a list of FieldIndexer objects. The objects should be initialised and ready for action

Specified by:
getRelatedIndexers in interface SearcherInformation<T extends SearchableField>
Returns:
List of FieldIndexer objects. Must not be null. Return an empty list if none available

getSearcherGroupType

public SearcherGroupType getSearcherGroupType()
Description copied from interface: SearcherInformation
The searcher group the searcher should be placed in. Really only useful for system fields as custom fields are forced into the SearcherGroupType.CUSTOM group.

Specified by:
getSearcherGroupType in interface SearcherInformation<T extends SearchableField>
Returns:
the group the searcher should be associated with. Cannot not be null.

setId

public void setId(String id)

setNameKey

public void setNameKey(String nameKey)

setName

public void setName(String name)

setField

public void setField(T field)

setIndexers

public void setIndexers(List<FieldIndexer> indexers)

setSearcherGroupType

public void setSearcherGroupType(SearcherGroupType searcherGroupType)

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2002-2014 Atlassian. All Rights Reserved.