/** * Sets a validation for minMuleVersion as {@link #validateMinMuleVersion()} but the Mule Runtime version could * be provided as a supplier. Used by Tooling. * * @return this */ public ArtifactDescriptorValidatorBuilder validateMinMuleVersion(Supplier<String> muleRuntimeVersionSupplier) { this.validateMinMuleVersion(); this.muleRuntimeVersionSupplier = muleRuntimeVersionSupplier; return this; }
/** * Sets a validation for minMuleVersion as {@link #validateMinMuleVersion()} but the validation should only consider * semantic version when checking the minMuleVersion vs Mule Runtime version. * * @return this */ public ArtifactDescriptorValidatorBuilder validateMinMuleVersionUsingSemanticVersion() { this.validateMinMuleVersion(); this.validateMinMuleVersionWithSemanticVersioning = true; return this; }
/** * Creates a new factory * * @param descriptorLoaderRepository contains all the {@link ClassLoaderModelLoader} registered on the container. Non null * @param artifactDescriptorValidatorBuilder {@link ArtifactDescriptorValidatorBuilder} to create the {@link ArtifactDescriptorValidator} in order to check the state of the descriptor once loaded. */ public AbstractArtifactDescriptorFactory(DescriptorLoaderRepository descriptorLoaderRepository, ArtifactDescriptorValidatorBuilder artifactDescriptorValidatorBuilder) { checkArgument(descriptorLoaderRepository != null, "descriptorLoaderRepository cannot be null"); this.descriptorLoaderRepository = descriptorLoaderRepository; this.artifactDescriptorValidator = artifactDescriptorValidatorBuilder .validateMinMuleVersion() .validateMuleProduct() .validateVersionFormat() .build(); }
/** * Sets a validation for minMuleVersion as {@link #validateMinMuleVersion()} but the Mule Runtime version could * be provided as a supplier. Used by Tooling. * * @return this */ public ArtifactDescriptorValidatorBuilder validateMinMuleVersion(Supplier<String> muleRuntimeVersionSupplier) { this.validateMinMuleVersion(); this.muleRuntimeVersionSupplier = muleRuntimeVersionSupplier; return this; }
/** * Sets a validation for minMuleVersion as {@link #validateMinMuleVersion()} but the validation should only consider * semantic version when checking the minMuleVersion vs Mule Runtime version. * * @return this */ public ArtifactDescriptorValidatorBuilder validateMinMuleVersionUsingSemanticVersion() { this.validateMinMuleVersion(); this.validateMinMuleVersionWithSemanticVersioning = true; return this; }
/** * Creates a new factory * * @param descriptorLoaderRepository contains all the {@link ClassLoaderModelLoader} registered on the container. Non null * @param artifactDescriptorValidatorBuilder {@link ArtifactDescriptorValidatorBuilder} to create the {@link ArtifactDescriptorValidator} in order to check the state of the descriptor once loaded. */ public AbstractArtifactDescriptorFactory(DescriptorLoaderRepository descriptorLoaderRepository, ArtifactDescriptorValidatorBuilder artifactDescriptorValidatorBuilder) { checkArgument(descriptorLoaderRepository != null, "descriptorLoaderRepository cannot be null"); this.descriptorLoaderRepository = descriptorLoaderRepository; this.artifactDescriptorValidator = artifactDescriptorValidatorBuilder .validateMinMuleVersion() .validateMuleProduct() .validateVersionFormat() .build(); }