Skip to content

Commit

Permalink
Add javadoc for DotPrefixValidator
Browse files Browse the repository at this point in the history
  • Loading branch information
dakrone committed Sep 18, 2024
1 parent 012e989 commit 42bb4f9
Showing 1 changed file with 14 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,20 @@
import java.util.Set;
import java.util.regex.Pattern;

/**
* DotPrefixValidator provides an abstract class implementing a mapped action filter.
*
* This class then implements the {@link #apply(Task, String, ActionRequest, ActionListener, ActionFilterChain)}
* method which checks for indices in the request that begin with a dot, emitting a deprecation
* warning if they do. If the request is performed by a non-external user (operator, internal product, etc.)
* as defined by {@link #isInternalRequest()} then the deprecation is emitted. Otherwise, it is skipped.
*
* The indices for consideration are returned by the abstract {@link #getIndicesFromRequest(Object)}
* method, which subclasses must implement.
*
* Some built-in index names and patterns are also elided from the check, as defined in
* {@link #IGNORED_INDEX_NAMES} and {@link #IGNORED_INDEX_PATTERNS}.
*/
public abstract class DotPrefixValidator<RequestType> implements MappedActionFilter {
public static final Setting<Boolean> VALIDATE_DOT_PREFIXES = Setting.boolSetting(
"cluster.indices.validate_dot_prefixes",
Expand Down

0 comments on commit 42bb4f9

Please sign in to comment.