private void writeAddition ( CatalogType newType ) { // Don't write additions if the field can be ignored if ( checkAddIgnoreList ( newType ) ) { return ; } // verify this is possible, write an error and mark return code false if so String errorMessage = checkAddDropWhitelist ( newType , ChangeType . ADDITION ) ; // if it's not possible with non-empty tables, check for possible with empty tables if ( errorMessage != null ) { TablePopulationRequirements response = checkAddDropIfTableIsEmptyWhitelist ( newType , ChangeType . ADDITION ) ; // handle all the error messages and state from the modify check List < TablePopulationRequirements > responseList = null ; if ( response != null ) { responseList = Collections . singletonList ( response ) ; } processModifyResponses ( errorMessage , responseList ) ; } if ( ! m_requiresCatalogDiffCmdsApplyToEE && checkCatalogDiffShouldApplyToEE ( newType ) ) { m_requiresCatalogDiffCmdsApplyToEE = true ; } // write the commands to make it so // they will be ignored if the change is unsupported newType . accept ( m_serializer ) ; // add it to the set of additions to later compute descriptive text CatalogChangeGroup cgrp = m_changes . get ( DiffClass . get ( newType ) ) ; cgrp . processAddition ( newType ) ; }
Add an addition