Record Class PipelineContext
java.lang.Object
java.lang.Record
com.tnsai.quality.security.harness.PipelineContext
- Record Components:
projectId- stable id for the project being reviewed; the state store uses this as the key underdata/<projectId>/projectRoot- absolute path to the codebasematchers- registered matchers, in registration orderagents- registered agents, in registration order; first agent is the defaultprocessbackend, second (when present) is used byrevalidatestateStore- persistence layerconfig- free-form key/values forwarded to stages ("include-globs","exclude-globs","max-files")
public record PipelineContext(String projectId, Path projectRoot, List<MatcherSpi> matchers, List<ReviewAgentSpi> agents, PipelineStateStore stateStore, Map<String,String> config)
extends Record
Read-only context passed to every
PipelineStage (TNS-291).
Holds the configuration the CodeReviewPipeline was built
with — matchers, agents, state store, project root — so stages don't
each take a long parameter list.
- Since:
- 0.10.0 (TNS-291)
-
Constructor Summary
ConstructorsConstructorDescriptionPipelineContext(String projectId, Path projectRoot, List<MatcherSpi> matchers, List<ReviewAgentSpi> agents, PipelineStateStore stateStore, Map<String, String> config) Creates an instance of aPipelineContextrecord class. -
Method Summary
Modifier and TypeMethodDescriptionagents()Returns the value of theagentsrecord component.config()Returns the value of theconfigrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.matchers()Returns the value of thematchersrecord component.Returns the value of theprojectIdrecord component.Returns the value of theprojectRootrecord component.Returns the value of thestateStorerecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
PipelineContext
public PipelineContext(String projectId, Path projectRoot, List<MatcherSpi> matchers, List<ReviewAgentSpi> agents, PipelineStateStore stateStore, Map<String, String> config) Creates an instance of aPipelineContextrecord class.- Parameters:
projectId- the value for theprojectIdrecord componentprojectRoot- the value for theprojectRootrecord componentmatchers- the value for thematchersrecord componentagents- the value for theagentsrecord componentstateStore- the value for thestateStorerecord componentconfig- the value for theconfigrecord component
-
-
Method Details
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
projectId
Returns the value of theprojectIdrecord component.- Returns:
- the value of the
projectIdrecord component
-
projectRoot
Returns the value of theprojectRootrecord component.- Returns:
- the value of the
projectRootrecord component
-
matchers
Returns the value of thematchersrecord component.- Returns:
- the value of the
matchersrecord component
-
agents
Returns the value of theagentsrecord component.- Returns:
- the value of the
agentsrecord component
-
stateStore
Returns the value of thestateStorerecord component.- Returns:
- the value of the
stateStorerecord component
-
config
Returns the value of theconfigrecord component.- Returns:
- the value of the
configrecord component
-