test_class.declarator: alternateKeyHelper
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private AlternateKeyHelper alternateKeyHelper;
test_class.type: AlternateKeyHelper
test_class.var_name: alternateKeyHelper
test_class.declarator: businessObjectDefinitionDao
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private BusinessObjectDefinitionDao businessObjectDefinitionDao;
test_class.type: BusinessObjectDefinitionDao
test_class.var_name: businessObjectDefinitionDao
test_class.declarator: businessObjectDefinitionHelper
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private BusinessObjectDefinitionHelper businessObjectDefinitionHelper;
test_class.type: BusinessObjectDefinitionHelper
test_class.var_name: businessObjectDefinitionHelper
test_class.declarator: configurationDaoHelper
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private ConfigurationDaoHelper configurationDaoHelper;
test_class.type: ConfigurationDaoHelper
test_class.var_name: configurationDaoHelper
test_class.declarator: configurationHelper
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private ConfigurationHelper configurationHelper;
test_class.type: ConfigurationHelper
test_class.var_name: configurationHelper
test_class.declarator: indexFunctionDao
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private IndexFunctionsDao indexFunctionDao;
test_class.type: IndexFunctionsDao
test_class.var_name: indexFunctionDao
test_class.declarator: searchIndexDao
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private SearchIndexDao searchIndexDao;
test_class.type: SearchIndexDao
test_class.var_name: searchIndexDao
test_class.declarator: searchIndexDaoHelper
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private SearchIndexDaoHelper searchIndexDaoHelper;
test_class.type: SearchIndexDaoHelper
test_class.var_name: searchIndexDaoHelper
test_class.declarator: searchIndexHelperService
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private SearchIndexHelperService searchIndexHelperService;
test_class.type: SearchIndexHelperService
test_class.var_name: searchIndexHelperService
test_class.declarator: searchIndexServiceImpl
test_class.modifier: @InjectMocks
      private
test_class.original_string: @InjectMocks
      private SearchIndexServiceImpl searchIndexServiceImpl;
test_class.type: SearchIndexServiceImpl
test_class.var_name: searchIndexServiceImpl
test_class.declarator: searchIndexStatusDaoHelper
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private SearchIndexStatusDaoHelper searchIndexStatusDaoHelper;
test_class.type: SearchIndexStatusDaoHelper
test_class.var_name: searchIndexStatusDaoHelper
test_class.declarator: searchIndexTypeDaoHelper
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private SearchIndexTypeDaoHelper searchIndexTypeDaoHelper;
test_class.type: SearchIndexTypeDaoHelper
test_class.var_name: searchIndexTypeDaoHelper
test_class.declarator: tagDao
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private TagDao tagDao;
test_class.type: TagDao
test_class.var_name: tagDao
test_class.file: herd-code/herd-service/src/test/java/org/finra/herd/service/impl/SearchIndexServiceImplTest.java
test_class.identifier: SearchIndexServiceImplTest
test_class.superclass: extends AbstractServiceTest
test_case.body: @Test
      public void testCreateSearchIndexHelper()
      {
          // Create a search index key.
          SearchIndexKey searchIndexKey = new SearchIndexKey(SEARCH_INDEX_NAME);
  
          // Get the search index type value.
          String searchIndexType = SearchIndexTypeEntity.SearchIndexTypes.BUS_OBJCT_DFNTN.name();
  
          // Mock some of the external call responses.
          @SuppressWarnings("unchecked")
          Future<Void> mockedFuture = mock(Future.class);
  
          // Mock the external calls.
          when(configurationHelper.getProperty(ConfigurationValue.ELASTICSEARCH_BDEF_INDEX_NAME, String.class)).thenReturn(SEARCH_INDEX_ALIAS_BDEF);
          when(configurationDaoHelper.getClobProperty(ConfigurationValue.ELASTICSEARCH_BDEF_MAPPINGS_JSON_V2.getKey())).thenReturn(SEARCH_INDEX_MAPPING);
          when(configurationDaoHelper.getClobProperty(ConfigurationValue.ELASTICSEARCH_BDEF_SETTINGS_JSON_V2.getKey())).thenReturn(SEARCH_INDEX_SETTINGS);
  
          when(searchIndexHelperService.indexAllBusinessObjectDefinitions(searchIndexKey)).thenReturn(mockedFuture);
  
          // Create a search index.
          searchIndexServiceImpl.createSearchIndexHelper(searchIndexKey, searchIndexType);
  
          // Verify the external calls.
          verify(configurationHelper).getProperty(ConfigurationValue.ELASTICSEARCH_BDEF_INDEX_NAME, String.class);
          verify(configurationDaoHelper).getClobProperty(ConfigurationValue.ELASTICSEARCH_BDEF_MAPPINGS_JSON_V2.getKey());
          verify(configurationDaoHelper).getClobProperty(ConfigurationValue.ELASTICSEARCH_BDEF_SETTINGS_JSON_V2.getKey());
          verify(indexFunctionDao).createIndex(any(), any(), any(), any());
          verify(searchIndexHelperService).indexAllBusinessObjectDefinitions(searchIndexKey);
          verifyNoMoreInteractions(alternateKeyHelper, businessObjectDefinitionDao, businessObjectDefinitionHelper, configurationDaoHelper,
              indexFunctionDao, searchIndexDao, searchIndexDaoHelper, searchIndexHelperService, searchIndexStatusDaoHelper, searchIndexTypeDaoHelper);
      }
