Class ChenileConfiguration

java.lang.Object
org.chenile.core.model.ChenileConfiguration

public class ChenileConfiguration extends Object
The core class that contains the entire ChenileConfiguration. This contains the configuration information from chenile.properties as well as a reference to all the configured services and events in Chenile
Author:
Raja Shankar Kolluru
  • Field Details

  • Constructor Details

  • Method Details

    • getBaseUrl

      public String getBaseUrl()
    • setBaseUrl

      public void setBaseUrl(String baseUrl)
    • getEventLoggerName

      public String getEventLoggerName()
    • setEventLoggerName

      public void setEventLoggerName(String eventLoggerName)
    • getServices

      public Map<String, ChenileServiceDefinition> getServices()
    • setService

      public void setService(String serviceName, ChenileServiceDefinition service)
    • getMonolithName

      public String getMonolithName()
    • getModuleName

      @Deprecated public String getModuleName()
      Deprecated.
    • addPreProcessors

      public void addPreProcessors(String preProcessors)
    • addPostProcessors

      public void addPostProcessors(String postProcessors)
    • getPreProcessorCommands

      public List<Command<ChenileExchange>> getPreProcessorCommands()
      The deployable-wide pre-processors configured in chenile.pre.processors. Resolved once, all or nothing: if any configured name cannot be resolved, a ConfigurationException is thrown and nothing is cached, so a later call fails the same way instead of silently running a partial list. Normally resolved at startup by validateInterceptors().
      Returns:
      the pre-processor commands, or null if none are configured
    • getPostProcessorCommands

      public List<Command<ChenileExchange>> getPostProcessorCommands()
      The deployable-wide post-processors configured in chenile.post.processors. Same all-or-nothing semantics as getPreProcessorCommands().
      Returns:
      the post-processor commands, or null if none are configured
    • validateInterceptors

      public void validateInterceptors()
      Resolves every deployable-wide interceptor (pre-processors, post-processors and the exception handler) so that a misspelt or mistyped bean name fails the application at startup rather than the first request. Called by ChenileInterceptorValidator.
      Throws:
      ConfigurationException - if any of them cannot be resolved
    • resolveCommands

      private List<Command<ChenileExchange>> resolveCommands(String names, String property)
      Builds the complete command list in a local variable and returns it only if every name resolved. Blank entries and surrounding spaces ("a, b,") are tolerated.
    • getEvents

      public Map<String, ChenileEventDefinition> getEvents()
    • addEvent

      public void addEvent(ChenileEventDefinition event)
    • getOtherExtensions

      public Map<String, Map<String,?>> getOtherExtensions()
    • setOtherExtensions

      public void setOtherExtensions(Map<String, Map<String,?>> otherExtensions)
    • setChenileExceptionHandlerName

      public void setChenileExceptionHandlerName(String exceptionHandlerName)
    • getChenileExceptionHandler

      public ChenileExceptionHandler getChenileExceptionHandler()
    • getVersion

      public String getVersion()
    • getVersion

      public String getVersion(String moduleOrServiceName)
    • setVersion

      public void setVersion(String version)
    • getVersions

      public Map<String,String> getVersions()
    • setVersions

      public void setVersions(Map<String,String> versions)
    • addVersion

      public void addVersion(String key, String value)
    • getEventLogger

      public EventLogger getEventLogger()
    • getTrajectories

      public Map<String, TrajectoryDefinition> getTrajectories()
    • addTrajectory

      public void addTrajectory(TrajectoryDefinition trajectoryDefinition)