5858 * <h2>@Flamingock Annotation Configuration</h2>
5959 * The processor supports two mutually exclusive configuration modes:
6060 * <ul>
61- * <li><b>File-based configuration:</b> Uses {@code pipelineFile } to reference a YAML pipeline definition</li>
61+ * <li><b>File-based configuration:</b> Uses {@code configFile } to reference a YAML pipeline definition</li>
6262 * <li><b>Annotation-based configuration:</b> Uses {@code stages} array to define the pipeline inline</li>
6363 * </ul>
6464 *
6565 * <h3>Pipeline File Resolution</h3>
66- * When using {@code pipelineFile }, the processor provides resource resolution
66+ * When using {@code configFile }, the processor provides resource resolution
6767 * supporting multiple file locations:
6868 *
6969 * <h4>Examples:</h4>
7070 * <pre>{@code
7171 * // Absolute file path - highest priority
72- * @EnableFlamingock(pipelineFile = "/path/to/external/pipeline.yaml")
72+ * @EnableFlamingock(configFile = "/path/to/external/pipeline.yaml")
7373 * // Uses direct file system path
7474 *
7575 * // Relative file path - second priority (relative to working directory)
76- * @EnableFlamingock(pipelineFile = "config/flamingock-pipeline.yaml")
76+ * @EnableFlamingock(configFile = "config/flamingock-pipeline.yaml")
7777 * // Resolves relative to current working directory, NOT as classpath resource
7878 *
7979 * // Classpath resource - fallback if file doesn't exist relative to working directory
80- * @EnableFlamingock(pipelineFile = "flamingock/pipeline.yaml")
80+ * @EnableFlamingock(configFile = "flamingock/pipeline.yaml")
8181 * // If "flamingock/pipeline.yaml" doesn't exist in working directory,
8282 * // then tries: src/main/resources/flamingock/pipeline.yaml
8383 * // then tries: src/test/resources/flamingock/pipeline.yaml
8484 *
8585 * // Resource with explicit "resources/" prefix (automatically stripped)
86- * @EnableFlamingock(pipelineFile = "resources/flamingock/pipeline.yaml")
86+ * @EnableFlamingock(configFile = "resources/flamingock/pipeline.yaml")
8787 * // First tries: "resources/flamingock/pipeline.yaml" relative to working directory
8888 * // If not found, strips "resources/" prefix and tries classpath resolution:
8989 * // src/main/resources/flamingock/pipeline.yaml or src/test/resources/flamingock/pipeline.yaml
9090 * }</pre>
9191 *
9292 * <h4>Resolution Order (stops at first match):</h4>
9393 * <ol>
94- * <li><b>Direct file path:</b> {@code [pipelineFile ]} (absolute or relative to working directory)</li>
95- * <li><b>Main resources:</b> {@code src/main/resources/[pipelineFile ]}</li>
96- * <li><b>Test resources:</b> {@code src/test/resources/[pipelineFile ]}</li>
94+ * <li><b>Direct file path:</b> {@code [configFile ]} (absolute or relative to working directory)</li>
95+ * <li><b>Main resources:</b> {@code src/main/resources/[configFile ]}</li>
96+ * <li><b>Test resources:</b> {@code src/test/resources/[configFile ]}</li>
9797 * <li><b>Main resources (stripped):</b> If path starts with "resources/", strips prefix and tries {@code src/main/resources/[remaining-path]}</li>
9898 * <li><b>Test resources (stripped):</b> If path starts with "resources/", strips prefix and tries {@code src/test/resources/[remaining-path]}</li>
9999 * </ol>
120120 * <h2>Validation Rules</h2>
121121 * <ul>
122122 * <li>@EnableFlamingock annotation is mandatory</li>
123- * <li>Must specify either {@code pipelineFile } OR {@code stages} (mutually exclusive)</li>
123+ * <li>Must specify either {@code configFile } OR {@code stages} (mutually exclusive)</li>
124124 * <li>Maximum of 1 stage with type {@code StageType.SYSTEM} is allowed</li>
125125 * <li>Maximum of 1 stage with type {@code StageType.LEGACY} is allowed</li>
126126 * <li>Unlimited stages with type {@code StageType.DEFAULT} are allowed</li>
@@ -204,8 +204,8 @@ public boolean process(Set<? extends TypeElement> annotations, RoundEnvironment
204204 );
205205 Serializer serializer = new Serializer (processingEnv , logger );
206206 String setup = flamingockAnnotation .setup ().toString ();
207- String pipelineFile = flamingockAnnotation .pipelineFile ();
208- FlamingockMetadata flamingockMetadata = new FlamingockMetadata (pipeline , setup , pipelineFile );
207+ String configFile = flamingockAnnotation .configFile ();
208+ FlamingockMetadata flamingockMetadata = new FlamingockMetadata (pipeline , setup , configFile );
209209 serializer .serializeFullPipeline (flamingockMetadata );
210210 logger .info ("Finished processing annotated classes and generating metadata." );
211211 return true ;
@@ -220,16 +220,16 @@ private PreviewPipeline getPipelineFromProcessChanges(Map<String, List<AbstractP
220220 throw new RuntimeException ("@EnableFlamingock annotation is mandatory. Please annotate a class with @EnableFlamingock to configure the pipeline." );
221221 }
222222
223- boolean hasFileInAnnotation = !pipelineAnnotation .pipelineFile ().isEmpty ();
223+ boolean hasFileInAnnotation = !pipelineAnnotation .configFile ().isEmpty ();
224224 boolean hasStagesInAnnotation = pipelineAnnotation .stages ().length > 0 ;
225225
226226 // Validate mutually exclusive modes
227227 if (hasFileInAnnotation && hasStagesInAnnotation ) {
228- throw new RuntimeException ("@EnableFlamingock annotation cannot have both pipelineFile and stages configured. Choose one: either specify pipelineFile OR stages." );
228+ throw new RuntimeException ("@EnableFlamingock annotation cannot have both configFile and stages configured. Choose one: either specify configFile OR stages." );
229229 }
230230
231231 if (!hasFileInAnnotation && !hasStagesInAnnotation ) {
232- throw new RuntimeException ("@EnableFlamingock annotation must specify either pipelineFile OR stages configuration." );
232+ throw new RuntimeException ("@EnableFlamingock annotation must specify either configFile OR stages configuration." );
233233 }
234234
235235 // Validate stage type restrictions when using annotation-based configuration
@@ -238,8 +238,8 @@ private PreviewPipeline getPipelineFromProcessChanges(Map<String, List<AbstractP
238238 }
239239
240240 if (hasFileInAnnotation ) {
241- logger .info ("Reading flamingock pipeline from file specified in @EnableFlamingock annotation: '" + pipelineAnnotation .pipelineFile () + "'" );
242- File specifiedPipelineFile = resolvePipelineFile (pipelineAnnotation .pipelineFile ());
241+ logger .info ("Reading flamingock pipeline from file specified in @EnableFlamingock annotation: '" + pipelineAnnotation .configFile () + "'" );
242+ File specifiedPipelineFile = resolvePipelineFile (pipelineAnnotation .configFile ());
243243 return buildPipelineFromSpecifiedFile (specifiedPipelineFile , codedChangesByPackage );
244244 } else {
245245 logger .info ("Reading flamingock pipeline from @EnableFlamingock annotation stages configuration" );
@@ -428,29 +428,29 @@ private PreviewStage mapAnnotationToStage(Map<String, List<AbstractPreviewTask>>
428428 * Resolves a pipeline file path from the @EnableFlamingock annotation, supporting both absolute file paths
429429 * and classpath resources. This method provides resource resolution for the Flamingock library.
430430 *
431- * @param pipelineFilePath the file path specified in the @EnableFlamingock annotation
431+ * @param configFilePath the file path specified in the @EnableFlamingock annotation
432432 * @return a File object representing the resolved pipeline file
433433 * @throws RuntimeException if the file cannot be found in any of the supported locations
434434 */
435- private File resolvePipelineFile (String pipelineFilePath ) {
435+ private File resolvePipelineFile (String configFilePath ) {
436436 List <File > searchedFiles = new ArrayList <>();
437437
438438 // Try direct file path first (absolute or relative to current working directory)
439- File result = tryResolveFile (new File (pipelineFilePath ), "direct file path" , searchedFiles );
439+ File result = tryResolveFile (new File (configFilePath ), "direct file path" , searchedFiles );
440440 if (result != null ) return result ;
441441
442442 // Try as classpath resource in main resources
443- result = tryResolveFile (new File (resourcesRoot + "/" + pipelineFilePath ), "main resources" , searchedFiles );
443+ result = tryResolveFile (new File (resourcesRoot + "/" + configFilePath ), "main resources" , searchedFiles );
444444 if (result != null ) return result ;
445445
446446 // Try as classpath resource in test resources (for annotation processing during tests)
447447 String testResourcesRoot = resourcesRoot .replace ("src/main/resources" , "src/test/resources" );
448- result = tryResolveFile (new File (testResourcesRoot + "/" + pipelineFilePath ), "test resources" , searchedFiles );
448+ result = tryResolveFile (new File (testResourcesRoot + "/" + configFilePath ), "test resources" , searchedFiles );
449449 if (result != null ) return result ;
450450
451451 // Try with "resources/" prefix stripped (handle cases like "resources/flamingock/pipeline.yaml")
452- if (pipelineFilePath .startsWith ("resources/" )) {
453- String pathWithoutResourcesPrefix = pipelineFilePath .substring ("resources/" .length ());
452+ if (configFilePath .startsWith ("resources/" )) {
453+ String pathWithoutResourcesPrefix = configFilePath .substring ("resources/" .length ());
454454
455455 // Try in main resources without "resources/" prefix
456456 result = tryResolveFile (new File (resourcesRoot + "/" + pathWithoutResourcesPrefix ), "main resources (stripped resources/ prefix)" , searchedFiles );
@@ -468,7 +468,7 @@ private File resolvePipelineFile(String pipelineFilePath) {
468468 }
469469
470470 throw new RuntimeException (
471- "Pipeline file specified in @EnableFlamingock annotation does not exist: " + pipelineFilePath + "\n " +
471+ "Pipeline file specified in @EnableFlamingock annotation does not exist: " + configFilePath + "\n " +
472472 searchedLocations
473473 );
474474 }
0 commit comments