test_case.class_method_signature: SearchIndexServiceImplTest.testCreateSearchIndexHelper()
test_case.full_signature: @Test public void testCreateSearchIndexHelper()
test_case.identifier: testCreateSearchIndexHelper
test_case.invocations: name mock thenReturn when getProperty thenReturn when getClobProperty getKey thenReturn when getClobProperty getKey thenReturn when indexAllBusinessObjectDefinitions createSearchIndexHelper getProperty verify getClobProperty verify getKey getClobProperty verify getKey createIndex verify any any any any indexAllBusinessObjectDefinitions verify verifyNoMoreInteractions
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testCreateSearchIndexHelper()
focal_class.declarator: alternateKeyHelper
focal_class.modifier: @Autowired
      private
focal_class.original_string: @Autowired
      private AlternateKeyHelper alternateKeyHelper;
focal_class.type: AlternateKeyHelper
focal_class.var_name: alternateKeyHelper
focal_class.declarator: configurationDaoHelper
focal_class.modifier: @Autowired
      private
focal_class.original_string: @Autowired
      private ConfigurationDaoHelper configurationDaoHelper;
focal_class.type: ConfigurationDaoHelper
focal_class.var_name: configurationDaoHelper
focal_class.declarator: configurationHelper
focal_class.modifier: @Autowired
      private
focal_class.original_string: @Autowired
      private ConfigurationHelper configurationHelper;
focal_class.type: ConfigurationHelper
focal_class.var_name: configurationHelper
focal_class.declarator: searchIndexDao
focal_class.modifier: @Autowired
      private
focal_class.original_string: @Autowired
      private SearchIndexDao searchIndexDao;
focal_class.type: SearchIndexDao
focal_class.var_name: searchIndexDao
focal_class.declarator: searchIndexDaoHelper
focal_class.modifier: @Autowired
      private
focal_class.original_string: @Autowired
      private SearchIndexDaoHelper searchIndexDaoHelper;
focal_class.type: SearchIndexDaoHelper
focal_class.var_name: searchIndexDaoHelper
focal_class.declarator: searchIndexHelperService
focal_class.modifier: @Autowired
      private
focal_class.original_string: @Autowired
      private SearchIndexHelperService searchIndexHelperService;
focal_class.type: SearchIndexHelperService
focal_class.var_name: searchIndexHelperService
focal_class.declarator: searchIndexStatusDaoHelper
focal_class.modifier: @Autowired
      private
focal_class.original_string: @Autowired
      private SearchIndexStatusDaoHelper searchIndexStatusDaoHelper;
focal_class.type: SearchIndexStatusDaoHelper
focal_class.var_name: searchIndexStatusDaoHelper
focal_class.declarator: searchIndexTypeDaoHelper
focal_class.modifier: @Autowired
      private
focal_class.original_string: @Autowired
      private SearchIndexTypeDaoHelper searchIndexTypeDaoHelper;
focal_class.type: SearchIndexTypeDaoHelper
focal_class.var_name: searchIndexTypeDaoHelper
focal_class.declarator: indexFunctionsDao
focal_class.modifier: @Autowired
      private
focal_class.original_string: @Autowired
      private IndexFunctionsDao indexFunctionsDao;
