Supply parsed JSON content through the importer interface#19
Supply parsed JSON content through the importer interface#19Alfusainey wants to merge 7379 commits intoapache:trunkfrom
Conversation
…ature files git-svn-id: https://svn.apache.org/repos/asf/jackrabbit/trunk@1437374 13f79535-47bb-0310-9956-ffa450edef68
… sources git-svn-id: https://svn.apache.org/repos/asf/jackrabbit/trunk@1437384 13f79535-47bb-0310-9956-ffa450edef68
git-svn-id: https://svn.apache.org/repos/asf/jackrabbit/trunk@1437618 13f79535-47bb-0310-9956-ffa450edef68
git-svn-id: https://svn.apache.org/repos/asf/jackrabbit/trunk@1437928 13f79535-47bb-0310-9956-ffa450edef68
git-svn-id: https://svn.apache.org/repos/asf/jackrabbit/trunk@1437933 13f79535-47bb-0310-9956-ffa450edef68
…WebDav git-svn-id: https://svn.apache.org/repos/asf/jackrabbit/trunk@1437963 13f79535-47bb-0310-9956-ffa450edef68
…WebDav Restore binary compatibility. git-svn-id: https://svn.apache.org/repos/asf/jackrabbit/trunk@1438158 13f79535-47bb-0310-9956-ffa450edef68
git-svn-id: https://svn.apache.org/repos/asf/jackrabbit/trunk@1438541 13f79535-47bb-0310-9956-ffa450edef68
git-svn-id: https://svn.apache.org/repos/asf/jackrabbit/trunk@1439296 13f79535-47bb-0310-9956-ffa450edef68
…ernally git-svn-id: https://svn.apache.org/repos/asf/jackrabbit/trunk@1439312 13f79535-47bb-0310-9956-ffa450edef68
The release checker script now lives on dist.apache.org. Also update the release profile. git-svn-id: https://svn.apache.org/repos/asf/jackrabbit/trunk@1439346 13f79535-47bb-0310-9956-ffa450edef68
…side a Method git-svn-id: https://svn.apache.org/repos/asf/jackrabbit/trunk@1439768 13f79535-47bb-0310-9956-ffa450edef68
…WebDav Stick to absolute URIs as the default. git-svn-id: https://svn.apache.org/repos/asf/jackrabbit/trunk@1439797 13f79535-47bb-0310-9956-ffa450edef68
git-svn-id: https://svn.apache.org/repos/asf/jackrabbit/trunk@1439927 13f79535-47bb-0310-9956-ffa450edef68
… has the invalid child node entry, not the missing child node git-svn-id: https://svn.apache.org/repos/asf/jackrabbit/trunk@1440059 13f79535-47bb-0310-9956-ffa450edef68
Mark the failing test as a known issue. git-svn-id: https://svn.apache.org/repos/asf/jackrabbit/trunk@1440336 13f79535-47bb-0310-9956-ffa450edef68
Patch by Randall Hauch. git-svn-id: https://svn.apache.org/repos/asf/jackrabbit/trunk@1440456 13f79535-47bb-0310-9956-ffa450edef68
… in the repository that should be indexed are present in the index. because this check will take more time and resources it must be explicitly enabled using a system property. git-svn-id: https://svn.apache.org/repos/asf/jackrabbit/trunk@1440908 13f79535-47bb-0310-9956-ffa450edef68
…on storage via the internal version management API git-svn-id: https://svn.apache.org/repos/asf/jackrabbit/trunk@1440917 13f79535-47bb-0310-9956-ffa450edef68
…itional check overall performance has actually increased it is not necessary to be able to skip the reverse check anymore. git-svn-id: https://svn.apache.org/repos/asf/jackrabbit/trunk@1442061 13f79535-47bb-0310-9956-ffa450edef68
… version history in order that repositories can prevent such actions as a matter of repository-wide policy git-svn-id: https://svn.apache.org/repos/asf/jackrabbit/trunk@1443652 13f79535-47bb-0310-9956-ffa450edef68
git-svn-id: https://svn.apache.org/repos/asf/jackrabbit/trunk@1443876 13f79535-47bb-0310-9956-ffa450edef68
git-svn-id: https://svn.apache.org/repos/asf/jackrabbit/trunk@1443885 13f79535-47bb-0310-9956-ffa450edef68
…ermission for repository wide version removal policy. need to rethink this. git-svn-id: https://svn.apache.org/repos/asf/jackrabbit/trunk@1443943 13f79535-47bb-0310-9956-ffa450edef68
git-svn-id: https://svn.apache.org/repos/asf/jackrabbit/trunk@1444501 13f79535-47bb-0310-9956-ffa450edef68
…to concurrent updates git-svn-id: https://svn.apache.org/repos/asf/jackrabbit/trunk@1444515 13f79535-47bb-0310-9956-ffa450edef68
git-svn-id: https://svn.apache.org/repos/asf/jackrabbit/trunk@1444654 13f79535-47bb-0310-9956-ffa450edef68
git-svn-id: https://svn.apache.org/repos/asf/jackrabbit/trunk@1444666 13f79535-47bb-0310-9956-ffa450edef68
git-svn-id: https://svn.apache.org/repos/asf/jackrabbit/trunk@1444683 13f79535-47bb-0310-9956-ffa450edef68
git-svn-id: https://svn.apache.org/repos/asf/jackrabbit/trunk@1444755 13f79535-47bb-0310-9956-ffa450edef68
…al form-size restrictions git-svn-id: https://svn.apache.org/repos/asf/jackrabbit/trunk@1567314 13f79535-47bb-0310-9956-ffa450edef68
AbstractAccessControlEntryImpl: add proper implementation for getRestrictions git-svn-id: https://svn.apache.org/repos/asf/jackrabbit/trunk@1569523 13f79535-47bb-0310-9956-ffa450edef68
git-svn-id: https://svn.apache.org/repos/asf/jackrabbit/trunk@1569533 13f79535-47bb-0310-9956-ffa450edef68
…ned from VersionHistory.getAllVersions(). git-svn-id: https://svn.apache.org/repos/asf/jackrabbit/trunk@1576368 13f79535-47bb-0310-9956-ffa450edef68
git-svn-id: https://svn.apache.org/repos/asf/jackrabbit/trunk@1576690 13f79535-47bb-0310-9956-ffa450edef68
git-svn-id: https://svn.apache.org/repos/asf/jackrabbit/trunk@1577127 13f79535-47bb-0310-9956-ffa450edef68
…r registering event listeners Initial version of new API git-svn-id: https://svn.apache.org/repos/asf/jackrabbit/trunk@1577213 13f79535-47bb-0310-9956-ffa450edef68
…r registering event listeners JackrabbitObservationManager should extend from ObservationManager git-svn-id: https://svn.apache.org/repos/asf/jackrabbit/trunk@1577242 13f79535-47bb-0310-9956-ffa450edef68
Initial implementation git-svn-id: https://svn.apache.org/repos/asf/jackrabbit/trunk@1577244 13f79535-47bb-0310-9956-ffa450edef68
Applying modified patch from Amit Jain -- Made derby and commons-dbcp as optional -- Removed dependency on commons-collection as it is not required git-svn-id: https://svn.apache.org/repos/asf/jackrabbit/trunk@1577422 13f79535-47bb-0310-9956-ffa450edef68
Added an overloaded method which takes Properties instance git-svn-id: https://svn.apache.org/repos/asf/jackrabbit/trunk@1577475 13f79535-47bb-0310-9956-ffa450edef68
As CachingDataStore invokes init directly its not possible to use the other init method. Added another way where clients can provide the required properties while creating S3DataStore git-svn-id: https://svn.apache.org/repos/asf/jackrabbit/trunk@1577481 13f79535-47bb-0310-9956-ffa450edef68
git-svn-id: https://svn.apache.org/repos/asf/jackrabbit/trunk@1577526 13f79535-47bb-0310-9956-ffa450edef68
… registering event listeners - updated OSGi package versions git-svn-id: https://svn.apache.org/repos/asf/jackrabbit/trunk@1577545 13f79535-47bb-0310-9956-ffa450edef68
git-svn-id: https://svn.apache.org/repos/asf/jackrabbit/trunk@1577547 13f79535-47bb-0310-9956-ffa450edef68
git-svn-id: https://svn.apache.org/repos/asf/jackrabbit/trunk@1577551 13f79535-47bb-0310-9956-ffa450edef68
git-svn-id: https://svn.apache.org/repos/asf/jackrabbit/trunk@1577553 13f79535-47bb-0310-9956-ffa450edef68
git-svn-id: https://svn.apache.org/repos/asf/jackrabbit/trunk@1577993 13f79535-47bb-0310-9956-ffa450edef68
git-svn-id: https://svn.apache.org/repos/asf/jackrabbit/trunk@1577995 13f79535-47bb-0310-9956-ffa450edef68
…figuration file Applying patch from Shashank. Thanks! git-svn-id: https://svn.apache.org/repos/asf/jackrabbit/trunk@1578774 13f79535-47bb-0310-9956-ffa450edef68
|
This implementation parses serialized content in jsop format to nodes and properties. The content tree is then serialized to xml and the resulting xml containing all the nodes and properties gets written to the repository using session.ImportXml(,,,). Therefore, adding nodes(entire subtree of nodes) to the repository is not written using regular write methods but rather using session.ImportXml. If in turn the xml importer detects that the content its trying to import is not protected, then it will use the API to directly write the content and if not, it will ask its p-i-import handlers to handle any content it detects as being protected. /cc @anchela |
|
hi alfusainey i just had a closer look at your lastest patch. apart from that, just a kind reminder with respect to the diffs: i would be really glad kind regards From: Alfusainey <notifications@github.commailto:notifications@github.com> Reply to this email directly or view it on GitHubhttps://github.com//pull/19#issuecomment-44108291. |
|
@Alfusainey while i see the benefit of having less redundant code, i think the additional serialize to xml and then in importXml deserialize again is a severe performance hit. can't you just use the same deserialized objects that represent the information and feed them into the same code? another thing: to get the acl import working, i would not go about too heavy refactorings of jackrabbit. it will be much more difficult to convince people to accept a severe refactoring with all its potential of bugs or performance penalties over just handling acl nodes with a special handler, with almost no impact on the operations that where already supported. this decision is up to @anchela and other jackrabbit maintainers but i guess they will be more at ease with less invasive changes. once you got your primary goal through, you can still look at jackrabbit and also oak and see if you want to propose further refactoring. but lets first focus on the primary goal of remoting acl information. |
|
Hi Angela, thanks for the feedback! please have a look at this latest patch which, instead of converting the json-string to xml, submits the parsed json content to the repository through the Importer interface. In Session#getImportContentHander, a concrete importer instance was created and supplied to the XML import content handler which uses the importer instance to make calls for writing the parsed xml content. one change to the json-string: i now encode jcr properties as json objects instead of simple name:value(s) pairs. encoding properties as json objects helps to represent all information about a property i.e name, type, value(s), which is needed by the importer. I take note of the diff info and seems to be inorder this time around! cheers, |
|
Hi Alfusainey,
while I see that using objects for properties is more robust, it defies to purpose of using a simple, human readable format like json. for a machine-to-machine format we can use sysview XML. I would really try to use name/value pairs as properties. and encode the type either in the value or in the name (the later has the advantage, that you can define types on jcr mv-properties easier). eg (btw: I'd prefer this discussion on the jackrabbit dev mailing list) |
|
Hi Alfusainey, rethinking this, we cannot change the format of the JSON for davex, as other clients also use it. |
There was a problem hiding this comment.
what if importer was not given because the old constructor was used?
There was a problem hiding this comment.
could you instantiate an importer with the default behaviour in the constructor that has no importer argument?
There was a problem hiding this comment.
the goal will be to finally remove the old constructor and have only one constructor- the one with the importer argument. i just did this because current JsonDiffHandler clients uses the first constructor, e.g in JcrRemotingServlet#processDiff, and i don't want to modify that code for this patch.
/cc @dbu
/cc @anchela