Class ConfigurationListener

    • Constructor Detail

      • ConfigurationListener

        public ConfigurationListener()
    • Method Detail

      • postConstruct

        @PostConstruct
        private void postConstruct()
      • invokePreMethod

        private boolean invokePreMethod​(java.lang.Object target,
                                        java.util.List<java.beans.PropertyChangeEvent> changes,
                                        java.lang.String typeName)
      • invokePostMethod

        private void invokePostMethod​(java.lang.Object target,
                                      java.util.List<java.beans.PropertyChangeEvent> changes,
                                      java.lang.String typeName)
      • modifyInstanceDescriptor

        private void modifyInstanceDescriptor​(ActiveDescriptor<?> parent,
                                              java.lang.String name,
                                              java.lang.Object bean,
                                              java.lang.Object metadata,
                                              java.lang.String typeName,
                                              java.util.List<java.beans.PropertyChangeEvent> changes)
      • initialize

        private void initialize​(BeanDatabase database)
      • getTypeFromConfiguredBy

        private java.lang.String getTypeFromConfiguredBy​(ActiveDescriptor<?> descriptor)
      • commitDatabaseChange

        public void commitDatabaseChange​(BeanDatabase reference,
                                         BeanDatabase newDatabase,
                                         java.lang.Object commitMessage,
                                         java.util.List<Change> changes)
        Description copied from interface: BeanDatabaseUpdateListener
        This method is called after the change of database has already happened. If this method throws an exception subsequent listeners commit methods will be called, but the WriteableBeanDatabase.commit() method will throw an exception, indicating a possibly inconsistent state
        Specified by:
        commitDatabaseChange in interface BeanDatabaseUpdateListener
        Parameters:
        reference - The database from which the current database was derived
        newDatabase - The current bean database
        commitMessage - An object passed to the commit method in a dynamic change
        changes - The changes that were made to arrive at the current database
      • calculateProgenitorAddsAndRemoves

        private void calculateProgenitorAddsAndRemoves()
      • prepareDatabaseChange

        public void prepareDatabaseChange​(BeanDatabase currentDatabase,
                                          BeanDatabase proposedDatabase,
                                          java.lang.Object commitMessage,
                                          java.util.List<Change> changes)
        Description copied from interface: BeanDatabaseUpdateListener
        This method will be called prior to the bean database being updated. If this method throws an exception subsequent listeners prepare methods will not be called and the rollback method of any listeners that had run previously will be called and the proposedDatabase will not become the current database. If all the registered bean update listeners prepare methods return normally then the proposedDatabase will become the current database
        Specified by:
        prepareDatabaseChange in interface BeanDatabaseUpdateListener
        Parameters:
        currentDatabase - The bean database that is current in effect
        proposedDatabase - The bean database that will go into effect
        commitMessage - An object passed to the commit method in a dynamic change
        changes - The changes that were made to the current database
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object