java.lang.Object
com.microservices.starter.core.environment.Component
All Implemented Interfaces:
DomainAware, EnabledAware, Identifiable, Serializable
Direct Known Subclasses:
FlexComponent, LibraryComponent

public abstract class Component extends Object implements Serializable, Identifiable, DomainAware
Represents a component in the Broadleaf microservice ecosystem. In the manifest structure, it is used to represent flexpackages, and individual service library components.
See Also:
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected boolean
     
    boolean
     
    An alternative name used to identify the component.
    Identifies information based on the type of datasource leveraged by the service library component.
    Domain (DNS) information used at runtime for dynamic application configuration to negotiate gateway routing and interservice communication appropriately based on the deployed environment.
    Whether or not the component is enabled.
    The name used to identify the component.
    Name to use for this component when creating packages for the Java classpath during code directory and project generation.
    The ports exposed and supported by the component.
    int
     
    void
    setAltName(String altName)
     
    void
    Identifies information based on the type of datasource leveraged by the service library component.
    void
    setDomain(Domain domain)
    Domain (DNS) information used at runtime for dynamic application configuration to negotiate gateway routing and interservice communication appropriately based on the deployed environment.
    void
     
    void
     
    void
    setPackageIdentifier(String packageIdentifier)
    Name to use for this component when creating packages for the Java classpath during code directory and project generation.
    void
    setPorts(List<Port> ports)
     
     

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • Component

      public Component()
  • Method Details

    • getName

      public String getName()
      Description copied from interface: Identifiable
      The name used to identify the component. Required.
      Specified by:
      getName in interface DomainAware
      Specified by:
      getName in interface EnabledAware
      Specified by:
      getName in interface Identifiable
    • getAltName

      public String getAltName()
      Description copied from interface: Identifiable
      An alternative name used to identify the component. Generally the longer version of the name for those components with long or descriptive names. Optional.
      Specified by:
      getAltName in interface Identifiable
    • getDataSource

      public DataSource getDataSource()
      Identifies information based on the type of datasource leveraged by the service library component. This is a special case setting that allows a service to forgo data routing in favor of a single, non-routed datasource. Requires the service is not deployed to a composite flexpackage (granular only). This generally only applies to auth. Optional. Composite datasource assumed by default.
    • getPackageIdentifier

      public String getPackageIdentifier()
      Name to use for this component when creating packages for the Java classpath during code directory and project generation. Generally used to workaround component names that are Java reserved words (like `import`). By default, the component name is used (or the altName, if specified). However, care should be taken when using altName, as by convention, various other artifacts depend on that value for naming. Optional.
    • getDomain

      public Domain getDomain()
      Description copied from interface: Identifiable
      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 interface DomainAware
      Specified by:
      getDomain in interface Identifiable
    • getEnabled

      public Boolean getEnabled()
      Description copied from interface: Identifiable
      Whether or not the component is enabled. Disabled flexpackage components are not included in docker-compose and are not included in generated project structure, disabled service library components are not included in generated project structure (in which case it is assumed Broadleaf's out-of-the-box version is used), and disabled "other" components are not included in docker-compose. Required.
      Specified by:
      getEnabled in interface EnabledAware
      Specified by:
      getEnabled in interface Identifiable
    • getPorts

      public List<Port> getPorts()
      Description copied from interface: Identifiable
      The ports exposed and supported by the component. Required.
      Specified by:
      getPorts in interface Identifiable
    • setName

      public void setName(String name)
    • setAltName

      public void setAltName(String altName)
    • setDataSource

      public void setDataSource(DataSource dataSource)
      Identifies information based on the type of datasource leveraged by the service library component. This is a special case setting that allows a service to forgo data routing in favor of a single, non-routed datasource. Requires the service is not deployed to a composite flexpackage (granular only). This generally only applies to auth. Optional. Composite datasource assumed by default.
    • setPackageIdentifier

      public void setPackageIdentifier(String packageIdentifier)
      Name to use for this component when creating packages for the Java classpath during code directory and project generation. Generally used to workaround component names that are Java reserved words (like `import`). By default, the component name is used (or the altName, if specified). However, care should be taken when using altName, as by convention, various other artifacts depend on that value for naming. Optional.
    • setDomain

      public void setDomain(Domain domain)
      Description copied from interface: DomainAware
      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 interface DomainAware
    • setEnabled

      public void setEnabled(Boolean enabled)
      Specified by:
      setEnabled in interface EnabledAware
    • setPorts

      public void setPorts(List<Port> ports)
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • canEqual

      protected boolean canEqual(Object other)
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object