-
1. Re: ModeShape Change Custom Node and Properties at External Resources
hchiorean Nov 14, 2014 4:09 AM (in response to mustafamizrak)What does your configuration look like ? The FSConnector supports (via the configuration) multiple types of extra properties stores: File system connector - ModeShape 4 - Project Documentation Editor
I want to change custom properties value. However, the previous value does not change.
How are you changing/reading the values ? Are doing it via the JCR API ?
If so, what does ModeShape provide different than writing binary with
FileOutputStream in Java?
ModeShape's FileSystemConnector provides a way to project/integrate the repository with an external FS and therefore manipulate files & folders via the JCR API. Extra properties are stored/handled differently depending on the configuration. By default, ModeShape should store these properties in the same place as the regular (repository internal) nodes.
-
2. Re: Re: ModeShape Change Custom Node and Properties at External Resources
mustafamizrak Nov 14, 2014 4:45 AM (in response to hchiorean)External resource configuration:
/subsystem=modeshape/repository=samplerepository/source=sampleextsource:add(classname="org.modeshape.connector.filesystem.FileSystemConnector",properties=[{"directoryPath"=>"/somewhere"}], readonly="false",projections=["default:/extsource => /"], cacheTtlSeconds="1")
Reading and updating property values:
// Creating custom type and property NodeTypeManager ntm = ... NodeTypeTemplate ntt = ntm.createNodeTypeTemplate(); ntt.setName("sometype"); ntt.setMixin(true); PropertyDefinitionTemplate pdt = ntm.createPropertyDefinitionTemplate(); pdt.setName("someproperty"); pdt.setRequiredType(PropertyType.STRING); ntt.getPropertyDefinitionTemplates().add(pdt); ntm.registerNodeType(ntt, true); ... Node node = ... node.addMixin("sometype"); node.setProperty("someproperty", "sample"); node.addMixin(JcrConstants.MIX_REFERENCEABLE); // Changing "someproperty" property value "sample" to "change" in somewhere else. session = ... Node node = ... node.setProperty("someproperty", "change"); session.save();
However, "someproperty" is still "sample".
With external fs resources, we cannot use versioning, hashed naming and structured binary file organization. That is why I asked:
If so, what does ModeShape provide different than writing binary with
FileOutputStream in Java?
Regards.
-
3. Re: Re: ModeShape Change Custom Node and Properties at External Resources
hchiorean Nov 14, 2014 5:22 AM (in response to mustafamizrak)It does look like a bug then, since the extra properties should be stored in the ISPN cache. Feel free to open a JIRA for this. Thanks.