-
15. Re: Modeshape 3.1.1 and federation
vasilievip Feb 8, 2013 11:20 AM (in response to rhauch)>is this the file systm connector or a custom connector?
This is filesystem connector
>I'm not sure what this means. Are you writing/using a CMIS connector?
This means that I'll go and fix chemistry code to expect that ID "before" save and id "after" save may be different
>Are you writing/using a CMIS connector?
I'm working on POC with new modeshape and existing filesystem connector so far. But will provide pull request for initial version of CMIS connector in near feature I hope.
>Please remember that we're dealing with lots of different people doing different things, and we can't always keep all the details separate.
>We really try, but sometimes being a little be clearer helps us out a lot.
I see that, you guys doing really great job (not sure how you handle this combining with coding), sorry for confusion but I just can't get thing working and a bit lost...
-
16. Re: Modeshape 3.1.1 and federation
vasilievip Feb 8, 2013 11:35 AM (in response to hchiorean)Horia Chiorean wrote:
This is a valid FileSystemConnector bug and is caused by the implementation of the newDocumentId() method by the FSConnector, in the case when the root folder of the connector is "/".
Please open a JIRA issue for the FileSystemConnector. Thanks
Working on test case, thanks
-
17. Re: Modeshape 3.1.1 and federation
hchiorean Feb 8, 2013 12:08 PM (in response to vasilievip)The test case from your latest example (where you check the identifiers) should be enough.
-
18. Re: Modeshape 3.1.1 and federation
vasilievip Feb 12, 2013 12:44 PM (in response to hchiorean)Regarding MODE-1803: could you please give me hints on how to update WritableSessionCache and remap new ID of the node after its persisted? I tried to do that, but it looks like I'm missing something. My idea is: When new node created and get's persisted - update parent and change child reference + update childs and change parent key. So far I think I have code on how to do that in WritableSessionCache, but cant get it working...
{code}
if (node.isNew()) {
// We need to create the schematic entry for the new node ...
SchematicEntry storedDoc = documentStore.storeDocument(keyStr, doc);
NodeKey newKey = key;
if (storedDoc != null) {
newKey = new NodeKey(key.getSourceKey(), key.getWorkspaceKey(), storedDoc.asDocument().getString(DocumentTranslator.KEY));
...
if (newParent != null) {
CachedNode parentInSession = getNode(newParent);
if (parentInSession != null) {
if (parentInSession.getChildReferences(this).hasChild(key)) {
List<Property> properties = new ArrayList<Property>();
Iterator<Property> propertyIterator = parentInSession.getProperties(this);
while (propertyIterator.hasNext()){
properties.add(propertyIterator.next());
}
((SessionNode) parentInSession).removeChild(this, key);
((SessionNode) parentInSession).createChild(this, newKey, newPath.getLastSegment().getName(), properties);
}
}
}
....
}
{code}