public void save ( ItemStateChangesLog changes ) throws RepositoryException { PlainChangesLog statesLog = ( PlainChangesLog ) changes ; if ( LOG . isDebugEnabled ( ) ) { LOG . debug ( "save() " + this + " txStarted: " + txStarted ( ) + "\n====== Changes ======\n" + ( statesLog != null ? "\n" + statesLog . dump ( ) : "[NULL]" ) + "=====================" ) ; } if ( session . canEnrollChangeToGlobalTx ( statesLog ) ) { // Save within a global tx transactionLog . addLog ( statesLog ) ; } else { // Regular save storageDataManager . save ( new TransactionChangesLog ( statesLog ) ) ; } }
Updates the manager with new changes . If transaction is started it will fill manager s changes log else just move changes to workspace storage manager . It saves the changes AS IS - i . e . id DOES NOT care about cloning of this objects etc . Here PlainChangesLog expected .