public final class ConfigurationContextChangeBuilder extends Object
PropertySource
. Consumers of these events
can observe changes to property sources and
ConfigurationContext
contains the changed PropertySource
(Note: the reference to a property source is never affected by a
change, it is the data of the property source only).Configuration
to create a change
event on configuration level.
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(org.apache.tamaya.spi.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()
Just creates a new ConfigurationContextBuilder using the current COnfigurationContext has root resource.
|
static ConfigurationContextChangeBuilder |
of(org.apache.tamaya.spi.ConfigurationContext context)
Creates a new instance current this builder.
|
ConfigurationContextChangeBuilder |
removedPropertySource(org.apache.tamaya.spi.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)
Apply given timestamp to the set being built.
|
ConfigurationContextChangeBuilder |
setVersion(String version)
Apply a version/UUID to the set being built.
|
String |
toString() |
public static ConfigurationContextChangeBuilder of()
public static ConfigurationContextChangeBuilder of(org.apache.tamaya.spi.ConfigurationContext context)
context
- context to use for creating changesets.public ConfigurationContextChangeBuilder setVersion(String version)
version
- the version to apply, or null, to let the system generate a version for you.public ConfigurationContextChangeBuilder setTimestamp(long timestamp)
timestamp
- timestamp to set.public ConfigurationContextChangeBuilder newPropertySource(org.apache.tamaya.spi.PropertySource propertySource)
propertySource
- the new target state, not null.public ConfigurationContextChangeBuilder removedPropertySource(org.apache.tamaya.spi.PropertySource propertySource)
propertySource
- the new target state, not null.public ConfigurationContextChangeBuilder changedPropertySource(PropertySourceChange propertySourceChange)
propertySourceChange
- the change state, not null.public boolean isEmpty()
public void reset()
public ConfigurationContextChange build()
Copyright © 2014–2016 Apache Software Foundation. All rights reserved.