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 boolean
boolean
Optionally 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 forSupportingComponent
to 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.int
hashCode()
void
Optionally contribute properties to the Data Module Config Properties.void
setDescriptor
(String descriptor) Points to the classpath location of a template snippet that contains the necessary docker-compose fragment needed to setup this supporting item.void
Domain (DNS) information used at runtime for dynamic application configuration to negotiate gateway routing and interservice communication appropriately based on the deployed environment.void
setEditSource
(Boolean editSource) Supporting items can sometimes be enabled for direct source editing via this property.void
setEnabled
(Boolean enabled) Whether or not this supporting element is enabled.void
setImageUriOverride
(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
.void
Optional setting forSupportingComponent
to define if any prescribed initialization behavior should be enabled.void
setManagePom
(Boolean managePom) Whether this supporting component should be managed in the project's pom.xml.void
The name used to identify the component.void
Special case field that applies to optional liquibase changelog name modifier.void
setPlatform
(String platform) A name identifying the specific platform to which this supporting component belongs.void
Container exposed port by key name map.void
setResourceName
(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:
getName
in interfaceDomainAware
- Specified by:
getName
in interfaceEnabledAware
-
getPlatform
A name identifying the specific platform to which this supporting component belongs. For example, thename
may bedatabase
, but theplatform
would 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:
getEnabled
in 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:
getDomain
in 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 thexe
SID 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 forSupportingComponent
to define if any prescribed initialization behavior should be enabled. If the component supports initialization, this setting will be honored in each environment defined. SeeInit
for 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, thename
may bedatabase
, but theplatform
would 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:
setEnabled
in 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:
setDomain
in 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 thexe
SID 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 forSupportingComponent
to define if any prescribed initialization behavior should be enabled. If the component supports initialization, this setting will be honored in each environment defined. SeeInit
for 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
-