Skip to content

Commit

Permalink
Boy scouting
Browse files Browse the repository at this point in the history
  • Loading branch information
Biacode committed Feb 21, 2018
1 parent 46d799e commit 92c2137
Showing 2 changed files with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package org.biacode.escommons.core.component;

import javax.annotation.Nonnull;
import javax.annotation.Nullable;
import java.util.List;
import java.util.Map;

@@ -22,7 +23,7 @@ public interface IndexingComponent {
* @return new generated index name
*/
@Nonnull
String createIndexAndSetupMappings(@Nonnull final String originalIndex, @Nonnull final List<String> types, final Map<String, Object> settings);
String createIndexAndSetupMappings(@Nonnull final String originalIndex, @Nonnull final List<String> types, @Nullable final Map<String, Object> settings);

/**
* Creates alias with originalIndex's name which points to newIndex
Original file line number Diff line number Diff line change
@@ -11,6 +11,7 @@
import org.springframework.util.Assert;

import javax.annotation.Nonnull;
import javax.annotation.Nullable;
import java.util.List;
import java.util.Map;

@@ -44,7 +45,9 @@ public IndexingComponentImpl() {
//region Public methods
@Nonnull
@Override
public String createIndexAndSetupMappings(@Nonnull final String originalIndex, @Nonnull final List<String> types, final Map<String, Object> settings) {
public String createIndexAndSetupMappings(@Nonnull final String originalIndex,
@Nonnull final List<String> types,
@Nullable final Map<String, Object> settings) {
assertOriginalIndexNotNull(originalIndex);
Assert.notNull(types, "The list of types should not be null");
final String newIndexName = indexNameGenerationComponent.generateNameForGivenIndex(originalIndex);

0 comments on commit 92c2137

Please sign in to comment.