[exo-jcr-commits] exo-jcr SVN: r1093 - jcr/branches/1.12.0-OPT/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/backup/impl.
do-not-reply at jboss.org
do-not-reply at jboss.org
Wed Dec 16 06:52:08 EST 2009
Author: pnedonosko
Date: 2009-12-16 06:52:07 -0500 (Wed, 16 Dec 2009)
New Revision: 1093
Modified:
jcr/branches/1.12.0-OPT/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/backup/impl/PendingChangesLog.java
Log:
EXOJCR-274: ValueData recreation in backup
Modified: jcr/branches/1.12.0-OPT/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/backup/impl/PendingChangesLog.java
===================================================================
--- jcr/branches/1.12.0-OPT/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/backup/impl/PendingChangesLog.java 2009-12-16 11:27:46 UTC (rev 1092)
+++ jcr/branches/1.12.0-OPT/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/backup/impl/PendingChangesLog.java 2009-12-16 11:52:07 UTC (rev 1093)
@@ -471,6 +471,8 @@
*/
public void restore() throws IOException
{
+ // TODO same code as in BackupWorkspaceInitializer?
+
List<ItemState> listItemState = itemDataChangesLog.getAllStates();
for (int i = 0; i < this.listFixupStream.size(); i++)
{
@@ -478,11 +480,12 @@
ItemData itemData = itemState.getData();
TransientPropertyData propertyData = (TransientPropertyData)itemData;
- TransientValueData transientValueData =
+ TransientValueData tvd =
(TransientValueData)(propertyData.getValues().get(listFixupStream.get(i).getValueDataId()));
- transientValueData.setStream(new FileInputStream(listFile.get(i)));
- transientValueData.setFileCleaner(fileCleaner);
- transientValueData.isByteArray();
+
+ // re-init the value
+ tvd.delegate(new TransientValueData(tvd.getOrderNumber(), null, null, listFile.get(i), fileCleaner, -1,
+ null, true));
}
if (listRandomAccessFile != null)
More information about the exo-jcr-commits
mailing list