[exo-jcr-commits] exo-jcr SVN: r1001 - in jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl: xml/importing and 1 other directories.
do-not-reply at jboss.org
do-not-reply at jboss.org
Fri Dec 11 05:28:00 EST 2009
Author: tolusha
Date: 2009-12-11 05:27:59 -0500 (Fri, 11 Dec 2009)
New Revision: 1001
Modified:
jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/ACLInheritanceSupportedWorkspaceDataManager.java
jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/WorkspacePersistentDataManager.java
jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/xml/importing/BaseXmlImporter.java
jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/xml/importing/dataflow/ImportNodeData.java
Log:
EXOJCR-300: fix
Modified: jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/ACLInheritanceSupportedWorkspaceDataManager.java
===================================================================
--- jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/ACLInheritanceSupportedWorkspaceDataManager.java 2009-12-11 09:13:48 UTC (rev 1000)
+++ jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/ACLInheritanceSupportedWorkspaceDataManager.java 2009-12-11 10:27:59 UTC (rev 1001)
@@ -147,8 +147,8 @@
public List<NodeData> getChildNodesData(NodeData parent) throws RepositoryException
{
final List<NodeData> nodes = persistentManager.getChildNodesData(parent);
- for (NodeData node : nodes)
- initACL(parent, node);
+ for (int i = 0; i < nodes.size(); i++)
+ nodes.set(i, (NodeData)initACL(parent, nodes.get(i)));
return nodes;
}
Modified: jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/WorkspacePersistentDataManager.java
===================================================================
--- jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/WorkspacePersistentDataManager.java 2009-12-11 09:13:48 UTC (rev 1000)
+++ jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/WorkspacePersistentDataManager.java 2009-12-11 10:27:59 UTC (rev 1001)
@@ -396,7 +396,7 @@
protected PlainChangesLogImpl save(PlainChangesLog changesLog) throws InvalidItemStateException,
RepositoryException, IOException
- { //LOG.info(changesLog.dump())
+ { //LOG.info(changesLog.dump())
// copy state
PlainChangesLogImpl newLog =
new PlainChangesLogImpl(new ArrayList<ItemState>(), changesLog.getSessionId(), changesLog.getEventType(),
@@ -437,27 +437,35 @@
List<ValueData> values = new ArrayList<ValueData>();
for (ValueData vd : prevData.getValues())
{
- if (vd.isByteArray())
+ if (vd instanceof TransientValueData)
{
- values.add(new ByteArrayPersistedValueData(vd.getAsByteArray(), vd.getOrderNumber()));
+
+ if (vd.isByteArray())
+ {
+ values.add(new ByteArrayPersistedValueData(vd.getAsByteArray(), vd.getOrderNumber()));
+ }
+ else
+ {
+ // TODO ask dest file from VS provider, can be null after
+ // TODO what if JDBC spool used, i.e. without VS = storage will setPersistedFile()
+ // TODO for JBC case, the storage connection will evict the replicated Value to read it from the DB
+ File destFile = null;
+
+ TransientValueData tvd = (TransientValueData)vd;
+ // TODO review TransientValueData logic about spool file and stream
+ values.add(new StreamPersistedValueData(destFile, tvd.getSpoolFile(),
+ tvd.getSpoolFile() == null ? tvd.getAsStream(false) : null, vd.getOrderNumber()));
+
+ // {
+ // throw new RepositoryException(
+ // "Unexpected stream based ValueData implementaion on persistent level, only TransientValueData or PersistedValueData allowed. "
+ // + vd.getClass());
+ // }
+ }
}
else
{
- // TODO ask dest file from VS provider, can be null after
- // TODO what if JDBC spool used, i.e. without VS = storage will setPersistedFile()
- // TODO for JBC case, the storage connection will evict the replicated Value to read it from the DB
- File destFile = null;
-
- TransientValueData tvd = (TransientValueData)vd;
- // TODO review TransientValueData logic about spool file and stream
- values.add(new StreamPersistedValueData(destFile, tvd.getSpoolFile(),
- tvd.getSpoolFile() == null ? tvd.getAsStream(false) : null, vd.getOrderNumber()));
-
- // {
- // throw new RepositoryException(
- // "Unexpected stream based ValueData implementaion on persistent level, only TransientValueData or PersistedValueData allowed. "
- // + vd.getClass());
- // }
+ values.add(vd);
}
}
Modified: jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/xml/importing/BaseXmlImporter.java
===================================================================
--- jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/xml/importing/BaseXmlImporter.java 2009-12-11 09:13:48 UTC (rev 1000)
+++ jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/xml/importing/BaseXmlImporter.java 2009-12-11 10:27:59 UTC (rev 1001)
@@ -580,7 +580,7 @@
case ImportUUIDBehavior.IMPORT_UUID_COLLISION_REPLACE_EXISTING :
removeExisted(sameUuidItem);
ItemData parentOfsameUuidItem = dataConsumer.getItemData(sameUuidItem.getParentIdentifier());
- tree.push(ImportNodeData.createCopy((TransientNodeData)parentOfsameUuidItem));
+ tree.push(ImportNodeData.createCopy((NodeData)parentOfsameUuidItem));
break;
case ImportUUIDBehavior.IMPORT_UUID_COLLISION_THROW :
// If an incoming referenceable node has the same UUID as a node
Modified: jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/xml/importing/dataflow/ImportNodeData.java
===================================================================
--- jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/xml/importing/dataflow/ImportNodeData.java 2009-12-11 09:13:48 UTC (rev 1000)
+++ jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/xml/importing/dataflow/ImportNodeData.java 2009-12-11 10:27:59 UTC (rev 1001)
@@ -22,6 +22,7 @@
import org.exoplatform.services.jcr.core.nodetype.NodeTypeData;
import org.exoplatform.services.jcr.datamodel.InternalQName;
import org.exoplatform.services.jcr.datamodel.ItemData;
+import org.exoplatform.services.jcr.datamodel.NodeData;
import org.exoplatform.services.jcr.datamodel.QPath;
import org.exoplatform.services.jcr.impl.dataflow.TransientNodeData;
import org.exoplatform.services.log.ExoLogger;
@@ -325,7 +326,7 @@
this.versionHistoryIdentifier = versionHistoryIdentifier;
}
- public static ImportNodeData createCopy(TransientNodeData source)
+ public static ImportNodeData createCopy(NodeData source)
{
return new ImportNodeData(source.getQPath(), source.getIdentifier(), source.getPersistedVersion(), source
.getPrimaryTypeName(), source.getMixinTypeNames(), source.getOrderNumber(), source.getParentIdentifier(),
More information about the exo-jcr-commits
mailing list