public PlainChangesLog getChanges()
   {

      Collections.sort(changesLog.getAllStates(), new PathSorter());

      if (LOG.isDebugEnabled())
      {
         StringBuilder str = new StringBuilder();
         for (int i = 0; i < changesLog.getAllStates().size(); i++)
         {
            str.append(" ").append(ItemState.nameFromValue(changesLog.getAllStates().get(i).getState())).append("\t\t");
            str.append(changesLog.getAllStates().get(i).getData().getIdentifier()).append("\t").append("isPersisted=");
            str.append(changesLog.getAllStates().get(i).isPersisted()).append("\t").append("isEventFire=");
            str.append(changesLog.getAllStates().get(i).isEventFire()).append("\t").append("isInternallyCreated=");
            str.append(changesLog.getAllStates().get(i).isInternallyCreated()).append("\t");
            str.append(changesLog.getAllStates().get(i).getData().getQPath().getAsString()).append("\n");
         }
         LOG.debug(str);
      }
      if (isNeedReloadAncestorToSave)
      {
         PlainChangesLogImpl newChangesLog = new PlainChangesLogImpl();
         for (ItemState itemState : changesLog.getAllStates())
         {
            newChangesLog.add(new ItemState(itemState.getData(), itemState.getState(), itemState.isEventFire(),
               ancestorToSave, itemState.isInternallyCreated(), itemState.isPersisted(), itemState.getOldPath()));
         }
         changesLog.clear();
         changesLog.addAll(newChangesLog.getAllStates());
         isNeedReloadAncestorToSave = false;
      }
      return changesLog;
   }
public PlainChangesLog getChanges ( ) { Collections . sort ( changesLog . getAllStates ( ) , new PathSorter ( ) ) ; if ( LOG . isDebugEnabled ( ) ) { StringBuilder str = new StringBuilder ( ) ; for ( int i = 0 ; i < changesLog . getAllStates ( ) . size ( ) ; i ++ ) { str . append ( " " ) . append ( ItemState . nameFromValue ( changesLog . getAllStates ( ) . get ( i ) . getState ( ) ) ) . append ( "\t\t" ) ; str . append ( changesLog . getAllStates ( ) . get ( i ) . getData ( ) . getIdentifier ( ) ) . append ( "\t" ) . append ( "isPersisted=" ) ; str . append ( changesLog . getAllStates ( ) . get ( i ) . isPersisted ( ) ) . append ( "\t" ) . append ( "isEventFire=" ) ; str . append ( changesLog . getAllStates ( ) . get ( i ) . isEventFire ( ) ) . append ( "\t" ) . append ( "isInternallyCreated=" ) ; str . append ( changesLog . getAllStates ( ) . get ( i ) . isInternallyCreated ( ) ) . append ( "\t" ) ; str . append ( changesLog . getAllStates ( ) . get ( i ) . getData ( ) . getQPath ( ) . getAsString ( ) ) . append ( "\n" ) ; } LOG . debug ( str ) ; } if ( isNeedReloadAncestorToSave ) { PlainChangesLogImpl newChangesLog = new PlainChangesLogImpl ( ) ; for ( ItemState itemState : changesLog . getAllStates ( ) ) { newChangesLog . add ( new ItemState ( itemState . getData ( ) , itemState . getState ( ) , itemState . isEventFire ( ) , ancestorToSave , itemState . isInternallyCreated ( ) , itemState . isPersisted ( ) , itemState . getOldPath ( ) ) ) ; } changesLog . clear ( ) ; changesLog . addAll ( newChangesLog . getAllStates ( ) ) ; isNeedReloadAncestorToSave = false ; } return changesLog ; }
/*
(non-Javadoc)
@see
org.exoplatform.services.jcr.impl.xml.importing.ContentImporter#getChanges
()