Class SupportingComponent
java.lang.Object
com.microservices.starter.core.environment.SupportingComponent
- All Implemented Interfaces:
DomainAware,EnabledAware,Serializable
Describes a supporting concept in the form of a Docker image. These items are generally not
customized at the code level, but their behavior may be customized by environment variable. This
generally covers things like database and message brokers, but also includes more microservice
specific concepts like gateways and config servers.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanbooleanOptionally contribute properties to the Data Module Config Properties.Points to the classpath location of a template snippet that contains the necessary docker-compose fragment needed to setup this supporting item.Domain (DNS) information used at runtime for dynamic application configuration to negotiate gateway routing and interservice communication appropriately based on the deployed environment.Supporting items can sometimes be enabled for direct source editing via this property.Whether or not this supporting element is enabled.The system will usually determine the image name for project generated components based on convention using a mixture of the component name, and docker related properties found inDocker.getInit()Optional setting forSupportingComponentto define if any prescribed initialization behavior should be enabled.Whether this supporting component should be managed in the project's pom.xml.getName()The name used to identify the component.Special case field that applies to optional liquibase changelog name modifier.A name identifying the specific platform to which this supporting component belongs.getPorts()Container exposed port by key name map.Special case field useful for supporting items that provide or require an additional identifying name as part of their usage.inthashCode()voidOptionally contribute properties to the Data Module Config Properties.voidsetDescriptor(String descriptor) Points to the classpath location of a template snippet that contains the necessary docker-compose fragment needed to setup this supporting item.voidDomain (DNS) information used at runtime for dynamic application configuration to negotiate gateway routing and interservice communication appropriately based on the deployed environment.voidsetEditSource(Boolean editSource) Supporting items can sometimes be enabled for direct source editing via this property.voidsetEnabled(Boolean enabled) Whether or not this supporting element is enabled.voidsetImageUriOverride(String imageUriOverride) The system will usually determine the image name for project generated components based on convention using a mixture of the component name, and docker related properties found inDocker.voidOptional setting forSupportingComponentto define if any prescribed initialization behavior should be enabled.voidsetManagePom(Boolean managePom) Whether this supporting component should be managed in the project's pom.xml.voidThe name used to identify the component.voidSpecial case field that applies to optional liquibase changelog name modifier.voidsetPlatform(String platform) A name identifying the specific platform to which this supporting component belongs.voidContainer exposed port by key name map.voidsetResourceName(String resourceName) Special case field useful for supporting items that provide or require an additional identifying name as part of their usage.toString()
-
Constructor Details
-
SupportingComponent
public SupportingComponent()
-
-
Method Details
-
getName
The name used to identify the component. Required.- Specified by:
getNamein interfaceDomainAware- Specified by:
getNamein interfaceEnabledAware
-
getPlatform
A name identifying the specific platform to which this supporting component belongs. For example, thenamemay bedatabase, but theplatformwould be more specific - likepostgresql. Required. -
getDescriptor
Points to the classpath location of a template snippet that contains the necessary docker-compose fragment needed to setup this supporting item. Optional. -
getEnabled
Whether or not this supporting element is enabled. This is the primary way you define what database is supported with your application, for example. Required.- Specified by:
getEnabledin interfaceEnabledAware
-
getDomain
Domain (DNS) information used at runtime for dynamic application configuration to negotiate gateway routing and interservice communication appropriately based on the deployed environment. Required.- Specified by:
getDomainin interfaceDomainAware
-
getResourceName
Special case field useful for supporting items that provide or require an additional identifying name as part of their usage. This primarily applies to Oracle support processing and the inclusion of thexeSID used as part of the express edition. -
getOption
Special case field that applies to optional liquibase changelog name modifier. Currently, this is mainly used to reference the `oracle-short` liquibase changelogs, which maintain shorter length object identifiers for older Oracle version compatibility. To leverage the `oracle-short` support, you would specify this option value as `short`. -
getPorts
Container exposed port by key name map. The key name represents a template variable in the docker snippet that will be substituted with the port value. -
getEditSource
Supporting items can sometimes be enabled for direct source editing via this property. The assembly zip with the original project source is downloaded and expanded so that it is available for customization. This is a special case and usually applies to the solr docker project only. Optional. False by default. -
getImageUriOverride
The system will usually determine the image name for project generated components based on convention using a mixture of the component name, and docker related properties found inDocker. However, if a non-generated URI is desired to target the appropriate image for the component, it can be specified here. A valid URI would be something like:/my-prefix/my-name. Optional. Generated by default. -
getManagePom
Whether this supporting component should be managed in the project's pom.xml. Some project structure customizations may explicitly set up the pom (e.g. inherited from a parent pom) and it may be necessary to disable automatic inclusion of the resulting dependency. Also, not all supporting components drive a dependency in the pom, in which case, this property has no effect. Optional. True by default. -
getInit
Optional setting forSupportingComponentto define if any prescribed initialization behavior should be enabled. If the component supports initialization, this setting will be honored in each environment defined. SeeInitfor more details. -
getDataModulePropertyContribution
Optionally contribute properties to the Data Module Config Properties. This can be useful if certain components in the overall system might need to impact any seed data that is loaded via the data module. For example, many starter extensions may contribute example data for tenant, application, and auth use cases. For certain, ecosystem setups, it may be beneficial to override the default values (like updating any pre-configured URLs or ports) based on the configuration of a component.The key in this map is the Spring Profile for which these data module properties should be loaded and the value consists of a Map of property keys and corresponding values.
For example: {default:{spring.liquibase.parameters.myAppDefaultRedirectUri:'https://mydomain.com'}}
-
setName
The name used to identify the component. Required. -
setPlatform
A name identifying the specific platform to which this supporting component belongs. For example, thenamemay bedatabase, but theplatformwould be more specific - likepostgresql. Required. -
setDescriptor
Points to the classpath location of a template snippet that contains the necessary docker-compose fragment needed to setup this supporting item. Optional. -
setEnabled
Whether or not this supporting element is enabled. This is the primary way you define what database is supported with your application, for example. Required.- Specified by:
setEnabledin interfaceEnabledAware
-
setDomain
Domain (DNS) information used at runtime for dynamic application configuration to negotiate gateway routing and interservice communication appropriately based on the deployed environment. Required.- Specified by:
setDomainin interfaceDomainAware
-
setResourceName
Special case field useful for supporting items that provide or require an additional identifying name as part of their usage. This primarily applies to Oracle support processing and the inclusion of thexeSID used as part of the express edition. -
setOption
Special case field that applies to optional liquibase changelog name modifier. Currently, this is mainly used to reference the `oracle-short` liquibase changelogs, which maintain shorter length object identifiers for older Oracle version compatibility. To leverage the `oracle-short` support, you would specify this option value as `short`. -
setPorts
Container exposed port by key name map. The key name represents a template variable in the docker snippet that will be substituted with the port value. -
setEditSource
Supporting items can sometimes be enabled for direct source editing via this property. The assembly zip with the original project source is downloaded and expanded so that it is available for customization. This is a special case and usually applies to the solr docker project only. Optional. False by default. -
setImageUriOverride
The system will usually determine the image name for project generated components based on convention using a mixture of the component name, and docker related properties found inDocker. However, if a non-generated URI is desired to target the appropriate image for the component, it can be specified here. A valid URI would be something like:/my-prefix/my-name. Optional. Generated by default. -
setManagePom
Whether this supporting component should be managed in the project's pom.xml. Some project structure customizations may explicitly set up the pom (e.g. inherited from a parent pom) and it may be necessary to disable automatic inclusion of the resulting dependency. Also, not all supporting components drive a dependency in the pom, in which case, this property has no effect. Optional. True by default. -
setInit
Optional setting forSupportingComponentto define if any prescribed initialization behavior should be enabled. If the component supports initialization, this setting will be honored in each environment defined. SeeInitfor more details. -
setDataModulePropertyContribution
public void setDataModulePropertyContribution(Map<String, Map<String, String>> dataModulePropertyContribution) Optionally contribute properties to the Data Module Config Properties. This can be useful if certain components in the overall system might need to impact any seed data that is loaded via the data module. For example, many starter extensions may contribute example data for tenant, application, and auth use cases. For certain, ecosystem setups, it may be beneficial to override the default values (like updating any pre-configured URLs or ports) based on the configuration of a component.The key in this map is the Spring Profile for which these data module properties should be loaded and the value consists of a Map of property keys and corresponding values.
For example: {default:{spring.liquibase.parameters.myAppDefaultRedirectUri:'https://mydomain.com'}}
-
equals
-
canEqual
-
hashCode
public int hashCode() -
toString
-