@Singleton @Visibility(value=LOCAL) public class ConfigurationListener extends Object implements BeanDatabaseUpdateListener
Constructor and Description |
---|
ConfigurationListener() |
Modifier and Type | Method and Description |
---|---|
void |
commitDatabaseChange(BeanDatabase reference,
BeanDatabase newDatabase,
Object commitMessage,
List<Change> changes)
This method is called after the change of database has already happened.
|
void |
prepareDatabaseChange(BeanDatabase currentDatabase,
BeanDatabase proposedDatabase,
Object commitMessage,
List<Change> changes)
This method will be called prior to the bean database being updated.
|
void |
rollbackDatabaseChange(BeanDatabase currentDatabase,
BeanDatabase proposedDatabase,
Object commitMessage,
List<Change> changes)
If any
BeanDatabaseUpdateListener.prepareDatabaseChange(BeanDatabase, BeanDatabase, Object, List)
throws an exception this method will be called on all listeners whose
BeanDatabaseUpdateListener.prepareDatabaseChange(BeanDatabase, BeanDatabase, Object, List) had already
been succesfully called. |
String |
toString() |
public void commitDatabaseChange(BeanDatabase reference, BeanDatabase newDatabase, Object commitMessage, List<Change> changes)
BeanDatabaseUpdateListener
WriteableBeanDatabase.commit()
method
will throw an exception, indicating a possibly inconsistent statecommitDatabaseChange
in interface BeanDatabaseUpdateListener
reference
- The database from which the current database was derivednewDatabase
- The current bean databasecommitMessage
- An object passed to the commit method in a dynamic changechanges
- The changes that were made to arrive at the current databasepublic void prepareDatabaseChange(BeanDatabase currentDatabase, BeanDatabase proposedDatabase, Object commitMessage, List<Change> changes)
BeanDatabaseUpdateListener
prepareDatabaseChange
in interface BeanDatabaseUpdateListener
currentDatabase
- The bean database that is current in effectproposedDatabase
- The bean database that will go into effectcommitMessage
- An object passed to the commit method in a dynamic changechanges
- The changes that were made to the current databasepublic void rollbackDatabaseChange(BeanDatabase currentDatabase, BeanDatabase proposedDatabase, Object commitMessage, List<Change> changes)
BeanDatabaseUpdateListener
BeanDatabaseUpdateListener.prepareDatabaseChange(BeanDatabase, BeanDatabase, Object, List)
throws an exception this method will be called on all listeners whose
BeanDatabaseUpdateListener.prepareDatabaseChange(BeanDatabase, BeanDatabase, Object, List)
had already
been succesfully called. If this method throws an exception subsequent listeners
rollback methods will be called and the exception will be returned in the exception
thrown to the caller of WriteableBeanDatabase.commit()
methodrollbackDatabaseChange
in interface BeanDatabaseUpdateListener
currentDatabase
- The bean database that is current in effectproposedDatabase
- The bean database that was to go into effect (but which will not)commitMessage
- An object passed to the commit method in a dynamic changechanges
- The changes that were proposed to be made to the current databaseCopyright © 2009-2017, Oracle and/or its affiliates. All Rights Reserved.