Module org.elasticsearch.server
Interface ProjectRoutingResolver
public interface ProjectRoutingResolver
Filter for the target projects based on the provided project routing string.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final ProjectRoutingResolverNo-op router - just returns the provided target projects.static final StringThe reserved term for representing the origin project in project routing. -
Method Summary
Modifier and TypeMethodDescriptionresolve(String projectRouting, ProjectMetadata projectMetadata, TargetProjects targetProjects) Filters the specified TargetProjects based on the provided project routing stringvoidvalidate(String projectRouting, ProjectMetadata projectMetadata) Validates the provided project routing string.
-
Field Details
-
ORIGIN
The reserved term for representing the origin project in project routing.- See Also:
-
NOOP
No-op router - just returns the provided target projects.
-
-
Method Details
-
validate
Validates the provided project routing string. This method is expected to throw an exception if the project routing is invalid.- Parameters:
projectRouting- the project_routing specified in the request objectprojectMetadata- project metadata for the origin project
-
resolve
TargetProjects resolve(String projectRouting, ProjectMetadata projectMetadata, TargetProjects targetProjects) Filters the specified TargetProjects based on the provided project routing string- Parameters:
projectRouting- the project_routing specified in the request objectprojectMetadata- project metadata for the origin projecttargetProjects- The target projects to be filtered- Returns:
- A new TargetProjects instance containing only the projects that match the project routing.
-