Record Class AtConfiguration
java.lang.Object
java.lang.Record
energy.eddie.regionconnector.at.eda.config.AtConfiguration
- Record Components:
eligiblePartyId- ID that will be used as the sender for all messages sent to EDA. This ID must be registered with EDA at ebUtilities.
@ConfigurationProperties("region-connector.at.eda")
public record AtConfiguration(String eligiblePartyId, @Nullable String energyCommunityId, @Nullable String energyCommunityPartyId)
extends Record
The main configuration for the EDA region connector.
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionAtConfiguration(String eligiblePartyId, @Nullable String energyCommunityId, @Nullable String energyCommunityPartyId) Creates an instance of aAtConfigurationrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theeligiblePartyIdrecord component.@Nullable StringReturns the value of theenergyCommunityIdrecord component.@Nullable StringReturns the value of theenergyCommunityPartyIdrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.@jakarta.validation.constraints.AssertTrue(message="If the energy community ID has been set, the energy community party ID must also be set") booleanReturns the party ID for the specific type.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
AtConfiguration
public AtConfiguration(@Name("eligibleparty.id") String eligiblePartyId, @Nullable String energyCommunityId, @Nullable String energyCommunityPartyId) Creates an instance of aAtConfigurationrecord class.- Parameters:
eligiblePartyId- the value for theeligiblePartyIdrecord componentenergyCommunityId- the value for theenergyCommunityIdrecord componentenergyCommunityPartyId- the value for theenergyCommunityPartyIdrecord component
-
-
Method Details
-
isEnergyCommunityIdSetMustBeEnergyCommunityPartyIdAlsoSet
@AssertTrue(message="If the energy community ID has been set, the energy community party ID must also be set") public @jakarta.validation.constraints.AssertTrue(message="If the energy community ID has been set, the energy community party ID must also be set") boolean isEnergyCommunityIdSetMustBeEnergyCommunityPartyIdAlsoSet() -
partyIdFor
Returns the party ID for the specific type.- Parameters:
type- whether the party ID of the energy community or the eligible party ID is needed.- Returns:
- the party ID for the specified type
- Throws:
NullPointerException- if the EnergyCommunity type is specified, but the energy community type is not configured, which should never happen. If this exception is thrown, the API is used incorrectly or a bug has been introduced.
-
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). -
eligiblePartyId
Returns the value of theeligiblePartyIdrecord component.- Returns:
- the value of the
eligiblePartyIdrecord component
-
energyCommunityId
Returns the value of theenergyCommunityIdrecord component.- Returns:
- the value of the
energyCommunityIdrecord component
-
energyCommunityPartyId
Returns the value of theenergyCommunityPartyIdrecord component.- Returns:
- the value of the
energyCommunityPartyIdrecord component
-