org.apache.tamaya.events.delta

## Class ConfigurationContextChangeBuilder

- java.lang.Object
- - org.apache.tamaya.events.delta.ConfigurationContextChangeBuilder

-     public final class ConfigurationContextChangeBuilder
      extends Object

  Models a set current changes applied to a `PropertySource`. Consumers of these events can observing changes to property sources and
  1. Check if their current configuration instance (`ConfigurationContext` contains the changed `PropertySource` (Note: the reference tova property source is never affected by a change, its only the data of the property source).
  2. If so corresponding action may be taken, such as reevaluating the configuration values (depending on the update policy) or reevaluating the complete `Configuration` to create a change event on configuration level.

- - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `ConfigurationContextChange` | `build()` Builds the corresponding change set.
    `ConfigurationContextChangeBuilder` | `changedPropertySource(PropertySourceChange propertySourceChange)` This method records all changes to be applied to the base property provider/configuration to achieve the given target state.
    `boolean` | `isEmpty()` Checks if the change set is empty, i.e. does not contain any changes.
    `ConfigurationContextChangeBuilder` | `newPropertySource(PropertySource propertySource)` This method records all changes to be applied to the base property provider/configuration to achieve the given target state.
    `static ConfigurationContextChangeBuilder` | `of()` Creates a new instance current this builder.
    `ConfigurationContextChangeBuilder` | `removedPropertySource(PropertySource propertySource)` This method records all changes to be applied to the base property provider/configuration to achieve the given target state.
    `void` | `reset()` Resets this change set instance.
    `ConfigurationContextChangeBuilder` | `setTimestamp(long timestamp)`
    `ConfigurationContextChangeBuilder` | `setVersion(String version)`
    `String` | `toString()`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Method Detail

    - #### of

          public static ConfigurationContextChangeBuilder of()

      Creates a new instance current this builder.
      Returns:
        the builder for chaining.

    - #### setVersion

          public ConfigurationContextChangeBuilder setVersion(String version)

    - #### setTimestamp

          public ConfigurationContextChangeBuilder setTimestamp(long timestamp)

    - #### newPropertySource

          public ConfigurationContextChangeBuilder newPropertySource(PropertySource propertySource)

      This method records all changes to be applied to the base property provider/configuration to achieve the given target state.
      Parameters:
        `propertySource` - the new target state, not null.
      Returns:
        the builder for chaining.

    - #### removedPropertySource

          public ConfigurationContextChangeBuilder removedPropertySource(PropertySource propertySource)

      This method records all changes to be applied to the base property provider/configuration to achieve the given target state.
      Parameters:
        `propertySource` - the new target state, not null.
      Returns:
        the builder for chaining.

    - #### changedPropertySource

          public ConfigurationContextChangeBuilder changedPropertySource(PropertySourceChange propertySourceChange)

      This method records all changes to be applied to the base property provider/configuration to achieve the given target state.
      Parameters:
        `propertySourceChange` - the change state, not null.
      Returns:
        the builder for chaining.

    - #### isEmpty

          public boolean isEmpty()

      Checks if the change set is empty, i.e. does not contain any changes.
      Returns:
        true, if the set is empty.

    - #### reset

          public void reset()

      Resets this change set instance. This will clear all changes done to this builder, so the set will be empty.

    - #### build

          public ConfigurationContextChange build()

      Builds the corresponding change set.
      Returns:
        the new change set, never null.

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

Copyright © 2014–2015 Apache Software Foundation. All rights reserved.