focal_class.type: IndexFunctionsDao
focal_class.var_name: indexFunctionsDao
focal_class.file: herd-code/herd-service/src/main/java/org/finra/herd/service/impl/SearchIndexServiceImpl.java
focal_class.identifier: SearchIndexServiceImpl
focal_class.interfaces: implements SearchIndexService
focal_class.class_method_signature: SearchIndexServiceImpl.createSearchIndex(SearchIndexCreateRequest request)
focal_class.full_signature: @Override public SearchIndex createSearchIndex(SearchIndexCreateRequest request)
focal_class.identifier: createSearchIndex
focal_class.modifiers: @Override public
focal_class.parameters: (SearchIndexCreateRequest request)
focal_class.return: SearchIndex
focal_class.signature: SearchIndex createSearchIndex(SearchIndexCreateRequest request)
focal_class.class_method_signature: SearchIndexServiceImpl.deleteSearchIndex(SearchIndexKey searchIndexKey)
focal_class.full_signature: @Override public SearchIndex deleteSearchIndex(SearchIndexKey searchIndexKey)
focal_class.identifier: deleteSearchIndex
focal_class.modifiers: @Override public
focal_class.parameters: (SearchIndexKey searchIndexKey)
focal_class.return: SearchIndex
focal_class.signature: SearchIndex deleteSearchIndex(SearchIndexKey searchIndexKey)
focal_class.class_method_signature: SearchIndexServiceImpl.getSearchIndex(SearchIndexKey searchIndexKey)
focal_class.full_signature: @Override public SearchIndex getSearchIndex(SearchIndexKey searchIndexKey)
focal_class.identifier: getSearchIndex
focal_class.modifiers: @Override public
focal_class.parameters: (SearchIndexKey searchIndexKey)
focal_class.return: SearchIndex
focal_class.signature: SearchIndex getSearchIndex(SearchIndexKey searchIndexKey)
focal_class.class_method_signature: SearchIndexServiceImpl.getSearchIndexes()
focal_class.full_signature: @Override public SearchIndexKeys getSearchIndexes()
focal_class.identifier: getSearchIndexes
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: SearchIndexKeys
focal_class.signature: SearchIndexKeys getSearchIndexes()
focal_class.class_method_signature: SearchIndexServiceImpl.createSearchIndexEntity(SearchIndexCreateRequest request, SearchIndexTypeEntity searchIndexTypeEntity,
          SearchIndexStatusEntity searchIndexStatusEntity)
focal_class.full_signature: protected SearchIndexEntity createSearchIndexEntity(SearchIndexCreateRequest request, SearchIndexTypeEntity searchIndexTypeEntity,
          SearchIndexStatusEntity searchIndexStatusEntity)
focal_class.identifier: createSearchIndexEntity
focal_class.modifiers: protected
focal_class.parameters: (SearchIndexCreateRequest request, SearchIndexTypeEntity searchIndexTypeEntity,
          SearchIndexStatusEntity searchIndexStatusEntity)
focal_class.return: SearchIndexEntity
focal_class.signature: SearchIndexEntity createSearchIndexEntity(SearchIndexCreateRequest request, SearchIndexTypeEntity searchIndexTypeEntity,
          SearchIndexStatusEntity searchIndexStatusEntity)
