Record Class AdapterMetadata
java.lang.Object
java.lang.Record
com.pragma.archetype.domain.model.adapter.AdapterMetadata
public record AdapterMetadata(String name, String type, String description, List<AdapterMetadata.Dependency> dependencies, List<AdapterMetadata.Dependency> testDependencies, String applicationPropertiesTemplate, List<AdapterMetadata.ConfigurationClass> configurationClasses)
extends Record
Metadata describing an adapter's properties and dependencies.
Loaded from metadata.yml files in adapter templates.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordRepresents a configuration class to generate.static final recordRepresents a dependency (Maven/Gradle artifact). -
Constructor Summary
ConstructorsConstructorDescriptionAdapterMetadata(String name, String type, String description, List<AdapterMetadata.Dependency> dependencies, List<AdapterMetadata.Dependency> testDependencies, String applicationPropertiesTemplate, List<AdapterMetadata.ConfigurationClass> configurationClasses) Creates an instance of aAdapterMetadatarecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theapplicationPropertiesTemplaterecord component.Returns the value of theconfigurationClassesrecord component.Returns the value of thedependenciesrecord component.Returns the value of thedescriptionrecord component.final booleanIndicates whether some other object is "equal to" this one.Gets all dependencies (runtime + test).booleanChecks if this adapter has application properties template.booleanChecks if this adapter has configuration classes.final inthashCode()Returns a hash code value for this object.booleanChecks if this adapter has test dependencies.name()Returns the value of thenamerecord component.Returns the value of thetestDependenciesrecord component.final StringtoString()Returns a string representation of this record class.type()Returns the value of thetyperecord component.validate()Validates that the metadata is complete and valid.
-
Constructor Details
-
AdapterMetadata
public AdapterMetadata(String name, String type, String description, List<AdapterMetadata.Dependency> dependencies, List<AdapterMetadata.Dependency> testDependencies, String applicationPropertiesTemplate, List<AdapterMetadata.ConfigurationClass> configurationClasses) Creates an instance of aAdapterMetadatarecord class.- Parameters:
name- the value for thenamerecord componenttype- the value for thetyperecord componentdescription- the value for thedescriptionrecord componentdependencies- the value for thedependenciesrecord componenttestDependencies- the value for thetestDependenciesrecord componentapplicationPropertiesTemplate- the value for theapplicationPropertiesTemplaterecord componentconfigurationClasses- the value for theconfigurationClassesrecord component
-
-
Method Details
-
hasApplicationProperties
public boolean hasApplicationProperties()Checks if this adapter has application properties template. -
hasConfigurationClasses
public boolean hasConfigurationClasses()Checks if this adapter has configuration classes. -
hasTestDependencies
public boolean hasTestDependencies()Checks if this adapter has test dependencies. -
getAllDependencies
Gets all dependencies (runtime + test). -
validate
Validates that the metadata is complete and valid. -
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). -
name
Returns the value of thenamerecord component.- Returns:
- the value of the
namerecord component
-
type
Returns the value of thetyperecord component.- Returns:
- the value of the
typerecord component
-
description
Returns the value of thedescriptionrecord component.- Returns:
- the value of the
descriptionrecord component
-
dependencies
Returns the value of thedependenciesrecord component.- Returns:
- the value of the
dependenciesrecord component
-
testDependencies
Returns the value of thetestDependenciesrecord component.- Returns:
- the value of the
testDependenciesrecord component
-
applicationPropertiesTemplate
Returns the value of theapplicationPropertiesTemplaterecord component.- Returns:
- the value of the
applicationPropertiesTemplaterecord component
-
configurationClasses
Returns the value of theconfigurationClassesrecord component.- Returns:
- the value of the
configurationClassesrecord component
-