Class PropertyTrait

java.lang.Object
org.apache.camel.dsl.modeline.PropertyTrait
All Implemented Interfaces:
org.apache.camel.CamelContextAware, Trait, org.apache.camel.Ordered, org.apache.camel.spi.HasCamelContext, org.apache.camel.spi.LoadablePropertiesSource, org.apache.camel.spi.PropertiesSource

@JdkService("properties-source-factory") public class PropertyTrait extends Object implements Trait, org.apache.camel.spi.LoadablePropertiesSource, org.apache.camel.CamelContextAware, org.apache.camel.Ordered
This trait is a PropertiesSource so Camel properties component will use this directly when looking for property values.
  • Constructor Details

    • PropertyTrait

      public PropertyTrait()
  • Method Details

    • getOrder

      public int getOrder()
      Specified by:
      getOrder in interface org.apache.camel.Ordered
    • getCamelContext

      public org.apache.camel.CamelContext getCamelContext()
      Specified by:
      getCamelContext in interface org.apache.camel.spi.HasCamelContext
    • setCamelContext

      public void setCamelContext(org.apache.camel.CamelContext camelContext)
      Specified by:
      setCamelContext in interface org.apache.camel.CamelContextAware
    • getName

      public String getName()
      Description copied from interface: Trait
      Name of trait
      Specified by:
      getName in interface org.apache.camel.spi.PropertiesSource
      Specified by:
      getName in interface Trait
    • getProperty

      public String getProperty(String name)
      Specified by:
      getProperty in interface org.apache.camel.spi.PropertiesSource
    • parseTrait

      public org.apache.camel.spi.CamelContextCustomizer parseTrait(org.apache.camel.spi.Resource resource, String trait)
      Description copied from interface: Trait
      Parses the trait
      Specified by:
      parseTrait in interface Trait
      Parameters:
      resource - the source
      trait - the trait
      Returns:
      a customizer if the trait is accepted, otherwise null is returned
    • setProperty

      protected void setProperty(org.apache.camel.spi.Resource resource, String key, String value)
    • loadProperties

      public Properties loadProperties()
      Specified by:
      loadProperties in interface org.apache.camel.spi.LoadablePropertiesSource
    • loadProperties

      public Properties loadProperties(Predicate<String> filter)
      Specified by:
      loadProperties in interface org.apache.camel.spi.LoadablePropertiesSource
    • reloadProperties

      public void reloadProperties(String location)
      Specified by:
      reloadProperties in interface org.apache.camel.spi.LoadablePropertiesSource
    • toString

      public String toString()
      Overrides:
      toString in class Object