focal_class.class_method_signature: SearchIndexServiceImpl.createSearchIndexFromEntity(SearchIndexEntity searchIndexEntity)
focal_class.full_signature: protected SearchIndex createSearchIndexFromEntity(SearchIndexEntity searchIndexEntity)
focal_class.identifier: createSearchIndexFromEntity
focal_class.modifiers: protected
focal_class.parameters: (SearchIndexEntity searchIndexEntity)
focal_class.return: SearchIndex
focal_class.signature: SearchIndex createSearchIndexFromEntity(SearchIndexEntity searchIndexEntity)
focal_class.class_method_signature: SearchIndexServiceImpl.createSearchIndexHelper(SearchIndexKey searchIndexKey, String searchIndexType)
focal_class.full_signature: protected void createSearchIndexHelper(SearchIndexKey searchIndexKey, String searchIndexType)
focal_class.identifier: createSearchIndexHelper
focal_class.modifiers: protected
focal_class.parameters: (SearchIndexKey searchIndexKey, String searchIndexType)
focal_class.return: void
focal_class.signature: void createSearchIndexHelper(SearchIndexKey searchIndexKey, String searchIndexType)
focal_class.class_method_signature: SearchIndexServiceImpl.createSearchIndexStatistics(Settings settings, DocsStats docsStats, long indexCount)
focal_class.full_signature: protected SearchIndexStatistics createSearchIndexStatistics(Settings settings, DocsStats docsStats, long indexCount)
focal_class.identifier: createSearchIndexStatistics
focal_class.modifiers: protected
focal_class.parameters: (Settings settings, DocsStats docsStats, long indexCount)
focal_class.return: SearchIndexStatistics
focal_class.signature: SearchIndexStatistics createSearchIndexStatistics(Settings settings, DocsStats docsStats, long indexCount)
focal_class.class_method_signature: SearchIndexServiceImpl.deleteSearchIndexHelper(String searchIndexName)
focal_class.full_signature: protected void deleteSearchIndexHelper(String searchIndexName)
focal_class.identifier: deleteSearchIndexHelper
focal_class.modifiers: protected
focal_class.parameters: (String searchIndexName)
focal_class.return: void
focal_class.signature: void deleteSearchIndexHelper(String searchIndexName)
focal_class.class_method_signature: SearchIndexServiceImpl.validateSearchIndexCreateRequest(SearchIndexCreateRequest request)
focal_class.full_signature: private void validateSearchIndexCreateRequest(SearchIndexCreateRequest request)
focal_class.identifier: validateSearchIndexCreateRequest
focal_class.modifiers: private
focal_class.parameters: (SearchIndexCreateRequest request)
focal_class.return: void
focal_class.signature: void validateSearchIndexCreateRequest(SearchIndexCreateRequest request)
focal_class.class_method_signature: SearchIndexServiceImpl.validateSearchIndexKey(SearchIndexKey key)
focal_class.full_signature: private void validateSearchIndexKey(SearchIndexKey key)
focal_class.identifier: validateSearchIndexKey
focal_class.modifiers: private
focal_class.parameters: (SearchIndexKey key)
focal_class.return: void
focal_class.signature: void validateSearchIndexKey(SearchIndexKey key)
focal_class.class_method_signature: SearchIndexServiceImpl.setSearchIndexName(String searchIndexType)
focal_class.full_signature: private String setSearchIndexName(String searchIndexType)
focal_class.identifier: setSearchIndexName
focal_class.modifiers: private
focal_class.parameters: (String searchIndexType)
focal_class.return: String
focal_class.signature: String setSearchIndexName(String searchIndexType)
focal_method.body: protected void createSearchIndexHelper(SearchIndexKey searchIndexKey, String searchIndexType)
      {
          String mapping;
          String settings;
          String alias;
  
          // Currently, only search index for business object definitions and tag are supported.
          if (SearchIndexTypeEntity.SearchIndexTypes.BUS_OBJCT_DFNTN.name().equalsIgnoreCase(searchIndexType))
          {
              mapping = configurationDaoHelper.getClobProperty(ConfigurationValue.ELASTICSEARCH_BDEF_MAPPINGS_JSON_V2.getKey());
              settings = configurationDaoHelper.getClobProperty(ConfigurationValue.ELASTICSEARCH_BDEF_SETTINGS_JSON_V2.getKey());
              alias = configurationHelper.getProperty(ConfigurationValue.ELASTICSEARCH_BDEF_INDEX_NAME, String.class);
          }
          else if (SearchIndexTypeEntity.SearchIndexTypes.TAG.name().equalsIgnoreCase(searchIndexType))
          {
              mapping = configurationDaoHelper.getClobProperty(ConfigurationValue.ELASTICSEARCH_TAG_MAPPINGS_JSON_V2.getKey());
              settings = configurationDaoHelper.getClobProperty(ConfigurationValue.ELASTICSEARCH_TAG_SETTINGS_JSON_V2.getKey());
              alias = configurationHelper.getProperty(ConfigurationValue.ELASTICSEARCH_TAG_INDEX_NAME, String.class);
          }
          else
          {
              throw new IllegalArgumentException(String.format("Search index type with code \"%s\" is not supported.", searchIndexType));
          }
  
          // Create the index.
          indexFunctionsDao.createIndex(searchIndexKey.getSearchIndexName(), mapping, settings, alias);
  
          //Fetch data from database and index them
          if (SearchIndexTypeEntity.SearchIndexTypes.BUS_OBJCT_DFNTN.name().equalsIgnoreCase(searchIndexType))
          {
              // Asynchronously index all business object definitions.
              searchIndexHelperService.indexAllBusinessObjectDefinitions(searchIndexKey);
          }
          else
          {
              // Asynchronously index all tags. If we got to this point, it is tags
              searchIndexHelperService.indexAllTags(searchIndexKey);
          }
      }
focal_method.class_method_signature: SearchIndexServiceImpl.createSearchIndexHelper(SearchIndexKey searchIndexKey, String searchIndexType)
focal_method.full_signature: protected void createSearchIndexHelper(SearchIndexKey searchIndexKey, String searchIndexType)
focal_method.identifier: createSearchIndexHelper
focal_method.invocations: equalsIgnoreCase name getClobProperty getKey getClobProperty getKey getProperty equalsIgnoreCase name getClobProperty getKey getClobProperty getKey getProperty format createIndex getSearchIndexName equalsIgnoreCase name indexAllBusinessObjectDefinitions indexAllTags
focal_method.modifiers: protected
focal_method.parameters: (SearchIndexKey searchIndexKey, String searchIndexType)
focal_method.return: void
focal_method.signature: void createSearchIndexHelper(SearchIndexKey searchIndexKey, String searchIndexType)