Package com.inet.config
Class ConfigurationChangeEvent
- java.lang.Object
-
- com.inet.config.ConfigurationChangeEvent
-
public class ConfigurationChangeEvent extends java.lang.Object
This event is fired, if:- A
Configuration
has changed throughConfiguration.put(String, String)
orConfiguration.putAll(java.util.Map)
. - The "current" configuration used by the application has changed. (see
ConfigurationManager.getCurrent()
)
- Since:
- inetcore 1.0 (package changed in 14.0)
- A
-
-
Field Summary
Fields Modifier and Type Field Description static int
TYPE_CHANGE
Type specifying that the currently configuration has been changed to a different configuration than before, viaConfigurationManager.setCurrent(Configuration)
static int
TYPE_CLEAR
Type specifying that a configuration has been cleared viaConfiguration.clear()
static int
TYPE_COPY
Type specifying that a configuration has been copied viaConfigurationManager.copy(int, String, int, String)
static int
TYPE_CREATE
Type specifying that a new configuration has been created viaConfigurationManager.create(int, String)
static int
TYPE_DELETE
Type specifying that a configuration has been deleted viaConfigurationManager.delete(int, String)
static int
TYPE_IMPORT
Type specifying that a configuration has been imported viaConfigurationManager.importFromStream(int, String, java.io.InputStream)
.static int
TYPE_MODIFY
Type specifying that a configuration has been modified, e.g. viaConfiguration.put(String, String)
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Configuration
getChangedConfiguration()
Returns the configuration which was changed (or the new current configuration).java.lang.String
getChangedConfigurationName()
Returns the name of the configuration which was changed (or the name of the new current configuration).int
getChangedConfigurationScope()
Returns the scope of the configuration which was changed (or the scope of the new current configuration).int
getType()
Returns the event type which specifies exactly which change occurred with the given configuration.boolean
isCurrentConfiguration()
Returns true if the configuration was the "current" configuration at the time this event was created, false otherwise.
-
-
-
Field Detail
-
TYPE_CHANGE
public static final int TYPE_CHANGE
Type specifying that the currently configuration has been changed to a different configuration than before, viaConfigurationManager.setCurrent(Configuration)
- See Also:
- Constant Field Values
-
TYPE_CREATE
public static final int TYPE_CREATE
Type specifying that a new configuration has been created viaConfigurationManager.create(int, String)
- See Also:
- Constant Field Values
-
TYPE_MODIFY
public static final int TYPE_MODIFY
Type specifying that a configuration has been modified, e.g. viaConfiguration.put(String, String)
.- See Also:
- Constant Field Values
-
TYPE_DELETE
public static final int TYPE_DELETE
Type specifying that a configuration has been deleted viaConfigurationManager.delete(int, String)
- See Also:
- Constant Field Values
-
TYPE_IMPORT
public static final int TYPE_IMPORT
Type specifying that a configuration has been imported viaConfigurationManager.importFromStream(int, String, java.io.InputStream)
.- See Also:
- Constant Field Values
-
TYPE_COPY
public static final int TYPE_COPY
Type specifying that a configuration has been copied viaConfigurationManager.copy(int, String, int, String)
- See Also:
- Constant Field Values
-
TYPE_CLEAR
public static final int TYPE_CLEAR
Type specifying that a configuration has been cleared viaConfiguration.clear()
- See Also:
- Constant Field Values
-
-
Method Detail
-
getChangedConfiguration
public Configuration getChangedConfiguration()
Returns the configuration which was changed (or the new current configuration).- Returns:
- the configuration which was changed (or new current configuration). Never null.
- Since:
- inetcore 2.2
- See Also:
ConfigurationManager.get(int, String)
-
getChangedConfigurationName
public java.lang.String getChangedConfigurationName()
Returns the name of the configuration which was changed (or the name of the new current configuration).- Returns:
- name of the configuration which was changed (or the name of the new current configuration). Never null.
- Since:
- inetcore 1.0
- See Also:
ConfigurationManager.get(int, String)
-
getChangedConfigurationScope
public int getChangedConfigurationScope()
Returns the scope of the configuration which was changed (or the scope of the new current configuration).- Returns:
- the scope of the configuration which was changed (or the scope of the new current configuration)
- Since:
- inetcore 1.0
- See Also:
Configuration.SCOPE_SYSTEM
,Configuration.SCOPE_USER
,Configuration.SCOPE_TEMP
,ConfigurationManager.get(int, String)
-
isCurrentConfiguration
public boolean isCurrentConfiguration()
Returns true if the configuration was the "current" configuration at the time this event was created, false otherwise.- Returns:
- true if the configuration was the "current" configuration at the time this event was created, false otherwise.
- Since:
- inetcore 1.0
- See Also:
ConfigurationManager.getCurrent()
-
getType
public int getType()
Returns the event type which specifies exactly which change occurred with the given configuration. See the descriptions of the TYPE constants for more information.- Returns:
- type of configuration change event
- Since:
- inetcore 1.0
- See Also:
TYPE_CHANGE
,TYPE_CLEAR
,TYPE_COPY
,TYPE_CREATE
,TYPE_DELETE
,TYPE_IMPORT
,TYPE_MODIFY
-
-